gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
discreteFace Class Reference

#include <discreteFace.h>

Inheritance diagram for discreteFace:
Collaboration diagram for discreteFace:

Classes

class  param
 

Public Member Functions

 discreteFace (GModel *model, int num)
 
 discreteFace (GModel *model)
 
virtual ~discreteFace ()
 
GPoint point (double par1, double par2) const
 
SPoint2 parFromPoint (const SPoint3 &p, bool onSurface=true, bool convTestXYZ=false) const
 
Range< double > parBounds (int i) const
 
bool containsParam (const SPoint2 &pt)
 
SBoundingBox3d bounds (bool fast=false)
 
GPoint closestPoint (const SPoint3 &queryPoint, double maxDistance, SVector3 *normal=nullptr) const
 
GPoint closestPoint (const SPoint3 &queryPoint, const double initialGuess[2]) const
 
SVector3 normal (const SPoint2 &param) const
 
double curvatureMax (const SPoint2 &param) const
 
double curvatures (const SPoint2 &param, SVector3 &dirMax, SVector3 &dirMin, double &curvMax, double &curvMin) const
 
GEntity::GeomType geomType () const
 
virtual Pair< SVector3, SVector3firstDer (const SPoint2 &param) const
 
virtual void secondDer (const SPoint2 &param, SVector3 &dudu, SVector3 &dvdv, SVector3 &dudv) const
 
int createGeometry ()
 
virtual bool haveParametrization ()
 
virtual void mesh (bool verbose)
 
int trianglePosition (double par1, double par2, double &u, double &v) const
 
GPoint intersectionWithCircle (const SVector3 &n1, const SVector3 &n2, const SVector3 &p, const double &R, double uv[2])
 
bool writeParametrization (FILE *fp, bool binary)
 
bool readParametrization (FILE *fp, bool binary)
 
virtual void resetMeshAttributes ()
 
virtual GPoint point (double par1, double par2) const=0
 
virtual GPoint point (const SPoint2 &pt) const
 
- Public Member Functions inherited from GFace
void setMeshMaster (GFace *master, const std::vector< double > &)
 
void setMeshMaster (GFace *master, const std::map< int, int > &)
 
void alignElementsWithMaster ()
 
 GFace (GModel *model, int tag)
 
virtual ~GFace ()
 
virtual void deleteMesh ()
 
void addRegion (GRegion *r)
 
void delRegion (GRegion *r)
 
GRegiongetRegion (int const num) const
 
std::size_t numRegions () const
 
std::list< GRegion * > regions () const
 
virtual bool isOrphan ()
 
void addEmbeddedVertex (GVertex *v)
 
void addEmbeddedEdge (GEdge *e)
 
virtual std::vector< int > const & orientations () const
 
int delEdge (GEdge *edge)
 
virtual std::vector< GEdge * > const & edges () const
 
void set (const std::vector< GEdge * > &f)
 
void setOrientations (const std::vector< int > &f)
 
void setEdge (GEdge *const f, int const orientation)
 
virtual std::vector< int > const & edgeOrientations () const
 
bool containsEdge (int const iEdge) const
 
void setBoundEdges (const std::vector< int > &tagEdges)
 
void setBoundEdges (const std::vector< int > &tagEdges, const std::vector< int > &signEdges)
 
std::vector< GEdge * > & embeddedEdges ()
 
std::set< GVertex *, GEntityPtrLessThan > & embeddedVertices ()
 
std::vector< GVertex * > getEmbeddedVertices (bool force=false) const
 
std::vector< GEdge * > getEmbeddedEdges (bool force=false) const
 
std::vector< MVertex * > getEmbeddedMeshVertices (bool force=false) const
 
virtual std::vector< GVertex * > vertices () const
 
virtual int dim () const
 
virtual GEntitygetParentEntity ()
 
virtual void setVisibility (char val, bool recursive=false)
 
virtual void setColor (unsigned int val, bool recursive=false)
 
