navier_stokes_taylor_newton_dg.cc

The Navier-Stokes equations for the Taylor benchmark by Newton and discontinuous Galerkin methods

#include "rheolef.h"
using namespace rheolef;
using namespace std;
#include "taylor.h"
#include "stokes_dirichlet_dg.icc"
#include "inertia.h"
#include "navier_stokes_dg.h"
int main(int argc, char**argv) {
environment rheolef (argc, argv);
Float eps = numeric_limits<Float>::epsilon();
geo omega (argv[1]);
string approx = (argc > 2) ? argv[2] : "P1d";
Float Re = (argc > 3) ? atof(argv[3]) : 100;
Float tol = (argc > 4) ? atof(argv[4]) : eps;
size_t max_iter = (argc > 5) ? atoi(argv[5]) : 100;
string restart = (argc > 6) ? argv[6] : "";
navier_stokes_dg F (Re, omega, approx);
navier_stokes_dg::value_type xh = F.initial (restart);
int status = damped_newton (F, xh, tol, max_iter, &derr);
dout << catchmark("Re") << Re << endl
<< catchmark("u") << xh[0]
<< catchmark("p") << xh[1];
return status;
}
Float
see the Float page for the full documentation
geo
see the geo page for the full documentation
rheolef::dout
odiststream dout(cout)
see the diststream page for the full documentation
Definition: diststream.h:430
rheolef::derr
odiststream derr(cerr)
see the diststream page for the full documentation
Definition: diststream.h:436
inertia.h
The inertia term of the Navier-Stokes equation with the discontinuous Galerkin method – di Pietro & E...
mkgeo_contraction.status
status
Definition: mkgeo_contraction.sh:290
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::damped_newton
int damped_newton(const Problem &P, const Preconditioner &T, Field &u, Real &tol, Size &max_iter, odiststream *p_derr=0)
see the damped_newton page for the full documentation
Definition: damped-newton-generic.h:29
navier_stokes_dg.h
The Navier-Stokes equations with the discontinuous Galerkin method – class header.
main
int main(int argc, char **argv)
Definition: navier_stokes_taylor_newton_dg.cc:32
rheolef.h
rheolef - reference manual
stokes_dirichlet_dg.icc
The Stokes problem with Dirichlet boundary condition by the discontinuous Galerkin method – solver fu...
navier_stokes_dg
Definition: navier_stokes_dg.h:25
navier_stokes_dg::initial
value_type initial(string restart) const
Definition: navier_stokes_dg1.icc:42
navier_stokes_dg::value_type
Eigen::Matrix< field, 2, 1 > value_type
Definition: navier_stokes_dg.h:27
taylor.h
The Taylor benchmark – right-hand-side and boundary condition.
epsilon
Float epsilon
Definition: transmission_error.cc:25