v0.14.0
JacobiPolynomial.hpp
Go to the documentation of this file.
1 /** \file JacobiPolynomial.hpp
2 \brief Implementation of Legendre polynomial
3 
4 */
5 
6 
7 
8 #ifndef __JACOBIPOLYNOMIALS_HPP__
9 #define __JACOBIPOLYNOMIALS_HPP__
10 
11 namespace MoFEM {
12 
13 /**
14  * \brief Class used to give arguments to Legendre base functions
15  * \ingroup mofem_base_functions
16  */
18 
19  MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
20  UnknownInterface **iface) const;
21 
22  int P;
23  double *diffX;
24  double *diffT;
25  int dIm;
26 
27  double aLpha;
28 
29  boost::shared_ptr<MatrixDouble> baseFunPtr;
30  boost::shared_ptr<MatrixDouble> baseDiffFunPtr;
31 
32  PetscErrorCode (*basePolynomialsType1)(int p, double alpha, double x,
33  double t, double *diff_x,
34  double *diff_t, double *L,
35  double *diffL, const int dim);
36 
37  JacobiPolynomialCtx(int p, double *diff_x, double *diff_t, int dim,
38  double alpha,
39  boost::shared_ptr<MatrixDouble> &base_fun_ptr,
40  boost::shared_ptr<MatrixDouble> &base_diff_fun_ptr)
41  : P(p), diffX(diff_x), diffT(diff_t), dIm(dim), aLpha(alpha),
42  baseFunPtr(base_fun_ptr), baseDiffFunPtr(base_diff_fun_ptr),
45 };
46 
47 /**
48  * \brief Calculating Legendre base functions
49  * \ingroup mofem_base_functions
50  */
51 struct JacobiPolynomial : public BaseFunction {
52 
53  MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
54  UnknownInterface **iface) const;
55 
58 
60  boost::shared_ptr<BaseFunctionCtx> ctx_ptr);
61 };
62 
64 
65  MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
66  UnknownInterface **iface) const;
67 
69  int p, double *diff_x, double *diff_t, int dim, double alpha,
70  boost::shared_ptr<MatrixDouble> &base_fun_ptr,
71  boost::shared_ptr<MatrixDouble> &base_diff_fun_ptr)
72  : JacobiPolynomialCtx(p, diff_x, diff_t, dim, alpha, base_fun_ptr,
73  base_diff_fun_ptr) {
75  }
77 };
78 
80 
81  MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
82  UnknownInterface **iface) const;
83 
86 
88  boost::shared_ptr<BaseFunctionCtx> ctx_ptr);
89 };
90 
91 } // namespace MoFEM
92 
93 #endif //__JACOBIPOLYNOMIALS_HPP__
MoFEM::JacobiPolynomial::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: JacobiPolynomial.cpp:17
MoFEM::JacobiPolynomialCtx::P
int P
Definition: JacobiPolynomial.hpp:22
MoFEM::JacobiPolynomialCtx::baseDiffFunPtr
boost::shared_ptr< MatrixDouble > baseDiffFunPtr
Definition: JacobiPolynomial.hpp:30
MoFEM::JacobiPolynomialCtx::diffX
double * diffX
Definition: JacobiPolynomial.hpp:23
MoFEM::JacobiPolynomial
Calculating Legendre base functions.
Definition: JacobiPolynomial.hpp:51
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
MoFEM::IntegratedJacobiPolynomialCtx::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: JacobiPolynomial.cpp:58
MoFEM::JacobiPolynomialCtx::JacobiPolynomialCtx
JacobiPolynomialCtx(int p, double *diff_x, double *diff_t, int dim, double alpha, boost::shared_ptr< MatrixDouble > &base_fun_ptr, boost::shared_ptr< MatrixDouble > &base_diff_fun_ptr)
Definition: JacobiPolynomial.hpp:37
MoFEM::JacobiPolynomial::~JacobiPolynomial
~JacobiPolynomial()
Definition: JacobiPolynomial.hpp:57
MoFEM::BaseFunction
Base class if inherited used to calculate base functions.
Definition: BaseFunction.hpp:40
MoFEM::JacobiPolynomialCtx::aLpha
double aLpha
Definition: JacobiPolynomial.hpp:27
MoFEM::IntegratedJacobiPolynomial::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: JacobiPolynomial.cpp:64
MoFEM::JacobiPolynomialCtx::baseFunPtr
boost::shared_ptr< MatrixDouble > baseFunPtr
Definition: JacobiPolynomial.hpp:29
MoFEM::BaseFunctionCtx
Base class used to exchange data between element data structures and class calculating base functions...
Definition: BaseFunction.hpp:28
MoFEM::JacobiPolynomialCtx::~JacobiPolynomialCtx
~JacobiPolynomialCtx()
Definition: JacobiPolynomial.hpp:44
MoFEM::JacobiPolynomialCtx::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: JacobiPolynomial.cpp:10
IntegratedJacobi_polynomials
PetscErrorCode IntegratedJacobi_polynomials(int p, double alpha, double x, double t, double *diff_x, double *diff_t, double *L, double *diffL, const int dim)
Calculate integrated Jacobi approximation basis.
Definition: base_functions.c:134
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::JacobiPolynomialCtx
Class used to give arguments to Legendre base functions.
Definition: JacobiPolynomial.hpp:17
MoFEM::JacobiPolynomialCtx::diffT
double * diffT
Definition: JacobiPolynomial.hpp:24
MoFEM::JacobiPolynomialCtx::dIm
int dIm
Definition: JacobiPolynomial.hpp:25
MoFEM::L
VectorDouble L
Definition: Projection10NodeCoordsOnField.cpp:124
MoFEM::JacobiPolynomial::JacobiPolynomial
JacobiPolynomial()
Definition: JacobiPolynomial.hpp:56
MoFEM::IntegratedJacobiPolynomialCtx
Definition: JacobiPolynomial.hpp:63
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
MoFEM::UnknownInterface
base class for all interface classes
Definition: UnknownInterface.hpp:34
MoFEM::JacobiPolynomial::getValue
MoFEMErrorCode getValue(MatrixDouble &pts_x, MatrixDouble &pts_t, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
Definition: JacobiPolynomial.cpp:50
Jacobi_polynomials
PetscErrorCode Jacobi_polynomials(int p, double alpha, double x, double t, double *diff_x, double *diff_t, double *L, double *diffL, const int dim)
Calculate Jacobi approximation basis.
Definition: base_functions.c:67
MoFEM::IntegratedJacobiPolynomial::~IntegratedJacobiPolynomial
~IntegratedJacobiPolynomial()
Definition: JacobiPolynomial.hpp:85
MoFEM::JacobiPolynomialCtx::basePolynomialsType1
PetscErrorCode(* basePolynomialsType1)(int p, double alpha, double x, double t, double *diff_x, double *diff_t, double *L, double *diffL, const int dim)
Definition: JacobiPolynomial.hpp:32
MoFEM::IntegratedJacobiPolynomialCtx::~IntegratedJacobiPolynomialCtx
~IntegratedJacobiPolynomialCtx()
Definition: JacobiPolynomial.hpp:76
MoFEM::IntegratedJacobiPolynomial::IntegratedJacobiPolynomial
IntegratedJacobiPolynomial()
Definition: JacobiPolynomial.hpp:84
MoFEM::IntegratedJacobiPolynomialCtx::IntegratedJacobiPolynomialCtx
IntegratedJacobiPolynomialCtx(int p, double *diff_x, double *diff_t, int dim, double alpha, boost::shared_ptr< MatrixDouble > &base_fun_ptr, boost::shared_ptr< MatrixDouble > &base_diff_fun_ptr)
Definition: JacobiPolynomial.hpp:68
MoFEM::IntegratedJacobiPolynomial::getValue
MoFEMErrorCode getValue(MatrixDouble &pts_x, MatrixDouble &pts_t, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
Definition: JacobiPolynomial.cpp:70
MoFEM::IntegratedJacobiPolynomial
Definition: JacobiPolynomial.hpp:79