rheolef  6.6
dirichlet2.cc
Go to the documentation of this file.
1 #include "rheolef.h"
2 using namespace rheolef;
3 using namespace std;
4 #include "sinusprod_laplace.icc"
5 int main(int argc, char**argv) {
6  environment rheolef(argc, argv);
7  geo omega (argv[1]);
8  size_t d = omega.dimension();
9  space Xh (omega, argv[2]);
10  Xh.block ("boundary");
11  trial u (Xh); test v (Xh);
12  form a = integrate (dot(grad(u),grad(v)));
13  field lh = integrate (f(d)*v);
14  field uh (Xh);
15  uh ["boundary"] = 0;
16  solver sa (a.uu());
17  uh.set_u() = sa.solve (lh.u() - a.ub()*uh.b());
18  dout << uh;
19 }
field - piecewise polynomial finite element field
Definition: field.h:225
const vec< T, M > & u() const
Definition: field.h:279
field_vf_expr< field_vf_expr_grad< test_basic< T, M, VfTag > >> grad(const test_basic< T, M, VfTag > &x)
Definition: operators2.h:74
STL namespace.
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
size_t d
const vec< T, M > & b() const
Definition: field.h:280
T dot(const vec< T, M > &x, const int &y)
int main(int argc, char **argv)
Definition: dirichlet2.cc:5
form - representation of a finite element bilinear form
Definition: form.h:98
solver - direct or interative solver interface
Definition: solver.h:8
ublas::vector_range< ublas::vector< double > > f()
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