boundaryDataSurfaceReader Class Reference

A boundaryData format surface reader. However, the "surface" represented by boundaryData is actually only point data! More...

Inheritance diagram for boundaryDataSurfaceReader:
Collaboration diagram for boundaryDataSurfaceReader:

Public Member Functions

 TypeName ("boundaryData")
 Runtime type information. More...
 
 boundaryDataSurfaceReader (const fileName &fName, const word &pointsName="points")
 Construct from fileName. More...
 
 boundaryDataSurfaceReader (const fileName &fName, const dictionary &options, const word &pointsName="points")
 Construct from fileName with reader options. More...
 
virtual ~boundaryDataSurfaceReader ()=default
 Destructor. More...
 
virtual const meshedSurfacegeometry (const label timeIndex)
 Return a reference to the surface geometry. More...
 
virtual instantList times () const
 Return a list of the available times. More...
 
virtual wordList fieldNames (const label timeIndex) const
 Return a list of the available fields at a given time. More...
 
virtual tmp< Field< scalar > > field (const label timeIndex, const label fieldIndex, const scalar &refValue=pTraits< scalar >::zero) const
 Return a scalar field at a given time. More...
 
virtual tmp< Field< vector > > field (const label timeIndex, const label fieldIndex, const vector &refValue=pTraits< vector >::zero) const
 Return a vector field at a given time. More...
 
virtual tmp< Field< sphericalTensor > > field (const label timeIndex, const label fieldIndex, const sphericalTensor &refValue=pTraits< sphericalTensor >::zero) const
 Return a sphericalTensor field at a given time. More...
 
virtual tmp< Field< symmTensor > > field (const label timeIndex, const label fieldIndex, const symmTensor &refValue=pTraits< symmTensor >::zero) const
 Return a symmTensor field at a given time. More...
 
virtual tmp< Field< tensor > > field (const label timeIndex, const label fieldIndex, const tensor &refValue=pTraits< tensor >::zero) const
 Return a tensor field at a given time. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > readFieldTemplate (const label timeIndex, const label fieldIndex) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > readField (const Time &runTime, const fileName &baseDir, const instant &timeDir, const word &fieldName, Type &avg)
 
template<class Type >
Foam::tmp< Foam::Field< Type > > readField (const fileName &baseDir, const instant &timeDir, const word &fieldName, Type &avg)
 
- Public Member Functions inherited from surfaceReader
 TypeName ("surfaceReader")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, surfaceReader, fileName,(const fileName &fName, const dictionary &options),(fName, options))
 
 surfaceReader (const fileName &fName)
 Construct from fileName. More...
 
 surfaceReader (const fileName &fName, const dictionary &options)
 Construct from fileName and specified options. More...
 
virtual ~surfaceReader ()=default
 Destructor. More...
 

Static Public Member Functions

static pointField readPoints (const Time &runTime, const fileName &baseDir, const word &pointsName="points")
 Read points file. More...
 
static pointField readPoints (const fileName &baseDir, const word &pointsName="points")
 Read points file. More...
 
template<class Type >
static tmp< Field< Type > > readField (const Time &runTime, const fileName &baseDir, const instant &timeDir, const word &fieldName, Type &avg)
 Read and return given field. More...
 
template<class Type >
static tmp< Field< Type > > readField (const fileName &baseDir, const instant &timeDir, const word &fieldName, Type &avg)
 Read and return given field. More...
 
- Static Public Member Functions inherited from surfaceReader
static dictionary formatOptions (const dictionary &dict, const word &formatName, const word &entryName="formatOptions")
 Same as fileFormats::getFormatOptions. More...
 
static autoPtr< surfaceReaderNew (const word &readType, const fileName &fName, const dictionary &options=dictionary())
 Return a reference to the selected surfaceReader. More...
 

Additional Inherited Members

- Protected Attributes inherited from surfaceReader
fileName fileName_
 File name. More...
 

Detailed Description

A boundaryData format surface reader. However, the "surface" represented by boundaryData is actually only point data!

Points <case>/constant/region0/"boundaryData"/patchName/points

Values <case>/constant/region0/"boundaryData"/patchName/TIME/field

readOptions
{
    boundaryData
    {
        points      points;
    }
}

