Public Types | Public Member Functions | Static Public Attributes | List of all members
nastranSurfaceWriter Class Reference

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

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

Public Types

enum  writeFormat { wfShort, wfLong, wfFree }
 

Public Member Functions

 TypeName ("nastran")
 Runtime type information. More...
 
 nastranSurfaceWriter ()
 Construct null. More...
 
 nastranSurfaceWriter (const dictionary &options)
 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 bool verbose=false) 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 bool verbose=false) 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 bool verbose=false) 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 bool verbose=false) 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 bool verbose=false) 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 bool verbose=false) 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,(),())
 
 declareRunTimeSelectionTable (autoPtr, surfaceWriter, wordDict,(const dictionary &optDict),(optDict))
 
 surfaceWriter ()
 Construct null. More...
 
virtual ~surfaceWriter ()
 Destructor. More...
 

Static Public Attributes

static const NamedEnum< writeFormat, 3 > writeFormatNames_
 

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 surface writer for the Nastran file format - both surface mesh and fields.

formatOptions { nastran { 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 64 of file nastranSurfaceWriter.H.

Member Enumeration Documentation

◆ writeFormat

Enumerator
wfShort 
wfLong 
wfFree 

Definition at line 70 of file nastranSurfaceWriter.H.

Constructor & Destructor Documentation

◆ nastranSurfaceWriter() [1/2]

Construct null.

Definition at line 321 of file nastranSurfaceWriter.C.

◆ nastranSurfaceWriter() [2/2]

nastranSurfaceWriter ( const dictionary options)

Construct with some output options.

Definition at line 330 of file nastranSurfaceWriter.C.

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

Here is the call graph for this function:

◆ ~nastranSurfaceWriter()

~nastranSurfaceWriter ( )
virtual

Destructor.

Definition at line 353 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 173 of file nastranSurfaceWriter.H.

◆ write() [1/6]

void 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 360 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 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 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 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 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 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 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 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 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 bool  verbose = false 
) const
virtual

Write tensorField for a single surface to file.

One value per face or vertex (isNodeValues = true)

Reimplemented from surfaceWriter.

Member Data Documentation

◆ writeFormatNames_

const NamedEnum< nastranSurfaceWriter::writeFormat, 3 > writeFormatNames_
static

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