gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
meshGRegionDelaunayInsertion.cpp File Reference
#include <set>
#include <map>
#include <algorithm>
#include <queue>
#include "GmshMessage.h"
#include "robustPredicates.h"
#include "OS.h"
#include "meshGRegion.h"
#include "meshGRegionLocalMeshMod.h"
#include "meshGRegionDelaunayInsertion.h"
#include "GModel.h"
#include "GRegion.h"
#include "MTriangle.h"
#include "Numeric.h"
#include "Context.h"
#include "delaunay3d.h"
#include "MEdge.h"
#include "MLine.h"
#include "ExtrudeParams.h"
Include dependency graph for meshGRegionDelaunayInsertion.cpp:

Go to the source code of this file.

Classes

struct  edgeContainerB
 
struct  vertex_comparator
 
struct  faceXtet
 

Functions

static void createAllEmbeddedEdges (GRegion *gr, std::set< MEdge, MEdgeLessThan > &allEmbeddedEdges)
 
static void createAllEmbeddedEdges (GRegion *gr, edgeContainerB &embedded)
 
static void createAllEmbeddedFaces (GRegion *gr, std::set< MFace, MFaceLessThan > &allEmbeddedFaces)
 
template<class ITER >
void connectTets_vector2_templ (std::size_t _size, ITER beg, ITER end, std::vector< faceXtet > &conn)
 
template<class ITER >
void connectTets (ITER beg, ITER end, const std::set< MFace, MFaceLessThan > *allEmbeddedFaces=nullptr)
 
void connectTets (std::list< MTet4 * > &l, const std::set< MFace, MFaceLessThan > *embeddedFaces)
 
void connectTets (std::vector< MTet4 * > &l, const std::set< MFace, MFaceLessThan > *embeddedFaces)
 
void connectTets_vector2 (std::list< MTet4 * > &l, std::vector< faceXtet > &conn)
 
void connectTets_vector2 (std::vector< MTet4 * > &l, std::vector< faceXtet > &conn)
 
static void removeFromCavity (std::vector< faceXtet > &shell, std::vector< MTet4 * > &cavity, faceXtet &toRemove)
 
static void extendCavity (std::vector< faceXtet > &shell, std::vector< MTet4 * > &cavity, faceXtet &toExtend)
 
static bool verifyShell (MVertex *v, MTet4 *t, std::vector< faceXtet > &shell)
 
int makeCavityStarShaped (std::vector< faceXtet > &shell, std::vector< MTet4 * > &cavity, MVertex *v)
 
void findCavity (std::vector< faceXtet > &shell, std::vector< MTet4 * > &cavity, MVertex *v, MTet4 *t)
 
bool insertVertexB (std::vector< faceXtet > &shell, std::vector< MTet4 * > &cavity, MVertex *v, double lc1, double lc2, std::vector< double > &vSizes, std::vector< double > &vSizesBGM, MTet4 *t, MTet4Factory &myFactory, std::set< MTet4 *, compareTet4Ptr > &allTets, const std::set< MFace, MFaceLessThan > &allEmbeddedFaces)
 
static void setLcs (MTriangle *t, std::map< MVertex *, double, MVertexPtrLessThan > &vSizes, std::set< MVertex *, MVertexPtrLessThan > &bndVertices)
 
static void setLcs (MTetrahedron *t, std::map< MVertex *, double, MVertexPtrLessThan > &vSizes, std::set< MVertex *, MVertexPtrLessThan > &bndVertices)
 
static void completeTheSetOfFaces (GModel *model, std::set< GFace * > &faces_bound)
 
GRegiongetRegionFromBoundingFaces (GModel *model, std::set< GFace * > &faces_bound)
 
void non_recursive_classify (MTet4 *t, std::list< MTet4 * > &theRegion, std::set< GFace * > &faces_bound, GRegion *bidon, GModel *model, const fs_cont &search)
 
void optimizeMesh (GRegion *gr, const qmTetrahedron::Measures &qm)
 
double tetcircumcenter (double a[3], double b[3], double c[3], double d[3], double circumcenter[3], double *xi, double *eta, double *zeta)
 
static void memoryCleanup (MTet4Factory &myFactory, std::set< MTet4 *, compareTet4Ptr > &allTets)
 
