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

Computes the Galerkin LSE for the Hodge Laplacian of the whitney two form. More...

#include </home/nico/bildung/SemVI/thesis/lehrfempp/projects/hldo_sphere/operators/whitney_two_hodge_laplacian.h>

Public Member Functions

 WhitneyTwoHodgeLaplace ()
 Constructor initializes basic mesh (Octaeder with radius 1.0) initializes zerovalued function f. More...
 
void Compute ()
 Computes the Galerkin LSE. More...
 
void SetMesh (std::shared_ptr< const lf::mesh::Mesh > mesh_p)
 Sets the mesh and creates dof_handler. More...
 
void SetLoadFunction (std::function< SCALAR(const Eigen::Matrix< double, 3, 1 > &)> &f)
 Sets the load function. More...
 
Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > GetLoadVector ()
 returns the Loadvector More...
 
lf::assemble::COOMatrix< SCALAR > GetGalerkinMatrix ()
 returns the Galerkin Matrix More...
 

Private Attributes

std::shared_ptr< const lf::mesh::Meshmesh_p_
 
std::function< SCALAR(const Eigen::Matrix< double, 3, 1 > &)> f_
 
lf::assemble::COOMatrix< SCALAR > coo_matrix_
 
Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > phi_
 

Detailed Description

template<typename SCALAR>
class projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >

Computes the Galerkin LSE for the Hodge Laplacian of the whitney two form.

\[ -\Delta_2 = -\text{div}_{\Gamma} \circ \mathbf{grad}_{\Gamma} \\ -\Delta_2 u = f \]

Basis functions used are the rotated Whitney 1-forms and the cellwise constant functions

Details regarding the mathematical derivations can be found in the thesis Hodge-Laplacians and Dirac Operators on the Surface of the 3-Sphere section 4.3.3.

Note
Only triangular meshes are supported

Definition at line 54 of file whitney_two_hodge_laplacian.h.

Constructor & Destructor Documentation

◆ WhitneyTwoHodgeLaplace()

template<typename SCALAR >
projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::WhitneyTwoHodgeLaplace ( )
inline

Constructor initializes basic mesh (Octaeder with radius 1.0) initializes zerovalued function f.

Definition at line 62 of file whitney_two_hodge_laplacian.h.

Member Function Documentation

◆ Compute()

template<typename SCALAR >
void projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::Compute ( )
inline

◆ GetGalerkinMatrix()

template<typename SCALAR >
lf::assemble::COOMatrix< SCALAR > projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::GetGalerkinMatrix ( )
inline

returns the Galerkin Matrix

This is the Matrix of the LSE containing the negative laplacian

Note
The Galerkin matrix must be computed with Compute() before calling this funciton

Definition at line 234 of file whitney_two_hodge_laplacian.h.

Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().

◆ GetLoadVector()

template<typename SCALAR >
Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::GetLoadVector ( )
inline

returns the Loadvector

This is the righthandside of the LSE

Note
The loadvector must be computed with Compute() before calling this function

Definition at line 223 of file whitney_two_hodge_laplacian.h.

Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().

◆ SetLoadFunction()

template<typename SCALAR >
void projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::SetLoadFunction ( std::function< SCALAR(const Eigen::Matrix< double, 3, 1 > &)> &  f)
inline

Sets the load function.

Parameters
fload function

\[ \Delta_2 = \text{div}_{\Gamma} \circ \mathbf{grad}_{\Gamma} \\ \Delta_2 u = f \]

Definition at line 209 of file whitney_two_hodge_laplacian.h.

Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().

◆ SetMesh()

template<typename SCALAR >
void projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::SetMesh ( std::shared_ptr< const lf::mesh::Mesh mesh_p)
inline

Sets the mesh and creates dof_handler.

Parameters
mesh_ppointer to the mesh

requries all cells in the mesh are triangles requries mesh global dimension to be 3

Definition at line 184 of file whitney_two_hodge_laplacian.h.

References lf::base::RefEl::kTria(), and lf::base::RefEl::RefEl().

Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().

Member Data Documentation

◆ coo_matrix_

template<typename SCALAR >
lf::assemble::COOMatrix<SCALAR> projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::coo_matrix_
private

Definition at line 239 of file whitney_two_hodge_laplacian.h.

◆ f_

template<typename SCALAR >
std::function<SCALAR(const Eigen::Matrix<double, 3, 1> &)> projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::f_
private

Definition at line 238 of file whitney_two_hodge_laplacian.h.

◆ mesh_p_

template<typename SCALAR >
std::shared_ptr<const lf::mesh::Mesh> projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::mesh_p_
private

Definition at line 237 of file whitney_two_hodge_laplacian.h.

◆ phi_

template<typename SCALAR >
Eigen::Matrix<SCALAR, Eigen::Dynamic, 1> projects::hldo_sphere::operators::WhitneyTwoHodgeLaplace< SCALAR >::phi_
private

Definition at line 240 of file whitney_two_hodge_laplacian.h.


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