5#include <whitney_one_curl_test.h>
10int main(
int argc,
char *argv[]) {
12 std::cerr <<
"Usage: " << argv[0] <<
" max_refinement_level" << std::endl;
16 unsigned refinement_level = atoi(argv[1]);
17 std::cout <<
"max_refinement_level : " << refinement_level << std::endl;
20 auto Power = [](
double a,
double b) ->
double {
return std::pow(a, b); };
21 auto Sin = [](
double a) ->
double {
return std::sin(a); };
22 auto Cos = [](
double a) ->
double {
return std::cos(a); };
23 auto Sqrt = [](
double a) ->
double {
return std::sqrt(a); };
26 auto u_one = [&](
const Eigen::Vector3d x_vec) -> Eigen::Vector3d {
28 Eigen::Vector3d x_ = x_vec / x_vec.norm();
33 Eigen::VectorXd ret(3);
41 auto u_two = [&](
const Eigen::Vector3d x_vec) ->
double {
43 Eigen::Vector3d x_ = x_vec / x_vec.norm();
51 double ana_sol = -7.5691944739878640736;
Tests convergence of the below bilinear form on the Mesh to the analytical solution.
void Compute(int max_ref)
Computes the error up to the refinemet level 'max_ref'.
void SetAnaSol(double sol)
Sets the value of the analytical solution .
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.