version 0.4.7
Ikarus::DisplacementPressure< PreFE, FE, PRE > Class Template Reference

DisplacementPressure class represents a displacement-pressure finite element. More...

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

Inheritance diagram for Ikarus::DisplacementPressure< PreFE, FE, PRE >:
[legend]

Public Types

using Traits = PreFE::Traits
 
using Basis = typename Traits::Basis
 
using FlatBasis = typename Traits::FlatBasis
 
using Requirement = FERequirements< FESolutions::displacement, FEParameter::loadfactor >
 
using LocalView = typename Traits::LocalView
 
using Geometry = typename Traits::Geometry
 
using GridView = typename Traits::GridView
 
using Element = typename Traits::Element
 
using Pre = PRE
 
using LocalBasisTypeU = decltype(std::declval< LocalView >().tree().child(Dune::Indices::_0).child(0).finiteElement().localBasis())
 
using LocalBasisTypeP = decltype(std::declval< LocalView >().tree().child(Dune::Indices::_1).finiteElement().localBasis())
 
template<typename ST >
using VectorXOptRef = std::optional< std::reference_wrapper< const Eigen::VectorX< ST > > >
 
template<template< typename, int, int > class RT>
using RTWrapperType = ResultWrapper< RT< typename Traits::ctype, myDim, Traits::worlddim >, ResultShape::Vector >
 
template<typename ST = double>
using StrainType = Eigen::Vector< ST, strainDim >
 
template<typename ST = double>
using BopType = Eigen::Matrix< ST, strainDim, myDim >
 
template<typename ST = double>
using KgType = Eigen::Matrix< ST, myDim, myDim >
 
using MaterialType = typename Pre::Material
 
template<typename MAT >
using DecomposedDevType = typename Materials::DecomposedMaterialTypes< MaterialType >::DevType
 
template<typename MAT >
using DecomposedVolType = typename Materials::DecomposedMaterialTypes< MaterialType >::VolType
 
using DPConstitutiveDriverType = Impl::DPConstitutiveDriver< DecomposedDevType< MaterialType >, DecomposedVolType< MaterialType > >
 
using SupportedResultTypes = std::tuple< decltype(makeRT< ResultTypes >())... >
 

Public Member Functions

 DisplacementPressure (const Pre &pre)
 Constructor for the DisplacementPressure class. More...
 
template<typename ScalarType = double>
auto displacementFunction (const Requirement &par, const VectorXOptRef< ScalarType > &dx=std::nullopt) const
 Get the displacement function for the given Requirement. More...
 
template<typename ScalarType = double>
auto pressureFunction (const Requirement &par, const VectorXOptRef< ScalarType > &dx=std::nullopt) const
 Get the pressure function for the given Requirement. More...
 
template<typename ScalarType = double>
auto strainFunction (const Requirement &par, const VectorXOptRef< ScalarType > &dx=std::nullopt) const
 The strain function for the given Requirement. More...
 
const Geometrygeometry () const
 
size_t numberOfNodes () const
 
int order () const
 
const Dune::CachedLocalBasis< std::remove_cvref_t< LocalBasisTypeU > > & localBasis () const
 
const Dune::CachedLocalBasis< std::remove_cvref_t< LocalBasisTypeP > > & localBasisP () const
 
template<typename ScalarType = double>
decltype(auto) constitutiveDriver () const
 
template<template< typename, int, int > class RT>
requires (supportsResultType<RT>())
auto resultFunction () const
 Get a lambda function that evaluates the requested result type for a given strain (in Voigt notation) and pressure. More...
 
template<template< typename, int, int > class RT>
requires (supportsResultType<RT>())
auto calculateAtImpl (const Requirement &req, const Dune::FieldVector< double, Traits::mydim > &local, Dune::PriorityTag< 1 >) const
 Calculates a requested result at a specific local position. More...
 
template<typename ST >
auto geometricStiffnessMatrixFunction (const Requirement &par, typename Traits::template MatrixType< ST > &K, const VectorXOptRef< ST > &dx=std::nullopt) const
 Get a lambda function that evaluates the geometric part of the stiffness matrix (Kg) for a given integration point and its index. More...
 
