Skip to content

Commit

Permalink
remove uses of ark_mem->report
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Nov 10, 2023
1 parent dbf7f3f commit 89dcad3
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 51 deletions.
5 changes: 0 additions & 5 deletions src/arkode/arkode.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ ARKodeMem arkCreate(SUNContext sunctx)
ark_mem->relax_enabled = SUNFALSE;
ark_mem->relax_mem = NULL;

/* Initialize diagnostics reporting variables */
ark_mem->report = SUNFALSE;
ark_mem->diagfp = NULL;

/* Initialize lrw and liw */
ark_mem->lrw = 18;
ark_mem->liw = 41; /* fcn/data ptr, int, long int, sunindextype, booleantype */
Expand Down Expand Up @@ -1435,7 +1431,6 @@ void arkPrintMem(ARKodeMem ark_mem, FILE *outfile)
fprintf(outfile, "tstopset = %i\n", ark_mem->tstopset);
fprintf(outfile, "tstopinterp = %i\n", ark_mem->tstopinterp);
fprintf(outfile, "tstop = %" RSYM"\n", ark_mem->tstop);
fprintf(outfile, "report = %i\n", ark_mem->report);
fprintf(outfile, "VabstolMallocDone = %i\n", ark_mem->VabstolMallocDone);
fprintf(outfile, "MallocDone = %i\n", ark_mem->MallocDone);
fprintf(outfile, "initsetup = %i\n", ark_mem->initsetup);
Expand Down
8 changes: 0 additions & 8 deletions src/arkode/arkode_adapt.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ int arkAdapt(void* arkode_mem, ARKodeHAdaptMem hadapt_mem,
/* enforce minimum bound time step reduction */
h_acc = int_dir * SUNMAX(SUNRabs(h_acc), SUNRabs(hadapt_mem->etamin*hcur));

/* Solver diagnostics reporting */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "%"RSYM" %"RSYM" ", h_acc, h_cfl);

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG,
"ARKODE::arkAdapt", "new-step-after-max-min-bounds",
Expand Down Expand Up @@ -195,10 +191,6 @@ int arkAdapt(void* arkode_mem, ARKodeHAdaptMem hadapt_mem,
ark_mem->eta /= SUNMAX(ONE, SUNRabs(hcur) *
ark_mem->hmax_inv*ark_mem->eta);

/* Solver diagnostics reporting */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "%"RSYM"\n", ark_mem->eta);

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkAdapt",
"new-step-eta", "eta = %"RSYM, ark_mem->eta);
Expand Down
10 changes: 0 additions & 10 deletions src/arkode/arkode_arkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1929,11 +1929,6 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr)
N_VPrintFile(step_mem->sdata, ARK_LOGGER->debug_fp);
#endif

/* solver diagnostics reporting */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "ARKStep step %li %"RSYM" %i %"RSYM"\n",
ark_mem->nst, ark_mem->h, is, ark_mem->tcur);

/* perform implicit solve if required */
if (implicit_stage) {

Expand Down Expand Up @@ -2082,11 +2077,6 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr)
N_VPrintFile(ark_mem->ycur, ARK_LOGGER->debug_fp);
#endif

/* solver diagnostics reporting */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "ARKStep etest %li %"RSYM" %"RSYM"\n",
ark_mem->nst, ark_mem->h, *dsmPtr);

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO,
"ARKODE::arkStep_TakeStep_Z", "end-step",
Expand Down
10 changes: 0 additions & 10 deletions src/arkode/arkode_erkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,11 +804,6 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr)
/* Set current stage time(s) */
ark_mem->tcur = ark_mem->tn + step_mem->B->c[is]*ark_mem->h;

/* Solver diagnostics reporting */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "ERKStep step %li %"RSYM" %i %"RSYM"\n",
ark_mem->nst, ark_mem->h, is, ark_mem->tcur);

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG,
"ARKODE::erkStep_TakeStep", "start-stage",
Expand Down Expand Up @@ -866,11 +861,6 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr)
N_VPrintFile(ark_mem->ycur, ARK_LOGGER->debug_fp);
#endif

/* Solver diagnostics reporting */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "ERKStep etest %li %"RSYM" %"RSYM"\n",
ark_mem->nst, ark_mem->h, *dsmPtr);

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG,
"ARKODE::erkStep_TakeStep", "error-test",
Expand Down
2 changes: 0 additions & 2 deletions src/arkode/arkode_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ int arkSetDefaults(void *arkode_mem)
ark_mem->tstopset = SUNFALSE; /* no stop time set */
ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */
ark_mem->tstop = ZERO; /* no fixed stop time */
ark_mem->diagfp = NULL; /* no solver diagnostics file */
ark_mem->report = SUNFALSE; /* don't report solver diagnostics */
ark_mem->hadapt_mem->etamx1 = ETAMX1; /* max change on first step */
ark_mem->hadapt_mem->etamxf = ETAMXF; /* max change on error-failed step */
ark_mem->hadapt_mem->etamin = ETAMIN; /* min bound on time step reduction */
Expand Down
8 changes: 0 additions & 8 deletions src/arkode/arkode_ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2731,10 +2731,6 @@ int arkLsSolve(void* arkode_mem, N_Vector b, realtype tnow,
if (retval != SUNLS_SUCCESS) arkls_mem->ncfl++;

/* Log solver statistics to diagnostics file (if requested) */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "ARKLS kry %"RSYM" %"RSYM" %i %i\n",
bnorm, resnorm, nli_inc, (int) (arkls_mem->nps - nps_inc));

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkLsSolve",
"ls-stats", "bnorm = %"RSYM", resnorm = %"RSYM
Expand Down Expand Up @@ -3150,10 +3146,6 @@ int arkLsMassSolve(void *arkode_mem, N_Vector b, realtype nlscoef)
if (retval != SUNLS_SUCCESS) arkls_mem->ncfl++;

/* Log solver statistics to diagnostics file (if requested) */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "ARKLS mass %"RSYM" %i %i\n",
resnorm, nli_inc, (int) (arkls_mem->nps - nps_inc));

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG,
"ARKODE::arkLsMassSolve", "mass-ls-stats",
Expand Down
8 changes: 0 additions & 8 deletions src/arkode/arkode_mristep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1569,10 +1569,6 @@ int mriStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr)
ark_mem->tcur = ark_mem->tn + step_mem->MRIC->c[is]*ark_mem->h;

/* Solver diagnostics reporting */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "MRIStep step %li %"RSYM" %i %"RSYM"\n",
ark_mem->nst, ark_mem->h, is, ark_mem->tcur);

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG,
"ARKODE::mriStep_TakeStep", "start-stage",
Expand Down Expand Up @@ -1679,10 +1675,6 @@ int mriStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr)
#endif

/* Solver diagnostics reporting */
if (ark_mem->report)
fprintf(ark_mem->diagfp, "MRIStep etest %li %"RSYM" %"RSYM"\n",
ark_mem->nst, ark_mem->h, *dsmPtr);

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG
SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG,
"ARKODE::mriStep_TakeStep", "error-test",
Expand Down

0 comments on commit 89dcad3

Please sign in to comment.