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