nastranSurfaceWriter Class Reference

A surface writer for the Nastran file format - both surface mesh and fields. More...

Inheritance diagram for nastranSurfaceWriter:
Collaboration diagram for nastranSurfaceWriter:

Public Types

enum  format { wfShort, wfLong, wfFree }
 

Public Member Functions

 TypeName ("nastran")
 Runtime type information. More...
 
 nastranSurfaceWriter (const IOstream::streamFormat writeFormat)
 Construct given write format. More...
 
 nastranSurfaceWriter (const dictionary &optDict)
 Construct with some output options. More...
 
virtual ~nastranSurfaceWriter ()
 Destructor. More...
 
virtual bool separateGeometry ()
 True if the surface format supports geometry in a separate file. More...
 
virtual void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces) const
 Write single surface geometry to file. More...
 
virtual void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< scalar > &values, const bool isNodeValues) const
 Write scalarField for a single surface to file. More...
 
virtual void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< vector > &values, const bool isNodeValues) const
 Write vectorField for a single surface to file. More...
 
virtual void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< sphericalTensor > &values, const bool isNodeValues) const
 Write sphericalTensorField for a single surface to file. More...
 
virtual void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< symmTensor > &values, const bool isNodeValues) const
 Write symmTensorField for a single surface to file. More...
 
virtual void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< tensor > &values, const bool isNodeValues) const
 Write tensorField for a single surface to file. More...
 
- Public Member Functions inherited from surfaceWriter
 TypeName ("surfaceWriter")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, surfaceWriter, word,(const IOstream::streamFormat writeFormat),(writeFormat))
 
 declareRunTimeSelectionTable (autoPtr, surfaceWriter, wordDict,(const dictionary &optDict),(optDict))
 
 surfaceWriter (const IOstream::streamFormat writeFormat)
 Construct given write format. More...
 
 surfaceWriter (const dictionary &optDict)
 Construct with output options. More...
 
virtual ~surfaceWriter ()
 Destructor. More...
 

Static Public Attributes

static const NamedEnum< format, 3 > formatNames_
 

Additional Inherited Members

- Static Public Member Functions inherited from surfaceWriter
static autoPtr< surfaceWriterNew (const word &writeType, const IOstream::streamFormat writeFormat)
 Return a reference to the selected surfaceWriter. More...
 
static autoPtr< surfaceWriterNew (const word &writeType, const dictionary &optDict)
 Return a reference to the selected surfaceWriter. More...
 
- Protected Attributes inherited from surfaceWriter
IOstream::streamFormat writeFormat_
 Write format. More...
 

Detailed Description

A surface writer for the Nastran file format - both surface mesh and fields.

nastranOptions { From OpenFOAM field name to Nastran field name fields ((pMean PLOAD2));

Optional scale scale 2.0;

Optional format format free; // short, long, free }

Source files

Definition at line 63 of file nastranSurfaceWriter.H.

Member Enumeration Documentation

◆ format

enum format
Enumerator
wfShort 
wfLong 
wfFree 

Definition at line 69 of file nastranSurfaceWriter.H.

Constructor & Destructor Documentation

◆ nastranSurfaceWriter() [1/2]

Construct given write format.

Definition at line 320 of file nastranSurfaceWriter.C.

Referenced by NamedEnum< compressibleField, 8 >::names().

Here is the caller graph for this function:

◆ nastranSurfaceWriter() [2/2]

nastranSurfaceWriter ( const dictionary optDict)

Construct with some output options.

Definition at line 331 of file nastranSurfaceWriter.C.

References forAll, nastranSurfaceWriter::formatNames_, dictionary::lookup(), and NamedEnum< Enum, nEnum >::read().

Here is the call graph for this function:

◆ ~nastranSurfaceWriter()

~nastranSurfaceWriter ( )
virtual

Destructor.

Definition at line 361 of file nastranSurfaceWriter.C.

References nastranSurfaceWriter::write().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "nastran"  )

Runtime type information.

◆ separateGeometry()

virtual bool separateGeometry ( )
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 171 of file nastranSurfaceWriter.H.

◆ write() [1/6]

void write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces 
) const
virtual

Write single surface geometry to file.

Implements surfaceWriter.

Definition at line 368 of file nastranSurfaceWriter.C.

References Foam::endl(), Foam::Info, Foam::isDir(), Foam::mkDir(), OFstream::name(), Foam::nl, and List< T >::size().

Referenced by nastranSurfaceWriter::~nastranSurfaceWriter().

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

◆ write() [2/6]

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

Write scalarField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Implements surfaceWriter.

◆ write() [3/6]

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

Write vectorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Implements surfaceWriter.

◆ write() [4/6]

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

Write sphericalTensorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Implements surfaceWriter.

◆ write() [5/6]

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

Write symmTensorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Implements surfaceWriter.

◆ write() [6/6]

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

Write tensorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Implements surfaceWriter.

Member Data Documentation

◆ formatNames_


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