Go to the documentation of this file.
34 const word& patchFieldType,
35 const word& actualPatchType,
42 auto cstrIter = pointPatchConstructorTablePtr_->cfind(patchFieldType);
44 if (!cstrIter.found())
50 *pointPatchConstructorTablePtr_
58 actualPatchType == word::null
59 || actualPatchType !=
p.type()
62 if (pfPtr().constraintType() !=
p.constraintType())
65 auto patchTypeCstrIter =
66 pointPatchConstructorTablePtr_->cfind(
p.type());
68 if (!patchTypeCstrIter.found())
71 <<
"inconsistent patch and patchField types for \n"
72 <<
" patch type " <<
p.type()
73 <<
" and patchField type " << patchFieldType
77 return patchTypeCstrIter()(
p, iF);
82 if (pointPatchConstructorTablePtr_->found(
p.type()))
84 pfPtr().patchType() = actualPatchType;
95 const word& patchFieldType,
100 return New(patchFieldType, word::null,
p, iF);
116 auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
118 if (!cstrIter.found())
120 if (!disallowGenericPointPatchField)
122 cstrIter = dictionaryConstructorTablePtr_->cfind(
"generic");
125 if (!cstrIter.found())
128 <<
"Unknown patchField type " << patchFieldType
129 <<
" for patch type " <<
p.type() <<
nl <<
nl
130 <<
"Valid patchField types :" <<
endl
131 << dictionaryConstructorTablePtr_->sortedToc()
141 !
dict.found(
"patchType")
142 ||
dict.get<
word>(
"patchType") !=
p.type()
145 if (pfPtr().constraintType() ==
p.constraintType())
153 auto patchTypeCstrIter
154 = dictionaryConstructorTablePtr_->cfind(
p.type());
156 if (!patchTypeCstrIter.found())
159 <<
"Inconsistent patch and patchField types for\n"
160 <<
" patch type " <<
p.type()
161 <<
" and patchField type " << patchFieldType
165 return patchTypeCstrIter()(
p, iF,
dict);
169 return cstrIter()(
p, iF,
dict);
184 auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
186 if (!cstrIter.found())
192 *patchMapperConstructorTablePtr_
196 return cstrIter()(ptf,
p, iF, pfMapper);
A class for handling words, derived from Foam::string.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Basic pointPatch represents a set of points from the mesh.
Abstract base class for point-mesh patch fields.
Foam::pointPatchFieldMapper.
#define DebugInFunction
Report an information message using Foam::Info.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
static autoPtr< pointPatchField< Type > > New(const word &, const pointPatch &, const DimensionedField< Type, pointMesh > &)
Return a pointer to a new patchField created on freestore given.
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...