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