On Fri, Oct 14, 2011 at 10:44 AM, Julien Derr <[email protected]> wrote: > Hi everyone, > > here is my technical question of the day ... > > phi is a DistanceVariable > > type(phi) > Out[39]: <class > 'fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable'> > > if I defineĀ I=phi._cellInterfaceFlag > > it gives me an array. > > In [41]: I > Out[41]: array([0, 0, 0, ..., 0, 0, 0]) > > In [42]: type(I) > Out[42]: <type 'numpy.ndarray'> > > > is it possible to get directly a Cellvariable ?
Not really. You can use it to set the value of a cell variable. Another option is to create a cell variable class with a calcValue method that uses _cellInterfaceFlag to update its own value and also requires phi. It will then update whenever phi changes. -- Daniel Wheeler _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy]