template<typename ST >
auto materialStiffnessMatrixFunction (const Requirement &par, typename Traits::template MatrixType< ST > &K, const VectorXOptRef< ST > &dx=std::nullopt) const
 Get a lambda function that evaluates the material part of the stiffness matrix (Ke + Ku) for a given strain, integration point and its index. More...
 
template<typename ST >
auto internalForcesFunction (const Requirement &par, typename Traits::template VectorType< ST > &force, const VectorXOptRef< ST > &dx=std::nullopt) const
 Get a lambda function that evaluates the internal force vector for a given strain, integration point and its index. More...
 
template<typename ST >
auto energyFunction (const Requirement &par, const VectorXOptRef< ST > &dx=std::nullopt) const
 Get a lambda function that evaluates the internal energy at a given integration point and its index. More...
 

Static Public Member Functions

static consteval bool supportsResultType ()
 Returns whether a ResultType is provided by the element. More...
 

Static Public Attributes

static constexpr int myDim = Traits::mydim
 
static constexpr int strainDim = myDim * (myDim + 1) / 2
 
static constexpr auto strainType = StrainTags::greenLagrangian
 
static constexpr auto stressType = StressTags::PK2
 

Protected Member Functions

void bindImpl ()
 A helper function to bind the local view to the element. More...
 
template<typename ScalarType >
void calculateMatrixImpl (const Requirement &par, const MatrixAffordance &affordance, typename Traits::template MatrixType<> K, const VectorXOptRef< ScalarType > &dx=std::nullopt) const
 Calculate the matrix associated with the given Requirement. More...
 
template<typename ScalarType >
auto calculateScalarImpl (const Requirement &par, ScalarAffordance affordance, const VectorXOptRef< ScalarType > &dx=std::nullopt) const -> ScalarType
 
template<typename ScalarType >
void calculateVectorImpl (const Requirement &par, VectorAffordance affordance, typename Traits::template VectorType< ScalarType > force, const VectorXOptRef< ScalarType > &dx=std::nullopt) const
 

Detailed Description

template<typename PreFE, typename FE, typename PRE>
class Ikarus::DisplacementPressure< PreFE, FE, PRE >
Template Parameters
PreFEThe type of the total pre finite element.
FEThe type of the finite element.
PREThe type of the displacement-pressure pre finite element.

Member Typedef Documentation

◆ Basis

template<typename PreFE , typename FE , typename PRE >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::Basis = typename Traits::Basis

◆ BopType

template<typename PreFE , typename FE , typename PRE >
template<typename ST = double>
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::BopType = Eigen::Matrix<ST, strainDim, myDim>

◆ DecomposedDevType

template<typename PreFE , typename FE , typename PRE >
template<typename MAT >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::DecomposedDevType = typename Materials::DecomposedMaterialTypes<MaterialType>::DevType

◆ DecomposedVolType

template<typename PreFE , typename FE , typename PRE >
template<typename MAT >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::DecomposedVolType = typename Materials::DecomposedMaterialTypes<MaterialType>::VolType

◆ DPConstitutiveDriverType

template<typename PreFE , typename FE , typename PRE >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::DPConstitutiveDriverType = Impl::DPConstitutiveDriver<DecomposedDevType<MaterialType>, DecomposedVolType<MaterialType> >

◆ Element

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

◆ FlatBasis

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

◆ Geometry

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

◆ GridView

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

◆ KgType

template<typename PreFE , typename FE , typename PRE >
template<typename ST = double>
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::KgType = Eigen::Matrix<ST, myDim, myDim>

◆ LocalBasisTypeP

template<typename PreFE , typename FE , typename PRE >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::LocalBasisTypeP = decltype(std::declval<LocalView>().tree().child(Dune::Indices::_1).finiteElement().localBasis())

◆ LocalBasisTypeU

template<typename PreFE , typename FE , typename PRE >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::LocalBasisTypeU = decltype(std::declval<LocalView>().tree().child(Dune::Indices::_0).child(0).finiteElement().localBasis())

◆ LocalView

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

◆ MaterialType

template<typename PreFE , typename FE , typename PRE >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::MaterialType = typename Pre::Material

