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) |
static fileName | findFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true) |
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") |
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 64 of file MeshedSurfaceProxy.H.
typedef Face face_type |
The face type.
Definition at line 86 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 236 of file MeshedSurfaceProxy.C.
References Foam::faceMap().
|
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 39 of file MeshedSurfaceProxy.C.
Referenced by surfaceWriter::New().
Can this file format type be written via MeshedSurfaceProxy?
Definition at line 46 of file MeshedSurfaceProxy.C.
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 63 of file MeshedSurfaceProxy.C.
References word::ext(), Foam::name(), and write().
Referenced by proxyWriter::write(), starcdWriter::write(), x3dWriter::write(), triSurface::write(), MeshedSurface< Face >::write(), UnsortedMeshedSurface< Face >::write(), and surfMesh::write().
|
static |
Write to file with given format type.
If the format type is "", uses the file extension.
Definition at line 76 of file MeshedSurfaceProxy.C.
References DebugInFunction, Foam::exit(), word::ext(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::name(), Foam::nl, and write().
|
inline |
The surface size is the number of faces.
Definition at line 165 of file MeshedSurfaceProxy.H.
References UList< T >::size().
|
inline |
Return const access to the points.
Definition at line 171 of file MeshedSurfaceProxy.H.
Referenced by ABAQUSsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), FLMAsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
|
inline |
Return const access to the faces.
Definition at line 177 of file MeshedSurfaceProxy.H.
Referenced by ABAQUSsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), FLMAsurfaceFormat< 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 185 of file MeshedSurfaceProxy.H.
Referenced by ABAQUSsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), FLMAsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
|
inline |
Const access to the faceMap, zero-sized when unused.
Definition at line 191 of file MeshedSurfaceProxy.H.
Referenced by ABAQUSsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), FLMAsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
|
inline |
Const access to the faceIds, zero-sized when unused.
Definition at line 197 of file MeshedSurfaceProxy.H.
Referenced by ABAQUSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), and STARCDsurfaceFormat< Face >::write().
|
inline |
Can/should use faceMap?
Definition at line 203 of file MeshedSurfaceProxy.H.
References UList< T >::size().
Referenced by ABAQUSsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), FLMAsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().
|
inline |
Possible to use faceIds?
Definition at line 209 of file MeshedSurfaceProxy.H.
References UList< T >::size().
|
inline |
Count number of triangles.
Definition at line 256 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 221 of file MeshedSurfaceProxy.H.
References Foam::name(), and write().
|
inlinevirtual |
Write to file with given format type.
If the format type is "", uses the file extension.
Definition at line 233 of file MeshedSurfaceProxy.H.
|
virtual |
Write to database.
Definition at line 122 of file MeshedSurfaceProxy.C.
References DebugInFunction, Foam::endl(), Foam::faceMap(), io(), Foam::isDir(), mkDir(), Foam::name(), os(), points, Time::timeName(), Time::timePath(), IOobject::writeEndDivider(), and Time::writeStreamOption().