Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
diffusion_tensor.cc
Go to the documentation of this file.
1
25#include "rheolef.h"
26using namespace rheolef;
27using namespace std;
29int main(int argc, char**argv) {
30 environment rheolef (argc, argv);
31 geo omega (argv[1]);
32 space Xh (omega , argv[2], "tensor");
33 space Wh (omega["boundary"], argv[2], "tensor");
34 Xh.block("boundary");
35 trial sigma (Xh); test tau (Xh);
36 form ah = integrate (ddot(sigma,tau) + dddot(grad(sigma), grad(tau)));
37 field lh = integrate (ddot(chi(),tau));
38 field sigma_h(Xh);
39 sigma_h["boundary"] = interpolate(Wh, sigma_g());
40 problem p (ah);
41 p.solve (lh, sigma_h);
42 dout << catchmark("sigma") << sigma_h;
43}
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
see the catchmark page for the full documentation
Definition catchmark.h:67
see the environment page for the full documentation
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
The tensorial diffusion benchmark – right-hand-side and exact solution.
sigma_exact sigma_g
int main()
Definition field2bb.cc:58
This file is part of Rheolef.
std::enable_if< details::has_field_rdof_interface< Expr >::value, details::field_expr_v2_nonlinear_terminal_field< typenameExpr::scalar_type, typenameExpr::memory_type, details::differentiate_option::gradient > >::type grad(const Expr &expr)
grad(uh): see the expression page for the full documentation
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
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
STL namespace.
rheolef - reference manual
Definition sphere.icc:25