31int main (
int argc,
char**argv) {
34 cerr <<
"usage: " << argv[0] <<
" <geo> <Re> <err> <n_adapt>" << endl;
39 Float Re = (argc > 2) ? atof(argv[2]) : 100;
40 options.
err = (argc > 3) ? atof(argv[3]) : 1e-2;
41 size_t n_adapt = (argc > 4) ? atoi(argv[4]) : 5;
46 space Qh (omega,
"P1");
50 for (
size_t i = 0;
true; i++) {
51 size_t max_iter = 1000;
56 <<
catchmark(
"delta_t") << delta_t << endl
60 if (i >= n_adapt)
break;
62 omega =
adapt (ch, options);
63 o.
open (omega.name(),
"geo");
67 Qh =
space (omega,
"P1");
The driven cavity benchmark: 2D boundary conditions.
see the Float page for the full documentation
see the field page for the full documentation
see the geo page for the full documentation
see the catchmark page for the full documentation
see the environment page for the full documentation
odiststream: see the diststream page for the full documentation
void open(std::string filename, std::string suffix="", io::mode_type mode=io::out, const communicator &comm=communicator())
This routine opens a physical output file.
see the space page for the full documentation
This file is part of Rheolef.
geo_basic< T, M > adapt(const field_basic< T, M > &uh, const adapt_option &opts)
adapt(uh,opts): see the adapt page for the full documentation
The Navier-Stokes equations – adaptive mesh criterion.
field navier_stokes_criterion(Float Re, const field &uh)
The Navier-Stokes equations with the method of characteristics – solver function.
int navier_stokes_solve(Float Re, Float delta_t, field l0h, field &uh, field &ph, size_t &max_iter, Float &tol, odiststream *p_derr=0)
rheolef - reference manual
static space velocity_space(const geo &omega, string approx)
static field velocity_field(const space &Xh, Float alpha=1)
adapt_option: see the adapt page for the full documentation