rheolef  7.0
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
rheolef::std enable_if ::type dot const Expr1 expr1, const Expr2 expr2 dot(const Expr1 &expr1, const Expr2 &expr2)
Definition: vec_expr_v2.h:335
STL namespace.
vec< T, M > & set_u()
Definition: field.h:293
irheostream, orheostream - large data streams
Definition: compiler.h:7
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 quadrature_option &qopt, Result dummy=Result())
integrate - integrate a function or an expression
Definition: integrate.h:107
space – piecewise polynomial finite element space
Definition: space.h:229
size_t d
std::enable_if< details::is_field_expr_v2_linear_arg< Expr >::value,details::field_expr_v2_nonlinear_terminal_field_grad< typename Expr::scalar_type,typename Expr::memory_type >>::type grad(const Expr &expr)
const vec< T, M > & b() const
Definition: field.h:292
const csr< T, M > & ub() const
Definition: form.h:141
const csr< T, M > & uu() const
Definition: form.h:140
int main(int argc, char **argv)
Definition: dirichlet2.cc:5
form - representation of a finite element bilinear form
Definition: form.h:98
ublas::vector_range< ublas::vector< double > > f()
Float u(const point &x)
const vec< T, M > & u() const
Definition: field.h:291
odiststream dout(cout)
Definition: diststream.h:313