static int isCavityCompatibleWithEmbeddedEdges (std::vector< MTet4 * > &cavity, std::vector< faceXtet > &shell, edgeContainerB &allEmbeddedEdges)
 
static int isCavityCompatibleWithEmbeddedFace (const std::vector< MTet4 * > &cavity, const std::vector< faceXtet > &shell, const std::set< MFace, MFaceLessThan > &allEmbeddedFaces)
 
static void _deleteUnusedVertices (GRegion *gr)
 
void insertVerticesInRegion (GRegion *gr, int maxIter, double worstTetRadiusTarget, bool _classify, splitQuadRecovery *sqr)
 
void delaunayMeshIn3D (std::vector< MVertex * > &v, std::vector< MTetrahedron * > &result, bool removeBox)
 

Variables

static int faces [4][3] = {{0, 1, 2}, {0, 2, 3}, {0, 3, 1}, {1, 3, 2}}
 

Function Documentation

◆ _deleteUnusedVertices()

static void _deleteUnusedVertices ( GRegion gr)
static

Definition at line 1198 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the caller graph for this function:

◆ completeTheSetOfFaces()

static void completeTheSetOfFaces ( GModel model,
std::set< GFace * > &  faces_bound 
)
static

Definition at line 604 of file meshGRegionDelaunayInsertion.cpp.

Referenced by getRegionFromBoundingFaces().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectTets() [1/3]

template<class ITER >
void connectTets ( ITER  beg,
ITER  end,
const std::set< MFace, MFaceLessThan > *  allEmbeddedFaces = nullptr 
)

◆ connectTets() [2/3]

void connectTets ( std::list< MTet4 * > &  l,
const std::set< MFace, MFaceLessThan > *  embeddedFaces 
)

Definition at line 277 of file meshGRegionDelaunayInsertion.cpp.

Here is the call graph for this function:

◆ connectTets() [3/3]

void connectTets ( std::vector< MTet4 * > &  l,
const std::set< MFace, MFaceLessThan > *  embeddedFaces 
)

Definition at line 283 of file meshGRegionDelaunayInsertion.cpp.

Here is the call graph for this function:

◆ connectTets_vector2() [1/2]

void connectTets_vector2 ( std::list< MTet4 * > &  l,
std::vector< faceXtet > &  conn 
)

Definition at line 289 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVertexB(), and optimizeMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectTets_vector2() [2/2]

void connectTets_vector2 ( std::vector< MTet4 * > &  l,
std::vector< faceXtet > &  conn 
)

Definition at line 294 of file meshGRegionDelaunayInsertion.cpp.

Here is the call graph for this function:

◆ connectTets_vector2_templ()

template<class ITER >
void connectTets_vector2_templ ( std::size_t  _size,
ITER  beg,
ITER  end,
std::vector< faceXtet > &  conn 
)

Definition at line 223 of file meshGRegionDelaunayInsertion.cpp.

Referenced by connectTets_vector2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createAllEmbeddedEdges() [1/2]

static void createAllEmbeddedEdges ( GRegion gr,
edgeContainerB embedded 
)
static

Definition at line 127 of file meshGRegionDelaunayInsertion.cpp.

Here is the call graph for this function:

◆ createAllEmbeddedEdges() [2/2]

static void createAllEmbeddedEdges ( GRegion gr,
std::set< MEdge, MEdgeLessThan > &  allEmbeddedEdges 
)
static

Definition at line 115 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion(), adaptMeshGRegion::operator()(), and optimizeMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createAllEmbeddedFaces()

static void createAllEmbeddedFaces ( GRegion gr,
std::set< MFace, MFaceLessThan > &  allEmbeddedFaces 
)
static

Definition at line 139 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion(), adaptMeshGRegion::operator()(), and optimizeMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delaunayMeshIn3D()

void delaunayMeshIn3D ( std::vector< MVertex * > &  v,
std::vector< MTetrahedron * > &  result,
bool  removeBox 
)

Definition at line 1559 of file meshGRegionDelaunayInsertion.cpp.

Here is the call graph for this function:

◆ extendCavity()

static void extendCavity ( std::vector< faceXtet > &  shell,
std::vector< MTet4 * > &  cavity,
faceXtet toExtend 
)
static

Definition at line 328 of file meshGRegionDelaunayInsertion.cpp.

Referenced by makeCavityStarShaped().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findCavity()

