Rheolef  7.2
an efficient C++ finite element environment
diffusion_tensor.cc

The tensor diffusion benchmark

#include "rheolef.h"
using namespace rheolef;
using namespace std;
int main(int argc, char**argv) {
environment rheolef (argc, argv);
geo omega (argv[1]);
space Xh (omega , argv[2], "tensor");
space Wh (omega["boundary"], argv[2], "tensor");
Xh.block("boundary");
trial sigma (Xh); test tau (Xh);
form ah = integrate (ddot(sigma,tau) + dddot(grad(sigma), grad(tau)));
field lh = integrate (ddot(chi(),tau));
field sigma_h(Xh);
sigma_h["boundary"] = interpolate(Wh, sigma_g());
problem p (ah);
p.solve (lh, sigma_h);
dout << catchmark("sigma") << sigma_h;
}
field lh(Float epsilon, Float t, const test &v)
see the field page for the full documentation
see the form page for the full documentation
see the geo page for the full documentation
see the problem page for the full documentation
odiststream dout(cout)
see the diststream page for the full documentation
Definition: diststream.h:467
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
int main(int argc, char **argv)
The tensorial diffusion benchmark – right-hand-side and exact solution.
sigma_exact sigma_g
This file is part of Rheolef.
std::enable_if< details::has_field_rdof_interface< Expr >::value,details::field_expr_v2_nonlinear_terminal_field< typename Expr::scalar_type,typename Expr::memory_type,details::differentiate_option::gradient >>::type grad(const Expr &expr)
grad(uh): see the expression page for the full documentation
T dddot(const tensor3_basic< T > &a, const tensor3_basic< T > &b)
Definition: tensor3.cc:94
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:211
field_basic< T, M > interpolate(const space_basic< T, M > &V2h, const field_basic< T, M > &u1h)
see the interpolate page for the full documentation
Definition: interpolate.cc:233
T ddot(const tensor_basic< T > &a, const tensor_basic< T > &b)
ddot(x,y): see the expression page for the full documentation
Definition: tensor.cc:278
rheolef - reference manual
Definition: sphere.icc:25