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

Q-point based upwind flux expression built from a velocity callable. More...

#include <dg_utils.hpp>

Inheritance diagram for vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >:
[legend]
Collaboration diagram for vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >:
[legend]

Public Types

using FeSpaceType
 Type of the associated Finite Element Space.

Public Member Functions

constexpr FeExpressionUpwindFromFunctionWrapper (const VelocityFunc &velocity_func)
 FeExpressionUpwindFromFunctionWrapper (const FeExpressionUpwindFromFunctionWrapper &)=delete
FeExpressionUpwindFromFunctionWrapper & operator= (const FeExpressionUpwindFromFunctionWrapper &)=delete
 FeExpressionUpwindFromFunctionWrapper (FeExpressionUpwindFromFunctionWrapper &&)=delete
FeExpressionUpwindFromFunctionWrapper & operator= (FeExpressionUpwindFromFunctionWrapper &&)=delete
template<std::size_t I = 0, std::size_t J = 0>
decltype(auto) evaluate (const fe::FeValues< Dim > &, std::size_t, std::size_t, std::size_t q) const
constexpr fe::UpdateFlagsType computeUpdateFlags () const
constexpr std::size_t computeOrder () const
constexpr bool precompute (const fe::FeValues< Dim > &fe_values, const fe::CellsType< Dim > &) const
constexpr const auto & feSpace () const
 Get the associated Finite Element Space.
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 FeExpressionUnaryMinus< Dim, FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > > operator- () const
 Unary minus operator for the FE expression.

Static Public Attributes

static constexpr bool is_leaf = true
static constexpr uint8_t is_bilinear = fe::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 FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > & self () const

Protected Attributes

const VelocityFunc m_velocity_func
std::vector< double > m_evals

Detailed Description

template<std::size_t Dim, typename VelocityFunc>
class vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >

Q-point based upwind flux expression built from a velocity callable.

This expression evaluates velocity at face quadrature points (physical space) and computes 0.5 * (|v.n| + v.n) pointwise.

Member Typedef Documentation

◆ FeSpaceType

using vulpes::fe::FeExpressionBase< Dim, FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > >::FeSpaceType
inherited

Type of the associated Finite Element Space.

Constructor & Destructor Documentation

◆ FeExpressionUpwindFromFunctionWrapper() [1/3]

template<std::size_t Dim, typename VelocityFunc>
vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::FeExpressionUpwindFromFunctionWrapper ( const VelocityFunc & velocity_func)
inlineexplicitconstexpr

◆ FeExpressionUpwindFromFunctionWrapper() [2/3]

template<std::size_t Dim, typename VelocityFunc>
vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::FeExpressionUpwindFromFunctionWrapper ( const FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > & )
delete

◆ FeExpressionUpwindFromFunctionWrapper() [3/3]

template<std::size_t Dim, typename VelocityFunc>
vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::FeExpressionUpwindFromFunctionWrapper ( FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > && )
delete

Member Function Documentation

◆ computeOrder()

template<std::size_t Dim, typename VelocityFunc>
std::size_t vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::computeOrder ( ) const
inlineconstexpr

◆ computeUpdateFlags()

template<std::size_t Dim, typename VelocityFunc>
fe::UpdateFlagsType vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::computeUpdateFlags ( ) const
inlineconstexpr

◆ evaluate()

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

◆ evaluatePoly()

decltype(auto) vulpes::fe::FeExpressionBase< Dim, FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > >::evaluatePoly ( const FeValues< Dim > & fe_values,
std::size_t j,
std::size_t i,
std::size_t bi,
std::size_t bj ) const
inlineinherited

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()

decltype(auto) vulpes::fe::FeExpressionBase< Dim, FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > >::evaluatePolyCoef ( const auto & mapping,
const auto & fe_values,
std::size_t bi,
std::size_t bj ) const
inlineinherited

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()

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

Get the associated Finite Element Space.

◆ operator-()

FeExpressionUnaryMinus< Dim, FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > > vulpes::fe::FeExpressionBase< Dim, FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > >::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, typename VelocityFunc>
FeExpressionUpwindFromFunctionWrapper & vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::operator= ( const FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > & )
delete

◆ operator=() [2/2]

template<std::size_t Dim, typename VelocityFunc>
FeExpressionUpwindFromFunctionWrapper & vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::operator= ( FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > && )
delete

◆ precompute()

template<std::size_t Dim, typename VelocityFunc>
bool vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::precompute ( const fe::FeValues< Dim > & fe_values,
const fe::CellsType< Dim > &  ) const
inlineconstexpr

◆ self()

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

Member Data Documentation

◆ is_bilinear

template<std::size_t Dim, typename VelocityFunc>
uint8_t vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::is_bilinear = fe::IsNothing
staticconstexpr

◆ is_leaf

template<std::size_t Dim, typename VelocityFunc>
bool vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::is_leaf = true
staticconstexpr

◆ k_index_begin

std::size_t vulpes::fe::FeExpressionBase< Dim, FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > >::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, FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc > >::k_index_end
inlinestaticconstexprinherited

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

◆ m_evals

template<std::size_t Dim, typename VelocityFunc>
std::vector<double> vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::m_evals
mutableprotected

◆ m_velocity_func

template<std::size_t Dim, typename VelocityFunc>
const VelocityFunc vulpes::assemble::dg::FeExpressionUpwindFromFunctionWrapper< Dim, VelocityFunc >::m_velocity_func
protected

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