Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
diffusion_tensor_exact.icc

The tensorial diffusion benchmark – right-hand-side and exact solution.

The tensorial diffusion benchmark – right-hand-side and exact solution

struct sigma_exact {
tensor operator() (const point& x) const {
Float pi = acos(Float(-1.0));
tensor s;
s(0,0) = cos(pi * x[0]);
s(1,1) = cos(pi * x[1]);
s(0,1) =
s(1,0) = sin(pi * x[0] * x[1]);
return s;
}
{}
};
struct chi {
tensor operator() (const point& x) const {
Float pi = acos(Float(-1.0));
tensor s;
s(0,0) = (1 + sqr(pi)) * cos(pi * x[0]);
s(1,1) = (1 + sqr(pi)) * cos(pi * x[1]);
s(0,1) =
s(1,0) = (1 + sqr(pi) * (sqr(x[0]) + sqr(x[1]))) * sin(pi * x[0] * x[1]);
return s;
}
chi () {}
};
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