From 07f73ccb555434e37915b8621e5decbab17bd8a8 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 10 Nov 2023 16:14:28 -0800 Subject: [PATCH] post merge fixes --- .../ARKStep_c_interface/User_callable.rst | 2 +- include/arkode/arkode_arkstep.h | 8 ++-- include/arkode/arkode_erkstep.h | 8 ++-- src/arkode/arkode.c | 4 +- src/arkode/arkode_adapt.c | 2 +- src/arkode/arkode_adapt_impl.h | 18 ++++---- src/arkode/arkode_arkstep.c | 42 +++++++++---------- src/arkode/arkode_arkstep_impl.h | 12 +++--- src/arkode/arkode_arkstep_io.c | 12 +++--- src/arkode/arkode_erkstep.c | 4 +- src/arkode/arkode_erkstep_io.c | 10 ++--- src/arkode/arkode_impl.h | 20 ++++----- src/arkode/arkode_io.c | 4 +- src/arkode/arkode_mristep.c | 2 +- src/arkode/arkode_sprkstep.c | 2 +- src/arkode/arkode_user_controller.c | 6 +-- src/arkode/arkode_user_controller.h | 14 +++---- src/sundials/sundials_cusolver.h | 2 +- src/sundials/sundials_cusparse.h | 2 +- .../fmod/fsunlinsol_lapackdense_mod.c | 4 +- 20 files changed, 89 insertions(+), 89 deletions(-) diff --git a/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst index e4b1e23b5b..0425ab5bec 100644 --- a/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst @@ -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. diff --git a/include/arkode/arkode_arkstep.h b/include/arkode/arkode_arkstep.h index b2c8145b42..b2c68ddcf8 100644 --- a/include/arkode/arkode_arkstep.h +++ b/include/arkode/arkode_arkstep.h @@ -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); diff --git a/include/arkode/arkode_erkstep.h b/include/arkode/arkode_erkstep.h index eb0729832e..3bb3c573d4 100644 --- a/include/arkode/arkode_erkstep.h +++ b/include/arkode/arkode_erkstep.h @@ -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); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 5f0649008b..cbcdc8d326 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -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; @@ -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). diff --git a/src/arkode/arkode_adapt.c b/src/arkode/arkode_adapt.c index ea349043b2..12f6a4ee8b 100644 --- a/src/arkode/arkode_adapt.c +++ b/src/arkode/arkode_adapt.c @@ -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) { diff --git a/src/arkode/arkode_adapt_impl.h b/src/arkode/arkode_adapt_impl.h index df7697e417..3d3a1368d8 100644 --- a/src/arkode/arkode_adapt_impl.h +++ b/src/arkode/arkode_adapt_impl.h @@ -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 */ @@ -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 diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index fce86586cc..a8b4f8de32 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -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; } } @@ -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; @@ -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", @@ -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; @@ -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 */ @@ -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; @@ -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; @@ -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; diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index df90fb1582..783b2a82a9 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -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; @@ -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); diff --git a/src/arkode/arkode_arkstep_io.c b/src/arkode/arkode_arkstep_io.c index df48551ac5..a9fe5a4d37 100644 --- a/src/arkode/arkode_arkstep_io.c +++ b/src/arkode/arkode_arkstep_io.c @@ -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)); } @@ -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)); } @@ -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)); } /*--------------------------------------------------------------- @@ -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)); } diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 0081bbce9c..794507058e 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -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; @@ -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; diff --git a/src/arkode/arkode_erkstep_io.c b/src/arkode/arkode_erkstep_io.c index 482776cbd8..f8aec53d5f 100644 --- a/src/arkode/arkode_erkstep_io.c +++ b/src/arkode/arkode_erkstep_io.c @@ -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)); } @@ -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)); } /*--------------------------------------------------------------- @@ -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)); } diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index a8a9aba54a..f5e5356629 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -333,7 +333,7 @@ struct ARKodeMemRec /* N_Vector storage */ N_Vector ewt; /* error weight vector */ N_Vector rwt; /* residual weight vector */ - booleantype rwt_is_ewt; /* SUNTRUE if rwt is a pointer to ewt */ + sunbooleantype rwt_is_ewt; /* SUNTRUE if rwt is a pointer to ewt */ N_Vector ycur; /* pointer to user-provided solution memory; used as evolving solution by the time stepper modules */ @@ -407,9 +407,9 @@ struct ARKodeMemRec sunbooleantype MallocDone; sunbooleantype initsetup; /* denotes a call to InitialSetup is needed */ int init_type; /* initialization type (see constants above) */ - booleantype firststage; /* denotes first stage in simulation */ - booleantype initialized; /* denotes arkInitialSetup has been done */ - booleantype call_fullrhs; /* denotes the full RHS fn will be called */ + sunbooleantype firststage; /* denotes first stage in simulation */ + sunbooleantype initialized; /* denotes arkInitialSetup has been done */ + sunbooleantype call_fullrhs; /* denotes the full RHS fn will be called */ /* Error handler function and error ouput file */ ARKErrHandlerFn ehfun; /* error messages are handled by ehfun */ @@ -1024,12 +1024,12 @@ int arkSetPostprocessStageFn(void *arkode_mem, int arkSetConstraints(void *arkode_mem, N_Vector constraints); int arkSetMaxNumConstrFails(void *arkode_mem, int maxfails); int arkSetAdaptivityAdjustment(void *arkode_mem, int adjust); -int arkSetCFLFraction(void *arkode_mem, realtype cfl_frac); -int arkSetSafetyFactor(void *arkode_mem, realtype safety); -int arkSetErrorBias(void *arkode_mem, realtype bias); -int arkSetMaxGrowth(void *arkode_mem, realtype mx_growth); -int arkSetMinReduction(void *arkode_mem, realtype eta_min); -int arkSetFixedStepBounds(void *arkode_mem, realtype lb, realtype ub); +int arkSetCFLFraction(void *arkode_mem, sunrealtype cfl_frac); +int arkSetSafetyFactor(void *arkode_mem, sunrealtype safety); +int arkSetErrorBias(void *arkode_mem, sunrealtype bias); +int arkSetMaxGrowth(void *arkode_mem, sunrealtype mx_growth); +int arkSetMinReduction(void *arkode_mem, sunrealtype eta_min); +int arkSetFixedStepBounds(void *arkode_mem, sunrealtype lb, sunrealtype ub); int arkSetAdaptivityMethod(void *arkode_mem, int imethod, int idefault, int pq, sunrealtype adapt_params[3]); int arkSetAdaptivityFn(void *arkode_mem, ARKAdaptFn hfun, void *h_data); diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 26d9e1a2c0..2a71f57d2e 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -871,11 +871,11 @@ int arkSetMaxNumConstrFails(void *arkode_mem, int maxfails) via the time-stepping module *SetController routines. ---------------------------------------------------------------*/ int arkSetAdaptivityMethod(void *arkode_mem, int imethod, int idefault, - int pq, realtype adapt_params[3]) + int pq, sunrealtype adapt_params[3]) { int retval; long int lenrw, leniw; - realtype k1, k2, k3; + sunrealtype k1, k2, k3; ARKodeMem ark_mem; SUNAdaptController C; if (arkode_mem==NULL) { diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index ca9dff2403..270b75cc6f 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1239,7 +1239,7 @@ int mriStep_Init(void* arkode_mem, int init_type) Presently ff(t,y) is always called with ARK_FULLRHS_OTHER mode. ----------------------------------------------------------------------------*/ -int mriStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, +int mriStep_FullRHS(void* arkode_mem, sunrealtype t, N_Vector y, N_Vector f, int mode) { ARKodeMem ark_mem; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 7c1185e16a..cf00192884 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -517,7 +517,7 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, Since RHS values are not stored in SPRKStep we evaluate the RHS functions for all modes. ----------------------------------------------------------------------------*/ -int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, +int sprkStep_FullRHS(void* arkode_mem, sunrealtype t, N_Vector y, N_Vector f, int mode) { int retval = 0; diff --git a/src/arkode/arkode_user_controller.c b/src/arkode/arkode_user_controller.c index ddf3cbd262..6a51613da1 100644 --- a/src/arkode/arkode_user_controller.c +++ b/src/arkode/arkode_user_controller.c @@ -97,8 +97,8 @@ SUNAdaptController ARKUserControl(SUNContext sunctx, void* arkode_mem, SUNAdaptController_Type SUNAdaptController_GetType_ARKUserControl(SUNAdaptController C) { return SUN_ADAPTCONTROLLER_H; } -int SUNAdaptController_EstimateStep_ARKUserControl(SUNAdaptController C, realtype h, - int p, realtype dsm, realtype* hnew) +int SUNAdaptController_EstimateStep_ARKUserControl(SUNAdaptController C, sunrealtype h, + int p, sunrealtype dsm, sunrealtype* hnew) { /* call user-provided function to compute new step */ sunrealtype ttmp = (dsm <= ONE) ? SC_ARKMEM(C)->tn + SC_ARKMEM(C)->h : SC_ARKMEM(C)->tn; @@ -137,7 +137,7 @@ int SUNAdaptController_Write_ARKUserControl(SUNAdaptController C, FILE *fptr) return SUNADAPTCONTROLLER_SUCCESS; } -int SUNAdaptController_UpdateH_ARKUserControl(SUNAdaptController C, realtype h, realtype dsm) +int SUNAdaptController_UpdateH_ARKUserControl(SUNAdaptController C, sunrealtype h, sunrealtype dsm) { SC_HPP(C) = SC_HP(C); SC_HP(C) = h; diff --git a/src/arkode/arkode_user_controller.h b/src/arkode/arkode_user_controller.h index 201e622b70..c89e91976f 100644 --- a/src/arkode/arkode_user_controller.h +++ b/src/arkode/arkode_user_controller.h @@ -32,10 +32,10 @@ extern "C" { * --------------------------------------------------- */ struct _ARKUserControlContent { - realtype hp; /* h from previous step */ - realtype hpp; /* h from 2 steps ago */ - realtype ep; /* error from previous step */ - realtype epp; /* error from 2 steps ago */ + sunrealtype hp; /* h from previous step */ + sunrealtype hpp; /* h from 2 steps ago */ + sunrealtype ep; /* error from previous step */ + sunrealtype epp; /* error from 2 steps ago */ ARKodeMem ark_mem; /* main ARKODE memory structure */ ARKAdaptFn hadapt; /* user-provided adaptivity fn */ void* hadapt_data; /* user-provided data pointer */ @@ -53,14 +53,14 @@ SUNAdaptController ARKUserControl(SUNContext sunctx, void* arkode_mem, SUNDIALS_EXPORT SUNAdaptController_Type SUNAdaptController_GetType_ARKUserControl(SUNAdaptController C); SUNDIALS_EXPORT -int SUNAdaptController_EstimateStep_ARKUserControl(SUNAdaptController C, realtype h, - int p, realtype dsm, realtype* hnew); +int SUNAdaptController_EstimateStep_ARKUserControl(SUNAdaptController C, sunrealtype h, + int p, sunrealtype dsm, sunrealtype* hnew); SUNDIALS_EXPORT int SUNAdaptController_Reset_ARKUserControl(SUNAdaptController C); SUNDIALS_EXPORT int SUNAdaptController_Write_ARKUserControl(SUNAdaptController C, FILE* fptr); SUNDIALS_EXPORT -int SUNAdaptController_UpdateH_ARKUserControl(SUNAdaptController C, realtype h, realtype dsm); +int SUNAdaptController_UpdateH_ARKUserControl(SUNAdaptController C, sunrealtype h, sunrealtype dsm); SUNDIALS_EXPORT int SUNAdaptController_Space_ARKUserControl(SUNAdaptController C, long int *lenrw, long int *leniw); diff --git a/src/sundials/sundials_cusolver.h b/src/sundials/sundials_cusolver.h index b1aee9b266..f61d67c1e8 100644 --- a/src/sundials/sundials_cusolver.h +++ b/src/sundials/sundials_cusolver.h @@ -44,7 +44,7 @@ extern "C" { * Utility functions * ---------------------------------------------------------------------------*/ -inline booleantype SUNDIALS_CUSOLVER_Assert(cusolverStatus_t status, const char *file, int line) +inline sunbooleantype SUNDIALS_CUSOLVER_Assert(cusolverStatus_t status, const char *file, int line) { if (status != CUSOLVER_STATUS_SUCCESS) { diff --git a/src/sundials/sundials_cusparse.h b/src/sundials/sundials_cusparse.h index 3f9c3ae493..0e514c3905 100644 --- a/src/sundials/sundials_cusparse.h +++ b/src/sundials/sundials_cusparse.h @@ -42,7 +42,7 @@ extern "C" { * Utility functions * ---------------------------------------------------------------------------*/ -inline booleantype SUNDIALS_CUSPARSE_Assert(cusparseStatus_t status, const char *file, int line) +inline sunbooleantype SUNDIALS_CUSPARSE_Assert(cusparseStatus_t status, const char *file, int line) { if (status != CUSPARSE_STATUS_SUCCESS) { diff --git a/src/sunlinsol/lapackdense/fmod/fsunlinsol_lapackdense_mod.c b/src/sunlinsol/lapackdense/fmod/fsunlinsol_lapackdense_mod.c index 2ed9147d9f..f2b2b221d7 100644 --- a/src/sunlinsol/lapackdense/fmod/fsunlinsol_lapackdense_mod.c +++ b/src/sunlinsol/lapackdense/fmod/fsunlinsol_lapackdense_mod.c @@ -280,14 +280,14 @@ SWIGEXPORT int _wrap_FSUNLinSolSolve_LapackDense(SUNLinearSolver farg1, SUNMatri SUNMatrix arg2 = (SUNMatrix) 0 ; N_Vector arg3 = (N_Vector) 0 ; N_Vector arg4 = (N_Vector) 0 ; - realtype arg5 ; + sunrealtype arg5 ; int result; arg1 = (SUNLinearSolver)(farg1); arg2 = (SUNMatrix)(farg2); arg3 = (N_Vector)(farg3); arg4 = (N_Vector)(farg4); - arg5 = (realtype)(*farg5); + arg5 = (sunrealtype)(*farg5); result = (int)SUNLinSolSolve_LapackDense(arg1,arg2,arg3,arg4,arg5); fresult = (int)(result); return fresult;