On 16/02/17 18:08, William Booker wrote:
Dear Lawrence,
"I note in passing that your code will be very slow because you call solve in a loop over-and-over. You should refactor it to use a LinearVariationalSolver. This notebook https://nbviewer.jupyter.org/github/firedrakeproject/firedrake/blob/master/d...
describes how (and why) you need to do this."
Would it be possible to use this Solver, .solve() method if a part of the weak form was time dependant. I have a body force included in the weak form now.
Yes.
If I created a solver, and then called .solve() while using .assign to change the value of my body force, would you still expect run time to be faster or would this better for non autonomous matrices.
It will still be faster. You will only be recomputing values, not allocating and deallocating the matrices and rederiving symbolic information (which is not free). Lawrence