Create a results object to encapsulate simulation results and logic
Is your feature request related to a problem? Please describe. kWaveFirstOrder returns a variety of values depending on the simulation configuration. The logic of which values are returned, how they should be displayed, and their meaning could be better managed. Currently, they are returned as a dictionary of values, which can be difficult for users to interpret.
Describe the solution you'd like One possible solution is to use xarray.Datasets() to save the solution results and wrap all plotting and processing logic.
Describe alternatives you've considered We've considered making custom classes internally.
Additional context @djps came up with this suggestion
We should also consider how typing is supported in the xarray.
It may be useful to see how this has been done for with Feltor and look at this presentation here
This is implemented in open_pyfus
Other possible options, more focused on plotting, include:
Other potential options which deal with unstructured grids, such as those which can be handled with meshio for example, are probably out of scope as the results are on grids.