diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C index 874cf72c50..766b0f391b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C @@ -159,6 +159,7 @@ Foam::autoPtr> Foam::pointPatchField::New ) << "inconsistent patch and patchField types for \n" << " patch type " << p.type() << " and patchField type " << patchFieldType + << " for field " << iF.name() << exit(FatalIOError); } } diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index 3673597042..d2f5e5ed85 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -117,6 +117,19 @@ public: (p, iF) ); + declareRunTimeSelectionTable + ( + tmp, + fvsPatchField, + dictionary, + ( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict + ), + (p, iF, dict) + ); + declareRunTimeSelectionTable ( tmp, @@ -131,19 +144,6 @@ public: (dynamic_cast(ptf), p, iF, m) ); - declareRunTimeSelectionTable - ( - tmp, - fvsPatchField, - dictionary, - ( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict - ), - (p, iF, dict) - ); - // Constructors diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C index 11b6219109..c8f574a030 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,11 +49,12 @@ Foam::tmp> Foam::fvsPatchField::New if (cstrIter == patchConstructorTablePtr_->end()) { FatalErrorInFunction - << "Unknown patchField type " - << patchFieldType << nl << nl - << "Valid patchField types are :" << endl + << "Unknown null-constructable patchField type " << patchFieldType + << " for patch " << p.name() << " of type " << p.type() + << " for field " << iF.name() << nl << nl + << "Valid null-constructable patchField types are :" << endl << patchConstructorTablePtr_->sortedToc() - << exit(FatalError); + << abort(FatalError); } if @@ -129,7 +130,8 @@ Foam::tmp> Foam::fvsPatchField::New ( dict ) << "Unknown patchField type " << patchFieldType - << " for patch type " << p.type() << nl << nl + << " for patch " << p.name() << " of type " << p.type() + << " for field " << iF.name() << nl << nl << "Valid patchField types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -157,6 +159,7 @@ Foam::tmp> Foam::fvsPatchField::New ) << "inconsistent patch and patchField types for \n" " patch type " << p.type() << " and patchField type " << patchFieldType + << " for field " << iF.name() << exit(FatalIOError); } } @@ -185,7 +188,9 @@ Foam::tmp> Foam::fvsPatchField::New if (cstrIter == patchMapperConstructorTablePtr_->end()) { FatalErrorInFunction - << "Unknown patchField type " << ptf.type() << nl << nl + << "Unknown patchField type " << ptf.type() + << " for patch " << p.name() << " of type " << p.type() + << " for field " << iF.name() << nl << nl << "Valid patchField types are :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError);