Hi Jonathan,
these are the errors I ran into:
1)
Traceback (most recent call last):
File "damian_mail.py", line 47, in <module>
phi.constrain(phi.value[bacteria5], where=bacteria2)
IndexError: unsupported iterator index
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...)
3) I also tried
>>>phi.constraints[2].value = phi.value[bacteria5]
before
>>>eq.solve(var=phi,dt=timeStepDuration)
Execution of eq.solve also never finished. (Again without giving me a
RuntimeError this time...)
I hope this is what you asked for.
__________________________
* What I would also be interested in is deleting a constraint. I am not
sure how release() works in this context, because I didn't store my
constraints in variables.
Thanks and kind regards
Damian
2013/9/25 Guyer, Jonathan E. Dr. <[email protected]>
>
> On Sep 25, 2013, at 4:59 AM, Damian Kösters <[email protected]>
> wrote:
>
> > 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).
>
> phi.constrain(10, bacteria2) takes precedence over any value you assign at
> the location of bacteria2
>
> > The second line gives me an indexing error ("unsupported iterator
> index"). Changing the right side to phi[bacteria5.value]
> > gave me a RuntimeError.
>
> Yes, it needs to be `bacteria5.value`.
>
> Can you provide the full error traceback?
>
>
> _______________________________________________
> 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 ]