Hi there,

I am currently trying to set the initial conditions of a one dimensional 
Fokker-Planck equation. I want to have sth like p(x_0,t=0) = 10, p(x \neq x_0, 
t=0) = 0. However, if I type the following code

from fipy import *
from numpy import *
from pylab import *

""" Building a 1d linear grid with nx evaluation points that are equally spaced
    with interval dx """

nx = 500
dx = -0.01
mesh = Grid1D(nx=nx, dx=dx)

m = 1.5
D = 0.5

""" Initial Conditions """

y0 = 0.0
pos = CellVariable(name = '$p(y)$', mesh = mesh, value = y0)

y = mesh.getCellCenters()#[...,0]

pos.setValue(10.0, where =(4.0<y) & (y<4.1))

viewer=Viewer(vars=pos)
viewer.plot

I only see a horizontal line so that p(y) = 0. FiPy seems to ignore my setValue 
command. Or do I miss something?

Thanks,

Oliver



-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

Reply via email to