You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cvode_time_solver.jl
+21-7Lines changed: 21 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -44,13 +44,27 @@ function cvode_solve!(f::Function,
44
44
# Passing -1 disables the test for maximum number of steps. This is 'not recommended'
45
45
# according to the CVODE manual.
46
46
flag = Sundials.@checkflag Sundials.CVodeSetMaxNumSteps(mem, -1) true
47
-
# Make CVODE increase the timestep less agressively
48
-
flag = Sundials.@checkflag Sundials.CVodeSetFixedStepBounds(mem, 0.0, 1.1) true# Default was (0,0, 1.5), which means minimum increase of step size is a factor 1.5. Decrease this to 1.1.
49
-
flag = Sundials.@checkflag Sundials.CVodeSetEtaMax(mem, 1.2) true# Default was 10, which means increase in step size can be up to factor 10. Limit this to 1.2.
50
-
51
-
# Set linear solver
52
-
LS = Sundials.SUNLinSol_SPGMR(y0nv, Sundials.PREC_NONE, -1)
53
-
flag = Sundials.@checkflag Sundials.CVodeSetLinearSolver(mem, LS, C_NULL) true
47
+
## The following needs sundials-6.2, which is not supported yet by Sundials.jl (see
## Make CVODE increase the timestep less agressively
51
+
##flag = Sundials.@checkflag Sundials.CVodeSetEtaFixedStepBounds(mem, 0.0, 1.1) true # Default was (0,0, 1.5), which means minimum increase of step size is a factor 1.5. Decrease this to 1.1.
52
+
##flag = Sundials.@checkflag Sundials.CVodeSetEtaMax(mem, 1.2) true # Default was 10, which means increase in step size can be up to factor 10. Limit this to 1.2.
0 commit comments