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 if (actualPatchType.empty() || actualPatchType !=
p.type())
59 auto* patchTypeCtor = patchConstructorTable(
p.type());
63 return patchTypeCtor(
p, iF);
67 return ctorPtr(
p, iF);
74 const word& patchFieldType,
76 const DimensionedField<Type, surfaceMesh>& iF
97 <<
"patchFieldType = " << patchFieldType
98 <<
" [" << actualPatchType
99 <<
"] : " <<
p.type() <<
" name = " <<
p.name() <<
endl;
101 auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
107 ctorPtr = dictionaryConstructorTable(
"generic");
113 <<
"Unknown patchField type " << patchFieldType
114 <<
" for patch type " <<
p.type() << nl << nl
115 <<
"Valid patchField types :" << endl
116 << dictionaryConstructorTablePtr_->sortedToc()
117 << exit(FatalIOError);
121 if (actualPatchType.empty() || actualPatchType !=
p.type())
123 auto* patchTypeCtor = dictionaryConstructorTable(
p.type());
125 if (patchTypeCtor && patchTypeCtor != ctorPtr)
128 <<
"inconsistent patch and patchField types for\n"
129 " patch type " <<
p.type()
130 <<
" and patchField type " << patchFieldType
131 <<
exit(FatalIOError);
135 return ctorPtr(
p, iF,
dict);
142 const fvsPatchField<Type>& ptf,
144 const DimensionedField<Type, surfaceMesh>& iF,
145 const fvPatchFieldMapper& pfMapper
149 <<
"patchFieldType = " << ptf.type()
150 <<
" : " <<
p.type() <<
" name = " <<
p.name() << endl;
152 auto* ctorPtr = patchMapperConstructorTable(ptf.type());
160 *patchMapperConstructorTablePtr_
161 ) << exit(FatalError);
164 auto* patchTypeCtor = patchMapperConstructorTable(
p.type());
168 return patchTypeCtor(ptf,
p, iF, pfMapper);
171 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,...
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static int disallowGenericPatchField
Debug switch to disallow the use of generic fvsPatchField.
fvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
static tmp< fvsPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Return a pointer to a new patchField created on freestore given.
A class for managing temporary objects.
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).