◆ Pre

template<typename PreFE , typename FE , typename PRE >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::Pre = PRE

◆ Requirement

template<typename PreFE , typename FE , typename PRE >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::Requirement = FERequirements<FESolutions::displacement, FEParameter::loadfactor>

◆ RTWrapperType

template<typename PreFE , typename FE , typename PRE >
template<template< typename, int, int > class RT>
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::RTWrapperType = ResultWrapper<RT<typename Traits::ctype, myDim, Traits::worlddim>, ResultShape::Vector>

◆ StrainType

template<typename PreFE , typename FE , typename PRE >
template<typename ST = double>
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::StrainType = Eigen::Vector<ST, strainDim>

◆ SupportedResultTypes

using Ikarus::ResultTypeBase< ResultTypes >::SupportedResultTypes = std::tuple<decltype(makeRT<ResultTypes>())...>
inherited

◆ Traits

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

◆ VectorXOptRef

template<typename PreFE , typename FE , typename PRE >
template<typename ST >
using Ikarus::DisplacementPressure< PreFE, FE, PRE >::VectorXOptRef = std::optional<std::reference_wrapper<const Eigen::VectorX<ST> >>

Constructor & Destructor Documentation

◆ DisplacementPressure()

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

Member Function Documentation

◆ bindImpl()

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

◆ calculateAtImpl()

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

◆ calculateMatrixImpl()

template<typename PreFE , typename FE , typename PRE >
template<typename ScalarType >
void Ikarus::DisplacementPressure< PreFE, FE, PRE >::calculateMatrixImpl ( const Requirement par,
const MatrixAffordance affordance,
typename Traits::template MatrixType<>  K,
const VectorXOptRef< ScalarType > &  dx = std::nullopt 
) const
inlineprotected
Template Parameters
ScalarTypeThe scalar type for the calculation.
Parameters
parThe Requirement object specifying the requirements for the calculation.
KThe matrix to store the calculated result.

◆ calculateScalarImpl()

template<typename PreFE , typename FE , typename PRE >
template<typename ScalarType >
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::calculateScalarImpl ( const Requirement par,
ScalarAffordance  affordance,
const VectorXOptRef< ScalarType > &  dx = std::nullopt 
) const -> ScalarType
inlineprotected

◆ calculateVectorImpl()

template<typename PreFE , typename FE , typename PRE >
template<typename ScalarType >
void Ikarus::DisplacementPressure< PreFE, FE, PRE >::calculateVectorImpl ( const Requirement par,
VectorAffordance  affordance,
typename Traits::template VectorType< ScalarType >  force,
const VectorXOptRef< ScalarType > &  dx = std::nullopt 
) const
inlineprotected

◆ constitutiveDriver()

template<typename PreFE , typename FE , typename PRE >
template<typename ScalarType = double>
decltype(auto) Ikarus::DisplacementPressure< PreFE, FE, PRE >::constitutiveDriver ( ) const
inline

◆ displacementFunction()

template<typename PreFE , typename FE , typename PRE >
template<typename ScalarType = double>
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::displacementFunction ( const Requirement par,
const VectorXOptRef< ScalarType > &  dx = std::nullopt 
) const
inline
Template Parameters
ScalarTypeThe scalar type for the displacement function.
Parameters
parThe Requirement object.
dxOptional displacement vector.
Returns
A StandardLocalFunction representing the displacement function.
Here is the caller graph for this function:

◆ energyFunction()

template<typename PreFE , typename FE , typename PRE >
template<typename ST >
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::energyFunction ( const Requirement par,
const VectorXOptRef< ST > &  dx = std::nullopt 
) const
inline
Template Parameters
STThe scalar type for the material and strain.
Parameters
parThe Requirement object.
dxOptional displacement vector.
Returns
A lambda function that returns the intenral energy at a given integration point and its index.
Here is the caller graph for this function:

◆ geometricStiffnessMatrixFunction()

