LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Public Member Functions | Private Attributes | List of all members
projects::dpg::ProductElementMatrixProviderBuilder< SCALAR > Class Template Reference

Builder class to build a ProductElementMatrixProvider. More...

#include </home/nico/bildung/SemVI/thesis/lehrfempp/projects/dpg/product_element_matrix_provider_builder.h>

Public Member Functions

 ProductElementMatrixProviderBuilder (const ProductElementMatrixProviderBuilder &)=delete
 standard constructor More...
 
 ProductElementMatrixProviderBuilder (ProductElementMatrixProviderBuilder &&) noexcept=delete
 
ProductElementMatrixProviderBuilderoperator= (const ProductElementMatrixProviderBuilder &)=delete
 
ProductElementMatrixProviderBuilderoperator= (ProductElementMatrixProviderBuilder &&)=delete
 
 ProductElementMatrixProviderBuilder (std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_trial, std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_test)
 main constructor, constructs a new builder More...
 
template<typename DIFF_COEFF >
ProductElementMatrixProviderBuilderAddDiffusionElementMatrixProvider (size_type trial_component, size_type test_component, DIFF_COEFF alpha)
 
template<typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
ProductElementMatrixProviderBuilderAddConvectionElementMatrixProvider (size_type trial_component, size_type test_component, CONVECTION_COEFF_1 beta_1, CONVECTION_COEFF_2 beta_2)
 
template<typename REACTION_COEFF >
ProductElementMatrixProviderBuilderAddReactionElementMatrixProvider (size_type trial_component, size_type test_component, REACTION_COEFF gamma)
 
template<typename DIFF_COEFF >
ProductElementMatrixProviderBuilderAddFluxElementMatrixProvider (size_type trial_component, size_type test_component, DIFF_COEFF alpha)
 
template<typename COEFF >
ProductElementMatrixProviderBuilderAddTraceElementMatrixProvider (size_type trial_component, size_type test_component, COEFF beta)
 
std::shared_ptr< ProductElementMatrixProvider< SCALAR > > Build ()
 Build the ProdcutElementMatrixProvider for the bilinear form \( b\) based on the provided bilinear forms \( b_k \). More...
 
 ~ProductElementMatrixProviderBuilder ()=default
 virtual destructor More...
 
template<typename DIFF_COEFF >
ProductElementMatrixProviderBuilder< SCALAR > & AddDiffusionElementMatrixProvider (size_type trial_component, size_type test_component, DIFF_COEFF alpha)
 
template<typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
ProductElementMatrixProviderBuilder< SCALAR > & AddConvectionElementMatrixProvider (size_type trial_component, size_type test_component, CONVECTION_COEFF_1 beta_1, CONVECTION_COEFF_2 beta_2)
 
template<typename REACTION_COEFF >
ProductElementMatrixProviderBuilder< SCALAR > & AddReactionElementMatrixProvider (size_type trial_component, size_type test_component, REACTION_COEFF gamma)
 
template<typename DIFF_COEFF >
ProductElementMatrixProviderBuilder< SCALAR > & AddFluxElementMatrixProvider (size_type trial_component, size_type test_component, DIFF_COEFF alpha)
 
template<typename COEFF >
ProductElementMatrixProviderBuilder< SCALAR > & AddTraceElementMatrixProvider (size_type trial_component, size_type test_component, COEFF beta)
 

Private Attributes

std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_trial_
 collection of specifications for the trial space More...
 
std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_test_
 collection of specifications for the test space More...
 
std::vector< std::shared_ptr< SubElementMatrixProvider< SCALAR > > > subproviders_
 vector of Element Matrix Providers representing already added bilinear forms More...
 

Detailed Description

template<typename SCALAR>
class projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >

Builder class to build a ProductElementMatrixProvider.

Template Parameters
SCALARtype of entries of the element matrics. Field type such as double

This class can be used to construct a ProductElementMatrixProvider between two product spaces

\[ U = U_0 \times U_1 \times \dots \times U_{n-1} \]

