mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
applications: Update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the function signature string.
This commit is contained in:
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!args.optionFound("ybl") && !args.optionFound("Cbl"))
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Neither option 'ybl' or 'Cbl' have been provided to calculate "
|
||||
<< "the boundary-layer thickness.\n"
|
||||
<< "Please choose either 'ybl' OR 'Cbl'."
|
||||
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if (args.optionFound("ybl") && args.optionFound("Cbl"))
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Both 'ybl' and 'Cbl' have been provided to calculate "
|
||||
<< "the boundary-layer thickness.\n"
|
||||
<< "Please choose either 'ybl' OR 'Cbl'."
|
||||
|
||||
@ -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
|
||||
@ -420,7 +420,7 @@ int main(int argc, char *argv[])
|
||||
instantList times = timeSelector::selectIfPresent(runTime, args);
|
||||
if (times.size() < 1)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "No times selected." << exit(FatalError);
|
||||
}
|
||||
runTime.setTime(times[0], 0);
|
||||
|
||||
@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!mesh.write())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Failed writing dsmcCloud."
|
||||
<< nl << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Unknown mapMethod " << mapMethod << ". Valid options are: "
|
||||
<< "mapNearest, interpolate and cellPointInterpolate"
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!mesh.write())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
FatalErrorInFunction
|
||||
<< "Failed writing moleculeCloud."
|
||||
<< nl << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -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,22 +106,14 @@ bool setCellFieldType
|
||||
|
||||
if (!field.write())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void setCellFieldType"
|
||||
"(const fvMesh& mesh, const labelList& selectedCells,"
|
||||
"Istream& fieldValueStream)"
|
||||
) << "Failed writing field " << fieldName << endl;
|
||||
FatalErrorInFunction
|
||||
<< "Failed writing field " << fieldName << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void setCellFieldType"
|
||||
"(const fvMesh& mesh, const labelList& selectedCells,"
|
||||
"Istream& fieldValueStream)"
|
||||
) << "Field " << fieldName << " not found" << endl;
|
||||
WarningInFunction
|
||||
<< "Field " << fieldName << " not found" << endl;
|
||||
|
||||
// Consume value
|
||||
(void)pTraits<Type>(fieldValueStream);
|
||||
@ -177,7 +169,7 @@ public:
|
||||
)
|
||||
)
|
||||
{
|
||||
WarningIn("setCellField::iNew::operator()(Istream& is)")
|
||||
WarningInFunction
|
||||
<< "field type " << fieldType << " not currently supported"
|
||||
<< endl;
|
||||
}
|
||||
@ -266,7 +258,7 @@ bool setFaceFieldType
|
||||
if (!hasWarned)
|
||||
{
|
||||
hasWarned = true;
|
||||
WarningIn("setFaceFieldType(..)")
|
||||
WarningInFunction
|
||||
<< "Ignoring internal face " << facei
|
||||
<< ". Suppressing further warnings." << endl;
|
||||
}
|
||||
@ -302,22 +294,14 @@ bool setFaceFieldType
|
||||
|
||||
if (!field.write())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void setFaceFieldType"
|
||||
"(const fvMesh& mesh, const labelList& selectedFaces,"
|
||||
"Istream& fieldValueStream)"
|
||||
) << "Failed writing field " << field.name() << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Failed writing field " << field.name() << exit(FatalError);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void setFaceFieldType"
|
||||
"(const fvMesh& mesh, const labelList& selectedFaces,"
|
||||
"Istream& fieldValueStream)"
|
||||
) << "Field " << fieldName << " not found" << endl;
|
||||
WarningInFunction
|
||||
<< "Field " << fieldName << " not found" << endl;
|
||||
|
||||
// Consume value
|
||||
(void)pTraits<Type>(fieldValueStream);
|
||||
@ -373,7 +357,7 @@ public:
|
||||
)
|
||||
)
|
||||
{
|
||||
WarningIn("setFaceField::iNew::operator()(Istream& is)")
|
||||
WarningInFunction
|
||||
<< "field type " << fieldType << " not currently supported"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
@ -60,10 +60,8 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||
endAgg.append(globalNumbering.toGlobal(procI, remAgg));
|
||||
if (startIndex.size() > maxDynListLength)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"shootRays"
|
||||
) << "Dynamic list need from capacity."
|
||||
FatalErrorInFunction
|
||||
<< "Dynamic list need from capacity."
|
||||
<< "Actual size maxDynListLength : "
|
||||
<< maxDynListLength
|
||||
<< abort(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
|
||||
@ -104,7 +104,7 @@ void Foam::tabulatedWallFunctions::SpaldingsLaw::invertFunction()
|
||||
|
||||
if (iter == maxIters_)
|
||||
{
|
||||
WarningIn("SpaldingsLaw::invertFunction()")
|
||||
WarningInFunction
|
||||
<< "Newton iterations not converged:" << nl
|
||||
<< " iters = " << iter << ", error = " << error << endl;
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -119,15 +119,8 @@ Foam::scalar Foam::tabulatedWallFunctions::general::interpolate
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tabulatedWallFunctions::general::interpolate"
|
||||
"("
|
||||
"const scalar, "
|
||||
"const scalarList&, "
|
||||
"const scalarList&"
|
||||
")"
|
||||
) << "Unknown interpolation method" << nl
|
||||
FatalErrorInFunction
|
||||
<< "Unknown interpolation method" << nl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
@ -154,14 +147,8 @@ Foam::tabulatedWallFunctions::general::general
|
||||
List<Tuple2<scalar, scalar> > inputTable = coeffDict_.lookup("inputTable");
|
||||
if (inputTable.size() < 2)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tabulatedWallFunctions::general::general"
|
||||
"("
|
||||
"const dictionary&, "
|
||||
"const polyMesh&"
|
||||
")"
|
||||
) << "Input table must have at least 2 values" << nl
|
||||
FatalErrorInFunction
|
||||
<< "Input table must have at least 2 values" << nl
|
||||
<< 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
|
||||
@ -49,10 +49,8 @@ autoPtr<tabulatedWallFunction> tabulatedWallFunction::New
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tabulatedWallFunction::New(const dictionary&, const polyMesh&)"
|
||||
) << "Unknown tabulatedWallFunction type " << twfTypeName
|
||||
FatalErrorInFunction
|
||||
<< "Unknown tabulatedWallFunction type " << twfTypeName
|
||||
<< nl << nl << "Valid tabulatedWallFunction types are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
|
||||
Reference in New Issue
Block a user