surfaceWriter Class Referenceabstract

Base class for surface writers. More...

Inheritance diagram for surfaceWriter:

Public Member Functions

 TypeName ("surfaceWriter")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, surfaceWriter, word,(const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression),(writeFormat, writeCompression))
 
 declareRunTimeSelectionTable (autoPtr, surfaceWriter, dict,(const dictionary &dict),(dict))
 
 surfaceWriter (const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression)
 Construct given write options. More...
 
 surfaceWriter (const dictionary &dict)
 Construct from dictionary. More...
 
virtual ~surfaceWriter ()
 Destructor. More...
 
virtual void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const wordList &fieldNames, const bool writePointValues #define FieldTypeValuesConstArg(Type, nullArg)) const =0
 Write fields for a single surface to file. More...
 
virtual void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const wordList &fieldNames, const bool writePointValues #define FieldTypeValuesConstArg(Type, nullArg)) const
 Write fields for a single surface to file. More...
 
void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces) const
 Write the surface geometry only. More...
 
template<class ... Args>
void write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const bool writePointValues, const Args &... args) const
 Write fields for a single surface to file. For use in code where. More...
 

Static Public Member Functions

static autoPtr< surfaceWriterNew (const word &writeType, const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression)
 Select given write options. More...
 
static autoPtr< surfaceWriterNew (const word &writeType, const dictionary &dict)
 Select given a dictionary. More...
 

Protected Attributes

IOstream::streamFormat writeFormat_
 Write format. More...
 
IOstream::compressionType writeCompression_
 Write compression. More...
 

Detailed Description

Base class for surface writers.

Source files

Definition at line 54 of file surfaceWriter.H.

Constructor & Destructor Documentation

◆ surfaceWriter() [1/2]

surfaceWriter ( const IOstream::streamFormat  writeFormat,
const IOstream::compressionType  writeCompression 
)

Construct given write options.

Definition at line 44 of file surfaceWriter.C.

◆ surfaceWriter() [2/2]

surfaceWriter ( const dictionary dict)

Construct from dictionary.

Definition at line 54 of file surfaceWriter.C.

References surfaceWriter::New().

Here is the call graph for this function:

◆ ~surfaceWriter()

~surfaceWriter ( )
virtual

Destructor.

Definition at line 148 of file surfaceWriter.C.

Member Function Documentation

◆ TypeName()

TypeName ( "surfaceWriter"  )

Runtime type information.

◆ declareRunTimeSelectionTable() [1/2]

declareRunTimeSelectionTable ( autoPtr  ,
surfaceWriter  ,
word  ,
(const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression)  ,
(writeFormat, writeCompression)   
)

◆ declareRunTimeSelectionTable() [2/2]

declareRunTimeSelectionTable ( autoPtr  ,
surfaceWriter  ,
dict  ,
(const dictionary &dict ,
(dict  
)

◆ New() [1/2]

Foam::autoPtr< Foam::surfaceWriter > New ( const word writeType,
const IOstream::streamFormat  writeFormat,
const IOstream::compressionType  writeCompression 
)
static

Select given write options.

Definition at line 75 of file surfaceWriter.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and MeshedSurfaceProxy< Face >::writeTypes().

Referenced by surfaceFieldValue::initialise(), surfaceWriter::New(), sampledSurfaces::read(), and surfaceWriter::surfaceWriter().

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

◆ New() [2/2]

Foam::autoPtr< Foam::surfaceWriter > New ( const word writeType,
const dictionary dict 
)
static

Select given a dictionary.

Definition at line 111 of file surfaceWriter.C.

References IOstream::ASCII, IOstream::compressionEnum(), dict, IOstream::formatEnum(), dictionary::found(), dictionary::lookup(), surfaceWriter::New(), and IOstream::UNCOMPRESSED.

Here is the call graph for this function:

◆ write() [1/4]

virtual void write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const wordList fieldNames,
const bool writePointValues #define   FieldTypeValuesConstArgType, nullArg 
) const
pure virtual

Write fields for a single surface to file.

Implemented in proxySurfaceWriter, foamSurfaceWriter, noSurfaceWriter, rawSurfaceWriter, vtkSurfaceWriter, and ensightSurfaceWriter.

Referenced by noSurfaceWriter::write(), and surfaceWriter::write().

Here is the caller graph for this function:

◆ write() [2/4]

virtual void write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const wordList fieldNames,
const bool writePointValues #define   FieldTypeValuesConstArgType, nullArg 
) const
inlinevirtual

Write fields for a single surface to file.

Reimplemented in proxySurfaceWriter, foamSurfaceWriter, noSurfaceWriter, rawSurfaceWriter, vtkSurfaceWriter, and ensightSurfaceWriter.

Definition at line 152 of file surfaceWriter.H.

References field(), FieldTypeValuesParameter, Foam::FOR_ALL_FIELD_TYPES(), and surfaceWriter::write().

Here is the call graph for this function:

◆ write() [3/4]

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

Write the surface geometry only.

Definition at line 183 of file surfaceWriter.H.

References FieldTypeValuesParameter, Foam::FOR_ALL_FIELD_TYPES(), and surfaceWriter::write().

Here is the call graph for this function:

◆ write() [4/4]

void write ( const fileName outputDir,
const fileName surfaceName,
const pointField points,
const faceList faces,
const bool  writePointValues,
const Args &...  args 
) const
inline

Write fields for a single surface to file. For use in code where.

the fields that are to be written are known. Takes any number of name, values arguments at the end. E.g.:

write ( Output options "myDirectory", "mySurface",

Geometry pp.localPoints(), pp.localFaces(),

Fields "p", Field<scalar>(pp.size(), ...), "U", Field<vector>(pp.size(), ...) );

Definition at line 224 of file surfaceWriter.H.

References DeclareFieldTypeValues, field(), fieldNames, FieldTypeValuesParameter, Foam::FOR_ALL_FIELD_TYPES(), setWriter::unpackTypeValueSets(), and surfaceWriter::write().

Here is the call graph for this function:

Member Data Documentation

◆ writeFormat_

IOstream::streamFormat writeFormat_
protected

Write format.

Definition at line 61 of file surfaceWriter.H.

◆ writeCompression_

IOstream::compressionType writeCompression_
protected

Write compression.

Definition at line 64 of file surfaceWriter.H.


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