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

#include <meshMetric.h>

Inheritance diagram for meshMetric:
Collaboration diagram for meshMetric:

Public Types

enum  MetricComputationTechnique {
  LEVELSET = 1, HESSIAN = 2, FREY = 3, EIGENDIRECTIONS = 4,
  EIGENDIRECTIONS_LINEARINTERP_H = 5, ISOTROPIC_LINEARINTERP_H = 6
}
 
typedef std::map< MVertex *, SMetric3nodalMetricTensor
 
typedef std::map< MVertex *, double > nodalField
 

Public Member Functions

 meshMetric (std::vector< MElement * > elements)
 
 meshMetric (GModel *gm)
 
 ~meshMetric ()
 
void addMetric (int technique, simpleFunction< double > *fct, const std::vector< double > &parameters)
 
SMetric3 metricAtVertex (MVertex *v)
 
void scaleMetric (int nbElementsTarget, nodalMetricTensor &nmt)
 
void computeMetric (int metricNumber)
 
void computeMetricLevelSet (MVertex *ver, SMetric3 &hessian, SMetric3 &metric, double &size, double x=0.0, double y=0.0, double z=0.0)
 
void computeMetricHessian (MVertex *ver, SMetric3 &hessian, SMetric3 &metric, double &size, double x=0.0, double y=0.0, double z=0.0)
 
void computeMetricFrey (MVertex *ver, SMetric3 &hessian, SMetric3 &metric, double &size, double x=0.0, double y=0.0, double z=0.0)
 
void computeMetricEigenDir (MVertex *ver, SMetric3 &hessian, SMetric3 &metric, double &size, double x=0.0, double y=0.0, double z=0.0)
 
void computeMetricIsoLinInterp (MVertex *ver, SMetric3 &hessian, SMetric3 &metric, double &size, double x=0.0, double y=0.0, double z=0.0)
 
void computeValues ()
 
void computeHessian ()
 
double getLaplacian (MVertex *v)
 
SVector3 getGradient (MVertex *v)
 
virtual bool isotropic () const
 
virtual const char * getName ()
 
virtual std::string getDescription ()
 
virtual double operator() (double x, double y, double z, GEntity *ge=nullptr)
 
virtual void operator() (double x, double y, double z, SMetric3 &metr, GEntity *ge=nullptr)
 
void exportInfo (const char *fileendname)
 
- Public Member Functions inherited from Field
 Field ()
 
virtual ~Field ()
 
bool isDeprecated ()
 
virtual void update ()
 
virtual int numComponents () const
 
virtual void operator() (double x, double y, double z, SVector3 &, GEntity *ge=0)
 
void putOnNewView (int viewTag=-1)
 
FieldOptiongetOption (const std::string &optionName)
 

Private Member Functions

void updateMetrics ()
 

Private Attributes

int _dim
 
double _epsilon
 
double _e
 
double _e_moins
 
double _np
 
bool needMetricUpdate
 
bool hasAnalyticalMetric
 
meshMetric::MetricComputationTechnique _technique
 
double hmin
 
double hmax
 
simpleFunction< double > * _fct
 
std::vector< MElement * > _elements
 
v2t_cont _adj
 
MElementOctree_octree
 
std::map< int, MVertex * > _vertexMap
 
std::map< MVertex *, double > vals
 
std::map< MVertex *, SVector3grads
 
std::map< MVertex *, SMetric3hessians
 
nodalMetricTensor _nodalMetrics
 
nodalField _nodalSizes
 
nodalField _detMetric
 
std::map< int, nodalMetricTensorsetOfMetrics
 
std::map< int, nodalFieldsetOfSizes
 
std::map< int, bool > setOfRecomputeBoolean
 
std::map< int, simpleFunction< double > * > setOfFcts
 
std::map< int, std::vector< double > > setOfParameters
 
std::map< int, int > setOfTechniques
 

Additional Inherited Members

- Public Attributes inherited from Field
int id
 
std::map< std::string, FieldOption * > options
 
std::map< std::string, FieldCallback * > callbacks
 
bool updateNeeded
 
- Protected Attributes inherited from Field
bool _deprecated
 

Detailed Description

Anisotropic mesh size field based on a metric

Definition at line 22 of file meshMetric.h.

Member Typedef Documentation

◆ nodalField

typedef std::map<MVertex *, double> meshMetric::nodalField

Definition at line 56 of file meshMetric.h.

◆ nodalMetricTensor

Definition at line 55 of file meshMetric.h.

Member Enumeration Documentation

◆ MetricComputationTechnique

Enumerator
LEVELSET 
HESSIAN 
FREY 
EIGENDIRECTIONS 
EIGENDIRECTIONS_LINEARINTERP_H 
ISOTROPIC_LINEARINTERP_H 

