65void Foam::ensightMesh::clear()
67 cellZoneParts_.clear();
68 faceZoneParts_.clear();
69 boundaryParts_.clear();
73void Foam::ensightMesh::renumber()
77 for (
const label
id : cellZoneParts_.sortedToc())
79 cellZoneParts_[id].index() = partNo++;
82 for (
const label
id : boundaryParts_.sortedToc())
84 boundaryParts_[id].index() = partNo++;
87 for (
const label
id : faceZoneParts_.sortedToc())
89 faceZoneParts_[id].index() = partNo++;
143 const wordRes& czMatcher = option().cellZoneSelection();
144 const wordRes& fzMatcher = option().faceZoneSelection();
150 option().useCellZones()
151 && (!czMatcher.
empty() || option().useInternalMesh())
153 ? mesh_.cellZones().names()
168 option().useFaceZones()
169 ? mesh_.faceZones().names()
184 option().useBoundaryMesh()
191 option().useBoundaryMesh()
195 option().patchSelection(),
196 option().patchExclude()
210 for (
const label zoneId : czoneIds)
212 const word& zoneName = czNames[zoneId];
213 const cellZone& zn = mesh_.cellZones()[zoneId];
218 cellSelection.
resize(mesh_.nCells());
220 cellSelection.
set(zn);
239 if (option().useInternalMesh() && czMatcher.
empty())
245 if (cellZoneParts_.empty())
251 part.
rename(
"internalMesh");
265 cellSelection.
flip();
273 part.
rename(
"internalMesh");
275 part.
classify(mesh_, cellSelection);
289 else if (cellSelection.
none())
301 excludeFace.
resize(mesh_.nFaces());
303 const labelList& owner = mesh_.faceOwner();
307 const label celli = owner[facei];
309 if (!cellSelection.
test(celli))
311 excludeFace.
set(facei);
323 excludeFace.
resize(mesh_.nFaces());
325 for (
const polyPatch&
p : mesh_.boundaryMesh())
327 const auto* procPatch = isA<processorPolyPatch>(
p);
329 if (isA<emptyPolyPatch>(
p))
331 excludeFace.
set(
p.range());
333 else if (procPatch && !procPatch->owner())
336 excludeFace.
set(
p.range());
348 if (isA<emptyPolyPatch>(
p))
353 else if (isA<processorPolyPatch>(
p))
388 for (
const label zoneId : fzoneIds)
390 const word& zoneName = fzNames[zoneId];
391 const faceZone& zn = mesh_.faceZones()[zoneId];
418 faceZoneParts_.erase(zoneId);
424 needsUpdate_ =
false;
435 for (
const label
id : cellZoneParts_.sortedToc())
437 cellZoneParts_[id].write(
os, mesh_, parallel);
441 for (
const label
id : boundaryParts_.sortedToc())
443 boundaryParts_[id].write(
os, mesh_, parallel);
447 for (
const label
id : faceZoneParts_.sortedToc())
449 faceZoneParts_[id].write(
os, mesh_, parallel);
void resize(const label len)
Adjust allocated size of list.
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
void resize(const label numElem, const unsigned int val=0u)
Reset addressable list size, does not shrink the allocated size.
void clearStorage()
Clear the list and delete storage.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void flip()
Invert all bits in the addressable region.
void set(const bitSet &bitset)
Set specified bits from another bitset.
bool none() const
True if no bits in this bitset are set.
bool test(const label pos) const
Test value at specified position, never auto-vivify entries.
bool any() const
True if any bits in this bitset are set.
Sorting/classification of cells (3D) into corresponding ensight element types.
void reduce()
Sum element counts across all processes.
void classify(const polyMesh &mesh)
Classify cell types and set the element lists.
void clear()
Set addressable sizes to zero, free up addressing memory.
InfoProxy< ensightCells > info() const
Return info proxy.
Sorting/classification of faces (2D) into corresponding ensight types.
void classify(const UList< face > &faces)
Classify the face types and set the element lists.
void reduce()
Sum element counts across all processes.
label total() const
The global size of all element types.
void clear()
Set addressable sizes to zero, free up addressing memory.
InfoProxy< ensightFaces > info() const
Return info proxy.
Specialized Ensight output with extra geometry file header.
Configuration options for the ensightMesh.
Encapsulation of volume meshes for writing in ensight format. It manages cellZones,...
void correct()
Update for new mesh.
int verbose() const noexcept
Output verbosity level.
const ensightMesh::options & option() const
Reference to the writer/mesh options.
static const label internalZone
The zone-id for internal mesh or unzoned cells.
void rename(const string &value)
Change the part name or description.
label identifier() const noexcept
OpenFOAM identifier (patch, zone, etc), -1 when not in use.
A subset of mesh faces organised as a primitive patch.
const boolList & flipMap() const noexcept
Return face flip map.
virtual bool write()
Write the output fields.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
label nNonProcessor() const
The number of patches before the first processor patch.
wordList names() const
Return a list of patch names.
bool checkParallelSync(const bool report=false) const
Check whether all procs have all patches and in same order.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
A List of wordRe with additional matching capabilities.
labelList matching(const UList< StringType > &input, const bool invert=false) const
Return list indices for all matches.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
labelList findMatching(const StringListType &input, const wordRes::filter &pred, AccessOp aop=identityOp())
Return ids for items with matching names.
List< word > wordList
A List of words.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
IntListType renumber(const labelUList &oldToNew, const IntListType &input)
Renumber the values (not the indices) of a list.
static wordList nonProcessorPatchNames(const polyBoundaryMesh &bmesh)
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
wordList patchNames(nPatches)
#define forAll(list, i)
Loop across all elements in list.