Blitz logo

Blitz Support :

From: Vladimir Chalupecky (chalupec_at_[hidden])
Date: 2005-06-14 07:17:42


Hi all,

I would like to implement a stencil operator for div(g(u) grad u)
operator in 2D (and 3D) using the classical approximation (for
simplicity only in 1D)
div(g(u) grad u)|_i = \frac{g_{i+1/2}(u_{i
+1}-u_i)-g_{i-1/2}(u_i-u_{i-1})}{h^2}
where
g_{i+1/2} = 1/2*(g(u_{i+1})+g(u_i))
and
g_{i-1/2} = 1/2*(g(u_{i-1})+g(u_i))
What would be the best approach? Is it doable in an elegant and
efficient way?

Thanks, Vladimir

-- 
Ing. Vladimir Chalupecky
Department of Mathematics
CTU FNSPE Prague