gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
delaunay3d.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <set>
#include <stack>
#include <map>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include "SPoint3.h"
#include "SBoundingBox3d.h"
#include "delaunay3d.h"
#include "MVertex.h"
#include "MTetrahedron.h"
#include "meshGRegionLocalMeshMod.h"
#include "Context.h"
#include "robustPredicates.h"
#include "OS.h"
Include dependency graph for delaunay3d.cpp:

Go to the source code of this file.

Classes

struct  Vert
 
struct  Face
 
struct  Tet
 
struct  conn
 
class  aBunchOfStuff< T >
 
class  tetContainer
 
struct  HilbertSortB
 

Macros

#define MAX_NUM_THREADS_   8
 
#define cswap(a, b)
 

Typedefs

typedef unsigned char CHECKTYPE
 
typedef std::vector< Tet * > cavityContainer
 
typedef std::vector< conn > connContainer
 

Functions

static double orientationTestFast (double *pa, double *pb, double *pc, double *pd)
 
static bool inSphereTest_s (Vert *va, Vert *vb, Vert *vc, Vert *vd, Vert *ve)
 
static void SortHilbert (std::vector< Vert * > &v, std::vector< int > &indices)
 
static void computeAdjacencies (Tet *t, int iFace, connContainer &faceToTet)
 
static void starShapeness (Vert *v, connContainer &bndK, std::vector< std::size_t > &_negatives)
 
static Tet * tetContainsV (Vert *v, cavityContainer &cavity)
 
static void buildDelaunayBall (cavityContainer &cavity, connContainer &faceToTet)
 
static bool removeIsolatedTets (Tet *containsV, cavityContainer &cavity, connContainer &bndK, int myThread, int K)
 
static Tet * tetInsideCavityWithFAce (Face &f, cavityContainer &cavity)
 
static bool fixDelaunayCavity (Vert *v, cavityContainer &cavity, connContainer &bndK, int myThread, int K, std::vector< std::size_t > &_negatives)
 
static void delaunayCavity2 (Tet *tet, Tet *prevTet, Vert *v, cavityContainer &cavity, connContainer &bnd, int thread, int iPnt)
 
static Tet * walk (Tet *t, Vert *v, int maxx, double &totSearch, int thread)
 
static bool canWeProcessCavity (cavityContainer &cavity, std::size_t myThread, std::size_t iPt)
 
static Tet * randomTet (int thread, tetContainer &allocator)
 
void delaunayTrgl (const std::size_t numThreads, const std::size_t NPTS_AT_ONCE, std::size_t Npts, std::vector< Vert * > assignTo[], tetContainer &allocator)
 
static void initialCube (std::vector< Vert * > &v, Vert *box[8], tetContainer &allocator)
 
static void delaunayTriangulation (const int numThreads, const int nptsatonce, std::vector< Vert * > &S, Vert *box[8], tetContainer &allocator)
 
void delaunayTriangulation (const int numThreads, const int nptsatonce, std::vector< MVertex * > &S, std::vector< MTetrahedron * > &T, bool removeBox)
 

Macro Definition Documentation

◆ cswap

#define cswap (   a,
  b 
)
Value:
do { \
if(a > b) { \
Vert *tmp = a; \
a = b; \
b = tmp; \
} \
} while(0)

◆ MAX_NUM_THREADS_

#define MAX_NUM_THREADS_   8

Definition at line 31 of file delaunay3d.cpp.

Typedef Documentation

◆ cavityContainer

typedef std::vector<Tet *> cavityContainer

Definition at line 327 of file delaunay3d.cpp.

◆ CHECKTYPE

typedef unsigned char CHECKTYPE

Definition at line 33 of file delaunay3d.cpp.

◆ connContainer

typedef std::vector<conn> connContainer

Definition at line 328 of file delaunay3d.cpp.

Function Documentation

◆ buildDelaunayBall()

static void buildDelaunayBall ( cavityContainer &  cavity,
connContainer &  faceToTet 
)
static

Definition at line 653 of file delaunay3d.cpp.

Referenced by fixDelaunayCavity().

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

◆ canWeProcessCavity()

static bool canWeProcessCavity ( cavityContainer &  cavity,
std::size_t  myThread,
std::size_t  iPt 
)
static

Definition at line 913 of file delaunay3d.cpp.

Referenced by delaunayTrgl().

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

◆ computeAdjacencies()

static void computeAdjacencies ( Tet *  t,
int  iFace,
connContainer &  faceToTet 
)
static

