Rheolef  7.1
an efficient C++ finite element environment
harten_show.cc

The Burgers problem: the Harten exact solution – visualization

#include "rheolef.h"
using namespace rheolef;
using namespace std;
#include "harten.h"
int main(int argc, char**argv) {
environment rheolef (argc, argv);
geo omega (argv[1]);
space Xh (omega, argv[2]);
size_t nmax = (argc > 3) ? atoi(argv[3]) : 1000;
Float tf = (argc > 4) ? atof(argv[4]) : 2.5;
Float a = (argc > 5) ? atof(argv[5]) : 1;
Float b = (argc > 6) ? atof(argv[6]) : 0.5;
Float c = (argc > 7) ? atof(argv[7]) : 0;
branch even("t","u");
for (size_t n = 0; n <= nmax; ++n) {
Float t = n*tf/nmax;
field pi_h_u = interpolate (Xh, harten(t,a,b,c));
dout << even(t,pi_h_u);
}
}
field
see the field page for the full documentation
space
see the space page for the full documentation
harten.h
The Burgers problem: the Harten exact solution.
mkgeo_ball.c
c
Definition: mkgeo_ball.sh:153
rheolef.h
rheolef - reference manual
a
Definition: diffusion_isotropic.h:25
rheolef::interpolate
field_basic< T, M > interpolate(const space_basic< T, M > &V2h, const field_basic< T, M > &u1h)
see the interpolate page for the full documentation
Definition: interpolate.cc:233
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
main
int main(int argc, char **argv)
Definition: harten_show.cc:29
Float
see the Float page for the full documentation
harten
Definition: harten.h:26
branch
see the branch page for the full documentation
mkgeo_ball.b
b
Definition: mkgeo_ball.sh:152
mkgeo_ball.n
n
Definition: mkgeo_ball.sh:150
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