Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
transmission-mixed.cc

The transmission problem – mixed formulation.

The transmission problem – mixed formulation

#include "rheolef.h"
using namespace rheolef;
using namespace std;
int main(int argc, char**argv) {
environment rheolef (argc, argv);
const Float epsilon = 0.01;
geo omega (argv[1]);
space Xh (omega, "P1");
Xh.block ("left");
Xh.block ("right");
space Qh (omega, "P0", "vector");
test v (Xh);
field eta (Qh);
eta ["east"] = 1;
eta ["west"] = epsilon;
field lh = integrate (v);
form b = -form(Xh, Qh, "grad");
form inv_m (Qh, Qh, "inv_mass", 1/eta);
form a = trans(b)*inv_m*b;
field uh (Xh, 0.);
problem p (a);
p.solve (lh, uh);
dout << catchmark("epsilon") << epsilon << endl
<< catchmark("u") << uh;
}
field lh(Float epsilon, Float t, const test &v)
see the Float page for the full documentation
see the field page for the full documentation
see the form page for the full documentation
see the geo page for the full documentation
see the problem 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
see the space page for the full documentation
see the test page for the full documentation
int main()
Definition field2bb.cc:58
This file is part of Rheolef.
STL namespace.
rheolef - reference manual
Definition eta.h:25
Definition sphere.icc:25
Float epsilon