Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
diffusion_tensor_exact.icc
Go to the documentation of this file.
1
25struct sigma_exact {
26 tensor operator() (const point& x) const {
27 Float pi = acos(Float(-1.0));
28 tensor s;
29 s(0,0) = cos(pi * x[0]);
30 s(1,1) = cos(pi * x[1]);
31 s(0,1) =
32 s(1,0) = sin(pi * x[0] * x[1]);
33 return s;
34 }
36 {}
37};
38struct chi {
39 tensor operator() (const point& x) const {
40 Float pi = acos(Float(-1.0));
41 tensor s;
42 s(0,0) = (1 + sqr(pi)) * cos(pi * x[0]);
43 s(1,1) = (1 + sqr(pi)) * cos(pi * x[1]);
44 s(0,1) =
45 s(1,0) = (1 + sqr(pi) * (sqr(x[0]) + sqr(x[1]))) * sin(pi * x[0] * x[1]);
46 return s;
47 }
48 chi () {}
49};
see the Float page for the full documentation
see the point page for the full documentation
see the tensor page for the full documentation
sigma_exact sigma_g
tensor operator()(const point &x) const
tensor operator()(const point &x) const