chalmersplasmatheory/DREAM

Mismatch in time steps in the residual convergence checker

leferi99 opened this issue · 2 comments

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.

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.