void XYZtoUV (double X, double Y, double Z, double &U, double &V, double relax, bool onSurface=true, bool convTestXYZ=false) const
 
virtual SOrientedBoundingBox getOBB ()
 
virtual int genusGeom () const
 
virtual bool checkTopology () const
 
virtual GPoint point (const SPoint2 &pt) const
 
virtual double getMetricEigenvalue (const SPoint2 &)
 
virtual void getMetricEigenVectors (const SPoint2 &param, double eigVal[2], double eigVec[4]) const
 
double curvature (const SPoint2 &param) const
 
virtual double curvatureDiv (const SPoint2 &param) const
 
virtual std::string getAdditionalInfoString (bool multline=false)
 
virtual void writeGEO (FILE *fp)
 
virtual void writePY (FILE *fp)
 
virtual bool buildRepresentationCross (bool force=false)
 
virtual bool buildSTLTriangulation (bool force=false)
 
bool fillVertexArray (bool force=false)
 
bool storeSTLAsMesh ()
 
void computeMeanPlane (const std::vector< MVertex * > &points)
 
void computeMeanPlane (const std::vector< SPoint3 > &points)
 
void computeMeanPlane ()
 
void getMeanPlaneData (double VX[3], double VY[3], double &x, double &y, double &z) const
 
void getMeanPlaneData (double plan[3][3]) const
 
virtual void getElementTypes (std::vector< int > &types) const
 
std::size_t getNumMeshElements () const
 
std::size_t getNumMeshElementsByType (const int familyType) const
 
std::size_t getNumMeshParentElements ()
 
void getNumMeshElements (unsigned *const c) const
 
MElement *const * getStartElementType (int type) const
 
MElementgetMeshElement (std::size_t index) const
 
MElementgetMeshElementByType (const int familyType, const std::size_t index) const
 
void moveToValidRange (SPoint2 &pt) const
 
void computeMeshSizeFieldAccuracy (double &avg, double &max_e, double &min_e, int &nE, int &GS)
 
bool fillPointCloud (double maxDist, std::vector< SPoint3 > *points, std::vector< SPoint2 > *uvpoints=nullptr, std::vector< SVector3 > *normals=nullptr)
 
virtual bool isSphere (double &radius, SPoint3 &center) const
 
int getMeshingAlgo () const
 
void setMeshingAlgo (int val)
 
void unsetMeshingAlgo ()
 
int getMeshSizeFromBoundary () const
 
void setMeshSizeFromBoundary (int val)
 
virtual double getMeshSize () const
 
virtual double getMeshSizeFactor () const
 
void relocateMeshVertices ()
 
void addTriangle (MTriangle *t)
 
void addQuadrangle (MQuadrangle *q)
 
void addPolygon (MPolygon *p)
 
void addElement (int type, MElement *e)
 
void removeElement (int type, MElement *e)
 
void removeElements (int type)
 
BoundaryLayerColumnsgetColumns ()
 
virtual bool reorder (const int elementType, const std::vector< std::size_t > &ordering)
 
virtual bool isFullyDiscrete ()
 
- Public Member Functions inherited from GEntity
void addVerticesInSet (std::set< MVertex * > &, bool closure) const
 
virtual std::string getTypeString ()
 
 GEntity (GModel *m, int t)
 
virtual ~GEntity ()
 
void deleteVertexArrays ()
 
virtual std::vector< GFace * > faces () const
 
std::vector< GRegion * > bindingsGetRegions ()
 
std::vector< GFace * > bindingsGetFaces ()
 
std::vector< GEdge * > bindingsGetEdges () const
 
std::vector< GVertex * > bindingsGetVertices ()
 
virtual bool continuous (int dim) const
 
virtual bool periodic (int dim) const
 
virtual double period (int dim) const
 
virtual bool degenerate (int dim) const
 
virtual double tolerance () const
 
virtual bool containsPoint (const SPoint3 &pt) const
 
