Open cglosser opened 4 years ago
The issue I have is that I do not want to write the output every time I change a value in the history array. Suppose I have a method history::set_value_at_time(step) that would change a value in the array and write the old value to the output file, If i were to call this during each corrector step I would have a problem. Presumably I should have something like history::write_results(step) that I call from inside PredictorCorrector::solve(), correct?
Yes, definitely. Writing at the end of PredictorCorrector::solve()
probably makes the most sense. You may also want to think about how you'll do this; it might make sense to develop a Writer
or Logger
that you construct the Integrator
with that manages all of this.
The change to the
History
class in #46 means thatmain()
won't be able to write out all of the simulation data to a file after it's finished simulating, so this logic should move intoHistory
and the object should write incrementally.