Definition at line 24 of file meshMetric.h.

Constructor & Destructor Documentation

◆ meshMetric() [1/2]

meshMetric::meshMetric ( std::vector< MElement * >  elements)

Definition at line 46 of file meshMetric.cpp.

Here is the call graph for this function:

◆ meshMetric() [2/2]

meshMetric::meshMetric ( GModel gm)

Definition at line 17 of file meshMetric.cpp.

Here is the call graph for this function:

◆ ~meshMetric()

meshMetric::~meshMetric ( )

Definition at line 210 of file meshMetric.cpp.

Member Function Documentation

◆ addMetric()

void meshMetric::addMetric ( int  technique,
simpleFunction< double > *  fct,
const std::vector< double > &  parameters 
)

Definition at line 64 of file meshMetric.cpp.

Referenced by GModel::adaptMesh().

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

◆ computeHessian()

void meshMetric::computeHessian ( )

Definition at line 275 of file meshMetric.cpp.

Referenced by computeMetric().

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

◆ computeMetric()

void meshMetric::computeMetric ( int  metricNumber)

Definition at line 748 of file meshMetric.cpp.

Referenced by addMetric().

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

◆ computeMetricEigenDir()

void meshMetric::computeMetricEigenDir ( MVertex ver,
SMetric3 hessian,
SMetric3 metric,
double &  size,
double  x = 0.0,
double  y = 0.0,
double  z = 0.0 
)

Definition at line 517 of file meshMetric.cpp.

Referenced by computeMetric(), and operator()().

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

◆ computeMetricFrey()

void meshMetric::computeMetricFrey ( MVertex ver,
SMetric3 hessian,
SMetric3 metric,
double &  size,
double  x = 0.0,
double  y = 0.0,
double  z = 0.0 
)

Definition at line 452 of file meshMetric.cpp.

Referenced by computeMetric(), and operator()().

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

◆ computeMetricHessian()

void meshMetric::computeMetricHessian ( MVertex ver,
SMetric3 hessian,
SMetric3 metric,
double &  size,
double  x = 0.0,
double  y = 0.0,
double  z = 0.0 
)

Definition at line 406 of file meshMetric.cpp.

Referenced by computeMetric(), and operator()().

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

◆ computeMetricIsoLinInterp()

void meshMetric::computeMetricIsoLinInterp ( MVertex ver,
SMetric3 hessian,
SMetric3 metric,
double &  size,
double  x = 0.0,
double  y = 0.0,
double  z = 0.0 
)

Definition at line 651 of file meshMetric.cpp.

Referenced by computeMetric(), and operator()().

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

◆ computeMetricLevelSet()

void meshMetric::computeMetricLevelSet ( MVertex ver,
SMetric3 hessian,
SMetric3 metric,
double &  size,
double  x = 0.0,
double  y = 0.0,
double  z = 0.0 
)

Definition at line 354 of file meshMetric.cpp.

Referenced by computeMetric(), and operator()().

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

◆ computeValues()

void meshMetric::computeValues ( )

Definition at line 216 of file meshMetric.cpp.

Referenced by computeMetric().

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

◆ exportInfo()

void meshMetric::exportInfo ( const char *  fileendname)

Definition at line 105 of file meshMetric.cpp.

Here is the call graph for this function:

◆ getDescription()

virtual std::string meshMetric::getDescription ( )
inlinevirtual

Reimplemented from Field.

Definition at line 136 of file meshMetric.h.

◆ getGradient()

SVector3 meshMetric::getGradient ( MVertex v)

Definition at line 945 of file meshMetric.cpp.

Here is the call graph for this function:

◆ getLaplacian()

double meshMetric::getLaplacian ( MVertex v)

Definition at line 937 of file meshMetric.cpp.

Here is the call graph for this function:

◆ getName()

virtual const char* meshMetric::getName ( )
inlinevirtual

Implements Field.

Definition at line 135 of file meshMetric.h.

◆ isotropic()

virtual bool meshMetric::isotropic ( ) const
inlinevirtual

Reimplemented from Field.

Definition at line 134 of file meshMetric.h.

◆ metricAtVertex()

SMetric3 meshMetric::metricAtVertex ( MVertex v)
inline

Definition at line 103 of file meshMetric.h.

Here is the call graph for this function:

◆ operator()() [1/2]

double meshMetric::operator() ( double  x,
double  y,
double  z,
GEntity ge = nullptr 
)
virtual

Implements Field.

Definition at line 792 of file meshMetric.cpp.

Here is the call graph for this function:

◆ operator()() [2/2]

