Rheolef  7.2
an efficient C++ finite element environment
 
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;
}
see the Float page for the full documentation
see the field page for the full documentation
see the form page for the full documentation
see the environment page for the full documentation
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
int main()
Definition field2bb.cc:58
This file is part of Rheolef.
STL namespace.
rheolef - reference manual
The level set function for the sphere geometry.
Definition leveque.h:25