Go to the documentation of this file.
45 template<
class ListType,
class GetOp>
52 const label len = list.size();
56 for (label i = 0; i < len; ++i)
58 output[i] = getop(list[i]);
66 template<
class UnaryMatchPredicate>
70 const UnaryMatchPredicate& matcher
73 const label len = list.size();
78 for (label i = 0; i < len; ++i)
80 if (matcher(list[i].
name()))
93 template<
class UnaryMatchPredicate>
97 const UnaryMatchPredicate& matcher
100 const label len = list.size();
102 for (label i = 0; i < len; ++i)
104 if (matcher(list[i].
name()))
118 Foam::faBoundaryMesh::faBoundaryMesh
128 if (readOpt() == IOobject::MUST_READ)
133 Istream& is = readStream(typeName);
136 patches.setSize(patchEntries.size());
145 patchEntries[patchi].keyword(),
146 patchEntries[patchi].
dict(),
160 Foam::faBoundaryMesh::faBoundaryMesh
185 operator[](patchi).initGeometry();
190 operator[](patchi).calcGeometry();
205 forAll(interfaces, patchi)
207 if (isA<lduInterface>(this->
operator[](patchi)))
212 &refCast<const lduInterface>(this->
operator[](patchi))
246 const regExp matcher(key);
255 const word& matcher = key;
284 const word& matcher = key;
292 if (patchName.empty())
307 if (edgeIndex <
mesh().nInternalEdges())
311 else if (edgeIndex >=
mesh().nEdges())
314 <<
"Edge " << edgeIndex
315 <<
" out of bounds. Number of geometric edges " <<
mesh().
nEdges()
321 label start = mesh_.patchStarts()[patchi];
322 label size = operator[](patchi).faPatch::size();
327 && edgeIndex < start + size
336 <<
"error in patch search algorithm"
348 bool hasError =
false;
352 if (bm[patchi].start() != nextPatchStart && !hasError)
357 <<
" ****Problem with boundary patch " << patchi
358 <<
" named " << bm[patchi].
name()
359 <<
" of type " << bm[patchi].type()
360 <<
". The patch should start on face no " << nextPatchStart
361 <<
" and the patch specifies " << bm[patchi].start()
363 <<
"Possibly consecutive patches have this same problem."
364 <<
" Suppressing future warnings." <<
endl;
369 nextPatchStart += bm[patchi].faPatch::size();
375 <<
"This mesh is not valid: boundary definition is in error."
382 Info <<
"Boundary definition OK." <<
endl;
396 (void)mesh_.pointAreaNormals();
418 patches[patchi].initUpdateMesh();
int debug
Static debugging option.
List< label > labelList
A List of labels.
General get operation to extract the 'type' from an object as a word.
label whichPatch(const label edgeIndex) const
Return patch index for a given edge label.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
#define InfoInFunction
Report an information message using Foam::Info.
void updateMesh()
Correct faBoundaryMesh after topology update.
static Ostream & output(Ostream &os, const IntRange< T > &range)
const word & name() const
Return name.
A class for handling words, derived from Foam::string.
bool checkDefinition(const bool report=false) const
Check boundary definition.
bool isPattern() const
The keyType is treated as a pattern, not as literal string.
void calcGeometry()
Calculate the geometry for the patches.
label nEdges() const
Number of mesh edges.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Ostream & endl(Ostream &os)
Add newline and flush stream.
void movePoints(const pointField &)
Correct faBoundaryMesh after moving points.
const vectorField & pointAreaNormals() const
Return point area normals.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
label findIndex(const keyType &key) const
Return patch index for the first match, return -1 if not found.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
#define forAll(list, i)
Loop across all elements in list.
label findIndexImpl(const faPatchList &list, const UnaryMatchPredicate &matcher)
static labelList indicesImpl(const faPatchList &list, const UnaryMatchPredicate &matcher)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
A class for handling keywords in dictionaries.
Finite area boundary mesh.
wordList names() const
Return a list of patch names.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Wrapper around C++11 regular expressions.
virtual Ostream & endBlock()
Write end block group.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
label findPatchID(const word &patchName) const
Find patch index given a name, return -1 if not found.
General get operation to extract the 'name' from an object as a word.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
errorManip< error > abort(error &err)
void movePoints(const pointField &p)
Correct polyBoundaryMesh after moving points.
const faMesh & mesh() const
Return the mesh reference.
void updateMesh()
Correct polyBoundaryMesh after topology update.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
wordList types() const
Return a list of patch types.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const T * set(const label i) const
Return const pointer to element (can be nullptr),.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const polyBoundaryMesh & patches
Finite area mesh. Used for 2-D non-Euclidian finite area method.
bool writeData(Ostream &) const
writeData member function required by regIOobject
PtrList< faPatch > faPatchList
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool good() const
Return true if next operation might succeed.
labelList indices(const keyType &key, const bool useGroups=false) const
Return patch indices for all matches.
Begin list [isseparator].
Finite area patch class. Used for 2-D non-Euclidian finite area method.
defineTypeNameAndDebug(combustionModel, 0)
static ListType getMethodImpl(const faPatchList &list, const GetOp &getop)
lduInterfacePtrsList interfaces() const