gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
Field.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 FIELD_H
7 #define FIELD_H
8 
9 #include <string>
10 #include <map>
11 #include <vector>
12 #include <list>
13 #include "GmshConfig.h"
14 #include "Context.h"
15 #include "STensor3.h"
16 #include <fstream>
17 #include <string>
18 #include <string.h>
19 #include <sstream>
20 #include <algorithm>
21 
22 #if defined(HAVE_POST)
23 class PView;
24 #endif
25 
26 class Field;
27 class GEntity;
28 
29 typedef enum {
38 
40 private:
41  std::string _help;
42 
43 public:
44  virtual void run() = 0;
45  FieldCallback(const std::string &help) { _help = help; }
46  virtual ~FieldCallback(){};
47  virtual std::string getDescription() { return _help; }
48 };
49 
50 class FieldOption {
51 private:
52  std::string _help;
54 
55 protected:
56  bool *status;
57  inline void modified()
58  {
59  if(status) *status = true;
60  }
61 
62 public:
63  FieldOption(const std::string &help, bool *_status, bool deprecated)
64  : _help(help), _deprecated(deprecated), status(_status)
65  {
66  }
67  virtual ~FieldOption() {}
68  virtual FieldOptionType getType() = 0;
69  virtual void getTextRepresentation(std::string &v_str) = 0;
70  virtual std::string getDescription() { return _help; }
71  std::string getTypeName()
72  {
73  switch(getType()) {
74  case FIELD_OPTION_INT: return "integer";
75  case FIELD_OPTION_DOUBLE: return "float";
76  case FIELD_OPTION_BOOL: return "boolean";
77  case FIELD_OPTION_PATH: return "path";
78  case FIELD_OPTION_STRING: return "string";
79  case FIELD_OPTION_LIST: return "list";
80  case FIELD_OPTION_LIST_DOUBLE: return "list_double";
81  default: return "unknown";
82  }
83  }
84  virtual void numericalValue(double val) {}
85  virtual double numericalValue() const { return 0.; }
86  virtual const std::list<int> &list() const
87  {
88  static std::list<int> l;
89  return l;
90  }
91  virtual const std::list<double> &listdouble() const
92  {
93  static std::list<double> l;
94  return l;
95  }
96  virtual void list(std::list<int> value) {}
97  virtual void listdouble(std::list<double> value) {}
98  virtual std::string string() const { return ""; }
99  virtual void string(const std::string value) {}
100  bool isDeprecated() { return _deprecated; }
101 };
102 
103 class Field {
104 protected:
106 public:
107  Field() : _deprecated(false), updateNeeded(false) {}
108  virtual ~Field();
109  bool isDeprecated() { return _deprecated; }
110  virtual void update() {}
111  int id;
112  std::map<std::string, FieldOption *> options;
113  std::map<std::string, FieldCallback *> callbacks;
114  virtual int numComponents() const { return 1; }
115  virtual bool isotropic() const { return true; }
116  // isotropic
117  virtual double operator()(double x, double y, double z,
118  GEntity *ge = nullptr) = 0;
119  // vector value
120  virtual void operator()(double x, double y, double z, SVector3 &,
121  GEntity *ge = 0)
122  {
123  }
124  // anisotropic
125  virtual void operator()(double x, double y, double z, SMetric3 &,
126  GEntity *ge = nullptr)
127  {
128  }
130  virtual const char *getName() = 0;
131 #if defined(HAVE_POST)
132  void putOnView(PView *view, int comp = -1);
133 #endif
134  void putOnNewView(int viewTag = -1);
135  virtual std::string getDescription() { return ""; }
136  FieldOption *getOption(const std::string &optionName);
137 };
138 
140 public:
141  virtual ~FieldFactory() {}
142  virtual Field *operator()() = 0;
143 };
144 
145 class FieldManager : public std::map<int, Field *> {
146 private:
148  std::vector<int> _boundaryLayerFields;
149 
150 public:
151  std::map<std::string, FieldFactory *> mapTypeName;
152  void initialize();
153  void reset();
154  Field *get(int id);
155  Field *newField(int id, const std::string &type_name);
156  void deleteField(int id);
157  int newId();
158  int maxId();
159  FieldManager();
160  ~FieldManager();
161  // compatibility with -bgm
162  void setBackgroundMesh(int iView);
163  // set and get background field
164  void setBackgroundField(Field *BGF);
165  inline void setBackgroundFieldId(int id) { _backgroundField = id; };
166  inline void addBoundaryLayerFieldId(int id)
167  {
168  for(std::size_t i = 0; i < _boundaryLayerFields.size(); ++i) {
169  if(_boundaryLayerFields[i] == id) return;
170  }
171  _boundaryLayerFields.push_back(id);
172  }
173  inline void addBoundaryLayerFieldId(std::vector<int> &tags)
174  {
175  for(std::size_t i = 0; i < tags.size(); ++i)
177  }
178  inline int getBackgroundField() { return _backgroundField; }
180  {
181  return (int)_boundaryLayerFields.size();
182  }
183  inline int getBoundaryLayerField(int i) { return _boundaryLayerFields[i]; }
184 };
185 
186 // Boundary Layer Field (used both for anisotropic meshing and BL
187 // extrusion)
188 
189 class DistanceField;
190 
191 class BoundaryLayerField : public Field {
192 private:
193  std::list<DistanceField *> _attFields;
194  std::list<double> _hWallNNodes;
195  std::list<int> _pointTags, _curveTags;
197  std::list<int> _excludedSurfaceTags;
198  std::list<int> _fanSizes;
200  void operator()(DistanceField *cc, double dist, double x, double y, double z,
201  SMetric3 &metr, GEntity *ge);
202 
203 public:
208  virtual bool isotropic() const { return false; }
209  virtual const char *getName();
210  virtual std::string getDescription();
213  virtual double operator()(double x, double y, double z,
214  GEntity *ge = nullptr);
215  virtual void operator()(double x, double y, double z, SMetric3 &metr,
216  GEntity *ge = nullptr);
217  bool isEdgeBL(int iE) const
218  {
219  return std::find(_curveTags.begin(), _curveTags.end(), iE) !=
220  _curveTags.end();
221  }
222  bool isEdgeBLSaved(int iE) const
223  {
224  return std::find(_curveTagsSaved.begin(), _curveTagsSaved.end(), iE) !=
225  _curveTagsSaved.end();
226  }
227  bool isFanNode(int iV) const
228  {
229  return std::find(_fanPointTags.begin(), _fanPointTags.end(), iV) !=
230  _fanPointTags.end();
231  }
232  int fanSize(int iV)
233  {
234  if(_fanPointTags.size() != _fanSizes.size())
236  auto it1 = _fanPointTags.begin();
237  auto it2 = _fanSizes.begin();
238  for(; it1 != _fanPointTags.end(); ++it1, ++it2) {
239  if(*it1 == iV) return *it2;
240  }
241  return 0;
242  }
243 
244  bool isEndNode(int iV) const
245  {
246  return std::find(_pointTags.begin(), _pointTags.end(), iV) !=
247  _pointTags.end();
248  }
249  double hWall(int iV)
250  {
251  for(auto it = _hWallNNodes.begin(); it != _hWallNNodes.end(); ++it) {
252  int i = (int)*it;
253  ++it;
254  double h = *it;
255  if(i == iV) return h;
256  }
257  return hWallN;
258  }
259  void computeFor1dMesh(double x, double y, double z, SMetric3 &metr);
260  void setupFor1d(int iE);
261  bool setupFor2d(int iF);
262  void removeAttractors();
263 };
264 
266 public:
267  std::string &val;
269  FieldOptionString(std::string &_val, const std::string &help,
270  bool *status = nullptr, bool deprecated = false)
271  : FieldOption(help, status, deprecated), val(_val)
272  {
273  }
274  void string(const std::string value)
275  {
276  modified();
277  val = value;
278  }
279  std::string string() const { return val; }
280  void getTextRepresentation(std::string &v_str)
281  {
282  std::ostringstream sstream;
283  sstream << "\"" << val << "\"";
284  v_str = sstream.str();
285  }
286 };
287 
289 public:
290  double &val;
292  FieldOptionDouble(double &_val, const std::string &help,
293  bool *status = nullptr, bool deprecated = false)
294  : FieldOption(help, status, deprecated), val(_val)
295  {
296  }
297  double numericalValue() const { return val; }
298  void numericalValue(double v)
299  {
300  modified();
301  val = v;
302  }
303  void getTextRepresentation(std::string &v_str)
304  {
305  std::ostringstream sstream;
306  sstream.precision(16);
307  sstream << val;
308  v_str = sstream.str();
309  }
310 };
311 
312 class FieldOptionInt : public FieldOption {
313 public:
314  int &val;
316  FieldOptionInt(int &_val, const std::string &help, bool *status = nullptr,
317  bool deprecated = false)
318  : FieldOption(help, status, deprecated), val(_val)
319  {
320  }
321  double numericalValue() const { return val; }
322  void numericalValue(double v)
323  {
324  modified();
325  val = (int)v;
326  }
327  void getTextRepresentation(std::string &v_str)
328  {
329  std::ostringstream sstream;
330  sstream << val;
331  v_str = sstream.str();
332  }
333 };
334 
335 class FieldOptionList : public FieldOption {
336 public:
337  std::list<int> &val;
339  FieldOptionList(std::list<int> &_val, const std::string &help,
340  bool *status = nullptr, bool deprecated = false)
341  : FieldOption(help, status, deprecated), val(_val)
342  {
343  }
344  void list(std::list<int> value)
345  {
346  modified();
347  val = value;
348  }
349  const std::list<int> &list() const { return val; }
350  void getTextRepresentation(std::string &v_str)
351  {
352  std::ostringstream sstream;
353  sstream << "{";
354  for(auto it = val.begin(); it != val.end(); it++) {
355  if(it != val.begin()) sstream << ", ";
356  sstream << *it;
357  }
358  sstream << "}";
359  v_str = sstream.str();
360  }
361 };
362 
364 public:
365  std::list<double> &val;
367  FieldOptionListDouble(std::list<double> &_val, const std::string &help,
368  bool *status = nullptr, bool deprecated = false)
369  : FieldOption(help, status, deprecated), val(_val)
370  {
371  }
372  void listdouble(std::list<double> value)
373  {
374  modified();
375  val = value;
376  }
377  const std::list<double> &listdouble() const { return val; }
378  void getTextRepresentation(std::string &v_str)
379  {
380  std::ostringstream sstream;
381  sstream.precision(16);
382  sstream << "{";
383  for(auto it = val.begin(); it != val.end(); it++) {
384  if(it != val.begin()) sstream << ", ";
385  sstream << *it;
386  }
387  sstream << "}";
388  v_str = sstream.str();
389  }
390 };
391 
393 public:
395  FieldOptionPath(std::string &val, const std::string &help,
396  bool *status = nullptr, bool deprecated = false)
397  : FieldOptionString(val, help, status, deprecated)
398  {
399  }
400 };
401 
402 class FieldOptionBool : public FieldOption {
403 public:
404  bool &val;
406  FieldOptionBool(bool &_val, const std::string &help, bool *status = nullptr,
407  bool deprecated = false)
408  : FieldOption(help, status, deprecated), val(_val)
409  {
410  }
411  double numericalValue() const { return val; }
412  void numericalValue(double v)
413  {
414  modified();
415  val = v;
416  }
417  void getTextRepresentation(std::string &v_str)
418  {
419  std::ostringstream sstream;
420  sstream << val;
421  v_str = sstream.str();
422  }
423 };
424 
425 template <class t> class FieldCallbackGeneric : public FieldCallback {
426  t *_field;
427  void (t::*_callback)();
428 
429 public:
430  void run() { (_field->*_callback)(); }
431  FieldCallbackGeneric(t *field, void (t::*callback)(),
432  const std::string description)
433  : FieldCallback(description)
434  {
435  _field = field;
436  _callback = callback;
437  }
438 };
439 
440 template <class F> class FieldFactoryT : public FieldFactory {
441 public:
442  Field *operator()() { return new F; }
443 };
444 
445 // the class GenericField contains a set of void* functions, which give a mesh
446 // size All these functions are called when calling operator() ; then, the
447 // minimum size is returned.
448 class GenericField : public Field {
449 public:
450  // callback prototypes:
451  // this callback is called with a void* previously given to the GenericField !
452  typedef bool (*ptrfunction)(double, double, double, void *, double &);
453  // this callback also takes the GEntity object into account
454  typedef bool (*ptrfunctionextended)(double, double, double, void *, void *,
455  double &);
456 
457  GenericField();
458  ~GenericField();
459  using Field::operator();
460  virtual double operator()(double x, double y, double z,
461  GEntity *ge = nullptr);
462  virtual const char *getName() { return "GenericField"; };
463 
464  // sets the callbacks
465  void setCallbackWithData(ptrfunction fct, void *data);
466  void setCallbackWithData(ptrfunctionextended fct, void *data);
467 
468 private:
469  std::vector<std::pair<ptrfunction, void *> >
470  cbs_with_data; // the callbacks with the data to be sent to them
471  std::vector<std::pair<ptrfunctionextended, void *> >
472  cbs_extended_with_data; // the extended callbacks with the data to be sent
473  // to them
474 };
475 
476 #endif
FieldOption::isDeprecated
bool isDeprecated()
Definition: Field.h:100
FieldOption::modified
void modified()
Definition: Field.h:57
FieldOptionDouble::getTextRepresentation
void getTextRepresentation(std::string &v_str)
Definition: Field.h:303
FieldOptionBool::getTextRepresentation
void getTextRepresentation(std::string &v_str)
Definition: Field.h:417
FieldFactoryT
Definition: Field.h:440
BoundaryLayerField::_closestPoint
SPoint3 _closestPoint
Definition: Field.h:199
FieldOption::getDescription
virtual std::string getDescription()
Definition: Field.h:70
FieldOptionString::val
std::string & val
Definition: Field.h:267
BoundaryLayerField::isEdgeBLSaved
bool isEdgeBLSaved(int iE) const
Definition: Field.h:222
FieldOption::numericalValue
virtual void numericalValue(double val)
Definition: Field.h:84
tags
static std::map< SPoint2, unsigned int > tags
Definition: drawGraph2d.cpp:400
Field::~Field
virtual ~Field()
Definition: Field.cpp:51
PView
Definition: PView.h:27
BoundaryLayerField::currentClosest
DistanceField * currentClosest
Definition: Field.h:207
FieldOptionBool::FieldOptionBool
FieldOptionBool(bool &_val, const std::string &help, bool *status=nullptr, bool deprecated=false)
Definition: Field.h:406
FieldManager::reset
void reset()
Definition: Field.cpp:68
GenericField::ptrfunction
bool(* ptrfunction)(double, double, double, void *, double &)
Definition: Field.h:452
BoundaryLayerField::hFar
double hFar
Definition: Field.h:204
FieldCallback::_help
std::string _help
Definition: Field.h:41
Field::callbacks
std::map< std::string, FieldCallback * > callbacks
Definition: Field.h:113
GenericField::setCallbackWithData
void setCallbackWithData(ptrfunction fct, void *data)
Definition: Field.cpp:3317
SMetric3
Definition: STensor3.h:17
FieldOption::getTypeName
std::string getTypeName()
Definition: Field.h:71
FieldOption::getTextRepresentation
virtual void getTextRepresentation(std::string &v_str)=0
BoundaryLayerField::getName
virtual const char * getName()
Definition: Field.cpp:2759
FieldOption::_help
std::string _help
Definition: Field.h:52
Field::operator()
virtual void operator()(double x, double y, double z, SMetric3 &, GEntity *ge=nullptr)
Definition: Field.h:125
FieldOption::string
virtual std::string string() const
Definition: Field.h:98
FieldManager::_boundaryLayerFields
std::vector< int > _boundaryLayerFields
Definition: Field.h:148
F
#define F
Definition: DefaultOptions.h:23
FieldFactoryT::operator()
Field * operator()()
Definition: Field.h:442
FieldOptionBool::val
bool & val
Definition: Field.h:404
FieldCallback::FieldCallback
FieldCallback(const std::string &help)
Definition: Field.h:45
FieldOption::listdouble
virtual const std::list< double > & listdouble() const
Definition: Field.h:91
FieldOptionList::list
void list(std::list< int > value)
Definition: Field.h:344
FieldOptionString
Definition: Field.h:265
FieldFactory::~FieldFactory
virtual ~FieldFactory()
Definition: Field.h:141
GenericField
Definition: Field.h:448
BoundaryLayerField::~BoundaryLayerField
~BoundaryLayerField()
Definition: Field.h:212
BoundaryLayerField::_pointTagsSaved
std::list< int > _pointTagsSaved
Definition: Field.h:196
Field::isotropic
virtual bool isotropic() const
Definition: Field.h:115
SPoint3
Definition: SPoint3.h:14
FieldOptionInt::FieldOptionInt
FieldOptionInt(int &_val, const std::string &help, bool *status=nullptr, bool deprecated=false)
Definition: Field.h:316
Field::getDescription
virtual std::string getDescription()
Definition: Field.h:135
GenericField::~GenericField
~GenericField()
Definition: Field.cpp:3291
SVector3
Definition: SVector3.h:16
FieldOption::list
virtual const std::list< int > & list() const
Definition: Field.h:86
FieldCallbackGeneric::FieldCallbackGeneric
FieldCallbackGeneric(t *field, void(t::*callback)(), const std::string description)
Definition: Field.h:431
BoundaryLayerField::getDescription
virtual std::string getDescription()
Definition: Field.cpp:2761
FieldManager::~FieldManager
~FieldManager()
Definition: Field.cpp:3217
GenericField::operator()
virtual double operator()(double x, double y, double z, GEntity *ge=nullptr)
Definition: Field.cpp:3293
BoundaryLayerField::removeAttractors
void removeAttractors()
Definition: Field.cpp:2850
GenericField::cbs_with_data
std::vector< std::pair< ptrfunction, void * > > cbs_with_data
Definition: Field.h:470
FieldCallback::~FieldCallback
virtual ~FieldCallback()
Definition: Field.h:46
FieldCallbackGeneric
Definition: Field.h:425
FieldOption::list
virtual void list(std::list< int > value)
Definition: Field.h:96
FieldCallback::getDescription
virtual std::string getDescription()
Definition: Field.h:47
FieldOptionType
FieldOptionType
Definition: Field.h:29
FieldOption::numericalValue
virtual double numericalValue() const
Definition: Field.h:85
FIELD_OPTION_PATH
@ FIELD_OPTION_PATH
Definition: Field.h:33
Field::numComponents
virtual int numComponents() const
Definition: Field.h:114
FieldManager::addBoundaryLayerFieldId
void addBoundaryLayerFieldId(std::vector< int > &tags)
Definition: Field.h:173
BoundaryLayerField::computeFor1dMesh
void computeFor1dMesh(double x, double y, double z, SMetric3 &metr)
Definition: Field.cpp:2997
FieldOption::getType
virtual FieldOptionType getType()=0
BoundaryLayerField::_curveTagsSaved
std::list< int > _curveTagsSaved
Definition: Field.h:196
GenericField::getName
virtual const char * getName()
Definition: Field.h:462
GEntity
Definition: GEntity.h:31
FieldOptionBool::numericalValue
double numericalValue() const
Definition: Field.h:411
FieldOption::status
bool * status
Definition: Field.h:56
FieldOptionDouble::numericalValue
void numericalValue(double v)
Definition: Field.h:298
FieldOptionString::string
void string(const std::string value)
Definition: Field.h:274
FieldManager::_backgroundField
int _backgroundField
Definition: Field.h:147
FieldFactory::operator()
virtual Field * operator()()=0
BoundaryLayerField::_hWallNNodes
std::list< double > _hWallNNodes
Definition: Field.h:194
BoundaryLayerField::_curveTags
std::list< int > _curveTags
Definition: Field.h:195
BoundaryLayerField::_pointTags
std::list< int > _pointTags
Definition: Field.h:195
FieldOptionBool
Definition: Field.h:402
BoundaryLayerField::BoundaryLayerField
BoundaryLayerField()
Definition: Field.cpp:2766
FieldCallbackGeneric::run
void run()
Definition: Field.h:430
BoundaryLayerField::fanSize
int fanSize(int iV)
Definition: Field.h:232
FieldManager::initialize
void initialize()
Definition: Field.cpp:3211
BoundaryLayerField::_fanPointTags
std::list< int > _fanPointTags
Definition: Field.h:196
CTX::instance
static CTX * instance()
Definition: Context.cpp:122
BoundaryLayerField::setupFor1d
void setupFor1d(int iE)
Definition: Field.cpp:2857
Field::getOption
FieldOption * getOption(const std::string &optionName)
Definition: Field.cpp:58
FieldManager::deleteField
void deleteField(int id)
Definition: Field.cpp:118
Field::Field
Field()
Definition: Field.h:107
FIELD_OPTION_BOOL
@ FIELD_OPTION_BOOL
Definition: Field.h:34
FieldManager::setBackgroundFieldId
void setBackgroundFieldId(int id)
Definition: Field.h:165
FieldManager::newId
int newId()
Definition: Field.cpp:98
FieldOptionString::getType
virtual FieldOptionType getType()
Definition: Field.h:268
BoundaryLayerField::setupFor2d
bool setupFor2d(int iF)
Definition: Field.cpp:2893
FieldOptionList
Definition: Field.h:335
Field::operator()
virtual void operator()(double x, double y, double z, SVector3 &, GEntity *ge=0)
Definition: Field.h:120
FieldOptionDouble::val
double & val
Definition: Field.h:290
FieldOptionInt::numericalValue
double numericalValue() const
Definition: Field.h:321
FieldManager::get
Field * get(int id)
Definition: Field.cpp:74
BoundaryLayerField::nb_divisions
int nb_divisions
Definition: Field.h:206
FieldFactory
Definition: Field.h:139
FieldManager::mapTypeName
std::map< std::string, FieldFactory * > mapTypeName
Definition: Field.h:151
FieldOptionString::FieldOptionString
FieldOptionString(std::string &_val, const std::string &help, bool *status=nullptr, bool deprecated=false)
Definition: Field.h:269
FieldOption::FieldOption
FieldOption(const std::string &help, bool *_status, bool deprecated)
Definition: Field.h:63
BoundaryLayerField::thickness
double thickness
Definition: Field.h:204
FieldOptionInt::getTextRepresentation
void getTextRepresentation(std::string &v_str)
Definition: Field.h:327
BoundaryLayerField::_excludedSurfaceTags
std::list< int > _excludedSurfaceTags
Definition: Field.h:197
FieldOptionPath::getType
virtual FieldOptionType getType()
Definition: Field.h:394
FieldOption::~FieldOption
virtual ~FieldOption()
Definition: Field.h:67
FieldOptionInt
Definition: Field.h:312
FieldManager
Definition: Field.h:145
FIELD_OPTION_DOUBLE
@ FIELD_OPTION_DOUBLE
Definition: Field.h:30
FieldOptionList::getTextRepresentation
void getTextRepresentation(std::string &v_str)
Definition: Field.h:350
FieldCallback
Definition: Field.h:39
FieldOptionListDouble::FieldOptionListDouble
FieldOptionListDouble(std::list< double > &_val, const std::string &help, bool *status=nullptr, bool deprecated=false)
Definition: Field.h:367
FieldOptionDouble
Definition: Field.h:288
FieldOptionString::getTextRepresentation
void getTextRepresentation(std::string &v_str)
Definition: Field.h:280
FieldOptionListDouble::listdouble
const std::list< double > & listdouble() const
Definition: Field.h:377
FIELD_OPTION_LIST
@ FIELD_OPTION_LIST
Definition: Field.h:35
CTX::mesh
contextMeshOptions mesh
Definition: Context.h:313
FieldManager::maxId
int maxId()
Definition: Field.cpp:110
GenericField::ptrfunctionextended
bool(* ptrfunctionextended)(double, double, double, void *, void *, double &)
Definition: Field.h:454
BoundaryLayerField
Definition: Field.h:191
FieldOptionList::FieldOptionList
FieldOptionList(std::list< int > &_val, const std::string &help, bool *status=nullptr, bool deprecated=false)
Definition: Field.h:339
FieldOptionBool::getType
FieldOptionType getType()
Definition: Field.h:405
Field
Definition: Field.h:103
FieldManager::FieldManager
FieldManager()
Definition: Field.cpp:3170
BoundaryLayerField::iIntersect
int iIntersect
Definition: Field.h:206
FieldOptionBool::numericalValue
void numericalValue(double v)
Definition: Field.h:412
BoundaryLayerField::iRecombine
int iRecombine
Definition: Field.h:206
FieldManager::setBackgroundMesh
void setBackgroundMesh(int iView)
Definition: Field.cpp:3280
BoundaryLayerField::_attFields
std::list< DistanceField * > _attFields
Definition: Field.h:193
FieldOptionDouble::getType
FieldOptionType getType()
Definition: Field.h:291
BoundaryLayerField::isotropic
virtual bool isotropic() const
Definition: Field.h:208
GenericField::cbs_extended_with_data
std::vector< std::pair< ptrfunctionextended, void * > > cbs_extended_with_data
Definition: Field.h:472
FieldOptionPath
Definition: Field.h:392
FieldOption::_deprecated
bool _deprecated
Definition: Field.h:53
FieldOptionListDouble::getTextRepresentation
void getTextRepresentation(std::string &v_str)
Definition: Field.h:378
FIELD_OPTION_INT
@ FIELD_OPTION_INT
Definition: Field.h:31
FieldManager::getBackgroundField
int getBackgroundField()
Definition: Field.h:178
FieldCallbackGeneric::_callback
void(t::* _callback)()
Definition: Field.h:427
BoundaryLayerField::betaLaw
int betaLaw
Definition: Field.h:206
Field::getName
virtual const char * getName()=0
FieldOption::listdouble
virtual void listdouble(std::list< double > value)
Definition: Field.h:97
FieldManager::getBoundaryLayerField
int getBoundaryLayerField(int i)
Definition: Field.h:183
FieldOptionListDouble::listdouble
void listdouble(std::list< double > value)
Definition: Field.h:372
Context.h
FieldOptionListDouble::val
std::list< double > & val
Definition: Field.h:365
FieldOptionList::val
std::list< int > & val
Definition: Field.h:337
Field::_deprecated
bool _deprecated
Definition: Field.h:105
Field::options
std::map< std::string, FieldOption * > options
Definition: Field.h:112
BoundaryLayerField::hWall
double hWall(int iV)
Definition: Field.h:249
z
const double z
Definition: GaussQuadratureQuad.cpp:56
Field::id
int id
Definition: Field.h:111
FieldOptionInt::getType
FieldOptionType getType()
Definition: Field.h:315
BoundaryLayerField::isEndNode
bool isEndNode(int iV) const
Definition: Field.h:244
FieldCallbackGeneric::_field
t * _field
Definition: Field.h:426
BoundaryLayerField::isFanNode
bool isFanNode(int iV) const
Definition: Field.h:227
BoundaryLayerField::_fanSizes
std::list< int > _fanSizes
Definition: Field.h:198
Field::isDeprecated
bool isDeprecated()
Definition: Field.h:109
STensor3.h
FieldOptionDouble::numericalValue
double numericalValue() const
Definition: Field.h:297
FieldOption::string
virtual void string(const std::string value)
Definition: Field.h:99
Field::putOnNewView
void putOnNewView(int viewTag=-1)
Definition: Field.cpp:3231
FieldManager::addBoundaryLayerFieldId
void addBoundaryLayerFieldId(int id)
Definition: Field.h:166
FieldOptionListDouble::getType
FieldOptionType getType()
Definition: Field.h:366
Field::update
virtual void update()
Definition: Field.h:110
FieldManager::getNumBoundaryLayerFields
int getNumBoundaryLayerFields()
Definition: Field.h:179
Field::operator()
virtual double operator()(double x, double y, double z, GEntity *ge=nullptr)=0
FieldOptionList::getType
FieldOptionType getType()
Definition: Field.h:338
FIELD_OPTION_LIST_DOUBLE
@ FIELD_OPTION_LIST_DOUBLE
Definition: Field.h:36
BoundaryLayerField::currentDistance
double currentDistance
Definition: Field.h:205
FieldOptionInt::val
int & val
Definition: Field.h:314
FieldOptionListDouble
Definition: Field.h:363
FieldCallback::run
virtual void run()=0
FieldOptionString::string
std::string string() const
Definition: Field.h:279
FieldOptionList::list
const std::list< int > & list() const
Definition: Field.h:349
FieldManager::newField
Field * newField(int id, const std::string &type_name)
Definition: Field.cpp:81
BoundaryLayerField::operator()
void operator()(DistanceField *cc, double dist, double x, double y, double z, SMetric3 &metr, GEntity *ge)
Definition: Field.cpp:3033
FieldOptionDouble::FieldOptionDouble
FieldOptionDouble(double &_val, const std::string &help, bool *status=nullptr, bool deprecated=false)
Definition: Field.h:292
contextMeshOptions::boundaryLayerFanElements
int boundaryLayerFanElements
Definition: Context.h:45
BoundaryLayerField::ratio
double ratio
Definition: Field.h:204
FieldOptionInt::numericalValue
void numericalValue(double v)
Definition: Field.h:322
BoundaryLayerField::hWallN
double hWallN
Definition: Field.h:204
BoundaryLayerField::tgtAnisoRatio
double tgtAnisoRatio
Definition: Field.h:205
DistanceField
Definition: Field.cpp:2448
BoundaryLayerField::beta
double beta
Definition: Field.h:205
FieldOptionPath::FieldOptionPath
FieldOptionPath(std::string &val, const std::string &help, bool *status=nullptr, bool deprecated=false)
Definition: Field.h:395
BoundaryLayerField::isEdgeBL
bool isEdgeBL(int iE) const
Definition: Field.h:217
FieldManager::setBackgroundField
void setBackgroundField(Field *BGF)
Definition: Field.cpp:3224
FieldOption
Definition: Field.h:50
GenericField::GenericField
GenericField()
Definition: Field.cpp:3289
FIELD_OPTION_STRING
@ FIELD_OPTION_STRING
Definition: Field.h:32
Field::updateNeeded
bool updateNeeded
Definition: Field.h:129