48 bool parallel = Pstream::parRun();
59 for (
const label zoneId : cellZoneParts.
sortedToc())
63 ensightOutput::writeField(
os, vf, part, parallel);
72 if (patchId < 0 || patchId >= bmesh.
size())
89 ensightOutput::writeField
100 if (faceZoneParts.
empty())
114 const polyPatch& pp = bm[patchi].patch();
117 if (isA<processorFvPatch>(bm[patchi]))
127 ) = (0.5 * (bf.patchInternalField() + bf));
129 else if (!isA<emptyFvPatch>(bm[patchi]))
147 const auto& sfld = tsfld();
155 maxLen =
max(maxLen, iter.val().size());
164 for (
const label zoneId : faceZoneParts.
sortedToc())
173 values.resize(part.
size());
176 auto valIter = values.begin();
192 ensightOutput::Detail::writeFaceSubField(
os, values, part, parallel);
207 bool parallel = Pstream::parRun();
218 for (
const label zoneId : cellZoneParts.
sortedToc())
222 if (Pstream::master())
230 ensightOutput::Detail::writeFieldComponents
233 ensightFile::coordinates,
247 if (Pstream::master())
258 const auto* vpp = isA<Field<Type>>(bfld);
268 for (label& pointi : uniquePointLabels)
273 ensightOutput::Detail::writeFieldComponents
276 ensightFile::coordinates,
283 ensightOutput::Detail::writeFieldComponents
286 ensightFile::coordinates,
296 for (
const label zoneId : faceZoneParts.
sortedToc())
300 if (Pstream::master())
312 ensightOutput::Detail::writeFieldComponents
315 ensightFile::coordinates,
334 const bool nodeValues
341 volPointInterpolation::New(vf.
mesh()).interpolate(vf)
343 pfld.
ref().checkOut();
346 return ensightOutput::writePointField<Type>(
os, pfld, ensMesh);
349 return ensightOutput::writeVolField<Type>(
os, vf, ensMesh);
const Mesh & mesh() const
Return mesh.
Generic templated field type.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
bool empty() const noexcept
True if the hash table is empty.
const word & name() const noexcept
Return the object name.
A HashTable to objects of type <T> with a label key.
const Map< label > & meshPointMap() const
Mesh point map.
A List obtained as a section of another List.
A List with indirect addressing. Like IndirectList but does not store addressing.
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of elements in the list.
Sorting/classification of cells (3D) into corresponding ensight element types.
label uniqueMeshPoints(const polyMesh &mesh, labelList &uniqueMeshPointLabels, bool parallel) const
Globally unique mesh points. Required when writing point fields.
Sorting/classification of faces (2D) into corresponding ensight types.
void decrFaceIds(const label off)
Decrease face ids by specified offset value.
label uniqueMeshPoints(const polyMesh &mesh, labelList &uniqueMeshPointLabels, bool parallel) const
const labelList & faceIds() const noexcept
Processor-local face ids of all elements.
label size(const elemType etype) const
Processor-local size of the specified element type.
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
Encapsulation of volume meshes for writing in ensight format. It manages cellZones,...
const Map< ensightFaces > & boundaryParts() const noexcept
Face elements per selected patch, lookup by patch index.
const Map< ensightCells > & cellZoneParts() const noexcept
Face elements per selected patch, lookup by patch index.
const polyMesh & mesh() const noexcept
Reference to the underlying polyMesh.
const Map< ensightFaces > & faceZoneParts() const noexcept
Face elements per faceZone, lookup by zone index.
label index() const noexcept
The index in a list (0-based)
Mesh data needed to do the Finite Volume discretisation.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
label start() const noexcept
The start label of boundary faces in the polyMesh face list.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
label offset() const
The offset where this patch starts in the boundary face list.
A class for managing temporary objects.
A collection of functions for writing volField content in ensight format.
OBJstream os(runTime.globalPath()/outputName)
bool writeVolField(ensightFile &os, const GeometricField< Type, fvPatchField, volMesh > &vf, const ensightMesh &ensMesh)
Write volume field component-wise.
bool writePointField(ensightFile &os, const GeometricField< Type, pointPatchField, pointMesh > &pf, const ensightMesh &ensMesh)
Write point field component-wise.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.