Go to the documentation of this file.
34 const word& patchFieldType,
35 const word& actualPatchType,
42 auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType);
44 if (!cstrIter.found())
50 *patchConstructorTablePtr_
54 auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(
p.type());
58 actualPatchType == word::null
59 || actualPatchType !=
p.type()
62 if (patchTypeCstrIter.found())
64 return patchTypeCstrIter()(
p, iF);
68 return cstrIter()(
p, iF);
76 if (patchTypeCstrIter.found())
78 tfap.
ref().patchType() = actualPatchType;
87 const word& patchFieldType,
92 return New(patchFieldType, word::null,
p, iF);
108 auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
110 if (!cstrIter.found())
112 if (!disallowGenericFaPatchField)
114 cstrIter = dictionaryConstructorTablePtr_->cfind(
"generic");
117 if (!cstrIter.found())
120 <<
"Unknown patchField type " << patchFieldType
121 <<
" for patch type " <<
p.type() <<
nl <<
nl
122 <<
"Valid patchField types are :" <<
nl
123 << dictionaryConstructorTablePtr_->sortedToc()
128 auto patchTypeCstrIter = dictionaryConstructorTablePtr_->cfind(
p.type());
130 if (patchTypeCstrIter.found() && *patchTypeCstrIter != *cstrIter)
133 <<
"inconsistent patch and patchField types for \n"
134 <<
" patch type " <<
p.type()
135 <<
" and patchField type " << patchFieldType
139 return cstrIter()(
p, iF,
dict);
154 auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
156 if (!cstrIter.found())
162 *patchMapperConstructorTablePtr_
166 auto patchTypeCstrIter = patchMapperConstructorTablePtr_->cfind(
p.type());
168 if (patchTypeCstrIter.found())
170 return patchTypeCstrIter()(ptf,
p, iF, pfMapper);
173 return cstrIter()(ptf,
p, iF, pfMapper);
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
static tmp< faPatchField< Type > > New(const word &patchFieldType, const word &actualPatchType, const faPatch &, const DimensionedField< Type, areaMesh > &)
Return a pointer to a new patchField created on freestore given.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#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.
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.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...