gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
HierarchicalBasisH1Quad.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_QUAD_H
12 #define HIERARCHICAL_BASIS_H1_QUAD_H
13 
14 #include "HierarchicalBasisH1.h"
15 
16 /*
17  *
18  * v
19  * ^
20  * |+1
21  * ---------->2
22  * ^ | ^
23  * | | |
24  * -1| +---- |+1 --> u
25  * | |
26  * | |
27  * 0---------->1
28  * -1
29  *
30  * Oriented Edges:
31  * e0={v0;v1} e1={v1;v2} e2={v3;v2} e3={v0;v3}
32  * pe3,pe1<=pf2 pe0,pe2<=pf1
33  *
34  */
36 public:
37  HierarchicalBasisH1Quad(int pf1, int pf2, int pe0, int pe1, int pe2, int pe3);
38  HierarchicalBasisH1Quad(int order);
39  virtual ~HierarchicalBasisH1Quad();
40  virtual unsigned int getNumberOfOrientations() const;
41  // vertexBasis=[v0,...,v3]
42  // edgeBasis=[phie0_{2},...phie0_{pe0-1},phie1_{2},...phie1_{pe1-1}...]
43  // faceBasis=[phief_{2,2},...,phief_{2,pf2},phief_{3,2},...,phief_{3,pf2},...,phief_{pf1,2},...,phief_{pf1,pf2}]
44  virtual void generateBasis(double const &u, double const &v, double const &w,
45  std::vector<double> &vertexBasis,
46  std::vector<double> &edgeBasis,
47  std::vector<double> &faceBasis,
48  std::vector<double> &bubbleBasis);
49 
50  virtual void generateBasis(double const &u, double const &v, double const &w,
51  std::vector<std::vector<double> > &vertexBasis,
52  std::vector<std::vector<double> > &edgeBasis,
53  std::vector<std::vector<double> > &faceBasis,
54  std::vector<std::vector<double> > &bubbleBasis,
55  std::string typeFunction = "GradH1Legendre")
56  {
57  generateGradientBasis(u, v, w, vertexBasis, edgeBasis, faceBasis,
58  bubbleBasis);
59  }
60 
61  virtual void orientEdge(int const &flagOrientation, int const &edgeNumber,
62  std::vector<double> &edgeFunctions,
63  const std::vector<double> &eTablePositiveFlag,
64  const std::vector<double> &eTableNegativeFlag);
65  virtual void
66  orientEdge(int const &flagOrientation, int const &edgeNumber,
67  std::vector<std::vector<double> > &edgeBasis,
68  const std::vector<std::vector<double> > &eTablePositiveFlag,
69  const std::vector<std::vector<double> > &eTableNegativeFlag);
70 
71  virtual void
72  orientEdgeFunctionsForNegativeFlag(std::vector<double> &edgeFunctions);
74  std::vector<std::vector<double> > &edgeFunctions);
75  virtual void
76  orientFace(int const &flag1, int const &flag2, int const &flag3,
77  int const &faceNumber,
78  const std::vector<double> &quadFaceFunctionsAllOrientation,
79  const std::vector<double> &triFaceFunctionsAllOrientation,
80  std::vector<double> &fTableCopy);
81  virtual void orientFace(
82  int const &flag1, int const &flag2, int const &flag3, int const &faceNumber,
83  const std::vector<std::vector<double> > &quadFaceFunctionsAllOrientation,
84  const std::vector<std::vector<double> > &triFaceFunctionsAllOrientation,
85  std::vector<std::vector<double> > &fTableCopy);
86 
87  virtual void getKeysInfo(std::vector<int> &functionTypeInfo,
88  std::vector<int> &orderInfo);
89 
90 private:
91  int _pf1; // face function order in direction u
92  int _pf2; // face function order in direction v
93  int _pOrderEdge[4]; // 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..4
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
HierarchicalBasisH1Quad::_pf2
int _pf2
Definition: HierarchicalBasisH1Quad.h:92
HierarchicalBasisH1Quad::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: HierarchicalBasisH1Quad.cpp:209
HierarchicalBasisH1Quad::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: HierarchicalBasisH1Quad.cpp:480
HierarchicalBasisH1Quad::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: HierarchicalBasisH1Quad.h:50
HierarchicalBasisH1Quad::_pOrderEdge
int _pOrderEdge[4]
Definition: HierarchicalBasisH1Quad.h:93
HierarchicalBasisH1Quad::orientEdgeFunctionsForNegativeFlag
virtual void orientEdgeFunctionsForNegativeFlag(std::vector< double > &edgeFunctions)
Definition: HierarchicalBasisH1Quad.cpp:441
HierarchicalBasisH1
Definition: HierarchicalBasisH1.h:14
HierarchicalBasisH1Quad
Definition: HierarchicalBasisH1Quad.h:35
HierarchicalBasisH1Quad::HierarchicalBasisH1Quad
HierarchicalBasisH1Quad(int pf1, int pf2, int pe0, int pe1, int pe2, int pe3)
Definition: HierarchicalBasisH1Quad.cpp:11
pe2
const double pe2
Definition: GaussQuadratureQuad.cpp:76
HierarchicalBasisH1Quad::getNumberOfOrientations
virtual unsigned int getNumberOfOrientations() const
Definition: HierarchicalBasisH1Quad.cpp:59
HierarchicalBasisH1Quad::~HierarchicalBasisH1Quad
virtual ~HierarchicalBasisH1Quad()
Definition: HierarchicalBasisH1Quad.cpp:57
HierarchicalBasisH1Quad::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: HierarchicalBasisH1Quad.cpp:76
HierarchicalBasisH1Quad::_affineCoordinate
static double _affineCoordinate(int const &j, double const &u, double const &v)
Definition: HierarchicalBasisH1Quad.cpp:64
pf2
const double pf2
Definition: GaussQuadratureQuad.cpp:77
HierarchicalBasisH1Quad::getKeysInfo
virtual void getKeysInfo(std::vector< int > &functionTypeInfo, std::vector< int > &orderInfo)
Definition: HierarchicalBasisH1Quad.cpp:606
HierarchicalBasisH1.h
HierarchicalBasisH1Quad::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: HierarchicalBasisH1Quad.cpp:578
HierarchicalBasisH1Quad::_pf1
int _pf1
Definition: HierarchicalBasisH1Quad.h:91
HierarchicalBasisH1Quad::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: HierarchicalBasisH1Quad.cpp:383