rheolef  6.6
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 }
field - piecewise polynomial finite element field
Definition: field.h:225
form_basic< Float, rheo_default_memory_model > form
Definition: form.h:230
const vec< T, M > & u() const
Definition: field.h:279
STL namespace.
irheostream, orheostream - large data streams
Definition: compiler.h:7
const csr< T, M > & uu() const
Definition: form.h:140
const csr< T, M > & ub() const
Definition: form.h:141
space – piecewise polynomial finite element space
Definition: space.h:229
double Float
Definition: compiler.h:177
int main(int argc, char **argv)
catchmark - iostream manipulator
Definition: catchmark.h:30
Float epsilon
form - representation of a finite element bilinear form
Definition: form.h:98
solver - direct or interative solver interface
Definition: solver.h:8
csr< T, sequential > trans(const csr< T, sequential > &a)
Definition: csr.h:383
field_basic< T, M > integrate(const geo_basic< T, M > &domain, const test_basic< T, M, details::vf_tag_01 > &expr, const quadrature_option_type &qopt=quadrature_option_type())
integrate - integrate a function or an expression
Definition: integrate.h:90