2
using namespace rheolef;
4
Float u (const point& x) { return sin(x[0]+x[1]+x[2]); }
5
int main(int argc, char**argv) {
6
environment distributed(argc, argv);
9
Float error_l2_expected = (argc > 1) ? atof(argv[1]) : 1e-5;
10
space Vh = uh.get_space();
11
field pi_h_u = interpolate(Vh, u);
12
field eh = pi_h_u - uh;
13
form m(Vh, Vh, "mass");
14
Float error_l2 = sqrt(m(eh,eh));
15
dcout << "error_l2 " << error_l2 << endl;
16
return (error_l2 <= error_l2_expected) ? 0 : 1;