template<typename PreFE , typename FE , typename PRE >
template<typename ST >
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::geometricStiffnessMatrixFunction ( const Requirement par,
typename Traits::template MatrixType< ST > &  K,
const VectorXOptRef< ST > &  dx = std::nullopt 
) const
inline
Template Parameters
STThe scalar type for the material and strain.
Parameters
parThe Requirement object.
dxOptional displacement vector.
KThe matrix to store the calculated result.
Returns
A lambda function that evaluates the stiffness matrix for a given strain, integration point and its index.

◆ geometry()

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

◆ internalForcesFunction()

template<typename PreFE , typename FE , typename PRE >
template<typename ST >
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::internalForcesFunction ( const Requirement par,
typename Traits::template VectorType< ST > &  force,
const VectorXOptRef< ST > &  dx = std::nullopt 
) const
inline
Template Parameters
STThe scalar type for the material and strain.
Parameters
parThe Requirement object.
dxOptional displacement vector.
forceThe vector to store the calculated result.
Returns
A lambda function that evaluates the intenral force vector for a given strain, integration point and its index.

◆ localBasis()

template<typename PreFE , typename FE , typename PRE >
const Dune::CachedLocalBasis< std::remove_cvref_t< LocalBasisTypeU > > & Ikarus::DisplacementPressure< PreFE, FE, PRE >::localBasis ( ) const
inline

◆ localBasisP()

template<typename PreFE , typename FE , typename PRE >
const Dune::CachedLocalBasis< std::remove_cvref_t< LocalBasisTypeP > > & Ikarus::DisplacementPressure< PreFE, FE, PRE >::localBasisP ( ) const
inline

◆ materialStiffnessMatrixFunction()

template<typename PreFE , typename FE , typename PRE >
template<typename ST >
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::materialStiffnessMatrixFunction ( const Requirement par,
typename Traits::template MatrixType< ST > &  K,
const VectorXOptRef< ST > &  dx = std::nullopt 
) const
inline
Template Parameters
STThe scalar type for the material and strain.
Parameters
parThe Requirement object.
dxOptional displacement vector.
KThe matrix to store the calculated result.
Returns
A lambda function that evaluates the stiffness matrix for a given strain, integration point and its index.

◆ numberOfNodes()

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

◆ order()

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

◆ pressureFunction()

template<typename PreFE , typename FE , typename PRE >
template<typename ScalarType = double>
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::pressureFunction ( const Requirement par,
const VectorXOptRef< ScalarType > &  dx = std::nullopt 
) const
inline
Template Parameters
ScalarTypeThe scalar type for the pressure function.
Parameters
parThe Requirement object.
dxOptional displacement vector.
Returns
A StandardLocalFunction representing the pressure function.
Here is the caller graph for this function:

◆ resultFunction()

template<typename PreFE , typename FE , typename PRE >
template<template< typename, int, int > class RT>
requires (supportsResultType<RT>())
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::resultFunction ( ) const
inline
Template Parameters
RTThe type representing the requested result.
Returns
A lambda function that evaluates the requested result type for a given strain (in Voigt notation).

◆ strainFunction()

template<typename PreFE , typename FE , typename PRE >
template<typename ScalarType = double>
auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::strainFunction ( const Requirement par,
const VectorXOptRef< ScalarType > &  dx = std::nullopt 
) const
inline
Template Parameters
ScalarTypeThe scalar type for the strain function.
Parameters
parThe Requirement object.
dxOptional displacement vector.
Returns
The strain function calculated using greenLagrangeStrains.
Here is the caller graph for this function:

◆ supportsResultType()

static consteval bool Ikarus::ResultTypeBase< ResultTypes >::supportsResultType ( )
inlinestaticinherited
Template Parameters
RTrequested ResultType

Member Data Documentation

◆ myDim

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

◆ strainDim

template<typename PreFE , typename FE , typename PRE >
constexpr int Ikarus::DisplacementPressure< PreFE, FE, PRE >::strainDim = myDim * (myDim + 1) / 2
staticconstexpr

◆ strainType

template<typename PreFE , typename FE , typename PRE >
constexpr auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::strainType = StrainTags::greenLagrangian
staticconstexpr

◆ stressType

template<typename PreFE , typename FE , typename PRE >
constexpr auto Ikarus::DisplacementPressure< PreFE, FE, PRE >::stressType = StressTags::PK2
staticconstexpr

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