rheolef  6.5
transmission-mixed.cc
Go to the documentation of this file.
1 #include "rheolef.h"
2 using namespace rheolef;
3 using namespace std;
4 int main(int argc, char**argv) {
5  environment rheolef (argc, argv);
6  const Float epsilon = 0.01;
7  geo omega (argv[1]);
8  space Xh (omega, "P1");
9  Xh.block ("left");
10  Xh.block ("right");
11  space Qh (omega, "P0", "vector");
12  test v (Xh);
13  field eta (Qh);
14  eta ["east"] = 1;
15  eta ["west"] = epsilon;
16  field lh = integrate (v);
17  form b = -form(Xh, Qh, "grad");
18  form inv_m (Qh, Qh, "inv_mass", 1/eta);
19  form a = trans(b)*inv_m*b;
20  solver sa (a.uu);
21  uh.u = fact.solve (lh.u - a.ub*uh.b);
22  cout << catchmark("epsilon") << epsilon << endl
23  << catchmark("u") << uh;
24 }
25