Loading...
Searching...
No Matches
Foam::ensightOutput Namespace Reference

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...

Typedefs

typedef DynamicList< float > floatBufferType
 The list type used for component-wise buffering.

Functions

template<class Type>
bool writeAreaField (ensightOutput::floatBufferType &scratch, ensightFile &os, const GeometricField< Type, faPatchField, areaMesh > &fld, const ensightFaMesh &ensMesh)
 Write finite-area field component-wise.
template<class Type>
bool writeAreaField (ensightFile &os, const GeometricField< Type, faPatchField, areaMesh > &fld, const ensightFaMesh &ensMesh)
 Write finite-area field component-wise.
template<class Type>
bool writeVolField (ensightOutput::floatBufferType &scratch, ensightFile &os, const GeometricField< Type, fvPatchField, volMesh > &vf, const ensightMesh &ensMesh)
 Write volume field component-wise.
template<class Type>
bool writeVolField (ensightFile &os, const GeometricField< Type, fvPatchField, volMesh > &vf, const ensightMesh &ensMesh)
 Write volume field component-wise.
template<class Type>
bool writeVolField (ensightOutput::floatBufferType &scratch, ensightFile &os, const GeometricField< Type, fvPatchField, volMesh > &vf, const ensightMesh &ensMesh, const bool nodeValues)
 Write volume field component-wise, optionally forcing interpolation.
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.
template<class Type>
bool writePointField (ensightOutput::floatBufferType &scratch, ensightFile &os, const GeometricField< Type, pointPatchField, pointMesh > &pf, const ensightMesh &ensMesh)
 Write point field component-wise.
template<class Type>
bool writePointField (ensightFile &os, const GeometricField< Type, pointPatchField, pointMesh > &pf, const ensightMesh &ensMesh)
 Write point field component-wise.
void writeFaceList (ensightGeoFile &os, const UList< face > &faces, const label pointOffset=0)
 Write list of faces.
void writeFaceList (ensightGeoFile &os, const UIndirectList< face > &faces, const label pointOffset=0)
 Write list of faces (indirect addressing).
void writeFaceList (ensightGeoFile &os, const CompactListList< label > &faces, const label pointOffset=0)
 Write list of faces (stored in compact form).
void writeCellShapes (ensightGeoFile &os, const UList< cellShape > &shapes, const label pointOffset=0)
 Write cell connectivity via cell shapes.
void writePolysPoints (ensightGeoFile &os, const cellUList &meshCells, const labelUList &addr, const faceUList &meshFaces, const labelUList &faceOwner)
 Write the point ids per poly element.
void writePolysPoints (ensightGeoFile &os, const polyMesh &mesh, const labelUList &addr, const labelList &pointMap)
 Write the point ids per poly element, with point renumbering.
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.
void writeFaceConnectivity (ensightGeoFile &os, const ensightFaces::elemType etype, const label nTotal, const faceUList &faces, bool parallel)
 Write the regular face connectivity for specified type.
void writeFaceConnectivity (ensightGeoFile &os, const ensightFaces &part, const faceUList &faces, bool parallel)
 Write the face connectivity for the part.
void writeFaceConnectivityPresorted (ensightGeoFile &os, const ensightFaces &part, const faceUList &faces, bool parallel)
 Write the presorted face connectivity for the part.
