memory limit for irregular mesh ?

2011-02-08 Thread Julien Derr
Hi everyone, I am dealing with an irregular mesh done between a big circle and a small polygone. looks like I have memory issues when the polygone becomes more than a few hundreds sides. Is that a typical limitation by fipy ? Is there a way to deal with big polygonial shapes? see error bellow,

Re: memory limit for irregular mesh ?

2011-02-08 Thread Benny Malengier
You do ... value=phi(mesh.getCellCenters())) This is what causes the problem. You can probably work around it by creating value yourself. Fipy uses some vectorized algorithms, which works great, but have the disadvantage that there must be enough memory to allocate the required arrays. In this

Re: memory limit for irregular mesh ?

2011-02-08 Thread Julien Derr
Thanks very much Benny for the explanation, but what do you mean by working in chunks ? I have a variable newphi which is defined on a newmesh and phi the old variable which was defined in the original mesh. how can I copy phi to newphi by chunk ? In any case the huge array needs to be created

Re: memory limit for irregular mesh ?

2011-02-08 Thread Benny Malengier
2011/2/8 Julien Derr julien.d...@gmail.com Thanks very much Benny for the explanation, but what do you mean by working in chunks ? I have a variable newphi which is defined on a newmesh and phi the old variable which was defined in the original mesh. how can I copy phi to newphi by chunk

Re: memory limit for irregular mesh ?

2011-02-08 Thread Julien Derr
do you suggest to do something like for a in xc: for b in yc: newphi.setValue(phi ((array([a]),array([b]) )) ) this is horribly slow... On Tue, Feb 8, 2011 at 3:52 PM, Benny Malengier benny.maleng...@gmail.comwrote: 2011/2/8 Julien Derr julien.d...@gmail.com Thanks

Re: memory limit for irregular mesh ?

2011-02-08 Thread Jonathan Guyer
On Feb 8, 2011, at 11:15 AM, Julien Derr wrote: do you suggest to do something like for a in xc: for b in yc: newphi.setValue(phi ((array([a]),array([b]) )) ) this is horribly slow... Yep. Benny is absolutely correct about the problem. Interpolating from one mesh

Re: mesh

2011-02-08 Thread Fadoua El Moustaid
It works. thanks Jonathan. Fadoua On Feb 8, 2011, at 5:35 AM, Fadoua El Moustaid wrote: Hi all, I have a problem with defining a mesh in the following way: normally: nx = 100 dx = 0.1 mesh = Grid1D(nx = nx, dx = dx) it is a discretization of the the interval [0, 1]. In my case I