version 0.4
Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff > Class Template Reference

AutoDiffFE class, an automatic differentiation wrapper for finite elements. More...

#include <ikarus/finiteelements/febases/autodifffe.hh>

Inheritance diagram for Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >:
[legend]

Public Types

using RealFE = RealFE_
 Type of the base finite element. More...
 
using Basis = typename RealFE::Basis
 Type of the basis. More...
 
using Traits = TraitsFromFE< Basis, FERequirementType_, useEigenRef >
 Type traits for local view. More...
 
using LocalView = typename Traits::LocalView
 Type of the local view. More...
 
using Element = typename Traits::Element
 Type of the element. More...
 
using FERequirementType = typename Traits::FERequirementType
 Type of the Finite Element Requirements. More...
 

Public Member Functions

void calculateMatrix (const FERequirementType &req, typename Traits::template MatrixType<> h) const
 Calculate the matrix associated with the finite element. More...
 
void calculateVector (const FERequirementType &req, typename Traits::template VectorType<> g) const
 Calculate the vector associated with the finite element. More...
 
void calculateLocalSystem (const FERequirementType &req, typename Traits::template MatrixType<> h, typename Traits::template VectorType<> g) const
 Calculate the local system associated with the finite element. More...
 
double calculateScalar (const FERequirementType &par) const
 Calculate the scalar value associated with the finite element. More...
 
const RealFErealFE () const
 Get the reference to the base finite element. More...
 
template<typename... Args>
 AutoDiffFE (Args &&... args)
 Constructor for the AutoDiffFE class. Forward the construction to the underlying element. More...
 

Detailed Description

template<typename RealFE_, typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
class Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >
Template Parameters
RealFE_The type of the original finite element, which does not implement the derivatives
FERequirementType_Type of the Finite Element Requirements.
useEigenRefA boolean indicating whether to use Eigen::Ref for references types in calculateMatrix,...
forceAutoDiffA boolean indicating whether to force the use of automatic differentiation, even when the real element implements the derivatives.

Member Typedef Documentation

◆ Basis

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
using Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::Basis = typename RealFE::Basis

◆ Element

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
using Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::Element = typename Traits::Element

◆ FERequirementType

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
using Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::FERequirementType = typename Traits::FERequirementType

◆ LocalView

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
using Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::LocalView = typename Traits::LocalView

◆ RealFE

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
using Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::RealFE = RealFE_

◆ Traits

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
using Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::Traits = TraitsFromFE<Basis, FERequirementType_, useEigenRef>

Constructor & Destructor Documentation

◆ AutoDiffFE()

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
template<typename... Args>
Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::AutoDiffFE ( Args &&...  args)
inlineexplicit
Template Parameters
ArgsVariadic template for constructor arguments.
Parameters
argsConstructor arguments.

Member Function Documentation

◆ calculateLocalSystem()

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
void Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::calculateLocalSystem ( const FERequirementType req,
typename Traits::template MatrixType<>  h,
typename Traits::template VectorType<>  g 
) const
inline
Parameters
reqFinite Element Requirements.
hMatrix to be calculated.
gVector to be calculated.

◆ calculateMatrix()

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
void Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::calculateMatrix ( const FERequirementType req,
typename Traits::template MatrixType<>  h 
) const
inline
Parameters
reqFinite Element Requirements.
hMatrix to be calculated.

◆ calculateScalar()

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
double Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::calculateScalar ( const FERequirementType par) const
inline
Parameters
parFinite Element Requirements.
Returns
The calculated scalar value.

◆ calculateVector()

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
void Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::calculateVector ( const FERequirementType req,
typename Traits::template VectorType<>  g 
) const
inline
Parameters
reqFinite Element Requirements.
gVector to be calculated.

◆ realFE()

template<typename RealFE_ , typename FERequirementType_ = FERequirements<>, bool useEigenRef = false, bool forceAutoDiff = false>
const RealFE & Ikarus::AutoDiffFE< RealFE_, FERequirementType_, useEigenRef, forceAutoDiff >::realFE ( ) const
inline
Returns
The reference to the base finite element.

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