Loading...
Searching...
No Matches
transport_dg.cc

The transport benchmark by the discontinuous Galerkin method.

The transport benchmark by the discontinuous Galerkin method

#include "rheolef.h"
using namespace rheolef;
using namespace std;
int main(int argc, char**argv) {
environment rheolef (argc, argv);
geo omega (argv[1]);
space Xh (omega, argv[2]);
Float alpha = (argc > 3) ? atof(argv[3]) : 1;
Float sigma = (argc > 4) ? atof(argv[4]) : 3;
point u (1,0,0);
trial phi (Xh); test psi (Xh);
form ah = integrate (dot(u,grad_h(phi))*psi + sigma*phi*psi)
+ integrate ("boundary", max(0., -dot(u,normal()))*phi*psi)
+ integrate ("internal_sides",
- dot(u,normal())*jump(phi)*average(psi)
+ 0.5*alpha*abs(dot(u,normal()))*jump(phi)*jump(psi));
field lh = integrate ("boundary", max(0, -dot(u,normal()))*psi);
field phi_h(Xh);
problem p (ah);
p.solve (lh, phi_h);
dout << catchmark("sigma") << sigma << endl
<< catchmark("phi") << phi_h;
}
lh
field lh(Float epsilon, Float t, const test &v)
Definition burgers_diffusion_operators.icc:25
Float
see the Float page for the full documentation
field
see the field page for the full documentation
form
see the form page for the full documentation
geo
see the geo page for the full documentation
point
see the point page for the full documentation
problem
see the problem page for the full documentation
rheolef::catchmark
see the catchmark page for the full documentation
Definition catchmark.h:67
rheolef::environment
see the environment page for the full documentation
Definition environment.h:121
space
see the space page for the full documentation
test
see the test page for the full documentation
trial
see the test page for the full documentation
main
int main()
Definition field2bb.cc:58
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
std
STL namespace.
rheolef.h
rheolef - reference manual
p
Definition sphere.icc:25
phi
Definition phi.h:25
psi
Definition interpolate_RTk_polynom.icc:34
sigma
Definition mosolov_exact_circle.h:40
u
Definition leveque.h:25