Convenience class for loading single or multiple surface files from the constant/triSurface (or other) directory. More...
#include <triSurfaceLoader.H>

Public Types | |
| enum | loadingOption { SINGLE_REGION , FILE_REGION , OFFSET_REGION , MERGE_REGION } |
| The file loading options for triSurfaceLoader. More... | |
Public Member Functions | |
| triSurfaceLoader (const fileName &directory) | |
| Construct with directory name. | |
| triSurfaceLoader (const Time &runTime) | |
| Construct with time. Selects "constant/triSurface" directory. | |
| ~triSurfaceLoader ()=default | |
| Destructor. | |
| const fileName & | directory () const noexcept |
| The directory being used. | |
| const wordList & | available () const noexcept |
| The list of available files. | |
| const wordList & | selected () const noexcept |
| The list of selected files. | |
| label | readDir () |
| Read directory and populate the 'available' files. | |
| label | selectAll () |
| Populates 'selected' with all available files. | |
| label | select (const word &name) |
| Populates 'selected' with a subset of the available files. | |
| label | select (const wordRe &mat) |
| Populates 'selected' with a subset of the available files. | |
| label | select (const UList< wordRe > &matcher) |
| Populates 'selected' with a subset of the available files. | |
| autoPtr< triSurface > | load (const enum loadingOption opt=loadingOption::OFFSET_REGION, const scalar scaleFactor=-1) const |
| Load a single file, or load and combine multiple selected files. | |
Static Public Attributes | |
| static const Enum< loadingOption > | loadingOptionNames |
| The loading enumeration names. | |
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 |
The file loading options for triSurfaceLoader.
| 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 65 of file triSurfaceLoader.H.
| triSurfaceLoader | ( | const fileName & | directory | ) |
Construct with directory name.
Definition at line 43 of file triSurfaceLoader.C.
References directory(), and readDir().

| triSurfaceLoader | ( | const Time & | runTime | ) |
Construct with time. Selects "constant/triSurface" directory.
Definition at line 53 of file triSurfaceLoader.C.
References readDir(), and runTime.

|
default |
Destructor.
|
inlinenoexcept |
The directory being used.
Definition at line 139 of file triSurfaceLoader.H.
References Foam::noexcept.
Referenced by triSurfaceLoader().

|
inlinenoexcept |
The list of available files.
Definition at line 147 of file triSurfaceLoader.H.
References Foam::noexcept.
|
inlinenoexcept |
The list of selected files.
Definition at line 155 of file triSurfaceLoader.H.
References Foam::noexcept.
| Foam::label readDir | ( | ) |
Read directory and populate the 'available' files.
Automatically called on construction.
Definition at line 65 of file triSurfaceLoader.C.
References triSurface::canRead(), f(), fileName::FILE, names, Foam::readDir(), and UList< T >::size().
Referenced by triSurfaceLoader(), and triSurfaceLoader().


| Foam::label selectAll | ( | ) |
Populates 'selected' with all available files.
Definition at line 90 of file triSurfaceLoader.C.
| Foam::label select | ( | const word & | name | ) |
Populates 'selected' with a subset of the available files.
Definition at line 97 of file triSurfaceLoader.C.
References Foam::name().

| Foam::label select | ( | const wordRe & | mat | ) |
Populates 'selected' with a subset of the available files.
Definition at line 113 of file triSurfaceLoader.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, wordRe::isPattern(), wordRes::matching(), Foam::nl, and Foam::sort().

Populates 'selected' with a subset of the available files.
Definition at line 138 of file triSurfaceLoader.C.
References DynamicList< T, SizeMin >::append(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), HashSet< Key, Hash >::insert(), wordRes::matching(), Foam::nl, UList< T >::size(), and Foam::sort().

| Foam::autoPtr< Foam::triSurface > load | ( | const enum loadingOption | opt = loadingOption::OFFSET_REGION, |
| const scalar | scaleFactor = -1 ) const |
Load a single file, or load and combine multiple selected files.
Optionally scale the surface(s) on input, with a zero or negative scale factor treated as no scaling.
Definition at line 201 of file triSurfaceLoader.C.
References List< T >::append(), HashTable< T, Key, Hash >::clear(), UList< T >::empty(), f(), FILE_REGION, UList< T >::first(), forAll, HashTable< T, Key, Hash >::insert(), MERGE_REGION, OFFSET_REGION, p, triSurface::patches(), patches, patchId(), points, autoPtr< T >::reset(), SINGLE_REGION, triSurface::swapFaces(), triSurface::swapPoints(), and List< T >::transfer().

|
static |
The loading enumeration names.
Definition at line 76 of file triSurfaceLoader.H.