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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -141,10 +141,8 @@ const T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword) const
if (iter == hashedTs_.end())
{
FatalErrorIn
(
"DictionaryBase<IDLListType, T>::lookup(const word&) const"
) << keyword << " is undefined"
FatalErrorInFunction
<< keyword << " is undefined"
<< exit(FatalError);
}
@ -160,10 +158,8 @@ T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword)
if (iter == hashedTs_.end())
{
FatalErrorIn
(
"DictionaryBase<IDLListType, T>::lookup(const word&)"
) << keyword << " is undefined"
FatalErrorInFunction
<< keyword << " is undefined"
<< exit(FatalError);
}
@ -260,7 +256,7 @@ void Foam::DictionaryBase<IDLListType, T>::operator=
// Check for assignment to self
if (this == &dict)
{
FatalErrorIn("DictionaryBase::operator=(const DictionaryBase&)")
FatalErrorInFunction
<< "attempted assignment to self"
<< 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))
{
FatalErrorIn
(
"PtrListDictionary<T>::set(const label i, const word& key, T* ptr)"
) << "Cannot insert with key '" << key << "' into hash-table"
FatalErrorInFunction
<< "Cannot insert with key '" << key << "' into hash-table"
<< abort(FatalError);
}
return PtrList<T>::set(i, ptr);
@ -91,11 +89,8 @@ inline Foam::autoPtr<T> Foam::PtrListDictionary<T>::set
T* ptr = aptr.ptr();
if (!DictionaryBase<PtrList<T>, T>::hashedTs_.insert(key, ptr))
{
FatalErrorIn
(
"PtrListDictionary<T>::"
"set(const label i, const word& key, autoPtr<T>& aptr)"
) << "Cannot insert with key '" << key << "' into hash-table"
FatalErrorInFunction
<< "Cannot insert with key '" << key << "' into hash-table"
<< abort(FatalError);
}
return PtrList<T>::set(i, ptr);
@ -113,11 +108,8 @@ inline Foam::autoPtr<T> Foam::PtrListDictionary<T>::set
T* ptr = t.ptr();
if (!DictionaryBase<PtrList<T>, T>::hashedTs_.insert(key, ptr))
{
FatalErrorIn
(
"PtrListDictionary<T>::"
"set(const label i, const word& key, tmp<T>& t)"
) << "Cannot insert with key '" << key << "' into hash-table"
FatalErrorInFunction
<< "Cannot insert with key '" << key << "' into hash-table"
<< abort(FatalError);
}
return PtrList<T>::set(i, ptr);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,14 +55,8 @@ Foam::cyclicPointPatchField<Type>::cyclicPointPatchField
{
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
) << "patch " << this->patch().index() << " not cyclic type. "
<< "Patch type = " << p.type()
@ -85,16 +79,8 @@ Foam::cyclicPointPatchField<Type>::cyclicPointPatchField
{
if (!isType<cyclicPointPatch>(this->patch()))
{
FatalErrorIn
(
"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 "
FatalErrorInFunction
<< "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl
<< "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,14 +55,8 @@ emptyPointPatchField<Type>::emptyPointPatchField
{
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
) << "patch " << this->patch().index() << " not empty type. "
<< "Patch type = " << p.type()
@ -84,16 +78,8 @@ emptyPointPatchField<Type>::emptyPointPatchField
{
if (!isType<emptyPointPatch>(this->patch()))
{
FatalErrorIn
(
"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 "
FatalErrorInFunction
<< "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl
<< "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,14 +55,8 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
{
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
) << "patch " << this->patch().index() << " not symmetry type. "
<< "Patch type = " << p.type()
@ -84,16 +78,8 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
{
if (!isType<symmetryPointPatch>(this->patch()))
{
FatalErrorIn
(
"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 "
FatalErrorInFunction
<< "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl
<< "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,14 +57,8 @@ symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
{
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
) << "patch " << this->patch().index() << " not symmetry type. "
<< "Patch type = " << p.type()
@ -87,16 +81,8 @@ symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
{
if (!isType<symmetryPlanePointPatch>(this->patch()))
{
FatalErrorIn
(
"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 "
FatalErrorInFunction
<< "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl
<< "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,14 +52,8 @@ Foam::wedgePointPatchField<Type>::wedgePointPatchField
{
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
) << "patch " << this->patch().index() << " not wedge type. "
<< "Patch type = " << p.type()
@ -81,16 +75,8 @@ Foam::wedgePointPatchField<Type>::wedgePointPatchField
{
if (!isType<wedgePointPatch>(this->patch()))
{
FatalErrorIn
(
"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 "
FatalErrorInFunction
<< "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl
<< "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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