21template <
typename PreFE,
template <
typename,
typename>
class... Skills>
31template <
typename BH,
bool useFlat = true,
bool useEigenRef = false>
35 static constexpr int worldDim = BasisHandler::Basis::worlddim;
40 template <
template <
typename,
typename>
class...
Skills>
48 template <
typename PreFE,
typename FE>
56 : localView_{[&]() -> LocalView {
58 return basisHandler.
flat().localView();
60 return basisHandler.
untouched().localView();
77template <
typename PreFE,
template <
typename,
typename>
class... Skills>
78class FE :
private Impl::FEInit<PreFE, FE<PreFE, Skills...>>,
public FEMixin<PreFE, Skills...>
80 friend Impl::FEInit<PreFE, FE>;
97 using PreTuple = std::tuple<typename Skills<PreFE, FE>::Pre...>;
106 : Impl::FEInit<
PreFE,
FE>(basisHandler),
114 this->localView_.bind(element);
122 [[nodiscard]]
constexpr size_t size()
const {
return this->localView_.size(); }
FETraits template structure for finite element traits.
Definition of the LinearElastic class for finite element mechanics computations.
Implementation of the finite element CRTP mixin class.
Definition: assemblermanipulatorbuildingblocks.hh:22
FE class is a base class for all finite elements.
Definition: febase.hh:79
const LocalView & localView() const
Get the const reference to the local view.
Definition: febase.hh:134
constexpr size_t size() const
Get the size of the local view.
Definition: febase.hh:122
Traits::BasisHandler BasisHandler
Type of the basisHandler.
Definition: febase.hh:88
std::tuple< typename Skills< PreFE, FE >::Pre... > PreTuple
Definition: febase.hh:97
FE(const BasisHandler &basisHandler, typename Skills< PreFE, FE >::Pre... skillsArgs)
Constructor for the FE class.
Definition: febase.hh:105
void bind(const GridElement &element)
Convenient function to bind the local view to the element.
Definition: febase.hh:113
typename Traits::GridView GridView
Type of the global view.
Definition: febase.hh:90
static constexpr int worldDim
Definition: febase.hh:96
typename Traits::LocalView LocalView
Type of the local view.
Definition: febase.hh:89
friend Mixin
Definition: febase.hh:84
LocalView & localView()
Get the reference to the local view.
Definition: febase.hh:140
static constexpr int myDim
Definition: febase.hh:95
typename Traits::Element GridElement
Type of the grid element.
Definition: febase.hh:92
const GridElement & gridElement() const
Get the grid element associated with the local view.
Definition: febase.hh:128
typename Traits::GlobalIndex GlobalIndex
Type of the global index.
Definition: febase.hh:91
PreFE struct acts as a convenient wrapper for the FE class to access different type traits.
Definition: febase.hh:33
static constexpr bool useEigenReference
Definition: febase.hh:36
static constexpr bool useFlatBasis
Definition: febase.hh:37
FETraits< BH, useEigenRef, useFlat > Traits
Definition: febase.hh:38
BH BasisHandler
Definition: febase.hh:34
static constexpr int worldDim
Definition: febase.hh:35
FE< PreFE, Skills... > FE
Definition: febase.hh:41
Traits for handling finite elements.
Definition: fetraits.hh:25
typename Basis::LocalView LocalView
Type of the local view.
Definition: fetraits.hh:42
BH BasisHandler
Type of the basis of the finite element.
Definition: fetraits.hh:27
typename Basis::GridView GridView
Type of the grid view.
Definition: fetraits.hh:45
static constexpr int worlddim
Dimension of the world space.
Definition: fetraits.hh:60
typename LocalView::MultiIndex GlobalIndex
Type of the global index.
Definition: fetraits.hh:54
typename LocalView::Element Element
Type of the grid element.
Definition: fetraits.hh:48
static constexpr bool useFlatBasis
A bool to indicate if the provided basishandler should hand out the flat basis.
Definition: fetraits.hh:30
static constexpr int mydim
Dimension of the geometry.
Definition: fetraits.hh:63
CRTP mixin class for finite elements with additional skills.
Definition: mixin.hh:28
RequirementType< requirementDetected >::type Requirement
Definition: mixin.hh:89
void bind()
Call all bind functions if the skill implements it.
Definition: mixin.hh:171
Struct representing a collection of skills.
Definition: mixin.hh:269
Wrapper class for a hierarchical basis constructed from a pre-basis.
Definition: utils/basis.hh:30
auto & flat()
Returns a reference to the flat version of the basis.
Definition: utils/basis.hh:55
auto & untouched()
Returns a reference to the untouched version of the basis.
Definition: utils/basis.hh:62