gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
HierarchicalBasisHcurlLine.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 
8 // Reference : "Higher-Order Finite Element Methods"; Pavel Solin, Karel
9 // Segeth, Ivo Dolezel , Chapman and Hall/CRC; Edition : Har/Cdr (2003).
10 
11 #ifndef HIERARCHICAL_BASIS_HCURL_LINE_H
12 #define HIERARCHICAL_BASIS_HCURL_LINE_H
13 
14 #include <stdexcept>
15 #include "HierarchicalBasisHcurl.h"
16 /*
17  *
18  *
19  *
20  * |
21  * 0 | 1
22  * --+------+-----+---> u
23  *
24  *
25  *
26  *
27  *
28  *
29  *
30  */
32 public:
33  HierarchicalBasisHcurlLine(int order);
35  virtual unsigned int getNumberOfOrientations() const;
36 
37  virtual void generateBasis(double const &u, double const &v, double const &w,
38  std::vector<std::vector<double> > &vertexBasis,
39  std::vector<std::vector<double> > &edgeBasis,
40  std::vector<std::vector<double> > &faceBasis,
41  std::vector<std::vector<double> > &bubbleBasis,
42  std::string typeFunction)
43  {
44  if(typeFunction == "HcurlLegendre") {
45  generateHcurlBasis(u, v, w, edgeBasis, faceBasis, bubbleBasis);
46  }
47  else if("CurlHcurlLegendre" == typeFunction) {
48  generateCurlBasis(u, v, w, edgeBasis, faceBasis, bubbleBasis);
49  }
50  else {
51  throw std::runtime_error("unknown typeFunction");
52  }
53  };
54  virtual void
55  orientEdge(int const &flagOrientation, int const &edgeNumber,
56  std::vector<std::vector<double> > &edgeBasis,
57  const std::vector<std::vector<double> > &eTablePositiveFlag,
58  const std::vector<std::vector<double> > &eTableNegativeFlag);
60  std::vector<std::vector<double> > &edgeFunctions);
61  virtual void orientFace(
62  int const &flag1, int const &flag2, int const &flag3, int const &faceNumber,
63  const std::vector<std::vector<double> > &quadFaceFunctionsAllOrientation,
64  const std::vector<std::vector<double> > &triFaceFunctionsAllOrientation,
65  std::vector<std::vector<double> > &fTableCopy){};
66  virtual void getKeysInfo(std::vector<int> &functionTypeInfo,
67  std::vector<int> &orderInfo);
68 
69 private:
70  int _pe; // edge function order in direction u
71  static double
72  _affineCoordinate(int j,
73  double u); // affine coordinate lambdaj j={1,2}
74  virtual void
75  generateHcurlBasis(double const &u, double const &v, double const &w,
76  std::vector<std::vector<double> > &edgeBasis,
77  std::vector<std::vector<double> > &faceBasis,
78  std::vector<std::vector<double> > &bubbleBasis);
79  virtual void
80  generateCurlBasis(double const &u, double const &v, double const &w,
81  std::vector<std::vector<double> > &edgeBasis,
82  std::vector<std::vector<double> > &faceBasis,
83  std::vector<std::vector<double> > &bubbleBasis);
84 
85  static double dotProduct(const std::vector<double> &u,
86  const std::vector<double> &v);
87  virtual void orientOneFace(double const &u, double const &v, double const &w,
88  int const &flag1, int const &flag2,
89  int const &flag3, int const &faceNumber,
90  std::vector<std::vector<double> > &faceFunctions,
91  std::string typeFunction){};
92 };
93 
94 #endif
HierarchicalBasisHcurl
Definition: HierarchicalBasisHcurl.h:16
HierarchicalBasisHcurlLine::orientFace
virtual void orientFace(int const &flag1, int const &flag2, int const &flag3, int const &faceNumber, const std::vector< std::vector< double > > &quadFaceFunctionsAllOrientation, const std::vector< std::vector< double > > &triFaceFunctionsAllOrientation, std::vector< std::vector< double > > &fTableCopy)
Definition: HierarchicalBasisHcurlLine.h:61
HierarchicalBasisHcurlLine::HierarchicalBasisHcurlLine
HierarchicalBasisHcurlLine(int order)
Definition: HierarchicalBasisHcurlLine.cpp:14
HierarchicalBasisHcurlLine::orientEdge
virtual void orientEdge(int const &flagOrientation, int const &edgeNumber, std::vector< std::vector< double > > &edgeBasis, const std::vector< std::vector< double > > &eTablePositiveFlag, const std::vector< std::vector< double > > &eTableNegativeFlag)
Definition: HierarchicalBasisHcurlLine.cpp:95
HierarchicalBasisHcurlLine::_affineCoordinate
static double _affineCoordinate(int j, double u)
Definition: HierarchicalBasisHcurlLine.cpp:35
HierarchicalBasisHcurlLine::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)
Definition: HierarchicalBasisHcurlLine.h:37
HierarchicalBasisHcurlLine::generateCurlBasis
virtual void generateCurlBasis(double const &u, double const &v, double const &w, std::vector< std::vector< double > > &edgeBasis, std::vector< std::vector< double > > &faceBasis, std::vector< std::vector< double > > &bubbleBasis)
Definition: HierarchicalBasisHcurlLine.cpp:128
HierarchicalBasisHcurlLine::orientEdgeFunctionsForNegativeFlag
virtual void orientEdgeFunctionsForNegativeFlag(std::vector< std::vector< double > > &edgeFunctions)
Definition: HierarchicalBasisHcurlLine.cpp:117
HierarchicalBasisHcurlLine::~HierarchicalBasisHcurlLine
virtual ~HierarchicalBasisHcurlLine()
Definition: HierarchicalBasisHcurlLine.cpp:28
HierarchicalBasisHcurlLine::getKeysInfo
virtual void getKeysInfo(std::vector< int > &functionTypeInfo, std::vector< int > &orderInfo)
Definition: HierarchicalBasisHcurlLine.cpp:137
HierarchicalBasisHcurlLine
Definition: HierarchicalBasisHcurlLine.h:31
HierarchicalBasisHcurlLine::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< std::vector< double > > &faceFunctions, std::string typeFunction)
Definition: HierarchicalBasisHcurlLine.h:87
HierarchicalBasisHcurlLine::getNumberOfOrientations
virtual unsigned int getNumberOfOrientations() const
Definition: HierarchicalBasisHcurlLine.cpp:30
HierarchicalBasisHcurl.h
HierarchicalBasisHcurlLine::dotProduct
static double dotProduct(const std::vector< double > &u, const std::vector< double > &v)
Definition: HierarchicalBasisHcurlLine.cpp:44
HierarchicalBasisHcurlLine::_pe
int _pe
Definition: HierarchicalBasisHcurlLine.h:70
HierarchicalBasisHcurlLine::generateHcurlBasis
virtual void generateHcurlBasis(double const &u, double const &v, double const &w, std::vector< std::vector< double > > &edgeBasis, std::vector< std::vector< double > > &faceBasis, std::vector< std::vector< double > > &bubbleBasis)
Definition: HierarchicalBasisHcurlLine.cpp:49