On Mar 20, 2012, at 11:38 AM, Andreas Hasenkopf wrote:

> in my simulations I have a CellVariable called potential defined on a 3D
> mesh generated in gmsh. And now I'd like to convert the data into a
> numpy array so that I can do some more math with it, e.g. integrate
> along a path (e.g. z-axis).

> Is the idea of my attempt of using "potential([ x.flatten(),
> y.flatten(), z.flatten() ])" correct?

It works for me. I cannot reproduce your error. With FiPy 2.1.3, I do get a 
segfault due to running out of memory when I use the full 72000 element mgrid 
you have defined with the twin_ap_3D.msh you sent the other day (this memory 
inefficiency has since been corrected on trunk/). When I use a smaller mgrid, 
the interpolation works as expected. 

If you like, you can email me your mesh and I'll see if that makes a difference.


_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to