LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION > Class Template Reference

Local computation of general element (load) vector for scalar finite elements; volume contributions only. More...

#include <lf/uscalfe/uscalfe.h>

Public Types

using scalar_t
 Scalar type of the element matrix.
 
using ElemVec = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>
 

Public Member Functions

 ScalarLoadElementVectorProvider (std::shared_ptr< const UniformScalarFESpace< SCALAR > > fe_space, MESH_FUNCTION f)
 Constructor, performs precomputations.
 
 ScalarLoadElementVectorProvider (std::shared_ptr< const UniformScalarFESpace< SCALAR > > fe_space, MESH_FUNCTION f, quad_rule_collection_t qr_collection)
 Constructor, performs precomputations based on user-supplied quadrature rules.
 
virtual bool isActive (const lf::mesh::Entity &)
 Default implement: all cells are active.
 
ElemVec Eval (const lf::mesh::Entity &cell)
 
virtual ~ScalarLoadElementVectorProvider ()=default
 
standard constructors
 ScalarLoadElementVectorProvider (const ScalarLoadElementVectorProvider &)=delete
 
 ScalarLoadElementVectorProvider (ScalarLoadElementVectorProvider &&) noexcept=default
 
ScalarLoadElementVectorProvideroperator= (const ScalarLoadElementVectorProvider &)=delete
 
ScalarLoadElementVectorProvideroperator= (ScalarLoadElementVectorProvider &&)=delete
 

Private Attributes

MESH_FUNCTION f_
 An object providing the source function.
 
std::array< PrecomputedScalarReferenceFiniteElement< SCALAR >, 5 > fe_precomp_
 

Detailed Description

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
class lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >

Local computation of general element (load) vector for scalar finite elements; volume contributions only.

Template Parameters
SCALARScalar type of the Finite Element Space.
MESH_FUNCTIONMeshFunction which defines the source function \( f \)

The underlying local linear form is

\[ v \mapsto \int_K f(\mathbf{x})\,\overline{v(\mathbf{x})}\,\mathrm{d}\mathbf{x}\;, \]

where \(f\) is supposed to be a locally continuous source function.

Computation is based on a quadrature rules supplied by the LehrFEM++ lf::quad::QuadRule module.

This class complies with the requirements for the template parameter ELEM_VEC_COMP of the function AssembleVectorLocally().

Logger

This class logs additional information to ScalarLoadElementVectorProvider(). See Loggers and Debug output for more information.

Definition at line 563 of file loc_comp_ellbvp.h.

Member Typedef Documentation

◆ ElemVec

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
using lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ElemVec = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>

Definition at line 570 of file loc_comp_ellbvp.h.

◆ scalar_t

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
using lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::scalar_t
Initial value:
decltype(static_cast<SCALAR>(0) *
static_cast<mesh::utils::MeshFunctionReturnType<MESH_FUNCTION>>(
0))

Scalar type of the element matrix.

Definition at line 566 of file loc_comp_ellbvp.h.

Constructor & Destructor Documentation

◆ ScalarLoadElementVectorProvider() [1/4]

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ScalarLoadElementVectorProvider ( const ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION > & )
delete

◆ ScalarLoadElementVectorProvider() [2/4]

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ScalarLoadElementVectorProvider ( ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION > && )
defaultnoexcept

◆ ScalarLoadElementVectorProvider() [3/4]

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ScalarLoadElementVectorProvider ( std::shared_ptr< const UniformScalarFESpace< SCALAR > > fe_space,
MESH_FUNCTION f )

Constructor, performs precomputations.

Parameters
fe_spacespecification of local shape functions
ffunctor object for source function

Uses quadrature rule of double the degree of exactness compared to the degree of the finite element space.

Definition at line 639 of file loc_comp_ellbvp.h.

References lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::fe_precomp_, lf::base::RefEl::kQuad(), lf::base::RefEl::kTria(), and lf::quad::make_QuadRule().

◆ ScalarLoadElementVectorProvider() [4/4]

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ScalarLoadElementVectorProvider ( std::shared_ptr< const UniformScalarFESpace< SCALAR > > fe_space,
MESH_FUNCTION f,
quad_rule_collection_t qr_collection )

Constructor, performs precomputations based on user-supplied quadrature rules.

Parameters
fe_spacespecification of local shape functions
ffunctor object for source function
qr_collectioncollection of quadrature rule.

Definition at line 659 of file loc_comp_ellbvp.h.

References lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::fe_precomp_, lf::base::RefEl::kQuad(), lf::base::RefEl::kTria(), and lf::quad::QuadRule::RefEl().

◆ ~ScalarLoadElementVectorProvider()

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
virtual lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::~ScalarLoadElementVectorProvider ( )
virtualdefault

Member Function Documentation

◆ Eval()

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ElemVec lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::Eval ( const lf::mesh::Entity & cell)

◆ isActive()

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
virtual bool lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::isActive ( const lf::mesh::Entity & )
inlinevirtual

Default implement: all cells are active.

Definition at line 607 of file loc_comp_ellbvp.h.

◆ operator=() [1/2]

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
ScalarLoadElementVectorProvider & lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::operator= ( const ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION > & )
delete

◆ operator=() [2/2]

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
ScalarLoadElementVectorProvider & lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::operator= ( ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION > && )
delete

Member Data Documentation

◆ f_

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
MESH_FUNCTION lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::f_
private

An object providing the source function.

Definition at line 621 of file loc_comp_ellbvp.h.

◆ fe_precomp_

template<base::Scalar SCALAR, mesh::utils::MeshFunction MESH_FUNCTION>
std::array<PrecomputedScalarReferenceFiniteElement<SCALAR>, 5> lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::fe_precomp_
private

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