19 Feb
2016
19 Feb
'16
3:36 p.m.
On 19 Feb 2016, at 15:31, Angwenyi David <kipkoej@gmail.com> wrote:
Hi Lawrence,
Phin is the value of phi at time step n. Perhaps I should do
phi = phin
within the time loop and output the result as phi.
So the problem is occurring because phin is no longer a firedrake Function, but rather a symbolic expression:
phin = phin_1 - (dt * theta * pn + dt * (1 - theta) * pn_1)
This sets the name (or if you will, label) "phin" to the symbolic expression on the right hand side of the equals sign. If instead you wanted the Function referred to by phin to take on the point wise value of the right hand side expression, you should do: phin.assign(phin_1 - (dt * theta * pn + dt * (1 - theta) * pn_1)) Lawrence