Hello Jonathan,
I changed the x,y section as you recommended.

I then tried inside the "if step>10"-clause:
 >>>       phi[bacteria2.value] = phi[bacteria5.value]
 >>>       phi.constraints[2].value = phi.value[bacteria5]

It seems that the first line does have an effect (even though when I print
the right side it gives me reasonable numbers).

The second line gives me an indexing error ("unsupported iterator index").
Changing the right side to phi[bacteria5.value]
 gave me a RuntimeError.

Thank you for your support,
Best regards,
Damian


2013/9/25 Guyer, Jonathan E. Dr. <[email protected]>

>
> On Sep 24, 2013, at 3:22 PM, Damian Kösters <[email protected]>
> wrote:
>
> >  * Why is my selection "bacteria" of type <type 'numpy.ndarray'>,
> whereas  the
> > facesTopLeft is <class 'fipy.variables.binaryOperatorVariable.binOp'> ?
>
> Because of a bug: http://matforge.org/fipy/ticket/447
>
> Use:
>
> >>> x, y = mesh.cellCenters[0], mesh.cellCenters[1]
> >>> X, Y = mesh.faceCenters[0], mesh.faceCenters[1]
>
> >  * How can I change the value of phi in the bacteria2-area to the recent
> value in another equally sized patch?
>
> >>> bacteria5 = ((x-70)**2+(y-40)**2) < 10
>
> apply a new constraint to be applied after the original one
>
> >>> phi.constrain(phi.value[bacteria5], where=bacteria2)
>
> or
>
> change the value of the original constraint (assuming you know which one)
> note that the facesTopLeft and facesBottomRight constraints don't appear
> in phi.constraints
>
> >>> phi.constraints[1].value = phi.value[bacteria5]
>
>
> > And how can I manipulate phi at one single place?  It should not be
> constant afterwards.
>
>
> >>> phi[bacteria5] = phi[bacteria2]
>
> If you make the change to x, y above, then
>
> >>> phi[bacteria5.value] = phi[bacteria2.value]
>
>
> _______________________________________________
> fipy mailing list
> [email protected]
> http://www.ctcms.nist.gov/fipy
>   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to