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. More...
 
labelList getFaceSizes (const UIndirectList< face > &faces)
 Return sizes of faces in the list. More...
 
labelList getPolysNFaces (const polyMesh &mesh, const labelUList &addr)
 The number of faces per poly element. More...
 
labelList getPolysNPointsPerFace (const polyMesh &mesh, const labelUList &addr)
 The number of points for each face of the poly elements. More...
 
CompactListList< label > getPolysFacePoints (const polyMesh &mesh, const labelUList &addr, const labelList &pointMap)
 Generate 0-based point ids for each poly element face. More...
 
void writeLabelListList (ensightGeoFile &os, const labelUList &offsets, const labelUList &values, const label pointOffset)
 Write CompactListList<label> by components. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<class Type >
label writeCloudFieldContent (ensightFile &os, const UList< Type > &fld, label count=0)
 Write cloud field data (serial) with rounding and newlines. More...
 

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 51 of file ensightOutput.C.

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

Referenced by 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 70 of file ensightOutput.C.

References UList< T >::begin(), f(), and IndirectListBase< T, labelUList >::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 89 of file ensightOutput.C.

References UList< T >::begin(), cellId, mesh, Foam::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 113 of file ensightOutput.C.

References UList< T >::begin(), cellId, mesh, Foam::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 221 of file ensightOutput.C.

References cellId, f(), faceId(), mesh, Foam::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 149 of file ensightOutput.C.

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

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

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

◆ writeLabelListList() [2/2]

void writeLabelListList ( ensightGeoFile os,
const LabelListListType &  listOfLists,
const label  pointOffset 
)

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

Definition at line 29 of file ensightOutputTemplates.C.

References forAll, and os().

Here is the call graph for this function:

◆ copyComponent()

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

Definition at line 50 of file ensightOutputTemplates.C.

References UList< T >::begin(), Foam::component(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::input(), Foam::narrowFloat(), Foam::nl, and UList< T >::size().

Referenced by writeFieldComponents().

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

◆ writeCoordinates()

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?

Definition at line 252 of file ensightOutputTemplates.C.

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

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

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

◆ writeFieldComponents() [1/2]

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?

Definition at line 89 of file ensightOutputTemplates.C.

References DynamicList< T, SizeMin >::capacity(), UList< T >::cdata_bytes(), copyComponent(), UList< T >::data_bytes(), Foam::ensightOutput::debug, Foam::endl(), fld, Foam::Info, Foam::glTF::key(), Foam::max(), Foam::ensightOutput::maxChunk_, Foam::min(), Foam::expressions::Detail::nComponents(), os(), procAddr(), Foam::blockMeshTools::read(), DynamicList< T, SizeMin >::resize_nocopy(), UList< T >::size(), UList< T >::size_bytes(), and Foam::vtk::write().

Referenced by writeCoordinates(), writeFaceLocalField(), writeFaceSubField(), Foam::ensightOutput::writeField(), writeFieldComponents(), ensightOutputSurface::writePointData(), Foam::ensightOutput::writePointField(), and Foam::writeTrackField().

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

◆ writeFieldComponents() [2/2]

void Foam::ensightOutput::Detail::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 498 of file ensightOutput.H.

References fld, Foam::glTF::key(), os(), and writeFieldComponents().

Here is the call graph for this function:

◆ writeFaceSubField() [1/2]

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?

Definition at line 292 of file ensightOutputTemplates.C.

References fld, ensightPart::index(), Foam::glTF::key(), os(), ensightFaces::range(), Foam::returnReduceOr(), ensightFaces::size(), ensightFaces::total(), and writeFieldComponents().

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

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

◆ writeFaceSubField() [2/2]

bool Foam::ensightOutput::Detail::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 547 of file ensightOutput.H.

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

Here is the call graph for this function:

◆ writeFaceLocalField() [1/2]

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?

Definition at line 345 of file ensightOutputTemplates.C.

References Foam::exit(), ensightFaces::faceOrder(), Foam::FatalError, FatalErrorInFunction, fld, ensightPart::index(), Foam::glTF::key(), Foam::nl, os(), Foam::returnReduceOr(), UList< T >::size(), ensightFaces::size(), ensightFaces::total(), and writeFieldComponents().

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

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

◆ writeFaceLocalField() [2/2]

bool Foam::ensightOutput::Detail::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 595 of file ensightOutput.H.

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

Here is the call graph for this function:

◆ writeCloudFieldContent()

label Foam::ensightOutput::Detail::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

Referenced by Foam::ensightOutput::writeCloudField().

Here is the caller graph for this function: