NRL-Plasma-Physics-Division / turbopy

A lightweight computational physics framework, based on the organization of turboWAVE. Implements a "Simulation, PhysicsModule, ComputeTool, Diagnostic" class hierarchy.
https://turbopy.readthedocs.io/
Creative Commons Zero v1.0 Universal
10 stars 18 forks source link

Add functionality for writing the CSV buffer to file durning a simulation #145

Closed arichar6 closed 3 years ago

arichar6 commented 4 years ago

Currently, the only time that a CSV diagnostic writes its buffer to file is at the end: https://github.com/NRL-Plasma-Physics-Division/turbopy/blob/165a006ad9ea776e775ef5d823791549b7a53ca5/turbopy/diagnostics.py#L55

It would be useful to have an option to write the buffer to file at some interval, so that it would be easier to monitor the progress of long-running simulations.

arichar6 commented 4 years ago

Thanks for working on this, and for your patience with me getting back to you.

I have some comments, and the code will probably have to be rearranged some from what you wrote. I'll try and put the comments in a review.

arichar6 commented 4 years ago

So I think I should clean up the OutputUtility functionality a bit before we continue with this. It should make the code more organized, and easier to extend. I'd say pause on this for a bit until I get that in place.

arichar6 commented 4 years ago

@AOstenfeld see #150 for some ideas that I'm trying for refactoring the way that Diagnostics + OutputUtilities work. I'd appreciate thoughts/comments on that code. It should make your effort easier.

AOstenfeld commented 4 years ago

Sounds good. I'll check it out.

arichar6 commented 4 years ago

See my comment on #148 for some new ideas I had for this.