A collection of helper functions for reading/writing surface formats. More...
Public Member Functions | |
surfaceFormatsCore ()=default | |
Default construct. More... | |
virtual | ~surfaceFormatsCore ()=default |
Destructor. More... | |
Static Public Member Functions | |
static bool | checkSupport (const wordHashSet &available, const word &fileType, const bool verbose=false, const char *functionName=nullptr) |
Verbose checking of fileType in the list of available types. More... | |
static fileName | findFile (const IOobject &io, const bool isGlobal=true) |
Use IOobject information to resolve file to load from, or empty if the file does not exist. More... | |
static fileName | findFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true) |
Use IOobject information to resolve file to load from, or empty if the file does not exist. More... | |
Static Public Attributes | |
static word | nativeExt |
The file extension corresponding to 'native' surface format. More... | |
Static Protected Member Functions | |
static string | getLineNoComment (ISstream &is, const char comment='#') |
Read non-empty and non-comment line. More... | |
template<class Container > | |
static List< surfZone > | oneZone (const Container &container, const word &name="zone0") |
Return a surfZone list with a single entry, the size of which corresponds to that of the container. More... | |
static labelList | getSelectedPatches (const surfZoneList &patches, const wordRes &allow, const wordRes &deny=wordRes()) |
Return ids for zone/patch that match by name. More... | |
static fileName | relativeFilePath (const IOobject &io, const fileName &f, const bool isGlobal=true) |
Return fileName. More... | |
static fileName | checkFile (const IOobject &io, const bool isGlobal=true) |
Return fileName to load IOobject from. More... | |
static fileName | checkFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true) |
Return fileName to load IOobject from. More... | |
Friends | |
class | ::Foam::triSurface |
A collection of helper functions for reading/writing surface formats.
Definition at line 62 of file surfaceFormatsCore.H.
|
default |
Default construct.
|
virtualdefault |
Destructor.
|
staticprotected |
Read non-empty and non-comment line.
Definition at line 36 of file surfaceFormatsCore.C.
References ISstream::getLine(), and IOstream::good().
|
inlinestaticprotected |
Return a surfZone list with a single entry, the size of which corresponds to that of the container.
Definition at line 83 of file surfaceFormatsCore.H.
References Foam::name().
|
staticprotected |
Return ids for zone/patch that match by name.
Uses a combination of allow and deny lists.
Definition at line 53 of file surfaceFormatsCore.C.
References Foam::PtrListOps::findMatching(), and patches.
|
staticprotected |
Return fileName.
If fileName is relative gets treated as local to IOobject. Duplicate of triSurfaceMesh::relativeFilePath
isGlobal | resolve as a global file |
Definition at line 171 of file surfaceFormatsCore.C.
References string::expand(), f(), Foam::fileHandler, io(), fileName::isAbsolute(), and word::null.
Referenced by triSurface::relativeFilePath().
|
staticprotected |
Return fileName to load IOobject from.
Fatal if the file does not exist
isGlobal | resolve as a global file |
Definition at line 250 of file surfaceFormatsCore.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, io(), Foam::nl, and word::null.
Referenced by triSurface::checkFile(), and UnsortedMeshedSurface< Face >::UnsortedMeshedSurface().
|
staticprotected |
Return fileName to load IOobject from.
Supports optional override of fileName with "file" entry Fatal if the file does not exist
isGlobal | resolve as a global file |
Definition at line 275 of file surfaceFormatsCore.C.
References dict, Foam::exists(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, io(), keyType::LITERAL, Foam::nl, and word::null.
|
static |
Verbose checking of fileType in the list of available types.
Definition at line 319 of file surfaceFormatsCore.C.
References Foam::flatOutput(), HashTable< T, Key, Hash >::found(), Foam::Info, Foam::nl, and HashTable< T, Key, Hash >::sortedToc().
Referenced by triSurface::canReadType(), and triSurface::canWriteType().
|
static |
Use IOobject information to resolve file to load from, or empty if the file does not exist.
isGlobal | resolve as a global file |
Definition at line 197 of file surfaceFormatsCore.C.
References Foam::exists(), io(), and word::null.
Referenced by triSurface::findFile().
|
static |
Use IOobject information to resolve file to load from, or empty if the file does not exist.
Supports optional override of fileName with "file" entry
isGlobal | resolve as a global file |
Definition at line 219 of file surfaceFormatsCore.C.
References dict, Foam::exists(), io(), keyType::LITERAL, and word::null.
|
friend |
Definition at line 67 of file surfaceFormatsCore.H.
|
static |
The file extension corresponding to 'native' surface format.
Normally "ofs" (mnemonic: OF = OpenFOAM, S = Surface)
Definition at line 155 of file surfaceFormatsCore.H.