34 const word& patchFieldType,
35 const word& actualPatchType,
41 <<
"patchFieldType = " << patchFieldType
42 <<
" [" << actualPatchType
43 <<
"] : " <<
p.type() <<
" name = " <<
p.name() <<
endl;
45 auto* ctorPtr = patchConstructorTable(patchFieldType);
53 *patchConstructorTablePtr_
59 if (actualPatchType.empty() || actualPatchType !=
p.type())
66 auto* patchTypeCtor = patchConstructorTable(
p.type());
71 <<
"Inconsistent patch and patchField types for\n"
72 <<
" patch type " <<
p.type()
73 <<
" and patchField type " << patchFieldType
77 return patchTypeCtor(
p, iF);
82 if (patchConstructorTablePtr_->found(
p.type()))
84 tpfld.
ref().patchType() = actualPatchType;
95 const word& patchFieldType,
97 const DimensionedField<Type, pointMesh>& iF
114 word actualPatchType;
118 <<
"patchFieldType = " << patchFieldType
119 <<
" [" << actualPatchType
120 <<
"] : " <<
p.type() <<
" name = " <<
p.name() <<
endl;
122 auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
128 ctorPtr = dictionaryConstructorTable(
"generic");
134 <<
"Unknown patchField type " << patchFieldType
135 <<
" for patch type " <<
p.type() << nl << nl
136 <<
"Valid patchField types :" << endl
137 << dictionaryConstructorTablePtr_->sortedToc()
138 << exit(FatalIOError);
143 autoPtr<pointPatchField<Type>> tpfld(ctorPtr(
p, iF,
dict));
145 if (actualPatchType.empty() || actualPatchType !=
p.type())
147 if (tpfld().constraintType() !=
p.constraintType())
152 auto* patchTypeCtor = dictionaryConstructorTable(
p.type());
157 <<
"Inconsistent patch and patchField types for\n"
158 <<
" patch type " <<
p.type()
159 <<
" and patchField type " << patchFieldType
160 <<
exit(FatalIOError);
163 return patchTypeCtor(
p, iF,
dict);
174 const pointPatchField<Type>& ptf,
176 const DimensionedField<Type, pointMesh>& iF,
177 const pointPatchFieldMapper& pfMapper
181 <<
"patchFieldType = " << ptf.type()
182 <<
" : " <<
p.type() <<
" name = " <<
p.name() << endl;
184 auto* ctorPtr = patchMapperConstructorTable(ptf.type());
192 *patchMapperConstructorTablePtr_
193 ) << exit(FatalError);
196 return ctorPtr(ptf,
p, iF, pfMapper);
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
T & ref()
Return reference to the managed object without nullptr checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual const word & constraintType() const
The constraint type the pointPatchField implements.
static int disallowGenericPatchField
Debug switch to disallow the use of generic pointPatchField.
Foam::pointPatchFieldMapper.
static autoPtr< pointPatchField< Type > > New(const word &patchFieldType, const pointPatch &p, const DimensionedField< Type, pointMesh > &iF)
Return a pointer to a new patchField created on freestore given.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Basic pointPatch represents a set of points from the mesh.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define DebugInFunction
Report an information message using Foam::Info.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).