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... | |
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... | |
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 82 of file MeshedSurface.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 237 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 39 of file MeshedSurfaceProxy.C.
Referenced by surfaceWriter::New().
Can this file format type be written via MeshedSurfaceProxy?
Definition at line 47 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 64 of file MeshedSurfaceProxy.C.
References word::ext(), Foam::name(), and Foam::vtk::write().
Referenced by MeshedSurfaceProxy< Face >::write(), UnsortedMeshedSurface< Face >::write(), surfMesh::write(), MeshedSurface< Foam::face >::write(), and triSurface::write().
|
static |
Write to file with given format type.
If the format type is "", uses the file extension.
Definition at line 77 of file MeshedSurfaceProxy.C.
References DebugInFunction, Foam::exit(), word::ext(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::name(), Foam::nl, and Foam::vtk::write().
|
inline |
The surface size is the number of faces.
Definition at line 165 of file MeshedSurfaceProxy.H.
|
inline |
Return const access to the points.
Definition at line 171 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(), ABAQUSsurfaceFormat< Face >::write(), STARCDsurfaceFormat< 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 177 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(), ABAQUSsurfaceFormat< Face >::write(), STARCDsurfaceFormat< 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 185 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(), ABAQUSsurfaceFormat< Face >::write(), STARCDsurfaceFormat< 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 191 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(), ABAQUSsurfaceFormat< Face >::write(), STARCDsurfaceFormat< 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 197 of file MeshedSurfaceProxy.H.
Referenced by ABAQUSsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), and NASsurfaceFormat< Face >::write().
|
inline |
Can/should use faceMap?
Definition at line 203 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(), ABAQUSsurfaceFormat< Face >::write(), STARCDsurfaceFormat< 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 209 of file MeshedSurfaceProxy.H.
Referenced by STARCDsurfaceFormat< Face >::write().
|
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 222 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 234 of file MeshedSurfaceProxy.H.
References Foam::name(), and MeshedSurfaceProxy< Face >::write().
|
virtual |
Write to database.
Definition at line 123 of file MeshedSurfaceProxy.C.
References DebugInFunction, Foam::defaultName, Foam::endl(), Foam::faceMap(), Foam::isDir(), Foam::mkDir(), IOobject::name(), Foam::name(), points, Time::timeName(), Time::timePath(), IOobject::writeEndDivider(), and IOobject::writeHeader().