Go to the documentation of this file.
38 #ifndef ensightOutput_H
39 #define ensightOutput_H
65 template<
class T,
class Addr,
class AccessOp>
75 for (
const T& sub : lists)
77 *out = aop(sub).size();
87 template<
class IntListType>
94 for (
auto& sub : lists)
96 for (
auto& item : sub)
100 item = oldToNew[item];
119 namespace ensightOutput
130 const UList<face>& faces
137 const UIndirectList<face>& faces
144 const UList<cellShape>& shapes
163 const polyMesh&
mesh,
176 const UIndirectList<face>& faces,
196 const ensightFaces& part,
208 const ensightFaces& part,
224 const Field<Type>&
fld,
225 const ensightCells& part,
235 const Field<Type>&
fld,
236 const ensightFaces& part,
266 template<
template<
typename>
class FieldContainer,
class Type>
270 const FieldContainer<Type>&
input,
276 template<
template<
typename>
class FieldContainer,
class Type>
280 const FieldContainer<Type>&
fld,
286 template<
template<
typename>
class FieldContainer>
291 const word& partName,
293 const FieldContainer<Foam::point>&
fld,
299 template<
template<
typename>
class FieldContainer,
class Type>
304 const FieldContainer<Type>&
fld,
List< label > labelList
A List of labels.
static Ostream & output(Ostream &os, const IntRange< T > &range)
A class for handling words, derived from Foam::string.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
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)
bool writeFaceLocalField(ensightFile &os, const Field< Type > &fld, const ensightFaces &part, 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.
Generic templated field type.
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)
OBJstream os(runTime.globalPath()/outputName)
label size() const noexcept
The number of elements in the list.
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
elemType
Supported ensight 'Face' element types.
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.
static Istream & input(Istream &is, IntRange< T > &range)
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.
void writeFieldContent(ensightFile &os, const FieldContainer< Type > &fld, bool parallel)
Write field content (component-wise)
void copyComponent(List< scalar > &cmptBuffer, const FieldContainer< Type > &input, const direction cmpt)
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.