A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats. More...
Public Types | |
typedef Face | face_type |
The face type. More... | |
typedef point | point_type |
The point type. More... | |
Public Member Functions | |
ClassName ("MeshedSurfaceProxy") | |
Declare type-name (with debug switch) More... | |
MeshedSurfaceProxy (const pointField &pointLst, const UList< Face > &faceLst, const UList< surfZone > &zoneLst=UList< surfZone >::null(), const labelUList &faceMap=labelUList::null(), const labelUList &faceIdLst=labelUList::null()) | |
Construct from component references. More... | |
virtual | ~MeshedSurfaceProxy ()=default |
Destructor. More... | |
declareMemberFunctionSelectionTable (void, MeshedSurfaceProxy, write, fileExtension,(const fileName &name, const MeshedSurfaceProxy< Face > &surf, IOstreamOption streamOpt, const dictionary &options),(name, surf, streamOpt, options)) | |
label | size () const |
The surface size is the number of faces. More... | |
const pointField & | points () const |
Return const access to the points. More... | |
const UList< Face > & | surfFaces () const |
Return const access to the faces. More... | |
const UList< surfZone > & | surfZones () const |
Const access to the surface zones. More... | |
const labelUList & | faceMap () const |
Const access to the faceMap, zero-sized when unused. More... | |
const labelUList & | faceIds () const |
Const access to the faceIds, zero-sized when unused. More... | |
bool | useFaceMap () const |
Can/should use faceMap? More... | |
bool | useFaceIds () const |
Possible to use faceIds? More... | |
label | nTriangles () const |
Count number of triangles. More... | |
virtual void | write (const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const |
Write to file, choosing writer based on the file extension. More... | |
virtual void | write (const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const |
Write to file with given format type. More... | |
virtual void | write (const Time &t, const word &surfName=word::null) const |
Write to database. More... | |
Public Member Functions inherited from surfaceFormatsCore | |
surfaceFormatsCore ()=default | |
Default construct. More... | |
virtual | ~surfaceFormatsCore ()=default |
Destructor. More... | |
Static Public Member Functions | |
static wordHashSet | writeTypes () |
The file format types that can be written via MeshedSurfaceProxy. More... | |
static bool | canWriteType (const word &fileType, bool verbose=false) |
Can this file format type be written via MeshedSurfaceProxy? More... | |
static void | write (const fileName &name, const MeshedSurfaceProxy &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) |
Write to file, select based on its extension. More... | |
static void | write (const fileName &name, const word &fileType, const MeshedSurfaceProxy &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) |
Write to file with given format type. More... | |
Static Public Member Functions inherited from surfaceFormatsCore | |
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... | |
Additional Inherited Members | |
Static Public Attributes inherited from surfaceFormatsCore | |
static word | nativeExt |
The file extension corresponding to 'native' surface format. More... | |
Static Protected Member Functions inherited from surfaceFormatsCore | |
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... | |
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
The constructor interface is fat and ugly, but is largely encapsulated by conversion operators in other classes.
Definition at line 78 of file MeshedSurface.H.
typedef Face face_type |
The face type.
Definition at line 84 of file MeshedSurfaceProxy.H.
typedef point point_type |
The point type.
Definition at line 89 of file MeshedSurfaceProxy.H.
MeshedSurfaceProxy | ( | const pointField & | pointLst, |
const UList< Face > & | faceLst, | ||
const UList< surfZone > & | zoneLst = UList<surfZone>::null() , |
||
const labelUList & | faceMap = labelUList::null() , |
||
const labelUList & | faceIdLst = labelUList::null() |
||
) |
Construct from component references.
Definition at line 230 of file MeshedSurfaceProxy.C.
|
virtualdefault |
Destructor.
ClassName | ( | "MeshedSurfaceProxy< Face >" | ) |
Declare type-name (with debug switch)
|
static |
The file format types that can be written via MeshedSurfaceProxy.
Definition at line 32 of file MeshedSurfaceProxy.C.
Referenced by surfaceWriter::New().
|
static |
Can this file format type be written via MeshedSurfaceProxy?
Definition at line 40 of file MeshedSurfaceProxy.C.
Referenced by surfaceWriter::supportedType().
declareMemberFunctionSelectionTable | ( | void | , |
MeshedSurfaceProxy< Face > | , | ||
write | , | ||
fileExtension | , | ||
(const fileName &name, const MeshedSurfaceProxy< Face > &surf, IOstreamOption streamOpt, const dictionary &options) | , | ||
(name, surf, streamOpt, options) | |||
) |
|
static |
Write to file, select based on its extension.
Definition at line 57 of file MeshedSurfaceProxy.C.
References word::ext(), Foam::name(), and Foam::vtk::write().
Referenced by MeshedSurfaceProxy< Face >::write(), UnsortedMeshedSurface< Face >::write(), triSurface::write(), and MeshedSurface< Foam::face >::write().
|
static |
Write to file with given format type.
If the format type is "", uses the file extension.
Definition at line 70 of file MeshedSurfaceProxy.C.
References DebugInFunction, Foam::exit(), word::ext(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::name(), Foam::nl, Foam::BitOps::sortedToc(), and Foam::vtk::write().
|
inline |
The surface size is the number of faces.
Definition at line 182 of file MeshedSurfaceProxy.H.
|
inline |
Return const access to the points.
Definition at line 190 of file MeshedSurfaceProxy.H.
Referenced by FLMAsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), ABAQUSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
|
inline |
Return const access to the faces.
Definition at line 198 of file MeshedSurfaceProxy.H.
Referenced by FLMAsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), ABAQUSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
Const access to the surface zones.
If zones are defined, they must be contiguous and cover the entire surface
Definition at line 209 of file MeshedSurfaceProxy.H.
Referenced by FLMAsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), ABAQUSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
|
inline |
Const access to the faceMap, zero-sized when unused.
Definition at line 217 of file MeshedSurfaceProxy.H.
Referenced by FLMAsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), ABAQUSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
|
inline |
Const access to the faceIds, zero-sized when unused.
Definition at line 225 of file MeshedSurfaceProxy.H.
Referenced by STARCDsurfaceFormat< Face >::write(), ABAQUSsurfaceFormat< Face >::write(), and NASsurfaceFormat< Face >::write().
|
inline |
Can/should use faceMap?
Definition at line 233 of file MeshedSurfaceProxy.H.
Referenced by FLMAsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), ABAQUSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
|
inline |
Possible to use faceIds?
Definition at line 241 of file MeshedSurfaceProxy.H.
|
inline |
Count number of triangles.
Definition at line 249 of file MeshedSurfaceProxy.C.
References f().
Referenced by STLsurfaceFormat< Face >::writeBinary().
|
inlinevirtual |
Write to file, choosing writer based on the file extension.
Definition at line 258 of file MeshedSurfaceProxy.H.
References Foam::name(), and MeshedSurfaceProxy< Face >::write().
|
inlinevirtual |
Write to file with given format type.
If the format type is "", uses the file extension.
Definition at line 273 of file MeshedSurfaceProxy.H.
References Foam::name(), and MeshedSurfaceProxy< Face >::write().
|
virtual |
Write to database.
Definition at line 116 of file MeshedSurfaceProxy.C.
References DebugInFunction, Foam::endl(), Foam::faceMap(), io(), Foam::isDir(), Foam::mkDir(), Foam::name(), os(), points, Time::timeName(), and Time::timePath().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.