chalmersplasmatheory / DREAM

The Disruption Runaway Electron Analysis Model
MIT License
24 stars 5 forks source link

Mismatch in time steps in the residual convergence checker #296

Open leferi99 opened 3 months ago

leferi99 commented 3 months ago

Based on checking the array sizes in DREAM output files in which the timesteps!=savesteps I believe the solver (nonlinear in my case) contains saved data about the residual max error as well as the number of iterations needed for convergence at each timestep, not just at each savestep. This is supposedly a bug in the C++ code.

The issue is apparent when trying to call solver.plot(), solver.plotResidualConvergence() or solver.plotResidualMaxError() in the CLI (DREAM/py/cli/cli.py). The different plotting routines return with errors due to size mismatches of the arrays which would be plotted.

leferi99 commented 1 month ago

Quoting Mathias:

The DREAM output file should not contain any traces of how many time steps were actually taken (except under the "settings" category). It should only contain the saved time steps. If the non-linear solver contains information about the residual convergence in every time step, this is a bug which should be fixed in the C++ code.