153 # Iterator that does visualisation and log collection |
153 # Iterator that does visualisation and log collection |
154 ###################################################### |
154 ###################################################### |
155 |
155 |
156 function iterate_visualise(st :: State, |
156 function iterate_visualise(st :: State, |
157 step :: Function, |
157 step :: Function, |
158 params :: NamedTuple) where DisplacementT |
158 params :: NamedTuple) |
159 try |
159 try |
160 for iter=1:params.maxiter |
160 for iter=1:params.maxiter |
161 st = step() do calc_objective |
161 st = step() do calc_objective |
162 if isnothing(st.start_time) |
162 if isnothing(st.start_time) |
163 # The Julia precompiler is a miserable joke, apparently not crossing module |
163 # The Julia precompiler is a miserable joke, apparently not crossing module |