You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sol_lazy =solve(solver,op)
# We need a forward solution that can be iterated in reverse
sol =collect(sol_lazy) # Option 1
sol =CeckpointedSol(sol_lazy) # Option 2
sol_reversed =reverse(sol)
for (uh_n,t_n) in sol_reversed
end# Adjoint (from the sol that can be iterated in reverse)
adj_op =Adjoint(op,sol,j_u(sol))
# Lazy adjoint solution
adj_sol =solve(solve,adj_op)
# Iteration of the adjoint backwards in timefor (adj_uh_n, t_n) in adj_sol
end# If needed, reverse iteration of forward and adjoint solutionsfor ((adj_uh_n, t_n), (uh_n, t_n) )in zip(adj_sol,sol_reversed)
end
cc @santiagobadia @oriolcg