Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write output data in History class #47

Open
cglosser opened this issue Jun 11, 2020 · 2 comments
Open

Write output data in History class #47

cglosser opened this issue Jun 11, 2020 · 2 comments
Assignees

Comments

@cglosser
Copy link
Owner

The change to the History class in #46 means that main() 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 into History and the object should write incrementally.

@cglosser cglosser changed the title Write output data in History class Write output data in History class Jun 11, 2020
@tbertus
Copy link
Collaborator

tbertus commented Jun 11, 2020

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?

@cglosser
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants