an efficient C++ finite element environment
|
|
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();
#ifdef NEUMANN
#else
#endif
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]);
}
dout << even(tn+delta_t,uh_next);
uh[0] = uh_next;
}
}
problem_basic< Float > problem
The Burgers equation – the Godonov flux.
field gh(Float epsilon, Float t, const field &uh, const test &v)
see the catchmark page for the full documentation
rheolef::std enable_if ::type dot const Expr1 expr1, const Expr2 expr2 dot(const Expr1 &expr1, const Expr2 &expr2)
dot(x,y): see the expression page for the full documentation
see the field page for the full documentation
details::field_expr_v2_nonlinear_terminal_function< details::normal_pseudo_function< Float > > normal()
normal: see the expression page for the full documentation
field_basic< Float > field
see the field page for the full documentation
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&! is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
see the space page for the full documentation
Float tilde_alpha[][pmax+1][pmax+1]
rheolef - reference manual
see the integrate_option page for the full documentation
The diffusive Burgers equation – operators.
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
see the environment page for the full documentation
field lh(Float epsilon, Float t, const test &v)
field_basic< T, M > limiter(const field_basic< T, M > &uh, const T &bar_g_S, const limiter_option &opt)
see the limiter page for the full documentation
This file is part of Rheolef.
see the test page for the full documentation
see the Float page for the full documentation
see the branch page for the full documentation
The Burgers equation – the f function.
details::field_expr_v2_nonlinear_terminal_function< details::penalty_pseudo_function< Float > > penalty()
penalty(): see the expression page for the full documentation
The diffusive Burgers equation – its exact solution.
The semi-implicit Runge-Kutta scheme – coefficients.
Float tilde_beta[][pmax+1]
std::enable_if< details::is_field_convertible< Expr >::value,details::field_expr_v2_nonlinear_terminal_field< typename Expr::scalar_type,typename Expr::memory_type,details::differentiate_option::gradient >>::type grad_h(const Expr &expr)
grad_h(uh): see the expression page for the full documentation
see the test page for the full documentation
double Float
see the Float page for the full documentation
Float alpha[][pmax+1][pmax+1]
odiststream dout(cout)
see the diststream page for the full documentation
see the geo page for the full documentation
int main(int argc, char **argv)