Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
maggul committed Oct 7, 2024
1 parent 898820b commit 07ae3f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions include/sundials/sundials_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ extern "C" {
*
* SUNIceil calls the appropriate version of ceil and returns sunindextype
*
* SUNIfloor calls the appropriate version of ceil and returns sunindextype
* SUNIfloor calls the appropriate version of floor and returns sunindextype
*
* SUNIround calls the appropriate version of ceil and returns sunindextype
* SUNIround calls the appropriate version of round and returns sunindextype
* -----------------------------------------------------------------
*/

Expand Down
12 changes: 7 additions & 5 deletions src/arkode/arkode_lsrkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
}

/* determine the number of required stages */
int ss =
(int)SUNIceil(SUNRsqrt(onep54 * SUNRabs(ark_mem->h) * step_mem->spectral_radius));
int ss = (int)SUNIceil(
SUNRsqrt(onep54 * SUNRabs(ark_mem->h) * step_mem->spectral_radius));
ss = SUNMAX(ss, 2);
step_mem->req_stages = SUNMIN(ss, step_mem->stage_max_limit);
if (step_mem->req_stages == step_mem->stage_max_limit)
Expand Down Expand Up @@ -782,9 +782,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
if (retval != ARK_SUCCESS) { return retval; }
}

int ss =
(int)SUNIceil((SUNRsqrt(SUN_RCONST(9.0) + SUN_RCONST(8.0) * SUNRabs(ark_mem->h) *
step_mem->spectral_radius) - ONE) / TWO);
int ss = (int)SUNIceil(
(SUNRsqrt(SUN_RCONST(9.0) + SUN_RCONST(8.0) * SUNRabs(ark_mem->h) *
step_mem->spectral_radius) -
ONE) /
TWO);

ss = SUNMAX(ss, 2);
step_mem->req_stages = SUNMIN(ss, step_mem->stage_max_limit);
Expand Down

0 comments on commit 07ae3f7

Please sign in to comment.