virtual ModelType getNativeType () const
 
virtual void * getNativePtr () const
 
virtual int getNativeInt () const
 
GModelmodel () const
 
int tag () const
 
void setTag (int tag)
 
virtual void addPhysicalEntity (int physicalTag)
 
virtual std::vector< int > getPhysicalEntities ()
 
GEntitygetMeshMaster () const
 
void setMeshMaster (GEntity *)
 
void setMeshMaster (GEntity *, const std::vector< double > &, bool updateCorrespondingVertices=true)
 
void updateCorrespondingVertices ()
 
void copyMasterCoordinates ()
 
virtual char getVisibility ()
 
virtual char getSelection ()
 
virtual void setSelection (char val)
 
virtual unsigned int getColor ()
 
virtual void setColor (unsigned color, bool recursive=false)
 
virtual bool useColor ()
 
virtual std::string getInfoString (bool additional=true, bool multiline=false)
 
bool getAllElementsVisible ()
 
void setAllElementsVisible (bool val)
 
std::size_t getNumMeshVertices ()
 
MVertexgetMeshVertex (std::size_t index)
 
void addMeshVertex (MVertex *v)
 
void removeMeshVertex (MVertex *v)
 
GVertexcast2Vertex ()
 
GEdgecast2Edge ()
 
GFacecast2Face ()
 
GRegioncast2Region ()
 

Private Member Functions

void _createGeometryFromSTL ()
 
void _computeSTLNormals ()
 
void _debugParametrization (bool uv)
 

Private Attributes

param _param
 

Additional Inherited Members

- Public Types inherited from GEntity
enum  ModelType {
  UnknownModel, GmshModel, OpenCascadeModel, AcisModel,
  ParasolidModel
}
 
enum  GeomType {
  Unknown, Point, BoundaryLayerPoint, Line,
  Circle, Ellipse, Conic, Parabola,
  Hyperbola, TrimmedCurve, OffsetCurve, BSpline,
  Bezier, ParametricCurve, BoundaryLayerCurve, DiscreteCurve,
  Plane, Nurb, Cylinder, Sphere,
  Cone, Torus, RuledSurface, ParametricSurface,
  BSplineSurface, BezierSurface, SurfaceOfRevolution, BoundaryLayerSurface,
  DiscreteSurface, DiscreteDiskSurface, Volume, DiscreteVolume,
  PartitionPoint, PartitionCurve, PartitionSurface, PartitionVolume,
  GhostCurve, GhostSurface, GhostVolume
}
 
enum  MeshGenerationStatus { PENDING, DONE, FAILED }
 
- Public Attributes inherited from GFace
std::vector< GEdgeLoopedgeLoops
 
std::map< GEdge *, std::pair< GEdge *, int > > edgeCounterparts
 
struct {
   int   recombine
 
   double   recombineAngle
 
   char   method
 
   std::vector< GVertex * >   corners
 
   int   transfiniteArrangement
 
   int   transfiniteSmoothing
 
   ExtrudeParams *   extrude
 
   bool   reverseMesh
 
   double   meshSize
 
   double   meshSizeFactor
 
   int   algorithm
 
   int   meshSizeFromBoundary
 
   bool   transfinite3
 
meshAttributes
 
struct {
   GEntity::MeshGenerationStatus   status
 
   bool   refineAllEdges
 
   double   worst_element_shape
 
   double   best_element_shape
 
   double   average_element_shape
 
   double   smallest_edge_length
 
   double   longest_edge_length
 
   double   efficiency_index
 
   int   nbEdge
 
   int   nbTriangle
 
   int   nbGoodQuality
 
