Loading...
Searching...
No Matches
helmholtz_s_error.cc

The Helmholtz problem on a surface – error analysis.

The Helmholtz problem on a surface – error analysis

#include "rheolef.h"
using namespace std;
using namespace rheolef;
#include "sphere.icc"
int main (int argc, char**argv) {
environment rheolef(argc, argv);
Float tol = (argc > 1) ? atof(argv[1]) : 1e+38;
field uh; din >> uh;
const space& Wh = uh.get_space();
trial u (Wh); test v (Wh);
form m = integrate (u*v);
form a = integrate (dot(grad_s(u),grad_s(v)));
size_t d = Wh.get_geo().dimension();
field pi_h_u = lazy_interpolate(Wh, u_exact(d));
field eh = uh - pi_h_u;
dout << "err_l2 " << sqrt(m(eh,eh)) << endl
<< "err_h1 " << sqrt(a(eh,eh)) << endl
<< "err_linf " << eh.max_abs() << endl;
return (eh.max_abs() < tol) ? 0 : 1;
}
Float
see the Float page for the full documentation
field
see the field page for the full documentation
form
see the form page for the full documentation
rheolef::environment
see the environment page for the full documentation
Definition environment.h:121
space
see the space page for the full documentation
test
see the test page for the full documentation
trial
see the test page for the full documentation
main
int main()
Definition field2bb.cc:58
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
std
STL namespace.
d
size_t d
Definition neumann-laplace-lambda.cc:28
rheolef.h
rheolef - reference manual
sphere.icc
The level set function for the sphere geometry.
u_exact
Definition interpolate_RTk_polynom.icc:125
u
Definition leveque.h:25