Completed update ...ErrorIn -> ...ErrorInFunction

Avoids the clutter and maintenance effort associated with providing the
function signature string.
This commit is contained in:
Henry Weller
2015-11-11 09:03:39 +00:00
parent dc43311e62
commit c4d5f65a10
678 changed files with 3357 additions and 8219 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -203,7 +203,7 @@ bool Foam::cuttingPlane::walkCell
if (nextEdgeI == -1)
{
// Did not find another cut edge on faceI. Do what?
WarningIn("Foam::cuttingPlane::walkCell")
WarningInFunction
<< "Did not find closed walk along surface of cell " << cellI
<< " starting from edge " << startEdgeI
<< " in " << nIter << " iterations." << nl
@ -219,7 +219,7 @@ bool Foam::cuttingPlane::walkCell
if (nIter > 1000)
{
WarningIn("Foam::cuttingPlane::walkCell")
WarningInFunction
<< "Did not find closed walk along surface of cell " << cellI
<< " starting from edge " << startEdgeI
<< " in " << nIter << " iterations." << nl
@ -237,7 +237,7 @@ bool Foam::cuttingPlane::walkCell
}
else
{
WarningIn("Foam::cuttingPlane::walkCell")
WarningInFunction
<< "Did not find closed walk along surface of cell " << cellI
<< " starting from edge " << startEdgeI << nl
<< "Collected cutPoints so far:" << faceVerts
@ -287,7 +287,7 @@ void Foam::cuttingPlane::walkCellCuts
// Check for the unexpected ...
if (startEdgeI == -1)
{
FatalErrorIn("Foam::cuttingPlane::walkCellCuts(..)")
FatalErrorInFunction
<< "Cannot find cut edge for cut cell " << cellI
<< abort(FatalError);
}
@ -413,7 +413,7 @@ void Foam::cuttingPlane::operator=(const cuttingPlane& rhs)
// Check for assignment to self
if (this == &rhs)
{
FatalErrorIn ("Foam::cuttingPlane::operator=(const cuttingPlane&)")
FatalErrorInFunction
<< "Attempted assignment to self"
<< abort(FatalError);
}

View File

@ -69,17 +69,7 @@ bool Foam::mapNearestMethod::findInitialSeeds
}
else
{
FatalErrorIn
(
"bool Foam::mapNearestMethod::findInitialSeeds"
"("
"const labelList&, "
"const boolList&, "
"const label, "
"label&, "
"label&"
") const"
)
FatalErrorInFunction
<< "Unable to find nearest target cell"
<< " for source cell " << srcI
<< " with centre " << srcCc

View File

@ -44,15 +44,8 @@ Foam::autoPtr<Foam::meshToMeshMethod> Foam::meshToMeshMethod::New
if (cstrIter == componentsConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::meshToMeshMethod> Foam::meshToMeshMethod::New"
"("
"const word&, "
"const polyMesh&, "
"const polyMesh&"
")"
) << "Unknown meshToMesh type "
FatalErrorInFunction
<< "Unknown meshToMesh type "
<< methodName << nl << nl
<< "Valid meshToMesh types are:" << nl
<< componentsConstructorTablePtr_->sortedToc() << exit(FatalError);

View File

@ -364,14 +364,7 @@ Foam::meshToMesh::interpolationMethodAMI(const interpolationMethod method)
}
default:
{
FatalErrorIn
(
"Foam::AMIPatchToPatchInterpolation::interpolationMethod"
"Foam::meshToMesh::interpolationMethodAMI"
"("
"const interpolationMethod method"
") const"
)
FatalErrorInFunction
<< "Unhandled enumeration " << method
<< abort(FatalError);
}
@ -385,7 +378,7 @@ void Foam::meshToMesh::calculatePatchAMIs(const word& AMIMethodName)
{
if (!patchAMIs_.empty())
{
FatalErrorIn("meshToMesh::calculatePatchAMIs()")
FatalErrorInFunction
<< "patch AMI already calculated"
<< exit(FatalError);
}
@ -456,16 +449,8 @@ void Foam::meshToMesh::constructNoCuttingPatches
}
else
{
FatalErrorIn
(
"Foam::meshToMesh::meshToMesh"
"("
"const polyMesh&, "
"const polyMesh&, "
"const interpolationMethod&, "
"bool"
")"
) << "Source patch " << pp.name()
FatalErrorInFunction
<< "Source patch " << pp.name()
<< " not found in target mesh. "
<< "Available target patches are " << tgtBM.names()
<< exit(FatalError);

View File

@ -789,21 +789,7 @@ void Foam::meshToMesh::distributeAndMergeCells
if (tgtFaceI == -1)
{
FatalErrorIn
(
"void Foam::meshToMesh::"
"distributeAndMergeCells"
"("
"const mapDistribute&, "
"const polyMesh&, "
"const globalIndex&, "
"pointField&, "
"faceList&, "
"labelList&, "
"labelList&, "
"labelList&"
") const"
)
FatalErrorInFunction
<< "Unvisited " << key
<< abort(FatalError);
}

View File

@ -87,15 +87,8 @@ void Foam::meshToMesh::mapSrcToTgt
{
if (result.size() != tgtToSrcCellAddr_.size())
{
FatalErrorIn
(
"void Foam::meshToMesh::mapSrcToTgt"
"("
"const UList<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()
@ -215,15 +208,8 @@ void Foam::meshToMesh::mapTgtToSrc
{
if (result.size() != srcToTgtCellAddr_.size())
{
FatalErrorIn
(
"void Foam::meshToMesh::mapTgtToSrc"
"("
"const UList<Type>&, "
"const CombineOp&, "
"List<Type>&"
") const"
) << "Supplied field size is not equal to source mesh size" << nl
FatalErrorInFunction
<< "Supplied field size is not equal to source mesh size" << nl
<< " source mesh = " << srcToTgtCellAddr_.size() << nl
<< " target mesh = " << tgtToSrcCellAddr_.size() << nl
<< " supplied field = " << result.size()

View File

@ -153,7 +153,7 @@ void Foam::meshToMesh0::calcAddressing()
if (fromPatch.empty())
{
WarningIn("meshToMesh0::calcAddressing()")
WarningInFunction
<< "Source patch " << fromPatch.name()
<< " has no faces. Not performing mapping for it."
<< endl;

View File

@ -38,7 +38,7 @@ void Foam::meshToMesh0::calculateInverseDistanceWeights() const
if (inverseDistanceWeightsPtr_)
{
FatalErrorIn("meshToMesh0::calculateInverseDistanceWeights()")
FatalErrorInFunction
<< "weighting factors already calculated"
<< exit(FatalError);
}
@ -140,7 +140,7 @@ void Foam::meshToMesh0::calculateInverseVolumeWeights() const
if (inverseVolumeWeightsPtr_)
{
FatalErrorIn("meshToMesh0::calculateInverseVolumeWeights()")
FatalErrorInFunction
<< "weighting factors already calculated"
<< exit(FatalError);
}
@ -203,7 +203,7 @@ void Foam::meshToMesh0::calculateCellToCellAddressing() const
if (cellToCellAddressingPtr_)
{
FatalErrorIn("meshToMesh0::calculateCellToCellAddressing()")
FatalErrorInFunction
<< "addressing already calculated"
<< exit(FatalError);
}

View File

@ -87,13 +87,8 @@ Foam::meshToMesh0::meshToMesh0
}
else
{
WarningIn
(
"meshToMesh0::meshToMesh0"
"(const fvMesh& meshFrom, const fvMesh& meshTo,"
"const HashTable<word>& patchMap,"
"const wordList& cuttingPatchNames)"
) << "Cannot find cutting-patch " << cuttingPatchNames[i]
WarningInFunction
<< "Cannot find cutting-patch " << cuttingPatchNames[i]
<< " in destination mesh" << endl;
}
}
@ -134,11 +129,8 @@ Foam::meshToMesh0::meshToMesh0
// of boundary patches
if (fromMesh_.boundary().size() != toMesh_.boundary().size())
{
FatalErrorIn
(
"meshToMesh0::meshToMesh0"
"(const fvMesh& meshFrom, const fvMesh& meshTo)"
) << "Incompatible meshes: different number of patches, "
FatalErrorInFunction
<< "Incompatible meshes: different number of patches, "
<< "fromMesh = " << fromMesh_.boundary().size()
<< ", toMesh = " << toMesh_.boundary().size()
<< exit(FatalError);
@ -152,11 +144,8 @@ Foam::meshToMesh0::meshToMesh0
!= toMesh_.boundaryMesh()[patchi].name()
)
{
FatalErrorIn
(
"meshToMesh0::meshToMesh0"
"(const fvMesh& meshFrom, const fvMesh& meshTo)"
) << "Incompatible meshes: different patch names for patch "
FatalErrorInFunction
<< "Incompatible meshes: different patch names for patch "
<< patchi
<< ", fromMesh = " << fromMesh_.boundary()[patchi].name()
<< ", toMesh = " << toMesh_.boundary()[patchi].name()
@ -169,11 +158,8 @@ Foam::meshToMesh0::meshToMesh0
!= toMesh_.boundaryMesh()[patchi].type()
)
{
FatalErrorIn
(
"meshToMesh0::meshToMesh0"
"(const fvMesh& meshFrom, const fvMesh& meshTo)"
) << "Incompatible meshes: different patch types for patch "
FatalErrorInFunction
<< "Incompatible meshes: different patch types for patch "
<< patchi
<< ", fromMesh = " << fromMesh_.boundary()[patchi].type()
<< ", toMesh = " << toMesh_.boundary()[patchi].type()

View File

@ -158,12 +158,8 @@ void Foam::meshToMesh0::interpolateInternalField
{
if (fromVf.mesh() != fromMesh_)
{
FatalErrorIn
(
"meshToMesh0::interpolateInternalField(Field<Type>&, "
"const GeometricField<Type, fvPatchField, volMesh>&, "
"meshToMesh0::order, const CombineOp&) const"
) << "the argument field does not correspond to the right mesh. "
FatalErrorInFunction
<< "the argument field does not correspond to the right mesh. "
<< "Field size: " << fromVf.size()
<< " mesh size: " << fromMesh_.nCells()
<< exit(FatalError);
@ -171,12 +167,8 @@ void Foam::meshToMesh0::interpolateInternalField
if (toF.size() != toMesh_.nCells())
{
FatalErrorIn
(
"meshToMesh0::interpolateInternalField(Field<Type>&, "
"const GeometricField<Type, fvPatchField, volMesh>&, "
"meshToMesh0::order, const CombineOp&) const"
) << "the argument field does not correspond to the right mesh. "
FatalErrorInFunction
<< "the argument field does not correspond to the right mesh. "
<< "Field size: " << toF.size()
<< " mesh size: " << toMesh_.nCells()
<< exit(FatalError);
@ -229,12 +221,8 @@ void Foam::meshToMesh0::interpolateInternalField
break;
}
default:
FatalErrorIn
(
"meshToMesh0::interpolateInternalField(Field<Type>&, "
"const GeometricField<Type, fvPatchField, volMesh>&, "
"meshToMesh0::order, const CombineOp&) const"
) << "unknown interpolation scheme " << ord
FatalErrorInFunction
<< "unknown interpolation scheme " << ord
<< exit(FatalError);
}
}
@ -317,13 +305,8 @@ void Foam::meshToMesh0::interpolate
}
default:
FatalErrorIn
(
"meshToMesh0::interpolate("
"GeometricField<Type, fvPatchField, volMesh>&, "
"const GeometricField<Type, fvPatchField, volMesh>&, "
"meshToMesh0::order, const CombineOp&) const"
) << "unknown interpolation scheme " << ord
FatalErrorInFunction
<< "unknown interpolation scheme " << ord
<< exit(FatalError);
}
@ -398,12 +381,8 @@ Foam::meshToMesh0::interpolate
// of boundary patches
if (fromMesh_.boundary().size() != toMesh_.boundary().size())
{
FatalErrorIn
(
"meshToMesh0::interpolate"
"(const GeometricField<Type, fvPatchField, volMesh>&,"
"meshToMesh0::order, const CombineOp&) const"
) << "Incompatible meshes: different number of boundaries, "
FatalErrorInFunction
<< "Incompatible meshes: different number of boundaries, "
"only internal field may be interpolated"
<< exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,8 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
if (patchI == -1)
{
FatalErrorIn
(
" Foam::patchProbes::findElements(const fvMesh&)"
) << " Unknown patch name "
FatalErrorInFunction
<< " Unknown patch name "
<< patchName_ << endl
<< exit(FatalError);
}
@ -119,10 +117,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
if (isA<emptyPolyPatch>(bm[patchi]))
{
WarningIn
(
" Foam::patchProbes::findElements(const fvMesh&)"
)
WarningInFunction
<< " The sample point: " << sample
<< " belongs to " << patchi
<< " which is an empty patch. This is not permitted. "

View File

@ -108,7 +108,7 @@ void Foam::probes::findElements(const fvMesh& mesh)
{
if (Pstream::master())
{
WarningIn("findElements::findElements(const fvMesh&)")
WarningInFunction
<< "Did not find location " << location
<< " in any cell. Skipping location." << endl;
}
@ -117,7 +117,7 @@ void Foam::probes::findElements(const fvMesh& mesh)
{
if (Pstream::master())
{
WarningIn("probes::findElements(const fvMesh&)")
WarningInFunction
<< "Did not find location " << location
<< " in any face. Skipping location." << endl;
}
@ -127,7 +127,7 @@ void Foam::probes::findElements(const fvMesh& mesh)
// Make sure location not on two domains.
if (elementList_[probeI] != -1 && elementList_[probeI] != cellI)
{
WarningIn("probes::findElements(const fvMesh&)")
WarningInFunction
<< "Location " << location
<< " seems to be on multiple domains:"
<< " cell " << elementList_[probeI]
@ -141,7 +141,7 @@ void Foam::probes::findElements(const fvMesh& mesh)
if (faceList_[probeI] != -1 && faceList_[probeI] != faceI)
{
WarningIn("probes::findElements(const fvMesh&)")
WarningInFunction
<< "Location " << location
<< " seems to be on multiple domains:"
<< " cell " << faceList_[probeI]
@ -342,7 +342,7 @@ void Foam::probes::read(const dictionary& dict)
{
if (!fixedLocations_ && interpolationScheme_ != "cell")
{
WarningIn("void Foam::probes::read(const dictionary&)")
WarningInFunction
<< "Only cell interpolation can be applied when "
<< "not using fixedLocations. InterpolationScheme "
<< "entry will be ignored";

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,7 +76,7 @@ void Foam::circleSet::calcSamples
}
else
{
WarningIn(funcName)
WarningInFunction
<< "Unable to find cell at point id " << 0
<< " at location " << startPoint_ << endl;
}
@ -92,7 +92,7 @@ void Foam::circleSet::calcSamples
if (mag(axis1 & circleAxis_) > SMALL)
{
WarningIn(funcName)
WarningInFunction
<< "Vector defined by (startPoint - origin) not orthogonal to "
<< "circleAxis:" << nl
<< " startPoint - origin = " << axis1 << nl
@ -124,7 +124,7 @@ void Foam::circleSet::calcSamples
}
else
{
WarningIn(funcName)
WarningInFunction
<< "Unable to find cell at point id " << nPoint
<< " at location " << pt << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -102,7 +102,7 @@ void Foam::faceOnlySet::calcSamples
// distance vector between sampling points
if (mag(end_ - start_) < SMALL)
{
FatalErrorIn("faceOnlySet::calcSamples()")
FatalErrorInFunction
<< "Incorrect sample specification :"
<< " start equals end point." << endl
<< " start:" << start_

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,8 +68,7 @@ void Foam::midPointSet::genSamples()
if (cell1 != cell2)
{
FatalErrorIn("midPointSet::genSamples()")
<< " sampleI:" << sampleI
FatalErrorInFunction
<< " midI:" << midI
<< " sampleI:" << sampleI
<< " pts[sampleI]:" << operator[](sampleI)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,8 +81,7 @@ void Foam::midPointAndFaceSet::genSamples()
if (cell1 != cell2)
{
FatalErrorIn("midPointAndFaceSet::genSamples()")
<< " sampleI:" << sampleI
FatalErrorInFunction
<< " newSampleI:" << newSampleI
<< " pts[sampleI]:" << operator[](sampleI)
<< " face[sampleI]:" << faces_[sampleI]

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -137,7 +137,7 @@ void Foam::polyLineSet::calcSamples
// Check sampling points
if (sampleCoords_.size() < 2)
{
FatalErrorIn("polyLineSet::calcSamples()")
FatalErrorInFunction
<< "Incorrect sample specification. Too few points:"
<< sampleCoords_ << exit(FatalError);
}
@ -146,7 +146,7 @@ void Foam::polyLineSet::calcSamples
{
if (mag(sampleCoords_[sampleI] - oldPoint) < SMALL)
{
FatalErrorIn("polyLineSet::calcSamples()")
FatalErrorInFunction
<< "Incorrect sample specification."
<< " Point " << sampleCoords_[sampleI-1]
<< " at position " << sampleI-1

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,10 +57,8 @@ Foam::label Foam::sampledSet::getCell
{
if (faceI == -1)
{
FatalErrorIn
(
"sampledSet::getCell(const label, const point&)"
) << "Illegal face label " << faceI
FatalErrorInFunction
<< "Illegal face label " << faceI
<< abort(FatalError);
}
@ -70,10 +68,8 @@ Foam::label Foam::sampledSet::getCell
if (!mesh().pointInCell(sample, cellI, searchEngine_.decompMode()))
{
FatalErrorIn
(
"sampledSet::getCell(const label, const point&)"
) << "Found cell " << cellI << " using face " << faceI
FatalErrorInFunction
<< "Found cell " << cellI << " using face " << faceI
<< ". But cell does not contain point " << sample
<< abort(FatalError);
}
@ -99,10 +95,8 @@ Foam::label Foam::sampledSet::getCell
}
else
{
FatalErrorIn
(
"sampledSet::getCell(const label, const point&)"
) << "None of the neighbours of face "
FatalErrorInFunction
<< "None of the neighbours of face "
<< faceI << " contains point " << sample
<< abort(FatalError);
@ -220,10 +214,8 @@ Foam::point Foam::sampledSet::pushIn
if (tetFaceI == -1)
{
FatalErrorIn
(
"sampledSet::pushIn(const point&, const label)"
) << "After pushing " << facePt << " to " << newPosition
FatalErrorInFunction
<< "After pushing " << facePt << " to " << newPosition
<< " it is still outside face " << faceI
<< " at " << mesh().faceCentres()[faceI]
<< " of cell " << cellI
@ -378,7 +370,7 @@ void Foam::sampledSet::setSamples
|| (curveDist_.size() != size())
)
{
FatalErrorIn("sampledSet::setSamples()")
FatalErrorInFunction
<< "sizes not equal : "
<< " points:" << size()
<< " cells:" << cells_.size()
@ -459,12 +451,8 @@ Foam::autoPtr<Foam::sampledSet> Foam::sampledSet::New
if (cstrIter == wordConstructorTablePtr_->end())
{
FatalErrorIn
(
"sampledSet::New"
"(const word&, const polyMesh&, const meshSearch&"
", const dictionary&)"
) << "Unknown sample type "
FatalErrorInFunction
<< "Unknown sample type "
<< sampleType << nl << nl
<< "Valid sample types : " << endl
<< wordConstructorTablePtr_->sortedToc()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -102,7 +102,7 @@ void Foam::sampledSets::combineSampledSets
if (Pstream::master() && allCurveDist.size() == 0)
{
WarningIn("sampledSets::combineSampledSets(..)")
WarningInFunction
<< "Sample set " << samplePts.name()
<< " has zero points." << endl;
}

View File

@ -106,7 +106,7 @@ Foam::label Foam::sampledSets::classifyFields()
}
else
{
WarningIn("sampledSets::classifyFields()")
WarningInFunction
<< "Cannot find field file matching "
<< fieldSelection_[i] << endl;
}
@ -137,7 +137,7 @@ Foam::label Foam::sampledSets::classifyFields()
}
else
{
WarningIn("sampledSets::classifyFields()")
WarningInFunction
<< "Cannot find registered field matching "
<< fieldSelection_[i] << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -158,17 +158,8 @@ void Foam::sampledSets::writeSampleFile
}
else
{
WarningIn
(
"void Foam::sampledSets::writeSampleFile"
"("
"const coordSet&, "
"const PtrList<volFieldSampler<Type> >&, "
"const label, "
"const fileName&, "
"const writer<Type>&"
")"
) << "File " << ofs.name() << " could not be opened. "
WarningInFunction
<< "File " << ofs.name() << " could not be opened. "
<< "No data will be written" << endl;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -217,7 +217,7 @@ void Foam::uniformSet::calcSamples
// distance vector between sampling points
if ((nPoints_ < 2) || (mag(end_ - start_) < SMALL))
{
FatalErrorIn("uniformSet::calcSamples()")
FatalErrorInFunction
<< "Incorrect sample specification. Either too few points or"
<< " start equals end point." << endl
<< "nPoints:" << nPoints_

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -113,10 +113,8 @@ void Foam::distanceSurface::createGeometry()
}
else
{
FatalErrorIn
(
"void Foam::distanceSurface::createGeometry()"
) << "getVolumeType failure, neither INSIDE or OUTSIDE"
FatalErrorInFunction
<< "getVolumeType failure, neither INSIDE or OUTSIDE"
<< exit(FatalError);
}
}
@ -165,10 +163,8 @@ void Foam::distanceSurface::createGeometry()
}
else
{
FatalErrorIn
(
"void Foam::distanceSurface::createGeometry()"
) << "getVolumeType failure, "
FatalErrorInFunction
<< "getVolumeType failure, "
<< "neither INSIDE or OUTSIDE"
<< exit(FatalError);
}
@ -224,10 +220,8 @@ void Foam::distanceSurface::createGeometry()
}
else
{
FatalErrorIn
(
"void Foam::distanceSurface::createGeometry()"
) << "getVolumeType failure, neither INSIDE or OUTSIDE"
FatalErrorInFunction
<< "getVolumeType failure, neither INSIDE or OUTSIDE"
<< exit(FatalError);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,10 +97,8 @@ Foam::PackedBoolList Foam::isoSurface::collocatedFaces
}
else
{
FatalErrorIn
(
"isoSurface::collocatedFaces(const coupledPolyPatch&) const"
) << "Unhandled coupledPolyPatch type " << pp.type()
FatalErrorInFunction
<< "Unhandled coupledPolyPatch type " << pp.type()
<< abort(FatalError);
}
return collocated;
@ -967,7 +965,7 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints
if ((triPoints.size() % 3) != 0)
{
FatalErrorIn("isoSurface::stitchTriPoints(..)")
FatalErrorInFunction
<< "Problem: number of points " << triPoints.size()
<< " not a multiple of 3." << abort(FatalError);
}
@ -998,7 +996,7 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints
if (hasMerged)
{
FatalErrorIn("isoSurface::stitchTriPoints(..)")
FatalErrorInFunction
<< "Merged points contain duplicates"
<< " when merging with distance " << mergeDistance_ << endl
<< "merged:" << newPoints.size() << " re-merged:"
@ -1115,7 +1113,7 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints
if (f == nbrF)
{
FatalErrorIn("validTri(const triSurface&, const label)")
FatalErrorInFunction
<< "Check : "
<< " triangle " << faceI << " vertices " << f
<< " fc:" << f.centre(surf.points())
@ -1147,7 +1145,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;
@ -1157,7 +1155,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;
@ -1189,7 +1187,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
@ -1326,7 +1324,7 @@ void Foam::isoSurface::calcAddressing
}
else
{
//WarningIn("orientSurface(triSurface&)")
//WarningInFunction
// << "Edge " << edgeI << " with centre "
// << mergedCentres[edgeI]
// << " used by more than two triangles: "
@ -1452,7 +1450,7 @@ void Foam::isoSurface::walkOrientation
if (nbrFp == -1)
{
FatalErrorIn("isoSurface::walkOrientation(..)")
FatalErrorInFunction
<< "triI:" << triI
<< " tri:" << tri
<< " p0:" << p0
@ -1550,10 +1548,8 @@ void Foam::isoSurface::orientSurface
}
else if (flipState[triI] == -1)
{
FatalErrorIn
(
"isoSurface::orientSurface(triSurface&, const label)"
) << "problem" << abort(FatalError);
FatalErrorInFunction
<< "problem" << abort(FatalError);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -917,7 +917,7 @@ Foam::triSurface Foam::isoSurfaceCell::stitchTriPoints
if ((triPoints.size() % 3) != 0)
{
FatalErrorIn("isoSurfaceCell::stitchTriPoints(..)")
FatalErrorInFunction
<< "Problem: number of points " << triPoints.size()
<< " not a multiple of 3." << abort(FatalError);
}
@ -951,7 +951,7 @@ Foam::triSurface Foam::isoSurfaceCell::stitchTriPoints
if (hasMerged)
{
FatalErrorIn("isoSurfaceCell::stitchTriPoints(..)")
FatalErrorInFunction
<< "Merged points contain duplicates"
<< " when merging with distance " << mergeDistance_ << endl
<< "merged:" << newPoints.size() << " re-merged:"
@ -1064,7 +1064,7 @@ bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label faceI)
{
if (f[fp] < 0 || f[fp] >= 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;
@ -1075,7 +1075,7 @@ bool Foam::isoSurfaceCell::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;
@ -1107,7 +1107,7 @@ bool Foam::isoSurfaceCell::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
<< " coords:" << f.points(surf.points())
<< " has the same vertices as triangle " << nbrFaceI
@ -1199,7 +1199,7 @@ void Foam::isoSurfaceCell::calcAddressing
}
else
{
//WarningIn("orientSurface(triSurface&)")
//WarningInFunction
// << "Edge " << edgeI << " with centre " << mergedCentres[edgeI]
// << " used by more than two triangles: " << edgeFace0[edgeI]
// << ", "
@ -1351,10 +1351,8 @@ void Foam::isoSurfaceCell::calcAddressing
// }
// else if (flipState[triI] == -1)
// {
// FatalErrorIn
// (
// "isoSurfaceCell::orientSurface(triSurface&, const label)"
// ) << "problem" << abort(FatalError);
// FatalErrorInFunction
// << "problem" << abort(FatalError);
// }
// }
//}

View File

@ -495,7 +495,7 @@ void Foam::isoSurfaceCell::generateTriPoints
if (countNotFoundTets > 0)
{
WarningIn("Foam::isoSurfaceCell::generateTriPoints")
WarningInFunction
<< "Could not find " << countNotFoundTets
<< " tet base points, which may lead to inverted triangles."
<< endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -492,7 +492,7 @@ void Foam::isoSurface::generateTriPoints
|| (snappedPoint.size() != mesh_.nPoints())
)
{
FatalErrorIn("isoSurface::generateTriPoints(..)")
FatalErrorInFunction
<< "Incorrect size." << endl
<< "mesh: nCells:" << mesh_.nCells()
<< " points:" << mesh_.nPoints() << endl
@ -759,7 +759,7 @@ Foam::isoSurface::interpolate
{
if (nValues[i] == 0)
{
FatalErrorIn("isoSurface::interpolate(..)")
FatalErrorInFunction
<< "point:" << i << " nValues:" << nValues[i]
<< abort(FatalError);
}

View File

@ -110,7 +110,7 @@ void Foam::sampledIsoSurface::getIsoFields() const
}
else
{
FatalErrorIn("sampledIsoSurface::getIsoFields()")
FatalErrorInFunction
<< "Cannot find isosurface field " << isoField_
<< " in database or directory " << vfHeader.path()
<< exit(FatalError);
@ -427,10 +427,8 @@ Foam::sampledIsoSurface::sampledIsoSurface
{
if (!sampledSurface::interpolate())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"sampledIsoSurface::sampledIsoSurface"
"(const word&, const polyMesh&, const dictionary&)",
dict
) << "Non-interpolated iso surface not supported since triangles"
<< " span across cells." << exit(FatalIOError);
@ -442,10 +440,8 @@ Foam::sampledIsoSurface::sampledIsoSurface
if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"sampledIsoSurface::sampledIsoSurface"
"(const word&, const polyMesh&, const dictionary&)",
dict
) << "Cannot find patch " << exposedPatchName_
<< " in which to put exposed faces." << endl

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -279,11 +279,8 @@ Foam::sampledCuttingPlane::sampledCuttingPlane
if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1)
{
FatalErrorIn
(
"sampledCuttingPlane::sampledCuttingPlane"
"(const word&, const polyMesh&, const dictionary&)"
) << "Cannot find patch " << exposedPatchName_
FatalErrorInFunction
<< "Cannot find patch " << exposedPatchName_
<< " in which to put exposed faces." << endl
<< "Valid patches are " << mesh.boundaryMesh().names()
<< exit(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -135,7 +135,7 @@ bool Foam::sampledPatch::update()
if (isA<emptyPolyPatch>(pp))
{
FatalErrorIn("sampledPatch::update()")
FatalErrorInFunction
<< "Cannot sample an empty patch. Patch " << pp.name()
<< exit(FatalError);
}

View File

@ -53,7 +53,7 @@ void Foam::sampledSurface::makeSf() const
// It is an error to recalculate if the pointer is already set
if (SfPtr_)
{
FatalErrorIn("Foam::sampledSurface::makeSf()")
FatalErrorInFunction
<< "face area vectors already exist"
<< abort(FatalError);
}
@ -74,7 +74,7 @@ void Foam::sampledSurface::makeMagSf() const
// It is an error to recalculate if the pointer is already set
if (magSfPtr_)
{
FatalErrorIn("Foam::sampledSurface::makeMagSf()")
FatalErrorInFunction
<< "mag face areas already exist"
<< abort(FatalError);
}
@ -95,7 +95,7 @@ void Foam::sampledSurface::makeCf() const
// It is an error to recalculate if the pointer is already set
if (CfPtr_)
{
FatalErrorIn("Foam::sampledSurface::makeCf()")
FatalErrorInFunction
<< "face centres already exist"
<< abort(FatalError);
}
@ -132,11 +132,8 @@ Foam::autoPtr<Foam::sampledSurface> Foam::sampledSurface::New
if (cstrIter == wordConstructorTablePtr_->end())
{
FatalErrorIn
(
"sampledSurface::New"
"(const word&, const polyMesh&, const dictionary&)"
) << "Unknown sample type "
FatalErrorInFunction
<< "Unknown sample type "
<< sampleType << nl << nl
<< "Valid sample types : " << endl
<< wordConstructorTablePtr_->sortedToc()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,10 +35,7 @@ bool Foam::sampledSurface::checkFieldSize(const Field<Type>& field) const
if (field.size() != faces().size())
{
FatalErrorIn
(
"sampledSurface::checkFieldSize(const Field<Type>&) const"
)
FatalErrorInFunction
<< "size mismatch: "
<< "field (" << field.size()
<< ") != surface (" << faces().size() << ")"

View File

@ -50,7 +50,7 @@ Foam::label Foam::sampledSurfaces::classifyFields()
}
else
{
WarningIn("sampledSurfaces::classifyFields()")
WarningInFunction
<< "Cannot find field file matching "
<< fieldSelection_[i] << endl;
}
@ -72,7 +72,7 @@ Foam::label Foam::sampledSurfaces::classifyFields()
}
else
{
WarningIn("sampledSurfaces::classifyFields()")
WarningInFunction
<< "Cannot find registered field matching "
<< fieldSelection_[i] << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -163,10 +163,7 @@ Foam::sampledThresholdCellFaces::sampledThresholdCellFaces
{
if (!dict.found("lowerLimit") && !dict.found("upperLimit"))
{
FatalErrorIn
(
"sampledThresholdCellFaces::sampledThresholdCellFaces(..)"
)
FatalErrorInFunction
<< "require at least one of 'lowerLimit' or 'upperLimit'" << endl
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -279,8 +279,7 @@ Foam::thresholdCellFaces::thresholdCellFaces
if (lowerThreshold > upperThreshold)
{
WarningIn("thresholdCellFaces::thresholdCellFaces(...)")
<< "lower > upper limit! "
WarningInFunction
<< lowerThreshold << " > " << upperThreshold << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -73,10 +73,8 @@ void Foam::dxSurfaceWriter::writeGeometry
if (f.size() != 3)
{
FatalErrorIn
(
"writeGeometry(Ostream&, const pointField&, const faceList&)"
) << "Face " << faceI << " vertices " << f
FatalErrorInFunction
<< "Face " << faceI << " vertices " << f
<< " is not a triangle."
<< exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -156,14 +156,8 @@ void Foam::nastranSurfaceWriter::writeCoord
}
default:
{
FatalErrorIn
(
"void Foam::nastranSurfaceWriter::writeCoord"
"("
"Ostream&, "
"const point&"
") const"
) << "Unknown writeFormat enumeration" << abort(FatalError);
FatalErrorInFunction
<< "Unknown writeFormat enumeration" << abort(FatalError);
}
}
}
@ -255,16 +249,8 @@ void Foam::nastranSurfaceWriter::writeFace
}
default:
{
FatalErrorIn
(
"void Foam::nastranSurfaceWriter::writeFace"
"("
"const word&"
"const labelList&"
"label&"
"Ostream&, "
") const"
) << "Unknown writeFormat enumeration" << abort(FatalError);
FatalErrorInFunction
<< "Unknown writeFormat enumeration" << abort(FatalError);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -129,20 +129,7 @@ void Foam::nastranSurfaceWriter::writeTemplate
{
if (!fieldMap_.found(fieldName))
{
WarningIn
(
"void Foam::nastranSurfaceWriter::writeTemplate"
"("
"const fileName&, "
"const fileName&, "
"const pointField&, "
"const faceList&, "
"const word&, "
"const Field<Type>&, "
"const bool, "
"const bool"
") const"
)
WarningInFunction
<< "No mapping found between field " << fieldName
<< " and corresponding Nastran field. Available types are:"
<< fieldMap_

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,10 +68,8 @@ Foam::surfaceWriter::New(const word& writeType)
if (cstrIter == wordConstructorTablePtr_->end())
{
FatalErrorIn
(
"surfaceWriter::New(const word&)"
) << "Unknown write type \"" << writeType << "\"\n\n"
FatalErrorInFunction
<< "Unknown write type \"" << writeType << "\"\n\n"
<< "Valid write types : "
<< wordConstructorTablePtr_->sortedToc() << nl
<< "Valid proxy types : "