using namespace std;
int main(
int argc,
char**argv) {
cin >> noverbose;
Float We_incr = (argc > 2) ? atof(argv[2]) : 0.1;
Float We_max = (argc > 3) ? atof(argv[3]) : 0.1;
Float delta_t0 = (argc > 4) ? atof(argv[4]) : 0.005;
string restart = (argc > 5) ? argv[5] : "";
Float delta_t_min = 1e-5;
Float We_incr_min = 1e-5;
dout << catchmark(
"alpha") << pb.
alpha << endl
<< catchmark(
"a") << pb.
a << endl;
branch even (
"We",
"tau",
"u",
"p");
pb.
initial (omega, tau_h, uh, ph, restart);
dout << even (pb.
We, tau_h, uh, ph);
bool ok = true;
do {
if (ok) pb.
We += We_incr;
derr <<
"# We = " << pb.
We <<
" delta_t = " << pb.
delta_t << endl;
field tau_h0 = tau_h, uh0 = uh, ph0 = ph;
ok = pb.
solve (tau_h, uh, ph);
if (ok) {
dout << even (pb.
We, tau_h, uh, ph);
} else {
tau_h = tau_h0; uh = uh0; ph = ph0;
derr <<
"# solve failed: decreases We_incr and retry..." << endl;
We_incr /= 2;
if (We_incr < We_incr_min) break;
} else {
derr <<
"# solve failed: decreases delta_t and retry..." << endl;
}
}
} while (true);
}
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
odiststream dout(cout)
see the diststream page for the full documentation
odiststream derr(cerr)
see the diststream page for the full documentation
This file is part of Rheolef.
int main(int argc, char **argv)
The Oldroyd problem on the driven cavity benchmark – boundary conditions.
The Oldroyd problem by the theta-scheme – class header.
rheolef - reference manual
bool solve(field &tau_h, field &uh, field &ph)
void initial(const geo &omega, field &tau_h, field &uh, field &ph, string restart)