CRTP mixin class for finite elements with additional skills. More...
#include <ikarus/finiteelements/mixin.hh>
Classes | |
struct | RequirementType |
struct | RequirementType< false, T > |
struct | RequirementType< true, T > |
Public Types | |
using | SupportedResultTypes = decltype(std::tuple_cat(computeSupportedResultTypes< Skills< PreFE, typename PreFE::template FE< Skills... > > >()...)) |
Type alias for the supported result types by the mixin. More... | |
using | Traits = PreFE::Traits |
using | Requirement = RequirementType< requirementDetected >::type |
using | LocalView = typename Traits::LocalView |
using | Token = std::shared_ptr< void > |
using | Args = std::tuple< ARGS... > |
Public Member Functions | |
FEMixin (typename Skills< PreFE, typename PreFE::template FE< Skills... > >::Pre &&... skillsArgs) | |
Constructor for the FEMixin class. More... | |
template<template< typename, int, int > class RT> requires requires(FEMixin m, const Requirement& req, const Dune::FieldVector<double, Traits::mydim>& local) { m.template calculateAtImpl<RT>(req, local, Dune::PriorityTag<10>()); } | |
auto | calculateAt (const Requirement &req, const Dune::FieldVector< double, Traits::mydim > &local) const |
Calculate the element values at a specific location for a given ResultType. More... | |
void | bind () |
Call all bind functions if the skill implements it. More... | |
template<typename ScalarType = double> requires implementsCalculateScalarImpl | |
auto | calculateScalarImpl (const Requirement &par, ScalarAffordance affordance, const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &dx=std::nullopt) const |
Calculate the scalar value in each skill and joins them by + . More... | |
template<typename ScalarType > requires implementsCalculateVectorImpl | |
void | calculateVectorImpl (const Requirement &par, VectorAffordance affordance, typename Traits::template VectorType< ScalarType > force, const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &dx=std::nullopt) const |
Calculate the vector for each skill. More... | |
template<typename ScalarType > requires implementsCalculateMatrixImpl | |
void | calculateMatrixImpl (const Requirement &par, MatrixAffordance affordance, typename Traits::template MatrixType< ScalarType > K, const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &dx=std::nullopt) const |
Calculate the matrix for each skill. More... | |
void | updateState (const Requirement &par, const std::remove_reference_t< typename Traits::template VectorType<> > &correction) |
Call all updateStateImpl functions if the skill implements it. More... | |
template<typename MT , typename BC > | |
auto | subscribeTo (BC &bc) |
Subscribes the elements to listen to functions provided from the skills emitted by the given broadcaster. More... | |
template<typename Broadcaster > | |
auto | subscribe (Broadcaster &broadcaster, std::function< void(typename Broadcaster::MessageType, const typename Broadcaster::State &)> callback) |
Function to subscribe to a broadcaster with a given function (either a lambda, std::function or function pointer). More... | |
void | unSubscribeAll () |
Unsubscribe from all listeners. At the moment unsubscribing can't be done more granularly. More... | |
void | unSubscribeLast () |
Unsubscribe from the last subscribed listener. More... | |
void | unSubscribe (const Token &token) |
Unsubscribe from a specific token. More... | |
Static Public Member Functions | |
template<template< typename, typename > class Skill> | |
static consteval bool | hasSkill () |
Checks if the mixin class has a specific skill. More... | |
static constexpr bool | hasEAS () |
static constexpr bool | hasAssumedStress () |
static constexpr bool | isMixed () |
static auto | createRequirement () |
Create a Requirement object. More... | |
Public Attributes | |
Args | args |
Static Public Attributes | |
static constexpr int | worldDim = Traits::worlddim |
Protected Member Functions | |
const auto & | underlying () const |
Get a reference to the underlying finite element object. More... | |
auto & | underlying () |
Get a reference to the underlying finite element object. More... | |
This mixin class is designed for finite elements and provides the ability to include additional skills through the CRTP (Curiously Recurring Template Pattern).
|
inherited |
using Ikarus::FEMixin< PreFE, Skills >::LocalView = typename Traits::LocalView |
using Ikarus::FEMixin< PreFE, Skills >::Requirement = RequirementType<requirementDetected>::type |
using Ikarus::FEMixin< PreFE, Skills >::SupportedResultTypes = decltype(std::tuple_cat(computeSupportedResultTypes<Skills<PreFE, typename PreFE::template FE<Skills...> >>()...)) |
|
inherited |
using Ikarus::FEMixin< PreFE, Skills >::Traits = PreFE::Traits |
|
inlineexplicit |
skillsArgs | Variadic arguments for initializing the additional skills. |
|
inline |
|
inline |
RT | The ResultType to calculate. |
req | The Requirement object specifying the requirements for the calculation. |
local | The local coordinates where the calculation is performed. |
|
inline |
ScalarType | The scalar type for the calculation. |
par | The Requirement object specifying the requirements for the calculation. |
K | The matrix to store the calculated result. |
dx | Optional vector used in the calculation. |
|
inline |
ScalarType | The scalar type for the calculation. |
par | The Requirement object specifying the requirements for the calculation. |
dx | Optional vector used in the calculation. |
|
inline |
ScalarType | The scalar type for the calculation. |
par | The Requirement object specifying the requirements for the calculation. |
force | The vector to store the calculated result. |
dx | Optional vector used in the calculation. |
|
inlinestatic |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestatic |
Skill | The skill to check for. |
|
inlinestaticconstexpr |
|
inlineinherited |
Broadcaster | the type of the Broadcaster (for example a NonlinearSolver or ControlRoutine) |
broadcaster | the broadcaster |
callback | the function |
|
inline |
MT | the message type (for example NonlinerSolverMessages or ControlMessages) |
BC | the type of the broadcaster |
bc | the broadcaster (for example a nonlinearsolver or control routine) |
|
inlineprotected |
|
inlineprotected |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Update the state variables related to a particular skill.
req | The Requirement object specifying the requirements for the update itself. |
force | A correction vector (for example, the displacement increment) based on which the state variables are to be updated. |
|
inherited |
|
staticconstexpr |