mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated Info, Warning and Error messages
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -225,7 +225,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
if (pointI != nNodes)
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), nodeStream)
|
||||
FatalIOErrorInFunction(nodeStream)
|
||||
<< "Only " << pointI << " nodes present instead of " << nNodes
|
||||
<< " from header." << exit(FatalIOError);
|
||||
}
|
||||
@ -258,7 +258,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (nPtsPerTet != 4)
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), eleStream)
|
||||
FatalIOErrorInFunction(eleStream)
|
||||
<< "Cannot handle tets with "
|
||||
<< nPtsPerTet << " points per tetrahedron in .ele file" << endl
|
||||
<< "Can only handle tetrahedra with four points"
|
||||
@ -377,7 +377,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (nFaceAttr != 1)
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), faceStream)
|
||||
FatalIOErrorInFunction(faceStream)
|
||||
<< "Expect boundary markers to be"
|
||||
<< " present in .face file." << endl
|
||||
<< "This is the second number in the header which is now:"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1523,7 +1523,7 @@ int main(int argc, char *argv[])
|
||||
// Check
|
||||
if (dict.found("faceSets"))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), dict)
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Please supply faces to extrude either through 'faceZones'"
|
||||
<< " or 'faceSets' entry. Found both."
|
||||
<< exit(FatalIOError);
|
||||
@ -1567,7 +1567,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (shellRegionName == regionName)
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), dict)
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Cannot extrude into same region as mesh." << endl
|
||||
<< "Mesh region : " << regionName << endl
|
||||
<< "Shell region : " << shellRegionName
|
||||
@ -1693,7 +1693,7 @@ int main(int argc, char *argv[])
|
||||
meshZoneID[i] = faceZones.findZoneID(zoneNames[i]);
|
||||
if (meshZoneID[i] == -1)
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), dict)
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Cannot find zone " << zoneNames[i] << endl
|
||||
<< "Valid zones are " << faceZones.names()
|
||||
<< exit(FatalIOError);
|
||||
@ -1740,7 +1740,7 @@ int main(int argc, char *argv[])
|
||||
zoneShadowIDs[i] = faceZones.findZoneID(zoneShadowNames[i]);
|
||||
if (zoneShadowIDs[i] == -1)
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), dict)
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Cannot find zone " << zoneShadowNames[i] << endl
|
||||
<< "Valid zones are " << faceZones.names()
|
||||
<< exit(FatalIOError);
|
||||
@ -1803,7 +1803,7 @@ int main(int argc, char *argv[])
|
||||
label faceI = iter.key();
|
||||
if (mesh.isInternalFace(faceI))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), dict)
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "faceSet " << fz.name()
|
||||
<< "contains internal faces."
|
||||
<< " This is not permitted."
|
||||
@ -1843,7 +1843,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (nExtrudeFaces != nShadowFaces)
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), dict)
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Extruded faces " << nExtrudeFaces << endl
|
||||
<< "is different from shadow faces. " << nShadowFaces
|
||||
<< "This is not permitted " << endl
|
||||
@ -1863,7 +1863,7 @@ int main(int argc, char *argv[])
|
||||
label faceI = iter.key();
|
||||
if (mesh.isInternalFace(faceI))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), dict)
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "faceSet " << fz.name()
|
||||
<< "contains internal faces."
|
||||
<< " This is not permitted."
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -60,7 +60,7 @@ void Foam::printMeshStats(const polyMesh& mesh, const bool allTopology)
|
||||
|
||||
if (returnReduce(mesh.nInternalPoints(), minOp<label>()) == -1)
|
||||
{
|
||||
WarningIn("Foam::printMeshStats(const polyMesh&, const bool)")
|
||||
WarningInFunction
|
||||
<< "Some processors have their points sorted into internal"
|
||||
<< " and external and some do not." << endl
|
||||
<< "This can cause problems later on." << endl;
|
||||
|
||||
@ -300,7 +300,7 @@ void determineDecomposition
|
||||
|
||||
if (!decomposer.parallelAware())
|
||||
{
|
||||
WarningIn("determineDecomposition(..)")
|
||||
WarningInFunction
|
||||
<< "You have selected decomposition method "
|
||||
<< decomposer.typeName
|
||||
<< " which does" << endl
|
||||
@ -543,11 +543,8 @@ void writeProcAddressing
|
||||
|
||||
if (!cellOk || !faceOk || !pointOk || !patchOk)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void writeProcAddressing"
|
||||
"(const bool, const fvMesh&, const mapDistributePolyMesh&)"
|
||||
) << "Failed to write " << cellMap.objectPath()
|
||||
WarningInFunction
|
||||
<< "Failed to write " << cellMap.objectPath()
|
||||
<< ", " << faceMap.objectPath()
|
||||
<< ", " << pointMap.objectPath()
|
||||
<< ", " << patchMap.objectPath()
|
||||
@ -785,7 +782,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("correctCoupledBoundaryConditions()")
|
||||
FatalErrorInFunction
|
||||
<< "Unsuported communications type "
|
||||
<< Pstream::commsTypeNames[Pstream::defaultCommsType]
|
||||
<< exit(FatalError);
|
||||
@ -865,7 +862,7 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
|
||||
|
||||
if (nonProcI == -1)
|
||||
{
|
||||
FatalErrorIn("redistributeAndWrite(..)")
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find non-processor patch on processor "
|
||||
<< Pstream::myProcNo() << endl
|
||||
<< " Current patches:" << patches.names()
|
||||
@ -1508,11 +1505,8 @@ void readProcAddressing
|
||||
|| mesh.boundaryMesh().size() != boundaryProcAddressing.size()
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"readProcAddressing(const fvMesh&, const autoPtr<fvMesh>&,"
|
||||
"autoPtr<mapDistributePolyMesh>&"
|
||||
) << "Read addressing inconsistent with mesh sizes" << nl
|
||||
FatalErrorInFunction
|
||||
<< "Read addressing inconsistent with mesh sizes" << nl
|
||||
<< "cells:" << mesh.nCells()
|
||||
<< " addressing:" << cellProcAddressing.objectPath()
|
||||
<< " size:" << cellProcAddressing.size() << nl
|
||||
@ -2173,7 +2167,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (env("FOAM_SIGFPE"))
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
WarningInFunction
|
||||
<< "Detected floating point exception trapping (FOAM_SIGFPE)."
|
||||
<< " This might give" << nl
|
||||
<< " problems when mapping fields. Switch it off in case"
|
||||
@ -2191,7 +2185,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "Decomposing case (like decomposePar)" << nl << endl;
|
||||
if (reconstruct)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Cannot specify both -decompose and -reconstruct"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -2206,7 +2200,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if (!overwrite)
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
WarningInFunction
|
||||
<< "Working in decompose or reconstruction mode automatically"
|
||||
<< " implies -overwrite" << nl << endl;
|
||||
overwrite = true;
|
||||
@ -2216,7 +2210,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!Pstream::parRun())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< ": This utility can only be run parallel"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -2224,7 +2218,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!isDir(args.rootPath()))
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< ": cannot open root directory " << args.rootPath()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -2375,7 +2369,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (timeDirs.empty())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "No times selected"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -192,7 +192,8 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict
|
||||
|
||||
if (!regionOptions.found(category))
|
||||
{
|
||||
FatalError<< "No options available for category "
|
||||
FatalErrorInFunction
|
||||
<< "No options available for category "
|
||||
<< category << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -207,19 +208,7 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict
|
||||
word selected;
|
||||
if (!conditionOptions.readIfPresent(option, selected))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary "
|
||||
"Foam::boundaryTemplates::generatePatchDict"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const dictionary&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Condition " << condition << ": "
|
||||
<< "No option '" << option
|
||||
<< "' available for category '" << category
|
||||
@ -231,19 +220,7 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict
|
||||
|
||||
if (!dict.found(option))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary "
|
||||
"Foam::boundaryTemplates::generatePatchDict"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const dictionary&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Condition " << condition << ": "
|
||||
<< "No option '" << option
|
||||
<< "' available for category '" << category
|
||||
@ -256,19 +233,7 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict
|
||||
|
||||
if (!optionDict.found(selected))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary "
|
||||
"Foam::boundaryTemplates::generatePatchDict"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const dictionary&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Condition " << condition << ": "
|
||||
<< "No option '" << selected
|
||||
<< "' available for category '" << category
|
||||
@ -307,19 +272,7 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary "
|
||||
"Foam::boundaryTemplates::generatePatchDict"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const dictionary&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Condition " << condition << ": "
|
||||
<< "No '" << patchType
|
||||
<< "' condition found for field '" << fieldName
|
||||
@ -329,19 +282,7 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary "
|
||||
"Foam::boundaryTemplates::generatePatchDict"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const dictionary&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Condition " << condition << ": "
|
||||
<< "No '" << patchType << "' boundary types defined in "
|
||||
<< categoryDict.dictName() << " templates. "
|
||||
@ -351,19 +292,7 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary "
|
||||
"Foam::boundaryTemplates::generatePatchDict"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const dictionary&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Condition " << condition << ": "
|
||||
<< "Invalid boundary condition type '" << patchType
|
||||
<< "'. Valid types are:" << regionTemplates.toc()
|
||||
@ -386,14 +315,7 @@ void Foam::boundaryTemplates::checkPatch
|
||||
|
||||
if (!regionTemplates.found(category))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::boundaryTemplates::checkPatch"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Condition " << condition << ": "
|
||||
<< "Unknown category '" << category
|
||||
<< "'. Valid categories are: " << regionTemplates.toc()
|
||||
@ -404,14 +326,7 @@ void Foam::boundaryTemplates::checkPatch
|
||||
|
||||
if (!categoryDict.found(patchType))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::boundaryTemplates::checkPatch"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Condition " << condition << ": "
|
||||
<< "Unknown type '" << patchType << "' in category '"
|
||||
<< category << "'. Valid types are: " << categoryDict.toc()
|
||||
@ -444,14 +359,7 @@ bool Foam::boundaryTemplates::optionsRequired
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"bool Foam::boundaryTemplates::optionsRequired"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "No type '" << patchType << "' found in category '"
|
||||
<< category << "'. Valid types are "
|
||||
<< categoryDict.toc()
|
||||
@ -460,14 +368,7 @@ bool Foam::boundaryTemplates::optionsRequired
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"bool Foam::boundaryTemplates::optionsRequired"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "No category '" << category << "' found in templates. "
|
||||
<< "Valid categories are " << templates_.toc()
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -40,7 +40,7 @@ Foam::label Foam::caseInfo::findPatchConditionID
|
||||
{
|
||||
const wordList& patchGroups = boundaryInfo_.groups()[patchI];
|
||||
|
||||
// assign condition according to last condition applied, wins
|
||||
// Assign condition according to last condition applied, wins
|
||||
forAllReverse(conditionNames_, conditionI)
|
||||
{
|
||||
const wordReList& patchNames = patchNames_[conditionI];
|
||||
@ -49,17 +49,17 @@ Foam::label Foam::caseInfo::findPatchConditionID
|
||||
{
|
||||
if (patchNames[nameI] == patchName)
|
||||
{
|
||||
// check for explicit match
|
||||
// Check for explicit match
|
||||
return conditionI;
|
||||
}
|
||||
else if (patchNames[nameI].match(patchName))
|
||||
{
|
||||
// check wildcards
|
||||
// Check wildcards
|
||||
return conditionI;
|
||||
}
|
||||
else
|
||||
{
|
||||
// check for group match
|
||||
// Check for group match
|
||||
forAll(patchGroups, groupI)
|
||||
{
|
||||
if (patchNames[nameI] == patchGroups[groupI])
|
||||
@ -71,14 +71,7 @@ Foam::label Foam::caseInfo::findPatchConditionID
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::label Foam::caseInfo::findPatchConditionID"
|
||||
"("
|
||||
"const label, "
|
||||
"const word&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Boundary patch " << patchName << " not defined"
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -94,7 +87,7 @@ void Foam::caseInfo::updateGeometricBoundaryField()
|
||||
|
||||
if (!boundaryInfo_.constraint()[i])
|
||||
{
|
||||
// condition ID to apply to mesh boundary patch name
|
||||
// Condition ID to apply to mesh boundary patch name
|
||||
const label conditionI = findPatchConditionID(i, patchName);
|
||||
|
||||
const word& category = patchCategories_[conditionI];
|
||||
@ -130,7 +123,7 @@ Foam::caseInfo::caseInfo(const Time& runTime, const word& regionName)
|
||||
patchCategories_(conditionNames_.size()),
|
||||
patchTypes_(conditionNames_.size())
|
||||
{
|
||||
// read the (user-supplied) boundary condition information
|
||||
// Read the (user-supplied) boundary condition information
|
||||
Info<< " Reading case properties" << endl;
|
||||
|
||||
forAll(conditionNames_, i)
|
||||
@ -153,7 +146,7 @@ void Foam::caseInfo::checkPatches
|
||||
const boundaryTemplates& bcTemplates
|
||||
) const
|
||||
{
|
||||
// check that all conditions have been specified correctly wrt templates
|
||||
// Check that all conditions have been specified correctly wrt templates
|
||||
forAll(conditionNames_, i)
|
||||
{
|
||||
bcTemplates.checkPatch
|
||||
@ -209,26 +202,18 @@ Foam::dictionary Foam::caseInfo::generateBoundaryField
|
||||
dictionary patchDict = dictionary::null;
|
||||
patchDict.add("type", boundaryInfo_.types()[j]);
|
||||
|
||||
// add value for processor patches
|
||||
// Add value for processor patches
|
||||
patchDict.add("value", "${:internalField}");
|
||||
boundaryField.add(patchName.c_str(), patchDict);
|
||||
}
|
||||
else
|
||||
{
|
||||
// condition ID to apply to mesh boundary patch name
|
||||
// Condition ID to apply to mesh boundary patch name
|
||||
const label conditionI = findPatchConditionID(j, patchName);
|
||||
|
||||
if (conditionI == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary Foam::caseInfo::generateBoundaryField"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const boundaryTemplates&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Unable to find patch " << patchName
|
||||
<< " in list of boundary conditions"
|
||||
<< exit(FatalError);
|
||||
@ -246,7 +231,7 @@ Foam::dictionary Foam::caseInfo::generateBoundaryField
|
||||
optionDict = bcDict_.subDict(condition).subDict("options");
|
||||
}
|
||||
|
||||
// create the patch dictionary entry
|
||||
// Create the patch dictionary entry
|
||||
dictionary patchDict
|
||||
(
|
||||
bcTemplates.generatePatchDict
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -243,7 +243,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!isDir(baseDir))
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "templateDir " << baseDir
|
||||
<< " should point to the folder containing the "
|
||||
<< "case set-up templates" << exit(FatalError);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,14 +59,7 @@ Foam::word Foam::solverTemplate::readFromDict
|
||||
{
|
||||
if (!dictHeader.headerOk())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::word Foam::solverTemplate::readFromDict"
|
||||
"("
|
||||
"IOobject&, "
|
||||
"const word&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Unable to open file "
|
||||
<< dictHeader.objectPath()
|
||||
<< exit(FatalError);
|
||||
@ -142,33 +135,16 @@ Foam::dictionary Foam::solverTemplate::readFluidFieldTemplates
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary "
|
||||
"Foam::solverTemplate::readFluidFieldTemplates"
|
||||
"("
|
||||
"const word&, "
|
||||
"const fileName&, "
|
||||
"const dictionary&, "
|
||||
"const Time&"
|
||||
") const"
|
||||
) << "Unhandled turbulence model option " << simulationType
|
||||
FatalErrorInFunction
|
||||
<< "Unhandled turbulence model option " << simulationType
|
||||
<< ". Valid options are laminar, RAS, LES"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::dictionary Foam::solverTemplate::readFluidFieldTemplates"
|
||||
"("
|
||||
"const word&, "
|
||||
"const fileName&, "
|
||||
"const dictionary&, "
|
||||
"const Time&"
|
||||
") const"
|
||||
) << "Unhandled turbulence model option " << simulationType
|
||||
FatalErrorInFunction
|
||||
<< "Unhandled turbulence model option " << simulationType
|
||||
<< ". Valid options are turbulenceModel"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (patchMapMethod.empty())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "No valid patchMapMethod for method " << mapMethod
|
||||
<< ". Please supply one through the 'patchMapMethod' option"
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -406,8 +406,9 @@ void visitPointRegion
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("visitPointRegion(..)")
|
||||
FatalErrorInFunction
|
||||
<< "problem" << exit(FatalError);
|
||||
|
||||
nextFaceI = -1;
|
||||
}
|
||||
|
||||
@ -440,7 +441,7 @@ void visitPointRegion
|
||||
|
||||
if (nextEdgeI == -1)
|
||||
{
|
||||
FatalErrorIn("visitPointRegion()")
|
||||
FatalErrorInFunction
|
||||
<< "Problem: cannot find edge out of " << fEdges
|
||||
<< "on face " << nextFaceI << " that uses point " << pointI
|
||||
<< " and is not edge " << startEdgeI << abort(FatalError);
|
||||
@ -576,7 +577,7 @@ label dupNonManifoldPoints(triSurface& s, labelList& pointMap)
|
||||
|
||||
if (mag(dupPt-sPt) > SMALL)
|
||||
{
|
||||
FatalErrorIn("dupNonManifoldPoints(..)")
|
||||
FatalErrorInFunction
|
||||
<< "dupPt:" << dupPt
|
||||
<< " sPt:" << sPt
|
||||
<< exit(FatalError);
|
||||
@ -803,7 +804,8 @@ labelList matchEdges
|
||||
{
|
||||
if (pointMap.size() != subSurf.nPoints())
|
||||
{
|
||||
FatalErrorIn("findEdges(..)") << "problem" << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "problem" << exit(FatalError);
|
||||
}
|
||||
|
||||
labelList edgeMap(subSurf.nEdges(), -1);
|
||||
@ -835,7 +837,7 @@ labelList matchEdges
|
||||
}
|
||||
else if (edgeMap[subEdgeI] != edgeI)
|
||||
{
|
||||
WarningIn("findEdges(..)") << "sub edge "
|
||||
FatalErrorInFunction
|
||||
<< subE << " points:"
|
||||
<< subE.line(subSurf.localPoints())
|
||||
<< " matches to " << edgeI
|
||||
@ -851,7 +853,7 @@ labelList matchEdges
|
||||
|
||||
if (edgeMap[subEdgeI] == -1)
|
||||
{
|
||||
FatalErrorIn("findEdges(..)") << "did not find edge matching "
|
||||
FatalErrorInFunction
|
||||
<< subE << " at:" << subSurf.localPoints()[subE[0]]
|
||||
<< subSurf.localPoints()[subE[1]]
|
||||
<< exit(FatalError);
|
||||
@ -1563,7 +1565,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!validActions.found(action))
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Unsupported action " << action << endl
|
||||
<< "Supported actions:" << validActions.toc() << abort(FatalError);
|
||||
}
|
||||
@ -1620,7 +1622,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (invertedSpace && validActions[action] == booleanSurface::DIFFERENCE)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Inverted space only makes sense for union or intersection."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -430,7 +430,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (f[0] == f[1] || f[0] == f[2] || f[1] == f[2])
|
||||
{
|
||||
//WarningIn(args.executable())
|
||||
//WarningInFunction
|
||||
// << "Illegal triangle " << faceI << " vertices " << f
|
||||
// << " coords " << f.points(surf.points()) << endl;
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1454,7 +1454,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
drawHitProblem(fI, surf, start, faceCentres, end, hitInfo);
|
||||
|
||||
// FatalErrorIn(args.executable())
|
||||
// FatalErrorInFunction
|
||||
// << "findLineAll did not hit its own face."
|
||||
// << exit(FatalError);
|
||||
}
|
||||
@ -1462,7 +1462,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if (!hitInfo[0].hit())
|
||||
{
|
||||
// FatalErrorIn(args.executable())
|
||||
// FatalErrorInFunction
|
||||
// << "findLineAll did not hit any face."
|
||||
// << exit(FatalError);
|
||||
}
|
||||
@ -1478,7 +1478,7 @@ int main(int argc, char *argv[])
|
||||
hitInfo
|
||||
);
|
||||
|
||||
// FatalErrorIn(args.executable())
|
||||
// FatalErrorInFunction
|
||||
// << "findLineAll did not hit its own face."
|
||||
// << exit(FatalError);
|
||||
}
|
||||
@ -1511,7 +1511,7 @@ int main(int argc, char *argv[])
|
||||
hitInfo
|
||||
);
|
||||
|
||||
// FatalErrorIn(args.executable())
|
||||
// FatalErrorInFunction
|
||||
// << "findLineAll did not hit its own face."
|
||||
// << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ scalar calcVertexNormalWeight
|
||||
|
||||
if (index == -1)
|
||||
{
|
||||
FatalErrorIn("calcVertexNormals()")
|
||||
FatalErrorInFunction
|
||||
<< "Point not in face" << abort(FatalError);
|
||||
}
|
||||
|
||||
@ -199,7 +199,8 @@ tmp<vectorField> calcPointNormals
|
||||
{
|
||||
if (mag(mag(pointNormals[pointI])-1) > SMALL)
|
||||
{
|
||||
FatalErrorIn("calcPointNormals()") << "unitialised"
|
||||
FatalErrorInFunction
|
||||
<< "unitialised"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -626,7 +627,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (extendFactor < 1 || extendFactor > 10)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Illegal safety factor " << extendFactor
|
||||
<< ". It is usually 1..2"
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -118,14 +118,8 @@ Foam::triSurface& Foam::searchableSurfaceModifiers::cut::triangulate
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaceModifiers::cut::triangulate\n"
|
||||
"(\n"
|
||||
" const searchableSurface&,\n"
|
||||
" triSurface&\n"
|
||||
")"
|
||||
) << "Triangulation only supported for triSurfaceMesh, searchableBox"
|
||||
FatalErrorInFunction
|
||||
<< "Triangulation only supported for triSurfaceMesh, searchableBox"
|
||||
<< ", not for surface " << cutter.name()
|
||||
<< " of type " << cutter.type()
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -69,11 +69,8 @@ Foam::searchableSurfaceModifier::New
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaceModifier::New"
|
||||
"(const word&, const searchableSurfaces&, const dictionary&)"
|
||||
) << "Unknown searchableSurfaceModifier type "
|
||||
FatalErrorInFunction
|
||||
<< "Unknown searchableSurfaceModifier type "
|
||||
<< type << nl << nl
|
||||
<< "Valid searchableSurfaceModifier types : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
|
||||
Reference in New Issue
Block a user