Definition at line 598 of file delaunay3d.cpp.

Referenced by delaunayTrgl(), and initialCube().

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

◆ delaunayCavity2()

static void delaunayCavity2 ( Tet *  tet,
Tet *  prevTet,
Vert *  v,
cavityContainer &  cavity,
connContainer &  bnd,
int  thread,
int  iPnt 
)
static

Definition at line 754 of file delaunay3d.cpp.

Referenced by delaunayTrgl().

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

◆ delaunayTrgl()

void delaunayTrgl ( const std::size_t  numThreads,
const std::size_t  NPTS_AT_ONCE,
std::size_t  Npts,
std::vector< Vert * >  assignTo[],
tetContainer &  allocator 
)

Definition at line 966 of file delaunay3d.cpp.

Referenced by delaunayTriangulation().

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

◆ delaunayTriangulation() [1/2]

void delaunayTriangulation ( const int  numThreads,
const int  nptsatonce,
std::vector< MVertex * > &  S,
std::vector< MTetrahedron * > &  T,
bool  removeBox 
)

Definition at line 1230 of file delaunay3d.cpp.

Here is the call graph for this function:

◆ delaunayTriangulation() [2/2]

static void delaunayTriangulation ( const int  numThreads,
const int  nptsatonce,
std::vector< Vert * > &  S,
Vert *  box[8],
tetContainer &  allocator 
)
static

Definition at line 1197 of file delaunay3d.cpp.

Referenced by delaunayMeshIn3D(), and delaunayTriangulation().

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

◆ fixDelaunayCavity()

static bool fixDelaunayCavity ( Vert *  v,
cavityContainer &  cavity,
connContainer &  bndK,
int  myThread,
int  K,
std::vector< std::size_t > &  _negatives 
)
static

Definition at line 709 of file delaunay3d.cpp.

Referenced by delaunayTrgl().

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

◆ initialCube()

static void initialCube ( std::vector< Vert * > &  v,
Vert *  box[8],
tetContainer &  allocator 
)
static

Definition at line 1147 of file delaunay3d.cpp.

Referenced by delaunayTriangulation().

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

◆ inSphereTest_s()

static bool inSphereTest_s ( Vert *  va,
Vert *  vb,
Vert *  vc,
Vert *  vd,
Vert *  ve 
)
static

Definition at line 95 of file delaunay3d.cpp.

Referenced by Tet::inSphere().

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

◆ orientationTestFast()

static double orientationTestFast ( double *  pa,
double *  pb,
double *  pc,
double *  pd 
)
static

Definition at line 78 of file delaunay3d.cpp.

Referenced by inSphereTest_s().

Here is the caller graph for this function:

◆ randomTet()

static Tet* randomTet ( int  thread,
tetContainer &  allocator 
)
static

Definition at line 954 of file delaunay3d.cpp.

Referenced by delaunayTrgl().

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

◆ removeIsolatedTets()

static bool removeIsolatedTets ( Tet *  containsV,
cavityContainer &  cavity,
connContainer &  bndK,
int  myThread,
int  K 
)
static

Definition at line 670 of file delaunay3d.cpp.

Referenced by fixDelaunayCavity().

Here is the caller graph for this function:

◆ SortHilbert()

static void SortHilbert ( std::vector< Vert * > &  v,
std::vector< int > &  indices 
)
static

Definition at line 592 of file delaunay3d.cpp.

Referenced by bowyerWatsonParallelograms(), delaunayMeshIn2D(), and delaunayTriangulation().

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

◆ starShapeness()

static void starShapeness ( Vert *  v,
connContainer &  bndK,
std::vector< std::size_t > &  _negatives 
)
static

Definition at line 625 of file delaunay3d.cpp.

Referenced by fixDelaunayCavity().

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

◆ tetContainsV()

static Tet* tetContainsV ( Vert *  v,
cavityContainer &  cavity 
)
static

Definition at line 638 of file delaunay3d.cpp.

Referenced by fixDelaunayCavity().

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

◆ tetInsideCavityWithFAce()

static Tet* tetInsideCavityWithFAce ( Face &  f,
cavityContainer &  cavity 
)
static

Definition at line 697 of file delaunay3d.cpp.

Referenced by fixDelaunayCavity().

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

◆ walk()

static Tet* walk ( Tet *  t,
Vert *  v,
int  maxx,
double &  totSearch,
int  thread 
)
static

Definition at line 809 of file delaunay3d.cpp.

Referenced by delaunayTrgl().

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