Skip to content

Commit

Permalink
update example nls tolerances
Browse files Browse the repository at this point in the history
  • Loading branch information
gardner48 committed Oct 23, 2023
1 parent 3a91e6f commit d5179f1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ int main(int argc, char *argv[])
mukeep, mlkeep, ZERO, flocal, NULL);
if(check_flag(&flag, "ARKBBDPrecInit", 1, my_pe)) MPI_Abort(comm, 1);

/* Tighten nonlinear solver tolerance */
flag = ARKStepSetNonlinConvCoef(arkode_mem, SUN_RCONST(0.01));
if(check_flag(&flag, "ARKStepSetNonlinConvCoef", 1, my_pe)) MPI_Abort(comm, 1);

/* Print heading */
if (my_pe == 0) PrintIntro(npes, mudq, mldq, mukeep, mlkeep);

Expand Down
4 changes: 4 additions & 0 deletions examples/arkode/C_parallel/ark_diurnal_kry_p.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ int main(int argc, char *argv[])
flag = ARKStepSetPreconditioner(arkode_mem, Precond, PSolve);
if (check_flag(&flag, "ARKStepSetPreconditioner", 1, my_pe)) MPI_Abort(comm, 1);

/* Tighten nonlinear solver tolerance */
flag = ARKStepSetNonlinConvCoef(arkode_mem, SUN_RCONST(0.01));
if(check_flag(&flag, "ARKStepSetNonlinConvCoef", 1, my_pe)) MPI_Abort(comm, 1);

/* Print heading */
if (my_pe == 0)
printf("\n2-species diurnal advection-diffusion problem\n\n");
Expand Down
6 changes: 6 additions & 0 deletions examples/arkode/F2003_serial/ark_analytic_f2003.f90
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ program main
stop 1
end if

ierr = FARKStepSetNonlinConvCoef(arkode_mem, 0.01d0)
if (ierr /= 0) then
write(*,*) 'Error in FARKStepSetNonlinConvCoef, ierr = ', ierr, '; halting'
stop 1
end if

! Start time stepping
print *, ' '
print *, 'Finished initialization, starting time steps'
Expand Down

0 comments on commit d5179f1

Please sign in to comment.