A collection of functions for writing ensight file content. More...
Namespaces | |
namespace | Detail |
Implementation details and output backends that would not normally be called directly by a user. | |
Classes | |
class | writerCaching |
State information for writers with collated times. More... | |
Functions | |
template<class Type > | |
bool | writeAreaField (ensightFile &os, const GeometricField< Type, faPatchField, areaMesh > &fld, const ensightFaMesh &ensMesh) |
Write finite-area field component-wise. More... | |
template<class Type > | |
bool | writeVolField (ensightFile &os, const GeometricField< Type, fvPatchField, volMesh > &vf, const ensightMesh &ensMesh) |
Write volume field component-wise. More... | |
template<class Type > | |
bool | writeVolField (ensightFile &os, const GeometricField< Type, fvPatchField, volMesh > &vf, const ensightMesh &ensMesh, const bool nodeValues) |
Write volume field component-wise, optionally forcing interpolation. More... | |
template<class Type > | |
bool | writePointField (ensightFile &os, const GeometricField< Type, pointPatchField, pointMesh > &pf, const ensightMesh &ensMesh) |
Write point field component-wise. More... | |
void | writeFaceList (ensightGeoFile &os, const UList< face > &faces, const label pointOffset=0) |
Write list of faces. More... | |
void | writeFaceList (ensightGeoFile &os, const UIndirectList< face > &faces, const label pointOffset=0) |
Write list of faces (indirect addressing) More... | |
void | writeFaceList (ensightGeoFile &os, const CompactListList< label > &faces, const label pointOffset=0) |
Write list of faces (stored in compact form) More... | |
void | writeCellShapes (ensightGeoFile &os, const UList< cellShape > &shapes, const label pointOffset=0) |
Write cell connectivity via cell shapes. More... | |
void | writePolysPoints (ensightGeoFile &os, const cellUList &meshCells, const labelUList &addr, const faceUList &meshFaces, const labelUList &faceOwner) |
Write the point ids per poly element. More... | |
void | writePolysPoints (ensightGeoFile &os, const polyMesh &mesh, const labelUList &addr, const labelList &pointMap) |
Write the point ids per poly element, with point renumbering. More... | |
void | writeFaceConnectivity (ensightGeoFile &os, const ensightFaces::elemType etype, const label nTotal, const UIndirectList< face > &faces, bool parallel) |
void | writeFaceConnectivity (ensightGeoFile &os, const ensightFaces::elemType etype, const label nTotal, const faceUList &faces, bool parallel) |
Write the regular face connectivity for specified type. More... | |
void | writeFaceConnectivity (ensightGeoFile &os, const ensightFaces &part, const faceUList &faces, bool parallel) |
Write the face connectivity for the part. More... | |
void | writeFaceConnectivityPresorted (ensightGeoFile &os, const ensightFaces &part, const faceUList &faces, bool parallel) |
Write the presorted face connectivity for the part. More... | |
template<class Type > | |
bool | writeField (ensightFile &os, const Field< Type > &fld, const ensightCells &part, bool parallel) |
template<class Type > | |
bool | writeField (ensightFile &os, const Field< Type > &fld, const ensightFaces &part, bool parallel) |
bool | writeCloudPositions (const fvMesh &mesh, const word &cloudName, bool exists, autoPtr< ensightFile > &output) |
Write cloud positions. More... | |
template<class Type > | |
bool | writeCloudField (const IOField< Type > &field, ensightFile &os) |
Write cloud field, returning true if the field is non-empty. More... | |
template<class Type > | |
bool | writeCloudField (const IOobject &io, bool exists, autoPtr< ensightFile > &output) |
A collection of functions for writing ensight file content.
bool writeAreaField | ( | ensightFile & | os, |
const GeometricField< Type, faPatchField, areaMesh > & | fld, | ||
const ensightFaMesh & | ensMesh | ||
) |
Write finite-area field component-wise.
Definition at line 35 of file ensightOutputAreaFieldTemplates.C.
References ensightFaMesh::areaPart(), fld(), and os().
bool writeVolField | ( | ensightFile & | os, |
const GeometricField< Type, fvPatchField, volMesh > & | vf, | ||
const ensightMesh & | ensMesh | ||
) |
Write volume field component-wise.
Definition at line 41 of file ensightOutputVolFieldTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), ensightMesh::boundaryParts(), ensightMesh::cellZoneParts(), ensightFaces::decrFaceIds(), HashTable< T, Key, Hash >::empty(), faceId(), ensightFaces::faceIds(), ensightMesh::faceZoneParts(), forAll, forAllConstIters, Foam::linearInterpolate(), max(), mesh, DimensionedField< Type, GeoMesh >::mesh(), polyPatch::offset(), os(), patchId(), UPtrList< T >::size(), ensightFaces::size(), UList< T >::size(), HashTable< T, Key, Hash >::sortedToc(), and polyBoundaryMesh::start().
bool writeVolField | ( | ensightFile & | os, |
const GeometricField< Type, fvPatchField, volMesh > & | vf, | ||
const ensightMesh & | ensMesh, | ||
const bool | nodeValues | ||
) |
Write volume field component-wise, optionally forcing interpolation.
Definition at line 329 of file ensightOutputVolFieldTemplates.C.
References DimensionedField< Type, GeoMesh >::mesh(), IOobject::name(), os(), and tmp< T >::ref().
bool writePointField | ( | ensightFile & | os, |
const GeometricField< Type, pointPatchField, pointMesh > & | pf, | ||
const ensightMesh & | ensMesh | ||
) |
Write point field component-wise.
Definition at line 200 of file ensightOutputVolFieldTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), ensightMesh::boundaryParts(), ensightMesh::cellZoneParts(), ensightMesh::faceZoneParts(), ensightPart::index(), GeometricField< Type, PatchField, GeoMesh >::internalField(), mesh, ensightMesh::mesh(), PrimitivePatch< FaceList, PointField >::meshPointMap(), os(), patchId(), HashTable< T, Key, Hash >::sortedToc(), ensightCells::uniqueMeshPoints(), and ensightFaces::uniqueMeshPoints().
void writeFaceList | ( | ensightGeoFile & | os, |
const UList< face > & | faces, | ||
const label | pointOffset = 0 |
||
) |
Write list of faces.
pointOffset | Additional point offset for each face |
Definition at line 165 of file ensightOutput.C.
References os().
Referenced by writeFaceConnectivity().
void writeFaceList | ( | ensightGeoFile & | os, |
const UIndirectList< face > & | faces, | ||
const label | pointOffset = 0 |
||
) |
Write list of faces (indirect addressing)
pointOffset | Additional point offset for each face |
Definition at line 176 of file ensightOutput.C.
References os().
void writeFaceList | ( | ensightGeoFile & | os, |
const CompactListList< label > & | faces, | ||
const label | pointOffset = 0 |
||
) |
Write list of faces (stored in compact form)
pointOffset | Additional point offset for each face |
Definition at line 187 of file ensightOutput.C.
References os().
void writeCellShapes | ( | ensightGeoFile & | os, |
const UList< cellShape > & | shapes, | ||
const label | pointOffset = 0 |
||
) |
Write cell connectivity via cell shapes.
pointOffset | Additional point offset |
Definition at line 198 of file ensightOutput.C.
References os().
void writePolysPoints | ( | ensightGeoFile & | os, |
const cellUList & | meshCells, | ||
const labelUList & | addr, | ||
const faceUList & | meshFaces, | ||
const labelUList & | faceOwner | ||
) |
Write the point ids per poly element.
Points have been already renumbered
addr | Cell ids to write |
Definition at line 331 of file ensightOutput.C.
References cellId, f(), faceId(), os(), and UList< T >::size().
void writePolysPoints | ( | ensightGeoFile & | os, |
const polyMesh & | mesh, | ||
const labelUList & | addr, | ||
const labelList & | pointMap | ||
) |
Write the point ids per poly element, with point renumbering.
const cellList& meshCells = mesh.cells();
addr | Cell ids to write |
pointMap | Point map to use |
Definition at line 285 of file ensightOutput.C.
References cellId, f(), faceId(), mesh, os(), and UList< T >::size().
void writeFaceConnectivity | ( | ensightGeoFile & | os, |
const ensightFaces::elemType | etype, | ||
const label | nTotal, | ||
const UIndirectList< face > & | faces, | ||
bool | parallel | ||
) |
Write the regular face connectivity for specified type and and specified faces
parallel | Collective write? |
Definition at line 464 of file ensightOutput.C.
References os(), and writeFaceList().
Referenced by ensightOutputSurface::write(), writeFaceConnectivity(), and writeFaceConnectivityPresorted().
void writeFaceConnectivity | ( | ensightGeoFile & | os, |
const ensightFaces::elemType | etype, | ||
const label | nTotal, | ||
const faceUList & | faces, | ||
bool | parallel | ||
) |
Write the regular face connectivity for specified type.
parallel | Collective write? |
Definition at line 373 of file ensightOutput.C.
References os(), and writeFaceList().
void writeFaceConnectivity | ( | ensightGeoFile & | os, |
const ensightFaces & | part, | ||
const faceUList & | faces, | ||
bool | parallel | ||
) |
Write the face connectivity for the part.
parallel | Collective write? |
Definition at line 557 of file ensightOutput.C.
References ensightFaces::faceIds(), os(), ensightFaces::total(), and writeFaceConnectivity().
void writeFaceConnectivityPresorted | ( | ensightGeoFile & | os, |
const ensightFaces & | part, | ||
const faceUList & | faces, | ||
bool | parallel | ||
) |
Write the presorted face connectivity for the part.
This is a special case when the list of faces is already in ensight sorted order
parallel | Collective write? |
Definition at line 581 of file ensightOutput.C.
References os(), ensightFaces::range(), ensightFaces::total(), and writeFaceConnectivity().
Referenced by ensightFaces::write().
bool writeField | ( | ensightFile & | os, |
const Field< Type > & | fld, | ||
const ensightCells & | part, | ||
bool | parallel | ||
) |
Write a field of cell values as an indirect list, using the cell ids from ensightCells
parallel | Collective write? |
Definition at line 329 of file ensightOutputTemplates.C.
References ensightCells::cellIds(), fld(), ensightPart::index(), os(), reduce(), ensightCells::size(), and ensightCells::total().
Referenced by ensightOutputSurface::writeFaceData().
bool writeField | ( | ensightFile & | os, |
const Field< Type > & | fld, | ||
const ensightFaces & | part, | ||
bool | parallel | ||
) |
Write a field of faces values as an indirect list, using the face ids from ensightFaces
parallel | Collective write? |
Definition at line 379 of file ensightOutputTemplates.C.
References ensightFaces::faceIds(), fld(), ensightPart::index(), os(), reduce(), ensightFaces::size(), and ensightFaces::total().
bool writeCloudPositions | ( | const fvMesh & | mesh, |
const word & | cloudName, | ||
bool | exists, | ||
autoPtr< ensightFile > & | output | ||
) |
Write cloud positions.
Definition at line 78 of file ensightOutputCloud.C.
References cloudName(), Foam::exists(), mesh, os(), p, procAddr(), DynamicList< T, SizeMin >::reserve(), autoPtr< T >::reset(), Foam::returnReduce(), Foam::writeMeasured_ascii(), and Foam::writeMeasured_binary().
bool writeCloudField | ( | const IOField< Type > & | field, |
ensightFile & | os | ||
) |
Write cloud field, returning true if the field is non-empty.
Definition at line 70 of file ensightOutputCloudTemplates.C.
References UList< T >::data_bytes(), field(), os(), procAddr(), DynamicList< T, SizeMin >::resize_nocopy(), Foam::returnReduce(), and UList< T >::size_bytes().
Referenced by writeCloudField().
bool writeCloudField | ( | const IOobject & | io, |
bool | exists, | ||
autoPtr< ensightFile > & | output | ||
) |
Read cloud field from IOobject (if exists == true) and write, always returning true.
Definition at line 142 of file ensightOutputCloudTemplates.C.
References Foam::exists(), field(), io(), IOobject::readOpt(), autoPtr< T >::ref(), and writeCloudField().