LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Computes the Galerkin LSE for the Hodge Laplacian of the whitney one form. More...
Public Member Functions | |
WhitneyOneHodgeLaplace () | |
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< Eigen::Matrix< SCALAR, 3, 1 >(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::Mesh > | mesh_p_ |
std::function< Eigen::Matrix< SCALAR, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> | f_ |
lf::assemble::COOMatrix< SCALAR > | coo_matrix_ |
Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > | phi_ |
Computes the Galerkin LSE for the Hodge Laplacian of the whitney one form.
\[ \Delta_1 \mathbf{u} = -\mathbf{curl}_{\Gamma} \circ \text{curl}_{\Gamma} \, \mathbf{u} + \mathbf{grad}_{\Gamma} \circ \text{div}_{\Gamma} \, \mathbf{u} \\ -\Delta_1 \mathbf{u} = \mathbf{f} \]
Basis functions are the Whitney 1-forms and the barycentric coordinate 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.2.
Definition at line 54 of file whitney_one_hodge_laplacian.h.
|
inline |
Constructor initializes basic mesh (Octaeder with radius 1.0) initializes zerovalued function f.
Definition at line 62 of file whitney_one_hodge_laplacian.h.
References projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::f_, projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::mesh_p_, and projects::hldo_sphere::mesh::SphereTriagMeshBuilder::setRefinementLevel().
|
inline |
Computes the Galerkin LSE.
The Galerkin matrix will be accessable with GetGalerkinMatrix() The load vector will be accessable with GetLoadVector()
Definition at line 91 of file whitney_one_hodge_laplacian.h.
References lf::assemble::AssembleVectorLocally(), projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::coo_matrix_, projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::f_, lf::base::RefEl::kPoint(), lf::base::RefEl::kSegment(), projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::mesh_p_, lf::assemble::DofHandler::NumDofs(), projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::phi_, lf::assemble::COOMatrix< SCALAR >::setZero(), and lf::assemble::COOMatrix< SCALAR >::triplets().
Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().
|
inline |
returns the Galerkin Matrix
This is the Matrix of the LSE
Definition at line 252 of file whitney_one_hodge_laplacian.h.
References projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::coo_matrix_.
Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().
|
inline |
returns the Loadvector
This is the righthandside of the LSE
Definition at line 241 of file whitney_one_hodge_laplacian.h.
References projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::phi_.
Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().
|
inline |
Sets the load function.
f | load function |
\[ \Delta_1 \mathbf{u} = -\mathbf{curl}_{\Gamma} \circ \text{curl}_{\Gamma} \, \mathbf{u} + \mathbf{grad}_{\Gamma} \circ \text{div}_{\Gamma} \, \mathbf{u} \\ -\Delta_1 \mathbf{u} = \mathbf{f} \]
Definition at line 227 of file whitney_one_hodge_laplacian.h.
References projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::f_.
Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().
|
inline |
Sets the mesh and creates dof_handler.
mesh_p | pointer to the mesh |
requries all cells in the mesh are triangles requries mesh global dimension to be 3
Definition at line 199 of file whitney_one_hodge_laplacian.h.
References lf::base::RefEl::kTria(), projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::mesh_p_, and lf::base::RefEl::RefEl().
Referenced by projects::hldo_sphere::operators::HodgeLaplaciansSourceProblems< SCALAR >::Compute().
|
private |
Definition at line 259 of file whitney_one_hodge_laplacian.h.
Referenced by projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::Compute(), and projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::GetGalerkinMatrix().
|
private |
Definition at line 258 of file whitney_one_hodge_laplacian.h.
Referenced by projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::Compute(), projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::SetLoadFunction(), and projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::WhitneyOneHodgeLaplace().
|
private |
Definition at line 255 of file whitney_one_hodge_laplacian.h.
Referenced by projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::Compute(), projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::SetMesh(), and projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::WhitneyOneHodgeLaplace().
|
private |
Definition at line 260 of file whitney_one_hodge_laplacian.h.
Referenced by projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::Compute(), and projects::hldo_sphere::operators::WhitneyOneHodgeLaplace< SCALAR >::GetLoadVector().