void findCavity ( std::vector< faceXtet > &  shell,
std::vector< MTet4 * > &  cavity,
MVertex v,
MTet4 t 
)

Definition at line 403 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRegionFromBoundingFaces()

GRegion* getRegionFromBoundingFaces ( GModel model,
std::set< GFace * > &  faces_bound 
)

Definition at line 620 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertVertexB()

bool insertVertexB ( std::vector< faceXtet > &  shell,
std::vector< MTet4 * > &  cavity,
MVertex v,
double  lc1,
double  lc2,
std::vector< double > &  vSizes,
std::vector< double > &  vSizesBGM,
MTet4 t,
MTet4Factory myFactory,
std::set< MTet4 *, compareTet4Ptr > &  allTets,
const std::set< MFace, MFaceLessThan > &  allEmbeddedFaces 
)

Definition at line 459 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertVerticesInRegion()

void insertVerticesInRegion ( GRegion gr,
int  maxIter,
double  worstTetRadiusTarget,
bool  _classify,
splitQuadRecovery sqr 
)

Definition at line 1217 of file meshGRegionDelaunayInsertion.cpp.

Referenced by MeshDelaunayVolume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCavityCompatibleWithEmbeddedEdges()

static int isCavityCompatibleWithEmbeddedEdges ( std::vector< MTet4 * > &  cavity,
std::vector< faceXtet > &  shell,
edgeContainerB allEmbeddedEdges 
)
static

Definition at line 1145 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCavityCompatibleWithEmbeddedFace()

static int isCavityCompatibleWithEmbeddedFace ( const std::vector< MTet4 * > &  cavity,
const std::vector< faceXtet > &  shell,
const std::set< MFace, MFaceLessThan > &  allEmbeddedFaces 
)
static

Definition at line 1171 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeCavityStarShaped()

int makeCavityStarShaped ( std::vector< faceXtet > &  shell,
std::vector< MTet4 * > &  cavity,
MVertex v 
)

Definition at line 367 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ memoryCleanup()

static void memoryCleanup ( MTet4Factory myFactory,
std::set< MTet4 *, compareTet4Ptr > &  allTets 
)
static

Definition at line 1129 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ non_recursive_classify()

void non_recursive_classify ( MTet4 t,
std::list< MTet4 * > &  theRegion,
std::set< GFace * > &  faces_bound,
GRegion bidon,
GModel model,
const fs_cont search 
)

Definition at line 648 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ optimizeMesh()

void optimizeMesh ( GRegion gr,
const qmTetrahedron::Measures qm 
)

Definition at line 876 of file meshGRegionDelaunayInsertion.cpp.

Referenced by optimizeMeshGRegion::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeFromCavity()

static void removeFromCavity ( std::vector< faceXtet > &  shell,
std::vector< MTet4 * > &  cavity,
faceXtet toRemove 
)
static

Definition at line 303 of file meshGRegionDelaunayInsertion.cpp.

Referenced by makeCavityStarShaped().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLcs() [1/2]

static void setLcs ( MTetrahedron t,
std::map< MVertex *, double, MVertexPtrLessThan > &  vSizes,
std::set< MVertex *, MVertexPtrLessThan > &  bndVertices 
)
static

Definition at line 573 of file meshGRegionDelaunayInsertion.cpp.

Here is the call graph for this function:

◆ setLcs() [2/2]

static void setLcs ( MTriangle t,
std::map< MVertex *, double, MVertexPtrLessThan > &  vSizes,
std::set< MVertex *, MVertexPtrLessThan > &  bndVertices 
)
static

Definition at line 519 of file meshGRegionDelaunayInsertion.cpp.

Referenced by insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tetcircumcenter()

double tetcircumcenter ( double  a[3],
double  b[3],
double  c[3],
double  d[3],
double  circumcenter[3],
double *  xi,
double *  eta,
double *  zeta 
)

Definition at line 1058 of file meshGRegionDelaunayInsertion.cpp.

Referenced by MTet4::circumcenter(), and insertVerticesInRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ verifyShell()

static bool verifyShell ( MVertex v,
MTet4 t,
std::vector< faceXtet > &  shell 
)
static

Definition at line 347 of file meshGRegionDelaunayInsertion.cpp.

Referenced by makeCavityStarShaped().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ faces