   int   nbGoodLength
 
meshStatistics
 
std::vector< std::vector< SPoint3 > > cross [2]
 
std::vector< SPoint2stl_vertices_uv
 
std::vector< SPoint3stl_vertices_xyz
 
std::vector< SVector3stl_normals
 
std::vector< SVector3stl_curvatures
 
std::vector< int > stl_triangles
 
VertexArrayva_geom_triangles
 
std::vector< std::vector< MVertex * > > transfinite_vertices
 
std::set< MVertex * > constr_vertices
 
std::vector< MTriangle * > triangles
 
std::vector< MQuadrangle * > quadrangles
 
std::vector< MPolygon * > polygons
 
GFacecompoundSurface
 
std::vector< SPoint3storage1
 
std::vector< SVector3storage2
 
std::vector< SVector3storage3
 
std::vector< double > storage4
 
- Public Attributes inherited from GEntity
std::vector< MVertex * > mesh_vertices
 
std::vector< GEntity * > compound
 
std::map< GVertex *, GVertex * > vertexCounterparts
 
std::vector< int > physicals
 
VertexArrayva_lines
 
VertexArrayva_triangles
 
std::set< MElement * > curvedBLElements
 
std::vector< double > affineTransform
 
std::map< MVertex *, MVertex * > correspondingVertices
 
std::map< MVertex *, MVertex * > correspondingHighOrderVertices
 
- Protected Attributes inherited from GFace
std::vector< GEdge * > l_edges
 
std::vector< int > l_dirs
 
GRegionr1
 
GRegionr2
 
mean_plane meanPlane
 
std::vector< GEdge * > embedded_edges
 
std::set< GVertex *, GEntityPtrLessThanembedded_vertices
 
BoundaryLayerColumns _columns
 
- Protected Attributes inherited from GEntity
SOrientedBoundingBox_obb
 

Detailed Description

Definition at line 18 of file discreteFace.h.

Constructor & Destructor Documentation

◆ discreteFace() [1/2]

discreteFace::discreteFace ( GModel model,
int  num 
)

Definition at line 99 of file discreteFace.cpp.

Here is the call graph for this function:

◆ discreteFace() [2/2]

discreteFace::discreteFace ( GModel model)

Definition at line 106 of file discreteFace.cpp.

◆ ~discreteFace()

virtual discreteFace::~discreteFace ( )
inlinevirtual

Definition at line 46 of file discreteFace.h.

Member Function Documentation

◆ _computeSTLNormals()

void discreteFace::_computeSTLNormals ( )
private

Definition at line 600 of file discreteFace.cpp.

Referenced by createGeometry(), and readParametrization().

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

◆ _createGeometryFromSTL()

void discreteFace::_createGeometryFromSTL ( )
private

Definition at line 624 of file discreteFace.cpp.

Referenced by createGeometry(), and readParametrization().

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

◆ _debugParametrization()

void discreteFace::_debugParametrization ( bool  uv)
private

Definition at line 416 of file discreteFace.cpp.

Here is the call graph for this function:

◆ bounds()

SBoundingBox3d discreteFace::bounds ( bool  fast = false)
virtual

Reimplemented from GFace.

Definition at line 293 of file discreteFace.cpp.

Here is the call graph for this function:

◆ closestPoint() [1/2]

GPoint discreteFace::closestPoint ( const SPoint3 queryPoint,
const double  initialGuess[2] 
) const
virtual

Reimplemented from GFace.

Definition at line 265 of file discreteFace.cpp.

Here is the call graph for this function:

◆ closestPoint() [2/2]

GPoint discreteFace::closestPoint ( const SPoint3 queryPoint,
double  maxDistance,
SVector3 normal = nullptr 
) const

Definition at line 210 of file discreteFace.cpp.

Referenced by closestPoint(), and parFromPoint().

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

◆ containsParam()

bool discreteFace::containsParam ( const SPoint2 pt)
virtual

Reimplemented from GFace.

Definition at line 286 of file discreteFace.cpp.

Here is the call graph for this function:

◆ createGeometry()

int discreteFace::createGeometry ( )

Definition at line 557 of file discreteFace.cpp.

Here is the call graph for this function:

◆ curvatureMax()

double discreteFace::curvatureMax ( const SPoint2 param) const
virtual

Reimplemented from GFace.

Definition at line 322 of file discreteFace.cpp.

Here is the call graph for this function:

◆ curvatures()

double discreteFace::curvatures ( const SPoint2 param,
SVector3 dirMax,
SVector3 dirMin,
double &  curvMax,
double &  curvMin 
) const
virtual

Reimplemented from GFace.

Definition at line 333 of file discreteFace.cpp.

Referenced by curvatureMax().

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

◆ firstDer()

Pair< SVector3, SVector3 > discreteFace::firstDer ( const SPoint2 param) const
virtual

Implements GFace.

Definition at line 366 of file discreteFace.cpp.

Here is the call graph for this function:

◆ geomType()

GEntity::GeomType discreteFace::geomType ( ) const
inlinevirtual

Reimplemented from GEntity.

Reimplemented in ghostFace, and partitionFace.

Definition at line 62 of file discreteFace.h.

◆ haveParametrization()

virtual bool discreteFace::haveParametrization ( )
inlinevirtual

Reimplemented from GEntity.

Reimplemented in partitionFace.

Definition at line 67 of file discreteFace.h.

Here is the call graph for this function:

◆ intersectionWithCircle()

GPoint discreteFace::intersectionWithCircle ( const SVector3 n1,
const SVector3 n2,
const SVector3 p,
const double &  R,
double  uv[2] 
)

Definition at line 692 of file discreteFace.cpp.

Referenced by optimalPointFrontalB().

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

◆ mesh()

void discreteFace::mesh ( bool  verbose)
virtual

Reimplemented from GFace.

Definition at line 686 of file discreteFace.cpp.

Here is the call graph for this function:

◆ normal()

SVector3 discreteFace::normal ( const SPoint2 param) const
virtual

Reimplemented from GFace.

Definition at line 299 of file discreteFace.cpp.

Referenced by closestPoint().

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

◆ parBounds()

Range< double > discreteFace::parBounds ( int  i) const
virtual

Reimplemented from GEntity.

Definition at line 278 of file discreteFace.cpp.

◆ parFromPoint()

SPoint2 discreteFace::parFromPoint ( const SPoint3 p,
bool  onSurface = true,
bool  convTestXYZ = false 
) const
virtual

Reimplemented from GFace.

Definition at line 271 of file discreteFace.cpp.

Here is the call graph for this function:

◆ point() [1/3]

virtual GPoint GFace::point
inline

Definition at line 211 of file GFace.h.

◆ point() [2/3]

GPoint discreteFace::point ( double  par1,
double  par2 
) const
virtual

Implements GFace.

Definition at line 148 of file discreteFace.cpp.

Here is the call graph for this function:

◆ point() [3/3]

virtual GPoint GFace::point

◆ readParametrization()

bool discreteFace::readParametrization ( FILE *  fp,
bool  binary 
)

Definition at line 848 of file discreteFace.cpp.

Here is the call graph for this function:

◆ resetMeshAttributes()

void discreteFace::resetMeshAttributes ( )
virtual

Reimplemented from GFace.

Definition at line 906 of file discreteFace.cpp.

Here is the call graph for this function:

◆ secondDer()

void discreteFace::secondDer ( const SPoint2 param,
SVector3 dudu,
SVector3 dvdv,
SVector3 dudv 
) const
virtual

Implements GFace.

Definition at line 410 of file discreteFace.cpp.

◆ trianglePosition()

int discreteFace::trianglePosition ( double  par1,
double  par2,
double &  u,
double &  v 
) const

Definition at line 112 of file discreteFace.cpp.

Here is the call graph for this function:

◆ writeParametrization()

bool discreteFace::writeParametrization ( FILE *  fp,
bool  binary 
)

Definition at line 805 of file discreteFace.cpp.

Member Data Documentation

◆ _param


The documentation for this class was generated from the following files: