Rheolef  7.2
an efficient C++ finite element environment
harten_show.cc
Go to the documentation of this file.
1
25#include "rheolef.h"
26using namespace rheolef;
27using namespace std;
28#include "harten.h"
29int main(int argc, char**argv) {
30 environment rheolef (argc, argv);
31 geo omega (argv[1]);
32 space Xh (omega, argv[2]);
33 size_t nmax = (argc > 3) ? atoi(argv[3]) : 1000;
34 Float tf = (argc > 4) ? atof(argv[4]) : 2.5;
35 Float a = (argc > 5) ? atof(argv[5]) : 1;
36 Float b = (argc > 6) ? atof(argv[6]) : 0.5;
37 Float c = (argc > 7) ? atof(argv[7]) : 0;
38 branch even("t","u");
39 for (size_t n = 0; n <= nmax; ++n) {
40 Float t = n*tf/nmax;
41 field pi_h_u = lazy_interpolate (Xh, harten(t,a,b,c));
42 dout << even(t,pi_h_u);
43 }
44}
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
Definition: environment.h:121
see the space page for the full documentation
The Burgers problem: the Harten exact solution.
int main(int argc, char **argv)
Definition: harten_show.cc:29
This file is part of Rheolef.
field_basic< T, M > lazy_interpolate(const space_basic< T, M > &X2h, const field_basic< T, M > &u1h)
see the interpolate page for the full documentation
Definition: field.h:871
STL namespace.
rheolef - reference manual
Definition: harten.h:26