Currently, the code uses a flag-based approach to allow the user to select which dynamical quantities to output during a simulation. Some additional features can be added to improve both flexibility and performance. Below is a rough list of ideas to implement:
Allow the output frequency for each physical quantity to be set independently by the user (or turned off altogether)
Consolidate the loops in output_vtk, which are essentially repeated for each dynamical quantity
Consolidate the calculations that are repeated for each dynamical quantity in output_vtk; i.e., determine, based on user selection, which intermediate quantities must be computed and perform the minimum number of times needed to compute the selected output quantities.
Move the calculations for each outputted quantity into a separate subroutine; this will also allow the user to define custom output subroutines for computing other physical quantities not already present
This is just a list to get things started. More ideas/improvements can be added later.
Currently, the code uses a flag-based approach to allow the user to select which dynamical quantities to output during a simulation. Some additional features can be added to improve both flexibility and performance. Below is a rough list of ideas to implement:
output_vtk
, which are essentially repeated for each dynamical quantityoutput_vtk
; i.e., determine, based on user selection, which intermediate quantities must be computed and perform the minimum number of times needed to compute the selected output quantities.This is just a list to get things started. More ideas/improvements can be added later.