Rheolef  7.2
an efficient C++ finite element environment
navier_stokes_cavity_newton_upw_dg.cc
Go to the documentation of this file.
1 #include "rheolef.h"
26 using namespace rheolef;
27 using namespace std;
28 #include "cavity_dg.h"
29 #include "stokes_dirichlet_dg.icc"
30 #include "inertia.h"
31 #include "navier_stokes_upw_dg.h"
32 int main(int argc, char**argv) {
33  environment rheolef (argc, argv);
35  geo omega (argv[1]);
36  string approx = (argc > 2) ? argv[2] : "P1d";
37  Float Re = (argc > 3) ? atof(argv[3]) : 100;
38  Float tol = (argc > 4) ? atof(argv[4]) : eps;
39  size_t max_iter = (argc > 5) ? atoi(argv[5]) : 100;
40  string restart = (argc > 6) ? argv[6] : "";
41  navier_stokes_upw_dg F (Re, omega, approx);
43  int status = damped_newton (F, xh, tol, max_iter, &derr);
44  dout << catchmark("Re") << Re << endl
45  << catchmark("u") << xh[0]
46  << catchmark("p") << xh[1];
47  return status;
48 }
The driven cavity benchmark: right-hand-side and boundary conditions for the discontinuous Galerkin m...
see the Float page for the full documentation
see the geo page for the full documentation
see the catchmark page for the full documentation
Definition: catchmark.h:67
see the environment page for the full documentation
Definition: environment.h:121
odiststream dout(cout)
see the diststream page for the full documentation
Definition: diststream.h:467
odiststream derr(cerr)
see the diststream page for the full documentation
Definition: diststream.h:473
The inertia term of the Navier-Stokes equation with the discontinuous Galerkin method – di Pietro & E...
This file is part of Rheolef.
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
int main(int argc, char **argv)
The Navier-Stokes equations with the discontinuous Galerkin method and upwinding – class header.
rheolef - reference manual
The Stokes problem with Dirichlet boundary condition by the discontinuous Galerkin method – solver fu...
value_type initial(string restart) const
navier_stokes_dg::value_type value_type
Float epsilon