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

Base class for Finite Element Expressions. More...

#include <fe_expr_base.hpp>

Public Types

using FeSpaceType = void
 Type of the associated Finite Element Space.

Public Member Functions

constexpr const auto & feSpace () const
 Get the associated Finite Element Space.
template<std::size_t J = 0, std::size_t I = 0>
decltype(auto) evaluate (const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t q) const
 Evaluate the finite element expression evaluated at function basis i and j and at quadrature point q.
decltype(auto) evaluatePoly (const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t bi, std::size_t bj) const
 Compute the polynomial associated to the expression for basis i and j and block bi and bj.
decltype(auto) evaluatePolyCoef (const auto &mapping, const auto &fe_values, std::size_t bi, std::size_t bj) const
 Compute the coefficients of the polynomial associated to the expression for basis i and j and block bi and bj.
constexpr UpdateFlagsType computeUpdateFlags () const
 Compute the update flags required by the expression for the update in the FeValues.
constexpr std::size_t computeOrder () const
 Compute the polynomial order required by the expression.
constexpr bool precompute (const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) const
 Precompute any necessary data for the expression based on the FE values and the cells.
constexpr FeExpressionUnaryMinus< Dim, FeExpression > operator- () const
 Unary minus operator for the FE expression.

Static Public Attributes

static constexpr bool is_leaf = false
 Indicates if the expression is a leaf node in the expression tree.
static constexpr uint8_t is_bilinear = IsNothing
 Indicates the appearance of trial/test functions in the expression.
static constexpr std::size_t k_index_begin = -1
 Index the block of the expression starts from (for vectorial problems).
static constexpr std::size_t k_index_end = 0
 Index the block of the expression ends to (for vectorial problems).

Protected Member Functions

const FeExpression & self () const

Detailed Description

template<std::size_t Dim, typename FeExpression>
class vulpes::fe::FeExpressionBase< Dim, FeExpression >

Base class for Finite Element Expressions.

Template Parameters
DimSpatial dimension
FeExpressionDerived FE Expression type

Member Typedef Documentation

◆ FeSpaceType

template<std::size_t Dim, typename FeExpression>
using vulpes::fe::FeExpressionBase< Dim, FeExpression >::FeSpaceType = void

Type of the associated Finite Element Space.

Member Function Documentation

◆ computeOrder()

template<std::size_t Dim, typename FeExpression>
std::size_t vulpes::fe::FeExpressionBase< Dim, FeExpression >::computeOrder ( ) const
inlineconstexpr

Compute the polynomial order required by the expression.

Returns
Polynomial order

◆ computeUpdateFlags()

template<std::size_t Dim, typename FeExpression>
UpdateFlagsType vulpes::fe::FeExpressionBase< Dim, FeExpression >::computeUpdateFlags ( ) const
inlineconstexpr

Compute the update flags required by the expression for the update in the FeValues.

Returns
Update flags

◆ evaluate()

template<std::size_t Dim, typename FeExpression>
template<std::size_t J = 0, std::size_t I = 0>
decltype(auto) vulpes::fe::FeExpressionBase< Dim, FeExpression >::evaluate ( const FeValues< Dim > & fe_values,
std::size_t j,
std::size_t i,
std::size_t q ) const
inline

Evaluate the finite element expression evaluated at function basis i and j and at quadrature point q.

Template Parameters
IBlock index of the trial function
JBlock index of the test function
Parameters
fe_valuesFinite element values at quadrature points
jIndex of the trial function basis
iIndex of the test function basis
qIndex of the quadrature point
Returns
Evaluation result (double or Eigen type)

◆ evaluatePoly()

template<std::size_t Dim, typename FeExpression>
decltype(auto) vulpes::fe::FeExpressionBase< Dim, FeExpression >::evaluatePoly ( const FeValues< Dim > & fe_values,
std::size_t j,
std::size_t i,
std::size_t bi,
std::size_t bj ) const
inline

Compute the polynomial associated to the expression for basis i and j and block bi and bj.

Parameters
fe_valuesFinite element values at quadrature points
jIndex of the trial function basis
iIndex of the test function basis
biBlock index of the trial function
bjBlock index of the test function
Returns
Matrix of polynomials associated to the expression

We use the convention that in the result, each row corresponds to a spatial direction (this extends also to tensors, by unrolling them), while each column corresponds to a addendum of the expression requiring a particular pullback/pushforward transformation. These coefficients are computed by the evaluatePolyCoef method.

◆ evaluatePolyCoef()

template<std::size_t Dim, typename FeExpression>
decltype(auto) vulpes::fe::FeExpressionBase< Dim, FeExpression >::evaluatePolyCoef ( const auto & mapping,
const auto & fe_values,
std::size_t bi,
std::size_t bj ) const
inline

Compute the coefficients of the polynomial associated to the expression for basis i and j and block bi and bj.

Parameters
mappingThe mapping used for the FE
fe_valuesFinite element values at quadrature points
biBlock index of the trial function
bjBlock index of the test function
Returns
Matrix of coefficients associated to the polynomial expression

The coefficients are the pullback/pushforward needed by each of the polynomial returned by evaluatePoly. Each column corresponds to an addendum of the expression requiring a particular pullback/pushforward transformation. Each row corresponds to a spatial direction (this extends also to tensors, by unrolling them).

◆ feSpace()

template<std::size_t Dim, typename FeExpression>
const auto & vulpes::fe::FeExpressionBase< Dim, FeExpression >::feSpace ( ) const
inlineconstexpr

Get the associated Finite Element Space.

◆ operator-()

template<std::size_t Dim, typename FeExpression>
FeExpressionUnaryMinus< Dim, FeExpression > vulpes::fe::FeExpressionBase< Dim, FeExpression >::operator- ( ) const
inlineconstexpr

Unary minus operator for the FE expression.

Returns
New FE expression representing the negation of the current one

◆ precompute()

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

Precompute any necessary data for the expression based on the FE values and the cells.

Parameters
fe_valuesFinite element values at quadrature points
cellsCells associated to the FE values
Returns
true if precomputation was successful, false otherwise

◆ self()

template<std::size_t Dim, typename FeExpression>
const FeExpression & vulpes::fe::FeExpressionBase< Dim, FeExpression >::self ( ) const
inlineprotected

Member Data Documentation

◆ is_bilinear

template<std::size_t Dim, typename FeExpression>
uint8_t vulpes::fe::FeExpressionBase< Dim, FeExpression >::is_bilinear = IsNothing
inlinestaticconstexpr

Indicates the appearance of trial/test functions in the expression.

◆ is_leaf

template<std::size_t Dim, typename FeExpression>
bool vulpes::fe::FeExpressionBase< Dim, FeExpression >::is_leaf = false
inlinestaticconstexpr

Indicates if the expression is a leaf node in the expression tree.

◆ k_index_begin

template<std::size_t Dim, typename FeExpression>
std::size_t vulpes::fe::FeExpressionBase< Dim, FeExpression >::k_index_begin = -1
inlinestaticconstexpr

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

◆ k_index_end

template<std::size_t Dim, typename FeExpression>
std::size_t vulpes::fe::FeExpressionBase< Dim, FeExpression >::k_index_end = 0
inlinestaticconstexpr

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


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