version 0.4.1
Ikarus::LinearElastic< PreFE, FE > Class Template Reference

LinearElastic class represents a linear elastic finite element. More...

#include <ikarus/finiteelements/mechanics/linearelastic.hh>

Public Types

using Traits = PreFE::Traits
 
using BasisHandler = typename Traits::BasisHandler
 
using FlatBasis = typename Traits::FlatBasis
 
using FERequirementType = typename Traits::FERequirementType
 
using LocalView = typename Traits::LocalView
 
using Geometry = typename Traits::Geometry
 
using GridView = typename Traits::GridView
 
using Element = typename Traits::Element
 
using Pre = LinearElasticPre
 
using LocalBasisType = decltype(std::declval< LocalView >().tree().child(0).finiteElement().localBasis())
 
using SupportedResultTypes = std::tuple< decltype(makeRT< ResultTypes::linearStress >())>
 

Public Member Functions

 LinearElastic (const Pre &pre)
 Constructor for the LinearElastic class. More...
 
template<typename ScalarType = double>
auto displacementFunction (const FERequirementType &par, const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &dx=std::nullopt) const
 Gets the displacement function for the given FERequirementType and optional displacement vector. More...
 
template<class ScalarType = double>
auto strainFunction (const FERequirementType &par, const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &dx=std::nullopt) const
 Gets the strain function for the given FERequirementType and optional displacement vector. More...
 
auto materialTangent () const
 Gets the material tangent matrix for the linear elastic material. More...
 
auto materialTangentFunction (const FERequirementType &par) const
 Gets the material tangent function for the given FERequirementType. More...
 
const Geometrygeometry () const
 
size_t numberOfNodes () const
 
int order () const
 
template<template< typename, int, int > class RT>
requires (canProvideResultType<RT>())
auto calculateAtImpl (const FERequirementType &req, const Dune::FieldVector< double, Traits::mydim > &local, Dune::PriorityTag< 1 >) const
 Calculates a requested result at a specific local position. More...
 

Static Public Member Functions

template<template< typename, int, int > class RT>
static consteval bool canProvideResultType ()
 

Static Public Attributes

static constexpr int myDim = Traits::mydim
 

Protected Member Functions

void bindImpl ()
 A helper function to bind the local view to the element. More...
 
template<typename ScalarType >
void calculateMatrixImpl (const FERequirementType &par, typename Traits::template MatrixType<> K, const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &dx=std::nullopt) const
 
template<typename ScalarType >
auto calculateScalarImpl (const FERequirementType &par, const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &dx=std::nullopt) const -> ScalarType
 
template<typename ScalarType >
void calculateVectorImpl (const FERequirementType &par, typename Traits::template VectorType< ScalarType > force, const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &dx=std::nullopt) const
 

Detailed Description

template<typename PreFE, typename FE>
class Ikarus::LinearElastic< PreFE, FE >
Template Parameters
PreFEThe type of the pre finite element.
FEThe type of the finite element.

Member Typedef Documentation

◆ BasisHandler

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::BasisHandler = typename Traits::BasisHandler

◆ Element

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::Element = typename Traits::Element

◆ FERequirementType

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::FERequirementType = typename Traits::FERequirementType

◆ FlatBasis

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::FlatBasis = typename Traits::FlatBasis

◆ Geometry

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::Geometry = typename Traits::Geometry

◆ GridView

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::GridView = typename Traits::GridView

◆ LocalBasisType

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::LocalBasisType = decltype(std::declval<LocalView>().tree().child(0).finiteElement().localBasis())

◆ LocalView

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::LocalView = typename Traits::LocalView

◆ Pre

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::Pre = LinearElasticPre

◆ SupportedResultTypes

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::SupportedResultTypes = std::tuple<decltype(makeRT<ResultTypes::linearStress>())>

◆ Traits

template<typename PreFE , typename FE >
using Ikarus::LinearElastic< PreFE, FE >::Traits = PreFE::Traits

Constructor & Destructor Documentation

◆ LinearElastic()

template<typename PreFE , typename FE >
Ikarus::LinearElastic< PreFE, FE >::LinearElastic ( const Pre pre)
inlineexplicit
Parameters
preThe pre fe

