gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
HierarchicalBasisH1Tetra.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 // Contributed by Ismail Badia.
7 // Reference : "Higher-Order Finite Element Methods"; Pavel Solin, Karel
8 // Segeth ,
9 // Ivo Dolezel , Chapman and Hall/CRC; Edition : Har/Cdr (2003).
10 
11 #ifndef HIERARCHICAL_BASIS_H1_TETRA_H
12 #define HIERARCHICAL_BASIS_H1_TETRA_H
13 
14 #include "HierarchicalBasisH1.h"
15 
16 /*
17  * MTetrahedron
18  *
19  * v
20  * .
21  * ,/
22  * /
23  * 2
24  * ,/|`\
25  * ,/ | `\
26  * ,/ '. `\
27  * ,/ | `\
28  * ,/ | `\
29  * 0-----------'.--------1 --> u
30  * `\. | ,/
31  * `\. | ,/
32  * `\. '. ,/
33  * `\. |/
34  * `3
35  * `\.
36  * ` w
37  *
38  *
39  * Oriented Edges:
40  * e0={0, 1}, e1={1, 2}, e2={2, 0}, e3={0, 3}, e4={2, 3}, e5={1, 3}
41  *
42  *
43  * Oritented Surface:
44  * s0={0, 1, 2}, s1={0, 1, 3}, s2={0, 2, 3}, s3={1, 2, 3}
45  * Local (directional) orders on mesh faces are not allowed to exceed the mini-
46  * mum of the (appropriate directional) orders of approximation associated with
47  * the interior of the adjacent elements. Local orders of approximation on mesh
48  * edges are limited by the minimum of all (appropriate directional) orders cor-
49  * responding to faces sharing that edge
50  */
52 public:
53  HierarchicalBasisH1Tetra(int order);
54  virtual ~HierarchicalBasisH1Tetra();
55  virtual unsigned int getNumberOfOrientations() const;
56  // vertexBasis=[v0,...,v3]
57  // edgeBasis=[phie0_{2},...phie0_{pe0-1},phie1_{2},...phie1_{pe1-1}...]
58  // faceBasis=[phif0_{1,1},...,phif0_{1,pF0-2},phif0_{2,1}...,phif0_{2,pF0-3},...,phief0_{pF-2,1},phif1_{1,1}...]
59  // bubbleBasis=[phieb_{1,1,1},...,phieb_{1,1,pb-3},...] n1+n2+n3<=pb-1
60  virtual void generateBasis(double const &u, double const &v, double const &w,
61  std::vector<double> &vertexBasis,
62  std::vector<double> &edgeBasis,
63  std::vector<double> &faceBasis,
64  std::vector<double> &bubbleBasis);
65 
66  virtual void generateBasis(double const &u, double const &v, double const &w,
67  std::vector<std::vector<double> > &vertexBasis,
68  std::vector<std::vector<double> > &edgeBasis,
69  std::vector<std::vector<double> > &faceBasis,
70  std::vector<std::vector<double> > &bubbleBasis,
71  std::string typeFunction = "GradH1Legendre")
72  {
73  generateGradientBasis(u, v, w, vertexBasis, edgeBasis, faceBasis,
74  bubbleBasis);
75  }
76 
77  virtual void orientEdge(int const &flagOrientation, int const &edgeNumber,
78  std::vector<double> &edgeFunctions,
79  const std::vector<double> &eTablePositiveFlag,
80  const std::vector<double> &eTableNegativeFlag);
81 
82  virtual void
83  orientEdge(int const &flagOrientation, int const &edgeNumber,
84  std::vector<std::vector<double> > &edgeBasis,
85  const std::vector<std::vector<double> > &eTablePositiveFlag,
86  const std::vector<std::vector<double> > &eTableNegativeFlag);
87 
88  virtual void
89  orientEdgeFunctionsForNegativeFlag(std::vector<double> &edgeFunctions);
91  std::vector<std::vector<double> > &edgeFunctions);
92  virtual void
93  orientFace(int const &flag1, int const &flag2, int const &flag3,
94  int const &faceNumber,
95  const std::vector<double> &quadFaceFunctionsAllOrientation,
96  const std::vector<double> &triFaceFunctionsAllOrientation,
97  std::vector<double> &fTableCopy);
98  virtual void orientFace(
99  int const &flag1, int const &flag2, int const &flag3, int const &faceNumber,
100  const std::vector<std::vector<double> > &quadFaceFunctionsAllOrientation,
101  const std::vector<std::vector<double> > &triFaceFunctionsAllOrientation,
102  std::vector<std::vector<double> > &fTableCopy);
103  virtual void getKeysInfo(std::vector<int> &functionTypeInfo,
104  std::vector<int> &orderInfo);
105 
106 private:
107  int _pb; // bubble function order
108  int _pOrderEdge[6]; // Edge functions order (pOrderEdge[0] matches the order
109  // of the edge 0)
110  int _pOrderFace[4]; // Face functions order in direction
111  static double
112  _affineCoordinate(const int &j, const double &u, const double &v,
113  const double &w); // affine coordinate lambdaj j=1..4
114 
115  void generateGradientBasis(double const &u, double const &v, double const &w,
116  std::vector<std::vector<double> > &gradientVertex,
117  std::vector<std::vector<double> > &gradientEdge,
118  std::vector<std::vector<double> > &gradientFace,
119  std::vector<std::vector<double> > &gradientBubble);
120  virtual void orientOneFace(double const &u, double const &v, double const &w,
121  int const &flag1, int const &flag2,
122  int const &flag3, int const &faceNumber,
123  std::vector<double> &faceBasis);
124  virtual void orientOneFace(double const &u, double const &v, double const &w,
125  int const &flag1, int const &flag2,
126  int const &flag3, int const &faceNumber,
127  std::vector<std::vector<double> > &faceFunctions,
128  std::string typeFunction = "GradH1Legendre");
129 };
130 
131 #endif
HierarchicalBasisH1Tetra::_affineCoordinate
static double _affineCoordinate(const int &j, const double &u, const double &v, const double &w)
Definition: HierarchicalBasisH1Tetra.cpp:37
HierarchicalBasisH1Tetra::getKeysInfo
virtual void getKeysInfo(std::vector< int > &functionTypeInfo, std::vector< int > &orderInfo)
Definition: HierarchicalBasisH1Tetra.cpp:777
HierarchicalBasisH1
Definition: HierarchicalBasisH1.h:14
HierarchicalBasisH1Tetra::orientOneFace
virtual void orientOneFace(double const &u, double const &v, double const &w, int const &flag1, int const &flag2, int const &flag3, int const &faceNumber, std::vector< double > &faceBasis)
Definition: HierarchicalBasisH1Tetra.cpp:280
HierarchicalBasisH1Tetra::generateBasis
virtual void generateBasis(double const &u, double const &v, double const &w, std::vector< std::vector< double > > &vertexBasis, std::vector< std::vector< double > > &edgeBasis, std::vector< std::vector< double > > &faceBasis, std::vector< std::vector< double > > &bubbleBasis, std::string typeFunction="GradH1Legendre")
Definition: HierarchicalBasisH1Tetra.h:66
HierarchicalBasisH1Tetra::getNumberOfOrientations
virtual unsigned int getNumberOfOrientations() const
Definition: HierarchicalBasisH1Tetra.cpp:32
HierarchicalBasisH1Tetra::generateBasis
virtual void generateBasis(double const &u, double const &v, double const &w, std::vector< double > &vertexBasis, std::vector< double > &edgeBasis, std::vector< double > &faceBasis, std::vector< double > &bubbleBasis)
Definition: HierarchicalBasisH1Tetra.cpp:51
HierarchicalBasisH1Tetra::orientFace
virtual void orientFace(int const &flag1, int const &flag2, int const &flag3, int const &faceNumber, const std::vector< double > &quadFaceFunctionsAllOrientation, const std::vector< double > &triFaceFunctionsAllOrientation, std::vector< double > &fTableCopy)
Definition: HierarchicalBasisH1Tetra.cpp:736
HierarchicalBasisH1Tetra::HierarchicalBasisH1Tetra
HierarchicalBasisH1Tetra(int order)
Definition: HierarchicalBasisH1Tetra.cpp:14
HierarchicalBasisH1Tetra::orientEdge
virtual void orientEdge(int const &flagOrientation, int const &edgeNumber, std::vector< double > &edgeFunctions, const std::vector< double > &eTablePositiveFlag, const std::vector< double > &eTableNegativeFlag)
Definition: HierarchicalBasisH1Tetra.cpp:182
HierarchicalBasisH1Tetra::_pOrderEdge
int _pOrderEdge[6]
Definition: HierarchicalBasisH1Tetra.h:108
HierarchicalBasisH1Tetra::_pb
int _pb
Definition: HierarchicalBasisH1Tetra.h:107
HierarchicalBasisH1Tetra::generateGradientBasis
void generateGradientBasis(double const &u, double const &v, double const &w, std::vector< std::vector< double > > &gradientVertex, std::vector< std::vector< double > > &gradientEdge, std::vector< std::vector< double > > &gradientFace, std::vector< std::vector< double > > &gradientBubble)
Definition: HierarchicalBasisH1Tetra.cpp:513
HierarchicalBasisH1.h
HierarchicalBasisH1Tetra::_pOrderFace
int _pOrderFace[4]
Definition: HierarchicalBasisH1Tetra.h:110
HierarchicalBasisH1Tetra::orientEdgeFunctionsForNegativeFlag
virtual void orientEdgeFunctionsForNegativeFlag(std::vector< double > &edgeFunctions)
Definition: HierarchicalBasisH1Tetra.cpp:241
HierarchicalBasisH1Tetra
Definition: HierarchicalBasisH1Tetra.h:51
HierarchicalBasisH1Tetra::~HierarchicalBasisH1Tetra
virtual ~HierarchicalBasisH1Tetra()
Definition: HierarchicalBasisH1Tetra.cpp:30