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

Class that wraps a face function given by one value per quadrature point, filled by a user function that may read the neighbour's values at the same physical points (fe_values.neighValues()), e.g. a numerical trace built from both sides of the face. More...

#include <fe_expr_func.hpp>

Inheritance diagram for vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >:
[legend]
Collaboration diagram for vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >:
[legend]

Public Types

using FuncType
using FeSpaceType
 Type of the associated Finite Element Space.

Public Member Functions

constexpr FeExpressionFacePointsNeedNeigh (const FuncType &func, std::size_t order)
 FeExpressionFacePointsNeedNeigh (const FeExpressionFacePointsNeedNeigh &)=delete
FeExpressionFacePointsNeedNeigh & operator= (const FeExpressionFacePointsNeedNeigh &)=delete
 FeExpressionFacePointsNeedNeigh (FeExpressionFacePointsNeedNeigh &&)=delete
FeExpressionFacePointsNeedNeigh & operator= (FeExpressionFacePointsNeedNeigh &&)=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
bool precompute (const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) 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, FeExpressionFacePointsNeedNeigh< Dim, UpdateValues > > 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 FeExpressionFacePointsNeedNeigh< Dim, UpdateValues > & self () const

Protected Attributes

const FuncType m_func
const std::size_t m_order
std::vector< double > m_vals

Detailed Description

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
class vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >

Class that wraps a face function given by one value per quadrature point, filled by a user function that may read the neighbour's values at the same physical points (fe_values.neighValues()), e.g. a numerical trace built from both sides of the face.

The user function receives the values vector sized to the number of quadrature points. order is the polynomial degree assumed for the values when quadrature rules are chosen. As for any leaf with UpdateNeighborValues, forms using it are integrated only on faces with a neighbour.

Template Parameters
ExtraFlagsUpdate flags the user function needs on both sides, added to UpdateNeighborCell | UpdateNeighborValues (default: shape values).

Member Typedef Documentation

◆ FeSpaceType

using vulpes::fe::FeExpressionBase< Dim, FeExpressionFacePointsNeedNeigh< Dim, UpdateValues > >::FeSpaceType
inherited

Type of the associated Finite Element Space.

◆ FuncType

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
using vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::FuncType
Initial value:
std::function<void(
const FeValues<Dim>&, const CellsType<Dim>&, std::vector<double>&)>
This class works as a cache table for computing efficiently the value of the basis function and its d...
Definition fe_values.hpp:94
std::vector< std::unique_ptr< CellType< Dim > > > CellsType
Definition fe_expr_base.hpp:44

Constructor & Destructor Documentation

◆ FeExpressionFacePointsNeedNeigh() [1/3]

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::FeExpressionFacePointsNeedNeigh ( const FuncType & func,
std::size_t order )
inlineconstexpr

◆ FeExpressionFacePointsNeedNeigh() [2/3]

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::FeExpressionFacePointsNeedNeigh ( const FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags > & )
delete

◆ FeExpressionFacePointsNeedNeigh() [3/3]

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::FeExpressionFacePointsNeedNeigh ( FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags > && )
delete

Member Function Documentation

◆ computeOrder()

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
std::size_t vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::computeOrder ( ) const
inlineconstexpr

◆ computeUpdateFlags()

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
UpdateFlagsType vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::computeUpdateFlags ( ) const
inlineconstexpr

◆ evaluate()

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

◆ evaluatePoly()

decltype(auto) vulpes::fe::FeExpressionBase< Dim, FeExpressionFacePointsNeedNeigh< Dim, UpdateValues > >::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, FeExpressionFacePointsNeedNeigh< Dim, UpdateValues > >::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, FeExpressionFacePointsNeedNeigh< Dim, UpdateValues > >::feSpace ( ) const
inlineconstexprinherited

Get the associated Finite Element Space.

◆ operator-()

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, UpdateFlagsType ExtraFlags = UpdateValues>
FeExpressionFacePointsNeedNeigh & vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::operator= ( const FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags > & )
delete

◆ operator=() [2/2]

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
FeExpressionFacePointsNeedNeigh & vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::operator= ( FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags > && )
delete

◆ precompute()

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
bool vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::precompute ( const FeValues< Dim > & fe_values,
const CellsType< Dim > & cells ) const
inline

◆ self()

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

Member Data Documentation

◆ is_bilinear

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
uint8_t vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::is_bilinear = IsNothing
staticconstexpr

◆ is_leaf

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
bool vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::is_leaf = true
staticconstexpr

◆ k_index_begin

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

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

◆ m_func

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
const FuncType vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::m_func
protected

◆ m_order

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
const std::size_t vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::m_order
protected

◆ m_vals

template<std::size_t Dim, UpdateFlagsType ExtraFlags = UpdateValues>
std::vector<double> vulpes::fe::FeExpressionFacePointsNeedNeigh< Dim, ExtraFlags >::m_vals
mutableprotected

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