Skip to content

Commit

Permalink
cleanup use of removed PREC_ macro
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Nov 5, 2023
1 parent 3841cd5 commit b816971
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/kokkos/arkode_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down Expand Up @@ -282,7 +282,7 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx);
LS = SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/advection_reaction_3D/kokkos/cvode_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int EvolveProblemBDF(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "CVodeSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/advection_reaction_3D/kokkos/ida_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int EvolveDAEProblem(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "IDASetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/raja/arkode_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down Expand Up @@ -282,7 +282,7 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx);
LS = SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/advection_reaction_3D/raja/cvode_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int EvolveProblemBDF(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "CVodeSetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/advection_reaction_3D/raja/ida_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int EvolveDAEProblem(N_Vector y, UserData* udata, UserOptions* uopt)
if (check_retval(&retval, "IDASetNonlinearSolver", 1, udata->myid)) return 1;

/* Create linear solver */
LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx);
LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx);
if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1;

/* Attach linear solver */
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/diffusion_2D/main_arkode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ int main(int argc, char* argv[])
sunindextype* A_row_ptrs = nullptr;
#endif

int prectype = (uopts.preconditioning) ? PREC_RIGHT : PREC_NONE;
int prectype = (uopts.preconditioning) ? SUN_PREC_RIGHT : SUN_PREC_NONE;

if (uopts.ls == "cg")
{
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/diffusion_2D/main_cvode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int main(int argc, char* argv[])
sunindextype* A_row_ptrs = nullptr;
#endif

int prectype = (uopts.preconditioning) ? PREC_RIGHT : PREC_NONE;
int prectype = (uopts.preconditioning) ? SUN_PREC_RIGHT : SUN_PREC_NONE;

if (uopts.ls == "cg")
{
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/diffusion_2D/main_ida.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int main(int argc, char* argv[])
sunindextype* A_row_ptrs = nullptr;
#endif

int prectype = (uopts.preconditioning) ? PREC_RIGHT : PREC_NONE;
int prectype = (uopts.preconditioning) ? SUN_PREC_RIGHT : SUN_PREC_NONE;

if (uopts.ls == "cg")
{
Expand Down
2 changes: 1 addition & 1 deletion examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ static int SetupLS(N_Vector u, void *user_data, SUNContext sunctx)
// Access problem data
UserData *udata = (UserData *) user_data;

int prectype = PREC_RIGHT;
int prectype = SUN_PREC_RIGHT;

// Create linear solver
udata->LS = SUNLinSol_PCG(u, prectype, udata->liniters, sunctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ static int SetupLS(N_Vector u, void *user_data, SUNContext sunctx)
// Access problem data
UserData *udata = (UserData *) user_data;

int prectype = PREC_RIGHT;
int prectype = SUN_PREC_RIGHT;

// Create linear solver
udata->LS = SUNLinSol_PCG(u, prectype, udata->liniters, sunctx);
Expand Down

0 comments on commit b816971

Please sign in to comment.