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

Implementation details and output backends that would not normally be called directly by a user. More...

Functions

labelList getFaceSizes (const UList< face > &faces)
 Return sizes of faces in the list.
labelList getFaceSizes (const UIndirectList< face > &faces)
 Return sizes of faces in the list.
labelList getPolysNFaces (const polyMesh &mesh, const labelUList &addr)
 The number of faces per poly element.
labelList getPolysNPointsPerFace (const polyMesh &mesh, const labelUList &addr)
 The number of points for each face of the poly elements.
CompactListList< label > getPolysFacePoints (const polyMesh &mesh, const labelUList &addr, const labelList &pointMap)
 Generate 0-based point ids for each poly element face.
void writeLabelListList (ensightGeoFile &os, const labelUList &offsets, const labelUList &values, const label pointOffset)
 Write CompactListList<label> by components.
template<class LabelListListType>
void writeLabelListList (ensightGeoFile &os, const LabelListListType &listOfLists, const label pointOffset)
 Write a list of faces or cell shapes with one-entity per line.
template<template< typename > class FieldContainer, class Type>
void copyComponent (const FieldContainer< Type > &input, const direction cmpt, UList< float > &cmptBuffer)
 Copy specified field component into a scalar buffer. Works for various lists types. Must be adequately sized before calling.
template<template< typename > class FieldContainer>
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.
template<template< typename > class FieldContainer, class Type>
void writeFieldComponents (ensightOutput::floatBufferType &scratch, ensightFile &os, const char *key, const FieldContainer< Type > &fld, bool parallel)
 Write field content (component-wise) for the given ensight element type.
template<template< typename > class FieldContainer, class Type>
void writeFieldComponents (ensightFile &os, const char *key, const FieldContainer< Type > &fld, bool parallel)
 Write field content (component-wise) for the given ensight element type.
template<class Type>
bool writeFaceSubField (ensightOutput::floatBufferType &scratch, ensightFile &os, const Field< Type > &fld, const ensightFaces &part, bool parallel)
 Write a sub-field of faces values as an indirect list, using the sub-list sizing information from ensightFaces.
template<class Type>
bool writeFaceSubField (ensightFile &os, const Field< Type > &fld, const ensightFaces &part, bool parallel)
 Write a sub-field of faces values as an indirect list, using the sub-list sizing information from ensightFaces.
