The Zalesak slotted disk benchmark – error analysis.
int main(
int argc,
char**argv) {
size_t subdivide = (argc > 1) ? atoi(argv[1]) : 1;
Float tol = (argc > 2) ? atof(argv[2]) : 1e-12;
dout << setprecision(numeric_limits<Float>::digits10)
<< "# meas_gamma = " << meas_gamma << endl
<< "# equispaced("<<subdivide<<")" << endl
<< "# t err_l1 v=(m-m0)/m0 m" << endl;
bool first = true;
Float t = 0, err_linf_l1 = 0, m0 = 0, v_max = 0;
while (din >> event (t, phi_h)) {
omega = phi_h.get_geo();
if (first) {
m0 = m;
first = false;
}
dout << t << " " << err_l1/meas_gamma
<<
" " << v <<
" " <<
m << endl;
err_linf_l1 = max (err_linf_l1, err_l1/meas_gamma);
v_max = max (v_max, abs(v));
}
dout << "# omega.size = " << omega.size() << endl
<< "# omega.hmin = " << omega.hmin() << endl
<< "# err_linf_l1 = " << err_linf_l1 << endl
<< "# v_max = " << v_max << endl;
return (err_linf_l1 < tol && v_max < tol) ? 0 : 1;
}
see the Float page for the full documentation
see the branch page for the full documentation
see the field page for the full documentation
see the geo page for the full documentation
see the environment page for the full documentation
see the integrate_option page for the full documentation
void set_family(family_type type)
This file is part of Rheolef.
rheolef - reference manual
The Zalesak slotted disk benchmark – the exact solution.
Float heaviside(const Float &x)