Public Member Functions | Private Member Functions | Static Private Member Functions
vtkSurfaceWriter Class Reference

A surfaceWriter for VTK legacy format. More...

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

Public Member Functions

 TypeName ("vtk")
 Runtime type information. More...
 
 vtkSurfaceWriter ()
 Construct null. More...
 
virtual ~vtkSurfaceWriter ()
 Destructor. 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<>
void writeData (Ostream &os, const Field< scalar > &values)
 
template<>
void writeData (Ostream &os, const Field< vector > &values)
 
template<>
void writeData (Ostream &os, const Field< sphericalTensor > &values)
 
template<>
void writeData (Ostream &os, const Field< symmTensor > &values)
 
template<>
void writeData (Ostream &os, const Field< tensor > &values)
 
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...
 
virtual bool separateGeometry () const
 True if the surface format supports geometry in a separate file. More...
 

Private Member Functions

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

Static Private Member Functions

static void writeGeometry (Ostream &, const pointField &, const faceList &)
 
template<class Type >
static void writeData (Ostream &, const Field< Type > &)
 

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 VTK legacy format.

Source files

Definition at line 48 of file vtkSurfaceWriter.H.

Constructor & Destructor Documentation

◆ vtkSurfaceWriter()

Construct null.

Definition at line 203 of file vtkSurfaceWriter.C.

◆ ~vtkSurfaceWriter()

~vtkSurfaceWriter ( )
virtual

Destructor.

Definition at line 211 of file vtkSurfaceWriter.C.

Member Function Documentation

◆ writeGeometry()

void writeGeometry ( Ostream os,
const pointField points,
const faceList faces 
)
staticprivate

Definition at line 40 of file vtkSurfaceWriter.C.

References f(), forAll, Foam::nl, points, List::size(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ writeData() [1/6]

void writeData ( Ostream os,
const Field< Type > &  values 
)
staticprivate

Definition at line 33 of file vtkSurfaceWriterTemplates.C.

References forAll, and Foam::nl.

◆ 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 ( "vtk"  )

Runtime type information.

◆ 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 218 of file vtkSurfaceWriter.C.

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

Referenced by main().

Here is the call graph for this function:
Here is the caller 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.

◆ writeData() [2/6]

void writeData ( Ostream os,
const Field< scalar > &  values 
)

Definition at line 94 of file vtkSurfaceWriter.C.

References forAll, and Foam::nl.

◆ writeData() [3/6]

void writeData ( Ostream os,
const Field< vector > &  values 
)

Definition at line 123 of file vtkSurfaceWriter.C.

References forAll, and Foam::nl.

◆ writeData() [4/6]

void writeData ( Ostream os,
const Field< sphericalTensor > &  values 
)

Definition at line 141 of file vtkSurfaceWriter.C.

References forAll, and Foam::nl.

◆ writeData() [5/6]

void writeData ( Ostream os,
const Field< symmTensor > &  values 
)

Definition at line 158 of file vtkSurfaceWriter.C.

References forAll, and Foam::nl.

◆ writeData() [6/6]

void writeData ( Ostream os,
const Field< tensor > &  values 
)

Definition at line 179 of file vtkSurfaceWriter.C.

References forAll, and Foam::nl.

◆ 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 49 of file vtkSurfaceWriterTemplates.C.

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

Here is the call graph for this function:

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