\[ V = V_0 \times V_1 \times \dots \times V_{m-1} \]

passed in the constructor. Methods are provided to add several bilinear forms

\[ b_k : U_{i_k} \times V_{j_k} \rightarrow \mathbb{R} \]

between two specified components of the spaces to the bilinear form.

The constructed ProductElementMatrixProvider evaluates element matrices of the bilinear form \( b: U \times V \rightarrow \mathbb{R} \) given by

\[ b((u_1, \dots, u_{n-1}),(v_1, \dots v_{m-1})) = \sum_{k} b_k(u_{i_k},v_{j_k}) \]

Definition at line 32 of file product_element_matrix_provider_builder.h.

Constructor & Destructor Documentation

◆ ProductElementMatrixProviderBuilder() [1/3]

template<typename SCALAR >
projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::ProductElementMatrixProviderBuilder ( const ProductElementMatrixProviderBuilder< SCALAR > &  )
delete

standard constructor

◆ ProductElementMatrixProviderBuilder() [2/3]

template<typename SCALAR >
projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::ProductElementMatrixProviderBuilder ( ProductElementMatrixProviderBuilder< SCALAR > &&  )
deletenoexcept

◆ ProductElementMatrixProviderBuilder() [3/3]

template<typename SCALAR >
projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::ProductElementMatrixProviderBuilder ( std::shared_ptr< ProductUniformFESpace< SCALAR > >  fe_space_trial,
std::shared_ptr< ProductUniformFESpace< SCALAR > >  fe_space_test 
)
inline

main constructor, constructs a new builder

Parameters
fe_space_trialcollection of specifications about the (product) trial space \( U \)
fe_space_testcollection of specifications about the (product) test space \( V \)

Definition at line 51 of file product_element_matrix_provider_builder.h.

◆ ~ProductElementMatrixProviderBuilder()

virtual destructor

Member Function Documentation

◆ AddConvectionElementMatrixProvider() [1/2]

template<typename SCALAR >
template<typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
ProductElementMatrixProviderBuilder & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddConvectionElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
CONVECTION_COEFF_1  beta_1,
CONVECTION_COEFF_2  beta_2 
)
@brief Adds a bilinear form \f$ b_k \f$ to \f$ b \f$ representing a

convection-like term.

Parameters
trial_componentindex of the trial component \( u \) of \( b_k \)
test_componentindex of the test component \( v \) of \( b_k \)
beta_1mesh function for the "first" vector valued convection coefficient \( \beta_1 \)
beta_2mesh function for the "second" vector valued convection coefficient \( \beta_2 \)
Template Parameters
CONVECTION_COEFF_1and CONVECTION_COEFF_2 see the type requirements of the template paramters CONVECTION_COEFF_1 and CONVECTION_COEFF_2 in the ConvectionElementMatrixProvider class.

The (local) added bilinear form \( b_k\) is

\[ (u,v) \mapsto\int\limits_{K} \mathbf{grad}\,v \cdot \boldsymbol{\beta_1}(\mathbf{x})u + \mathbf{grad}\,u \cdot \boldsymbol{\beta_2}(\mathbf{x})v \mathrm{d}\mathbf{x} \;, \]

For further information about the added bilinear form \( b_k \) see the documentation of ConvectionElementMatrixProvider

Referenced by projects::dpg::test::TestConververgencePrimalDPGAdaptedNormConvectionDiffusionDirichletBVP(), and projects::dpg::test::TestConververgencePrimalDPGConvectionDiffusionDirichletBVP().

◆ AddConvectionElementMatrixProvider() [2/2]

template<typename SCALAR >
template<typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
ProductElementMatrixProviderBuilder< SCALAR > & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddConvectionElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
CONVECTION_COEFF_1  beta_1,
CONVECTION_COEFF_2  beta_2 
)

Definition at line 242 of file product_element_matrix_provider_builder.h.

◆ AddDiffusionElementMatrixProvider() [1/2]