Format options for boundaryData:

Property Description Required Default
points Name of the "points" file no points
Source files

Definition at line 84 of file boundaryDataSurfaceReader.H.

Constructor & Destructor Documentation

◆ boundaryDataSurfaceReader() [1/2]

boundaryDataSurfaceReader ( const fileName fName,
const word pointsName = "points" 
)
explicit

Construct from fileName.

Definition at line 140 of file boundaryDataSurfaceReader.C.

◆ boundaryDataSurfaceReader() [2/2]

boundaryDataSurfaceReader ( const fileName fName,
const dictionary options,
const word pointsName = "points" 
)

Construct from fileName with reader options.

Definition at line 150 of file boundaryDataSurfaceReader.C.

References Foam::ensightOutput::debug, DebugInFunction, Foam::endl(), Foam::Info, and dictionary::readIfPresent().

Here is the call graph for this function:

◆ ~boundaryDataSurfaceReader()

virtual ~boundaryDataSurfaceReader ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "boundaryData"  )

Runtime type information.

◆ readPoints() [1/2]

Foam::pointField readPoints ( const Time runTime,
const fileName baseDir,
const word pointsName = "points" 
)
static

Read points file.

Definition at line 43 of file boundaryDataSurfaceReader.C.

References DebugInfo, Foam::endl(), rawIOField< Type >::field(), io(), points, runTime, and fileName::toAbsolute().

Here is the call graph for this function:

◆ readPoints() [2/2]

Foam::pointField readPoints ( const fileName baseDir,
const word pointsName = "points" 
)
static

Read points file.

Definition at line 82 of file boundaryDataSurfaceReader.C.

◆ readField() [1/4]

static tmp<Field<Type> > readField ( const Time runTime,
const fileName baseDir,
const instant timeDir,
const word fieldName,
Type &  avg 
)
static

Read and return given field.

◆ readField() [2/4]

static tmp<Field<Type> > readField ( const fileName baseDir,
const instant timeDir,
const word fieldName,
Type &  avg 
)
static

Read and return given field.

◆ geometry()

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

Return a reference to the surface geometry.

Implements surfaceReader.

Definition at line 177 of file boundaryDataSurfaceReader.C.

References DebugInFunction, Foam::endl(), and timeIndex.

Here is the call graph for this function:

◆ times()

Foam::instantList times ( ) const
virtual

Return a list of the available times.

Implements surfaceReader.

Definition at line 193 of file boundaryDataSurfaceReader.C.

◆ fieldNames()

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

Return a list of the available fields at a given time.

Implements surfaceReader.

Definition at line 200 of file boundaryDataSurfaceReader.C.

References UList< T >::begin(), List< T >::clear(), UList< T >::end(), f(), Foam::fileHandler, Foam::name(), UList< T >::size(), Foam::sort(), timeIndex, and Foam::transform().

Here is the call graph for this function:

◆ field() [1/5]

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

Return a scalar field at a given time.

Implements surfaceReader.

Definition at line 230 of file boundaryDataSurfaceReader.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

Return a vector field at a given time.

Implements surfaceReader.

Definition at line 241 of file boundaryDataSurfaceReader.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

Return a sphericalTensor field at a given time.

Implements surfaceReader.

Definition at line 253 of file boundaryDataSurfaceReader.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

Return a symmTensor field at a given time.

Implements surfaceReader.

Definition at line 264 of file boundaryDataSurfaceReader.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

Return a tensor field at a given time.

Implements surfaceReader.

Definition at line 275 of file boundaryDataSurfaceReader.C.

References timeIndex.

◆ readFieldTemplate()

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

Definition at line 120 of file boundaryDataSurfaceReader.C.

References timeIndex.

◆ readField() [3/4]

Foam::tmp<Foam::Field<Type> > readField ( const Time runTime,
const fileName baseDir,
const instant timeDir,
const word fieldName,
Type &  avg 
)

◆ readField() [4/4]

Foam::tmp<Foam::Field<Type> > readField ( const fileName baseDir,
const instant timeDir,
const word fieldName,
Type &  avg 
)

Definition at line 74 of file boundaryDataSurfaceReaderTemplates.C.


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