gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
SElement.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 SELEMENT_H
7 #define SELEMENT_H
8 
9 #include "MElement.h"
10 #include "simpleFunction.h"
11 
12 // A solver element.
13 
14 // FIXME: this will change in the future (the base SElement should no
15 // contain anything except the MElement). More advanced solvers will
16 // derive and/or add containers for additional storage
17 
18 class SElement {
19 private:
20  // the underlying mesh element
22  // store discrete function space and other data here
23  // ...
25  // gradient of functions (possibly enriched)
26  void nodalFunctions(double u, double v, double w, double s[],
27  simpleFunction<double> *_enrichement);
28  void gradNodalFunctions(double u, double v, double w, double invjac[3][3],
29  double grad[][3],
30  simpleFunction<double> *_enrichment);
31 
32 public:
33  SElement(MElement *e) : _e(e) {}
34  ~SElement() {}
35  MElement *getMeshElement() const { return _e; }
37  {
38  _enrichement_s = f;
39  }
41  {
42  _enrichement_t = f;
43  }
45  {
46  return _enrichement_s;
47  }
49  {
50  return _enrichement_t;
51  }
52  int getNumNodalShapeFunctions() const;
53  inline MVertex *getVertex(int i) const
54  {
55  return _e->getParent() ? _e->getParent()->getVertex(i) : _e->getVertex(i);
56  }
57  int getNumNodalTestFunctions() const;
58  void nodalShapeFunctions(double u, double v, double w, double s[]);
59  void gradNodalShapeFunctions(double u, double v, double w,
60  double invjac[3][3], double grad[][3]);
61  void nodalTestFunctions(double u, double v, double w, double s[]);
62  void gradNodalTestFunctions(double u, double v, double w, double invjac[3][3],
63  double grad[][3]);
64 };
65 
66 #endif
SElement::_e
MElement * _e
Definition: SElement.h:21
SElement::gradNodalFunctions
void gradNodalFunctions(double u, double v, double w, double invjac[3][3], double grad[][3], simpleFunction< double > *_enrichment)
Definition: SElement.cpp:28
SElement::getNumNodalShapeFunctions
int getNumNodalShapeFunctions() const
Definition: SElement.cpp:101
MVertex
Definition: MVertex.h:24
LegendrePolynomials::f
void f(int n, double u, double *val)
Definition: orthogonalBasis.cpp:77
MElement::getParent
virtual MElement * getParent() const
Definition: MElement.h:231
SElement::setShapeEnrichement
static void setShapeEnrichement(simpleFunction< double > *f)
Definition: SElement.h:36
SElement::nodalTestFunctions
void nodalTestFunctions(double u, double v, double w, double s[])
Definition: SElement.cpp:96
SElement::SElement
SElement(MElement *e)
Definition: SElement.h:33
MElement::getVertex
virtual const MVertex * getVertex(int num) const =0
SElement::_enrichement_s
static simpleFunction< double > * _enrichement_s
Definition: SElement.h:24
simpleFunction< double >
SElement::_enrichement_t
static simpleFunction< double > * _enrichement_t
Definition: SElement.h:24
SElement::setTestEnrichement
static void setTestEnrichement(simpleFunction< double > *f)
Definition: SElement.h:40
SElement::nodalFunctions
void nodalFunctions(double u, double v, double w, double s[], simpleFunction< double > *_enrichement)
Definition: SElement.cpp:63
SElement::getVertex
MVertex * getVertex(int i) const
Definition: SElement.h:53
SElement::getShapeEnrichement
static const simpleFunction< double > * getShapeEnrichement()
Definition: SElement.h:44
SElement
Definition: SElement.h:18
SElement::getTestEnrichement
static const simpleFunction< double > * getTestEnrichement()
Definition: SElement.h:48
MElement
Definition: MElement.h:30
SElement::~SElement
~SElement()
Definition: SElement.h:34
SElement::getMeshElement
MElement * getMeshElement() const
Definition: SElement.h:35
SElement::gradNodalTestFunctions
void gradNodalTestFunctions(double u, double v, double w, double invjac[3][3], double grad[][3])
Definition: SElement.cpp:85
SElement::nodalShapeFunctions
void nodalShapeFunctions(double u, double v, double w, double s[])
Definition: SElement.cpp:91
simpleFunction.h
MElement.h
SElement::getNumNodalTestFunctions
int getNumNodalTestFunctions() const
Definition: SElement.cpp:107
SElement::gradNodalShapeFunctions
void gradNodalShapeFunctions(double u, double v, double w, double invjac[3][3], double grad[][3])
Definition: SElement.cpp:79