31 template<
class PatchFieldType,
class FieldType>
34 const PatchFieldType& field,
40 const polyPatch& pp = field.patch().patch();
42 if (!isA<mappedPatchBaseBase>(pp))
45 str <<
"Field " << iF.
name() <<
" of type "
46 << field.
type() <<
" cannot apply to patch " << pp.
name()
47 <<
" of type " << pp.type()
48 <<
", which should be a " << typeName <<
" type";
54 refCast<const mappedPatchBaseBase>(pp).validateForField
64 template<
class PatchFieldType,
class FieldType>
67 const PatchFieldType& field,
73 const bool isNotRegion = !sameRegion() && (froms & from::sameRegion);
74 const bool isRegion = sameRegion() && (froms & from::differentRegion);
75 const bool isPatch = samePatch() && (froms & from::differentPatch);
79 if (isNotRegion || isRegion || isPatch)
81 str <<
"Field " << iF.
name() <<
" of type "
82 << field.
type() <<
" cannot apply to patch " << patch_.name()
83 <<
" because values are mapped from ";
88 str <<
"a different region";
92 str <<
"within the same region";
96 str <<
"the same patch";
99 if (isNotRegion || isRegion || isPatch)
virtual const fileName & name() const
Return the name of the stream.
Output to memory buffer stream.
string str() const
Return the string.
A list of keyword definitions, which are a keyword followed by any number of values (e....
fileType type(const bool checkVariants=true, const bool followLink=true) const
Return the file type: file, directory, undefined or.
void validateForField(const PatchField &field, const FieldType &iF, const dictionary &context, const label froms=from::any) const
Validate that the map is appropriate for the given.
static void validateMapForField(const PatchField &field, const FieldType &iF, const dictionary &context, const label froms=from::any)
Validate that the map exists and is appropriate for the given.
const word & name() const
Return name.
A patch is a list of labels that address the faces in the global face list.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
string breakIntoIndentedLines(const string &str, const string::size_type nLength=80, const string::size_type nIndent=0)
Break a string up into indented lines.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.