template<typename SCALAR >
template<typename DIFF_COEFF >
ProductElementMatrixProviderBuilder & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddDiffusionElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
DIFF_COEFF  alpha 
)
@brief Adds a bilinear form \f$ b_k \f$ to \f$ b \f$ representing a

diffusion term.

Parameters
trial_componentindex of the trial component \( u \) of \( b_k \)
test_componentindex of the test component \( v \) of \( b_k \)
alphamesh function of the matrix or scalar valued diffusion coefficient \( \alpha \)
Template Parameters
DIFF_COEFFsee the type requirements of the template parameter DIFF_COEFF in the DiffusionElementMatrixProvider class.

The (local) added bilinear form \( b_k\) is

\[ (u,v) \mapsto\int\limits_{K}\mathbf{grad}\,u \cdot \boldsymbol{\alpha}(\mathbf{x})\mathbf{grad}\,v \mathrm{d}\mathbf{x} \;, \]

For further information about the added bilinear form \( b_k \) see documentation of the class DiffusionElementMatrixProvider

Referenced by projects::dpg::test::TestConververgencePrimalDPGAdaptedNormConvectionDiffusionDirichletBVP(), and projects::dpg::test::TestConververgencePrimalDPGConvectionDiffusionDirichletBVP().

◆ AddDiffusionElementMatrixProvider() [2/2]

template<typename SCALAR >
template<typename DIFF_COEFF >
ProductElementMatrixProviderBuilder< SCALAR > & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddDiffusionElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
DIFF_COEFF  alpha 
)

Definition at line 229 of file product_element_matrix_provider_builder.h.

◆ AddFluxElementMatrixProvider() [1/2]

template<typename SCALAR >
template<typename DIFF_COEFF >
ProductElementMatrixProviderBuilder & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddFluxElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
DIFF_COEFF  alpha 
)
@brief Adds a bilinear form \f$ b_k \f$ to \f$ b \f$ representing a term

that involves a fulx component in the trial space.

Parameters
trial_componentindex of the trial component \( \hat{q}_n \) of \( b_k \). This component should represent a flux.
test_componentindex of the test component \( v \) of \( b_k \)
alphamesh function for the scalar valued coefficient \( \alpha \)
Template Parameters
DIFF_COEFFsee the type requeirements for the template parameter DIFF_COEFF in the FluxElementMatrixProvider class.

The (local) added bilinear form \( b_k\) is

\[ (\hat{q}_n,v) \mapsto\int\limits_{\partial K} \hat{q}_n \mathrm{sgn}_K(\mathbf{x}) \alpha(\mathbf{x}) v \mathrm{d}\mathbf{x} \;, \]

For further information about the added bilinear form \( b_k \) see the documentation of FluxElementMatrixProvider.

Referenced by projects::dpg::test::TestConververgencePrimalDPGAdaptedNormConvectionDiffusionDirichletBVP(), and projects::dpg::test::TestConververgencePrimalDPGConvectionDiffusionDirichletBVP().

◆ AddFluxElementMatrixProvider() [2/2]

template<typename SCALAR >
template<typename DIFF_COEFF >
ProductElementMatrixProviderBuilder< SCALAR > & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddFluxElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
DIFF_COEFF  alpha 
)

Definition at line 267 of file product_element_matrix_provider_builder.h.

◆ AddReactionElementMatrixProvider() [1/2]

template<typename SCALAR >
template<typename REACTION_COEFF >
ProductElementMatrixProviderBuilder & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddReactionElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
REACTION_COEFF  gamma 
)
@brief Adds a bilinear form \f$ b_k \f$ to \f$ b \f$ representing a

reaction term.

Parameters
trial_componentindex of the trial component \( u \) of \( b_k \)
test_componentindex of the test component \( v \) of \( b_k \)
gammamesh function for the scalar valued reaction coefficient \( \gamma \).
@tparam REACTION_COEFF see the type requirements for the template parameter
REACTION_COEFF in the ReactionElementMatrixProvider class.

