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

Computes the Galerkin LSE for the Dirac Operator and the load vector. More...

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

Public Member Functions

 DiracOperator ()
 Constructor creates basic mesh (Octaeder with radius 1.0) and zero valued functions 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 SetLoadFunctions (std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f0, std::function< Eigen::Matrix< complex, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> f1, std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f2)
 Sets the load functions. More...
 
Eigen::Matrix< complex, Eigen::Dynamic, 1 > GetLoadVector ()
 returns the Loadvector More...
 
lf::assemble::COOMatrix< complexGetGalerkinMatrix ()
 returns the Galerkin Matrix More...
 

Private Attributes

std::shared_ptr< const lf::mesh::Meshmesh_p_
 
std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f0_
 
std::function< Eigen::Matrix< complex, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> f1_
 
std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f2_
 
lf::assemble::COOMatrix< complexcoo_matrix_
 
Eigen::Matrix< complex, Eigen::Dynamic, 1 > phi_
 

Detailed Description

Computes the Galerkin LSE for the Dirac Operator and the load vector.

\[ \begin{pmatrix} & \int\limits_{\partial \mathbf{S}} \mathbf{u} \cdot \mathbf{grad}_{\Gamma} v \, dS & \\ \int_{\partial \mathbf{S}} \mathbf{grad}_{\Gamma} u \cdot \mathbf{v} \, dS & & \int\limits_{\partial \mathbf{S}} \mu \ \ \text{curl}_{\Gamma} \mathbf{v} \, dS \\ & \int\limits_{\partial \mathbf{S}} \text{curl}_{\Gamma} \mathbf{u} \ \ \nu \, dS & \end{pmatrix} , \begin{pmatrix} \int\limits_{\partial \mathbf{S}} f v \, dS \\ \int\limits_{\partial \mathbf{S}} \mathbf{f} \cdot \mathbf{v} \, dS \\ \int\limits_{\partial \mathbf{S}} \varphi \nu \, dS \end{pmatrix} \]

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.4.

Note
Only triangular meshes are supported

Definition at line 60 of file dirac_operator.h.

Constructor & Destructor Documentation

◆ DiracOperator()

projects::hldo_sphere::operators::DiracOperator::DiracOperator ( )
inline

Constructor creates basic mesh (Octaeder with radius 1.0) and zero valued functions f.

Definition at line 68 of file dirac_operator.h.

References f0_, f1_, f2_, mesh_p_, and projects::hldo_sphere::mesh::SphereTriagMeshBuilder::setRefinementLevel().

Member Function Documentation

◆ Compute()

void projects::hldo_sphere::operators::DiracOperator::Compute ( )

◆ GetGalerkinMatrix()

lf::assemble::COOMatrix< complex > projects::hldo_sphere::operators::DiracOperator::GetGalerkinMatrix ( )
inline

returns the Galerkin Matrix

This is the Matrix of the LSE

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

Definition at line 148 of file dirac_operator.h.

References coo_matrix_.

Referenced by projects::hldo_sphere::operators::DiracOperatorSourceProblem::Compute().

◆ GetLoadVector()

Eigen::Matrix< complex, Eigen::Dynamic, 1 > projects::hldo_sphere::operators::DiracOperator::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 137 of file dirac_operator.h.

References phi_.

Referenced by projects::hldo_sphere::operators::DiracOperatorSourceProblem::Compute().

◆ SetLoadFunctions()

void projects::hldo_sphere::operators::DiracOperator::SetLoadFunctions ( std::function< complex(const Eigen::Matrix< double, 3, 1 > &)>  f0,
std::function< Eigen::Matrix< complex, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)>  f1,
std::function< complex(const Eigen::Matrix< double, 3, 1 > &)>  f2 
)
inline

Sets the load functions.

Parameters
f0load function in \( L^2 \)
f1load functions in \( L^2_t \) vector valued
f2load functions in \( L^2 \)

Definition at line 117 of file dirac_operator.h.

References f0_, f1_, and f2_.

Referenced by projects::hldo_sphere::operators::DiracOperatorSourceProblem::Compute().

◆ SetMesh()

void projects::hldo_sphere::operators::DiracOperator::SetMesh ( std::shared_ptr< const lf::mesh::Mesh mesh_p)

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 131 of file dirac_operator.cc.

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

Referenced by projects::hldo_sphere::operators::DiracOperatorSourceProblem::Compute().

Member Data Documentation

◆ coo_matrix_

lf::assemble::COOMatrix<complex> projects::hldo_sphere::operators::DiracOperator::coo_matrix_
private

Definition at line 157 of file dirac_operator.h.

Referenced by Compute(), and GetGalerkinMatrix().

◆ f0_

std::function<complex(const Eigen::Matrix<double, 3, 1> &)> projects::hldo_sphere::operators::DiracOperator::f0_
private

Definition at line 152 of file dirac_operator.h.

Referenced by Compute(), DiracOperator(), and SetLoadFunctions().

◆ f1_

std::function<Eigen::Matrix<complex, 3, 1>( const Eigen::Matrix<double, 3, 1> &)> projects::hldo_sphere::operators::DiracOperator::f1_
private

Definition at line 155 of file dirac_operator.h.

Referenced by Compute(), DiracOperator(), and SetLoadFunctions().

◆ f2_

std::function<complex(const Eigen::Matrix<double, 3, 1> &)> projects::hldo_sphere::operators::DiracOperator::f2_
private

Definition at line 156 of file dirac_operator.h.

Referenced by Compute(), DiracOperator(), and SetLoadFunctions().

◆ mesh_p_

std::shared_ptr<const lf::mesh::Mesh> projects::hldo_sphere::operators::DiracOperator::mesh_p_
private

Definition at line 151 of file dirac_operator.h.

Referenced by Compute(), DiracOperator(), and SetMesh().

◆ phi_

Eigen::Matrix<complex, Eigen::Dynamic, 1> projects::hldo_sphere::operators::DiracOperator::phi_
private

Definition at line 158 of file dirac_operator.h.

Referenced by Compute(), and GetLoadVector().


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