rheolef  6.6
Go to the documentation of this file.
1 #include "rheolef.h"
2 using namespace rheolef;
3 using namespace std;
4 #include "cavity.icc"
5 int main(int argc, char**argv) {
6  environment rheolef (argc, argv);
7  geo omega (argv[1]);
8  space Xh = cavity_space (omega, "P2");
9  space Qh (omega, "P1");
10  trial u (Xh), p (Qh); test v (Xh), q (Qh);
11  form a = integrate (2*ddot(D(u),D(v)));
12  form b = integrate (-div(u)*q);
13  form mp = integrate (p*q);
14  field uh = cavity_field (Xh, 1);
15  field ph (Qh, 0.);
16  solver_abtb stokes (a.uu(), b.uu(), mp.uu());
17  stokes.solve (-(a.ub()*uh.b()), -(b.ub()*uh.b()),
18  uh.set_u(), ph.set_u());
19  dout << catchmark("u") << uh
20  << catchmark("p") << ph;
21 }
field - piecewise polynomial finite element field
Definition: field.h:225
int main(int argc, char **argv)
Definition: stokes_cavity.cc:5
solver_abtb – direct or iterative solver iterface for mixed linear systems
Definition: solver_abtb.h:58
STL namespace.
field_vf_expr< field_vf_expr_grad< test_basic< T, M, VfTag > >> D(const test_basic< T, M, VfTag > &x)
Definition: operators2.h:97
vec< T, M > & set_u()
Definition: field.h:281
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
T ddot(const tensor_basic< T > &a, const tensor_basic< T > &b)
Definition: tensor.cc:200
field_vf_expr< field_vf_expr_div< test_basic< T, M, VfTag > >> div(const test_basic< T, M, VfTag > &x)
Definition: operators2.h:124
Definition: rotating-hill.h:1
const vec< T, M > & b() const
Definition: field.h:280
catchmark - iostream manipulator
Definition: catchmark.h:30
form - representation of a finite element bilinear form
Definition: form.h:98
void solve(const vec< T, M > &f, const vec< T, M > &g, vec< T, M > &u, vec< T, M > &p) const
Definition: solver_abtb.cc:110
Float u(const point &x)
odiststream dout(cout)
Definition: diststream.h:317
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