Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macro for consistent sunrealtype formatting #517

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3f3be17
Squash commits
Steven-Roberts Jun 21, 2024
39b1620
Merge branch 'develop' into feature/real-format3
gardner48 Jun 22, 2024
c32face
Merge branch 'develop' into feature/real-format3
gardner48 Jun 22, 2024
83905c8
update .out files
gardner48 Jun 24, 2024
65e9da0
Merge branch 'develop' into feature/real-format3
gardner48 Jun 27, 2024
50f32bb
Apply suggestions from code review
Steven-Roberts Jun 28, 2024
fe7f76d
Update src/sundials/sundials_utils.h
Steven-Roberts Jun 28, 2024
84024ab
Remove final newline from matrix output
Steven-Roberts Jun 29, 2024
494f217
Merge branch 'feature/real-format3' of github.com:LLNL/sundials into …
Steven-Roberts Jun 29, 2024
bdb5bbb
Switch IDA to sunfprintf_*
Steven-Roberts Jun 29, 2024
df13a2a
Switch to SUN_FORMAT_*
Steven-Roberts Jun 29, 2024
817ed11
Switch to 'e' format for MRI tables
Steven-Roberts Jun 29, 2024
a415ce9
Apply formatter
Steven-Roberts Jun 29, 2024
9b654df
Use space consistently in format
Steven-Roberts Jun 29, 2024
e9c9a71
Fix ida real stats
Steven-Roberts Jun 29, 2024
7cd0509
Switch Butcher table to 'e' format
Steven-Roberts Jun 29, 2024
9aaddfe
update output files
gardner48 Jun 30, 2024
fbd7ad0
Merge branch 'develop' into feature/real-format3
gardner48 Jul 3, 2024
77f6135
Merge branch 'develop' into feature/real-format3
Steven-Roberts Jul 27, 2024
aef939b
Remove sign padding from g format
Steven-Roberts Jul 27, 2024
50d8d8c
Merge branch 'develop' into feature/real-format3
Steven-Roberts Aug 29, 2024
9ec1fad
Merge branch 'develop' into feature/real-format3
Steven-Roberts Sep 6, 2024
e7d6397
Merge branch 'develop' into feature/real-format3
Steven-Roberts Sep 17, 2024
5399b9e
Revert out files to make future merges easier
Steven-Roberts Sep 17, 2024
9bfb997
Merge branch 'develop' into feature/real-format3
Steven-Roberts Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions include/sundials/sundials_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ typedef float sunrealtype;
#define SUN_BIG_REAL FLT_MAX
#define SUN_SMALL_REAL FLT_MIN
#define SUN_UNIT_ROUNDOFF FLT_EPSILON
#define SUN_REAL_FORMAT_E "%." SUN_STRING(FLT_DIG) "e"
#define SUN_REAL_FORMAT_G "%." SUN_STRING(FLT_DIG) "g"
#define SUN_FORMAT_E "%." SUN_STRING(FLT_DIG) "e"
#define SUN_FORMAT_G "%." SUN_STRING(FLT_DIG) "g"
Steven-Roberts marked this conversation as resolved.
Show resolved Hide resolved

#elif defined(SUNDIALS_DOUBLE_PRECISION)

Expand All @@ -104,8 +104,8 @@ typedef double sunrealtype;
#define SUN_BIG_REAL DBL_MAX
#define SUN_SMALL_REAL DBL_MIN
#define SUN_UNIT_ROUNDOFF DBL_EPSILON
#define SUN_REAL_FORMAT_E "%." SUN_STRING(DBL_DIG) "e"
#define SUN_REAL_FORMAT_G "%." SUN_STRING(DBL_DIG) "g"
#define SUN_FORMAT_E "%." SUN_STRING(DBL_DIG) "e"
#define SUN_FORMAT_G "%." SUN_STRING(DBL_DIG) "g"

#elif defined(SUNDIALS_EXTENDED_PRECISION)

Expand All @@ -114,8 +114,8 @@ typedef long double sunrealtype;
#define SUN_BIG_REAL LDBL_MAX
#define SUN_SMALL_REAL LDBL_MIN
#define SUN_UNIT_ROUNDOFF LDBL_EPSILON
#define SUN_REAL_FORMAT_E "% ." SUN_STRING(LDBL_DIG) "Le"
#define SUN_REAL_FORMAT_G "% ." SUN_STRING(LDBL_DIG) "Lg"
#define SUN_FORMAT_E "% ." SUN_STRING(LDBL_DIG) "Le"
#define SUN_FORMAT_G "% ." SUN_STRING(LDBL_DIG) "Lg"

