On Fri, Feb 4, 2011 at 7:10 AM, Julien Derr <julien.d...@gmail.com> wrote:
> so what I would like to do is for the values (xc,yc) (mesh centers of the
> new mesh), give to newphi the value that oldphi had at these points.

This should work.

>>> from fipy import *

>>> m1 = Grid2D(nx=3, ny=3)
>>> x1, y1 = m1.getCellCenters()
>>> v1 = CellVariable(mesh=m1, value=x1 * y1)

>>> m0 = Grid2D(nx=2, ny=2)
>>> v0 = CellVariable(mesh=m0, value=v1(m0.getCellCenters()))

I haven't checked the above, so possible typos.

-- 
Daniel Wheeler

Reply via email to