39 void Foam::nonConformalPolyPatch::validateSize()
const
41 if (patch_.
size() != 0)
44 <<
"Patch " << patch_.
name() <<
" has " << patch_.
size()
45 <<
" faces. Patches of type " << patch_.type()
55 if (origPatchIndex_ != -1)
57 origPatchName_ = newNames[origPatchIndex_];
62 <<
"Cannot rename " << nonConformalPolyPatch::typeName
63 <<
" without the original patch index"
71 if (origPatchIndex_ != -1)
73 origPatchIndex_ =
findIndex(newToOldIndex, origPatchIndex_);
83 origPatchName_(
word::null),
93 const word& origPatchName
97 origPatchName_(origPatchName),
111 origPatchName_(
dict.lookup<
word>(
"originalPatch")),
125 origPatchName_(ncPatch.origPatchName_),
148 return origPatchName_;
154 if (origPatchIndex_ == -1)
156 origPatchIndex_ = patch_.boundaryMesh().findIndex(origPatchName());
158 if (origPatchIndex_ == -1)
161 <<
"Illegal neighbourPatch name " << origPatchName()
162 <<
endl <<
"Valid patch names are "
163 << patch_.boundaryMesh().names()
167 const polyPatch&
p = patch_.boundaryMesh()[origPatchIndex_];
169 if (isA<nonConformalPolyPatch>(
p))
172 <<
"The originalPatch for the "
173 << patch_.type() <<
" patch " << patch_.name() <<
" is "
174 <<
p.
name() <<
" which is also of "
175 << nonConformalPolyPatch::typeName <<
" type. This is not "
176 <<
"allowed. The originalPatch must be of a non-"
177 << nonConformalPolyPatch::typeName <<
" type."
182 return origPatchIndex_;
194 writeEntry(os,
"originalPatch", origPatchName_);
const word & name() const
Return name.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label size() const
Return the number of elements in the UList.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const word & name() const
Return name.
A patch is a list of labels that address the faces in the global face list.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.