gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
6 #ifndef BACKGROUND_MESH_H
7 #define BACKGROUND_MESH_H
11 #include <unordered_map>
38 else if(
angle >= M_PI * .5)
39 while(
angle >= M_PI * .5)
angle -= (M_PI * .5);
59 mutable ANNkd_tree *uv_kdtree;
60 mutable ANNpointArray nodes;
63 mutable ANNpointArray angle_nodes;
64 mutable ANNkd_tree *angle_kdtree;
65 std::vector<double> _cos, _sin;
78 double operator()(
double u,
double v,
double w)
const;
81 double getAngle(
double u,
double v,
double w)
const;
84 void print(
const std::string &filename,
GFace *gf,
85 const std::map<MVertex *, double> &,
int smooth = 0);
86 void print(
const std::string &filename,
GFace *gf,
int choice = 0)
180 extern std::vector<std::unique_ptr<GlobalBackgroundMesh> >
global_bmeshes;
MElement * getMeshElementByCoord(double u, double v, double w, bool strict=true)
std::map< MVertex *, double > _sizes
std::map< MVertex *, double > _angles
void propagateCrossFieldByDistance(GFace *)
void print(const std::string &filename, GFace *gf, const std::map< MVertex *, double > &, int smooth=0)
double operator()(double u, double v, double w) const
void propagate1dMesh(GFace *)
double getSmoothness(double u, double v, double w)
double angle(const SVector3 &a, const SVector3 &b)
std::vector< MLine > lines
std::map< MVertex *, MVertex * > _2Dto3D
std::vector< MElement * >::iterator begin_triangles()
std::vector< MElement * >::iterator end_triangles()
void propagateCrossField(GFace *, simpleFunction< double > *)
std::unordered_map< GEdge *, BackgroundMeshGEdge > edgeBackgroundMeshes
std::map< MVertex *, double > _distance
bool inDomain(double u, double v, double w) const
GlobalBackgroundMesh(GlobalBackgroundMesh const &)=delete
static void setCrossFieldsByDistance(GFace *)
std::vector< MVertex * >::iterator begin_vertices()
backgroundMesh(GFace *, bool dist=false)
std::vector< MVertex * >::const_iterator begin_vertices() const
crossField2d(MVertex *, GEdge *)
void propagateCrossFieldHJ(GFace *)
void print(const std::string &filename, GFace *gf, int choice=0)
bool backgroudMeshExists(const std::string &name)
std::vector< std::unique_ptr< GlobalBackgroundMesh > > global_bmeshes
static void normalizeAngle(double &angle)
std::vector< MElement * >::const_iterator begin_triangles() const
std::vector< MVertex * >::iterator end_vertices()
int importGModelMeshes(GModel *gm, bool overwriteExisting=true)
Fill the entityMesh map by copying the meshes in the GModel. New MVertex, MLine and MTriangle instanc...
std::vector< MElement * >::const_iterator end_triangles() const
std::vector< MVertex * > _vertices
int getNumMeshElements() const
std::vector< MVertex * >::const_iterator end_vertices() const
void updateSizes(GFace *)
GlobalBackgroundMesh & getBackgroundMesh(const std::string &name)
std::vector< MTriangle > triangles
static backgroundMesh * current()
GlobalBackgroundMesh & operator=(GlobalBackgroundMesh const &)=delete
std::map< MVertex *, MVertex * > _3Dto2D
crossField2d & operator+=(const crossField2d &)
double getAngle(double u, double v, double w) const
std::unordered_map< GFace *, BackgroundMeshGFace > faceBackgroundMeshes
GlobalBackgroundMesh(const std::string &_name)
std::vector< MVertex * > mesh_vertices
static std::vector< backgroundMesh * > _current
std::vector< MElement * > _triangles