gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
AnalyseMeshQuality.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef ANALYSEMESHQUALITY_H
7 #define ANALYSEMESHQUALITY_H
8 
9 #include "Plugin.h"
10 #include <vector>
11 class MElement;
12 
13 extern "C" {
15 }
16 
18 private:
21 
22 public:
23  data_elementMinMax(MElement *e, double minJ = 2, double maxJ = 0,
24  double minIGE = -1, double minICN = -1)
25  : _el(e), _minJac(minJ), _maxJac(maxJ), _minIGE(minIGE), _minICN(minICN)
26  {
27  }
28  void setMinS(double r) { _minIGE = r; }
29  void setMinI(double r) { _minICN = r; }
30  MElement *element() { return _el; }
31  double minJ() { return _minJac; }
32  double maxJ() { return _maxJac; }
33  double minS() { return _minIGE; }
34  double minI() { return _minICN; }
35 };
36 
38 private:
40 
41 #if defined(HAVE_VISUDEV)
42  // Pointwise data
43  int _numElementToScan;
44  bool _pwJac, _pwIGE, _pwICN;
45  std::map<int, std::vector<double> > _dataPViewJac;
46  std::map<int, std::vector<double> > _dataPViewIGE;
47  std::map<int, std::vector<double> > _dataPViewICN;
48  int _type2tag[20] = {0};
49  int _viewOrder = 0;
50 #endif
51 
52  // for 1d, 2d, 3d
54  bool _pviewJac[3], _pviewIGE[3], _pviewICN[3];
55 
56  std::vector<data_elementMinMax> _data;
57 
58 public:
60  {
61  _m = nullptr;
62  for(int i = 0; i < 3; ++i) {
63  _computedJac[i] = false;
64  _computedIGE[i] = false;
65  _computedICN[i] = false;
66  _pviewJac[i] = false;
67  _pviewIGE[i] = false;
68  _pviewICN[i] = false;
69  }
70  }
71  std::string getName() const { return "AnalyseMeshQuality"; }
72  std::string getShortHelp() const
73  {
74  return "Compute validity and quality of curved elements.";
75  }
76  std::string getHelp() const;
77  std::string getAuthor() const { return "Amaury Johnen"; }
78  int getNbOptions() const;
81 
82 private:
84  void _computeMinIGE(int dim);
85  void _computeMinICN(int dim);
86  int _hideWithThreshold(int askedDim, int whichMeasure, double threshold,
87  bool greater);
89  void _printStatIGE();
90  void _printStatICN();
91  void _clear(int askedDim);
92 
93 #if defined(HAVE_VISUDEV)
94  void _computePointwiseQuantities(MElement *,
95  const fullMatrix<double> *normals);
96  void _createPViewPointwise();
97  void _setInterpolationMatrices(PView *);
98 #endif
99 };
100 
101 #endif
PView
Definition: PView.h:27
GMSH_AnalyseMeshQualityPlugin
Definition: AnalyseMeshQuality.h:37
GMSH_AnalyseMeshQualityPlugin::_printStatIGE
void _printStatIGE()
Plugin.h
GMSH_Plugin
Definition: Plugin.h:26
data_elementMinMax::_minICN
double _minICN
Definition: AnalyseMeshQuality.h:20
GMSH_AnalyseMeshQualityPlugin::_data
std::vector< data_elementMinMax > _data
Definition: AnalyseMeshQuality.h:56
data_elementMinMax
Definition: AnalyseMeshQuality.h:17
StringXNumber
Definition: Options.h:918
GMSH_AnalyseMeshQualityPlugin::_computedJac
bool _computedJac[3]
Definition: AnalyseMeshQuality.h:53
GMSH_AnalyseMeshQualityPlugin::execute
PView * execute(PView *)
GMSH_AnalyseMeshQualityPlugin::_hideWithThreshold
int _hideWithThreshold(int askedDim, int whichMeasure, double threshold, bool greater)
GMSH_RegisterAnalyseMeshQualityPlugin
GMSH_Plugin * GMSH_RegisterAnalyseMeshQualityPlugin()
data_elementMinMax::_minIGE
double _minIGE
Definition: AnalyseMeshQuality.h:20
data_elementMinMax::_el
MElement * _el
Definition: AnalyseMeshQuality.h:19
data_elementMinMax::data_elementMinMax
data_elementMinMax(MElement *e, double minJ=2, double maxJ=0, double minIGE=-1, double minICN=-1)
Definition: AnalyseMeshQuality.h:23
fullMatrix< double >
GMSH_AnalyseMeshQualityPlugin::getShortHelp
std::string getShortHelp() const
Definition: AnalyseMeshQuality.h:72
GMSH_AnalyseMeshQualityPlugin::getName
std::string getName() const
Definition: AnalyseMeshQuality.h:71
GMSH_AnalyseMeshQualityPlugin::_printStatJacobian
void _printStatJacobian()
GMSH_AnalyseMeshQualityPlugin::_printStatICN
void _printStatICN()
GMSH_AnalyseMeshQualityPlugin::_computeMinIGE
void _computeMinIGE(int dim)
GModel
Definition: GModel.h:44
data_elementMinMax::setMinS
void setMinS(double r)
Definition: AnalyseMeshQuality.h:28
GMSH_AnalyseMeshQualityPlugin::_computedIGE
bool _computedIGE[3]
Definition: AnalyseMeshQuality.h:53
GMSH_AnalyseMeshQualityPlugin::getNbOptions
int getNbOptions() const
MElement
Definition: MElement.h:30
data_elementMinMax::minI
double minI()
Definition: AnalyseMeshQuality.h:34
GMSH_AnalyseMeshQualityPlugin::_pviewICN
bool _pviewICN[3]
Definition: AnalyseMeshQuality.h:54
GMSH_AnalyseMeshQualityPlugin::_pviewIGE
bool _pviewIGE[3]
Definition: AnalyseMeshQuality.h:54
data_elementMinMax::_minJac
double _minJac
Definition: AnalyseMeshQuality.h:20
GMSH_AnalyseMeshQualityPlugin::getAuthor
std::string getAuthor() const
Definition: AnalyseMeshQuality.h:77
GMSH_AnalyseMeshQualityPlugin::_pviewJac
bool _pviewJac[3]
Definition: AnalyseMeshQuality.h:54
GMSH_AnalyseMeshQualityPlugin::GMSH_AnalyseMeshQualityPlugin
GMSH_AnalyseMeshQualityPlugin()
Definition: AnalyseMeshQuality.h:59
data_elementMinMax::minJ
double minJ()
Definition: AnalyseMeshQuality.h:31
GMSH_PostPlugin
Definition: Plugin.h:83
GMSH_AnalyseMeshQualityPlugin::getHelp
std::string getHelp() const
GMSH_AnalyseMeshQualityPlugin::_computedICN
bool _computedICN[3]
Definition: AnalyseMeshQuality.h:53
data_elementMinMax::maxJ
double maxJ()
Definition: AnalyseMeshQuality.h:32
GMSH_AnalyseMeshQualityPlugin::_computeMinMaxJandValidity
void _computeMinMaxJandValidity(int dim)
data_elementMinMax::_maxJac
double _maxJac
Definition: AnalyseMeshQuality.h:20
data_elementMinMax::element
MElement * element()
Definition: AnalyseMeshQuality.h:30
GMSH_AnalyseMeshQualityPlugin::getOption
StringXNumber * getOption(int)
data_elementMinMax::setMinI
void setMinI(double r)
Definition: AnalyseMeshQuality.h:29
GMSH_AnalyseMeshQualityPlugin::_m
GModel * _m
Definition: AnalyseMeshQuality.h:39
GMSH_AnalyseMeshQualityPlugin::_clear
void _clear(int askedDim)
GMSH_AnalyseMeshQualityPlugin::_computeMinICN
void _computeMinICN(int dim)
data_elementMinMax::minS
double minS()
Definition: AnalyseMeshQuality.h:33