A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMesh, which actually refers to the cell faces of a volume mesh. More...
Public Types | |
typedef Face | FaceType |
Face type used. More... | |
Public Member Functions | |
ClassName ("MeshedSurface") | |
Runtime type information. More... | |
MeshedSurface () | |
Construct null. More... | |
MeshedSurface (const Xfer< pointField > &, const Xfer< List< Face > > &, const Xfer< surfZoneList > &) | |
Construct by transferring components (points, faces, zones). More... | |
MeshedSurface (const Xfer< pointField > &, const Xfer< List< Face > > &, const labelUList &zoneSizes=labelUList(), const UList< word > &zoneNames=UList< word >()) | |
Construct by transferring components (points, faces). More... | |
MeshedSurface (const MeshedSurface &) | |
Construct as copy. More... | |
MeshedSurface (const UnsortedMeshedSurface< Face > &) | |
Construct from a UnsortedMeshedSurface. More... | |
MeshedSurface (const polyBoundaryMesh &, const bool globalPoints=false) | |
Construct from a boundary mesh with local points/faces. More... | |
MeshedSurface (const surfMesh &) | |
Construct from a surfMesh. More... | |
MeshedSurface (const Xfer< UnsortedMeshedSurface< Face > > &) | |
Construct by transferring the contents from a UnsortedMeshedSurface. More... | |
MeshedSurface (const Xfer< MeshedSurface< Face > > &) | |
Construct by transferring the contents from a MeshedSurface. More... | |
MeshedSurface (const fileName &) | |
Construct from file name (uses extension to determine type) More... | |
MeshedSurface (const fileName &, const word &ext) | |
Construct from file name (uses extension to determine type) More... | |
MeshedSurface (const Time &, const word &surfName="") | |
Construct from database. More... | |
declareRunTimeSelectionTable (autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name)) | |
virtual | ~MeshedSurface () |
Destructor. More... | |
declareMemberFunctionSelectionTable (void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< Face > &surf),(name, surf)) | |
label | size () const |
The surface size is the number of faces. More... | |
const List< Face > & | faces () const |
Return const access to the faces. More... | |
const List< surfZone > & | surfZones () const |
Const access to the surface zones. More... | |
virtual void | addZones (const UList< surfZone > &, const bool cullEmpty=false) |
Add surface zones. More... | |
virtual void | addZones (const labelUList &sizes, const UList< word > &names, const bool cullEmpty=false) |
Add surface zones. More... | |
virtual void | addZones (const labelUList &sizes, const bool cullEmpty=false) |
Add surface zones. More... | |
virtual void | removeZones () |
Remove surface zones. More... | |
virtual void | clear () |
Clear all storage. More... | |
virtual void | movePoints (const pointField &) |
Move points. More... | |
virtual void | scalePoints (const scalar) |
Scale points. A non-positive factor is ignored. More... | |
virtual void | reset (const Xfer< pointField > &points, const Xfer< List< Face > > &faces, const Xfer< surfZoneList > &zones) |
Reset primitive data (points, faces and zones) More... | |
virtual void | reset (const Xfer< List< point > > &points, const Xfer< List< Face > > &faces, const Xfer< surfZoneList > &zones) |
Reset primitive data (points, faces and zones) More... | |
virtual void | cleanup (const bool verbose) |
Remove invalid faces. More... | |
virtual bool | stitchFaces (const scalar tol=SMALL, const bool verbose=false) |
virtual bool | checkFaces (const bool verbose=false) |
virtual label | triangulate () |
Triangulate in-place, returning the number of triangles added. More... | |
virtual label | triangulate (List< label > &faceMap) |
Triangulate in-place, returning the number of triangles added. More... | |
MeshedSurface | subsetMesh (const labelHashSet &include, labelList &pointMap, labelList &faceMap) const |
Return new surface. More... | |
MeshedSurface | subsetMesh (const labelHashSet &include) const |
Return new surface. More... | |
void | transfer (MeshedSurface< Face > &) |
Transfer the contents of the argument and annul the argument. More... | |
void | transfer (UnsortedMeshedSurface< Face > &) |
Transfer the contents of the argument and annul the argument. More... | |
Xfer< MeshedSurface< Face > > | xfer () |
Transfer contents to the Xfer container. More... | |
bool | read (const fileName &, const word &ext) |
Read from file. Chooses reader based on explicit extension. More... | |
virtual bool | read (const fileName &) |
Read from file. Chooses reader based on detected extension. More... | |
void | writeStats (Ostream &os) const |
virtual void | write (const fileName &name) const |
Generic write routine. Chooses writer based on extension. More... | |
void | write (const Time &, const word &surfName="") const |
Write to database. More... | |
void | operator= (const MeshedSurface< Face > &) |
operator MeshedSurfaceProxy< Face > () const | |
Conversion operator to MeshedSurfaceProxy. More... | |
template<class Face > | |
MeshedSurface () | |
template<class Face > | |
MeshedSurface (const Xfer< pointField > &pointLst, const Xfer< List< Face > > &faceLst, const Xfer< surfZoneList > &zoneLst) | |
template<class Face > | |
MeshedSurface (const Xfer< pointField > &pointLst, const Xfer< List< Face > > &faceLst, const labelUList &zoneSizes, const UList< word > &zoneNames) | |
template<class Face > | |
MeshedSurface (const MeshedSurface< Face > &surf) | |
template<class Face > | |
MeshedSurface (const UnsortedMeshedSurface< Face > &surf) | |
template<class Face > | |
MeshedSurface (const surfMesh &mesh) | |
template<class Face > | |
MeshedSurface (const polyBoundaryMesh &bMesh, const bool useGlobalPoints) | |
template<class Face > | |
MeshedSurface (const fileName &name, const word &ext) | |
template<class Face > | |
MeshedSurface (const fileName &name) | |
template<class Face > | |
MeshedSurface (const Time &t, const word &surfName) | |
template<class Face > | |
MeshedSurface (const Xfer< UnsortedMeshedSurface< Face > > &surf) | |
template<class Face > | |
MeshedSurface (const Xfer< MeshedSurface< Face > > &surf) | |
bool | isTri () |
Specialization for holding triangulated information. More... | |
label | triangulate () |
Specialization for holding triangulated information. More... | |
label | triangulate (List< label > &faceMap) |
Specialization for holding triangulated information. More... | |
Static Public Member Functions | |
static bool | isTri () |
Face storage only handles triangulated faces. More... | |
static bool | canRead (const fileName &, const bool verbose=false) |
Can we read this file format? More... | |
static bool | canReadType (const word &ext, const bool verbose=false) |
Can we read this file format? More... | |
static bool | canWriteType (const word &ext, const bool verbose=false) |
Can we write this file format? More... | |
static wordHashSet | readTypes () |
static wordHashSet | writeTypes () |
static autoPtr< MeshedSurface > | New (const fileName &, const word &ext) |
Select constructed from filename (explicit extension) More... | |
static autoPtr< MeshedSurface > | New (const fileName &) |
Select constructed from filename (implicit extension) More... | |
static void | write (const fileName &, const MeshedSurface< Face > &) |
Write to file. More... | |
Protected Member Functions | |
void | transcribe (MeshedSurface< face > &) |
Transfer points/zones and transcribe face -> triFace. More... | |
void | checkZones () |
Basic sanity check on zones. More... | |
pointField & | storedPoints () |
Non-const access to global points. More... | |
List< Face > & | storedFaces () |
Non-const access to the faces. More... | |
surfZoneList & | storedZones () |
Non-const access to the zones. More... | |
void | sortFacesAndStore (const Xfer< List< Face > > &unsortedFaces, const Xfer< List< label > > &zoneIds, const bool sorted) |
Sort faces by zones and store sorted faces. More... | |
virtual void | remapFaces (const labelUList &faceMap) |
Set new zones from faceMap. More... | |
void | transcribe (MeshedSurface< face > &surf) |
void | transcribe (MeshedSurface< face > &surf) |
Private Types | |
typedef PrimitivePatch< Face, ::Foam::List, pointField, point > | ParentType |
typedef UnsortedMeshedSurface< Face > | FriendType |
typedef MeshedSurfaceProxy< Face > | ProxyType |
Private Attributes | |
List< surfZone > | zones_ |
Zone information. More... | |
Friends | |
template<class Face2 > | |
class | MeshedSurface |
template<class Face2 > | |
class | UnsortedMeshedSurface |
class | surfMesh |
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMesh, which actually refers to the cell faces of a volume mesh.
A MeshedSurface can have zero or more surface zones (roughly equivalent to faceZones for a polyMesh). If surface zones are defined, they must be contiguous and cover all of the faces.
The MeshedSurface is intended for surfaces from a variety of sources.
Definition at line 72 of file MeshedSurface.H.
|
private |
Definition at line 103 of file MeshedSurface.H.
|
private |
Definition at line 105 of file MeshedSurface.H.
|
private |
Definition at line 106 of file MeshedSurface.H.
typedef Face FaceType |
Face type used.
Definition at line 161 of file MeshedSurface.H.
MeshedSurface | ( | ) |
Construct null.
MeshedSurface | ( | const Xfer< pointField > & | , |
const Xfer< List< Face > > & | , | ||
const Xfer< surfZoneList > & | |||
) |
Construct by transferring components (points, faces, zones).
MeshedSurface | ( | const Xfer< pointField > & | , |
const Xfer< List< Face > > & | , | ||
const labelUList & | zoneSizes = labelUList() , |
||
const UList< word > & | zoneNames = UList< word >() |
||
) |
Construct by transferring components (points, faces).
Use zone information if available
MeshedSurface | ( | const MeshedSurface & | ) |
Construct as copy.
MeshedSurface | ( | const UnsortedMeshedSurface< Face > & | ) |
Construct from a UnsortedMeshedSurface.
MeshedSurface | ( | const polyBoundaryMesh & | , |
const bool | globalPoints = false |
||
) |
Construct from a boundary mesh with local points/faces.
MeshedSurface | ( | const surfMesh & | ) |
Construct from a surfMesh.
MeshedSurface | ( | const Xfer< UnsortedMeshedSurface< Face > > & | ) |
Construct by transferring the contents from a UnsortedMeshedSurface.
MeshedSurface | ( | const Xfer< MeshedSurface< Face > > & | ) |
Construct by transferring the contents from a MeshedSurface.
MeshedSurface | ( | const fileName & | ) |
Construct from file name (uses extension to determine type)
MeshedSurface | ( | const fileName & | , |
const word & | ext | ||
) |
Construct from file name (uses extension to determine type)
MeshedSurface | ( | const Time & | , |
const word & | surfName = "" |
||
) |
Construct from database.
|
virtual |
Destructor.
Definition at line 420 of file MeshedSurface.C.
MeshedSurface | ( | ) |
Definition at line 161 of file MeshedSurface.C.
MeshedSurface | ( | const Xfer< pointField > & | pointLst, |
const Xfer< List< Face > > & | faceLst, | ||
const Xfer< surfZoneList > & | zoneLst | ||
) |
Definition at line 169 of file MeshedSurface.C.
MeshedSurface | ( | const Xfer< pointField > & | pointLst, |
const Xfer< List< Face > > & | faceLst, | ||
const labelUList & | zoneSizes, | ||
const UList< word > & | zoneNames | ||
) |
Definition at line 184 of file MeshedSurface.C.
MeshedSurface | ( | const MeshedSurface< Face > & | surf | ) |
Definition at line 211 of file MeshedSurface.C.
MeshedSurface | ( | const UnsortedMeshedSurface< Face > & | surf | ) |
Definition at line 222 of file MeshedSurface.C.
MeshedSurface | ( | const surfMesh & | mesh | ) |
Definition at line 244 of file MeshedSurface.C.
MeshedSurface | ( | const polyBoundaryMesh & | bMesh, |
const bool | useGlobalPoints | ||
) |
Definition at line 262 of file MeshedSurface.C.
MeshedSurface | ( | const fileName & | name, |
const word & | ext | ||
) |
Definition at line 337 of file MeshedSurface.C.
MeshedSurface | ( | const fileName & | name | ) |
Definition at line 349 of file MeshedSurface.C.
MeshedSurface | ( | const Time & | t, |
const word & | surfName | ||
) |
Definition at line 359 of file MeshedSurface.C.
MeshedSurface | ( | const Xfer< UnsortedMeshedSurface< Face > > & | surf | ) |
Definition at line 394 of file MeshedSurface.C.
MeshedSurface | ( | const Xfer< MeshedSurface< Face > > & | surf | ) |
Definition at line 406 of file MeshedSurface.C.
|
protected |
Transfer points/zones and transcribe face -> triFace.
Referenced by OFSsurfaceFormat< Face >::read().
|
protected |
Basic sanity check on zones.
Definition at line 31 of file MeshedSurfaceZones.C.
|
inlineprotected |
Non-const access to global points.
Definition at line 127 of file MeshedSurface.H.
Referenced by MeshedSurface< Foam::face >::transcribe(), and surfMesh::transfer().
|
inlineprotected |
Non-const access to the faces.
Definition at line 133 of file MeshedSurface.H.
Referenced by MeshedSurface< Foam::face >::transcribe(), and surfMesh::transfer().
|
inlineprotected |
Non-const access to the zones.
Definition at line 139 of file MeshedSurface.H.
Referenced by MeshedSurface< Foam::face >::transcribe(), and surfMesh::transfer().
|
protected |
Sort faces by zones and store sorted faces.
Definition at line 66 of file MeshedSurfaceZones.C.
|
protectedvirtual |
Set new zones from faceMap.
Reimplemented in cuttingPlane, and sampledPatch.
Definition at line 428 of file MeshedSurface.C.
ClassName | ( | "MeshedSurface" | ) |
Runtime type information.
|
inlinestatic |
Face storage only handles triangulated faces.
Definition at line 41 of file MeshedSurface.C.
|
static |
Can we read this file format?
Definition at line 99 of file MeshedSurface.C.
|
static |
Can we read this file format?
Definition at line 65 of file MeshedSurface.C.
|
static |
Can we write this file format?
Definition at line 82 of file MeshedSurface.C.
|
static |
Definition at line 48 of file MeshedSurface.C.
|
static |
Definition at line 55 of file MeshedSurface.C.
declareRunTimeSelectionTable | ( | autoPtr | , |
MeshedSurface | , | ||
fileExtension | , | ||
(const fileName &name) | , | ||
(name) | |||
) |
|
static |
Select constructed from filename (explicit extension)
|
static |
Select constructed from filename (implicit extension)
declareMemberFunctionSelectionTable | ( | void | , |
UnsortedMeshedSurface | , | ||
write | , | ||
fileExtension | , | ||
(const fileName &name, const MeshedSurface< Face > &surf) | , | ||
(name, surf) | |||
) |
|
static |
Write to file.
Referenced by extractSurface(), main(), and MeshedSurface< Foam::face >::write().
|
inline |
The surface size is the number of faces.
Definition at line 295 of file MeshedSurface.H.
Referenced by main(), and GTSsurfaceFormat< Face >::write().
|
inline |
Return const access to the faces.
Definition at line 301 of file MeshedSurface.H.
Referenced by main(), MeshedSurface< Foam::face >::operator=(), and GTSsurfaceFormat< Face >::write().
Const access to the surface zones.
If zones are defined, they must be contiguous and cover the entire surface
Definition at line 309 of file MeshedSurface.H.
Referenced by MeshedSurface< Foam::face >::operator=(), UnsortedMeshedSurface< Face >::UnsortedMeshedSurface(), and GTSsurfaceFormat< Face >::write().
Add surface zones.
|
virtual |
Add surface zones.
|
virtual |
Add surface zones.
|
virtual |
Remove surface zones.
Definition at line 190 of file MeshedSurfaceZones.C.
|
virtual |
Clear all storage.
Definition at line 477 of file MeshedSurface.C.
Referenced by OFSsurfaceFormat< Face >::read(), and MeshedSurface< Foam::face >::transcribe().
|
virtual |
Move points.
Definition at line 488 of file MeshedSurface.C.
Referenced by main().
|
virtual |
Scale points. A non-positive factor is ignored.
Definition at line 499 of file MeshedSurface.C.
|
virtual |
Reset primitive data (points, faces and zones)
Note, optimized to avoid overwriting data (with Xfer::null)
Referenced by OFSsurfaceFormat< Face >::read().
|
virtual |
Reset primitive data (points, faces and zones)
Note, optimized to avoid overwriting data (with Xfer::null)
|
virtual |
Remove invalid faces.
Definition at line 574 of file MeshedSurface.C.
|
virtual |
Definition at line 586 of file MeshedSurface.C.
|
virtual |
Definition at line 669 of file MeshedSurface.C.
|
virtual |
Triangulate in-place, returning the number of triangles added.
Definition at line 821 of file MeshedSurface.C.
Referenced by MeshedSurface< Foam::face >::transcribe().
Triangulate in-place, returning the number of triangles added.
and setting a map of original face Ids. The faceMap is zero-sized when no triangulation was done.
Foam::MeshedSurface< Face > subsetMesh | ( | const labelHashSet & | include, |
labelList & | pointMap, | ||
labelList & | faceMap | ||
) | const |
Return new surface.
Returns return pointMap, faceMap from subsetMeshMap
Definition at line 938 of file MeshedSurface.C.
Foam::MeshedSurface< Face > subsetMesh | ( | const labelHashSet & | include | ) | const |
Return new surface.
Definition at line 1025 of file MeshedSurface.C.
void transfer | ( | MeshedSurface< Face > & | ) |
Transfer the contents of the argument and annul the argument.
void transfer | ( | UnsortedMeshedSurface< Face > & | ) |
Transfer the contents of the argument and annul the argument.
Foam::Xfer< Foam::MeshedSurface< Face > > xfer | ( | ) |
Transfer contents to the Xfer container.
Definition at line 1094 of file MeshedSurface.C.
Read from file. Chooses reader based on explicit extension.
|
virtual |
Read from file. Chooses reader based on detected extension.
Reimplemented in STLsurfaceFormat< Face >, OFSsurfaceFormat< Face >, STARCDsurfaceFormat< Face >, TRIsurfaceFormat< Face >, AC3DsurfaceFormat< Face >, OFFsurfaceFormat< Face >, VTKsurfaceFormat< Face >, NASsurfaceFormat< Face >, and OBJsurfaceFormat< Face >.
void writeStats | ( | Ostream & | os | ) | const |
Definition at line 33 of file MeshedSurfaceIO.C.
|
inlinevirtual |
Generic write routine. Chooses writer based on extension.
Reimplemented in STLsurfaceFormat< Face >, OFSsurfaceFormat< Face >, STARCDsurfaceFormat< Face >, TRIsurfaceFormat< Face >, AC3DsurfaceFormat< Face >, OFFsurfaceFormat< Face >, VTKsurfaceFormat< Face >, OBJsurfaceFormat< Face >, SMESHsurfaceFormat< Face >, WRLsurfaceFormat< Face >, and X3DsurfaceFormat< Face >.
Definition at line 431 of file MeshedSurface.H.
void operator= | ( | const MeshedSurface< Face > & | ) |
Definition at line 1147 of file MeshedSurface.C.
operator MeshedSurfaceProxy< Face > | ( | ) | const |
Conversion operator to MeshedSurfaceProxy.
|
inline |
Specialization for holding triangulated information.
Definition at line 453 of file MeshedSurface.H.
|
inline |
Specialization for holding triangulated information.
Definition at line 461 of file MeshedSurface.H.
Specialization for holding triangulated information.
Definition at line 469 of file MeshedSurface.H.
|
protected |
Definition at line 35 of file MeshedSurfaceCore.C.
|
protected |
Definition at line 60 of file MeshedSurfaceCore.C.
|
friend |
Definition at line 87 of file MeshedSurface.H.
|
friend |
Definition at line 88 of file MeshedSurface.H.
|
friend |
Definition at line 89 of file MeshedSurface.H.
Zone information.
(face ordering nFaces/startFace only used during reading/writing)
Definition at line 113 of file MeshedSurface.H.
Referenced by MeshedSurface< Foam::face >::storedZones().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.