#endif

Expand Down
47 changes: 23 additions & 24 deletions src/arkode/arkode.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout,
#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::ARKodeEvolve",
"start-step",
"step = %li, attempt = %i, h = " SUN_REAL_FORMAT_G
", tcur = " SUN_REAL_FORMAT_G,
"step = %li, attempt = %i, h = " SUN_FORMAT_G
", tcur = " SUN_FORMAT_G,
ark_mem->nst, attempts, ark_mem->h, ark_mem->tcur);
#endif

Expand Down Expand Up @@ -1259,17 +1259,17 @@ void ARKodePrintMem(void* arkode_mem, FILE* outfile)
fprintf(outfile, "user_efun = %i\n", ark_mem->user_efun);
fprintf(outfile, "tstopset = %i\n", ark_mem->tstopset);
fprintf(outfile, "tstopinterp = %i\n", ark_mem->tstopinterp);
fprintf(outfile, "tstop = " SUN_REAL_FORMAT_G "\n", ark_mem->tstop);
fprintf(outfile, "tstop = " SUN_FORMAT_G "\n", ark_mem->tstop);
fprintf(outfile, "VabstolMallocDone = %i\n", ark_mem->VabstolMallocDone);
fprintf(outfile, "MallocDone = %i\n", ark_mem->MallocDone);
fprintf(outfile, "initsetup = %i\n", ark_mem->initsetup);
fprintf(outfile, "init_type = %i\n", ark_mem->init_type);
fprintf(outfile, "firststage = %i\n", ark_mem->firststage);
fprintf(outfile, "uround = " SUN_REAL_FORMAT_G "\n", ark_mem->uround);
fprintf(outfile, "reltol = " SUN_REAL_FORMAT_G "\n", ark_mem->reltol);
fprintf(outfile, "Sabstol = " SUN_REAL_FORMAT_G "\n", ark_mem->Sabstol);
fprintf(outfile, "uround = " SUN_FORMAT_G "\n", ark_mem->uround);
fprintf(outfile, "reltol = " SUN_FORMAT_G "\n", ark_mem->reltol);
fprintf(outfile, "Sabstol = " SUN_FORMAT_G "\n", ark_mem->Sabstol);
fprintf(outfile, "fixedstep = %i\n", ark_mem->fixedstep);
fprintf(outfile, "tolsf = " SUN_REAL_FORMAT_G "\n", ark_mem->tolsf);
fprintf(outfile, "tolsf = " SUN_FORMAT_G "\n", ark_mem->tolsf);
fprintf(outfile, "call_fullrhs = %i\n", ark_mem->call_fullrhs);

/* output counters */
Expand All @@ -1280,18 +1280,18 @@ void ARKodePrintMem(void* arkode_mem, FILE* outfile)
fprintf(outfile, "netf = %li\n", ark_mem->netf);

/* output time-stepping values */
fprintf(outfile, "hin = " SUN_REAL_FORMAT_G "\n", ark_mem->hin);
fprintf(outfile, "h = " SUN_REAL_FORMAT_G "\n", ark_mem->h);
fprintf(outfile, "hprime = " SUN_REAL_FORMAT_G "\n", ark_mem->hprime);
fprintf(outfile, "next_h = " SUN_REAL_FORMAT_G "\n", ark_mem->next_h);
fprintf(outfile, "eta = " SUN_REAL_FORMAT_G "\n", ark_mem->eta);
fprintf(outfile, "tcur = " SUN_REAL_FORMAT_G "\n", ark_mem->tcur);
fprintf(outfile, "tretlast = " SUN_REAL_FORMAT_G "\n", ark_mem->tretlast);
fprintf(outfile, "hmin = " SUN_REAL_FORMAT_G "\n", ark_mem->hmin);
fprintf(outfile, "hmax_inv = " SUN_REAL_FORMAT_G "\n", ark_mem->hmax_inv);
fprintf(outfile, "h0u = " SUN_REAL_FORMAT_G "\n", ark_mem->h0u);
fprintf(outfile, "tn = " SUN_REAL_FORMAT_G "\n", ark_mem->tn);
fprintf(outfile, "hold = " SUN_REAL_FORMAT_G "\n", ark_mem->hold);
fprintf(outfile, "hin = " SUN_FORMAT_G "\n", ark_mem->hin);
fprintf(outfile, "h = " SUN_FORMAT_G "\n", ark_mem->h);
fprintf(outfile, "hprime = " SUN_FORMAT_G "\n", ark_mem->hprime);
fprintf(outfile, "next_h = " SUN_FORMAT_G "\n", ark_mem->next_h);
fprintf(outfile, "eta = " SUN_FORMAT_G "\n", ark_mem->eta);
fprintf(outfile, "tcur = " SUN_FORMAT_G "\n", ark_mem->tcur);
fprintf(outfile, "tretlast = " SUN_FORMAT_G "\n", ark_mem->tretlast);
fprintf(outfile, "hmin = " SUN_FORMAT_G "\n", ark_mem->hmin);
fprintf(outfile, "hmax_inv = " SUN_FORMAT_G "\n", ark_mem->hmax_inv);
fprintf(outfile, "h0u = " SUN_FORMAT_G "\n", ark_mem->h0u);
fprintf(outfile, "tn = " SUN_FORMAT_G "\n", ark_mem->tn);
fprintf(outfile, "hold = " SUN_FORMAT_G "\n", ark_mem->hold);
fprintf(outfile, "maxnef = %i\n", ark_mem->maxnef);
fprintf(outfile, "maxncf = %i\n", ark_mem->maxncf);

