Hi Everyone, I have a simple linear elliptic problem where the source term has many parameters. I can use dolfin-adjoint to get the sensitivity of a functional to all of them and it's working great. However I'm doing it this way:
for i in range(0, 10):
dJdm = compute_gradient(J, m[i], forget=False)
print float(didm)
Every time compute_gradient is called the adjoint problem is solved. Is there a more efficient way, where the adjoint problem is solved once and the sensitivities are computed from the adjoint variables? I looked through the dolfin-adjoint documentation and tutorials but couldn't find something that addresses this directly.
Thanks,
Dave