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

Convenience class for loading single or multiple surface files from the constant/triSurface (or other) directory. More...

Collaboration diagram for triSurfaceLoader:
Collaboration graph
[legend]

Public Types

enum  loadingOption { SINGLE_REGION, FILE_REGION, OFFSET_REGION, MERGE_REGION }
 

Public Member Functions

 triSurfaceLoader (const fileName &directory)
 
 triSurfaceLoader (const Time &runTime)
 
 ~triSurfaceLoader ()=default
 
const fileNamedirectory () const
 
const hashedWordListavailable () const
 
const hashedWordListselected () const
 
label readDir ()
 
label selectAll ()
 
label select (const word &name)
 
label select (const wordRe &mat)
 
label select (const UList< wordRe > &matcher)
 
autoPtr< triSurfaceload (const enum loadingOption opt=loadingOption::OFFSET_REGION, const scalar scaleFactor=-1) const
 

Static Public Attributes

static const Enum< loadingOptionloadingOptionNames
 

Detailed Description

Convenience class for loading single or multiple surface files from the constant/triSurface (or other) directory.

Surfaces selection based on word, wordRe, list of wordRe. If multiple surfaces are selected, they are concatenated into a single surface with offset faces,points,regions.

Source files

Definition at line 58 of file triSurfaceLoader.H.

Member Enumeration Documentation

◆ loadingOption

Enumerator
SINGLE_REGION 

"single" = One region for all files

FILE_REGION 

"file" = One region for each file

OFFSET_REGION 

"offset" = Offset regions per file

MERGE_REGION 

"merge" = Merge regions by name

Definition at line 63 of file triSurfaceLoader.H.

Constructor & Destructor Documentation

◆ triSurfaceLoader() [1/2]

triSurfaceLoader ( const fileName directory)

Definition at line 43 of file triSurfaceLoader.C.

References triSurfaceLoader::readDir().

Here is the call graph for this function:

◆ triSurfaceLoader() [2/2]

triSurfaceLoader ( const Time runTime)

Definition at line 53 of file triSurfaceLoader.C.

References triSurfaceLoader::readDir().

Here is the call graph for this function:

◆ ~triSurfaceLoader()

~triSurfaceLoader ( )
default

Member Function Documentation

◆ directory()

const fileName& directory ( ) const
inline

Definition at line 117 of file triSurfaceLoader.H.

◆ available()

const hashedWordList& available ( ) const
inline

Definition at line 123 of file triSurfaceLoader.H.

◆ selected()

const hashedWordList& selected ( ) const
inline

Definition at line 129 of file triSurfaceLoader.H.

◆ readDir()

Foam::label readDir ( )

Definition at line 65 of file triSurfaceLoader.C.

References triSurface::canRead(), f(), fileName::FILE, Foam::PtrListOps::names(), and Foam::readDir().

Referenced by triSurfaceLoader::triSurfaceLoader().

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

◆ selectAll()

Foam::label selectAll ( )

Definition at line 90 of file triSurfaceLoader.C.

◆ select() [1/3]

Foam::label select ( const word name)

Definition at line 97 of file triSurfaceLoader.C.

References Foam::name().

Here is the call graph for this function:

◆ select() [2/3]

Foam::label select ( const wordRe mat)

Definition at line 112 of file triSurfaceLoader.C.

References DynamicList::append(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findStrings(), wordRe::isPattern(), Foam::nl, and Foam::sort().

Here is the call graph for this function:

◆ select() [3/3]

Foam::label select ( const UList< wordRe > &  matcher)

◆ load()

Foam::autoPtr< Foam::triSurface > load ( const enum loadingOption  opt = loadingOption::OFFSET_REGION,
const scalar  scaleFactor = -1 
) const

Member Data Documentation

◆ loadingOptionNames

const Foam::Enum< Foam::triSurfaceLoader::loadingOption > loadingOptionNames
static

Definition at line 72 of file triSurfaceLoader.H.


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