src/OpenFOAM: 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-08 12:23:52 +00:00
parent 4b0c0a5278
commit a4ab3f61db
223 changed files with 1269 additions and 2689 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -208,7 +208,7 @@ Foam::dynamicIndexedOctree<Type>::divide
|| bb.min()[2] >= bb.max()[2] || bb.min()[2] >= bb.max()[2]
) )
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::divide(..)") FatalErrorInFunction
<< "Badly formed bounding box:" << bb << "Badly formed bounding box:" << bb
<< abort(FatalError); << abort(FatalError);
} }
@ -436,11 +436,8 @@ Foam::volumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
{ {
// Empty node. Cannot have 'mixed' as its type since not divided // Empty node. Cannot have 'mixed' as its type since not divided
// up and has no items inside it. // up and has no items inside it.
FatalErrorIn FatalErrorInFunction
( << "Sample:" << sample << " node:" << nodeI
"dynamicIndexedOctree<Type>::getVolumeType"
"(const label, const point&)"
) << "Sample:" << sample << " node:" << nodeI
<< " with bb:" << nodes_[nodeI].bb_ << nl << " with bb:" << nodes_[nodeI].bb_ << nl
<< "Empty subnode has invalid volume type MIXED." << "Empty subnode has invalid volume type MIXED."
<< abort(FatalError); << abort(FatalError);
@ -450,11 +447,8 @@ Foam::volumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Sample:" << sample << " at node:" << nodeI
"dynamicIndexedOctree<Type>::getVolumeType"
"(const label, const point&)"
) << "Sample:" << sample << " at node:" << nodeI
<< " octant:" << octant << " octant:" << octant
<< " with bb:" << nod.bb_.subBbox(octant) << nl << " with bb:" << nod.bb_.subBbox(octant) << nl
<< "Node has invalid volume type " << octantType << "Node has invalid volume type " << octantType
@ -708,7 +702,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
{ {
if (pushInside != bb.contains(perturbedPt)) if (pushInside != bb.contains(perturbedPt))
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::pushPoint(..)") FatalErrorInFunction
<< "pushed point:" << pt << "pushed point:" << pt
<< " to:" << perturbedPt << " to:" << perturbedPt
<< " wanted side:" << pushInside << " wanted side:" << pushInside
@ -743,7 +737,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
if (faceID == 0) if (faceID == 0)
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::pushPoint(..)") FatalErrorInFunction
<< abort(FatalError); << abort(FatalError);
} }
@ -820,7 +814,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
{ {
if (pushInside != bb.contains(perturbedPt)) if (pushInside != bb.contains(perturbedPt))
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::pushPoint(..)") FatalErrorInFunction
<< "pushed point:" << pt << " on face:" << faceString(faceID) << "pushed point:" << pt << " on face:" << faceString(faceID)
<< " to:" << perturbedPt << " to:" << perturbedPt
<< " wanted side:" << pushInside << " wanted side:" << pushInside
@ -849,7 +843,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
{ {
if (bb.posBits(pt) != 0) if (bb.posBits(pt) != 0)
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::pushPointIntoFace(..)") FatalErrorInFunction
<< " bb:" << bb << endl << " bb:" << bb << endl
<< "does not contain point " << pt << abort(FatalError); << "does not contain point " << pt << abort(FatalError);
} }
@ -971,7 +965,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
{ {
if (faceID != bb.faceBits(facePoint)) if (faceID != bb.faceBits(facePoint))
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::pushPointIntoFace(..)") FatalErrorInFunction
<< "Pushed point from " << pt << "Pushed point from " << pt
<< " on face:" << ptFaceID << " of bb:" << bb << endl << " on face:" << ptFaceID << " of bb:" << bb << endl
<< "onto " << facePoint << "onto " << facePoint
@ -982,7 +976,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
} }
if (bb.posBits(facePoint) != 0) if (bb.posBits(facePoint) != 0)
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::pushPointIntoFace(..)") FatalErrorInFunction
<< " bb:" << bb << endl << " bb:" << bb << endl
<< "does not contain perturbed point " << "does not contain perturbed point "
<< facePoint << abort(FatalError); << facePoint << abort(FatalError);
@ -1086,7 +1080,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
// //
// if (nFaces == 0 || nFaces == 1 || nFaces > 3) // if (nFaces == 0 || nFaces == 1 || nFaces > 3)
// { // {
// FatalErrorIn("dynamicIndexedOctree<Type>::checkMultipleFaces(..)") // FatalErrorInFunction
// << "Problem : nFaces:" << nFaces << abort(FatalError); // << "Problem : nFaces:" << nFaces << abort(FatalError);
// } // }
// //
@ -1119,7 +1113,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
// //
// if (maxIndex == -1) // if (maxIndex == -1)
// { // {
// FatalErrorIn("dynamicIndexedOctree<Type>::checkMultipleFaces(..)") // FatalErrorInFunction
// << "Problem maxIndex:" << maxIndex << " inproducts:" << inproducts // << "Problem maxIndex:" << maxIndex << " inproducts:" << inproducts
// << abort(FatalError); // << abort(FatalError);
// } // }
@ -1179,7 +1173,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
// { // {
// if (faceID != bb.faceBits(faceHitInfo.rawPoint())) // if (faceID != bb.faceBits(faceHitInfo.rawPoint()))
// { // {
// FatalErrorIn("dynamicIndexedOctree<Type>::checkMultipleFaces(..)") // FatalErrorInFunction
// << "Pushed point from " << oldPoint // << "Pushed point from " << oldPoint
// << " on face:" << oldFaceID << " of bb:" << bb << endl // << " on face:" << oldFaceID << " of bb:" << bb << endl
// << "onto " << faceHitInfo.rawPoint() // << "onto " << faceHitInfo.rawPoint()
@ -1229,7 +1223,7 @@ bool Foam::dynamicIndexedOctree<Type>::walkToParent
if (parentOctant == 255) if (parentOctant == 255)
{ {
FatalErrorIn("walkToParent(..)") FatalErrorInFunction
<< "Problem: no parent found for octant:" << octant << "Problem: no parent found for octant:" << octant
<< " node:" << nodeI << " node:" << nodeI
<< abort(FatalError); << abort(FatalError);
@ -1426,7 +1420,7 @@ bool Foam::dynamicIndexedOctree<Type>::walkToNeighbour
if (!subBb.contains(facePoint)) if (!subBb.contains(facePoint))
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::walkToNeighbour(..)") FatalErrorInFunction
<< "When searching for " << facePoint << "When searching for " << facePoint
<< " ended up in node:" << nodeI << " ended up in node:" << nodeI
<< " octant:" << octant << " octant:" << octant
@ -1455,7 +1449,7 @@ bool Foam::dynamicIndexedOctree<Type>::walkToNeighbour
if (nodeI == oldNodeI && octant == oldOctant) if (nodeI == oldNodeI && octant == oldOctant)
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::walkToNeighbour(..)") FatalErrorInFunction
<< "Did not go to neighbour when searching for " << facePoint << "Did not go to neighbour when searching for " << facePoint
<< endl << endl
<< " starting from face:" << faceString(faceID) << " starting from face:" << faceString(faceID)
@ -1467,7 +1461,7 @@ bool Foam::dynamicIndexedOctree<Type>::walkToNeighbour
if (!subBb.contains(facePoint)) if (!subBb.contains(facePoint))
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::walkToNeighbour(..)") FatalErrorInFunction
<< "When searching for " << facePoint << "When searching for " << facePoint
<< " ended up in node:" << nodeI << " ended up in node:" << nodeI
<< " octant:" << octant << " octant:" << octant
@ -1555,7 +1549,7 @@ void Foam::dynamicIndexedOctree<Type>::traverseNode
if (octantBb.posBits(start) != 0) if (octantBb.posBits(start) != 0)
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::traverseNode(..)") FatalErrorInFunction
<< "Node:" << nodeI << " octant:" << octant << "Node:" << nodeI << " octant:" << octant
<< " bb:" << octantBb << endl << " bb:" << octantBb << endl
<< "does not contain point " << start << abort(FatalError); << "does not contain point " << start << abort(FatalError);
@ -1863,7 +1857,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
} }
if (debug) if (debug)
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::findLine(..)") FatalErrorInFunction
<< "Got stuck in loop raytracing from:" << treeStart << "Got stuck in loop raytracing from:" << treeStart
<< " to:" << treeEnd << endl << " to:" << treeEnd << endl
<< "inside top box:" << subBbox(startNodeI, startOctant) << "inside top box:" << subBbox(startNodeI, startOctant)
@ -1871,7 +1865,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
} }
else else
{ {
WarningIn("dynamicIndexedOctree<Type>::findLine(..)") WarningInFunction
<< "Got stuck in loop raytracing from:" << treeStart << "Got stuck in loop raytracing from:" << treeStart
<< " to:" << treeEnd << endl << " to:" << treeEnd << endl
<< "inside top box:" << subBbox(startNodeI, startOctant) << "inside top box:" << subBbox(startNodeI, startOctant)
@ -2493,7 +2487,7 @@ Foam::labelBits Foam::dynamicIndexedOctree<Type>::findNode
{ {
if (!nod.bb_.contains(sample)) if (!nod.bb_.contains(sample))
{ {
FatalErrorIn("findNode(..)") FatalErrorInFunction
<< "Cannot find " << sample << " in node " << nodeI << "Cannot find " << sample << " in node " << nodeI
<< abort(FatalError); << abort(FatalError);
} }
@ -2627,7 +2621,7 @@ Foam::volumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
} }
else else
{ {
FatalErrorIn("getVolumeType") << abort(FatalError); FatalErrorInFunction << abort(FatalError);
} }
} }

View File

@ -472,7 +472,7 @@ public:
{ {
if (nodes_.empty()) if (nodes_.empty())
{ {
FatalErrorIn("dynamicIndexedOctree<Type>::bb() const") FatalErrorInFunction
<< "Tree is empty" << abort(FatalError); << "Tree is empty" << abort(FatalError);
} }
return nodes_[0].bb_; return nodes_[0].bb_;
@ -500,7 +500,7 @@ public:
{ {
if (!isContent(i)) if (!isContent(i))
{ {
FatalErrorIn("getContent(const label)") FatalErrorInFunction
<< abort(FatalError); << abort(FatalError);
} }
return -i.val()-1; return -i.val()-1;
@ -510,7 +510,7 @@ public:
{ {
if (!isNode(i)) if (!isNode(i))
{ {
FatalErrorIn("getNode(const label)") FatalErrorInFunction
<< abort(FatalError); << abort(FatalError);
} }
return i.val() - 1; return i.val() - 1;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -182,7 +182,7 @@ Foam::indexedOctree<Type>::divide
|| bb.min()[2] >= bb.max()[2] || bb.min()[2] >= bb.max()[2]
) )
{ {
FatalErrorIn("indexedOctree<Type>::divide(..)") FatalErrorInFunction
<< "Badly formed bounding box:" << bb << "Badly formed bounding box:" << bb
<< abort(FatalError); << abort(FatalError);
} }
@ -456,11 +456,8 @@ Foam::volumeType Foam::indexedOctree<Type>::getVolumeType
{ {
// Empty node. Cannot have 'mixed' as its type since not divided // Empty node. Cannot have 'mixed' as its type since not divided
// up and has no items inside it. // up and has no items inside it.
FatalErrorIn FatalErrorInFunction
( << "Sample:" << sample << " node:" << nodeI
"indexedOctree<Type>::getVolumeType"
"(const label, const point&)"
) << "Sample:" << sample << " node:" << nodeI
<< " with bb:" << nodes_[nodeI].bb_ << nl << " with bb:" << nodes_[nodeI].bb_ << nl
<< "Empty subnode has invalid volume type MIXED." << "Empty subnode has invalid volume type MIXED."
<< abort(FatalError); << abort(FatalError);
@ -470,11 +467,8 @@ Foam::volumeType Foam::indexedOctree<Type>::getVolumeType
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Sample:" << sample << " at node:" << nodeI
"indexedOctree<Type>::getVolumeType"
"(const label, const point&)"
) << "Sample:" << sample << " at node:" << nodeI
<< " octant:" << octant << " octant:" << octant
<< " with bb:" << nod.bb_.subBbox(octant) << nl << " with bb:" << nod.bb_.subBbox(octant) << nl
<< "Node has invalid volume type " << octantType << "Node has invalid volume type " << octantType
@ -739,7 +733,7 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
{ {
if (pushInside != bb.contains(perturbedPt)) if (pushInside != bb.contains(perturbedPt))
{ {
FatalErrorIn("indexedOctree<Type>::pushPoint(..)") FatalErrorInFunction
<< "pushed point:" << pt << "pushed point:" << pt
<< " to:" << perturbedPt << " to:" << perturbedPt
<< " wanted side:" << pushInside << " wanted side:" << pushInside
@ -774,7 +768,7 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
if (faceID == 0) if (faceID == 0)
{ {
FatalErrorIn("indexedOctree<Type>::pushPoint(..)") FatalErrorInFunction
<< abort(FatalError); << abort(FatalError);
} }
@ -851,7 +845,7 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
{ {
if (pushInside != bb.contains(perturbedPt)) if (pushInside != bb.contains(perturbedPt))
{ {
FatalErrorIn("indexedOctree<Type>::pushPoint(..)") FatalErrorInFunction
<< "pushed point:" << pt << " on face:" << faceString(faceID) << "pushed point:" << pt << " on face:" << faceString(faceID)
<< " to:" << perturbedPt << " to:" << perturbedPt
<< " wanted side:" << pushInside << " wanted side:" << pushInside
@ -880,7 +874,7 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
{ {
if (bb.posBits(pt) != 0) if (bb.posBits(pt) != 0)
{ {
FatalErrorIn("indexedOctree<Type>::pushPointIntoFace(..)") FatalErrorInFunction
<< " bb:" << bb << endl << " bb:" << bb << endl
<< "does not contain point " << pt << abort(FatalError); << "does not contain point " << pt << abort(FatalError);
} }
@ -1002,7 +996,7 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
{ {
if (faceID != bb.faceBits(facePoint)) if (faceID != bb.faceBits(facePoint))
{ {
FatalErrorIn("indexedOctree<Type>::pushPointIntoFace(..)") FatalErrorInFunction
<< "Pushed point from " << pt << "Pushed point from " << pt
<< " on face:" << ptFaceID << " of bb:" << bb << endl << " on face:" << ptFaceID << " of bb:" << bb << endl
<< "onto " << facePoint << "onto " << facePoint
@ -1013,7 +1007,7 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
} }
if (bb.posBits(facePoint) != 0) if (bb.posBits(facePoint) != 0)
{ {
FatalErrorIn("indexedOctree<Type>::pushPointIntoFace(..)") FatalErrorInFunction
<< " bb:" << bb << endl << " bb:" << bb << endl
<< "does not contain perturbed point " << "does not contain perturbed point "
<< facePoint << abort(FatalError); << facePoint << abort(FatalError);
@ -1117,7 +1111,7 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
// //
// if (nFaces == 0 || nFaces == 1 || nFaces > 3) // if (nFaces == 0 || nFaces == 1 || nFaces > 3)
// { // {
// FatalErrorIn("indexedOctree<Type>::checkMultipleFaces(..)") // FatalErrorInFunction
// << "Problem : nFaces:" << nFaces << abort(FatalError); // << "Problem : nFaces:" << nFaces << abort(FatalError);
// } // }
// //
@ -1150,7 +1144,7 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
// //
// if (maxIndex == -1) // if (maxIndex == -1)
// { // {
// FatalErrorIn("indexedOctree<Type>::checkMultipleFaces(..)") // FatalErrorInFunction
// << "Problem maxIndex:" << maxIndex << " inproducts:" << inproducts // << "Problem maxIndex:" << maxIndex << " inproducts:" << inproducts
// << abort(FatalError); // << abort(FatalError);
// } // }
@ -1210,7 +1204,7 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
// { // {
// if (faceID != bb.faceBits(faceHitInfo.rawPoint())) // if (faceID != bb.faceBits(faceHitInfo.rawPoint()))
// { // {
// FatalErrorIn("indexedOctree<Type>::checkMultipleFaces(..)") // FatalErrorInFunction
// << "Pushed point from " << oldPoint // << "Pushed point from " << oldPoint
// << " on face:" << oldFaceID << " of bb:" << bb << endl // << " on face:" << oldFaceID << " of bb:" << bb << endl
// << "onto " << faceHitInfo.rawPoint() // << "onto " << faceHitInfo.rawPoint()
@ -1260,7 +1254,7 @@ bool Foam::indexedOctree<Type>::walkToParent
if (parentOctant == 255) if (parentOctant == 255)
{ {
FatalErrorIn("walkToParent(..)") FatalErrorInFunction
<< "Problem: no parent found for octant:" << octant << "Problem: no parent found for octant:" << octant
<< " node:" << nodeI << " node:" << nodeI
<< abort(FatalError); << abort(FatalError);
@ -1457,7 +1451,7 @@ bool Foam::indexedOctree<Type>::walkToNeighbour
if (!subBb.contains(facePoint)) if (!subBb.contains(facePoint))
{ {
FatalErrorIn("indexedOctree<Type>::walkToNeighbour(..)") FatalErrorInFunction
<< "When searching for " << facePoint << "When searching for " << facePoint
<< " ended up in node:" << nodeI << " ended up in node:" << nodeI
<< " octant:" << octant << " octant:" << octant
@ -1486,7 +1480,7 @@ bool Foam::indexedOctree<Type>::walkToNeighbour
if (nodeI == oldNodeI && octant == oldOctant) if (nodeI == oldNodeI && octant == oldOctant)
{ {
FatalErrorIn("indexedOctree<Type>::walkToNeighbour(..)") FatalErrorInFunction
<< "Did not go to neighbour when searching for " << facePoint << "Did not go to neighbour when searching for " << facePoint
<< endl << endl
<< " starting from face:" << faceString(faceID) << " starting from face:" << faceString(faceID)
@ -1498,7 +1492,7 @@ bool Foam::indexedOctree<Type>::walkToNeighbour
if (!subBb.contains(facePoint)) if (!subBb.contains(facePoint))
{ {
FatalErrorIn("indexedOctree<Type>::walkToNeighbour(..)") FatalErrorInFunction
<< "When searching for " << facePoint << "When searching for " << facePoint
<< " ended up in node:" << nodeI << " ended up in node:" << nodeI
<< " octant:" << octant << " octant:" << octant
@ -1589,7 +1583,7 @@ void Foam::indexedOctree<Type>::traverseNode
if (octantBb.posBits(start) != 0) if (octantBb.posBits(start) != 0)
{ {
FatalErrorIn("indexedOctree<Type>::traverseNode(..)") FatalErrorInFunction
<< "Node:" << nodeI << " octant:" << octant << "Node:" << nodeI << " octant:" << octant
<< " bb:" << octantBb << endl << " bb:" << octantBb << endl
<< "does not contain point " << start << abort(FatalError); << "does not contain point " << start << abort(FatalError);
@ -1897,7 +1891,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
} }
if (debug) if (debug)
{ {
FatalErrorIn("indexedOctree<Type>::findLine(..)") FatalErrorInFunction
<< "Got stuck in loop raytracing from:" << treeStart << "Got stuck in loop raytracing from:" << treeStart
<< " to:" << treeEnd << endl << " to:" << treeEnd << endl
<< "inside top box:" << subBbox(startNodeI, startOctant) << "inside top box:" << subBbox(startNodeI, startOctant)
@ -1905,7 +1899,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
} }
else else
{ {
WarningIn("indexedOctree<Type>::findLine(..)") WarningInFunction
<< "Got stuck in loop raytracing from:" << treeStart << "Got stuck in loop raytracing from:" << treeStart
<< " to:" << treeEnd << endl << " to:" << treeEnd << endl
<< "inside top box:" << subBbox(startNodeI, startOctant) << "inside top box:" << subBbox(startNodeI, startOctant)
@ -2799,7 +2793,7 @@ Foam::labelBits Foam::indexedOctree<Type>::findNode
{ {
if (!nod.bb_.contains(sample)) if (!nod.bb_.contains(sample))
{ {
FatalErrorIn("findNode(..)") FatalErrorInFunction
<< "Cannot find " << sample << " in node " << nodeI << "Cannot find " << sample << " in node " << nodeI
<< abort(FatalError); << abort(FatalError);
} }
@ -2937,7 +2931,7 @@ Foam::volumeType Foam::indexedOctree<Type>::getVolumeType
} }
else else
{ {
FatalErrorIn("getVolumeType") << abort(FatalError); FatalErrorInFunction << abort(FatalError);
} }
} }

View File

@ -470,7 +470,7 @@ public:
{ {
if (nodes_.empty()) if (nodes_.empty())
{ {
FatalErrorIn("indexedOctree<Type>::bb() const") FatalErrorInFunction
<< "Tree is empty" << abort(FatalError); << "Tree is empty" << abort(FatalError);
} }
return nodes_[0].bb_; return nodes_[0].bb_;
@ -498,7 +498,7 @@ public:
{ {
if (!isContent(i)) if (!isContent(i))
{ {
FatalErrorIn("getContent(const label)") FatalErrorInFunction
<< abort(FatalError); << abort(FatalError);
} }
return -i.val()-1; return -i.val()-1;
@ -508,7 +508,7 @@ public:
{ {
if (!isNode(i)) if (!isNode(i))
{ {
FatalErrorIn("getNode(const label)") FatalErrorInFunction
<< abort(FatalError); << abort(FatalError);
} }
return i.val() - 1; return i.val() - 1;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -60,10 +60,8 @@ class labelBits
# ifdef FULLDEBUG # ifdef FULLDEBUG
if (bits > 7 || (((val<<3)>>3) != val)) if (bits > 7 || (((val<<3)>>3) != val))
{ {
FatalErrorIn FatalErrorInFunction
( << "Direction " << bits << " outside range 0..7"
"labelBits::pack(const label, const direction)"
) << "Direction " << bits << " outside range 0..7"
<< " or value " << val << " negative or larger than " << " or value " << val << " negative or larger than "
<< label(8*sizeof(label)-3) << " bit representation" << label(8*sizeof(label)-3) << " bit representation"
<< abort(FatalError); << abort(FatalError);

View File

@ -171,11 +171,8 @@ void Foam::Circulator<ContainerType>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &rhs) if (this == &rhs)
{ {
FatalErrorIn FatalErrorInFunction
( << "Attempted assignment to self"
"Foam::Circulator<ContainerType>::operator="
"(const Foam::Circulator<ContainerType>&)"
) << "Attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -174,11 +174,8 @@ void Foam::ConstCirculator<ContainerType>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &rhs) if (this == &rhs)
{ {
FatalErrorIn FatalErrorInFunction
( << "Attempted assignment to self"
"Foam::ConstCirculator<ContainerType>::operator="
"(const Foam::ConstCirculator<ContainerType>&)"
) << "Attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -141,10 +141,8 @@ const T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword) const
if (iter == hashedTs_.end()) if (iter == hashedTs_.end())
{ {
FatalErrorIn FatalErrorInFunction
( << keyword << " is undefined"
"DictionaryBase<IDLListType, T>::lookup(const word&) const"
) << keyword << " is undefined"
<< exit(FatalError); << exit(FatalError);
} }
@ -160,10 +158,8 @@ T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword)
if (iter == hashedTs_.end()) if (iter == hashedTs_.end())
{ {
FatalErrorIn FatalErrorInFunction
( << keyword << " is undefined"
"DictionaryBase<IDLListType, T>::lookup(const word&)"
) << keyword << " is undefined"
<< exit(FatalError); << exit(FatalError);
} }
@ -260,7 +256,7 @@ void Foam::DictionaryBase<IDLListType, T>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &dict) if (this == &dict)
{ {
FatalErrorIn("DictionaryBase::operator=(const DictionaryBase&)") FatalErrorInFunction
<< "attempted assignment to self" << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -70,10 +70,8 @@ inline Foam::autoPtr<T> Foam::PtrListDictionary<T>::set
{ {
if (!DictionaryBase<PtrList<T>, T>::hashedTs_.insert(key, ptr)) if (!DictionaryBase<PtrList<T>, T>::hashedTs_.insert(key, ptr))
{ {
FatalErrorIn FatalErrorInFunction
( << "Cannot insert with key '" << key << "' into hash-table"
"PtrListDictionary<T>::set(const label i, const word& key, T* ptr)"
) << "Cannot insert with key '" << key << "' into hash-table"
<< abort(FatalError); << abort(FatalError);
} }
return PtrList<T>::set(i, ptr); return PtrList<T>::set(i, ptr);
@ -91,11 +89,8 @@ inline Foam::autoPtr<T> Foam::PtrListDictionary<T>::set
T* ptr = aptr.ptr(); T* ptr = aptr.ptr();
if (!DictionaryBase<PtrList<T>, T>::hashedTs_.insert(key, ptr)) if (!DictionaryBase<PtrList<T>, T>::hashedTs_.insert(key, ptr))
{ {
FatalErrorIn FatalErrorInFunction
( << "Cannot insert with key '" << key << "' into hash-table"
"PtrListDictionary<T>::"
"set(const label i, const word& key, autoPtr<T>& aptr)"
) << "Cannot insert with key '" << key << "' into hash-table"
<< abort(FatalError); << abort(FatalError);
} }
return PtrList<T>::set(i, ptr); return PtrList<T>::set(i, ptr);
@ -113,11 +108,8 @@ inline Foam::autoPtr<T> Foam::PtrListDictionary<T>::set
T* ptr = t.ptr(); T* ptr = t.ptr();
if (!DictionaryBase<PtrList<T>, T>::hashedTs_.insert(key, ptr)) if (!DictionaryBase<PtrList<T>, T>::hashedTs_.insert(key, ptr))
{ {
FatalErrorIn FatalErrorInFunction
( << "Cannot insert with key '" << key << "' into hash-table"
"PtrListDictionary<T>::"
"set(const label i, const word& key, tmp<T>& t)"
) << "Cannot insert with key '" << key << "' into hash-table"
<< abort(FatalError); << abort(FatalError);
} }
return PtrList<T>::set(i, ptr); return PtrList<T>::set(i, ptr);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -121,11 +121,8 @@ void Foam::HashPtrTable<T, Key, Hash>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &rhs) if (this == &rhs)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"HashPtrTable<T, Key, Hash>::operator="
"(const HashPtrTable<T, Key, Hash>&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -546,11 +546,8 @@ void Foam::HashTable<T, Key, Hash>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &rhs) if (this == &rhs)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"HashTable<T, Key, Hash>::operator="
"(const HashTable<T, Key, Hash>&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -114,8 +114,7 @@ inline T& Foam::HashTable<T, Key, Hash>::operator[](const Key& key)
if (iter == this->end()) if (iter == this->end())
{ {
FatalErrorIn("HashTable<T, Key, Hash>::operator[](const Key&)") FatalErrorInFunction
<< key << " not found in table. Valid entries: "
<< toc() << toc()
<< exit(FatalError); << exit(FatalError);
} }
@ -131,8 +130,7 @@ inline const T& Foam::HashTable<T, Key, Hash>::operator[](const Key& key) const
if (iter == this->cend()) if (iter == this->cend())
{ {
FatalErrorIn("HashTable<T, Key, Hash>::operator[](const Key&) const") FatalErrorInFunction
<< key << " not found in table. Valid entries: "
<< toc() << toc()
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -71,10 +71,8 @@ Foam::StaticHashTable<T, Key, Hash>::StaticHashTable(const label size)
{ {
if (size < 1) if (size < 1)
{ {
FatalErrorIn FatalErrorInFunction
( << "Illegal size " << size << " for StaticHashTable."
"StaticHashTable<T, Key, Hash>::StaticHashTable(const label size)"
) << "Illegal size " << size << " for StaticHashTable."
<< " Minimum size is 1" << abort(FatalError); << " Minimum size is 1" << abort(FatalError);
} }
} }
@ -406,10 +404,8 @@ void Foam::StaticHashTable<T, Key, Hash>::resize(const label sz)
if (newSize < 1) if (newSize < 1)
{ {
FatalErrorIn FatalErrorInFunction
( << "Illegal size " << newSize << " for StaticHashTable."
"StaticHashTable<T, Key, Hash>::resize(const label)"
) << "Illegal size " << newSize << " for StaticHashTable."
<< " Minimum size is 1" << abort(FatalError); << " Minimum size is 1" << abort(FatalError);
} }
@ -486,11 +482,8 @@ void Foam::StaticHashTable<T, Key, Hash>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &rhs) if (this == &rhs)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"StaticHashTable<T, Key, Hash>::operator="
"(const StaticHashTable<T, Key, Hash>&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,8 +94,7 @@ inline T& Foam::StaticHashTable<T, Key, Hash>::operator[](const Key& key)
if (iter == end()) if (iter == end())
{ {
FatalErrorIn("StaticHashTable<T, Key, Hash>::operator[](const Key&)") FatalErrorInFunction
<< key << " not found in table. Valid entries: "
<< toc() << toc()
<< exit(FatalError); << exit(FatalError);
} }
@ -114,10 +113,7 @@ inline const T& Foam::StaticHashTable<T, Key, Hash>::operator[]
if (iter == cend()) if (iter == cend())
{ {
FatalErrorIn FatalErrorInFunction
(
"StaticHashTable<T, Key, Hash>::operator[](const Key&) const"
) << key << " not found in table. Valid entries: "
<< toc() << toc()
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,10 +45,8 @@ Foam::StaticHashTable<T, Key, Hash>::StaticHashTable
{ {
if (size < 1) if (size < 1)
{ {
FatalErrorIn FatalErrorInFunction
( << "Illegal size " << size << " for StaticHashTable."
"StaticHashTable<T, Key, Hash>::StaticHashTable(const label size)"
) << "Illegal size " << size << " for StaticHashTable."
<< " Minimum size is 1" << abort(FatalError); << " Minimum size is 1" << abort(FatalError);
} }
@ -142,9 +140,8 @@ Foam::Istream& Foam::operator>>(Istream& is, StaticHashTable<T, Key, Hash>& L)
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"operator>>(Istream&, StaticHashTable<T, Key, Hash>&)",
is is
) << "incorrect first token, '(', found " << firstToken.info() ) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);
@ -158,9 +155,8 @@ Foam::Istream& Foam::operator>>(Istream& is, StaticHashTable<T, Key, Hash>& L)
{ {
if (firstToken.pToken() != token::BEGIN_LIST) if (firstToken.pToken() != token::BEGIN_LIST)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"operator>>(Istream&, StaticHashTable<T, Key, Hash>&)",
is is
) << "incorrect first token, '(', found " << firstToken.info() ) << "incorrect first token, '(', found " << firstToken.info()
<< exit(FatalIOError); << exit(FatalIOError);
@ -196,9 +192,8 @@ Foam::Istream& Foam::operator>>(Istream& is, StaticHashTable<T, Key, Hash>& L)
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"operator>>(Istream&, StaticHashTable<T, Key, Hash>&)",
is is
) << "incorrect first token, expected <int> or '(', found " ) << "incorrect first token, expected <int> or '(', found "
<< firstToken.info() << firstToken.info()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,10 +94,7 @@ Foam::Keyed<T>::createList(const List<T>& lst, const labelUList& keys)
{ {
if (lst.size() != keys.size()) if (lst.size() != keys.size())
{ {
FatalErrorIn FatalErrorInFunction
(
"Foam::Keyed<T>::createList(const List<T>&, const labelUList&)"
)
<< "size mismatch adding keys to a list:" << nl << "size mismatch adding keys to a list:" << nl
<< "List has size " << lst.size() << "List has size " << lst.size()
<< " and keys has size " << keys.size() << nl << " and keys has size " << keys.size() << nl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -178,7 +178,7 @@ Foam::DLListBase::link* Foam::DLListBase::removeHead()
if (!first_) if (!first_)
{ {
FatalErrorIn("void DLListBase::removeHead()") FatalErrorInFunction
<< "remove from empty list" << "remove from empty list"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,7 +91,7 @@ Foam::DLListBase::first()
{ {
if (!nElmts_) if (!nElmts_)
{ {
FatalErrorIn("DLListBase::first()") FatalErrorInFunction
<< "list is empty" << "list is empty"
<< abort(FatalError); << abort(FatalError);
} }
@ -104,7 +104,7 @@ Foam::DLListBase::first() const
{ {
if (!nElmts_) if (!nElmts_)
{ {
FatalErrorIn("DLListBase::first() const") FatalErrorInFunction
<< "list is empty" << "list is empty"
<< abort(FatalError); << abort(FatalError);
} }
@ -117,7 +117,7 @@ Foam::DLListBase::last()
{ {
if (!nElmts_) if (!nElmts_)
{ {
FatalErrorIn("DLListBase::last()") FatalErrorInFunction
<< "list is empty" << "list is empty"
<< abort(FatalError); << abort(FatalError);
} }
@ -130,7 +130,7 @@ Foam::DLListBase::last() const
{ {
if (!nElmts_) if (!nElmts_)
{ {
FatalErrorIn("DLListBase::last() const") FatalErrorInFunction
<< "list is empty" << "list is empty"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,7 +81,7 @@ Foam::SLListBase::link* Foam::SLListBase::removeHead()
if (last_ == 0) if (last_ == 0)
{ {
FatalErrorIn("SLListBase::remove()") FatalErrorInFunction
<< "remove from empty list" << "remove from empty list"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,7 +81,7 @@ Foam::SLListBase::first()
{ {
if (!nElmts_) if (!nElmts_)
{ {
FatalErrorIn("SLListBase::first()") FatalErrorInFunction
<< "list is empty" << "list is empty"
<< abort(FatalError); << abort(FatalError);
} }
@ -94,7 +94,7 @@ Foam::SLListBase::first() const
{ {
if (!nElmts_) if (!nElmts_)
{ {
FatalErrorIn("SLListBase::first() const") FatalErrorInFunction
<< "list is empty" << "list is empty"
<< abort(FatalError); << abort(FatalError);
} }
@ -107,7 +107,7 @@ Foam::SLListBase::last()
{ {
if (!nElmts_) if (!nElmts_)
{ {
FatalErrorIn("SLListBase::last()") FatalErrorInFunction
<< "list is empty" << "list is empty"
<< abort(FatalError); << abort(FatalError);
} }
@ -120,7 +120,7 @@ Foam::SLListBase::last() const
{ {
if (!nElmts_) if (!nElmts_)
{ {
FatalErrorIn("SLListBase::last() const") FatalErrorInFunction
<< "list is empty" << "list is empty"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -178,7 +178,7 @@ inline void Foam::BiIndirectList<T>::operator=(const UList<T>& ae)
{ {
if (addressing_.size() != ae.size()) if (addressing_.size() != ae.size())
{ {
FatalErrorIn("BiIndirectList<T>::operator=(const UList<T>&)") FatalErrorInFunction
<< "Addressing and list of addressed elements " << "Addressing and list of addressed elements "
"have different sizes: " "have different sizes: "
<< addressing_.size() << " " << ae.size() << addressing_.size() << " " << ae.size()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -139,10 +139,8 @@ void Foam::CompactListList<T, Container>::setSize(const label nRows)
} }
else if (nRows > size()) else if (nRows > size())
{ {
FatalErrorIn FatalErrorInFunction
( << "Cannot be used to extend the list from " << offsets_.size()
"CompactListList<T, Container>::setSize(const label nRows)"
) << "Cannot be used to extend the list from " << offsets_.size()
<< " to " << nRows << nl << " to " << nRows << nl
<< " Please use one of the other setSize member functions" << " Please use one of the other setSize member functions"
<< abort(FatalError); << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -144,10 +144,8 @@ const
{ {
if (i < 0 || i >= m_.size()) if (i < 0 || i >= m_.size())
{ {
FatalErrorIn FatalErrorInFunction
( << "Index " << i << " outside 0.." << m_.size()
"CompactListList<T, Container>::whichRow(const label) const"
) << "Index " << i << " outside 0.." << m_.size()
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -565,11 +565,8 @@ void Foam::Distribution<Type>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &rhs) if (this == &rhs)
{ {
FatalErrorIn FatalErrorInFunction
( << "Attempted assignment to self"
"Foam::Distribution<Type>::operator="
"(const Foam::Distribution<Type>&)"
) << "Attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -328,11 +328,8 @@ Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::append
{ {
if (this == &lst) if (this == &lst)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted appending to self" << abort(FatalError);
"DynamicList<T, SizeInc, SizeMult, SizeDiv>::append"
"(const UList<T>&)"
) << "attempted appending to self" << abort(FatalError);
} }
label nextFree = List<T>::size(); label nextFree = List<T>::size();
@ -371,10 +368,8 @@ inline T Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::remove()
if (elemI < 0) if (elemI < 0)
{ {
FatalErrorIn FatalErrorInFunction
( << "List is empty" << abort(FatalError);
"Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::remove()"
) << "List is empty" << abort(FatalError);
} }
const T& val = List<T>::operator[](elemI); const T& val = List<T>::operator[](elemI);
@ -420,11 +415,8 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
{ {
if (this == &lst) if (this == &lst)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self" << abort(FatalError);
"DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator="
"(const DynamicList<T, SizeInc, SizeMult, SizeDiv>&)"
) << "attempted assignment to self" << abort(FatalError);
} }
if (capacity_ >= lst.size()) if (capacity_ >= lst.size())

View File

@ -131,7 +131,7 @@ inline void Foam::FixedList<T, Size>::checkStart(const label start) const
{ {
if (start < 0 || (start && unsigned(start) >= Size)) if (start < 0 || (start && unsigned(start) >= Size))
{ {
FatalErrorIn("FixedList<T, Size>::checkStart(const label)") FatalErrorInFunction
<< "start " << start << " out of range 0 ... " << (Size-1) << "start " << start << " out of range 0 ... " << (Size-1)
<< abort(FatalError); << abort(FatalError);
} }
@ -144,7 +144,7 @@ inline void Foam::FixedList<T, Size>::checkSize(const label size) const
{ {
if (size < 0 || unsigned(size) > Size) if (size < 0 || unsigned(size) > Size)
{ {
FatalErrorIn("FixedList<T, Size>::checkSize(const label)") FatalErrorInFunction
<< "size " << size << " out of range 0 ... " << (Size) << "size " << size << " out of range 0 ... " << (Size)
<< abort(FatalError); << abort(FatalError);
} }
@ -158,7 +158,7 @@ inline void Foam::FixedList<T, Size>::checkIndex(const label i) const
{ {
if (i < 0 || unsigned(i) >= Size) if (i < 0 || unsigned(i) >= Size)
{ {
FatalErrorIn("FixedList<T, Size>::checkIndex(const label)") FatalErrorInFunction
<< "index " << i << " out of range 0 ... " << (Size-1) << "index " << i << " out of range 0 ... " << (Size-1)
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,7 +34,7 @@ void Foam::Histogram<List>::count(const List& bins, const List& l)
{ {
if (bins.size() < 2) if (bins.size() < 2)
{ {
FatalErrorIn("Histogram<List>::count(const List&, const List&)") FatalErrorInFunction
<< "Should have at least two values in bins. Now:" << bins << "Should have at least two values in bins. Now:" << bins
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -46,7 +46,7 @@ Foam::List<T>::List(const label s)
{ {
if (this->size_ < 0) if (this->size_ < 0)
{ {
FatalErrorIn("List<T>::List(const label size)") FatalErrorInFunction
<< "bad size " << this->size_ << "bad size " << this->size_
<< abort(FatalError); << abort(FatalError);
} }
@ -66,7 +66,7 @@ Foam::List<T>::List(const label s, const T& a)
{ {
if (this->size_ < 0) if (this->size_ < 0)
{ {
FatalErrorIn("List<T>::List(const label size, const T&)") FatalErrorInFunction
<< "bad size " << this->size_ << "bad size " << this->size_
<< abort(FatalError); << abort(FatalError);
} }
@ -319,7 +319,7 @@ void Foam::List<T>::setSize(const label newSize)
{ {
if (newSize < 0) if (newSize < 0)
{ {
FatalErrorIn("List<T>::setSize(const label)") FatalErrorInFunction
<< "bad set size " << newSize << "bad set size " << newSize
<< abort(FatalError); << abort(FatalError);
} }
@ -462,7 +462,7 @@ void Foam::List<T>::operator=(const List<T>& a)
{ {
if (this == &a) if (this == &a)
{ {
FatalErrorIn("List<T>::operator=(const List<T>&)") FatalErrorInFunction
<< "attempted assignment to self" << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -105,10 +105,8 @@ inline void Foam::List<T>::append(const UList<T>& lst)
{ {
if (this == &lst) if (this == &lst)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted appending to self" << abort(FatalError);
"List<T>::append(const UList<T>&)"
) << "attempted appending to self" << abort(FatalError);
} }
label nextFree = this->size(); label nextFree = this->size();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -49,7 +49,7 @@ Foam::labelList Foam::invert
{ {
if (inverse[newPos] >= 0) if (inverse[newPos] >= 0)
{ {
FatalErrorIn("invert(const label, const labelUList&)") FatalErrorInFunction
<< "Map is not one-to-one. At index " << i << "Map is not one-to-one. At index " << i
<< " element " << newPos << " has already occurred before" << " element " << newPos << " has already occurred before"
<< nl << "Please use invertOneToMany instead" << nl << "Please use invertOneToMany instead"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -296,7 +296,7 @@ ListType Foam::subset
// select must at least cover the list range // select must at least cover the list range
if (select.size() < lst.size()) if (select.size() < lst.size())
{ {
FatalErrorIn("subset(const UList<T>&, const T&, const ListType&)") FatalErrorInFunction
<< "select is of size " << select.size() << "select is of size " << select.size()
<< "; but it must index a list of size " << lst.size() << "; but it must index a list of size " << lst.size()
<< abort(FatalError); << abort(FatalError);
@ -332,7 +332,7 @@ void Foam::inplaceSubset
// select must at least cover the list range // select must at least cover the list range
if (select.size() < lst.size()) if (select.size() < lst.size())
{ {
FatalErrorIn("inplaceSubset(const UList<T>&, const T&, ListType&)") FatalErrorInFunction
<< "select is of size " << select.size() << "select is of size " << select.size()
<< "; but it must index a list of size " << lst.size() << "; but it must index a list of size " << lst.size()
<< abort(FatalError); << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -107,11 +107,7 @@ inline unsigned int Foam::PackedList<nBits>::readValue(Istream& is)
if (val > max_value()) if (val > max_value())
{ {
FatalIOErrorIn FatalIOErrorInFunction(is)
(
"PackedList<nBits>::readValue(Istream&)",
is
)
<< "Out-of-range value " << val << " for PackedList<" << nBits << "Out-of-range value " << val << " for PackedList<" << nBits
<< ">. Maximum permitted value is " << max_value() << "." << ">. Maximum permitted value is " << max_value() << "."
<< exit(FatalIOError); << exit(FatalIOError);
@ -133,11 +129,7 @@ inline void Foam::PackedList<nBits>::setPair(Istream& is)
if (val > max_value()) if (val > max_value())
{ {
FatalIOErrorIn FatalIOErrorInFunction(is)
(
"PackedList<nBits>::setPair(Istream&)",
is
)
<< "Out-of-range value " << val << " for PackedList<" << nBits << "Out-of-range value " << val << " for PackedList<" << nBits
<< "> at index " << ind << "> at index " << ind
<< ". Maximum permitted value is " << max_value() << "." << ". Maximum permitted value is " << max_value() << "."
@ -1053,10 +1045,8 @@ inline unsigned int Foam::PackedList<nBits>::remove()
{ {
if (!size_) if (!size_)
{ {
FatalErrorIn FatalErrorInFunction
( << "List is empty" << abort(FatalError);
"Foam::PackedList<nBits>::remove()"
) << "List is empty" << abort(FatalError);
} }
label elemI = size_ - 1; label elemI = size_ - 1;

View File

@ -143,7 +143,7 @@ void Foam::PtrList<T>::setSize(const label newSize)
{ {
if (newSize < 0) if (newSize < 0)
{ {
FatalErrorIn("PtrList<T>::setSize(const label)") FatalErrorInFunction
<< "bad set size " << newSize << "bad set size " << newSize
<< " for type " << typeid(T).name() << " for type " << typeid(T).name()
<< abort(FatalError); << abort(FatalError);
@ -209,7 +209,7 @@ void Foam::PtrList<T>::reorder(const labelUList& oldToNew)
{ {
if (oldToNew.size() != size()) if (oldToNew.size() != size())
{ {
FatalErrorIn("PtrList<T>::reorder(const labelUList&)") FatalErrorInFunction
<< "Size of map (" << oldToNew.size() << "Size of map (" << oldToNew.size()
<< ") not equal to list size (" << size() << ") not equal to list size (" << size()
<< ") for type " << typeid(T).name() << ") for type " << typeid(T).name()
@ -224,7 +224,7 @@ void Foam::PtrList<T>::reorder(const labelUList& oldToNew)
if (newI < 0 || newI >= size()) if (newI < 0 || newI >= size())
{ {
FatalErrorIn("PtrList<T>::reorder(const labelUList&)") FatalErrorInFunction
<< "Illegal index " << newI << nl << "Illegal index " << newI << nl
<< "Valid indices are 0.." << size()-1 << "Valid indices are 0.." << size()-1
<< " for type " << typeid(T).name() << " for type " << typeid(T).name()
@ -233,7 +233,7 @@ void Foam::PtrList<T>::reorder(const labelUList& oldToNew)
if (newPtrs_[newI]) if (newPtrs_[newI])
{ {
FatalErrorIn("PtrList<T>::reorder(const labelUList&)") FatalErrorInFunction
<< "reorder map is not unique; element " << newI << "reorder map is not unique; element " << newI
<< " already set for type " << typeid(T).name() << " already set for type " << typeid(T).name()
<< abort(FatalError); << abort(FatalError);
@ -245,7 +245,7 @@ void Foam::PtrList<T>::reorder(const labelUList& oldToNew)
{ {
if (!newPtrs_[i]) if (!newPtrs_[i])
{ {
FatalErrorIn("PtrList<T>::reorder(const labelUList&)") FatalErrorInFunction
<< "Element " << i << " not set after reordering with type " << "Element " << i << " not set after reordering with type "
<< typeid(T).name() << nl << abort(FatalError); << typeid(T).name() << nl << abort(FatalError);
} }
@ -262,7 +262,7 @@ Foam::PtrList<T>& Foam::PtrList<T>::operator=(const PtrList<T>& a)
{ {
if (this == &a) if (this == &a)
{ {
FatalErrorIn("PtrList<T>::operator=(const PtrList<T>&)") FatalErrorInFunction
<< "attempted assignment to self for type " << typeid(T).name() << "attempted assignment to self for type " << typeid(T).name()
<< abort(FatalError); << abort(FatalError);
} }
@ -285,7 +285,7 @@ Foam::PtrList<T>& Foam::PtrList<T>::operator=(const PtrList<T>& a)
} }
else else
{ {
FatalErrorIn("PtrList::operator=(const PtrList<T>&)") FatalErrorInFunction
<< "bad size: " << a.size() << "bad size: " << a.size()
<< " for type " << typeid(T).name() << " for type " << typeid(T).name()
<< abort(FatalError); << abort(FatalError);

View File

@ -155,7 +155,7 @@ inline const T& Foam::PtrList<T>::operator[](const label i) const
{ {
if (!ptrs_[i]) if (!ptrs_[i])
{ {
FatalErrorIn("PtrList::operator[] const") FatalErrorInFunction
<< "hanging pointer of type " << typeid(T).name() << "hanging pointer of type " << typeid(T).name()
<< " at index " << i << " at index " << i
<< " (size " << size() << " (size " << size()
@ -172,7 +172,7 @@ inline T& Foam::PtrList<T>::operator[](const label i)
{ {
if (!ptrs_[i]) if (!ptrs_[i])
{ {
FatalErrorIn("PtrList::operator[]") FatalErrorInFunction
<< "hanging pointer of type " << typeid(T).name() << "hanging pointer of type " << typeid(T).name()
<< " at index " << i << " at index " << i
<< " (size " << size() << " (size " << size()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -130,7 +130,7 @@ inline void Foam::UIndirectList<T>::operator=(const UList<T>& ae)
{ {
if (addressing_.size() != ae.size()) if (addressing_.size() != ae.size())
{ {
FatalErrorIn("UIndirectList<T>::operator=(const UList<T>&)") FatalErrorInFunction
<< "Addressing and list of addressed elements " << "Addressing and list of addressed elements "
"have different sizes: " "have different sizes: "
<< addressing_.size() << " " << ae.size() << addressing_.size() << " " << ae.size()
@ -149,7 +149,7 @@ inline void Foam::UIndirectList<T>::operator=(const UIndirectList<T>& ae)
{ {
if (addressing_.size() != ae.size()) if (addressing_.size() != ae.size())
{ {
FatalErrorIn("UIndirectList<T>::operator=(const UIndirectList<T>&)") FatalErrorInFunction
<< "Addressing and list of addressed elements " << "Addressing and list of addressed elements "
"have different sizes: " "have different sizes: "
<< addressing_.size() << " " << ae.size() << addressing_.size() << " " << ae.size()

View File

@ -38,7 +38,7 @@ void Foam::UList<T>::assign(const UList<T>& a)
{ {
if (a.size_ != this->size_) if (a.size_ != this->size_)
{ {
FatalErrorIn("UList<T>::assign(const UList<T>&)") FatalErrorInFunction
<< "ULists have different sizes: " << "ULists have different sizes: "
<< this->size_ << " " << a.size_ << this->size_ << " " << a.size_
<< abort(FatalError); << abort(FatalError);
@ -93,7 +93,7 @@ std::streamsize Foam::UList<T>::byteSize() const
{ {
if (!contiguous<T>()) if (!contiguous<T>())
{ {
FatalErrorIn("UList<T>::byteSize()") FatalErrorInFunction
<< "Cannot return the binary size of a list of " << "Cannot return the binary size of a list of "
"non-primitive elements" "non-primitive elements"
<< abort(FatalError); << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -74,7 +74,7 @@ inline void Foam::UList<T>::checkStart(const label start) const
{ {
if (start<0 || (start && start>=size_)) if (start<0 || (start && start>=size_))
{ {
FatalErrorIn("UList<T>::checkStart(const label)") FatalErrorInFunction
<< "start " << start << " out of range 0 ... " << max(size_-1, 0) << "start " << start << " out of range 0 ... " << max(size_-1, 0)
<< abort(FatalError); << abort(FatalError);
} }
@ -87,7 +87,7 @@ inline void Foam::UList<T>::checkSize(const label size) const
{ {
if (size<0 || size>size_) if (size<0 || size>size_)
{ {
FatalErrorIn("UList<T>::checkSize(const label)") FatalErrorInFunction
<< "size " << size << " out of range 0 ... " << size_ << "size " << size << " out of range 0 ... " << size_
<< abort(FatalError); << abort(FatalError);
} }
@ -100,13 +100,13 @@ inline void Foam::UList<T>::checkIndex(const label i) const
{ {
if (!size_) if (!size_)
{ {
FatalErrorIn("UList<T>::checkIndex(const label)") FatalErrorInFunction
<< "attempt to access element from zero sized list" << "attempt to access element from zero sized list"
<< abort(FatalError); << abort(FatalError);
} }
else if (i<0 || i>=size_) else if (i<0 || i>=size_)
{ {
FatalErrorIn("UList<T>::checkIndex(const label)") FatalErrorInFunction
<< "index " << i << " out of range 0 ... " << size_-1 << "index " << i << " out of range 0 ... " << size_-1
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -104,7 +104,7 @@ void Foam::UPtrList<T>::reorder(const labelUList& oldToNew)
{ {
if (oldToNew.size() != size()) if (oldToNew.size() != size())
{ {
FatalErrorIn("UPtrList<T>::reorder(const labelUList&)") FatalErrorInFunction
<< "Size of map (" << oldToNew.size() << "Size of map (" << oldToNew.size()
<< ") not equal to list size (" << size() << ") not equal to list size (" << size()
<< ")." << abort(FatalError); << ")." << abort(FatalError);
@ -118,7 +118,7 @@ void Foam::UPtrList<T>::reorder(const labelUList& oldToNew)
if (newI < 0 || newI >= size()) if (newI < 0 || newI >= size())
{ {
FatalErrorIn("UPtrList<T>::reorder(const labelUList&)") FatalErrorInFunction
<< "Illegal index " << newI << nl << "Illegal index " << newI << nl
<< "Valid indices are 0.." << size()-1 << "Valid indices are 0.." << size()-1
<< abort(FatalError); << abort(FatalError);
@ -126,7 +126,7 @@ void Foam::UPtrList<T>::reorder(const labelUList& oldToNew)
if (newPtrs_[newI]) if (newPtrs_[newI])
{ {
FatalErrorIn("UPtrList<T>::reorder(const labelUList&)") FatalErrorInFunction
<< "reorder map is not unique; element " << newI << "reorder map is not unique; element " << newI
<< " already set." << abort(FatalError); << " already set." << abort(FatalError);
} }
@ -137,7 +137,7 @@ void Foam::UPtrList<T>::reorder(const labelUList& oldToNew)
{ {
if (!newPtrs_[i]) if (!newPtrs_[i])
{ {
FatalErrorIn("UPtrList<T>::reorder(const labelUList&)") FatalErrorInFunction
<< "Element " << i << " not set after reordering." << nl << "Element " << i << " not set after reordering." << nl
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -106,7 +106,7 @@ inline const T& Foam::UPtrList<T>::operator[](const label i) const
{ {
if (!ptrs_[i]) if (!ptrs_[i])
{ {
FatalErrorIn("UPtrList::operator[] const") FatalErrorInFunction
<< "hanging pointer at index " << i << "hanging pointer at index " << i
<< " (size " << size() << " (size " << size()
<< "), cannot dereference" << "), cannot dereference"
@ -122,7 +122,7 @@ inline T& Foam::UPtrList<T>::operator[](const label i)
{ {
if (!ptrs_[i]) if (!ptrs_[i])
{ {
FatalErrorIn("UPtrList::operator[]") FatalErrorInFunction
<< "hanging pointer at index " << i << "hanging pointer at index " << i
<< " (size " << size() << " (size " << size()
<< "), cannot dereference" << "), cannot dereference"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,7 +43,7 @@ Foam::NamedEnum<Enum, nEnum>::NamedEnum()
goodNames[i] = names[i]; goodNames[i] = names[i];
} }
FatalErrorIn("NamedEnum<Enum, nEnum>::NamedEnum()") FatalErrorInFunction
<< "Illegal enumeration name at position " << enumI << endl << "Illegal enumeration name at position " << enumI << endl
<< "after entries " << goodNames << ".\n" << "after entries " << goodNames << ".\n"
<< "Possibly your NamedEnum<Enum, nEnum>::names array" << "Possibly your NamedEnum<Enum, nEnum>::names array"
@ -66,10 +66,8 @@ Enum Foam::NamedEnum<Enum, nEnum>::read(Istream& is) const
if (iter == HashTable<int>::end()) if (iter == HashTable<int>::end())
{ {
FatalIOErrorIn FatalIOErrorInFunction(is)
( << name << " is not in enumeration: "
"NamedEnum<Enum, nEnum>::read(Istream&) const", is
) << name << " is not in enumeration: "
<< sortedToc() << exit(FatalIOError); << sortedToc() << exit(FatalIOError);
} }

View File

@ -52,16 +52,8 @@ bool Foam::IOobject::fileNameComponents
// called with directory // called with directory
if (isDir(path)) if (isDir(path))
{ {
WarningIn WarningInFunction
( << " called with directory: " << path << endl;
"IOobject::fileNameComponents"
"("
"const fileName&, "
"fileName&, "
"fileName&, "
"word&"
")"
) << " called with directory: " << path << endl;
return false; return false;
} }
@ -105,16 +97,7 @@ bool Foam::IOobject::fileNameComponents
// Check for valid (and stripped) name, regardless of the debug level // Check for valid (and stripped) name, regardless of the debug level
if (name.empty() || string::stripInvalid<word>(name)) if (name.empty() || string::stripInvalid<word>(name))
{ {
WarningIn WarningInFunction
(
"IOobject::fileNameComponents"
"("
"const fileName&, "
"fileName&, "
"fileName&, "
"word&"
")"
)
<< "has invalid word for name: \"" << name << "has invalid word for name: \"" << name
<< "\"\nwhile processing path: " << path << endl; << "\"\nwhile processing path: " << path << endl;
@ -210,17 +193,7 @@ Foam::IOobject::IOobject
{ {
if (!fileNameComponents(path, instance_, local_, name_)) if (!fileNameComponents(path, instance_, local_, name_))
{ {
FatalErrorIn FatalErrorInFunction
(
"IOobject::IOobject"
"("
"const fileName&, "
"const objectRegistry&, "
"readOption, "
"writeOption, "
"bool"
")"
)
<< " invalid path specification" << " invalid path specification"
<< exit(FatalError); << exit(FatalError);
} }
@ -447,7 +420,7 @@ bool Foam::IOobject::headerOk()
{ {
if (objectRegistry::debug) if (objectRegistry::debug)
{ {
IOWarningIn("IOobject::headerOk()", (*isPtr)) IOWarningInFunction((*isPtr))
<< "failed to read header of file " << objectPath() << "failed to read header of file " << objectPath()
<< endl; << endl;
} }
@ -466,7 +439,7 @@ void Foam::IOobject::setBad(const string& s)
{ {
if (objState_ != GOOD) if (objState_ != GOOD)
{ {
FatalErrorIn("IOobject::setBad(const string&)") FatalErrorInFunction
<< "recurrent failure for object " << s << "recurrent failure for object " << s
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,7 +76,7 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const label s)
{ {
if (io.readOpt() != IOobject::NO_READ) if (io.readOpt() != IOobject::NO_READ)
{ {
FatalErrorIn("IOPtrList<T>::IOPtrList(const IOobject&, const label)") FatalErrorInFunction
<< "NO_READ must be set if specifying size" << nl << "NO_READ must be set if specifying size" << nl
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -138,7 +138,7 @@ std::istream& Foam::IFstream::stdStream()
{ {
if (!ifPtr_) if (!ifPtr_)
{ {
FatalErrorIn("IFstream::stdStream()") FatalErrorInFunction
<< "No stream allocated" << abort(FatalError); << "No stream allocated" << abort(FatalError);
} }
return *ifPtr_; return *ifPtr_;
@ -149,7 +149,7 @@ const std::istream& Foam::IFstream::stdStream() const
{ {
if (!ifPtr_) if (!ifPtr_)
{ {
FatalErrorIn("IFstream::stdStream() const") FatalErrorInFunction
<< "No stream allocated" << abort(FatalError); << "No stream allocated" << abort(FatalError);
} }
return *ifPtr_; return *ifPtr_;
@ -178,7 +178,7 @@ Foam::IFstream& Foam::IFstream::operator()() const
} }
else else
{ {
FatalIOErrorIn("IFstream::operator()", *this) FatalIOErrorInFunction(*this)
<< "file " << pathname_ << " does not exist" << "file " << pathname_ << " does not exist"
<< exit(FatalIOError); << exit(FatalIOError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -134,7 +134,7 @@ std::ostream& Foam::OFstream::stdStream()
{ {
if (!ofPtr_) if (!ofPtr_)
{ {
FatalErrorIn("OFstream::stdStream()") FatalErrorInFunction
<< "No stream allocated." << abort(FatalError); << "No stream allocated." << abort(FatalError);
} }
return *ofPtr_; return *ofPtr_;
@ -145,7 +145,7 @@ const std::ostream& Foam::OFstream::stdStream() const
{ {
if (!ofPtr_) if (!ofPtr_)
{ {
FatalErrorIn("OFstreamAllocator::stdStream() const") FatalErrorInFunction
<< "No stream allocated." << abort(FatalError); << "No stream allocated." << abort(FatalError);
} }
return *ofPtr_; return *ofPtr_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -66,7 +66,7 @@ Foam::PstreamBuffers::~PstreamBuffers()
{ {
if (recvBufPos_[procI] < recvBuf_[procI].size()) if (recvBufPos_[procI] < recvBuf_[procI].size())
{ {
FatalErrorIn("PstreamBuffers::~PstreamBuffers()") FatalErrorInFunction
<< "Message from processor " << procI << "Message from processor " << procI
<< " not fully consumed. messageSize:" << recvBuf_[procI].size() << " not fully consumed. messageSize:" << recvBuf_[procI].size()
<< " bytes of which only " << recvBufPos_[procI] << " bytes of which only " << recvBufPos_[procI]
@ -117,10 +117,8 @@ void Foam::PstreamBuffers::finishedSends(labelListList& sizes, const bool block)
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Obtaining sizes not supported in "
"PstreamBuffers::finishedSends(labelListList&, const bool)"
) << "Obtaining sizes not supported in "
<< UPstream::commsTypeNames[commsType_] << endl << UPstream::commsTypeNames[commsType_] << endl
<< " since transfers already in progress. Use non-blocking instead." << " since transfers already in progress. Use non-blocking instead."
<< exit(FatalError); << exit(FatalError);

View File

@ -317,7 +317,7 @@ Foam::Istream& Foam::UIPstream::read(char* data, std::streamsize count)
{ {
if (format() != BINARY) if (format() != BINARY)
{ {
FatalErrorIn("UIPstream::read(char*, std::streamsize)") FatalErrorInFunction
<< "stream format not binary" << "stream format not binary"
<< Foam::abort(FatalError); << Foam::abort(FatalError);
} }

View File

@ -144,7 +144,7 @@ Foam::UOPstream::~UOPstream()
) )
) )
{ {
FatalErrorIn("UOPstream::~UOPstream()") FatalErrorInFunction
<< "Failed sending outgoing message of size " << sendBuf_.size() << "Failed sending outgoing message of size " << sendBuf_.size()
<< " to processor " << toProcNo_ << " to processor " << toProcNo_
<< Foam::abort(FatalError); << Foam::abort(FatalError);
@ -290,7 +290,7 @@ Foam::Ostream& Foam::UOPstream::write(const char* data, std::streamsize count)
{ {
if (format() != BINARY) if (format() != BINARY)
{ {
FatalErrorIn("Ostream::write(const char*, std::streamsize)") FatalErrorInFunction
<< "stream format not binary" << "stream format not binary"
<< Foam::abort(FatalError); << Foam::abort(FatalError);
} }

View File

@ -65,7 +65,7 @@ void Foam::UPstream::setParRun(const label nProcs)
label comm = allocateCommunicator(-1, identity(nProcs), true); label comm = allocateCommunicator(-1, identity(nProcs), true);
if (comm != UPstream::worldComm) if (comm != UPstream::worldComm)
{ {
FatalErrorIn("UPstream::setParRun(const label)") FatalErrorInFunction
<< "problem : comm:" << comm << "problem : comm:" << comm
<< " UPstream::worldComm:" << UPstream::worldComm << " UPstream::worldComm:" << UPstream::worldComm
<< Foam::exit(FatalError); << Foam::exit(FatalError);
@ -269,11 +269,8 @@ Foam::label Foam::UPstream::allocateCommunicator
// Enforce incremental order (so index is rank in next communicator) // Enforce incremental order (so index is rank in next communicator)
if (i >= 1 && subRanks[i] <= subRanks[i-1]) if (i >= 1 && subRanks[i] <= subRanks[i-1])
{ {
FatalErrorIn FatalErrorInFunction
( << "subranks not sorted : " << subRanks
"UPstream::allocateCommunicator"
"(const label, const labelList&, const bool)"
) << "subranks not sorted : " << subRanks
<< " when allocating subcommunicator from parent " << " when allocating subcommunicator from parent "
<< parentIndex << parentIndex
<< Foam::abort(FatalError); << Foam::abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -83,7 +83,7 @@ Foam::UPstream::commsStruct::commsStruct
} }
if (notI != allNotBelow_.size()) if (notI != allNotBelow_.size())
{ {
FatalErrorIn("commsStruct") << "problem!" << Foam::abort(FatalError); FatalErrorInFunction << "problem!" << Foam::abort(FatalError);
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,18 +46,14 @@ void Foam::Pstream::exchange
{ {
if (!contiguous<T>()) if (!contiguous<T>())
{ {
FatalErrorIn FatalErrorInFunction
( << "Continuous data only." << sizeof(T) << Foam::abort(FatalError);
"Pstream::exchange(..)"
) << "Continuous data only." << sizeof(T) << Foam::abort(FatalError);
} }
if (sendBufs.size() != UPstream::nProcs(comm)) if (sendBufs.size() != UPstream::nProcs(comm))
{ {
FatalErrorIn FatalErrorInFunction
( << "Size of list:" << sendBufs.size()
"Pstream::exchange(..)"
) << "Size of list:" << sendBufs.size()
<< " does not equal the number of processors:" << " does not equal the number of processors:"
<< UPstream::nProcs(comm) << UPstream::nProcs(comm)
<< Foam::abort(FatalError); << Foam::abort(FatalError);
@ -123,7 +119,7 @@ void Foam::Pstream::exchange
) )
) )
{ {
FatalErrorIn("Pstream::exchange(..)") FatalErrorInFunction
<< "Cannot send outgoing message. " << "Cannot send outgoing message. "
<< "to:" << procI << " nBytes:" << "to:" << procI << " nBytes:"
<< label(sendBufs[procI].size()*sizeof(T)) << label(sendBufs[procI].size()*sizeof(T))

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -57,11 +57,8 @@ void Pstream::gatherList
{ {
if (Values.size() != UPstream::nProcs(comm)) if (Values.size() != UPstream::nProcs(comm))
{ {
FatalErrorIn FatalErrorInFunction
( << "Size of list:" << Values.size()
"UPstream::gatherList(const List<UPstream::commsStruct>&"
", List<T>)"
) << "Size of list:" << Values.size()
<< " does not equal the number of processors:" << " does not equal the number of processors:"
<< UPstream::nProcs(comm) << UPstream::nProcs(comm)
<< Foam::abort(FatalError); << Foam::abort(FatalError);
@ -216,11 +213,8 @@ void Pstream::scatterList
{ {
if (Values.size() != UPstream::nProcs(comm)) if (Values.size() != UPstream::nProcs(comm))
{ {
FatalErrorIn FatalErrorInFunction
( << "Size of list:" << Values.size()
"UPstream::scatterList(const List<UPstream::commsStruct>&"
", List<T>)"
) << "Size of list:" << Values.size()
<< " does not equal the number of processors:" << " does not equal the number of processors:"
<< UPstream::nProcs(comm) << UPstream::nProcs(comm)
<< Foam::abort(FatalError); << Foam::abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -134,24 +134,16 @@ Foam::word Foam::Time::findInstance
{ {
if (name.empty()) if (name.empty())
{ {
FatalErrorIn FatalErrorInFunction
( << "Cannot find directory "
"Time::findInstance"
"(const fileName&, const word&"
", const IOobject::readOption, const word&)"
) << "Cannot find directory "
<< dir << " in times " << timeName() << dir << " in times " << timeName()
<< " down to " << stopInstance << " down to " << stopInstance
<< exit(FatalError); << exit(FatalError);
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Cannot find file \"" << name << "\" in directory "
"Time::findInstance"
"(const fileName&, const word&"
", const IOobject::readOption, const word&)"
) << "Cannot find file \"" << name << "\" in directory "
<< dir << " in times " << timeName() << dir << " in times " << timeName()
<< " down to " << stopInstance << " down to " << stopInstance
<< exit(FatalError); << exit(FatalError);
@ -195,12 +187,8 @@ Foam::word Foam::Time::findInstance
if (rOpt == IOobject::MUST_READ || rOpt == IOobject::MUST_READ_IF_MODIFIED) if (rOpt == IOobject::MUST_READ || rOpt == IOobject::MUST_READ_IF_MODIFIED)
{ {
FatalErrorIn FatalErrorInFunction
( << "Cannot find file \"" << name << "\" in directory "
"Time::findInstance"
"(const fileName&, const word&"
", const IOobject::readOption, const word&)"
) << "Cannot find file \"" << name << "\" in directory "
<< dir << " in times " << timeName() << dir << " in times " << timeName()
<< " down to " << constant() << " down to " << constant()
<< exit(FatalError); << exit(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -64,7 +64,7 @@ void Foam::entry::operator=(const entry& e)
// check for assignment to self // check for assignment to self
if (this == &e) if (this == &e)
{ {
FatalErrorIn("entry::operator=(const entry&)") FatalErrorInFunction
<< "attempted assignment to self" << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -76,11 +76,8 @@ bool Foam::functionEntry::execute
if (mfIter == executedictionaryIstreamMemberFunctionTablePtr_->end()) if (mfIter == executedictionaryIstreamMemberFunctionTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown functionEntry '" << functionName
"functionEntry::execute"
"(const word& functionName, dictionary& parentDict, Istream&)"
) << "Unknown functionEntry '" << functionName
<< "' in " << is.name() << " near line " << is.lineNumber() << "' in " << is.name() << " near line " << is.lineNumber()
<< nl << nl << nl << nl
<< "Valid functionEntries are :" << endl << "Valid functionEntries are :" << endl
@ -122,11 +119,8 @@ bool Foam::functionEntry::execute
if (mfIter == executeprimitiveEntryIstreamMemberFunctionTablePtr_->end()) if (mfIter == executeprimitiveEntryIstreamMemberFunctionTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown functionEntry '" << functionName
"functionEntry::execute"
"(const word&, const dictionary&, primitiveEntry&, Istream&)"
) << "Unknown functionEntry '" << functionName
<< "' in " << is.name() << " near line " << is.lineNumber() << "' in " << is.name() << " near line " << is.lineNumber()
<< nl << nl << nl << nl
<< "Valid functionEntries are :" << endl << "Valid functionEntries are :" << endl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -88,10 +88,8 @@ bool Foam::primitiveEntry::expandVariable
if (envStr.empty()) if (envStr.empty())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"primitiveEntry::expandVariable"
"(const string&, const dictionary&",
dict dict
) << "Illegal dictionary entry or environment variable name " ) << "Illegal dictionary entry or environment variable name "
<< varName << endl << "Valid dictionary entries are " << varName << endl << "Valid dictionary entries are "
@ -188,7 +186,7 @@ Foam::ITstream& Foam::primitiveEntry::stream() const
const Foam::dictionary& Foam::primitiveEntry::dict() const const Foam::dictionary& Foam::primitiveEntry::dict() const
{ {
FatalErrorIn("const dictionary& primitiveEntry::dict() const") FatalErrorInFunction
<< "Attempt to return primitive entry " << info() << "Attempt to return primitive entry " << info()
<< " as a sub-dictionary" << " as a sub-dictionary"
<< abort(FatalError); << abort(FatalError);
@ -199,7 +197,7 @@ const Foam::dictionary& Foam::primitiveEntry::dict() const
Foam::dictionary& Foam::primitiveEntry::dict() Foam::dictionary& Foam::primitiveEntry::dict()
{ {
FatalErrorIn("const dictionary& primitiveEntry::dict()") FatalErrorInFunction
<< "Attempt to return primitive entry " << info() << "Attempt to return primitive entry " << info()
<< " as a sub-dictionary" << " as a sub-dictionary"
<< abort(FatalError); << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,11 +61,8 @@ void Foam::dynamicCode::checkSecurity
{ {
if (isAdministrator()) if (isAdministrator())
{ {
FatalIOErrorIn FatalIOErrorInFunction(dict)
( << "This code should not be executed by someone with administrator"
title,
dict
) << "This code should not be executed by someone with administrator"
<< " rights due to security reasons." << nl << " rights due to security reasons." << nl
<< "(it writes a shared library which then gets loaded " << "(it writes a shared library which then gets loaded "
<< "using dlopen)" << "using dlopen)"
@ -74,11 +71,8 @@ void Foam::dynamicCode::checkSecurity
if (!allowSystemOperations) if (!allowSystemOperations)
{ {
FatalIOErrorIn FatalIOErrorInFunction(dict)
( << "Loading a shared library using case-supplied code is not"
title,
dict
) << "Loading a shared library using case-supplied code is not"
<< " enabled by default" << nl << " enabled by default" << nl
<< "because of security issues. If you trust the code you can" << "because of security issues. If you trust the code you can"
<< " enable this" << nl << " enable this" << nl
@ -115,21 +109,15 @@ void Foam::dynamicCode::copyAndFilter
{ {
if (!is.good()) if (!is.good())
{ {
FatalErrorIn FatalErrorInFunction
( << "Failed opening for reading " << is.name()
"dynamicCode::copyAndFilter()"
" const"
) << "Failed opening for reading " << is.name()
<< exit(FatalError); << exit(FatalError);
} }
if (!os.good()) if (!os.good())
{ {
FatalErrorIn FatalErrorInFunction
( << "Failed writing " << os.name()
"dynamicCode::copyAndFilter()"
" const"
) << "Failed writing " << os.name()
<< exit(FatalError); << exit(FatalError);
} }
@ -226,11 +214,8 @@ bool Foam::dynamicCode::createMakeFiles() const
//Info<< "Writing to " << dstFile << endl; //Info<< "Writing to " << dstFile << endl;
if (!os.good()) if (!os.good())
{ {
FatalErrorIn FatalErrorInFunction
( << "Failed writing " << dstFile
"dynamicCode::createMakeFiles()"
" const"
) << "Failed writing " << dstFile
<< exit(FatalError); << exit(FatalError);
} }
@ -266,11 +251,8 @@ bool Foam::dynamicCode::createMakeOptions() const
//Info<< "Writing to " << dstFile << endl; //Info<< "Writing to " << dstFile << endl;
if (!os.good()) if (!os.good())
{ {
FatalErrorIn FatalErrorInFunction
( << "Failed writing " << dstFile
"dynamicCode::createMakeOptions()"
" const"
) << "Failed writing " << dstFile
<< exit(FatalError); << exit(FatalError);
} }
@ -432,10 +414,8 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
if (!badFiles.empty()) if (!badFiles.empty())
{ {
FatalErrorIn FatalErrorInFunction
( << "Could not find the code template(s): "
"dynamicCode::copyFilesContents(..)"
) << "Could not find the code template(s): "
<< badFiles << nl << badFiles << nl
<< "Under the $" << codeTemplateEnvName << "Under the $" << codeTemplateEnvName
<< " directory or via via the ~OpenFOAM/" << " directory or via via the ~OpenFOAM/"
@ -461,11 +441,8 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
//Info<< "Reading from " << is.name() << endl; //Info<< "Reading from " << is.name() << endl;
if (!is.good()) if (!is.good())
{ {
FatalErrorIn FatalErrorInFunction
( << "Failed opening " << srcFile
"dynamicCode::copyFilesContents(const fileName&)"
" const"
) << "Failed opening " << srcFile
<< exit(FatalError); << exit(FatalError);
} }
@ -473,11 +450,8 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
//Info<< "Writing to " << dstFile.name() << endl; //Info<< "Writing to " << dstFile.name() << endl;
if (!os.good()) if (!os.good())
{ {
FatalErrorIn FatalErrorInFunction
( << "Failed writing " << dstFile
"dynamicCode::copyFilesContents(const fileName&)"
" const"
) << "Failed writing " << dstFile
<< exit(FatalError); << exit(FatalError);
} }
@ -499,11 +473,8 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
//Info<< "Writing to " << createFiles_[fileI].first() << endl; //Info<< "Writing to " << createFiles_[fileI].first() << endl;
if (!os.good()) if (!os.good())
{ {
FatalErrorIn FatalErrorInFunction
( << "Failed writing " << dstFile
"dynamicCode::copyOrCreateFiles()"
" const"
) << "Failed writing " << dstFile
<< exit(FatalError); << exit(FatalError);
} }
os.writeQuoted(createFiles_[fileI].second(), false) << nl; os.writeQuoted(createFiles_[fileI].second(), false) << nl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,14 +91,14 @@ public:
//- Handle a general warning 'msg' //- Handle a general warning 'msg'
virtual void Warning(const StringClass& msg) virtual void Warning(const StringClass& msg)
{ {
WarningIn(name_) WarningInFunction
<< msg << endl; << msg << endl;
} }
//- Handle a general warning 'msg' //- Handle a general warning 'msg'
virtual void Warning(int line, int col, const StringClass& msg) virtual void Warning(int line, int col, const StringClass& msg)
{ {
WarningIn(name_) WarningInFunction
<<"line " << line << " col " << col << ": " <<"line " << line << " col " << col << ": "
<< msg << endl; << msg << endl;
} }
@ -106,7 +106,7 @@ public:
//- Handle general error 'msg' (eg, a semantic error) //- Handle general error 'msg' (eg, a semantic error)
virtual void Error(int line, int col, const StringClass& msg) virtual void Error(int line, int col, const StringClass& msg)
{ {
FatalErrorIn(name_) FatalErrorInFunction
<< "line " << line << " col " << col <<": " << msg << endl << "line " << line << " col " << col <<": " << msg << endl
<< exit(FatalError); << exit(FatalError);
} }
@ -114,7 +114,7 @@ public:
//- Handle general error 'msg' (eg, a semantic error) //- Handle general error 'msg' (eg, a semantic error)
virtual void Error(const StringClass& msg) virtual void Error(const StringClass& msg)
{ {
FatalErrorIn(name_) FatalErrorInFunction
<< msg << endl << msg << endl
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -217,7 +217,7 @@ Foam::messageStream::operator Foam::OSstream&()
if (errorCount_ >= maxErrors_) if (errorCount_ >= maxErrors_)
{ {
FatalErrorIn("messageStream::operator OSstream&()") FatalErrorInFunction
<< "Too many errors" << "Too many errors"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -230,19 +230,19 @@ extern messageStream Info;
//- Report an error message using Foam::SeriousError //- Report an error message using Foam::SeriousError
// for functionName in file __FILE__ at line __LINE__ // for functionName in file __FILE__ at line __LINE__
#define SeriousErrorIn(fn) \ #define SeriousErrorIn(functionName) \
::Foam::SeriousError((fn), __FILE__, __LINE__) ::Foam::SeriousError((functionName), __FILE__, __LINE__)
//- Report an error message using Foam::SeriousError //- Report an error message using Foam::SeriousError
// for FUNCTION_NAME in file __FILE__ at line __LINE__ // for FUNCTION_NAME in file __FILE__ at line __LINE__
#define SeriousErrorInFunction(fn) SeriousErrorIn(FUNCTION_NAME) #define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME)
//- Report an IO error message using Foam::SeriousError //- Report an IO error message using Foam::SeriousError
// for functionName in file __FILE__ at line __LINE__ // for functionName in file __FILE__ at line __LINE__
// for a particular IOstream // for a particular IOstream
#define SeriousIOErrorIn(fn, ios) \ #define SeriousIOErrorIn(functionName, ios) \
::Foam::SeriousError((fn), __FILE__, __LINE__, ios) ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)
//- Report an IO error message using Foam::SeriousError //- Report an IO error message using Foam::SeriousError
// for FUNCTION_NAME in file __FILE__ at line __LINE__ // for FUNCTION_NAME in file __FILE__ at line __LINE__
@ -252,8 +252,8 @@ extern messageStream Info;
//- Report a warning using Foam::Warning //- Report a warning using Foam::Warning
// for functionName in file __FILE__ at line __LINE__ // for functionName in file __FILE__ at line __LINE__
#define WarningIn(fn) \ #define WarningIn(functionName) \
::Foam::Warning((fn), __FILE__, __LINE__) ::Foam::Warning((functionName), __FILE__, __LINE__)
//- Report a warning using Foam::Warning //- Report a warning using Foam::Warning
// for FUNCTION_NAME in file __FILE__ at line __LINE__ // for FUNCTION_NAME in file __FILE__ at line __LINE__
@ -263,8 +263,8 @@ extern messageStream Info;
//- Report an IO warning using Foam::Warning //- Report an IO warning using Foam::Warning
// for functionName in file __FILE__ at line __LINE__ // for functionName in file __FILE__ at line __LINE__
// for a particular IOstream // for a particular IOstream
#define IOWarningIn(fn, ios) \ #define IOWarningIn(functionName, ios) \
::Foam::Warning((fn), __FILE__, __LINE__, (ios)) ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))
//- Report an IO warning using Foam::Warning //- Report an IO warning using Foam::Warning
// for FUNCTION_NAME in file __FILE__ at line __LINE__ // for FUNCTION_NAME in file __FILE__ at line __LINE__
@ -274,8 +274,8 @@ extern messageStream Info;
//- Report a information message using Foam::Info //- Report a information message using Foam::Info
// for functionName in file __FILE__ at line __LINE__ // for functionName in file __FILE__ at line __LINE__
#define InfoIn(fn) \ #define InfoIn(functionName) \
::Foam::Info((fn), __FILE__, __LINE__) ::Foam::Info((functionName), __FILE__, __LINE__)
//- Report a information message using Foam::Info //- Report a information message using Foam::Info
// for FUNCTION_NAME in file __FILE__ at line __LINE__ // for FUNCTION_NAME in file __FILE__ at line __LINE__
@ -285,8 +285,8 @@ extern messageStream Info;
//- Report an IO information message using Foam::Info //- Report an IO information message using Foam::Info
// for functionName in file __FILE__ at line __LINE__ // for functionName in file __FILE__ at line __LINE__
// for a particular IOstream // for a particular IOstream
#define IOInfoIn(fn, ios) \ #define IOInfoIn(functionName, ios) \
::Foam::Info((fn), __FILE__, __LINE__, (ios)) ::Foam::Info((functionName), __FILE__, __LINE__, (ios))
//- Report an IO information message using Foam::Info //- Report an IO information message using Foam::Info
// for FUNCTION_NAME in file __FILE__ at line __LINE__ // for FUNCTION_NAME in file __FILE__ at line __LINE__

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,11 +70,8 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
if (!dictionaryConstructorTablePtr_) if (!dictionaryConstructorTablePtr_)
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown function type "
"functionObject::New"
"(const word& name, const Time&, const dictionary&)"
) << "Unknown function type "
<< functionType << nl << nl << functionType << nl << nl
<< "Table of functionObjects is empty" << endl << "Table of functionObjects is empty" << endl
<< exit(FatalError); << exit(FatalError);
@ -85,11 +82,8 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown function type "
"functionObject::New"
"(const word& name, const Time&, const dictionary&)"
) << "Unknown function type "
<< functionType << nl << nl << functionType << nl << nl
<< "Valid functions are : " << nl << "Valid functions are : " << nl
<< dictionaryConstructorTablePtr_->sortedToc() << endl << dictionaryConstructorTablePtr_->sortedToc() << endl

View File

@ -240,21 +240,21 @@ Foam::OFstream& Foam::functionObjectFile::file()
{ {
if (!Pstream::master()) if (!Pstream::master())
{ {
FatalErrorIn("Foam::OFstream& Foam::functionObjectFile::file()") FatalErrorInFunction
<< "Request for file() can only be done by the master process" << "Request for file() can only be done by the master process"
<< abort(FatalError); << abort(FatalError);
} }
if (filePtrs_.size() != 1) if (filePtrs_.size() != 1)
{ {
WarningIn("Foam::Ostream& Foam::functionObjectFile::file()") WarningInFunction
<< "Requested single file, but multiple files are present" << "Requested single file, but multiple files are present"
<< endl; << endl;
} }
if (!filePtrs_.set(0)) if (!filePtrs_.set(0))
{ {
FatalErrorIn("Foam::OFstream& Foam::functionObjectFile::file()") FatalErrorInFunction
<< "File pointer at index " << 0 << " not allocated" << "File pointer at index " << 0 << " not allocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -267,7 +267,7 @@ Foam::PtrList<Foam::OFstream>& Foam::functionObjectFile::files()
{ {
if (!Pstream::master()) if (!Pstream::master())
{ {
FatalErrorIn("Foam::OFstream& Foam::functionObjectFile::files()") FatalErrorInFunction
<< "Request for files() can only be done by the master process" << "Request for files() can only be done by the master process"
<< abort(FatalError); << abort(FatalError);
} }
@ -280,17 +280,14 @@ Foam::OFstream& Foam::functionObjectFile::file(const label i)
{ {
if (!Pstream::master()) if (!Pstream::master())
{ {
FatalErrorIn FatalErrorInFunction
(
"Foam::OFstream& Foam::functionObjectFile::file(const label)"
)
<< "Request for file(i) can only be done by the master process" << "Request for file(i) can only be done by the master process"
<< abort(FatalError); << abort(FatalError);
} }
if (!filePtrs_.set(i)) if (!filePtrs_.set(i))
{ {
FatalErrorIn("Foam::OFstream& Foam::functionObjectFile::file()") FatalErrorInFunction
<< "File pointer at index " << i << " not allocated" << "File pointer at index " << i << " not allocated"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -204,7 +204,7 @@ bool Foam::outputFilterOutputControl::output()
default: default:
{ {
// this error should not actually be possible // this error should not actually be possible
FatalErrorIn("bool Foam::outputFilterOutputControl::output()") FatalErrorInFunction
<< "Undefined output control: " << "Undefined output control: "
<< outputControlNames_[outputControl_] << nl << outputControlNames_[outputControl_] << nl
<< abort(FatalError); << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -175,10 +175,8 @@ const Type& Foam::objectRegistry::lookupObject(const word& name) const
return *vpsiPtr_; return *vpsiPtr_;
} }
FatalErrorIn FatalErrorInFunction
( << nl
"objectRegistry::lookupObject<Type>(const word&) const"
) << nl
<< " lookup of " << name << " from objectRegistry " << " lookup of " << name << " from objectRegistry "
<< this->name() << this->name()
<< " successful\n but it is not a " << Type::typeName << " successful\n but it is not a " << Type::typeName
@ -192,10 +190,8 @@ const Type& Foam::objectRegistry::lookupObject(const word& name) const
return parent_.lookupObject<Type>(name); return parent_.lookupObject<Type>(name);
} }
FatalErrorIn FatalErrorInFunction
( << nl
"objectRegistry::lookupObject<Type>(const word&) const"
) << nl
<< " request for " << Type::typeName << " request for " << Type::typeName
<< " " << name << " from objectRegistry " << this->name() << " " << name << " from objectRegistry " << this->name()
<< " failed\n available objects of type " << Type::typeName << " failed\n available objects of type " << Type::typeName

View File

@ -261,7 +261,7 @@ bool Foam::regIOobject::checkIn()
{ {
if (watchIndex_ != -1) if (watchIndex_ != -1)
{ {
FatalErrorIn("regIOobject::checkIn()") FatalErrorInFunction
<< "Object " << objectPath() << "Object " << objectPath()
<< " already watched with index " << watchIndex_ << " already watched with index " << watchIndex_
<< abort(FatalError); << abort(FatalError);
@ -285,7 +285,7 @@ bool Foam::regIOobject::checkIn()
{ {
// for ease of finding where attempted duplicate check-in // for ease of finding where attempted duplicate check-in
// originated // originated
FatalErrorIn("regIOobject::checkIn()") FatalErrorInFunction
<< "failed to register object " << objectPath() << "failed to register object " << objectPath()
<< " the name already exists in the objectRegistry" << endl << " the name already exists in the objectRegistry" << endl
<< "Contents:" << db().sortedToc() << "Contents:" << db().sortedToc()
@ -293,7 +293,7 @@ bool Foam::regIOobject::checkIn()
} }
else else
{ {
WarningIn("regIOobject::checkIn()") WarningInFunction
<< "failed to register object " << objectPath() << "failed to register object " << objectPath()
<< " the name already exists in the objectRegistry" << " the name already exists in the objectRegistry"
<< endl; << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,7 +42,7 @@ inline Type& Foam::regIOobject::store(Type* tPtr)
{ {
if (!tPtr) if (!tPtr)
{ {
FatalErrorIn("Type& regIOobject::store(Type*)") FatalErrorInFunction
<< "object deallocated" << "object deallocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -60,10 +60,8 @@ inline Type& Foam::regIOobject::store(autoPtr<Type>& atPtr)
if (!tPtr) if (!tPtr)
{ {
FatalErrorIn FatalErrorInFunction
( << "object deallocated"
"Type& regIOobject::store(autoPtr<Type>&)"
) << "object deallocated"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,7 +43,7 @@ Foam::Istream& Foam::regIOobject::readStream()
if (readOpt() == NO_READ) if (readOpt() == NO_READ)
{ {
FatalErrorIn("regIOobject::readStream()") FatalErrorInFunction
<< "NO_READ specified for read-constructor of object " << name() << "NO_READ specified for read-constructor of object " << name()
<< " of class " << headerClassName() << " of class " << headerClassName()
<< abort(FatalError); << abort(FatalError);
@ -92,7 +92,7 @@ Foam::Istream& Foam::regIOobject::readStream()
} }
else if (!readHeader(*isPtr_)) else if (!readHeader(*isPtr_))
{ {
FatalIOErrorIn("regIOobject::readStream()", *isPtr_) FatalIOErrorInFunction(*isPtr_)
<< "problem while reading header for object " << name() << "problem while reading header for object " << name()
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -133,7 +133,7 @@ Foam::Istream& Foam::regIOobject::readStream(const word& expectName)
&& headerClassName() != "dictionary" && headerClassName() != "dictionary"
) )
{ {
FatalIOErrorIn("regIOobject::readStream(const word&)", *isPtr_) FatalIOErrorInFunction(*isPtr_)
<< "unexpected class name " << headerClassName() << "unexpected class name " << headerClassName()
<< " expected " << expectName << endl << " expected " << expectName << endl
<< " while reading object " << name() << " while reading object " << name()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -90,7 +90,7 @@ inline To& dynamicCast(From& r)
} }
catch (std::bad_cast) catch (std::bad_cast)
{ {
FatalErrorIn("dynamicCast<To>(From&)") FatalErrorInFunction
<< "Attempt to cast type " << typeid(r).name() << "Attempt to cast type " << typeid(r).name()
<< " to type " << typeid(To).name() << " to type " << typeid(To).name()
<< abort(FatalError); << abort(FatalError);
@ -111,7 +111,7 @@ inline To& refCast(From& r)
} }
catch (std::bad_cast) catch (std::bad_cast)
{ {
FatalErrorIn("refCast<To>(From&)") FatalErrorInFunction
<< "Attempt to cast type " << r.type() << "Attempt to cast type " << r.type()
<< " to type " << To::typeName << " to type " << To::typeName
<< abort(FatalError); << abort(FatalError);

View File

@ -168,7 +168,7 @@ bool Foam::dimensionSet::operator=(const dimensionSet& ds) const
{ {
if (dimensionSet::debug && *this != ds) if (dimensionSet::debug && *this != ds)
{ {
FatalErrorIn("dimensionSet::operator=(const dimensionSet&) const") FatalErrorInFunction
<< "Different dimensions for =" << endl << "Different dimensions for =" << endl
<< " dimensions : " << *this << " = " << ds << endl << " dimensions : " << *this << " = " << ds << endl
<< abort(FatalError); << abort(FatalError);
@ -182,7 +182,7 @@ bool Foam::dimensionSet::operator+=(const dimensionSet& ds) const
{ {
if (dimensionSet::debug && *this != ds) if (dimensionSet::debug && *this != ds)
{ {
FatalErrorIn("dimensionSet::operator+=(const dimensionSet&) const") FatalErrorInFunction
<< "Different dimensions for +=" << endl << "Different dimensions for +=" << endl
<< " dimensions : " << *this << " = " << ds << endl << " dimensions : " << *this << " = " << ds << endl
<< abort(FatalError); << abort(FatalError);
@ -196,7 +196,7 @@ bool Foam::dimensionSet::operator-=(const dimensionSet& ds) const
{ {
if (dimensionSet::debug && *this != ds) if (dimensionSet::debug && *this != ds)
{ {
FatalErrorIn("dimensionSet::operator-=(const dimensionSet&) const") FatalErrorInFunction
<< "Different dimensions for -=" << endl << "Different dimensions for -=" << endl
<< " dimensions : " << *this << " = " << ds << endl << " dimensions : " << *this << " = " << ds << endl
<< abort(FatalError); << abort(FatalError);
@ -228,7 +228,7 @@ Foam::dimensionSet Foam::max(const dimensionSet& ds1, const dimensionSet& ds2)
{ {
if (dimensionSet::debug && ds1 != ds2) if (dimensionSet::debug && ds1 != ds2)
{ {
FatalErrorIn("max(const dimensionSet&, const dimensionSet&)") FatalErrorInFunction
<< "Arguments of max have different dimensions" << endl << "Arguments of max have different dimensions" << endl
<< " dimensions : " << ds1 << " and " << ds2 << endl << " dimensions : " << ds1 << " and " << ds2 << endl
<< abort(FatalError); << abort(FatalError);
@ -242,7 +242,7 @@ Foam::dimensionSet Foam::min(const dimensionSet& ds1, const dimensionSet& ds2)
{ {
if (dimensionSet::debug && ds1 != ds2) if (dimensionSet::debug && ds1 != ds2)
{ {
FatalErrorIn("min(const dimensionSet&, const dimensionSet&)") FatalErrorInFunction
<< "Arguments of min have different dimensions" << endl << "Arguments of min have different dimensions" << endl
<< " dimensions : " << ds1 << " and " << ds2 << endl << " dimensions : " << ds1 << " and " << ds2 << endl
<< abort(FatalError); << abort(FatalError);
@ -297,7 +297,7 @@ Foam::dimensionSet Foam::pow
{ {
if (dimensionSet::debug && !dS.dimensions().dimensionless()) if (dimensionSet::debug && !dS.dimensions().dimensionless())
{ {
FatalErrorIn("pow(const dimensionSet&, const dimensionedScalar&)") FatalErrorInFunction
<< "Exponent of pow is not dimensionless" << "Exponent of pow is not dimensionless"
<< abort(FatalError); << abort(FatalError);
} }
@ -330,7 +330,7 @@ Foam::dimensionSet Foam::pow
&& !ds.dimensionless() && !ds.dimensionless()
) )
{ {
FatalErrorIn("pow(const dimensionedScalar&, const dimensionSet&)") FatalErrorInFunction
<< "Argument or exponent of pow not dimensionless" << endl << "Argument or exponent of pow not dimensionless" << endl
<< abort(FatalError); << abort(FatalError);
} }
@ -439,7 +439,7 @@ Foam::dimensionSet Foam::trans(const dimensionSet& ds)
{ {
if (dimensionSet::debug && !ds.dimensionless()) if (dimensionSet::debug && !ds.dimensionless())
{ {
FatalErrorIn("trans(const dimensionSet&)") FatalErrorInFunction
<< "Argument of trancendental function not dimensionless" << "Argument of trancendental function not dimensionless"
<< abort(FatalError); << abort(FatalError);
} }
@ -452,7 +452,7 @@ Foam::dimensionSet Foam::atan2(const dimensionSet& ds1, const dimensionSet& ds2)
{ {
if (dimensionSet::debug && ds1 != ds2) if (dimensionSet::debug && ds1 != ds2)
{ {
FatalErrorIn("atan2(const dimensionSet&, const dimensionSet&)") FatalErrorInFunction
<< "Arguments of atan2 have different dimensions" << endl << "Arguments of atan2 have different dimensions" << endl
<< " dimensions : " << ds1 << " and " << ds2 << endl << " dimensions : " << ds1 << " and " << ds2 << endl
<< abort(FatalError); << abort(FatalError);
@ -486,8 +486,7 @@ Foam::dimensionSet Foam::operator+
if (dimensionSet::debug && ds1 != ds2) if (dimensionSet::debug && ds1 != ds2)
{ {
FatalErrorIn FatalErrorInFunction
("operator+(const dimensionSet&, const dimensionSet&)")
<< "LHS and RHS of + have different dimensions" << endl << "LHS and RHS of + have different dimensions" << endl
<< " dimensions : " << ds1 << " + " << ds2 << endl << " dimensions : " << ds1 << " + " << ds2 << endl
<< abort(FatalError); << abort(FatalError);
@ -507,8 +506,7 @@ Foam::dimensionSet Foam::operator-
if (dimensionSet::debug && ds1 != ds2) if (dimensionSet::debug && ds1 != ds2)
{ {
FatalErrorIn FatalErrorInFunction
("operator-(const dimensionSet&, const dimensionSet&)")
<< "LHS and RHS of - have different dimensions" << endl << "LHS and RHS of - have different dimensions" << endl
<< " dimensions : " << ds1 << " - " << ds2 << endl << " dimensions : " << ds1 << " - " << ds2 << endl
<< abort(FatalError); << abort(FatalError);

View File

@ -236,7 +236,7 @@ dimensionedScalar func(const dimensionedScalar& ds) \
{ \ { \
if (!ds.dimensions().dimensionless()) \ if (!ds.dimensions().dimensionless()) \
{ \ { \
FatalErrorIn(#func "(const dimensionedScalar& ds)") \ FatalErrorInFunction \
<< "ds not dimensionless" \ << "ds not dimensionless" \
<< abort(FatalError); \ << abort(FatalError); \
} \ } \
@ -280,7 +280,7 @@ dimensionedScalar func(const int n, const dimensionedScalar& ds) \
{ \ { \
if (!ds.dimensions().dimensionless()) \ if (!ds.dimensions().dimensionless()) \
{ \ { \
FatalErrorIn(#func "(const int n, const dimensionedScalar& ds)") \ FatalErrorInFunction \
<< "ds not dimensionless" \ << "ds not dimensionless" \
<< abort(FatalError); \ << abort(FatalError); \
} \ } \

View File

@ -54,10 +54,8 @@ void Foam::dimensioned<Type>::initialize(Istream& is)
if (dims != dimensions_) if (dims != dimensions_)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"dimensioned<Type>::dimensioned"
"(const word&, const dimensionSet&, Istream&)",
is is
) << "The dimensions " << dims ) << "The dimensions " << dims
<< " provided do not match the required dimensions " << " provided do not match the required dimensions "
@ -537,7 +535,7 @@ Foam::dimensioned<Type> Foam::max
{ {
if (dt1.dimensions() != dt2.dimensions()) if (dt1.dimensions() != dt2.dimensions())
{ {
FatalErrorIn("max(const dimensioned<Type>&, const dimensioned<Type>&)") FatalErrorInFunction
<< "dimensions of arguments are not equal" << "dimensions of arguments are not equal"
<< abort(FatalError); << abort(FatalError);
} }
@ -560,7 +558,7 @@ Foam::dimensioned<Type> Foam::min
{ {
if (dt1.dimensions() != dt2.dimensions()) if (dt1.dimensions() != dt2.dimensions())
{ {
FatalErrorIn("min(const dimensioned<Type>&, const dimensioned<Type>&)") FatalErrorInFunction
<< "dimensions of arguments are not equal" << "dimensions of arguments are not equal"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -37,7 +37,7 @@ namespace Foam
#define checkField(df1, df2, op) \ #define checkField(df1, df2, op) \
if (&(df1).mesh() != &(df2).mesh()) \ if (&(df1).mesh() != &(df2).mesh()) \
{ \ { \
FatalErrorIn("checkField(df1, df2, op)") \ FatalErrorInFunction \
<< "different mesh for fields " \ << "different mesh for fields " \
<< (df1).name() << " and " << (df2).name() \ << (df1).name() << " and " << (df2).name() \
<< " during operatrion " << op \ << " during operatrion " << op \
@ -63,12 +63,8 @@ DimensionedField<Type, GeoMesh>::DimensionedField
{ {
if (field.size() && field.size() != GeoMesh::size(mesh)) if (field.size() && field.size() != GeoMesh::size(mesh))
{ {
FatalErrorIn FatalErrorInFunction
( << "size of field = " << field.size()
"DimensionedField<Type, GeoMesh>::DimensionedField"
"(const IOobject& io,const Mesh& mesh, "
"const dimensionSet& dims, const Field<Type>& field)"
) << "size of field = " << field.size()
<< " is not the same as the size of mesh = " << " is not the same as the size of mesh = "
<< GeoMesh::size(mesh) << GeoMesh::size(mesh)
<< abort(FatalError); << abort(FatalError);
@ -433,11 +429,8 @@ void DimensionedField<Type, GeoMesh>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &df) if (this == &df)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"DimensionedField<Type, GeoMesh>::operator="
"(const DimensionedField<Type, GeoMesh>&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }
@ -459,11 +452,8 @@ void DimensionedField<Type, GeoMesh>::operator=
// Check for assignment to self // Check for assignment to self
if (this == &df) if (this == &df)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"DimensionedField<Type, GeoMesh>::operator="
"(const tmp<DimensionedField<Type, GeoMesh> >&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -678,11 +678,8 @@ tmp<DimensionedField<scalar, GeoMesh> > func \
{ \ { \
if (!dsf.dimensions().dimensionless()) \ if (!dsf.dimensions().dimensionless()) \
{ \ { \
FatalErrorIn \ FatalErrorInFunction \
( \ << "dsf not dimensionless" \
#func"(const int n, " \
"const DimensionedField<scalar, GeoMesh>& dsf)" \
) << "dsf not dimensionless" \
<< abort(FatalError); \ << abort(FatalError); \
} \ } \
\ \
@ -717,11 +714,8 @@ tmp<DimensionedField<scalar, GeoMesh> > func \
\ \
if (!dsf.dimensions().dimensionless()) \ if (!dsf.dimensions().dimensionless()) \
{ \ { \
FatalErrorIn \ FatalErrorInFunction \
( \ << " : dsf not dimensionless" \
#func"(const int n, " \
"const tmp<DimensionedField<scalar, GeoMesh> >& dsf)" \
) << " : dsf not dimensionless" \
<< abort(FatalError); \ << abort(FatalError); \
} \ } \
\ \

View File

@ -45,11 +45,7 @@ void checkFields
{ {
if (f1.size() != f2.size()) if (f1.size() != f2.size())
{ {
FatalErrorIn FatalErrorInFunction
(
"checkFields(const FieldField<Field, Type1>&, "
"const FieldField<Field, Type2>&, const char* op)"
) << " incompatible fields"
<< " FieldField<" << pTraits<Type1>::typeName << " FieldField<" << pTraits<Type1>::typeName
<< "> f1(" << f1.size() << ')' << "> f1(" << f1.size() << ')'
<< " and FieldField<" << pTraits<Type2>::typeName << " and FieldField<" << pTraits<Type2>::typeName
@ -70,13 +66,7 @@ void checkFields
{ {
if (f1.size() != f2.size() || f1.size() != f3.size()) if (f1.size() != f2.size() || f1.size() != f3.size())
{ {
FatalErrorIn FatalErrorInFunction
(
"checkFields(const FieldField<Field, Type1>&, "
"const FieldField<Field, Type2>&, "
"const FieldField<Field, Type3>&, "
"const char* op)"
) << " incompatible fields"
<< " FieldField<" << pTraits<Type1>::typeName << " FieldField<" << pTraits<Type1>::typeName
<< "> f1(" << f1.size() << ')' << "> f1(" << f1.size() << ')'
<< ", FieldField<" <<pTraits<Type2>::typeName << ", FieldField<" <<pTraits<Type2>::typeName
@ -297,11 +287,8 @@ void FieldField<Field, Type>::operator=(const FieldField<Field, Type>& f)
{ {
if (this == &f) if (this == &f)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"FieldField<Field, Type>::"
"operator=(const FieldField<Field, Type>&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }
@ -317,10 +304,8 @@ void FieldField<Field, Type>::operator=(const tmp<FieldField>& tf)
{ {
if (this == &(tf())) if (this == &(tf()))
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"FieldField<Field, Type>::operator=(const tmp<FieldField>&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -339,11 +339,8 @@ Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::append
{ {
if (this == &lst) if (this == &lst)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted appending to self" << abort(FatalError);
"DynamicField<T, SizeInc, SizeMult, SizeDiv>::append"
"(const UList<T>&)"
) << "attempted appending to self" << abort(FatalError);
} }
label nextFree = List<T>::size(); label nextFree = List<T>::size();
@ -364,10 +361,8 @@ inline T Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::remove()
if (elemI < 0) if (elemI < 0)
{ {
FatalErrorIn FatalErrorInFunction
( << "List is empty" << abort(FatalError);
"Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::remove()"
) << "List is empty" << abort(FatalError);
} }
const T& val = List<T>::operator[](elemI); const T& val = List<T>::operator[](elemI);
@ -413,11 +408,8 @@ inline void Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::operator=
{ {
if (this == &lst) if (this == &lst)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self" << abort(FatalError);
"DynamicField<T, SizeInc, SizeMult, SizeDiv>::operator="
"(const DynamicField<T, SizeInc, SizeMult, SizeDiv>&)"
) << "attempted assignment to self" << abort(FatalError);
} }
if (capacity_ >= lst.size()) if (capacity_ >= lst.size())

View File

@ -275,10 +275,8 @@ Foam::Field<Type>::Field
is >> static_cast<List<Type>&>(*this); is >> static_cast<List<Type>&>(*this);
if (this->size() != s) if (this->size() != s)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"Field<Type>::Field"
"(const word& keyword, const dictionary&, const label)",
dict dict
) << "size " << this->size() ) << "size " << this->size()
<< " is not equal to the given value of " << s << " is not equal to the given value of " << s
@ -287,10 +285,8 @@ Foam::Field<Type>::Field
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"Field<Type>::Field"
"(const word& keyword, const dictionary&, const label)",
dict dict
) << "expected keyword 'uniform' or 'nonuniform', found " ) << "expected keyword 'uniform' or 'nonuniform', found "
<< firstToken.wordToken() << firstToken.wordToken()
@ -301,10 +297,8 @@ Foam::Field<Type>::Field
{ {
if (is.version() == 2.0) if (is.version() == 2.0)
{ {
IOWarningIn IOWarningInFunction
( (
"Field<Type>::Field"
"(const word& keyword, const dictionary&, const label)",
dict dict
) << "expected keyword 'uniform' or 'nonuniform', " ) << "expected keyword 'uniform' or 'nonuniform', "
"assuming deprecated Field format from " "assuming deprecated Field format from "
@ -317,10 +311,8 @@ Foam::Field<Type>::Field
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"Field<Type>::Field"
"(const word& keyword, const dictionary&, const label)",
dict dict
) << "expected keyword 'uniform' or 'nonuniform', found " ) << "expected keyword 'uniform' or 'nonuniform', found "
<< firstToken.info() << firstToken.info()
@ -398,15 +390,7 @@ void Foam::Field<Type>::map
if (mapWeights.size() != mapAddressing.size()) if (mapWeights.size() != mapAddressing.size())
{ {
FatalErrorIn FatalErrorInFunction
(
"void Field<Type>::map\n"
"(\n"
" const UList<Type>& mapF,\n"
" const labelListList& mapAddressing,\n"
" const scalarListList& mapWeights\n"
")"
) << "Weights and addressing map have different sizes. Weights size: "
<< mapWeights.size() << " map size: " << mapAddressing.size() << mapWeights.size() << " map size: " << mapAddressing.size()
<< abort(FatalError); << abort(FatalError);
} }
@ -673,7 +657,7 @@ void Foam::Field<Type>::operator=(const Field<Type>& rhs)
{ {
if (this == &rhs) if (this == &rhs)
{ {
FatalErrorIn("Field<Type>::operator=(const Field<Type>&)") FatalErrorInFunction
<< "attempted assignment to self" << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }
@ -701,7 +685,7 @@ void Foam::Field<Type>::operator=(const tmp<Field>& rhs)
{ {
if (this == &(rhs())) if (this == &(rhs()))
{ {
FatalErrorIn("Field<Type>::operator=(const tmp<Field>&)") FatalErrorInFunction
<< "attempted assignment to self" << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,11 +53,7 @@ void checkFields
{ {
if (f1.size() != f2.size()) if (f1.size() != f2.size())
{ {
FatalErrorIn FatalErrorInFunction
(
"checkFields(const UList<Type1>&, "
"const UList<Type2>&, const char*)"
) << " incompatible fields"
<< " Field<"<<pTraits<Type1>::typeName<<"> f1("<<f1.size()<<')' << " Field<"<<pTraits<Type1>::typeName<<"> f1("<<f1.size()<<')'
<< " and Field<"<<pTraits<Type2>::typeName<<"> f2("<<f2.size()<<')' << " and Field<"<<pTraits<Type2>::typeName<<"> f2("<<f2.size()<<')'
<< endl << " for operation " << op << endl << " for operation " << op
@ -76,12 +72,7 @@ void checkFields
{ {
if (f1.size() != f2.size() || f1.size() != f3.size()) if (f1.size() != f2.size() || f1.size() != f3.size())
{ {
FatalErrorIn FatalErrorInFunction
(
"checkFields(const UList<Type1>&, "
"const UList<Type2>&, const UList<Type3>&, "
"const char*)"
) << " incompatible fields"
<< " Field<"<<pTraits<Type1>::typeName<<"> f1("<<f1.size()<<')' << " Field<"<<pTraits<Type1>::typeName<<"> f1("<<f1.size()<<')'
<< ", Field<"<<pTraits<Type2>::typeName<<"> f2("<<f2.size()<<')' << ", Field<"<<pTraits<Type2>::typeName<<"> f2("<<f2.size()<<')'
<< " and Field<"<<pTraits<Type3>::typeName<<"> f3("<<f3.size()<<')' << " and Field<"<<pTraits<Type3>::typeName<<"> f3("<<f3.size()<<')'

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,7 @@ public:
virtual const labelUList& directAddressing() const virtual const labelUList& directAddressing() const
{ {
FatalErrorIn("FieldMapper::directAddressing() const") FatalErrorInFunction
<< "attempt to access null direct addressing" << "attempt to access null direct addressing"
<< abort(FatalError); << abort(FatalError);
@ -79,7 +79,7 @@ public:
virtual const labelListList& addressing() const virtual const labelListList& addressing() const
{ {
FatalErrorIn("FieldMapper::addressing() const") FatalErrorInFunction
<< "attempt to access null interpolation addressing" << "attempt to access null interpolation addressing"
<< abort(FatalError); << abort(FatalError);
@ -88,7 +88,7 @@ public:
virtual const scalarListList& weights() const virtual const scalarListList& weights() const
{ {
FatalErrorIn("FieldMapper::weights() const") FatalErrorInFunction
<< "attempt to access null interpolation weights" << "attempt to access null interpolation weights"
<< abort(FatalError); << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -74,10 +74,8 @@ void Foam::transformList(const tensorField& rotTensor, UList<T>& field)
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Sizes of field and transformation not equal. field:"
"transformList(const tensorField&, UList<T>&)"
) << "Sizes of field and transformation not equal. field:"
<< field.size() << " transformation:" << rotTensor.size() << field.size() << " transformation:" << rotTensor.size()
<< abort(FatalError); << abort(FatalError);
} }
@ -106,10 +104,8 @@ void Foam::transformList(const tensorField& rotTensor, Map<T>& field)
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Multiple transformation tensors not supported. field:"
"transformList(const tensorField&, Map<T>&)"
) << "Multiple transformation tensors not supported. field:"
<< field.size() << " transformation:" << rotTensor.size() << field.size() << " transformation:" << rotTensor.size()
<< abort(FatalError); << abort(FatalError);
} }
@ -138,10 +134,8 @@ void Foam::transformList(const tensorField& rotTensor, EdgeMap<T>& field)
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Multiple transformation tensors not supported. field:"
"transformList(const tensorField&, EdgeMap<T>&)"
) << "Multiple transformation tensors not supported. field:"
<< field.size() << " transformation:" << rotTensor.size() << field.size() << " transformation:" << rotTensor.size()
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -180,14 +180,8 @@ readField
{ {
if (bmesh_[patchi].type() == cyclicPolyPatch::typeName) if (bmesh_[patchi].type() == cyclicPolyPatch::typeName)
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::readField"
"("
"const DimensionedField<Type, GeoMesh>&, "
"const dictionary&"
")",
dict dict
) << "Cannot find patchField entry for cyclic " ) << "Cannot find patchField entry for cyclic "
<< bmesh_[patchi].name() << endl << bmesh_[patchi].name() << endl
@ -197,14 +191,8 @@ readField
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::readField"
"("
"const DimensionedField<Type, GeoMesh>&, "
"const dictionary&"
")",
dict dict
) << "Cannot find patchField entry for " ) << "Cannot find patchField entry for "
<< bmesh_[patchi].name() << exit(FatalIOError); << bmesh_[patchi].name() << exit(FatalIOError);
@ -298,18 +286,8 @@ GeometricBoundaryField
|| (constraintTypes.size() && (constraintTypes.size() != this->size())) || (constraintTypes.size() && (constraintTypes.size() != this->size()))
) )
{ {
FatalErrorIn FatalErrorInFunction
( << "Incorrect number of patch type specifications given" << nl
"GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::"
"GeometricBoundaryField"
"("
"const BoundaryMesh&, "
"const DimensionedField<Type>&, "
"const wordList&, "
"const wordList&"
")"
) << "Incorrect number of patch type specifications given" << nl
<< " Number of patches in mesh = " << bmesh.size() << " Number of patches in mesh = " << bmesh.size()
<< " number of patch type specifications = " << " number of patch type specifications = "
<< patchFieldTypes.size() << patchFieldTypes.size()
@ -542,7 +520,7 @@ evaluate()
} }
else else
{ {
FatalErrorIn("GeometricBoundaryField::evaluate()") FatalErrorInFunction
<< "Unsuported communications type " << "Unsuported communications type "
<< Pstream::commsTypeNames[Pstream::defaultCommsType] << Pstream::commsTypeNames[Pstream::defaultCommsType]
<< exit(FatalError); << exit(FatalError);

View File

@ -34,7 +34,7 @@ License
#define checkField(gf1, gf2, op) \ #define checkField(gf1, gf2, op) \
if ((gf1).mesh() != (gf2).mesh()) \ if ((gf1).mesh() != (gf2).mesh()) \
{ \ { \
FatalErrorIn("checkField(gf1, gf2, op)") \ FatalErrorInFunction \
<< "different mesh for fields " \ << "different mesh for fields " \
<< (gf1).name() << " and " << (gf2).name() \ << (gf1).name() << " and " << (gf2).name() \
<< " during operatrion " << op \ << " during operatrion " << op \
@ -114,12 +114,8 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
// Check compatibility between field and mesh // Check compatibility between field and mesh
if (this->size() != GeoMesh::size(this->mesh())) if (this->size() != GeoMesh::size(this->mesh()))
{ {
FatalIOErrorIn FatalIOErrorInFunction(this->readStream(typeName))
( << " number of field elements = " << this->size()
"GeometricField<Type, PatchField, GeoMesh>::"
"readIfPresent()",
this->readStream(typeName)
) << " number of field elements = " << this->size()
<< " number of mesh elements = " << " number of mesh elements = "
<< GeoMesh::size(this->mesh()) << GeoMesh::size(this->mesh())
<< exit(FatalIOError); << exit(FatalIOError);
@ -334,12 +330,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
if (this->size() != GeoMesh::size(this->mesh())) if (this->size() != GeoMesh::size(this->mesh()))
{ {
FatalIOErrorIn FatalIOErrorInFunction(this->readStream(typeName))
( << " number of field elements = " << this->size()
"GeometricField<Type, PatchField, GeoMesh>::GeometricField"
"(const IOobject&, const Mesh&)",
this->readStream(typeName)
) << " number of field elements = " << this->size()
<< " number of mesh elements = " << GeoMesh::size(this->mesh()) << " number of mesh elements = " << GeoMesh::size(this->mesh())
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -375,11 +367,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
if (this->size() != GeoMesh::size(this->mesh())) if (this->size() != GeoMesh::size(this->mesh()))
{ {
FatalErrorIn FatalErrorInFunction
( << " number of field elements = " << this->size()
"GeometricField<Type, PatchField, GeoMesh>::GeometricField"
"(const IOobject&, const Mesh&, const dictionary&)"
) << " number of field elements = " << this->size()
<< " number of mesh elements = " << GeoMesh::size(this->mesh()) << " number of mesh elements = " << GeoMesh::size(this->mesh())
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -833,10 +822,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::prevIter() const
{ {
if (!fieldPrevIterPtr_) if (!fieldPrevIterPtr_)
{ {
FatalErrorIn FatalErrorInFunction
( << "previous iteration field" << endl << this->info() << endl
"GeometricField<Type, PatchField, GeoMesh>::prevIter() const"
) << "previous iteration field" << endl << this->info() << endl
<< " not stored." << " not stored."
<< " Use field.storePrevIter() at start of iteration." << " Use field.storePrevIter() at start of iteration."
<< abort(FatalError); << abort(FatalError);
@ -1092,11 +1079,8 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
{ {
if (this == &gf) if (this == &gf)
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"GeometricField<Type, PatchField, GeoMesh>::operator="
"(const GeometricField<Type, PatchField, GeoMesh>&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }
@ -1117,11 +1101,8 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
{ {
if (this == &(tgf())) if (this == &(tgf()))
{ {
FatalErrorIn FatalErrorInFunction
( << "attempted assignment to self"
"GeometricField<Type, PatchField, GeoMesh>::operator="
"(const tmp<GeometricField<Type, PatchField, GeoMesh> >&)"
) << "attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -814,11 +814,8 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > func \
{ \ { \
if (!gsf.dimensions().dimensionless()) \ if (!gsf.dimensions().dimensionless()) \
{ \ { \
FatalErrorIn \ FatalErrorInFunction \
( \ << "gsf not dimensionless" \
#func"(const int n, " \
"const GeometricField<scalar, PatchField, GeoMesh>& gsf)" \
) << "gsf not dimensionless" \
<< abort(FatalError); \ << abort(FatalError); \
} \ } \
\ \
@ -855,11 +852,8 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > func \
\ \
if (!gsf.dimensions().dimensionless()) \ if (!gsf.dimensions().dimensionless()) \
{ \ { \
FatalErrorIn \ FatalErrorInFunction \
( \ << " : gsf not dimensionless" \
#func"(const int n, " \
"const tmp<GeometricField<scalar, PatchField, GeoMesh> >& gsf)" \
) << " : gsf not dimensionless" \
<< abort(FatalError); \ << abort(FatalError); \
} \ } \
\ \

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,12 +62,8 @@ Foam::wordList Foam::ReadFields
if (iter == localNamesSet.end()) if (iter == localNamesSet.end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Fields not synchronised across processors." << endl
"ReadFields<class GeoField, class Mesh>"
"(const Mesh&, const IOobjectList&, PtrList<GeoField>&"
", const bool)"
) << "Fields not synchronised across processors." << endl
<< "Master has fields " << masterNames << "Master has fields " << masterNames
<< " processor " << Pstream::myProcNo() << " processor " << Pstream::myProcNo()
<< " has fields " << localNames << exit(FatalError); << " has fields " << localNames << exit(FatalError);
@ -80,12 +76,8 @@ Foam::wordList Foam::ReadFields
forAllConstIter(HashSet<word>, localNamesSet, iter) forAllConstIter(HashSet<word>, localNamesSet, iter)
{ {
FatalErrorIn FatalErrorInFunction
( << "Fields not synchronised across processors." << endl
"ReadFields<class GeoField, class Mesh>"
"(const Mesh&, const IOobjectList&, PtrList<GeoField>&"
", const bool)"
) << "Fields not synchronised across processors." << endl
<< "Master has fields " << masterNames << "Master has fields " << masterNames
<< " processor " << Pstream::myProcNo() << " processor " << Pstream::myProcNo()
<< " has fields " << localNames << exit(FatalError); << " has fields " << localNames << exit(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,10 +33,8 @@ void Foam::valuePointPatchField<Type>::checkFieldSize() const
{ {
if (this->size() != this->patch().size()) if (this->size() != this->patch().size())
{ {
FatalErrorIn FatalErrorInFunction
( << "field does not correspond to patch. " << endl
"void valuePointPatchField<Type>::checkField() const"
) << "field does not correspond to patch. " << endl
<< "Field size: " << size() << " patch size: " << "Field size: " << size() << " patch size: "
<< this->patch().size() << this->patch().size()
<< abort(FatalError); << abort(FatalError);
@ -83,15 +81,8 @@ Foam::valuePointPatchField<Type>::valuePointPatchField
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"pointPatchField<Type>::pointPatchField"
"("
"const fvPatch& p,"
"const DimensionedField<Type, pointMesh>& iF,"
"const dictionary& dict,"
"const bool valueRequired"
")",
dict dict
) << "Essential entry 'value' missing" ) << "Essential entry 'value' missing"
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,14 +55,8 @@ Foam::cyclicPointPatchField<Type>::cyclicPointPatchField
{ {
if (!isType<cyclicPointPatch>(p)) if (!isType<cyclicPointPatch>(p))
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"cyclicPointPatchField<Type>::cyclicPointPatchField\n"
"(\n"
" const pointPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict dict
) << "patch " << this->patch().index() << " not cyclic type. " ) << "patch " << this->patch().index() << " not cyclic type. "
<< "Patch type = " << p.type() << "Patch type = " << p.type()
@ -85,16 +79,8 @@ Foam::cyclicPointPatchField<Type>::cyclicPointPatchField
{ {
if (!isType<cyclicPointPatch>(this->patch())) if (!isType<cyclicPointPatch>(this->patch()))
{ {
FatalErrorIn FatalErrorInFunction
( << "Field type does not correspond to patch type for patch "
"cyclicPointPatchField<Type>::cyclicPointPatchField\n"
"(\n"
" const cyclicPointPatchField<Type>& ptf,\n"
" const pointPatch& p,\n"
" const DimensionedField<Type, pointMesh>& iF,\n"
" const pointPatchFieldMapper& mapper\n"
")\n"
) << "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl << this->patch().index() << "." << endl
<< "Field type: " << typeName << endl << "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type() << "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,14 +55,8 @@ emptyPointPatchField<Type>::emptyPointPatchField
{ {
if (!isType<emptyPointPatch>(p)) if (!isType<emptyPointPatch>(p))
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"emptyPointPatchField<Type>::emptyPointPatchField\n"
"(\n"
" const pointPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict dict
) << "patch " << this->patch().index() << " not empty type. " ) << "patch " << this->patch().index() << " not empty type. "
<< "Patch type = " << p.type() << "Patch type = " << p.type()
@ -84,16 +78,8 @@ emptyPointPatchField<Type>::emptyPointPatchField
{ {
if (!isType<emptyPointPatch>(this->patch())) if (!isType<emptyPointPatch>(this->patch()))
{ {
FatalErrorIn FatalErrorInFunction
( << "Field type does not correspond to patch type for patch "
"emptyPointPatchField<Type>::emptyPointPatchField\n"
"(\n"
" const emptyPointPatchField<Type>& ptf,\n"
" const pointPatch& p,\n"
" const DimensionedField<Type, pointMesh>& iF,\n"
" const pointPatchFieldMapper& mapper\n"
")\n"
) << "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl << this->patch().index() << "." << endl
<< "Field type: " << typeName << endl << "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type() << "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,14 +55,8 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
{ {
if (!isType<symmetryPointPatch>(p)) if (!isType<symmetryPointPatch>(p))
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"symmetryPointPatchField<Type>::symmetryPointPatchField\n"
"(\n"
" const pointPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict dict
) << "patch " << this->patch().index() << " not symmetry type. " ) << "patch " << this->patch().index() << " not symmetry type. "
<< "Patch type = " << p.type() << "Patch type = " << p.type()
@ -84,16 +78,8 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
{ {
if (!isType<symmetryPointPatch>(this->patch())) if (!isType<symmetryPointPatch>(this->patch()))
{ {
FatalErrorIn FatalErrorInFunction
( << "Field type does not correspond to patch type for patch "
"symmetryPointPatchField<Type>::symmetryPointPatchField\n"
"(\n"
" const symmetryPointPatchField<Type>& ptf,\n"
" const pointPatch& p,\n"
" const DimensionedField<Type, pointMesh>& iF,\n"
" const pointPatchFieldMapper& mapper\n"
")\n"
) << "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl << this->patch().index() << "." << endl
<< "Field type: " << typeName << endl << "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type() << "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -57,14 +57,8 @@ symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
{ {
if (!isType<symmetryPlanePointPatch>(p)) if (!isType<symmetryPlanePointPatch>(p))
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField\n"
"(\n"
" const pointPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict dict
) << "patch " << this->patch().index() << " not symmetry type. " ) << "patch " << this->patch().index() << " not symmetry type. "
<< "Patch type = " << p.type() << "Patch type = " << p.type()
@ -87,16 +81,8 @@ symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
{ {
if (!isType<symmetryPlanePointPatch>(this->patch())) if (!isType<symmetryPlanePointPatch>(this->patch()))
{ {
FatalErrorIn FatalErrorInFunction
( << "Field type does not correspond to patch type for patch "
"symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField\n"
"(\n"
" const symmetryPlanePointPatchField<Type>& ptf,\n"
" const pointPatch& p,\n"
" const DimensionedField<Type, pointMesh>& iF,\n"
" const pointPatchFieldMapper& mapper\n"
")\n"
) << "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl << this->patch().index() << "." << endl
<< "Field type: " << typeName << endl << "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type() << "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -52,14 +52,8 @@ Foam::wedgePointPatchField<Type>::wedgePointPatchField
{ {
if (!isType<wedgePointPatch>(p)) if (!isType<wedgePointPatch>(p))
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"wedgePointPatchField<Type>::wedgePointPatchField\n"
"(\n"
" const pointPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict dict
) << "patch " << this->patch().index() << " not wedge type. " ) << "patch " << this->patch().index() << " not wedge type. "
<< "Patch type = " << p.type() << "Patch type = " << p.type()
@ -81,16 +75,8 @@ Foam::wedgePointPatchField<Type>::wedgePointPatchField
{ {
if (!isType<wedgePointPatch>(this->patch())) if (!isType<wedgePointPatch>(this->patch()))
{ {
FatalErrorIn FatalErrorInFunction
( << "Field type does not correspond to patch type for patch "
"wedgePointPatchField<Type>::wedgePointPatchField\n"
"(\n"
" const wedgePointPatchField<Type>& ptf,\n"
" const pointPatch& p,\n"
" const DimensionedField<Type, pointMesh>& iF,\n"
" const pointPatchFieldMapper& mapper\n"
")\n"
) << "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl << this->patch().index() << "." << endl
<< "Field type: " << typeName << endl << "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type() << "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -146,12 +146,8 @@ tmp<Field<Type1> > pointPatchField<Type>::patchInternalField
// Check size // Check size
if (iF.size() != internalField().size()) if (iF.size() != internalField().size())
{ {
FatalErrorIn FatalErrorInFunction
( << "given internal field does not correspond to the mesh. "
"tmp<Field<Type1> > pointPatchField<"
"Type>::"
"patchInternalField(const Field<Type1>& iF) const"
) << "given internal field does not correspond to the mesh. "
<< "Field size: " << iF.size() << "Field size: " << iF.size()
<< " mesh size: " << internalField().size() << " mesh size: " << internalField().size()
<< abort(FatalError); << abort(FatalError);
@ -183,12 +179,8 @@ void pointPatchField<Type>::addToInternalField
// Check size // Check size
if (iF.size() != internalField().size()) if (iF.size() != internalField().size())
{ {
FatalErrorIn FatalErrorInFunction
( << "given internal field does not correspond to the mesh. "
"void pointPatchField<Type>::"
"addToInternalField("
"Field<Type1>& iF, const Field<Type1>& iF) const"
) << "given internal field does not correspond to the mesh. "
<< "Field size: " << iF.size() << "Field size: " << iF.size()
<< " mesh size: " << internalField().size() << " mesh size: " << internalField().size()
<< abort(FatalError); << abort(FatalError);
@ -196,12 +188,8 @@ void pointPatchField<Type>::addToInternalField
if (pF.size() != size()) if (pF.size() != size())
{ {
FatalErrorIn FatalErrorInFunction
( << "given patch field does not correspond to the mesh. "
"void pointPatchField<Type>::"
"addToInternalField("
"Field<Type1>& iF, const Field<Type1>& iF) const"
) << "given patch field does not correspond to the mesh. "
<< "Field size: " << pF.size() << "Field size: " << pF.size()
<< " mesh size: " << size() << " mesh size: " << size()
<< abort(FatalError); << abort(FatalError);
@ -229,12 +217,8 @@ void pointPatchField<Type>::addToInternalField
// Check size // Check size
if (iF.size() != internalField().size()) if (iF.size() != internalField().size())
{ {
FatalErrorIn FatalErrorInFunction
( << "given internal field does not correspond to the mesh. "
"void pointPatchField<Type>::"
"addToInternalField("
"Field<Type1>& iF, const Field<Type1>& iF, const labelList&) const"
) << "given internal field does not correspond to the mesh. "
<< "Field size: " << iF.size() << "Field size: " << iF.size()
<< " mesh size: " << internalField().size() << " mesh size: " << internalField().size()
<< abort(FatalError); << abort(FatalError);
@ -242,12 +226,8 @@ void pointPatchField<Type>::addToInternalField
if (pF.size() != size()) if (pF.size() != size())
{ {
FatalErrorIn FatalErrorInFunction
( << "given patch field does not correspond to the mesh. "
"void pointPatchField<Type>::"
"addToInternalField("
"Field<Type1>& iF, const Field<Type1>& iF, const labelList&) const"
) << "given patch field does not correspond to the mesh. "
<< "Field size: " << pF.size() << "Field size: " << pF.size()
<< " mesh size: " << size() << " mesh size: " << size()
<< abort(FatalError); << abort(FatalError);
@ -276,12 +256,8 @@ void pointPatchField<Type>::setInInternalField
// Check size // Check size
if (iF.size() != internalField().size()) if (iF.size() != internalField().size())
{ {
FatalErrorIn FatalErrorInFunction
( << "given internal field does not correspond to the mesh. "
"void pointPatchField<Type>::"
"setInInternalField("
"Field<Type1>& iF, const Field<Type1>& iF) const"
) << "given internal field does not correspond to the mesh. "
<< "Field size: " << iF.size() << "Field size: " << iF.size()
<< " mesh size: " << internalField().size() << " mesh size: " << internalField().size()
<< abort(FatalError); << abort(FatalError);
@ -289,12 +265,8 @@ void pointPatchField<Type>::setInInternalField
if (pF.size() != meshPoints.size()) if (pF.size() != meshPoints.size())
{ {
FatalErrorIn FatalErrorInFunction
( << "given patch field does not correspond to the meshPoints. "
"void pointPatchField<Type>::"
"setInInternalField("
"Field<Type1>& iF, const Field<Type1>& iF) const"
) << "given patch field does not correspond to the meshPoints. "
<< "Field size: " << pF.size() << "Field size: " << pF.size()
<< " meshPoints size: " << size() << " meshPoints size: " << size()
<< abort(FatalError); << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield |2011 OpenFOAM: The Open Source CFD Toolbox \\ / F ield |2011 OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -48,11 +48,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
if (cstrIter == pointPatchConstructorTablePtr_->end()) if (cstrIter == pointPatchConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown patchFieldType type "
"PointPatchField<Type>::New"
"(const word&, const word&, const pointPatch&, const Field<Type>&)"
) << "Unknown patchFieldType type "
<< patchFieldType << nl << nl << patchFieldType << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< pointPatchConstructorTablePtr_->sortedToc() << pointPatchConstructorTablePtr_->sortedToc()
@ -75,12 +72,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end()) if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "inconsistent patch and patchField types for \n"
"PointPatchField<Type>::New"
"(const word&, const word&"
", const pointPatch&, const Field<Type>&)"
) << "inconsistent patch and patchField types for \n"
<< " patch type " << p.type() << " patch type " << p.type()
<< " and patchField type " << patchFieldType << " and patchField type " << patchFieldType
<< exit(FatalError); << exit(FatalError);
@ -143,10 +136,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"PointPatchField<Type>::"
"New(const pointPatch&, const Field<Type>&, const dictionary&)",
dict dict
) << "Unknown patchField type " << patchFieldType ) << "Unknown patchField type " << patchFieldType
<< " for patch type " << p.type() << nl << nl << " for patch type " << p.type() << nl << nl
@ -178,10 +169,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
if (patchTypeCstrIter == dictionaryConstructorTablePtr_->end()) if (patchTypeCstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalIOErrorIn FatalIOErrorInFunction
( (
"PointPatchField<Type>const pointPatch&, "
"const Field<Type>&, const dictionary&)",
dict dict
) << "inconsistent patch and patchField types for \n" ) << "inconsistent patch and patchField types for \n"
<< " patch type " << p.type() << " patch type " << p.type()
@ -223,16 +212,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
if (cstrIter == patchMapperConstructorTablePtr_->end()) if (cstrIter == patchMapperConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown patchField type "
"PointPatchField<Type>::New"
"("
"const pointPatchField<Type>&, "
"const pointPatch&, "
"const DimensionedField<Type, pointMesh>&, "
"const pointPatchFieldMapper&"
")"
) << "Unknown patchField type "
<< ptf.type() << nl << nl << ptf.type() << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< patchMapperConstructorTablePtr_->sortedToc() << patchMapperConstructorTablePtr_->sortedToc()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,21 +59,21 @@ Foam::JobInfo::JobInfo()
if (baseDir.empty()) if (baseDir.empty())
{ {
FatalErrorIn("JobInfo::JobInfo()") FatalErrorInFunction
<< "Cannot get JobInfo directory $FOAM_JOB_DIR" << "Cannot get JobInfo directory $FOAM_JOB_DIR"
<< Foam::exit(FatalError); << Foam::exit(FatalError);
} }
if (!isDir(runningDir) && !mkDir(runningDir)) if (!isDir(runningDir) && !mkDir(runningDir))
{ {
FatalErrorIn("JobInfo::JobInfo()") FatalErrorInFunction
<< "Cannot make JobInfo directory " << runningDir << "Cannot make JobInfo directory " << runningDir
<< Foam::exit(FatalError); << Foam::exit(FatalError);
} }
if (!isDir(finishedDir) && !mkDir(finishedDir)) if (!isDir(finishedDir) && !mkDir(finishedDir))
{ {
FatalErrorIn("JobInfo::JobInfo()") FatalErrorInFunction
<< "Cannot make JobInfo directory " << finishedDir << "Cannot make JobInfo directory " << finishedDir
<< Foam::exit(FatalError); << Foam::exit(FatalError);
} }
@ -125,7 +125,7 @@ void Foam::JobInfo::write() const
{ {
if (!write(OFstream(runningJobPath_)())) if (!write(OFstream(runningJobPath_)()))
{ {
FatalErrorIn("JobInfo::write() const") FatalErrorInFunction
<< "Failed to write to JobInfo file " << "Failed to write to JobInfo file "
<< runningJobPath_ << runningJobPath_
<< Foam::exit(FatalError); << Foam::exit(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -138,7 +138,7 @@ const Foam::scalarField& Foam::graph::y() const
{ {
if (size() != 1) if (size() != 1)
{ {
FatalErrorIn("const scalarField& graph::y() const") FatalErrorInFunction
<< "y field requested for graph containing " << size() << "y field requested for graph containing " << size()
<< "ys" << exit(FatalError); << "ys" << exit(FatalError);
} }
@ -151,7 +151,7 @@ Foam::scalarField& Foam::graph::y()
{ {
if (size() != 1) if (size() != 1)
{ {
FatalErrorIn("scalarField& graph::y()") FatalErrorInFunction
<< "y field requested for graph containing " << size() << "y field requested for graph containing " << size()
<< "ys" << exit(FatalError); << "ys" << exit(FatalError);
} }
@ -167,10 +167,8 @@ Foam::autoPtr<Foam::graph::writer> Foam::graph::writer::New
{ {
if (!wordConstructorTablePtr_) if (!wordConstructorTablePtr_)
{ {
FatalErrorIn FatalErrorInFunction
( << "Graph writer table is empty"
"graph::writer::New(const word&)"
) << "Graph writer table is empty"
<< exit(FatalError); << exit(FatalError);
} }
@ -179,10 +177,8 @@ Foam::autoPtr<Foam::graph::writer> Foam::graph::writer::New
if (cstrIter == wordConstructorTablePtr_->end()) if (cstrIter == wordConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown graph format " << graphFormat
"graph::writer::New(const word&)"
) << "Unknown graph format " << graphFormat
<< endl << endl << endl << endl
<< "Valid graph formats are : " << endl << "Valid graph formats are : " << endl
<< wordConstructorTablePtr_->sortedToc() << wordConstructorTablePtr_->sortedToc()
@ -240,7 +236,7 @@ void Foam::graph::write(const fileName& pName, const word& format) const
} }
else else
{ {
WarningIn("graph::write(const word& format, const fileName& dir)") WarningInFunction
<< "Could not open graph file " << graphFile.name() << "Could not open graph file " << graphFile.name()
<< endl; << endl;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,10 +39,8 @@ void Foam::interpolation2DTable<Type>::readTable()
if (this->empty()) if (this->empty())
{ {
FatalErrorIn FatalErrorInFunction
( << "table read from " << fName << " is empty" << nl
"Foam::interpolation2DTable<Type>::readTable()"
) << "table read from " << fName << " is empty" << nl
<< exit(FatalError); << exit(FatalError);
} }
@ -136,28 +134,16 @@ Type Foam::interpolation2DTable<Type>::interpolateValue
{ {
case interpolation2DTable::ERROR: case interpolation2DTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "value (" << lookupValue << ") less than lower "
"Foam::interpolation2DTable<Type>::interpolateValue"
"("
"List<Tuple2<scalar, Type> >&, "
"const scalar"
")"
) << "value (" << lookupValue << ") less than lower "
<< "bound (" << minLimit << ")" << nl << "bound (" << minLimit << ")" << nl
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolation2DTable::WARN: case interpolation2DTable::WARN:
{ {
WarningIn WarningInFunction
( << "value (" << lookupValue << ") less than lower "
"Foam::interpolation2DTable<Type>::interpolateValue"
"("
"List<Tuple2<scalar, Type> >&, "
"const scalar"
")"
) << "value (" << lookupValue << ") less than lower "
<< "bound (" << minLimit << ")" << nl << "bound (" << minLimit << ")" << nl
<< " Continuing with the first entry" << " Continuing with the first entry"
<< endl; << endl;
@ -176,28 +162,16 @@ Type Foam::interpolation2DTable<Type>::interpolateValue
{ {
case interpolation2DTable::ERROR: case interpolation2DTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "value (" << lookupValue << ") greater than upper "
"Foam::interpolation2DTable<Type>::interpolateValue"
"("
"List<Tuple2<scalar, Type> >&, "
"const scalar"
")"
) << "value (" << lookupValue << ") greater than upper "
<< "bound (" << maxLimit << ")" << nl << "bound (" << maxLimit << ")" << nl
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolation2DTable::WARN: case interpolation2DTable::WARN:
{ {
WarningIn WarningInFunction
( << "value (" << lookupValue << ") greater than upper "
"Foam::interpolation2DTable<Type>::interpolateValue"
"("
"List<Tuple2<scalar, Type> >&, "
"const scalar"
")"
) << "value (" << lookupValue << ") greater than upper "
<< "bound (" << maxLimit << ")" << nl << "bound (" << maxLimit << ")" << nl
<< " Continuing with the last entry" << " Continuing with the last entry"
<< endl; << endl;
@ -267,28 +241,15 @@ Foam::label Foam::interpolation2DTable<Type>::Xi
{ {
case interpolation2DTable::ERROR: case interpolation2DTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "value (" << valueX << ") out of bounds"
"Foam::label Foam::interpolation2DTable<Type>::Xi"
"("
"const BinaryOp&, "
"const scalar, "
"const bool"
") const"
) << "value (" << valueX << ") out of bounds"
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolation2DTable::WARN: case interpolation2DTable::WARN:
{ {
WarningIn WarningInFunction
( << "value (" << valueX << ") out of bounds"
"Foam::label Foam::interpolation2DTable<Type>::Xi"
"("
"const BinaryOp&, "
"const scalar, "
"const bool"
) << "value (" << valueX << ") out of bounds"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
} }
@ -298,15 +259,7 @@ Foam::label Foam::interpolation2DTable<Type>::Xi
} }
default: default:
{ {
FatalErrorIn FatalErrorInFunction
(
"Foam::label Foam::interpolation2DTable<Type>::Xi"
"("
"const BinaryOp&, "
"const scalar, "
"const bool"
") const"
)
<< "Un-handled enumeration " << boundsHandling_ << "Un-handled enumeration " << boundsHandling_
<< abort(FatalError); << abort(FatalError);
} }
@ -352,14 +305,7 @@ Type Foam::interpolation2DTable<Type>::operator()
if (nX == 0) if (nX == 0)
{ {
WarningIn WarningInFunction
(
"Type Foam::interpolation2DTable<Type>::operator()"
"("
"const scalar, "
"const scalar"
") const"
)
<< "cannot interpolate a zero-sized table - returning zero" << endl; << "cannot interpolate a zero-sized table - returning zero" << endl;
return pTraits<Type>::zero; return pTraits<Type>::zero;
@ -450,13 +396,8 @@ Foam::interpolation2DTable<Type>::wordToBoundsHandling
} }
else else
{ {
WarningIn WarningInFunction
( << "bad outOfBounds specifier " << bound << " using 'warn'" << endl;
"Foam::interpolation2DTable<Type>::wordToBoundsHandling"
"("
" const word&"
")"
) << "bad outOfBounds specifier " << bound << " using 'warn'" << endl;
return interpolation2DTable::WARN; return interpolation2DTable::WARN;
} }
@ -491,10 +432,8 @@ void Foam::interpolation2DTable<Type>::checkOrder() const
// avoid duplicate values (divide-by-zero error) // avoid duplicate values (divide-by-zero error)
if (currValue <= prevValue) if (currValue <= prevValue)
{ {
FatalErrorIn FatalErrorInFunction
( << "out-of-order value: "
"Foam::interpolation2DTable<Type>::checkOrder() const"
) << "out-of-order value: "
<< currValue << " at index " << i << nl << currValue << " at index " << i << nl
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -217,10 +217,8 @@ void Foam::interpolationLookUpTable<Type>::readTable
if (this->size() == 0) if (this->size() == 0)
{ {
FatalErrorIn FatalErrorInFunction
( << "table is empty" << nl << exit(FatalError);
"Foam::interpolationLookUpTable<Type>::readTable()"
) << "table is empty" << nl << exit(FatalError);
} }
} }
@ -324,10 +322,8 @@ void Foam::interpolationLookUpTable<Type>::check() const
// avoid duplicate values (divide-by-zero error) // avoid duplicate values (divide-by-zero error)
if (currValue <= prevValue) if (currValue <= prevValue)
{ {
FatalErrorIn FatalErrorInFunction
( << "out-of-order value: " << currValue
"Foam::interpolationLookUpTable<Type>::checkOrder() const"
) << "out-of-order value: " << currValue
<< " at index " << index << nl << exit(FatalError); << " at index " << index << nl << exit(FatalError);
} }
prevValue = currValue; prevValue = currValue;
@ -366,10 +362,8 @@ void Foam::interpolationLookUpTable<Type>::write
if (this->size() == 0) if (this->size() == 0)
{ {
FatalErrorIn FatalErrorInFunction
( << "table is empty" << nl << exit(FatalError);
"Foam::interpolationTable<Type>::write()"
) << "table is empty" << nl << exit(FatalError);
} }
os.writeKeyword("values") os.writeKeyword("values")
<< *this << token::END_STATEMENT << nl; << *this << token::END_STATEMENT << nl;
@ -386,24 +380,18 @@ Foam::interpolationLookUpTable<Type>::operator[](const label i)
if (n <= 1) if (n <= 1)
{ {
FatalErrorIn FatalErrorInFunction
( << "table has (" << n << ") columns" << nl << exit(FatalError);
"Foam::interpolationLookUpTable<Type>::operator[](const label)"
) << "table has (" << n << ") columns" << nl << exit(FatalError);
} }
else if (i < 0) else if (i < 0)
{ {
FatalErrorIn FatalErrorInFunction
( << "index (" << i << ") underflow" << nl << exit(FatalError);
"Foam::interpolationLookUpTable<Type>::operator[](const label)"
) << "index (" << i << ") underflow" << nl << exit(FatalError);
} }
else if (i >= n) else if (i >= n)
{ {
FatalErrorIn FatalErrorInFunction
( << "index (" << i << ") overflow" << nl << exit(FatalError);
"Foam::interpolationLookUpTable<Type>::operator[](const label)"
) << "index (" << i << ") overflow" << nl << exit(FatalError);
} }
return List<scalarField>::operator[](i); return List<scalarField>::operator[](i);
@ -418,27 +406,18 @@ Foam::interpolationLookUpTable<Type>::operator[](const label i) const
if (n <= 1) if (n <= 1)
{ {
FatalErrorIn FatalErrorInFunction
( << "table has (" << n << ") columns" << nl << exit(FatalError);
"Foam::interpolationLookUpTable<Type>::operator[]"
"(const label) const"
) << "table has (" << n << ") columns" << nl << exit(FatalError);
} }
else if (i < 0) else if (i < 0)
{ {
FatalErrorIn FatalErrorInFunction
( << "index (" << i << ") underflow" << nl << exit(FatalError);
"Foam::interpolationLookUpTable<Type>::operator[]"
"(const label) const"
) << "index (" << i << ") underflow" << nl << exit(FatalError);
} }
else if (i >= n) else if (i >= n)
{ {
FatalErrorIn FatalErrorInFunction
( << "index (" << i << ") overflow" << nl
"Foam::interpolationLookUpTable<Type>::operator[]"
"(const label) const"
) << "index (" << i << ") overflow" << nl
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,10 +43,8 @@ void Foam::interpolationTable<Type>::readTable()
if (this->empty()) if (this->empty())
{ {
FatalErrorIn FatalErrorInFunction
( << "table read from " << fName << " is empty" << nl
"Foam::interpolationTable<Type>::readTable()"
) << "table read from " << fName << " is empty" << nl
<< exit(FatalError); << exit(FatalError);
} }
@ -183,10 +181,8 @@ Foam::interpolationTable<Type>::wordToBoundsHandling
} }
else else
{ {
WarningIn WarningInFunction
( << "bad outOfBounds specifier " << bound << " using 'warn'" << endl;
"Foam::interpolationTable<Type>::wordToBoundsHandling(const word&)"
) << "bad outOfBounds specifier " << bound << " using 'warn'" << endl;
return interpolationTable::WARN; return interpolationTable::WARN;
} }
@ -220,10 +216,8 @@ void Foam::interpolationTable<Type>::check() const
// avoid duplicate values (divide-by-zero error) // avoid duplicate values (divide-by-zero error)
if (currValue <= prevValue) if (currValue <= prevValue)
{ {
FatalErrorIn FatalErrorInFunction
( << "out-of-order value: "
"Foam::interpolationTable<Type>::checkOrder() const"
) << "out-of-order value: "
<< currValue << " at index " << i << nl << currValue << " at index " << i << nl
<< exit(FatalError); << exit(FatalError);
} }
@ -267,21 +261,15 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
{ {
case interpolationTable::ERROR: case interpolationTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "value (" << lookupValue << ") underflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const scalar) const"
) << "value (" << lookupValue << ") underflow" << nl
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolationTable::WARN: case interpolationTable::WARN:
{ {
WarningIn WarningInFunction
( << "value (" << lookupValue << ") underflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const scalar) const"
) << "value (" << lookupValue << ") underflow" << nl
<< " Zero rate of change." << " Zero rate of change."
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
@ -306,21 +294,15 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
{ {
case interpolationTable::ERROR: case interpolationTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "value (" << lookupValue << ") overflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const label) const"
) << "value (" << lookupValue << ") overflow" << nl
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolationTable::WARN: case interpolationTable::WARN:
{ {
WarningIn WarningInFunction
( << "value (" << lookupValue << ") overflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const label) const"
) << "value (" << lookupValue << ") overflow" << nl
<< " Zero rate of change." << " Zero rate of change."
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
@ -421,21 +403,15 @@ Foam::interpolationTable<Type>::operator[](const label i) const
{ {
case interpolationTable::ERROR: case interpolationTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "index (" << ii << ") underflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const label) const"
) << "index (" << ii << ") underflow" << nl
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolationTable::WARN: case interpolationTable::WARN:
{ {
WarningIn WarningInFunction
( << "index (" << ii << ") underflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const label) const"
) << "index (" << ii << ") underflow" << nl
<< " Continuing with the first entry" << " Continuing with the first entry"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
@ -461,21 +437,15 @@ Foam::interpolationTable<Type>::operator[](const label i) const
{ {
case interpolationTable::ERROR: case interpolationTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "index (" << ii << ") overflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const label) const"
) << "index (" << ii << ") overflow" << nl
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolationTable::WARN: case interpolationTable::WARN:
{ {
WarningIn WarningInFunction
( << "index (" << ii << ") overflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const label) const"
) << "index (" << ii << ") overflow" << nl
<< " Continuing with the last entry" << " Continuing with the last entry"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
@ -520,21 +490,15 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
{ {
case interpolationTable::ERROR: case interpolationTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "value (" << lookupValue << ") underflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const scalar) const"
) << "value (" << lookupValue << ") underflow" << nl
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolationTable::WARN: case interpolationTable::WARN:
{ {
WarningIn WarningInFunction
( << "value (" << lookupValue << ") underflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const scalar) const"
) << "value (" << lookupValue << ") underflow" << nl
<< " Continuing with the first entry" << " Continuing with the first entry"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'
@ -559,21 +523,15 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
{ {
case interpolationTable::ERROR: case interpolationTable::ERROR:
{ {
FatalErrorIn FatalErrorInFunction
( << "value (" << lookupValue << ") overflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const label) const"
) << "value (" << lookupValue << ") overflow" << nl
<< exit(FatalError); << exit(FatalError);
break; break;
} }
case interpolationTable::WARN: case interpolationTable::WARN:
{ {
WarningIn WarningInFunction
( << "value (" << lookupValue << ") overflow" << nl
"Foam::interpolationTable<Type>::operator[]"
"(const label) const"
) << "value (" << lookupValue << ") overflow" << nl
<< " Continuing with the last entry" << " Continuing with the last entry"
<< endl; << endl;
// fall-through to 'CLAMP' // fall-through to 'CLAMP'

View File

@ -40,7 +40,7 @@ Foam::csvTableReader<Type>::csvTableReader(const dictionary& dict)
{ {
if (componentColumns_.size() != pTraits<Type>::nComponents) if (componentColumns_.size() != pTraits<Type>::nComponents)
{ {
FatalErrorIn("csvTableReader<Type>::csvTableReader(const dictionary&)") FatalErrorInFunction
<< componentColumns_ << " does not have the expected length " << componentColumns_ << " does not have the expected length "
<< pTraits<Type>::nComponents << endl << pTraits<Type>::nComponents << endl
<< exit(FatalError); << exit(FatalError);
@ -65,10 +65,8 @@ namespace Foam
{ {
if (componentColumns_[0] >= splitted.size()) if (componentColumns_[0] >= splitted.size())
{ {
FatalErrorIn FatalErrorInFunction
( << "No column " << componentColumns_[0] << " in "
"csvTableReader<scalar>::readValue(const List<string>&)"
) << "No column " << componentColumns_[0] << " in "
<< splitted << endl << splitted << endl
<< exit(FatalError); << exit(FatalError);
} }
@ -86,10 +84,8 @@ namespace Foam
{ {
if (componentColumns_[i] >= splitted.size()) if (componentColumns_[i] >= splitted.size())
{ {
FatalErrorIn FatalErrorInFunction
( << "No column " << componentColumns_[i] << " in "
"csvTableReader<Type>::readValue(const List<string>&)"
) << "No column " << componentColumns_[i] << " in "
<< splitted << endl << splitted << endl
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,10 +45,8 @@ Foam::autoPtr<Foam::tableReader<Type> > Foam::tableReader<Type>::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown reader type " << readerType
"tableReader::New(const dictionary&)"
) << "Unknown reader type " << readerType
<< nl << nl << nl << nl
<< "Valid reader types : " << nl << "Valid reader types : " << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,7 +59,7 @@ autoPtr<interpolationWeights> interpolationWeights::New
{ {
if (debug) if (debug)
{ {
InfoIn("interpolationWeights::New") InfoInFunction
<< "Selecting interpolationWeights " << "Selecting interpolationWeights "
<< type << endl; << type << endl;
} }
@ -69,11 +69,8 @@ autoPtr<interpolationWeights> interpolationWeights::New
if (cstrIter == wordConstructorTablePtr_->end()) if (cstrIter == wordConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown interpolationWeights type "
"interpolationWeights::New(const word&, "
"const scalarField&)"
) << "Unknown interpolationWeights type "
<< type << type
<< endl << endl << endl << endl
<< "Valid interpolationWeights types are :" << endl << "Valid interpolationWeights types are :" << endl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -58,7 +58,7 @@ Foam::Pair<Foam::scalar> linearInterpolationWeights::integrationWeights
if (s < -SMALL || s > 1+SMALL) if (s < -SMALL || s > 1+SMALL)
{ {
FatalErrorIn("linearInterpolationWeights::integrationWeights(..)") FatalErrorInFunction
<< "Value " << t << " outside range " << samples_[i] << "Value " << t << " outside range " << samples_[i]
<< " .. " << samples_[i+1] << " .. " << samples_[i+1]
<< exit(FatalError); << exit(FatalError);
@ -161,7 +161,7 @@ bool linearInterpolationWeights::integrationWeights
{ {
if (t2 < t1-VSMALL) if (t2 < t1-VSMALL)
{ {
FatalErrorIn("linearInterpolationWeights::integrationWeights(..)") FatalErrorInFunction
<< "Integration should be in positive direction." << "Integration should be in positive direction."
<< " t1:" << t1 << " t2:" << t2 << " t1:" << t1 << " t2:" << t2
<< exit(FatalError); << exit(FatalError);
@ -177,7 +177,7 @@ bool linearInterpolationWeights::integrationWeights
// For now just fail if any outside table // For now just fail if any outside table
if (i1 == -1 || i2 == samples_.size()-1) if (i1 == -1 || i2 == samples_.size()-1)
{ {
FatalErrorIn("linearInterpolationWeights::integrationWeights(..)") FatalErrorInFunction
<< "Integrating outside table " << samples_[0] << ".." << "Integrating outside table " << samples_[0] << ".."
<< samples_.last() << " not implemented." << samples_.last() << " not implemented."
<< " t1:" << t1 << " t2:" << t2 << exit(FatalError); << " t1:" << t1 << " t2:" << t2 << exit(FatalError);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,11 +44,8 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate
{ {
if (pf.size() != fromPatch_.nPoints()) if (pf.size() != fromPatch_.nPoints())
{ {
FatalErrorIn FatalErrorInFunction
( << "given field does not correspond to patch. Patch size: "
"PatchToPatchInterpolation::pointInterpolate"
"(const Field<Type> pf)"
) << "given field does not correspond to patch. Patch size: "
<< fromPatch_.nPoints() << " field size: " << pf.size() << fromPatch_.nPoints() << " field size: " << pf.size()
<< abort(FatalError); << abort(FatalError);
} }
@ -116,11 +113,8 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::faceInterpolate
{ {
if (ff.size() != fromPatch_.size()) if (ff.size() != fromPatch_.size())
{ {
FatalErrorIn FatalErrorInFunction
( << "given field does not correspond to patch. Patch size: "
"PatchToPatchInterpolation::faceInterpolate"
"(const Field<Type> ff)"
) << "given field does not correspond to patch. Patch size: "
<< fromPatch_.size() << " field size: " << ff.size() << fromPatch_.size() << " field size: " << ff.size()
<< abort(FatalError); << abort(FatalError);
} }

Some files were not shown because too many files have changed in this diff Show More