version 0.4.1
Ikarus::ResultWrapper< RT, storedResultShape > Struct Template Reference

Container that is used for FE Results. It gives access to the stored value, but can also be used to access the result in Matrix and Vector form. More...

#include <ikarus/finiteelements/feresulttypes.hh>

Inheritance diagram for Ikarus::ResultWrapper< RT, storedResultShape >:
[legend]

Public Types

using VecType = std::invoke_result_t< decltype(&RT::Vectorizer::template transform< ResultTypeValueType >), const ResultTypeValueType & >
 
using MatType = std::invoke_result_t< decltype(&RT::Matricizer::template transform< VecType, rowsAtCompileTime, colsAtCompileTime >), const VecType &, int, int >
 
using StoredType = std::conditional_t< storedValueIsVector, VecType, MatType >
 
using ResultType = RT
 

Public Member Functions

auto asVec () const
 Returns the stored value as Vector. More...
 
auto asMat (Eigen::Index rows=rowsAtCompileTime, Eigen::Index cols=colsAtCompileTime) const
 Returns the stored value as Matrix (if possible) More...
 
 ResultWrapper ()=default
 
 ResultWrapper (StoredType &&value)
 
 ResultWrapper (const StoredType &value)
 
ResultWrapperoperator= (const StoredType &value)
 
ResultWrapperoperator= (StoredType &&value)
 

Detailed Description

template<typename RT, ResultShape storedResultShape = ResultShape::Vector>
struct Ikarus::ResultWrapper< RT, storedResultShape >
Template Parameters
RTA specified ResultType
storedResultShapeboolean indicating whether the stored result is in its vector form, defaults to true

Member Typedef Documentation

◆ MatType

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
using Ikarus::ResultWrapper< RT, storedResultShape >::MatType = std::invoke_result_t<decltype(&RT::Matricizer::template transform<VecType, rowsAtCompileTime, colsAtCompileTime>), const VecType&, int, int>

◆ ResultType

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
using Ikarus::ResultWrapper< RT, storedResultShape >::ResultType = RT

◆ StoredType

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
using Ikarus::ResultWrapper< RT, storedResultShape >::StoredType = std::conditional_t<storedValueIsVector, VecType, MatType>

◆ VecType

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
using Ikarus::ResultWrapper< RT, storedResultShape >::VecType = std::invoke_result_t<decltype(&RT::Vectorizer::template transform<ResultTypeValueType>), const ResultTypeValueType&>

Constructor & Destructor Documentation

◆ ResultWrapper() [1/3]

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
Ikarus::ResultWrapper< RT, storedResultShape >::ResultWrapper ( )
explicitdefault

◆ ResultWrapper() [2/3]

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
Ikarus::ResultWrapper< RT, storedResultShape >::ResultWrapper ( StoredType &&  value)
inlineexplicit

◆ ResultWrapper() [3/3]

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
Ikarus::ResultWrapper< RT, storedResultShape >::ResultWrapper ( const StoredType value)
inlineexplicit

Member Function Documentation

◆ asMat()

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
auto Ikarus::ResultWrapper< RT, storedResultShape >::asMat ( Eigen::Index  rows = rowsAtCompileTime,
Eigen::Index  cols = colsAtCompileTime 
) const
inline
Parameters
rowsspecify the rows of the matrix for dynamic sized Result Types
colsspecify the columns of the matrix for dynamic sized Result Types
Returns
matrix representation of the stored value

◆ asVec()

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
auto Ikarus::ResultWrapper< RT, storedResultShape >::asVec ( ) const
inline
Returns
vector representation of the stored value

◆ operator=() [1/2]

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
ResultWrapper & Ikarus::ResultWrapper< RT, storedResultShape >::operator= ( const StoredType value)
inline

◆ operator=() [2/2]

template<typename RT , ResultShape storedResultShape = ResultShape::Vector>
ResultWrapper & Ikarus::ResultWrapper< RT, storedResultShape >::operator= ( StoredType &&  value)
inline

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