gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
HierarchicalBasisH1Tria.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_TRIA_H
12 #define HIERARCHICAL_BASIS_H1_TRIA_H
13 
14 #include "HierarchicalBasisH1.h"
15 
16 /*
17  * MTriangle
18  *
19  * v
20  * ^
21  * |
22  * 2
23  * |`\
24  * | `\
25  * | `\
26  * | `\
27  * v `\
28  * 0---------->1 --> u
29  *
30  *
31  * Oriented Edges:
32  * e0={v0;v1} e1={v1;v2} e2={v2;v0}
33  * pe0,pe1,pe2<=pf
34  *
35  */
37 public:
38  HierarchicalBasisH1Tria(int pf, int pe0, int pe1, int pe2);
39  HierarchicalBasisH1Tria(int order);
40  virtual ~HierarchicalBasisH1Tria();
41  virtual unsigned int getNumberOfOrientations() const;
42  // vertexBasis=[v0,...,v2]
43  // edgeBasis=[phie0_{2},...phie0_{pe0-1},phie1_{2},...phie1_{pe1-1}...]
44  // faceBasis=[phief_{1,1},...,phief_{1,pf-2},phief_{2,1},...,phief_{2,pf2-3},phief_{1,1}...]
45  virtual void generateBasis(double const &u, double const &v, double const &w,
46  std::vector<double> &vertexBasis,
47  std::vector<double> &edgeBasis,
48  std::vector<double> &faceBasis,
49  std::vector<double> &bubbleBasis);
50 
51  virtual void generateBasis(double const &u, double const &v, double const &w,
52  std::vector<std::vector<double> > &vertexBasis,
53  std::vector<std::vector<double> > &edgeBasis,
54  std::vector<std::vector<double> > &faceBasis,
55  std::vector<std::vector<double> > &bubbleBasis,
56  std::string typeFunction = "GradH1Legendre")
57  {
58  generateGradientBasis(u, v, w, vertexBasis, edgeBasis, faceBasis,
59  bubbleBasis);
60  }
61 
62  virtual void orientEdge(int const &flagOrientation, int const &edgeNumber,
63  std::vector<double> &edgeFunctions,
64  const std::vector<double> &eTablePositiveFlag,
65  const std::vector<double> &eTableNegativeFlag);
66  virtual void
67  orientEdge(int const &flagOrientation, int const &edgeNumber,
68  std::vector<std::vector<double> > &edgeBasis,
69  const std::vector<std::vector<double> > &eTablePositiveFlag,
70  const std::vector<std::vector<double> > &eTableNegativeFlag);
71 
72  virtual void
73  orientEdgeFunctionsForNegativeFlag(std::vector<double> &edgeFunctions);
75  std::vector<std::vector<double> > &edgeFunctions);
76  virtual void
77  orientFace(int const &flag1, int const &flag2, int const &flag3,
78  int const &faceNumber,
79  const std::vector<double> &quadFaceFunctionsAllOrientation,
80  const std::vector<double> &triFaceFunctionsAllOrientation,
81  std::vector<double> &fTableCopy);
82  virtual void orientFace(
83  int const &flag1, int const &flag2, int const &flag3, int const &faceNumber,
84  const std::vector<std::vector<double> > &quadFaceFunctionsAllOrientation,
85  const std::vector<std::vector<double> > &triFaceFunctionsAllOrientation,
86  std::vector<std::vector<double> > &fTableCopy);
87 
88  virtual void getKeysInfo(std::vector<int> &functionTypeInfo,
89  std::vector<int> &orderInfo);
90 
91 private:
92  int _pf; // face function order
93  int _pOrderEdge[3]; // Edge functions order (pOrderEdge[0] matches the edge 0
94  // order)
95  static double
96  _affineCoordinate(int const &j, double const &u,
97  double const &v); // affine coordinate lambdaj j=1..3
98 
99  void generateGradientBasis(double const &u, double const &v, double const &w,
100  std::vector<std::vector<double> > &gradientVertex,
101  std::vector<std::vector<double> > &gradientEdge,
102  std::vector<std::vector<double> > &gradientFace,
103  std::vector<std::vector<double> > &gradientBubble);
104 
105  virtual void orientOneFace(double const &u, double const &v, double const &w,
106  int const &flag1, int const &flag2,
107  int const &flag3, int const &faceNumber,
108  std::vector<double> &faceBasis);
109  virtual void orientOneFace(double const &u, double const &v, double const &w,
110  int const &flag1, int const &flag2,
111  int const &flag3, int const &faceNumber,
112  std::vector<std::vector<double> > &faceFunctions,
113  std::string typeFunction = "GradH1Legendre");
114 };
115 
116 #endif
HierarchicalBasisH1Tria::_pf
int _pf
Definition: HierarchicalBasisH1Tria.h:92
HierarchicalBasisH1
Definition: HierarchicalBasisH1.h:14
HierarchicalBasisH1Tria::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: HierarchicalBasisH1Tria.cpp:149
HierarchicalBasisH1Tria::orientEdgeFunctionsForNegativeFlag
virtual void orientEdgeFunctionsForNegativeFlag(std::vector< double > &edgeFunctions)
Definition: HierarchicalBasisH1Tria.cpp:358
HierarchicalBasisH1Tria::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: HierarchicalBasisH1Tria.cpp:69
HierarchicalBasisH1Tria::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: HierarchicalBasisH1Tria.cpp:301
HierarchicalBasisH1Tria::getNumberOfOrientations
virtual unsigned int getNumberOfOrientations() const
Definition: HierarchicalBasisH1Tria.cpp:53
HierarchicalBasisH1Tria::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: HierarchicalBasisH1Tria.cpp:397
HierarchicalBasisH1Tria::_pOrderEdge
int _pOrderEdge[3]
Definition: HierarchicalBasisH1Tria.h:93
HierarchicalBasisH1Tria::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: HierarchicalBasisH1Tria.cpp:557
HierarchicalBasisH1Tria
Definition: HierarchicalBasisH1Tria.h:36
HierarchicalBasisH1Tria::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: HierarchicalBasisH1Tria.h:51
pe2
const double pe2
Definition: GaussQuadratureQuad.cpp:76
HierarchicalBasisH1Tria::HierarchicalBasisH1Tria
HierarchicalBasisH1Tria(int pf, int pe0, int pe1, int pe2)
Definition: HierarchicalBasisH1Tria.cpp:14
HierarchicalBasisH1Tria::~HierarchicalBasisH1Tria
virtual ~HierarchicalBasisH1Tria()
Definition: HierarchicalBasisH1Tria.cpp:51
HierarchicalBasisH1.h
HierarchicalBasisH1Tria::_affineCoordinate
static double _affineCoordinate(int const &j, double const &u, double const &v)
Definition: HierarchicalBasisH1Tria.cpp:58
HierarchicalBasisH1Tria::getKeysInfo
virtual void getKeysInfo(std::vector< int > &functionTypeInfo, std::vector< int > &orderInfo)
Definition: HierarchicalBasisH1Tria.cpp:584