diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H index 947f97b1bf8b05688d4c8f53bb16ba7e21ef5baa..ddd13d908490aea40c5fc98dbb235ba1d25b1c4d 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H @@ -524,7 +524,7 @@ public: //- Return the name of the thermo physics virtual word thermoName() const { - NotImplemented + NotImplemented; return word(); } diff --git a/src/OpenFOAM/db/error/error.H b/src/OpenFOAM/db/error/error.H index beb029db2fb0ca93e3f9c1cf4bd651f267a64f89..102a555ab5545f19cc169c5b3ee73948ba52b286 100644 --- a/src/OpenFOAM/db/error/error.H +++ b/src/OpenFOAM/db/error/error.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -353,6 +353,14 @@ extern IOerror FatalIOError; // for FUNCTION_NAME in file __FILE__ at line __LINE__ #define FatalErrorInFunction FatalErrorIn(FUNCTION_NAME) +//- Report an error message using Foam::FatalError +// about unknown lookup type in table +#define FatalErrorInLookup(lookupTag, lookupName, lookupTable) \ + ::Foam::FatalError(FUNCTION_NAME, __FILE__, __LINE__) \ + << "Unknown " << (lookupTag) << " type " << (lookupName) \ + << "\n\nValid " << (lookupTag) << " types :\n" \ + << ((lookupTable).sortedToc()) << '\n' + //- Report an error message using Foam::FatalIOError // for functionName in file __FILE__ at line __LINE__ @@ -366,6 +374,15 @@ extern IOerror FatalIOError; #define FatalIOErrorInFunction(ios) FatalIOErrorIn(FUNCTION_NAME, ios) +//- Report an error message using Foam::FatalIOError +// about unknown lookup type in table +#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable) \ + ::Foam::FatalIOError(FUNCTION_NAME, __FILE__, __LINE__, (ios)) \ + << "Unknown " << (lookupTag) << " type " << (lookupName) \ + << "\n\nValid " << (lookupTag) << " types :\n" \ + << ((lookupTable).sortedToc()) << '\n' + + //- Report an error message using Foam::FatalIOError // (or cerr if FatalIOError not yet constructed) // for functionName in file __FILE__ at line __LINE__ diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H index eca163cdc40038d1678313a2d5902b0223f11992..9f5a0d0ca42ce806074449b7eca4c460bdda923f 100644 --- a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 Wikki Ltd @@ -366,7 +366,7 @@ public: //- Return patchField on the opposite patch of a coupled patch virtual tmp<Field<Type>> patchNeighbourField() const { - notImplemented(type() + "patchNeighbourField()"); + NotImplemented; return *this; } @@ -393,11 +393,7 @@ public: const tmp<Field<scalar>>& ) const { - notImplemented - ( - type() - + "::valueInternalCoeffs(const tmp<Field<scalar>>&)" - ); + NotImplemented; return *this; } @@ -408,11 +404,7 @@ public: const tmp<Field<scalar>>& ) const { - notImplemented - ( - type() - + "::valueBoundaryCoeffs(const tmp<Field<scalar>>&)" - ); + NotImplemented; return *this; } @@ -420,7 +412,7 @@ public: // evaluation of the gradient of this patchField virtual tmp<Field<Type>> gradientInternalCoeffs() const { - notImplemented(type() + "::gradientInternalCoeffs()"); + NotImplemented; return *this; } @@ -428,7 +420,7 @@ public: // evaluation of the gradient of this patchField virtual tmp<Field<Type>> gradientBoundaryCoeffs() const { - notImplemented(type() + "::gradientBoundaryCoeffs()"); + NotImplemented; return *this; } diff --git a/src/optimisation/adjointOptimisation/adjoint/fvOptionsAdjoint/fvOptions/fvOptionAdjoint.H b/src/optimisation/adjointOptimisation/adjoint/fvOptionsAdjoint/fvOptions/fvOptionAdjoint.H index 822438c2fb071a528bd3e45b7970063f186d162f..fa9fa586e0c05291afa2a64bf90be7a2270b1854 100644 --- a/src/optimisation/adjointOptimisation/adjoint/fvOptionsAdjoint/fvOptions/fvOptionAdjoint.H +++ b/src/optimisation/adjointOptimisation/adjoint/fvOptionsAdjoint/fvOptions/fvOptionAdjoint.H @@ -79,8 +79,8 @@ public: //- Return clone autoPtr<optionAdjoint> clone() const { - notImplemented("autoPtr<optionAdjoint> clone() const"); - return autoPtr<optionAdjoint>(nullptr); + NotImplemented; + return nullptr; } diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/sizeGroup/sizeGroup.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/sizeGroup/sizeGroup.C index e758c1cc97acb2a2f439d6f9fbb1f35a7d39e83a..8e567a2e57eaf8a92bd9321e0b5a4a08420bde88 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/sizeGroup/sizeGroup.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/sizeGroup/sizeGroup.C @@ -99,8 +99,8 @@ Foam::diameterModels::sizeGroup::~sizeGroup() Foam::autoPtr<Foam::diameterModels::sizeGroup> Foam::diameterModels::sizeGroup::clone() const { - notImplemented("sizeGroup::clone() const"); - return autoPtr<sizeGroup>(nullptr); + NotImplemented; + return nullptr; } diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H index e50a732dae53c3fc153f58f3f41424193206f1fd..16a61b7f30230ed184b7c919523f236ea4131616 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H @@ -120,7 +120,7 @@ public: autoPtr<breakupModel> clone() const { NotImplemented; - return autoPtr<breakupModel>(nullptr); + return nullptr; } diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C index 52a8d6ec2c83bc173d4c412f317c04e76f14a3be..471bbb027fe17d949c7ea844a5e0e7497e219e69 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C @@ -1143,8 +1143,8 @@ Foam::diameterModels::populationBalanceModel::~populationBalanceModel() Foam::autoPtr<Foam::diameterModels::populationBalanceModel> Foam::diameterModels::populationBalanceModel::clone() const { - notImplemented("populationBalance::clone() const"); - return autoPtr<populationBalanceModel>(nullptr); + NotImplemented; + return nullptr; }