Loading...
Searching...
No Matches
boundaryDataSurfaceReader Class Reference

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

#include <boundaryDataSurfaceReader.H>

Inheritance diagram for boundaryDataSurfaceReader:
Collaboration diagram for boundaryDataSurfaceReader:

Public Member Functions

 TypeName ("boundaryData")
 Runtime type information.
 boundaryDataSurfaceReader (const fileName &fName, const word &pointsName="points")
 Construct from fileName.
 boundaryDataSurfaceReader (const fileName &fName, const dictionary &options, const word &pointsName="points")
 Construct from fileName with reader options.
virtual ~boundaryDataSurfaceReader ()=default
 Destructor.
virtual const meshedSurfacegeometry (const label timeIndex)
 Return a reference to the surface geometry.
virtual instantList times () const
 Return a list of the available times.
virtual wordList fieldNames (const label timeIndex) const
 Return a list of the available fields at a given time.
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.
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.
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.
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.
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.
template<class Type>
Foam::tmp< Foam::Field< Type > > readFieldTemplate (const label timeIndex, const label fieldIndex) const
Public Member Functions inherited from surfaceReader
 TypeName ("surfaceReader")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, surfaceReader, fileName,(const fileName &fName, const dictionary &options),(fName, options))
 surfaceReader (const fileName &fName)
 Construct from fileName.
 surfaceReader (const fileName &fName, const dictionary &options)
 Construct from fileName and specified options.
virtual ~surfaceReader ()=default
 Destructor.

Static Public Member Functions

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

Additional Inherited Members

Protected Attributes inherited from surfaceReader
fileName fileName_
 File name.

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 139 of file boundaryDataSurfaceReader.C.

References boundaryDataSurfaceReader().

Referenced by boundaryDataSurfaceReader().

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

◆ boundaryDataSurfaceReader() [2/2]

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

Construct from fileName with reader options.

Definition at line 149 of file boundaryDataSurfaceReader.C.

References DebugInFunction, Foam::endl(), Foam::Info, path(), dictionary::readIfPresent(), and surfaceReader::surfaceReader().

Here is the call graph for this function:

◆ ~boundaryDataSurfaceReader()

virtual ~boundaryDataSurfaceReader ( )
virtualdefault

Destructor.

References runTime.

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 42 of file boundaryDataSurfaceReader.C.

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

Referenced by readPoints().

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

◆ readPoints() [2/2]

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

Read points file.

Definition at line 81 of file boundaryDataSurfaceReader.C.

References Time::NewGlobalTime(), and readPoints().

Here is the call graph for this function:

◆ readField() [1/2]

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

Read and return given field.

References runTime.

Referenced by readFieldTemplate().

Here is the caller graph for this function:

◆ readField() [2/2]

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

Read and return given field.

References timeIndex.

◆ geometry()

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

Return a reference to the surface geometry.

Implements surfaceReader.

Definition at line 176 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 199 of file boundaryDataSurfaceReader.C.

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

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 229 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 240 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 252 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 263 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 274 of file boundaryDataSurfaceReader.C.

References timeIndex.

◆ readFieldTemplate()

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

Definition at line 119 of file boundaryDataSurfaceReader.C.

References readField(), and timeIndex.

Here is the call graph for this function:

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