v0.15.0
Loading...
Searching...
No Matches
BaseFunction.hpp
Go to the documentation of this file.
1/** \file BaseFunction.hpp
2\brief General implementation of base function
3
4*/
5
6
7
8#ifndef __BASEFUNCTION_HPP__
9#define __BASEFUNCTION_HPP__
10
11namespace MoFEM {
12
14
15 using UnknownInterface::UnknownInterface;
16
17 virtual MoFEMErrorCode
18 query_interface(boost::typeindex::type_index type_index,
19 UnknownInterface **iface) const = 0;
20
21 virtual ~BaseFunctionUnknownInterface() = default;
22};
23
24/**
25 * \brief Base class used to exchange data between element data structures and
26 * class calculating base functions \ingroup mofem_base_functions
27 */
29
30 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
31 UnknownInterface **iface) const;
32
33 using BaseFunctionUnknownInterface::BaseFunctionUnknownInterface;
34};
35
36/**
37 * \brief Base class if inherited used to calculate base functions
38 * \ingroup mofem_base_functions
39 */
41
43 EntityType type;
44 int side;
45 int dof;
46 };
47
48 /**
49 * @brief Map entity stype and side to element/entity dof index
50 *
51 * Such map is used to establish connection between dofs in the interior for
52 * broken specs. Is assume that trace of interior on given side is not zero.
53 *
54 */
55 using DofsSideMap = multi_index_container<
56
58
59 indexed_by<
60 ordered_non_unique<
61 tag<TypeSide_mi_tag>,
62 composite_key<
63
65 member<DofsSideMapData, EntityType, &DofsSideMapData::type>,
66 member<DofsSideMapData, int, &DofsSideMapData::side>>>,
67
68 ordered_unique<tag<EntDofIdx_mi_tag>, // This is number of base
69 // function, i.e.
70 // std::floor(dof/nb_coeffs)
71 member<DofsSideMapData, int, &DofsSideMapData::dof>>
72
73 >>;
74
75 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
76 MoFEM::UnknownInterface **iface) const;
77
78 using BaseFunctionUnknownInterface::BaseFunctionUnknownInterface;
79
81 boost::shared_ptr<BaseFunctionCtx> ctx_ptr);
82
83 virtual MoFEMErrorCode getValue(MatrixDouble &pts_x, MatrixDouble &pts_t,
84 boost::shared_ptr<BaseFunctionCtx> ctx_ptr);
85
86};
87
88} // namespace MoFEM
89
90#endif //__BASEFUNCTION_HPP__
91
92/**
93 * \defgroup mofem_base_functions Base functions
94 *
95 * \brief Calculation of base functions at integration points.
96 *
97 * \ingroup mofem
98 **/
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
Base class used to exchange data between element data structures and class calculating base functions...
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
virtual MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const =0
virtual ~BaseFunctionUnknownInterface()=default
Base class if inherited used to calculate base functions.
virtual MoFEMErrorCode getValue(MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, MoFEM::UnknownInterface **iface) const
multi_index_container< DofsSideMapData, indexed_by< ordered_non_unique< tag< TypeSide_mi_tag >, composite_key< DofsSideMapData, member< DofsSideMapData, EntityType, &DofsSideMapData::type >, member< DofsSideMapData, int, &DofsSideMapData::side > > >, ordered_unique< tag< EntDofIdx_mi_tag >, member< DofsSideMapData, int, &DofsSideMapData::dof > > > > DofsSideMap
Map entity stype and side to element/entity dof index.
base class for all interface classes