[firedrake] tracking write accesses to dats/functions

Eike Mueller eike.h.mueller at googlemail.com
Sun Nov 23 12:11:34 GMT 2014


Dear firedrakers,

can I somehow check whether a dat/function has been written to since I last performed a given operation on it?

I have a banded matrix A stored in each cell on mesh, and whenever I solve the equation A.x = b (separately in each column, of course) I want to do this in two steps:

(1) calculate the LU decomposition (lapack dgbtrf)
(2) solve based on that LU decomposition (lapack dgbtrs)

I have to do a lot of solves, so for efficiency I want to only do (1) if my matrix A has changed. So when I do a solve, I check if a flag lu_decomp is True (and this flag is set to False upon matrix creation). If it is, then I go straight to (2), otherwise I do (1) first. But I need to make sure that whenever my banded matrix has been written to lu_decomp is set back to False.

Thanks,

Eike



More information about the firedrake mailing list