gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
orthogonalBasis.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 Amaury Johnen
7 
8 #ifndef ORTHOGONAL_BASIS_H
9 #define ORTHOGONAL_BASIS_H
10 
11 class FuncSpaceData;
12 
14  // - Line: Legendre
15  // - Quadrangle: Legendre x Legendre
16  // - Triangle: Legendre x Jacobi
17 private:
18  const int _type;
19  const int _order;
20 
21 public:
23  explicit orthogonalBasis(const FuncSpaceData &_data);
24  orthogonalBasis(int type, int order) : _type(type), _order(order) {}
26 
27  void f(double u, double v, double w, double *sf) const;
28  void integralfSquared(double *val) const;
29 };
30 
31 namespace LegendrePolynomials {
32  void f(int n, double u, double *val);
33  void fc(int n, double u, double *val);
34  void df(int n, double u, double *val);
35 } // namespace LegendrePolynomials
36 
37 namespace JacobiPolynomials {
38  void f(int n, double alpha, double beta, double u, double *val);
39  void df(int n, double alpha, double beta, double u, double *val);
40 
41  inline double Pochhammer(double x, int n)
42  {
43  double result = 1;
44  for(int i = 0; i < n; i++) result *= x + i;
45  return result;
46  }
47 } // namespace JacobiPolynomials
48 
49 #endif // GMSH_ORTHOGONALBASIS_H
orthogonalBasis::_type
const int _type
Definition: orthogonalBasis.h:18
orthogonalBasis
Definition: orthogonalBasis.h:13
LegendrePolynomials::f
void f(int n, double u, double *val)
Definition: orthogonalBasis.cpp:77
orthogonalBasis::integralfSquared
void integralfSquared(double *val) const
Definition: orthogonalBasis.cpp:53
LegendrePolynomials::fc
void fc(int n, double u, double *val)
Definition: orthogonalBasis.cpp:92
JacobiPolynomials::f
void f(int n, double alpha, double beta, double u, double *val)
Definition: orthogonalBasis.cpp:134
orthogonalBasis::orthogonalBasis
orthogonalBasis(int type, int order)
Definition: orthogonalBasis.h:24
JacobiPolynomials
Definition: orthogonalBasis.cpp:133
orthogonalBasis::f
void f(double u, double v, double w, double *sf) const
Definition: orthogonalBasis.cpp:20
LegendrePolynomials
Definition: orthogonalBasis.cpp:76
orthogonalBasis::orthogonalBasis
orthogonalBasis()
LegendrePolynomials::df
void df(int n, double u, double *val)
Definition: orthogonalBasis.cpp:103
FuncSpaceData
Definition: FuncSpaceData.h:16
orthogonalBasis::~orthogonalBasis
~orthogonalBasis()
Definition: orthogonalBasis.h:25
orthogonalBasis::_order
const int _order
Definition: orthogonalBasis.h:19
JacobiPolynomials::df
void df(int n, double alpha, double beta, double u, double *val)
Definition: orthogonalBasis.cpp:157
JacobiPolynomials::Pochhammer
double Pochhammer(double x, int n)
Definition: orthogonalBasis.h:41