ENH: Updated Info, Warning and Error messages

This commit is contained in:
Andrew Heather
2015-12-08 11:15:39 +00:00
parent ae95edeea4
commit eafd5a3850
94 changed files with 351 additions and 1040 deletions

View File

@ -58,7 +58,7 @@
if (magnetZonei == -1)
{
FatalIOErrorIn(args.executable().c_str(), transportProperties)
FatalIOErrorInFunction(transportProperties)
<< "Cannot find faceZone for magnet " << magnets[i].name()
<< exit(FatalIOError);
}

View File

@ -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:"

View File

@ -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."

View File

@ -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;

View File

@ -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);
}

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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()

View File

@ -45,10 +45,8 @@ void Foam::CompactIOList<T, BaseType>::readFromStream()
}
else
{
FatalIOErrorInFunction
(
is
) << "unexpected class name " << headerClassName()
FatalIOErrorInFunction(is)
<< "unexpected class name " << headerClassName()
<< " expected " << typeName << " or " << IOList<T>::typeName
<< endl
<< " while reading object " << name()
@ -196,12 +194,8 @@ bool Foam::CompactIOList<T, BaseType>::writeObject
}
else if (overflows())
{
WarningIn
(
"CompactIOList<T, BaseType>::writeObject"
"(IOstream::streamFormat, IOstream::versionNumber"
", IOstream::compressionType) const"
) << "Overall number of elements of CompactIOList of size "
WarningInFunction
<< "Overall number of elements of CompactIOList of size "
<< this->size() << " overflows the representation of a label"
<< endl << " Switching to ascii writing" << endl;
@ -308,12 +302,8 @@ Foam::Ostream& Foam::operator<<
if (start[i] < prev)
{
FatalIOErrorIn
(
"operator<<"
"(Ostream& os, const CompactIOList<T, BaseType>&)",
os
) << "Overall number of elements " << start[i]
FatalIOErrorInFunction(os)
<< "Overall number of elements " << start[i]
<< " of CompactIOList of size "
<< L.size() << " overflows the representation of a label"
<< endl << "Please recompile with a larger representation"

View File

@ -83,7 +83,7 @@ void Foam::UPstream::setParRun(const label nProcs)
label comm = allocateCommunicator(-1, identity(nProcs), true);
if (comm != UPstream::worldComm)
{
FatalErrorIn("UPstream::setParRun(const label)")
FatalErrorInFunction
<< "problem : comm:" << comm
<< " UPstream::worldComm:" << UPstream::worldComm
<< Foam::exit(FatalError);

View File

@ -32,10 +32,8 @@ bool Foam::functionObjectState::setActive()
if (!isA<Type>(obr_))
{
WarningIn
(
"void Foam::functionObjectState::setActive()"
) << "No " << Type::typeName << " available, deactivating " << name_
WarningInFunction
<< "No " << Type::typeName << " available, deactivating " << name_
<< endl;
active_ = false;

View File

@ -73,7 +73,7 @@ public:
virtual const mapDistributeBase& distributeMap() const
{
FatalErrorIn("FieldMapper::distributeMap() const")
FatalErrorInFunction
<< "attempt to access null distributeMap"
<< abort(FatalError);
return *reinterpret_cast<mapDistributeBase*>(NULL);

View File

@ -817,7 +817,7 @@ void Foam::argList::parse
// the same build
if (slaveBuild != Foam::FOAMbuild)
{
FatalErrorIn(executable())
FatalError
<< "Master is running version " << Foam::FOAMbuild
<< "; slave " << procI << " is running version "
<< slaveBuild

View File

@ -190,19 +190,8 @@ void Foam::mapDistributeBase::checkReceivedSize
{
if (receivedSize != expectedSize)
{
FatalErrorIn
(
"template<class T>\n"
"void mapDistributeBase::distribute\n"
"(\n"
" const Pstream::commsTypes commsType,\n"
" const List<labelPair>& schedule,\n"
" const label constructSize,\n"
" const labelListList& subMap,\n"
" const labelListList& constructMap,\n"
" List<T>& field\n"
")\n"
) << "Expected from processor " << procI
FatalErrorInFunction
<< "Expected from processor " << procI
<< " " << expectedSize << " but received "
<< receivedSize << " elements."
<< abort(FatalError);
@ -265,7 +254,7 @@ void Foam::mapDistributeBase::printLayout(Ostream& os) const
{
if (minIndex[procI] != offset)
{
FatalErrorIn("mapDistributeBase::printLayout(..)")
FatalErrorInFunction
<< "offset:" << offset
<< " procI:" << procI
<< " minIndex:" << minIndex[procI]
@ -604,11 +593,8 @@ Foam::mapDistributeBase::mapDistributeBase
{
if (sendProcs.size() != recvProcs.size())
{
FatalErrorIn
(
"mapDistributeBase::mapDistributeBase"
"(const labelList&, const labelList&)"
) << "The send and receive data is not the same length. sendProcs:"
FatalErrorInFunction
<< "The send and receive data is not the same length. sendProcs:"
<< sendProcs.size() << " recvProcs:" << recvProcs.size()
<< abort(FatalError);
}
@ -1248,10 +1234,8 @@ void Foam::mapDistributeBase::operator=(const mapDistributeBase& rhs)
// Check for assignment to self
if (this == &rhs)
{
FatalErrorIn
(
"Foam::mapDistributeBase::operator=(const Foam::mapDistributeBase&)"
) << "Attempted assignment to self"
FatalErrorInFunction
<< "Attempted assignment to self"
<< abort(FatalError);
}
constructSize_ = rhs.constructSize_;

View File

@ -57,7 +57,7 @@ void Foam::mapDistributeBase::flipAndCombine
}
else
{
FatalErrorIn("mapDistributeBase::combine(..)")
FatalErrorInFunction
<< "At index " << i << " out of " << map.size()
<< " have illegal index " << map[i]
<< " for field " << rhs.size() << " with flipMap"
@ -97,7 +97,7 @@ T Foam::mapDistributeBase::accessAndFlip
}
else
{
FatalErrorIn("mapDistributeBase::accessAndFlip(..)")
FatalErrorInFunction
<< "Illegal index " << index
<< " into field of size " << fld.size()
<< " with face-flipping"
@ -590,7 +590,7 @@ void Foam::mapDistributeBase::distribute
}
else
{
FatalErrorIn("mapDistributeBase::distribute(..)")
FatalErrorInFunction
<< "Unknown communication schedule " << commsType
<< abort(FatalError);
}
@ -1066,7 +1066,7 @@ void Foam::mapDistributeBase::distribute
}
else
{
FatalErrorIn("mapDistributeBase::distribute(..)")
FatalErrorInFunction
<< "Unknown communication schedule " << commsType
<< abort(FatalError);
}
@ -1125,15 +1125,8 @@ const
if (recvField.size() != map.size())
{
FatalErrorIn
(
"template<class T>\n"
"void mapDistributeBase::receive\n"
"(\n"
" PstreamBuffers&,\n"
" List<T>&\n"
")\n"
) << "Expected from processor " << domain
FatalErrorInFunction
<< "Expected from processor " << domain
<< " " << map.size() << " but received "
<< recvField.size() << " elements."
<< abort(FatalError);

View File

@ -48,7 +48,7 @@ void Foam::mapDistributePolyMesh::calcPatchSizes()
if (min(oldPatchSizes_) < 0)
{
FatalErrorIn("mapDistributePolyMesh::calcPatchSizes()")
FatalErrorInFunction
<< "Calculated negative old patch size:" << oldPatchSizes_ << nl
<< "Error in mapping data" << abort(FatalError);
}

View File

@ -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.
@ -143,17 +143,8 @@ externalWallHeatFluxTemperatureFvPatchScalarField
if (thicknessLayers_.size() != kappaLayers_.size())
{
FatalIOErrorIn
(
"externalWallHeatFluxTemperatureFvPatchScalarField::"
"externalWallHeatFluxTemperatureFvPatchScalarField\n"
"(\n"
" const fvPatch&,\n"
" const DimensionedField<scalar, volMesh>&,\n"
" const dictionary&\n"
")\n",
dict
) << "\n number of layers for thicknessLayers and "
FatalIOErrorInFunction(dict)
<< "\n number of layers for thicknessLayers and "
<< "kappaLayers must be the same"
<< "\n for patch " << p.name()
<< " of field " << dimensionedInternalField().name()

View File

@ -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.
@ -212,13 +212,13 @@ public:
{
if (invTau_.value() <= 0)
{
FatalErrorIn("DEShybrid(const fvMesh&, Istream&)")
FatalErrorInFunction
<< "invTau coefficient must be greater than 0. "
<< "Current value: " << invTau_ << exit(FatalError);
}
if (sigmaMax_ > 1)
{
FatalErrorIn("DEShybrid(const fvMesh&, Istream&)")
FatalErrorInFunction
<< "sigmaMax coefficient must be less than or equal to 1. "
<< "Current value: " << sigmaMax_ << exit(FatalError);
}
@ -249,13 +249,13 @@ public:
{
if (invTau_.value() <= 0)
{
FatalErrorIn("DEShybrid(const fvMesh&, Istream&)")
FatalErrorInFunction
<< "invTau coefficient must be greater than 0. "
<< "Current value: " << invTau_ << exit(FatalError);
}
if (sigmaMax_ > 1)
{
FatalErrorIn("DEShybrid(const fvMesh&, Istream&)")
FatalErrorInFunction
<< "sigmaMax coefficient must be less than or equal to 1. "
<< "Current value: " << sigmaMax_ << exit(FatalError);
}
@ -303,13 +303,7 @@ public:
}
else
{
FatalErrorIn
(
"virtual tmp<surfaceScalarField> DEShybrid::blendingFactor"
"("
"const GeometricField<Type, fvPatchField, volMesh>&"
") const"
)
FatalErrorInFunction
<< "Scheme requires a turbulence model to be present. "
<< "Unable to retrieve turbulence model from the mesh "
<< "database" << exit(FatalError);

View File

@ -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.
@ -39,10 +39,7 @@ const IDDESDelta& kOmegaSSTIDDES<BasicTurbulenceModel>::setDelta() const
{
if (!isA<IDDESDelta>(this->delta_()))
{
FatalErrorIn
(
"const kOmegaSSTIDDES<BasicTurbulenceModel>::setDelta() const"
)
FatalErrorInFunction
<< "The delta function must be set to a " << IDDESDelta::typeName
<< " -based model" << exit(FatalError);
}

View File

@ -707,7 +707,7 @@ void Foam::fvMeshAdder::MapDimFields
}
else
{
WarningIn("fvMeshAdder::MapDimFields(..)")
WarningInFunction
<< "Not mapping field " << fld.name()
<< " since not present on mesh to add"
<< endl;

View File

@ -42,10 +42,8 @@ Foam::IOmapDistributePolyMesh::IOmapDistributePolyMesh(const IOobject& io)
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn
(
"IOmapDistributePolyMesh::IOmapDistributePolyMesh(const IOobject&)"
) << "Specified IOobject::MUST_READ_IF_MODIFIED but class"
WarningInFunction
<< "Specified IOobject::MUST_READ_IF_MODIFIED but class"
<< " does not support automatic rereading."
<< endl;
}
@ -76,10 +74,8 @@ Foam::IOmapDistributePolyMesh::IOmapDistributePolyMesh
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn
(
"IOmapDistributePolyMesh::IOmapDistributePolyMesh(const IOobject&)"
) << "Specified IOobject::MUST_READ_IF_MODIFIED but class"
WarningInFunction
<< "Specified IOobject::MUST_READ_IF_MODIFIED but class"
<< " does not support automatic rereading."
<< endl;
}

View File

@ -119,10 +119,8 @@ void Foam::fvMeshDistribute::inplaceRenumberWithFlip
}
else
{
FatalErrorIn
(
"fvMeshDistribute::inplaceRenumberWithFlip(..)"
) << "Problem : zero value " << val
FatalErrorInFunction
<< "Problem : zero value " << val
<< " at index " << elemI << " out of " << lst.size()
<< " list with flip bit" << exit(FatalError);
}
@ -145,10 +143,8 @@ void Foam::fvMeshDistribute::inplaceRenumberWithFlip
}
else
{
FatalErrorIn
(
"fvMeshDistribute::inplaceRenumberWithFlip(..)"
) << "Problem : zero value " << newVal
FatalErrorInFunction
<< "Problem : zero value " << newVal
<< " at index " << elemI << " out of "
<< oldToNew.size()
<< " list with flip bit" << exit(FatalError);
@ -452,11 +448,9 @@ void Foam::fvMeshDistribute::testField(const surfaceScalarField& fld)
if (mag(cos-fld[faceI]) > 1e-6)
{
//FatalErrorIn
WarningIn
(
"fvMeshDistribute::testField(const surfaceScalarField&)"
) << "On internal face " << faceI << " at "
//FatalErrorInFunction
WarningInFunction
<< "On internal face " << faceI << " at "
<< mesh.faceCentres()[faceI]
<< " the field value is " << fld[faceI]
<< " whereas cos angle of " << testNormal
@ -478,11 +472,9 @@ void Foam::fvMeshDistribute::testField(const surfaceScalarField& fld)
if (mag(cos-fvp[i]) > 1e-6)
{
label faceI = fvp.patch().start()+i;
//FatalErrorIn
WarningIn
(
"fvMeshDistribute::testField(const surfaceScalarField&)"
) << "On face " << faceI
//FatalErrorInFunction
WarningInFunction
<< "On face " << faceI
<< " on patch " << fvp.patch().name()
<< " at " << mesh.faceCentres()[faceI]
<< " the field value is " << fvp[i]

View File

@ -191,7 +191,8 @@ void Foam::fvMeshDistribute::mapExposedFaces
if (flds.size() != oldFlds.size())
{
FatalErrorIn("fvMeshDistribute::mapExposedFaces(..)") << "problem"
FatalErrorInFunction
<< "problem"
<< abort(FatalError);
}

View File

@ -166,18 +166,8 @@ Foam::displacementMotionSolver::displacementMotionSolver
{
if (points0_.size() != mesh.nPoints())
{
FatalErrorIn
(
"displacementMotionSolver::"
"displacementMotionSolver\n"
"(\n"
" const polyMesh&,\n"
" const IOdictionary&,\n"
" const pointVectorField&,\n"
" const pointIOField&,\n"
" const word&\n"
")"
) << "Number of points in mesh " << mesh.nPoints()
FatalErrorInFunction
<< "Number of points in mesh " << mesh.nPoints()
<< " differs from number of points " << points0_.size()
<< " read from file " << points0.filePath()
<< exit(FatalError);
@ -210,10 +200,8 @@ Foam::displacementMotionSolver::New
if (!displacementConstructorTablePtr_)
{
FatalErrorIn
(
"displacementMotionSolver::New(const polyMesh& mesh)"
) << "solver table is empty"
FatalErrorInFunction
<< "solver table is empty"
<< exit(FatalError);
}
@ -222,10 +210,8 @@ Foam::displacementMotionSolver::New
if (cstrIter == displacementConstructorTablePtr_->end())
{
FatalErrorIn
(
"displacementMotionSolver::New(const polyMesh&)"
) << "Unknown solver type "
FatalErrorInFunction
<< "Unknown solver type "
<< solverTypeName << nl << nl
<< "Valid solver types are:" << endl
<< displacementConstructorTablePtr_->sortedToc()

View File

@ -493,7 +493,7 @@ void Foam::addPatchCellLayer::setFaceProps
if (!found)
{
FatalErrorIn("addPatchCellLayer::setFaceProps(..)")
FatalErrorInFunction
<< "Problem: cannot find patch edge " << ppEdgeI
<< " with mesh vertices " << patchEdge
<< " at " << patchEdge.line(mesh.points())

View File

@ -661,11 +661,8 @@ Foam::refinementHistory::refinementHistory
// Temporary warning
if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
<<<<<<< HEAD:src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
WarningIn
(
"refinementHistory::refinementHistory(const IOobject&)"
) << "Specified IOobject::MUST_READ_IF_MODIFIED but class"
WarningInFunction
<< "Specified IOobject::MUST_READ_IF_MODIFIED but class"
<< " does not support automatic rereading."
<< endl;
}
@ -808,11 +805,8 @@ Foam::refinementHistory::refinementHistory
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
)
{
WarningIn
(
"refinementHistory::refinementHistory(const IOobject&"
", const labelListList&, const PtrList<refinementHistory>&)"
) << "read option IOobject::MUST_READ, READ_IF_PRESENT or "
WarningInFunction
<< "read option IOobject::MUST_READ, READ_IF_PRESENT or "
<< "MUST_READ_IF_MODIFIED"
<< " suggests that a read constructor would be more appropriate."
<< endl;

View File

@ -2260,7 +2260,8 @@ void Foam::extendedEdgeMesh::sortedOrder
break;
default:
FatalErrorIn("order(..)") << "Problem" << exit(FatalError);
FatalErrorInFunction
<< "Problem" << exit(FatalError);
break;
}
}
@ -2334,7 +2335,8 @@ void Foam::extendedEdgeMesh::sortedOrder
case extendedEdgeMesh::NONE:
default:
FatalErrorIn("order(..)") << "Problem" << exit(FatalError);
FatalErrorInFunction
<< "Problem" << exit(FatalError);
break;
}
}
@ -2378,7 +2380,8 @@ void Foam::extendedEdgeMesh::sortedOrder
case extendedEdgeMesh::NONE:
default:
FatalErrorIn("order(..)") << "Problem" << exit(FatalError);
FatalErrorInFunction
<< "Problem" << exit(FatalError);
break;
}
}

View File

@ -305,12 +305,8 @@ void Foam::pressurePIDControlInletVelocityFvPatchVectorField::updateCoeffs()
}
else
{
FatalErrorIn
(
"void Foam::"
"pressurePIDControlInletVelocityFvPatchVectorField::"
"updateCoeffs()"
) << "The dimensions of the field " << phiName_
FatalErrorInFunction
<< "The dimensions of the field " << phiName_
<< "are not recognised. The dimensions are " << phi.dimensions()
<< ". The dimensions should be either " << dimVelocity*dimArea
<< " for an incompressible case, or "
@ -346,11 +342,8 @@ void Foam::pressurePIDControlInletVelocityFvPatchVectorField::updateCoeffs()
}
else
{
WarningIn
(
"void Foam::pressurePIDControlInletVelocityFvPatchVectorField::"
"updateCoeffs()"
) << "The pressure field name, \"pName\", is \"" << pName_ << "\", "
WarningInFunction
<< "The pressure field name, \"pName\", is \"" << pName_ << "\", "
<< "but a field of that name was not found. The inlet velocity "
<< "will be set to an analytical value calculated from the "
<< "specified pressure drop. No PID control will be done and "

View File

@ -82,7 +82,7 @@ void Foam::displacementInterpolationMotionSolver::calcInterpolation()
{
FatalErrorInFunction
<< "Cannot find zone " << zoneName << endl
<< "Valid zones are " << mesh.faceZones().names()
<< "Valid zones are " << fZones.names()
<< exit(FatalError);
}

View File

@ -79,10 +79,8 @@ Foam::motionInterpolation::New(const fvMesh& mesh, Istream& entry)
if (cstrIter == IstreamConstructorTablePtr_->end())
{
FatalErrorIn
(
"motionInterpolation::New(const fvMesh&, const Istream&)"
) << "Unknown interpolation type "
FatalErrorInFunction
<< "Unknown interpolation type "
<< type << nl << nl
<< "Valid interpolation types are :" << endl
<< IstreamConstructorTablePtr_->sortedToc()

View File

@ -66,11 +66,8 @@ Foam::labelListList Foam::patchCorrectedInterpolation::getPatchGroups
if (patchGroups[patchI][patchJ] == -1)
{
FatalErrorIn
(
"Foam::patchCorrectedInterpolation::getPatchGroups"
"(Istream&) const"
) << "patch \"" << patchGroupNames[patchI][patchJ]
FatalErrorInFunction
<< "patch \"" << patchGroupNames[patchI][patchJ]
<< "\" not found" << exit(FatalError);
}
}

View File

@ -66,11 +66,8 @@ Foam::labelList Foam::patchTransformedInterpolation::getPatches
if (patches[patchI] == -1)
{
FatalErrorIn
(
"Foam::patchTransformedInterpolation::getPatches"
"(Istream&) const"
) << "patch \"" << patchNames[patchI]
FatalErrorInFunction
<< "patch \"" << patchNames[patchI]
<< "\" not found" << exit(FatalError);
}
}

View File

@ -202,33 +202,14 @@ directionalPressureGradientExplicitSource
if (fieldNames_.size() != 1)
{
FatalErrorIn
(
"Foam::fv::directionalPressureGradientExplicitSource::"
"directionalPressureGradientExplicitSource"
"("
"const word&, "
"const word&, "
"const dictionary&, "
"const fvMesh&"
")"
) << "Source can only be applied to a single field. Current "
FatalErrorInFunction
<< "Source can only be applied to a single field. Current "
<< "settings are:" << fieldNames_ << exit(FatalError);
}
if (zoneID_ < 0)
{
FatalErrorIn
(
"directionalPressureGradientExplicitSource::"
"directionalPressureGradientExplicitSource\n"
"(\n"
"const word&,\n "
"const word&,\n "
"const dictionary&, \n"
"const fvMesh& \n"
")\n"
)
FatalErrorInFunction
<< type() << " " << this->name() << ": "
<< " Unknown face zone name: " << faceZoneName_
<< ". Valid face zones are: " << mesh_.faceZones().names()
@ -251,17 +232,7 @@ directionalPressureGradientExplicitSource
}
else
{
FatalErrorIn
(
"directionalPressureGradientExplicitSource::"
"directionalPressureGradientExplicitSource\n"
"(\n"
"const word&, \n"
"const word&, \n"
"const dictionary&, \n"
"const fvMesh& \n"
") \n"
)
FatalErrorInFunction
<< "Did not find mode " << model_
<< nl
<< "Please set 'model' to one of "
@ -407,15 +378,8 @@ void Foam::fv::directionalPressureGradientExplicitSource::correct
}
else if (meshToLocal[masterCellI] == -1)
{
FatalErrorIn
(
"directionalPressureGradientExplicitSource::"
"directionalPressureGradientExplicitSource\n"
"correct"
"("
" volVectorField& U \n"
")"
) << "Did not find cell " << masterCellI
FatalErrorInFunction
<< "Did not find cell " << masterCellI
<< "in cellZone :" << cellSetName()
<< exit(FatalError);
}

View File

@ -79,13 +79,8 @@ const Foam::basicThermo& Foam::fv::tabulatedNTUHeatTransfer::thermo
{
if (!mesh.foundObject<basicThermo>("thermophysicalProperties"))
{
FatalErrorIn
(
"void Foam::fv::tabulatedHeatTransferMassFlow::thermo"
"("
"const fvMesh&"
")"
) << " on mesh " << mesh.name()
FatalErrorInFunction
<< " on mesh " << mesh.name()
<< " could not find thermophysicalProperties "
<< exit(FatalError);
}
@ -126,12 +121,7 @@ void Foam::fv::tabulatedNTUHeatTransfer::initialiseGeometry()
if ((alpha < 0) || (alpha > 1))
{
FatalErrorIn
(
"void "
"Foam::fv::tabulatedNTUHeatTransfer::"
"initialiseGeometry()"
)
FatalErrorInFunction
<< "Inlet patch blockage ratio must be between 0 and 1"
<< ". Current value: " << alpha
<< abort(FatalError);
@ -144,12 +134,7 @@ void Foam::fv::tabulatedNTUHeatTransfer::initialiseGeometry()
if ((alphaNbr < 0) || (alphaNbr > 1))
{
FatalErrorIn
(
"void "
"Foam::fv::tabulatedNTUHeatTransfer::"
"initialiseGeometry()"
)
FatalErrorInFunction
<< "Inlet patch neighbour blockage ratio must be "
<< "between 0 and 1. Current value: " << alphaNbr
<< abort(FatalError);
@ -171,12 +156,7 @@ void Foam::fv::tabulatedNTUHeatTransfer::initialiseGeometry()
if ((beta < 0) || (beta > 1))
{
FatalErrorIn
(
"void "
"Foam::fv::tabulatedNTUHeatTransfer::"
"initialiseGeometry()"
)
FatalErrorInFunction
<< "Core volume blockage ratio must be between 0 and 1"
<< ". Current value: " << beta
<< abort(FatalError);
@ -202,11 +182,7 @@ void Foam::fv::tabulatedNTUHeatTransfer::initialiseGeometry()
}
default:
{
FatalErrorIn
(
"void "
"Foam::fv::tabulatedNTUHeatTransfer::initialiseGeometry()"
)
FatalErrorInFunction
<< "Unhandled enumeration " << geometryMode_
<< abort(FatalError);
}

View File

@ -2479,7 +2479,7 @@ Foam::List<Foam::labelPair> Foam::autoLayerDriver::getBafflesOnAddedMesh
}
else
{
FatalErrorIn("addLayers(..)")
FatalErrorInFunction
<< "Problem:" << faceI << " at:"
<< mesh.faceCentres()[faceI]
<< " is on same baffle as " << p[0]
@ -4107,7 +4107,7 @@ void Foam::autoLayerDriver::addLayers
const point& dupPt = mesh.points()[dupI];
if (mag(pt-dupPt) > meshRefiner_.mergeDistance())
{
WarningIn("autoLayerDriver::addLayers(..)")
WarningInFunction
<< "Trying to merge points "
<< pointI << " at:" << pt
<< "and " << dupI << " at:" << dupPt

View File

@ -2975,7 +2975,7 @@ void Foam::autoSnapDriver::doSnap
if (mag(fc0-fc1) > meshRefiner_.mergeDistance())
{
FatalErrorIn("autoSnapDriver::doSnap(..)")
FatalErrorInFunction
<< "Separated baffles : f0:" << p[0]
<< " centre:" << fc0
<< " f1:" << p[1] << " centre:" << fc1

View File

@ -935,7 +935,7 @@ Foam::label Foam::meshRefinement::splitFacesUndo
}
else
{
FatalErrorIn("meshRefinement::splitFacesUndo()")
FatalErrorInFunction
<< "problem: twoFaces:" << twoFaces
<< exit(FatalError);
}
@ -966,7 +966,7 @@ Foam::label Foam::meshRefinement::splitFacesUndo
if (baffle.first() == -1 || baffle.second() == -1)
{
FatalErrorIn("meshRefinement::splitFacesUndo()")
FatalErrorInFunction
<< "Removed baffle : faces:" << baffle
<< exit(FatalError);
}
@ -1149,7 +1149,7 @@ Foam::label Foam::meshRefinement::splitFacesUndo
// Faces still split
if (new0 < 0 || new1 < 0)
{
FatalErrorIn("meshRefinement::splitFacesUndo()")
FatalErrorInFunction
<< "Problem: oldFaces:" << oldSplit
<< " newFaces:" << labelPair(new0, new1)
<< exit(FatalError);
@ -1168,7 +1168,7 @@ Foam::label Foam::meshRefinement::splitFacesUndo
// Merged face. Only new0 kept.
if (new0 < 0 || new1 == -1)
{
FatalErrorIn("meshRefinement::splitFacesUndo()")
FatalErrorInFunction
<< "Problem: oldFaces:" << oldSplit
<< " newFace:" << labelPair(new0, new1)
<< exit(FatalError);
@ -1207,7 +1207,7 @@ Foam::label Foam::meshRefinement::splitFacesUndo
if (baffle.first() == -1 || baffle.second() == -1)
{
FatalErrorIn("meshRefinement::splitFacesUndo()")
FatalErrorInFunction
<< "Removed baffle : faces:" << baffle
<< exit(FatalError);
}
@ -1518,7 +1518,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance
if (patchI >= 0 && pbm[patchI].coupled())
{
WarningIn("meshRefinement::balance(..)")
WarningInFunction
<< "Face at " << mesh_.faceCentres()[faceI]
<< " on zone " << fZone.name()
<< " is on coupled patch " << pbm[patchI].name()
@ -2299,12 +2299,8 @@ Foam::label Foam::meshRefinement::findRegion
// {
// if (regions[i] == -1)
// {
// FatalErrorIn
// (
// "meshRefinement::findRegion"
// "(const polyMesh&, const labelList&, const vector&"
// ", const pointField&)"
// ) << "Point " << pts[i]
// FatalErrorInFunction
// << "Point " << pts[i]
// << " is not inside the mesh." << nl
// << "Bounding box of the mesh:" << mesh.bounds()
// //<< "All points " << pts
@ -2381,7 +2377,7 @@ void Foam::meshRefinement::findRegions
label index = findIndex(insideRegions, regionI);
if (index != -1)
{
FatalErrorIn("meshRefinement::findRegions(..)")
FatalErrorInFunction
<< "Location in mesh " << locationsInMesh[index]
<< " is inside same mesh region " << regionI
<< " as location outside mesh "
@ -2475,10 +2471,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMeshRegions
label nExposedFaces = returnReduce(exposedFaces.size(), sumOp<label>());
if (nExposedFaces)
{
//FatalErrorIn
//(
// "meshRefinement::splitMeshRegions(const point&)"
//) << "Removing non-reachable cells should only expose"
// FatalErrorInFunction
// << "Removing non-reachable cells should only expose"
// << " boundary faces" << nl
// << "ExposedFaces:" << exposedFaces << abort(FatalError);
@ -2489,10 +2483,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMeshRegions
defaultPatch = globalToMasterPatch[0];
}
WarningIn
(
"meshRefinement::splitMeshRegions(const point&)"
) << "Removing non-reachable cells exposes "
WarningInFunction
<< "Removing non-reachable cells exposes "
<< nExposedFaces << " internal or coupled faces." << endl
<< " These get put into patch " << defaultPatch << endl;
exposedPatch.setSize(exposedFaces.size(), defaultPatch);

View File

@ -775,7 +775,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles
if (masterPatchI == -1 || slavePatchI == -1)
{
FatalErrorIn("meshRefinement::createZoneBaffles(..)")
FatalErrorInFunction
<< "Problem: masterPatchI:" << masterPatchI
<< " slavePatchI:" << slavePatchI << exit(FatalError);
}
@ -1270,7 +1270,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::mergeBaffles
if (!mesh_.isInternalFace(faceI))
{
FatalErrorIn("meshRefinement::mergeBaffles(..)")
FatalErrorInFunction
<< "problem: face:" << faceI
<< " at:" << mesh_.faceCentres()[faceI]
<< "(wanted patch:" << patchI
@ -1770,12 +1770,8 @@ void Foam::meshRefinement::findCellZoneInsideWalk
if (keepRegionI == -1)
{
FatalErrorIn
(
"meshRefinement::findCellZoneInsideWalk"
"(const labelList&, const labelList&"
", const labelList&, const labelList&)"
) << "Point " << insidePoint
FatalErrorInFunction
<< "Point " << insidePoint
<< " is not inside the mesh." << nl
<< "Bounding box of the mesh:" << mesh_.bounds()
<< exit(FatalError);
@ -1804,12 +1800,8 @@ void Foam::meshRefinement::findCellZoneInsideWalk
{
if (nWarnings < 10)
{
WarningIn
(
"meshRefinement::findCellZoneInsideWalk"
"(const labelList&, const labelList&"
", const labelList&, const labelList&)"
) << "Cell " << cellI
WarningInFunction
<< "Cell " << cellI
<< " at " << mesh_.cellCentres()[cellI]
<< " is inside cellZone " << zonesInMesh[i]
<< " from locationInMesh " << insidePoint
@ -2003,12 +1995,8 @@ void Foam::meshRefinement::findCellZoneTopo
if (keepRegionI == -1)
{
FatalErrorIn
(
"meshRefinement::findCellZoneTopo"
"(const point&, const labelList&"
", const labelList&, labelList&)"
) << "Point " << keepPoint
FatalErrorInFunction
<< "Point " << keepPoint
<< " is not inside the mesh." << nl
<< "Bounding box of the mesh:" << mesh_.bounds()
<< exit(FatalError);

View File

@ -1504,7 +1504,7 @@ Foam::label Foam::meshRefinement::markSmallFeatureRefinement
{
if (!info[i].hit())
{
FatalErrorIn("meshRefinement::markSmallFeatureRefinement")
FatalErrorInFunction
<< "fc:" << ctrs[i]
<< " radius:" << radiusSqr[i]
<< exit(FatalError);

View File

@ -210,10 +210,8 @@ Foam::refinementSurfaces::refinementSurfaces
|| globalLevelIncr[surfI] < 0
)
{
FatalIOErrorInFunction
(
dict
) << "Illegal level specification for surface "
FatalIOErrorInFunction(dict)
<< "Illegal level specification for surface "
<< names_[surfI]
<< " : minLevel:" << globalMinLevel[surfI]
<< " maxLevel:" << globalMaxLevel[surfI]
@ -246,12 +244,8 @@ Foam::refinementSurfaces::refinementSurfaces
|| globalGapLevel[surfI][1] > globalGapLevel[surfI][2]
)
{
FatalIOErrorIn
(
"refinementSurfaces::refinementSurfaces"
"(const searchableSurfaces&, const dictionary>&",
dict
) << "Illegal gapLevel specification for surface "
FatalIOErrorInFunction(dict)
<< "Illegal gapLevel specification for surface "
<< names_[surfI]
<< " : gapLevel:" << globalGapLevel[surfI]
<< " gapMode:" << volumeType::names[globalGapMode[surfI]]
@ -308,10 +302,8 @@ Foam::refinementSurfaces::refinementSurfaces
|| levelIncr < 0
)
{
FatalIOErrorInFunction
(
dict
) << "Illegal level specification for surface "
FatalIOErrorInFunction(dict)
<< "Illegal level specification for surface "
<< names_[surfI] << " region "
<< regionNames[regionI]
<< " : minLevel:" << refLevel[0]
@ -354,13 +346,8 @@ Foam::refinementSurfaces::refinementSurfaces
|| gapSpec[1] > gapSpec[2]
)
{
FatalIOErrorIn
(
"refinementSurfaces::refinementSurfaces"
"(const searchableSurfaces&,"
" const dictionary>&",
dict
) << "Illegal gapLevel specification for surface "
FatalIOErrorInFunction(dict)
<< "Illegal gapLevel specification for surface "
<< names_[surfI]
<< " : gapLevel:" << gapSpec
<< " gapMode:" << volumeType::names[gapModeSpec]

View File

@ -159,11 +159,8 @@ void Foam::shellSurfaces::checkGapLevels
{
if (modes_[shellI] == DISTANCE)
{
FatalIOErrorIn
(
"shellSurfaces::shellSurfaces(..)",
shellDict
) << "'gapLevel' specification cannot be used with mode "
FatalIOErrorInFunction(shellDict)
<< "'gapLevel' specification cannot be used with mode "
<< refineModeNames_[DISTANCE]
<< " for shell " << shell.name()
<< exit(FatalIOError);

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -76,7 +76,7 @@ offsetSurface::offsetSurface(const dictionary& dict)
|| b.nEdges() != o.nEdges()
)
{
FatalIOErrorIn("offsetSurface::offsetSurface(const dictionary&)", dict)
FatalIOErrorInFunction(dict)
<< "offsetSurface " << offsetName
<< " should have exactly the same topology as the baseSurface "
<< baseName << exit(FatalIOError);

View File

@ -86,12 +86,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::syncTransforms() const
{
if (periodicPatch.separation().size() > 1)
{
FatalErrorIn
(
"cyclicPeriodicAMIPolyPatch::resetAMI"
"(const AMIPatchToPatchInterpolation::interpolationMethod&"
") const"
) << "Periodic patch " << periodicPatchName_
FatalErrorInFunction
<< "Periodic patch " << periodicPatchName_
<< " has non-uniform separation vector "
<< periodicPatch.separation()
<< "This is not allowed inside " << type()
@ -101,12 +97,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::syncTransforms() const
if (periodicPatch.forwardT().size() > 1)
{
FatalErrorIn
(
"cyclicPeriodicAMIPolyPatch::resetAMI"
"(const AMIPatchToPatchInterpolation::interpolationMethod&"
") const"
) << "Periodic patch " << periodicPatchName_
FatalErrorInFunction
<< "Periodic patch " << periodicPatchName_
<< " has non-uniform transformation tensor "
<< periodicPatch.forwardT()
<< "This is not allowed inside " << type()
@ -501,13 +493,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
// so for now this situation is flagged as a SeriousError instead of
// a FatalError since the default matchTolerance is quite strict
// (0.001) and can get triggered far into the simulation.
SeriousErrorIn
(
"void Foam::cyclicPeriodicAMIPolyPatch::resetPeriodicAMI"
"("
"const AMIPatchToPatchInterpolation::interpolationMethod&"
") const"
)
SeriousErrorInFunction
<< "Patches " << name() << " and " << neighbPatch().name()
<< " do not couple to within a tolerance of "
<< matchTolerance()
@ -534,13 +520,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
// This check means that e.g. different numbers of stator and
// rotor partitions are not allowed.
// Again see the section above about tolerances.
SeriousErrorIn
(
"void Foam::cyclicPeriodicAMIPolyPatch::resetPeriodicAMI"
"("
"const AMIPatchToPatchInterpolation::interpolationMethod&"
") const"
)
SeriousErrorInFunction
<< "Patches " << name() << " and " << neighbPatch().name()
<< " do not overlap an integer number of times when transformed"
<< " according to the periodic patch "
@ -676,7 +656,7 @@ Foam::label Foam::cyclicPeriodicAMIPolyPatch::periodicPatchID() const
if (periodicPatchID_ == -1)
{
FatalErrorIn("cyclicPolyAMIPatch::periodicPatchID() const")
FatalErrorInFunction
<< "Illegal periodicPatch name " << periodicPatchName_
<< nl << "Valid patch names are "
<< this->boundaryMesh().names()

View File

@ -1036,13 +1036,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
|| allCellInfo.size() != mesh_.nCells()
)
{
FatalErrorIn
(
"FaceCellWave<Type, TrackingData>::FaceCellWave"
"(const polyMesh&, const List<labelPair>&, const labelList&"
", const List<Type>,"
" UList<Type>&, UList<Type>&, const label maxIter)"
) << "face and cell storage not the size of mesh faces, cells:"
FatalErrorInFunction
<< "face and cell storage not the size of mesh faces, cells:"
<< endl
<< " allFaceInfo :" << allFaceInfo.size() << endl
<< " mesh_.nFaces():" << mesh_.nFaces() << endl
@ -1059,13 +1054,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
if ((maxIter > 0) && (iter >= maxIter))
{
FatalErrorIn
(
"FaceCellWave<Type, TrackingData>::FaceCellWave"
"(const polyMesh&, const List<labelPair>&, const labelList&"
", const List<Type>, UList<Type>&, UList<Type>&"
", const label maxIter)"
) << "Maximum number of iterations reached. Increase maxIter." << endl
FatalErrorInFunction
<< "Maximum number of iterations reached. Increase maxIter." << endl
<< " maxIter:" << maxIter << endl
<< " nChangedCells:" << nChangedCells_ << endl
<< " nChangedFaces:" << nChangedFaces_ << endl

View File

@ -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.
@ -119,7 +119,7 @@ void Foam::regionSplit::calcNonCompactRegionSplit
if (blockedFace.size() && !blockedFace[faceI])
{
FatalErrorIn("regionSplit::calcNonCompactRegionSplit(..)")
FatalErrorInFunction
<< "Problem: unblocked face " << faceI
<< " at " << mesh().faceCentres()[faceI]
<< " on unassigned cell " << cellI

View File

@ -98,15 +98,8 @@ Foam::triSurface Foam::subTriSurfaceMesh::subset
if (regionMap.size() == 0)
{
FatalIOErrorIn
(
"subTriSurfaceMesh::subset"
"(\n"
" const IOobject&,\n"
" const dictionary&\n"
")",
dict
) << "Found no regions in triSurface matching " << regionNames
FatalIOErrorInFunction(dict)
<< "Found no regions in triSurface matching " << regionNames
<< ". Valid regions are " << patchNames(s)
<< exit(FatalIOError);
}

View File

@ -62,15 +62,8 @@ Foam::decompositionConstraint::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"decompositionConstraint::New"
"("
"const dictionary&, "
"const word&"
")",
dict
) << "Unknown decompositionConstraint type "
FatalIOErrorInFunction(dict)
<< "Unknown decompositionConstraint type "
<< modelType << nl << nl
<< "Valid decompositionConstraint types:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -132,11 +132,8 @@ void Foam::decompositionConstraints::preserveBafflesConstraint::add
{
label p0Slave = faceToFace[p[0]];
label p1Slave = faceToFace[p[1]];
IOWarningIn
(
"preserveBafflesConstraint::add(..)",
coeffDict_
) << "When adding baffle between faces "
IOWarningInFunction(coeffDict_)
<< "When adding baffle between faces "
<< p[0] << " at " << mesh.faceCentres()[p[0]]
<< " and "
<< p[1] << " at " << mesh.faceCentres()[p[1]]

View File

@ -160,7 +160,7 @@ void Foam::fieldMinMax::write()
{
if (active_)
{
if (!writeLocation_) writeTime(obr_.time().value());
if (!writeLocation_) writeTime(file());
if (log_) Info<< type() << " " << name_ << " output:" << nl;

View File

@ -180,7 +180,7 @@ void Foam::fieldValues::fieldValueDelta::execute()
if (entries1.size() != entries2.size())
{
FatalErrorIn("void Foam::fieldValues::fieldValueDelta::execute()")
FatalErrorInFunction
<< name_ << ": objects must generate the same number of results"
<< nl
<< " " << name1 << " objects: " << entries1 << nl
@ -197,10 +197,7 @@ void Foam::fieldValues::fieldValueDelta::execute()
if (type1 != type2)
{
FatalErrorIn
(
"void Foam::fieldValues::fieldValueDelta::execute()"
)
FatalErrorInFunction
<< name_
<< ": input values for operation must be of the same type"
<< nl

View File

@ -47,13 +47,7 @@ void Foam::nearWallFields::createFields
if (obr_.found(sampleFldName))
{
WarningIn
(
"void Foam::nearWallFields::createFields"
"("
"PtrList<GeometricField<Type, fvPatchField, volMesh> >&"
") const"
)
WarningInFunction
<< " a field named " << sampleFldName
<< " already exists on the mesh"
<< endl;

View File

@ -165,7 +165,7 @@ void Foam::streamLineBase::initInterpolations
}
else
{
FatalErrorIn("streamLineBase::track()")
FatalErrorInFunction
<< "Cannot find field " << fields_[i] << nl
<< "Valid scalar fields are:"
<< mesh.names(volScalarField::typeName) << nl
@ -238,7 +238,7 @@ void Foam::streamLineBase::initInterpolations
if (UIndex == -1)
{
FatalErrorIn("streamLineBase::track()")
FatalErrorInFunction
<< "Cannot find field to move particles with : " << UName_ << nl
<< "This field has to be present in the sampled fields " << fields_
<< " and in the objectRegistry."
@ -575,7 +575,7 @@ void Foam::streamLineBase::read(const dictionary& dict)
UName_ = "U";
if (dict.found("U"))
{
IOWarningIn("streamLineBase::read(const dictionary&)", dict)
IOWarningInFunction(dict)
<< "Using deprecated entry \"U\"."
<< " Please use \"UName\" instead."
<< endl;
@ -585,7 +585,7 @@ void Foam::streamLineBase::read(const dictionary& dict)
if (findIndex(fields_, UName_) == -1)
{
FatalIOErrorIn("streamLineBase::read(const dictionary&)", dict)
FatalIOErrorInFunction(dict)
<< "Velocity field for tracking " << UName_
<< " should be present in the list of fields " << fields_
<< exit(FatalIOError);
@ -596,7 +596,7 @@ void Foam::streamLineBase::read(const dictionary& dict)
dict.lookup("lifeTime") >> lifeTime_;
if (lifeTime_ < 1)
{
FatalErrorIn(":streamLineBase::read(const dictionary&)")
FatalErrorInFunction
<< "Illegal value " << lifeTime_ << " for lifeTime"
<< exit(FatalError);
}

View File

@ -162,7 +162,7 @@ void Foam::valueAverage::execute()
if (unprocessedFields.size())
{
WarningIn("bool Foam::valueAverage::execute()")
WarningInFunction
<< "From function object: " << functionObjectName_ << nl
<< "Unprocessed fields:" << nl;

View File

@ -923,10 +923,8 @@ void Foam::forces::read(const dictionary& dict)
if (nBin_ < 0)
{
FatalIOErrorIn
(
"void Foam::forces::read(const dictionary&)", dict
) << "Number of bins (nBin) must be zero or greater"
FatalIOErrorInFunction(dict)
<< "Number of bins (nBin) must be zero or greater"
<< exit(FatalIOError);
}
else if (nBin_ == 0)

View File

@ -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.
@ -407,19 +407,7 @@ void Foam::fieldVisualisationBase::addGlyphs
}
else
{
WarningIn
(
"void Foam::fieldVisualisationBase::addGlyphs"
"("
"const scalar, "
"const word&, "
"const word&, "
"const scalar, "
"vtkPolyData*, "
"vtkActor*, "
"vtkRenderer*"
") const"
)
WarningInFunction
<< "Glyphs can only be added to " << pTraits<scalar>::typeName
<< " and " << pTraits<vector>::typeName << " fields. "
<< " Field " << scaleFieldName << " has " << nComponents

View File

@ -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.
@ -102,14 +102,7 @@ void Foam::functionObjectCloud::addGeometryToScene
if (fName.empty())
{
WarningIn
(
"void Foam::functionObjectCloud::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Line will not be processed"

View File

@ -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.
@ -93,14 +93,7 @@ void Foam::functionObjectLine::addGeometryToScene
fileName fName;
if (!dict.readIfPresent("file", fName))
{
WarningIn
(
"void Foam::functionObjectLine::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Line will not be processed"

View File

@ -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.
@ -95,14 +95,7 @@ void Foam::functionObjectSurface::addGeometryToScene
fileName fName;
if (!dict.readIfPresent("file", fName))
{
WarningIn
(
"void Foam::functionObjectSurface::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Surface will not be processed"

View File

@ -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.
@ -64,15 +64,7 @@ void Foam::geometrySurface::addGeometryToScene
{
if (representation_ == rtGlyph)
{
FatalErrorIn
(
"void Foam::geometrySurface::addGeometryToScene"
"("
"const label, "
"vtkRenderer*, "
"const fileName&"
") const"
)
FatalErrorInFunction
<< "Glyph representation not available for " << typeName
<< "object" << exit(FatalError);
}

View File

@ -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.
@ -182,16 +182,8 @@ Foam::autoPtr<Foam::pathline> Foam::pathline::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::pathline> Foam::pathline::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown pathline type "
FatalErrorInFunction
<< "Unknown pathline type "
<< pathlineType << nl << nl
<< "Valid pathline types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -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.
@ -142,16 +142,8 @@ Foam::autoPtr<Foam::pointData> Foam::pointData::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::pointData> Foam::pointData::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown pointData type "
FatalErrorInFunction
<< "Unknown pointData type "
<< pointDataType << nl << nl
<< "Valid pointData types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -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.
@ -102,11 +102,7 @@ void Foam::runTimePostProcessing::read(const dictionary& dict)
{
if (!iter().isDict())
{
FatalIOErrorIn
(
"void Foam::runTimePostProcessing::read(const dictionary&)",
textDict
)
FatalIOErrorInFunction(textDict)
<< "text must be specified in dictionary format"
<< exit(FatalIOError);
}

View File

@ -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.
@ -37,15 +37,7 @@ void Foam::runTimePostProcessing::readObjects
{
if (!iter().isDict())
{
FatalIOErrorIn
(
"void Foam::runTimePostProcessing::readObjects"
"("
"const dictionary&, "
"PtrList<Type>&"
")",
dict
)
FatalIOErrorInFunction(dict)
<< dict.dictName()
<< " objects must be specified in dictionary format"
<< exit(FatalIOError);

View File

@ -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.
@ -61,11 +61,8 @@ void Foam::scene::readCamera(const dictionary& dict)
{
if (nFrameTotal_ < 1)
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "nFrameTotal must be 1 or greater"
FatalIOErrorInFunction(dict)
<< "nFrameTotal must be 1 or greater"
<< exit(FatalIOError);
}
}
@ -74,11 +71,8 @@ void Foam::scene::readCamera(const dictionary& dict)
{
if ((position_ < 0) || (position_ > 1))
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "startPosition must be in the range 0-1"
FatalIOErrorInFunction(dict)
<< "startPosition must be in the range 0-1"
<< exit(FatalIOError);
}
}
@ -91,11 +85,8 @@ void Foam::scene::readCamera(const dictionary& dict)
scalar endPosition = dict.lookupOrDefault<scalar>("endPosition", 1);
if ((endPosition < 0) || (endPosition > 1))
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "endPosition must be in the range 0-1"
FatalIOErrorInFunction(dict)
<< "endPosition must be in the range 0-1"
<< exit(FatalIOError);
}
dPosition_ = (endPosition - position_)/scalar(nFrameTotal_ - 1);
@ -137,7 +128,7 @@ void Foam::scene::readCamera(const dictionary& dict)
}
default:
{
FatalErrorIn("void Foam::scene::read(const dictionary&)")
FatalErrorInFunction
<< "Unhandled enumeration " << modeTypeNames_[mode_]
<< abort(FatalError);
}

View File

@ -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.
@ -205,16 +205,8 @@ Foam::autoPtr<Foam::surface> Foam::surface::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::surface> Foam::surface::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown surface type "
FatalErrorInFunction
<< "Unknown surface type "
<< surfaceType << nl << nl
<< "Valid surface types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -203,12 +203,7 @@ void Foam::externalCoupledFunctionObject::wait() const
{
if (totalTime > timeOut_)
{
FatalErrorIn
(
"void "
"Foam::externalCoupledFunctionObject::wait() "
"const"
)
FatalErrorInFunction
<< "Wait time exceeded time out time of " << timeOut_
<< " s" << abort(FatalError);
}
@ -280,11 +275,8 @@ void Foam::externalCoupledFunctionObject::readColumns
{
if (!masterFilePtr().good())
{
FatalIOErrorIn
(
"externalCoupledFunctionObject::readColumns()",
masterFilePtr()
) << "Trying to read data for processor " << procI
FatalIOErrorInFunction(masterFilePtr())
<< "Trying to read data for processor " << procI
<< " row " << rowI
<< ". Does your file have as many rows as there are"
<< " patch faces (" << globalFaces.size()
@ -347,11 +339,8 @@ void Foam::externalCoupledFunctionObject::readLines
{
if (!masterFilePtr().good())
{
FatalIOErrorIn
(
"externalCoupledFunctionObject::readColumns()",
masterFilePtr()
) << "Trying to read data for processor " << procI
FatalIOErrorInFunction(masterFilePtr())
<< "Trying to read data for processor " << procI
<< " row " << rowI
<< ". Does your file have as many rows as there are"
<< " patch faces (" << globalFaces.size()
@ -542,10 +531,8 @@ Foam::word Foam::externalCoupledFunctionObject::compositeName
{
if (regionNames.size() == 0)
{
FatalErrorIn
(
"externalCoupledFunctionObject::compositeName(const wordList&)"
) << "Empty regionNames" << abort(FatalError);
FatalErrorInFunction
<< "Empty regionNames" << abort(FatalError);
return word::null;
}
else if (regionNames.size() == 1)
@ -586,10 +573,8 @@ void Foam::externalCoupledFunctionObject::checkOrder
sortedOrder(regionNames, order);
if (order != identity(regionNames.size()))
{
FatalErrorIn
(
"externalCoupledFunctionObject::checkOrder(const wordList&)"
) << "regionNames " << regionNames << " not in alphabetical order :"
FatalErrorInFunction
<< "regionNames " << regionNames << " not in alphabetical order :"
<< order << exit(FatalError);
}
}
@ -655,10 +640,7 @@ void Foam::externalCoupledFunctionObject::readData()
if (!ok)
{
WarningIn
(
"void Foam::externalCoupledFunctionObject::readData()"
)
WarningInFunction
<< "Field " << fieldName << " in regions " << compName
<< " was not found." << endl;
}
@ -728,10 +710,7 @@ void Foam::externalCoupledFunctionObject::writeData() const
if (!ok)
{
WarningIn
(
"void Foam::externalCoupledFunctionObject::writeData()"
)
WarningInFunction
<< "Field " << fieldName << " in regions " << compName
<< " was not found." << endl;
}
@ -948,12 +927,7 @@ bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
{
if (!iter().isDict())
{
FatalIOErrorIn
(
"void Foam::externalCoupledFunctionObject::read"
"(const dictionary&)",
allRegionsDict
)
FatalIOErrorInFunction(allRegionsDict)
<< "Regions must be specified in dictionary format"
<< exit(FatalIOError);
}
@ -973,12 +947,7 @@ bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
{
if (!regionIter().isDict())
{
FatalIOErrorIn
(
"void Foam::externalCoupledFunctionObject::read"
"(const dictionary&)",
regionDict
)
FatalIOErrorInFunction(regionDict)
<< "Regions must be specified in dictionary format"
<< exit(FatalIOError);
}

View File

@ -73,16 +73,8 @@ bool Foam::externalCoupledFunctionObject::readData
if (!masterFilePtr().good())
{
FatalIOErrorIn
(
"void externalCoupledFunctionObject::readData"
"("
"const UPtrList<const fvMesh>&, "
"const wordRe&, "
"const word&"
")",
masterFilePtr()
) << "Cannot open file for region " << compositeName(regionNames)
FatalIOErrorInFunction(masterFilePtr())
<< "Cannot open file for region " << compositeName(regionNames)
<< ", field " << fieldName
<< exit(FatalIOError);
}
@ -285,15 +277,7 @@ bool Foam::externalCoupledFunctionObject::readData
}
else
{
FatalErrorIn
(
"void externalCoupledFunctionObject::readData"
"("
"const UPtrList<const fvMesh>&, "
"const wordRe&, "
"const word&"
")"
)
FatalErrorInFunction
<< "Unsupported boundary condition " << bf[patchI].type()
<< " for patch " << bf[patchI].patch().name()
<< " in region " << mesh.name()
@ -389,16 +373,8 @@ bool Foam::externalCoupledFunctionObject::writeData
if (!masterFilePtr().good())
{
FatalIOErrorIn
(
"externalCoupledFunctionObject::writeData"
"("
"const UPtrList<const fvMesh>&, "
"const wordRe&, "
"const word&"
") const",
masterFilePtr()
) << "Cannot open file for region " << compositeName(regionNames)
FatalIOErrorInFunction(masterFilePtr())
<< "Cannot open file for region " << compositeName(regionNames)
<< ", field " << fieldName
<< exit(FatalIOError);
}

View File

@ -135,7 +135,7 @@ bool Foam::averageCondition::apply()
if (unprocessedFields.size())
{
WarningIn("bool Foam::averageCondition::apply()")
WarningInFunction
<< "From function object: " << functionObjectName_ << nl
<< "Unprocessed fields:" << nl;

View File

@ -74,17 +74,7 @@ Foam::equationInitialResidualCondition::equationInitialResidualCondition
{
if (!fieldNames_.size())
{
WarningIn
(
"Foam::equationInitialResidualCondition::"
"equationInitialResidualCondition"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
)
WarningInFunction
<< "No fields supplied: deactivating" << endl;
active_ = false;
@ -151,10 +141,7 @@ bool Foam::equationInitialResidualCondition::apply()
}
default:
{
FatalErrorIn
(
"bool Foam::equationInitialResidualCondition::apply()"
)
FatalErrorInFunction
<< "Unhandled enumeration "
<< operatingModeNames[mode_]
<< abort(FatalError);
@ -168,7 +155,7 @@ bool Foam::equationInitialResidualCondition::apply()
{
if (result[i] < 0)
{
WarningIn("bool Foam::equationInitialResidualCondition::apply()")
WarningInFunction
<< "Initial residual data not found for field "
<< fieldNames_[i] << endl;
}
@ -180,7 +167,7 @@ bool Foam::equationInitialResidualCondition::apply()
if (!valid)
{
WarningIn("bool Foam::equationInitialResidualCondition::apply()")
WarningInFunction
<< "Initial residual data not found for any fields: "
<< "deactivating" << endl;

View File

@ -59,17 +59,7 @@ Foam::equationMaxIterCondition::equationMaxIterCondition
{
if (!fieldNames_.size())
{
WarningIn
(
"Foam::equationMaxIterCondition::"
"equationMaxIterCondition"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
)
WarningInFunction
<< "No fields supplied: deactivating" << endl;
active_ = false;
@ -129,7 +119,7 @@ bool Foam::equationMaxIterCondition::apply()
{
if (result[i] < 0)
{
WarningIn("bool Foam::equationMaxIterCondition::apply()")
WarningInFunction
<< "Number of iterations data not found for field "
<< fieldNames_[i] << endl;
}
@ -141,7 +131,7 @@ bool Foam::equationMaxIterCondition::apply()
if (!valid)
{
WarningIn("bool Foam::equationMaxIterCondition::apply()")
WarningInFunction
<< "Number of iterations data not found for any fields: "
<< "deactivating" << endl;

View File

@ -104,7 +104,7 @@ bool Foam::minMaxCondition::apply()
if (valueType == word::null)
{
WarningIn("bool Foam::minMaxCondition::apply()")
WarningInFunction
<< "Unable to find entry " << fieldName
<< " for function object " << functionObjectName_
<< ". Condition will not be applied."

View File

@ -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.
@ -44,16 +44,8 @@ Foam::autoPtr<Foam::runTimeCondition> Foam::runTimeCondition::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"runTimeCondition::New"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
) << "Unknown runTimeCondition type "
FatalErrorInFunction
<< "Unknown runTimeCondition type "
<< conditionType << nl << nl
<< "Valid runTimeCondition types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -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.
@ -163,7 +163,7 @@ void Foam::runTimeControl::execute()
if (conditionIter == groupMap_.end())
{
FatalErrorIn("void Foam::runTimeControl::execute()")
FatalErrorInFunction
<< "group " << groupI << " not found in map"
<< abort(FatalError);
}

View File

@ -70,16 +70,8 @@ Foam::DESModelRegions::DESModelRegions
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"DESModelRegions::DESModelRegions"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}

View File

@ -126,7 +126,7 @@ void Foam::blendingFactor::read(const dictionary& dict)
dict.readIfPresent("tolerance", tolerance_);
if ((tolerance_ < 0) || (tolerance_ > 1))
{
FatalErrorIn("void Foam::blendingFactor::read(const dictionary&)")
FatalErrorInFunction
<< "tolerance must be in the range 0 to 1. Supplied value: "
<< tolerance_ << exit(FatalError);
}

View File

@ -75,17 +75,7 @@ void Foam::fluxSummary::initialiseFaceZone
if (zoneI == -1)
{
FatalErrorIn
(
"void Foam::fluxSummary::initialiseFaceZone"
"("
"const word&, "
"DynamicList<word>&, "
"DynamicList<List<label> >&, "
"DynamicList<List<label> >&, "
"DynamicList<List<scalar> >&"
") const"
)
FatalErrorInFunction
<< "Unable to find faceZone " << faceZoneName
<< ". Valid faceZones are: " << mesh.faceZones().names()
<< exit(FatalError);
@ -178,19 +168,7 @@ void Foam::fluxSummary::initialiseFaceZoneAndDirection
if (zoneI == -1)
{
FatalErrorIn
(
"void Foam::fluxSummary::initialiseFaceZoneAndDirection"
"("
"const word&, "
"const vector&, "
"DynamicList<vector>&, "
"DynamicList<word>&, "
"DynamicList<List<label> >&, "
"DynamicList<List<label> >&, "
"DynamicList<List<scalar> >&"
") const"
)
FatalErrorInFunction
<< "Unable to find faceZone " << faceZoneName
<< ". Valid faceZones are: " << mesh.faceZones().names()
<< exit(FatalError);
@ -299,19 +277,7 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
if (cellZoneI == -1)
{
FatalErrorIn
(
"void Foam::fluxSummary::initialiseCellZoneAndDirection"
"("
"const word&, "
"const vector&, "
"DynamicList<vector>&, "
"DynamicList<word>&, "
"DynamicList<List<label> >&, "
"DynamicList<List<label> >&, "
"DynamicList<List<scalar> >&"
") const"
)
FatalErrorInFunction
<< "Unable to find cellZone " << cellZoneName
<< ". Valid zones are: " << mesh.cellZones().names()
<< exit(FatalError);
@ -474,19 +440,8 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
{
if (allEdgeInfo[fEdges[i]].region() != -1)
{
WarningIn
(
"void Foam::fluxSummary::initialiseCellZoneAndDirection"
"("
"const word&, "
"const vector&, "
"DynamicList<vector>&, "
"DynamicList<word>&, "
"DynamicList<List<label> >&, "
"DynamicList<List<label> >&, "
"DynamicList<List<scalar> >&"
") const"
) << "Problem in edge face wave: attempted to assign a "
WarningInFunction
<< "Problem in edge face wave: attempted to assign a "
<< "value to an edge that has already been visited. "
<< "Edge info: " << allEdgeInfo[fEdges[i]]
<< endl;
@ -650,16 +605,8 @@ Foam::fluxSummary::fluxSummary
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"fluxSummary::fluxSummary"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}
@ -759,11 +706,7 @@ void Foam::fluxSummary::read(const dictionary& dict)
}
default:
{
FatalIOErrorIn
(
"void Foam::fluxSummary::read(const dictionary&)",
dict
)
FatalIOErrorInFunction(dict)
<< "unhandled enumeration " << modeTypeNames_[mode_]
<< abort(FatalIOError);
}
@ -887,7 +830,7 @@ void Foam::fluxSummary::write()
}
else
{
FatalErrorIn("void Foam::fluxSummary::write()")
FatalErrorInFunction
<< "Unsupported flux field " << phi.name() << " with dimensions "
<< phi.dimensions() << ". Expected eithe mass flow or volumetric "
<< "flow rate" << abort(FatalError);

View File

@ -66,13 +66,7 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::rho
{
if (!rhoInfInitialised_)
{
FatalErrorIn
(
"Foam::tmp<Foam::volScalarField> Foam::pressureTools::rho"
"("
" const volScalarField&"
") const"
)
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< "pressure identified as incompressible, but reference "
<< "density is not set. Please set rhoName to rhoInf, and "

View File

@ -162,7 +162,7 @@ void Foam::yPlus::execute()
}
else
{
WarningIn("void Foam::yPlus::execute()")
WarningInFunction
<< "Unable to find compressible turbulence model in the "
<< "database: yPlus will not be calculated" << endl;
}
@ -181,14 +181,14 @@ void Foam::yPlus::execute()
}
else
{
WarningIn("void Foam::yPlus::execute()")
WarningInFunction
<< "Unable to find incompressible turbulence model in the "
<< "database: yPlus will not be calculated" << endl;
}
}
else
{
WarningIn("void Foam::yPlus::execute()")
WarningInFunction
<< "Unknown " << phiName_ << " dimensions: "
<< phi.dimensions() << nl
<< "Expected either " << dimMass/dimTime << " or "

View File

@ -81,7 +81,6 @@ void Foam::yPlus::calcYPlus
<< token::TAB << avgYplus
<< endl;
}
}
else if (isA<wallFvPatch>(patch))
{
yPlus.boundaryField()[patchi] =

View File

@ -199,7 +199,7 @@ void Foam::cellVolumeWeightMethod::calculateAddressing
if (mag(srcVol) > ROOTVSMALL && mag((tgtVol-srcVol)/srcVol) > 1e-6)
{
WarningIn("cellVolumeWeightMethod::calculateAddressing(..)")
WarningInFunction
<< "At cell " << cellI << " cc:"
<< src_.cellCentres()[cellI]
<< " vol:" << srcVol
@ -215,7 +215,7 @@ void Foam::cellVolumeWeightMethod::calculateAddressing
if (mag(tgtVol) > ROOTVSMALL && mag((srcVol-tgtVol)/tgtVol) > 1e-6)
{
WarningIn("cellVolumeWeightMethod::calculateAddressing(..)")
WarningInFunction
<< "At cell " << cellI << " cc:"
<< tgt_.cellCentres()[cellI]
<< " vol:" << tgtVol

View File

@ -164,10 +164,8 @@ void Foam::correctedCellVolumeWeightMethod::calculateAddressing
if (mag(srcVol) > ROOTVSMALL && mag((tgtVol-srcVol)/srcVol) > 1e-6)
{
WarningIn
(
"correctedCellVolumeWeightMethod::calculateAddressing(..)"
) << "At cell " << cellI << " cc:"
WarningInFunction
<< "At cell " << cellI << " cc:"
<< src_.cellCentres()[cellI]
<< " vol:" << srcVol
<< " total overlap volume:" << tgtVol
@ -182,10 +180,8 @@ void Foam::correctedCellVolumeWeightMethod::calculateAddressing
if (mag(tgtVol) > ROOTVSMALL && mag((srcVol-tgtVol)/tgtVol) > 1e-6)
{
WarningIn
(
"correctedCellVolumeWeightMethod::calculateAddressing(..)"
) << "At cell " << cellI << " cc:"
WarningInFunction
<< "At cell " << cellI << " cc:"
<< tgt_.cellCentres()[cellI]
<< " vol:" << tgtVol
<< " total overlap volume:" << srcVol

View File

@ -87,11 +87,8 @@ public:
if ((singlePatchProc_ == -1) != (distMapPtr_ != NULL))
{
FatalErrorIn
(
"distributedWeightedFvPatchFieldMapper::"
"distributedWeightedFvPatchFieldMapper(..)"
) << "Supply a mapDistributeBase if and only if "
FatalErrorInFunction
<< "Supply a mapDistributeBase if and only if "
<< "singlePatchProc is -1"
<< " singlePatchProc_:" << singlePatchProc_
<< " distMapPtr_:" << (distMapPtr_ != NULL)
@ -132,11 +129,8 @@ public:
{
if (!distMapPtr_)
{
FatalErrorIn
(
"distributedWeightedFvPatchFieldMapper::"
"distributeMap()"
) << "Cannot ask for distributeMap on a non-distributed"
FatalErrorInFunction
<< "Cannot ask for distributeMap on a non-distributed"
<< " mapper" << exit(FatalError);
}
return *distMapPtr_;

View File

@ -155,16 +155,8 @@ void Foam::meshToMesh::mapSrcToTgt
{
if (result.size() != tgtToSrcCellAddr_.size())
{
FatalErrorIn
(
"void Foam::meshToMesh::mapSrcToTgt"
"("
"const UList<Type>&, "
"const UList<typename outerProduct<vector, Type>::type>&, "
"const CombineOp&, "
"List<Type>&"
") const"
) << "Supplied field size is not equal to target mesh size" << nl
FatalErrorInFunction
<< "Supplied field size is not equal to target mesh size" << nl
<< " source mesh = " << srcToTgtCellAddr_.size() << nl
<< " target mesh = " << tgtToSrcCellAddr_.size() << nl
<< " supplied field = " << result.size()
@ -376,16 +368,8 @@ void Foam::meshToMesh::mapTgtToSrc
{
if (result.size() != srcToTgtCellAddr_.size())
{
FatalErrorIn
(
"void Foam::meshToMesh::mapTgtToSrc"
"("
"const UList<Type>&, "
"const UList<typename outerProduct<vector, Type>::type>&, "
"const CombineOp&, "
"List<Type>&"
") const"
) << "Supplied field size is not equal to source mesh size" << nl
FatalErrorInFunction
<< "Supplied field size is not equal to source mesh size" << nl
<< " source mesh = " << srcToTgtCellAddr_.size() << nl
<< " target mesh = " << tgtToSrcCellAddr_.size() << nl
<< " supplied field = " << result.size()

View File

@ -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.
@ -275,7 +275,7 @@ void Foam::probes::readDict(const dictionary& dict)
{
if (!fixedLocations_ && interpolationScheme_ != "cell")
{
WarningIn("void Foam::probes::read(const dictionary&)")
WarningInFunction
<< "Only cell interpolation can be applied when "
<< "not using fixedLocations. InterpolationScheme "
<< "entry will be ignored";

View File

@ -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.
@ -1279,7 +1279,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI)
|| (f[2] < 0) || (f[2] >= surf.points().size())
)
{
WarningIn("validTri(const triSurface&, const label)")
WarningInFunction
<< "triangle " << faceI << " vertices " << f
<< " uses point indices outside point range 0.."
<< surf.points().size()-1 << endl;
@ -1289,7 +1289,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI)
if ((f[0] == f[1]) || (f[0] == f[2]) || (f[1] == f[2]))
{
WarningIn("validTri(const triSurface&, const label)")
WarningInFunction
<< "triangle " << faceI
<< " uses non-unique vertices " << f
<< endl;
@ -1321,7 +1321,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI)
&& ((f[2] == nbrF[0]) || (f[2] == nbrF[1]) || (f[2] == nbrF[2]))
)
{
WarningIn("validTri(const triSurface&, const label)")
WarningInFunction
<< "triangle " << faceI << " vertices " << f
<< " fc:" << f.centre(surf.points())
<< " has the same vertices as triangle " << nbrFaceI

View File

@ -243,17 +243,8 @@ humidityTemperatureCoupledMixedFvPatchScalarField
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
FatalIOErrorIn
(
"humidityTemperatureCoupledMixedFvPatchScalarField::"
"humidityTemperatureCoupledMixedFvPatchScalarField\n"
"(\n"
" const fvPatch&,\n"
" const DimensionedField<scalar, volMesh>&,\n"
" const dictionary&\n"
")\n",
dict
) << "\n patch type '" << p.type()
FatalIOErrorInFunction(dict)
<< "\n patch type '" << p.type()
<< "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << dimensionedInternalField().name()
@ -312,17 +303,7 @@ humidityTemperatureCoupledMixedFvPatchScalarField
}
default:
{
FatalIOErrorIn
(
"humidityTemperatureCoupledMixedFvPatchScalarField::"
"humidityTemperatureCoupledMixedFvPatchScalarField\n"
"(\n"
" const fvPatch&,\n"
" const DimensionedField<scalar, volMesh>&,\n"
" const dictionary& \n"
")\n",
dict
)
FatalIOErrorInFunction(dict)
<< "Did not find mode " << mode_
<< " on patch " << patch().name()
<< nl