- edited description
Evaluate forward model state variables during optimization.
I would like to evaluate individual elements of my objective function and state variables during optimization.
I need this to analyze the performance of my solver.
I really just need the state variable, which I could then assign to the variable used in the objective functionals that I assemble each iteration with the eval_cb function utilized by ReducedFunctional.
Also, it would be nice to have access to the adjoint variables as well, for plotting purposes and such.
Can this be done?
Comments (5)
-
reporter -
reporter - edited description
-
What you are looking for is
DolfinAdjointVariable.tape_value()
- it retrieves the Function objects on dolfin-adjoint tape of its latest run.Here is an example how this can be used:
http://www.dolfin-adjoint.org/en/latest/documentation/mpec/mpec.html
-
- changed status to resolved
-
reporter Thanks for this!
- Log in to comment