Efficiency of calculating the gradient of reduced functional
Issue #47
resolved
Hi,
I have compared the timings between the forward run and reduced_functional.derivative() in the test case:
Calculating the derivative usually takes 3 or 4 times longer than the forward simulation. Is this a theoretical optimum or there is a way to optimize it by playing with some parameters?
Comments (2)
-
-
- changed status to resolved
Close this for now - If the problem still persists, feel free to re-open
- Log in to comment
The adjoint should take as much time as the forward run. What you observe is probably the overhead of the symbolic derivation of the adjoint equations. This overhead should become negligible once the assembly and solve times are increased.
Try refining the mesh and see if you get better results.