Public Member Functions | Private Member Functions | Private Attributes
ensightSurfaceWriter Class Reference

A surfaceWriter for Ensight format. More...

Inheritance diagram for ensightSurfaceWriter:
Inheritance graph
[legend]
Collaboration diagram for ensightSurfaceWriter:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("ensight")
 Runtime type information. More...
 
 ensightSurfaceWriter ()
 Construct null. More...
 
 ensightSurfaceWriter (const dictionary &options)
 Construct with some output options. More...
 
virtual ~ensightSurfaceWriter ()
 Destructor. More...
 
virtual bool separateGeometry () const
 True if the surface format supports geometry in a separate file. More...
 
virtual fileName write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const bool verbose=false) const
 Write single surface geometry to file. More...
 
virtual fileName write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< scalar > &values, const bool isNodeValues, const bool verbose=false) const
 Write scalarField for a single surface to file. More...
 
virtual fileName write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< vector > &values, const bool isNodeValues, const bool verbose=false) const
 Write vectorField for a single surface to file. More...
 
virtual fileName write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< sphericalTensor > &values, const bool isNodeValues, const bool verbose=false) const
 Write sphericalTensorField for a single surface to file. More...
 
virtual fileName write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< symmTensor > &values, const bool isNodeValues, const bool verbose=false) const
 Write symmTensorField for a single surface to file. More...
 
virtual fileName write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< tensor > &values, const bool isNodeValues, const bool verbose=false) const
 Write tensorField for a single surface to file. More...
 
template<class Type >
Foam::fileName writeUncollated (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const
 
template<class Type >
Foam::fileName writeCollated (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const
 
template<class Type >
Foam::fileName writeTemplate (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const
 
- Public Member Functions inherited from surfaceWriter
 TypeName ("surfaceWriter")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, surfaceWriter, word,(),())
 
 declareRunTimeSelectionTable (autoPtr, surfaceWriter, wordDict,(const dictionary &optDict),(optDict))
 
 surfaceWriter ()
 Construct null. More...
 
virtual ~surfaceWriter ()
 Destructor. More...
 

Private Member Functions

template<class Type >
fileName writeCollated (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const
 Templated write operation - one file per timestep. More...
 
template<class Type >
fileName writeUncollated (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const
 Templated write operation - all time steps in single file. More...
 
template<class Type >
fileName writeTemplate (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const
 Templated write operation. More...
 

Private Attributes

IOstream::streamFormat writeFormat_
 Write option (default is IOstream::ASCII. More...
 
bool collateTimes_
 

Additional Inherited Members

- Static Public Member Functions inherited from surfaceWriter
static autoPtr< surfaceWriterNew (const word &writeType)
 Return a reference to the selected surfaceWriter. More...
 
static autoPtr< surfaceWriterNew (const word &writeType, const dictionary &writeOptions)
 Return a reference to the selected surfaceWriter. More...
 

Detailed Description

A surfaceWriter for Ensight format.

Source files

Definition at line 48 of file ensightSurfaceWriter.H.

Constructor & Destructor Documentation

◆ ensightSurfaceWriter() [1/2]

Construct null.

Definition at line 41 of file ensightSurfaceWriter.C.

◆ ensightSurfaceWriter() [2/2]

ensightSurfaceWriter ( const dictionary options)

Construct with some output options.

Definition at line 49 of file ensightSurfaceWriter.C.

References ensightSurfaceWriter::collateTimes_, IOstream::formatEnum(), dictionary::found(), dictionary::lookup(), dictionary::readIfPresent(), and ensightSurfaceWriter::writeFormat_.

Here is the call graph for this function:

◆ ~ensightSurfaceWriter()

~ensightSurfaceWriter ( )
virtual

Destructor.

Definition at line 65 of file ensightSurfaceWriter.C.

Member Function Documentation

◆ writeCollated() [1/2]

fileName writeCollated ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< Type > &  values,
const bool  isNodeValues,
const bool  verbose 
) const
private

Templated write operation - one file per timestep.

◆ writeUncollated() [1/2]

fileName writeUncollated ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< Type > &  values,
const bool  isNodeValues,
const bool  verbose 
) const
private

Templated write operation - all time steps in single file.

◆ writeTemplate() [1/2]

fileName writeTemplate ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< Type > &  values,
const bool  isNodeValues,
const bool  verbose 
) const
private

Templated write operation.

◆ TypeName()

TypeName ( "ensight"  )

Runtime type information.

◆ separateGeometry()

virtual bool separateGeometry ( ) const
inlinevirtual

True if the surface format supports geometry in a separate file.

False if geometry and field must be in a single file

Reimplemented from surfaceWriter.

Definition at line 128 of file ensightSurfaceWriter.H.

◆ write() [1/6]

Foam::fileName write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const bool  verbose = false 
) const
virtual

Write single surface geometry to file.

Reimplemented from surfaceWriter.

Definition at line 72 of file ensightSurfaceWriter.C.

References Foam::endl(), Foam::Info, Foam::isDir(), Foam::mkDir(), OFstream::name(), fileName::name(), Foam::nl, and points.

Here is the call graph for this function:

◆ write() [2/6]

virtual fileName write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< scalar > &  values,
const bool  isNodeValues,
const bool  verbose = false 
) const
virtual

Write scalarField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Reimplemented from surfaceWriter.

◆ write() [3/6]

virtual fileName write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< vector > &  values,
const bool  isNodeValues,
const bool  verbose = false 
) const
virtual

Write vectorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Reimplemented from surfaceWriter.

◆ write() [4/6]

virtual fileName write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< sphericalTensor > &  values,
const bool  isNodeValues,
const bool  verbose = false 
) const
virtual

Write sphericalTensorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Reimplemented from surfaceWriter.

◆ write() [5/6]

virtual fileName write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< symmTensor > &  values,
const bool  isNodeValues,
const bool  verbose = false 
) const
virtual

Write symmTensorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Reimplemented from surfaceWriter.

◆ write() [6/6]

virtual fileName write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< tensor > &  values,
const bool  isNodeValues,
const bool  verbose = false 
) const
virtual

Write tensorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Reimplemented from surfaceWriter.

◆ writeUncollated() [2/2]

Foam::fileName writeUncollated ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< Type > &  values,
const bool  isNodeValues,
const bool  verbose 
) const

◆ writeCollated() [2/2]

Foam::fileName writeCollated ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< Type > &  values,
const bool  isNodeValues,
const bool  verbose 
) const

◆ writeTemplate() [2/2]

Foam::fileName writeTemplate ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const word fieldName,
const Field< Type > &  values,
const bool  isNodeValues,
const bool  verbose 
) const

Definition at line 297 of file ensightSurfaceWriterTemplates.C.

References points.

Field Documentation

◆ writeFormat_

IOstream::streamFormat writeFormat_
private

Write option (default is IOstream::ASCII.

Definition at line 55 of file ensightSurfaceWriter.H.

Referenced by ensightSurfaceWriter::ensightSurfaceWriter().

◆ collateTimes_

bool collateTimes_
private

Definition at line 57 of file ensightSurfaceWriter.H.

Referenced by ensightSurfaceWriter::ensightSurfaceWriter().


The documentation for this class was generated from the following files: