On Dec 4, 2007, at 8:01 AM, Daniel Lewis wrote:
# To build of off diagonal terms we need a vector pointing in the
"j" direction with magnitude
# of the gradient of "c" in the "i" direction. This python code
does this exactly.
dcdydx = c.getFaceGrad()._take((1, 0), axis = 1)
# NOTE: If you want a transient solution you build your equation
this way:
eqn1 = TransientTerm() == ImplicitDiffusionTerm(D) + (D12 + D12)
*dcdydx.getDivergence()
Thanks for the tips, Dan.
Just so you know, a more natural (and more accurate) way to represent
anisotropic diffusion is coming soon to a FiPy near you.