template<class Type>
bool writeFaceLocalField (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 order from ensightFaces.
template<class Type>
bool writeFaceLocalField (ensightFile &os, const Field< Type > &fld, const ensightFaces &part, bool parallel)
 Write a field of faces values as an indirect list, using the face order from ensightFaces.
template<class Type>
label writeCloudFieldContent (ensightFile &os, const UList< Type > &fld, label count=0)
 Write cloud field data (serial) with rounding and newlines.

Detailed Description

Implementation details and output backends that would not normally be called directly by a user.

Function Documentation

◆ getFaceSizes() [1/2]

Foam::labelList getFaceSizes ( const UList< face > & faces)

Return sizes of faces in the list.

Definition at line 50 of file ensightOutput.C.

References UList< T >::begin(), f(), and UList< T >::size().

Referenced by Foam::ensightOutput::writeFaceConnectivity(), and Foam::ensightOutput::writeFaceConnectivity().

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

◆ getFaceSizes() [2/2]

Foam::labelList getFaceSizes ( const UIndirectList< face > & faces)

Return sizes of faces in the list.

Definition at line 69 of file ensightOutput.C.

References UList< T >::begin(), f(), and IndirectListBase< T, Addr >::size().

Here is the call graph for this function:

◆ getPolysNFaces()

Foam::labelList getPolysNFaces ( const polyMesh & mesh,
const labelUList & addr )

The number of faces per poly element.

const cellList& meshCells = mesh.cells();

Definition at line 88 of file ensightOutput.C.

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

Here is the call graph for this function:

◆ getPolysNPointsPerFace()

Foam::labelList getPolysNPointsPerFace ( const polyMesh & mesh,
const labelUList & addr )

The number of points for each face of the poly elements.

const cellList& meshCells = mesh.cells();

Definition at line 112 of file ensightOutput.C.

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

Here is the call graph for this function:

◆ getPolysFacePoints()

Foam::CompactListList< Foam::label > getPolysFacePoints ( const polyMesh & mesh,
const labelUList & addr,
const labelList & pointMap )

Generate 0-based point ids for each poly element face.

The returned CompactListList is divided per output face

const cellList& meshCells = mesh.cells();

Parameters
addrCell ids to write
pointMapPoint map to use

Definition at line 220 of file ensightOutput.C.

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

Here is the call graph for this function:

◆ writeLabelListList() [1/2]

void writeLabelListList ( ensightGeoFile & os,
const labelUList & offsets,
const labelUList & values,
const label pointOffset )

Write CompactListList<label> by components.

Definition at line 148 of file ensightOutput.C.

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

Referenced by Foam::ensightOutput::writeCellShapes(), Foam::ensightOutput::writeFaceList(), Foam::ensightOutput::writeFaceList(), and Foam::ensightOutput::writeFaceList().

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

◆ writeLabelListList() [2/2]

template<class LabelListListType>
void writeLabelListList ( ensightGeoFile & os,
const LabelListListType & listOfLists,
const label pointOffset )

Write a list of faces or cell shapes with one-entity per line.

References os().

Here is the call graph for this function:

◆ copyComponent()

template<template< typename > class FieldContainer, class Type>
void copyComponent ( const FieldContainer< Type > & input,
const direction cmpt,
UList< float > & cmptBuffer )

Copy specified field component into a scalar buffer. Works for various lists types. Must be adequately sized before calling.

Parameters
inputInput field data
cmptComponent to be extracted
[out]cmptBufferComponent scratch buffer

◆ writeCoordinates()

template<template< typename > class FieldContainer>
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.

Has internal check for (nPoints != 0)

Parameters
osOutput file (must be valid on master)
partIdThe ensight part id
partNameThe ensight part description
nPointsThe total number of points
fldThe point field to be written
parallelPrefer collective write?

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

Referenced by ensightCells::write(), ensightFaces::write(), ensightOutputSurface::write(), and ensightCells::writeBox().

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

◆ writeFieldComponents() [1/2]

template<template< typename > class FieldContainer, class Type>
void writeFieldComponents ( ensightOutput::floatBufferType & scratch,
ensightFile & os,
const char * key,
const FieldContainer< Type > & fld,
bool parallel )

Write field content (component-wise) for the given ensight element type.

Parameters
scratchComponent scratch buffer
osOutput file (must be valid on master)
keyThe ensight element type (ignored if nullptr)
fldThe field content to be written for this element type
parallelPrefer collective write?

References fld(), and os().

Referenced by writeFieldComponents(), and Foam::writeTrackField().

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

◆ writeFieldComponents() [2/2]

template<template< typename > class FieldContainer, class Type>
void writeFieldComponents ( ensightFile & os,
const char * key,
const FieldContainer< Type > & fld,
bool parallel )

Write field content (component-wise) for the given ensight element type.

Parameters
osOutput file (must be valid on master)
keyThe ensight element type (can be nullptr)
fldThe field content to be written for this element type Prefer collective write?

Definition at line 497 of file ensightOutput.H.

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

Here is the call graph for this function:

◆ writeFaceSubField() [1/2]

template<class Type>
bool writeFaceSubField ( ensightOutput::floatBufferType & scratch,
ensightFile & os,
const Field< Type > & fld,
const ensightFaces & part,
bool parallel )

Write a sub-field of faces values as an indirect list, using the sub-list sizing information 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().

Referenced by writeFaceSubField().

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

◆ writeFaceSubField() [2/2]

template<class Type>
bool writeFaceSubField ( ensightFile & os,
const Field< Type > & fld,
const ensightFaces & part,
bool parallel )

Write a sub-field of faces values as an indirect list, using the sub-list sizing information 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 546 of file ensightOutput.H.

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

Here is the call graph for this function:

◆ writeFaceLocalField() [1/2]

template<class Type>
bool writeFaceLocalField ( 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 order 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().

Referenced by writeFaceLocalField().

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

◆ writeFaceLocalField() [2/2]

template<class Type>
bool writeFaceLocalField ( ensightFile & os,
const Field< Type > & fld,
const ensightFaces & part,
bool parallel )

Write a field of faces values as an indirect list, using the face order 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 594 of file ensightOutput.H.

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

Here is the call graph for this function:

◆ writeCloudFieldContent()

template<class Type>
label writeCloudFieldContent ( ensightFile & os,
const UList< Type > & fld,
label count = 0 )

Write cloud field data (serial) with rounding and newlines.

Returns
the current output count
Parameters
osOutput file (must be valid on master)
countThe current output count

References fld(), and os().

Here is the call graph for this function: