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

Ensight format surface reader. More...

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

Public Member Functions

 TypeName ("ensight")
 
 ensightSurfaceReader (const fileName &fName)
 
virtual ~ensightSurfaceReader ()=default
 
virtual const meshedSurfacegeometry (const label timeIndex)
 
virtual instantList times () const
 
virtual wordList fieldNames (const label timeIndex) const
 
virtual tmp< Field< scalar > > field (const label timeIndex, const label fieldIndex, const scalar &refValue=pTraits< scalar >::zero) const
 
virtual tmp< Field< vector > > field (const label timeIndex, const label fieldIndex, const vector &refValue=pTraits< vector >::zero) const
 
virtual tmp< Field< sphericalTensor > > field (const label timeIndex, const label fieldIndex, const sphericalTensor &refValue=pTraits< sphericalTensor >::zero) const
 
virtual tmp< Field< symmTensor > > field (const label timeIndex, const label fieldIndex, const symmTensor &refValue=pTraits< symmTensor >::zero) const
 
virtual tmp< Field< tensor > > field (const label timeIndex, const label fieldIndex, const tensor &refValue=pTraits< tensor >::zero) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > readField (const label timeIndex, const label fieldIndex) const
 
- Public Member Functions inherited from surfaceReader
 TypeName ("surfaceReader")
 
 declareRunTimeSelectionTable (autoPtr, surfaceReader, fileName,(const fileName &fName),(fName))
 
 surfaceReader (const fileName &fName)
 
virtual ~surfaceReader ()=default
 

Protected Types

enum  idTypes : unsigned char { NONE = 0, IGNORE = 1, GIVEN = 2 }
 

Protected Member Functions

void skip (const label n, Istream &is) const
 
void readLine (IFstream &is, string &buffer) const
 
void debugSection (const word &expected, IFstream &is) const
 
Pair< idTypesreadGeometryHeader (ensightReadFile &is) const
 
void readCase (IFstream &is)
 
template<class Type >
void readFromLine (const label nSkip, IStringStream &is, Type &value) const
 
template<class Type >
void readFromLine (const label nSkip, const string &buffer, Type &value) const
 
template<class Type >
tmp< Field< Type > > readField (const label timeIndex, const label fieldIndex) const
 

Static Protected Member Functions

static fileName replaceMask (const fileName &fName, const label timeIndex)
 

Protected Attributes

IOstreamOption::streamFormat streamFormat_
 
fileName baseDir_
 
fileName meshFileName_
 
List< wordfieldNames_
 
List< stringfieldFileNames_
 
label nTimeSteps_
 
label timeStartIndex_
 
label timeIncrement_
 
instantList timeValues_
 
autoPtr< meshedSurfacesurfPtr_
 
List< Tuple2< string, label > > schema_
 
- Protected Attributes inherited from surfaceReader
fileName fileName_
 

Additional Inherited Members

- Static Public Member Functions inherited from surfaceReader
static autoPtr< surfaceReaderNew (const word &readType, const fileName &fName)
 

Detailed Description

Ensight format surface reader.

Source files

Definition at line 50 of file ensightSurfaceReader.H.

Member Enumeration Documentation

◆ idTypes

enum idTypes : unsigned char
protected
Enumerator
NONE 

"off", "assign"

IGNORE 

Read but "ignore".

GIVEN 

Use "given" values (not supported)

Definition at line 59 of file ensightSurfaceReader.H.

Constructor & Destructor Documentation

◆ ensightSurfaceReader()

ensightSurfaceReader ( const fileName fName)
explicit

Definition at line 335 of file ensightSurfaceReader.C.

References ensightSurfaceReader::readCase().

Here is the call graph for this function:

◆ ~ensightSurfaceReader()

virtual ~ensightSurfaceReader ( )
virtualdefault

Member Function Documentation

◆ skip()

void skip ( const label  n,
Istream is 
) const
protected

Definition at line 57 of file ensightSurfaceReader.C.

References DebugInfo, IOstream::good(), n, Foam::nl, and WarningInFunction.

Here is the call graph for this function:

◆ readLine()

void readLine ( IFstream is,
string buffer 
) const
protected

Definition at line 80 of file ensightSurfaceReader.C.

References ISstream::getLine(), IOstream::good(), Foam::stringOps::inplaceTrimRight(), and Foam::pos().

Here is the call graph for this function:

◆ debugSection()

void debugSection ( const word expected,
IFstream is 
) const
protected

Definition at line 99 of file ensightSurfaceReader.C.

References DebugInfo, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::nl.

Here is the call graph for this function:

◆ replaceMask()

Foam::fileName replaceMask ( const fileName fName,
const label  timeIndex 
)
staticprotected

Definition at line 121 of file ensightSurfaceReader.C.

References Foam::stringOps::count(), string::replace(), Foam::setfill(), Foam::setw(), and timeIndex.

