38#ifndef Foam_ensightOutput_H
39#define Foam_ensightOutput_H
66template<
class T,
class Addr,
class AccessOp>
76 for (
const T& sub : lists)
78 *out = aop(sub).size();
88template<
class IntListType>
95 for (
auto& sub : lists)
97 for (
auto& item : sub)
101 item = oldToNew[item];
120namespace ensightOutput
131 const UList<face>& faces,
132 const label pointOffset = 0
139 const UIndirectList<face>& faces,
140 const label pointOffset = 0
147 const CompactListList<label>& faces,
148 const label pointOffset = 0
155 const UList<cellShape>& shapes,
156 const label pointOffset = 0
175 const polyMesh&
mesh,
188 const UIndirectList<face>& faces,
208 const ensightFaces& part,
220 const ensightFaces& part,
236 const Field<Type>&
fld,
237 const ensightCells& part,
247 const Field<Type>&
fld,
248 const ensightFaces& part,
291 const label pointOffset
296template<
class LabelListListType>
300 const LabelListListType& listOfLists,
301 const label pointOffset
307template<
template<
typename>
class FieldContainer,
class Type>
311 const FieldContainer<Type>&
input,
317template<
template<
typename>
class FieldContainer,
class Type>
321 const FieldContainer<Type>&
fld,
327template<
template<
typename>
class FieldContainer>
332 const word& partName,
334 const FieldContainer<Foam::point>&
fld,
340template<
template<
typename>
class FieldContainer,
class Type>
345 const FieldContainer<Type>&
fld,
Various functions to operate on Lists.
Forwards for various types of cell lists.
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
Generic templated field type.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
label size() const noexcept
The number of elements in the list.
A List with indirect addressing. Like IndirectList but does not store addressing.
Sorting/classification of faces (2D) into corresponding ensight types.
elemType
Supported ensight 'Face' element types.
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
Specialized Ensight output with extra geometry file header.
Mesh consisting of general polyhedral cells.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Forwards for various types of face lists.
labelList subSizes(const IndirectListBase< T, Addr > &lists, AccessOp aop)
Return the sizes of the sub-lists.
void inplaceRenumber(const labelUList &oldToNew, IntListType &lists)
Inplace renumber the values (not the indices) of a list of lists.
labelList getFaceSizes(const UList< face > &faces)
Return sizes of faces in the list.
bool writeCoordinates(ensightGeoFile &os, const label partId, const word &partName, const label nPoints, const FieldContainer< Foam::point > &fld, bool parallel)
Write coordinates (component-wise) for the given part.
bool writeFaceSubField(ensightFile &os, const Field< Type > &fld, const ensightFaces &part, bool parallel)
labelList getPolysNPointsPerFace(const polyMesh &mesh, const labelUList &addr)
The number of points for each face of the poly elements.
labelList getPolysNFaces(const polyMesh &mesh, const labelUList &addr)
The number of faces per poly element.
bool writeFieldComponents(ensightFile &os, const char *key, const FieldContainer< Type > &fld, bool parallel)
Write field content (component-wise) for the given ensight element type.
void copyComponent(List< scalar > &cmptBuffer, const FieldContainer< Type > &input, const direction cmpt)
CompactListList< label > getPolysFacePoints(const polyMesh &mesh, const labelUList &addr, const labelList &pointMap)
Generate 0-based point ids for each poly element face.
void writeFieldContent(ensightFile &os, const FieldContainer< Type > &fld, bool parallel)
Write field content (component-wise)
void writeLabelListList(ensightGeoFile &os, const labelUList &offsets, const labelUList &values, const label pointOffset)
Write CompactListList<label> by components.
bool writeFaceLocalField(ensightFile &os, const Field< Type > &fld, const ensightFaces &part, bool parallel)
void writePolysPoints(ensightGeoFile &os, const cellUList &meshCells, const labelUList &addr, const faceUList &meshFaces, const labelUList &faceOwner)
Write the point ids per poly element.
bool writeField(ensightFile &os, const Field< Type > &fld, const ensightCells &part, bool parallel)
void writeFaceConnectivityPresorted(ensightGeoFile &os, const ensightFaces &part, const faceUList &faces, bool parallel)
Write the presorted face connectivity for the part.
void writeFaceConnectivity(ensightGeoFile &os, const ensightFaces::elemType etype, const label nTotal, const UIndirectList< face > &faces, bool parallel)
void writeCellShapes(ensightGeoFile &os, const UList< cellShape > &shapes, const label pointOffset=0)
Write cell connectivity via cell shapes.
void writeFaceList(ensightGeoFile &os, const UList< face > &faces, const label pointOffset=0)
Write list of faces.
List< label > labelList
A List of labels.
static Istream & input(Istream &is, IntRange< T > &range)
UList< cell > cellUList
A UList of cells.
UList< face > faceUList
A UList of faces.
static Ostream & output(Ostream &os, const IntRange< T > &range)
UList< label > labelUList
A UList of labels.