fvsPatchField::New: Improved the error messages to match the updated fvPatchField::New
This commit is contained in:
@ -159,6 +159,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
) << "inconsistent patch and patchField types for \n"
|
||||
<< " patch type " << p.type()
|
||||
<< " and patchField type " << patchFieldType
|
||||
<< " for field " << iF.name()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,6 +117,19 @@ public:
|
||||
(p, iF)
|
||||
);
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
tmp,
|
||||
fvsPatchField,
|
||||
dictionary,
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, surfaceMesh>& iF,
|
||||
const dictionary& dict
|
||||
),
|
||||
(p, iF, dict)
|
||||
);
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
tmp,
|
||||
@ -131,19 +144,6 @@ public:
|
||||
(dynamic_cast<const fvsPatchFieldType&>(ptf), p, iF, m)
|
||||
);
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
tmp,
|
||||
fvsPatchField,
|
||||
dictionary,
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, surfaceMesh>& iF,
|
||||
const dictionary& dict
|
||||
),
|
||||
(p, iF, dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
@ -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<Type>> Foam::fvsPatchField<Type>::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<Type>> Foam::fvsPatchField<Type>::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<Type>> Foam::fvsPatchField<Type>::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<Type>> Foam::fvsPatchField<Type>::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);
|
||||
|
||||
Reference in New Issue
Block a user