-
Notifications
You must be signed in to change notification settings - Fork 438
MRI slow integrator path uses ARKStep-specific API calls on MRIStep memory #5044
Copy link
Copy link
Closed
Description
- Type: Correctness / API misuse
- Severity: High
- Component: SUNDIALS MRI slow-step configuration
- Location:
Src/Extern/SUNDIALS/AMReX_SundialsIntegrator.H:414Src/Extern/SUNDIALS/AMReX_SundialsIntegrator.H:417Src/Extern/SUNDIALS/AMReX_SundialsIntegrator.H:427Src/Extern/SUNDIALS/AMReX_SundialsIntegrator.H:441Src/Extern/SUNDIALS/AMReX_SundialsIntegrator.H:446
Problem
After creating the slow integrator with MRIStepCreate, the code configures it via ARKStepSet* calls (nonlinear/linear solver, stop time, max steps).
Impact
- API calls may fail or not apply to MRIStep as intended.
- Slow MRI solver configuration may be incorrect in implicit IM/IMEX MRI modes.
Suggested patch
Use MRIStep-appropriate setters (or generic ARKode setters for all stepper types when available in the targeted SUNDIALS version).
--- a/Src/Extern/SUNDIALS/AMReX_SundialsIntegrator.H
+++ b/Src/Extern/SUNDIALS/AMReX_SundialsIntegrator.H
@@
- flag = ARKStepSetNonlinearSolver(arkode_mem, NLS);
+ flag = MRIStepSetNonlinearSolver(arkode_mem, NLS);
@@
- flag = ARKStepSetMaxNonlinIters(arkode_mem, max_nonlinear_iters);
+ flag = MRIStepSetMaxNonlinIters(arkode_mem, max_nonlinear_iters);
@@
- flag = ARKStepSetLinearSolver(arkode_mem, LS, nullptr);
+ flag = MRIStepSetLinearSolver(arkode_mem, LS, nullptr);
@@
- flag = ARKStepSetStopTime(arkode_mem, stop_time);
+ flag = MRIStepSetStopTime(arkode_mem, stop_time);
@@
- flag = ARKStepSetMaxNumSteps(arkode_mem, max_num_steps);
+ flag = MRIStepSetMaxNumSteps(arkode_mem, max_num_steps);Prepared by Codex
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels