Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
Also ERKStep is the only implementation that resets the adaptivity controller.
Expected Behavior:
Objects should be freed and the workspace size should be updated appropriately.
Also, ARKStep and ERKStep should be consistent about handling of adaptivity controller when ARKodeSetDefaults called.
Steps To Reproduce:
Call ARKodeSetDefaults after setting a Butcher table or nonlinear solver.
I've confirmed a memory leak with valgrind when ARKodeSetDefaults is called after ARKStepSetTableNum. Haven't tested further.
Current Behavior:
When
ARKodeSetDefaults
is called, some of the implementationsNULL
out Butcher tables and the nonlinear solver without freeing:https://github.com/LLNL/sundials/blob/c28eaa3764a03705d61decb6025b409360e9d53f/src/arkode/arkode_arkstep_io.c#L680-L682
https://github.com/LLNL/sundials/blob/c28eaa3764a03705d61decb6025b409360e9d53f/src/arkode/arkode_erkstep_io.c#L310
https://github.com/LLNL/sundials/blob/c28eaa3764a03705d61decb6025b409360e9d53f/src/arkode/arkode_mristep_io.c#L255-L256
(SPRKStep appears ok)
Also ERKStep is the only implementation that resets the adaptivity controller.
Expected Behavior:
Objects should be freed and the workspace size should be updated appropriately. Also, ARKStep and ERKStep should be consistent about handling of adaptivity controller when
ARKodeSetDefaults
called.Steps To Reproduce:
Call
ARKodeSetDefaults
after setting a Butcher table or nonlinear solver.I've confirmed a memory leak with valgrind when
ARKodeSetDefaults
is called afterARKStepSetTableNum
. Haven't tested further.