Go to the documentation of this file.
44 void Foam::ensightMesh::clear()
47 boundaryPatchFaces_.clear();
48 faceZoneFaces_.clear();
50 globalPointsPtr_.clear();
56 Foam::ensightMesh::ensightMesh
79 Foam::ensightMesh::ensightMesh
134 if (useInternalMesh())
136 meshCells_.index() = nParts++;
137 meshCells_.classify(mesh_);
140 globalPointsPtr_ = mesh_.globalData().mergePoints
149 if (useBoundaryMesh())
152 mesh_.boundaryMesh().checkParallelSync(
true);
161 const wordRes& matcher = option().patchSelection();
177 ensightFaces& ensFaces = boundaryPatchFaces_(patchName);
196 if (ensFaces.
total())
198 patchLookup_.set(
patchId, patchName);
199 ensFaces.
index() = nParts++;
203 boundaryPatchFaces_.erase(patchName);
213 if (option().useFaceZones())
216 bitSet excludeFace(mesh_.nFaces());
220 const auto* procPatch = isA<processorPolyPatch>(pp);
222 if (isA<emptyPolyPatch>(pp))
224 excludeFace.set(pp.range());
226 else if (procPatch && !procPatch->owner())
229 excludeFace.set(pp.range());
235 mesh_.faceZones().sortedNames(option().faceZoneSelection());
238 for (
const word& zoneName : zoneNames)
240 const label zoneID = mesh_.faceZones().findZoneID(zoneName);
260 if (ensFaces.
total())
262 ensFaces.
index() = nParts++;
266 faceZoneFaces_.erase(zoneName);
271 needsUpdate_ =
false;
280 if (useInternalMesh())
284 const pointField uniquePoints(mesh_.points(), uniquePointMap_);
297 writeCellConnectivity(meshCells_, pointToGlobal_, os);
307 const ensightFaces& ensFaces = boundaryPatchFaces_[patchName];
315 mesh_.globalData().mergePoints
320 uniqueMeshPointLabels
326 for (
face&
f : patchFaces)
335 globalPointsPtr().size(),
336 pointField(mesh_.points(), uniqueMeshPointLabels),
340 writeFaceConnectivity(ensFaces, patchFaces, os);
347 for (
const word& zoneName : faceZoneFaces_.sortedToc())
349 const ensightFaces& ensFaces = faceZoneFaces_[zoneName];
365 mesh_.globalData().mergePoints
370 uniqueMeshPointLabels
377 faceList patchFaces(pp.localFaces());
380 face&
f = patchFaces[facei];
394 globalPointsPtr().size(),
395 pointField(mesh_.points(), uniqueMeshPointLabels),
399 writeFaceConnectivity(ensFaces, patchFaces, os,
true);
const boolList & flipMap() const
Return the processor local flip-map of all elements.
vectorField pointField
pointField is a vectorField.
Encapsulation of volume meshes for writing in ensight format.
Calculates points shared by more than two processor patches or cyclic patches.
A class for handling words, derived from Foam::string.
bool needsUpdate() const
Does the content need an update?
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Template functions to aid in the implementation of demand driven data.
void correct()
Update for new mesh.
static bool & parRun()
Is this a parallel run?
An IOstream is an abstract base class for all input/output systems; be they streams,...
Sorting/classification of faces (2D) into corresponding ensight types.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values (not the indices) of a list.
#define forAll(list, i)
Loop across all elements in list.
label total() const
The global number of all element types.
Combination-Reduction operation for a parallel run. The information from all nodes is collected on th...
void deleteDemandDrivenData(DataPtr &dataPtr)
~ensightMesh()
Destructor.
word format(conversionProperties.get< word >("format"))
Specialized Ensight output with extra geometry file header.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
A subset of mesh faces organised as a primitive patch.
void reduce()
Sum element counts across all processes.
A patch is a list of labels that address the faces in the global face list.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A List with indirect addressing.
wordList patchNames(nPatches)
const labelUList faceIds(const enum elemType) const
Return the (local) face ids of the specified element type.
bool expire()
Mark as needing an update.
void resize(const label newSize)
Adjust allocated size of list.
streamFormat
Data format (ascii | binary)
const labelIOList & zoneID
void classify(const faceList &faces)
Classify the face types, set element list.
Mesh data needed to do the Finite Volume discretisation.
labelList findStrings(const regExp &matcher, const UList< StringType > &input, const bool invert=false)
Return list indices for strings matching the regular expression.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
label index() const
The index in a list.
Configuration options for the ensightMesh.
void clear()
Set addressable sizes to zero, free up addressing memory.
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
A List of wordRe with additional matching capabilities.
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
void write(autoPtr< ensightGeoFile > &os) const
Write to file.
Operations on lists of strings.
A face is a list of labels corresponding to mesh vertices.
const Map< label > & meshPointMap() const
Mesh point map.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
const boolList & flipMap() const
Return face flip map.
void clear()
Set addressable sizes to zero, free up addressing memory.
A list of faces which address into the list of points.