LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Public Types | Public Member Functions | Private Attributes | List of all members
lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR > Class Template Reference

Class for computation of local load vector for linear finite elements. More...

#include <lf/uscalfe/uscalfe.h>

Public Types

using ElemVec = Eigen::Matrix< SCALAR, 4, 1 >
 

Public Member Functions

 LinearFELocalLoadVector (FUNCTOR f)
 Constructor storing the right hand side function. More...
 
virtual bool isActive (const lf::mesh::Entity &) const
 Default implement: all cells are active. More...
 
ElemVec Eval (const lf::mesh::Entity &cell) const
 Main method for computing the element vector. More...
 

Private Attributes

FUNCTOR f_
 

Detailed Description

template<typename SCALAR, typename FUNCTOR>
class lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR >

Class for computation of local load vector for linear finite elements.

Template Parameters
FUNCTORobject compatible with a MeshFunction type. This means that is must supply an evaluation operator of signature
std::function<auto(const lf::mesh::Entity &cell,const Eigen::MatrixXd &)>
Interface class representing a topological entity in a cellular complex
Definition: entity.h:39
which supplies the source function, see mesh::utils::MeshFunctionGlobal.

Computations employ edge midpoint quadrature.

Note
The element vector returned by the Eval() method will always have length 4 also for triangles.

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

TODO: Adjust size of vector returned.

Logger

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

Definition at line 126 of file lin_fe.h.

Member Typedef Documentation

◆ ElemVec

template<typename SCALAR , typename FUNCTOR >
using lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR >::ElemVec = Eigen::Matrix<SCALAR, 4, 1>

Definition at line 128 of file lin_fe.h.

Constructor & Destructor Documentation

◆ LinearFELocalLoadVector()

template<typename SCALAR , typename FUNCTOR >
lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR >::LinearFELocalLoadVector ( FUNCTOR  f)
inlineexplicit

Constructor storing the right hand side function.

Definition at line 131 of file lin_fe.h.

Member Function Documentation

◆ Eval()

template<typename SCALAR , typename FUNCTOR >
LinearFELocalLoadVector< SCALAR, FUNCTOR >::ElemVec lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR >::Eval ( const lf::mesh::Entity cell) const

Main method for computing the element vector.

Parameters
cellcurrent cell for which the element vector is desired

The implementation uses simple edge midpoint based quadrature and an approximation of the volume of a cell just using the integration element at the barycenter.

Definition at line 164 of file lin_fe.h.

References lf::geometry::Geometry::DimGlobal(), lf::geometry::Geometry::DimLocal(), lf::mesh::Entity::Geometry(), lf::geometry::Geometry::Global(), lf::base::RefEl::kQuad(), lf::base::RefEl::kTria(), lf::uscalfe::LinearFeLocalLoadVectorLogger(), lf::base::RefEl::NumNodes(), lf::mesh::Entity::RefEl(), and lf::geometry::Volume().

◆ isActive()

template<typename SCALAR , typename FUNCTOR >
virtual bool lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR >::isActive ( const lf::mesh::Entity ) const
inlinevirtual

Default implement: all cells are active.

Definition at line 133 of file lin_fe.h.

Member Data Documentation

◆ f_

template<typename SCALAR , typename FUNCTOR >
FUNCTOR lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR >::f_
private

f_(x) where x is a 2D vector provides the evaluation of the source function

Definition at line 150 of file lin_fe.h.


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