Convenience class for loading single or multiple surface files from the constant/triSurface (or other) directory. More...
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 fileName & | directory () const |
const hashedWordList & | available () const |
const hashedWordList & | selected () const |
label | readDir () |
label | selectAll () |
label | select (const word &name) |
label | select (const wordRe &mat) |
label | select (const UList< wordRe > &matcher) |
autoPtr< triSurface > | load (const enum loadingOption opt=loadingOption::OFFSET_REGION, const scalar scaleFactor=-1) const |
Static Public Attributes | |
static const Enum< loadingOption > | loadingOptionNames |
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.
Definition at line 58 of file triSurfaceLoader.H.
enum 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.
triSurfaceLoader | ( | const fileName & | directory | ) |
Definition at line 43 of file triSurfaceLoader.C.
References triSurfaceLoader::readDir().
triSurfaceLoader | ( | const Time & | runTime | ) |
Definition at line 53 of file triSurfaceLoader.C.
References triSurfaceLoader::readDir().
|
default |
|
inline |
Definition at line 117 of file triSurfaceLoader.H.
|
inline |
Definition at line 123 of file triSurfaceLoader.H.
|
inline |
Definition at line 129 of file triSurfaceLoader.H.
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().
Foam::label selectAll | ( | ) |
Definition at line 90 of file triSurfaceLoader.C.
Foam::label select | ( | const word & | name | ) |
Definition at line 97 of file triSurfaceLoader.C.
References Foam::name().
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().
Definition at line 142 of file triSurfaceLoader.C.
References DynamicList::append(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findStrings(), Foam::flatOutput(), HashSet::insert(), Foam::nl, UList::size(), and Foam::sort().
Foam::autoPtr< Foam::triSurface > load | ( | const enum loadingOption | opt = loadingOption::OFFSET_REGION , |
const scalar | scaleFactor = -1 |
||
) | const |
Definition at line 205 of file triSurfaceLoader.C.
References PtrList::append(), List::append(), f(), forAll, HashTable::insert(), Foam::output(), p, patches, triSurface::patches(), patchId(), points, List::setSize(), triSurface::swapFaces(), triSurface::swapPoints(), and List::transfer().
|
static |
Definition at line 72 of file triSurfaceLoader.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.