2 using namespace rheolef;
5 int main (
int argc,
char **argv) {
11 derr <<
"# t\terror_l2\terror_linf" << endl;
14 Float err_linf_linf = 0;
15 for (
Float t = 0, t_prec = 0;
din >>
get (t, phi_h); t_prec = t) {
17 size_t d = Xh.get_geo().dimension();
19 form m (Xh, Xh,
"mass");
20 field eh = phi_h - pi_h_phi;
23 err_l2_l2 +=
sqr(err_l2)*(t - t_prec);
24 err_linf_linf =
max(err_linf_linf, err_linf);
25 dout <<
put (t, phi_h, pi_h_phi);
26 derr << t <<
"\t" << err_l2 <<
"\t" << err_linf << endl;
28 derr <<
"# error_l2_l2 = " <<
sqrt(err_l2_l2) << endl;
29 derr <<
"# error_linf_linf = " << err_linf_linf << endl;