The (local) added bilinear form \( b_k\) is

\[ (u,v) \mapsto\int\limits_{K} \gamma(\mathbf{x})u\,v\,\mathrm{d}\mathbf{x} \;, \]

For further information about the added bilinear form \( b_k \) see the documentation of ReactionElementMatrixProvider.

Referenced by projects::dpg::test::TestConververgencePrimalDPGConvectionDiffusionDirichletBVP().

◆ AddReactionElementMatrixProvider() [2/2]

template<typename SCALAR >
template<typename REACTION_COEFF >
ProductElementMatrixProviderBuilder< SCALAR > & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddReactionElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
REACTION_COEFF  gamma 
)

Definition at line 255 of file product_element_matrix_provider_builder.h.

◆ AddTraceElementMatrixProvider() [1/2]

template<typename SCALAR >
template<typename COEFF >
ProductElementMatrixProviderBuilder & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddTraceElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
COEFF  beta 
)
@brief Adds a bilinear form \f$ b_k \f$ to \f$ b \f$ representing a term

that involves a trace component in the trial space.

Parameters
trial_componentindex of the trial component \( \hat{u} \) of \( b_k \). This component should represent a trace.
test_componentindex of the test component \( v \) of \( b_k \)
betamesh function for the vector valued coefficient \( \beta \)
Template Parameters
COEFFsee the type requirements for the template parameter COEFF in the TraceElementMAtrixProvider class.

The (local) added bilinear form \( b_k\) is

\[ (\hat u,v) \mapsto\int\limits_{\partial K} \hat u \mathbf{n}_K \cdot \boldsymbol{\beta}(\mathbf{x}) v\mathrm{d}\mathbf{x} \;, \]

For further information about the added bilinear form \( b_k \) see the documentation of TraceElementMatrixProvider.

◆ AddTraceElementMatrixProvider() [2/2]

template<typename SCALAR >
template<typename COEFF >
ProductElementMatrixProviderBuilder< SCALAR > & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddTraceElementMatrixProvider ( size_type  trial_component,
size_type  test_component,
COEFF  beta 
)

Definition at line 279 of file product_element_matrix_provider_builder.h.

◆ Build()

template<typename SCALAR >
std::shared_ptr< ProductElementMatrixProvider< SCALAR > > projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::Build

Build the ProdcutElementMatrixProvider for the bilinear form \( b\) based on the provided bilinear forms \( b_k \).

Definition at line 290 of file product_element_matrix_provider_builder.h.

Referenced by projects::dpg::test::TestConververgencePrimalDPGAdaptedNormConvectionDiffusionDirichletBVP(), and projects::dpg::test::TestConververgencePrimalDPGConvectionDiffusionDirichletBVP().

◆ operator=() [1/2]

template<typename SCALAR >
ProductElementMatrixProviderBuilder & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::operator= ( const ProductElementMatrixProviderBuilder< SCALAR > &  )
delete

◆ operator=() [2/2]

template<typename SCALAR >
ProductElementMatrixProviderBuilder & projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::operator= ( ProductElementMatrixProviderBuilder< SCALAR > &&  )
delete

Member Data Documentation

◆ fe_space_test_

template<typename SCALAR >
std::shared_ptr<ProductUniformFESpace<SCALAR> > projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::fe_space_test_
private

collection of specifications for the test space

Definition at line 220 of file product_element_matrix_provider_builder.h.

◆ fe_space_trial_

template<typename SCALAR >
std::shared_ptr<ProductUniformFESpace<SCALAR> > projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::fe_space_trial_
private

collection of specifications for the trial space

Definition at line 218 of file product_element_matrix_provider_builder.h.

◆ subproviders_

template<typename SCALAR >
std::vector<std::shared_ptr<SubElementMatrixProvider<SCALAR> > > projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::subproviders_
private

vector of Element Matrix Providers representing already added bilinear forms

Definition at line 223 of file product_element_matrix_provider_builder.h.


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