On Tue, Sep 20, 2011 at 10:11 AM, list user <[email protected]> wrote:
> Is it possible to set the concentration in a specific cell?

Yes as long as you can identify the cell geometrically. You can do
something like this where X and Y are the closest points to the cell
that needs changing and var is the cell variable.

  >>> x, y = mesh.getCellCenters()
  >>> ID = numerix.argmin((x - X)**2 + (y - Y)**2)
  >>> var[ID] = value

> It's my
> understanding that CellVariable will allow the user to define an intial
> concentration for the entire field but I can't seem to find a method to set
> a _pulse_ of concentration.

You can just index as you would with a numpy array.

Hope that helps.

Cheers.

-- 
Daniel Wheeler

Reply via email to