template<class Type>
bool writeField (ensightOutput::floatBufferType &scratch, 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.
template<class Type>
bool writeField (ensightOutput::floatBufferType &scratch, 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.
template<class Type>
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.
template<class Type>
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.
bool writeCloudPositions (ensightFile &os, DynamicList< floatVector > &positions, const globalIndex &procAddr)
 Write cloud positions.
bool writeCloudPositions (ensightFile &os, DynamicList< floatVector > &positions)
 Write cloud positions.
bool writeCloudPositions (ensightFile &os, const fvMesh &mesh, const word &cloudName, bool exists)
 Write cloud positions.
template<class Type>
bool writeCloudField (ensightFile &os, const UList< Type > &field, const globalIndex &procAddr)
 Write cloud field, returning true if the field is non-empty.
template<class Type>
bool writeCloudField (ensightFile &os, const UList< Type > &field)
 Write cloud field, returning true if the field is non-empty.
template<class Type>
bool readWriteCloudField (ensightFile &os, const IOobject &fieldObject, bool existsAny)
 Read cloud field from IOobject (if exists == true) and write, always returning true.

Variables

int debug
 Static debugging option.
int maxChunk_
 Upper limit on number of items for bundled off-processor field transfers. The component-wise transfer uses float (4 bytes).

Detailed Description

A collection of functions for writing ensight file content.

Source files

Typedef Documentation

◆ floatBufferType

typedef DynamicList<float> floatBufferType

The list type used for component-wise buffering.

Always has value_type = float (what ensight uses internally)

Definition at line 55 of file ensightOutputFwd.H.

Function Documentation

◆ writeAreaField() [1/2]

template<class Type>
bool writeAreaField ( ensightOutput::floatBufferType & scratch,
ensightFile & os,
const GeometricField< Type, faPatchField, areaMesh > & fld,
const ensightFaMesh & ensMesh )

Write finite-area field component-wise.

Parameters
scratchComponent scratch buffer
osOutput file (must be valid on master)
fldThe field content to be written
ensMeshThe addressing into the field

References fld(), and os().

Referenced by writeAreaField(), and Foam::writeAreaField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeAreaField() [2/2]

template<class Type>
bool writeAreaField ( ensightFile & os,
const GeometricField< Type, faPatchField, areaMesh > & fld,
const ensightFaMesh & ensMesh )

Write finite-area field component-wise.

Parameters
osOutput file (must be valid on master)
fldThe field content to be written
ensMeshThe addressing into the field

Definition at line 74 of file ensightOutputAreaField.H.

References fld(), os(), and writeAreaField().

Here is the call graph for this function:

◆ writeVolField() [1/4]

template<class Type>
bool writeVolField ( ensightOutput::floatBufferType & scratch,
ensightFile & os,
const GeometricField< Type, fvPatchField, volMesh > & vf,
const ensightMesh & ensMesh )

Write volume field component-wise.

Parameters
scratchComponent scratch buffer
osOutput file (must be valid on master)
vfThe field content to be written
ensMeshThe addressing (element-wise) into the field

References os().

Referenced by writeVolField(), writeVolField(), and Foam::writeVolField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeVolField() [2/4]

template<class Type>
bool writeVolField ( ensightFile & os,
const GeometricField< Type, fvPatchField, volMesh > & vf,
const ensightMesh & ensMesh )

Write volume field component-wise.

Parameters
osOutput file (must be valid on master)
vfThe field content to be written
ensMeshThe addressing (element-wise) into the field

Definition at line 74 of file ensightOutputVolField.H.

References os(), and writeVolField().

Here is the call graph for this function:

◆ writeVolField() [3/4]

template<class Type>
bool writeVolField ( ensightOutput::floatBufferType & scratch,
ensightFile & os,
const GeometricField< Type, fvPatchField, volMesh > & vf,
const ensightMesh & ensMesh,
const bool nodeValues )

Write volume field component-wise, optionally forcing interpolation.

Parameters
scratchComponent scratch buffer
osOutput file (must be valid on master)
vfThe field content to be written
ensMeshThe addressing (element-wise) into the field
nodeValuesInterpolate values to points

References os().

Here is the call graph for this function:

◆ writeVolField() [4/4]

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.

Parameters
osOutput file (must be valid on master)
vfThe field content to be written
ensMeshThe addressing (element-wise) into the field
nodeValuesInterpolate values to points

Definition at line 116 of file ensightOutputVolField.H.

References os(), and writeVolField().

Here is the call graph for this function:

◆ writePointField() [1/2]

template<class Type>
bool writePointField ( ensightOutput::floatBufferType & scratch,
ensightFile & os,
const GeometricField< Type, pointPatchField, pointMesh > & pf,
const ensightMesh & ensMesh )

Write point field component-wise.

Parameters
scratchComponent scratch buffer
osOutput file (must be valid on master)
pfThe field content to be written
ensMeshThe addressing (element-wise) into the field

References os().

Referenced by writePointField(), and Foam::writePointField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writePointField() [2/2]

template<class Type>
bool writePointField ( ensightFile & os,
const GeometricField< Type, pointPatchField, pointMesh > & pf,
const ensightMesh & ensMesh )

Write point field component-wise.

Parameters
osOutput file (must be valid on master)
pfThe field content to be written
ensMeshThe addressing (element-wise) into the field

Definition at line 161 of file ensightOutputVolField.H.

References os(), and writePointField().

Here is the call graph for this function:

◆ writeFaceList() [1/3]

void writeFaceList ( ensightGeoFile & os,
const UList< face > & faces,
const label pointOffset = 0 )

Write list of faces.

Parameters
pointOffsetAdditional point offset for each face

Definition at line 175 of file ensightOutput.C.

References os(), and Foam::ensightOutput::Detail::writeLabelListList().

Referenced by writeFaceConnectivity(), and writeFaceConnectivity().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeFaceList() [2/3]

void writeFaceList ( ensightGeoFile & os,
const UIndirectList< face > & faces,
const label pointOffset = 0 )

Write list of faces (indirect addressing).

Parameters
pointOffsetAdditional point offset for each face

Definition at line 186 of file ensightOutput.C.

References os(), and Foam::ensightOutput::Detail::writeLabelListList().

Here is the call graph for this function:

◆ writeFaceList() [3/3]

void writeFaceList ( ensightGeoFile & os,
const CompactListList< label > & faces,
const label pointOffset = 0 )

Write list of faces (stored in compact form).

Parameters
pointOffsetAdditional point offset for each face

Definition at line 197 of file ensightOutput.C.

References os(), and Foam::ensightOutput::Detail::writeLabelListList().

Here is the call graph for this function:

◆ writeCellShapes()

void writeCellShapes ( ensightGeoFile & os,
const UList< cellShape > & shapes,
const label pointOffset = 0 )

Write cell connectivity via cell shapes.

Parameters
pointOffsetAdditional point offset

Definition at line 208 of file ensightOutput.C.

References os(), and Foam::ensightOutput::Detail::writeLabelListList().

Referenced by ensightCells::writeBox().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writePolysPoints() [1/2]

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

Parameters
addrCell ids to write

Definition at line 341 of file ensightOutput.C.

References cellId, f(), faceId(), os(), and UList< T >::size().

Here is the call graph for this function:

◆ writePolysPoints() [2/2]

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();

Parameters
addrCell ids to write
pointMapPoint map to use

Definition at line 295 of file ensightOutput.C.

References cellId, f(), faceId(), mesh, MeshObject< polyMesh, UpdateableMeshObject, manifoldCellsMeshObject >::New(), os(), and UList< T >::size().

Here is the call graph for this function:

◆ writeFaceConnectivity() [1/3]

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.

Parameters
parallelPrefer collective write?

Definition at line 474 of file ensightOutput.C.

References Foam::ensightOutput::Detail::getFaceSizes(), ensightFaces::key(), UPstream::master(), UPstream::masterNo(), ensightFaces::NSIDED, os(), UPstream::parRun(), UPstream::scheduled, UPstream::subProcs(), and writeFaceList().

Referenced by ensightOutputSurface::write(), writeFaceConnectivity(), and writeFaceConnectivityPresorted().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeFaceConnectivity() [2/3]

void writeFaceConnectivity ( ensightGeoFile & os,
const ensightFaces::elemType etype,
const label nTotal,
const faceUList & faces,
bool parallel )

Write the regular face connectivity for specified type.

Parameters
parallelPrefer collective write?

Definition at line 383 of file ensightOutput.C.

References Foam::ensightOutput::Detail::getFaceSizes(), ensightFaces::key(), UPstream::master(), UPstream::masterNo(), ensightFaces::NSIDED, os(), UPstream::parRun(), UPstream::scheduled, UPstream::subProcs(), and writeFaceList().

Here is the call graph for this function:

◆ writeFaceConnectivity() [3/3]

void writeFaceConnectivity ( ensightGeoFile & os,
const ensightFaces & part,
const faceUList & faces,
bool parallel )

Write the face connectivity for the part.

Parameters
parallelPrefer collective write?

Definition at line 567 of file ensightOutput.C.

References ensightFaces::faceIds(), ensightFaces::nTypes, os(), ensightFaces::total(), and writeFaceConnectivity().

Here is the call graph for this function:

◆ writeFaceConnectivityPresorted()

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

Parameters
parallelPrefer collective write?

Definition at line 591 of file ensightOutput.C.

References ensightFaces::nTypes, os(), ensightFaces::range(), ensightFaces::total(), and writeFaceConnectivity().

Referenced by ensightFaces::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeField() [1/4]

template<class Type>
bool writeField ( ensightOutput::floatBufferType & scratch,
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.

Parameters
scratchComponent scratch buffer
osOutput file (must be valid on master)
fldThe field content to be written
partThe addressing (element-wise) into the field
parallelPrefer collective write?

References fld(), and os().

Referenced by writeField(), and writeField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeField() [2/4]

template<class Type>
bool writeField ( ensightOutput::floatBufferType & scratch,
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.

Parameters
scratchComponent scratch buffer
osOutput file (must be valid on master)
fldThe field content to be written
partThe addressing (element-wise) into the field
parallelPrefer collective write?

References fld(), and os().

Here is the call graph for this function:

◆ writeField() [3/4]

template<class Type>
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.

Parameters
osOutput file (must be valid on master)
fldThe field content to be written
partThe addressing (element-wise) into the field
parallelPrefer collective write?

Definition at line 310 of file ensightOutput.H.

References fld(), os(), and writeField().

Here is the call graph for this function:

◆ writeField() [4/4]

template<class Type>
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.

Parameters
osOutput file (must be valid on master)
fldThe field content to be written
partThe addressing (element-wise) into the field
parallelPrefer collective write?

Definition at line 335 of file ensightOutput.H.

References fld(), os(), and writeField().

Here is the call graph for this function:

◆ writeCloudPositions() [1/3]

bool writeCloudPositions ( ensightFile & os,
DynamicList< floatVector > & positions,
const globalIndex & procAddr )

Write cloud positions.

Parameters
osOutput file (must be valid on master)
positionsThe positions (measured data) to write. Also used as intermediate buffer (on master)
procAddrThe global sizes of positions (must be valid on master) and consistent with positions dimensions

References os().

Here is the call graph for this function:

◆ writeCloudPositions() [2/3]

bool writeCloudPositions ( ensightFile & os,
DynamicList< floatVector > & positions )

Write cloud positions.

Parameters
osOutput file (must be valid on master)
positionsThe positions (measured data) to write. Also used as intermediate buffer (on master)

References os().

Here is the call graph for this function:

◆ writeCloudPositions() [3/3]

bool writeCloudPositions ( ensightFile & os,
const fvMesh & mesh,
const word & cloudName,
bool exists )

Write cloud positions.

Parameters
osOutput file (must be valid on master)
meshThe associated volume mesh
cloudNameThe name of the cloud
existsThe processor-local existence

References cloudName(), Foam::exists(), mesh, and os().

Here is the call graph for this function:

◆ writeCloudField() [1/2]

template<class Type>
bool writeCloudField ( ensightFile & os,
const UList< Type > & field,
const globalIndex & procAddr )

Write cloud field, returning true if the field is non-empty.

Parameters
osOutput file (must be valid on master)
fieldThe cloud field
procAddrThe global sizes of field (must be valid on master) and consistent with field dimensions

References field(), and os().

Here is the call graph for this function:

◆ writeCloudField() [2/2]

template<class Type>
bool writeCloudField ( ensightFile & os,
const UList< Type > & field )

Write cloud field, returning true if the field is non-empty.

Parameters
osOutput file (must be valid on master)
fieldThe cloud field

References field(), and os().

Here is the call graph for this function:

◆ readWriteCloudField()

template<class Type>
bool readWriteCloudField ( ensightFile & os,
const IOobject & fieldObject,
bool existsAny )

Read cloud field from IOobject (if exists == true) and write, always returning true.

Parameters
osOutput file (must be valid on master)
fieldObjectThe field object name/location for reading
existsAnyExists anywhere? May still be missing on a local processor

References os().

Here is the call graph for this function:

Variable Documentation

◆ debug

int debug
extern

Static debugging option.

◆ maxChunk_

int maxChunk_
extern

Upper limit on number of items for bundled off-processor field transfers. The component-wise transfer uses float (4 bytes).

Eg, 5M for 50 ranks of 100k cells each