On Sep 27, 2013, at 8:26 AM, Jon Guyer <[email protected]>
 wrote:

>> 2) I included
>>>>> phi.constrain(phi[bacteria5.value], where=bacteria2)
>> before
>>>>> viewer = Viewer(vars=phi, datamin=0., datamax=2.)
>> and never got beyond this line. (It didnt give me an error within two 
>> minutes…)
> 
> That needs to be phi.value[bacteria5.value], not phi[bacteria5.value].
> 
> As it stands, the constraint is that the value at bacteria2 should be the 
> instantaneous value of phi at bacteria5. To determine this, FiPy has to get 
> the field of current values, then apply all constraints and return the 
> result. You have a constraint that depends on all constraints (including 
> itself) and it goes into an infinite loop.

I meant to say, I can see the value of having a constraint that depends on the 
*unconstrained* instantaneous value, which would not provoke the infinite loop. 
I've filed a ticket to look into making a public API for this: 
http://matforge.org/fipy/ticket/656.

As it stands, you'll need to manually reset the constraint at every timestep.


_______________________________________________
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