60 Pout<<
"void attachPolyTopoChanger::attach(): "
61 <<
"Attaching mesh" <<
endl;
65 const fileName oldInst = mesh_.facesInstance();
79 if (removeEmptyPatches)
85 label nNewPatches = 0;
89 const word& patchName = oldPatches[patchi].name();
96 oldPatches[patchi].clone
100 oldPatches[patchi].size(),
101 oldPatches[patchi].start()
111 Pout<<
"Removing zero-sized patch " << patchi
112 <<
" named " << patchName <<
endl;
117 newPatches.resize(nNewPatches);
119 mesh_.removeBoundary();
120 mesh_.addPatches(newPatches);
124 mesh_.setInstance(oldInst);
128 Pout<<
"void attachPolyTopoChanger::attach(): "
129 <<
"Finished attaching mesh" <<
endl;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
Foam::PtrList< polyMeshModifier > clone(Args &&... args) const
void resize(const label newLen)
Adjust size of PtrList.
label size() const noexcept
The number of entries in the list.
void attach(const bool removeEmptyPatches=true)
Attach mesh. By default filter out empty patches.
attachPolyTopoChanger(const attachPolyTopoChanger &)=delete
No copy construct.
A class for handling file names.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
label start() const noexcept
The start label of boundary faces in the polyMesh face list.
Mesh consisting of general polyhedral cells.
const polyMesh & mesh() const
Return the mesh reference.
polyMesh & mesh_
Reference to mesh.
autoPtr< mapPolyMesh > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
A class for handling words, derived from Foam::string.
Namespace for handling debugging switches.
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
bool returnReduceOr(const bool value, const int communicator=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.