Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vulpes::fe::FeExpressionFunctionWrapperTensor< Dim > Class Template Reference

Class that wraps a user-provided function that returns a tensor, evaluated at the quadrature points. More...

#include <fe_expr_func.hpp>

Inheritance diagram for vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >:
[legend]
Collaboration diagram for vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >:
[legend]

Public Types

using OutputType = Eigen::Matrix<double, Dim, Dim>
using FuncT = std::function<OutputType(const Eigen::Vector<double, Dim>&)>
using FeSpaceType
 Type of the associated Finite Element Space.

Public Member Functions

constexpr FeExpressionFunctionWrapperTensor (const FuncT &func, std::size_t order)
 FeExpressionFunctionWrapperTensor (const FeExpressionFunctionWrapperTensor &)=delete
FeExpressionFunctionWrapperTensor & operator= (const FeExpressionFunctionWrapperTensor &)=delete
 FeExpressionFunctionWrapperTensor (FeExpressionFunctionWrapperTensor &&)=delete
FeExpressionFunctionWrapperTensor & operator= (FeExpressionFunctionWrapperTensor &&)=delete
template<std::size_t J = 0, std::size_t I = 0>
decltype(auto) evaluate (const FeValues< Dim > &, std::size_t, std::size_t, std::size_t q) const
constexpr UpdateFlagsType computeUpdateFlags () const
constexpr std::size_t computeOrder () const
constexpr bool precompute (const FeValues< Dim > &fe_values, const CellsType< Dim > &) const
decltype(auto) evaluatePoly (const FeValues< Dim > &, std::size_t, std::size_t, std::size_t, std::size_t) const
decltype(auto) evaluatePolyCoef (const auto &, const auto &, std::size_t, std::size_t) const
constexpr const auto & feSpace () const
 Get the associated Finite Element Space.
constexpr FeExpressionUnaryMinus< Dim, FeExpressionFunctionWrapperTensor< Dim > > operator- () const
 Unary minus operator for the FE expression.

Static Public Attributes

static constexpr bool is_leaf = true
static constexpr uint8_t is_bilinear = IsNothing
static constexpr std::size_t k_index_begin
 Index the block of the expression starts from (for vectorial problems).
static constexpr std::size_t k_index_end
 Index the block of the expression ends to (for vectorial problems).

Protected Member Functions

const FeExpressionFunctionWrapperTensor< Dim > & self () const

Protected Attributes

const FuncT m_func
std::vector< OutputType > m_evals
const std::size_t m_order

Detailed Description

template<std::size_t Dim>
class vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >

Class that wraps a user-provided function that returns a tensor, evaluated at the quadrature points.

order is the polynomial degree assumed for the function when quadrature rules are chosen; it has no default. For a non-polynomial function use at least p + 1, typically p + 3, where p is the degree of the FE space it is integrated against.

Member Typedef Documentation

◆ FeSpaceType

using vulpes::fe::FeExpressionBase< Dim, FeExpressionFunctionWrapperTensor< Dim > >::FeSpaceType
inherited

Type of the associated Finite Element Space.

◆ FuncT

template<std::size_t Dim>
using vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::FuncT = std::function<OutputType(const Eigen::Vector<double, Dim>&)>

◆ OutputType

template<std::size_t Dim>
using vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::OutputType = Eigen::Matrix<double, Dim, Dim>

Constructor & Destructor Documentation

◆ FeExpressionFunctionWrapperTensor() [1/3]

template<std::size_t Dim>
vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::FeExpressionFunctionWrapperTensor ( const FuncT & func,
std::size_t order )
inlineexplicitconstexpr

◆ FeExpressionFunctionWrapperTensor() [2/3]

template<std::size_t Dim>
vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::FeExpressionFunctionWrapperTensor ( const FeExpressionFunctionWrapperTensor< Dim > & )
delete

◆ FeExpressionFunctionWrapperTensor() [3/3]

template<std::size_t Dim>
vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::FeExpressionFunctionWrapperTensor ( FeExpressionFunctionWrapperTensor< Dim > && )
delete

Member Function Documentation

◆ computeOrder()

template<std::size_t Dim>
std::size_t vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::computeOrder ( ) const
inlineconstexpr

◆ computeUpdateFlags()

template<std::size_t Dim>
UpdateFlagsType vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::computeUpdateFlags ( ) const
inlineconstexpr

◆ evaluate()

template<std::size_t Dim>
template<std::size_t J = 0, std::size_t I = 0>
decltype(auto) vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::evaluate ( const FeValues< Dim > & ,
std::size_t ,
std::size_t ,
std::size_t q ) const
inline

◆ evaluatePoly()

template<std::size_t Dim>
decltype(auto) vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::evaluatePoly ( const FeValues< Dim > & ,
std::size_t ,
std::size_t ,
std::size_t ,
std::size_t  ) const
inline

◆ evaluatePolyCoef()

template<std::size_t Dim>
decltype(auto) vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::evaluatePolyCoef ( const auto & ,
const auto & ,
std::size_t ,
std::size_t  ) const
inline

◆ feSpace()

const auto & vulpes::fe::FeExpressionBase< Dim, FeExpressionFunctionWrapperTensor< Dim > >::feSpace ( ) const
inlineconstexprinherited

Get the associated Finite Element Space.

◆ operator-()

FeExpressionUnaryMinus< Dim, FeExpressionFunctionWrapperTensor< Dim > > vulpes::fe::FeExpressionBase< Dim, FeExpressionFunctionWrapperTensor< Dim > >::operator- ( ) const
inlineconstexprinherited

Unary minus operator for the FE expression.

Returns
New FE expression representing the negation of the current one

◆ operator=() [1/2]

template<std::size_t Dim>
FeExpressionFunctionWrapperTensor & vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::operator= ( const FeExpressionFunctionWrapperTensor< Dim > & )
delete

◆ operator=() [2/2]

◆ precompute()

template<std::size_t Dim>
bool vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::precompute ( const FeValues< Dim > & fe_values,
const CellsType< Dim > &  ) const
inlineconstexpr

◆ self()

const FeExpressionFunctionWrapperTensor< Dim > & vulpes::fe::FeExpressionBase< Dim, FeExpressionFunctionWrapperTensor< Dim > >::self ( ) const
inlineprotectedinherited

Member Data Documentation

◆ is_bilinear

template<std::size_t Dim>
uint8_t vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::is_bilinear = IsNothing
staticconstexpr

◆ is_leaf

template<std::size_t Dim>
bool vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::is_leaf = true
staticconstexpr

◆ k_index_begin

std::size_t vulpes::fe::FeExpressionBase< Dim, FeExpressionFunctionWrapperTensor< Dim > >::k_index_begin
inlinestaticconstexprinherited

Index the block of the expression starts from (for vectorial problems).

◆ k_index_end

std::size_t vulpes::fe::FeExpressionBase< Dim, FeExpressionFunctionWrapperTensor< Dim > >::k_index_end
inlinestaticconstexprinherited

Index the block of the expression ends to (for vectorial problems).

◆ m_evals

template<std::size_t Dim>
std::vector<OutputType> vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::m_evals
mutableprotected

◆ m_func

template<std::size_t Dim>
const FuncT vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::m_func
protected

◆ m_order

template<std::size_t Dim>
const std::size_t vulpes::fe::FeExpressionFunctionWrapperTensor< Dim >::m_order
protected

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