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_
57 auto* patchTypeCtor = patchConstructorTable(
p.type());
59 if (actualPatchType.empty() || actualPatchType !=
p.type())
63 return patchTypeCtor(
p, iF);
67 return ctorPtr(
p, iF);
77 tpfld.
ref().patchType() = actualPatchType;
86 const word& patchFieldType,
88 const DimensionedField<Type, areaMesh>& iF
105 word actualPatchType;
109 <<
"patchFieldType = " << patchFieldType
110 <<
" [" << actualPatchType
111 <<
"] : " <<
p.type() <<
" name = " <<
p.name() <<
endl;
113 auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
119 ctorPtr = dictionaryConstructorTable(
"generic");
125 <<
"Unknown patchField type " << patchFieldType
126 <<
" for patch type " <<
p.type() << nl << nl
127 <<
"Valid patchField types are :" << nl
128 << dictionaryConstructorTablePtr_->sortedToc()
129 << exit(FatalIOError);
133 if (actualPatchType.empty() || actualPatchType !=
p.type())
135 auto* patchTypeCtor = dictionaryConstructorTable(
p.type());
137 if (patchTypeCtor && patchTypeCtor != ctorPtr)
140 <<
"inconsistent patch and patchField types for\n"
141 " patch type " <<
p.type()
142 <<
" and patchField type " << patchFieldType
143 <<
exit(FatalIOError);
147 return ctorPtr(
p, iF,
dict);
154 const faPatchField<Type>& ptf,
156 const DimensionedField<Type, areaMesh>& iF,
157 const faPatchFieldMapper& pfMapper
161 <<
"patchFieldType = " << ptf.type()
162 <<
" : " <<
p.type() <<
" name = " <<
p.name() << endl;
164 auto* ctorPtr = patchMapperConstructorTable(ptf.type());
172 *patchMapperConstructorTablePtr_
173 ) << exit(FatalError);
176 auto* patchTypeCtor = patchMapperConstructorTable(
p.type());
180 return patchTypeCtor(ptf,
p, iF, pfMapper);
183 return ctorPtr(ptf,
p, iF, pfMapper);
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static int disallowGenericPatchField
Debug switch to disallow the use of generic faPatchField.
A FieldMapper for finite-area patch fields.
faPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
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 patch and internal field.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
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 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).