Go to the documentation of this file.
38 #ifndef ensightOutput_H
39 #define ensightOutput_H
64 template<
class T,
class Addr,
class AccessOp>
72 auto out = output.begin();
74 for (
const T& sub : lists)
76 *out = aop(sub).size();
86 template<
class IntListType>
93 for (
auto& sub : lists)
95 for (
auto& item : sub)
99 item = oldToNew[item];
118 namespace ensightOutput
129 const UList<face>& faces
136 const UIndirectList<face>& faces
143 const UList<cellShape>& shapes
162 const polyMesh&
mesh,
175 const UIndirectList<face>& faces,
195 const ensightFaces& part,
207 const ensightFaces& part,
223 const Field<Type>&
fld,
224 const ensightCells& part,
234 const Field<Type>&
fld,
235 const ensightFaces& part,
265 template<
template<
typename>
class FieldContainer,
class Type>
269 const FieldContainer<Type>& input,
275 template<
template<
typename>
class FieldContainer>
280 const word& partName,
282 const FieldContainer<Foam::point>&
fld,
288 template<
template<
typename>
class FieldContainer,
class Type>
293 const FieldContainer<Type>&
fld,
List< label > labelList
A List of labels.
A class for handling words, derived from Foam::string.
bool writeFieldComponents(ensightFile &os, const char *key, const FieldContainer< Type > &fld, bool parallel)
Write field content (component-wise) for the given ensight element type.
labelList subSizes(const IndirectListBase< T, Addr > &lists, AccessOp aop)
Return the sizes of the sub-lists.
labelList getPolysNPointsPerFace(const polyMesh &mesh, const labelUList &addr)
The number of points for each face of the poly elements.
Sorting/classification of faces (2D) into corresponding ensight types.
Mesh consisting of general polyhedral cells.
void writeFaceConnectivity(ensightGeoFile &os, const ensightFaces::elemType etype, const label nTotal, const UIndirectList< face > &faces, bool parallel)
void writeFaceConnectivityPresorted(ensightGeoFile &os, const ensightFaces &part, const faceUList &faces, bool parallel)
Write the presorted face connectivity for the part.
Specialized Ensight output with extra geometry file header.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void inplaceRenumber(const labelUList &oldToNew, IntListType &lists)
Inplace renumber the values (not the indices) of a list of lists.
UList< cell > cellUList
A UList of cells.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Forwards for various types of cell lists.
bool writeFaceSubField(ensightFile &os, const Field< Type > &fld, const ensightFaces &part, bool parallel)
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
elemType
Supported ensight 'Face' element types.
void copyComponent(scalarField &res, const FieldContainer< Type > &input, const direction cmpt)
Copy specified field component into a scalarField.
bool writeField(ensightFile &os, const Field< Type > &fld, const ensightCells &part, bool parallel)
labelList getPolysNFaces(const polyMesh &mesh, const labelUList &addr)
The number of faces per poly element.
UList< face > faceUList
A UList of faces.
labelList getFaceSizes(const UList< face > &faces)
Return sizes of faces in the list.
A List with indirect addressing.
void writePolysPoints(ensightGeoFile &os, const cellUList &meshCells, const labelUList &addr, const faceUList &meshFaces, const labelUList &faceOwner)
Write the point ids per poly element.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
Various functions to operate on Lists.
Forwards for various types of face lists.
UList< label > labelUList
A UList of labels.
void writeFaceList(ensightGeoFile &os, const UList< face > &faces)
Write list of faces.
void writeCellShapes(ensightGeoFile &os, const UList< cellShape > &shapes)
Write cell connectivity via cell shapes.
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.
label size() const
The number of elements in the list.