Programmer's Documentation

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
MeshGenerator Class Reference

Detailed Description

Top-level mesh generator.

See Also
DnMesh, MeshComponent

#include <meshgenerator.h>

Inheritance diagram for MeshGenerator:
Collaboration diagram for MeshGenerator:

Public Member Functions

 MeshGenerator ()
 empty generator
virtual ~MeshGenerator ()
 virtual destructor
uint ncomponents () const
 number of components defined
uint addComponent (const MeshComponentPtr &mcp)
 add a mesh component
uint addComponent (const SurfacePtr &psf, const DnRefineCriterionPtr &rc)
 add a mesh component
void eraseComponent (uint k)
 erase component
uint findComponent (const std::string &s) const
 find component by surface name
MeshComponentPtr component (uint k) const
 access component
void addConnection (const TTiConnection &ct)
 register component connection
void postprocess (uint iter, Real maxStretch, Real maxPhi, Real mtol=0.0)
 set mesh postprocessing options
void toggleDropOrphanRidges (bool flag)
 toggle removal of singly-connected triangles (development)
void toggleDropInternal (bool flag)
 toggle removal of internal triangles (development)
void mergeComponent (const TriMesh &mc)
 thread-safe component merge
void progressController (const MgProgressPtr &p)
 set progress indicator object
uint findTag (const std::string &s) const
 access tag of surface named s
bool incProgress (uint k=1)
 log progress and check for interrupt
void interrupt ()
 interrupt process as soon as possible
void process (const CmpAssembly &asy, bool rflocal=true, ThreadPool *pool=0)
 process complete assembly
void preprocess (const CmpAssembly &asy, ThreadPool *pool=0)
 premesh components from assembly (first mesh generation step)
void intersect (ThreadPool *pool=0)
 process intersections
void refineLocally (ThreadPool *pool=0)
 perform local refinement after intersection processing
void refineGlobally (ThreadPool *pool=0)
 refine globally after second intersection pass
void order ()
 low-level interface : determine component processing order
void premesh ()
 low-level interface : generate initial meshes for all surfaces
void finalize ()
 cleanup and drop internal triangles
void loadCollection (const std::string &fname)
 load raw surface collection as saved by sumo
- Public Member Functions inherited from TriMesh
 TriMesh (const TriMesh &msh)
