From b45e563ddbc72c8f19267e85dd30d7c0283ab441 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 16 Jul 2024 13:29:04 -0500 Subject: [PATCH] Updated SPRKStep and LSRKStep to only request Lagrange interpolation (not to construct the Lagrange module directly). --- src/arkode/arkode_lsrkstep.c | 11 ++--------- src/arkode/arkode_sprkstep.c | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index da389c9ac5..87d4d60992 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -147,15 +147,8 @@ void* LSRKStepCreate(ARKRhsFn fe, ARKRhsFn fi, sunrealtype t0, N_Vector y0, return (NULL); } - /* Specify Interpolation Type */ - retval = ARKodeSetInterpolantType(ark_mem, ARK_INTERP_LAGRANGE); - if (retval != ARK_SUCCESS) - { - arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, - "Unable to specify interpolation type"); - ARKodeFree((void**)&ark_mem); - return (NULL); - } + /* Specify preferred interpolation type */ + ark_mem->interp_type = ARK_INTERP_LAGRANGE; return ((void*)ark_mem); } diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 0ae21c2741..739e3ba885 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -151,7 +151,7 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, sunrealtype t0, N_Vector y0, /* SPRKStep uses Lagrange interpolation by default, since Hermite is less compatible with these methods. */ - ARKodeSetInterpolantType(ark_mem, ARK_INTERP_LAGRANGE); + ark_mem->interp_type = ARK_INTERP_LAGRANGE; /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT);