From 04c9364f9a90862d5399e378c7e9834284c802aa Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 22 Jan 2010 11:21:42 +0000 Subject: [PATCH] Corrected usage for FatalErrorIn(...) - multiple C files --- .../interactionLists/interactionLists.C | 13 ++++++- .../referredCellList/referredCellList.C | 26 ++++++++----- .../molecule/moleculeCloud/moleculeCloud.C | 2 +- .../pairPotential/basic/pairPotential.C | 4 +- .../potential/potential/potential.C | 38 +++++++++++-------- 5 files changed, 53 insertions(+), 30 deletions(-) diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C index 1a587f3022..51b0104226 100644 --- a/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C +++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C @@ -450,8 +450,17 @@ bool Foam::interactionLists::testPointFaceDistance // if the algorithm hasn't returned anything by now then something has // gone wrong. - FatalErrorIn("interactionLists.C") << nl - << "point " << p << " to face " << faceToTest + FatalErrorIn + ( + "interactionLists::testPointFaceDistance" + "(" + "const vector&, " + "const labelList&, " + "const vectorList&, " + "const vector&, " + "const vector&" + ") const" + ) << "point " << p << " to face " << faceToTest << " comparison did not find a nearest point" << " to be inside or outside face." << abort(FatalError); diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.C index 583f7382be..b5e2e3ac9a 100644 --- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.C +++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.C @@ -121,8 +121,10 @@ void Foam::referredCellList::buildReferredCellList } else { - FatalErrorIn ("referredCellList.C") - << nl << "unable to read undecomposed boundary file from " + FatalErrorIn + ( + "referredCellList::buildReferredCellList(bool)" + ) << "unable to read undecomposed boundary file from " << "constant/polyMesh" << nl << abort(FatalError); } @@ -333,9 +335,10 @@ void Foam::referredCellList::buildReferredCellList > interactionLists::transTol ) { - FatalErrorIn ("referredCellList.C") - << nl << "Face pairs on patch " - << patch.name() + FatalErrorIn + ( + "referredCellList::buildReferredCellList(bool)" + ) << "Face pairs on patch " << patch.name() << ", segment " << patchNames[nUP] << " do not give the same referring " << " transformations to within tolerance of " @@ -423,9 +426,10 @@ void Foam::referredCellList::buildReferredCellList > interactionLists::transTol ) { - FatalErrorIn ("referredCellList.C") - << nl << "Face pairs on patch " - << patch.name() + FatalErrorIn + ( + "referredCellList::buildReferredCellList(bool)" + ) << "Face pairs on patch " << patch.name() << " do not give the same referring " << " transformations to within tolerance of " << interactionLists::transTol << nl @@ -1022,8 +1026,10 @@ void Foam::referredCellList::buildReferredCellList { if (faceT == -1) { - FatalErrorIn ("referredCellList.C") - << nl << "faceT == -1 encountered but " + FatalErrorIn + ( + "referredCellList::buildReferredCellList(bool)" + ) << "faceT == -1 encountered but " << meshFacesOnThisSegment.size() << " faces found on patch segment." << abort(FatalError); diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index a50159ee93..9ebad1fbaf 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -81,7 +81,7 @@ void Foam::moleculeCloud::buildConstProps() if (siteIds[sI] == -1) { - FatalErrorIn("moleculeCloud.C") << nl + FatalErrorIn("moleculeCloud::buildConstProps()") << siteId << " site not found." << nl << abort(FatalError); } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C index b3e609f4e7..968b242a71 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C @@ -101,7 +101,7 @@ Foam::scalar Foam::pairPotential::force(const scalar r) const if (k < 0) { - FatalErrorIn("pairPotential.C") << nl + FatalErrorIn("pairPotential::force(const scalar) const") << "r less than rMin in pair potential " << name_ << nl << abort(FatalError); } @@ -138,7 +138,7 @@ Foam::scalar Foam::pairPotential::energy(const scalar r) const if (k < 0) { - FatalErrorIn("pairPotential.C") << nl + FatalErrorIn("pairPotential::energy(const scalar) const") << "r less than rMin in pair potential " << name_ << nl << abort(FatalError); } diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.C b/src/lagrangian/molecularDynamics/potential/potential/potential.C index 2fc95108dd..cadb13e4f4 100644 --- a/src/lagrangian/molecularDynamics/potential/potential/potential.C +++ b/src/lagrangian/molecularDynamics/potential/potential/potential.C @@ -40,7 +40,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict) if (!moleculePropertiesDict.found(id)) { - FatalErrorIn("potential.C") << nl + FatalErrorIn("potential::setSiteIdList(const IOdictionary&)") << id << " molecule subDict not found" << nl << abort(FatalError); } @@ -67,7 +67,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict) if (findIndex(siteIdNames, siteId) == -1) { - FatalErrorIn("potential.C") << nl + FatalErrorIn("potential::setSiteIdList(const IOdictionary&)") << siteId << " in pairPotentialSiteIds is not in siteIds: " << siteIdNames << nl << abort(FatalError); } @@ -174,7 +174,7 @@ void Foam::potential::potential::readPotentialDict() if (removalOrder_[rO] == -1) { - FatalErrorIn("potentials.C") << nl + FatalErrorIn("potential::readPotentialDict()") << "removalOrder entry: " << remOrd[rO] << " not found in idList." << nl << abort(FatalError); @@ -187,7 +187,7 @@ void Foam::potential::potential::readPotentialDict() if (!potentialDict.found("pair")) { - FatalErrorIn("potentials.C") << nl + FatalErrorIn("potential::readPotentialDict()") << "pair potential specification subDict not found" << abort(FatalError); } @@ -208,7 +208,7 @@ void Foam::potential::potential::readPotentialDict() { if (!potentialDict.found("tether")) { - FatalErrorIn("potential.C") << nl + FatalErrorIn("potential::readPotentialDict()") << "tether potential specification subDict not found" << abort(FatalError); } @@ -289,11 +289,15 @@ void Foam::potential::potential::readMdInitialiseDict if (!moleculePropertiesDict.found(id)) { - FatalErrorIn("potential.C") << nl - << "Molecule type " - << id - << " not found in moleculeProperties dictionary." - << nl + FatalErrorIn + ( + "potential::readMdInitialiseDict" + "(" + "const IOdictionary&, " + "IOdictionary&" + ")" + ) << "Molecule type " << id + << " not found in moleculeProperties dictionary." << nl << abort(FatalError); } @@ -340,11 +344,15 @@ void Foam::potential::potential::readMdInitialiseDict } else { - FatalErrorIn("potential.C") << nl - << "Tether id " - << tetherSiteId - << " not found as a site of any molecule in zone." - << nl + FatalErrorIn + ( + "potential::readMdInitialiseDict" + "(" + "const IOdictionary&, " + "IOdictionary&" + ")" + ) << "Tether id " << tetherSiteId + << " not found as a site of any molecule in zone." << nl << abort(FatalError); } }