Skip to content

Commit

Permalink
post merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Nov 11, 2023
1 parent 97a3fbd commit 07f73cc
Show file tree
Hide file tree
Showing 20 changed files with 89 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ Explicit stability function :c:func:`ARKStepSetS
.. versionadded:: x.x.x
.. c:function:: int ARKStepSetCFLFraction(void* arkode_mem, realtype cfl_frac)
.. c:function:: int ARKStepSetCFLFraction(void* arkode_mem, sunrealtype cfl_frac)
Specifies the fraction of the estimated explicitly stable step to use.
Expand Down
8 changes: 4 additions & 4 deletions include/arkode/arkode_arkstep.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,19 @@ SUNDIALS_EXPORT int ARKStepSetAdaptivityAdjustment(void *arkode_mem, int adjust)
SUNDIALS_EXPORT int ARKStepSetCFLFraction(void *arkode_mem,
sunrealtype cfl_frac);
SUNDIALS_EXPORT int ARKStepSetSafetyFactor(void *arkode_mem,
realtype safety);
sunrealtype safety);
SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNAdaptController instead")
int ARKStepSetErrorBias(void *arkode_mem, realtype bias);
int ARKStepSetErrorBias(void *arkode_mem, sunrealtype bias);
SUNDIALS_EXPORT int ARKStepSetMaxGrowth(void *arkode_mem,
sunrealtype mx_growth);
SUNDIALS_EXPORT int ARKStepSetMinReduction(void *arkode_mem,
sunrealtype eta_min);
SUNDIALS_EXPORT int ARKStepSetFixedStepBounds(void *arkode_mem,
realtype lb, realtype ub);
sunrealtype lb, sunrealtype ub);
SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNAdaptController instead")
int ARKStepSetAdaptivityMethod(void *arkode_mem, int imethod,
int idefault, int pq,
realtype adapt_params[3]);
sunrealtype adapt_params[3]);
SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNAdaptController instead")
int ARKStepSetAdaptivityFn(void *arkode_mem, ARKAdaptFn hfun,
void *h_data);
Expand Down
8 changes: 4 additions & 4 deletions include/arkode/arkode_erkstep.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ SUNDIALS_EXPORT int ERKStepSetAdaptivityAdjustment(void *arkode_mem, int adjust)
SUNDIALS_EXPORT int ERKStepSetCFLFraction(void *arkode_mem,
sunrealtype cfl_frac);
SUNDIALS_EXPORT int ERKStepSetSafetyFactor(void *arkode_mem,
realtype safety);
sunrealtype safety);
SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNAdaptController instead")
int ERKStepSetErrorBias(void *arkode_mem, realtype bias);
int ERKStepSetErrorBias(void *arkode_mem, sunrealtype bias);
SUNDIALS_EXPORT int ERKStepSetMaxGrowth(void *arkode_mem,
sunrealtype mx_growth);
SUNDIALS_EXPORT int ERKStepSetMinReduction(void *arkode_mem,
sunrealtype eta_min);
SUNDIALS_EXPORT int ERKStepSetFixedStepBounds(void *arkode_mem,
realtype lb, realtype ub);
sunrealtype lb, sunrealtype ub);
SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNAdaptController instead")
int ERKStepSetAdaptivityMethod(void *arkode_mem, int imethod,
int idefault, int pq,
realtype adapt_params[3]);
sunrealtype adapt_params[3]);
SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNAdaptController instead")
int ERKStepSetAdaptivityFn(void *arkode_mem, ARKAdaptFn hfun,
void *h_data);
Expand Down
4 changes: 2 additions & 2 deletions src/arkode/arkode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ void arkErrHandler(int error_code, const char *module,
int arkInit(ARKodeMem ark_mem, sunrealtype t0, N_Vector y0,
int init_type)
{
booleantype stepperOK, nvectorOK, allocOK;
sunbooleantype stepperOK, nvectorOK, allocOK;
int retval;
sunindextype lrw1, liw1;

Expand Down Expand Up @@ -2453,7 +2453,7 @@ int arkYddNorm(ARKodeMem ark_mem, sunrealtype hg, sunrealtype *yddnrm)
int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm)
{
int retval;
realtype troundoff;
sunrealtype troundoff;

/* Set current time to the end of the step (in case the last
stage time does not coincide with the step solution time).
Expand Down
2 changes: 1 addition & 1 deletion src/arkode/arkode_adapt.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int arkAdapt(void* arkode_mem, ARKodeHAdaptMem hadapt_mem,
sunrealtype dsm, long int nst)
{
int retval;
realtype h_acc, h_cfl, int_dir;
sunrealtype h_acc, h_cfl, int_dir;
ARKodeMem ark_mem;
int controller_order;
if (arkode_mem == NULL) {
Expand Down
18 changes: 9 additions & 9 deletions src/arkode/arkode_adapt_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ typedef struct ARKodeHAdaptMemRec {
sunrealtype etamxf; /* h reduction factor on multiple error fails */
sunrealtype etamin; /* eta >= etamin on error test fail */
int small_nef; /* bound to determine 'multiple' above */
realtype etacf; /* h reduction factor on nonlinear conv fail */
realtype cfl; /* cfl safety factor */
realtype safety; /* accuracy safety factor on h */
realtype growth; /* maximum step growth safety factor */
realtype lbound; /* eta lower bound to leave h unchanged */
realtype ubound; /* eta upper bound to leave h unchanged */
sunrealtype etacf; /* h reduction factor on nonlinear conv fail */
sunrealtype cfl; /* cfl safety factor */
sunrealtype safety; /* accuracy safety factor on h */
sunrealtype growth; /* maximum step growth safety factor */
sunrealtype lbound; /* eta lower bound to leave h unchanged */
sunrealtype ubound; /* eta upper bound to leave h unchanged */
int p; /* embedding order */
int q; /* method order */
int pq; /* decision flag for controller order */
int adjust; /* controller order adjustment factor */

SUNAdaptController hcontroller; /* temporal error controller */
booleantype owncontroller; /* flag indicating hcontroller ownership */
sunbooleantype owncontroller; /* flag indicating hcontroller ownership */

ARKExpStabFn expstab; /* step stability function */
void *estab_data; /* user pointer passed to expstab */
Expand All @@ -106,8 +106,8 @@ typedef struct ARKodeHAdaptMemRec {
ARKodeHAdaptMem arkAdaptInit();
void arkPrintAdaptMem(ARKodeHAdaptMem hadapt_mem, FILE *outfile);
int arkAdapt(void* arkode_mem, ARKodeHAdaptMem hadapt_mem,
N_Vector ycur, realtype tcur, realtype hcur,
realtype dsm, long int nst);
N_Vector ycur, sunrealtype tcur, sunrealtype hcur,
sunrealtype dsm, long int nst);


#ifdef __cplusplus
Expand Down
42 changes: 21 additions & 21 deletions src/arkode/arkode_arkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,15 +1232,15 @@ int arkStep_Init(void* arkode_mem, int init_type)
{
if (!(step_mem->stage_times))
{
step_mem->stage_times = (realtype*) calloc(step_mem->stages,
sizeof(realtype));
step_mem->stage_times = (sunrealtype*) calloc(step_mem->stages,
sizeof(sunrealtype));
ark_mem->lrw += step_mem->stages;
}

if (!(step_mem->stage_coefs))
{
step_mem->stage_coefs = (realtype*) calloc(step_mem->stages,
sizeof(realtype));
step_mem->stage_coefs = (sunrealtype*) calloc(step_mem->stages,
sizeof(sunrealtype));
ark_mem->lrw += step_mem->stages;
}
}
Expand Down Expand Up @@ -1372,7 +1372,7 @@ int arkStep_Init(void* arkode_mem, int init_type)
when estimating the initial time step size, so we strive to store the
intermediate parts so that they do not interfere with the other two modes.
----------------------------------------------------------------------------*/
int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f,
int arkStep_FullRHS(void* arkode_mem, sunrealtype t, N_Vector y, N_Vector f,
int mode)
{
ARKodeMem ark_mem;
Expand All @@ -1381,7 +1381,7 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f,
sunbooleantype recomputeRHS;
sunrealtype* cvals;
N_Vector* Xvecs;
realtype stage_coefs = ONE;
sunrealtype stage_coefs = ONE;

/* access ARKodeARKStepMem structure */
retval = arkStep_AccessStepMem(arkode_mem, "arkStep_FullRHS",
Expand Down Expand Up @@ -1737,10 +1737,10 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f,
int arkStep_TakeStep_Z(void* arkode_mem, sunrealtype *dsmPtr, int *nflagPtr)
{
int retval, is, is_start, mode;
booleantype implicit_stage;
booleantype deduce_stage;
booleantype save_stages;
booleantype stiffly_accurate;
sunbooleantype implicit_stage;
sunbooleantype deduce_stage;
sunbooleantype save_stages;
sunbooleantype stiffly_accurate;
ARKodeMem ark_mem;
ARKodeARKStepMem step_mem;
N_Vector zcor0;
Expand Down Expand Up @@ -2699,7 +2699,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, sunbooleantype implicit)
int retval, i, j, jmax, nvec;
sunrealtype* cj;
sunrealtype** Aij;
realtype* cvals;
sunrealtype* cvals;
N_Vector* Xvecs;

/* access ARKodeARKStepMem structure */
Expand Down Expand Up @@ -2816,8 +2816,8 @@ int arkStep_ComputeSolutions(ARKodeMem ark_mem, sunrealtype *dsmPtr)
sunrealtype* cj;
sunrealtype* bj;
sunrealtype* dj;
booleantype stiffly_accurate;
realtype* cvals;
sunbooleantype stiffly_accurate;
sunrealtype* cvals;
N_Vector* Xvecs;
ARKodeARKStepMem step_mem;

Expand Down Expand Up @@ -2984,8 +2984,8 @@ int arkStep_ComputeSolutions_MassFixed(ARKodeMem ark_mem, sunrealtype *dsmPtr)
/* local data */
int retval, j, nvec;
N_Vector y, yerr;
booleantype stiffly_accurate;
realtype* cvals;
sunbooleantype stiffly_accurate;
sunrealtype* cvals;
N_Vector* Xvecs;
ARKodeARKStepMem step_mem;

Expand Down Expand Up @@ -3262,17 +3262,17 @@ int arkStep_MRIStepInnerReset(MRIStepInnerStepper stepper, sunrealtype tR,
combination.
----------------------------------------------------------------------------*/

void arkStep_ApplyForcing(ARKodeARKStepMem step_mem, realtype* stage_times,
realtype* stage_coefs, int jmax, int* nvec)
void arkStep_ApplyForcing(ARKodeARKStepMem step_mem, sunrealtype* stage_times,
sunrealtype* stage_coefs, int jmax, int* nvec)
{
realtype tau, taui;
sunrealtype tau, taui;
int j, k;

/* Shortcuts to step_mem data */
realtype* vals = step_mem->cvals;
sunrealtype* vals = step_mem->cvals;
N_Vector* vecs = step_mem->Xvecs;
realtype tshift = step_mem->tshift;
realtype tscale = step_mem->tscale;
sunrealtype tshift = step_mem->tshift;
sunrealtype tscale = step_mem->tscale;
int nforcing = step_mem->nforcing;
N_Vector* forcing = step_mem->forcing;

Expand Down
12 changes: 6 additions & 6 deletions src/arkode/arkode_arkstep_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ typedef struct ARKodeARKStepMemRec {
sunrealtype tscale; /* time normalization scaling */
N_Vector* forcing; /* array of forcing vectors */
int nforcing; /* number of forcing vectors */
realtype* stage_times; /* workspace for applying forcing */
realtype* stage_coefs; /* workspace for applying forcing */
sunrealtype* stage_times; /* workspace for applying forcing */
sunrealtype* stage_coefs; /* workspace for applying forcing */

} *ARKodeARKStepMem;

Expand Down Expand Up @@ -205,10 +205,10 @@ int arkStep_Predict(ARKodeMem ark_mem, int istage, N_Vector yguess);
int arkStep_StageSetup(ARKodeMem ark_mem, sunbooleantype implicit);
int arkStep_NlsInit(ARKodeMem ark_mem);
int arkStep_Nls(ARKodeMem ark_mem, int nflag);
int arkStep_ComputeSolutions(ARKodeMem ark_mem, realtype *dsm);
int arkStep_ComputeSolutions_MassFixed(ARKodeMem ark_mem, realtype *dsm);
void arkStep_ApplyForcing(ARKodeARKStepMem step_mem, realtype* stage_times,
realtype* stage_coefs, int jmax, int *nvec);
int arkStep_ComputeSolutions(ARKodeMem ark_mem, sunrealtype *dsm);
int arkStep_ComputeSolutions_MassFixed(ARKodeMem ark_mem, sunrealtype *dsm);
void arkStep_ApplyForcing(ARKodeARKStepMem step_mem, sunrealtype* stage_times,
sunrealtype* stage_coefs, int jmax, int *nvec);

/* private functions passed to nonlinear solver */
int arkStep_NlsResidual_MassIdent(N_Vector zcor, N_Vector r, void* arkode_mem);
Expand Down
12 changes: 6 additions & 6 deletions src/arkode/arkode_arkstep_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ int ARKStepSetPostprocessStageFn(void *arkode_mem,
return(arkSetPostprocessStageFn(arkode_mem, ProcessStage)); }
int ARKStepSetAdaptivityAdjustment(void *arkode_mem, int adjust) {
return(arkSetAdaptivityAdjustment(arkode_mem, adjust)); }
int ARKStepSetCFLFraction(void *arkode_mem, realtype cfl_frac) {
int ARKStepSetCFLFraction(void *arkode_mem, sunrealtype cfl_frac) {
return(arkSetCFLFraction(arkode_mem, cfl_frac)); }
int ARKStepSetSafetyFactor(void *arkode_mem, sunrealtype safety) {
return(arkSetSafetyFactor(arkode_mem, safety)); }
int ARKStepSetMaxGrowth(void *arkode_mem, realtype mx_growth) {
int ARKStepSetMaxGrowth(void *arkode_mem, sunrealtype mx_growth) {
return(arkSetMaxGrowth(arkode_mem, mx_growth)); }
int ARKStepSetMinReduction(void *arkode_mem, sunrealtype eta_min) {
return(arkSetMinReduction(arkode_mem, eta_min)); }
int ARKStepSetFixedStepBounds(void *arkode_mem, sunrealtype lb, sunrealtype ub) {
return(arkSetFixedStepBounds(arkode_mem, lb, ub)); }
int ARKStepSetMaxFirstGrowth(void *arkode_mem, realtype etamx1) {
int ARKStepSetMaxFirstGrowth(void *arkode_mem, sunrealtype etamx1) {
return(arkSetMaxFirstGrowth(arkode_mem, etamx1)); }
int ARKStepSetMaxEFailGrowth(void *arkode_mem, sunrealtype etamxf) {
return(arkSetMaxEFailGrowth(arkode_mem, etamxf)); }
Expand All @@ -103,7 +103,7 @@ int ARKStepSetMaxConvFails(void *arkode_mem, int maxncf) {
return(arkSetMaxConvFails(arkode_mem, maxncf)); }
int ARKStepSetAdaptController(void *arkode_mem, SUNAdaptController C) {
return(arkSetAdaptController(arkode_mem, C)); }
int ARKStepSetFixedStep(void *arkode_mem, realtype hfixed) {
int ARKStepSetFixedStep(void *arkode_mem, sunrealtype hfixed) {
return(arkSetFixedStep(arkode_mem, hfixed)); }


Expand Down Expand Up @@ -349,7 +349,7 @@ int ARKStepGetNumRelaxSolveIters(void* arkode_mem, long int* iters)
specific SUNAdaptController object.
---------------------------------------------------------------*/
int ARKStepSetAdaptivityMethod(void *arkode_mem, int imethod, int idefault,
int pq, realtype adapt_params[3]) {
int pq, sunrealtype adapt_params[3]) {
return(arkSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params)); }

/*---------------------------------------------------------------
Expand All @@ -363,7 +363,7 @@ int ARKStepSetAdaptivityFn(void *arkode_mem, ARKAdaptFn hfun, void *h_data) {
ARKStepSetErrorBias: user should set this value directly in the
SUNAdaptController object.
---------------------------------------------------------------*/
int ARKStepSetErrorBias(void *arkode_mem, realtype bias) {
int ARKStepSetErrorBias(void *arkode_mem, sunrealtype bias) {
return(arkSetErrorBias(arkode_mem, bias)); }


Expand Down
4 changes: 2 additions & 2 deletions src/arkode/arkode_erkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ int erkStep_Init(void* arkode_mem, int init_type)
when estimating the initial time step size, so we strive to store the
intermediate parts so that they do not interfere with the other two modes.
----------------------------------------------------------------------------*/
int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f,
int erkStep_FullRHS(void* arkode_mem, sunrealtype t, N_Vector y, N_Vector f,
int mode)
{
int retval;
Expand Down Expand Up @@ -747,7 +747,7 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f,
int erkStep_TakeStep(void* arkode_mem, sunrealtype *dsmPtr, int *nflagPtr)
{
int retval, is, js, nvec, mode;
realtype* cvals;
sunrealtype* cvals;
N_Vector* Xvecs;
ARKodeMem ark_mem;
ARKodeERKStepMem step_mem;
Expand Down
10 changes: 5 additions & 5 deletions src/arkode/arkode_erkstep_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ int ERKStepSetPostprocessStageFn(void *arkode_mem,
return(arkSetPostprocessStageFn(arkode_mem, ProcessStage)); }
int ERKStepSetAdaptivityAdjustment(void *arkode_mem, int adjust) {
return(arkSetAdaptivityAdjustment(arkode_mem, adjust)); }
int ERKStepSetCFLFraction(void *arkode_mem, realtype cfl_frac) {
int ERKStepSetCFLFraction(void *arkode_mem, sunrealtype cfl_frac) {
return(arkSetCFLFraction(arkode_mem, cfl_frac)); }
int ERKStepSetSafetyFactor(void *arkode_mem, sunrealtype safety) {
return(arkSetSafetyFactor(arkode_mem, safety)); }
int ERKStepSetMaxGrowth(void *arkode_mem, realtype mx_growth) {
int ERKStepSetMaxGrowth(void *arkode_mem, sunrealtype mx_growth) {
return(arkSetMaxGrowth(arkode_mem, mx_growth)); }
int ERKStepSetMinReduction(void *arkode_mem, sunrealtype eta_min) {
return(arkSetMinReduction(arkode_mem, eta_min)); }
int ERKStepSetFixedStepBounds(void *arkode_mem, sunrealtype lb, sunrealtype ub) {
return(arkSetFixedStepBounds(arkode_mem, lb, ub)); }
int ERKStepSetMaxFirstGrowth(void *arkode_mem, realtype etamx1) {
int ERKStepSetMaxFirstGrowth(void *arkode_mem, sunrealtype etamx1) {
return(arkSetMaxFirstGrowth(arkode_mem, etamx1)); }
int ERKStepSetMaxEFailGrowth(void *arkode_mem, sunrealtype etamxf) {
return(arkSetMaxEFailGrowth(arkode_mem, etamxf)); }
Expand Down Expand Up @@ -239,7 +239,7 @@ int ERKStepGetNumRelaxSolveIters(void* arkode_mem, long int* iters)
specific SUNAdaptController object.
---------------------------------------------------------------*/
int ERKStepSetAdaptivityMethod(void *arkode_mem, int imethod, int idefault,
int pq, realtype adapt_params[3]) {
int pq, sunrealtype adapt_params[3]) {
return(arkSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params)); }

/*---------------------------------------------------------------
Expand All @@ -253,7 +253,7 @@ int ERKStepSetAdaptivityFn(void *arkode_mem, ARKAdaptFn hfun, void *h_data) {
ERKStepSetErrorBias: user should set this value directly in the
SUNAdaptController object.
---------------------------------------------------------------*/
int ERKStepSetErrorBias(void *arkode_mem, realtype bias) {
int ERKStepSetErrorBias(void *arkode_mem, sunrealtype bias) {
return(arkSetErrorBias(arkode_mem, bias)); }


Expand Down
Loading

0 comments on commit 07f73cc

Please sign in to comment.