void meshMetric::operator() ( double  x,
double  y,
double  z,
SMetric3 metr,
GEntity ge = nullptr 
)
virtual

Reimplemented from Field.

Definition at line 828 of file meshMetric.cpp.

Here is the call graph for this function:

◆ scaleMetric()

void meshMetric::scaleMetric ( int  nbElementsTarget,
nodalMetricTensor nmt 
)

Definition at line 706 of file meshMetric.cpp.

Referenced by computeMetric().

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

◆ updateMetrics()

void meshMetric::updateMetrics ( )
private

Definition at line 79 of file meshMetric.cpp.

Referenced by exportInfo(), metricAtVertex(), and operator()().

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

Member Data Documentation

◆ _adj

v2t_cont meshMetric::_adj
private

Definition at line 46 of file meshMetric.h.

Referenced by computeHessian(), computeMetric(), computeValues(), meshMetric(), and updateMetrics().

◆ _detMetric

nodalField meshMetric::_detMetric
private

Definition at line 60 of file meshMetric.h.

◆ _dim

◆ _e

double meshMetric::_e
private

◆ _e_moins

double meshMetric::_e_moins
private

Definition at line 38 of file meshMetric.h.

Referenced by computeMetric(), computeMetricEigenDir(), and computeMetricIsoLinInterp().

◆ _elements

std::vector<MElement *> meshMetric::_elements
private

Definition at line 45 of file meshMetric.h.

Referenced by exportInfo(), meshMetric(), scaleMetric(), and ~meshMetric().

◆ _epsilon

double meshMetric::_epsilon
private

Definition at line 38 of file meshMetric.h.

Referenced by computeMetric(), and computeMetricFrey().

◆ _fct

◆ _nodalMetrics

nodalMetricTensor meshMetric::_nodalMetrics
private

Definition at line 59 of file meshMetric.h.

Referenced by exportInfo(), metricAtVertex(), operator()(), and updateMetrics().

◆ _nodalSizes

nodalField meshMetric::_nodalSizes
private

Definition at line 60 of file meshMetric.h.

Referenced by operator()(), and updateMetrics().

◆ _np

double meshMetric::_np
private

Definition at line 38 of file meshMetric.h.

Referenced by computeMetric(), computeMetricEigenDir(), and computeMetricFrey().

◆ _octree

MElementOctree* meshMetric::_octree
private

Definition at line 47 of file meshMetric.h.

Referenced by meshMetric(), operator()(), and ~meshMetric().

◆ _technique

meshMetric::MetricComputationTechnique meshMetric::_technique
private

Definition at line 41 of file meshMetric.h.

Referenced by computeHessian(), computeMetric(), computeMetricEigenDir(), and operator()().

◆ _vertexMap

std::map<int, MVertex *> meshMetric::_vertexMap
private

Definition at line 48 of file meshMetric.h.

Referenced by getGradient(), getLaplacian(), and meshMetric().

◆ grads

◆ hasAnalyticalMetric

bool meshMetric::hasAnalyticalMetric
private

Definition at line 40 of file meshMetric.h.

Referenced by addMetric(), meshMetric(), and operator()().

◆ hessians

◆ hmax

double meshMetric::hmax
private

◆ hmin

double meshMetric::hmin
private

◆ needMetricUpdate

bool meshMetric::needMetricUpdate
private

Definition at line 39 of file meshMetric.h.

Referenced by addMetric(), exportInfo(), metricAtVertex(), operator()(), and updateMetrics().

◆ setOfFcts

std::map<int, simpleFunction<double> *> meshMetric::setOfFcts
private

Definition at line 65 of file meshMetric.h.

Referenced by addMetric(), computeMetric(), and operator()().

◆ setOfMetrics

std::map<int, nodalMetricTensor> meshMetric::setOfMetrics
private

Definition at line 62 of file meshMetric.h.

Referenced by addMetric(), computeMetric(), operator()(), and updateMetrics().

◆ setOfParameters

std::map<int, std::vector<double> > meshMetric::setOfParameters
private

Definition at line 66 of file meshMetric.h.

Referenced by addMetric(), and computeMetric().

◆ setOfRecomputeBoolean

std::map<int, bool> meshMetric::setOfRecomputeBoolean
private

Definition at line 64 of file meshMetric.h.

◆ setOfSizes

std::map<int, nodalField> meshMetric::setOfSizes
private

Definition at line 63 of file meshMetric.h.

Referenced by computeMetric(), and updateMetrics().

◆ setOfTechniques

std::map<int, int> meshMetric::setOfTechniques
private

Definition at line 67 of file meshMetric.h.

Referenced by addMetric(), computeMetric(), and operator()().

◆ vals

std::map<MVertex *, double> meshMetric::vals
private

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