v0.14.0
LegendrePolynomial.hpp
Go to the documentation of this file.
1 /** \file LegendrePolynomial.hpp
2 \brief Implementation of Legendre polynomial
3 
4 */
5 
6 
7 
8 #ifndef __LEGENDREPOLYNOMIALS_HPP__
9 #define __LEGENDREPOLYNOMIALS_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 *diffS;
24  int dIm;
25  boost::shared_ptr<MatrixDouble> baseFunPtr;
26  boost::shared_ptr<MatrixDouble> baseDiffFunPtr;
27 
28  PetscErrorCode (*basePolynomialsType0)(int p, double s, double *diff_s,
29  double *L, double *diffL,
30  const int dim);
31 
32  LegendrePolynomialCtx(int p, double *diff_s, int dim,
33  boost::shared_ptr<MatrixDouble> base_fun_ptr,
34  boost::shared_ptr<MatrixDouble> base_diff_fun_ptr)
35  : P(p), diffS(diff_s), dIm(dim), baseFunPtr(base_fun_ptr),
36  baseDiffFunPtr(base_diff_fun_ptr),
39 };
40 
41 /**
42  * \brief Calculating Legendre base functions
43  * \ingroup mofem_base_functions
44  */
46 
47  MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
48  UnknownInterface **iface) const;
49 
52 
54  boost::shared_ptr<BaseFunctionCtx> ctx_ptr);
55 };
56 
57 } // namespace MoFEM
58 
59 #endif //__LEGENDREPOLYNOMIALS_HPP__
MoFEM::LegendrePolynomialCtx::basePolynomialsType0
PetscErrorCode(* basePolynomialsType0)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
Definition: LegendrePolynomial.hpp:28
MoFEM::LegendrePolynomialCtx::LegendrePolynomialCtx
LegendrePolynomialCtx(int p, double *diff_s, int dim, boost::shared_ptr< MatrixDouble > base_fun_ptr, boost::shared_ptr< MatrixDouble > base_diff_fun_ptr)
Definition: LegendrePolynomial.hpp:32
MoFEM::LegendrePolynomial
Calculating Legendre base functions.
Definition: LegendrePolynomial.hpp:45
MoFEM::LegendrePolynomialCtx
Class used to give arguments to Legendre base functions.
Definition: LegendrePolynomial.hpp:17
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
MoFEM::LegendrePolynomialCtx::baseFunPtr
boost::shared_ptr< MatrixDouble > baseFunPtr
Definition: LegendrePolynomial.hpp:25
MoFEM::BaseFunction
Base class if inherited used to calculate base functions.
Definition: BaseFunction.hpp:40
MoFEM::LegendrePolynomial::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: LegendrePolynomial.cpp:14
MoFEM::BaseFunctionCtx
Base class used to exchange data between element data structures and class calculating base functions...
Definition: BaseFunction.hpp:28
MoFEM::LegendrePolynomial::getValue
MoFEMErrorCode getValue(MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
Definition: LegendrePolynomial.cpp:22
MoFEM::LegendrePolynomialCtx::diffS
double * diffS
Definition: LegendrePolynomial.hpp:23
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::LegendrePolynomial::LegendrePolynomial
LegendrePolynomial()
Definition: LegendrePolynomial.hpp:50
MoFEM::LegendrePolynomialCtx::baseDiffFunPtr
boost::shared_ptr< MatrixDouble > baseDiffFunPtr
Definition: LegendrePolynomial.hpp:26
MoFEM::L
VectorDouble L
Definition: Projection10NodeCoordsOnField.cpp:124
Legendre_polynomials
PetscErrorCode Legendre_polynomials(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
Calculate Legendre approximation basis.
Definition: base_functions.c:15
MoFEM::LegendrePolynomialCtx::dIm
int dIm
Definition: LegendrePolynomial.hpp:24
MoFEM::UnknownInterface
base class for all interface classes
Definition: UnknownInterface.hpp:34
MoFEM::LegendrePolynomial::~LegendrePolynomial
~LegendrePolynomial()
Definition: LegendrePolynomial.hpp:51
MoFEM::LegendrePolynomialCtx::~LegendrePolynomialCtx
~LegendrePolynomialCtx()
Definition: LegendrePolynomial.hpp:38
MoFEM::LegendrePolynomialCtx::P
int P
Definition: LegendrePolynomial.hpp:22
MoFEM::LegendrePolynomialCtx::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: LegendrePolynomial.cpp:7