Rheolef  7.1
an efficient C++ finite element environment
transmission-mixed.cc
Go to the documentation of this file.
1 #include "rheolef.h"
26 using namespace rheolef;
27 using namespace std;
28 int main(int argc, char**argv) {
29  environment rheolef (argc, argv);
30  const Float epsilon = 0.01;
31  geo omega (argv[1]);
32  space Xh (omega, "P1");
33  Xh.block ("left");
34  Xh.block ("right");
35  space Qh (omega, "P0", "vector");
36  test v (Xh);
37  field eta (Qh);
38  eta ["east"] = 1;
39  eta ["west"] = epsilon;
40  field lh = integrate (v);
41  form b = -form(Xh, Qh, "grad");
42  form inv_m (Qh, Qh, "inv_mass", 1/eta);
43  form a = trans(b)*inv_m*b;
44  field uh (Xh, 0.);
45  problem p (a);
46  p.solve (lh, uh);
47  dout << catchmark("epsilon") << epsilon << endl
48  << catchmark("u") << uh;
49 }
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
Definition: environment.h:115
odiststream dout(cout)
see the diststream page for the full documentation
Definition: diststream.h:430
form_basic< Float, rheo_default_memory_model > form
Definition: form.h:293
see the space page for the full documentation
see the test page for the full documentation
This file is part of Rheolef.
csr< T, sequential > trans(const csr< T, sequential > &a)
trans(a): see the form page for the full documentation
Definition: csr.h:455
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&! is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
Definition: integrate.h:202
rheolef - reference manual
Definition: eta.h:25
Definition: sphere.icc:25
int main(int argc, char **argv)
Float epsilon