Member Function Documentation

◆ bindImpl()

template<typename PreFE , typename FE >
void Ikarus::LinearElastic< PreFE, FE >::bindImpl ( )
inlineprotected

◆ calculateAtImpl()

template<typename PreFE , typename FE >
template<template< typename, int, int > class RT>
requires (canProvideResultType<RT>())
auto Ikarus::LinearElastic< PreFE, FE >::calculateAtImpl ( const FERequirementType req,
const Dune::FieldVector< double, Traits::mydim > &  local,
Dune::PriorityTag< 1 >   
) const
inline
Parameters
reqThe FERequirementType object holding the global solution.
localLocal position vector.
Template Parameters
RTThe requested result type
Returns
calculated result
Template Parameters
RTThe type representing the requested result.

◆ calculateMatrixImpl()

template<typename PreFE , typename FE >
template<typename ScalarType >
void Ikarus::LinearElastic< PreFE, FE >::calculateMatrixImpl ( const FERequirementType par,
typename Traits::template MatrixType<>  K,
const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &  dx = std::nullopt 
) const
inlineprotected

◆ calculateScalarImpl()

template<typename PreFE , typename FE >
template<typename ScalarType >
auto Ikarus::LinearElastic< PreFE, FE >::calculateScalarImpl ( const FERequirementType par,
const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &  dx = std::nullopt 
) const -> ScalarType
inlineprotected

◆ calculateVectorImpl()

template<typename PreFE , typename FE >
template<typename ScalarType >
void Ikarus::LinearElastic< PreFE, FE >::calculateVectorImpl ( const FERequirementType par,
typename Traits::template VectorType< ScalarType >  force,
const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &  dx = std::nullopt 
) const
inlineprotected

◆ canProvideResultType()

template<typename PreFE , typename FE >
template<template< typename, int, int > class RT>
static consteval bool Ikarus::LinearElastic< PreFE, FE >::canProvideResultType ( )
inlinestatic

◆ displacementFunction()

template<typename PreFE , typename FE >
template<typename ScalarType = double>
auto Ikarus::LinearElastic< PreFE, FE >::displacementFunction ( const FERequirementType par,
const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &  dx = std::nullopt 
) const
inline
Template Parameters
ScalarTypeThe scalar type for the displacement vector.
Parameters
parThe FERequirementType object.
dxOptional displacement vector.
Returns
The displacement function.
Here is the caller graph for this function:

◆ geometry()

template<typename PreFE , typename FE >
const Geometry & Ikarus::LinearElastic< PreFE, FE >::geometry ( ) const
inline

◆ materialTangent()

template<typename PreFE , typename FE >
auto Ikarus::LinearElastic< PreFE, FE >::materialTangent ( ) const
inline
Returns
The material tangent matrix.
Here is the caller graph for this function:

◆ materialTangentFunction()

template<typename PreFE , typename FE >
auto Ikarus::LinearElastic< PreFE, FE >::materialTangentFunction ( const FERequirementType par) const
inline
Parameters
parThe FERequirementType object.
Returns
The material tangent function.

◆ numberOfNodes()

template<typename PreFE , typename FE >
size_t Ikarus::LinearElastic< PreFE, FE >::numberOfNodes ( ) const
inline

◆ order()

template<typename PreFE , typename FE >
int Ikarus::LinearElastic< PreFE, FE >::order ( ) const
inline

◆ strainFunction()

template<typename PreFE , typename FE >
template<class ScalarType = double>
auto Ikarus::LinearElastic< PreFE, FE >::strainFunction ( const FERequirementType par,
const std::optional< std::reference_wrapper< const Eigen::VectorX< ScalarType > > > &  dx = std::nullopt 
) const
inline
Template Parameters
ScalarTypeThe scalar type for the strain vector.
Parameters
parThe FERequirementType object.
dxOptional displacement vector.
Returns
The strain function.
Here is the caller graph for this function:

Member Data Documentation

◆ myDim

template<typename PreFE , typename FE >
constexpr int Ikarus::LinearElastic< PreFE, FE >::myDim = Traits::mydim
staticconstexpr

The documentation for this class was generated from the following file: