OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

ensightFile Class Reference

Ensight output with specialized write() for strings, integers and floats. Correctly handles binary write as well. More...

Inheritance diagram for ensightFile:
Collaboration diagram for ensightFile:

List of all members.


Public Member Functions

 ensightFile (const fileName &pathname, IOstream::streamFormat format=IOstream::BINARY)
 Construct from pathname.
 ~ensightFile ()
virtual Ostreamwrite (const char *buf, std::streamsize count)
 binary write
virtual OstreamwriteKeyword (const string &key)
 write element keyword with trailing newline, optionally with undef
OstreamwriteBinaryHeader ()
 write "C Binary" for binary files (eg, geometry/measured)
OstreamwriteUndef ()
 write undef value
Ostreamwrite (const string &value)
 write string as "%80s" or as binary
Ostreamwrite (const label &value)
 write integer as "%10d" or as binary
Ostreamwrite (const label &value, const label fieldWidth)
 write integer with specified width or as binary
Ostreamwrite (const scalar &value)
 write float as "%12.5e" or as binary
void newline ()
 Add carriage return to ascii stream.

Static Public Member Functions

static bool allowUndef ()
 Return setting for whether 'undef' values are allowed in results.
static string mask ()
 '*' mask appropriate for subDir
static string subDir (const label)
 consistent zero-padded numbers for subdirectories
static bool allowUndef (bool)
static scalar undefValue (const scalar &)
 Assign the value to represent undef in the results.

Detailed Description

Ensight output with specialized write() for strings, integers and floats. Correctly handles binary write as well.

Definition at line 40 of file ensightFile.H.


Constructor & Destructor Documentation

ensightFile ( const fileName pathname,
IOstream::streamFormat  format = IOstream::BINARY 
)

Construct from pathname.

Definition at line 29 of file ensightFile.C.

References IOstream::setf().

Here is the call graph for this function:

~ensightFile (  ) 

Definition at line 48 of file ensightFile.C.


Member Function Documentation

bool allowUndef (  )  [static]

Return setting for whether 'undef' values are allowed in results.

Definition at line 54 of file ensightFile.C.

Foam::string mask (  )  [static]

'*' mask appropriate for subDir

Definition at line 244 of file ensightFile.C.

Foam::string subDir ( const label  n  )  [static]

consistent zero-padded numbers for subdirectories

Definition at line 251 of file ensightFile.C.

bool allowUndef ( bool  value  )  [static]

Definition at line 60 of file ensightFile.C.

Foam::scalar undefValue ( const scalar value  )  [static]

Assign the value to represent undef in the results.

Returns the previous value NB: do not use values larger than floatScalarVGREAT

Definition at line 68 of file ensightFile.C.

Foam::Ostream & write ( const char *  buf,
std::streamsize  count 
) [virtual]

binary write

Reimplemented from OSstream.

Definition at line 80 of file ensightFile.C.

Referenced by ensightFile::writeBinaryHeader(), ensightPart::writeFieldList(), ensightPart::writeHeader(), and ensightFile::writeKeyword().

Here is the caller graph for this function:

Foam::Ostream & writeKeyword ( const string key  )  [virtual]

write element keyword with trailing newline, optionally with undef

Reimplemented in ensightGeoFile.

Definition at line 213 of file ensightFile.C.

References ensightFile::write().

Referenced by ensightPart::writeField().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::Ostream & writeBinaryHeader (  ) 

write "C Binary" for binary files (eg, geometry/measured)

Definition at line 231 of file ensightFile.C.

References ensightFile::newline(), and ensightFile::write().

Here is the call graph for this function:

Foam::Ostream & writeUndef (  ) 

write undef value

Definition at line 206 of file ensightFile.C.

References IOstream::ASCII, IOstream::format(), Foam::nl, and OSstream::stream().

Here is the call graph for this function:

Foam::Ostream & write ( const string value  )  [virtual]

write string as "%80s" or as binary

Reimplemented from OSstream.

Definition at line 90 of file ensightFile.C.

References OSstream::stream().

Here is the call graph for this function:

Foam::Ostream & write ( const label value  ) 

write integer as "%10d" or as binary

Definition at line 127 of file ensightFile.C.

References OSstream::stream().

Here is the call graph for this function:

Foam::Ostream & write ( const label value,
const label  fieldWidth 
)

write integer with specified width or as binary

Definition at line 150 of file ensightFile.C.

Foam::Ostream & write ( const scalar value  ) 

write float as "%12.5e" or as binary

Definition at line 175 of file ensightFile.C.

References OSstream::stream().

Here is the call graph for this function:

void newline (  ) 

Add carriage return to ascii stream.

Definition at line 197 of file ensightFile.C.

References OSstream::stream().

Referenced by ensightFile::writeBinaryHeader(), ensightPart::writeFieldList(), and ensightPart::writeHeader().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd