Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
sinusprod_error_hho_reconstruction.cc

The sinus product function – reconstruction for the hybrid high order method.

The sinus product function – reconstruction for the hybrid high order method

#include "rheolef.h"
using namespace rheolef;
using namespace std;
#include "sinusprod.h"
#include "sinusprod_grad.h"
int main(int argc, char**argv) {
environment rheolef (argc, argv);
Float err_us_s_h1_expected = (argc > 1) ? atof(argv[1]) : 1e+38;
field uhs;
din >> uhs;
geo omega = uhs.get_geo();
space Xhs = uhs.get_space();
size_t d = omega.dimension(), kp1 = Xhs.degree();
iopt.invert = true;
iopt.set_order (2*kp1+2);
Float err_us_l2 = sqrt(integrate(omega, sqr(uhs-u_exact(d)), iopt)),
err_us_h1 = sqrt(integrate(omega, norm2(grad_h(uhs)-grad_u(d)), iopt));
derr << "err_us_l2 = " << err_us_l2 << endl
<< "err_us_h1 = " << err_us_h1 << endl;
#ifdef TODO
// on_local_sides in non-variational exprs:
Float err_us_s_l2 = sqrt(integrate(omega, on_local_sides(sqr(uhs-u_exact(d))), iopt)),
err_us_s_h1 = sqrt(integrate(omega, on_local_sides(norm2(grad_h(uhs)-grad_u(d))), iopt));
derr << "err_us_s_l2 = " << err_us_s_l2 << endl
<< "err_us_s_h1 = " << err_us_s_h1 << endl;
#endif // TODO
return (err_us_h1 < err_us_s_h1_expected) ? 0 : 1;
}
see the Float page for the full documentation
see the field page for the full documentation
see the geo page for the full documentation
see the environment page for the full documentation
see the integrate_option page for the full documentation
see the space page for the full documentation
int main()
Definition field2bb.cc:58
This file is part of Rheolef.
STL namespace.
rheolef - reference manual
The sinus product function.
The sinus product function – its gradient.