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

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ WhitneyOneCurlTest()

projects::hldo_sphere::debugging::WhitneyOneCurlTest::WhitneyOneCurlTest ( )
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_.

Member Function Documentation

◆ Compute()

void projects::hldo_sphere::debugging::WhitneyOneCurlTest::Compute ( int  max_ref)
inline

◆ SetAnaSol()

void projects::hldo_sphere::debugging::WhitneyOneCurlTest::SetAnaSol ( double  sol)
inline

Sets the value of the analytical solution \(b(u,v)\).

Parameters
solvalue of the analytical soltion
Note
the solution has to comply with the functions u and v, which are passed as functors

Definition at line 247 of file whitney_one_curl_test.h.

References ana_sol_.

◆ SetFunctions()

void projects::hldo_sphere::debugging::WhitneyOneCurlTest::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 
)
inline

Sets the test functions.

Parameters
vload function in \( L^2 \)
uload functions in \( H(\text{curl}_{\Gamma}, \partial \mathbf{S})\) vector valued

Definition at line 255 of file whitney_one_curl_test.h.

References u_, and v_.

Member Data Documentation

◆ ana_sol_

double projects::hldo_sphere::debugging::WhitneyOneCurlTest::ana_sol_
private

Definition at line 269 of file whitney_one_curl_test.h.

Referenced by Compute(), and SetAnaSol().

◆ discrete_sols_

Eigen::VectorXd projects::hldo_sphere::debugging::WhitneyOneCurlTest::discrete_sols_
private

Definition at line 270 of file whitney_one_curl_test.h.

Referenced by Compute(), and WhitneyOneCurlTest().

◆ meshs_

std::vector<std::shared_ptr<const lf::mesh::Mesh> > projects::hldo_sphere::debugging::WhitneyOneCurlTest::meshs_
private

Definition at line 271 of file whitney_one_curl_test.h.

Referenced by Compute(), and WhitneyOneCurlTest().

◆ u_

std::function<Eigen::Matrix<double, 3, 1>( const Eigen::Matrix<double, 3, 1> &)> projects::hldo_sphere::debugging::WhitneyOneCurlTest::u_
private

Definition at line 268 of file whitney_one_curl_test.h.

Referenced by Compute(), SetFunctions(), and WhitneyOneCurlTest().

◆ v_

std::function<double(const Eigen::Matrix<double, 3, 1> &)> projects::hldo_sphere::debugging::WhitneyOneCurlTest::v_
private

Definition at line 265 of file whitney_one_curl_test.h.

Referenced by Compute(), SetFunctions(), and WhitneyOneCurlTest().


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