Hi Marc,
CellVariable's __call__ method extracts data. So you can do the following:
from fipy import *
import pylab
L = 1.
n = 10
m = Grid2D(nx=n, ny=n, dx=L / n, dy=L / n)
x, y = m.cellCenters
v = CellVariable(mesh=m, value = x * y)
N = 50
S = numerix.arange(N) / float(N - 1) * L
pylab.plot(S, v([S, S], order=1))
pylab.show()
raw_input('stopped')
Basically, you can extract any data from "v" with "v([x, y])" where
"x" and "y" define a set of coordinates.
Cheers
On Tue, May 17, 2011 at 4:47 AM, Marc Saudreau
<[email protected]> wrote:
>
> Hi everyone,
>
> I'm trying to use Fipy to solve a 2D heat transfer problem, and I need to
> extract from my 2D grid, some 1D profiles. For instance I need to plot
> temperature versus y axis for x given.
> I had a look at Fipy examples but I did not find any way to do it.
> Thanks a lot for any help.
>
> Best regards,
>
> Marc
>
>
--
Daniel Wheeler