A collection of helper functions for reading/writing surface formats. More...
#include <surfaceFormatsCore.H>


Public Member Functions | |
| surfaceFormatsCore ()=default | |
| Default construct. | |
| virtual | ~surfaceFormatsCore ()=default |
| Destructor. | |
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. | |
| 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. | |
| 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. | |
Static Public Attributes | |
| static word | nativeExt |
| The file extension corresponding to 'native' surface format. | |
Static Protected Member Functions | |
| static string | getLineNoComment (ISstream &is, const char comment='#') |
| Read non-empty and non-comment line. | |
| 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. | |
| static labelList | getSelectedPatches (const surfZoneList &patches, const wordRes &allow, const wordRes &deny=wordRes()) |
| Return ids for zone/patch that match by name. | |
| static fileName | relativeFilePath (const IOobject &io, const fileName &f, const bool isGlobal=true) |
| Return fileName. | |
| static fileName | checkFile (const IOobject &io, const bool isGlobal=true) |
| Return fileName to load IOobject from. | |
| static fileName | checkFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true) |
| Return fileName to load IOobject from. | |
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 35 of file surfaceFormatsCore.C.
References ISstream::getLine(), and IOstream::good().
Referenced by GTSsurfaceFormat< Face >::read(), OBJsurfaceFormat< Face >::read(), and OFFsurfaceFormat< Face >::read().


|
inlinestaticprotected |
Return a surfZone list with a single entry, the size of which corresponds to that of the container.
Definition at line 82 of file surfaceFormatsCore.H.
References Foam::name().
Referenced by ABAQUSsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), FLMAsurfaceFormat< Face >::write(), GTSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().


|
staticprotected |
Return ids for zone/patch that match by name.
Uses a combination of allow and deny lists.
Definition at line 52 of file surfaceFormatsCore.C.
References Foam::stringListOps::findMatching(), and patches.
Referenced by MeshedSurface< Face >::subsetMesh().


|
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 164 of file surfaceFormatsCore.C.
References string::expand(), f(), Foam::fileHandler, io, fileName::isAbsolute(), and word::null.
Referenced by checkFile(), findFile(), and 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 243 of file surfaceFormatsCore.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, io, Foam::nl, and word::null.
Referenced by triSurface::checkFile(), triSurface::checkFile(), MeshedSurface< Face >::MeshedSurface(), 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 268 of file surfaceFormatsCore.C.
References dict, Foam::exists(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, io, keyType::LITERAL, Foam::nl, word::null, and relativeFilePath().

|
static |
Verbose checking of fileType in the list of available types.
Definition at line 312 of file surfaceFormatsCore.C.
References Foam::flatOutput(), HashTable< T, Key, Hash >::found(), Foam::Info, Foam::nl, and HashTable< T, Key, Hash >::sortedToc().
Referenced by MeshedSurface< Face >::canReadType(), triSurface::canReadType(), UnsortedMeshedSurface< Face >::canReadType(), MeshedSurface< Face >::canWriteType(), MeshedSurfaceProxy< Face >::canWriteType(), triSurface::canWriteType(), and UnsortedMeshedSurface< Face >::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 190 of file surfaceFormatsCore.C.
References Foam::exists(), io, and word::null.
Referenced by triSurface::findFile(), triSurface::findFile(), and sampledMeshedSurface::sampledMeshedSurface().


|
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 212 of file surfaceFormatsCore.C.
References dict, Foam::exists(), io, keyType::LITERAL, word::null, and relativeFilePath().

|
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.