Expand Down Expand Up @@ -2518,8 +2518,7 @@ int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm)
#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkCompleteStep",
"end-step",
"step = %li, h = " SUN_REAL_FORMAT_G
", tcur = " SUN_REAL_FORMAT_G,
"step = %li, h = " SUN_FORMAT_G ", tcur = " SUN_FORMAT_G,
ark_mem->nst, ark_mem->h, ark_mem->tcur);
#endif

Expand Down Expand Up @@ -2628,7 +2627,7 @@ int arkHandleFailure(ARKodeMem ark_mem, int flag)
break;
case ARK_NLS_SETUP_FAIL:
arkProcessError(ark_mem, ARK_NLS_SETUP_FAIL, __LINE__, __func__, __FILE__,
"At t = " SUN_REAL_FORMAT_G
"At t = " SUN_FORMAT_G
" the nonlinear solver setup failed unrecoverably",
ark_mem->tcur);
break;
Expand Down Expand Up @@ -2658,7 +2657,7 @@ int arkHandleFailure(ARKodeMem ark_mem, int flag)
break;
case ARK_INTERP_FAIL:
arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__,
"At t = " SUN_REAL_FORMAT_G
"At t = " SUN_FORMAT_G
" the interpolation module failed unrecoverably",
ark_mem->tcur);
break;
Expand All @@ -2668,7 +2667,7 @@ int arkHandleFailure(ARKodeMem ark_mem, int flag)
break;
case ARK_RELAX_FAIL:
arkProcessError(ark_mem, ARK_RELAX_FAIL, __LINE__, __func__, __FILE__,
"At t = " SUN_REAL_FORMAT_G " the relaxation module failed",
"At t = " SUN_FORMAT_G " the relaxation module failed",
ark_mem->tcur);
break;
case ARK_RELAX_MEM_NULL:
Expand Down
34 changes: 15 additions & 19 deletions src/arkode/arkode_adapt.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,24 @@ void arkPrintAdaptMem(ARKodeHAdaptMem hadapt_mem, FILE* outfile)
{
if (hadapt_mem != NULL)
{
fprintf(outfile, "ark_hadapt: etamax = " SUN_REAL_FORMAT_G "\n",
fprintf(outfile, "ark_hadapt: etamax = " SUN_FORMAT_G "\n",
hadapt_mem->etamax);
fprintf(outfile, "ark_hadapt: etamx1 = " SUN_REAL_FORMAT_G "\n",
fprintf(outfile, "ark_hadapt: etamx1 = " SUN_FORMAT_G "\n",
hadapt_mem->etamx1);
fprintf(outfile, "ark_hadapt: etamxf = " SUN_REAL_FORMAT_G "\n",
fprintf(outfile, "ark_hadapt: etamxf = " SUN_FORMAT_G "\n",
hadapt_mem->etamxf);
fprintf(outfile, "ark_hadapt: etamin = " SUN_REAL_FORMAT_G "\n",
fprintf(outfile, "ark_hadapt: etamin = " SUN_FORMAT_G "\n",
hadapt_mem->etamin);
fprintf(outfile, "ark_hadapt: small_nef = %i\n", hadapt_mem->small_nef);
fprintf(outfile, "ark_hadapt: etacf = " SUN_REAL_FORMAT_G "\n",
hadapt_mem->etacf);
fprintf(outfile, "ark_hadapt: cfl = " SUN_REAL_FORMAT_G "\n",
hadapt_mem->cfl);
fprintf(outfile, "ark_hadapt: safety = " SUN_REAL_FORMAT_G "\n",
fprintf(outfile, "ark_hadapt: etacf = " SUN_FORMAT_G "\n", hadapt_mem->etacf);
fprintf(outfile, "ark_hadapt: cfl = " SUN_FORMAT_G "\n", hadapt_mem->cfl);
fprintf(outfile, "ark_hadapt: safety = " SUN_FORMAT_G "\n",
hadapt_mem->safety);
fprintf(outfile, "ark_hadapt: growth = " SUN_REAL_FORMAT_G "\n",
fprintf(outfile, "ark_hadapt: growth = " SUN_FORMAT_G "\n",
hadapt_mem->growth);
fprintf(outfile, "ark_hadapt: lbound = " SUN_REAL_FORMAT_G "\n",
fprintf(outfile, "ark_hadapt: lbound = " SUN_FORMAT_G "\n",
hadapt_mem->lbound);
fprintf(outfile, "ark_hadapt: ubound = " SUN_REAL_FORMAT_G "\n",
fprintf(outfile, "ark_hadapt: ubound = " SUN_FORMAT_G "\n",
hadapt_mem->ubound);
fprintf(outfile, "ark_hadapt: nst_acc = %li\n", hadapt_mem->nst_acc);
fprintf(outfile, "ark_hadapt: nst_exp = %li\n", hadapt_mem->nst_exp);
Expand Down Expand Up @@ -146,9 +144,8 @@ int arkAdapt(ARKodeMem ark_mem, ARKodeHAdaptMem hadapt_mem, N_Vector ycur,
#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::arkAdapt",
"new-step-before-bounds",
"h_acc = " SUN_REAL_FORMAT_G
", h_cfl = " SUN_REAL_FORMAT_G,
h_acc, h_cfl);
"h_acc = " SUN_FORMAT_G ", h_cfl = " SUN_FORMAT_G, h_acc,
h_cfl);
#endif

/* enforce safety factors */
Expand All @@ -164,9 +161,8 @@ int arkAdapt(ARKodeMem ark_mem, ARKodeHAdaptMem hadapt_mem, N_Vector ycur,
#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::arkAdapt",
"new-step-after-max-min-bounds",
"h_acc = " SUN_REAL_FORMAT_G
", h_cfl = " SUN_REAL_FORMAT_G,
h_acc, h_cfl);
"h_acc = " SUN_FORMAT_G ", h_cfl = " SUN_FORMAT_G, h_acc,
h_cfl);
#endif

/* increment the relevant step counter, set desired step */
Expand Down Expand Up @@ -195,7 +191,7 @@ int arkAdapt(ARKodeMem ark_mem, ARKodeHAdaptMem hadapt_mem, N_Vector ycur,

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkAdapt",
"new-step-eta", "eta = " SUN_REAL_FORMAT_G, ark_mem->eta);
"new-step-eta", "eta = " SUN_FORMAT_G, ark_mem->eta);
#endif

return (retval);
Expand Down
27 changes: 13 additions & 14 deletions src/arkode/arkode_arkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,16 +723,15 @@ void arkStep_PrintMem(ARKodeMem ark_mem, FILE* outfile)
fprintf(outfile, "ARKStep: implicit Butcher table:\n");
ARKodeButcherTable_Write(step_mem->Bi, outfile);
}
fprintf(outfile, "ARKStep: gamma = " SUN_REAL_FORMAT_G "\n", step_mem->gamma);
fprintf(outfile, "ARKStep: gammap = " SUN_REAL_FORMAT_G "\n", step_mem->gammap);
fprintf(outfile, "ARKStep: gamrat = " SUN_REAL_FORMAT_G "\n", step_mem->gamrat);
fprintf(outfile, "ARKStep: crate = " SUN_REAL_FORMAT_G "\n", step_mem->crate);
fprintf(outfile, "ARKStep: eRNrm = " SUN_REAL_FORMAT_G "\n", step_mem->eRNrm);
fprintf(outfile, "ARKStep: nlscoef = " SUN_REAL_FORMAT_G "\n",
step_mem->nlscoef);
fprintf(outfile, "ARKStep: crdown = " SUN_REAL_FORMAT_G "\n", step_mem->crdown);
fprintf(outfile, "ARKStep: rdiv = " SUN_REAL_FORMAT_G "\n", step_mem->rdiv);
fprintf(outfile, "ARKStep: dgmax = " SUN_REAL_FORMAT_G "\n", step_mem->dgmax);
fprintf(outfile, "ARKStep: gamma = " SUN_FORMAT_G "\n", step_mem->gamma);
fprintf(outfile, "ARKStep: gammap = " SUN_FORMAT_G "\n", step_mem->gammap);
fprintf(outfile, "ARKStep: gamrat = " SUN_FORMAT_G "\n", step_mem->gamrat);
fprintf(outfile, "ARKStep: crate = " SUN_FORMAT_G "\n", step_mem->crate);
fprintf(outfile, "ARKStep: eRNrm = " SUN_FORMAT_G "\n", step_mem->eRNrm);
fprintf(outfile, "ARKStep: nlscoef = " SUN_FORMAT_G "\n", step_mem->nlscoef);
fprintf(outfile, "ARKStep: crdown = " SUN_FORMAT_G "\n", step_mem->crdown);
fprintf(outfile, "ARKStep: rdiv = " SUN_FORMAT_G "\n", step_mem->rdiv);
fprintf(outfile, "ARKStep: dgmax = " SUN_FORMAT_G "\n", step_mem->dgmax);

#ifdef SUNDIALS_DEBUG_PRINTVEC
/* output vector quantities */
Expand Down Expand Up @@ -1833,7 +1832,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO,
"ARKODE::arkStep_TakeStep_Z", "start-stage",
"step = %li, stage = %i, implicit = %i, h "
"= " SUN_REAL_FORMAT_G ", tcur = " SUN_REAL_FORMAT_G,
"= " SUN_FORMAT_G ", tcur = " SUN_FORMAT_G,
ark_mem->nst, 0, implicit_stage, ark_mem->h,
ark_mem->tcur);
#ifdef SUNDIALS_LOGGING_EXTRA_DEBUG
Expand Down Expand Up @@ -1886,7 +1885,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG,
"ARKODE::arkStep_TakeStep_Z", "start-stage",
"step = %li, stage = %i, implicit = %i, h "
"= " SUN_REAL_FORMAT_G ", tcur = " SUN_REAL_FORMAT_G,
"= " SUN_FORMAT_G ", tcur = " SUN_FORMAT_G,
ark_mem->nst, is, implicit_stage, ark_mem->h,
ark_mem->tcur);
#endif
Expand Down Expand Up @@ -2094,8 +2093,8 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO,
"ARKODE::arkStep_TakeStep_Z", "end-step",
"step = %li, h = " SUN_REAL_FORMAT_G
", dsm = " SUN_REAL_FORMAT_G ", nflag = %d",
"step = %li, h = " SUN_FORMAT_G ", dsm = " SUN_FORMAT_G
", nflag = %d",
ark_mem->nst, ark_mem->h, *dsmPtr, *nflagPtr);
#endif

Expand Down
9 changes: 4 additions & 5 deletions src/arkode/arkode_arkstep_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,16 +1299,15 @@ int arkStep_WriteParameters(ARKodeMem ark_mem, FILE* fp)
if (step_mem->implicit)
{
fprintf(fp, " Implicit predictor method = %i\n", step_mem->predictor);
fprintf(fp,
" Implicit solver tolerance coefficient = " SUN_REAL_FORMAT_G "\n",
fprintf(fp, " Implicit solver tolerance coefficient = " SUN_FORMAT_G "\n",
step_mem->nlscoef);
fprintf(fp, " Maximum number of nonlinear corrections = %i\n",
step_mem->maxcor);
fprintf(fp, " Nonlinear convergence rate constant = " SUN_REAL_FORMAT_G "\n",
fprintf(fp, " Nonlinear convergence rate constant = " SUN_FORMAT_G "\n",
step_mem->crdown);
fprintf(fp, " Nonlinear divergence tolerance = " SUN_REAL_FORMAT_G "\n",
fprintf(fp, " Nonlinear divergence tolerance = " SUN_FORMAT_G "\n",
step_mem->rdiv);
fprintf(fp, " Gamma factor LSetup tolerance = " SUN_REAL_FORMAT_G "\n",
fprintf(fp, " Gamma factor LSetup tolerance = " SUN_FORMAT_G "\n",
step_mem->dgmax);
fprintf(fp, " Number of steps between LSetup calls = %i\n", step_mem->msbp);
}
Expand Down
8 changes: 4 additions & 4 deletions src/arkode/arkode_butcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,22 +392,22 @@ void ARKodeButcherTable_Write(ARKodeButcherTable B, FILE* outfile)
fprintf(outfile, " ");
for (j = 0; j < B->stages; j++)
{
fprintf(outfile, SUN_REAL_FORMAT_G " ", B->A[i][j]);
fprintf(outfile, SUN_FORMAT_G " ", B->A[i][j]);
}
fprintf(outfile, "\n");
}

fprintf(outfile, " c = ");
for (i = 0; i < B->stages; i++)
{
fprintf(outfile, SUN_REAL_FORMAT_G " ", B->c[i]);
fprintf(outfile, SUN_FORMAT_G " ", B->c[i]);
}
fprintf(outfile, "\n");

fprintf(outfile, " b = ");
for (i = 0; i < B->stages; i++)
{
fprintf(outfile, SUN_REAL_FORMAT_G " ", B->b[i]);
fprintf(outfile, SUN_FORMAT_G " ", B->b[i]);
}
fprintf(outfile, "\n");

Expand All @@ -416,7 +416,7 @@ void ARKodeButcherTable_Write(ARKodeButcherTable B, FILE* outfile)
fprintf(outfile, " d = ");
for (i = 0; i < B->stages; i++)
{
fprintf(outfile, SUN_REAL_FORMAT_G " ", B->d[i]);
fprintf(outfile, SUN_FORMAT_G " ", B->d[i]);
}
fprintf(outfile, "\n");
}
Expand Down
11 changes: 5 additions & 6 deletions src/arkode/arkode_erkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,8 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep",
"start-stage",
"step = %li, stage = 0, h = " SUN_REAL_FORMAT_G
", tcur = " SUN_REAL_FORMAT_G,
"step = %li, stage = 0, h = " SUN_FORMAT_G
", tcur = " SUN_FORMAT_G,
ark_mem->nst, ark_mem->h, ark_mem->tcur);
#endif

Expand Down Expand Up @@ -668,8 +668,8 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG,
"ARKODE::erkStep_TakeStep", "start-stage",
"step = %li, stage = %i, h = " SUN_REAL_FORMAT_G
", tcur = " SUN_REAL_FORMAT_G,
"step = %li, stage = %i, h = " SUN_FORMAT_G
", tcur = " SUN_FORMAT_G,
ark_mem->nst, is, ark_mem->h, ark_mem->tcur);
#endif

Expand Down Expand Up @@ -725,8 +725,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep",
"error-test",
"step = %li, h = " SUN_REAL_FORMAT_G
", dsm = " SUN_REAL_FORMAT_G,
"step = %li, h = " SUN_FORMAT_G ", dsm = " SUN_FORMAT_G,
ark_mem->nst, ark_mem->h, *dsmPtr);
#endif

Expand Down
14 changes: 7 additions & 7 deletions src/arkode/arkode_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,13 @@ int arkGetLastKFlag(void* arkode_mem, int* last_kflag);
Reusable ARKODE Error Messages
===============================================================*/

#define MSG_TIME "t = " SUN_REAL_FORMAT_G
#define MSG_TIME_H "t = " SUN_REAL_FORMAT_G " and h = " SUN_REAL_FORMAT_G
#define MSG_TIME_INT \
"t = " SUN_REAL_FORMAT_G " is not between tcur - hold = " SUN_REAL_FORMAT_G \
" and tcur = " SUN_REAL_FORMAT_G
#define MSG_TIME_TOUT "tout = " SUN_REAL_FORMAT_G
#define MSG_TIME_TSTOP "tstop = " SUN_REAL_FORMAT_G
#define MSG_TIME "t = " SUN_FORMAT_G
#define MSG_TIME_H "t = " SUN_FORMAT_G " and h = " SUN_FORMAT_G
#define MSG_TIME_INT \
"t = " SUN_FORMAT_G " is not between tcur - hold = " SUN_FORMAT_G \
" and tcur = " SUN_FORMAT_G
#define MSG_TIME_TOUT "tout = " SUN_FORMAT_G
#define MSG_TIME_TSTOP "tstop = " SUN_FORMAT_G

/* Initialization and I/O error messages */
#define MSG_ARK_NO_MEM "arkode_mem = NULL illegal."
Expand Down
Loading
Loading