I’m trying to use Fenics to solve the diffusion equation: grad(*kgrad(u)) = 0**
In my situation, k is a scalar field defined from a given numpy matrix M as following:
k = Expression(‘M[int(x*nx/l),int(x*ny/h)’, M=M, nx=nx, ny=ny, l=l, h=h)
This is not working as M is not recognized by C++ I guess.
Can anyone help me to solve this issue?