Commit 735ce9cc authored by Henry Weller's avatar Henry Weller
Browse files

src/finiteVolume: Update ...ErrorIn -> ...ErrorInFunction

Avoids the clutter and maintenance effort associated with providing the
function signature string.
parent 78d7482e
......@@ -289,16 +289,7 @@ Foam::MRFZone::MRFZone
if (!cellZoneFound)
{
FatalErrorIn
(
"MRFZone"
"("
"const word&, "
"const fvMesh&, "
"const dictionary&, "
"const word&"
")"
)
FatalErrorInFunction
<< "cannot find MRF cellZone " << cellZoneName_
<< exit(FatalError);
}
......
......@@ -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
......@@ -57,10 +57,8 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"SRFModel::New(const fvMesh&)"
) << "Unknown SRFModel type "
FatalErrorInFunction
<< "Unknown SRFModel type "
<< modelType << nl << nl
<< "Valid SRFModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -103,15 +103,8 @@ bool Foam::adjustPhi
}
else if (mag(fixedMassOut - massIn)/totalFlux > 1e-8)
{
FatalErrorIn
(
"adjustPhi"
"("
"surfaceScalarField&, "
"const volVectorField&,"
"volScalarField&"
")"
) << "Continuity error cannot be removed by adjusting the"
FatalErrorInFunction
<< "Continuity error cannot be removed by adjusting the"
" outflow.\nPlease check the velocity boundary conditions"
" and/or run potentialFoam to initialise the outflow." << nl
<< "Total flux : " << totalFlux << nl
......
......@@ -52,16 +52,8 @@ void Foam::setRefCell
if (refCelli < 0 || refCelli >= field.mesh().nCells())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"void Foam::setRefCell\n"
" (\n"
" const volScalarField&,\n"
" const volScalarField&,\n"
" const dictionary&,\n"
" label& scalar&,\n"
" bool\n"
")",
dict
) << "Illegal master cellID " << refCelli
<< ". Should be 0.." << field.mesh().nCells()
......@@ -95,16 +87,8 @@ void Foam::setRefCell
if (sumHasRef != 1)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"void Foam::setRefCell\n"
" (\n"
" const volScalarField&,\n"
" const volScalarField&,\n"
" const dictionary&,\n"
" label& scalar&,\n"
" bool\n"
" )",
dict
) << "Unable to set reference cell for field " << field.name()
<< nl << " Reference point " << refPointName
......@@ -115,16 +99,8 @@ void Foam::setRefCell
}
else
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"void Foam::setRefCell\n"
" (\n"
" const volScalarField&,\n"
" const volScalarField&,\n"
" const dictionary&,\n"
" label& scalar&,\n"
" bool\n"
" )",
dict
) << "Unable to set reference cell for field " << field.name()
<< nl
......
if (!isA<zeroGradientFvPatchScalarField>(k_.boundaryField()[patchi]))
{
FatalErrorIn("wall-function evaluation")
FatalErrorInFunction
<< k_.boundaryField()[patchi].type()
<< " is the wrong k patchField type for wall-functions on patch "
<< curPatch.name() << nl
......@@ -10,7 +10,7 @@ if (!isA<zeroGradientFvPatchScalarField>(k_.boundaryField()[patchi]))
if (!isA<zeroGradientFvPatchScalarField>(epsilon_.boundaryField()[patchi]))
{
FatalErrorIn("wall-function evaluation")
FatalErrorInFunction
<< epsilon_.boundaryField()[patchi].type()
<< " is the wrong epsilon patchField type for wall-functions on patch "
<< curPatch.name() << nl
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -43,13 +43,8 @@ void Foam::porosityModel::adjustNegativeResistance(dimensionedVector& resist)
if (maxCmpt < 0)
{
FatalErrorIn
(
"void Foam::porosityModel::adjustNegativeResistance"
"("
"dimensionedVector&"
")"
) << "Negative resistances are invalid, resistance = " << resist
FatalErrorInFunction
<< "Negative resistances are invalid, resistance = " << resist
<< exit(FatalError);
}
else
......@@ -123,17 +118,8 @@ Foam::porosityModel::porosityModel
if (!foundZone && Pstream::master())
{
FatalErrorIn
(
"Foam::porosityModel::porosityModel"
"("
"const word&, "
"const word&, "
"const fvMesh&, "
"const dictionary&"
"const word&, "
")"
) << "cannot find porous cellZone " << zoneName_
FatalErrorInFunction
<< "cannot find porous cellZone " << zoneName_
<< exit(FatalError);
}
}
......
......@@ -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
......@@ -45,16 +45,7 @@ Foam::autoPtr<Foam::porosityModel> Foam::porosityModel::New
if (cstrIter == meshConstructorTablePtr_->end())
{
FatalErrorIn
(
"porosityModel::New"
"("
"const word&, "
"const fvMesh&, "
"const dictionary&, "
"const word&"
")"
)
FatalErrorInFunction
<< "Unknown " << typeName << " type " << modelType << nl << nl
<< "Valid " << typeName << " types are:" << nl
<< meshConstructorTablePtr_->sortedToc()
......
......@@ -81,7 +81,7 @@ void Foam::solutionControl::read(const bool absTolOnly)
}
else
{
FatalErrorIn("bool Foam::solutionControl::read()")
FatalErrorInFunction
<< "Residual data for " << iter().keyword()
<< " must be specified as a dictionary"
<< exit(FatalError);
......@@ -107,7 +107,7 @@ void Foam::solutionControl::read(const bool absTolOnly)
}
else
{
FatalErrorIn("bool Foam::solutionControl::read()")
FatalErrorInFunction
<< "Residual data for " << iter().keyword()
<< " must be specified as a dictionary"
<< exit(FatalError);
......
......@@ -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
......@@ -147,12 +147,8 @@ Foam::calculatedFvPatchField<Type>::valueInternalCoeffs
const tmp<scalarField>&
) const
{
FatalErrorIn
(
"calculatedFvPatchField<Type>::"
"valueInternalCoeffs(const tmp<scalarField>&) const"
) << "\n "
"valueInternalCoeffs cannot be called for a calculatedFvPatchField"
FatalErrorInFunction
<< "cannot be called for a calculatedFvPatchField"
<< "\n on patch " << this->patch().name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
......@@ -171,12 +167,8 @@ Foam::calculatedFvPatchField<Type>::valueBoundaryCoeffs
const tmp<scalarField>&
) const
{
FatalErrorIn
(
"calculatedFvPatchField<Type>::"
"valueBoundaryCoeffs(const tmp<scalarField>&) const"
) << "\n "
"valueBoundaryCoeffs cannot be called for a calculatedFvPatchField"
FatalErrorInFunction
<< "cannot be called for a calculatedFvPatchField"
<< "\n on patch " << this->patch().name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
......@@ -192,13 +184,8 @@ template<class Type>
Foam::tmp<Foam::Field<Type> >
Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const
{
FatalErrorIn
(
"calculatedFvPatchField<Type>::"
"gradientInternalCoeffs() const"
) << "\n "
"gradientInternalCoeffs cannot be called for a "
"calculatedFvPatchField"
FatalErrorInFunction
<< "cannot be called for a calculatedFvPatchField"
<< "\n on patch " << this->patch().name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
......@@ -214,13 +201,8 @@ template<class Type>
Foam::tmp<Foam::Field<Type> >
Foam::calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
{
FatalErrorIn
(
"calculatedFvPatchField<Type>::"
"gradientBoundaryCoeffs() const"
) << "\n "
"gradientBoundaryCoeffs cannot be called for a "
"calculatedFvPatchField"
FatalErrorInFunction
<< "cannot be called for a calculatedFvPatchField"
<< "\n on patch " << this->patch().name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
......
......@@ -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
......@@ -58,16 +58,8 @@ Foam::directionMixedFvPatchField<Type>::directionMixedFvPatchField
{
if (notNull(iF) && mapper.hasUnmapped())
{
WarningIn
(
"directionMixedFvPatchField<Type>::directionMixedFvPatchField\n"
"(\n"
" const directionMixedFvPatchField<Type>&,\n"
" const fvPatch&,\n"
" const DimensionedField<Type, volMesh>&,\n"
" const fvPatchFieldMapper&\n"
")\n"
) << "On field " << iF.name() << " patch " << p.name()
WarningInFunction
<< "On field " << iF.name() << " patch " << p.name()
<< " patchField " << this->type()
<< " : mapper does not map all values." << nl
<< " To avoid this warning fully specify the mapping in derived"
......
......@@ -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
......@@ -59,16 +59,8 @@ fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
{
if (notNull(iF) && mapper.hasUnmapped())
{
WarningIn
(
"fixedGradientFvPatchField<Type>::fixedGradientFvPatchField\n"
"(\n"
" const fixedGradientFvPatchField<Type>&,\n"
" const fvPatch&,\n"
" const DimensionedField<Type, volMesh>&,\n"
" const fvPatchFieldMapper&\n"
")\n"
) << "On field " << iF.name() << " patch " << p.name()
WarningInFunction
<< "On field " << iF.name() << " patch " << p.name()
<< " patchField " << this->type()
<< " : mapper does not map all values." << nl
<< " To avoid this warning fully specify the mapping in derived"
......
......@@ -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
......@@ -68,16 +68,8 @@ fixedValueFvPatchField<Type>::fixedValueFvPatchField
{
if (notNull(iF) && mapper.hasUnmapped())
{
WarningIn
(
"fixedValueFvPatchField<Type>::fixedValueFvPatchField\n"
"(\n"
" const fixedValueFvPatchField<Type>&,\n"
" const fvPatch&,\n"
" const DimensionedField<Type, volMesh>&,\n"
" const fvPatchFieldMapper&\n"
")\n"
) << "On field " << iF.name() << " patch " << p.name()
WarningInFunction
<< "On field " << iF.name() << " patch " << p.name()
<< " patchField " << this->type()
<< " : mapper does not map all values." << nl
<< " To avoid this warning fully specify the mapping in derived"
......
......@@ -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
......@@ -62,16 +62,8 @@ mixedFvPatchField<Type>::mixedFvPatchField
{
if (notNull(iF) && mapper.hasUnmapped())
{
WarningIn
(
"mixedFvPatchField<Type>::mixedFvPatchField\n"
"(\n"
" const mixedFvPatchField<Type>&,\n"
" const fvPatch&,\n"
" const DimensionedField<Type, volMesh>&,\n"
" const fvPatchFieldMapper&\n"
")\n"
) << "On field " << iF.name() << " patch " << p.name()
WarningInFunction
<< "On field " << iF.name() << " patch " << p.name()
<< " patchField " << this->type()
<< " : mapper does not map all values." << nl
<< " To avoid this warning fully specify the mapping in derived"
......
......@@ -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
......@@ -59,16 +59,7 @@ cyclicFvPatchField<Type>::cyclicFvPatchField
{
if (!isA<cyclicFvPatch>(this->patch()))
{
FatalErrorIn
(
"cyclicFvPatchField<Type>::cyclicFvPatchField"
"("
"const cyclicFvPatchField<Type>& ,"
"const fvPatch&, "
"const DimensionedField<Type, volMesh>&, "
"const fvPatchFieldMapper&"
")"
) << " patch type '" << p.type()
FatalErrorInFunction
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
......@@ -91,14 +82,8 @@ cyclicFvPatchField<Type>::cyclicFvPatchField
{
if (!isA<cyclicFvPatch>(p))
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"cyclicFvPatchField<Type>::cyclicFvPatchField"
"("
"const fvPatch&, "
"const Field<Type>&, "
"const dictionary&"
")",
dict
) << " patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -56,16 +56,7 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
{
if (!isA<cyclicACMIFvPatch>(this->patch()))
{
FatalErrorIn
(
"cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField"
"("
"const cyclicACMIFvPatchField<Type>& ,"
"const fvPatch&, "
"const DimensionedField<Type, volMesh>&, "
"const fvPatchFieldMapper&"
")"
) << " patch type '" << p.type()
FatalErrorInFunction
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
......@@ -89,14 +80,8 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
{
if (!isA<cyclicACMIFvPatch>(p))
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField"
"("
"const fvPatch&, "
"const DimensionedField<Type, volMesh>&, "
"const dictionary&"
")",
dict
) << " patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
......
......@@ -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
......@@ -53,16 +53,7 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
{
if (!isA<cyclicAMIFvPatch>(this->patch()))
{
FatalErrorIn
(
"cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField"
"("
"const cyclicAMIFvPatchField<Type>& ,"
"const fvPatch&, "
"const DimensionedField<Type, volMesh>&, "
"const fvPatchFieldMapper&"
")"
) << " patch type '" << p.type()
FatalErrorInFunction
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
......@@ -86,14 +77,8 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
{
if (!isA<cyclicAMIFvPatch>(p))
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField"
"("
"const fvPatch&, "
"const DimensionedField<Type, volMesh>&, "
"const dictionary&"
")",
dict
) << " patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
......
......@@ -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
......@@ -26,15 +26,10 @@ License
#include "emptyFvPatchField.H"
#include "fvPatchFieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
emptyFvPatchField<Type>::emptyFvPatchField
Foam::emptyFvPatchField<Type>::emptyFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF
......@@ -45,7 +40,7 @@ emptyFvPatchField<Type>::emptyFvPatchField
template<class Type>
emptyFvPatchField<Type>::emptyFvPatchField
Foam::emptyFvPatchField<Type>::emptyFvPatchField
(