v0.14.0
TetPolynomialBase.hpp
Go to the documentation of this file.
1 /** \file TetPolynomialBase.hpp
2 \brief Implementation of Ainsworth-Coyle / Demkowicz or any other H1, Hcurl,
3 Hdiv and L2 base on tetrahedral
4 
5 */
6 
7 
8 
9 #ifndef __TETPOLYNOMIALBASE_HPP__
10 #define __TETPOLYNOMIALBASE_HPP__
11 
12 namespace MoFEM {
13 
14 /**
15  * \brief Calculate base functions on tetrahedral
16  *
17  * \ingroup mofem_base_functions
18  */
20 
21  MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
22  UnknownInterface **iface) const;
23 
24  TetPolynomialBase(const void *ptr = nullptr);
25  virtual ~TetPolynomialBase();
26 
27  static bool swichCacheHDivBaseFaceDemkowicz(const void *ptr);
28  static bool swichCacheHdivBaseInteriorDemkowicz(const void *ptr);
29  static void swichCacheHDivBaseDemkowiczOn(std::vector<void *> v);
30  static void swichCacheHDivBaseDemkowiczOff(std::vector<void *> v);
31 
33  boost::shared_ptr<BaseFunctionCtx> ctx_ptr);
34 
35 private:
36  const void *vPtr;
38 
39  /**
40  * @brief Get base functions for H1 space
41  *
42  * @param pts matrix of integration pts
43  * @return MoFEMErrorCode
44  *
45  * \note matrix of integration points on rows has local coordinates of
46  * finite element on columns are integration pts.
47  */
49 
50  /**
51  * @brief Get base functions for L2 space
52  *
53  * @param pts matrix of integration pts
54  * @return MoFEMErrorCode
55  *
56  * \note matrix of integration points on rows has local coordinates of finite
57  * element on columns are integration pts.
58  */
60 
61  /**
62  * @brief Get base functions for Hdiv space
63  *
64  * @param pts matrix of integration pts
65  * @return MoFEMErrorCode
66  *
67  * \note matrix of integration points on rows has local coordinates of finite
68  * element on columns are integration pts.
69  */
71 
72  /**
73  * @brief Get base functions for Hcurl space
74  *
75  * @param pts matrix of integration pts
76  * @return MoFEMErrorCode
77  *
78  * \note matrix of integration points on rows has local coordinates of finite
79  * element on columns are integration pts.
80  */
82 
83  ublas::matrix<MatrixDouble> N_face_edge;
84  ublas::vector<MatrixDouble> N_face_bubble;
85  ublas::vector<MatrixDouble> N_volume_edge;
86  ublas::vector<MatrixDouble> N_volume_face;
88 
89  ublas::matrix<MatrixDouble> diffN_face_edge;
90  ublas::vector<MatrixDouble> diffN_face_bubble;
91  ublas::vector<MatrixDouble> diffN_volume_edge;
92  ublas::vector<MatrixDouble> diffN_volume_face;
94 
95 private:
98 
101 
104 
107 
109 
110 };
111 
112 } // namespace MoFEM
113 
114 #endif //__TETPOLYNOMIALBASE_HPP__
MoFEM::TetPolynomialBase::getValueH1
MoFEMErrorCode getValueH1(MatrixDouble &pts)
Get base functions for H1 space.
Definition: TetPolynomialBase.cpp:98
MoFEM::TetPolynomialBase::getValueL2
MoFEMErrorCode getValueL2(MatrixDouble &pts)
Get base functions for L2 space.
Definition: TetPolynomialBase.cpp:510
MoFEM::EntPolynomialBaseCtx
Class used to pass element data to calculate base functions on tet,triangle,edge.
Definition: EntPolynomialBaseCtx.hpp:22
MoFEM::TetPolynomialBase::N_face_bubble
ublas::vector< MatrixDouble > N_face_bubble
Definition: TetPolynomialBase.hpp:84
MoFEM::TetPolynomialBase::getValueHcurlAinsworthBase
MoFEMErrorCode getValueHcurlAinsworthBase(MatrixDouble &pts)
Definition: TetPolynomialBase.cpp:1226
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
MoFEM::TetPolynomialBase::senseFaceAlpha
MatrixInt senseFaceAlpha
Definition: TetPolynomialBase.hpp:108
MoFEM::TetPolynomialBase::N_face_edge
ublas::matrix< MatrixDouble > N_face_edge
Definition: TetPolynomialBase.hpp:83
MoFEM::BaseFunction
Base class if inherited used to calculate base functions.
Definition: BaseFunction.hpp:40
MoFEM::TetPolynomialBase::getValueH1AinsworthBase
MoFEMErrorCode getValueH1AinsworthBase(MatrixDouble &pts)
Definition: TetPolynomialBase.cpp:116
MoFEM::TetPolynomialBase::diffN_volume_edge
ublas::vector< MatrixDouble > diffN_volume_edge
Definition: TetPolynomialBase.hpp:91
MoFEM::TetPolynomialBase::getValueL2AinsworthBase
MoFEMErrorCode getValueL2AinsworthBase(MatrixDouble &pts)
Definition: TetPolynomialBase.cpp:528
MoFEM::TetPolynomialBase::TetPolynomialBase
TetPolynomialBase(const void *ptr=nullptr)
Definition: TetPolynomialBase.cpp:85
MoFEM::TetPolynomialBase::getValueHcurl
MoFEMErrorCode getValueHcurl(MatrixDouble &pts)
Get base functions for Hcurl space.
Definition: TetPolynomialBase.cpp:1476
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::TetPolynomialBase::swichCacheHdivBaseInteriorDemkowicz
static bool swichCacheHdivBaseInteriorDemkowicz(const void *ptr)
Definition: TetPolynomialBase.cpp:1572
MoFEM::TetPolynomialBase::diffN_volume_bubble
MatrixDouble diffN_volume_bubble
Definition: TetPolynomialBase.hpp:93
MoFEM::TetPolynomialBase::N_volume_edge
ublas::vector< MatrixDouble > N_volume_edge
Definition: TetPolynomialBase.hpp:85
MoFEM::Types::MatrixInt
UBlasMatrix< int > MatrixInt
Definition: Types.hpp:76
MoFEM::TetPolynomialBase::vPtr
const void * vPtr
Definition: TetPolynomialBase.hpp:36
MoFEM::TetPolynomialBase::diffN_face_edge
ublas::matrix< MatrixDouble > diffN_face_edge
Definition: TetPolynomialBase.hpp:89
MoFEM::TetPolynomialBase::N_volume_face
ublas::vector< MatrixDouble > N_volume_face
Definition: TetPolynomialBase.hpp:86
MoFEM::TetPolynomialBase::getValueHdiv
MoFEMErrorCode getValueHdiv(MatrixDouble &pts)
Get base functions for Hdiv space.
Definition: TetPolynomialBase.cpp:1209
MoFEM::TetPolynomialBase::getValueHdivAinsworthBase
MoFEMErrorCode getValueHdivAinsworthBase(MatrixDouble &pts)
Definition: TetPolynomialBase.cpp:734
MoFEM::TetPolynomialBase::diffN_volume_face
ublas::vector< MatrixDouble > diffN_volume_face
Definition: TetPolynomialBase.hpp:92
MoFEM::TetPolynomialBase::getValueHcurlDemkowiczBase
MoFEMErrorCode getValueHcurlDemkowiczBase(MatrixDouble &pts)
Definition: TetPolynomialBase.cpp:1344
MoFEM::TetPolynomialBase::getValueL2BernsteinBezierBase
MoFEMErrorCode getValueL2BernsteinBezierBase(MatrixDouble &pts)
Definition: TetPolynomialBase.cpp:558
MoFEM::TetPolynomialBase::swichCacheHDivBaseDemkowiczOff
static void swichCacheHDivBaseDemkowiczOff(std::vector< void * > v)
Definition: TetPolynomialBase.cpp:1601
MoFEM::UnknownInterface
base class for all interface classes
Definition: UnknownInterface.hpp:34
v
const double v
phase velocity of light in medium (cm/ns)
Definition: initial_diffusion.cpp:40
MoFEM::TetPolynomialBase::swichCacheHDivBaseDemkowiczOn
static void swichCacheHDivBaseDemkowiczOn(std::vector< void * > v)
Definition: TetPolynomialBase.cpp:1589
MoFEM::TetPolynomialBase::cTx
EntPolynomialBaseCtx * cTx
Definition: TetPolynomialBase.hpp:37
MoFEM::TetPolynomialBase::diffN_face_bubble
ublas::vector< MatrixDouble > diffN_face_bubble
Definition: TetPolynomialBase.hpp:90
MoFEM::TetPolynomialBase::getValueHdivDemkowiczBase
MoFEMErrorCode getValueHdivDemkowiczBase(MatrixDouble &pts)
Definition: TetPolynomialBase.cpp:1074
MoFEM::TetPolynomialBase::getValue
MoFEMErrorCode getValue(MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
Definition: TetPolynomialBase.cpp:1495
MoFEM::TetPolynomialBase::N_volume_bubble
MatrixDouble N_volume_bubble
Definition: TetPolynomialBase.hpp:87
MoFEM::TetPolynomialBase::getValueH1BernsteinBezierBase
MoFEMErrorCode getValueH1BernsteinBezierBase(MatrixDouble &pts)
Definition: TetPolynomialBase.cpp:228
MoFEM::TetPolynomialBase::~TetPolynomialBase
virtual ~TetPolynomialBase()
Definition: TetPolynomialBase.cpp:87
MoFEM::TetPolynomialBase::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: TetPolynomialBase.cpp:77
MoFEM::TetPolynomialBase::swichCacheHDivBaseFaceDemkowicz
static bool swichCacheHDivBaseFaceDemkowicz(const void *ptr)
Definition: TetPolynomialBase.cpp:1555
MoFEM::TetPolynomialBase
Calculate base functions on tetrahedral.
Definition: TetPolynomialBase.hpp:19