LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Tests convergence of the below bilinear form on the Mesh to the analytical solution. More...
#include </home/nico/bildung/SemVI/thesis/lehrfempp/projects/hldo_sphere/debugging/whitney_one_curl_test.h>
Public Member Functions | |
WhitneyOneCurlTest () | |
Constructor creates an object with zero testfunctions. More... | |
void | Compute (int max_ref) |
Computes the error up to the refinemet level 'max_ref'. More... | |
void | SetAnaSol (double sol) |
Sets the value of the analytical solution \(b(u,v)\). More... | |
void | SetFunctions (std::function< double(const Eigen::Matrix< double, 3, 1 > &)> v, std::function< Eigen::Matrix< double, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> u) |
Sets the test functions. More... | |
Private Attributes | |
std::function< double(const Eigen::Matrix< double, 3, 1 > &)> | v_ |
std::function< Eigen::Matrix< double, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> | u_ |
double | ana_sol_ |
Eigen::VectorXd | discrete_sols_ |
std::vector< std::shared_ptr< const lf::mesh::Mesh > > | meshs_ |
Tests convergence of the below bilinear form on the Mesh to the analytical solution.
\[ b(\mathbf{u},v) = \int\limits_{\partial \mathbf{S}} \text{div}\, \mathbf{u} \, v \ dS \]
For this we compute the Galerkin Matrix B and the values at the basis nodes for the analytical solution and then we expect the following quantity to converge to 0 on mesh refinement
\[ | b(u,v) - u^T \, B \, v | \to 0 \]
Definition at line 46 of file whitney_one_curl_test.h.
|
inline |
Constructor creates an object with zero testfunctions.
Definition at line 51 of file whitney_one_curl_test.h.
References discrete_sols_, meshs_, u_, and v_.
|
inline |
Computes the error up to the refinemet level 'max_ref'.
max_ref | maximal refinement level for which the error is computed |
The results are then stored in a csv file under resluts/whitney_one_curl_test_max_ref
.csv
Definition at line 72 of file whitney_one_curl_test.h.
References ana_sol_, projects::hldo_sphere::mesh::SphereTriagMeshBuilder::Build(), projects::hldo_sphere::debugging::concat(), lf::geometry::Corners(), discrete_sols_, lf::base::RefEl::kSegment(), lf::base::RefEl::kTria(), lf::assemble::COOMatrix< SCALAR >::makeSparse(), meshs_, lf::assemble::DofHandler::NumDofs(), projects::hldo_sphere::debugging::WhitneyOneBasisExpansionCoeffs::SetMesh(), projects::hldo_sphere::mesh::SphereTriagMeshBuilder::setRadius(), projects::hldo_sphere::mesh::SphereTriagMeshBuilder::setRefinementLevel(), lf::assemble::COOMatrix< SCALAR >::setZero(), u_, v_, and lf::geometry::Volume().
|
inline |
Sets the value of the analytical solution \(b(u,v)\).
sol | value of the analytical soltion |
Definition at line 247 of file whitney_one_curl_test.h.
References ana_sol_.
|
inline |
Sets the test functions.
v | load function in \( L^2 \) |
u | load functions in \( H(\text{curl}_{\Gamma}, \partial \mathbf{S})\) vector valued |
Definition at line 255 of file whitney_one_curl_test.h.
|
private |
Definition at line 269 of file whitney_one_curl_test.h.
Referenced by Compute(), and SetAnaSol().
|
private |
Definition at line 270 of file whitney_one_curl_test.h.
Referenced by Compute(), and WhitneyOneCurlTest().
|
private |
Definition at line 271 of file whitney_one_curl_test.h.
Referenced by Compute(), and WhitneyOneCurlTest().
|
private |
Definition at line 268 of file whitney_one_curl_test.h.
Referenced by Compute(), SetFunctions(), and WhitneyOneCurlTest().
|
private |
Definition at line 265 of file whitney_one_curl_test.h.
Referenced by Compute(), SetFunctions(), and WhitneyOneCurlTest().