Rheolef  7.1
an efficient C++ finite element environment
transmission-mixed.cc

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;
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;
}
form
see the form page for the full documentation
rheolef::catchmark
see the catchmark page for the full documentation
Definition: catchmark.h:67
field
see the field page for the full documentation
rheolef::integrate
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
eta
Definition: eta.h:25
space
see the space page for the full documentation
rheolef.h
rheolef - reference manual
p
Definition: sphere.icc:25
a
Definition: diffusion_isotropic.h:25
rheolef::environment
see the environment page for the full documentation
Definition: environment.h:115
lh
field lh(Float epsilon, Float t, const test &v)
Definition: burgers_diffusion_operators.icc:25
rheolef::form
form_basic< Float, rheo_default_memory_model > form
Definition: form.h:293
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
test
see the test page for the full documentation
problem
see the problem page for the full documentation
Float
see the Float page for the full documentation
mkgeo_ball.b
b
Definition: mkgeo_ball.sh:152
rheolef::dout
odiststream dout(cout)
see the diststream page for the full documentation
Definition: diststream.h:430
epsilon
Float epsilon
Definition: transmission_error.cc:25
main
int main(int argc, char **argv)
Definition: transmission-mixed.cc:28
rheolef::trans
csr< T, sequential > trans(const csr< T, sequential > &a)
trans(a): see the form page for the full documentation
Definition: csr.h:455
rheolef::std
Definition: vec_expr_v2.h:391
geo
see the geo page for the full documentation