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())
61 if (tpfld().constraintType() !=
p.constraintType())
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,
100 return New(patchFieldType, word::null,
p, iF);
114 word actualPatchType;
115 dict.readIfPresent(
"patchType", actualPatchType, keyType::LITERAL);
118 <<
"patchFieldType = " << patchFieldType
119 <<
" [" << actualPatchType
120 <<
"] : " <<
p.type() <<
" name = " <<
p.name() <<
endl;
122 auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
126 if (!pointPatchFieldBase::disallowGenericPatchField)
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()
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
163 return patchTypeCtor(
p, iF,
dict);
181 <<
"patchFieldType = " << ptf.type()
182 <<
" : " <<
p.type() <<
" name = " <<
p.name() <<
endl;
184 auto* ctorPtr = patchMapperConstructorTable(ptf.type());
192 *patchMapperConstructorTablePtr_
196 return ctorPtr(ptf,
p, iF, pfMapper);
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Foam::pointPatchFieldMapper.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
Abstract base class for point-mesh patch fields.
A class for handling words, derived from Foam::string.
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.
#define DebugInFunction
Report an information message using Foam::Info.
T & ref()
Return reference to the managed object without nullptr checking.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Basic pointPatch represents a set of points from the mesh.
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...
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...