The diffusive Burgers equation by the discontinuous Galerkin method.
#undef NEUMANN
int main(
int argc,
char**argv) {
space Xh (omega, argv[2]);
size_t k = Xh.degree();
size_t nmax = (argc > 4) ? atoi(argv[4]) : 500;
Float tf = (argc > 5) ? atof(argv[5]) : 1;
size_t p = (argc > 6) ? atoi(argv[6]) : min(k+1,
rk::pmax);
size_t d = omega.dimension();
form m = integrate (
u*v);
form inv_m = integrate (
u*v, iopt);
integrate (dot(grad_h(
u),grad_h(v)))
#ifdef NEUMANN
+ integrate ("internal_sides",
#else
+ integrate ("sides",
#endif
beta*penalty()*jump(
u)*jump(v)
- jump(
u)*average(dot(grad_h(v),normal()))
- jump(v)*average(dot(grad_h(
u),normal()))));
vector<problem> pb (
p+1);
for (
size_t i = 1; i <=
p; ++i) {
}
vector<field> uh(
p+1,
field(Xh,0));
<< even(0,uh[0]);
for (size_t n = 0; n < nmax; ++n) {
for (
size_t i = 1; i <=
p; ++i) {
for (size_t j = 1; j <= i-1; ++j) {
}
pb[i].solve (rhs, uh[i]);
}
uh_next = limiter(uh_next);
dout << even(tn+delta_t,uh_next);
uh[0] = uh_next;
}
}
The Burgers equation – the f function.
The diffusive Burgers equation – its exact solution.
The diffusive Burgers equation – operators.
field lh(Float epsilon, Float t, const test &v)
field gh(Float epsilon, Float t, const field &uh, const test &v)
The Burgers equation – the Godonov flux.
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 problem page for the full documentation
see the catchmark page for the full documentation
see the environment page for the full documentation
see the integrate_option page for the full documentation
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
This file is part of Rheolef.
Float tilde_alpha[][pmax+1][pmax+1]
Float tilde_beta[][pmax+1]
Float alpha[][pmax+1][pmax+1]
rheolef - reference manual
The semi-implicit Runge-Kutta scheme – coefficients.