rheolef  6.5
stokes_cavity.cc
Go to the documentation of this file.
1 #include "rheolef.h"
2 using namespace rheolef;
3 using namespace std;
4 #include "cavity.icc"
5 int main(int argc, char**argv) {
6  environment rheolef (argc, argv);
7  geo omega (argv[1]);
8  space Xh = cavity_space (omega, "P2");
9  space Qh (omega, "P1");
10  trial u (Xh), p (Qh); test v (Xh), q (Qh);
11  form a = integrate (2*ddot(D(u),D(v)));
12  form b = integrate (-div(u)*q);
13  form mp = integrate (p*q);
14  field uh = cavity_field (Xh, 1);
15  field ph (Qh, 0.);
16  solver_abtb stokes (a.uu(), b.uu(), mp.uu());
17  stokes.solve (-(a.ub()*uh.b()), -(b.ub()*uh.b()),
18  uh.set_u(), ph.set_u());
19  dout << catchmark("u") << uh
20  << catchmark("p") << ph;
21 }
22