Here is the call graph for this function:

◆ readGeometryHeader()

Foam::Pair< Foam::ensightSurfaceReader::idTypes > readGeometryHeader ( ensightReadFile is) const
protected

Definition at line 148 of file ensightSurfaceReader.C.

References DebugInfo, Foam::nl, ensightReadFile::read(), ensightReadFile::readBinaryHeader(), and Pair::second().

Here is the call graph for this function:

◆ readCase()

void readCase ( IFstream is)
protected

◆ readFromLine() [1/2]

void readFromLine ( const label  nSkip,
IStringStream is,
Type &  value 
) const
protected

Definition at line 28 of file ensightSurfaceReaderTemplates.C.

◆ readFromLine() [2/2]

void readFromLine ( const label  nSkip,
const string buffer,
Type &  value 
) const
protected

Definition at line 42 of file ensightSurfaceReaderTemplates.C.

◆ readField() [1/2]

tmp<Field<Type> > readField ( const label  timeIndex,
const label  fieldIndex 
) const
protected

◆ TypeName()

TypeName ( "ensight"  )

◆ geometry()

const Foam::meshedSurface & geometry ( const label  timeIndex)
virtual

◆ times()

Foam::instantList times ( ) const
virtual

Implements surfaceReader.

Definition at line 615 of file ensightSurfaceReader.C.

◆ fieldNames()

Foam::wordList fieldNames ( const label  timeIndex) const
virtual

Implements surfaceReader.

Definition at line 622 of file ensightSurfaceReader.C.

◆ field() [1/5]

Foam::tmp< Foam::Field< Foam::scalar > > field ( const label  timeIndex,
const label  fieldIndex,
const scalar &  refValue = pTraits<scalar>::zero 
) const
virtual

Implements surfaceReader.

Definition at line 631 of file ensightSurfaceReader.C.

References timeIndex.

◆ field() [2/5]

Foam::tmp< Foam::Field< Foam::vector > > field ( const label  timeIndex,
const label  fieldIndex,
const vector refValue = pTraits<vector>::zero 
) const
virtual

Implements surfaceReader.

Definition at line 642 of file ensightSurfaceReader.C.

References timeIndex.

◆ field() [3/5]

Foam::tmp< Foam::Field< Foam::sphericalTensor > > field ( const label  timeIndex,
const label  fieldIndex,
const sphericalTensor refValue = pTraits<sphericalTensor>::zero 
) const
virtual

Implements surfaceReader.

Definition at line 654 of file ensightSurfaceReader.C.

References timeIndex.

◆ field() [4/5]

Foam::tmp< Foam::Field< Foam::symmTensor > > field ( const label  timeIndex,
const label  fieldIndex,
const symmTensor refValue = pTraits<symmTensor>::zero 
) const
virtual

Implements surfaceReader.

Definition at line 665 of file ensightSurfaceReader.C.

References timeIndex.

◆ field() [5/5]

Foam::tmp< Foam::Field< Foam::tensor > > field ( const label  timeIndex,
const label  fieldIndex,
const tensor refValue = pTraits<tensor>::zero 
) const
virtual

Implements surfaceReader.

Definition at line 676 of file ensightSurfaceReader.C.

References timeIndex.

◆ readField() [2/2]

Foam::tmp<Foam::Field<Type> > readField ( const label  timeIndex,
const label  fieldIndex 
) const

Member Data Documentation

◆ streamFormat_

IOstreamOption::streamFormat streamFormat_
protected

Definition at line 67 of file ensightSurfaceReader.H.

◆ baseDir_

fileName baseDir_
protected

Definition at line 70 of file ensightSurfaceReader.H.

◆ meshFileName_

fileName meshFileName_
protected

Definition at line 73 of file ensightSurfaceReader.H.

◆ fieldNames_

List<word> fieldNames_
protected

Definition at line 76 of file ensightSurfaceReader.H.

◆ fieldFileNames_

List<string> fieldFileNames_
protected

Definition at line 79 of file ensightSurfaceReader.H.

◆ nTimeSteps_

label nTimeSteps_
protected

Definition at line 82 of file ensightSurfaceReader.H.

◆ timeStartIndex_

label timeStartIndex_
protected

Definition at line 85 of file ensightSurfaceReader.H.

◆ timeIncrement_

label timeIncrement_
protected

Definition at line 88 of file ensightSurfaceReader.H.

◆ timeValues_

instantList timeValues_
protected

Definition at line 91 of file ensightSurfaceReader.H.

◆ surfPtr_

autoPtr<meshedSurface> surfPtr_
protected

Definition at line 94 of file ensightSurfaceReader.H.

◆ schema_

List<Tuple2<string, label> > schema_
protected

Definition at line 96 of file ensightSurfaceReader.H.


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