From eafd5a385072d8d7ad6229efca4bbc68049da4d6 Mon Sep 17 00:00:00 2001 From: Andrew Heather <a.heather@opencfd.co.uk> Date: Tue, 8 Dec 2015 11:15:39 +0000 Subject: [PATCH] ENH: Updated Info, Warning and Error messages --- .../magneticFoam/createFields.H | 2 +- .../conversion/tetgenToFoam/tetgenToFoam.C | 8 +- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 16 +-- .../mesh/manipulation/checkMesh/checkTools.C | 4 +- .../redistributePar/redistributePar.C | 32 ++--- .../createZeroDirectory/boundaryTemplates.C | 125 ++---------------- .../createZeroDirectory/caseInfo.C | 41 ++---- .../createZeroDirectory/createZeroDirectory.C | 4 +- .../createZeroDirectory/solverTemplate.C | 36 +---- .../preProcessing/mapFieldsPar/mapFieldsPar.C | 2 +- .../surfaceBooleanFeatures.C | 18 +-- .../surface/surfaceCheck/surfaceCheck.C | 2 +- .../surfaceFeatureExtract.C | 10 +- .../surface/surfaceInflate/surfaceInflate.C | 7 +- .../searchableSurfaceModifier/cut.C | 10 +- .../searchableSurfaceModifier.C | 7 +- .../IOobjects/CompactIOList/CompactIOList.C | 22 +-- src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C | 2 +- .../functionObjectStateTemplates.C | 6 +- .../fields/Fields/Field/FieldMapper.H | 2 +- src/OpenFOAM/global/argList/argList.C | 2 +- .../mapDistribute/mapDistributeBase.C | 30 +---- .../mapDistributeBaseTemplates.C | 19 +-- .../mapDistribute/mapDistributePolyMesh.C | 2 +- ...allHeatFluxTemperatureFvPatchScalarField.C | 15 +-- .../schemes/DEShybrid/DEShybrid.H | 18 +-- .../DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C | 7 +- .../fvMeshAdder/fvMeshAdderTemplates.C | 2 +- .../IOmapDistributePolyMesh.C | 12 +- .../fvMeshDistribute/fvMeshDistribute.C | 28 ++-- .../fvMeshDistributeTemplates.C | 3 +- .../displacement/displacementMotionSolver.C | 26 +--- .../polyTopoChange/addPatchCellLayer.C | 2 +- .../hexRef8/refinementHistory.C | 14 +- .../extendedEdgeMesh/extendedEdgeMesh.C | 9 +- ...IDControlInletVelocityFvPatchVectorField.C | 15 +-- .../displacementInterpolationMotionSolver.C | 2 +- .../motionInterpolation/motionInterpolation.C | 6 +- .../patchCorrectedInterpolation.C | 7 +- .../patchTransformedInterpolation.C | 7 +- ...irectionalPressureGradientExplicitSource.C | 48 +------ .../tabulatedNTUHeatTransfer.C | 36 +---- .../autoHexMeshDriver/autoLayerDriver.C | 4 +- .../autoHexMeshDriver/autoSnapDriver.C | 2 +- .../meshRefinement/meshRefinement.C | 34 ++--- .../meshRefinement/meshRefinementBaffles.C | 28 ++-- .../meshRefinement/meshRefinementGapRefine.C | 2 +- .../refinementSurfaces/refinementSurfaces.C | 29 ++-- .../autoHexMesh/shellSurfaces/shellSurfaces.C | 7 +- .../offsetSurface/offsetSurface.C | 4 +- .../cyclicPeriodicAMIPolyPatch.C | 36 ++--- .../algorithms/MeshWave/FaceCellWave.C | 18 +-- src/meshTools/regionSplit/regionSplit.C | 4 +- .../searchableSurface/subTriSurfaceMesh.C | 11 +- .../decompositionConstraint.C | 11 +- .../preserveBafflesConstraint.C | 7 +- .../field/fieldMinMax/fieldMinMax.C | 2 +- .../fieldValueDelta/fieldValueDelta.C | 7 +- .../nearWallFields/nearWallFieldsTemplates.C | 8 +- .../field/streamLine/streamLineBase.C | 10 +- .../field/valueAverage/valueAverage.C | 2 +- .../functionObjects/forces/forces/forces.C | 6 +- .../fieldVisualisationBase.C | 16 +-- .../functionObjectCloud.C | 11 +- .../functionObjectLine.C | 11 +- .../functionObjectSurface.C | 11 +- .../runTimePostProcessing/geometrySurface.C | 12 +- .../graphics/runTimePostProcessing/pathline.C | 14 +- .../runTimePostProcessing/pointData.C | 14 +- .../runTimePostProcessing.C | 8 +- .../runTimePostProcessingTemplates.C | 12 +- .../graphics/runTimePostProcessing/scene.C | 25 ++-- .../graphics/runTimePostProcessing/surface.C | 14 +- .../externalCoupledFunctionObject.C | 57 ++------ .../externalCoupledFunctionObjectTemplates.C | 34 +---- .../averageCondition/averageCondition.C | 2 +- .../equationInitialResidualCondition.C | 21 +-- .../equationMaxIterCondition.C | 16 +-- .../minMaxCondition/minMaxCondition.C | 2 +- .../runTimeCondition/runTimeConditionNew.C | 14 +- .../runTimeControl/runTimeControl.C | 4 +- .../DESModelRegions/DESModelRegions.C | 12 +- .../utilities/blendingFactor/blendingFactor.C | 2 +- .../utilities/fluxSummary/fluxSummary.C | 75 ++--------- .../utilities/pressureTools/pressureTools.C | 8 +- .../functionObjects/utilities/yPlus/yPlus.C | 6 +- .../utilities/yPlus/yPlusTemplates.C | 1 - .../cellVolumeWeight/cellVolumeWeightMethod.C | 4 +- .../correctedCellVolumeWeightMethod.C | 12 +- .../distributedWeightedFvPatchFieldMapper.H | 14 +- src/sampling/meshToMesh/meshToMeshTemplates.C | 24 +--- src/sampling/probes/probes.C | 4 +- .../sampledSurface/isoSurface/isoSurface.C | 8 +- ...emperatureCoupledMixedFvPatchScalarField.C | 25 +--- 94 files changed, 351 insertions(+), 1040 deletions(-) diff --git a/applications/solvers/electromagnetics/magneticFoam/createFields.H b/applications/solvers/electromagnetics/magneticFoam/createFields.H index 22d40089213..189ef5d1058 100644 --- a/applications/solvers/electromagnetics/magneticFoam/createFields.H +++ b/applications/solvers/electromagnetics/magneticFoam/createFields.H @@ -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); } diff --git a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C index 2a4de9c57b0..c3baad34584 100644 --- a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C +++ b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C @@ -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:" diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index ff0837e690c..1174444fe0e 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -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." diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C index 49ef7325255..249fe6b90d2 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C @@ -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; diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 7bc942bacd2..c2667c60d7b 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -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); } diff --git a/applications/utilities/preProcessing/createZeroDirectory/boundaryTemplates.C b/applications/utilities/preProcessing/createZeroDirectory/boundaryTemplates.C index 6e831745d80..193334e37de 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/boundaryTemplates.C +++ b/applications/utilities/preProcessing/createZeroDirectory/boundaryTemplates.C @@ -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); diff --git a/applications/utilities/preProcessing/createZeroDirectory/caseInfo.C b/applications/utilities/preProcessing/createZeroDirectory/caseInfo.C index 0548ba35393..d48b7c2da58 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/caseInfo.C +++ b/applications/utilities/preProcessing/createZeroDirectory/caseInfo.C @@ -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 diff --git a/applications/utilities/preProcessing/createZeroDirectory/createZeroDirectory.C b/applications/utilities/preProcessing/createZeroDirectory/createZeroDirectory.C index 2d23c9d8362..e7da8405472 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/createZeroDirectory.C +++ b/applications/utilities/preProcessing/createZeroDirectory/createZeroDirectory.C @@ -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); diff --git a/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.C b/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.C index 19018d1b3a4..becbc614ad2 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.C +++ b/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.C @@ -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); } diff --git a/applications/utilities/preProcessing/mapFieldsPar/mapFieldsPar.C b/applications/utilities/preProcessing/mapFieldsPar/mapFieldsPar.C index 9f16746adbb..515dc664592 100644 --- a/applications/utilities/preProcessing/mapFieldsPar/mapFieldsPar.C +++ b/applications/utilities/preProcessing/mapFieldsPar/mapFieldsPar.C @@ -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); diff --git a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C index 14bb961731f..7c3fa7eeb12 100644 --- a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C +++ b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C @@ -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); } diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index c4783d19fe7..4a2a4a372d4 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -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; } diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index a763c90c29d..0ee2abbfbd4 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -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); } diff --git a/applications/utilities/surface/surfaceInflate/surfaceInflate.C b/applications/utilities/surface/surfaceInflate/surfaceInflate.C index dfc41543217..008e6789a23 100644 --- a/applications/utilities/surface/surfaceInflate/surfaceInflate.C +++ b/applications/utilities/surface/surfaceInflate/surfaceInflate.C @@ -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); diff --git a/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/cut.C b/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/cut.C index c04c47da0b5..944c2465557 100644 --- a/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/cut.C +++ b/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/cut.C @@ -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); diff --git a/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/searchableSurfaceModifier.C b/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/searchableSurfaceModifier.C index e28036012c2..dab502db72d 100644 --- a/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/searchableSurfaceModifier.C +++ b/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/searchableSurfaceModifier.C @@ -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() diff --git a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C index 441b0730aca..6feb58cbc56 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C +++ b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C @@ -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" diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C index 8dfc4cb025c..87b21b43b3e 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C @@ -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); diff --git a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C b/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C index fb27b2668c0..5b48e6c48fe 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C @@ -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; diff --git a/src/OpenFOAM/fields/Fields/Field/FieldMapper.H b/src/OpenFOAM/fields/Fields/Field/FieldMapper.H index 13cc98e11ec..32f446cbae0 100644 --- a/src/OpenFOAM/fields/Fields/Field/FieldMapper.H +++ b/src/OpenFOAM/fields/Fields/Field/FieldMapper.H @@ -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); diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index e40181e5d3d..45adb22276f 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -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 diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C index 6ac881c880c..2cdf3d0af21 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C @@ -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_; diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C index f205072d0ac..111424e5893 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C @@ -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); diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C index 422e0b0ba0c..48f2830b656 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C @@ -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); } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C index 41273c43045..fff73ccb418 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C @@ -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() diff --git a/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H b/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H index e7607005ea4..df2642e27ea 100644 --- a/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H +++ b/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H @@ -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); diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C index 9b12fb86a16..797f42407bf 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C @@ -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); } diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C index 0818bb12935..ca4f59cdbd7 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C @@ -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; diff --git a/src/dynamicMesh/fvMeshDistribute/IOmapDistributePolyMesh.C b/src/dynamicMesh/fvMeshDistribute/IOmapDistributePolyMesh.C index c476a1ed2cb..bf0dcd03fc9 100644 --- a/src/dynamicMesh/fvMeshDistribute/IOmapDistributePolyMesh.C +++ b/src/dynamicMesh/fvMeshDistribute/IOmapDistributePolyMesh.C @@ -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; } diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index e23ffac020f..902e4d85bf4 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -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] diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C index a6d6f8dc7b0..6d4f6d64f19 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C @@ -191,7 +191,8 @@ void Foam::fvMeshDistribute::mapExposedFaces if (flds.size() != oldFlds.size()) { - FatalErrorIn("fvMeshDistribute::mapExposedFaces(..)") << "problem" + FatalErrorInFunction + << "problem" << abort(FatalError); } diff --git a/src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.C b/src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.C index bb3acd5ec04..71e9538f77b 100644 --- a/src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.C +++ b/src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.C @@ -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() diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C index 762ef4cc732..93489a1644d 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C @@ -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()) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C index 704a9e72424..bdf93b42ea5 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C @@ -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; diff --git a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C index f2e379b4937..8ce9f94ee0d 100644 --- a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C +++ b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C @@ -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; } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C index f4098267d84..9eac00835fd 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C @@ -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 " diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C index ed9f08ddc8f..156815f45ec 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C @@ -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); } diff --git a/src/fvMotionSolver/motionInterpolation/motionInterpolation/motionInterpolation.C b/src/fvMotionSolver/motionInterpolation/motionInterpolation/motionInterpolation.C index b293e5f491b..4e73a2cd4b9 100644 --- a/src/fvMotionSolver/motionInterpolation/motionInterpolation/motionInterpolation.C +++ b/src/fvMotionSolver/motionInterpolation/motionInterpolation/motionInterpolation.C @@ -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() diff --git a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolation.C b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolation.C index 8d0c6b74fa8..a389e7e08c4 100644 --- a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolation.C +++ b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolation.C @@ -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); } } diff --git a/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C b/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C index f99e668cc03..60aae0ec6dc 100644 --- a/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C +++ b/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C @@ -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); } } diff --git a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C index a63a606b2c4..23160e83800 100644 --- a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C +++ b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C @@ -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); } diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C index 08d3ccdbc9c..12b3f3714f8 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C @@ -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); } diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index 23f8a5d6d5c..bd0d7d696dc 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -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 diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C index 8d5d942438e..a88fc283e43 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C @@ -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 diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index 8eb362c03b8..f71860f4ddb 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -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); diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C index 5c806d9ce0b..6fe484ac27c 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C @@ -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); diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C index d73ea12a0ba..fbfcef9273c 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C @@ -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); diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C index 2fa3704d284..60975cf1775 100644 --- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C @@ -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] diff --git a/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C b/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C index dea3a16498f..05ca28a1bf2 100644 --- a/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C +++ b/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C @@ -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); diff --git a/src/mesh/extrudeModel/offsetSurface/offsetSurface.C b/src/mesh/extrudeModel/offsetSurface/offsetSurface.C index 1b2872279f0..987f376bfa4 100644 --- a/src/mesh/extrudeModel/offsetSurface/offsetSurface.C +++ b/src/mesh/extrudeModel/offsetSurface/offsetSurface.C @@ -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); diff --git a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C index dd9b431c43f..8e683b11692 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C @@ -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() @@ -362,7 +354,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI scalar srcSum(gAverage(AMIPtr_->srcWeightsSum())); scalar tgtSum(gAverage(AMIPtr_->tgtWeightsSum())); - // Direction (or rather side of AMI : this or nbr patch) of + // Direction (or rather side of AMI : this or nbr patch) of // geometry replication bool direction = nTransforms_ >= 0; @@ -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() diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.C b/src/meshTools/algorithms/MeshWave/FaceCellWave.C index e0f65840375..f51b33af809 100644 --- a/src/meshTools/algorithms/MeshWave/FaceCellWave.C +++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.C @@ -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 diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index 1a8de0fa152..ea4a86551a8 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -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 diff --git a/src/meshTools/searchableSurface/subTriSurfaceMesh.C b/src/meshTools/searchableSurface/subTriSurfaceMesh.C index dfffbd793e2..2f5c142bfd7 100644 --- a/src/meshTools/searchableSurface/subTriSurfaceMesh.C +++ b/src/meshTools/searchableSurface/subTriSurfaceMesh.C @@ -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); } diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/decompositionConstraint/decompositionConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/decompositionConstraint/decompositionConstraint.C index 397433ff68d..8faed6fd9ee 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/decompositionConstraint/decompositionConstraint.C +++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/decompositionConstraint/decompositionConstraint.C @@ -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() diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/preserveBaffles/preserveBafflesConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/preserveBaffles/preserveBafflesConstraint.C index a22f683c04a..0601af2299d 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/preserveBaffles/preserveBafflesConstraint.C +++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/preserveBaffles/preserveBafflesConstraint.C @@ -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]] diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index 2d46430e5cb..eacb6220395 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -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; diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index 1e6ff10e9f9..52a32dd5dbb 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -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 diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C index ab7fe887872..275d98a0936 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C @@ -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; diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineBase.C b/src/postProcessing/functionObjects/field/streamLine/streamLineBase.C index e319081bf9a..c7e421a5040 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineBase.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineBase.C @@ -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); } diff --git a/src/postProcessing/functionObjects/field/valueAverage/valueAverage.C b/src/postProcessing/functionObjects/field/valueAverage/valueAverage.C index a8e0a8d51e5..d7c95a18e1c 100644 --- a/src/postProcessing/functionObjects/field/valueAverage/valueAverage.C +++ b/src/postProcessing/functionObjects/field/valueAverage/valueAverage.C @@ -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; diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index 83cd89c66e0..6fbe8255820 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -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) diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C index e7de2eb2d9a..ed48eb60c01 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C @@ -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 diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C index fe863c2cf2e..8c1f4e8535d 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C @@ -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" diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C index 0298da6fdca..d9509975986 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C @@ -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" diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C index 9139dcf9056..e7c6c691760 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C @@ -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" diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.C index 49a3964c68c..535cdddc99c 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.C @@ -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); } diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.C index 925baae2cdd..744c092cf8f 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.C @@ -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() diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.C index f85686325c0..cae1853e657 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.C @@ -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() diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.C index 78ab1c37351..88857bf9248 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.C @@ -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); } diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingTemplates.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingTemplates.C index 713506e488d..47540015eb4 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingTemplates.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingTemplates.C @@ -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); diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C index 9a1d8da5932..3ceace96954 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C @@ -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); } diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.C index cd9b241c96d..1cb877d9cb7 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.C @@ -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() diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.C b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.C index ca9905c0371..46d44f65a31 100644 --- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.C +++ b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.C @@ -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); } diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C index f483ecb71e1..7cb6ef9b175 100644 --- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C +++ b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C @@ -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); } diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.C b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.C index 1c47a2ea1f6..486a70c7972 100644 --- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.C +++ b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.C @@ -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; diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C index 73de3e3f3d4..9db4093b8b8 100644 --- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C +++ b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C @@ -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; diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C index ebad50629d8..0788cf81bf0 100644 --- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C +++ b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C @@ -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; diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C index ba86537e091..26418217b69 100644 --- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C +++ b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C @@ -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." diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C index 72c5d99ca6c..000dbe1142f 100644 --- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C +++ b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C @@ -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() diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.C b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.C index 27e1c4e1802..ccabf77d126 100644 --- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.C +++ b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.C @@ -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); } diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C index 53e961de554..befe184985d 100644 --- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C +++ b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C @@ -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; } diff --git a/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactor.C b/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactor.C index 73277fc27fb..16b4c78b0c5 100644 --- a/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactor.C +++ b/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactor.C @@ -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); } diff --git a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C b/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C index e1b078a4170..5469c232a53 100644 --- a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C +++ b/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C @@ -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); diff --git a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C index ec2e73c88e0..7691cd4939e 100644 --- a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C +++ b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C @@ -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 " diff --git a/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C b/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C index 0be0fc4430b..a649b1239d3 100644 --- a/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C +++ b/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C @@ -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 " diff --git a/src/postProcessing/functionObjects/utilities/yPlus/yPlusTemplates.C b/src/postProcessing/functionObjects/utilities/yPlus/yPlusTemplates.C index 7af26d2e0ac..7173a932823 100644 --- a/src/postProcessing/functionObjects/utilities/yPlus/yPlusTemplates.C +++ b/src/postProcessing/functionObjects/utilities/yPlus/yPlusTemplates.C @@ -80,7 +80,6 @@ void Foam::yPlus::calcYPlus << token::TAB << maxYplus << token::TAB << avgYplus << endl; - } } else if (isA<wallFvPatch>(patch)) { diff --git a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C index 722521a71ef..ba2f2b39221 100644 --- a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C +++ b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C @@ -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 diff --git a/src/sampling/meshToMesh/calcMethod/correctedCellVolumeWeight/correctedCellVolumeWeightMethod.C b/src/sampling/meshToMesh/calcMethod/correctedCellVolumeWeight/correctedCellVolumeWeightMethod.C index 2acc2b72c1d..db7d034b25d 100644 --- a/src/sampling/meshToMesh/calcMethod/correctedCellVolumeWeight/correctedCellVolumeWeightMethod.C +++ b/src/sampling/meshToMesh/calcMethod/correctedCellVolumeWeight/correctedCellVolumeWeightMethod.C @@ -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 diff --git a/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H b/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H index 930c502ca1d..adaaa5fb1af 100644 --- a/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H +++ b/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H @@ -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_; diff --git a/src/sampling/meshToMesh/meshToMeshTemplates.C b/src/sampling/meshToMesh/meshToMeshTemplates.C index 723f5c6196a..3e5c097b35a 100644 --- a/src/sampling/meshToMesh/meshToMeshTemplates.C +++ b/src/sampling/meshToMesh/meshToMeshTemplates.C @@ -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() diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 0a3677f066a..862d4870630 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -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"; diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C index c9c6347f9b5..f14b84e4195 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C @@ -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 diff --git a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C index 1bc31648218..42c2133c1f6 100644 --- a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C @@ -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 -- GitLab