harten_error.cc
Go to the documentation of this file.
#include "rheolef.h"
using namespace rheolef;
using namespace std;
#include "harten.h"
int main(int argc, char**argv) {
environment rheolef (argc, argv);
Float err_expected = (argc > 1) ? atof(argv[1]) : 1;
branch even("t","u");
Float t=0; field uh;
Float err_linf_l1 = 0;
dout << "# t err_l1(t)" << endl;
while (din >> even(t,uh)) {
const geo& omega = uh.get_geo();
integrate_option iopt;
iopt.set_order (2*uh.get_space().degree()+1);
Float err_l1 = integrate (omega, fabs(uh - harten(t)), iopt);
err_linf_l1 = max(err_linf_l1, err_l1);
dout << t << " " << err_l1 << endl;
}
dout << "# err_linf_l1 = " << err_linf_l1 << endl;
return (err_linf_l1 <= err_expected) ? 0 : 1;
}
rheolef::integrate_option::set_order
void set_order(size_t r)
Definition: integrate_option.h:254
main
int main(int argc, char **argv)
Definition: harten_error.cc:25
field
see the field page for the full documentation
rheolef::integrate
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&! is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
Definition: integrate.h:202
harten.h
The Burgers problem: the Harten exact solution.
rheolef.h
rheolef - reference manual
rheolef::integrate_option
see the integrate_option page for the full documentation
Definition: integrate_option.h:125
rheolef::din
idiststream din
see the diststream page for the full documentation
Definition: diststream.h:427
rheolef::environment
see the environment page for the full documentation
Definition: environment.h:115
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
Float
see the Float page for the full documentation
harten
Definition: harten.h:26
branch
see the branch page for the full documentation
rheolef::dout
odiststream dout(cout)
see the diststream page for the full documentation
Definition: diststream.h:430
rheolef::std
Definition: vec_expr_v2.h:391
geo
see the geo page for the full documentation