TriMeshoperator= (const TriMesh &msh)
void reserve (size_t nv, size_t nf)
uint addVertex (const Vct3 &p)
uint addVertex (const Vct3 &p, const Vct3 &n)
uint addFace (uint a, uint b, uint c, int t=0)
uint addFace (const uint vi[], int t=0)
void triangulate (const PointGrid< 3 > &pg, GridPattern gpt=XPattern)
void merge (const TriMesh &msh)
void merge (const Triangulation &t)
void importMesh (const PointList< 3 > &pts, const Indices &tri, bool udrop=false)
void importMesh (const PointList< 3 > &pts, const PointList< 3 > &nmv, const Indices &tri, bool udrop=false)
void exportMesh (PointList< 3 > &pts, Indices &tri) const
void exportMesh (PointList< 3 > &pts, PointList< 3 > &nmv, Indices &tri) const
void buildConnectivity (bool udrop=false)
void fixate (bool udrop=false)
uint nvertices () const
uint nfaces () const
uint nedges () const
const Vct3 & vertex (uint i) const
Vct3 & vertex (uint i)
const Vct3 & normal (uint i) const
Vct3 & normal (uint i)
const PointList< 3 > & vertices () const
PointList< 3 > & vertices ()
const PointList< 3 > & normals () const
PointList< 3 > & normals ()
const TriFaceface (uint i) const
TriFaceface (uint i)
const TriEdge & edge (uint i) const
TriEdge & edge (uint i)
uint vdegree (uint i) const
uint edegree (uint i) const
const uint * firstEdgeIndex (uint iface) const
const uint * firstFaceIndex (uint iedge) const
void boundaries (Indices &bde) const
void gradient (uint i, SpMatrix &gmx) const
Vct3 gradient (uint i, const Vector &x) const
CpxVct3 gradient (uint i, const CpxVector &x) const
bool isClosedManifold () const
bool findInternalPoints (PointList< 3 > &holes) const
uint findFlippedFaces (Indices &fflip, Real maxphi=PI) const
Real area () const
Real volume () const
Vct3 volumeCenter () const
Real shortestEdgeLength () const
Real solidAngle (uint i) const
uint mergeNodes (Real threshold=gmepsilon, Real dphimax=M_PI)
uint cleanup (Real threshold=gmepsilon)
void detectEdges (Real ridgeLimitAngle, Real mergeThreshold=gmepsilon)
void reverse ()
virtual void reorder (const Indices &perm)
virtual void swap (TriMesh &a)
virtual Real megabytes () const
virtual void clear ()
virtual XmlElement toXml (bool share=false) const
virtual void fromXml (const XmlElement &xe)
virtual void writeBin (std::ostream &os) const
virtual void readBin (std::istream &is)
virtual void toCgns (CgnsFile &file) const
virtual void fromCgns (CgnsZone &zone)
void writeCgns (const std::string &fname) const
void readCgns (const std::string &fname)
void readSTL (const std::string &fname)
void readAsciiSTL (const std::string &fname)
void readBinarySTL (const std::string &fname)
void writeBinarySTL (const std::string &fname) const
void writeAsciiSTL (const std::string &fname, const std::string &solid="") const
edge_iterator edgeBegin () const
edge_iterator edgeEnd () const
face_iterator faceBegin () const
face_iterator faceEnd () const
nb_face_iterator v2fBegin (uint i) const
nb_face_iterator v2fEnd (uint i) const
nb_face_iterator e2fBegin (uint i) const
nb_face_iterator e2fEnd (uint i) const
nb_edge_iterator v2eBegin (uint i) const
nb_edge_iterator v2eEnd (uint i) const
nb_edge_iterator f2eBegin (uint i) const
nb_edge_iterator f2eEnd (uint i) const
void bind ()
void estimateNormals ()
uint tsearchEdge (uint s, uint t) const
uint bsearchEdge (uint s, uint t) const
void faceTag (int t)
void allTags (Indices &tgs) const
std::string tagName (int t) const
void tagName (int t, const std::string &s)
void submesh (int t, TriMesh &sub) const
bool enclosedTriangles (const Indices &vloop, Indices &t) const
void icosahedron (const Vct3 &ctr, Real r)
void tetrahedron (const Vct3 &ctr, Real r)
void sphere (const Vct3 &ctr, Real r, int nrefp)
void tsphere (const Vct3 &ctr, Real r, int nrefp)
void quadSplit (int npass=1)
void dropDuplicates ()
uint dropInternalTriangles (uint itx, bool usetags=false)
uint dropInternalTriangles (const Indices &idx, bool usetags=false)
uint dropOrphanRidges (const Indices &killtags)
bool mergeAndDrop (uint itx, Real thrstart, Real thrend)
void joinSingleEdges (Real threshold)
uint dropStretchedTriangles (Real maxstretch, Real maxphi)
uint dropTriStars ()
void splitRidges (Indices &ridges, Real cosphi=0.5)

Protected Member Functions

void destretch ()
 optional destretching pass
void dbStoreMesh (const std::string &fname) const
 write current global mesh to file in debug mode
void searchExternalInit (Indices &itri) const
 determine list of external triangles to start with
void retag ()
 re-assign face tags
void extractWakes (TriMesh &wkm)
 extract external part of all wakes and put into wkm

Private Attributes

MeshComponentArray components
TTiConnectionArray connections
 component connections
TTIntersectorPtr ttip
TTiTopology topo
 intersection topology computer
Mutex mgguard
 guards access to merged mesh
Real ppMaxPhi
 global mesh postprocessing options
Real ppMaxStretch
Real ppMergeTol
uint ppIter
 number of postprocessing iterations
MgProgressPtr prog
 progress indicator
StringArray tagmap
 store tag-to-surface name data
Indices mgorder
 mesh processing order (to satisfy dependencies)
bool bDropOrphanRidges
 options for final mesh processing (development)
bool bDropInternal

Additional Inherited Members

- Protected Attributes inherited from TriMesh
PointList< 3 > vtx
TriFaceArray faces
TriEdgeArray edges
ConnectMap v2f
TagMap tagnames

The documentation for this class was generated from the following files:
Generated on Wed Jan 19 2022 03:03:16 for libsurf by   doxygen 1.8.5