Go to the documentation of this file.
68 Foam::faBoundaryMesh::faBoundaryMesh
80 readOpt() == IOobject::MUST_READ
81 || readOpt() == IOobject::MUST_READ_IF_MODIFIED
85 warnNoRereading<faBoundaryMesh>();
90 Istream& is = readStream(typeName);
93 patches.setSize(patchEntries.size());
102 patchEntries[patchi].keyword(),
103 patchEntries[patchi].
dict(),
117 Foam::faBoundaryMesh::faBoundaryMesh
142 operator[](patchi).initGeometry();
147 operator[](patchi).calcGeometry();
161 list.set(patchi, &
patches[patchi].edgeFaces());
180 list.set(patchi, lduPtr);
196 if (isA<processorFaPatch>(
p))
228 label beg = mesh_.nInternalEdges();
231 const label len =
patches[patchi].nEdges();
242 PtrListOps::get<label>
245 [](
const faPatch&
p) {
return p.nEdges(); }
256 label beg = mesh_.nInternalEdges();
259 const label len =
patches[patchi].nEdges();
260 list[patchi].reset(beg, len);
269 return mesh_.nInternalEdges();
275 return mesh_.nBoundaryEdges();
281 return labelRange(mesh_.nInternalEdges(), mesh_.nBoundaryEdges());
327 else if (matcher.size() == 1)
329 return this->indices(matcher.first(), useGroups);
348 if (patchName.empty())
363 if (edgeIndex <
mesh().nInternalEdges())
367 else if (edgeIndex >=
mesh().nEdges())
370 <<
"Edge " << edgeIndex
371 <<
" out of bounds. Number of geometric edges " <<
mesh().
nEdges()
377 label start = mesh_.patchStarts()[patchi];
378 label size = operator[](patchi).faPatch::size();
383 && edgeIndex < start + size
392 <<
"error in patch search algorithm"
404 bool hasError =
false;
408 if (bm[patchi].start() != nextPatchStart && !hasError)
413 <<
" ****Problem with boundary patch " << patchi
414 <<
" named " << bm[patchi].
name()
415 <<
" of type " << bm[patchi].type()
416 <<
". The patch should start on face no " << nextPatchStart
417 <<
" and the patch specifies " << bm[patchi].
start()
419 <<
"Possibly consecutive patches have this same problem."
420 <<
" Suppressing future warnings." <<
endl;
425 nextPatchStart += bm[patchi].faPatch::size();
431 <<
"This mesh is not valid: boundary definition is in error."
438 Info <<
"Boundary definition OK." <<
endl;
452 (void)mesh_.pointAreaNormals();
474 patches[patchi].initUpdateMesh();
int debug
Static debugging option.
List< label > labelList
A List of labels.
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,...
bool isPattern() const noexcept
The wordRe is treated as a pattern, not as literal string.
#define InfoInFunction
Report an information message using Foam::Info.
void updateMesh()
Correct faBoundaryMesh after topology update.
A class for handling words, derived from Foam::string.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) patch indices for all matches.
bool writeData(Ostream &os) const
The writeData member function required by regIOobject.
bool checkDefinition(const bool report=false) const
Check boundary definition.
labelList patchSizes() const
Return a list of patch sizes (number of edges in each patch)
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
List< labelRange > patchRanges() const
Return a list of patch ranges.
void calcGeometry()
Calculate the geometry for the patches.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
label nEdges() const
Number of mesh edges.
labelList findMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Extract list indices for all items with 'name()' that matches.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Functions to operate on Pointer Lists.
UPtrList< const labelUList > edgeFaces() const
Return a list of edgeFaces for each patch.
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.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
#define forAll(list, i)
Loop across all elements in list.
bool good() const noexcept
True if next operation might succeed.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
label findIndex(const wordRe &key) const
Return patch index for the first match, return -1 if not found.
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 (stdout output on master, null elsewhere)
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
The IOstreamOption is a simple container for options an IOstream can normally have.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
A range or interval of labels defined by a start and a size.
Extract name (as a word) from an object, typically using its name() method.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
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.
OBJstream os(runTime.globalPath()/outputName)
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
errorManip< error > abort(error &err)
label nEdges() const
The number of boundary edges for the underlying mesh.
void movePoints(const pointField &p)
Correct polyBoundaryMesh after moving points.
label start() const
The start label of the edges in the faMesh edges list.
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.
const word & name() const noexcept
Return name.
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.
label nNonProcessor() const
The number of patches before the first processor patch.
A List of wordRe with additional matching capabilities.
labelRange range() const
The edge range for all boundary edges.
label firstMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Find first list item with 'name()' that matches, -1 on failure.
const polyBoundaryMesh & patches
Finite area mesh. Used for 2-D non-Euclidian finite area method.
PtrList< faPatch > faPatchList
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Begin list [isseparator].
Finite area patch class. Used for 2-D non-Euclidian finite area method.
defineTypeNameAndDebug(combustionModel, 0)
Extract type (as a word) from an object, typically using its type() method.
labelList patchStarts() const
Return a list of patch start indices.
lduInterfacePtrsList interfaces() const