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. D.
On 19 Feb 2016, at 16:20, Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> wrote:
Hi David,
On 19 Feb 2016, at 15:05, Angwenyi David <kipkoej@gmail.com> wrote:
<WaveEquation.py> Sorry, I sent the wrong file. Please find attached the file that gave me the error:
Traceback (most recent call last): File "<stdin>", line 21, in <module> File "/Users/master/firedrake/lib/python2.7/site-packages/firedrake/io.py", line 110, in __lshift__ self._file << data File "/Users/master/firedrake/lib/python2.7/site-packages/firedrake/io.py", line 524, in __lshift__ self._update_PVD(data) File "/Users/master/firedrake/lib/python2.7/site-packages/firedrake/io.py", line 542, in _update_PVD new_vtk << function File "/Users/master/firedrake/lib/python2.7/site-packages/firedrake/io.py", line 180, in __lshift__ mesh = function.function_space().mesh() AttributeError: 'Sum' object has no attribute 'function_space'
You're trying to output "phin", but inside the time loop you reassign the name phin to an expression:
phin = phin_1 - (dt * theta * pn + dt * (1 - theta) * pn_1)
This is now no longer a Function.
I'm confused about what you're trying to do here. Do you want phin to take the point wise value of the right hand side?
Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk <mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake <https://mailman.ic.ac.uk/mailman/listinfo/firedrake>