gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
HierarchicalBasisH1Pri.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 #ifndef HIERARCHICAL_BASIS_H1_PRI_H
11 #define HIERARCHICAL_BASIS_H1_PRI_H
12 #include "HierarchicalBasisH1.h"
13 
51 public:
52  HierarchicalBasisH1Pri(int order);
53  virtual ~HierarchicalBasisH1Pri();
54  virtual unsigned int getNumberOfOrientations() const;
55  // vertexBasis=[v0,...,v5]
56  // edgeBasis=[phie0_{2},...phie0_{pe0-1},phie1_{2},...phie1_{pe1-1}...]
57  // faceBasis=[\Quad
58  // Face\phif2_{2,2},...,phif2_{2,pF2_2},...,phif2_{pF2_1,2},...,phief2_{pF2_1,pF2_2},phif3_{2,2}...,
59  //\TriFace\phif0_{1,1},...,phif0_{1,pF0-2},phif0_{2,1}...,phif0_{2,pF0-3},...,phief0_{pF-2,1},phif1_{1,1}...]
60  //
61  // bubbleBasis=[phieb_{1,1,1},...] 1<=n1,n2;n1+n2<=pb1-1; 2<=n3<pb2
62  virtual void generateBasis(double const &u, double const &v, double const &w,
63  std::vector<double> &vertexBasis,
64  std::vector<double> &edgeBasis,
65  std::vector<double> &faceBasis,
66  std::vector<double> &bubbleBasis);
67 
68  virtual void generateBasis(double const &u, double const &v, double const &w,
69  std::vector<std::vector<double> > &vertexBasis,
70  std::vector<std::vector<double> > &edgeBasis,
71  std::vector<std::vector<double> > &faceBasis,
72  std::vector<std::vector<double> > &bubbleBasis,
73  std::string typeFunction = "GradH1Legendre")
74  {
75  generateGradientBasis(u, v, w, vertexBasis, edgeBasis, faceBasis,
76  bubbleBasis);
77  }
78 
79  virtual void orientEdge(int const &flagOrientation, int const &edgeNumber,
80  std::vector<double> &edgeFunctions,
81  const std::vector<double> &eTablePositiveFlag,
82  const std::vector<double> &eTableNegativeFlag);
83 
84  virtual void
85  orientEdge(int const &flagOrientation, int const &edgeNumber,
86  std::vector<std::vector<double> > &edgeBasis,
87  const std::vector<std::vector<double> > &eTablePositiveFlag,
88  const std::vector<std::vector<double> > &eTableNegativeFlag);
89  virtual void
90  orientEdgeFunctionsForNegativeFlag(std::vector<double> &edgeFunctions);
92  std::vector<std::vector<double> > &edgeFunctions);
93  virtual void
94  orientFace(int const &flag1, int const &flag2, int const &flag3,
95  int const &faceNumber,
96  const std::vector<double> &quadFaceFunctionsAllOrientation,
97  const std::vector<double> &triFaceFunctionsAllOrientation,
98  std::vector<double> &fTableCopy);
99  virtual void orientFace(
100  int const &flag1, int const &flag2, int const &flag3, int const &faceNumber,
101  const std::vector<std::vector<double> > &quadFaceFunctionsAllOrientation,
102  const std::vector<std::vector<double> > &triFaceFunctionsAllOrientation,
103  std::vector<std::vector<double> > &fTableCopy);
104  virtual void getKeysInfo(std::vector<int> &functionTypeInfo,
105  std::vector<int> &orderInfo);
106 
107 private:
108  int _pb1; // bubble function order in direction uv
109  int _pb2; // bubble function order in direction w
110  int _pOrderEdge[9]; // Edge functions order (pOrderEdge[0] matches the order
111  // of the edge 0)
112  int _pOrderQuadFace1[3]; // Quad Face functions order in direction u
113  // (pOrderFace1[0] matches the order of face 0 in
114  // direction u)
115  int _pOrderQuadFace2[3]; // Quad Face functions order in direction v
116  // (pOrderFace[0] matches the order of face 0 in
117  // direction v)
118  int _pOrderTriFace[2]; // Tri Face Functions order
119  static double
120  _affineCoordinate(const int &j, const double &u, const double &v,
121  const double &w); // affine coordinate lambda j=1..5
122  void generateGradientBasis(double const &u, double const &v, double const &w,
123  std::vector<std::vector<double> > &gradientVertex,
124  std::vector<std::vector<double> > &gradientEdge,
125  std::vector<std::vector<double> > &gradientFace,
126  std::vector<std::vector<double> > &gradientBubble);
127  virtual void orientOneFace(double const &u, double const &v, double const &w,
128  int const &flag1, int const &flag2,
129  int const &flag3, int const &faceNumber,
130  std::vector<double> &faceBasis);
131  virtual void orientOneFace(double const &u, double const &v, double const &w,
132  int const &flag1, int const &flag2,
133  int const &flag3, int const &faceNumber,
134  std::vector<std::vector<double> > &faceFunctions,
135  std::string typeFunction = "GradH1Legendre");
136 };
137 #endif
HierarchicalBasisH1Pri::_pOrderTriFace
int _pOrderTriFace[2]
Definition: HierarchicalBasisH1Pri.h:118
HierarchicalBasisH1Pri::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: HierarchicalBasisH1Pri.cpp:58
HierarchicalBasisH1Pri::_pOrderQuadFace2
int _pOrderQuadFace2[3]
Definition: HierarchicalBasisH1Pri.h:115
HierarchicalBasisH1Pri::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: HierarchicalBasisH1Pri.h:68
HierarchicalBasisH1Pri::_affineCoordinate
static double _affineCoordinate(const int &j, const double &u, const double &v, const double &w)
Definition: HierarchicalBasisH1Pri.cpp:45
HierarchicalBasisH1Pri::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: HierarchicalBasisH1Pri.cpp:214
HierarchicalBasisH1Pri
Definition: HierarchicalBasisH1Pri.h:50
HierarchicalBasisH1Pri::~HierarchicalBasisH1Pri
virtual ~HierarchicalBasisH1Pri()
Definition: HierarchicalBasisH1Pri.cpp:38
HierarchicalBasisH1
Definition: HierarchicalBasisH1.h:14
HierarchicalBasisH1Pri::_pOrderEdge
int _pOrderEdge[9]
Definition: HierarchicalBasisH1Pri.h:110
HierarchicalBasisH1Pri::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: HierarchicalBasisH1Pri.cpp:1029
HierarchicalBasisH1Pri::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: HierarchicalBasisH1Pri.cpp:516
HierarchicalBasisH1Pri::HierarchicalBasisH1Pri
HierarchicalBasisH1Pri(int order)
Definition: HierarchicalBasisH1Pri.cpp:14
HierarchicalBasisH1Pri::_pOrderQuadFace1
int _pOrderQuadFace1[3]
Definition: HierarchicalBasisH1Pri.h:112
HierarchicalBasisH1Pri::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: HierarchicalBasisH1Pri.cpp:614
HierarchicalBasisH1Pri::_pb2
int _pb2
Definition: HierarchicalBasisH1Pri.h:109
HierarchicalBasisH1Pri::getKeysInfo
virtual void getKeysInfo(std::vector< int > &functionTypeInfo, std::vector< int > &orderInfo)
Definition: HierarchicalBasisH1Pri.cpp:1107
HierarchicalBasisH1Pri::_pb1
int _pb1
Definition: HierarchicalBasisH1Pri.h:108
HierarchicalBasisH1.h
HierarchicalBasisH1Pri::orientEdgeFunctionsForNegativeFlag
virtual void orientEdgeFunctionsForNegativeFlag(std::vector< double > &edgeFunctions)
Definition: HierarchicalBasisH1Pri.cpp:575
HierarchicalBasisH1Pri::getNumberOfOrientations
virtual unsigned int getNumberOfOrientations() const
Definition: HierarchicalBasisH1Pri.cpp:40