From bed0356f0b1a2a70653d96aaba512d837800d860 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Fri, 15 Jul 2022 17:34:41 -0700 Subject: [PATCH 001/177] add kepler problem and try sprk butcher tables --- examples/arkode/C_serial/CMakeLists.txt | 1 + examples/arkode/C_serial/ark_kepler.c | 336 ++++++++++++++++++++++++ include/arkode/arkode_arkstep.h | 2 + src/arkode/arkode.c | 3 + src/arkode/arkode_arkstep.c | 142 ++++++++-- src/arkode/arkode_arkstep_impl.h | 3 + src/arkode/arkode_arkstep_io.c | 15 ++ 7 files changed, 475 insertions(+), 27 deletions(-) create mode 100644 examples/arkode/C_serial/ark_kepler.c diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 5269485065..39c61e034c 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -39,6 +39,7 @@ set(ARKODE_examples "ark_twowaycouple_mri\;\;develop" "ark_reaction_diffusion_mri\;\;develop" "ark_brusselator_1D_mri\;\;develop" + "ark_kepler\;\;develop" "ark_kpr_mri\;\;develop" "ark_kpr_mri\;0 0.002\;develop" "ark_kpr_mri\;1 0.002\;develop" diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c new file mode 100644 index 0000000000..6af3653d05 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler.c @@ -0,0 +1,336 @@ +/* ---------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ---------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ---------------------------------------------------------------- + * We consider the perturbed Kepler problem + * dq/dt = [ p_1 ] + * [ p_2 ] + * dp/dt = [ -q_1 / (q_1^2 + q_2^2)^(3/2) - delta*q_1 / (q_1^2 + q_2^2)^(5/2) ] + * = [ -q_2 / (q_1^2 + q_2^2)^(3/2) - delta*q_2 / (q_1^2 + q_2^2)^(5/2) ] + * (delta = 0.015) with the initial conditions + * q(0) = [ 1 - e ], p(0) = [ 0 ] + * [ 0 ] [ sqrt((1+e)/(1-e)) ] + * where e = 0.6 is the eccentricity. + * + * The Hamiltonian for the system, + * H(p, q) = 1/2 * (p_1^2 + p_2^2 ) - 1/sqrt(q_1^2 + q_2^2) + * - 1/200 / (2 * sqrt(q_1^2 + q_2^2)^3)) + * is conserved as well as the angular momentum, + * L(p, q) = q_1p_2 - q_2p_1. + * + * We solve the problem by letting y = [ q, p ]^T then using + * ARKStep. + * + * References: + * Ernst Hairer, Christain Lubich, Gerhard Wanner + * Geometric Numerical Integration: Structure-Preserving + * Algorithms for Ordinary Differential Equations + * Springer, 2006, + * ISSN 0179-3632 + * ----------------------------------------------------------------*/ + +#include +#include +#include /* prototypes for MRIStep fcts., consts */ +#include /* prototypes for ARKStep fcts., consts */ +#include /* serial N_Vector type, fcts., macros */ +#include /* def. math fcns, 'realtype' */ + +static int check_retval(void *returnvalue, const char *funcname, int opt); + +static void InitialConditions(N_Vector y0, sunrealtype ecc); +static sunrealtype Hamiltonian(N_Vector y); +static sunrealtype AngularMomentum(N_Vector y); + +static int dydt(realtype t, N_Vector y, N_Vector ydot, void *user_data); +static int dqdt(realtype t, N_Vector y, N_Vector ydot, void *user_data); +static int dpdt(realtype t, N_Vector y, N_Vector ydot, void *user_data); + +typedef struct { + sunrealtype ecc; + sunrealtype delta; +} *UserData; + + +int main(int argc, char* argv[]) +{ + SUNContext sunctx; + N_Vector y; + SUNNonlinearSolver NLS; + UserData udata; + sunrealtype tout, tret; + ARKodeButcherTable Mp, Mq; + void* arkode_mem; + int argi, iout, retval; + + /* Default problem parameters */ + const sunrealtype T0 = SUN_RCONST(0.0); + sunrealtype Tf = SUN_RCONST(0.1); + // sunrealtype Tf = SUN_RCONST(4000.0); + const sunrealtype dt = SUN_RCONST(1e-3); + const sunrealtype ecc = SUN_RCONST(0.6); + const sunrealtype delta = SUN_RCONST(0.015); + + /* Default integrator Options */ + int fixed_step_mode = 1; + int method = 1; + const sunrealtype dTout = SUN_RCONST(0.01); + // const sunrealtype dTout = SUN_RCONST(100.0); + const int num_output_times = (int) ceil(Tf/dTout); + + /* Parse CLI args */ + argi = 0; + if (argc > 1) { + fixed_step_mode = atoi(argv[++argi]); + } + if (argc > 2) { + method = atoi(argv[++argi]); + } + + /* Allocate and fill udata structure */ + udata = (UserData) malloc(sizeof(*udata)); + udata->ecc = ecc; + udata->delta = delta; + + /* Create the SUNDIALS context object for this simulation */ + retval = SUNContext_Create(NULL, &sunctx); + if (check_retval(&retval, "SUNContext_Create", 1)) return 1; + + /* Allocate our state vector */ + y = N_VNew_Serial(4, sunctx); + + /* Fill the initial conditions */ + InitialConditions(y, ecc); + + /* Create ARKStep integrator where we treat dqdt explicitly and dpdt implicitly */ + if (method == 0) { + arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); + + /* Attach custom Butcher tables for 3rd order scheme [Candy, 1991] */ + // Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); + // if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + // Mq->b[0] = RCONST(2.0)/RCONST(3.0); + // Mq->b[1] = -RCONST(2.0)/RCONST(3.0); + // Mq->b[2] = RCONST(1.0); + // Mq->A[0][0] = Mq->b[0]; + // Mq->A[1][0] = Mq->b[0]; + // Mq->A[1][1] = Mq->b[1]; + // Mq->A[2][0] = Mq->b[0]; + // Mq->A[2][1] = Mq->b[1]; + // Mq->A[2][2] = Mq->b[2]; + // Mq->c[0] = Mq->b[0]; + // Mq->c[1] = Mq->b[0] + Mq->b[1]; + // Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; + // Mq->q = 3; + // Mq->p = 0; + + // Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); + // if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; + // Mp->b[0] = RCONST(7.0)/RCONST(24.0); + // Mp->b[1] = RCONST(3.0)/RCONST(4.0); + // Mp->b[2] = -RCONST(1.0)/RCONST(24.0); + // Mp->A[1][0] = Mp->b[0]; + // Mp->A[2][0] = Mp->b[0]; + // Mp->A[2][1] = Mp->b[1]; + // Mp->c[0] = Mp->b[0]; + // Mp->c[1] = Mp->b[0] + Mp->b[1]; + // Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; + // Mp->q = 3; + // Mp->p = 0; + + Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); + if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + Mq->b[0] = RCONST(1.0); + Mq->A[0][0] = Mq->b[0]; + Mq->c[0] = Mq->b[0]; + Mq->q = 1; + Mq->p = 0; + + Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); + if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; + Mp->b[0] = RCONST(0.0); + Mp->A[0][0] = Mp->b[0]; + Mp->c[0] = Mp->b[0]; + Mp->q = 1; + Mp->p = 0; + + retval = ARKStepSetTables(arkode_mem, 1, 0, Mq, Mp); + if (check_retval(&retval, "ARKStepSetTables", 1)) return 1; + + retval = ARKStepSetSeparableRhs(arkode_mem, SUNTRUE); + if (check_retval(&retval, "ARKStepSetSeparableRhs", 1)) return 1; + } else { + arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); + } + + /* Setup ARKStep */ + retval = ARKStepSetUserData(arkode_mem, (void *) udata); + if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; + + retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); + if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; + + if (fixed_step_mode) { + retval = ARKStepSetFixedStep(arkode_mem, dt); + if (check_retval(&retval, "ARKStepSetFixedStep", 1)) return 1; + } else { + retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-6), SUN_RCONST(10e-12)); + if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; + } + + tret = T0; + tout = T0+dTout; + fprintf(stdout, "t = %.2f, H(p, q) = %.16f, L(p, q) = %.16f\n", tret, Hamiltonian(y), AngularMomentum(y)); + for (iout = 0; iout < num_output_times; iout++) { + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + fprintf(stdout, "t = %.2f, H(p, q) = %.16f, L(p, q) = %.16f\n", tret, Hamiltonian(y), AngularMomentum(y)); + N_VPrint(y); + if (retval >= 0) { /* successful solve: update time */ + tout += dTout; + tout = (tout > Tf) ? Tf : tout; + } else { /* unsuccessful solve: break */ + fprintf(stderr, "Solver failure, stopping integration\n"); + break; + } + } + + ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + + // ARKStepFree(arkode_mem); // TODO: figure out why this is segfaulting! + if (Mq) ARKodeButcherTable_Free(Mq); + if (Mp) ARKodeButcherTable_Free(Mp); + N_VDestroy(y); + free(udata); + SUNContext_Free(&sunctx); + + return 0; +} + +void InitialConditions(N_Vector y0vec, sunrealtype ecc) +{ + const sunrealtype zero = SUN_RCONST(0.0); + const sunrealtype one = SUN_RCONST(1.0); + sunrealtype* y0 = N_VGetArrayPointer(y0vec); + + y0[0] = one - ecc; + y0[1] = zero; + y0[2] = zero; + y0[3] = SUNRsqrt((one + ecc)/(one - ecc)); +} + +sunrealtype Hamiltonian(N_Vector yvec) +{ + sunrealtype H = 0.0; + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + const sunrealtype p1 = y[2]; + const sunrealtype p2 = y[3]; + + H = SUN_RCONST(0.5) * (p1*p1 + p2*p2) - SUN_RCONST(1.0)/SUNRsqrt(q1*q1 + q2*q2) + - SUN_RCONST(0.005) / (SUN_RCONST(2.0) * SUNRpowerR(SUNRsqrt(q1*q1 + q2*q2), SUN_RCONST(3.0))); + + return H; +} + +sunrealtype AngularMomentum(N_Vector yvec) +{ + sunrealtype L = 0.0; + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + const sunrealtype p1 = y[2]; + const sunrealtype p2 = y[3]; + + L = q1*p2 - q2*p1; + + return L; +} + +int dydt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + int retval = 0; + + retval += dqdt(t, yvec, ydotvec, user_data); + retval += dpdt(t, yvec, ydotvec, user_data); + + return retval; +} + +int dqdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype p1 = y[2]; + const sunrealtype p2 = y[3]; + + ydot[0] = p1; + ydot[1] = p2; + + // printf("dqdt(t=%g, p=[%g, %g]) = [%g, %g]\n", t, p1, p2, ydot[0], ydot[1]); + + return 0; +} + +int dpdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + UserData udata = (UserData) user_data; + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype delta = udata->delta; + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + + ydot[2] = -q1 / SUNRpowerR(q1*q1 + q2*q2, SUN_RCONST(3.0)/SUN_RCONST(2.0)) + -delta*q1 / SUNRpowerR(q1*q1 + q2*q2, SUN_RCONST(5.0)/SUN_RCONST(2.0)); + ydot[3] = -q2 / SUNRpowerR(q1*q1 + q2*q2, SUN_RCONST(3.0)/SUN_RCONST(2.0)) + -delta*q2 / SUNRpowerR(q1*q1 + q2*q2, SUN_RCONST(5.0)/SUN_RCONST(2.0)); + + // printf("dpdt(t=%g, q=[%g, %g]) = [%g, %g]\n", t, q1, q2, ydot[2], ydot[3]); + + return 0; +} + +/* Check function return value... + opt == 0 means SUNDIALS function allocates memory so check if + returned NULL pointer + opt == 1 means SUNDIALS function returns a retval so check if + retval < 0 + opt == 2 means function allocates memory so check if returned + NULL pointer +*/ +int check_retval(void *returnvalue, const char *funcname, int opt) +{ + int *retval; + + /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ + if (opt == 0 && returnvalue == NULL) { + fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; } + + /* Check if retval < 0 */ + else if (opt == 1) { + retval = (int *) returnvalue; + if (*retval < 0) { + fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed with retval = %d\n\n", + funcname, *retval); + return 1; }} + + /* Check if function returned NULL pointer - no memory allocated */ + else if (opt == 2 && returnvalue == NULL) { + fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; } + + return 0; +} diff --git a/include/arkode/arkode_arkstep.h b/include/arkode/arkode_arkstep.h index 2b1ec96962..55cb8e75bb 100644 --- a/include/arkode/arkode_arkstep.h +++ b/include/arkode/arkode_arkstep.h @@ -299,6 +299,8 @@ SUNDIALS_EXPORT int ARKStepSetMassTimes(void *arkode_mem, ARKLsMassTimesVecFn mtimes, void *mtimes_data); SUNDIALS_EXPORT int ARKStepSetLinSysFn(void *arkode_mem, ARKLsLinSysFn linsys); +SUNDIALS_EXPORT int ARKStepSetSeparableRhs(void *arkode_mem, sunbooleantype isseparable); + /* Integrate the ODE over an interval in t */ SUNDIALS_EXPORT int ARKStepEvolve(void *arkode_mem, realtype tout, diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 9b6f7e9e5b..9bcb2bbefd 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1887,6 +1887,7 @@ int arkInitialSetup(ARKodeMem ark_mem, realtype tout) /* Call fullrhs (used in estimating initial step, explicit steppers, Hermite interpolation module, and possibly (but not always) arkRootCheck1) */ + // printf(">>> arkInitialSetup\n"); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tcur, ark_mem->yn, ark_mem->fn, ARK_FULLRHS_START); if (retval != 0) return(ARK_RHSFUNC_FAIL); @@ -2317,6 +2318,7 @@ int arkYddNorm(ARKodeMem ark_mem, realtype hg, realtype *yddnrm) N_VLinearSum(hg, ark_mem->fn, ONE, ark_mem->yn, ark_mem->ycur); /* compute y', via the ODE RHS routine */ + // printf(">>> arkYddNorm\n"); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tcur + hg, ark_mem->ycur, ark_mem->tempv1, ARK_FULLRHS_OTHER); if (retval != 0) return(ARK_RHSFUNC_FAIL); @@ -2388,6 +2390,7 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) /* call fullrhs if needed */ if (ark_mem->call_fullrhs) { mode = (ark_mem->ProcessStep != NULL) ? ARK_FULLRHS_START : ARK_FULLRHS_END; + // printf(">>> arkCompleteStep\n"); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tcur, ark_mem->ycur, ark_mem->fn, mode); if (retval != 0) return(ARK_RHSFUNC_FAIL); diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 8b5bde3a1b..7723bdea5b 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1214,7 +1214,11 @@ int arkStep_Init(void* arkode_mem, int init_type) /* set appropriate TakeStep routine based on problem configuration */ /* (only one choice for now) */ - ark_mem->step = arkStep_TakeStep_Z; + // if (step_mem->separable_rhs) { + // ark_mem->step = arkStep_TakeStep_Sym; + // } else { + ark_mem->step = arkStep_TakeStep_Z; + // } /* Check for consistency between mass system and system linear system modules (e.g., if lsolve is direct, msolve needs to match) */ @@ -1263,7 +1267,7 @@ int arkStep_Init(void* arkode_mem, int init_type) } /* Initialize the nonlinear solver object (if it exists) */ - if (step_mem->NLS) { + if (step_mem->NLS && !step_mem->separable_rhs) { retval = arkStep_NlsInit(ark_mem); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_NLS_INIT_FAIL, "ARKODE::ARKStep", "arkStep_Init", @@ -1275,6 +1279,21 @@ int arkStep_Init(void* arkode_mem, int init_type) return(ARK_SUCCESS); } +/* Utility to call fi and increment the counter */ +int arkStep_Fi(ARKodeARKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector Fi, void* user_data) +{ + int retval = step_mem->fi(tcur, ycur, Fi, user_data); + step_mem->nfi++; + return retval; +} + +/* Utility to call fe and increment the counter */ +int arkStep_Fe(ARKodeARKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector Fe, void* user_data) +{ + int retval = step_mem->fe(tcur, ycur, Fe, user_data); + step_mem->nfe++; + return retval; +} /*--------------------------------------------------------------- arkStep_FullRHS: @@ -1341,8 +1360,7 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fe if the problem has an explicit component */ if (step_mem->explicit) { - retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); - step_mem->nfe++; + retval = arkStep_Fe(step_mem, t, y, step_mem->Fe[0], ark_mem->user_data); if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1360,8 +1378,7 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fi if the problem has an implicit component */ if (step_mem->implicit) { - retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); - step_mem->nfi++; + retval = arkStep_Fi(step_mem, t, y, step_mem->Fi[0], ark_mem->user_data); if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1407,8 +1424,7 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fe if the problem has an explicit component */ if (step_mem->explicit) { - retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); - step_mem->nfe++; + retval = arkStep_Fe(step_mem, t, y, step_mem->Fe[0], ark_mem->user_data); if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1426,8 +1442,7 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fi if the problem has an implicit component */ if (step_mem->implicit) { - retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); - step_mem->nfi++; + retval = arkStep_Fi(step_mem, t, y, step_mem->Fi[0], ark_mem->user_data); if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1467,8 +1482,7 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fe if the problem has an explicit component (store in ark_tempv2) */ if (step_mem->explicit) { - retval = step_mem->fe(t, y, ark_mem->tempv2, ark_mem->user_data); - step_mem->nfe++; + retval = arkStep_Fe(step_mem, t, y, ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1486,8 +1500,7 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fi if the problem has an implicit component (store in sdata) */ if (step_mem->implicit) { - retval = step_mem->fi(t, y, step_mem->sdata, ark_mem->user_data); - step_mem->nfi++; + retval = arkStep_Fi(step_mem, t, y, step_mem->sdata, ark_mem->user_data); if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1583,7 +1596,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) Xvecs = step_mem->Xvecs; /* if problem will involve no algebraic solvers, initialize nflagPtr to success */ - if ((!step_mem->implicit) && (step_mem->mass_type == MASS_IDENTITY)) + if ((!step_mem->implicit || step_mem->separable_rhs) && (step_mem->mass_type == MASS_IDENTITY)) *nflagPtr = ARK_SUCCESS; /* call nonlinear solver setup if it exists */ @@ -1675,7 +1688,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) ark_mem->nst, ark_mem->h, is, ark_mem->tcur); /* perform implicit solve if required */ - if (implicit_stage) { + if (implicit_stage && !step_mem->separable_rhs) { /* implicit solve result is stored in ark_mem->ycur; return with positive value on anything but success */ @@ -1729,9 +1742,8 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) if (step_mem->implicit) { if (!deduce_stage) { - retval = step_mem->fi(ark_mem->tcur, ark_mem->ycur, - step_mem->Fi[is], ark_mem->user_data); - step_mem->nfi++; + retval = arkStep_Fi(step_mem, ark_mem->tcur, ark_mem->ycur, + step_mem->Fi[is], ark_mem->user_data); } else if (step_mem->mass_type == MASS_FIXED) { retval = step_mem->mmult((void *) ark_mem, step_mem->zcor, ark_mem->tempv1); if (retval != ARK_SUCCESS) return (ARK_MASSMULT_FAIL); @@ -1763,9 +1775,8 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* store explicit RHS */ if (step_mem->explicit) { - retval = step_mem->fe(ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, + retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, ark_mem->ycur, step_mem->Fe[is], ark_mem->user_data); - step_mem->nfe++; #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, @@ -1838,6 +1849,83 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return(ARK_SUCCESS); } +int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +{ + ARKodeMem ark_mem; + ARKodeARKStepMem step_mem; + int retval, js, is, nvec; + realtype* cvals; + N_Vector* Xvecs; + + // printf(">>> arkStep_TakeStep_Sym\n"); + + /* access ARKodeARKStepMem structure */ + retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_Sym", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + if (!ark_mem->fixedstep) { + arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", + "arkStep_TakeStep_Sym", "!!!! This TakeStep only works with fixed steps !!!!"); + return(ARK_UNRECOGNIZED_ERROR); + } + + /* local shortcuts for fused vector operations */ + cvals = step_mem->cvals; + Xvecs = step_mem->Xvecs; + + /* loop over internal stages to the step */ + for (is=0; isstages; is++) { + /* store current stage index */ + step_mem->istage = is; + + /* set current stage time(s) */ + if (step_mem->implicit) + ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; + else + ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; + + /* evaluate Fi so we can compute implicit stage */ + retval = arkStep_Fi(step_mem, ark_mem->tcur, ark_mem->ycur, + step_mem->Fi[is], ark_mem->user_data); + + /* update implicit stage */ + nvec = 0; + for (js=0; js<=is; js++) { + cvals[nvec] = ark_mem->h * step_mem->Bi->A[is][js]; + Xvecs[nvec] = step_mem->Fi[js]; + nvec += 1; + } + /* call fused vector operation to do the work */ + retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); + if (retval != 0) return(ARK_VECTOROP_ERR); + + /* compute ycur at before evaluating explicit RHS */ + N_VLinearSum(ONE, ark_mem->yn, ONE, step_mem->sdata, ark_mem->ycur); + if (retval != 0) return(ARK_VECTOROP_ERR); + + /* evaluate Fe so we can compute explicit stage */ + retval = arkStep_Fe(step_mem, ark_mem->tcur, ark_mem->ycur, + step_mem->Fe[is], ark_mem->user_data); + + nvec = 0; + for (js=0; js<=is; js++) { + cvals[nvec] = ark_mem->h * step_mem->Be->A[is][js]; + Xvecs[nvec] = step_mem->Fe[js]; + nvec += 1; + } + /* call fused vector operation to do the work */ + retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); + if (retval != 0) return(ARK_VECTOROP_ERR); + + /* update state before finishing stage */ + N_VLinearSum(ONE, ark_mem->yn, ONE, step_mem->sdata, ark_mem->ycur); + if (retval != 0) return(ARK_VECTOROP_ERR); + } + + *nflagPtr = 0; + arkStep_ComputeSolutions(arkode_mem, dsmPtr); +} /*--------------------------------------------------------------- Internal utility routines @@ -2396,7 +2484,7 @@ int arkStep_Predict(ARKodeMem ark_mem, int istage, N_Vector yguess) sdata = yn - zp + h*sum_{j=0}^{i-1} (Ae(i,j)*Fe(j) + Ai(i,j)*Fi(j)) ---------------------------------------------------------------*/ -int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit) +int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) { /* local data */ ARKodeARKStepMem step_mem; @@ -2416,7 +2504,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit) i = step_mem->istage; /* If this is the first stage, and explicit, just set sdata=0 and return */ - if (!implicit && (i==0)) { + if (!implicit_stage && (i==0)) { N_VConst(ZERO, step_mem->sdata); return (ARK_SUCCESS); } @@ -2426,7 +2514,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit) Xvecs = step_mem->Xvecs; /* Update gamma if stage is implicit */ - if (implicit) { + if (implicit_stage) { step_mem->gamma = ark_mem->h * step_mem->Bi->A[i][i]; if (ark_mem->firststage) step_mem->gammap = step_mem->gamma; @@ -2436,7 +2524,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit) /* If predictor==5, then sdata=0 (plus any implicit forcing). Set sdata appropriately and return */ - if (implicit && (step_mem->predictor == 5)) { + if (implicit_stage && (step_mem->predictor == 5)) { /* apply external polynomial forcing (updates nvec, cvals, Xvecs) */ if (step_mem->impforcing) { @@ -2454,7 +2542,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit) /* If implicit, initialize sdata to yn - zpred (here: zpred = zp), and set first entries for eventual N_VLinearCombination call */ nvec = 0; - if (implicit) { + if (implicit_stage) { N_VLinearSum(ONE, ark_mem->yn, -ONE, step_mem->zpred, step_mem->sdata); cvals[0] = ONE; Xvecs[0] = step_mem->sdata; @@ -2462,7 +2550,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit) } /* If implicit with fixed M!=I, update sdata with M*sdata */ - if (implicit && (step_mem->mass_type == MASS_FIXED)) { + if (implicit_stage && (step_mem->mass_type == MASS_FIXED)) { N_VScale(ONE, step_mem->sdata, ark_mem->tempv1); retval = step_mem->mmult((void *) ark_mem, ark_mem->tempv1, step_mem->sdata); if (retval != ARK_SUCCESS) return (ARK_MASSMULT_FAIL); diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index 307f0f8555..57d7a791fb 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -73,6 +73,8 @@ typedef struct ARKodeARKStepMemRec { booleantype implicit; /* SUNTRUE if fi is enabled */ booleantype deduce_rhs; /* SUNTRUE if fi is deduced after a nonlinear solve */ + booleantype separable_rhs; /* SUNTRUE if fe and fi are separable + so no nonlinear solve is needed */ /* ARK method storage and parameters */ N_Vector *Fe; /* explicit RHS at each stage */ @@ -191,6 +193,7 @@ int arkStep_GetGammas(void* arkode_mem, realtype *gamma, int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode); int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); /* Internal utility routines */ int arkStep_AccessStepMem(void* arkode_mem, const char *fname, diff --git a/src/arkode/arkode_arkstep_io.c b/src/arkode/arkode_arkstep_io.c index bfa713fda9..f3ded91c61 100644 --- a/src/arkode/arkode_arkstep_io.c +++ b/src/arkode/arkode_arkstep_io.c @@ -341,6 +341,7 @@ int ARKStepSetDefaults(void* arkode_mem) step_mem->explicit = SUNTRUE; /* fe(t,y) will be used */ step_mem->implicit = SUNTRUE; /* fi(t,y) will be used */ step_mem->deduce_rhs = SUNFALSE; /* deduce fi on result of NLS */ + step_mem->separable_rhs = SUNFALSE; /* fe and fi are separable */ step_mem->maxcor = MAXCOR; /* max nonlinear iters/stage */ step_mem->nlscoef = NLSCOEF; /* nonlinear tolerance coefficient */ step_mem->crdown = CRDOWN; /* nonlinear convergence estimate coeff. */ @@ -1399,6 +1400,20 @@ int ARKStepSetDeduceImplicitRhs(void *arkode_mem, sunbooleantype deduce) return(ARK_SUCCESS); } +int ARKStepSetSeparableRhs(void *arkode_mem, sunbooleantype isseparable) +{ + ARKodeMem ark_mem; + ARKodeARKStepMem step_mem; + int retval; + + /* access ARKodeARKStepMem structure and set function pointer */ + retval = arkStep_AccessStepMem(arkode_mem, "ARKStepSetSeparableRhs", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + step_mem->separable_rhs = isseparable; + return(ARK_SUCCESS); +} + /*=============================================================== ARKStep optional output functions -- stepper-specific From ba62d1debfa70a5356eacfc47f46ba5b9e2d0214 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Tue, 19 Jul 2022 14:01:38 -0700 Subject: [PATCH 002/177] fix missing return --- examples/arkode/C_serial/ark_kepler.c | 18 +++++++++--------- src/arkode/arkode_arkstep.c | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 6af3653d05..7e5a10fefd 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -74,8 +74,8 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(0.1); - // sunrealtype Tf = SUN_RCONST(4000.0); + // sunrealtype Tf = SUN_RCONST(0.1); + sunrealtype Tf = SUN_RCONST(4000.0); const sunrealtype dt = SUN_RCONST(1e-3); const sunrealtype ecc = SUN_RCONST(0.6); const sunrealtype delta = SUN_RCONST(0.015); @@ -83,8 +83,8 @@ int main(int argc, char* argv[]) /* Default integrator Options */ int fixed_step_mode = 1; int method = 1; - const sunrealtype dTout = SUN_RCONST(0.01); - // const sunrealtype dTout = SUN_RCONST(100.0); + // const sunrealtype dTout = SUN_RCONST(0.01); + const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); /* Parse CLI args */ @@ -150,16 +150,16 @@ int main(int argc, char* argv[]) Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; Mq->b[0] = RCONST(1.0); - Mq->A[0][0] = Mq->b[0]; - Mq->c[0] = Mq->b[0]; + Mq->A[0][0] = RCONST(1.0); + Mq->c[0] = RCONST(1.0); Mq->q = 1; Mq->p = 0; Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = RCONST(0.0); - Mp->A[0][0] = Mp->b[0]; - Mp->c[0] = Mp->b[0]; + Mp->b[0] = RCONST(1.0); + Mp->A[0][0] = RCONST(0.0); + Mp->c[0] = RCONST(0.0); Mp->q = 1; Mp->p = 0; diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 7723bdea5b..2f5979dc5f 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1214,11 +1214,11 @@ int arkStep_Init(void* arkode_mem, int init_type) /* set appropriate TakeStep routine based on problem configuration */ /* (only one choice for now) */ - // if (step_mem->separable_rhs) { - // ark_mem->step = arkStep_TakeStep_Sym; - // } else { + if (step_mem->separable_rhs) { + ark_mem->step = arkStep_TakeStep_Sym; + } else { ark_mem->step = arkStep_TakeStep_Z; - // } + } /* Check for consistency between mass system and system linear system modules (e.g., if lsolve is direct, msolve needs to match) */ @@ -1857,8 +1857,6 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) realtype* cvals; N_Vector* Xvecs; - // printf(">>> arkStep_TakeStep_Sym\n"); - /* access ARKodeARKStepMem structure */ retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_Sym", &ark_mem, &step_mem); @@ -1925,6 +1923,8 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) *nflagPtr = 0; arkStep_ComputeSolutions(arkode_mem, dsmPtr); + + return 0; } /*--------------------------------------------------------------- From 2290ec0263a3a9978086a64fb4ba05fa9a1bf0fa Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Tue, 19 Jul 2022 14:48:13 -0700 Subject: [PATCH 003/177] optimize rhs --- examples/arkode/C_serial/ark_kepler.c | 137 +++++++++++++------------- 1 file changed, 69 insertions(+), 68 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 7e5a10fefd..4dcee32708 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -12,20 +12,20 @@ * SUNDIALS Copyright End * ---------------------------------------------------------------- * We consider the perturbed Kepler problem - * dq/dt = [ p_1 ] - * [ p_2 ] - * dp/dt = [ -q_1 / (q_1^2 + q_2^2)^(3/2) - delta*q_1 / (q_1^2 + q_2^2)^(5/2) ] - * = [ -q_2 / (q_1^2 + q_2^2)^(3/2) - delta*q_2 / (q_1^2 + q_2^2)^(5/2) ] + * dq/dt = [ p1 ] + * [ p2 ] + * dp/dt = [ -q1 / (q1^2 + q2^2)^(3/2) - delta*q1 / (q1^2 + q2^2)^(5/2) ] + * = [ -q2 / (q1^2 + q2^2)^(3/2) - delta*q2 / (q1^2 + q2^2)^(5/2) ] * (delta = 0.015) with the initial conditions * q(0) = [ 1 - e ], p(0) = [ 0 ] * [ 0 ] [ sqrt((1+e)/(1-e)) ] * where e = 0.6 is the eccentricity. * * The Hamiltonian for the system, - * H(p, q) = 1/2 * (p_1^2 + p_2^2 ) - 1/sqrt(q_1^2 + q_2^2) - * - 1/200 / (2 * sqrt(q_1^2 + q_2^2)^3)) + * H(p, q) = 1/2 * (p1^2 + p2^2) - 1/sqrt(q1^2 + q2^2) + * - 1/200 / (2 * sqrt(q1^2 + q2^2)^3)) * is conserved as well as the angular momentum, - * L(p, q) = q_1p_2 - q_2p_1. + * L(p, q) = q1*p2 - q2*p1. * * We solve the problem by letting y = [ q, p ]^T then using * ARKStep. @@ -68,23 +68,24 @@ int main(int argc, char* argv[]) SUNNonlinearSolver NLS; UserData udata; sunrealtype tout, tret; + sunrealtype H0, L0; ARKodeButcherTable Mp, Mq; void* arkode_mem; int argi, iout, retval; /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - // sunrealtype Tf = SUN_RCONST(0.1); - sunrealtype Tf = SUN_RCONST(4000.0); - const sunrealtype dt = SUN_RCONST(1e-3); + sunrealtype Tf = SUN_RCONST(200.0); + // sunrealtype Tf = SUN_RCONST(4000.0); + const sunrealtype dt = SUN_RCONST(1e-4); const sunrealtype ecc = SUN_RCONST(0.6); const sunrealtype delta = SUN_RCONST(0.015); /* Default integrator Options */ int fixed_step_mode = 1; int method = 1; - // const sunrealtype dTout = SUN_RCONST(0.01); - const sunrealtype dTout = SUN_RCONST(100.0); + const sunrealtype dTout = SUN_RCONST(10.0); + // const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); /* Parse CLI args */ @@ -116,53 +117,53 @@ int main(int argc, char* argv[]) arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); /* Attach custom Butcher tables for 3rd order scheme [Candy, 1991] */ - // Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); - // if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - // Mq->b[0] = RCONST(2.0)/RCONST(3.0); - // Mq->b[1] = -RCONST(2.0)/RCONST(3.0); - // Mq->b[2] = RCONST(1.0); - // Mq->A[0][0] = Mq->b[0]; - // Mq->A[1][0] = Mq->b[0]; - // Mq->A[1][1] = Mq->b[1]; - // Mq->A[2][0] = Mq->b[0]; - // Mq->A[2][1] = Mq->b[1]; - // Mq->A[2][2] = Mq->b[2]; - // Mq->c[0] = Mq->b[0]; - // Mq->c[1] = Mq->b[0] + Mq->b[1]; - // Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; - // Mq->q = 3; - // Mq->p = 0; - - // Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); - // if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - // Mp->b[0] = RCONST(7.0)/RCONST(24.0); - // Mp->b[1] = RCONST(3.0)/RCONST(4.0); - // Mp->b[2] = -RCONST(1.0)/RCONST(24.0); - // Mp->A[1][0] = Mp->b[0]; - // Mp->A[2][0] = Mp->b[0]; - // Mp->A[2][1] = Mp->b[1]; - // Mp->c[0] = Mp->b[0]; - // Mp->c[1] = Mp->b[0] + Mp->b[1]; - // Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; - // Mp->q = 3; - // Mp->p = 0; - - Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); + Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = RCONST(1.0); - Mq->A[0][0] = RCONST(1.0); - Mq->c[0] = RCONST(1.0); - Mq->q = 1; + Mq->b[0] = RCONST(2.0)/RCONST(3.0); + Mq->b[1] = -RCONST(2.0)/RCONST(3.0); + Mq->b[2] = RCONST(1.0); + Mq->A[0][0] = Mq->b[0]; + Mq->A[1][0] = Mq->b[0]; + Mq->A[1][1] = Mq->b[1]; + Mq->A[2][0] = Mq->b[0]; + Mq->A[2][1] = Mq->b[1]; + Mq->A[2][2] = Mq->b[2]; + Mq->c[0] = Mq->b[0]; + Mq->c[1] = Mq->b[0] + Mq->b[1]; + Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; + Mq->q = 3; Mq->p = 0; - Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); + Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = RCONST(1.0); - Mp->A[0][0] = RCONST(0.0); - Mp->c[0] = RCONST(0.0); - Mp->q = 1; + Mp->b[0] = RCONST(7.0)/RCONST(24.0); + Mp->b[1] = RCONST(3.0)/RCONST(4.0); + Mp->b[2] = -RCONST(1.0)/RCONST(24.0); + Mp->A[1][0] = Mp->b[0]; + Mp->A[2][0] = Mp->b[0]; + Mp->A[2][1] = Mp->b[1]; + Mp->c[0] = Mp->b[0]; + Mp->c[1] = Mp->b[0] + Mp->b[1]; + Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; + Mp->q = 3; Mp->p = 0; + // Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); + // if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + // Mq->b[0] = RCONST(1.0); + // Mq->A[0][0] = RCONST(1.0); + // Mq->c[0] = RCONST(1.0); + // Mq->q = 1; + // Mq->p = 0; + + // Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); + // if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; + // Mp->b[0] = RCONST(1.0); + // Mp->A[0][0] = RCONST(0.0); + // Mp->c[0] = RCONST(0.0); + // Mp->q = 1; + // Mp->p = 0; + retval = ARKStepSetTables(arkode_mem, 1, 0, Mq, Mp); if (check_retval(&retval, "ARKStepSetTables", 1)) return 1; @@ -176,7 +177,7 @@ int main(int argc, char* argv[]) retval = ARKStepSetUserData(arkode_mem, (void *) udata); if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); + retval = ARKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; if (fixed_step_mode) { @@ -189,10 +190,12 @@ int main(int argc, char* argv[]) tret = T0; tout = T0+dTout; - fprintf(stdout, "t = %.2f, H(p, q) = %.16f, L(p, q) = %.16f\n", tret, Hamiltonian(y), AngularMomentum(y)); + H0 = Hamiltonian(y); + L0 = AngularMomentum(y); + fprintf(stdout, "t = %.2f, H(p, q) = %.16f, L(p, q) = %.16f\n", tret, H0, L0); for (iout = 0; iout < num_output_times; iout++) { retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - fprintf(stdout, "t = %.2f, H(p, q) = %.16f, L(p, q) = %.16f\n", tret, Hamiltonian(y), AngularMomentum(y)); + fprintf(stdout, "t = %.2f, H(p, q)-H0 = %.16f, L(p, q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); N_VPrint(y); if (retval >= 0) { /* successful solve: update time */ tout += dTout; @@ -231,13 +234,10 @@ sunrealtype Hamiltonian(N_Vector yvec) { sunrealtype H = 0.0; sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype q1 = y[0]; - const sunrealtype q2 = y[1]; - const sunrealtype p1 = y[2]; - const sunrealtype p2 = y[3]; - - H = SUN_RCONST(0.5) * (p1*p1 + p2*p2) - SUN_RCONST(1.0)/SUNRsqrt(q1*q1 + q2*q2) - - SUN_RCONST(0.005) / (SUN_RCONST(2.0) * SUNRpowerR(SUNRsqrt(q1*q1 + q2*q2), SUN_RCONST(3.0))); + const sunrealtype sqrt_q1q1_plus_q2q2 = SUNRsqrt(y[0]*y[0] + y[1]*y[1]); + const sunrealtype p1p1_plus_p2p2 = y[2]*y[2] + y[3]*y[3]; + H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2 + - SUN_RCONST(0.005) / SUN_RCONST(2.0) / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)); return H; } @@ -260,8 +260,8 @@ int dydt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { int retval = 0; - retval += dqdt(t, yvec, ydotvec, user_data); retval += dpdt(t, yvec, ydotvec, user_data); + retval += dqdt(t, yvec, ydotvec, user_data); return retval; } @@ -289,11 +289,12 @@ int dpdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) const sunrealtype delta = udata->delta; const sunrealtype q1 = y[0]; const sunrealtype q2 = y[1]; + const sunrealtype q1q1_plus_q2q2 = q1*q1 + q2*q2; - ydot[2] = -q1 / SUNRpowerR(q1*q1 + q2*q2, SUN_RCONST(3.0)/SUN_RCONST(2.0)) - -delta*q1 / SUNRpowerR(q1*q1 + q2*q2, SUN_RCONST(5.0)/SUN_RCONST(2.0)); - ydot[3] = -q2 / SUNRpowerR(q1*q1 + q2*q2, SUN_RCONST(3.0)/SUN_RCONST(2.0)) - -delta*q2 / SUNRpowerR(q1*q1 + q2*q2, SUN_RCONST(5.0)/SUN_RCONST(2.0)); + ydot[2] = -q1 / SUNRpowerR(q1q1_plus_q2q2, SUN_RCONST(3.0)/SUN_RCONST(2.0)) + -delta*q1 / SUNRpowerR(q1q1_plus_q2q2, SUN_RCONST(5.0)/SUN_RCONST(2.0)); + ydot[3] = -q2 / SUNRpowerR(q1q1_plus_q2q2, SUN_RCONST(3.0)/SUN_RCONST(2.0)) + -delta*q2 / SUNRpowerR(q1q1_plus_q2q2, SUN_RCONST(5.0)/SUN_RCONST(2.0)); // printf("dpdt(t=%g, q=[%g, %g]) = [%g, %g]\n", t, q1, q2, ydot[2], ydot[3]); From 49ccfffbc1b163b12087bbd9e7c5220cb4414ea3 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Wed, 20 Jul 2022 12:54:27 -0700 Subject: [PATCH 004/177] code working, plot is as it should be --- examples/arkode/C_serial/ark_kepler.c | 161 ++++++++++++------ examples/arkode/C_serial/ark_kepler_plot.py | 54 ++++++ .../arkode/C_serial/ark_kepler_plot_all.py | 65 +++++++ src/arkode/arkode_arkstep.c | 62 ++++--- 4 files changed, 262 insertions(+), 80 deletions(-) create mode 100644 examples/arkode/C_serial/ark_kepler_plot.py create mode 100644 examples/arkode/C_serial/ark_kepler_plot_all.py diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 4dcee32708..1edcf88c3d 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -22,10 +22,10 @@ * where e = 0.6 is the eccentricity. * * The Hamiltonian for the system, - * H(p, q) = 1/2 * (p1^2 + p2^2) - 1/sqrt(q1^2 + q2^2) + * H(p,q) = 1/2 * (p1^2 + p2^2) - 1/sqrt(q1^2 + q2^2) * - 1/200 / (2 * sqrt(q1^2 + q2^2)^3)) * is conserved as well as the angular momentum, - * L(p, q) = q1*p2 - q2*p1. + * L(p,q) = q1*p2 - q2*p1. * * We solve the problem by letting y = [ q, p ]^T then using * ARKStep. @@ -69,23 +69,25 @@ int main(int argc, char* argv[]) UserData udata; sunrealtype tout, tret; sunrealtype H0, L0; - ARKodeButcherTable Mp, Mq; + ARKodeButcherTable Mp = NULL, Mq = NULL; void* arkode_mem; + FILE *conserved_fp, *solution_fp, *times_fp; int argi, iout, retval; /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(200.0); - // sunrealtype Tf = SUN_RCONST(4000.0); - const sunrealtype dt = SUN_RCONST(1e-4); + // sunrealtype Tf = SUN_RCONST(0.3); + sunrealtype Tf = SUN_RCONST(6000.0); + const sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); - const sunrealtype delta = SUN_RCONST(0.015); + // const sunrealtype delta = SUN_RCONST(0.015); + const sunrealtype delta = SUN_RCONST(0.0); // unperturbed /* Default integrator Options */ int fixed_step_mode = 1; int method = 1; - const sunrealtype dTout = SUN_RCONST(10.0); - // const sunrealtype dTout = SUN_RCONST(100.0); + // const sunrealtype dTout = SUN_RCONST(0.1); + const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); /* Parse CLI args */ @@ -116,61 +118,89 @@ int main(int argc, char* argv[]) if (method == 0) { arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); - /* Attach custom Butcher tables for 3rd order scheme [Candy, 1991] */ - Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); - if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = RCONST(2.0)/RCONST(3.0); - Mq->b[1] = -RCONST(2.0)/RCONST(3.0); - Mq->b[2] = RCONST(1.0); - Mq->A[0][0] = Mq->b[0]; - Mq->A[1][0] = Mq->b[0]; - Mq->A[1][1] = Mq->b[1]; - Mq->A[2][0] = Mq->b[0]; - Mq->A[2][1] = Mq->b[1]; - Mq->A[2][2] = Mq->b[2]; - Mq->c[0] = Mq->b[0]; - Mq->c[1] = Mq->b[0] + Mq->b[1]; - Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; - Mq->q = 3; - Mq->p = 0; + // /* Attach custom Butcher tables for 3rd order scheme [Candy, 1991] */ + // const int q = 3; + // Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); + // if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; + // Mp->b[0] = RCONST(2.0)/RCONST(3.0); + // Mp->b[1] = -RCONST(2.0)/RCONST(3.0); + // Mp->b[2] = RCONST(1.0); + // Mp->A[0][0] = Mp->b[0]; + // Mp->A[1][0] = Mp->b[0]; + // Mp->A[1][1] = Mp->b[1]; + // Mp->A[2][0] = Mp->b[0]; + // Mp->A[2][1] = Mp->b[1]; + // Mp->A[2][2] = Mp->b[2]; + // Mp->c[0] = Mp->b[0]; + // Mp->c[1] = Mp->b[0] + Mp->b[1]; + // Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; + // Mp->q = q; + // Mp->p = 0; + + // Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); + // if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + // Mq->b[0] = RCONST(7.0)/RCONST(24.0); + // Mq->b[1] = RCONST(3.0)/RCONST(4.0); + // Mq->b[2] = -RCONST(1.0)/RCONST(24.0); + // Mq->A[1][0] = Mq->b[0]; + // Mq->A[2][0] = Mq->b[0]; + // Mq->A[2][1] = Mq->b[1]; + // Mq->c[0] = Mq->b[0]; + // Mq->c[1] = Mq->b[0] + Mq->b[1]; + // Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; + // Mq->q = q; + // Mq->p = 0; - Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); + const int q = 2; + Mp = ARKodeButcherTable_Alloc(2, SUNTRUE); if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = RCONST(7.0)/RCONST(24.0); - Mp->b[1] = RCONST(3.0)/RCONST(4.0); - Mp->b[2] = -RCONST(1.0)/RCONST(24.0); - Mp->A[1][0] = Mp->b[0]; - Mp->A[2][0] = Mp->b[0]; - Mp->A[2][1] = Mp->b[1]; - Mp->c[0] = Mp->b[0]; - Mp->c[1] = Mp->b[0] + Mp->b[1]; - Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; - Mp->q = 3; + Mp->b[0] = RCONST(0.5); + Mp->b[1] = RCONST(0.5); + Mp->A[0][0] = RCONST(0.5); + Mp->A[1][0] = RCONST(0.5); + Mp->A[1][1] = RCONST(0.5); + Mp->c[0] = RCONST(0.5); + Mp->c[1] = RCONST(1.0); + Mp->q = q; Mp->p = 0; - // Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); - // if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - // Mq->b[0] = RCONST(1.0); - // Mq->A[0][0] = RCONST(1.0); - // Mq->c[0] = RCONST(1.0); - // Mq->q = 1; - // Mq->p = 0; + Mq = ARKodeButcherTable_Alloc(2, SUNTRUE); + if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + Mq->b[0] = RCONST(0.0); + Mq->b[1] = RCONST(1.0); + Mq->A[1][0] = RCONST(1.0); + Mq->c[0] = RCONST(0.0); + Mq->c[1] = RCONST(1.0); + Mq->q = q; + Mq->p = 0; + // const int q = 1; // Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); // if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; // Mp->b[0] = RCONST(1.0); - // Mp->A[0][0] = RCONST(0.0); - // Mp->c[0] = RCONST(0.0); - // Mp->q = 1; + // Mp->A[0][0] = RCONST(1.0); + // Mp->c[0] = RCONST(1.0); + // Mp->q = q; // Mp->p = 0; - retval = ARKStepSetTables(arkode_mem, 1, 0, Mq, Mp); + // Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); + // if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + // Mq->b[0] = RCONST(1.0); + // Mq->A[0][0] = RCONST(0.0); + // Mq->c[0] = RCONST(0.0); + // Mq->q = q; + // Mq->p = 0; + + retval = ARKStepSetTables(arkode_mem, q, 0, Mp, Mq); if (check_retval(&retval, "ARKStepSetTables", 1)) return 1; retval = ARKStepSetSeparableRhs(arkode_mem, SUNTRUE); if (check_retval(&retval, "ARKStepSetSeparableRhs", 1)) return 1; } else { arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); + + retval = ARKStepSetOrder(arkode_mem, 2); + if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; } /* Setup ARKStep */ @@ -188,15 +218,32 @@ int main(int argc, char* argv[]) if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } + /* Open output files */ + if (method == 0) { + conserved_fp = fopen("ark_kepler_conserved_sprk-2.txt", "w+"); + solution_fp = fopen("ark_kepler_solution_sprk-2.txt", "w+"); + times_fp = fopen("ark_kepler_times_sprk-2.txt", "w+"); + } else { + conserved_fp = fopen("ark_kepler_conserved_erk-2.txt", "w+"); + solution_fp = fopen("ark_kepler_solution_erk-2.txt", "w+"); + times_fp = fopen("ark_kepler_times_erk-2.txt", "w+"); + } + + /* Do integration */ tret = T0; tout = T0+dTout; H0 = Hamiltonian(y); L0 = AngularMomentum(y); - fprintf(stdout, "t = %.2f, H(p, q) = %.16f, L(p, q) = %.16f\n", tret, H0, L0); + fprintf(stdout, "t = %.2f, H(p,q) = %.16f, L(p,q) = %.16f\n", tret, H0, L0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); + N_VPrintFile(y, solution_fp); for (iout = 0; iout < num_output_times; iout++) { retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - fprintf(stdout, "t = %.2f, H(p, q)-H0 = %.16f, L(p, q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); - N_VPrint(y); + fprintf(stdout, "t = %.2f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); if (retval >= 0) { /* successful solve: update time */ tout += dTout; tout = (tout > Tf) ? Tf : tout; @@ -213,6 +260,9 @@ int main(int argc, char* argv[]) if (Mp) ARKodeButcherTable_Free(Mp); N_VDestroy(y); free(udata); + fclose(times_fp); + fclose(conserved_fp); + fclose(solution_fp); SUNContext_Free(&sunctx); return 0; @@ -236,8 +286,13 @@ sunrealtype Hamiltonian(N_Vector yvec) sunrealtype* y = N_VGetArrayPointer(yvec); const sunrealtype sqrt_q1q1_plus_q2q2 = SUNRsqrt(y[0]*y[0] + y[1]*y[1]); const sunrealtype p1p1_plus_p2p2 = y[2]*y[2] + y[3]*y[3]; - H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2 - - SUN_RCONST(0.005) / SUN_RCONST(2.0) / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)); + + // Perturbed + // H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2 + // - SUN_RCONST(0.005) / SUN_RCONST(2.0) / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)); + + // Unperturbed + H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2; return H; } diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py new file mode 100644 index 0000000000..4a1e3a7ffd --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +import numpy as np +import matplotlib.pyplot as plt + +def Hamiltonian(y): + q1 = y[0] + q2 = y[1] + p1 = y[2] + p2 = y[3] + + h = 0.5 * ( p1**2 + p2**2 ) - 1.0 / np.sqrt ( q1**2 + q2**2 ) \ + - 0.005 / ( np.sqrt ( q1**2 + q2**2 ) )**3 / 2.0 + + return h + +def AngularMomentum(y): + q1 = y[0] + q2 = y[1] + p1 = y[2] + p2 = y[3] + + L = q1*p2 - q2*p1 + + return L + + +t = np.loadtxt('ark_kepler_times.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution.txt', dtype=np.float64) +y = np.reshape(y, (y.shape[0]//4, 4)) + +plt.figure(dpi=200) +plt.plot(y[:,0], y[:,1]) +plt.savefig('ark_kepler_phase_plot.png') + +conserved = np.loadtxt('ark_kepler_conserved.txt', delimiter=',', dtype=np.float64) +energy = conserved[:,0] +energy_0 = Hamiltonian(y[0]) +L = conserved[:,1] +L_0 = AngularMomentum(y[0]) + +plt.figure(dpi=200) +plt.title('Error in Hamiltonian') +plt.plot(t, np.abs(energy-energy_0)) +plt.ylabel('| error |') +plt.xlabel('time') +plt.savefig('ark_kepler_energy.png') + +plt.figure(dpi=200) +plt.title('Error in Momentum') +plt.plot(t, np.abs(L-L_0)) +plt.ylabel('| error |') +plt.xlabel('time') +plt.savefig('ark_kepler_momentum.png') \ No newline at end of file diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_all.py new file mode 100644 index 0000000000..cea3e6d619 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_plot_all.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python + +import numpy as np +import matplotlib.pyplot as plt + +def Hamiltonian(y): + q1 = y[0] + q2 = y[1] + p1 = y[2] + p2 = y[3] + + h = 0.5 * ( p1**2 + p2**2 ) - 1.0 / np.sqrt ( q1**2 + q2**2 ) \ + - 0.005 / ( np.sqrt ( q1**2 + q2**2 ) )**3 / 2.0 + + return h + +def AngularMomentum(y): + q1 = y[0] + q2 = y[1] + p1 = y[2] + p2 = y[3] + + L = q1*p2 - q2*p1 + + return L + + +def load_results(case): + t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) + y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) + y = np.reshape(y, (y.shape[0]//4, 4)) + conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) + return t, y, conserved + + +t, y_erk_2, consv_erk_2 = load_results('_erk-2') +t, y_sprk_2, consv_sprk_2 = load_results('_sprk-2') + +plt.figure(dpi=200) +plt.plot(y_erk_2[:,0], y_erk_2[:,1]) +# plt.plot(y_sprk_2[:,0], y_sprk_2[:,1]) +plt.savefig('ark_kepler_phase_plot_compare.png') + +energy = np.array([consv_erk_2[:,0], consv_sprk_2[:,0]]) +energy_0 = np.array([Hamiltonian(y_erk_2[0]), Hamiltonian(y_sprk_2[0])]) +energy_diff = np.abs(energy.T - energy_0) +L = np.array([consv_erk_2[:,1], consv_sprk_2[:,1]]) +L_0 = np.array([AngularMomentum(y_erk_2[0]), AngularMomentum(y_sprk_2[0])]) +L_diff = np.abs(L.T - L_0) + +plt.figure(dpi=200) +plt.title('Error in Hamiltonian, h = 0.01') +plt.plot(t, energy_diff) +plt.ylabel('| error |') +plt.xlabel('t') +plt.legend({r'$O(h^2)$ ERK', r'$O(h^2)$ SPRK'}) +plt.savefig('ark_kepler_energy_compare.png') + +plt.figure(dpi=200) +plt.title('Error in Momentum, h = 0.01') +plt.plot(t, L_diff) +plt.ylabel('| error |') +plt.xlabel('t') +plt.legend({r'$O(h^2)$ ERK', r'$O(h^2)$ SPRK'}) +plt.savefig('ark_kepler_momentum_compare.png') \ No newline at end of file diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 2f5979dc5f..ccacb0946b 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1600,7 +1600,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) *nflagPtr = ARK_SUCCESS; /* call nonlinear solver setup if it exists */ - if (step_mem->NLS) + if (step_mem->NLS) { if ((step_mem->NLS)->ops->setup) { zcor0 = ark_mem->tempv3; N_VConst(ZERO, zcor0); /* set guess to all 0 (since using predictor-corrector form) */ @@ -1608,6 +1608,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) if (retval < 0) return(ARK_NLS_SETUP_FAIL); if (retval > 0) return(ARK_NLS_SETUP_RECVR); } + } /* loop over internal stages to the step */ for (is=0; isstages; is++) { @@ -1617,7 +1618,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* determine whether implicit solve is required */ implicit_stage = SUNFALSE; - if (step_mem->implicit) + if (step_mem->implicit && !step_mem->separable_rhs) if (SUNRabs(step_mem->Bi->A[is][is]) > TINY) implicit_stage = SUNTRUE; @@ -1648,20 +1649,18 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* if implicit, call built-in and user-supplied predictors (results placed in zpred) */ if (implicit_stage) { - retval = arkStep_Predict(ark_mem, is, step_mem->zpred); if (retval != ARK_SUCCESS) return (retval); /* if a user-supplied predictor routine is provided, call that here. - Note that arkStep_Predict is *still* called, so this user-supplied - routine can just 'clean up' the built-in prediction, if desired. */ + Note that arkStep_Predict is *still* called, so this user-supplied + routine can just 'clean up' the built-in prediction, if desired. */ if (step_mem->stage_predict) { retval = step_mem->stage_predict(ark_mem->tcur, step_mem->zpred, - ark_mem->user_data); + ark_mem->user_data); if (retval < 0) return(ARK_USER_PREDICT_FAIL); if (retval > 0) return(TRY_AGAIN); } - } #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG @@ -1688,7 +1687,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) ark_mem->nst, ark_mem->h, is, ark_mem->tcur); /* perform implicit solve if required */ - if (implicit_stage && !step_mem->separable_rhs) { + if (implicit_stage) { /* implicit solve result is stored in ark_mem->ycur; return with positive value on anything but success */ @@ -1743,7 +1742,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) if (!deduce_stage) { retval = arkStep_Fi(step_mem, ark_mem->tcur, ark_mem->ycur, - step_mem->Fi[is], ark_mem->user_data); + step_mem->Fi[is], ark_mem->user_data); } else if (step_mem->mass_type == MASS_FIXED) { retval = step_mem->mmult((void *) ark_mem, step_mem->zcor, ark_mem->tempv1); if (retval != ARK_SUCCESS) return (ARK_MASSMULT_FAIL); @@ -1776,7 +1775,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* store explicit RHS */ if (step_mem->explicit) { retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, - ark_mem->ycur, step_mem->Fe[is], ark_mem->user_data); + ark_mem->ycur, step_mem->Fe[is], ark_mem->user_data); #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, @@ -1877,52 +1876,61 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* store current stage index */ step_mem->istage = is; + N_Vector yn = is == 0 ? ark_mem->yn : ark_mem->ycur; + /* set current stage time(s) */ if (step_mem->implicit) ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; else ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; - /* evaluate Fi so we can compute implicit stage */ - retval = arkStep_Fi(step_mem, ark_mem->tcur, ark_mem->ycur, + /* evaluate Fi at the previous stage value */ + // printf("yn =\n"); N_VPrint(yn); + retval = arkStep_Fi(step_mem, ark_mem->tcur, yn, step_mem->Fi[is], ark_mem->user_data); - /* update implicit stage */ + /* update the implicit stage */ nvec = 0; for (js=0; js<=is; js++) { - cvals[nvec] = ark_mem->h * step_mem->Bi->A[is][js]; + // cvals[nvec] = ark_mem->h * step_mem->Bi->A[is][js]; + cvals[nvec] = ark_mem->h * step_mem->Bi->b[js]; Xvecs[nvec] = step_mem->Fi[js]; nvec += 1; } - /* call fused vector operation to do the work */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); + /* tempv1 = h*A_{ij}^I*f^I(tcur^I, y_n) */ + retval = N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->tempv1); if (retval != 0) return(ARK_VECTOROP_ERR); - /* compute ycur at before evaluating explicit RHS */ - N_VLinearSum(ONE, ark_mem->yn, ONE, step_mem->sdata, ark_mem->ycur); + /* compute ycur before evaluating explicit RHS */ + N_VLinearSum(ONE, ark_mem->yn, ONE, ark_mem->tempv1, ark_mem->ycur); + // printf("P_i =\n"); N_VPrint(ark_mem->ycur); if (retval != 0) return(ARK_VECTOROP_ERR); - /* evaluate Fe so we can compute explicit stage */ - retval = arkStep_Fe(step_mem, ark_mem->tcur, ark_mem->ycur, - step_mem->Fe[is], ark_mem->user_data); + /* evaluate Fe with the current stage value */ + retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, + ark_mem->ycur, step_mem->Fe[is], ark_mem->user_data); + /* update the explicit stage */ nvec = 0; for (js=0; js<=is; js++) { - cvals[nvec] = ark_mem->h * step_mem->Be->A[is][js]; + // cvals[nvec] = ark_mem->h * step_mem->Be->A[is][js]; + cvals[nvec] = ark_mem->h * step_mem->Be->b[js]; Xvecs[nvec] = step_mem->Fe[js]; nvec += 1; } - /* call fused vector operation to do the work */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); + /* tempv2 = h*A_{ij}^E*f^E(tcur^E, ycur) */ + retval = N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->tempv2); + // printf("Q_i =\n"); N_VPrint(ark_mem->tempv2); if (retval != 0) return(ARK_VECTOROP_ERR); - /* update state before finishing stage */ - N_VLinearSum(ONE, ark_mem->yn, ONE, step_mem->sdata, ark_mem->ycur); + /* update ycur before finishing stage */ + N_VLinearSum(ONE, ark_mem->ycur, ONE, ark_mem->tempv2, ark_mem->ycur); + // printf("ycur =\n"); N_VPrint(ark_mem->ycur); if (retval != 0) return(ARK_VECTOROP_ERR); } *nflagPtr = 0; - arkStep_ComputeSolutions(arkode_mem, dsmPtr); + *dsmPtr = 0; return 0; } From cc5fc3cb09602cc66d016d0a7b88cc34b21f3f26 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Wed, 20 Jul 2022 13:51:11 -0700 Subject: [PATCH 005/177] some upgrades to plotting and example --- examples/arkode/C_serial/ark_kepler.c | 185 ++++++++++-------- examples/arkode/C_serial/ark_kepler_plot.py | 6 +- .../arkode/C_serial/ark_kepler_plot_all.py | 71 +++++-- 3 files changed, 159 insertions(+), 103 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 1edcf88c3d..7d55a85a6b 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -77,7 +77,7 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); // sunrealtype Tf = SUN_RCONST(0.3); - sunrealtype Tf = SUN_RCONST(6000.0); + sunrealtype Tf = SUN_RCONST(10000.0); const sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); // const sunrealtype delta = SUN_RCONST(0.015); @@ -86,6 +86,7 @@ int main(int argc, char* argv[]) /* Default integrator Options */ int fixed_step_mode = 1; int method = 1; + int order = 2; // const sunrealtype dTout = SUN_RCONST(0.1); const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); @@ -98,6 +99,9 @@ int main(int argc, char* argv[]) if (argc > 2) { method = atoi(argv[++argi]); } + if (argc > 3) { + order = atoi(argv[++argi]); + } /* Allocate and fill udata structure */ udata = (UserData) malloc(sizeof(*udata)); @@ -118,80 +122,83 @@ int main(int argc, char* argv[]) if (method == 0) { arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); - // /* Attach custom Butcher tables for 3rd order scheme [Candy, 1991] */ - // const int q = 3; - // Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); - // if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - // Mp->b[0] = RCONST(2.0)/RCONST(3.0); - // Mp->b[1] = -RCONST(2.0)/RCONST(3.0); - // Mp->b[2] = RCONST(1.0); - // Mp->A[0][0] = Mp->b[0]; - // Mp->A[1][0] = Mp->b[0]; - // Mp->A[1][1] = Mp->b[1]; - // Mp->A[2][0] = Mp->b[0]; - // Mp->A[2][1] = Mp->b[1]; - // Mp->A[2][2] = Mp->b[2]; - // Mp->c[0] = Mp->b[0]; - // Mp->c[1] = Mp->b[0] + Mp->b[1]; - // Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; - // Mp->q = q; - // Mp->p = 0; - - // Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); - // if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - // Mq->b[0] = RCONST(7.0)/RCONST(24.0); - // Mq->b[1] = RCONST(3.0)/RCONST(4.0); - // Mq->b[2] = -RCONST(1.0)/RCONST(24.0); - // Mq->A[1][0] = Mq->b[0]; - // Mq->A[2][0] = Mq->b[0]; - // Mq->A[2][1] = Mq->b[1]; - // Mq->c[0] = Mq->b[0]; - // Mq->c[1] = Mq->b[0] + Mq->b[1]; - // Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; - // Mq->q = q; - // Mq->p = 0; - - const int q = 2; - Mp = ARKodeButcherTable_Alloc(2, SUNTRUE); - if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = RCONST(0.5); - Mp->b[1] = RCONST(0.5); - Mp->A[0][0] = RCONST(0.5); - Mp->A[1][0] = RCONST(0.5); - Mp->A[1][1] = RCONST(0.5); - Mp->c[0] = RCONST(0.5); - Mp->c[1] = RCONST(1.0); - Mp->q = q; - Mp->p = 0; - - Mq = ARKodeButcherTable_Alloc(2, SUNTRUE); - if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = RCONST(0.0); - Mq->b[1] = RCONST(1.0); - Mq->A[1][0] = RCONST(1.0); - Mq->c[0] = RCONST(0.0); - Mq->c[1] = RCONST(1.0); - Mq->q = q; - Mq->p = 0; - - // const int q = 1; - // Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); - // if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - // Mp->b[0] = RCONST(1.0); - // Mp->A[0][0] = RCONST(1.0); - // Mp->c[0] = RCONST(1.0); - // Mp->q = q; - // Mp->p = 0; - - // Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); - // if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - // Mq->b[0] = RCONST(1.0); - // Mq->A[0][0] = RCONST(0.0); - // Mq->c[0] = RCONST(0.0); - // Mq->q = q; - // Mq->p = 0; - - retval = ARKStepSetTables(arkode_mem, q, 0, Mp, Mq); + /* Attach custom Butcher tables for 3rd order scheme [Candy, 1991] */ + if (order == 3) { + Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); + if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; + Mp->b[0] = RCONST(2.0)/RCONST(3.0); + Mp->b[1] = -RCONST(2.0)/RCONST(3.0); + Mp->b[2] = RCONST(1.0); + Mp->A[0][0] = Mp->b[0]; + Mp->A[1][0] = Mp->b[0]; + Mp->A[1][1] = Mp->b[1]; + Mp->A[2][0] = Mp->b[0]; + Mp->A[2][1] = Mp->b[1]; + Mp->A[2][2] = Mp->b[2]; + Mp->c[0] = Mp->b[0]; + Mp->c[1] = Mp->b[0] + Mp->b[1]; + Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; + Mp->q = order; + Mp->p = 0; + + Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); + if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + Mq->b[0] = RCONST(7.0)/RCONST(24.0); + Mq->b[1] = RCONST(3.0)/RCONST(4.0); + Mq->b[2] = -RCONST(1.0)/RCONST(24.0); + Mq->A[1][0] = Mq->b[0]; + Mq->A[2][0] = Mq->b[0]; + Mq->A[2][1] = Mq->b[1]; + Mq->c[0] = Mq->b[0]; + Mq->c[1] = Mq->b[0] + Mq->b[1]; + Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; + Mq->q = order; + Mq->p = 0; + } + + if (order == 2) { + Mp = ARKodeButcherTable_Alloc(2, SUNTRUE); + if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; + Mp->b[0] = RCONST(0.5); + Mp->b[1] = RCONST(0.5); + Mp->A[0][0] = RCONST(0.5); + Mp->A[1][0] = RCONST(0.5); + Mp->A[1][1] = RCONST(0.5); + Mp->c[0] = RCONST(0.5); + Mp->c[1] = RCONST(1.0); + Mp->q = order; + Mp->p = 0; + + Mq = ARKodeButcherTable_Alloc(2, SUNTRUE); + if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + Mq->b[0] = RCONST(0.0); + Mq->b[1] = RCONST(1.0); + Mq->A[1][0] = RCONST(1.0); + Mq->c[0] = RCONST(0.0); + Mq->c[1] = RCONST(1.0); + Mq->q = order; + Mq->p = 0; + } + + if (order == 1) { + Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); + if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; + Mp->b[0] = RCONST(1.0); + Mp->A[0][0] = RCONST(1.0); + Mp->c[0] = RCONST(1.0); + Mp->q = order; + Mp->p = 0; + + Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); + if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + Mq->b[0] = RCONST(1.0); + Mq->A[0][0] = RCONST(0.0); + Mq->c[0] = RCONST(0.0); + Mq->q = order; + Mq->p = 0; + } + + retval = ARKStepSetTables(arkode_mem, order, 0, Mp, Mq); if (check_retval(&retval, "ARKStepSetTables", 1)) return 1; retval = ARKStepSetSeparableRhs(arkode_mem, SUNTRUE); @@ -199,7 +206,7 @@ int main(int argc, char* argv[]) } else { arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); - retval = ARKStepSetOrder(arkode_mem, 2); + retval = ARKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; } @@ -220,13 +227,27 @@ int main(int argc, char* argv[]) /* Open output files */ if (method == 0) { - conserved_fp = fopen("ark_kepler_conserved_sprk-2.txt", "w+"); - solution_fp = fopen("ark_kepler_solution_sprk-2.txt", "w+"); - times_fp = fopen("ark_kepler_times_sprk-2.txt", "w+"); + const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; + const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; + const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; + char fname[64]; + sprintf(fname, fmt1, order); + conserved_fp = fopen(fname, "w+"); + sprintf(fname, fmt2, order); + solution_fp = fopen(fname, "w+"); + sprintf(fname, fmt3, order); + times_fp = fopen(fname, "w+"); } else { - conserved_fp = fopen("ark_kepler_conserved_erk-2.txt", "w+"); - solution_fp = fopen("ark_kepler_solution_erk-2.txt", "w+"); - times_fp = fopen("ark_kepler_times_erk-2.txt", "w+"); + const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; + const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; + const char* fmt3 = "ark_kepler_times_erk-%d.txt"; + char fname[64]; + sprintf(fname, fmt1, order); + conserved_fp = fopen(fname, "w+"); + sprintf(fname, fmt2, order); + solution_fp = fopen(fname, "w+"); + sprintf(fname, fmt3, order); + times_fp = fopen(fname, "w+"); } /* Do integration */ diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index 4a1e3a7ffd..594c310716 100644 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -25,15 +25,15 @@ def AngularMomentum(y): return L -t = np.loadtxt('ark_kepler_times.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_sprk-2.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_sprk-2.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) plt.plot(y[:,0], y[:,1]) plt.savefig('ark_kepler_phase_plot.png') -conserved = np.loadtxt('ark_kepler_conserved.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_sprk-2.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = Hamiltonian(y[0]) L = conserved[:,1] diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_all.py index cea3e6d619..2ea8f95a56 100644 --- a/examples/arkode/C_serial/ark_kepler_plot_all.py +++ b/examples/arkode/C_serial/ark_kepler_plot_all.py @@ -14,7 +14,7 @@ def Hamiltonian(y): return h -def AngularMomentum(y): +def Momentum(y): q1 = y[0] q2 = y[1] p1 = y[2] @@ -33,33 +33,68 @@ def load_results(case): return t, y, conserved +t, y_sprk_1, consv_sprk_1 = load_results('_sprk-1') t, y_erk_2, consv_erk_2 = load_results('_erk-2') t, y_sprk_2, consv_sprk_2 = load_results('_sprk-2') +t, y_erk_3, consv_erk_3 = load_results('_erk-3') +t, y_sprk_3, consv_sprk_3 = load_results('_sprk-3') +t, y_erk_4, consv_erk_4 = load_results('_erk-4') -plt.figure(dpi=200) -plt.plot(y_erk_2[:,0], y_erk_2[:,1]) -# plt.plot(y_sprk_2[:,0], y_sprk_2[:,1]) -plt.savefig('ark_kepler_phase_plot_compare.png') +h = 0.01 +trend_line_erk_2 = t*h*h + +energy = [] +energy.append(consv_sprk_1[:,0]) +energy.append(consv_erk_2[:,0]) +# energy.append(trend_line_erk_2) +energy.append(consv_sprk_2[:,0]) +energy.append(consv_erk_3[:,0]) +energy.append(consv_sprk_3[:,0]) +energy.append(consv_erk_4[:,0]) +energy = np.array(energy) + +energy_0 = [] +energy_0.append(Hamiltonian(y_sprk_1[0])) +energy_0.append(Hamiltonian(y_erk_2[0])) +# energy_0.append(0.0) +energy_0.append(Hamiltonian(y_sprk_2[0])) +energy_0.append(Hamiltonian(y_erk_3[0])) +energy_0.append(Hamiltonian(y_sprk_3[0])) +energy_0.append(Hamiltonian(y_erk_4[0])) +energy_0 = np.array(energy_0) -energy = np.array([consv_erk_2[:,0], consv_sprk_2[:,0]]) -energy_0 = np.array([Hamiltonian(y_erk_2[0]), Hamiltonian(y_sprk_2[0])]) energy_diff = np.abs(energy.T - energy_0) -L = np.array([consv_erk_2[:,1], consv_sprk_2[:,1]]) -L_0 = np.array([AngularMomentum(y_erk_2[0]), AngularMomentum(y_sprk_2[0])]) -L_diff = np.abs(L.T - L_0) + +# L = np.array([consv_sprk_1[:,1], +# consv_erk_2[:,1], consv_sprk_2[:,1], +# consv_erk_3[:,1], consv_sprk_3[:,1], +# consv_erk_4[:,1]]) +# L_0 = np.array([ +# Momentum(y_sprk_1[0]), +# Momentum(y_erk_2[0]), Momentum(y_sprk_2[0]), +# Momentum(y_erk_3[0]), Momentum(y_sprk_3[0]), +# Momentum(y_erk_4[0]) +# ]) +# L_diff = np.abs(L.T - L_0) plt.figure(dpi=200) plt.title('Error in Hamiltonian, h = 0.01') plt.plot(t, energy_diff) plt.ylabel('| error |') plt.xlabel('t') -plt.legend({r'$O(h^2)$ ERK', r'$O(h^2)$ SPRK'}) +plt.legend([r'$O(h^1)$ SPRK', + r'$O(h^2)$ ERK', r'$O(h^2)$ SPRK', + r'$O(h^3)$ ERK', r'$O(h^3)$ SPRK', + r'$O(h^4)$ ERK']) plt.savefig('ark_kepler_energy_compare.png') -plt.figure(dpi=200) -plt.title('Error in Momentum, h = 0.01') -plt.plot(t, L_diff) -plt.ylabel('| error |') -plt.xlabel('t') -plt.legend({r'$O(h^2)$ ERK', r'$O(h^2)$ SPRK'}) -plt.savefig('ark_kepler_momentum_compare.png') \ No newline at end of file +# plt.figure(dpi=200) +# plt.title('Error in Momentum, h = 0.01') +# plt.plot(t, L_diff) +# plt.ylabel('| error |') +# plt.xlabel('t') +# plt.legend({r'$O(h^1)$ SPRK', +# r'$O(h^2)$ ERK', r'$O(h^2)$ SPRK', +# r'$O(h^3)$ ERK', r'$O(h^3)$ SPRK', +# r'$O(h^4)$ ERK'}) +# plt.savefig('ark_kepler_momentum_compare.png') \ No newline at end of file From bc6110402ec641ab1e190b517c601830582a5a21 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Fri, 22 Jul 2022 09:16:31 -0700 Subject: [PATCH 006/177] switch to one step mode to avoid interpolation --- examples/arkode/C_serial/ark_kepler.c | 38 ++++++---- examples/arkode/C_serial/ark_kepler_plot.py | 64 +++++++++------- .../arkode/C_serial/ark_kepler_plot_all.py | 76 ++++++++++++------- src/arkode/arkode.c | 3 +- src/arkode/arkode_arkstep.c | 16 ++-- 5 files changed, 116 insertions(+), 81 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 7d55a85a6b..3e26a34c85 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -80,8 +80,8 @@ int main(int argc, char* argv[]) sunrealtype Tf = SUN_RCONST(10000.0); const sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); - // const sunrealtype delta = SUN_RCONST(0.015); - const sunrealtype delta = SUN_RCONST(0.0); // unperturbed + const sunrealtype delta = SUN_RCONST(0.015); + // const sunrealtype delta = SUN_RCONST(0.0); // unperturbed /* Default integrator Options */ int fixed_step_mode = 1; @@ -89,6 +89,7 @@ int main(int argc, char* argv[]) int order = 2; // const sunrealtype dTout = SUN_RCONST(0.1); const sunrealtype dTout = SUN_RCONST(100.0); + const int num_of_steps = (int) ceil(dTout/dt); const int num_output_times = (int) ceil(Tf/dTout); /* Parse CLI args */ @@ -221,7 +222,7 @@ int main(int argc, char* argv[]) retval = ARKStepSetFixedStep(arkode_mem, dt); if (check_retval(&retval, "ARKStepSetFixedStep", 1)) return 1; } else { - retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-6), SUN_RCONST(10e-12)); + retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } @@ -255,13 +256,16 @@ int main(int argc, char* argv[]) tout = T0+dTout; H0 = Hamiltonian(y); L0 = AngularMomentum(y); - fprintf(stdout, "t = %.2f, H(p,q) = %.16f, L(p,q) = %.16f\n", tret, H0, L0); + fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f\n", tret, H0, L0); fprintf(times_fp, "%.16f\n", tret); fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); N_VPrintFile(y, solution_fp); for (iout = 0; iout < num_output_times; iout++) { - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - fprintf(stdout, "t = %.2f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); + for (int nst = 0; nst < num_of_steps; nst++) { + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (retval < 0) break; + } + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); fprintf(times_fp, "%.16f\n", tret); fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); N_VPrintFile(y, solution_fp); @@ -309,11 +313,11 @@ sunrealtype Hamiltonian(N_Vector yvec) const sunrealtype p1p1_plus_p2p2 = y[2]*y[2] + y[3]*y[3]; // Perturbed - // H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2 - // - SUN_RCONST(0.005) / SUN_RCONST(2.0) / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)); + H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2 + - SUN_RCONST(0.005) / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) / SUN_RCONST(2.0); // Unperturbed - H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2; + // H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2; return H; } @@ -327,6 +331,8 @@ sunrealtype AngularMomentum(N_Vector yvec) const sunrealtype p1 = y[2]; const sunrealtype p2 = y[3]; + // printf("[%.8f %.8f %.8f %.8f]\n", y[0], y[1], y[2], y[3]); + L = q1*p2 - q2*p1; return L; @@ -352,7 +358,7 @@ int dqdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) ydot[0] = p1; ydot[1] = p2; - // printf("dqdt(t=%g, p=[%g, %g]) = [%g, %g]\n", t, p1, p2, ydot[0], ydot[1]); + // printf("dqdt(p=[%.16f, %.16f]) = [%.16f, %.16f]\n", p1, p2, ydot[0], ydot[1]); return 0; } @@ -365,14 +371,14 @@ int dpdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) const sunrealtype delta = udata->delta; const sunrealtype q1 = y[0]; const sunrealtype q2 = y[1]; - const sunrealtype q1q1_plus_q2q2 = q1*q1 + q2*q2; + const sunrealtype sqrt_q1q1_plus_q2q2 = SUNRsqrt(q1*q1 + q2*q2); - ydot[2] = -q1 / SUNRpowerR(q1q1_plus_q2q2, SUN_RCONST(3.0)/SUN_RCONST(2.0)) - -delta*q1 / SUNRpowerR(q1q1_plus_q2q2, SUN_RCONST(5.0)/SUN_RCONST(2.0)); - ydot[3] = -q2 / SUNRpowerR(q1q1_plus_q2q2, SUN_RCONST(3.0)/SUN_RCONST(2.0)) - -delta*q2 / SUNRpowerR(q1q1_plus_q2q2, SUN_RCONST(5.0)/SUN_RCONST(2.0)); + ydot[2] = - q1 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) + - delta * q1 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(5.0)); + ydot[3] = - q2 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) + - delta * q2 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(5.0)); - // printf("dpdt(t=%g, q=[%g, %g]) = [%g, %g]\n", t, q1, q2, ydot[2], ydot[3]); + // printf("dpdt(q=[%.16f, %.16f]) = [%.16f, %.16f]\n", q1, q2, ydot[2], ydot[3]); return 0; } diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index 594c310716..85610298c3 100644 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -3,41 +3,19 @@ import numpy as np import matplotlib.pyplot as plt -def Hamiltonian(y): - q1 = y[0] - q2 = y[1] - p1 = y[2] - p2 = y[3] - - h = 0.5 * ( p1**2 + p2**2 ) - 1.0 / np.sqrt ( q1**2 + q2**2 ) \ - - 0.005 / ( np.sqrt ( q1**2 + q2**2 ) )**3 / 2.0 - - return h - -def AngularMomentum(y): - q1 = y[0] - q2 = y[1] - p1 = y[2] - p2 = y[3] - - L = q1*p2 - q2*p1 - - return L - - -t = np.loadtxt('ark_kepler_times_sprk-2.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_sprk-2.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_sprk-1.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_sprk-1.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) plt.plot(y[:,0], y[:,1]) plt.savefig('ark_kepler_phase_plot.png') -conserved = np.loadtxt('ark_kepler_conserved_sprk-2.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_sprk-1.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] -energy_0 = Hamiltonian(y[0]) +energy_0 = conserved[0,0] L = conserved[:,1] -L_0 = AngularMomentum(y[0]) +L_0 = conserved[0,1] plt.figure(dpi=200) plt.title('Error in Hamiltonian') @@ -45,10 +23,40 @@ def AngularMomentum(y): plt.ylabel('| error |') plt.xlabel('time') plt.savefig('ark_kepler_energy.png') +plt.close() plt.figure(dpi=200) plt.title('Error in Momentum') plt.plot(t, np.abs(L-L_0)) plt.ylabel('| error |') plt.xlabel('time') -plt.savefig('ark_kepler_momentum.png') \ No newline at end of file +plt.savefig('ark_kepler_momentum.png') +plt.close() + +# +# Time plot. +# +plt.figure(dpi=200) +plt.plot(t, y[:,0], linewidth = 2) +plt.plot(t, y[:,1], linewidth = 2) +plt.plot(t, y[:,2], linewidth = 2) +plt.plot(t, y[:,3], linewidth = 2) +plt.grid(True) +plt.xlabel('<--- t --->') +plt.ylabel('<--- y(1:4) --->') +plt.title('ark_kepler: Time Plot') +plt.savefig('ark_kepler_plot.png') +plt.close() + +# +# Phase plot. +# +plt.figure(dpi=200) +plt.plot(y[:,0], y[:,1], linewidth = 2) +plt.grid(True) +plt.xlabel('<--- y1 --->') +plt.ylabel('<--- y2 --->') +plt.title('ark_kepler: Phase Plot') +plt.savefig('ark_kepler_phase.png') +plt.show(block = False) +plt.close() \ No newline at end of file diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_all.py index 2ea8f95a56..31ac223066 100644 --- a/examples/arkode/C_serial/ark_kepler_plot_all.py +++ b/examples/arkode/C_serial/ark_kepler_plot_all.py @@ -50,7 +50,7 @@ def load_results(case): energy.append(consv_sprk_2[:,0]) energy.append(consv_erk_3[:,0]) energy.append(consv_sprk_3[:,0]) -energy.append(consv_erk_4[:,0]) +# energy.append(consv_erk_4[:,0]) energy = np.array(energy) energy_0 = [] @@ -60,41 +60,59 @@ def load_results(case): energy_0.append(Hamiltonian(y_sprk_2[0])) energy_0.append(Hamiltonian(y_erk_3[0])) energy_0.append(Hamiltonian(y_sprk_3[0])) -energy_0.append(Hamiltonian(y_erk_4[0])) +# energy_0.append(Hamiltonian(y_erk_4[0])) energy_0 = np.array(energy_0) energy_diff = np.abs(energy.T - energy_0) - -# L = np.array([consv_sprk_1[:,1], -# consv_erk_2[:,1], consv_sprk_2[:,1], -# consv_erk_3[:,1], consv_sprk_3[:,1], -# consv_erk_4[:,1]]) -# L_0 = np.array([ -# Momentum(y_sprk_1[0]), -# Momentum(y_erk_2[0]), Momentum(y_sprk_2[0]), -# Momentum(y_erk_3[0]), Momentum(y_sprk_3[0]), -# Momentum(y_erk_4[0]) -# ]) -# L_diff = np.abs(L.T - L_0) - plt.figure(dpi=200) plt.title('Error in Hamiltonian, h = 0.01') plt.plot(t, energy_diff) plt.ylabel('| error |') plt.xlabel('t') -plt.legend([r'$O(h^1)$ SPRK', - r'$O(h^2)$ ERK', r'$O(h^2)$ SPRK', - r'$O(h^3)$ ERK', r'$O(h^3)$ SPRK', - r'$O(h^4)$ ERK']) +plt.yscale('log') +legend = [] +legend.append(r'$O(h^1)$ SPRK') +legend.append(r'$O(h^2)$ ERK') +legend.append(r'$O(h^2)$ SPRK') +legend.append(r'$O(h^3)$ ERK') +legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^4)$ ERK') +plt.legend(legend) plt.savefig('ark_kepler_energy_compare.png') -# plt.figure(dpi=200) -# plt.title('Error in Momentum, h = 0.01') -# plt.plot(t, L_diff) -# plt.ylabel('| error |') -# plt.xlabel('t') -# plt.legend({r'$O(h^1)$ SPRK', -# r'$O(h^2)$ ERK', r'$O(h^2)$ SPRK', -# r'$O(h^3)$ ERK', r'$O(h^3)$ SPRK', -# r'$O(h^4)$ ERK'}) -# plt.savefig('ark_kepler_momentum_compare.png') \ No newline at end of file +L = [] +L.append(consv_sprk_1[:,1]) +L.append(consv_erk_2[:,1]) +# L.append(trend_line_erk_2) +L.append(consv_sprk_2[:,1]) +L.append(consv_erk_3[:,1]) +L.append(consv_sprk_3[:,1]) +# L.append(consv_erk_4[:,1]) +L = np.array(L) + +L_0 = [] +L_0.append(Momentum(y_sprk_1[1])) +L_0.append(Momentum(y_erk_2[1])) +# L_0.append(0.0) +L_0.append(Momentum(y_sprk_2[1])) +L_0.append(Momentum(y_erk_3[1])) +L_0.append(Momentum(y_sprk_3[1])) +# L_0.append(Momentum(y_erk_4[1])) +L_0 = np.array(L_0) + +L_diff = np.abs(L.T - L_0) +plt.figure(dpi=200) +plt.title('Error in Momentum, h = 0.01') +plt.plot(t, L_diff) +plt.ylabel('| error |') +plt.xlabel('t') +plt.yscale('log') +legend = [] +legend.append(r'$O(h^1)$ SPRK') +legend.append(r'$O(h^2)$ ERK') +legend.append(r'$O(h^2)$ SPRK') +legend.append(r'$O(h^3)$ ERK') +legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^4)$ ERK') +plt.legend(legend) +plt.savefig('ark_kepler_momentum_compare.png') \ No newline at end of file diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 9bcb2bbefd..989c5a5f12 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1016,6 +1016,8 @@ int arkGetDky(ARKodeMem ark_mem, realtype t, int k, N_Vector dky) realtype s, tfuzz, tp, tn1; int retval; + printf(">>> arkGetDky\n"); + /* Check all inputs for legality */ if (ark_mem == NULL) { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE", "arkGetDky", @@ -2390,7 +2392,6 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) /* call fullrhs if needed */ if (ark_mem->call_fullrhs) { mode = (ark_mem->ProcessStep != NULL) ? ARK_FULLRHS_START : ARK_FULLRHS_END; - // printf(">>> arkCompleteStep\n"); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tcur, ark_mem->ycur, ark_mem->fn, mode); if (retval != 0) return(ARK_RHSFUNC_FAIL); diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index ccacb0946b..41c02e052d 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1855,6 +1855,7 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) int retval, js, is, nvec; realtype* cvals; N_Vector* Xvecs; + N_Vector yn; /* access ARKodeARKStepMem structure */ retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_Sym", @@ -1876,14 +1877,15 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* store current stage index */ step_mem->istage = is; - N_Vector yn = is == 0 ? ark_mem->yn : ark_mem->ycur; - /* set current stage time(s) */ if (step_mem->implicit) ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; else ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; + /* shortcut to previous stage vector */ + yn = is == 0 ? ark_mem->yn : ark_mem->ycur; + /* evaluate Fi at the previous stage value */ // printf("yn =\n"); N_VPrint(yn); retval = arkStep_Fi(step_mem, ark_mem->tcur, yn, @@ -1898,11 +1900,11 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) nvec += 1; } /* tempv1 = h*A_{ij}^I*f^I(tcur^I, y_n) */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->tempv1); + retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); if (retval != 0) return(ARK_VECTOROP_ERR); /* compute ycur before evaluating explicit RHS */ - N_VLinearSum(ONE, ark_mem->yn, ONE, ark_mem->tempv1, ark_mem->ycur); + N_VLinearSum(ONE, ark_mem->yn, ONE, step_mem->sdata, ark_mem->ycur); // printf("P_i =\n"); N_VPrint(ark_mem->ycur); if (retval != 0) return(ARK_VECTOROP_ERR); @@ -1919,12 +1921,12 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) nvec += 1; } /* tempv2 = h*A_{ij}^E*f^E(tcur^E, ycur) */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->tempv2); - // printf("Q_i =\n"); N_VPrint(ark_mem->tempv2); + retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); + // printf("Q_i =\n"); N_VPrint(step_mem->sdata); if (retval != 0) return(ARK_VECTOROP_ERR); /* update ycur before finishing stage */ - N_VLinearSum(ONE, ark_mem->ycur, ONE, ark_mem->tempv2, ark_mem->ycur); + N_VLinearSum(ONE, ark_mem->ycur, ONE, step_mem->sdata, ark_mem->ycur); // printf("ycur =\n"); N_VPrint(ark_mem->ycur); if (retval != 0) return(ARK_VECTOROP_ERR); } From 3a25237b430f1d8475aa35c8106a315c7d0fc7fe Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Fri, 22 Jul 2022 14:01:53 -0700 Subject: [PATCH 007/177] add increment SPRK algorithm with compensated sums (works for sprk order 1, issue still for more than one stage) --- examples/arkode/C_serial/ark_kepler.c | 5 +- .../C_serial/ark_kepler_plot_sprk_impls.py | 124 +++++++++++++++++ src/arkode/arkode.c | 7 + src/arkode/arkode_arkstep.c | 128 ++++++++++++++++-- src/arkode/arkode_arkstep_impl.h | 3 +- src/arkode/arkode_impl.h | 1 + 6 files changed, 255 insertions(+), 13 deletions(-) create mode 100644 examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 3e26a34c85..a4ccff5166 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -77,7 +77,7 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); // sunrealtype Tf = SUN_RCONST(0.3); - sunrealtype Tf = SUN_RCONST(10000.0); + sunrealtype Tf = SUN_RCONST(100000.0); const sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); const sunrealtype delta = SUN_RCONST(0.015); @@ -231,6 +231,9 @@ int main(int argc, char* argv[]) const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; + // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; + // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; + // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; char fname[64]; sprintf(fname, fmt1, order); conserved_fp = fopen(fname, "w+"); diff --git a/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py b/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py new file mode 100644 index 0000000000..c101cc2296 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py @@ -0,0 +1,124 @@ +#!/usr/bin/env python + +import numpy as np +import matplotlib.pyplot as plt + +def Hamiltonian(y): + q1 = y[0] + q2 = y[1] + p1 = y[2] + p2 = y[3] + + h = 0.5 * ( p1**2 + p2**2 ) - 1.0 / np.sqrt ( q1**2 + q2**2 ) \ + - 0.005 / ( np.sqrt ( q1**2 + q2**2 ) )**3 / 2.0 + + return h + +def Momentum(y): + q1 = y[0] + q2 = y[1] + p1 = y[2] + p2 = y[3] + + L = q1*p2 - q2*p1 + + return L + + +def load_results(case): + t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) + y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) + y = np.reshape(y, (y.shape[0]//4, 4)) + conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) + return t, y, conserved + + +sprk1 = load_results('_sprk-1') +sprk2 = load_results('_sprk-2') +sprk3 = load_results('_sprk-3') +sprkinc1 = load_results('_sprkinc-1') +sprkinc2 = load_results('_sprkinc-2') +sprkinc3 = load_results('_sprkinc-3') + +all_to_compare = [] +all_to_compare.append(sprk1) +# all_to_compare.append(sprk2) +# all_to_compare.append(sprk3) +all_to_compare.append(sprkinc1) +# all_to_compare.append(sprkinc2) +# all_to_compare.append(sprkinc3) + +h = 0.01 +t = sprk1[0] +trend_line_erk_2 = t*h*h + +energy = [] +energy_0 = [] +for _, sol, consv in all_to_compare: + energy.append(consv[:,0]) + energy_0.append(Hamiltonian(sol[0])) +energy = np.array(energy) +energy_0 = np.array(energy_0) +energy_diff = np.abs(energy.T - energy_0) + +plt.figure(dpi=200) +plt.title('Error in Hamiltonian, h = %g' % h) +plt.plot(t, energy_diff) +plt.ylabel('| error |') +plt.xlabel('t') +plt.yscale('log') +legend = [] +legend.append(r'$O(h^1)$ SPRK') +# legend.append(r'$O(h^2)$ SPRK') +# legend.append(r'$O(h^3)$ SPRK') +legend.append(r'$O(h^1)$ SPRK (inc)') +# legend.append(r'$O(h^2)$ SPRK (inc)') +# legend.append(r'$O(h^3)$ SPRK (inc)') +plt.legend(legend) +plt.savefig('ark_kepler_energy_compare.png') + +momentum = [] +momentum_0 = [] +for _, sol, consv in all_to_compare: + momentum.append(consv[:,1]) + momentum_0.append(Momentum(sol[0])) +momentum = np.array(momentum) +momentum_0 = np.array(momentum_0) +momentum_diff = np.abs(momentum.T - momentum_0) + +plt.figure(dpi=200) +plt.title('Error in Momentum, h = %g' % h) +plt.plot(t, momentum_diff) +plt.ylabel('| error |') +plt.xlabel('t') +plt.yscale('log') +legend = [] +legend.append(r'$O(h^1)$ SPRK') +# legend.append(r'$O(h^2)$ SPRK') +# legend.append(r'$O(h^3)$ SPRK') +legend.append(r'$O(h^1)$ SPRK (inc)') +# legend.append(r'$O(h^2)$ SPRK (inc)') +# legend.append(r'$O(h^3)$ SPRK (inc)') +plt.legend(legend) +plt.savefig('ark_kepler_momentum_compare.png') + +_, sol1, _ = sprk1 +_, sol2, _ = sprkinc1 +phase_diff = np.abs(sol1 - sol2) +print(phase_diff) + +# plt.figure(dpi=200) +# plt.title('Error in Phase, h = %g' % h) +# plt.plot(t, momentum_diff) +# plt.ylabel('| error |') +# plt.xlabel('t') +# plt.yscale('log') +# legend = [] +# legend.append(r'$O(h^1)$ SPRK') +# # legend.append(r'$O(h^2)$ SPRK') +# # legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^1)$ SPRK (inc)') +# # legend.append(r'$O(h^2)$ SPRK (inc)') +# # legend.append(r'$O(h^3)$ SPRK (inc)') +# plt.legend(legend) +# plt.savefig('ark_kepler_phase_compare.png') \ No newline at end of file diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 989c5a5f12..72601ea1ec 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1659,6 +1659,10 @@ booleantype arkAllocVectors(ARKodeMem ark_mem, N_Vector tmpl) if (!arkAllocVec(ark_mem, tmpl, &ark_mem->yn)) return(SUNFALSE); + /* Allocate yerr if needed */ + if (!arkAllocVec(ark_mem, tmpl, &ark_mem->yerr)) + return(SUNFALSE); + /* Allocate fn if needed */ if (!arkAllocVec(ark_mem, tmpl, &ark_mem->fn)) return(SUNFALSE); @@ -1883,6 +1887,9 @@ int arkInitialSetup(ARKodeMem ark_mem, realtype tout) } } + /* Zero yerr for compensated summation */ + N_VConst(ZERO, ark_mem->yerr); + /* If necessary, temporarily set h as it is used to compute the tolerance in a potential mass matrix solve when computing the full rhs */ if (ark_mem->h == ZERO) ark_mem->h = ONE; diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 41c02e052d..9c3de14a7a 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -22,6 +22,8 @@ #include "arkode_impl.h" #include "arkode_arkstep_impl.h" #include "arkode_interp_impl.h" +#include "sundials/sundials_nvector.h" +#include "sundials/sundials_types.h" #include #include @@ -1215,7 +1217,8 @@ int arkStep_Init(void* arkode_mem, int init_type) /* set appropriate TakeStep routine based on problem configuration */ /* (only one choice for now) */ if (step_mem->separable_rhs) { - ark_mem->step = arkStep_TakeStep_Sym; + ark_mem->step = arkStep_TakeStep_SprkInc; + // ark_mem->step = arkStep_TakeStep_Sprk; } else { ark_mem->step = arkStep_TakeStep_Z; } @@ -1848,23 +1851,23 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return(ARK_SUCCESS); } -int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeARKStepMem step_mem; int retval, js, is, nvec; realtype* cvals; N_Vector* Xvecs; - N_Vector yn; + N_Vector Yi; /* access ARKodeARKStepMem structure */ - retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_Sym", + retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_Sprk", &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); if (!ark_mem->fixedstep) { arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", - "arkStep_TakeStep_Sym", "!!!! This TakeStep only works with fixed steps !!!!"); + "arkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); return(ARK_UNRECOGNIZED_ERROR); } @@ -1884,11 +1887,10 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; /* shortcut to previous stage vector */ - yn = is == 0 ? ark_mem->yn : ark_mem->ycur; + Yi = is == 0 ? ark_mem->yn : ark_mem->ycur; /* evaluate Fi at the previous stage value */ - // printf("yn =\n"); N_VPrint(yn); - retval = arkStep_Fi(step_mem, ark_mem->tcur, yn, + retval = arkStep_Fi(step_mem, ark_mem->tcur, Yi, step_mem->Fi[is], ark_mem->user_data); /* update the implicit stage */ @@ -1905,7 +1907,6 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* compute ycur before evaluating explicit RHS */ N_VLinearSum(ONE, ark_mem->yn, ONE, step_mem->sdata, ark_mem->ycur); - // printf("P_i =\n"); N_VPrint(ark_mem->ycur); if (retval != 0) return(ARK_VECTOROP_ERR); /* evaluate Fe with the current stage value */ @@ -1922,12 +1923,10 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) } /* tempv2 = h*A_{ij}^E*f^E(tcur^E, ycur) */ retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); - // printf("Q_i =\n"); N_VPrint(step_mem->sdata); if (retval != 0) return(ARK_VECTOROP_ERR); /* update ycur before finishing stage */ N_VLinearSum(ONE, ark_mem->ycur, ONE, step_mem->sdata, ark_mem->ycur); - // printf("ycur =\n"); N_VPrint(ark_mem->ycur); if (retval != 0) return(ARK_VECTOROP_ERR); } @@ -1937,6 +1936,113 @@ int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return 0; } +/* Increment SPRK algorithm with compensated summation */ +int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +{ + ARKodeMem ark_mem; + ARKodeARKStepMem step_mem; + int retval, js, is, nvec; + realtype* cvals; + N_Vector* Xvecs; + N_Vector delta_Yi, yn_plus_delta_Yi; + + /* access ARKodeARKStepMem structure */ + retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_Sprk", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + if (!ark_mem->fixedstep) { + arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", + "arkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); + return(ARK_UNRECOGNIZED_ERROR); + } + + /* local shortcuts for fused vector operations */ + cvals = step_mem->cvals; + Xvecs = step_mem->Xvecs; + + /* other shortcuts */ + delta_Yi = ark_mem->tempv1; + yn_plus_delta_Yi = ark_mem->tempv2; + + /* [ \Delta Q_0 ] = [ 0 ] + [ \Delta P_0 ] = [ 0 ] */ + N_VConst(ZERO, delta_Yi); + + /* loop over internal stages to the step */ + for (is=0; isstages; is++) { + /* store current stage index */ + step_mem->istage = is; + + /* set current stage time(s) */ + if (step_mem->implicit) + ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; + else + ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; + + /* [ q_n ] + [ \Delta Q_i ] + [ ] + [ ] */ + N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + + /* evaluate Fi with previous stage increment */ + retval = arkStep_Fi(step_mem, ark_mem->tcur, yn_plus_delta_Yi, + step_mem->Fi[is], ark_mem->user_data); + /* update the implicit stage */ + nvec = 0; + for (js=0; js<=is; js++) { + // cvals[nvec] = ark_mem->h * step_mem->Bi->A[is][js]; + cvals[nvec] = ark_mem->h * step_mem->Bi->b[js]; + Xvecs[nvec] = step_mem->Fi[js]; + nvec += 1; + } + /* h*A_{ij}^I*f^I(tcur^I, q_n + \Delta Q_i) */ + retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); + if (retval != 0) return(ARK_VECTOROP_ERR); + + /* [ ] = [ ] + [ ] + [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ + N_VLinearSum(ONE, delta_Yi, ONE, step_mem->sdata, delta_Yi); + + /* [ ] + [ ] + [ p_n ] + [ \Delta P_i ] */ + N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + + /* evaluate Fe with the current p_n + \Delta P_i */ + retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, + yn_plus_delta_Yi, step_mem->Fe[is], ark_mem->user_data); + /* update the explicit stage */ + nvec = 0; + for (js=0; js<=is; js++) { + // cvals[nvec] = ark_mem->h * step_mem->Be->A[is][js]; + cvals[nvec] = ark_mem->h * step_mem->Be->b[js]; + Xvecs[nvec] = step_mem->Fe[js]; + nvec += 1; + } + /* h*A_{ij}^E*f^E(tcur^E, p_n + \Delta P_i) */ + retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); + if (retval != 0) return(ARK_VECTOROP_ERR); + + /* [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] + [ ] = [ ] + [ ] */ + N_VLinearSum(ONE, delta_Yi, ONE, step_mem->sdata, delta_Yi); + } + + /* + Now we compute the step solution via compensated summation. + [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] + [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ + N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); + N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); + N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); + N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); + + *nflagPtr = 0; + *dsmPtr = 0; + + return 0; +} + + /*--------------------------------------------------------------- Internal utility routines ---------------------------------------------------------------*/ diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index 57d7a791fb..79e30f5b15 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -193,7 +193,8 @@ int arkStep_GetGammas(void* arkode_mem, realtype *gamma, int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode); int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); -int arkStep_TakeStep_Sym(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); /* Internal utility routines */ int arkStep_AccessStepMem(void* arkode_mem, const char *fname, diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index f099af8444..6008c87cfb 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -324,6 +324,7 @@ typedef struct ARKodeMemRec { as evolving solution by the timestepper modules */ N_Vector yn; /* solution from the last successful step */ N_Vector fn; /* full IVP right-hand side from last step */ + N_Vector yerr; /* error vector for compensated summation */ N_Vector tempv1; /* temporary storage vectors (for local use and by */ N_Vector tempv2; /* time-stepping modules) */ N_Vector tempv3; From f11581193fe5e62406fa722f7016b35bd042e5d5 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Fri, 22 Jul 2022 17:17:14 -0700 Subject: [PATCH 008/177] avoid dense output when we can --- examples/arkode/C_serial/ark_kepler.c | 9 +++++---- src/arkode/arkode.c | 23 ++++++++++++++++++----- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index a4ccff5166..760d3ce230 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -264,10 +264,11 @@ int main(int argc, char* argv[]) fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); N_VPrintFile(y, solution_fp); for (iout = 0; iout < num_output_times; iout++) { - for (int nst = 0; nst < num_of_steps; nst++) { - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - if (retval < 0) break; - } + // for (int nst = 0; nst < num_of_steps; nst++) { + // retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + // if (retval < 0) break; + // } + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); fprintf(times_fp, "%.16f\n", tret); fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 72601ea1ec..a6908afe16 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -952,7 +952,10 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, (ark_mem->tcur-tout)*ark_mem->h >= ZERO ) { istate = ARK_SUCCESS; ark_mem->tretlast = *tret = tout; - (void) arkGetDky(ark_mem, tout, 0, yout); + /* Only use dense output when we tcur is not within 10*eps of tout already.*/ + if (SUNRCompare(ark_mem->tcur-tout, ZERO)) { + (void) arkGetDky(ark_mem, tout, 0, yout); + } ark_mem->next_h = ark_mem->hprime; break; } @@ -1016,7 +1019,7 @@ int arkGetDky(ARKodeMem ark_mem, realtype t, int k, N_Vector dky) realtype s, tfuzz, tp, tn1; int retval; - printf(">>> arkGetDky\n"); + // printf(">>> arkGetDky t = %.16f, tcur = %.16f\n", t, ark_mem->tcur); /* Check all inputs for legality */ if (ark_mem == NULL) { @@ -1896,7 +1899,6 @@ int arkInitialSetup(ARKodeMem ark_mem, realtype tout) /* Call fullrhs (used in estimating initial step, explicit steppers, Hermite interpolation module, and possibly (but not always) arkRootCheck1) */ - // printf(">>> arkInitialSetup\n"); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tcur, ark_mem->yn, ark_mem->fn, ARK_FULLRHS_START); if (retval != 0) return(ARK_RHSFUNC_FAIL); @@ -2327,7 +2329,6 @@ int arkYddNorm(ARKodeMem ark_mem, realtype hg, realtype *yddnrm) N_VLinearSum(hg, ark_mem->fn, ONE, ark_mem->yn, ark_mem->ycur); /* compute y', via the ODE RHS routine */ - // printf(">>> arkYddNorm\n"); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tcur + hg, ark_mem->ycur, ark_mem->tempv1, ARK_FULLRHS_OTHER); if (retval != 0) return(ARK_RHSFUNC_FAIL); @@ -2344,6 +2345,15 @@ int arkYddNorm(ARKodeMem ark_mem, realtype hg, realtype *yddnrm) return(ARK_SUCCESS); } +inline static +void kahanSum(sunrealtype base, sunrealtype inc, sunrealtype *sum, sunrealtype *error) +{ + sunrealtype err = *error; + volatile sunrealtype tmp1 = inc - err; + volatile sunrealtype tmp2 = base + tmp1; + *error = (tmp2 - base) - tmp1; + *sum = tmp2; +} /*--------------------------------------------------------------- arkCompleteStep @@ -2362,12 +2372,15 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) int retval, mode; realtype troundoff; + /* Set current time to the end of the step (in case the last stage time does not coincide with the step solution time). If tstop is enabled, it is possible for tn + h to be past tstop by roundoff, and in that case, we reset tn (after incrementing by h) to tstop. */ - ark_mem->tcur = ark_mem->tn + ark_mem->h; + static realtype err = ZERO; /* TODO(CJB): Do we want to use this by default? It certainly helps based on my testing. */ + kahanSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &err); + // ark_mem->tcur = ark_mem->tn + ark_mem->h; if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR * ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); From 614b0279159dc3358cd2c60348e8f10e04750031 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Mon, 25 Jul 2022 16:17:31 -0700 Subject: [PATCH 009/177] move terr to ark mem --- src/arkode/arkode.c | 9 ++++----- src/arkode/arkode_arkstep.c | 7 +++++-- src/arkode/arkode_impl.h | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index a6908afe16..ae59d0a3df 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -953,7 +953,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, istate = ARK_SUCCESS; ark_mem->tretlast = *tret = tout; /* Only use dense output when we tcur is not within 10*eps of tout already.*/ - if (SUNRCompare(ark_mem->tcur-tout, ZERO)) { + if (SUNRCompare(ark_mem->tcur - tout, ZERO)) { (void) arkGetDky(ark_mem, tout, 0, yout); } ark_mem->next_h = ark_mem->hprime; @@ -964,7 +964,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR*ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); - if ( SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { + if (SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); ark_mem->tretlast = *tret = ark_mem->tstop; ark_mem->tstopset = SUNFALSE; @@ -2346,7 +2346,7 @@ int arkYddNorm(ARKodeMem ark_mem, realtype hg, realtype *yddnrm) } inline static -void kahanSum(sunrealtype base, sunrealtype inc, sunrealtype *sum, sunrealtype *error) +void compensatedSum(sunrealtype base, sunrealtype inc, sunrealtype *sum, sunrealtype *error) { sunrealtype err = *error; volatile sunrealtype tmp1 = inc - err; @@ -2378,8 +2378,7 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) If tstop is enabled, it is possible for tn + h to be past tstop by roundoff, and in that case, we reset tn (after incrementing by h) to tstop. */ - static realtype err = ZERO; /* TODO(CJB): Do we want to use this by default? It certainly helps based on my testing. */ - kahanSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &err); + compensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); /* TODO(CJB): I am guessing we would want this to be optional, but perhaps performance comparisons should be done (with small problems). */ // ark_mem->tcur = ark_mem->tn + ark_mem->h; if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR * ark_mem->uround * diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 9c3de14a7a..f23eef116a 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1217,8 +1217,11 @@ int arkStep_Init(void* arkode_mem, int init_type) /* set appropriate TakeStep routine based on problem configuration */ /* (only one choice for now) */ if (step_mem->separable_rhs) { - ark_mem->step = arkStep_TakeStep_SprkInc; - // ark_mem->step = arkStep_TakeStep_Sprk; + // if (ark_mem->compensated_sums) { + ark_mem->step = arkStep_TakeStep_SprkInc; + // } else { + // ark_mem->step = arkStep_TakeStep_Sprk; + // } } else { ark_mem->step = arkStep_TakeStep_Z; } diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 6008c87cfb..82fed13c41 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -386,6 +386,7 @@ typedef struct ARKodeMemRec { /* Saved Values */ realtype h0u; /* actual initial stepsize */ realtype tn; /* time of last successful step */ + realtype terr; /* error in tn for compensated sums */ realtype hold; /* last successful h value used */ realtype tolsf; /* tolerance scale factor (suggestion to user) */ booleantype VabstolMallocDone; From 4c0865dc12593603903adb332b02cb330935eade Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Mon, 25 Jul 2022 16:45:27 -0700 Subject: [PATCH 010/177] use tstop instead of compensated sums for tcur --- examples/arkode/C_serial/ark_kepler.c | 1 + src/arkode/arkode.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 760d3ce230..cb0612ef13 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -268,6 +268,7 @@ int main(int argc, char* argv[]) // retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); // if (retval < 0) break; // } + ARKStepSetStopTime(arkode_mem, tout); retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); fprintf(times_fp, "%.16f\n", tret); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index ae59d0a3df..72d22d28ae 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -965,7 +965,10 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, troundoff = FUZZ_FACTOR*ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); if (SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { - (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); + // /* Only use dense output when we tcur is not within 10*eps of tstop already.*/ + // if (SUNRCompare(ark_mem->tcur - ark_mem->tstop, ZERO)) { + // (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); + // } ark_mem->tretlast = *tret = ark_mem->tstop; ark_mem->tstopset = SUNFALSE; istate = ARK_TSTOP_RETURN; @@ -973,6 +976,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, } /* limit upcoming step if it will overcome tstop */ if ( (ark_mem->tcur + ark_mem->hprime - ark_mem->tstop)*ark_mem->h > ZERO ) { + // printf(">>> hprime = %g\n", ark_mem->hprime); ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE-FOUR*ark_mem->uround); ark_mem->eta = ark_mem->hprime/ark_mem->h; @@ -1019,7 +1023,7 @@ int arkGetDky(ARKodeMem ark_mem, realtype t, int k, N_Vector dky) realtype s, tfuzz, tp, tn1; int retval; - // printf(">>> arkGetDky t = %.16f, tcur = %.16f\n", t, ark_mem->tcur); + printf(">>> arkGetDky t = %.16f, tcur = %.16f\n", t, ark_mem->tcur); /* Check all inputs for legality */ if (ark_mem == NULL) { @@ -2378,8 +2382,8 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) If tstop is enabled, it is possible for tn + h to be past tstop by roundoff, and in that case, we reset tn (after incrementing by h) to tstop. */ - compensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); /* TODO(CJB): I am guessing we would want this to be optional, but perhaps performance comparisons should be done (with small problems). */ - // ark_mem->tcur = ark_mem->tn + ark_mem->h; + // compensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); /* TODO(CJB): I am guessing we would want this to be optional, but perhaps performance comparisons should be done (with small problems). */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR * ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); From b92d667a042825784186e54e0b3158b7e990d200 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Mon, 25 Jul 2022 17:25:19 -0700 Subject: [PATCH 011/177] fix SprkInc implementation --- src/arkode/arkode_arkstep.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index f23eef116a..8c7220f92a 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1944,7 +1944,7 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeARKStepMem step_mem; - int retval, js, is, nvec; + int retval, is, nvec; realtype* cvals; N_Vector* Xvecs; N_Vector delta_Yi, yn_plus_delta_Yi; @@ -1990,21 +1990,12 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* evaluate Fi with previous stage increment */ retval = arkStep_Fi(step_mem, ark_mem->tcur, yn_plus_delta_Yi, step_mem->Fi[is], ark_mem->user_data); - /* update the implicit stage */ - nvec = 0; - for (js=0; js<=is; js++) { - // cvals[nvec] = ark_mem->h * step_mem->Bi->A[is][js]; - cvals[nvec] = ark_mem->h * step_mem->Bi->b[js]; - Xvecs[nvec] = step_mem->Fi[js]; - nvec += 1; - } - /* h*A_{ij}^I*f^I(tcur^I, q_n + \Delta Q_i) */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); - if (retval != 0) return(ARK_VECTOROP_ERR); + if (retval != 0) return(ARK_RHSFUNC_FAIL); - /* [ ] = [ ] + [ ] + /* update the implicit stage + [ ] = [ ] + [ ] [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ - N_VLinearSum(ONE, delta_Yi, ONE, step_mem->sdata, delta_Yi); + N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->Fi[is], delta_Yi); /* [ ] + [ ] [ p_n ] + [ \Delta P_i ] */ @@ -2013,21 +2004,12 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* evaluate Fe with the current p_n + \Delta P_i */ retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, yn_plus_delta_Yi, step_mem->Fe[is], ark_mem->user_data); - /* update the explicit stage */ - nvec = 0; - for (js=0; js<=is; js++) { - // cvals[nvec] = ark_mem->h * step_mem->Be->A[is][js]; - cvals[nvec] = ark_mem->h * step_mem->Be->b[js]; - Xvecs[nvec] = step_mem->Fe[js]; - nvec += 1; - } - /* h*A_{ij}^E*f^E(tcur^E, p_n + \Delta P_i) */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); - if (retval != 0) return(ARK_VECTOROP_ERR); + if (retval != 0) return(ARK_RHSFUNC_FAIL); - /* [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] + /* update the explicit stage + [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] [ ] = [ ] + [ ] */ - N_VLinearSum(ONE, delta_Yi, ONE, step_mem->sdata, delta_Yi); + N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Be->b[is], step_mem->Fe[is], delta_Yi); } /* From 7dd6f5823a9b15fc37ceb407a15bda70bb343a7f Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Mon, 25 Jul 2022 17:31:26 -0700 Subject: [PATCH 012/177] fix regular sprk implementation --- src/arkode/arkode_arkstep.c | 47 +++++++------------------------------ 1 file changed, 9 insertions(+), 38 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 8c7220f92a..acd2258d2a 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1218,9 +1218,9 @@ int arkStep_Init(void* arkode_mem, int init_type) /* (only one choice for now) */ if (step_mem->separable_rhs) { // if (ark_mem->compensated_sums) { - ark_mem->step = arkStep_TakeStep_SprkInc; + // ark_mem->step = arkStep_TakeStep_SprkInc; // } else { - // ark_mem->step = arkStep_TakeStep_Sprk; + ark_mem->step = arkStep_TakeStep_Sprk; // } } else { ark_mem->step = arkStep_TakeStep_Z; @@ -1895,41 +1895,18 @@ int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* evaluate Fi at the previous stage value */ retval = arkStep_Fi(step_mem, ark_mem->tcur, Yi, step_mem->Fi[is], ark_mem->user_data); + if (retval != 0) return(ARK_RHSFUNC_FAIL); - /* update the implicit stage */ - nvec = 0; - for (js=0; js<=is; js++) { - // cvals[nvec] = ark_mem->h * step_mem->Bi->A[is][js]; - cvals[nvec] = ark_mem->h * step_mem->Bi->b[js]; - Xvecs[nvec] = step_mem->Fi[js]; - nvec += 1; - } - /* tempv1 = h*A_{ij}^I*f^I(tcur^I, y_n) */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); - if (retval != 0) return(ARK_VECTOROP_ERR); - - /* compute ycur before evaluating explicit RHS */ - N_VLinearSum(ONE, ark_mem->yn, ONE, step_mem->sdata, ark_mem->ycur); - if (retval != 0) return(ARK_VECTOROP_ERR); + /* update ycur with the implicit stage */ + N_VLinearSum(ONE, Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->Fi[is], ark_mem->ycur); /* evaluate Fe with the current stage value */ retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, ark_mem->ycur, step_mem->Fe[is], ark_mem->user_data); + if (retval != 0) return(ARK_RHSFUNC_FAIL); - /* update the explicit stage */ - nvec = 0; - for (js=0; js<=is; js++) { - // cvals[nvec] = ark_mem->h * step_mem->Be->A[is][js]; - cvals[nvec] = ark_mem->h * step_mem->Be->b[js]; - Xvecs[nvec] = step_mem->Fe[js]; - nvec += 1; - } - /* tempv2 = h*A_{ij}^E*f^E(tcur^E, ycur) */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); - if (retval != 0) return(ARK_VECTOROP_ERR); - - /* update ycur before finishing stage */ - N_VLinearSum(ONE, ark_mem->ycur, ONE, step_mem->sdata, ark_mem->ycur); + /* update ycur with the explicit stage */ + N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * step_mem->Be->b[is], step_mem->Fe[is], ark_mem->ycur); if (retval != 0) return(ARK_VECTOROP_ERR); } @@ -1944,9 +1921,7 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeARKStepMem step_mem; - int retval, is, nvec; - realtype* cvals; - N_Vector* Xvecs; + int retval, is; N_Vector delta_Yi, yn_plus_delta_Yi; /* access ARKodeARKStepMem structure */ @@ -1960,10 +1935,6 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return(ARK_UNRECOGNIZED_ERROR); } - /* local shortcuts for fused vector operations */ - cvals = step_mem->cvals; - Xvecs = step_mem->Xvecs; - /* other shortcuts */ delta_Yi = ark_mem->tempv1; yn_plus_delta_Yi = ark_mem->tempv2; From 93988e7e69a1ec556cf7efb39e2c217a1342da0b Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Mon, 25 Jul 2022 17:31:49 -0700 Subject: [PATCH 013/177] cleanup --- src/arkode/arkode_arkstep.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index acd2258d2a..da2e80ee0e 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1858,9 +1858,7 @@ int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeARKStepMem step_mem; - int retval, js, is, nvec; - realtype* cvals; - N_Vector* Xvecs; + int retval, is; N_Vector Yi; /* access ARKodeARKStepMem structure */ @@ -1874,10 +1872,6 @@ int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return(ARK_UNRECOGNIZED_ERROR); } - /* local shortcuts for fused vector operations */ - cvals = step_mem->cvals; - Xvecs = step_mem->Xvecs; - /* loop over internal stages to the step */ for (is=0; isstages; is++) { /* store current stage index */ From 0009d07f1b6b810209a66a1ee81897b4e4689b9a Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Mon, 25 Jul 2022 17:34:13 -0700 Subject: [PATCH 014/177] use sdata --- src/arkode/arkode_arkstep.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index da2e80ee0e..20c4b43af8 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1218,9 +1218,9 @@ int arkStep_Init(void* arkode_mem, int init_type) /* (only one choice for now) */ if (step_mem->separable_rhs) { // if (ark_mem->compensated_sums) { - // ark_mem->step = arkStep_TakeStep_SprkInc; + ark_mem->step = arkStep_TakeStep_SprkInc; // } else { - ark_mem->step = arkStep_TakeStep_Sprk; + // ark_mem->step = arkStep_TakeStep_Sprk; // } } else { ark_mem->step = arkStep_TakeStep_Z; @@ -1930,8 +1930,8 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) } /* other shortcuts */ - delta_Yi = ark_mem->tempv1; - yn_plus_delta_Yi = ark_mem->tempv2; + delta_Yi = step_mem->sdata; + yn_plus_delta_Yi = ark_mem->tempv1; /* [ \Delta Q_0 ] = [ 0 ] [ \Delta P_0 ] = [ 0 ] */ @@ -1983,8 +1983,8 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); - N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); - N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); + N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv2); + N_VLinearSum(ONE, ark_mem->tempv2, -ONE, delta_Yi, ark_mem->yerr); *nflagPtr = 0; *dsmPtr = 0; From d80ffb7805e26e45daa9d80a065b646f07d4e53b Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Fri, 29 Jul 2022 14:27:02 -0700 Subject: [PATCH 015/177] fix 2nd order table --- examples/arkode/C_serial/ark_kepler.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index cb0612ef13..5461e18cd5 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - // sunrealtype Tf = SUN_RCONST(0.3); + // sunrealtype Tf = SUN_RCONST(0.1); sunrealtype Tf = SUN_RCONST(100000.0); const sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); @@ -87,7 +87,7 @@ int main(int argc, char* argv[]) int fixed_step_mode = 1; int method = 1; int order = 2; - // const sunrealtype dTout = SUN_RCONST(0.1); + // const sunrealtype dTout = SUN_RCONST(dt); const sunrealtype dTout = SUN_RCONST(100.0); const int num_of_steps = (int) ceil(dTout/dt); const int num_output_times = (int) ceil(Tf/dTout); @@ -172,8 +172,7 @@ int main(int argc, char* argv[]) Mq = ARKodeButcherTable_Alloc(2, SUNTRUE); if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = RCONST(0.0); - Mq->b[1] = RCONST(1.0); + Mq->b[0] = RCONST(1.0); Mq->A[1][0] = RCONST(1.0); Mq->c[0] = RCONST(0.0); Mq->c[1] = RCONST(1.0); From 72cf56a5dca83f3ad6a57501d6e71771487cefa9 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Fri, 29 Jul 2022 14:45:29 -0700 Subject: [PATCH 016/177] update TakeStep_Z to work with sprk --- src/arkode/arkode_arkstep.c | 49 ++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 20c4b43af8..52a5029eca 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1216,15 +1216,15 @@ int arkStep_Init(void* arkode_mem, int init_type) /* set appropriate TakeStep routine based on problem configuration */ /* (only one choice for now) */ - if (step_mem->separable_rhs) { + // if (step_mem->separable_rhs) { // if (ark_mem->compensated_sums) { - ark_mem->step = arkStep_TakeStep_SprkInc; + // ark_mem->step = arkStep_TakeStep_SprkInc; // } else { // ark_mem->step = arkStep_TakeStep_Sprk; // } - } else { + // } else { ark_mem->step = arkStep_TakeStep_Z; - } + // } /* Check for consistency between mass system and system linear system modules (e.g., if lsolve is direct, msolve needs to match) */ @@ -1624,7 +1624,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* determine whether implicit solve is required */ implicit_stage = SUNFALSE; - if (step_mem->implicit && !step_mem->separable_rhs) + if (step_mem->implicit) if (SUNRabs(step_mem->Bi->A[is][is]) > TINY) implicit_stage = SUNTRUE; @@ -1654,7 +1654,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* if implicit, call built-in and user-supplied predictors (results placed in zpred) */ - if (implicit_stage) { + if (implicit_stage && !step_mem->separable_rhs) { retval = arkStep_Predict(ark_mem, is, step_mem->zpred); if (retval != ARK_SUCCESS) return (retval); @@ -1663,7 +1663,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) routine can just 'clean up' the built-in prediction, if desired. */ if (step_mem->stage_predict) { retval = step_mem->stage_predict(ark_mem->tcur, step_mem->zpred, - ark_mem->user_data); + ark_mem->user_data); if (retval < 0) return(ARK_USER_PREDICT_FAIL); if (retval > 0) return(TRY_AGAIN); } @@ -1693,7 +1693,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) ark_mem->nst, ark_mem->h, is, ark_mem->tcur); /* perform implicit solve if required */ - if (implicit_stage) { + if (implicit_stage && !step_mem->separable_rhs) { /* implicit solve result is stored in ark_mem->ycur; return with positive value on anything but success */ @@ -1708,6 +1708,31 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) #endif /* otherwise no implicit solve is needed */ + } else if(step_mem->separable_rhs) { + /* we explicitly compute the 'implicit' part since + the right hand side is separable and only + depends on the previous stage value of the explicit part */ + + retval = arkStep_Fi(step_mem, ark_mem->tcur, step_mem->sdata, + step_mem->Fi[is], ark_mem->user_data); + if (retval < 0) return(ARK_RHSFUNC_FAIL); + if (retval > 0) return(ARK_UNREC_RHSFUNC_ERR); + + cvals[0] = ONE; + Xvecs[0] = ark_mem->yn; + nvec = 1; + for (int js=0; jsstages; js++) { + cvals[nvec] = ark_mem->h * step_mem->Bi->A[is][js]; + Xvecs[nvec] = step_mem->Fi[js]; + nvec += 1; + } + retval = N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->ycur); + if (retval != 0) return(ARK_VECTOROP_ERR); + +#ifdef SUNDIALS_DEBUG_PRINTVEC + printf(" ARKStep implicit stage %i solution:\n",is); + N_VPrint(ark_mem->ycur); +#endif } else { /* if M is fixed, solve with it to compute update (place back in sdata) */ @@ -1746,7 +1771,9 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* store implicit RHS (value in Fi[is] is from preceding nonlinear iteration) */ if (step_mem->implicit) { - if (!deduce_stage) { + if (step_mem->separable_rhs) { + /* do nothing */ + } else if (!deduce_stage) { retval = arkStep_Fi(step_mem, ark_mem->tcur, ark_mem->ycur, step_mem->Fi[is], ark_mem->user_data); } else if (step_mem->mass_type == MASS_FIXED) { @@ -2624,13 +2651,13 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) /* Update sdata with prior stage information */ if (step_mem->explicit) { /* Explicit pieces */ - for (j=0; jstages; j++) { cvals[nvec] = ark_mem->h * step_mem->Be->A[i][j]; Xvecs[nvec] = step_mem->Fe[j]; nvec += 1; } } - if (step_mem->implicit) { /* Implicit pieces */ + if (step_mem->implicit && !step_mem->separable_rhs) { /* Implicit pieces */ for (j=0; jh * step_mem->Bi->A[i][j]; Xvecs[nvec] = step_mem->Fi[j]; From 523f10aa8b92d5da984a49701d62bfd67967e280 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Fri, 29 Jul 2022 15:55:32 -0700 Subject: [PATCH 017/177] use less storage in sprk special implementations --- examples/arkode/C_serial/ark_kepler.c | 22 ++++++++++++++++-- src/arkode/arkode_arkstep.c | 32 +++++++++++++++------------ 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 5461e18cd5..456a1a3f27 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -44,6 +44,9 @@ #include /* prototypes for ARKStep fcts., consts */ #include /* serial N_Vector type, fcts., macros */ #include /* def. math fcns, 'realtype' */ +#include "sundials/sundials_nonlinearsolver.h" +#include "sundials/sundials_types.h" +#include "sunnonlinsol/sunnonlinsol_fixedpoint.h" static int check_retval(void *returnvalue, const char *funcname, int opt); @@ -69,11 +72,15 @@ int main(int argc, char* argv[]) UserData udata; sunrealtype tout, tret; sunrealtype H0, L0; - ARKodeButcherTable Mp = NULL, Mq = NULL; + ARKodeButcherTable Mp, Mq; void* arkode_mem; FILE *conserved_fp, *solution_fp, *times_fp; int argi, iout, retval; + Mp = Mq = NULL; + NLS = NULL; + y = NULL; + /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); // sunrealtype Tf = SUN_RCONST(0.1); @@ -203,11 +210,19 @@ int main(int argc, char* argv[]) retval = ARKStepSetSeparableRhs(arkode_mem, SUNTRUE); if (check_retval(&retval, "ARKStepSetSeparableRhs", 1)) return 1; - } else { + } else if (method == 1) { arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); retval = ARKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + } else { + arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); + + retval = ARKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + + NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); + ARKStepSetNonlinearSolver(arkode_mem, NLS); } /* Setup ARKStep */ @@ -287,6 +302,7 @@ int main(int argc, char* argv[]) // ARKStepFree(arkode_mem); // TODO: figure out why this is segfaulting! if (Mq) ARKodeButcherTable_Free(Mq); if (Mp) ARKodeButcherTable_Free(Mp); + if (NLS) SUNNonlinSolFree(NLS); N_VDestroy(y); free(udata); fclose(times_fp); @@ -361,6 +377,7 @@ int dqdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) ydot[0] = p1; ydot[1] = p2; + // ydot[2] = ydot[3] = SUN_RCONST(0.0); // printf("dqdt(p=[%.16f, %.16f]) = [%.16f, %.16f]\n", p1, p2, ydot[0], ydot[1]); @@ -377,6 +394,7 @@ int dpdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) const sunrealtype q2 = y[1]; const sunrealtype sqrt_q1q1_plus_q2q2 = SUNRsqrt(q1*q1 + q2*q2); + // ydot[0] = ydot[1] = SUN_RCONST(0.0); ydot[2] = - q1 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) - delta * q1 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(5.0)); ydot[3] = - q2 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 52a5029eca..fe5da799a3 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1218,12 +1218,12 @@ int arkStep_Init(void* arkode_mem, int init_type) /* (only one choice for now) */ // if (step_mem->separable_rhs) { // if (ark_mem->compensated_sums) { - // ark_mem->step = arkStep_TakeStep_SprkInc; + ark_mem->step = arkStep_TakeStep_SprkInc; // } else { // ark_mem->step = arkStep_TakeStep_Sprk; // } // } else { - ark_mem->step = arkStep_TakeStep_Z; + // ark_mem->step = arkStep_TakeStep_Z; // } /* Check for consistency between mass system and system linear system modules @@ -1914,20 +1914,22 @@ int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) Yi = is == 0 ? ark_mem->yn : ark_mem->ycur; /* evaluate Fi at the previous stage value */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ retval = arkStep_Fi(step_mem, ark_mem->tcur, Yi, - step_mem->Fi[is], ark_mem->user_data); + step_mem->sdata, ark_mem->user_data); if (retval != 0) return(ARK_RHSFUNC_FAIL); /* update ycur with the implicit stage */ - N_VLinearSum(ONE, Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->Fi[is], ark_mem->ycur); + N_VLinearSum(ONE, Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->sdata, ark_mem->ycur); /* evaluate Fe with the current stage value */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, - ark_mem->ycur, step_mem->Fe[is], ark_mem->user_data); + ark_mem->ycur, step_mem->sdata, ark_mem->user_data); if (retval != 0) return(ARK_RHSFUNC_FAIL); /* update ycur with the explicit stage */ - N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * step_mem->Be->b[is], step_mem->Fe[is], ark_mem->ycur); + N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, ark_mem->ycur); if (retval != 0) return(ARK_VECTOROP_ERR); } @@ -1957,8 +1959,8 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) } /* other shortcuts */ - delta_Yi = step_mem->sdata; - yn_plus_delta_Yi = ark_mem->tempv1; + delta_Yi = ark_mem->tempv1; + yn_plus_delta_Yi = ark_mem->tempv2; /* [ \Delta Q_0 ] = [ 0 ] [ \Delta P_0 ] = [ 0 ] */ @@ -1980,28 +1982,30 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); /* evaluate Fi with previous stage increment */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ retval = arkStep_Fi(step_mem, ark_mem->tcur, yn_plus_delta_Yi, - step_mem->Fi[is], ark_mem->user_data); + step_mem->sdata, ark_mem->user_data); if (retval != 0) return(ARK_RHSFUNC_FAIL); /* update the implicit stage [ ] = [ ] + [ ] [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ - N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->Fi[is], delta_Yi); + N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->sdata, delta_Yi); /* [ ] + [ ] [ p_n ] + [ \Delta P_i ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); /* evaluate Fe with the current p_n + \Delta P_i */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, - yn_plus_delta_Yi, step_mem->Fe[is], ark_mem->user_data); + yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); if (retval != 0) return(ARK_RHSFUNC_FAIL); /* update the explicit stage [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] [ ] = [ ] + [ ] */ - N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Be->b[is], step_mem->Fe[is], delta_Yi); + N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, delta_Yi); } /* @@ -2010,8 +2014,8 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); - N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv2); - N_VLinearSum(ONE, ark_mem->tempv2, -ONE, delta_Yi, ark_mem->yerr); + N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); + N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); *nflagPtr = 0; *dsmPtr = 0; From 36f5692e1c1d586649c96765de799c359af374a8 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Fri, 5 Aug 2022 17:12:46 -0700 Subject: [PATCH 018/177] adapt working sort of --- examples/arkode/C_serial/ark_kepler.c | 118 ++++++++++++++++++++------ src/arkode/arkode_arkstep.c | 87 ++++++++++--------- 2 files changed, 136 insertions(+), 69 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 456a1a3f27..c9b92551ef 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -43,8 +43,9 @@ #include /* prototypes for MRIStep fcts., consts */ #include /* prototypes for ARKStep fcts., consts */ #include /* serial N_Vector type, fcts., macros */ -#include /* def. math fcns, 'realtype' */ +#include /* def. math fcns, 'sunrealtype' */ #include "sundials/sundials_nonlinearsolver.h" +#include "sundials/sundials_nvector.h" #include "sundials/sundials_types.h" #include "sunnonlinsol/sunnonlinsol_fixedpoint.h" @@ -54,13 +55,25 @@ static void InitialConditions(N_Vector y0, sunrealtype ecc); static sunrealtype Hamiltonian(N_Vector y); static sunrealtype AngularMomentum(N_Vector y); -static int dydt(realtype t, N_Vector y, N_Vector ydot, void *user_data); -static int dqdt(realtype t, N_Vector y, N_Vector ydot, void *user_data); -static int dpdt(realtype t, N_Vector y, N_Vector ydot, void *user_data); +static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); +static int dqdt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); +static int dpdt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); + +static sunrealtype Q(N_Vector yvec, sunrealtype alpha); +static sunrealtype G(N_Vector yvec, sunrealtype alpha); +static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, + sunrealtype h3, sunrealtype e1, sunrealtype e2, + sunrealtype e3, int q, int p, sunrealtype *hnew, + void *user_data); typedef struct { sunrealtype ecc; sunrealtype delta; + + /* for time-step control */ + sunrealtype eps; + sunrealtype alpha; + sunrealtype rho_n; } *UserData; @@ -83,12 +96,12 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - // sunrealtype Tf = SUN_RCONST(0.1); + // sunrealtype Tf = SUN_RCONST(10.0); sunrealtype Tf = SUN_RCONST(100000.0); const sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); - const sunrealtype delta = SUN_RCONST(0.015); - // const sunrealtype delta = SUN_RCONST(0.0); // unperturbed + // const sunrealtype delta = SUN_RCONST(0.015); + const sunrealtype delta = SUN_RCONST(0.0); // unperturbed /* Default integrator Options */ int fixed_step_mode = 1; @@ -96,7 +109,6 @@ int main(int argc, char* argv[]) int order = 2; // const sunrealtype dTout = SUN_RCONST(dt); const sunrealtype dTout = SUN_RCONST(100.0); - const int num_of_steps = (int) ceil(dTout/dt); const int num_output_times = (int) ceil(Tf/dTout); /* Parse CLI args */ @@ -115,6 +127,9 @@ int main(int argc, char* argv[]) udata = (UserData) malloc(sizeof(*udata)); udata->ecc = ecc; udata->delta = delta; + udata->alpha = SUN_RCONST(3.0)/SUN_RCONST(2.0); + udata->eps = dt; + udata->rho_n = SUN_RCONST(1.0); /* Create the SUNDIALS context object for this simulation */ retval = SUNContext_Create(NULL, &sunctx); @@ -229,12 +244,25 @@ int main(int argc, char* argv[]) retval = ARKStepSetUserData(arkode_mem, (void *) udata); if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - retval = ARKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); - if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - if (fixed_step_mode) { retval = ARKStepSetFixedStep(arkode_mem, dt); if (check_retval(&retval, "ARKStepSetFixedStep", 1)) return 1; + + retval = ARKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); + if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; + } else if (method == 0) { + retval = ARKStepSetAdaptivityFn(arkode_mem, Adapt, udata); + if (check_retval(&retval, "ARKStepSetFixedStep", 1)) return 1; + + const sunrealtype rho_half = udata->rho_n + udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); + retval = ARKStepSetInitStep(arkode_mem, udata->eps/rho_half); + if (check_retval(&retval, "ARKStepSetInitStep", 1)) return 1; + + retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-1), SUN_RCONST(10e-5)); + if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; + + // retval = ARKStepSetMaxNumSteps(arkode_mem, 20); + // if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; } else { retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; @@ -278,12 +306,16 @@ int main(int argc, char* argv[]) fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); N_VPrintFile(y, solution_fp); for (iout = 0; iout < num_output_times; iout++) { - // for (int nst = 0; nst < num_of_steps; nst++) { - // retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - // if (retval < 0) break; - // } ARKStepSetStopTime(arkode_mem, tout); - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + if (method == 0 && fixed_step_mode == 0) { + while(tret < tout) { + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + // printf(">>> Q(q)/rho_n = %g\n", Q(y, udata->alpha)/udata->rho_n); + if (retval < 0) break; + } + } else { + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + } fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); fprintf(times_fp, "%.16f\n", tret); fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); @@ -333,11 +365,11 @@ sunrealtype Hamiltonian(N_Vector yvec) const sunrealtype p1p1_plus_p2p2 = y[2]*y[2] + y[3]*y[3]; // Perturbed - H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2 - - SUN_RCONST(0.005) / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) / SUN_RCONST(2.0); + // H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2 + // - SUN_RCONST(0.005) / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) / SUN_RCONST(2.0); // Unperturbed - // H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2; + H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2; return H; } @@ -358,7 +390,7 @@ sunrealtype AngularMomentum(N_Vector yvec) return L; } -int dydt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int dydt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { int retval = 0; @@ -368,7 +400,7 @@ int dydt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) return retval; } -int dqdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int dqdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { sunrealtype* y = N_VGetArrayPointer(yvec); sunrealtype* ydot = N_VGetArrayPointer(ydotvec); @@ -379,12 +411,10 @@ int dqdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) ydot[1] = p2; // ydot[2] = ydot[3] = SUN_RCONST(0.0); - // printf("dqdt(p=[%.16f, %.16f]) = [%.16f, %.16f]\n", p1, p2, ydot[0], ydot[1]); - return 0; } -int dpdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int dpdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { UserData udata = (UserData) user_data; sunrealtype* y = N_VGetArrayPointer(yvec); @@ -400,7 +430,45 @@ int dpdt(realtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) ydot[3] = - q2 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) - delta * q2 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(5.0)); - // printf("dpdt(q=[%.16f, %.16f]) = [%.16f, %.16f]\n", q1, q2, ydot[2], ydot[3]); + return 0; +} + +sunrealtype G(N_Vector yvec, sunrealtype alpha) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + const sunrealtype p1 = y[2]; + const sunrealtype p2 = y[3]; + + const sunrealtype pTq = p1*q1 + p2*q2; + const sunrealtype qTq = q1*q1 + q2*q2; + + return (-alpha * pTq / qTq); +} + +sunrealtype Q(N_Vector yvec, sunrealtype alpha) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + + const sunrealtype qTq = q1*q1 + q2*q2; + + return SUNRpowerR(qTq, -alpha/2); +} + +int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, + sunrealtype h3, sunrealtype e1, sunrealtype e2, + sunrealtype e3, int q, int p, sunrealtype *hnew, + void *user_data) +{ + UserData udata = (UserData) user_data; + + const sunrealtype eps = udata->eps; + const sunrealtype rho_nphalf = udata->rho_n + eps*G(y, udata->alpha)/SUN_RCONST(2.0); + + *hnew = eps/rho_nphalf; return 0; } diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index fe5da799a3..a9f2d1dec6 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1135,11 +1135,11 @@ int arkStep_Init(void* arkode_mem, int init_type) } /* Ensure that if adaptivity is enabled, then method includes embedding coefficients */ - if (!ark_mem->fixedstep && (step_mem->p == 0)) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ARKStep", "arkStep_Init", - "Adaptive timestepping cannot be performed without embedding coefficients"); - return(ARK_ILL_INPUT); - } + // if (!ark_mem->fixedstep && (step_mem->p == 0)) { + // arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ARKStep", "arkStep_Init", + // "Adaptive timestepping cannot be performed without embedding coefficients"); + // return(ARK_ILL_INPUT); + // } /* Allocate ARK RHS vector memory, update storage requirements */ /* Allocate Fe[0] ... Fe[stages-1] if needed */ @@ -1218,9 +1218,9 @@ int arkStep_Init(void* arkode_mem, int init_type) /* (only one choice for now) */ // if (step_mem->separable_rhs) { // if (ark_mem->compensated_sums) { - ark_mem->step = arkStep_TakeStep_SprkInc; + // ark_mem->step = arkStep_TakeStep_SprkInc; // } else { - // ark_mem->step = arkStep_TakeStep_Sprk; + ark_mem->step = arkStep_TakeStep_Sprk; // } // } else { // ark_mem->step = arkStep_TakeStep_Z; @@ -1893,11 +1893,11 @@ int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - if (!ark_mem->fixedstep) { - arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", - "arkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); - return(ARK_UNRECOGNIZED_ERROR); - } + // if (!ark_mem->fixedstep) { + // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", + // "arkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); + // return(ARK_UNRECOGNIZED_ERROR); + // } /* loop over internal stages to the step */ for (is=0; isstages; is++) { @@ -1930,7 +1930,6 @@ int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* update ycur with the explicit stage */ N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, ark_mem->ycur); - if (retval != 0) return(ARK_VECTOROP_ERR); } *nflagPtr = 0; @@ -1952,11 +1951,11 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - if (!ark_mem->fixedstep) { - arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", - "arkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); - return(ARK_UNRECOGNIZED_ERROR); - } + // if (!ark_mem->fixedstep) { + // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", + // "arkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); + // return(ARK_UNRECOGNIZED_ERROR); + // } /* other shortcuts */ delta_Yi = ark_mem->tempv1; @@ -2280,33 +2279,33 @@ int arkStep_CheckButcherTables(ARKodeMem ark_mem) return(ARK_INVALID_TABLE); } - /* check that embedding order p > 0 */ - if ((step_mem->p < 1) && (!ark_mem->fixedstep)) { - arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", - "arkStep_CheckButcherTables", - "embedding order < 1!"); - return(ARK_INVALID_TABLE); - } + // /* check that embedding order p > 0 */ + // if ((step_mem->p < 1) && (!ark_mem->fixedstep)) { + // arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", + // "arkStep_CheckButcherTables", + // "embedding order < 1!"); + // return(ARK_INVALID_TABLE); + // } - /* check that embedding exists */ - if ((step_mem->p > 0) && (!ark_mem->fixedstep)) { - if (step_mem->implicit) { - if (step_mem->Bi->d == NULL) { - arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", - "arkStep_CheckButcherTables", - "no implicit embedding!"); - return(ARK_INVALID_TABLE); - } - } - if (step_mem->explicit) { - if (step_mem->Be->d == NULL) { - arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", - "arkStep_CheckButcherTables", - "no explicit embedding!"); - return(ARK_INVALID_TABLE); - } - } - } + // /* check that embedding exists */ + // if ((step_mem->p > 0) && (!ark_mem->fixedstep)) { + // if (step_mem->implicit) { + // if (step_mem->Bi->d == NULL) { + // arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", + // "arkStep_CheckButcherTables", + // "no implicit embedding!"); + // return(ARK_INVALID_TABLE); + // } + // } + // if (step_mem->explicit) { + // if (step_mem->Be->d == NULL) { + // arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", + // "arkStep_CheckButcherTables", + // "no explicit embedding!"); + // return(ARK_INVALID_TABLE); + // } + // } + // } /* check that ERK table is strictly lower triangular */ if (step_mem->explicit) { From 49a83150e2393d66c2a4a734fb8a3b47d3eabc90 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Wed, 10 Aug 2022 23:20:52 -0700 Subject: [PATCH 019/177] fix methods, add 4th order, adjust adaptivity --- examples/arkode/C_serial/ark_kepler.c | 200 +++++++++++++----- examples/arkode/C_serial/ark_kepler_plot.py | 28 ++- .../C_serial/ark_kepler_plot_sprk_impls.py | 68 +++--- 3 files changed, 189 insertions(+), 107 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index c9b92551ef..4e32798263 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -73,7 +73,12 @@ typedef struct { /* for time-step control */ sunrealtype eps; sunrealtype alpha; + sunrealtype rho_nmhalf; + sunrealtype rho_nphalf; sunrealtype rho_n; + sunrealtype rho_np1; + + FILE *hhist_fp; } *UserData; @@ -96,25 +101,25 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - // sunrealtype Tf = SUN_RCONST(10.0); - sunrealtype Tf = SUN_RCONST(100000.0); + sunrealtype Tf = SUN_RCONST(50.0); + // sunrealtype Tf = SUN_RCONST(100000.0); const sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); // const sunrealtype delta = SUN_RCONST(0.015); const sunrealtype delta = SUN_RCONST(0.0); // unperturbed /* Default integrator Options */ - int fixed_step_mode = 1; - int method = 1; - int order = 2; - // const sunrealtype dTout = SUN_RCONST(dt); - const sunrealtype dTout = SUN_RCONST(100.0); + int step_mode = 1; + int method = 1; + int order = 2; + const sunrealtype dTout = SUN_RCONST(dt); + // const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); /* Parse CLI args */ argi = 0; if (argc > 1) { - fixed_step_mode = atoi(argv[++argi]); + step_mode = atoi(argv[++argi]); } if (argc > 2) { method = atoi(argv[++argi]); @@ -125,10 +130,10 @@ int main(int argc, char* argv[]) /* Allocate and fill udata structure */ udata = (UserData) malloc(sizeof(*udata)); - udata->ecc = ecc; + udata->ecc = ecc; udata->delta = delta; udata->alpha = SUN_RCONST(3.0)/SUN_RCONST(2.0); - udata->eps = dt; + udata->eps = dt; udata->rho_n = SUN_RCONST(1.0); /* Create the SUNDIALS context object for this simulation */ @@ -145,19 +150,80 @@ int main(int argc, char* argv[]) if (method == 0) { arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); - /* Attach custom Butcher tables for 3rd order scheme [Candy, 1991] */ + /* 4th order scheme [McLauchlan] */ + if (order == 4) { + const sunrealtype a1 = SUN_RCONST(0.515352837431122936); + const sunrealtype a2 = -SUN_RCONST(0.085782019412973646); + const sunrealtype a3 = SUN_RCONST(0.441583023616466524); + const sunrealtype a4 = SUN_RCONST(0.128846158365384185); + const sunrealtype b1 = SUN_RCONST(0.134496199277431089); + const sunrealtype b2 = -SUN_RCONST(0.224819803079420806); + const sunrealtype b3 = SUN_RCONST(0.756320000515668291); + const sunrealtype b4 = SUN_RCONST(0.33400360328632142); + + Mp = ARKodeButcherTable_Alloc(4, SUNTRUE); + if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; + Mp->b[0] = b1; + Mp->b[1] = b2; + Mp->b[2] = b3; + Mp->b[3] = b4; + Mp->A[0][0] = b1; + Mp->A[1][0] = b1; + Mp->A[1][1] = b2; + Mp->A[2][0] = b1; + Mp->A[2][1] = b2; + Mp->A[2][2] = b3; + Mp->A[3][0] = b1; + Mp->A[3][1] = b2; + Mp->A[3][2] = b3; + Mp->A[3][3] = b4; + Mp->c[0] = Mp->b[0]; + Mp->c[1] = Mp->b[0] + Mp->b[1]; + Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; + Mp->c[3] = Mp->b[0] + Mp->b[1] + Mp->b[2] + Mp->b[3]; + Mp->q = order; + Mp->p = 0; + + Mq = ARKodeButcherTable_Alloc(4, SUNTRUE); + if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; + Mq->b[0] = a1; + Mq->b[1] = a2; + Mq->b[2] = a3; + Mq->b[3] = a4; + Mq->A[1][0] = a1; + Mq->A[2][0] = a1; + Mq->A[2][1] = a2; + Mq->A[3][0] = a1; + Mq->A[3][1] = a2; + Mq->A[3][2] = a3; + Mq->c[0] = SUN_RCONST(0.0); + Mq->c[1] = Mq->b[0]; + Mq->c[2] = Mq->b[0] + Mq->b[1]; + Mq->c[3] = Mq->b[0] + Mq->b[1] + Mq->b[2]; + Mq->q = order; + Mq->p = 0; + } + + /* 3rd order scheme [Ruth, 1983] */ if (order == 3) { + const sunrealtype a1 = SUN_RCONST(2.0)/SUN_RCONST(3.0); + const sunrealtype a2 = -SUN_RCONST(2.0)/SUN_RCONST(3.0); + const sunrealtype a3 = SUN_RCONST(1.0); + const sunrealtype b1 = SUN_RCONST(7.0)/SUN_RCONST(24.0); + const sunrealtype b2 = SUN_RCONST(3.0)/SUN_RCONST(4.0); + const sunrealtype b3 = -SUN_RCONST(1.0)/SUN_RCONST(24.0); + Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = RCONST(2.0)/RCONST(3.0); - Mp->b[1] = -RCONST(2.0)/RCONST(3.0); - Mp->b[2] = RCONST(1.0); - Mp->A[0][0] = Mp->b[0]; - Mp->A[1][0] = Mp->b[0]; - Mp->A[1][1] = Mp->b[1]; - Mp->A[2][0] = Mp->b[0]; - Mp->A[2][1] = Mp->b[1]; - Mp->A[2][2] = Mp->b[2]; + Mp->b[0] = b1; + Mp->b[1] = b2; + Mp->b[2] = b3; + Mp->A[0][0] = b1; + Mp->A[1][0] = b1; + Mp->A[1][1] = b2; + Mp->A[2][0] = b1; + Mp->A[2][1] = b2; + Mp->A[2][2] = b3; Mp->c[0] = Mp->b[0]; Mp->c[1] = Mp->b[0] + Mp->b[1]; Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; @@ -166,12 +232,12 @@ int main(int argc, char* argv[]) Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = RCONST(7.0)/RCONST(24.0); - Mq->b[1] = RCONST(3.0)/RCONST(4.0); - Mq->b[2] = -RCONST(1.0)/RCONST(24.0); - Mq->A[1][0] = Mq->b[0]; - Mq->A[2][0] = Mq->b[0]; - Mq->A[2][1] = Mq->b[1]; + Mq->b[0] = a1; + Mq->b[1] = a2; + Mq->b[2] = a3; + Mq->A[1][0] = a1; + Mq->A[2][0] = a1; + Mq->A[2][1] = a2; Mq->c[0] = Mq->b[0]; Mq->c[1] = Mq->b[0] + Mq->b[1]; Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; @@ -179,6 +245,7 @@ int main(int argc, char* argv[]) Mq->p = 0; } + /* Pseudo Leapfrog */ if (order == 2) { Mp = ARKodeButcherTable_Alloc(2, SUNTRUE); if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; @@ -202,6 +269,7 @@ int main(int argc, char* argv[]) Mq->p = 0; } + /* Symplectic Euler */ if (order == 1) { Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; @@ -244,25 +312,24 @@ int main(int argc, char* argv[]) retval = ARKStepSetUserData(arkode_mem, (void *) udata); if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - if (fixed_step_mode) { + if (step_mode == 1) { retval = ARKStepSetFixedStep(arkode_mem, dt); if (check_retval(&retval, "ARKStepSetFixedStep", 1)) return 1; retval = ARKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - } else if (method == 0) { + } else if (step_mode == 2 || step_mode == 3) { + /* Adaptivity based on [Hairer and Soderlind, 2005] */ retval = ARKStepSetAdaptivityFn(arkode_mem, Adapt, udata); if (check_retval(&retval, "ARKStepSetFixedStep", 1)) return 1; - const sunrealtype rho_half = udata->rho_n + udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); - retval = ARKStepSetInitStep(arkode_mem, udata->eps/rho_half); + udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); + udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); + retval = ARKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); if (check_retval(&retval, "ARKStepSetInitStep", 1)) return 1; - retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-1), SUN_RCONST(10e-5)); - if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; - - // retval = ARKStepSetMaxNumSteps(arkode_mem, 20); - // if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; + retval = ARKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); + if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; } else { retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; @@ -273,6 +340,7 @@ int main(int argc, char* argv[]) const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; + const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; @@ -283,6 +351,8 @@ int main(int argc, char* argv[]) solution_fp = fopen(fname, "w+"); sprintf(fname, fmt3, order); times_fp = fopen(fname, "w+"); + sprintf(fname, fmt4, order); + udata->hhist_fp = fopen(fname, "w+"); } else { const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; @@ -301,25 +371,35 @@ int main(int argc, char* argv[]) tout = T0+dTout; H0 = Hamiltonian(y); L0 = AngularMomentum(y); - fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f\n", tret, H0, L0); + sunrealtype Q0 = Q(y, udata->alpha)/udata->rho_n; + fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f, Q(p,q) = %.16f\n", + tret, H0, L0, Q0); fprintf(times_fp, "%.16f\n", tret); fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); N_VPrintFile(y, solution_fp); for (iout = 0; iout < num_output_times; iout++) { ARKStepSetStopTime(arkode_mem, tout); - if (method == 0 && fixed_step_mode == 0) { + if (step_mode == 3) { while(tret < tout) { retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - // printf(">>> Q(q)/rho_n = %g\n", Q(y, udata->alpha)/udata->rho_n); if (retval < 0) break; + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + Q(y, udata->alpha)/udata->rho_np1-Q0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); } } else { retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + Q(y, udata->alpha)/udata->rho_np1-Q0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); } - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); - N_VPrintFile(y, solution_fp); + if (retval >= 0) { /* successful solve: update time */ tout += dTout; tout = (tout > Tf) ? Tf : tout; @@ -336,6 +416,7 @@ int main(int argc, char* argv[]) if (Mp) ARKodeButcherTable_Free(Mp); if (NLS) SUNNonlinSolFree(NLS); N_VDestroy(y); + fclose(udata->hhist_fp); free(udata); fclose(times_fp); fclose(conserved_fp); @@ -361,15 +442,15 @@ sunrealtype Hamiltonian(N_Vector yvec) { sunrealtype H = 0.0; sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype sqrt_q1q1_plus_q2q2 = SUNRsqrt(y[0]*y[0] + y[1]*y[1]); - const sunrealtype p1p1_plus_p2p2 = y[2]*y[2] + y[3]*y[3]; + const sunrealtype sqrt_qTq = SUNRsqrt(y[0]*y[0] + y[1]*y[1]); + const sunrealtype pTp = y[2]*y[2] + y[3]*y[3]; // Perturbed - // H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2 - // - SUN_RCONST(0.005) / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) / SUN_RCONST(2.0); + // H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq + // - SUN_RCONST(0.005) / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) / SUN_RCONST(2.0); // Unperturbed - H = SUN_RCONST(0.5)*p1p1_plus_p2p2 - SUN_RCONST(1.0)/sqrt_q1q1_plus_q2q2; + H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq; return H; } @@ -383,8 +464,6 @@ sunrealtype AngularMomentum(N_Vector yvec) const sunrealtype p1 = y[2]; const sunrealtype p2 = y[3]; - // printf("[%.8f %.8f %.8f %.8f]\n", y[0], y[1], y[2], y[3]); - L = q1*p2 - q2*p1; return L; @@ -422,13 +501,13 @@ int dpdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) const sunrealtype delta = udata->delta; const sunrealtype q1 = y[0]; const sunrealtype q2 = y[1]; - const sunrealtype sqrt_q1q1_plus_q2q2 = SUNRsqrt(q1*q1 + q2*q2); + const sunrealtype sqrt_qTq = SUNRsqrt(q1*q1 + q2*q2); // ydot[0] = ydot[1] = SUN_RCONST(0.0); - ydot[2] = - q1 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) - - delta * q1 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(5.0)); - ydot[3] = - q2 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(3.0)) - - delta * q2 / SUNRpowerR(sqrt_q1q1_plus_q2q2, SUN_RCONST(5.0)); + ydot[2] = - q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) + - delta * q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(5.0)); + ydot[3] = - q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) + - delta * q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(5.0)); return 0; } @@ -455,7 +534,7 @@ sunrealtype Q(N_Vector yvec, sunrealtype alpha) const sunrealtype qTq = q1*q1 + q2*q2; - return SUNRpowerR(qTq, -alpha/2); + return SUNRpowerR(qTq, -alpha/SUN_RCONST(2.0)); } int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, @@ -465,10 +544,15 @@ int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, { UserData udata = (UserData) user_data; - const sunrealtype eps = udata->eps; - const sunrealtype rho_nphalf = udata->rho_n + eps*G(y, udata->alpha)/SUN_RCONST(2.0); + fprintf(udata->hhist_fp, "%.16f\n", h1); + + const sunrealtype G_np1 = G(y, udata->alpha); + udata->rho_np1 = udata->rho_nphalf + udata->eps*G_np1/SUN_RCONST(2.0); + + udata->rho_nmhalf = udata->rho_nphalf; + const sunrealtype rho_nphalf_next = udata->rho_nmhalf + udata->eps*G_np1; - *hnew = eps/rho_nphalf; + *hnew = udata->eps/rho_nphalf_next; return 0; } diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index 85610298c3..2dca54f3a6 100644 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -3,15 +3,16 @@ import numpy as np import matplotlib.pyplot as plt -t = np.loadtxt('ark_kepler_times_sprk-1.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_sprk-1.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_sprk-3.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_sprk-3.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) plt.plot(y[:,0], y[:,1]) -plt.savefig('ark_kepler_phase_plot.png') +plt.savefig('ark_kepler_phase.png') +plt.close() -conserved = np.loadtxt('ark_kepler_conserved_sprk-1.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_sprk-3.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] @@ -21,7 +22,9 @@ plt.title('Error in Hamiltonian') plt.plot(t, np.abs(energy-energy_0)) plt.ylabel('| error |') -plt.xlabel('time') +plt.xlabel('<--- t --->') +plt.xscale('log') +plt.yscale('log') plt.savefig('ark_kepler_energy.png') plt.close() @@ -29,10 +32,22 @@ plt.title('Error in Momentum') plt.plot(t, np.abs(L-L_0)) plt.ylabel('| error |') -plt.xlabel('time') +plt.xlabel('<--- t --->') +plt.xscale('log') +plt.yscale('log') plt.savefig('ark_kepler_momentum.png') plt.close() +# Step history +hhist = np.loadtxt('ark_kepler_hhist_sprk-3.txt', dtype=np.float64) +plt.figure(dpi=200) +plt.title('Step Size History') +plt.plot(t[:-1], hhist) +plt.xlabel('<--- t --->') +plt.yscale('log') +plt.savefig('ark_kepler_hhist.png') +plt.close() + # # Time plot. # @@ -58,5 +73,4 @@ plt.ylabel('<--- y2 --->') plt.title('ark_kepler: Phase Plot') plt.savefig('ark_kepler_phase.png') -plt.show(block = False) plt.close() \ No newline at end of file diff --git a/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py b/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py index c101cc2296..8670cc214f 100644 --- a/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py +++ b/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py @@ -3,28 +3,6 @@ import numpy as np import matplotlib.pyplot as plt -def Hamiltonian(y): - q1 = y[0] - q2 = y[1] - p1 = y[2] - p2 = y[3] - - h = 0.5 * ( p1**2 + p2**2 ) - 1.0 / np.sqrt ( q1**2 + q2**2 ) \ - - 0.005 / ( np.sqrt ( q1**2 + q2**2 ) )**3 / 2.0 - - return h - -def Momentum(y): - q1 = y[0] - q2 = y[1] - p1 = y[2] - p2 = y[3] - - L = q1*p2 - q2*p1 - - return L - - def load_results(case): t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) @@ -36,15 +14,17 @@ def load_results(case): sprk1 = load_results('_sprk-1') sprk2 = load_results('_sprk-2') sprk3 = load_results('_sprk-3') -sprkinc1 = load_results('_sprkinc-1') -sprkinc2 = load_results('_sprkinc-2') -sprkinc3 = load_results('_sprkinc-3') +sprk4 = load_results('_sprk-4') +# sprkinc1 = load_results('_sprkinc-1') +# sprkinc2 = load_results('_sprkinc-2') +# sprkinc3 = load_results('_sprkinc-3') all_to_compare = [] all_to_compare.append(sprk1) -# all_to_compare.append(sprk2) -# all_to_compare.append(sprk3) -all_to_compare.append(sprkinc1) +all_to_compare.append(sprk2) +all_to_compare.append(sprk3) +all_to_compare.append(sprk4) +# all_to_compare.append(sprkinc1) # all_to_compare.append(sprkinc2) # all_to_compare.append(sprkinc3) @@ -56,7 +36,7 @@ def load_results(case): energy_0 = [] for _, sol, consv in all_to_compare: energy.append(consv[:,0]) - energy_0.append(Hamiltonian(sol[0])) + energy_0.append(consv[0,0]) energy = np.array(energy) energy_0 = np.array(energy_0) energy_diff = np.abs(energy.T - energy_0) @@ -65,13 +45,15 @@ def load_results(case): plt.title('Error in Hamiltonian, h = %g' % h) plt.plot(t, energy_diff) plt.ylabel('| error |') -plt.xlabel('t') +plt.xlabel('<--- t --->') +plt.xscale('log') plt.yscale('log') legend = [] legend.append(r'$O(h^1)$ SPRK') -# legend.append(r'$O(h^2)$ SPRK') -# legend.append(r'$O(h^3)$ SPRK') -legend.append(r'$O(h^1)$ SPRK (inc)') +legend.append(r'$O(h^2)$ SPRK') +legend.append(r'$O(h^3)$ SPRK') +legend.append(r'$O(h^4)$ SPRK') +# legend.append(r'$O(h^1)$ SPRK (inc)') # legend.append(r'$O(h^2)$ SPRK (inc)') # legend.append(r'$O(h^3)$ SPRK (inc)') plt.legend(legend) @@ -81,7 +63,7 @@ def load_results(case): momentum_0 = [] for _, sol, consv in all_to_compare: momentum.append(consv[:,1]) - momentum_0.append(Momentum(sol[0])) + momentum_0.append(consv[0,1]) momentum = np.array(momentum) momentum_0 = np.array(momentum_0) momentum_diff = np.abs(momentum.T - momentum_0) @@ -90,22 +72,24 @@ def load_results(case): plt.title('Error in Momentum, h = %g' % h) plt.plot(t, momentum_diff) plt.ylabel('| error |') -plt.xlabel('t') +plt.xlabel('<--- t --->') +plt.xscale('log') plt.yscale('log') legend = [] legend.append(r'$O(h^1)$ SPRK') -# legend.append(r'$O(h^2)$ SPRK') -# legend.append(r'$O(h^3)$ SPRK') -legend.append(r'$O(h^1)$ SPRK (inc)') +legend.append(r'$O(h^2)$ SPRK') +legend.append(r'$O(h^3)$ SPRK') +legend.append(r'$O(h^4)$ SPRK') +# legend.append(r'$O(h^1)$ SPRK (inc)') # legend.append(r'$O(h^2)$ SPRK (inc)') # legend.append(r'$O(h^3)$ SPRK (inc)') plt.legend(legend) plt.savefig('ark_kepler_momentum_compare.png') -_, sol1, _ = sprk1 -_, sol2, _ = sprkinc1 -phase_diff = np.abs(sol1 - sol2) -print(phase_diff) +# _, sol1, _ = sprk1 +# _, sol2, _ = sprkinc1 +# phase_diff = np.abs(sol1 - sol2) +# print(phase_diff) # plt.figure(dpi=200) # plt.title('Error in Phase, h = %g' % h) From d42960e67f8a57f06a2b20fff4ceb3d333542d47 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Wed, 10 Aug 2022 23:39:26 -0700 Subject: [PATCH 020/177] small improvements/fixes --- examples/arkode/C_serial/ark_kepler.c | 7 +- .../arkode/C_serial/ark_kepler_plot_all.py | 152 +++++++++--------- .../C_serial/ark_kepler_plot_sprk_impls.py | 108 ------------- 3 files changed, 81 insertions(+), 186 deletions(-) delete mode 100644 examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 4e32798263..ea285d6bdf 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -101,7 +101,7 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(50.0); + sunrealtype Tf = SUN_RCONST(1000.0); // sunrealtype Tf = SUN_RCONST(100000.0); const sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); @@ -357,6 +357,7 @@ int main(int argc, char* argv[]) const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; const char* fmt3 = "ark_kepler_times_erk-%d.txt"; + const char* fmt4 = "ark_kepler_hhist_erk-%d.txt"; char fname[64]; sprintf(fname, fmt1, order); conserved_fp = fopen(fname, "w+"); @@ -364,8 +365,12 @@ int main(int argc, char* argv[]) solution_fp = fopen(fname, "w+"); sprintf(fname, fmt3, order); times_fp = fopen(fname, "w+"); + sprintf(fname, fmt4, order); + udata->hhist_fp = fopen(fname, "w+"); } + printf("\n Begin Kepler Problem\n\n"); + /* Do integration */ tret = T0; tout = T0+dTout; diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_all.py index 31ac223066..862a2632f9 100644 --- a/examples/arkode/C_serial/ark_kepler_plot_all.py +++ b/examples/arkode/C_serial/ark_kepler_plot_all.py @@ -3,28 +3,6 @@ import numpy as np import matplotlib.pyplot as plt -def Hamiltonian(y): - q1 = y[0] - q2 = y[1] - p1 = y[2] - p2 = y[3] - - h = 0.5 * ( p1**2 + p2**2 ) - 1.0 / np.sqrt ( q1**2 + q2**2 ) \ - - 0.005 / ( np.sqrt ( q1**2 + q2**2 ) )**3 / 2.0 - - return h - -def Momentum(y): - q1 = y[0] - q2 = y[1] - p1 = y[2] - p2 = y[3] - - L = q1*p2 - q2*p1 - - return L - - def load_results(case): t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) @@ -33,86 +11,106 @@ def load_results(case): return t, y, conserved -t, y_sprk_1, consv_sprk_1 = load_results('_sprk-1') -t, y_erk_2, consv_erk_2 = load_results('_erk-2') -t, y_sprk_2, consv_sprk_2 = load_results('_sprk-2') -t, y_erk_3, consv_erk_3 = load_results('_erk-3') -t, y_sprk_3, consv_sprk_3 = load_results('_sprk-3') -t, y_erk_4, consv_erk_4 = load_results('_erk-4') +sprk1 = load_results('_sprk-1') +sprk2 = load_results('_sprk-2') +sprk3 = load_results('_sprk-3') +sprk4 = load_results('_sprk-4') +erk2 = load_results('_erk-2') +erk3 = load_results('_erk-3') +# sprkinc1 = load_results('_sprkinc-1') +# sprkinc2 = load_results('_sprkinc-2') +# sprkinc3 = load_results('_sprkinc-3') + +all_to_compare = [] +all_to_compare.append(sprk1) +all_to_compare.append(sprk2) +all_to_compare.append(sprk3) +all_to_compare.append(sprk4) +all_to_compare.append(erk2) +all_to_compare.append(erk3) +# all_to_compare.append(sprkinc1) +# all_to_compare.append(sprkinc2) +# all_to_compare.append(sprkinc3) h = 0.01 +t = sprk1[0] trend_line_erk_2 = t*h*h energy = [] -energy.append(consv_sprk_1[:,0]) -energy.append(consv_erk_2[:,0]) -# energy.append(trend_line_erk_2) -energy.append(consv_sprk_2[:,0]) -energy.append(consv_erk_3[:,0]) -energy.append(consv_sprk_3[:,0]) -# energy.append(consv_erk_4[:,0]) -energy = np.array(energy) - energy_0 = [] -energy_0.append(Hamiltonian(y_sprk_1[0])) -energy_0.append(Hamiltonian(y_erk_2[0])) -# energy_0.append(0.0) -energy_0.append(Hamiltonian(y_sprk_2[0])) -energy_0.append(Hamiltonian(y_erk_3[0])) -energy_0.append(Hamiltonian(y_sprk_3[0])) -# energy_0.append(Hamiltonian(y_erk_4[0])) +for _, sol, consv in all_to_compare: + energy.append(consv[:,0]) + energy_0.append(consv[0,0]) +energy = np.array(energy) energy_0 = np.array(energy_0) - energy_diff = np.abs(energy.T - energy_0) + plt.figure(dpi=200) -plt.title('Error in Hamiltonian, h = 0.01') +plt.title('Error in Hamiltonian, h = %g' % h) plt.plot(t, energy_diff) plt.ylabel('| error |') -plt.xlabel('t') +plt.xlabel('<--- t --->') +plt.xscale('log') plt.yscale('log') legend = [] legend.append(r'$O(h^1)$ SPRK') -legend.append(r'$O(h^2)$ ERK') legend.append(r'$O(h^2)$ SPRK') -legend.append(r'$O(h^3)$ ERK') legend.append(r'$O(h^3)$ SPRK') -# legend.append(r'$O(h^4)$ ERK') +legend.append(r'$O(h^4)$ SPRK') +legend.append(r'$O(h^2)$ ERK') +legend.append(r'$O(h^3)$ ERK') +# legend.append(r'$O(h^1)$ SPRK (inc)') +# legend.append(r'$O(h^2)$ SPRK (inc)') +# legend.append(r'$O(h^3)$ SPRK (inc)') plt.legend(legend) plt.savefig('ark_kepler_energy_compare.png') -L = [] -L.append(consv_sprk_1[:,1]) -L.append(consv_erk_2[:,1]) -# L.append(trend_line_erk_2) -L.append(consv_sprk_2[:,1]) -L.append(consv_erk_3[:,1]) -L.append(consv_sprk_3[:,1]) -# L.append(consv_erk_4[:,1]) -L = np.array(L) +momentum = [] +momentum_0 = [] +for _, sol, consv in all_to_compare: + momentum.append(consv[:,1]) + momentum_0.append(consv[0,1]) +momentum = np.array(momentum) +momentum_0 = np.array(momentum_0) +momentum_diff = np.abs(momentum.T - momentum_0) -L_0 = [] -L_0.append(Momentum(y_sprk_1[1])) -L_0.append(Momentum(y_erk_2[1])) -# L_0.append(0.0) -L_0.append(Momentum(y_sprk_2[1])) -L_0.append(Momentum(y_erk_3[1])) -L_0.append(Momentum(y_sprk_3[1])) -# L_0.append(Momentum(y_erk_4[1])) -L_0 = np.array(L_0) - -L_diff = np.abs(L.T - L_0) plt.figure(dpi=200) -plt.title('Error in Momentum, h = 0.01') -plt.plot(t, L_diff) +plt.title('Error in Momentum, h = %g' % h) +plt.plot(t, momentum_diff) plt.ylabel('| error |') -plt.xlabel('t') +plt.xlabel('<--- t --->') +plt.xscale('log') plt.yscale('log') legend = [] legend.append(r'$O(h^1)$ SPRK') -legend.append(r'$O(h^2)$ ERK') legend.append(r'$O(h^2)$ SPRK') -legend.append(r'$O(h^3)$ ERK') legend.append(r'$O(h^3)$ SPRK') -# legend.append(r'$O(h^4)$ ERK') +legend.append(r'$O(h^4)$ SPRK') +legend.append(r'$O(h^2)$ ERK') +legend.append(r'$O(h^3)$ ERK') +# legend.append(r'$O(h^1)$ SPRK (inc)') +# legend.append(r'$O(h^2)$ SPRK (inc)') +# legend.append(r'$O(h^3)$ SPRK (inc)') plt.legend(legend) -plt.savefig('ark_kepler_momentum_compare.png') \ No newline at end of file +plt.savefig('ark_kepler_momentum_compare.png') + +# _, sol1, _ = sprk1 +# _, sol2, _ = sprkinc1 +# phase_diff = np.abs(sol1 - sol2) +# print(phase_diff) + +# plt.figure(dpi=200) +# plt.title('Error in Phase, h = %g' % h) +# plt.plot(t, momentum_diff) +# plt.ylabel('| error |') +# plt.xlabel('t') +# plt.yscale('log') +# legend = [] +# legend.append(r'$O(h^1)$ SPRK') +# # legend.append(r'$O(h^2)$ SPRK') +# # legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^1)$ SPRK (inc)') +# # legend.append(r'$O(h^2)$ SPRK (inc)') +# # legend.append(r'$O(h^3)$ SPRK (inc)') +# plt.legend(legend) +# plt.savefig('ark_kepler_phase_compare.png') \ No newline at end of file diff --git a/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py b/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py deleted file mode 100644 index 8670cc214f..0000000000 --- a/examples/arkode/C_serial/ark_kepler_plot_sprk_impls.py +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env python - -import numpy as np -import matplotlib.pyplot as plt - -def load_results(case): - t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) - y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) - y = np.reshape(y, (y.shape[0]//4, 4)) - conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) - return t, y, conserved - - -sprk1 = load_results('_sprk-1') -sprk2 = load_results('_sprk-2') -sprk3 = load_results('_sprk-3') -sprk4 = load_results('_sprk-4') -# sprkinc1 = load_results('_sprkinc-1') -# sprkinc2 = load_results('_sprkinc-2') -# sprkinc3 = load_results('_sprkinc-3') - -all_to_compare = [] -all_to_compare.append(sprk1) -all_to_compare.append(sprk2) -all_to_compare.append(sprk3) -all_to_compare.append(sprk4) -# all_to_compare.append(sprkinc1) -# all_to_compare.append(sprkinc2) -# all_to_compare.append(sprkinc3) - -h = 0.01 -t = sprk1[0] -trend_line_erk_2 = t*h*h - -energy = [] -energy_0 = [] -for _, sol, consv in all_to_compare: - energy.append(consv[:,0]) - energy_0.append(consv[0,0]) -energy = np.array(energy) -energy_0 = np.array(energy_0) -energy_diff = np.abs(energy.T - energy_0) - -plt.figure(dpi=200) -plt.title('Error in Hamiltonian, h = %g' % h) -plt.plot(t, energy_diff) -plt.ylabel('| error |') -plt.xlabel('<--- t --->') -plt.xscale('log') -plt.yscale('log') -legend = [] -legend.append(r'$O(h^1)$ SPRK') -legend.append(r'$O(h^2)$ SPRK') -legend.append(r'$O(h^3)$ SPRK') -legend.append(r'$O(h^4)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# legend.append(r'$O(h^2)$ SPRK (inc)') -# legend.append(r'$O(h^3)$ SPRK (inc)') -plt.legend(legend) -plt.savefig('ark_kepler_energy_compare.png') - -momentum = [] -momentum_0 = [] -for _, sol, consv in all_to_compare: - momentum.append(consv[:,1]) - momentum_0.append(consv[0,1]) -momentum = np.array(momentum) -momentum_0 = np.array(momentum_0) -momentum_diff = np.abs(momentum.T - momentum_0) - -plt.figure(dpi=200) -plt.title('Error in Momentum, h = %g' % h) -plt.plot(t, momentum_diff) -plt.ylabel('| error |') -plt.xlabel('<--- t --->') -plt.xscale('log') -plt.yscale('log') -legend = [] -legend.append(r'$O(h^1)$ SPRK') -legend.append(r'$O(h^2)$ SPRK') -legend.append(r'$O(h^3)$ SPRK') -legend.append(r'$O(h^4)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# legend.append(r'$O(h^2)$ SPRK (inc)') -# legend.append(r'$O(h^3)$ SPRK (inc)') -plt.legend(legend) -plt.savefig('ark_kepler_momentum_compare.png') - -# _, sol1, _ = sprk1 -# _, sol2, _ = sprkinc1 -# phase_diff = np.abs(sol1 - sol2) -# print(phase_diff) - -# plt.figure(dpi=200) -# plt.title('Error in Phase, h = %g' % h) -# plt.plot(t, momentum_diff) -# plt.ylabel('| error |') -# plt.xlabel('t') -# plt.yscale('log') -# legend = [] -# legend.append(r'$O(h^1)$ SPRK') -# # legend.append(r'$O(h^2)$ SPRK') -# # legend.append(r'$O(h^3)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# # legend.append(r'$O(h^2)$ SPRK (inc)') -# # legend.append(r'$O(h^3)$ SPRK (inc)') -# plt.legend(legend) -# plt.savefig('ark_kepler_phase_compare.png') \ No newline at end of file From 4661e9a23f8c41bb6fe453fe7ec2b0c5f7423072 Mon Sep 17 00:00:00 2001 From: "Balos, Cody Joe" Date: Tue, 4 Oct 2022 14:23:15 -0700 Subject: [PATCH 021/177] save work --- examples/arkode/C_serial/ark_kepler.c | 78 +- include/arkode/arkode.h | 2 +- include/arkode/arkode_sprk.h | 55 ++ include/arkode/arkode_sprkstep.h | 238 +++++ src/arkode/CMakeLists.txt | 3 + src/arkode/arkode_arkstep.c | 13 +- src/arkode/arkode_sprk.c | 166 ++++ src/arkode/arkode_sprk_methods.h | 1 + src/arkode/arkode_sprkstep.c | 1315 +++++++++++++++++++++++++ src/arkode/arkode_sprkstep_impl.h | 127 +++ src/arkode/arkode_sprkstep_io.c | 426 ++++++++ src/arkode/arkode_timestepper_impl.h | 13 + 12 files changed, 2388 insertions(+), 49 deletions(-) create mode 100644 include/arkode/arkode_sprk.h create mode 100644 include/arkode/arkode_sprkstep.h create mode 100644 src/arkode/arkode_sprk.c create mode 100644 src/arkode/arkode_sprk_methods.h create mode 100644 src/arkode/arkode_sprkstep.c create mode 100644 src/arkode/arkode_sprkstep_impl.h create mode 100644 src/arkode/arkode_sprkstep_io.c create mode 100644 src/arkode/arkode_timestepper_impl.h diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index ea285d6bdf..2afc2701f4 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -40,7 +40,7 @@ #include #include -#include /* prototypes for MRIStep fcts., consts */ +#include /* prototypes for MRIStep fcts., consts */ #include /* prototypes for ARKStep fcts., consts */ #include /* serial N_Vector type, fcts., macros */ #include /* def. math fcns, 'sunrealtype' */ @@ -146,9 +146,12 @@ int main(int argc, char* argv[]) /* Fill the initial conditions */ InitialConditions(y, ecc); - /* Create ARKStep integrator where we treat dqdt explicitly and dpdt implicitly */ + /* Create SPRKStep integrator where we treat dqdt explicitly and dpdt implicitly */ if (method == 0) { - arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); + const int num_rhs = 2; + ARKRhsFn rhs[2] = { dqdt, dpdt }; + + arkode_mem = SPRKStepCreate(rhs, T0, y, SPRKStepDefaultSPRK(order), sunctx); /* 4th order scheme [McLauchlan] */ if (order == 4) { @@ -288,49 +291,50 @@ int main(int argc, char* argv[]) Mq->p = 0; } - retval = ARKStepSetTables(arkode_mem, order, 0, Mp, Mq); - if (check_retval(&retval, "ARKStepSetTables", 1)) return 1; + retval = SPRKStepSetTables(arkode_mem, order, 0, Mp, Mq); + if (check_retval(&retval, "SPRKStepSetTables", 1)) return 1; - retval = ARKStepSetSeparableRhs(arkode_mem, SUNTRUE); - if (check_retval(&retval, "ARKStepSetSeparableRhs", 1)) return 1; - } else if (method == 1) { - arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); + if (step_mode == 1) { + retval = SPRKStepSetFixedStep(arkode_mem, dt); + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - retval = ARKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - } else { - arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); + retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + } else if (step_mode == 2 || step_mode == 3) { + /* Adaptivity based on [Hairer and Soderlind, 2005] */ + retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - retval = ARKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); + udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); + retval = SPRKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); + if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; - NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); - ARKStepSetNonlinearSolver(arkode_mem, NLS); - } + retval = SPRKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + } - /* Setup ARKStep */ - retval = ARKStepSetUserData(arkode_mem, (void *) udata); - if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; + retval = SPRKStepSetUserData(arkode_mem, (void *) udata); + if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; + } else if (method >= 1) { + if (method == 1) { + arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); - if (step_mode == 1) { - retval = ARKStepSetFixedStep(arkode_mem, dt); - if (check_retval(&retval, "ARKStepSetFixedStep", 1)) return 1; + retval = ARKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + } else { + arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); + + retval = ARKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - retval = ARKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); - if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - } else if (step_mode == 2 || step_mode == 3) { - /* Adaptivity based on [Hairer and Soderlind, 2005] */ - retval = ARKStepSetAdaptivityFn(arkode_mem, Adapt, udata); - if (check_retval(&retval, "ARKStepSetFixedStep", 1)) return 1; + NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); + ARKStepSetNonlinearSolver(arkode_mem, NLS); + } - udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); - udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); - retval = ARKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); - if (check_retval(&retval, "ARKStepSetInitStep", 1)) return 1; + retval = ARKStepSetUserData(arkode_mem, (void *) udata); + if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - retval = ARKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); - if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - } else { retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index be8bd7a543..4b5772d9e2 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -139,7 +139,7 @@ extern "C" { * ------------------------------ */ typedef int (*ARKRhsFn)(realtype t, N_Vector y, - N_Vector ydot, void *user_data); + N_Vector ydot, void *user_data); typedef int (*ARKRootFn)(realtype t, N_Vector y, realtype *gout, void *user_data); diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h new file mode 100644 index 0000000000..395c70260a --- /dev/null +++ b/include/arkode/arkode_sprk.h @@ -0,0 +1,55 @@ +/* ----------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ----------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------- + * -----------------------------------------------------------------*/ + +#ifndef _ARKODE_SPRKMEM_H +#define _ARKODE_SPRKMEM_H + +#include +#include + +#ifdef __cplusplus /* wrapper to enable C++ usage */ +extern "C" { +#endif + +struct ARKodeSprkMem_s { + + int q; /* method order of accuracy */ + int stages; /* number of stages */ + sunrealtype* b; /* diagonally implicit cofficients */ + sunrealtype* B; /* explicit table coefficients */ + +}; + +typedef _SUNDIALS_STRUCT_ ARKodeSprkMem_s *ARKodeSprkMem; + +/* Utility routines to allocate/free/output SPRK structures */ +SUNDIALS_EXPORT ARKodeSprkMem ARKodeSprkMem_Alloc(int stages); +SUNDIALS_EXPORT ARKodeSprkMem ARKodeSprkMem_Copy(ARKodeSprkMem B); +SUNDIALS_EXPORT void ARKodeSprkMem_Space(ARKodeSprkMem B, sunindextype *liw, sunindextype *lrw); +SUNDIALS_EXPORT void ARKodeSprkMem_Free(ARKodeSprkMem B); +SUNDIALS_EXPORT int ARKodeSprkMem_ToButcher(ARKodeSprkMem sprk_mem, ARKodeButcherTable* b_ptr, ARKodeButcherTable* B_ptr); + +typedef enum { + ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ + ARKODE_MIN_SPRK_NUM = 0, + ARKODE_SYMPLECTIC_EULER = ARKODE_MIN_SPRK_NUM, + ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_EULER +} ARKODE_SPRKMethodID; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h new file mode 100644 index 0000000000..a6d7152426 --- /dev/null +++ b/include/arkode/arkode_sprkstep.h @@ -0,0 +1,238 @@ +/* ----------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ----------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------- + * This is the header file for the ARKode SPRKStep module. + * -----------------------------------------------------------------*/ + +#ifndef _SPRKSTEP_H +#define _SPRKSTEP_H + +#include +#include +#include +#include +#include + +#ifdef __cplusplus /* wrapper to enable C++ usage */ +extern "C" { +#endif + +/* ----------------- + * SPRKStep Constants + * ----------------- */ + +struct TakeStepFunctor; +typedef struct TakeStepFunctor* TakeStep; + +/* ------------------- + * Exported Functions + * ------------------- */ + +/* Create, Resize, and Reinitialization functions */ +SUNDIALS_EXPORT void* SPRKStepCreate(ARKRhsFn* fk, int num_rhs, + realtype t0, N_Vector y0, + TakeStepFunctor take_step, + SUNContext sunctx); + +SUNDIALS_EXPORT int SPRKStepResize(void *arkode_mem, N_Vector ynew, + realtype hscale, realtype t0, + ARKVecResizeFn resize, + void *resize_data); + +SUNDIALS_EXPORT int SPRKStepReInit(void* arkode_mem, ARKRhsFn* fk, realtype t0, N_Vector y0); + +SUNDIALS_EXPORT int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR); + +/* Tolerance input functions */ +SUNDIALS_EXPORT int SPRKStepSStolerances(void *arkode_mem, + realtype reltol, + realtype abstol); +SUNDIALS_EXPORT int SPRKStepSVtolerances(void *arkode_mem, + realtype reltol, + N_Vector abstol); +SUNDIALS_EXPORT int SPRKStepWFtolerances(void *arkode_mem, + ARKEwtFn efun); + +/* Residual tolerance input functions */ +SUNDIALS_EXPORT int SPRKStepResStolerance(void *arkode_mem, + realtype rabstol); +SUNDIALS_EXPORT int SPRKStepResVtolerance(void *arkode_mem, + N_Vector rabstol); +SUNDIALS_EXPORT int SPRKStepResFtolerance(void *arkode_mem, + ARKRwtFn rfun); + +// SUNDIALS_EXPORT int SPRKStepSetMassLinearSolver(void *arkode_mem, +// SUNLinearSolver LS, +// SUNMatrix M, +// booleantype time_dep); + +/* Optional input functions -- must be called AFTER SPRKStepCreate */ +SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); +SUNDIALS_EXPORT int SPRKStepSetOptimalParams(void *arkode_mem); +SUNDIALS_EXPORT int SPRKStepSetOrder(void *arkode_mem, int maxord); +SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void *arkode_mem, int itype); +SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void *arkode_mem, int degree); +SUNDIALS_EXPORT int SPRKStepSetDenseOrder(void *arkode_mem, int dord); + +SUNDIALS_EXPORT int SPRKStepSetSafetyFactor(void *arkode_mem, + realtype safety); +SUNDIALS_EXPORT int SPRKStepSetErrorBias(void *arkode_mem, + realtype bias); +SUNDIALS_EXPORT int SPRKStepSetMaxGrowth(void *arkode_mem, + realtype mx_growth); +SUNDIALS_EXPORT int SPRKStepSetMinReduction(void *arkode_mem, + realtype eta_min); +SUNDIALS_EXPORT int SPRKStepSetFixedStepBounds(void *arkode_mem, + realtype lb, realtype ub); +SUNDIALS_EXPORT int SPRKStepSetAdaptivityMethod(void *arkode_mem, + int imethod, + int idefault, int pq, + realtype adapt_params[3]); +SUNDIALS_EXPORT int SPRKStepSetAdaptivityFn(void *arkode_mem, + ARKAdaptFn hfun, + void *h_data); +SUNDIALS_EXPORT int SPRKStepSetMaxFirstGrowth(void *arkode_mem, + realtype etamx1); +SUNDIALS_EXPORT int SPRKStepSetMaxEFailGrowth(void *arkode_mem, + realtype etamxf); +SUNDIALS_EXPORT int SPRKStepSetSmallNumEFails(void *arkode_mem, + int small_nef); +SUNDIALS_EXPORT int SPRKStepSetMaxCFailGrowth(void *arkode_mem, + realtype etacf); +SUNDIALS_EXPORT int SPRKStepSetNonlinCRDown(void *arkode_mem, + realtype crdown); +SUNDIALS_EXPORT int SPRKStepSetNonlinRDiv(void *arkode_mem, + realtype rdiv); +SUNDIALS_EXPORT int SPRKStepSetStabilityFn(void *arkode_mem, + ARKExpStabFn EStab, + void *estab_data); +SUNDIALS_EXPORT int SPRKStepSetMaxErrTestFails(void *arkode_mem, + int maxnef); +SUNDIALS_EXPORT int SPRKStepSetMaxNumSteps(void *arkode_mem, + long int mxsteps); +SUNDIALS_EXPORT int SPRKStepSetMaxHnilWarns(void *arkode_mem, + int mxhnil); +SUNDIALS_EXPORT int SPRKStepSetInitStep(void *arkode_mem, + realtype hin); +SUNDIALS_EXPORT int SPRKStepSetMinStep(void *arkode_mem, + realtype hmin); +SUNDIALS_EXPORT int SPRKStepSetMaxStep(void *arkode_mem, + realtype hmax); +SUNDIALS_EXPORT int SPRKStepSetStopTime(void *arkode_mem, + realtype tstop); +SUNDIALS_EXPORT int SPRKStepSetFixedStep(void *arkode_mem, + realtype hfixed); +SUNDIALS_EXPORT int SPRKStepSetErrHandlerFn(void *arkode_mem, + ARKErrHandlerFn ehfun, + void *eh_data); +SUNDIALS_EXPORT int SPRKStepSetErrFile(void *arkode_mem, + FILE *errfp); +SUNDIALS_EXPORT int SPRKStepSetUserData(void *arkode_mem, + void *user_data); + +SUNDIALS_EXPORT int SPRKStepSetPostprocessStepFn(void *arkode_mem, + ARKPostProcessFn ProcessStep); +SUNDIALS_EXPORT int SPRKStepSetPostprocessStageFn(void *arkode_mem, + ARKPostProcessFn ProcessStage); + +/* Integrate the ODE over an interval in t */ +SUNDIALS_EXPORT int SPRKStepEvolve(void *arkode_mem, realtype tout, + N_Vector yout, realtype *tret, + int itask); + +/* Computes the kth derivative of the y function at time t */ +SUNDIALS_EXPORT int SPRKStepGetDky(void *arkode_mem, realtype t, + int k, N_Vector dky); + +/* Utility function to update/compute y based on zcor */ +SUNDIALS_EXPORT int SPRKStepComputeState(void *arkode_mem, N_Vector zcor, + N_Vector z); + +/* Optional output functions */ +SUNDIALS_EXPORT int SPRKStepGetNumExpSteps(void *arkode_mem, + long int *expsteps); +SUNDIALS_EXPORT int SPRKStepGetNumAccSteps(void *arkode_mem, + long int *accsteps); +SUNDIALS_EXPORT int SPRKStepGetNumStepAttempts(void *arkode_mem, + long int *step_attempts); +SUNDIALS_EXPORT int SPRKStepGetNumRhsEvals(void *arkode_mem, long int** fk_evals); +SUNDIALS_EXPORT int SPRKStepGetNumErrTestFails(void *arkode_mem, + long int *netfails); +SUNDIALS_EXPORT int SPRKStepGetEstLocalErrors(void *arkode_mem, + N_Vector ele); +SUNDIALS_EXPORT int SPRKStepGetWorkSpace(void *arkode_mem, + long int *lenrw, + long int *leniw); +SUNDIALS_EXPORT int SPRKStepGetNumSteps(void *arkode_mem, + long int *nsteps); +SUNDIALS_EXPORT int SPRKStepGetActualInitStep(void *arkode_mem, + realtype *hinused); +SUNDIALS_EXPORT int SPRKStepGetLastStep(void *arkode_mem, + realtype *hlast); +SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void *arkode_mem, + realtype *hcur); +SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void *arkode_mem, + realtype *tcur); +SUNDIALS_EXPORT int SPRKStepGetCurrentState(void *arkode_mem, + N_Vector *state); +SUNDIALS_EXPORT int SPRKStepGetCurrentGamma(void *arkode_mem, + realtype *gamma); +SUNDIALS_EXPORT int SPRKStepGetCurrentMassMatrix(void *arkode_mem, + SUNMatrix *M); +SUNDIALS_EXPORT int SPRKStepGetTolScaleFactor(void *arkode_mem, + realtype *tolsfac); +SUNDIALS_EXPORT int SPRKStepGetErrWeights(void *arkode_mem, + N_Vector eweight); +SUNDIALS_EXPORT int SPRKStepGetResWeights(void *arkode_mem, + N_Vector rweight); +SUNDIALS_EXPORT int SPRKStepGetUserData(void *arkode_mem, + void **user_data); +SUNDIALS_EXPORT int SPRKStepPrintAllStats(void *arkode_mem, FILE *outfile, + SUNOutputFormat fmt); +SUNDIALS_EXPORT char *SPRKStepGetReturnFlagName(long int flag); +SUNDIALS_EXPORT int SPRKStepWriteParameters(void *arkode_mem, FILE *fp); + + +/* Grouped optional output functions */ +SUNDIALS_EXPORT int SPRKStepGetTimestepperStats(void *arkode_mem, + long int *expsteps, + long int *accsteps, + long int *step_attempts, + long int **nfk_evals, + long int *nlinsetups, + long int *netfails); +SUNDIALS_EXPORT int SPRKStepGetStepStats(void *arkode_mem, + long int *nsteps, + realtype *hinused, + realtype *hlast, + realtype *hcur, + realtype *tcur); + +SUNDIALS_EXPORT int SPRKStepGetNumStepSolveFails(void *arkode_mem, + long int *nncfails); + +/* Free function */ +SUNDIALS_EXPORT void SPRKStepFree(void **arkode_mem); + +/* Output the SPRKStep memory structure (useful when debugging) */ +SUNDIALS_EXPORT void SPRKStepPrintMem(void* arkode_mem, FILE* outfile); + +/* MRIStep interface functions */ +SUNDIALS_EXPORT int SPRKStepCreateMRIStepInnerStepper(void *arkode_mem, + MRIStepInnerStepper *stepper); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/arkode/CMakeLists.txt b/src/arkode/CMakeLists.txt index 530ac098cd..2f0544a5f2 100644 --- a/src/arkode/CMakeLists.txt +++ b/src/arkode/CMakeLists.txt @@ -37,6 +37,9 @@ set(arkode_SOURCES arkode_mristep_nls.c arkode_mristep.c arkode_root.c + # arkode_sprkstep_io.c + # arkode_sprkstep.c + arkode_sprk.c arkode.c ) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index a9f2d1dec6..5eff0ee84a 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -227,6 +227,7 @@ int ARKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); + // TODO(CJB): I think this is redundant (arkResize does it) /* Determing change in vector sizes */ lrw1 = liw1 = 0; if (y0->ops->nvspace != NULL) @@ -1214,17 +1215,7 @@ int arkStep_Init(void* arkode_mem, int init_type) if (step_mem->predictor == 4) ark_mem->call_fullrhs = SUNTRUE; } - /* set appropriate TakeStep routine based on problem configuration */ - /* (only one choice for now) */ - // if (step_mem->separable_rhs) { - // if (ark_mem->compensated_sums) { - // ark_mem->step = arkStep_TakeStep_SprkInc; - // } else { - ark_mem->step = arkStep_TakeStep_Sprk; - // } - // } else { - // ark_mem->step = arkStep_TakeStep_Z; - // } + ark_mem->step = arkStep_TakeStep_Z; /* Check for consistency between mass system and system linear system modules (e.g., if lsolve is direct, msolve needs to match) */ diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c new file mode 100644 index 0000000000..6b3217aa12 --- /dev/null +++ b/src/arkode/arkode_sprk.c @@ -0,0 +1,166 @@ +/*--------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + *--------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + *--------------------------------------------------------------- + *--------------------------------------------------------------*/ + +#include +#include +#include +#include "arkode/arkode.h" +#include "arkode/arkode_butcher.h" +#include "sundials/sundials_types.h" + +static const struct ARKodeSprkMem_s SymplecticEuler = { + /* q = */ 1, + /* stages = */ 1, + /* b = */ { SUN_RCONST(1.0) }, + /* B = */ { SUN_RCONST(1.0) } +}; + +static const struct ARKodeSprkMem_s PseudoLeapfrog = { + /* q = */ 2, + /* stages = */ 2, + /* b = */ { SUN_RCONST(0.5), SUN_RCONST(0.5) }, + /* B = */ { SUN_RCONST(1.0), SUN_RCONST(0.0) } +}; + +static const struct ARKodeSprkMem_s Ruth3 = { + /* q = */ 3, + /* stages = */ 3, + /* b = */ { + SUN_RCONST(7.0)/SUN_RCONST(24.0), + SUN_RCONST(3.0)/SUN_RCONST(4.0), + -SUN_RCONST(1.0)/SUN_RCONST(24.0) + }, + /* B = */ { + /* a1 = */ SUN_RCONST(2.0)/SUN_RCONST(3.0), + /* a2 = */ -SUN_RCONST(2.0)/SUN_RCONST(3.0), + /* a3 = */ SUN_RCONST(1.0) + } +}; + +static const struct ARKodeSprkMem_s McLauchlan4 = { + /* q = */ 4, + /* stages = */ 4, + /* b = */ { + SUN_RCONST(0.134496199277431089), + -SUN_RCONST(0.224819803079420806), + SUN_RCONST(0.756320000515668291), + SUN_RCONST(0.33400360328632142) + }, + /* B = */ { + SUN_RCONST(0.515352837431122936), + -SUN_RCONST(0.085782019412973646), + SUN_RCONST(0.441583023616466524), + SUN_RCONST(0.128846158365384185) + } +}; + +ARKodeSprkMem ARKodeSprkMem_Alloc(int stages) +{ + ARKodeSprkMem sprk_mem; + + sprk_mem = (ARKodeSprkMem) malloc(sizeof(struct ARKodeSprkMem_s)); + + sprk_mem->q = 0; + sprk_mem->stages = stages; + sprk_mem->b = (sunrealtype*) malloc(stages*sizeof(sunrealtype)); + sprk_mem->B = (sunrealtype*) malloc(stages*sizeof(sunrealtype)); + + return sprk_mem; +} + +ARKodeSprkMem ARKodeSprkMem_Copy(ARKodeSprkMem that_sprk_mem) +{ + int i; + ARKodeSprkMem sprk_mem; + + sprk_mem = ARKodeSprkMem_Alloc(that_sprk_mem->stages); + + sprk_mem->q = that_sprk_mem->q; + + for (i = 0; i < sprk_mem->stages; ++i) + { + sprk_mem->b[i] = that_sprk_mem->b[i]; + sprk_mem->B[i] = that_sprk_mem->B[i]; + } + + return sprk_mem; +} + +void ARKodeSprkMem_Space(ARKodeSprkMem sprk_mem, sunindextype *liw, sunindextype *lrw) +{ + *liw = 2; + *lrw = sprk_mem->stages * 2; + return; +} + +void ARKodeSprkMem_Free(ARKodeSprkMem sprk_mem) +{ + if (sprk_mem) + { + free(sprk_mem->b); + free(sprk_mem->B); + free(sprk_mem); + } + return; +} + +int ARKodeSprkMem_ToButcher(ARKodeSprkMem sprk_mem, ARKodeButcherTable* b_ptr, ARKodeButcherTable* B_ptr) +{ + int i, j; + ARKodeButcherTable b, B; + + b = *b_ptr; + B = *B_ptr; + + b = ARKodeButcherTable_Alloc(sprk_mem->stages, SUNFALSE); + B = ARKodeButcherTable_Alloc(sprk_mem->stages, SUNFALSE); + + /* DIRK table */ + for (i = 0; i < sprk_mem->stages; ++i) + { + b->b[i] = sprk_mem->b[i]; + for (j = 0; j <= i; ++j) + { + b->A[i][j] = sprk_mem->b[j]; + } + } + + /* Explicit table */ + for (i = 0; i < sprk_mem->stages; ++i) + { + B->b[i] = sprk_mem->B[i]; + for (j = 0; j < i; ++j) + { + B->A[i][j] = sprk_mem->B[j]; + } + } + + /* Time weights: C_j = sum_{i=0}^{j-1} B_i */ + for (j = 0; j < sprk_mem->stages; ++j) { + for (i = 0; i < j; ++i) { + b->c[j] += sprk_mem->B[i]; + } + } + + /* Set method order */ + b->q = sprk_mem->q; + B->q = sprk_mem->q; + + /* No embedding, so set embedding order to 0 */ + b->p = 0; + B->p = 0; + + return ARK_SUCCESS; +} diff --git a/src/arkode/arkode_sprk_methods.h b/src/arkode/arkode_sprk_methods.h new file mode 100644 index 0000000000..72fbdac82d --- /dev/null +++ b/src/arkode/arkode_sprk_methods.h @@ -0,0 +1 @@ +#include diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c new file mode 100644 index 0000000000..95e71f211f --- /dev/null +++ b/src/arkode/arkode_sprkstep.c @@ -0,0 +1,1315 @@ +/*--------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ SMU + *--------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + *--------------------------------------------------------------- + * This is the implementation file for ARKODE's ARK time stepper + * module. + *--------------------------------------------------------------*/ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "arkode/arkode_sprkstep.h" +#include "arkode_impl.h" +#include "arkode_sprkstep_impl.h" +#include "arkode_sprk_methods.h" +#include "arkode_interp_impl.h" + +/*=============================================================== + SPRKStep Exported functions -- Required + ===============================================================*/ + +void* SPRKStepCreate(ARKRhsFn* fk, int num_rhs, realtype t0, N_Vector y0, + TakeStep take_step, SUNContext sunctx) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + booleantype nvectorOK; + int retval; + + /* Check that at least one of fk is supplied and is to be used */ + if (fk == NULL) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", + "SPRKStepCreate", MSG_ARK_NULL_F); + return(NULL); + } + + /* Check for legal input parameters */ + if (y0 == NULL) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", + "SPRKStepCreate", MSG_ARK_NULL_Y0); + return(NULL); + } + + if (!sunctx) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", + "SPRKStepCreate", MSG_ARK_NULL_SUNCTX); + return(NULL); + } + + /* Test if all required vector operations are implemented */ + nvectorOK = sprkStep_CheckNVector(y0); + if (!nvectorOK) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", + "SPRKStepCreate", MSG_ARK_BAD_NVECTOR); + return(NULL); + } + + /* Create ark_mem structure and set default values */ + ark_mem = arkCreate(sunctx); + if (ark_mem == NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", + "SPRKStepCreate", MSG_ARK_NO_MEM); + return(NULL); + } + + /* Allocate ARKodeSPRKStepMem structure, and initialize to zero */ + step_mem = NULL; + step_mem = (ARKodeSPRKStepMem) malloc(sizeof(struct ARKodeSPRKStepMemRec)); + if (step_mem == NULL) { + arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::SPRKStep", + "SPRKStepCreate", MSG_ARK_ARKMEM_FAIL); + return(NULL); + } + memset(step_mem, 0, sizeof(struct ARKodeSPRKStepMemRec)); + step_mem->take_step = take_step; + + /* Attach step_mem structure and function pointers to ark_mem */ + ark_mem->step_attachlinsol = NULL; + ark_mem->step_attachmasssol = NULL; + ark_mem->step_disablelsetup = NULL; + ark_mem->step_disablemsetup = NULL; + ark_mem->step_getlinmem = NULL; + ark_mem->step_getmassmem = NULL; + ark_mem->step_getimplicitrhs = NULL; + ark_mem->step_mmult = NULL; + ark_mem->step_getgammas = NULL; + ark_mem->step_init = sprkStep_Init; + ark_mem->step_fullrhs = sprkStep_FullRHS; + ark_mem->step = sprkStep_TakeStep; + ark_mem->step_mem = (void*) step_mem; + + /* Set default values for SPRKStep optional inputs */ + retval = SPRKStepSetDefaults((void *)ark_mem); + if (retval != ARK_SUCCESS) { + arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", + "SPRKStepCreate", + "Error setting default solver options"); + SPRKStepFree((void**) &ark_mem); return(NULL); + } + + /* Copy the input parameters into ARKODE state */ + step_mem->fk = fk; + + // /* Update the ARKODE workspace requirements */ + // ark_mem->liw += 41; /* fcn/data ptr, int, long int, sunindextype, booleantype */ + // ark_mem->lrw += 10; + + /* Initialize all the counters */ + int irhs = 0; + for (irhs = 0; irhs < step_mem->num_rhs; ++irhs) + { + step_mem->nfk[irhs] = 0; + } + + // /* Initialize external polynomial forcing data */ + // step_mem->expforcing = SUNFALSE; + // step_mem->impforcing = SUNFALSE; + // step_mem->forcing = NULL; + // step_mem->nforcing = 0; + + /* Initialize main ARKODE infrastructure */ + retval = arkInit(ark_mem, t0, y0, FIRST_INIT); + if (retval != ARK_SUCCESS) { + arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepCreate", + "Unable to initialize main ARKODE infrastructure"); + SPRKStepFree((void**) &ark_mem); return(NULL); + } + + return((void *)ark_mem); +} + + +/*--------------------------------------------------------------- + SPRKStepResize: + + This routine resizes the memory within the SPRKStep module. + It first resizes the main ARKODE infrastructure memory, and + then resizes its own data. + ---------------------------------------------------------------*/ +int SPRKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, + realtype t0, ARKVecResizeFn resize, void *resize_data) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + SUNNonlinearSolver NLS; + sunindextype lrw1, liw1, lrw_diff, liw_diff; + int i, retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepResize", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* resize ARKODE infrastructure memory */ + retval = arkResize(ark_mem, y0, hscale, t0, resize, resize_data); + if (retval != ARK_SUCCESS) { + arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepResize", + "Unable to resize main ARKODE infrastructure"); + return(retval); + } + + return(ARK_SUCCESS); +} + + +/*--------------------------------------------------------------- + SPRKStepReInit: + + This routine re-initializes the SPRKStep module to solve a new + problem of the same size as was previously solved. This routine + should also be called when the problem dynamics or desired solvers + have changed dramatically, so that the problem integration should + resume as if started from scratch. + + Note all internal counters are set to 0 on re-initialization. + ---------------------------------------------------------------*/ +int SPRKStepReInit(void* arkode_mem, ARKRhsFn* fk, realtype t0, N_Vector y0) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepReInit", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* Check if ark_mem was allocated */ + if (ark_mem->MallocDone == SUNFALSE) { + arkProcessError(ark_mem, ARK_NO_MALLOC, "ARKODE::SPRKStep", + "SPRKStepReInit", MSG_ARK_NO_MALLOC); + return(ARK_NO_MALLOC); + } + + /* Check that at least one of fe, fi is supplied and is to be used */ + if (fk == NULL) { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::SPRKStep", + "SPRKStepReInit", MSG_ARK_NULL_F); + return(ARK_ILL_INPUT); + } + + /* Check that y0 is supplied */ + if (y0 == NULL) { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::SPRKStep", + "SPRKStepReInit", MSG_ARK_NULL_Y0); + return(ARK_ILL_INPUT); + } + + /* Copy the input parameters into ARKODE state */ + step_mem->fk = fk; + + /* Initialize main ARKODE infrastructure */ + retval = arkInit(ark_mem, t0, y0, FIRST_INIT); + if (retval != ARK_SUCCESS) { + arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepReInit", + "Unable to reinitialize main ARKODE infrastructure"); + return(retval); + } + + /* Initialize all the counters */ + int irhs = 0; + for (irhs = 0; irhs < step_mem->num_rhs; ++irhs) + { + step_mem->nfk[irhs] = 0; + } + + return(ARK_SUCCESS); +} + + +/*--------------------------------------------------------------- + SPRKStepReset: + + This routine resets the SPRKStep module state to solve the same + problem from the given time with the input state (all counter + values are retained). + ---------------------------------------------------------------*/ +int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepReset", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* Initialize main ARKODE infrastructure */ + retval = arkInit(ark_mem, tR, yR, RESET_INIT); + + if (retval != ARK_SUCCESS) { + arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepReset", + "Unable to initialize main ARKODE infrastructure"); + return(retval); + } + + return(ARK_SUCCESS); +} + + +/*--------------------------------------------------------------- + SPRKStepSStolerances, SPRKStepSVtolerances, SPRKStepWFtolerances, + SPRKStepResStolerance, SPRKStepResVtolerance, SPRKStepResFtolerance: + + These routines set integration tolerances (wrappers for general + ARKODE utility routines) + ---------------------------------------------------------------*/ + +int SPRKStepSStolerances(void *arkode_mem, realtype reltol, realtype abstol) +{ + return(arkSStolerances((ARKodeMem) arkode_mem, reltol, abstol)); +} + +int SPRKStepSVtolerances(void *arkode_mem, realtype reltol, N_Vector abstol) +{ + return(arkSVtolerances((ARKodeMem) arkode_mem, reltol, abstol)); +} + +int SPRKStepWFtolerances(void *arkode_mem, ARKEwtFn efun) +{ + return(arkWFtolerances((ARKodeMem) arkode_mem, efun)); +} + +int SPRKStepResStolerance(void *arkode_mem, realtype rabstol) +{ + return(arkResStolerance((ARKodeMem) arkode_mem, rabstol)); +} + +int SPRKStepResVtolerance(void *arkode_mem, N_Vector rabstol) +{ + return(arkResVtolerance((ARKodeMem) arkode_mem, rabstol)); +} + +int SPRKStepResFtolerance(void *arkode_mem, ARKRwtFn rfun) +{ + return(arkResFtolerance((ARKodeMem) arkode_mem, rfun)); +} + + +/*--------------------------------------------------------------- + SPRKStepEvolve: + + This is the main time-integration driver (wrappers for general + ARKODE utility routine) + ---------------------------------------------------------------*/ +int SPRKStepEvolve(void *arkode_mem, realtype tout, N_Vector yout, + realtype *tret, int itask) +{ + int retval; + SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); + retval = arkEvolve((ARKodeMem) arkode_mem, tout, yout, tret, itask); + SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); + return(retval); +} + + +/*--------------------------------------------------------------- + SPRKStepGetDky: + + This returns interpolated output of the solution or its + derivatives over the most-recently-computed step (wrapper for + generic ARKODE utility routine) + ---------------------------------------------------------------*/ +int SPRKStepGetDky(void *arkode_mem, realtype t, int k, N_Vector dky) +{ + int retval; + SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); + retval = arkGetDky((ARKodeMem) arkode_mem, t, k, dky); + SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); + return(retval); +} + +/*--------------------------------------------------------------- + SPRKStepFree frees all SPRKStep memory, and then calls an ARKODE + utility routine to free the ARKODE infrastructure memory. + ---------------------------------------------------------------*/ +void SPRKStepFree(void **arkode_mem) +{ + int j; + sunindextype Bliw, Blrw; + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + + /* nothing to do if arkode_mem is already NULL */ + if (*arkode_mem == NULL) return; + + /* conditional frees on non-NULL SPRKStep module */ + ark_mem = (ARKodeMem) (*arkode_mem); + if (ark_mem->step_mem != NULL) { + step_mem = (ARKodeSPRKStepMem) ark_mem->step_mem; + + + /* free the time stepper module itself */ + free(ark_mem->step_mem); + ark_mem->step_mem = NULL; + } + + /* free memory for overall ARKODE infrastructure */ + arkFree(arkode_mem); +} + + +/*=============================================================== + SPRKStep Private functions + ===============================================================*/ + +/*--------------------------------------------------------------- + Interface routines supplied to ARKODE + ---------------------------------------------------------------*/ + + +/*--------------------------------------------------------------- + sprkStep_Init: + + This routine is called just prior to performing internal time + steps (after all user "set" routines have been called) from + within arkInitialSetup. + + For all initialization types, this routine sets the relevant + TakeStep routine based on the current problem configuration. + + With initialization type FIRST_INIT this routine: + + With initialization type FIRST_INIT or RESIZE_INIT, this routine: + + With initialization type RESET_INIT, this routine does nothing. + ---------------------------------------------------------------*/ +int sprkStep_Init(void* arkode_mem, int init_type) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int j, retval; + booleantype reset_efun; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_Init", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* immediately return if reset */ + if (init_type == RESET_INIT) return(ARK_SUCCESS); + + /* initializations/checks for (re-)initialization call */ + if (init_type == FIRST_INIT) { + + + } + + /* set appropriate TakeStep routine based on problem configuration */ + /* (only one choice for now) */ + ark_mem->step = sprkStep_TakeStep_Sprk; + // ark_mem->step = sprkStep_TakeStep_SprkInc; + + return(ARK_SUCCESS); +} + +/* Utility to call f_k and increment the counter */ +int sprkStep_Fk(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector Fk, int k, void* user_data) +{ + int retval = step_mem->fk[k](tcur, ycur, Fk, user_data); + step_mem->nfk[k]++; + return retval; +} + +/*--------------------------------------------------------------- + sprkStep_FullRHS: + + Rewriting the problem + My' = fe(t,y) + fi(t,y) + in the form + y' = M^{-1}*[ fe(t,y) + fi(t,y) ], + this routine computes the full right-hand side vector, + f = M^{-1}*[ fe(t,y) + fi(t,y) ] + + This will be called in one of three 'modes': + ARK_FULLRHS_START -> called at the beginning of a simulation + or after post processing at step + ARK_FULLRHS_END -> called at the end of a successful step + ARK_FULLRHS_OTHER -> called elsewhere (e.g. for dense output) + + If it is called in ARK_FULLRHS_START mode, we store the vectors + fe(t,y) and fi(t,y) in Fe[0] and Fi[0] for possible reuse in the + first stage of the subsequent time step. + + If it is called in ARK_FULLRHS_END mode and the ARK method + coefficients support it, we may just copy vectors Fe[stages] and + Fi[stages] to fill f instead of calling fe() and fi(). + + ARK_FULLRHS_OTHER mode is only called for dense output in-between + steps, or 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 sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, + int mode) +{ + // ARKodeMem ark_mem; + // ARKodeSPRKStepMem step_mem; + // int nvec, retval; + // booleantype recomputeRHS; + // realtype* cvals; + // N_Vector* Xvecs; + + // /* access ARKodeSPRKStepMem structure */ + // retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_FullRHS", + // &ark_mem, &step_mem); + // if (retval != ARK_SUCCESS) return(retval); + + // /* local shortcuts for use with fused vector operations */ + // cvals = step_mem->cvals; + // Xvecs = step_mem->Xvecs; + + // /* setup mass-matrix if required (use output f as a temporary) */ + // if ((step_mem->mass_type == MASS_TIMEDEP) && (step_mem->msetup != NULL)) { + // retval = step_mem->msetup((void *) ark_mem, t, f, + // ark_mem->tempv2, ark_mem->tempv3); + // if (retval != ARK_SUCCESS) return(ARK_MASSSETUP_FAIL); + // } + + // /* perform RHS functions contingent on 'mode' argument */ + // switch(mode) { + + // /* ARK_FULLRHS_START: called at the beginning of a simulation + // Store the vectors fe(t,y) and fi(t,y) in Fe[0] and Fi[0] for + // possible reuse in the first stage of the subsequent time step */ + // case ARK_FULLRHS_START: + + // /* call fe if the problem has an explicit component */ + // if (step_mem->explicit) { + // retval = sprkStep_Fe(step_mem, t, y, step_mem->Fe[0], ark_mem->user_data); + // if (retval != 0) { + // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + // return(ARK_RHSFUNC_FAIL); + // } + // /* apply external polynomial forcing */ + // if (step_mem->expforcing) { + // cvals[0] = ONE; + // Xvecs[0] = step_mem->Fe[0]; + // nvec = 1; + // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); + // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->Fe[0]); + // } + // } + + // /* call fi if the problem has an implicit component */ + // if (step_mem->implicit) { + // retval = sprkStep_Fi(step_mem, t, y, step_mem->Fi[0], ark_mem->user_data); + // if (retval != 0) { + // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + // return(ARK_RHSFUNC_FAIL); + // } + // /* apply external polynomial forcing */ + // if (step_mem->impforcing) { + // cvals[0] = ONE; + // Xvecs[0] = step_mem->Fi[0]; + // nvec = 1; + // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); + // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->Fi[0]); + // } + // } + + // /* combine RHS vector(s) into output */ + // if (step_mem->explicit && step_mem->implicit) { /* ImEx */ + // N_VLinearSum(ONE, step_mem->Fi[0], ONE, step_mem->Fe[0], f); + // } else if (step_mem->implicit) { /* implicit */ + // N_VScale(ONE, step_mem->Fi[0], f); + // } else { /* explicit */ + // N_VScale(ONE, step_mem->Fe[0], f); + // } + + // break; + + + // /* ARK_FULLRHS_END: called at the end of a successful step + // If the ARK method coefficients support it, we just copy the last stage RHS + // vectors to fill f instead of calling fe() and fi(). + // Copy the results to Fe[0] and Fi[0] if the ARK coefficients support it. */ + // case ARK_FULLRHS_END: + + // /* determine if explicit/implicit RHS functions need to be recomputed */ + // recomputeRHS = SUNFALSE; + // if ( step_mem->explicit && (SUNRabs(step_mem->Be->c[step_mem->stages-1]-ONE)>TINY) ) + // recomputeRHS = SUNTRUE; + // if ( step_mem->implicit && (SUNRabs(step_mem->Bi->c[step_mem->stages-1]-ONE)>TINY) ) + // recomputeRHS = SUNTRUE; + + // /* base RHS calls on recomputeRHS argument */ + // if (recomputeRHS) { + + // /* call fe if the problem has an explicit component */ + // if (step_mem->explicit) { + // retval = sprkStep_Fe(step_mem, t, y, step_mem->Fe[0], ark_mem->user_data); + // if (retval != 0) { + // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + // return(ARK_RHSFUNC_FAIL); + // } + // /* apply external polynomial forcing */ + // if (step_mem->expforcing) { + // cvals[0] = ONE; + // Xvecs[0] = step_mem->Fe[0]; + // nvec = 1; + // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); + // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->Fe[0]); + // } + // } + + // /* call fi if the problem has an implicit component */ + // if (step_mem->implicit) { + // retval = sprkStep_Fi(step_mem, t, y, step_mem->Fi[0], ark_mem->user_data); + // if (retval != 0) { + // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + // return(ARK_RHSFUNC_FAIL); + // } + // /* apply external polynomial forcing */ + // if (step_mem->impforcing) { + // cvals[0] = ONE; + // Xvecs[0] = step_mem->Fi[0]; + // nvec = 1; + // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); + // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->Fi[0]); + // } + // } + // } else { + // if (step_mem->explicit) + // N_VScale(ONE, step_mem->Fe[step_mem->stages-1], step_mem->Fe[0]); + // if (step_mem->implicit) + // N_VScale(ONE, step_mem->Fi[step_mem->stages-1], step_mem->Fi[0]); + // } + + // /* combine RHS vector(s) into output */ + // if (step_mem->explicit && step_mem->implicit) { /* ImEx */ + // N_VLinearSum(ONE, step_mem->Fi[0], ONE, step_mem->Fe[0], f); + // } else if (step_mem->implicit) { /* implicit */ + // N_VScale(ONE, step_mem->Fi[0], f); + // } else { /* explicit */ + // N_VScale(ONE, step_mem->Fe[0], f); + // } + + // break; + + // /* ARK_FULLRHS_OTHER: called for dense output in-between steps or for + // estimation of the initial time step size, store the intermediate + // calculations in such a way as to not interfere with the other two modes */ + // case ARK_FULLRHS_OTHER: + + // /* call fe if the problem has an explicit component (store in ark_tempv2) */ + // if (step_mem->explicit) { + // retval = sprkStep_Fe(step_mem, t, y, ark_mem->tempv2, ark_mem->user_data); + // if (retval != 0) { + // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + // return(ARK_RHSFUNC_FAIL); + // } + // /* apply external polynomial forcing */ + // if (step_mem->expforcing) { + // cvals[0] = ONE; + // Xvecs[0] = ark_mem->tempv2; + // nvec = 1; + // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); + // N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->tempv2); + // } + // } + + // /* call fi if the problem has an implicit component (store in sdata) */ + // if (step_mem->implicit) { + // retval = sprkStep_Fi(step_mem, t, y, step_mem->sdata, ark_mem->user_data); + // if (retval != 0) { + // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + // return(ARK_RHSFUNC_FAIL); + // } + // /* apply external polynomial forcing */ + // if (step_mem->impforcing) { + // cvals[0] = ONE; + // Xvecs[0] = step_mem->sdata; + // nvec = 1; + // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); + // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); + // } + // } + + // /* combine RHS vector(s) into output */ + // if (step_mem->explicit && step_mem->implicit) { /* ImEx */ + // N_VLinearSum(ONE, step_mem->sdata, ONE, ark_mem->tempv2, f); + // } else if (step_mem->implicit) { /* implicit */ + // N_VScale(ONE, step_mem->sdata, f); + // } else { /* explicit */ + // N_VScale(ONE, ark_mem->tempv2, f); + // } + + // break; + + // default: + // /* return with RHS failure if unknown mode is passed */ + // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + // "sprkStep_FullRHS", "Unknown full RHS mode"); + // return(ARK_RHSFUNC_FAIL); + // } + + // /* if M != I, then update f = M^{-1}*f */ + // if (step_mem->mass_type != MASS_IDENTITY) { + // retval = step_mem->msolve((void *) ark_mem, f, + // step_mem->nlscoef/ark_mem->h); + // if (retval != ARK_SUCCESS) { + // arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, "ARKODE::SPRKStep", + // "sprkStep_FullRHS", "Mass matrix solver failure"); + // return(ARK_MASSSOLVE_FAIL); + // } + // } + + return(ARK_SUCCESS); +} + +int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval, is; + N_Vector delta_Yi, yn_plus_delta_Yi; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + return step_mem->take_step->call(step_mem->take_step, arkode_mem, dsmPtr, nflagPtr); +} + +// /* Increment SPRK algorithm with compensated summation */ +// int sprkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +// { +// ARKodeMem ark_mem; +// ARKodeSPRKStepMem step_mem; +// int retval, is; +// N_Vector delta_Yi, yn_plus_delta_Yi; + +// /* access ARKodeSPRKStepMem structure */ +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_Sprk", +// &ark_mem, &step_mem); +// if (retval != ARK_SUCCESS) return(retval); + +// // if (!ark_mem->fixedstep) { +// // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::SPRKStep", +// // "sprkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); +// // return(ARK_UNRECOGNIZED_ERROR); +// // } + +// /* other shortcuts */ +// delta_Yi = ark_mem->tempv1; +// yn_plus_delta_Yi = ark_mem->tempv2; + +// /* [ \Delta Q_0 ] = [ 0 ] +// [ \Delta P_0 ] = [ 0 ] */ +// N_VConst(ZERO, delta_Yi); + +// /* loop over internal stages to the step */ +// for (is=0; isstages; is++) { +// /* store current stage index */ +// step_mem->istage = is; + +// /* set current stage time(s) */ +// if (step_mem->implicit) +// ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; +// else +// ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; + +// /* [ q_n ] + [ \Delta Q_i ] +// [ ] + [ ] */ +// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + +// /* evaluate Fi with previous stage increment */ +// N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ +// retval = sprkStep_Fi(step_mem, ark_mem->tcur, yn_plus_delta_Yi, +// step_mem->sdata, ark_mem->user_data); +// if (retval != 0) return(ARK_RHSFUNC_FAIL); + +// /* update the implicit stage +// [ ] = [ ] + [ ] +// [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ +// N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->sdata, delta_Yi); + +// /* [ ] + [ ] +// [ p_n ] + [ \Delta P_i ] */ +// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + +// /* evaluate Fe with the current p_n + \Delta P_i */ +// N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ +// retval = sprkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, +// yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); +// if (retval != 0) return(ARK_RHSFUNC_FAIL); + +// /* update the explicit stage +// [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] +// [ ] = [ ] + [ ] */ +// N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, delta_Yi); +// } + +// /* +// Now we compute the step solution via compensated summation. +// [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] +// [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ +// N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); +// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); +// N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); +// N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); + +// *nflagPtr = 0; +// *dsmPtr = 0; + +// return 0; +// } + + +/*--------------------------------------------------------------- + Internal utility routines + ---------------------------------------------------------------*/ + + +/*--------------------------------------------------------------- + sprkStep_AccessStepMem: + + Shortcut routine to unpack ark_mem and step_mem structures from + void* pointer. If either is missing it returns ARK_MEM_NULL. + ---------------------------------------------------------------*/ +int sprkStep_AccessStepMem(void* arkode_mem, const char *fname, + ARKodeMem *ark_mem, ARKodeSPRKStepMem *step_mem) +{ + /* access ARKodeMem structure */ + if (arkode_mem==NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", + fname, MSG_ARK_NO_MEM); + return(ARK_MEM_NULL); + } + *ark_mem = (ARKodeMem) arkode_mem; + if ((*ark_mem)->step_mem==NULL) { + arkProcessError(*ark_mem, ARK_MEM_NULL, "ARKODE::SPRKStep", + fname, MSG_SPRKSTEP_NO_MEM); + return(ARK_MEM_NULL); + } + *step_mem = (ARKodeSPRKStepMem) (*ark_mem)->step_mem; + return(ARK_SUCCESS); +} + + +/*--------------------------------------------------------------- + sprkStep_CheckNVector: + + This routine checks if all required vector operations are + present. If any of them is missing it returns SUNFALSE. + ---------------------------------------------------------------*/ +booleantype sprkStep_CheckNVector(N_Vector tmpl) +{ + if ( (tmpl->ops->nvclone == NULL) || + (tmpl->ops->nvdestroy == NULL) || + (tmpl->ops->nvlinearsum == NULL) || + (tmpl->ops->nvconst == NULL) || + (tmpl->ops->nvscale == NULL) || + (tmpl->ops->nvwrmsnorm == NULL) ) + return(SUNFALSE); + return(SUNTRUE); +} + + + + +/*--------------------------------------------------------------- + Utility routines for interfacing with MRIStep + ---------------------------------------------------------------*/ + + +// /*------------------------------------------------------------------------------ +// SPRKStepCreateMRIStepInnerStepper + +// Wraps an SPRKStep memory structure as an MRIStep inner stepper. +// ----------------------------------------------------------------------------*/ + +// int SPRKStepCreateMRIStepInnerStepper(void *inner_arkode_mem, +// MRIStepInnerStepper *stepper) +// { +// int retval; +// ARKodeMem ark_mem; +// ARKodeSPRKStepMem step_mem; + +// retval = sprkStep_AccessStepMem(inner_arkode_mem, +// "SPRKStepCreateMRIStepInnerStepper", +// &ark_mem, &step_mem); +// if (retval) { +// arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", +// "SPRKStepCreateMRIStepInnerStepper", +// "The SPRKStep memory pointer is NULL"); +// return ARK_ILL_INPUT; +// } + +// retval = MRIStepInnerStepper_Create(ark_mem->sunctx, stepper); +// if (retval != ARK_SUCCESS) return(retval); + +// retval = MRIStepInnerStepper_SetContent(*stepper, inner_arkode_mem); +// if (retval != ARK_SUCCESS) return(retval); + +// retval = MRIStepInnerStepper_SetEvolveFn(*stepper, +// sprkStep_MRIStepInnerEvolve); +// if (retval != ARK_SUCCESS) return(retval); + +// retval = MRIStepInnerStepper_SetFullRhsFn(*stepper, +// sprkStep_MRIStepInnerFullRhs); +// if (retval != ARK_SUCCESS) return(retval); + +// retval = MRIStepInnerStepper_SetResetFn(*stepper, +// sprkStep_MRIStepInnerReset); +// if (retval != ARK_SUCCESS) return(retval); + +// return(ARK_SUCCESS); +// } + + +// /*------------------------------------------------------------------------------ +// sprkStep_MRIStepInnerEvolve + +// Implementation of MRIStepInnerStepperEvolveFn to advance the inner (fast) +// ODE IVP. +// ----------------------------------------------------------------------------*/ + +// int sprkStep_MRIStepInnerEvolve(MRIStepInnerStepper stepper, realtype t0, +// realtype tout, N_Vector y) +// { +// void* arkode_mem; /* arkode memory */ +// realtype tret; /* return time */ +// realtype tshift, tscale; /* time normalization values */ +// N_Vector *forcing; /* forcing vectors */ +// int nforcing; /* number of forcing vectors */ +// int retval; /* return value */ + +// /* extract the ARKODE memory struct */ +// retval = MRIStepInnerStepper_GetContent(stepper, &arkode_mem); +// if (retval != ARK_SUCCESS) return(retval); + +// /* get the forcing data */ +// retval = MRIStepInnerStepper_GetForcingData(stepper, +// &tshift, &tscale, +// &forcing, &nforcing); +// if (retval != ARK_SUCCESS) return(retval); + +// /* set the inner forcing data */ +// retval = sprkStep_SetInnerForcing(arkode_mem, tshift, tscale, +// forcing, nforcing); +// if (retval != ARK_SUCCESS) return(retval); + +// /* set the stop time */ +// retval = SPRKStepSetStopTime(arkode_mem, tout); +// if (retval != ARK_SUCCESS) return(retval); + +// /* evolve inner ODE */ +// retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); +// if (retval < 0) return(retval); + +// /* disable inner forcing */ +// retval = sprkStep_SetInnerForcing(arkode_mem, ZERO, ONE, NULL, 0); +// if (retval != ARK_SUCCESS) return(retval); + +// return(ARK_SUCCESS); +// } + + +// /*------------------------------------------------------------------------------ +// sprkStep_MRIStepInnerFullRhs + +// Implementation of MRIStepInnerStepperFullRhsFn to compute the full inner +// (fast) ODE IVP RHS. +// ----------------------------------------------------------------------------*/ + +// int sprkStep_MRIStepInnerFullRhs(MRIStepInnerStepper stepper, realtype t, +// N_Vector y, N_Vector f, int mode) +// { +// void* arkode_mem; +// int retval; + +// /* extract the ARKODE memory struct */ +// retval = MRIStepInnerStepper_GetContent(stepper, &arkode_mem); +// if (retval != ARK_SUCCESS) return(retval); + +// return(sprkStep_FullRHS(arkode_mem, t, y, f, mode)); +// } + + +// /*------------------------------------------------------------------------------ +// sprkStep_MRIStepInnerReset + +// Implementation of MRIStepInnerStepperResetFn to reset the inner (fast) stepper +// state. +// ----------------------------------------------------------------------------*/ + +// int sprkStep_MRIStepInnerReset(MRIStepInnerStepper stepper, realtype tR, +// N_Vector yR) +// { +// void* arkode_mem; +// int retval; + +// /* extract the ARKODE memory struct */ +// retval = MRIStepInnerStepper_GetContent(stepper, &arkode_mem); +// if (retval != ARK_SUCCESS) return(retval); + +// return(SPRKStepReset(arkode_mem, tR, yR)); +// } + + +// /*------------------------------------------------------------------------------ +// sprkStep_ApplyForcing + +// Determines the linear combination coefficients and vectors to apply forcing +// at a given value of the independent variable (t). This occurs through +// appending coefficients and N_Vector pointers to the underlying cvals and Xvecs +// arrays in the step_mem structure. The dereferenced input *nvec should indicate +// the next available entry in the cvals/Xvecs arrays. The input 's' is a +// scaling factor that should be applied to each of these coefficients. +// ----------------------------------------------------------------------------*/ + +// void sprkStep_ApplyForcing(ARKodeSPRKStepMem step_mem, realtype t, +// realtype s, int *nvec) +// { +// realtype tau, taui; +// int i; + +// /* always append the constant forcing term */ +// step_mem->cvals[*nvec] = s; +// step_mem->Xvecs[*nvec] = step_mem->forcing[0]; +// (*nvec) += 1; + +// /* compute normalized time tau and initialize tau^i */ +// tau = (t - step_mem->tshift) / (step_mem->tscale); +// taui = tau; +// for (i=1; inforcing; i++) { +// step_mem->cvals[*nvec] = s*taui; +// step_mem->Xvecs[*nvec] = step_mem->forcing[i]; +// taui *= tau; +// (*nvec) += 1; +// } +// } + +// /*------------------------------------------------------------------------------ +// sprkStep_SetInnerForcing + +// Sets an array of coefficient vectors for a time-dependent external polynomial +// forcing term in the ODE RHS i.e., y' = fe(t,y) + fi(t,y) + p(t). This +// function is primarily intended for use with multirate integration methods +// (e.g., MRIStep) where SPRKStep is used to solve a modified ODE at a fast time +// scale. The polynomial is of the form + +// p(t) = sum_{i = 0}^{nvecs - 1} forcing[i] * ((t - tshift) / (tscale))^i + +// where tshift and tscale are used to normalize the time t (e.g., with MRIGARK +// methods). +// ----------------------------------------------------------------------------*/ + +// int sprkStep_SetInnerForcing(void* arkode_mem, realtype tshift, realtype tscale, +// N_Vector* forcing, int nvecs) +// { +// ARKodeMem ark_mem; +// ARKodeSPRKStepMem step_mem; +// int retval; + +// /* access ARKodeSPRKStepMem structure */ +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_SetInnerForcing", +// &ark_mem, &step_mem); +// if (retval != ARK_SUCCESS) return(retval); + +// if (nvecs > 0) { + +// /* enable forcing */ +// if (step_mem->explicit) { +// step_mem->expforcing = SUNTRUE; +// step_mem->impforcing = SUNFALSE; +// } else { +// step_mem->expforcing = SUNFALSE; +// step_mem->impforcing = SUNTRUE; +// } +// step_mem->tshift = tshift; +// step_mem->tscale = tscale; +// step_mem->forcing = forcing; +// step_mem->nforcing = nvecs; + +// /* If cvals and Xvecs are not allocated then sprkStep_Init has not been +// called and the number of stages has not been set yet. These arrays will +// be allocated in sprkStep_Init and take into account the value of nforcing. +// On subsequent calls will check if enough space has allocated in case +// nforcing has increased since the original allocation. */ +// if (step_mem->cvals != NULL && step_mem->Xvecs != NULL) { + +// /* check if there are enough reusable arrays for fused operations */ +// if ((step_mem->nfusedopvecs - nvecs) < (2 * step_mem->stages + 2)) { + +// /* free current work space */ +// if (step_mem->cvals != NULL) { +// free(step_mem->cvals); +// ark_mem->lrw -= step_mem->nfusedopvecs; +// } +// if (step_mem->Xvecs != NULL) { +// free(step_mem->Xvecs); +// ark_mem->liw -= step_mem->nfusedopvecs; +// } + +// /* allocate reusable arrays for fused vector operations */ +// step_mem->nfusedopvecs = 2 * step_mem->stages + 2 + nvecs; + +// step_mem->cvals = NULL; +// step_mem->cvals = (realtype *) calloc(step_mem->nfusedopvecs, +// sizeof(realtype)); +// if (step_mem->cvals == NULL) return(ARK_MEM_FAIL); +// ark_mem->lrw += step_mem->nfusedopvecs; + +// step_mem->Xvecs = NULL; +// step_mem->Xvecs = (N_Vector *) calloc(step_mem->nfusedopvecs, +// sizeof(N_Vector)); +// if (step_mem->Xvecs == NULL) return(ARK_MEM_FAIL); +// ark_mem->liw += step_mem->nfusedopvecs; +// } +// } + +// } else { + +// /* disable forcing */ +// step_mem->expforcing = SUNFALSE; +// step_mem->impforcing = SUNFALSE; +// step_mem->tshift = ZERO; +// step_mem->tscale = ONE; +// step_mem->forcing = NULL; +// step_mem->nforcing = 0; + +// } + +// return(0); +// } + +/*=============================================================== + EOF + ===============================================================*/ + + + +int sprkStep_SprkStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector prev_stage, + N_Vector Fk, sunrealtype bi, sunrealtype Bi, N_Vector stage_result) +{ + int retval = 0; + + /* set current stage time(s) */ + ark_mem->tcur = ark_mem->tn + bi*ark_mem->h; + + /* evaluate f_1 at the previous stage value */ + N_VConst(ZERO, Fk); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_Fk(step_mem, ark_mem->tcur, prev_stage, + Fk, 0, ark_mem->user_data); + if (retval != 0) return ARK_RHSFUNC_FAIL; + + /* update ycur with the q stage */ + N_VLinearSum(ONE, prev_stage, ark_mem->h*bi, Fk, stage_result); + + /* evaluate f_2 with the stage value for q */ + N_VConst(ZERO, Fk); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_Fk(step_mem, ark_mem->tn + Bi*ark_mem->h, stage_result, + Fk, 1, ark_mem->user_data); + if (retval != 0) return ARK_RHSFUNC_FAIL; + + /* update ycur with the stage value for p */ + N_VLinearSum(ONE, stage_result, ark_mem->h*Bi, Fk, stage_result); + + /* keep track of the stage number */ + step_mem->istage++; + + return ARK_SUCCESS; +} + +int sprkStep_TakeStep_McLauchlan4(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +{ + int retval; + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + struct McLauchlan4Mem* method_mem; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_McLauchlan4", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + step_mem->istage = 0; + method_mem = (struct McLauchlan4Mem*) self->content; + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, + method_mem->b1, method_mem->a1, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, + method_mem->b2, method_mem->a2, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, + method_mem->b3, method_mem->a3, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, method_mem->b4, + method_mem->a4, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + *nflagPtr = 0; + *dsmPtr = 0; + + return ARK_SUCCESS; +} + +int sprkStep_TakeStep_Ruth3(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +{ + int retval; + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + struct Ruth3Mem* method_mem; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_Ruth3", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + step_mem->istage = 0; + method_mem = (struct Ruth3Mem*) self->content; + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, + method_mem->b1, method_mem->a1, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, + method_mem->b2, method_mem->a2, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, + method_mem->b3, method_mem->a3, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + *nflagPtr = 0; + *dsmPtr = 0; + + return ARK_SUCCESS; +} + +int sprkStep_TakeStep_PseudoLeapfrog(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +{ + int retval; + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + struct Ruth3Mem* method_mem; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_PseudoLeapfrog", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + step_mem->istage = 0; + method_mem = (struct Ruth3Mem*) self->content; + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, + method_mem->b1, method_mem->a1, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, + method_mem->b2, method_mem->a2, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + *nflagPtr = 0; + *dsmPtr = 0; + + return ARK_SUCCESS; +} + +int sprkStep_TakeStep_SymplecticEuler(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +{ + int retval; + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + struct SymplecticEulerMem* method_mem; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SymplecticEuler", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + step_mem->istage = 0; + method_mem = (struct SymplecticEulerMem*) self->content; + + retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, + method_mem->b1, method_mem->a1, ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + *nflagPtr = 0; + *dsmPtr = 0; + + return ARK_SUCCESS; +} + +TakeStep TakeStepLoadDefaultSPRK(int order) +{ + TakeStep take_step; + take_step = (TakeStep) malloc(sizeof(struct TakeStepFunctor)); + take_step->num_vecs = 1; + + switch(order) + { + case 1: + take_step->content = (void*) &SymplecticEuler; + take_step->q = 1; + take_step->p = 0; + take_step->call = sprkStep_TakeStep_SymplecticEuler; + break; + case 2: + take_step->content = (void*) &PseudoLeapfrog; + take_step->q = 2; + take_step->p = 0; + take_step->call = sprkStep_TakeStep_PseudoLeapfrog; + break; + case 3: + take_step->content = (void*) &Ruth3; + take_step->q = 3; + take_step->p = 0; + take_step->call = sprkStep_TakeStep_Ruth3; + break; + case 4: + take_step->content = (void*) &McLauchlan4; + take_step->q = 4; + take_step->p = 0; + take_step->call = sprkStep_TakeStep_McLauchlan4; + break; + default: + free(take_step); + return NULL; + } + + return take_step; +} + diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h new file mode 100644 index 0000000000..fd973f57a2 --- /dev/null +++ b/src/arkode/arkode_sprkstep_impl.h @@ -0,0 +1,127 @@ +/*--------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + *--------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + *--------------------------------------------------------------- + * Implementation header file for ARKODE's ARK time stepper + * module. + *--------------------------------------------------------------*/ + +#ifndef _ARKODE_SPRKSTEP_IMPL_H +#define _ARKODE_SPRKSTEP_IMPL_H + +#include +#include "arkode_impl.h" + +/* access to MRIStepInnerStepper_Create */ +#include "arkode/arkode_mristep.h" +#include "sundials/sundials_types.h" + +#ifdef __cplusplus /* wrapper to enable C++ usage */ +extern "C" { +#endif + +struct TakeStepFunctor { + int (*call)(TakeStep self, void* arkode_mem, sunrealtype *dsmPtr, int *nflagPtr); + int q; + int p; + int stages; + int num_vecs; + void* content; +}; + +/*=============================================================== + SPRK time step module constants + ===============================================================*/ + + +/*=============================================================== + SPRK time step module data structure + ===============================================================*/ + +/*--------------------------------------------------------------- + Types : struct ARKodeSPRKStepMemRec, ARKodeSPRKStepMem + --------------------------------------------------------------- + The type ARKodeSPRKStepMem is type pointer to struct + ARKodeSPRKStepMemRec. This structure contains fields to + perform an symplectic-partitioned Runge-Kutta time step. + ---------------------------------------------------------------*/ +typedef struct ARKodeSPRKStepMemRec { + TakeStep take_step; + int q; /* method order */ + int p; /* embedding order */ + int stages; /* number of stages */ + N_Vector* scratch; /* vectors that may be used */ + + /* SPRK problem specification */ + ARKRhsFn *fk; /* array of RHS functions */ + int num_rhs; /* number of RHS functions */ + + /* Counters */ + long int* nfk; /* number of calls to fk */ + + // /* Data for using SPRKStep with external polynomial forcing */ + // booleantype expforcing; /* add forcing to explicit RHS */ + // booleantype impforcing; /* add forcing to implicit RHS */ + // realtype tshift; /* time normalization shift */ + // realtype tscale; /* time normalization scaling */ + // N_Vector* forcing; /* array of forcing vectors */ + // int nforcing; /* number of forcing vectors */ + +} *ARKodeSPRKStepMem; + + +/*=============================================================== + SPRK time step module private function prototypes + ===============================================================*/ + +int sprkStep_Init(void* arkode_mem, int init_type); +int sprkStep_FullRHS(void* arkode_mem, realtype t, + N_Vector y, N_Vector f, int mode); +int sprkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int sprkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); + +int sprkStep_Fk(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector Fk, int k, void* user_data); + +/* Internal utility routines */ +int sprkStep_AccessStepMem(void* arkode_mem, const char *fname, + ARKodeMem *ark_mem, ARKodeSPRKStepMem *step_mem); +booleantype sprkStep_CheckNVector(N_Vector tmpl); + +// /* private functions for interfacing with MRIStep */ +// int sprkStep_SetInnerForcing(void* arkode_mem, realtype tshift, realtype tscale, +// N_Vector *f, int nvecs); +// int sprkStep_MRIStepInnerEvolve(MRIStepInnerStepper stepper, +// realtype t0, realtype tout, N_Vector y); +// int sprkStep_MRIStepInnerFullRhs(MRIStepInnerStepper stepper, realtype t, +// N_Vector y, N_Vector f, int mode); +// int sprkStep_MRIStepInnerReset(MRIStepInnerStepper stepper, realtype tR, +// N_Vector yR); + + +/*=============================================================== + Reusable SPRKStep Error Messages + ===============================================================*/ + +/* Initialization and I/O error messages */ +#define MSG_SPRKSTEP_NO_MEM "Time step module memory is NULL." +#define MSG_NLS_INIT_FAIL "The nonlinear solver's init routine failed." + +/* Other error messages */ +#define MSG_ARK_MISSING_FE "Cannot specify that method is explicit without providing a function pointer to fe(t,y)." +#define MSG_ARK_MISSING_FI "Cannot specify that method is implicit without providing a function pointer to fi(t,y)." +#define MSG_ARK_MISSING_F "Cannot specify that method is ImEx without providing function pointers to fi(t,y) and fe(t,y)." + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c new file mode 100644 index 0000000000..054422edbf --- /dev/null +++ b/src/arkode/arkode_sprkstep_io.c @@ -0,0 +1,426 @@ +/*--------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + *--------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + *--------------------------------------------------------------- + * This is the implementation file for the optional input and + * output functions for the ARKODE SPRKStep time stepper module. + * + * NOTE: many functions currently in arkode_io.c will move here, + * with slightly different names. The code transition will be + * minimal, but the documentation changes will be significant. + *--------------------------------------------------------------*/ + +#include +#include + +#include "arkode_sprkstep_impl.h" +#include +#include + + +/*=============================================================== + SPRKStep Optional input functions (wrappers for generic ARKODE + utility routines). All are documented in arkode_io.c. + ===============================================================*/ +int SPRKStepSetDenseOrder(void *arkode_mem, int dord) { + return(SPRKStepSetInterpolantDegree(arkode_mem, dord)); } +int SPRKStepSetInterpolantDegree(void *arkode_mem, int degree) { + if (degree < 0) degree = ARK_INTERP_MAX_DEGREE; + return(arkSetInterpolantDegree(arkode_mem, degree)); } +int SPRKStepSetInterpolantType(void *arkode_mem, int itype) { + return(arkSetInterpolantType(arkode_mem, itype)); } +int SPRKStepSetErrHandlerFn(void *arkode_mem, ARKErrHandlerFn ehfun, + void *eh_data) { + return(arkSetErrHandlerFn(arkode_mem, ehfun, eh_data)); } +int SPRKStepSetErrFile(void *arkode_mem, FILE *errfp) { + return(arkSetErrFile(arkode_mem, errfp)); } +int SPRKStepSetDiagnostics(void *arkode_mem, FILE *diagfp) { + return(arkSetDiagnostics(arkode_mem, diagfp)); } +int SPRKStepSetMaxNumSteps(void *arkode_mem, long int mxsteps) { + return(arkSetMaxNumSteps(arkode_mem, mxsteps)); } +int SPRKStepSetMaxHnilWarns(void *arkode_mem, int mxhnil) { + return(arkSetMaxHnilWarns(arkode_mem, mxhnil)); } +int SPRKStepSetInitStep(void *arkode_mem, realtype hin) { + return(arkSetInitStep(arkode_mem, hin)); } +int SPRKStepSetMinStep(void *arkode_mem, realtype hmin) { + return(arkSetMinStep(arkode_mem, hmin)); } +int SPRKStepSetMaxStep(void *arkode_mem, realtype hmax) { + return(arkSetMaxStep(arkode_mem, hmax)); } +int SPRKStepSetStopTime(void *arkode_mem, realtype tstop) { + return(arkSetStopTime(arkode_mem, tstop)); } +int SPRKStepSetRootDirection(void *arkode_mem, int *rootdir) { + return(arkSetRootDirection(arkode_mem, rootdir)); } +int SPRKStepSetNoInactiveRootWarn(void *arkode_mem) { + return(arkSetNoInactiveRootWarn(arkode_mem)); } +int SPRKStepSetConstraints(void *arkode_mem, N_Vector constraints) { + return(arkSetConstraints(arkode_mem, constraints)); } +int SPRKStepSetMaxNumConstrFails(void *arkode_mem, int maxfails) { + return(arkSetMaxNumConstrFails(arkode_mem, maxfails)); } +int SPRKStepSetPostprocessStepFn(void *arkode_mem, + ARKPostProcessFn ProcessStep) { + return(arkSetPostprocessStepFn(arkode_mem, ProcessStep)); } +int SPRKStepSetPostprocessStageFn(void *arkode_mem, + ARKPostProcessFn ProcessStage) { + return(arkSetPostprocessStageFn(arkode_mem, ProcessStage)); } +int SPRKStepSetCFLFraction(void *arkode_mem, realtype cfl_frac) { + return(arkSetCFLFraction(arkode_mem, cfl_frac)); } +int SPRKStepSetSafetyFactor(void *arkode_mem, realtype safety) { + return(arkSetSafetyFactor(arkode_mem, safety)); } +int SPRKStepSetErrorBias(void *arkode_mem, realtype bias) { + return(arkSetErrorBias(arkode_mem, bias)); } +int SPRKStepSetMaxGrowth(void *arkode_mem, realtype mx_growth) { + return(arkSetMaxGrowth(arkode_mem, mx_growth)); } +int SPRKStepSetMinReduction(void *arkode_mem, realtype eta_min) { + return(arkSetMinReduction(arkode_mem, eta_min)); } +int SPRKStepSetFixedStepBounds(void *arkode_mem, realtype lb, realtype ub) { + return(arkSetFixedStepBounds(arkode_mem, lb, ub)); } +int SPRKStepSetAdaptivityMethod(void *arkode_mem, int imethod, int idefault, + int pq, realtype adapt_params[3]) { + return(arkSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params)); } +int SPRKStepSetAdaptivityFn(void *arkode_mem, ARKAdaptFn hfun, void *h_data) { + return(arkSetAdaptivityFn(arkode_mem, hfun, h_data)); } +int SPRKStepSetMaxFirstGrowth(void *arkode_mem, realtype etamx1) { + return(arkSetMaxFirstGrowth(arkode_mem, etamx1)); } +int SPRKStepSetMaxEFailGrowth(void *arkode_mem, realtype etamxf) { + return(arkSetMaxEFailGrowth(arkode_mem, etamxf)); } +int SPRKStepSetSmallNumEFails(void *arkode_mem, int small_nef) { + return(arkSetSmallNumEFails(arkode_mem, small_nef)); } +int SPRKStepSetMaxCFailGrowth(void *arkode_mem, realtype etacf) { + return(arkSetMaxCFailGrowth(arkode_mem, etacf)); } +int SPRKStepSetStabilityFn(void *arkode_mem, ARKExpStabFn EStab, void *estab_data) { + return(arkSetStabilityFn(arkode_mem, EStab, estab_data)); } +int SPRKStepSetMaxErrTestFails(void *arkode_mem, int maxnef) { + return(arkSetMaxErrTestFails(arkode_mem, maxnef)); } +int SPRKStepSetMaxConvFails(void *arkode_mem, int maxncf) { + return(arkSetMaxConvFails(arkode_mem, maxncf)); } +int SPRKStepSetFixedStep(void *arkode_mem, realtype hfixed) { + return(arkSetFixedStep(arkode_mem, hfixed)); } + +/*=============================================================== + SPRKStep Optional output functions (wrappers for generic ARKODE + utility routines). All are documented in arkode_io.c. + ===============================================================*/ +int SPRKStepGetNumStepAttempts(void *arkode_mem, long int *nstep_attempts) { + return(arkGetNumStepAttempts(arkode_mem, nstep_attempts)); } +int SPRKStepGetNumSteps(void *arkode_mem, long int *nsteps) { + return(arkGetNumSteps(arkode_mem, nsteps)); } +int SPRKStepGetActualInitStep(void *arkode_mem, realtype *hinused) { + return(arkGetActualInitStep(arkode_mem, hinused)); } +int SPRKStepGetLastStep(void *arkode_mem, realtype *hlast) { + return(arkGetLastStep(arkode_mem, hlast)); } +int SPRKStepGetCurrentStep(void *arkode_mem, realtype *hcur) { + return(arkGetCurrentStep(arkode_mem, hcur)); } +int SPRKStepGetCurrentTime(void *arkode_mem, realtype *tcur) { + return(arkGetCurrentTime(arkode_mem, tcur)); } +int SPRKStepGetCurrentState(void *arkode_mem, N_Vector *state) { + return(arkGetCurrentState(arkode_mem, state)); } +int SPRKStepGetTolScaleFactor(void *arkode_mem, realtype *tolsfact) { + return(arkGetTolScaleFactor(arkode_mem, tolsfact)); } +int SPRKStepGetErrWeights(void *arkode_mem, N_Vector eweight) { + return(arkGetErrWeights(arkode_mem, eweight)); } +int SPRKStepGetResWeights(void *arkode_mem, N_Vector rweight) { + return(arkGetResWeights(arkode_mem, rweight)); } +int SPRKStepGetWorkSpace(void *arkode_mem, long int *lenrw, long int *leniw) { + return(arkGetWorkSpace(arkode_mem, lenrw, leniw)); } +int SPRKStepGetStepStats(void *arkode_mem, long int *nsteps, + realtype *hinused, realtype *hlast, + realtype *hcur, realtype *tcur) { + return(arkGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur)); } +int SPRKStepGetNumConstrFails(void *arkode_mem, long int *nconstrfails) { + return(arkGetNumConstrFails(arkode_mem, nconstrfails)); } +int SPRKStepGetNumExpSteps(void *arkode_mem, long int *nsteps) { + return(arkGetNumExpSteps(arkode_mem, nsteps)); } +int SPRKStepGetNumAccSteps(void *arkode_mem, long int *nsteps) { + return(arkGetNumAccSteps(arkode_mem, nsteps)); } +int SPRKStepGetNumErrTestFails(void *arkode_mem, long int *netfails) { + return(arkGetNumErrTestFails(arkode_mem, netfails)); } +int SPRKStepGetNumStepSolveFails(void *arkode_mem, long int *nncfails) { + return(arkGetNumStepSolveFails(arkode_mem, nncfails)); } +int SPRKStepGetUserData(void *arkode_mem, void** user_data) { + return(arkGetUserData(arkode_mem, user_data)); } +char *SPRKStepGetReturnFlagName(long int flag) { + return(arkGetReturnFlagName(flag)); } + +/*=============================================================== + SPRKStep optional input functions -- stepper-specific + ===============================================================*/ + +/*--------------------------------------------------------------- + SPRKStepSetUserData: + + Wrapper for generic arkSetUserData and arkLSSetUserData + routines. + ---------------------------------------------------------------*/ +int SPRKStepSetUserData(void *arkode_mem, void *user_data) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUserData", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* set user_data in ARKODE mem */ + retval = arkSetUserData(arkode_mem, user_data); + if (retval != ARK_SUCCESS) return(retval); + + // /* set user data in ARKODE LS mem */ + // if (step_mem->lmem != NULL) { + // retval = arkLSSetUserData(arkode_mem, user_data); + // if (retval != ARKLS_SUCCESS) return(retval); + // } + + // /* set user data in ARKODE LSMass mem */ + // if (step_mem->mass_mem != NULL) { + // retval = arkLSSetMassUserData(arkode_mem, user_data); + // if (retval != ARKLS_SUCCESS) return(retval); + // } + + return(ARK_SUCCESS); +} + + +/*--------------------------------------------------------------- + SPRKStepSetDefaults: + + Resets all SPRKStep optional inputs to their default values. + Does not change problem-defining function pointers or + user_data pointer. Also leaves alone any data + structures/options related to the ARKODE infrastructure itself + (e.g., root-finding and post-process step). + ---------------------------------------------------------------*/ +int SPRKStepSetDefaults(void* arkode_mem) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetDefaults", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* Set default ARKODE infrastructure parameters */ + retval = arkSetDefaults(ark_mem); + if (retval != ARK_SUCCESS) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", + "SPRKStepSetDefaults", + "Error setting ARKODE infrastructure defaults"); + return(retval); + } + + /* Set default values for integrator optional inputs */ + step_mem->q = Q_DEFAULT; /* method order */ + step_mem->p = 0; /* embedding order */ + step_mem->stages = 0; /* no stages */ + step_mem->istage = 0; /* current stage */ + return(ARK_SUCCESS); +} + +/*--------------------------------------------------------------- + SPRKStepSetOrder: + + Specifies the method order + + ** Note in documentation that this should not be called along + with SPRKStepSetTable or SPRKStepSetTableNum. This routine + is used to specify a desired method order using default Butcher + tables, whereas any user-supplied table will have their own + order associated with them. + ---------------------------------------------------------------*/ +int SPRKStepSetOrder(void *arkode_mem, int ord) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + sunindextype Blrw, Bliw; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* set user-provided value, or default, depending on argument */ + if (ord <= 0) { + step_mem->q = Q_DEFAULT; + } else { + step_mem->q = ord; + } + + /* clear method specification, since user is requesting a change in method + or a reset to defaults. Spec will be set in ARKInitialSetup. */ + step_mem->stages = 0; + step_mem->istage = 0; + step_mem->p = 0; + + return(ARK_SUCCESS); +} + +/*=============================================================== + SPRKStep optional output functions -- stepper-specific + ===============================================================*/ + +/*--------------------------------------------------------------- + SPRKStepGetNumRhsEvals: + + Returns the current number of calls to fe and fi + ---------------------------------------------------------------*/ +int SPRKStepGetNumRhsEvals(void *arkode_mem, long int** fk_evals) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int rhs_k; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepGetNumRhsEvals", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* get values from step_mem */ + for (rhs_k = 0; rhs_k < step_mem->num_rhs; ++rhs_k) + *fk_evals[rhs_k] = step_mem->nfk[rhs_k]; + + return(ARK_SUCCESS); +} + +/*--------------------------------------------------------------- + SPRKStepGetEstLocalErrors: (updated to the correct vector, but + need to verify that it is unchanged between filling the + estimated error and the end of the time step) + + Returns an estimate of the local error + ---------------------------------------------------------------*/ +int SPRKStepGetEstLocalErrors(void *arkode_mem, N_Vector ele) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepGetEstLocalErrors", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* copy vector to output */ + N_VScale(ONE, ark_mem->tempv1, ele); + + return(ARK_SUCCESS); +} + + +/*--------------------------------------------------------------- + SPRKStepGetTimestepperStats: + + Returns integrator statistics + ---------------------------------------------------------------*/ +int SPRKStepGetTimestepperStats(void *arkode_mem, long int *expsteps, + long int *accsteps, long int *step_attempts, + long int **fk_evals, + long int *nlinsetups, long int *netfails) +{ + ARKodeMem ark_mem; + + SPRKStepGetNumExpSteps(arkode_mem, expsteps); + SPRKStepGetNumAccSteps(arkode_mem, accsteps); + SPRKStepGetNumRhsEvals(arkode_mem, fk_evals); + SPRKStepGetNumStepAttempts(arkode_mem, step_attempts); + SPRKStepGetNumErrTestFails(arkode_mem, netfails); + + return(ARK_SUCCESS); +} + +/*--------------------------------------------------------------- + SPRKStepPrintAllStats: + + Prints integrator statistics + ---------------------------------------------------------------*/ +int SPRKStepPrintAllStats(void *arkode_mem, FILE *outfile, SUNOutputFormat fmt) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepPrintAllStats", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* step and rootfinding stats */ + retval = arkPrintAllStats(arkode_mem, outfile, fmt); + if (retval != ARK_SUCCESS) return(retval); + + // switch(fmt) + // { + // case SUN_OUTPUTFORMAT_TABLE: + // /* function evaluations */ + // fprintf(outfile, "Explicit RHS fn evals = %ld\n", step_mem->nfe); + // fprintf(outfile, "Implicit RHS fn evals = %ld\n", step_mem->nfi); + // break; + // case SUN_OUTPUTFORMAT_CSV: + // /* function evaluations */ + // fprintf(outfile, ",Explicit RHS fn evals,%ld", step_mem->nfe); + // fprintf(outfile, ",Implicit RHS fn evals,%ld", step_mem->nfi); + // break; + + // default: + // arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE", "SPRKStepPrintAllStats", + // "Invalid formatting option."); + // return(ARK_ILL_INPUT); + // } + + return(ARK_SUCCESS); +} + + +/*=============================================================== + SPRKStep parameter output + ===============================================================*/ + +/*--------------------------------------------------------------- + SPRKStepWriteParameters: + + Outputs all solver parameters to the provided file pointer. + ---------------------------------------------------------------*/ +int SPRKStepWriteParameters(void *arkode_mem, FILE *fp) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int flag, retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepWriteParameters", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* output ARKODE infrastructure parameters first */ + flag = arkWriteParameters(ark_mem, fp); + if (flag != ARK_SUCCESS) { + arkProcessError(ark_mem, ARK_MEM_NULL, "ARKODE::SPRKStep", + "SPRKStepWriteParameters", + "Error writing ARKODE infrastructure parameters"); + return(flag); + } + + /* print integrator parameters to file */ + fprintf(fp, "SPRKStep time step module parameters:\n"); + fprintf(fp, " Method order %i\n", step_mem->q); + fprintf(fp, "\n"); + + return(ARK_SUCCESS); +} + +/*--------------------------------------------------------------- + EOF + ---------------------------------------------------------------*/ diff --git a/src/arkode/arkode_timestepper_impl.h b/src/arkode/arkode_timestepper_impl.h new file mode 100644 index 0000000000..d7f9a1f52a --- /dev/null +++ b/src/arkode/arkode_timestepper_impl.h @@ -0,0 +1,13 @@ + + + +struct ARKodeMethodMem { + /* Further method specification */ + void* impl; + + int q; /* method order */ + int p; /* embedding order (0 = no embedding) */ + int stages; /* number of stages */ +}; + +typedef struct ARKodeMethodMem* ARKodeMethod; From 6ec26bf747e81473fa6e3786bb7b9671d9829973 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 15 Mar 2023 13:45:13 -0700 Subject: [PATCH 022/177] sprk stepper compiles and runs, but answer is wrong --- examples/arkode/C_serial/ark_kepler.c | 181 +------ include/arkode/arkode_sprk.h | 45 +- include/arkode/arkode_sprkstep.h | 12 +- src/arkode/CMakeLists.txt | 4 +- src/arkode/arkode_arkstep.c | 12 +- src/arkode/arkode_arkstep_impl.h | 4 +- src/arkode/arkode_sprk.c | 135 ++--- src/arkode/arkode_sprkstep.c | 687 ++++++++------------------ src/arkode/arkode_sprkstep_impl.h | 50 +- src/arkode/arkode_sprkstep_io.c | 28 +- 10 files changed, 386 insertions(+), 772 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 2afc2701f4..6615c26951 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -148,171 +148,30 @@ int main(int argc, char* argv[]) /* Create SPRKStep integrator where we treat dqdt explicitly and dpdt implicitly */ if (method == 0) { - const int num_rhs = 2; - ARKRhsFn rhs[2] = { dqdt, dpdt }; - - arkode_mem = SPRKStepCreate(rhs, T0, y, SPRKStepDefaultSPRK(order), sunctx); - - /* 4th order scheme [McLauchlan] */ - if (order == 4) { - const sunrealtype a1 = SUN_RCONST(0.515352837431122936); - const sunrealtype a2 = -SUN_RCONST(0.085782019412973646); - const sunrealtype a3 = SUN_RCONST(0.441583023616466524); - const sunrealtype a4 = SUN_RCONST(0.128846158365384185); - const sunrealtype b1 = SUN_RCONST(0.134496199277431089); - const sunrealtype b2 = -SUN_RCONST(0.224819803079420806); - const sunrealtype b3 = SUN_RCONST(0.756320000515668291); - const sunrealtype b4 = SUN_RCONST(0.33400360328632142); - - Mp = ARKodeButcherTable_Alloc(4, SUNTRUE); - if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = b1; - Mp->b[1] = b2; - Mp->b[2] = b3; - Mp->b[3] = b4; - Mp->A[0][0] = b1; - Mp->A[1][0] = b1; - Mp->A[1][1] = b2; - Mp->A[2][0] = b1; - Mp->A[2][1] = b2; - Mp->A[2][2] = b3; - Mp->A[3][0] = b1; - Mp->A[3][1] = b2; - Mp->A[3][2] = b3; - Mp->A[3][3] = b4; - Mp->c[0] = Mp->b[0]; - Mp->c[1] = Mp->b[0] + Mp->b[1]; - Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; - Mp->c[3] = Mp->b[0] + Mp->b[1] + Mp->b[2] + Mp->b[3]; - Mp->q = order; - Mp->p = 0; - - Mq = ARKodeButcherTable_Alloc(4, SUNTRUE); - if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = a1; - Mq->b[1] = a2; - Mq->b[2] = a3; - Mq->b[3] = a4; - Mq->A[1][0] = a1; - Mq->A[2][0] = a1; - Mq->A[2][1] = a2; - Mq->A[3][0] = a1; - Mq->A[3][1] = a2; - Mq->A[3][2] = a3; - Mq->c[0] = SUN_RCONST(0.0); - Mq->c[1] = Mq->b[0]; - Mq->c[2] = Mq->b[0] + Mq->b[1]; - Mq->c[3] = Mq->b[0] + Mq->b[1] + Mq->b[2]; - Mq->q = order; - Mq->p = 0; - } - - /* 3rd order scheme [Ruth, 1983] */ - if (order == 3) { - const sunrealtype a1 = SUN_RCONST(2.0)/SUN_RCONST(3.0); - const sunrealtype a2 = -SUN_RCONST(2.0)/SUN_RCONST(3.0); - const sunrealtype a3 = SUN_RCONST(1.0); - const sunrealtype b1 = SUN_RCONST(7.0)/SUN_RCONST(24.0); - const sunrealtype b2 = SUN_RCONST(3.0)/SUN_RCONST(4.0); - const sunrealtype b3 = -SUN_RCONST(1.0)/SUN_RCONST(24.0); - - Mp = ARKodeButcherTable_Alloc(3, SUNTRUE); - if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = b1; - Mp->b[1] = b2; - Mp->b[2] = b3; - Mp->A[0][0] = b1; - Mp->A[1][0] = b1; - Mp->A[1][1] = b2; - Mp->A[2][0] = b1; - Mp->A[2][1] = b2; - Mp->A[2][2] = b3; - Mp->c[0] = Mp->b[0]; - Mp->c[1] = Mp->b[0] + Mp->b[1]; - Mp->c[2] = Mp->b[0] + Mp->b[1] + Mp->b[2]; - Mp->q = order; - Mp->p = 0; - - Mq = ARKodeButcherTable_Alloc(3, SUNTRUE); - if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = a1; - Mq->b[1] = a2; - Mq->b[2] = a3; - Mq->A[1][0] = a1; - Mq->A[2][0] = a1; - Mq->A[2][1] = a2; - Mq->c[0] = Mq->b[0]; - Mq->c[1] = Mq->b[0] + Mq->b[1]; - Mq->c[2] = Mq->b[0] + Mq->b[1] + Mq->b[2]; - Mq->q = order; - Mq->p = 0; - } - - /* Pseudo Leapfrog */ - if (order == 2) { - Mp = ARKodeButcherTable_Alloc(2, SUNTRUE); - if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = RCONST(0.5); - Mp->b[1] = RCONST(0.5); - Mp->A[0][0] = RCONST(0.5); - Mp->A[1][0] = RCONST(0.5); - Mp->A[1][1] = RCONST(0.5); - Mp->c[0] = RCONST(0.5); - Mp->c[1] = RCONST(1.0); - Mp->q = order; - Mp->p = 0; - - Mq = ARKodeButcherTable_Alloc(2, SUNTRUE); - if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = RCONST(1.0); - Mq->A[1][0] = RCONST(1.0); - Mq->c[0] = RCONST(0.0); - Mq->c[1] = RCONST(1.0); - Mq->q = order; - Mq->p = 0; - } - - /* Symplectic Euler */ - if (order == 1) { - Mp = ARKodeButcherTable_Alloc(1, SUNTRUE); - if (check_retval((void *) Mp, "ARKodeButcherTable_Alloc", 0)) return 1; - Mp->b[0] = RCONST(1.0); - Mp->A[0][0] = RCONST(1.0); - Mp->c[0] = RCONST(1.0); - Mp->q = order; - Mp->p = 0; - - Mq = ARKodeButcherTable_Alloc(1, SUNTRUE); - if (check_retval((void *) Mq, "ARKodeButcherTable_Alloc", 0)) return 1; - Mq->b[0] = RCONST(1.0); - Mq->A[0][0] = RCONST(0.0); - Mq->c[0] = RCONST(0.0); - Mq->q = order; - Mq->p = 0; - } + arkode_mem = SPRKStepCreate(dqdt, dpdt, T0, y, sunctx); - retval = SPRKStepSetTables(arkode_mem, order, 0, Mp, Mq); - if (check_retval(&retval, "SPRKStepSetTables", 1)) return 1; + retval = SPRKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; - if (step_mode == 1) { - retval = SPRKStepSetFixedStep(arkode_mem, dt); - if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + // if (step_mode == 1) { + // retval = SPRKStepSetFixedStep(arkode_mem, dt); + // if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); - if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; - } else if (step_mode == 2 || step_mode == 3) { - /* Adaptivity based on [Hairer and Soderlind, 2005] */ - retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); - if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + // retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); + // if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + // } else if (step_mode == 2 || step_mode == 3) { + // /* Adaptivity based on [Hairer and Soderlind, 2005] */ + // retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); + // if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); - udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); - retval = SPRKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); - if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; + // udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); + // udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); + // retval = SPRKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); + // if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; - retval = SPRKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); - if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; - } + // retval = SPRKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); + // if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + // } retval = SPRKStepSetUserData(arkode_mem, (void *) udata); if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; @@ -335,7 +194,7 @@ int main(int argc, char* argv[]) retval = ARKStepSetUserData(arkode_mem, (void *) udata); if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); + retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-8), SUN_RCONST(10e-12)); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 395c70260a..6d7238bfb9 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -23,30 +23,41 @@ extern "C" { #endif -struct ARKodeSprkMem_s { +typedef enum { + ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ + ARKODE_MIN_SPRK_NUM = 0, + ARKODE_SYMPLECTIC_EULER_1 = ARKODE_MIN_SPRK_NUM, + ARKODE_SYMPLECTIC_LEAPFROG_2, + ARKODE_SYMPLECTIC_RUTH_3, + ARKODE_SYMPLECTIC_MCLAUCHLAN_4, + ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_MCLAUCHLAN_4 +} ARKODE_SPRKMethodID; + +struct ARKodeSPRKMem_s { - int q; /* method order of accuracy */ - int stages; /* number of stages */ - sunrealtype* b; /* diagonally implicit cofficients */ - sunrealtype* B; /* explicit table coefficients */ + int q; /* method order of accuracy */ + int stages; /* number of stages */ + sunrealtype* b; /* diagonally implicit coefficients */ + sunrealtype* B; /* explicit table coefficients */ }; -typedef _SUNDIALS_STRUCT_ ARKodeSprkMem_s *ARKodeSprkMem; +typedef _SUNDIALS_STRUCT_ ARKodeSPRKMem_s *ARKodeSPRKMem; /* Utility routines to allocate/free/output SPRK structures */ -SUNDIALS_EXPORT ARKodeSprkMem ARKodeSprkMem_Alloc(int stages); -SUNDIALS_EXPORT ARKodeSprkMem ARKodeSprkMem_Copy(ARKodeSprkMem B); -SUNDIALS_EXPORT void ARKodeSprkMem_Space(ARKodeSprkMem B, sunindextype *liw, sunindextype *lrw); -SUNDIALS_EXPORT void ARKodeSprkMem_Free(ARKodeSprkMem B); -SUNDIALS_EXPORT int ARKodeSprkMem_ToButcher(ARKodeSprkMem sprk_mem, ARKodeButcherTable* b_ptr, ARKodeButcherTable* B_ptr); +SUNDIALS_EXPORT ARKodeSPRKMem ARKodeSPRKMem_Alloc(int stages); +SUNDIALS_EXPORT ARKodeSPRKMem ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id); +SUNDIALS_EXPORT ARKodeSPRKMem ARKodeSPRKMem_Copy(ARKodeSPRKMem B); +SUNDIALS_EXPORT void ARKodeSPRKMem_Space(ARKodeSPRKMem B, sunindextype *liw, sunindextype *lrw); +SUNDIALS_EXPORT void ARKodeSPRKMem_Free(ARKodeSPRKMem B); +SUNDIALS_EXPORT int ARKodeSPRKMem_ToButcher(ARKodeSPRKMem sprk_mem, ARKodeButcherTable* b_ptr, ARKodeButcherTable* B_ptr); -typedef enum { - ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ - ARKODE_MIN_SPRK_NUM = 0, - ARKODE_SYMPLECTIC_EULER = ARKODE_MIN_SPRK_NUM, - ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_EULER -} ARKODE_SPRKMethodID; +/* Different methods */ + +ARKodeSPRKMem ARKodeSymplecticEuler(); +ARKodeSPRKMem ARKodeSymplecticLeapfrog(); +ARKodeSPRKMem ARKodeSymplecticRuth3(); +ARKodeSPRKMem ARKodeSymplecticMcLauchlan4(); #ifdef __cplusplus } diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index a6d7152426..fa68bdf09a 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -22,6 +22,7 @@ #include #include #include +#include #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { @@ -31,17 +32,18 @@ extern "C" { * SPRKStep Constants * ----------------- */ -struct TakeStepFunctor; -typedef struct TakeStepFunctor* TakeStep; +static const int SPRKSTEP_DEFAULT_1 = ARKODE_SYMPLECTIC_EULER_1; +static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_LEAPFROG_2; +static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_RUTH_3; +static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLAUCHLAN_4; /* ------------------- * Exported Functions * ------------------- */ /* Create, Resize, and Reinitialization functions */ -SUNDIALS_EXPORT void* SPRKStepCreate(ARKRhsFn* fk, int num_rhs, +SUNDIALS_EXPORT void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, - TakeStepFunctor take_step, SUNContext sunctx); SUNDIALS_EXPORT int SPRKStepResize(void *arkode_mem, N_Vector ynew, @@ -49,7 +51,7 @@ SUNDIALS_EXPORT int SPRKStepResize(void *arkode_mem, N_Vector ynew, ARKVecResizeFn resize, void *resize_data); -SUNDIALS_EXPORT int SPRKStepReInit(void* arkode_mem, ARKRhsFn* fk, realtype t0, N_Vector y0); +SUNDIALS_EXPORT int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0); SUNDIALS_EXPORT int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR); diff --git a/src/arkode/CMakeLists.txt b/src/arkode/CMakeLists.txt index 2f0544a5f2..2b529db6e1 100644 --- a/src/arkode/CMakeLists.txt +++ b/src/arkode/CMakeLists.txt @@ -37,8 +37,8 @@ set(arkode_SOURCES arkode_mristep_nls.c arkode_mristep.c arkode_root.c - # arkode_sprkstep_io.c - # arkode_sprkstep.c + arkode_sprkstep_io.c + arkode_sprkstep.c arkode_sprk.c arkode.c ) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 5eff0ee84a..f0e3375175 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1872,7 +1872,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return(ARK_SUCCESS); } -int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +int arkStep_TakeStep_SPRK(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeARKStepMem step_mem; @@ -1880,13 +1880,13 @@ int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) N_Vector Yi; /* access ARKodeARKStepMem structure */ - retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_Sprk", + retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_SPRK", &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); // if (!ark_mem->fixedstep) { // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", - // "arkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); + // "arkStep_TakeStep_SPRK", "!!!! This TakeStep only works with fixed steps !!!!"); // return(ARK_UNRECOGNIZED_ERROR); // } @@ -1930,7 +1930,7 @@ int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) } /* Increment SPRK algorithm with compensated summation */ -int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +int arkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeARKStepMem step_mem; @@ -1938,13 +1938,13 @@ int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) N_Vector delta_Yi, yn_plus_delta_Yi; /* access ARKodeARKStepMem structure */ - retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_Sprk", + retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_SPRK", &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); // if (!ark_mem->fixedstep) { // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", - // "arkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); + // "arkStep_TakeStep_SPRK", "!!!! This TakeStep only works with fixed steps !!!!"); // return(ARK_UNRECOGNIZED_ERROR); // } diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index 79e30f5b15..1a4b8dcef9 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -193,8 +193,8 @@ int arkStep_GetGammas(void* arkode_mem, realtype *gamma, int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode); int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); -int arkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); -int arkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int arkStep_TakeStep_SPRK(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int arkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); /* Internal utility routines */ int arkStep_AccessStepMem(void* arkode_mem, const char *fname, diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 6b3217aa12..f2d485fa36 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -11,66 +11,69 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End *--------------------------------------------------------------- + * *--------------------------------------------------------------*/ #include #include #include -#include "arkode/arkode.h" -#include "arkode/arkode_butcher.h" -#include "sundials/sundials_types.h" - -static const struct ARKodeSprkMem_s SymplecticEuler = { - /* q = */ 1, - /* stages = */ 1, - /* b = */ { SUN_RCONST(1.0) }, - /* B = */ { SUN_RCONST(1.0) } -}; - -static const struct ARKodeSprkMem_s PseudoLeapfrog = { - /* q = */ 2, - /* stages = */ 2, - /* b = */ { SUN_RCONST(0.5), SUN_RCONST(0.5) }, - /* B = */ { SUN_RCONST(1.0), SUN_RCONST(0.0) } -}; - -static const struct ARKodeSprkMem_s Ruth3 = { - /* q = */ 3, - /* stages = */ 3, - /* b = */ { - SUN_RCONST(7.0)/SUN_RCONST(24.0), - SUN_RCONST(3.0)/SUN_RCONST(4.0), - -SUN_RCONST(1.0)/SUN_RCONST(24.0) - }, - /* B = */ { - /* a1 = */ SUN_RCONST(2.0)/SUN_RCONST(3.0), - /* a2 = */ -SUN_RCONST(2.0)/SUN_RCONST(3.0), - /* a3 = */ SUN_RCONST(1.0) - } -}; - -static const struct ARKodeSprkMem_s McLauchlan4 = { - /* q = */ 4, - /* stages = */ 4, - /* b = */ { - SUN_RCONST(0.134496199277431089), - -SUN_RCONST(0.224819803079420806), - SUN_RCONST(0.756320000515668291), - SUN_RCONST(0.33400360328632142) - }, - /* B = */ { - SUN_RCONST(0.515352837431122936), - -SUN_RCONST(0.085782019412973646), - SUN_RCONST(0.441583023616466524), - SUN_RCONST(0.128846158365384185) - } -}; +#include +#include +#include + +ARKodeSPRKMem ARKodeSymplecticEuler() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(1); + sprk_mem->q = 1; + sprk_mem->stages = 1; + sprk_mem->b[0] = SUN_RCONST(1.0); + sprk_mem->B[0] = SUN_RCONST(1.0); + return sprk_mem; +} -ARKodeSprkMem ARKodeSprkMem_Alloc(int stages) +ARKodeSPRKMem ARKodeSymplecticLeapfrog() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); + sprk_mem->q = 2; + sprk_mem->stages = 2; + sprk_mem->b[0] = SUN_RCONST(0.5); + sprk_mem->b[1] = SUN_RCONST(0.5); + sprk_mem->B[0] = SUN_RCONST(1.0); + sprk_mem->B[1] = SUN_RCONST(0.0); + return sprk_mem; +} + +ARKodeSPRKMem ARKodeSymplecticRuth3() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(3); + sprk_mem->q = 3; + sprk_mem->stages = 3; + sprk_mem->b[0] = SUN_RCONST(7.0)/SUN_RCONST(24.0); + sprk_mem->b[1] = SUN_RCONST(3.0)/SUN_RCONST(4.0); + sprk_mem->b[2] = -SUN_RCONST(1.0)/SUN_RCONST(24.0); + sprk_mem->B[0] = SUN_RCONST(2.0)/SUN_RCONST(3.0); + sprk_mem->B[1] = -SUN_RCONST(2.0)/SUN_RCONST(3.0); + sprk_mem->B[2] = SUN_RCONST(1.0); + return sprk_mem; +} + +ARKodeSPRKMem ARKodeSymplecticMcLauchlan4() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(4); + sprk_mem->q = 4; + sprk_mem->stages = 4; + sprk_mem->b[0] = SUN_RCONST(0.134496199277431089); + sprk_mem->b[1] = -SUN_RCONST(0.224819803079420806); + sprk_mem->b[2] = SUN_RCONST(0.756320000515668291); + sprk_mem->b[3] = SUN_RCONST(0.33400360328632142); + sprk_mem->B[0] = SUN_RCONST(0.515352837431122936); + sprk_mem->B[1] = -SUN_RCONST(0.085782019412973646); + sprk_mem->B[2] = SUN_RCONST(0.441583023616466524); + sprk_mem->B[3] = SUN_RCONST(0.128846158365384185); + return sprk_mem; +} + +ARKodeSPRKMem ARKodeSPRKMem_Alloc(int stages) { - ARKodeSprkMem sprk_mem; + ARKodeSPRKMem sprk_mem; - sprk_mem = (ARKodeSprkMem) malloc(sizeof(struct ARKodeSprkMem_s)); + sprk_mem = (ARKodeSPRKMem) malloc(sizeof(struct ARKodeSPRKMem_s)); sprk_mem->q = 0; sprk_mem->stages = stages; @@ -80,12 +83,28 @@ ARKodeSprkMem ARKodeSprkMem_Alloc(int stages) return sprk_mem; } -ARKodeSprkMem ARKodeSprkMem_Copy(ARKodeSprkMem that_sprk_mem) +ARKodeSPRKMem ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) +{ + switch(id) { + case ARKODE_SYMPLECTIC_EULER_1: + return ARKodeSymplecticEuler(); + case ARKODE_SYMPLECTIC_LEAPFROG_2: + return ARKodeSymplecticLeapfrog(); + case ARKODE_SYMPLECTIC_RUTH_3: + return ARKodeSymplecticRuth3(); + case ARKODE_SYMPLECTIC_MCLAUCHLAN_4: + return ARKodeSymplecticMcLauchlan4(); + default: + return NULL; + } +} + +ARKodeSPRKMem ARKodeSPRKMem_Copy(ARKodeSPRKMem that_sprk_mem) { int i; - ARKodeSprkMem sprk_mem; + ARKodeSPRKMem sprk_mem; - sprk_mem = ARKodeSprkMem_Alloc(that_sprk_mem->stages); + sprk_mem = ARKodeSPRKMem_Alloc(that_sprk_mem->stages); sprk_mem->q = that_sprk_mem->q; @@ -98,14 +117,14 @@ ARKodeSprkMem ARKodeSprkMem_Copy(ARKodeSprkMem that_sprk_mem) return sprk_mem; } -void ARKodeSprkMem_Space(ARKodeSprkMem sprk_mem, sunindextype *liw, sunindextype *lrw) +void ARKodeSPRKMem_Space(ARKodeSPRKMem sprk_mem, sunindextype *liw, sunindextype *lrw) { *liw = 2; *lrw = sprk_mem->stages * 2; return; } -void ARKodeSprkMem_Free(ARKodeSprkMem sprk_mem) +void ARKodeSPRKMem_Free(ARKodeSPRKMem sprk_mem) { if (sprk_mem) { @@ -116,7 +135,7 @@ void ARKodeSprkMem_Free(ARKodeSprkMem sprk_mem) return; } -int ARKodeSprkMem_ToButcher(ARKodeSprkMem sprk_mem, ARKodeButcherTable* b_ptr, ARKodeButcherTable* B_ptr) +int ARKodeSPRKMem_ToButcher(ARKodeSPRKMem sprk_mem, ARKodeButcherTable* b_ptr, ARKodeButcherTable* B_ptr) { int i, j; ARKodeButcherTable b, B; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 95e71f211f..d41c0f3e2f 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -1,5 +1,5 @@ /*--------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU + * Programmer(s): Cody J. Balos @ LLNL *--------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2022, Lawrence Livermore National Security @@ -35,16 +35,21 @@ SPRKStep Exported functions -- Required ===============================================================*/ -void* SPRKStepCreate(ARKRhsFn* fk, int num_rhs, realtype t0, N_Vector y0, - TakeStep take_step, SUNContext sunctx) +void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNContext sunctx) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; booleantype nvectorOK; int retval; - /* Check that at least one of fk is supplied and is to be used */ - if (fk == NULL) { + /* Check that f1 and f2 are supplied */ + if (f1 == NULL) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", + "SPRKStepCreate", MSG_ARK_NULL_F); + return(NULL); + } + + if (f2 == NULL) { arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", MSG_ARK_NULL_F); return(NULL); @@ -88,7 +93,13 @@ void* SPRKStepCreate(ARKRhsFn* fk, int num_rhs, realtype t0, N_Vector y0, return(NULL); } memset(step_mem, 0, sizeof(struct ARKodeSPRKStepMemRec)); - step_mem->take_step = take_step; + + /* Allocate vectors in stepper mem */ + if (!arkAllocVec(ark_mem, y0, &(step_mem->f1vec))) { + SPRKStepFree((void**) &ark_mem); return(NULL); } + + if (!arkAllocVec(ark_mem, y0, &(step_mem->f2vec))) { + SPRKStepFree((void**) &ark_mem); return(NULL); } /* Attach step_mem structure and function pointers to ark_mem */ ark_mem->step_attachlinsol = NULL; @@ -115,18 +126,16 @@ void* SPRKStepCreate(ARKRhsFn* fk, int num_rhs, realtype t0, N_Vector y0, } /* Copy the input parameters into ARKODE state */ - step_mem->fk = fk; + step_mem->f1 = f1; + step_mem->f2 = f2; // /* Update the ARKODE workspace requirements */ // ark_mem->liw += 41; /* fcn/data ptr, int, long int, sunindextype, booleantype */ // ark_mem->lrw += 10; - /* Initialize all the counters */ - int irhs = 0; - for (irhs = 0; irhs < step_mem->num_rhs; ++irhs) - { - step_mem->nfk[irhs] = 0; - } + /* Initialize the counters */ + step_mem->nf1 = 0; + step_mem->nf2 = 0; // /* Initialize external polynomial forcing data */ // step_mem->expforcing = SUNFALSE; @@ -190,7 +199,7 @@ int SPRKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, Note all internal counters are set to 0 on re-initialization. ---------------------------------------------------------------*/ -int SPRKStepReInit(void* arkode_mem, ARKRhsFn* fk, realtype t0, N_Vector y0) +int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -208,8 +217,8 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn* fk, realtype t0, N_Vector y0) return(ARK_NO_MALLOC); } - /* Check that at least one of fe, fi is supplied and is to be used */ - if (fk == NULL) { + /* Check that f1 and f2 are supplied */ + if (f1 == NULL || f2 == NULL) { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepReInit", MSG_ARK_NULL_F); return(ARK_ILL_INPUT); @@ -223,7 +232,8 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn* fk, realtype t0, N_Vector y0) } /* Copy the input parameters into ARKODE state */ - step_mem->fk = fk; + step_mem->f1 = f1; + step_mem->f2 = f2; /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT); @@ -233,12 +243,9 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn* fk, realtype t0, N_Vector y0) return(retval); } - /* Initialize all the counters */ - int irhs = 0; - for (irhs = 0; irhs < step_mem->num_rhs; ++irhs) - { - step_mem->nfk[irhs] = 0; - } + /* Initialize the counters */ + step_mem->nf1 = 0; + step_mem->nf2 = 0; return(ARK_SUCCESS); } @@ -283,35 +290,35 @@ int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) ARKODE utility routines) ---------------------------------------------------------------*/ -int SPRKStepSStolerances(void *arkode_mem, realtype reltol, realtype abstol) -{ - return(arkSStolerances((ARKodeMem) arkode_mem, reltol, abstol)); -} +// int SPRKStepSStolerances(void *arkode_mem, realtype reltol, realtype abstol) +// { +// return(arkSStolerances((ARKodeMem) arkode_mem, reltol, abstol)); +// } -int SPRKStepSVtolerances(void *arkode_mem, realtype reltol, N_Vector abstol) -{ - return(arkSVtolerances((ARKodeMem) arkode_mem, reltol, abstol)); -} +// int SPRKStepSVtolerances(void *arkode_mem, realtype reltol, N_Vector abstol) +// { +// return(arkSVtolerances((ARKodeMem) arkode_mem, reltol, abstol)); +// } -int SPRKStepWFtolerances(void *arkode_mem, ARKEwtFn efun) -{ - return(arkWFtolerances((ARKodeMem) arkode_mem, efun)); -} +// int SPRKStepWFtolerances(void *arkode_mem, ARKEwtFn efun) +// { +// return(arkWFtolerances((ARKodeMem) arkode_mem, efun)); +// } -int SPRKStepResStolerance(void *arkode_mem, realtype rabstol) -{ - return(arkResStolerance((ARKodeMem) arkode_mem, rabstol)); -} +// int SPRKStepResStolerance(void *arkode_mem, realtype rabstol) +// { +// return(arkResStolerance((ARKodeMem) arkode_mem, rabstol)); +// } -int SPRKStepResVtolerance(void *arkode_mem, N_Vector rabstol) -{ - return(arkResVtolerance((ARKodeMem) arkode_mem, rabstol)); -} +// int SPRKStepResVtolerance(void *arkode_mem, N_Vector rabstol) +// { +// return(arkResVtolerance((ARKodeMem) arkode_mem, rabstol)); +// } -int SPRKStepResFtolerance(void *arkode_mem, ARKRwtFn rfun) -{ - return(arkResFtolerance((ARKodeMem) arkode_mem, rfun)); -} +// int SPRKStepResFtolerance(void *arkode_mem, ARKRwtFn rfun) +// { +// return(arkResFtolerance((ARKodeMem) arkode_mem, rfun)); +// } /*--------------------------------------------------------------- @@ -365,9 +372,19 @@ void SPRKStepFree(void **arkode_mem) ark_mem = (ARKodeMem) (*arkode_mem); if (ark_mem->step_mem != NULL) { step_mem = (ARKodeSPRKStepMem) ark_mem->step_mem; + + if (step_mem->f1 != NULL) { + arkFreeVec(ark_mem, &step_mem->f1vec); + step_mem->f1 = NULL; + } + + if (step_mem->f2 != NULL) { + arkFreeVec(ark_mem, &step_mem->f2vec); + step_mem->f2 = NULL; + } + + ARKodeSPRKMem_Free(step_mem->method); - - /* free the time stepper module itself */ free(ark_mem->step_mem); ark_mem->step_mem = NULL; } @@ -415,27 +432,52 @@ int sprkStep_Init(void* arkode_mem, int init_type) if (retval != ARK_SUCCESS) return(retval); /* immediately return if reset */ - if (init_type == RESET_INIT) return(ARK_SUCCESS); + if (init_type == RESET_INIT) { return(ARK_SUCCESS); } /* initializations/checks for (re-)initialization call */ if (init_type == FIRST_INIT) { + switch (step_mem->q) { + case 1: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_1); + break; + case 2: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_2); + break; + case 3: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_3); + break; + case 4: + default: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); + break; + } + + } /* set appropriate TakeStep routine based on problem configuration */ /* (only one choice for now) */ - ark_mem->step = sprkStep_TakeStep_Sprk; - // ark_mem->step = sprkStep_TakeStep_SprkInc; + ark_mem->step = sprkStep_TakeStep; + // ark_mem->step = sprkStep_TakeStep_SPRKInc; return(ARK_SUCCESS); } -/* Utility to call f_k and increment the counter */ -int sprkStep_Fk(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector Fk, int k, void* user_data) +/* Utility to call f1 and increment the counter */ +int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f1, void* user_data) +{ + int retval = step_mem->f1(tcur, ycur, f1, user_data); + step_mem->nf1++; + return retval; +} + +/* Utility to call f2 and increment the counter */ +int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f2, void* user_data) { - int retval = step_mem->fk[k](tcur, ycur, Fk, user_data); - step_mem->nfk[k]++; + int retval = step_mem->f2(tcur, ycur, f2, user_data); + step_mem->nf2++; return retval; } @@ -696,6 +738,7 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; + ARKodeSPRKMem method_mem; int retval, is; N_Vector delta_Yi, yn_plus_delta_Yi; @@ -704,11 +747,26 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - return step_mem->take_step->call(step_mem->take_step, arkode_mem, dsmPtr, nflagPtr); + method_mem = step_mem->method; + + for (is = 0; is < method_mem->stages; is++) { + retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, + method_mem->b[is], method_mem->B[is], ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + + retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, + method_mem->b[is], method_mem->B[is], ark_mem->ycur); + if (retval != ARK_SUCCESS) return(retval); + } + + *nflagPtr = 0; + *dsmPtr = 0; + + return ARK_SUCCESS; } // /* Increment SPRK algorithm with compensated summation */ -// int sprkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +// int sprkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) // { // ARKodeMem ark_mem; // ARKodeSPRKStepMem step_mem; @@ -716,13 +774,13 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) // N_Vector delta_Yi, yn_plus_delta_Yi; // /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_Sprk", +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", // &ark_mem, &step_mem); // if (retval != ARK_SUCCESS) return(retval); // // if (!ark_mem->fixedstep) { // // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::SPRKStep", -// // "sprkStep_TakeStep_Sprk", "!!!! This TakeStep only works with fixed steps !!!!"); +// // "sprkStep_TakeStep_SPRK", "!!!! This TakeStep only works with fixed steps !!!!"); // // return(ARK_UNRECOGNIZED_ERROR); // // } @@ -841,475 +899,158 @@ booleantype sprkStep_CheckNVector(N_Vector tmpl) return(SUNTRUE); } +int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector prev_stage, + sunrealtype bi, sunrealtype Bi, N_Vector stage_result) +{ + int retval = 0; + + /* set current stage time(s) */ + ark_mem->tcur = ark_mem->tn + bi*ark_mem->h; + /* evaluate f_1 at the previous stage value */ + N_VConst(ZERO, step_mem->f1vec); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_f1(step_mem, ark_mem->tcur, prev_stage, step_mem->f1vec, ark_mem->user_data); + if (retval != 0) return ARK_RHSFUNC_FAIL; + /* update ycur with the q stage */ + N_VLinearSum(ONE, prev_stage, ark_mem->h*bi, step_mem->f1vec, stage_result); -/*--------------------------------------------------------------- - Utility routines for interfacing with MRIStep - ---------------------------------------------------------------*/ + /* evaluate f_2 with the stage value for q */ + N_VConst(ZERO, step_mem->f2vec); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_f2(step_mem, ark_mem->tn + Bi*ark_mem->h, stage_result, step_mem->f2vec, ark_mem->user_data); + if (retval != 0) return ARK_RHSFUNC_FAIL; + /* update ycur with the stage value for p */ + N_VLinearSum(ONE, stage_result, ark_mem->h*Bi, step_mem->f2vec, stage_result); -// /*------------------------------------------------------------------------------ -// SPRKStepCreateMRIStepInnerStepper + // /* keep track of the stage number */ + // step_mem->istage++; -// Wraps an SPRKStep memory structure as an MRIStep inner stepper. -// ----------------------------------------------------------------------------*/ + return ARK_SUCCESS; +} -// int SPRKStepCreateMRIStepInnerStepper(void *inner_arkode_mem, -// MRIStepInnerStepper *stepper) +// int sprkStep_TakeStep_McLauchlan4(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) // { // int retval; // ARKodeMem ark_mem; // ARKodeSPRKStepMem step_mem; +// struct McLauchlan4Mem* method_mem; -// retval = sprkStep_AccessStepMem(inner_arkode_mem, -// "SPRKStepCreateMRIStepInnerStepper", -// &ark_mem, &step_mem); -// if (retval) { -// arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", -// "SPRKStepCreateMRIStepInnerStepper", -// "The SPRKStep memory pointer is NULL"); -// return ARK_ILL_INPUT; -// } - -// retval = MRIStepInnerStepper_Create(ark_mem->sunctx, stepper); +// /* access ARKodeSPRKStepMem structure */ +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_McLauchlan4", +// &ark_mem, &step_mem); // if (retval != ARK_SUCCESS) return(retval); -// retval = MRIStepInnerStepper_SetContent(*stepper, inner_arkode_mem); -// if (retval != ARK_SUCCESS) return(retval); +// step_mem->istage = 0; +// method_mem = (struct McLauchlan4Mem*) self->content; -// retval = MRIStepInnerStepper_SetEvolveFn(*stepper, -// sprkStep_MRIStepInnerEvolve); +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, +// method_mem->b1, method_mem->a1, ark_mem->ycur); // if (retval != ARK_SUCCESS) return(retval); -// retval = MRIStepInnerStepper_SetFullRhsFn(*stepper, -// sprkStep_MRIStepInnerFullRhs); +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, +// method_mem->b2, method_mem->a2, ark_mem->ycur); // if (retval != ARK_SUCCESS) return(retval); -// retval = MRIStepInnerStepper_SetResetFn(*stepper, -// sprkStep_MRIStepInnerReset); +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, +// method_mem->b3, method_mem->a3, ark_mem->ycur); // if (retval != ARK_SUCCESS) return(retval); -// return(ARK_SUCCESS); -// } - +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, method_mem->b4, +// method_mem->a4, ark_mem->ycur); +// if (retval != ARK_SUCCESS) return(retval); -// /*------------------------------------------------------------------------------ -// sprkStep_MRIStepInnerEvolve +// *nflagPtr = 0; +// *dsmPtr = 0; -// Implementation of MRIStepInnerStepperEvolveFn to advance the inner (fast) -// ODE IVP. -// ----------------------------------------------------------------------------*/ +// return ARK_SUCCESS; +// } -// int sprkStep_MRIStepInnerEvolve(MRIStepInnerStepper stepper, realtype t0, -// realtype tout, N_Vector y) +// int sprkStep_TakeStep_Ruth3(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) // { -// void* arkode_mem; /* arkode memory */ -// realtype tret; /* return time */ -// realtype tshift, tscale; /* time normalization values */ -// N_Vector *forcing; /* forcing vectors */ -// int nforcing; /* number of forcing vectors */ -// int retval; /* return value */ - -// /* extract the ARKODE memory struct */ -// retval = MRIStepInnerStepper_GetContent(stepper, &arkode_mem); -// if (retval != ARK_SUCCESS) return(retval); +// int retval; +// ARKodeMem ark_mem; +// ARKodeSPRKStepMem step_mem; +// struct Ruth3Mem* method_mem; -// /* get the forcing data */ -// retval = MRIStepInnerStepper_GetForcingData(stepper, -// &tshift, &tscale, -// &forcing, &nforcing); +// /* access ARKodeSPRKStepMem structure */ +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_Ruth3", +// &ark_mem, &step_mem); // if (retval != ARK_SUCCESS) return(retval); -// /* set the inner forcing data */ -// retval = sprkStep_SetInnerForcing(arkode_mem, tshift, tscale, -// forcing, nforcing); -// if (retval != ARK_SUCCESS) return(retval); +// step_mem->istage = 0; +// method_mem = (struct Ruth3Mem*) self->content; -// /* set the stop time */ -// retval = SPRKStepSetStopTime(arkode_mem, tout); +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, +// method_mem->b1, method_mem->a1, ark_mem->ycur); // if (retval != ARK_SUCCESS) return(retval); -// /* evolve inner ODE */ -// retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); -// if (retval < 0) return(retval); - -// /* disable inner forcing */ -// retval = sprkStep_SetInnerForcing(arkode_mem, ZERO, ONE, NULL, 0); +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, +// method_mem->b2, method_mem->a2, ark_mem->ycur); // if (retval != ARK_SUCCESS) return(retval); -// return(ARK_SUCCESS); -// } - - -// /*------------------------------------------------------------------------------ -// sprkStep_MRIStepInnerFullRhs - -// Implementation of MRIStepInnerStepperFullRhsFn to compute the full inner -// (fast) ODE IVP RHS. -// ----------------------------------------------------------------------------*/ - -// int sprkStep_MRIStepInnerFullRhs(MRIStepInnerStepper stepper, realtype t, -// N_Vector y, N_Vector f, int mode) -// { -// void* arkode_mem; -// int retval; - -// /* extract the ARKODE memory struct */ -// retval = MRIStepInnerStepper_GetContent(stepper, &arkode_mem); +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, +// method_mem->b3, method_mem->a3, ark_mem->ycur); // if (retval != ARK_SUCCESS) return(retval); -// return(sprkStep_FullRHS(arkode_mem, t, y, f, mode)); -// } - - -// /*------------------------------------------------------------------------------ -// sprkStep_MRIStepInnerReset +// *nflagPtr = 0; +// *dsmPtr = 0; -// Implementation of MRIStepInnerStepperResetFn to reset the inner (fast) stepper -// state. -// ----------------------------------------------------------------------------*/ +// return ARK_SUCCESS; +// } -// int sprkStep_MRIStepInnerReset(MRIStepInnerStepper stepper, realtype tR, -// N_Vector yR) +// int sprkStep_TakeStep_PseudoLeapfrog(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) // { -// void* arkode_mem; -// int retval; +// int retval; +// ARKodeMem ark_mem; +// ARKodeSPRKStepMem step_mem; +// struct Ruth3Mem* method_mem; -// /* extract the ARKODE memory struct */ -// retval = MRIStepInnerStepper_GetContent(stepper, &arkode_mem); +// /* access ARKodeSPRKStepMem structure */ +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_PseudoLeapfrog", +// &ark_mem, &step_mem); // if (retval != ARK_SUCCESS) return(retval); -// return(SPRKStepReset(arkode_mem, tR, yR)); -// } +// step_mem->istage = 0; +// method_mem = (struct Ruth3Mem*) self->content; +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, +// method_mem->b1, method_mem->a1, ark_mem->ycur); +// if (retval != ARK_SUCCESS) return(retval); -// /*------------------------------------------------------------------------------ -// sprkStep_ApplyForcing +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, +// method_mem->b2, method_mem->a2, ark_mem->ycur); +// if (retval != ARK_SUCCESS) return(retval); -// Determines the linear combination coefficients and vectors to apply forcing -// at a given value of the independent variable (t). This occurs through -// appending coefficients and N_Vector pointers to the underlying cvals and Xvecs -// arrays in the step_mem structure. The dereferenced input *nvec should indicate -// the next available entry in the cvals/Xvecs arrays. The input 's' is a -// scaling factor that should be applied to each of these coefficients. -// ----------------------------------------------------------------------------*/ +// *nflagPtr = 0; +// *dsmPtr = 0; -// void sprkStep_ApplyForcing(ARKodeSPRKStepMem step_mem, realtype t, -// realtype s, int *nvec) -// { -// realtype tau, taui; -// int i; - -// /* always append the constant forcing term */ -// step_mem->cvals[*nvec] = s; -// step_mem->Xvecs[*nvec] = step_mem->forcing[0]; -// (*nvec) += 1; - -// /* compute normalized time tau and initialize tau^i */ -// tau = (t - step_mem->tshift) / (step_mem->tscale); -// taui = tau; -// for (i=1; inforcing; i++) { -// step_mem->cvals[*nvec] = s*taui; -// step_mem->Xvecs[*nvec] = step_mem->forcing[i]; -// taui *= tau; -// (*nvec) += 1; -// } +// return ARK_SUCCESS; // } -// /*------------------------------------------------------------------------------ -// sprkStep_SetInnerForcing - -// Sets an array of coefficient vectors for a time-dependent external polynomial -// forcing term in the ODE RHS i.e., y' = fe(t,y) + fi(t,y) + p(t). This -// function is primarily intended for use with multirate integration methods -// (e.g., MRIStep) where SPRKStep is used to solve a modified ODE at a fast time -// scale. The polynomial is of the form - -// p(t) = sum_{i = 0}^{nvecs - 1} forcing[i] * ((t - tshift) / (tscale))^i - -// where tshift and tscale are used to normalize the time t (e.g., with MRIGARK -// methods). -// ----------------------------------------------------------------------------*/ - -// int sprkStep_SetInnerForcing(void* arkode_mem, realtype tshift, realtype tscale, -// N_Vector* forcing, int nvecs) +// int sprkStep_TakeStep_SymplecticEuler(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) // { +// int retval; // ARKodeMem ark_mem; // ARKodeSPRKStepMem step_mem; -// int retval; +// struct SymplecticEulerMem* method_mem; // /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_SetInnerForcing", -// &ark_mem, &step_mem); +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SymplecticEuler", +// &ark_mem, &step_mem); // if (retval != ARK_SUCCESS) return(retval); -// if (nvecs > 0) { - -// /* enable forcing */ -// if (step_mem->explicit) { -// step_mem->expforcing = SUNTRUE; -// step_mem->impforcing = SUNFALSE; -// } else { -// step_mem->expforcing = SUNFALSE; -// step_mem->impforcing = SUNTRUE; -// } -// step_mem->tshift = tshift; -// step_mem->tscale = tscale; -// step_mem->forcing = forcing; -// step_mem->nforcing = nvecs; - -// /* If cvals and Xvecs are not allocated then sprkStep_Init has not been -// called and the number of stages has not been set yet. These arrays will -// be allocated in sprkStep_Init and take into account the value of nforcing. -// On subsequent calls will check if enough space has allocated in case -// nforcing has increased since the original allocation. */ -// if (step_mem->cvals != NULL && step_mem->Xvecs != NULL) { - -// /* check if there are enough reusable arrays for fused operations */ -// if ((step_mem->nfusedopvecs - nvecs) < (2 * step_mem->stages + 2)) { - -// /* free current work space */ -// if (step_mem->cvals != NULL) { -// free(step_mem->cvals); -// ark_mem->lrw -= step_mem->nfusedopvecs; -// } -// if (step_mem->Xvecs != NULL) { -// free(step_mem->Xvecs); -// ark_mem->liw -= step_mem->nfusedopvecs; -// } - -// /* allocate reusable arrays for fused vector operations */ -// step_mem->nfusedopvecs = 2 * step_mem->stages + 2 + nvecs; - -// step_mem->cvals = NULL; -// step_mem->cvals = (realtype *) calloc(step_mem->nfusedopvecs, -// sizeof(realtype)); -// if (step_mem->cvals == NULL) return(ARK_MEM_FAIL); -// ark_mem->lrw += step_mem->nfusedopvecs; - -// step_mem->Xvecs = NULL; -// step_mem->Xvecs = (N_Vector *) calloc(step_mem->nfusedopvecs, -// sizeof(N_Vector)); -// if (step_mem->Xvecs == NULL) return(ARK_MEM_FAIL); -// ark_mem->liw += step_mem->nfusedopvecs; -// } -// } - -// } else { - -// /* disable forcing */ -// step_mem->expforcing = SUNFALSE; -// step_mem->impforcing = SUNFALSE; -// step_mem->tshift = ZERO; -// step_mem->tscale = ONE; -// step_mem->forcing = NULL; -// step_mem->nforcing = 0; - -// } - -// return(0); -// } - -/*=============================================================== - EOF - ===============================================================*/ - - - -int sprkStep_SprkStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector prev_stage, - N_Vector Fk, sunrealtype bi, sunrealtype Bi, N_Vector stage_result) -{ - int retval = 0; - - /* set current stage time(s) */ - ark_mem->tcur = ark_mem->tn + bi*ark_mem->h; - - /* evaluate f_1 at the previous stage value */ - N_VConst(ZERO, Fk); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_Fk(step_mem, ark_mem->tcur, prev_stage, - Fk, 0, ark_mem->user_data); - if (retval != 0) return ARK_RHSFUNC_FAIL; - - /* update ycur with the q stage */ - N_VLinearSum(ONE, prev_stage, ark_mem->h*bi, Fk, stage_result); - - /* evaluate f_2 with the stage value for q */ - N_VConst(ZERO, Fk); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_Fk(step_mem, ark_mem->tn + Bi*ark_mem->h, stage_result, - Fk, 1, ark_mem->user_data); - if (retval != 0) return ARK_RHSFUNC_FAIL; - - /* update ycur with the stage value for p */ - N_VLinearSum(ONE, stage_result, ark_mem->h*Bi, Fk, stage_result); - - /* keep track of the stage number */ - step_mem->istage++; - - return ARK_SUCCESS; -} - -int sprkStep_TakeStep_McLauchlan4(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -{ - int retval; - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - struct McLauchlan4Mem* method_mem; - - /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_McLauchlan4", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); - - step_mem->istage = 0; - method_mem = (struct McLauchlan4Mem*) self->content; - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, - method_mem->b1, method_mem->a1, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, - method_mem->b2, method_mem->a2, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, - method_mem->b3, method_mem->a3, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, method_mem->b4, - method_mem->a4, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - *nflagPtr = 0; - *dsmPtr = 0; - - return ARK_SUCCESS; -} - -int sprkStep_TakeStep_Ruth3(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -{ - int retval; - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - struct Ruth3Mem* method_mem; - - /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_Ruth3", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); - - step_mem->istage = 0; - method_mem = (struct Ruth3Mem*) self->content; - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, - method_mem->b1, method_mem->a1, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, - method_mem->b2, method_mem->a2, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, - method_mem->b3, method_mem->a3, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); +// step_mem->istage = 0; +// method_mem = (struct SymplecticEulerMem*) self->content; - *nflagPtr = 0; - *dsmPtr = 0; - - return ARK_SUCCESS; -} - -int sprkStep_TakeStep_PseudoLeapfrog(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -{ - int retval; - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - struct Ruth3Mem* method_mem; - - /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_PseudoLeapfrog", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); - - step_mem->istage = 0; - method_mem = (struct Ruth3Mem*) self->content; - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, - method_mem->b1, method_mem->a1, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, - method_mem->b2, method_mem->a2, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - *nflagPtr = 0; - *dsmPtr = 0; - - return ARK_SUCCESS; -} - -int sprkStep_TakeStep_SymplecticEuler(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -{ - int retval; - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - struct SymplecticEulerMem* method_mem; - - /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SymplecticEuler", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); - - step_mem->istage = 0; - method_mem = (struct SymplecticEulerMem*) self->content; - - retval = sprkStep_SprkStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, - method_mem->b1, method_mem->a1, ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - *nflagPtr = 0; - *dsmPtr = 0; +// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, +// method_mem->b1, method_mem->a1, ark_mem->ycur); +// if (retval != ARK_SUCCESS) return(retval); - return ARK_SUCCESS; -} +// *nflagPtr = 0; +// *dsmPtr = 0; -TakeStep TakeStepLoadDefaultSPRK(int order) -{ - TakeStep take_step; - take_step = (TakeStep) malloc(sizeof(struct TakeStepFunctor)); - take_step->num_vecs = 1; - - switch(order) - { - case 1: - take_step->content = (void*) &SymplecticEuler; - take_step->q = 1; - take_step->p = 0; - take_step->call = sprkStep_TakeStep_SymplecticEuler; - break; - case 2: - take_step->content = (void*) &PseudoLeapfrog; - take_step->q = 2; - take_step->p = 0; - take_step->call = sprkStep_TakeStep_PseudoLeapfrog; - break; - case 3: - take_step->content = (void*) &Ruth3; - take_step->q = 3; - take_step->p = 0; - take_step->call = sprkStep_TakeStep_Ruth3; - break; - case 4: - take_step->content = (void*) &McLauchlan4; - take_step->q = 4; - take_step->p = 0; - take_step->call = sprkStep_TakeStep_McLauchlan4; - break; - default: - free(take_step); - return NULL; - } +// return ARK_SUCCESS; +// } - return take_step; -} diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index fd973f57a2..fbadd3febd 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -18,26 +18,15 @@ #ifndef _ARKODE_SPRKSTEP_IMPL_H #define _ARKODE_SPRKSTEP_IMPL_H +#include +#include #include #include "arkode_impl.h" -/* access to MRIStepInnerStepper_Create */ -#include "arkode/arkode_mristep.h" -#include "sundials/sundials_types.h" - #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif -struct TakeStepFunctor { - int (*call)(TakeStep self, void* arkode_mem, sunrealtype *dsmPtr, int *nflagPtr); - int q; - int p; - int stages; - int num_vecs; - void* content; -}; - /*=============================================================== SPRK time step module constants ===============================================================*/ @@ -55,26 +44,19 @@ struct TakeStepFunctor { perform an symplectic-partitioned Runge-Kutta time step. ---------------------------------------------------------------*/ typedef struct ARKodeSPRKStepMemRec { - TakeStep take_step; - int q; /* method order */ - int p; /* embedding order */ - int stages; /* number of stages */ - N_Vector* scratch; /* vectors that may be used */ + /* SPRK method and storage */ + ARKodeSPRKMem method; + int q; /* method order */ + N_Vector f1vec; + N_Vector f2vec; /* SPRK problem specification */ - ARKRhsFn *fk; /* array of RHS functions */ - int num_rhs; /* number of RHS functions */ + ARKRhsFn f1; /* p' = f1(t,q) = - dV(t,q)/dq */ + ARKRhsFn f2; /* q' = f2(p) = dT(p)/dp */ /* Counters */ - long int* nfk; /* number of calls to fk */ - - // /* Data for using SPRKStep with external polynomial forcing */ - // booleantype expforcing; /* add forcing to explicit RHS */ - // booleantype impforcing; /* add forcing to implicit RHS */ - // realtype tshift; /* time normalization shift */ - // realtype tscale; /* time normalization scaling */ - // N_Vector* forcing; /* array of forcing vectors */ - // int nforcing; /* number of forcing vectors */ + long int nf1; /* number of calls to f1 */ + long int nf2; /* number of calls to f2 */ } *ARKodeSPRKStepMem; @@ -86,15 +68,17 @@ typedef struct ARKodeSPRKStepMemRec { int sprkStep_Init(void* arkode_mem, int init_type); int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode); -int sprkStep_TakeStep_Sprk(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); -int sprkStep_TakeStep_SprkInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); - -int sprkStep_Fk(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector Fk, int k, void* user_data); +int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int sprkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); /* Internal utility routines */ int sprkStep_AccessStepMem(void* arkode_mem, const char *fname, ARKodeMem *ark_mem, ARKodeSPRKStepMem *step_mem); booleantype sprkStep_CheckNVector(N_Vector tmpl); +int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f1, void* user_data); +int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f2, void* user_data); +int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector prev_stage, + sunrealtype bi, sunrealtype Bi, N_Vector stage_result); // /* private functions for interfacing with MRIStep */ // int sprkStep_SetInnerForcing(void* arkode_mem, realtype tshift, realtype tscale, diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 054422edbf..c0550b3705 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -220,11 +220,9 @@ int SPRKStepSetDefaults(void* arkode_mem) return(retval); } - /* Set default values for integrator optional inputs */ - step_mem->q = Q_DEFAULT; /* method order */ - step_mem->p = 0; /* embedding order */ - step_mem->stages = 0; /* no stages */ - step_mem->istage = 0; /* current stage */ + /* set using default method order */ + SPRKStepSetOrder(arkode_mem, 0); + return(ARK_SUCCESS); } @@ -253,16 +251,16 @@ int SPRKStepSetOrder(void *arkode_mem, int ord) /* set user-provided value, or default, depending on argument */ if (ord <= 0) { - step_mem->q = Q_DEFAULT; + step_mem->q = 4; } else { step_mem->q = ord; } - /* clear method specification, since user is requesting a change in method - or a reset to defaults. Spec will be set in ARKInitialSetup. */ - step_mem->stages = 0; - step_mem->istage = 0; - step_mem->p = 0; + // /* clear method specification, since user is requesting a change in method + // or a reset to defaults. Spec will be set in ARKInitialSetup. */ + // step_mem->stages = 0; + // step_mem->istage = 0; + // step_mem->p = 0; return(ARK_SUCCESS); } @@ -288,9 +286,9 @@ int SPRKStepGetNumRhsEvals(void *arkode_mem, long int** fk_evals) &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - /* get values from step_mem */ - for (rhs_k = 0; rhs_k < step_mem->num_rhs; ++rhs_k) - *fk_evals[rhs_k] = step_mem->nfk[rhs_k]; + // /* get values from step_mem */ + // for (rhs_k = 0; rhs_k < step_mem->num_rhs; ++rhs_k) + // *fk_evals[rhs_k] = step_mem->nfk[rhs_k]; return(ARK_SUCCESS); } @@ -415,7 +413,7 @@ int SPRKStepWriteParameters(void *arkode_mem, FILE *fp) /* print integrator parameters to file */ fprintf(fp, "SPRKStep time step module parameters:\n"); - fprintf(fp, " Method order %i\n", step_mem->q); + fprintf(fp, " Method order %i\n", step_mem->method->q); fprintf(fp, "\n"); return(ARK_SUCCESS); From f3a013ba3b5ce1905b1f571294dd4c5738acadf8 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 15 Mar 2023 17:08:40 -0700 Subject: [PATCH 023/177] revert changes that were in arkstep --- src/arkode/arkode_arkstep.c | 315 +++++++------------------------ src/arkode/arkode_arkstep_impl.h | 4 - src/arkode/arkode_arkstep_io.c | 15 -- 3 files changed, 70 insertions(+), 264 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index f0e3375175..8b5bde3a1b 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -22,8 +22,6 @@ #include "arkode_impl.h" #include "arkode_arkstep_impl.h" #include "arkode_interp_impl.h" -#include "sundials/sundials_nvector.h" -#include "sundials/sundials_types.h" #include #include @@ -227,7 +225,6 @@ int ARKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - // TODO(CJB): I think this is redundant (arkResize does it) /* Determing change in vector sizes */ lrw1 = liw1 = 0; if (y0->ops->nvspace != NULL) @@ -1136,11 +1133,11 @@ int arkStep_Init(void* arkode_mem, int init_type) } /* Ensure that if adaptivity is enabled, then method includes embedding coefficients */ - // if (!ark_mem->fixedstep && (step_mem->p == 0)) { - // arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ARKStep", "arkStep_Init", - // "Adaptive timestepping cannot be performed without embedding coefficients"); - // return(ARK_ILL_INPUT); - // } + if (!ark_mem->fixedstep && (step_mem->p == 0)) { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ARKStep", "arkStep_Init", + "Adaptive timestepping cannot be performed without embedding coefficients"); + return(ARK_ILL_INPUT); + } /* Allocate ARK RHS vector memory, update storage requirements */ /* Allocate Fe[0] ... Fe[stages-1] if needed */ @@ -1215,6 +1212,8 @@ int arkStep_Init(void* arkode_mem, int init_type) if (step_mem->predictor == 4) ark_mem->call_fullrhs = SUNTRUE; } + /* set appropriate TakeStep routine based on problem configuration */ + /* (only one choice for now) */ ark_mem->step = arkStep_TakeStep_Z; /* Check for consistency between mass system and system linear system modules @@ -1264,7 +1263,7 @@ int arkStep_Init(void* arkode_mem, int init_type) } /* Initialize the nonlinear solver object (if it exists) */ - if (step_mem->NLS && !step_mem->separable_rhs) { + if (step_mem->NLS) { retval = arkStep_NlsInit(ark_mem); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_NLS_INIT_FAIL, "ARKODE::ARKStep", "arkStep_Init", @@ -1276,21 +1275,6 @@ int arkStep_Init(void* arkode_mem, int init_type) return(ARK_SUCCESS); } -/* Utility to call fi and increment the counter */ -int arkStep_Fi(ARKodeARKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector Fi, void* user_data) -{ - int retval = step_mem->fi(tcur, ycur, Fi, user_data); - step_mem->nfi++; - return retval; -} - -/* Utility to call fe and increment the counter */ -int arkStep_Fe(ARKodeARKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector Fe, void* user_data) -{ - int retval = step_mem->fe(tcur, ycur, Fe, user_data); - step_mem->nfe++; - return retval; -} /*--------------------------------------------------------------- arkStep_FullRHS: @@ -1357,7 +1341,8 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fe if the problem has an explicit component */ if (step_mem->explicit) { - retval = arkStep_Fe(step_mem, t, y, step_mem->Fe[0], ark_mem->user_data); + retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); + step_mem->nfe++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1375,7 +1360,8 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fi if the problem has an implicit component */ if (step_mem->implicit) { - retval = arkStep_Fi(step_mem, t, y, step_mem->Fi[0], ark_mem->user_data); + retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); + step_mem->nfi++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1421,7 +1407,8 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fe if the problem has an explicit component */ if (step_mem->explicit) { - retval = arkStep_Fe(step_mem, t, y, step_mem->Fe[0], ark_mem->user_data); + retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); + step_mem->nfe++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1439,7 +1426,8 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fi if the problem has an implicit component */ if (step_mem->implicit) { - retval = arkStep_Fi(step_mem, t, y, step_mem->Fi[0], ark_mem->user_data); + retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); + step_mem->nfi++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1479,7 +1467,8 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fe if the problem has an explicit component (store in ark_tempv2) */ if (step_mem->explicit) { - retval = arkStep_Fe(step_mem, t, y, ark_mem->tempv2, ark_mem->user_data); + retval = step_mem->fe(t, y, ark_mem->tempv2, ark_mem->user_data); + step_mem->nfe++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1497,7 +1486,8 @@ int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call fi if the problem has an implicit component (store in sdata) */ if (step_mem->implicit) { - retval = arkStep_Fi(step_mem, t, y, step_mem->sdata, ark_mem->user_data); + retval = step_mem->fi(t, y, step_mem->sdata, ark_mem->user_data); + step_mem->nfi++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ARKStep", "arkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); @@ -1593,11 +1583,11 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) Xvecs = step_mem->Xvecs; /* if problem will involve no algebraic solvers, initialize nflagPtr to success */ - if ((!step_mem->implicit || step_mem->separable_rhs) && (step_mem->mass_type == MASS_IDENTITY)) + if ((!step_mem->implicit) && (step_mem->mass_type == MASS_IDENTITY)) *nflagPtr = ARK_SUCCESS; /* call nonlinear solver setup if it exists */ - if (step_mem->NLS) { + if (step_mem->NLS) if ((step_mem->NLS)->ops->setup) { zcor0 = ark_mem->tempv3; N_VConst(ZERO, zcor0); /* set guess to all 0 (since using predictor-corrector form) */ @@ -1605,7 +1595,6 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) if (retval < 0) return(ARK_NLS_SETUP_FAIL); if (retval > 0) return(ARK_NLS_SETUP_RECVR); } - } /* loop over internal stages to the step */ for (is=0; isstages; is++) { @@ -1645,19 +1634,21 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* if implicit, call built-in and user-supplied predictors (results placed in zpred) */ - if (implicit_stage && !step_mem->separable_rhs) { + if (implicit_stage) { + retval = arkStep_Predict(ark_mem, is, step_mem->zpred); if (retval != ARK_SUCCESS) return (retval); /* if a user-supplied predictor routine is provided, call that here. - Note that arkStep_Predict is *still* called, so this user-supplied - routine can just 'clean up' the built-in prediction, if desired. */ + Note that arkStep_Predict is *still* called, so this user-supplied + routine can just 'clean up' the built-in prediction, if desired. */ if (step_mem->stage_predict) { retval = step_mem->stage_predict(ark_mem->tcur, step_mem->zpred, ark_mem->user_data); if (retval < 0) return(ARK_USER_PREDICT_FAIL); if (retval > 0) return(TRY_AGAIN); } + } #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG @@ -1684,7 +1675,7 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) ark_mem->nst, ark_mem->h, is, ark_mem->tcur); /* perform implicit solve if required */ - if (implicit_stage && !step_mem->separable_rhs) { + if (implicit_stage) { /* implicit solve result is stored in ark_mem->ycur; return with positive value on anything but success */ @@ -1699,31 +1690,6 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) #endif /* otherwise no implicit solve is needed */ - } else if(step_mem->separable_rhs) { - /* we explicitly compute the 'implicit' part since - the right hand side is separable and only - depends on the previous stage value of the explicit part */ - - retval = arkStep_Fi(step_mem, ark_mem->tcur, step_mem->sdata, - step_mem->Fi[is], ark_mem->user_data); - if (retval < 0) return(ARK_RHSFUNC_FAIL); - if (retval > 0) return(ARK_UNREC_RHSFUNC_ERR); - - cvals[0] = ONE; - Xvecs[0] = ark_mem->yn; - nvec = 1; - for (int js=0; jsstages; js++) { - cvals[nvec] = ark_mem->h * step_mem->Bi->A[is][js]; - Xvecs[nvec] = step_mem->Fi[js]; - nvec += 1; - } - retval = N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->ycur); - if (retval != 0) return(ARK_VECTOROP_ERR); - -#ifdef SUNDIALS_DEBUG_PRINTVEC - printf(" ARKStep implicit stage %i solution:\n",is); - N_VPrint(ark_mem->ycur); -#endif } else { /* if M is fixed, solve with it to compute update (place back in sdata) */ @@ -1762,11 +1728,10 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* store implicit RHS (value in Fi[is] is from preceding nonlinear iteration) */ if (step_mem->implicit) { - if (step_mem->separable_rhs) { - /* do nothing */ - } else if (!deduce_stage) { - retval = arkStep_Fi(step_mem, ark_mem->tcur, ark_mem->ycur, - step_mem->Fi[is], ark_mem->user_data); + if (!deduce_stage) { + retval = step_mem->fi(ark_mem->tcur, ark_mem->ycur, + step_mem->Fi[is], ark_mem->user_data); + step_mem->nfi++; } else if (step_mem->mass_type == MASS_FIXED) { retval = step_mem->mmult((void *) ark_mem, step_mem->zcor, ark_mem->tempv1); if (retval != ARK_SUCCESS) return (ARK_MASSMULT_FAIL); @@ -1798,8 +1763,9 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* store explicit RHS */ if (step_mem->explicit) { - retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, - ark_mem->ycur, step_mem->Fe[is], ark_mem->user_data); + retval = step_mem->fe(ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, + ark_mem->ycur, step_mem->Fe[is], ark_mem->user_data); + step_mem->nfe++; #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, @@ -1872,147 +1838,6 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return(ARK_SUCCESS); } -int arkStep_TakeStep_SPRK(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -{ - ARKodeMem ark_mem; - ARKodeARKStepMem step_mem; - int retval, is; - N_Vector Yi; - - /* access ARKodeARKStepMem structure */ - retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_SPRK", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); - - // if (!ark_mem->fixedstep) { - // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", - // "arkStep_TakeStep_SPRK", "!!!! This TakeStep only works with fixed steps !!!!"); - // return(ARK_UNRECOGNIZED_ERROR); - // } - - /* loop over internal stages to the step */ - for (is=0; isstages; is++) { - /* store current stage index */ - step_mem->istage = is; - - /* set current stage time(s) */ - if (step_mem->implicit) - ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; - else - ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; - - /* shortcut to previous stage vector */ - Yi = is == 0 ? ark_mem->yn : ark_mem->ycur; - - /* evaluate Fi at the previous stage value */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = arkStep_Fi(step_mem, ark_mem->tcur, Yi, - step_mem->sdata, ark_mem->user_data); - if (retval != 0) return(ARK_RHSFUNC_FAIL); - - /* update ycur with the implicit stage */ - N_VLinearSum(ONE, Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->sdata, ark_mem->ycur); - - /* evaluate Fe with the current stage value */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, - ark_mem->ycur, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return(ARK_RHSFUNC_FAIL); - - /* update ycur with the explicit stage */ - N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, ark_mem->ycur); - } - - *nflagPtr = 0; - *dsmPtr = 0; - - return 0; -} - -/* Increment SPRK algorithm with compensated summation */ -int arkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -{ - ARKodeMem ark_mem; - ARKodeARKStepMem step_mem; - int retval, is; - N_Vector delta_Yi, yn_plus_delta_Yi; - - /* access ARKodeARKStepMem structure */ - retval = arkStep_AccessStepMem(arkode_mem, "arkStep_TakeStep_SPRK", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); - - // if (!ark_mem->fixedstep) { - // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::ARKStep", - // "arkStep_TakeStep_SPRK", "!!!! This TakeStep only works with fixed steps !!!!"); - // return(ARK_UNRECOGNIZED_ERROR); - // } - - /* other shortcuts */ - delta_Yi = ark_mem->tempv1; - yn_plus_delta_Yi = ark_mem->tempv2; - - /* [ \Delta Q_0 ] = [ 0 ] - [ \Delta P_0 ] = [ 0 ] */ - N_VConst(ZERO, delta_Yi); - - /* loop over internal stages to the step */ - for (is=0; isstages; is++) { - /* store current stage index */ - step_mem->istage = is; - - /* set current stage time(s) */ - if (step_mem->implicit) - ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; - else - ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; - - /* [ q_n ] + [ \Delta Q_i ] - [ ] + [ ] */ - N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); - - /* evaluate Fi with previous stage increment */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = arkStep_Fi(step_mem, ark_mem->tcur, yn_plus_delta_Yi, - step_mem->sdata, ark_mem->user_data); - if (retval != 0) return(ARK_RHSFUNC_FAIL); - - /* update the implicit stage - [ ] = [ ] + [ ] - [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ - N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->sdata, delta_Yi); - - /* [ ] + [ ] - [ p_n ] + [ \Delta P_i ] */ - N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); - - /* evaluate Fe with the current p_n + \Delta P_i */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = arkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, - yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return(ARK_RHSFUNC_FAIL); - - /* update the explicit stage - [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] - [ ] = [ ] + [ ] */ - N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, delta_Yi); - } - - /* - Now we compute the step solution via compensated summation. - [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] - [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ - N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); - N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); - N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); - N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); - - *nflagPtr = 0; - *dsmPtr = 0; - - return 0; -} - /*--------------------------------------------------------------- Internal utility routines @@ -2270,33 +2095,33 @@ int arkStep_CheckButcherTables(ARKodeMem ark_mem) return(ARK_INVALID_TABLE); } - // /* check that embedding order p > 0 */ - // if ((step_mem->p < 1) && (!ark_mem->fixedstep)) { - // arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", - // "arkStep_CheckButcherTables", - // "embedding order < 1!"); - // return(ARK_INVALID_TABLE); - // } - - // /* check that embedding exists */ - // if ((step_mem->p > 0) && (!ark_mem->fixedstep)) { - // if (step_mem->implicit) { - // if (step_mem->Bi->d == NULL) { - // arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", - // "arkStep_CheckButcherTables", - // "no implicit embedding!"); - // return(ARK_INVALID_TABLE); - // } - // } - // if (step_mem->explicit) { - // if (step_mem->Be->d == NULL) { - // arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", - // "arkStep_CheckButcherTables", - // "no explicit embedding!"); - // return(ARK_INVALID_TABLE); - // } - // } - // } + /* check that embedding order p > 0 */ + if ((step_mem->p < 1) && (!ark_mem->fixedstep)) { + arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", + "arkStep_CheckButcherTables", + "embedding order < 1!"); + return(ARK_INVALID_TABLE); + } + + /* check that embedding exists */ + if ((step_mem->p > 0) && (!ark_mem->fixedstep)) { + if (step_mem->implicit) { + if (step_mem->Bi->d == NULL) { + arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", + "arkStep_CheckButcherTables", + "no implicit embedding!"); + return(ARK_INVALID_TABLE); + } + } + if (step_mem->explicit) { + if (step_mem->Be->d == NULL) { + arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ARKStep", + "arkStep_CheckButcherTables", + "no explicit embedding!"); + return(ARK_INVALID_TABLE); + } + } + } /* check that ERK table is strictly lower triangular */ if (step_mem->explicit) { @@ -2571,7 +2396,7 @@ int arkStep_Predict(ARKodeMem ark_mem, int istage, N_Vector yguess) sdata = yn - zp + h*sum_{j=0}^{i-1} (Ae(i,j)*Fe(j) + Ai(i,j)*Fi(j)) ---------------------------------------------------------------*/ -int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) +int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit) { /* local data */ ARKodeARKStepMem step_mem; @@ -2591,7 +2416,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) i = step_mem->istage; /* If this is the first stage, and explicit, just set sdata=0 and return */ - if (!implicit_stage && (i==0)) { + if (!implicit && (i==0)) { N_VConst(ZERO, step_mem->sdata); return (ARK_SUCCESS); } @@ -2601,7 +2426,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) Xvecs = step_mem->Xvecs; /* Update gamma if stage is implicit */ - if (implicit_stage) { + if (implicit) { step_mem->gamma = ark_mem->h * step_mem->Bi->A[i][i]; if (ark_mem->firststage) step_mem->gammap = step_mem->gamma; @@ -2611,7 +2436,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) /* If predictor==5, then sdata=0 (plus any implicit forcing). Set sdata appropriately and return */ - if (implicit_stage && (step_mem->predictor == 5)) { + if (implicit && (step_mem->predictor == 5)) { /* apply external polynomial forcing (updates nvec, cvals, Xvecs) */ if (step_mem->impforcing) { @@ -2629,7 +2454,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) /* If implicit, initialize sdata to yn - zpred (here: zpred = zp), and set first entries for eventual N_VLinearCombination call */ nvec = 0; - if (implicit_stage) { + if (implicit) { N_VLinearSum(ONE, ark_mem->yn, -ONE, step_mem->zpred, step_mem->sdata); cvals[0] = ONE; Xvecs[0] = step_mem->sdata; @@ -2637,7 +2462,7 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) } /* If implicit with fixed M!=I, update sdata with M*sdata */ - if (implicit_stage && (step_mem->mass_type == MASS_FIXED)) { + if (implicit && (step_mem->mass_type == MASS_FIXED)) { N_VScale(ONE, step_mem->sdata, ark_mem->tempv1); retval = step_mem->mmult((void *) ark_mem, ark_mem->tempv1, step_mem->sdata); if (retval != ARK_SUCCESS) return (ARK_MASSMULT_FAIL); @@ -2645,13 +2470,13 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit_stage) /* Update sdata with prior stage information */ if (step_mem->explicit) { /* Explicit pieces */ - for (j=0; jstages; j++) { + for (j=0; jh * step_mem->Be->A[i][j]; Xvecs[nvec] = step_mem->Fe[j]; nvec += 1; } } - if (step_mem->implicit && !step_mem->separable_rhs) { /* Implicit pieces */ + if (step_mem->implicit) { /* Implicit pieces */ for (j=0; jh * step_mem->Bi->A[i][j]; Xvecs[nvec] = step_mem->Fi[j]; diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index 1a4b8dcef9..307f0f8555 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -73,8 +73,6 @@ typedef struct ARKodeARKStepMemRec { booleantype implicit; /* SUNTRUE if fi is enabled */ booleantype deduce_rhs; /* SUNTRUE if fi is deduced after a nonlinear solve */ - booleantype separable_rhs; /* SUNTRUE if fe and fi are separable - so no nonlinear solve is needed */ /* ARK method storage and parameters */ N_Vector *Fe; /* explicit RHS at each stage */ @@ -193,8 +191,6 @@ int arkStep_GetGammas(void* arkode_mem, realtype *gamma, int arkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode); int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); -int arkStep_TakeStep_SPRK(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); -int arkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); /* Internal utility routines */ int arkStep_AccessStepMem(void* arkode_mem, const char *fname, diff --git a/src/arkode/arkode_arkstep_io.c b/src/arkode/arkode_arkstep_io.c index f3ded91c61..bfa713fda9 100644 --- a/src/arkode/arkode_arkstep_io.c +++ b/src/arkode/arkode_arkstep_io.c @@ -341,7 +341,6 @@ int ARKStepSetDefaults(void* arkode_mem) step_mem->explicit = SUNTRUE; /* fe(t,y) will be used */ step_mem->implicit = SUNTRUE; /* fi(t,y) will be used */ step_mem->deduce_rhs = SUNFALSE; /* deduce fi on result of NLS */ - step_mem->separable_rhs = SUNFALSE; /* fe and fi are separable */ step_mem->maxcor = MAXCOR; /* max nonlinear iters/stage */ step_mem->nlscoef = NLSCOEF; /* nonlinear tolerance coefficient */ step_mem->crdown = CRDOWN; /* nonlinear convergence estimate coeff. */ @@ -1400,20 +1399,6 @@ int ARKStepSetDeduceImplicitRhs(void *arkode_mem, sunbooleantype deduce) return(ARK_SUCCESS); } -int ARKStepSetSeparableRhs(void *arkode_mem, sunbooleantype isseparable) -{ - ARKodeMem ark_mem; - ARKodeARKStepMem step_mem; - int retval; - - /* access ARKodeARKStepMem structure and set function pointer */ - retval = arkStep_AccessStepMem(arkode_mem, "ARKStepSetSeparableRhs", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); - step_mem->separable_rhs = isseparable; - return(ARK_SUCCESS); -} - /*=============================================================== ARKStep optional output functions -- stepper-specific From 67f4d7600afd1182123b84ee483a0edae3d9faa8 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 15 Mar 2023 17:12:17 -0700 Subject: [PATCH 024/177] some minor fixes, still looking for segfault issue --- examples/arkode/C_serial/CMakeLists.txt | 2 + examples/arkode/C_serial/ark_kepler.c | 242 ++++++++++-------- examples/arkode/C_serial/ark_kepler_plot.py | 41 ++- .../arkode/C_serial/ark_kepler_plot_all.py | 110 ++++++-- src/arkode/arkode_sprkstep.c | 19 +- src/arkode/arkode_timestepper_impl.h | 13 - 6 files changed, 266 insertions(+), 161 deletions(-) mode change 100644 => 100755 examples/arkode/C_serial/ark_kepler_plot.py mode change 100644 => 100755 examples/arkode/C_serial/ark_kepler_plot_all.py delete mode 100644 src/arkode/arkode_timestepper_impl.h diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 39c61e034c..e47d3a3ae5 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -79,6 +79,8 @@ set(ARKODE_examples_SUPERLUMT # Auxiliary files to install set(ARKODE_extras + ark_kepler_plot.py + ark_kepler_order.py plot_brusselator1D.py plot_brusselator1D_FEM.py plot_heat1D.py diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 6615c26951..f8ceb95bed 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -90,12 +90,10 @@ int main(int argc, char* argv[]) UserData udata; sunrealtype tout, tret; sunrealtype H0, L0; - ARKodeButcherTable Mp, Mq; void* arkode_mem; FILE *conserved_fp, *solution_fp, *times_fp; int argi, iout, retval; - Mp = Mq = NULL; NLS = NULL; y = NULL; @@ -150,8 +148,8 @@ int main(int argc, char* argv[]) if (method == 0) { arkode_mem = SPRKStepCreate(dqdt, dpdt, T0, y, sunctx); - retval = SPRKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; + // retval = SPRKStepSetOrder(arkode_mem, order); + // if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; // if (step_mode == 1) { // retval = SPRKStepSetFixedStep(arkode_mem, dt); @@ -159,7 +157,7 @@ int main(int argc, char* argv[]) // retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); // if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; - // } else if (step_mode == 2 || step_mode == 3) { + // } else { // /* Adaptivity based on [Hairer and Soderlind, 2005] */ // retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); // if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; @@ -173,122 +171,158 @@ int main(int argc, char* argv[]) // if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; // } - retval = SPRKStepSetUserData(arkode_mem, (void *) udata); - if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; + // retval = SPRKStepSetUserData(arkode_mem, (void *) udata); + // if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; } else if (method >= 1) { + fprintf(stderr, ">>>>> ARKStepCreate\n"); if (method == 1) { arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); - retval = ARKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + // retval = ARKStepSetOrder(arkode_mem, order); + // if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; } else { arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); - retval = ARKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + // retval = ARKStepSetOrder(arkode_mem, order); + // if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); - ARKStepSetNonlinearSolver(arkode_mem, NLS); + // NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); + // ARKStepSetNonlinearSolver(arkode_mem, NLS); } - retval = ARKStepSetUserData(arkode_mem, (void *) udata); - if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; + // retval = ARKStepSetUserData(arkode_mem, (void *) udata); + // if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-8), SUN_RCONST(10e-12)); - if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; - } + // retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); + // if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - /* Open output files */ - if (method == 0) { - const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; - const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; - const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; - const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; - // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; - // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; - // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; - char fname[64]; - sprintf(fname, fmt1, order); - conserved_fp = fopen(fname, "w+"); - sprintf(fname, fmt2, order); - solution_fp = fopen(fname, "w+"); - sprintf(fname, fmt3, order); - times_fp = fopen(fname, "w+"); - sprintf(fname, fmt4, order); - udata->hhist_fp = fopen(fname, "w+"); - } else { - const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; - const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; - const char* fmt3 = "ark_kepler_times_erk-%d.txt"; - const char* fmt4 = "ark_kepler_hhist_erk-%d.txt"; - char fname[64]; - sprintf(fname, fmt1, order); - conserved_fp = fopen(fname, "w+"); - sprintf(fname, fmt2, order); - solution_fp = fopen(fname, "w+"); - sprintf(fname, fmt3, order); - times_fp = fopen(fname, "w+"); - sprintf(fname, fmt4, order); - udata->hhist_fp = fopen(fname, "w+"); + // if (step_mode == 1) { + // retval = ARKStepSetFixedStep(arkode_mem, dt); + // } else { + // retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-8), SUN_RCONST(10e-12)); + // if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; + // } } - printf("\n Begin Kepler Problem\n\n"); + // /* Open output files */ + // if (method == 0) { + // const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; + // const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; + // const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; + // const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; + // // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; + // // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; + // // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; + // char fname[64]; + // sprintf(fname, fmt1, order); + // conserved_fp = fopen(fname, "w+"); + // sprintf(fname, fmt2, order); + // solution_fp = fopen(fname, "w+"); + // sprintf(fname, fmt3, order); + // times_fp = fopen(fname, "w+"); + // sprintf(fname, fmt4, order); + // udata->hhist_fp = fopen(fname, "w+"); + // } else { + // const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; + // const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; + // const char* fmt3 = "ark_kepler_times_erk-%d.txt"; + // const char* fmt4 = "ark_kepler_hhist_erk-%d.txt"; + // char fname[64]; + // sprintf(fname, fmt1, order); + // conserved_fp = fopen(fname, "w+"); + // sprintf(fname, fmt2, order); + // solution_fp = fopen(fname, "w+"); + // sprintf(fname, fmt3, order); + // times_fp = fopen(fname, "w+"); + // sprintf(fname, fmt4, order); + // udata->hhist_fp = fopen(fname, "w+"); + // } - /* Do integration */ - tret = T0; - tout = T0+dTout; - H0 = Hamiltonian(y); - L0 = AngularMomentum(y); - sunrealtype Q0 = Q(y, udata->alpha)/udata->rho_n; - fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f, Q(p,q) = %.16f\n", - tret, H0, L0, Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); - N_VPrintFile(y, solution_fp); - for (iout = 0; iout < num_output_times; iout++) { - ARKStepSetStopTime(arkode_mem, tout); - if (step_mode == 3) { - while(tret < tout) { - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - if (retval < 0) break; - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", - tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); - N_VPrintFile(y, solution_fp); - } - } else { - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", - tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); - N_VPrintFile(y, solution_fp); - } + printf("\n Begin Kepler Problem\n\n"); - if (retval >= 0) { /* successful solve: update time */ - tout += dTout; - tout = (tout > Tf) ? Tf : tout; - } else { /* unsuccessful solve: break */ - fprintf(stderr, "Solver failure, stopping integration\n"); - break; - } + // /* Print out starting energy, momentum before integrating */ + // tret = T0; + // tout = T0+dTout; + // H0 = Hamiltonian(y); + // L0 = AngularMomentum(y); + // sunrealtype Q0 = Q(y, udata->alpha)/udata->rho_n; + // fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f, Q(p,q) = %.16f\n", + // tret, H0, L0, Q0); + // fprintf(times_fp, "%.16f\n", tret); + // fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); + // N_VPrintFile(y, solution_fp); + + // /* Do integration */ + // if (method == 0) { + // for (iout = 0; iout < num_output_times; iout++) { + // // SPRKStepSetStopTime(arkode_mem, tout); + // retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + // Q(y, udata->alpha)/udata->rho_np1-Q0); + // fprintf(times_fp, "%.16f\n", tret); + // fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + // N_VPrintFile(y, solution_fp); + + // if (retval >= 0) { /* successful solve: update time */ + // tout += dTout; + // tout = (tout > Tf) ? Tf : tout; + // } else { /* unsuccessful solve: break */ + // fprintf(stderr, "Solver failure, stopping integration\n"); + // break; + // } + // } + // } else { + // for (iout = 0; iout < num_output_times; iout++) { + // ARKStepSetStopTime(arkode_mem, tout); + // if (step_mode == 3) { + // while(tret < tout) { + // retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + // if (retval < 0) break; + // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + // Q(y, udata->alpha)/udata->rho_np1-Q0); + // fprintf(times_fp, "%.16f\n", tret); + // fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + // N_VPrintFile(y, solution_fp); + // } + // } else { + // retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + // Q(y, udata->alpha)/udata->rho_np1-Q0); + // fprintf(times_fp, "%.16f\n", tret); + // fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + // N_VPrintFile(y, solution_fp); + // } + + // if (retval >= 0) { /* successful solve: update time */ + // tout += dTout; + // tout = (tout > Tf) ? Tf : tout; + // } else { /* unsuccessful solve: break */ + // fprintf(stderr, "Solver failure, stopping integration\n"); + // break; + // } + // } + // } + + // fclose(udata->hhist_fp); + // free(udata); + // fclose(times_fp); + // fclose(conserved_fp); + // fclose(solution_fp); + // if (NLS) { + // SUNNonlinSolFree(NLS); + // } + // N_VDestroy(y); + if (method == 0) { + // SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + SPRKStepFree(arkode_mem); // TODO: figure out why this is segfaulting! + } else { + fprintf(stderr, ">>>>> ARKStepFree\n"); + // ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + ARKStepFree(arkode_mem); // TODO: figure out why this is segfaulting! } - - ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - - // ARKStepFree(arkode_mem); // TODO: figure out why this is segfaulting! - if (Mq) ARKodeButcherTable_Free(Mq); - if (Mp) ARKodeButcherTable_Free(Mp); - if (NLS) SUNNonlinSolFree(NLS); - N_VDestroy(y); - fclose(udata->hhist_fp); - free(udata); - fclose(times_fp); - fclose(conserved_fp); - fclose(solution_fp); SUNContext_Free(&sunctx); return 0; diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py old mode 100644 new mode 100755 index 2dca54f3a6..e6cc1c4c28 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -1,10 +1,25 @@ #!/usr/bin/env python +# ---------------------------------------------------------------- +# Programmer(s): Cody J. Balos @ LLNL +# ---------------------------------------------------------------- +# SUNDIALS Copyright Start +# Copyright (c) 2002-2022, Lawrence Livermore National Security +# and Southern Methodist University. +# All rights reserved. +# +# See the top-level LICENSE and NOTICE files for details. +# +# SPDX-License-Identifier: BSD-3-Clause +# SUNDIALS Copyright End +# ---------------------------------------------------------------- +# matplotlib-based plotting script for ark_kepler.c +# ---------------------------------------------------------------- import numpy as np import matplotlib.pyplot as plt -t = np.loadtxt('ark_kepler_times_sprk-3.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_sprk-3.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_sprk-1.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_sprk-1.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) @@ -12,7 +27,7 @@ plt.savefig('ark_kepler_phase.png') plt.close() -conserved = np.loadtxt('ark_kepler_conserved_sprk-3.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_sprk-1.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] @@ -38,15 +53,15 @@ plt.savefig('ark_kepler_momentum.png') plt.close() -# Step history -hhist = np.loadtxt('ark_kepler_hhist_sprk-3.txt', dtype=np.float64) -plt.figure(dpi=200) -plt.title('Step Size History') -plt.plot(t[:-1], hhist) -plt.xlabel('<--- t --->') -plt.yscale('log') -plt.savefig('ark_kepler_hhist.png') -plt.close() +# # Step history +# hhist = np.loadtxt('ark_kepler_hhist_sprk-1.txt', dtype=np.float64) +# plt.figure(dpi=200) +# plt.title('Step Size History') +# plt.plot(t[:-1], hhist) +# plt.xlabel('<--- t --->') +# plt.yscale('log') +# plt.savefig('ark_kepler_hhist.png') +# plt.close() # # Time plot. @@ -73,4 +88,4 @@ plt.ylabel('<--- y2 --->') plt.title('ark_kepler: Phase Plot') plt.savefig('ark_kepler_phase.png') -plt.close() \ No newline at end of file +plt.close() diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_all.py old mode 100644 new mode 100755 index 862a2632f9..ca9fc50282 --- a/examples/arkode/C_serial/ark_kepler_plot_all.py +++ b/examples/arkode/C_serial/ark_kepler_plot_all.py @@ -10,30 +10,33 @@ def load_results(case): conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) return t, y, conserved - -sprk1 = load_results('_sprk-1') -sprk2 = load_results('_sprk-2') -sprk3 = load_results('_sprk-3') -sprk4 = load_results('_sprk-4') +# sprk1 = load_results('_sprk-1') +# sprk2 = load_results('_sprk-2') +# sprk3 = load_results('_sprk-3') +# sprk4 = load_results('_sprk-4') erk2 = load_results('_erk-2') erk3 = load_results('_erk-3') +erk4 = load_results('_erk-4') +erk5 = load_results('_erk-5') # sprkinc1 = load_results('_sprkinc-1') # sprkinc2 = load_results('_sprkinc-2') # sprkinc3 = load_results('_sprkinc-3') all_to_compare = [] -all_to_compare.append(sprk1) -all_to_compare.append(sprk2) -all_to_compare.append(sprk3) -all_to_compare.append(sprk4) +# all_to_compare.append(sprk1) +# all_to_compare.append(sprk2) +# all_to_compare.append(sprk3) +# all_to_compare.append(sprk4) all_to_compare.append(erk2) all_to_compare.append(erk3) +all_to_compare.append(erk4) +all_to_compare.append(erk5) # all_to_compare.append(sprkinc1) # all_to_compare.append(sprkinc2) # all_to_compare.append(sprkinc3) h = 0.01 -t = sprk1[0] +t = erk2[0] trend_line_erk_2 = t*h*h energy = [] @@ -53,21 +56,23 @@ def load_results(case): plt.xscale('log') plt.yscale('log') legend = [] -legend.append(r'$O(h^1)$ SPRK') -legend.append(r'$O(h^2)$ SPRK') -legend.append(r'$O(h^3)$ SPRK') -legend.append(r'$O(h^4)$ SPRK') -legend.append(r'$O(h^2)$ ERK') -legend.append(r'$O(h^3)$ ERK') +# legend.append(r'$O(h^1)$ SPRK') +# legend.append(r'$O(h^2)$ SPRK') +# legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^4)$ SPRK') # legend.append(r'$O(h^1)$ SPRK (inc)') # legend.append(r'$O(h^2)$ SPRK (inc)') # legend.append(r'$O(h^3)$ SPRK (inc)') +legend.append(r'$O(h^2)$ ERK') +legend.append(r'$O(h^3)$ ERK') +legend.append(r'$O(h^4)$ ERK') +legend.append(r'$O(h^5)$ ERK') plt.legend(legend) plt.savefig('ark_kepler_energy_compare.png') momentum = [] momentum_0 = [] -for _, sol, consv in all_to_compare: +for _, _, consv in all_to_compare: momentum.append(consv[:,1]) momentum_0.append(consv[0,1]) momentum = np.array(momentum) @@ -82,15 +87,17 @@ def load_results(case): plt.xscale('log') plt.yscale('log') legend = [] -legend.append(r'$O(h^1)$ SPRK') -legend.append(r'$O(h^2)$ SPRK') -legend.append(r'$O(h^3)$ SPRK') -legend.append(r'$O(h^4)$ SPRK') -legend.append(r'$O(h^2)$ ERK') -legend.append(r'$O(h^3)$ ERK') +# legend.append(r'$O(h^1)$ SPRK') +# legend.append(r'$O(h^2)$ SPRK') +# legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^4)$ SPRK') # legend.append(r'$O(h^1)$ SPRK (inc)') # legend.append(r'$O(h^2)$ SPRK (inc)') # legend.append(r'$O(h^3)$ SPRK (inc)') +legend.append(r'$O(h^2)$ ERK') +legend.append(r'$O(h^3)$ ERK') +legend.append(r'$O(h^4)$ ERK') +legend.append(r'$O(h^5)$ ERK') plt.legend(legend) plt.savefig('ark_kepler_momentum_compare.png') @@ -113,4 +120,59 @@ def load_results(case): # # legend.append(r'$O(h^2)$ SPRK (inc)') # # legend.append(r'$O(h^3)$ SPRK (inc)') # plt.legend(legend) -# plt.savefig('ark_kepler_phase_compare.png') \ No newline at end of file +# plt.savefig('ark_kepler_phase_compare.png') + +# +# Time plot. +# +plt.figure(dpi=200) +for _, y, _ in all_to_compare: + plt.plot(t, y[:,0], linewidth = 2) + plt.plot(t, y[:,1], linewidth = 2) + plt.plot(t, y[:,2], linewidth = 2) + plt.plot(t, y[:,3], linewidth = 2) +legend = [] +# legend.append(r'$O(h^1)$ SPRK') +# legend.append(r'$O(h^2)$ SPRK') +# legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^4)$ SPRK') +# legend.append(r'$O(h^1)$ SPRK (inc)') +# legend.append(r'$O(h^2)$ SPRK (inc)') +# legend.append(r'$O(h^3)$ SPRK (inc)') +legend.append(r'$O(h^2)$ ERK') +legend.append(r'$O(h^3)$ ERK') +legend.append(r'$O(h^4)$ ERK') +legend.append(r'$O(h^5)$ ERK') +plt.legend(legend) +plt.grid(True) +plt.xlabel('<--- t --->') +plt.ylabel('<--- y(1:4) --->') +plt.title('ark_kepler: Solution in Time') +plt.savefig('ark_kepler_solution_compare.png') +plt.close() + +# +# Phase plot. +# +plt.figure(dpi=200) +for _, y, _ in all_to_compare: + plt.plot(y[:,0], y[:,1], linewidth = 2) +legend = [] +# legend.append(r'$O(h^1)$ SPRK') +# legend.append(r'$O(h^2)$ SPRK') +# legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^4)$ SPRK') +# legend.append(r'$O(h^1)$ SPRK (inc)') +# legend.append(r'$O(h^2)$ SPRK (inc)') +# legend.append(r'$O(h^3)$ SPRK (inc)') +legend.append(r'$O(h^2)$ ERK') +legend.append(r'$O(h^3)$ ERK') +legend.append(r'$O(h^4)$ ERK') +legend.append(r'$O(h^5)$ ERK') +plt.legend(legend) +plt.grid(True) +plt.xlabel('<--- y1 --->') +plt.ylabel('<--- y2 --->') +plt.title('ark_kepler: Phase Plot') +plt.savefig('ark_kepler_phase_compare.png') +plt.close() diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index d41c0f3e2f..080de7bc80 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -96,10 +96,14 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont /* Allocate vectors in stepper mem */ if (!arkAllocVec(ark_mem, y0, &(step_mem->f1vec))) { - SPRKStepFree((void**) &ark_mem); return(NULL); } + SPRKStepFree((void**) &ark_mem); + return(NULL); + } if (!arkAllocVec(ark_mem, y0, &(step_mem->f2vec))) { - SPRKStepFree((void**) &ark_mem); return(NULL); } + SPRKStepFree((void**) &ark_mem); + return(NULL); + } /* Attach step_mem structure and function pointers to ark_mem */ ark_mem->step_attachlinsol = NULL; @@ -129,7 +133,7 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont step_mem->f1 = f1; step_mem->f2 = f2; - // /* Update the ARKODE workspace requirements */ + /* Update the ARKODE workspace requirements */ // ark_mem->liw += 41; /* fcn/data ptr, int, long int, sunindextype, booleantype */ // ark_mem->lrw += 10; @@ -373,14 +377,14 @@ void SPRKStepFree(void **arkode_mem) if (ark_mem->step_mem != NULL) { step_mem = (ARKodeSPRKStepMem) ark_mem->step_mem; - if (step_mem->f1 != NULL) { + if (step_mem->f1vec != NULL) { arkFreeVec(ark_mem, &step_mem->f1vec); - step_mem->f1 = NULL; + step_mem->f1vec = NULL; } - if (step_mem->f2 != NULL) { + if (step_mem->f2vec != NULL) { arkFreeVec(ark_mem, &step_mem->f2vec); - step_mem->f2 = NULL; + step_mem->f2vec = NULL; } ARKodeSPRKMem_Free(step_mem->method); @@ -390,6 +394,7 @@ void SPRKStepFree(void **arkode_mem) } /* free memory for overall ARKODE infrastructure */ + fprintf(stderr, ">>>>> arkode_mem->ewt=%p\n", ark_mem->ewt); arkFree(arkode_mem); } diff --git a/src/arkode/arkode_timestepper_impl.h b/src/arkode/arkode_timestepper_impl.h deleted file mode 100644 index d7f9a1f52a..0000000000 --- a/src/arkode/arkode_timestepper_impl.h +++ /dev/null @@ -1,13 +0,0 @@ - - - -struct ARKodeMethodMem { - /* Further method specification */ - void* impl; - - int q; /* method order */ - int p; /* embedding order (0 = no embedding) */ - int stages; /* number of stages */ -}; - -typedef struct ARKodeMethodMem* ARKodeMethod; From 5b627f88837d4b95a8c841ab907a730887fc7eab Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 15 Mar 2023 17:36:23 -0700 Subject: [PATCH 025/177] changes in arkode related to comp summation --- include/arkode/arkode.h | 2 +- src/arkode/arkode.c | 33 +++------------------------------ src/arkode/arkode_impl.h | 2 -- 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 4b5772d9e2..be8bd7a543 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -139,7 +139,7 @@ extern "C" { * ------------------------------ */ typedef int (*ARKRhsFn)(realtype t, N_Vector y, - N_Vector ydot, void *user_data); + N_Vector ydot, void *user_data); typedef int (*ARKRootFn)(realtype t, N_Vector y, realtype *gout, void *user_data); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 72d22d28ae..9b6f7e9e5b 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -952,10 +952,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, (ark_mem->tcur-tout)*ark_mem->h >= ZERO ) { istate = ARK_SUCCESS; ark_mem->tretlast = *tret = tout; - /* Only use dense output when we tcur is not within 10*eps of tout already.*/ - if (SUNRCompare(ark_mem->tcur - tout, ZERO)) { - (void) arkGetDky(ark_mem, tout, 0, yout); - } + (void) arkGetDky(ark_mem, tout, 0, yout); ark_mem->next_h = ark_mem->hprime; break; } @@ -964,11 +961,8 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR*ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); - if (SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { - // /* Only use dense output when we tcur is not within 10*eps of tstop already.*/ - // if (SUNRCompare(ark_mem->tcur - ark_mem->tstop, ZERO)) { - // (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); - // } + if ( SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { + (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); ark_mem->tretlast = *tret = ark_mem->tstop; ark_mem->tstopset = SUNFALSE; istate = ARK_TSTOP_RETURN; @@ -976,7 +970,6 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, } /* limit upcoming step if it will overcome tstop */ if ( (ark_mem->tcur + ark_mem->hprime - ark_mem->tstop)*ark_mem->h > ZERO ) { - // printf(">>> hprime = %g\n", ark_mem->hprime); ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE-FOUR*ark_mem->uround); ark_mem->eta = ark_mem->hprime/ark_mem->h; @@ -1023,8 +1016,6 @@ int arkGetDky(ARKodeMem ark_mem, realtype t, int k, N_Vector dky) realtype s, tfuzz, tp, tn1; int retval; - printf(">>> arkGetDky t = %.16f, tcur = %.16f\n", t, ark_mem->tcur); - /* Check all inputs for legality */ if (ark_mem == NULL) { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE", "arkGetDky", @@ -1666,10 +1657,6 @@ booleantype arkAllocVectors(ARKodeMem ark_mem, N_Vector tmpl) if (!arkAllocVec(ark_mem, tmpl, &ark_mem->yn)) return(SUNFALSE); - /* Allocate yerr if needed */ - if (!arkAllocVec(ark_mem, tmpl, &ark_mem->yerr)) - return(SUNFALSE); - /* Allocate fn if needed */ if (!arkAllocVec(ark_mem, tmpl, &ark_mem->fn)) return(SUNFALSE); @@ -1894,9 +1881,6 @@ int arkInitialSetup(ARKodeMem ark_mem, realtype tout) } } - /* Zero yerr for compensated summation */ - N_VConst(ZERO, ark_mem->yerr); - /* If necessary, temporarily set h as it is used to compute the tolerance in a potential mass matrix solve when computing the full rhs */ if (ark_mem->h == ZERO) ark_mem->h = ONE; @@ -2349,15 +2333,6 @@ int arkYddNorm(ARKodeMem ark_mem, realtype hg, realtype *yddnrm) return(ARK_SUCCESS); } -inline static -void compensatedSum(sunrealtype base, sunrealtype inc, sunrealtype *sum, sunrealtype *error) -{ - sunrealtype err = *error; - volatile sunrealtype tmp1 = inc - err; - volatile sunrealtype tmp2 = base + tmp1; - *error = (tmp2 - base) - tmp1; - *sum = tmp2; -} /*--------------------------------------------------------------- arkCompleteStep @@ -2376,13 +2351,11 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) int retval, mode; realtype troundoff; - /* Set current time to the end of the step (in case the last stage time does not coincide with the step solution time). If tstop is enabled, it is possible for tn + h to be past tstop by roundoff, and in that case, we reset tn (after incrementing by h) to tstop. */ - // compensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); /* TODO(CJB): I am guessing we would want this to be optional, but perhaps performance comparisons should be done (with small problems). */ ark_mem->tcur = ark_mem->tn + ark_mem->h; if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR * ark_mem->uround * diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 82fed13c41..f099af8444 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -324,7 +324,6 @@ typedef struct ARKodeMemRec { as evolving solution by the timestepper modules */ N_Vector yn; /* solution from the last successful step */ N_Vector fn; /* full IVP right-hand side from last step */ - N_Vector yerr; /* error vector for compensated summation */ N_Vector tempv1; /* temporary storage vectors (for local use and by */ N_Vector tempv2; /* time-stepping modules) */ N_Vector tempv3; @@ -386,7 +385,6 @@ typedef struct ARKodeMemRec { /* Saved Values */ realtype h0u; /* actual initial stepsize */ realtype tn; /* time of last successful step */ - realtype terr; /* error in tn for compensated sums */ realtype hold; /* last successful h value used */ realtype tolsf; /* tolerance scale factor (suggestion to user) */ booleantype VabstolMallocDone; From f0bd9d754d17dc0290558590e351873ee564f915 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 16 Mar 2023 16:31:10 -0700 Subject: [PATCH 026/177] add a bunch more methods --- examples/arkode/C_serial/ark_kepler.c | 364 ++++++++++-------- examples/arkode/C_serial/ark_kepler_plot.py | 8 +- .../arkode/C_serial/ark_kepler_plot_all.py | 95 ++--- include/arkode/arkode_sprk.h | 26 +- include/arkode/arkode_sprkstep.h | 11 +- src/arkode/arkode_sprk.c | 324 ++++++++++++++-- src/arkode/arkode_sprk_methods.h | 1 - src/arkode/arkode_sprkstep.c | 243 ++++++------ src/arkode/arkode_sprkstep_impl.h | 1 + src/arkode/arkode_sprkstep_io.c | 36 ++ 10 files changed, 737 insertions(+), 372 deletions(-) delete mode 100644 src/arkode/arkode_sprk_methods.h diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index f8ceb95bed..d0c0e45f21 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -81,7 +81,6 @@ typedef struct { FILE *hhist_fp; } *UserData; - int main(int argc, char* argv[]) { SUNContext sunctx; @@ -107,9 +106,9 @@ int main(int argc, char* argv[]) const sunrealtype delta = SUN_RCONST(0.0); // unperturbed /* Default integrator Options */ - int step_mode = 1; - int method = 1; - int order = 2; + int step_mode = 0; + int method = 0; + int order = 1; const sunrealtype dTout = SUN_RCONST(dt); // const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); @@ -146,183 +145,246 @@ int main(int argc, char* argv[]) /* Create SPRKStep integrator where we treat dqdt explicitly and dpdt implicitly */ if (method == 0) { - arkode_mem = SPRKStepCreate(dqdt, dpdt, T0, y, sunctx); + arkode_mem = SPRKStepCreate(dpdt, dqdt, T0, y, sunctx); + + switch (order) { + case 1: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_EULER_1); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 2: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_LEAPFROG_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 22: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 222: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 3: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_RUTH_3); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 33: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_3); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 4: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_CANDY_ROZMUS_4); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 44: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_4); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 5: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_5); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 6: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_YOSHIDA_6); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 8: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_8); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 10: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_SOFRONIOU_10); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + default: + fprintf(stderr, "Not a valid method\n"); + return 1; + } // retval = SPRKStepSetOrder(arkode_mem, order); // if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; - // if (step_mode == 1) { - // retval = SPRKStepSetFixedStep(arkode_mem, dt); - // if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + if (step_mode == 0) { + retval = SPRKStepSetFixedStep(arkode_mem, dt); + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - // retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); - // if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; - // } else { - // /* Adaptivity based on [Hairer and Soderlind, 2005] */ - // retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); - // if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + } else { + /* Adaptivity based on [Hairer and Soderlind, 2005] */ + retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - // udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); - // udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); - // retval = SPRKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); - // if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; + udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); + udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); + retval = SPRKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); + if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; - // retval = SPRKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); - // if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; - // } + retval = SPRKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + } - // retval = SPRKStepSetUserData(arkode_mem, (void *) udata); - // if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; + retval = SPRKStepSetUserData(arkode_mem, (void *) udata); + if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; } else if (method >= 1) { fprintf(stderr, ">>>>> ARKStepCreate\n"); if (method == 1) { arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); - // retval = ARKStepSetOrder(arkode_mem, order); - // if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + retval = ARKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; } else { arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); - // retval = ARKStepSetOrder(arkode_mem, order); - // if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + retval = ARKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - // NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); - // ARKStepSetNonlinearSolver(arkode_mem, NLS); + NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); + ARKStepSetNonlinearSolver(arkode_mem, NLS); } - // retval = ARKStepSetUserData(arkode_mem, (void *) udata); - // if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; + retval = ARKStepSetUserData(arkode_mem, (void *) udata); + if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - // retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); - // if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; + retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); + if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - // if (step_mode == 1) { - // retval = ARKStepSetFixedStep(arkode_mem, dt); - // } else { - // retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-8), SUN_RCONST(10e-12)); - // if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; - // } + if (step_mode == 0) { + retval = ARKStepSetFixedStep(arkode_mem, dt); + } else { + retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-8), SUN_RCONST(10e-12)); + if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; + } } - // /* Open output files */ - // if (method == 0) { - // const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; - // const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; - // const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; - // const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; - // // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; - // // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; - // // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; - // char fname[64]; - // sprintf(fname, fmt1, order); - // conserved_fp = fopen(fname, "w+"); - // sprintf(fname, fmt2, order); - // solution_fp = fopen(fname, "w+"); - // sprintf(fname, fmt3, order); - // times_fp = fopen(fname, "w+"); - // sprintf(fname, fmt4, order); - // udata->hhist_fp = fopen(fname, "w+"); - // } else { - // const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; - // const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; - // const char* fmt3 = "ark_kepler_times_erk-%d.txt"; - // const char* fmt4 = "ark_kepler_hhist_erk-%d.txt"; - // char fname[64]; - // sprintf(fname, fmt1, order); - // conserved_fp = fopen(fname, "w+"); - // sprintf(fname, fmt2, order); - // solution_fp = fopen(fname, "w+"); - // sprintf(fname, fmt3, order); - // times_fp = fopen(fname, "w+"); - // sprintf(fname, fmt4, order); - // udata->hhist_fp = fopen(fname, "w+"); - // } + /* Open output files */ + if (method == 0) { + const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; + const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; + const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; + const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; + // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; + // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; + // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; + char fname[64]; + sprintf(fname, fmt1, order); + conserved_fp = fopen(fname, "w+"); + sprintf(fname, fmt2, order); + solution_fp = fopen(fname, "w+"); + sprintf(fname, fmt3, order); + times_fp = fopen(fname, "w+"); + sprintf(fname, fmt4, order); + udata->hhist_fp = fopen(fname, "w+"); + } else { + const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; + const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; + const char* fmt3 = "ark_kepler_times_erk-%d.txt"; + const char* fmt4 = "ark_kepler_hhist_erk-%d.txt"; + char fname[64]; + sprintf(fname, fmt1, order); + conserved_fp = fopen(fname, "w+"); + sprintf(fname, fmt2, order); + solution_fp = fopen(fname, "w+"); + sprintf(fname, fmt3, order); + times_fp = fopen(fname, "w+"); + sprintf(fname, fmt4, order); + udata->hhist_fp = fopen(fname, "w+"); + } printf("\n Begin Kepler Problem\n\n"); - // /* Print out starting energy, momentum before integrating */ - // tret = T0; - // tout = T0+dTout; - // H0 = Hamiltonian(y); - // L0 = AngularMomentum(y); - // sunrealtype Q0 = Q(y, udata->alpha)/udata->rho_n; - // fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f, Q(p,q) = %.16f\n", - // tret, H0, L0, Q0); - // fprintf(times_fp, "%.16f\n", tret); - // fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); - // N_VPrintFile(y, solution_fp); - - // /* Do integration */ - // if (method == 0) { - // for (iout = 0; iout < num_output_times; iout++) { - // // SPRKStepSetStopTime(arkode_mem, tout); - // retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", - // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - // Q(y, udata->alpha)/udata->rho_np1-Q0); - // fprintf(times_fp, "%.16f\n", tret); - // fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); - // N_VPrintFile(y, solution_fp); - - // if (retval >= 0) { /* successful solve: update time */ - // tout += dTout; - // tout = (tout > Tf) ? Tf : tout; - // } else { /* unsuccessful solve: break */ - // fprintf(stderr, "Solver failure, stopping integration\n"); - // break; - // } - // } - // } else { - // for (iout = 0; iout < num_output_times; iout++) { - // ARKStepSetStopTime(arkode_mem, tout); - // if (step_mode == 3) { - // while(tret < tout) { - // retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - // if (retval < 0) break; - // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", - // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - // Q(y, udata->alpha)/udata->rho_np1-Q0); - // fprintf(times_fp, "%.16f\n", tret); - // fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); - // N_VPrintFile(y, solution_fp); - // } - // } else { - // retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", - // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - // Q(y, udata->alpha)/udata->rho_np1-Q0); - // fprintf(times_fp, "%.16f\n", tret); - // fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); - // N_VPrintFile(y, solution_fp); - // } - - // if (retval >= 0) { /* successful solve: update time */ - // tout += dTout; - // tout = (tout > Tf) ? Tf : tout; - // } else { /* unsuccessful solve: break */ - // fprintf(stderr, "Solver failure, stopping integration\n"); - // break; - // } - // } - // } - - // fclose(udata->hhist_fp); - // free(udata); - // fclose(times_fp); - // fclose(conserved_fp); - // fclose(solution_fp); - // if (NLS) { - // SUNNonlinSolFree(NLS); - // } - // N_VDestroy(y); + /* Print out starting energy, momentum before integrating */ + tret = T0; + tout = T0+dTout; + H0 = Hamiltonian(y); + L0 = AngularMomentum(y); + sunrealtype Q0 = Q(y, udata->alpha)/udata->rho_n; + fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f, Q(p,q) = %.16f\n", + tret, H0, L0, Q0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); + N_VPrintFile(y, solution_fp); + + /* Do integration */ + if (method == 0) { + for (iout = 0; iout < num_output_times; iout++) { + // SPRKStepSetStopTime(arkode_mem, tout); + + retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + + /* Output current integration status */ + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + Q(y, udata->alpha)/udata->rho_np1-Q0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); + + /* Check if the solve was successful, if so, update the time and continue */ + if (retval >= 0) { + tout += dTout; + tout = (tout > Tf) ? Tf : tout; + } else { + fprintf(stderr, "Solver failure, stopping integration\n"); + break; + } + } + } else { + for (iout = 0; iout < num_output_times; iout++) { + ARKStepSetStopTime(arkode_mem, tout); + if (step_mode == 3) { + while(tret < tout) { + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (retval < 0) break; + + /* Output current integration status */ + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + Q(y, udata->alpha)/udata->rho_np1-Q0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); + } + } else { + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + + /* Output current integration status */ + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + Q(y, udata->alpha)/udata->rho_np1-Q0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); + } + + /* Check if the solve was successful, if so, update the time and continue */ + if (retval >= 0) { + tout += dTout; + tout = (tout > Tf) ? Tf : tout; + } else { + fprintf(stderr, "Solver failure, stopping integration\n"); + break; + } + } + } + + fclose(udata->hhist_fp); + free(udata); + fclose(times_fp); + fclose(conserved_fp); + fclose(solution_fp); + if (NLS) { + SUNNonlinSolFree(NLS); + } + N_VDestroy(y); if (method == 0) { // SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - SPRKStepFree(arkode_mem); // TODO: figure out why this is segfaulting! + SPRKStepFree(&arkode_mem); } else { - fprintf(stderr, ">>>>> ARKStepFree\n"); - // ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - ARKStepFree(arkode_mem); // TODO: figure out why this is segfaulting! + ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + ARKStepFree(&arkode_mem); } + SUNContext_Free(&sunctx); return 0; diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index e6cc1c4c28..94a3edba53 100755 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -18,8 +18,8 @@ import numpy as np import matplotlib.pyplot as plt -t = np.loadtxt('ark_kepler_times_sprk-1.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_sprk-1.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_sprk-2.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_sprk-2.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) @@ -27,7 +27,7 @@ plt.savefig('ark_kepler_phase.png') plt.close() -conserved = np.loadtxt('ark_kepler_conserved_sprk-1.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_sprk-2.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] @@ -54,7 +54,7 @@ plt.close() # # Step history -# hhist = np.loadtxt('ark_kepler_hhist_sprk-1.txt', dtype=np.float64) +# hhist = np.loadtxt('ark_kepler_hhist_sprk-2.txt', dtype=np.float64) # plt.figure(dpi=200) # plt.title('Step Size History') # plt.plot(t[:-1], hhist) diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_all.py index ca9fc50282..e12fb63f6d 100755 --- a/examples/arkode/C_serial/ark_kepler_plot_all.py +++ b/examples/arkode/C_serial/ark_kepler_plot_all.py @@ -10,10 +10,11 @@ def load_results(case): conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) return t, y, conserved -# sprk1 = load_results('_sprk-1') -# sprk2 = load_results('_sprk-2') -# sprk3 = load_results('_sprk-3') -# sprk4 = load_results('_sprk-4') +sprk1 = load_results('_sprk-1') +sprk2 = load_results('_sprk-2') +sprk3 = load_results('_sprk-3') +sprk4 = load_results('_sprk-4') +sprk5 = load_results('_sprk-5') erk2 = load_results('_erk-2') erk3 = load_results('_erk-3') erk4 = load_results('_erk-4') @@ -23,18 +24,33 @@ def load_results(case): # sprkinc3 = load_results('_sprkinc-3') all_to_compare = [] -# all_to_compare.append(sprk1) -# all_to_compare.append(sprk2) -# all_to_compare.append(sprk3) -# all_to_compare.append(sprk4) -all_to_compare.append(erk2) -all_to_compare.append(erk3) -all_to_compare.append(erk4) -all_to_compare.append(erk5) +all_to_compare.append(sprk1) +all_to_compare.append(sprk2) +all_to_compare.append(sprk3) +all_to_compare.append(sprk4) +all_to_compare.append(sprk5) +# all_to_compare.append(erk2) +# all_to_compare.append(erk3) +# all_to_compare.append(erk4) +# all_to_compare.append(erk5) # all_to_compare.append(sprkinc1) # all_to_compare.append(sprkinc2) # all_to_compare.append(sprkinc3) +legend = [] +legend.append(r'$O(h^1)$ SPRK') +legend.append(r'$O(h^2)$ SPRK') +legend.append(r'$O(h^3)$ SPRK') +legend.append(r'$O(h^4)$ SPRK') +legend.append(r'$O(h^5)$ SPRK') +# legend.append(r'$O(h^1)$ SPRK (inc)') +# legend.append(r'$O(h^2)$ SPRK (inc)') +# legend.append(r'$O(h^3)$ SPRK (inc)') +# legend.append(r'$O(h^2)$ ERK') +# legend.append(r'$O(h^3)$ ERK') +# legend.append(r'$O(h^4)$ ERK') +# legend.append(r'$O(h^5)$ ERK') + h = 0.01 t = erk2[0] trend_line_erk_2 = t*h*h @@ -55,18 +71,6 @@ def load_results(case): plt.xlabel('<--- t --->') plt.xscale('log') plt.yscale('log') -legend = [] -# legend.append(r'$O(h^1)$ SPRK') -# legend.append(r'$O(h^2)$ SPRK') -# legend.append(r'$O(h^3)$ SPRK') -# legend.append(r'$O(h^4)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# legend.append(r'$O(h^2)$ SPRK (inc)') -# legend.append(r'$O(h^3)$ SPRK (inc)') -legend.append(r'$O(h^2)$ ERK') -legend.append(r'$O(h^3)$ ERK') -legend.append(r'$O(h^4)$ ERK') -legend.append(r'$O(h^5)$ ERK') plt.legend(legend) plt.savefig('ark_kepler_energy_compare.png') @@ -86,18 +90,6 @@ def load_results(case): plt.xlabel('<--- t --->') plt.xscale('log') plt.yscale('log') -legend = [] -# legend.append(r'$O(h^1)$ SPRK') -# legend.append(r'$O(h^2)$ SPRK') -# legend.append(r'$O(h^3)$ SPRK') -# legend.append(r'$O(h^4)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# legend.append(r'$O(h^2)$ SPRK (inc)') -# legend.append(r'$O(h^3)$ SPRK (inc)') -legend.append(r'$O(h^2)$ ERK') -legend.append(r'$O(h^3)$ ERK') -legend.append(r'$O(h^4)$ ERK') -legend.append(r'$O(h^5)$ ERK') plt.legend(legend) plt.savefig('ark_kepler_momentum_compare.png') @@ -112,13 +104,6 @@ def load_results(case): # plt.ylabel('| error |') # plt.xlabel('t') # plt.yscale('log') -# legend = [] -# legend.append(r'$O(h^1)$ SPRK') -# # legend.append(r'$O(h^2)$ SPRK') -# # legend.append(r'$O(h^3)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# # legend.append(r'$O(h^2)$ SPRK (inc)') -# # legend.append(r'$O(h^3)$ SPRK (inc)') # plt.legend(legend) # plt.savefig('ark_kepler_phase_compare.png') @@ -131,18 +116,6 @@ def load_results(case): plt.plot(t, y[:,1], linewidth = 2) plt.plot(t, y[:,2], linewidth = 2) plt.plot(t, y[:,3], linewidth = 2) -legend = [] -# legend.append(r'$O(h^1)$ SPRK') -# legend.append(r'$O(h^2)$ SPRK') -# legend.append(r'$O(h^3)$ SPRK') -# legend.append(r'$O(h^4)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# legend.append(r'$O(h^2)$ SPRK (inc)') -# legend.append(r'$O(h^3)$ SPRK (inc)') -legend.append(r'$O(h^2)$ ERK') -legend.append(r'$O(h^3)$ ERK') -legend.append(r'$O(h^4)$ ERK') -legend.append(r'$O(h^5)$ ERK') plt.legend(legend) plt.grid(True) plt.xlabel('<--- t --->') @@ -157,18 +130,6 @@ def load_results(case): plt.figure(dpi=200) for _, y, _ in all_to_compare: plt.plot(y[:,0], y[:,1], linewidth = 2) -legend = [] -# legend.append(r'$O(h^1)$ SPRK') -# legend.append(r'$O(h^2)$ SPRK') -# legend.append(r'$O(h^3)$ SPRK') -# legend.append(r'$O(h^4)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# legend.append(r'$O(h^2)$ SPRK (inc)') -# legend.append(r'$O(h^3)$ SPRK (inc)') -legend.append(r'$O(h^2)$ ERK') -legend.append(r'$O(h^3)$ ERK') -legend.append(r'$O(h^4)$ ERK') -legend.append(r'$O(h^5)$ ERK') plt.legend(legend) plt.grid(True) plt.xlabel('<--- y1 --->') diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 6d7238bfb9..cc57e95bff 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -28,17 +28,25 @@ typedef enum { ARKODE_MIN_SPRK_NUM = 0, ARKODE_SYMPLECTIC_EULER_1 = ARKODE_MIN_SPRK_NUM, ARKODE_SYMPLECTIC_LEAPFROG_2, + ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2, ARKODE_SYMPLECTIC_RUTH_3, - ARKODE_SYMPLECTIC_MCLAUCHLAN_4, - ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_MCLAUCHLAN_4 + ARKODE_SYMPLECTIC_MCLACHLAN_2, + ARKODE_SYMPLECTIC_MCLACHLAN_3, + ARKODE_SYMPLECTIC_CANDY_ROZMUS_4, + ARKODE_SYMPLECTIC_MCLACHLAN_4, + ARKODE_SYMPLECTIC_MCLACHLAN_5, + ARKODE_SYMPLECTIC_YOSHIDA_6, + ARKODE_SYMPLECTIC_MCLACHLAN_8, + ARKODE_SYMPLECTIC_SOFRONIOU_10, + ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_SOFRONIOU_10 } ARKODE_SPRKMethodID; struct ARKodeSPRKMem_s { int q; /* method order of accuracy */ int stages; /* number of stages */ - sunrealtype* b; /* diagonally implicit coefficients */ - sunrealtype* B; /* explicit table coefficients */ + sunrealtype* a; /* coefficients multiplying T' */ + sunrealtype* b; /* coefficients multiplying -V' */ }; @@ -55,9 +63,15 @@ SUNDIALS_EXPORT int ARKodeSPRKMem_ToButcher(ARKodeSPRKMem sprk_mem, ARKodeButche /* Different methods */ ARKodeSPRKMem ARKodeSymplecticEuler(); -ARKodeSPRKMem ARKodeSymplecticLeapfrog(); +ARKodeSPRKMem ARKodeSymplecticLeapfrog2(); +ARKodeSPRKMem ARKodeSymplecticPseudoLeapfrog2(); ARKodeSPRKMem ARKodeSymplecticRuth3(); -ARKodeSPRKMem ARKodeSymplecticMcLauchlan4(); +ARKodeSPRKMem ARKodeSymplecticMcLachlan2(); +ARKodeSPRKMem ARKodeSymplecticMcLachlan3(); +ARKodeSPRKMem ARKodeSymplecticMcLachlan4(); +ARKodeSPRKMem ARKodeSymplecticMcLachlan5(); +ARKodeSPRKMem ARKodeSymplecticYoshida6(); +ARKodeSPRKMem ARKodeSymplecticMcLachlan8(); #ifdef __cplusplus } diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index fa68bdf09a..6e3b9b8c62 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -33,9 +33,13 @@ extern "C" { * ----------------- */ static const int SPRKSTEP_DEFAULT_1 = ARKODE_SYMPLECTIC_EULER_1; -static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_LEAPFROG_2; -static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_RUTH_3; -static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLAUCHLAN_4; +static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_MCLACHLAN_2; +static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_MCLACHLAN_3; +static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLACHLAN_4; +static const int SPRKSTEP_DEFAULT_5 = ARKODE_SYMPLECTIC_MCLACHLAN_5; +static const int SPRKSTEP_DEFAULT_6 = ARKODE_SYMPLECTIC_YOSHIDA_6; +static const int SPRKSTEP_DEFAULT_8 = ARKODE_SYMPLECTIC_MCLACHLAN_8; +static const int SPRKSTEP_DEFAULT_10 = ARKODE_SYMPLECTIC_SOFRONIOU_10; /* ------------------- * Exported Functions @@ -81,6 +85,7 @@ SUNDIALS_EXPORT int SPRKStepResFtolerance(void *arkode_mem, /* Optional input functions -- must be called AFTER SPRKStepCreate */ SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetOptimalParams(void *arkode_mem); +SUNDIALS_EXPORT int SPRKStepSetMethod(void *arkode_mem, ARKODE_SPRKMethodID id); SUNDIALS_EXPORT int SPRKStepSetOrder(void *arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void *arkode_mem, int itype); SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void *arkode_mem, int degree); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index f2d485fa36..1cbf5e775d 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -16,56 +16,322 @@ #include #include -#include #include -#include +#include #include +#include ARKodeSPRKMem ARKodeSymplecticEuler() { ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(1); sprk_mem->q = 1; sprk_mem->stages = 1; sprk_mem->b[0] = SUN_RCONST(1.0); - sprk_mem->B[0] = SUN_RCONST(1.0); + sprk_mem->a[0] = SUN_RCONST(1.0); + return sprk_mem; +} + +/* + The following methods are from: + + J Candy, W Rozmus, A symplectic integration algorithm for separable Hamiltonian functions, + Journal of Computational Physics, Volume 92, Issue 1, 1991, Pages 230-256, ISSN 0021-9991, + https://doi.org/10.1016/0021-9991(91)90299-Z. + */ + +ARKodeSPRKMem ARKodeSymplecticLeapfrog2() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); + sprk_mem->q = 2; + sprk_mem->stages = 2; + sprk_mem->b[0] = SUN_RCONST(0.0); + sprk_mem->b[1] = SUN_RCONST(1.0); + sprk_mem->a[0] = SUN_RCONST(0.5); + sprk_mem->a[1] = SUN_RCONST(0.5); return sprk_mem; } -ARKodeSPRKMem ARKodeSymplecticLeapfrog() { +ARKodeSPRKMem ARKodeSymplecticPseudoLeapfrog2() { ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); sprk_mem->q = 2; sprk_mem->stages = 2; sprk_mem->b[0] = SUN_RCONST(0.5); sprk_mem->b[1] = SUN_RCONST(0.5); - sprk_mem->B[0] = SUN_RCONST(1.0); - sprk_mem->B[1] = SUN_RCONST(0.0); + sprk_mem->a[0] = SUN_RCONST(1.0); + sprk_mem->a[1] = SUN_RCONST(0.0); return sprk_mem; } +ARKodeSPRKMem ARKodeSymplecticCandyRozmus4() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(4); + sprk_mem->q = 4; + sprk_mem->stages = 4; + sprk_mem->a[0] = ( SUN_RCONST(2.0) + SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0)/SUN_RCONST(3.0)) + + SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0)/SUN_RCONST(3.0)) ) / SUN_RCONST(6.0); + sprk_mem->a[1] = ( SUN_RCONST(1.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0)/SUN_RCONST(3.0)) + - SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0)/SUN_RCONST(3.0)) ) / SUN_RCONST(6.0); + sprk_mem->a[2] = sprk_mem->a[1]; + sprk_mem->a[3] = sprk_mem->a[0]; + sprk_mem->b[0] = SUN_RCONST(0.0); + sprk_mem->b[1] = SUN_RCONST(1.0) / + ( SUN_RCONST(2.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0)/SUN_RCONST(3.0)) ); + sprk_mem->b[2] = SUN_RCONST(1.0) / + ( SUN_RCONST(1.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(2.0)/SUN_RCONST(3.0)) ); + sprk_mem->b[3] = sprk_mem->b[1]; + return sprk_mem; +} + +/* + The following methods are from: + + Ruth, R. D. (1983). A CANONICAL INTEGRATION TECHNIQUE. + IEEE Transactions on Nuclear Science, 30(4). + https://accelconf.web.cern.ch/p83/PDF/PAC1983_2669.PDF + */ + ARKodeSPRKMem ARKodeSymplecticRuth3() { ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(3); sprk_mem->q = 3; sprk_mem->stages = 3; + sprk_mem->a[0] = SUN_RCONST(2.0)/SUN_RCONST(3.0); + sprk_mem->a[1] = -SUN_RCONST(2.0)/SUN_RCONST(3.0); + sprk_mem->a[2] = SUN_RCONST(1.0); sprk_mem->b[0] = SUN_RCONST(7.0)/SUN_RCONST(24.0); sprk_mem->b[1] = SUN_RCONST(3.0)/SUN_RCONST(4.0); sprk_mem->b[2] = -SUN_RCONST(1.0)/SUN_RCONST(24.0); - sprk_mem->B[0] = SUN_RCONST(2.0)/SUN_RCONST(3.0); - sprk_mem->B[1] = -SUN_RCONST(2.0)/SUN_RCONST(3.0); - sprk_mem->B[2] = SUN_RCONST(1.0); return sprk_mem; } -ARKodeSPRKMem ARKodeSymplecticMcLauchlan4() { +/* + The following methods are from: + + McLachlan, R.I., Atela, P.: The accuracy of symplectic integrators. + Nonlinearity. 5, 541–562 (1992). https://doi.org/10.1088/0951-7715/5/2/011 + */ + +ARKodeSPRKMem ARKodeSymplecticMcLachlan2() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(3); + sprk_mem->q = 2; + sprk_mem->stages = 2; + sprk_mem->a[0] = SUN_RCONST(1.0)/SUNRsqrt(SUN_RCONST(2.0)); + sprk_mem->a[1] = SUN_RCONST(1.0) - sprk_mem->a[0]; + sprk_mem->b[0] = SUN_RCONST(1.0)/SUNRsqrt(SUN_RCONST(2.0)); + sprk_mem->b[1] = SUN_RCONST(1.0) - sprk_mem->b[0]; + return sprk_mem; +} + +ARKodeSPRKMem ARKodeSymplecticMcLachlan3() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(3); + sprk_mem->q = 3; + sprk_mem->stages = 3; + sprk_mem->a[0] = SUN_RCONST(0.919661523017399857); + sprk_mem->a[1] = SUN_RCONST(0.25)/sprk_mem->a[0] - sprk_mem->a[0]/SUN_RCONST(2.0); + sprk_mem->a[2] = SUN_RCONST(1.0) - sprk_mem->a[0] - sprk_mem->a[1]; + sprk_mem->b[0] = sprk_mem->a[2]; + sprk_mem->b[1] = sprk_mem->a[1]; + sprk_mem->b[2] = sprk_mem->a[0]; + return sprk_mem; +} + +ARKodeSPRKMem ARKodeSymplecticMcLachlan4() { ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(4); sprk_mem->q = 4; sprk_mem->stages = 4; + sprk_mem->a[0] = SUN_RCONST(0.515352837431122936); + sprk_mem->a[1] = -SUN_RCONST(0.085782019412973646); + sprk_mem->a[2] = SUN_RCONST(0.441583023616466524); + sprk_mem->a[3] = SUN_RCONST(0.128846158365384185); sprk_mem->b[0] = SUN_RCONST(0.134496199277431089); sprk_mem->b[1] = -SUN_RCONST(0.224819803079420806); sprk_mem->b[2] = SUN_RCONST(0.756320000515668291); sprk_mem->b[3] = SUN_RCONST(0.33400360328632142); - sprk_mem->B[0] = SUN_RCONST(0.515352837431122936); - sprk_mem->B[1] = -SUN_RCONST(0.085782019412973646); - sprk_mem->B[2] = SUN_RCONST(0.441583023616466524); - sprk_mem->B[3] = SUN_RCONST(0.128846158365384185); + return sprk_mem; +} + +ARKodeSPRKMem ARKodeSymplecticMcLachlan5() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(6); + sprk_mem->q = 5; + sprk_mem->stages = 6; + sprk_mem->a[0] = SUN_RCONST(0.339839625839110000); + sprk_mem->a[1] = -SUN_RCONST(0.088601336903027329); + sprk_mem->a[2] = SUN_RCONST(0.5858564768259621188); + sprk_mem->a[3] = -SUN_RCONST(0.603039356536491888); + sprk_mem->a[4] = SUN_RCONST(0.3235807965546976394); + sprk_mem->a[5] = SUN_RCONST(0.4423637942197494587); + sprk_mem->b[0] = SUN_RCONST(0.1193900292875672758); + sprk_mem->b[1] = SUN_RCONST(0.6989273703824752308); + sprk_mem->b[2] = -SUN_RCONST(0.1713123582716007754); + sprk_mem->b[3] = SUN_RCONST(0.4012695022513534480); + sprk_mem->b[4] = SUN_RCONST(0.0107050818482359840); + sprk_mem->b[5] = -SUN_RCONST(0.0589796254980311632); + return sprk_mem; +} + +/* + The following methods are from: + + Yoshida, H.: Construction of higher order symplectic integrators. + Phys Lett A. 150, 262–268 (1990). + https://doi.org/10.1016/0375-9601(90)90092-3 + + */ + +ARKodeSPRKMem ARKodeSymplecticYoshida6() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(8); + sprk_mem->q = 6; + sprk_mem->stages = 8; + sprk_mem->a[0] = SUN_RCONST(0.78451361047755726382); + sprk_mem->a[1] = SUN_RCONST(0.23557321335935813368); + sprk_mem->a[2] = -SUN_RCONST(1.17767998417887100695); + sprk_mem->a[3] = SUN_RCONST(1.3151863206839); + sprk_mem->a[4] = sprk_mem->a[2]; + sprk_mem->a[5] = sprk_mem->a[1]; + sprk_mem->a[6] = sprk_mem->a[0]; + sprk_mem->a[7] = SUN_RCONST(0.0); + sprk_mem->b[0] = sprk_mem->a[0] / SUN_RCONST(2.0); + sprk_mem->b[1] = (sprk_mem->a[0] + sprk_mem->a[1]) / SUN_RCONST(2.0); + sprk_mem->b[2] = (sprk_mem->a[1] + sprk_mem->a[2]) / SUN_RCONST(2.0); + sprk_mem->b[3] = (sprk_mem->a[2] + sprk_mem->a[3]) / SUN_RCONST(2.0); + sprk_mem->b[4] = sprk_mem->b[3]; + sprk_mem->b[5] = sprk_mem->b[2]; + sprk_mem->b[6] = sprk_mem->b[1]; + sprk_mem->b[7] = sprk_mem->b[0]; + return sprk_mem; +} + +/* + The following methods are from: + + McLachlan, R.I.: On the Numerical Integration of Ordinary Differential Equations + by Symmetric Composition Methods. Siam J Sci Comput. 16, 151–168 (1995). + https://doi.org/10.1137/0916010 + + */ + +ARKodeSPRKMem ARKodeSymplecticMcLachlan8() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(16); + sprk_mem->q = 8; + sprk_mem->stages = 16; + sprk_mem->a[0] = SUN_RCONST(0.74167036435061295344822780); + sprk_mem->a[1] = -SUN_RCONST(0.40910082580003159399730010); + sprk_mem->a[2] = SUN_RCONST(0.19075471029623837995387626); + sprk_mem->a[3] = -SUN_RCONST(0.57386247111608226665638773); + sprk_mem->a[4] = SUN_RCONST(0.29906418130365592384446354); + sprk_mem->a[5] = SUN_RCONST(0.33462491824529818378495798); + sprk_mem->a[6] = SUN_RCONST(0.31529309239676659663205666); + sprk_mem->a[7] = -SUN_RCONST(0.79688793935291635401978884); + sprk_mem->a[8] = sprk_mem->a[6]; + sprk_mem->a[9] = sprk_mem->a[5]; + sprk_mem->a[10] = sprk_mem->a[4]; + sprk_mem->a[11] = sprk_mem->a[3]; + sprk_mem->a[12] = sprk_mem->a[2]; + sprk_mem->a[13] = sprk_mem->a[1]; + sprk_mem->a[14] = sprk_mem->a[0]; + sprk_mem->a[15] = SUN_RCONST(0.0); + sprk_mem->b[0] = sprk_mem->a[0] / SUN_RCONST(2.0); + sprk_mem->b[1] = (sprk_mem->a[0] + sprk_mem->a[1]) / SUN_RCONST(2.0); + sprk_mem->b[2] = (sprk_mem->a[1] + sprk_mem->a[2]) / SUN_RCONST(2.0); + sprk_mem->b[3] = (sprk_mem->a[2] + sprk_mem->a[3]) / SUN_RCONST(2.0); + sprk_mem->b[4] = (sprk_mem->a[3] + sprk_mem->a[4]) / SUN_RCONST(2.0); + sprk_mem->b[5] = (sprk_mem->a[4] + sprk_mem->a[5]) / SUN_RCONST(2.0); + sprk_mem->b[6] = (sprk_mem->a[5] + sprk_mem->a[6]) / SUN_RCONST(2.0); + sprk_mem->b[7] = (sprk_mem->a[6] + sprk_mem->a[7]) / SUN_RCONST(2.0); + sprk_mem->b[8] = sprk_mem->b[7]; + sprk_mem->b[9] = sprk_mem->b[6]; + sprk_mem->b[10] = sprk_mem->b[5]; + sprk_mem->b[11] = sprk_mem->b[4]; + sprk_mem->b[12] = sprk_mem->b[3]; + sprk_mem->b[13] = sprk_mem->b[2]; + sprk_mem->b[14] = sprk_mem->b[1]; + sprk_mem->b[15] = sprk_mem->b[0]; + return sprk_mem; +} + +/* + The following methods are from: + + Sofroniou, M., Spaletta, G.: Derivation of symmetric composition constants for + symmetric integrators. Optim Methods Softw. 20, 597–613 (2005). + https://doi.org/10.1080/10556780500140664 + + */ + +ARKodeSPRKMem ARKodeSymplecticSofroniou10() { + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(36); + sprk_mem->q = 10; + sprk_mem->stages = 36; + + sprk_mem->a[0] = SUN_RCONST(0.078795722521686419263907679337684); + sprk_mem->a[1] = SUN_RCONST(0.31309610341510852776481247192647); + sprk_mem->a[2] = SUN_RCONST(0.027918383235078066109520273275299); + sprk_mem->a[3] = -SUN_RCONST(0.22959284159390709415121339679655); + sprk_mem->a[4] = SUN_RCONST(0.13096206107716486317465685927961); + sprk_mem->a[5] = -SUN_RCONST(0.26973340565451071434460973222411); + sprk_mem->a[6] = SUN_RCONST(0.074973343155891435666137105641410); + sprk_mem->a[7] = SUN_RCONST(0.11199342399981020488957508073640); + sprk_mem->a[8] = SUN_RCONST(0.36613344954622675119314812353150); + sprk_mem->a[9] = -SUN_RCONST(0.39910563013603589787862981058340); + sprk_mem->a[10] = SUN_RCONST(0.10308739852747107731580277001372); + sprk_mem->a[11] = SUN_RCONST(0.41143087395589023782070411897608); + sprk_mem->a[12] = -SUN_RCONST(0.0048663605831352617621956593099771); + sprk_mem->a[13] = -SUN_RCONST(0.39203335370863990644808193642610); + sprk_mem->a[14] = SUN_RCONST(0.051942502962449647037182904015976); + sprk_mem->a[15] = SUN_RCONST(0.050665090759924496335874344156866); + sprk_mem->a[16] = SUN_RCONST(0.049674370639729879054568800279461); + sprk_mem->a[17] = SUN_RCONST(0.049317735759594537917680008339338); + sprk_mem->a[18] = sprk_mem->a[16]; + sprk_mem->a[19] = sprk_mem->a[15]; + sprk_mem->a[20] = sprk_mem->a[14]; + sprk_mem->a[21] = sprk_mem->a[13]; + sprk_mem->a[22] = sprk_mem->a[12]; + sprk_mem->a[23] = sprk_mem->a[11]; + sprk_mem->a[24] = sprk_mem->a[10]; + sprk_mem->a[25] = sprk_mem->a[9]; + sprk_mem->a[26] = sprk_mem->a[8]; + sprk_mem->a[27] = sprk_mem->a[7]; + sprk_mem->a[28] = sprk_mem->a[6]; + sprk_mem->a[29] = sprk_mem->a[5]; + sprk_mem->a[30] = sprk_mem->a[4]; + sprk_mem->a[31] = sprk_mem->a[3]; + sprk_mem->a[32] = sprk_mem->a[2]; + sprk_mem->a[33] = sprk_mem->a[1]; + sprk_mem->a[34] = sprk_mem->a[0]; + sprk_mem->a[35] = SUN_RCONST(0.0); + sprk_mem->b[0] = sprk_mem->a[0] / SUN_RCONST(2.0); + sprk_mem->b[1] = (sprk_mem->a[0] + sprk_mem->a[1]) / SUN_RCONST(2.0); + sprk_mem->b[2] = (sprk_mem->a[1] + sprk_mem->a[2]) / SUN_RCONST(2.0); + sprk_mem->b[3] = (sprk_mem->a[2] + sprk_mem->a[3]) / SUN_RCONST(2.0); + sprk_mem->b[4] = (sprk_mem->a[3] + sprk_mem->a[4]) / SUN_RCONST(2.0); + sprk_mem->b[5] = (sprk_mem->a[4] + sprk_mem->a[5]) / SUN_RCONST(2.0); + sprk_mem->b[6] = (sprk_mem->a[5] + sprk_mem->a[6]) / SUN_RCONST(2.0); + sprk_mem->b[7] = (sprk_mem->a[6] + sprk_mem->a[7]) / SUN_RCONST(2.0); + sprk_mem->b[8] = (sprk_mem->a[7] + sprk_mem->a[8]) / SUN_RCONST(2.0); + sprk_mem->b[9] = (sprk_mem->a[8] + sprk_mem->a[9]) / SUN_RCONST(2.0); + sprk_mem->b[10] = (sprk_mem->a[9] + sprk_mem->a[10]) / SUN_RCONST(2.0); + sprk_mem->b[11] = (sprk_mem->a[10] + sprk_mem->a[11]) / SUN_RCONST(2.0); + sprk_mem->b[12] = (sprk_mem->a[11] + sprk_mem->a[12]) / SUN_RCONST(2.0); + sprk_mem->b[13] = (sprk_mem->a[12] + sprk_mem->a[13]) / SUN_RCONST(2.0); + sprk_mem->b[14] = (sprk_mem->a[13] + sprk_mem->a[14]) / SUN_RCONST(2.0); + sprk_mem->b[15] = (sprk_mem->a[14] + sprk_mem->a[15]) / SUN_RCONST(2.0); + sprk_mem->b[16] = (sprk_mem->a[15] + sprk_mem->a[16]) / SUN_RCONST(2.0); + sprk_mem->b[17] = (sprk_mem->a[16] + sprk_mem->a[17]) / SUN_RCONST(2.0); + sprk_mem->b[18] = sprk_mem->b[17]; + sprk_mem->b[19] = sprk_mem->b[16]; + sprk_mem->b[20] = sprk_mem->b[15]; + sprk_mem->b[21] = sprk_mem->b[14]; + sprk_mem->b[22] = sprk_mem->b[13]; + sprk_mem->b[23] = sprk_mem->b[12]; + sprk_mem->b[24] = sprk_mem->b[11]; + sprk_mem->b[25] = sprk_mem->b[10]; + sprk_mem->b[26] = sprk_mem->b[9]; + sprk_mem->b[27] = sprk_mem->b[8]; + sprk_mem->b[28] = sprk_mem->b[7]; + sprk_mem->b[29] = sprk_mem->b[6]; + sprk_mem->b[30] = sprk_mem->b[5]; + sprk_mem->b[31] = sprk_mem->b[4]; + sprk_mem->b[32] = sprk_mem->b[3]; + sprk_mem->b[33] = sprk_mem->b[2]; + sprk_mem->b[34] = sprk_mem->b[1]; + sprk_mem->b[35] = sprk_mem->b[0]; + return sprk_mem; } @@ -78,7 +344,7 @@ ARKodeSPRKMem ARKodeSPRKMem_Alloc(int stages) sprk_mem->q = 0; sprk_mem->stages = stages; sprk_mem->b = (sunrealtype*) malloc(stages*sizeof(sunrealtype)); - sprk_mem->B = (sunrealtype*) malloc(stages*sizeof(sunrealtype)); + sprk_mem->a = (sunrealtype*) malloc(stages*sizeof(sunrealtype)); return sprk_mem; } @@ -89,11 +355,23 @@ ARKodeSPRKMem ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) case ARKODE_SYMPLECTIC_EULER_1: return ARKodeSymplecticEuler(); case ARKODE_SYMPLECTIC_LEAPFROG_2: - return ARKodeSymplecticLeapfrog(); + return ARKodeSymplecticLeapfrog2(); case ARKODE_SYMPLECTIC_RUTH_3: return ARKodeSymplecticRuth3(); - case ARKODE_SYMPLECTIC_MCLAUCHLAN_4: - return ARKodeSymplecticMcLauchlan4(); + case ARKODE_SYMPLECTIC_MCLACHLAN_2: + return ARKodeSymplecticMcLachlan2(); + case ARKODE_SYMPLECTIC_MCLACHLAN_3: + return ARKodeSymplecticMcLachlan3(); + case ARKODE_SYMPLECTIC_MCLACHLAN_4: + return ARKodeSymplecticMcLachlan4(); + case ARKODE_SYMPLECTIC_CANDY_ROZMUS_4: + return ARKodeSymplecticCandyRozmus4(); + case ARKODE_SYMPLECTIC_MCLACHLAN_5: + return ARKodeSymplecticMcLachlan5(); + case ARKODE_SYMPLECTIC_YOSHIDA_6: + return ARKodeSymplecticYoshida6(); + case ARKODE_SYMPLECTIC_MCLACHLAN_8: + return ARKodeSymplecticMcLachlan8(); default: return NULL; } @@ -111,7 +389,7 @@ ARKodeSPRKMem ARKodeSPRKMem_Copy(ARKodeSPRKMem that_sprk_mem) for (i = 0; i < sprk_mem->stages; ++i) { sprk_mem->b[i] = that_sprk_mem->b[i]; - sprk_mem->B[i] = that_sprk_mem->B[i]; + sprk_mem->a[i] = that_sprk_mem->a[i]; } return sprk_mem; @@ -129,7 +407,7 @@ void ARKodeSPRKMem_Free(ARKodeSPRKMem sprk_mem) if (sprk_mem) { free(sprk_mem->b); - free(sprk_mem->B); + free(sprk_mem->a); free(sprk_mem); } return; @@ -159,17 +437,17 @@ int ARKodeSPRKMem_ToButcher(ARKodeSPRKMem sprk_mem, ARKodeButcherTable* b_ptr, A /* Explicit table */ for (i = 0; i < sprk_mem->stages; ++i) { - B->b[i] = sprk_mem->B[i]; + B->b[i] = sprk_mem->a[i]; for (j = 0; j < i; ++j) { - B->A[i][j] = sprk_mem->B[j]; + B->A[i][j] = sprk_mem->a[j]; } } /* Time weights: C_j = sum_{i=0}^{j-1} B_i */ for (j = 0; j < sprk_mem->stages; ++j) { for (i = 0; i < j; ++i) { - b->c[j] += sprk_mem->B[i]; + b->c[j] += sprk_mem->a[i]; } } diff --git a/src/arkode/arkode_sprk_methods.h b/src/arkode/arkode_sprk_methods.h deleted file mode 100644 index 72fbdac82d..0000000000 --- a/src/arkode/arkode_sprk_methods.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 080de7bc80..e969a1a6c2 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -28,7 +28,6 @@ #include "arkode/arkode_sprkstep.h" #include "arkode_impl.h" #include "arkode_sprkstep_impl.h" -#include "arkode_sprk_methods.h" #include "arkode_interp_impl.h" /*=============================================================== @@ -394,7 +393,6 @@ void SPRKStepFree(void **arkode_mem) } /* free memory for overall ARKODE infrastructure */ - fprintf(stderr, ">>>>> arkode_mem->ewt=%p\n", ark_mem->ewt); arkFree(arkode_mem); } @@ -442,24 +440,39 @@ int sprkStep_Init(void* arkode_mem, int init_type) /* initializations/checks for (re-)initialization call */ if (init_type == FIRST_INIT) { - switch (step_mem->q) { - case 1: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_1); - break; - case 2: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_2); - break; - case 3: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_3); - break; - case 4: - default: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); - break; + if (!step_mem->method) { + switch (step_mem->q) { + case 1: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_1); + break; + case 2: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_2); + break; + case 3: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_3); + break; + case 4: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); + break; + case 5: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_5); + break; + case 6: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_6); + break; + case 7: + case 8: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_8); + break; + case 9: + case 10: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_10); + default: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); + break; + } } - - } /* set appropriate TakeStep routine based on problem configuration */ @@ -744,8 +757,8 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; ARKodeSPRKMem method_mem; + N_Vector prev_stage; int retval, is; - N_Vector delta_Yi, yn_plus_delta_Yi; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep", @@ -754,14 +767,12 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) method_mem = step_mem->method; + prev_stage = ark_mem->yn; for (is = 0; is < method_mem->stages; is++) { - retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, - method_mem->b[is], method_mem->B[is], ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - - retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, - method_mem->b[is], method_mem->B[is], ark_mem->ycur); + retval = sprkStep_SPRKStage(ark_mem, step_mem, prev_stage, + method_mem->b[is], method_mem->a[is], ark_mem->ycur); if (retval != ARK_SUCCESS) return(retval); + prev_stage = ark_mem->ycur; } *nflagPtr = 0; @@ -770,90 +781,6 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return ARK_SUCCESS; } -// /* Increment SPRK algorithm with compensated summation */ -// int sprkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -// { -// ARKodeMem ark_mem; -// ARKodeSPRKStepMem step_mem; -// int retval, is; -// N_Vector delta_Yi, yn_plus_delta_Yi; - -// /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", -// &ark_mem, &step_mem); -// if (retval != ARK_SUCCESS) return(retval); - -// // if (!ark_mem->fixedstep) { -// // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::SPRKStep", -// // "sprkStep_TakeStep_SPRK", "!!!! This TakeStep only works with fixed steps !!!!"); -// // return(ARK_UNRECOGNIZED_ERROR); -// // } - -// /* other shortcuts */ -// delta_Yi = ark_mem->tempv1; -// yn_plus_delta_Yi = ark_mem->tempv2; - -// /* [ \Delta Q_0 ] = [ 0 ] -// [ \Delta P_0 ] = [ 0 ] */ -// N_VConst(ZERO, delta_Yi); - -// /* loop over internal stages to the step */ -// for (is=0; isstages; is++) { -// /* store current stage index */ -// step_mem->istage = is; - -// /* set current stage time(s) */ -// if (step_mem->implicit) -// ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; -// else -// ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; - -// /* [ q_n ] + [ \Delta Q_i ] -// [ ] + [ ] */ -// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); - -// /* evaluate Fi with previous stage increment */ -// N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ -// retval = sprkStep_Fi(step_mem, ark_mem->tcur, yn_plus_delta_Yi, -// step_mem->sdata, ark_mem->user_data); -// if (retval != 0) return(ARK_RHSFUNC_FAIL); - -// /* update the implicit stage -// [ ] = [ ] + [ ] -// [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ -// N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->sdata, delta_Yi); - -// /* [ ] + [ ] -// [ p_n ] + [ \Delta P_i ] */ -// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); - -// /* evaluate Fe with the current p_n + \Delta P_i */ -// N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ -// retval = sprkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, -// yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); -// if (retval != 0) return(ARK_RHSFUNC_FAIL); - -// /* update the explicit stage -// [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] -// [ ] = [ ] + [ ] */ -// N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, delta_Yi); -// } - -// /* -// Now we compute the step solution via compensated summation. -// [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] -// [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ -// N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); -// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); -// N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); -// N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); - -// *nflagPtr = 0; -// *dsmPtr = 0; - -// return 0; -// } - /*--------------------------------------------------------------- Internal utility routines @@ -905,7 +832,7 @@ booleantype sprkStep_CheckNVector(N_Vector tmpl) } int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector prev_stage, - sunrealtype bi, sunrealtype Bi, N_Vector stage_result) + sunrealtype bi, sunrealtype ai, N_Vector stage_result) { int retval = 0; @@ -914,7 +841,7 @@ int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector p /* evaluate f_1 at the previous stage value */ N_VConst(ZERO, step_mem->f1vec); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f1(step_mem, ark_mem->tcur, prev_stage, step_mem->f1vec, ark_mem->user_data); + retval = sprkStep_f2(step_mem, ark_mem->tcur, prev_stage, step_mem->f1vec, ark_mem->user_data); if (retval != 0) return ARK_RHSFUNC_FAIL; /* update ycur with the q stage */ @@ -922,11 +849,11 @@ int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector p /* evaluate f_2 with the stage value for q */ N_VConst(ZERO, step_mem->f2vec); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tn + Bi*ark_mem->h, stage_result, step_mem->f2vec, ark_mem->user_data); + retval = sprkStep_f1(step_mem, ark_mem->tn + ai*ark_mem->h, stage_result, step_mem->f2vec, ark_mem->user_data); if (retval != 0) return ARK_RHSFUNC_FAIL; /* update ycur with the stage value for p */ - N_VLinearSum(ONE, stage_result, ark_mem->h*Bi, step_mem->f2vec, stage_result); + N_VLinearSum(ONE, stage_result, ark_mem->h*ai, step_mem->f2vec, stage_result); // /* keep track of the stage number */ // step_mem->istage++; @@ -934,20 +861,20 @@ int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector p return ARK_SUCCESS; } -// int sprkStep_TakeStep_McLauchlan4(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +// int sprkStep_TakeStep_McLachlan4(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) // { // int retval; // ARKodeMem ark_mem; // ARKodeSPRKStepMem step_mem; -// struct McLauchlan4Mem* method_mem; +// struct McLachlan4Mem* method_mem; // /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_McLauchlan4", +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_McLachlan4", // &ark_mem, &step_mem); // if (retval != ARK_SUCCESS) return(retval); // step_mem->istage = 0; -// method_mem = (struct McLauchlan4Mem*) self->content; +// method_mem = (struct McLachlan4Mem*) self->content; // retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, // method_mem->b1, method_mem->a1, ark_mem->ycur); @@ -1058,4 +985,86 @@ int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector p // return ARK_SUCCESS; // } +// /* Increment SPRK algorithm with compensated summation */ +// int sprkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +// { +// ARKodeMem ark_mem; +// ARKodeSPRKStepMem step_mem; +// int retval, is; +// N_Vector delta_Yi, yn_plus_delta_Yi; + +// /* access ARKodeSPRKStepMem structure */ +// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", +// &ark_mem, &step_mem); +// if (retval != ARK_SUCCESS) return(retval); +// // if (!ark_mem->fixedstep) { +// // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::SPRKStep", +// // "sprkStep_TakeStep_SPRK", "!!!! This TakeStep only works with fixed steps !!!!"); +// // return(ARK_UNRECOGNIZED_ERROR); +// // } + +// /* other shortcuts */ +// delta_Yi = ark_mem->tempv1; +// yn_plus_delta_Yi = ark_mem->tempv2; + +// /* [ \Delta Q_0 ] = [ 0 ] +// [ \Delta P_0 ] = [ 0 ] */ +// N_VConst(ZERO, delta_Yi); + +// /* loop over internal stages to the step */ +// for (is=0; isstages; is++) { +// /* store current stage index */ +// step_mem->istage = is; + +// /* set current stage time(s) */ +// if (step_mem->implicit) +// ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; +// else +// ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; + +// /* [ q_n ] + [ \Delta Q_i ] +// [ ] + [ ] */ +// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + +// /* evaluate Fi with previous stage increment */ +// N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ +// retval = sprkStep_Fi(step_mem, ark_mem->tcur, yn_plus_delta_Yi, +// step_mem->sdata, ark_mem->user_data); +// if (retval != 0) return(ARK_RHSFUNC_FAIL); + +// /* update the implicit stage +// [ ] = [ ] + [ ] +// [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ +// N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->sdata, delta_Yi); + +// /* [ ] + [ ] +// [ p_n ] + [ \Delta P_i ] */ +// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + +// /* evaluate Fe with the current p_n + \Delta P_i */ +// N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ +// retval = sprkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, +// yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); +// if (retval != 0) return(ARK_RHSFUNC_FAIL); + +// /* update the explicit stage +// [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] +// [ ] = [ ] + [ ] */ +// N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, delta_Yi); +// } + +// /* +// Now we compute the step solution via compensated summation. +// [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] +// [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ +// N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); +// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); +// N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); +// N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); + +// *nflagPtr = 0; +// *dsmPtr = 0; + +// return 0; +// } diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index fbadd3febd..548481a1f9 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -44,6 +44,7 @@ extern "C" { perform an symplectic-partitioned Runge-Kutta time step. ---------------------------------------------------------------*/ typedef struct ARKodeSPRKStepMemRec { + /* SPRK method and storage */ ARKodeSPRKMem method; int q; /* method order */ diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index c0550b3705..1282b9373c 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -226,6 +226,37 @@ int SPRKStepSetDefaults(void* arkode_mem) return(ARK_SUCCESS); } +/*--------------------------------------------------------------- + SPRKStepSetOrder: + + Specifies the SPRK method + + ** Note in documentation that this should not be called along + with SPRKStepSetOrder. + ---------------------------------------------------------------*/ +int SPRKStepSetMethod(void *arkode_mem, ARKODE_SPRKMethodID id) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + sunindextype Blrw, Bliw; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) { return(retval); } + + if (step_mem->method) { + ARKodeSPRKMem_Free(step_mem->method); + step_mem->method = NULL; + } + + step_mem->method = ARKodeSPRKMem_Load(id); + + return(ARK_SUCCESS); +} + + /*--------------------------------------------------------------- SPRKStepSetOrder: @@ -256,6 +287,11 @@ int SPRKStepSetOrder(void *arkode_mem, int ord) step_mem->q = ord; } + if (step_mem->method) { + ARKodeSPRKMem_Free(step_mem->method); + step_mem->method = NULL; + } + // /* clear method specification, since user is requesting a change in method // or a reset to defaults. Spec will be set in ARKInitialSetup. */ // step_mem->stages = 0; From ffe5bd203ef6530a8c474261950de4209e87d241 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 17 Mar 2023 16:39:12 -0700 Subject: [PATCH 027/177] changes in arkode for compensated sums --- src/arkode/arkode.c | 31 ++++++++++++++++++++++++++++--- src/arkode/arkode_impl.h | 2 ++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 9b6f7e9e5b..2783c63d47 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -952,7 +952,10 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, (ark_mem->tcur-tout)*ark_mem->h >= ZERO ) { istate = ARK_SUCCESS; ark_mem->tretlast = *tret = tout; - (void) arkGetDky(ark_mem, tout, 0, yout); + // /* Only use dense output when we tcur is not within 10*eps of tout already.*/ + // if (SUNRCompare(ark_mem->tcur - tout, ZERO)) { + // (void) arkGetDky(ark_mem, tout, 0, yout); + // } ark_mem->next_h = ark_mem->hprime; break; } @@ -961,8 +964,11 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR*ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); - if ( SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { - (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); + if (SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { + // /* Only use dense output when we tcur is not within 10*eps of tstop already.*/ + // if (SUNRCompare(ark_mem->tcur - ark_mem->tstop, ZERO)) { + // (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); + // } ark_mem->tretlast = *tret = ark_mem->tstop; ark_mem->tstopset = SUNFALSE; istate = ARK_TSTOP_RETURN; @@ -970,6 +976,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, } /* limit upcoming step if it will overcome tstop */ if ( (ark_mem->tcur + ark_mem->hprime - ark_mem->tstop)*ark_mem->h > ZERO ) { + // printf(">>> hprime = %g\n", ark_mem->hprime); ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE-FOUR*ark_mem->uround); ark_mem->eta = ark_mem->hprime/ark_mem->h; @@ -1657,6 +1664,10 @@ booleantype arkAllocVectors(ARKodeMem ark_mem, N_Vector tmpl) if (!arkAllocVec(ark_mem, tmpl, &ark_mem->yn)) return(SUNFALSE); + /* Allocate yerr if needed */ + if (!arkAllocVec(ark_mem, tmpl, &ark_mem->yerr)) + return(SUNFALSE); + /* Allocate fn if needed */ if (!arkAllocVec(ark_mem, tmpl, &ark_mem->fn)) return(SUNFALSE); @@ -1881,6 +1892,9 @@ int arkInitialSetup(ARKodeMem ark_mem, realtype tout) } } + /* Zero yerr for compensated summation */ + N_VConst(ZERO, ark_mem->yerr); + /* If necessary, temporarily set h as it is used to compute the tolerance in a potential mass matrix solve when computing the full rhs */ if (ark_mem->h == ZERO) ark_mem->h = ONE; @@ -2333,6 +2347,15 @@ int arkYddNorm(ARKodeMem ark_mem, realtype hg, realtype *yddnrm) return(ARK_SUCCESS); } +inline static +void compensatedSum(sunrealtype base, sunrealtype inc, sunrealtype *sum, sunrealtype *error) +{ + sunrealtype err = *error; + volatile sunrealtype tmp1 = inc - err; + volatile sunrealtype tmp2 = base + tmp1; + *error = (tmp2 - base) - tmp1; + *sum = tmp2; +} /*--------------------------------------------------------------- arkCompleteStep @@ -2351,11 +2374,13 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) int retval, mode; realtype troundoff; + /* Set current time to the end of the step (in case the last stage time does not coincide with the step solution time). If tstop is enabled, it is possible for tn + h to be past tstop by roundoff, and in that case, we reset tn (after incrementing by h) to tstop. */ + // compensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); /* TODO(CJB): I am guessing we would want this to be optional, but perhaps performance comparisons should be done (with small problems). */ ark_mem->tcur = ark_mem->tn + ark_mem->h; if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR * ark_mem->uround * diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index f099af8444..82fed13c41 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -324,6 +324,7 @@ typedef struct ARKodeMemRec { as evolving solution by the timestepper modules */ N_Vector yn; /* solution from the last successful step */ N_Vector fn; /* full IVP right-hand side from last step */ + N_Vector yerr; /* error vector for compensated summation */ N_Vector tempv1; /* temporary storage vectors (for local use and by */ N_Vector tempv2; /* time-stepping modules) */ N_Vector tempv3; @@ -385,6 +386,7 @@ typedef struct ARKodeMemRec { /* Saved Values */ realtype h0u; /* actual initial stepsize */ realtype tn; /* time of last successful step */ + realtype terr; /* error in tn for compensated sums */ realtype hold; /* last successful h value used */ realtype tolsf; /* tolerance scale factor (suggestion to user) */ booleantype VabstolMallocDone; From 81467176ea182b18e32c31253d871696868e34b2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 17 Mar 2023 17:12:55 -0700 Subject: [PATCH 028/177] redo incremental formulation --- examples/arkode/C_serial/CMakeLists.txt | 1 + examples/arkode/C_serial/ark_kepler.c | 81 +-- .../C_serial/ark_kepler_plot_order_work.py | 165 ++++++ .../C_serial/ark_kepler_test_all_methods.c | 560 ++++++++++++++++++ include/arkode/arkode_sprkstep.h | 1 + src/arkode/arkode_sprkstep.c | 326 +++------- src/arkode/arkode_sprkstep_impl.h | 6 +- src/arkode/arkode_sprkstep_io.c | 43 +- 8 files changed, 863 insertions(+), 320 deletions(-) create mode 100755 examples/arkode/C_serial/ark_kepler_plot_order_work.py create mode 100644 examples/arkode/C_serial/ark_kepler_test_all_methods.c diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index e47d3a3ae5..6ac63396ee 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -40,6 +40,7 @@ set(ARKODE_examples "ark_reaction_diffusion_mri\;\;develop" "ark_brusselator_1D_mri\;\;develop" "ark_kepler\;\;develop" + "ark_kepler_test_all_methods\;\;develop" "ark_kpr_mri\;\;develop" "ark_kpr_mri\;0 0.002\;develop" "ark_kpr_mri\;1 0.002\;develop" diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index d0c0e45f21..6d5d72f2ee 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -147,62 +147,11 @@ int main(int argc, char* argv[]) if (method == 0) { arkode_mem = SPRKStepCreate(dpdt, dqdt, T0, y, sunctx); - switch (order) { - case 1: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_EULER_1); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 2: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_LEAPFROG_2); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 22: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 222: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_2); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 3: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_RUTH_3); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 33: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_3); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 4: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_CANDY_ROZMUS_4); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 44: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_4); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 5: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_5); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 6: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_YOSHIDA_6); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 8: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_8); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 10: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_SOFRONIOU_10); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - default: - fprintf(stderr, "Not a valid method\n"); - return 1; - } + retval = SPRKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; - // retval = SPRKStepSetOrder(arkode_mem, order); - // if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; + retval = SPRKStepSetUseCompSums(arkode_mem, 1); + if (check_retval(&retval, "SPRKStepSetUseCompSums", 1)) return 1; if (step_mode == 0) { retval = SPRKStepSetFixedStep(arkode_mem, dt); @@ -227,7 +176,6 @@ int main(int argc, char* argv[]) retval = SPRKStepSetUserData(arkode_mem, (void *) udata); if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; } else if (method >= 1) { - fprintf(stderr, ">>>>> ARKStepCreate\n"); if (method == 1) { arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); @@ -252,7 +200,7 @@ int main(int argc, char* argv[]) if (step_mode == 0) { retval = ARKStepSetFixedStep(arkode_mem, dt); } else { - retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-8), SUN_RCONST(10e-12)); + retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } } @@ -262,10 +210,7 @@ int main(int argc, char* argv[]) const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; - const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; - // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; - // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; - // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; + // const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; char fname[64]; sprintf(fname, fmt1, order); conserved_fp = fopen(fname, "w+"); @@ -273,13 +218,13 @@ int main(int argc, char* argv[]) solution_fp = fopen(fname, "w+"); sprintf(fname, fmt3, order); times_fp = fopen(fname, "w+"); - sprintf(fname, fmt4, order); - udata->hhist_fp = fopen(fname, "w+"); + // sprintf(fname, fmt4, order); + // udata->hhist_fp = fopen(fname, "w+"); } else { const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; const char* fmt3 = "ark_kepler_times_erk-%d.txt"; - const char* fmt4 = "ark_kepler_hhist_erk-%d.txt"; + // const char* fmt4 = "ark_kepler_hhist_erk-%d.txt"; char fname[64]; sprintf(fname, fmt1, order); conserved_fp = fopen(fname, "w+"); @@ -287,8 +232,8 @@ int main(int argc, char* argv[]) solution_fp = fopen(fname, "w+"); sprintf(fname, fmt3, order); times_fp = fopen(fname, "w+"); - sprintf(fname, fmt4, order); - udata->hhist_fp = fopen(fname, "w+"); + // sprintf(fname, fmt4, order); + // udata->hhist_fp = fopen(fname, "w+"); } printf("\n Begin Kepler Problem\n\n"); @@ -368,7 +313,7 @@ int main(int argc, char* argv[]) } } - fclose(udata->hhist_fp); + // fclose(udata->hhist_fp); free(udata); fclose(times_fp); fclose(conserved_fp); @@ -508,7 +453,7 @@ int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, { UserData udata = (UserData) user_data; - fprintf(udata->hhist_fp, "%.16f\n", h1); + // fprintf(udata->hhist_fp, "%.16f\n", h1); const sunrealtype G_np1 = G(y, udata->alpha); udata->rho_np1 = udata->rho_nphalf + udata->eps*G_np1/SUN_RCONST(2.0); diff --git a/examples/arkode/C_serial/ark_kepler_plot_order_work.py b/examples/arkode/C_serial/ark_kepler_plot_order_work.py new file mode 100755 index 0000000000..c30e69f0eb --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_plot_order_work.py @@ -0,0 +1,165 @@ +#!/usr/bin/env python + +import numpy as np +import matplotlib.pyplot as plt + +def load_results(case): + t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) + y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) + y = np.reshape(y, (y.shape[0]//4, 4)) + conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) + return t, y, conserved + +sprk1 = [] # Euler +sprk2 = [] # Leapforg +sprk22 = [] # Pseudo Leapfrog +sprk222 = [] # McLachlan 2nd order +sprk3 = [] # Ruth 3rd order +sprk33 = [] # McLachlan 3rd order +sprk4 = [] # Candy Rozmus 4th order +sprk44 = [] # McLachlan 4th order +sprk5 = [] # McLachlan 5th order +sprk6 = [] # Yoshida 6th order +sprk8 = [] # McLachlan 8th order +sprk10 = [] # Sofroniou 10th order + +step_sizes = [0.000010, 0.000100, 0.001000, 0.010000, 0.100000] +for dt in step_sizes: + sprk1.append({ + 'method': 'Symplectic Euler', + 'order': 1, + 'data': load_results('_sprk-1-dt-%.6f' % dt), + 'dt': dt + }) + sprk2.append({ + 'method': 'Leapfrog', + 'order': 2, + 'data': load_results('_sprk-2-dt-%.6f' % dt), + 'dt': dt + }) + sprk22.append({ + 'method': 'Pseudo Leapfrog', + 'order': 2, + 'data': load_results('_sprk-22-dt-%.6f' % dt), + 'dt': dt + }) + sprk222.append({ + 'method': 'McLachlan2', + 'order': 2, + 'data': load_results('_sprk-222-dt-%.6f' % dt), + 'dt': dt + }) + sprk3.append({ + 'method': 'Ruth3', + 'order': 3, + 'data': load_results('_sprk-3-dt-%.6f' % dt), + 'dt': dt + }) + sprk33.append({ + 'method': 'McLachlan3', + 'order': 3, + 'data': load_results('_sprk-33-dt-%.6f' % dt), + 'dt': dt + }) + sprk4.append({ + 'method': 'CandyRozmus4', + 'order': 4, + 'data': load_results('_sprk-4-dt-%.6f' % dt), + 'dt': dt + }) + sprk44.append({ + 'method': 'McLachlan4', + 'order': 4, + 'data': load_results('_sprk-44-dt-%.6f' % dt), + 'dt': dt + }) + sprk5.append({ + 'method': 'McLachlan5', + 'order': 5, + 'data': load_results('_sprk-5-dt-%.6f' % dt), + 'dt': dt + }) + sprk6.append({ + 'method': 'Yoshida6', + 'order': 6, + 'data': load_results('_sprk-6-dt-%.6f' % dt), + 'dt': dt + }) + sprk8.append({ + 'method': 'McLachlan8', + 'order': 8, + 'data': load_results('_sprk-8-dt-%.6f' % dt), + 'dt': dt + }) + sprk10.append({ + 'method': 'Sofroniou10', + 'order': 10, + 'data': load_results('_sprk-10-dt-%.6f' % dt), + 'dt': dt + }) + +all_methods = {} +all_methods[1] = [] +all_methods[1].append(sprk1) +all_methods[2] = [] +all_methods[2].append(sprk2) +all_methods[2].append(sprk22) +all_methods[2].append(sprk222) +all_methods[3] = [] +all_methods[3].append(sprk3) +all_methods[3].append(sprk33) +all_methods[4] = [] +all_methods[4].append(sprk4) +all_methods[4].append(sprk44) +all_methods[5] = [] +all_methods[5].append(sprk5) +all_methods[6] = [] +all_methods[6].append(sprk6) +all_methods[8] = [] +all_methods[8].append(sprk8) +all_methods[10] = [] +all_methods[10].append(sprk10) + +# Reference +reference = load_results('_erk-8') + +# energy = [] +# energy_0 = [] +# for _, sol, consv in all_methods: +# energy.append(consv[:,0]) +# energy_0.append(consv[0,0]) +# energy = np.array(energy) +# energy_0 = np.array(energy_0) +# energy_diff = np.abs(energy.T - energy_0) + +# +# Solution error plot +# +orders = [1, 2, 3, 4, 5, 6, 8, 10] +# orders = [4] +for order in orders: + plt.figure(dpi=200) + legend = [] + legend.append('$O(h^{%d})$' % order) + order_line = np.power(step_sizes, order) + plt.plot(np.array(step_sizes), np.array(order_line).T, 'k--') + _, y_ref, _ = reference + for method in all_methods[order]: + errs = [] + for d in method: + _, y, _ = d['data'] + err = np.linalg.norm(y - y_ref, np.inf) / np.linalg.norm(y_ref, np.inf) + print('method: %s, dt = %s' % (d['method'], d['dt'])) + print(np.max(y)) + # print(y_ref) + errs.append(err) + legend.append(method[0]['method']) + plt.plot(step_sizes, errs) + plt.xscale('log') + plt.yscale('log') + plt.xlabel('h') + plt.ylabel('error') + plt.title('Order plot for $O(h^{%d})$ methods' % order) + plt.legend(legend) + plt.savefig('ark_kepler_order%d.png' % order) + plt.close() diff --git a/examples/arkode/C_serial/ark_kepler_test_all_methods.c b/examples/arkode/C_serial/ark_kepler_test_all_methods.c new file mode 100644 index 0000000000..0c8462ad8f --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_test_all_methods.c @@ -0,0 +1,560 @@ +/* ---------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ---------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ---------------------------------------------------------------- + * We consider the perturbed Kepler problem + * dq/dt = [ p1 ] + * [ p2 ] + * dp/dt = [ -q1 / (q1^2 + q2^2)^(3/2) - delta*q1 / (q1^2 + q2^2)^(5/2) ] + * = [ -q2 / (q1^2 + q2^2)^(3/2) - delta*q2 / (q1^2 + q2^2)^(5/2) ] + * (delta = 0.015) with the initial conditions + * q(0) = [ 1 - e ], p(0) = [ 0 ] + * [ 0 ] [ sqrt((1+e)/(1-e)) ] + * where e = 0.6 is the eccentricity. + * + * The Hamiltonian for the system, + * H(p,q) = 1/2 * (p1^2 + p2^2) - 1/sqrt(q1^2 + q2^2) + * - 1/200 / (2 * sqrt(q1^2 + q2^2)^3)) + * is conserved as well as the angular momentum, + * L(p,q) = q1*p2 - q2*p1. + * + * We solve the problem by letting y = [ q, p ]^T then using + * ARKStep. + * + * References: + * Ernst Hairer, Christain Lubich, Gerhard Wanner + * Geometric Numerical Integration: Structure-Preserving + * Algorithms for Ordinary Differential Equations + * Springer, 2006, + * ISSN 0179-3632 + * ----------------------------------------------------------------*/ + +#include +#include +#include /* prototypes for MRIStep fcts., consts */ +#include /* prototypes for ARKStep fcts., consts */ +#include /* serial N_Vector type, fcts., macros */ +#include /* def. math fcns, 'sunrealtype' */ +#include "sundials/sundials_nonlinearsolver.h" +#include "sundials/sundials_nvector.h" +#include "sundials/sundials_types.h" +#include "sunnonlinsol/sunnonlinsol_fixedpoint.h" + +static int check_retval(void *returnvalue, const char *funcname, int opt); + +static void InitialConditions(N_Vector y0, sunrealtype ecc); +static sunrealtype Hamiltonian(N_Vector y); +static sunrealtype AngularMomentum(N_Vector y); + +static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); +static int dqdt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); +static int dpdt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); + +static sunrealtype Q(N_Vector yvec, sunrealtype alpha); +static sunrealtype G(N_Vector yvec, sunrealtype alpha); +static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, + sunrealtype h3, sunrealtype e1, sunrealtype e2, + sunrealtype e3, int q, int p, sunrealtype *hnew, + void *user_data); + +typedef struct { + sunrealtype ecc; + sunrealtype delta; + + /* for time-step control */ + sunrealtype eps; + sunrealtype alpha; + sunrealtype rho_nmhalf; + sunrealtype rho_nphalf; + sunrealtype rho_n; + sunrealtype rho_np1; + + FILE *hhist_fp; +} *UserData; + +int main(int argc, char* argv[]) +{ + SUNContext sunctx; + N_Vector y; + SUNNonlinearSolver NLS; + UserData udata; + sunrealtype tout, tret; + sunrealtype H0, L0; + void* arkode_mem; + FILE *conserved_fp, *solution_fp, *times_fp; + int argi, iout, retval; + + NLS = NULL; + y = NULL; + + /* Default problem parameters */ + const sunrealtype T0 = SUN_RCONST(0.0); + sunrealtype Tf = SUN_RCONST(1000.0); + const sunrealtype ecc = SUN_RCONST(0.6); + // const sunrealtype delta = SUN_RCONST(0.015); // perturbed + const sunrealtype delta = SUN_RCONST(0.0); // unperturbed + + /* Default integrator Options */ + int step_mode = 0; + int method = 0; + sunrealtype dt = SUN_RCONST(1e-2); + const sunrealtype dTout = SUN_RCONST(dt); + // const sunrealtype dTout = SUN_RCONST(100.0); + const int num_output_times = (int) ceil(Tf/dTout); + + /* Parse CLI args */ + argi = 0; + if (argc > 1) { + step_mode = atoi(argv[++argi]); + } + if (argc > 2) { + method = atoi(argv[++argi]); + } + if (argc > 3) { + dt = atof(argv[++argi]); + } + + /* Create the SUNDIALS context object for this simulation */ + retval = SUNContext_Create(NULL, &sunctx); + if (check_retval(&retval, "SUNContext_Create", 1)) return 1; + + const int num_orders = 12; + int orders[num_orders] = { 1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10 }; + + for (int test_idx = 0; test_idx < num_orders; test_idx++) { + int order = orders[test_idx]; + + /* Allocate our state vector */ + y = N_VNew_Serial(4, sunctx); + + /* Allocate and fill udata structure */ + udata = (UserData) malloc(sizeof(*udata)); + udata->ecc = ecc; + udata->delta = delta; + udata->alpha = SUN_RCONST(3.0)/SUN_RCONST(2.0); + udata->eps = dt; + udata->rho_n = SUN_RCONST(1.0); + + /* Fill the initial conditions */ + InitialConditions(y, ecc); + Tf = SUN_RCONST(1000.0); + + /* Create SPRKStep integrator where we treat dqdt explicitly and dpdt implicitly */ + if (method == 0) { + arkode_mem = SPRKStepCreate(dpdt, dqdt, T0, y, sunctx); + + switch (order) { + case 1: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_EULER_1); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 2: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_LEAPFROG_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 22: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 222: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 3: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_RUTH_3); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 33: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_3); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 4: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_CANDY_ROZMUS_4); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 44: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_4); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 5: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_5); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 6: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_YOSHIDA_6); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 8: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_8); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 10: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_SOFRONIOU_10); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + default: + fprintf(stderr, "Not a valid method\n"); + return 1; + } + + if (step_mode == 0) { + retval = SPRKStepSetFixedStep(arkode_mem, dt); + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + + retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + } else { + /* Adaptivity based on [Hairer and Soderlind, 2005] */ + retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + + udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); + udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); + retval = SPRKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); + if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; + + retval = SPRKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + } + + retval = SPRKStepSetUserData(arkode_mem, (void *) udata); + if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; + } else if (method >= 1) { + if (method == 1) { + arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); + + retval = ARKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + } else { + arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); + + retval = ARKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; + + NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); + ARKStepSetNonlinearSolver(arkode_mem, NLS); + } + + retval = ARKStepSetUserData(arkode_mem, (void *) udata); + if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; + + retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); + if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; + + if (step_mode == 0) { + retval = ARKStepSetFixedStep(arkode_mem, dt); + } else { + retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); + if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; + } + } + + /* Open output files */ + if (method == 0) { + const char* fmt1 = "ark_kepler_conserved_sprk-%d-dt-%.6f.txt"; + const char* fmt2 = "ark_kepler_solution_sprk-%d-dt-%.6f.txt"; + const char* fmt3 = "ark_kepler_times_sprk-%d-dt-%.6f.txt"; + // const char* fmt4 = "ark_kepler_hhist_sprk-%d-dt-%.6f.txt"; + // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; + // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; + // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; + char fname[64]; + sprintf(fname, fmt1, order, dt); + conserved_fp = fopen(fname, "w+"); + sprintf(fname, fmt2, order, dt); + solution_fp = fopen(fname, "w+"); + sprintf(fname, fmt3, order, dt); + times_fp = fopen(fname, "w+"); + // sprintf(fname, fmt4, order, dt); + // udata->hhist_fp = fopen(fname, "w+"); + } else { + const char* fmt1 = "ark_kepler_conserved_erk-%d-dt-%.6f.txt"; + const char* fmt2 = "ark_kepler_solution_erk-%d-dt-%.6f.txt"; + const char* fmt3 = "ark_kepler_times_erk-%d-dt-%.6f.txt"; + // const char* fmt4 = "ark_kepler_hhist_erk-%d-dt-%.6f.txt"; + char fname[64]; + sprintf(fname, fmt1, order, dt); + conserved_fp = fopen(fname, "w+"); + sprintf(fname, fmt2, order, dt); + solution_fp = fopen(fname, "w+"); + sprintf(fname, fmt3, order, dt); + times_fp = fopen(fname, "w+"); + // sprintf(fname, fmt4, order, dt); + // udata->hhist_fp = fopen(fname, "w+"); + } + + printf("\n Begin Kepler Problem\n\n"); + printf(" order: %d\n", order); + + /* Print out starting energy, momentum before integrating */ + tret = T0; + tout = T0+dTout; + H0 = Hamiltonian(y); + L0 = AngularMomentum(y); + fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f\n", tret, H0, L0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); + N_VPrintFile(y, solution_fp); + + /* Do integration */ + if (method == 0) { + for (iout = 0; iout < num_output_times; iout++) { + // SPRKStepSetStopTime(arkode_mem, tout); + + retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + + /* Output current integration status */ + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", + tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); + + /* Check if the solve was successful, if so, update the time and continue */ + if (retval >= 0) { + tout += dTout; + tout = (tout > Tf) ? Tf : tout; + } else { + fprintf(stderr, "Solver failure, stopping integration\n"); + break; + } + } + } else { + for (iout = 0; iout < num_output_times; iout++) { + ARKStepSetStopTime(arkode_mem, tout); + if (step_mode == 3) { + while(tret < tout) { + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (retval < 0) break; + + /* Output current integration status */ + // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + // Q(y, udata->alpha)/udata->rho_np1-Q0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); + } + } else { + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + + /* Output current integration status */ + // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, + // Q(y, udata->alpha)/udata->rho_np1-Q0); + fprintf(times_fp, "%.16f\n", tret); + fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + N_VPrintFile(y, solution_fp); + } + + /* Check if the solve was successful, if so, update the time and continue */ + if (retval >= 0) { + tout += dTout; + tout = (tout > Tf) ? Tf : tout; + } else { + fprintf(stderr, "Solver failure, stopping integration\n"); + break; + } + } + } + + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", + tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); + + // fclose(udata->hhist_fp); + free(udata); + fclose(times_fp); + fclose(conserved_fp); + fclose(solution_fp); + if (NLS) { + SUNNonlinSolFree(NLS); + } + N_VDestroy(y); + if (method == 0) { + // SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + SPRKStepFree(&arkode_mem); + } else { + ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + ARKStepFree(&arkode_mem); + } + } + + SUNContext_Free(&sunctx); + + return 0; +} + +void InitialConditions(N_Vector y0vec, sunrealtype ecc) +{ + const sunrealtype zero = SUN_RCONST(0.0); + const sunrealtype one = SUN_RCONST(1.0); + sunrealtype* y0 = N_VGetArrayPointer(y0vec); + + y0[0] = one - ecc; + y0[1] = zero; + y0[2] = zero; + y0[3] = SUNRsqrt((one + ecc)/(one - ecc)); +} + +sunrealtype Hamiltonian(N_Vector yvec) +{ + sunrealtype H = 0.0; + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype sqrt_qTq = SUNRsqrt(y[0]*y[0] + y[1]*y[1]); + const sunrealtype pTp = y[2]*y[2] + y[3]*y[3]; + + // Perturbed + // H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq + // - SUN_RCONST(0.005) / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) / SUN_RCONST(2.0); + + // Unperturbed + H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq; + + return H; +} + +sunrealtype AngularMomentum(N_Vector yvec) +{ + sunrealtype L = 0.0; + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + const sunrealtype p1 = y[2]; + const sunrealtype p2 = y[3]; + + L = q1*p2 - q2*p1; + + return L; +} + +int dydt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + int retval = 0; + + retval += dpdt(t, yvec, ydotvec, user_data); + retval += dqdt(t, yvec, ydotvec, user_data); + + return retval; +} + +int dqdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype p1 = y[2]; + const sunrealtype p2 = y[3]; + + ydot[0] = p1; + ydot[1] = p2; + // ydot[2] = ydot[3] = SUN_RCONST(0.0); + + return 0; +} + +int dpdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + UserData udata = (UserData) user_data; + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype delta = udata->delta; + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + const sunrealtype sqrt_qTq = SUNRsqrt(q1*q1 + q2*q2); + + // ydot[0] = ydot[1] = SUN_RCONST(0.0); + ydot[2] = - q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) + - delta * q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(5.0)); + ydot[3] = - q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) + - delta * q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(5.0)); + + return 0; +} + +sunrealtype G(N_Vector yvec, sunrealtype alpha) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + const sunrealtype p1 = y[2]; + const sunrealtype p2 = y[3]; + + const sunrealtype pTq = p1*q1 + p2*q2; + const sunrealtype qTq = q1*q1 + q2*q2; + + return (-alpha * pTq / qTq); +} + +sunrealtype Q(N_Vector yvec, sunrealtype alpha) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + + const sunrealtype qTq = q1*q1 + q2*q2; + + return SUNRpowerR(qTq, -alpha/SUN_RCONST(2.0)); +} + +int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, + sunrealtype h3, sunrealtype e1, sunrealtype e2, + sunrealtype e3, int q, int p, sunrealtype *hnew, + void *user_data) +{ + UserData udata = (UserData) user_data; + + // fprintf(udata->hhist_fp, "%.16f\n", h1); + + const sunrealtype G_np1 = G(y, udata->alpha); + udata->rho_np1 = udata->rho_nphalf + udata->eps*G_np1/SUN_RCONST(2.0); + + udata->rho_nmhalf = udata->rho_nphalf; + const sunrealtype rho_nphalf_next = udata->rho_nmhalf + udata->eps*G_np1; + + *hnew = udata->eps/rho_nphalf_next; + + return 0; +} + +/* Check function return value... + opt == 0 means SUNDIALS function allocates memory so check if + returned NULL pointer + opt == 1 means SUNDIALS function returns a retval so check if + retval < 0 + opt == 2 means function allocates memory so check if returned + NULL pointer +*/ +int check_retval(void *returnvalue, const char *funcname, int opt) +{ + int *retval; + + /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ + if (opt == 0 && returnvalue == NULL) { + fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; } + + /* Check if retval < 0 */ + else if (opt == 1) { + retval = (int *) returnvalue; + if (*retval < 0) { + fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed with retval = %d\n\n", + funcname, *retval); + return 1; }} + + /* Check if function returned NULL pointer - no memory allocated */ + else if (opt == 2 && returnvalue == NULL) { + fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; } + + return 0; +} diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 6e3b9b8c62..177d2ca25d 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -85,6 +85,7 @@ SUNDIALS_EXPORT int SPRKStepResFtolerance(void *arkode_mem, /* Optional input functions -- must be called AFTER SPRKStepCreate */ SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetOptimalParams(void *arkode_mem); +SUNDIALS_EXPORT int SPRKStepSetUseCompSums(void *arkode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int SPRKStepSetMethod(void *arkode_mem, ARKODE_SPRKMethodID id); SUNDIALS_EXPORT int SPRKStepSetOrder(void *arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void *arkode_mem, int itype); diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index e969a1a6c2..2f3f8f27e1 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -94,16 +94,11 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont memset(step_mem, 0, sizeof(struct ARKodeSPRKStepMemRec)); /* Allocate vectors in stepper mem */ - if (!arkAllocVec(ark_mem, y0, &(step_mem->f1vec))) { + if (!arkAllocVec(ark_mem, y0, &(step_mem->sdata))) { SPRKStepFree((void**) &ark_mem); return(NULL); } - if (!arkAllocVec(ark_mem, y0, &(step_mem->f2vec))) { - SPRKStepFree((void**) &ark_mem); - return(NULL); - } - /* Attach step_mem structure and function pointers to ark_mem */ ark_mem->step_attachlinsol = NULL; ark_mem->step_attachmasssol = NULL; @@ -139,6 +134,7 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont /* Initialize the counters */ step_mem->nf1 = 0; step_mem->nf2 = 0; + step_mem->istage = 0; // /* Initialize external polynomial forcing data */ // step_mem->expforcing = SUNFALSE; @@ -249,6 +245,7 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Ve /* Initialize the counters */ step_mem->nf1 = 0; step_mem->nf2 = 0; + step_mem->istage = 0; return(ARK_SUCCESS); } @@ -376,14 +373,9 @@ void SPRKStepFree(void **arkode_mem) if (ark_mem->step_mem != NULL) { step_mem = (ARKodeSPRKStepMem) ark_mem->step_mem; - if (step_mem->f1vec != NULL) { - arkFreeVec(ark_mem, &step_mem->f1vec); - step_mem->f1vec = NULL; - } - - if (step_mem->f2vec != NULL) { - arkFreeVec(ark_mem, &step_mem->f2vec); - step_mem->f2vec = NULL; + if (step_mem->sdata != NULL) { + arkFreeVec(ark_mem, &step_mem->sdata); + step_mem->sdata = NULL; } ARKodeSPRKMem_Free(step_mem->method); @@ -475,11 +467,6 @@ int sprkStep_Init(void* arkode_mem, int init_type) } - /* set appropriate TakeStep routine based on problem configuration */ - /* (only one choice for now) */ - ark_mem->step = sprkStep_TakeStep; - // ark_mem->step = sprkStep_TakeStep_SPRKInc; - return(ARK_SUCCESS); } @@ -781,6 +768,83 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return ARK_SUCCESS; } +/* Increment SPRK algorithm with compensated summation */ +int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + ARKodeSPRKMem method; + int retval, is; + N_Vector delta_Yi, yn_plus_delta_Yi; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + method = step_mem->method; + + /* other shortcuts */ + delta_Yi = ark_mem->tempv1; + yn_plus_delta_Yi = ark_mem->tempv2; + + /* [ \Delta Q_0 ] = [ 0 ] + [ \Delta P_0 ] = [ 0 ] */ + N_VConst(ZERO, delta_Yi); + + /* loop over internal stages to the step */ + for (is=0; is < method->stages; is++) { + /* store current stage index */ + step_mem->istage = is; + + /* set current stage time(s) */ + ark_mem->tcur = ark_mem->tn + method->b[is]*ark_mem->h; + + /* [ q_n ] + [ \Delta Q_i ] + [ ] + [ ] */ + N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + + /* evaluate Fi with previous stage increment */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_f1(step_mem, ark_mem->tcur, yn_plus_delta_Yi, + step_mem->sdata, ark_mem->user_data); + if (retval != 0) return(ARK_RHSFUNC_FAIL); + + /* update the implicit stage + [ ] = [ ] + [ ] + [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ + N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->b[is], step_mem->sdata, delta_Yi); + + /* [ ] + [ ] + [ p_n ] + [ \Delta P_i ] */ + N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + + /* evaluate Fe with the current p_n + \Delta P_i */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_f2(step_mem, ark_mem->tn + method->a[is]*ark_mem->h, + yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); + if (retval != 0) return(ARK_RHSFUNC_FAIL); + + /* update the explicit stage + [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] + [ ] = [ ] + [ ] */ + N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->a[is], step_mem->sdata, delta_Yi); + } + + /* + Now we compute the step solution via compensated summation. + [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] + [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ + N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); + N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); + N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); + N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); + + *nflagPtr = 0; + *dsmPtr = 0; + + return 0; +} /*--------------------------------------------------------------- Internal utility routines @@ -840,231 +904,23 @@ int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector p ark_mem->tcur = ark_mem->tn + bi*ark_mem->h; /* evaluate f_1 at the previous stage value */ - N_VConst(ZERO, step_mem->f1vec); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tcur, prev_stage, step_mem->f1vec, ark_mem->user_data); + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_f2(step_mem, ark_mem->tcur, prev_stage, step_mem->sdata, ark_mem->user_data); if (retval != 0) return ARK_RHSFUNC_FAIL; /* update ycur with the q stage */ - N_VLinearSum(ONE, prev_stage, ark_mem->h*bi, step_mem->f1vec, stage_result); + N_VLinearSum(ONE, prev_stage, ark_mem->h*bi, step_mem->sdata, stage_result); /* evaluate f_2 with the stage value for q */ - N_VConst(ZERO, step_mem->f2vec); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f1(step_mem, ark_mem->tn + ai*ark_mem->h, stage_result, step_mem->f2vec, ark_mem->user_data); + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_f1(step_mem, ark_mem->tn + ai*ark_mem->h, stage_result, step_mem->sdata, ark_mem->user_data); if (retval != 0) return ARK_RHSFUNC_FAIL; /* update ycur with the stage value for p */ - N_VLinearSum(ONE, stage_result, ark_mem->h*ai, step_mem->f2vec, stage_result); + N_VLinearSum(ONE, stage_result, ark_mem->h*ai, step_mem->sdata, stage_result); - // /* keep track of the stage number */ - // step_mem->istage++; + /* keep track of the stage number */ + step_mem->istage++; return ARK_SUCCESS; } - -// int sprkStep_TakeStep_McLachlan4(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -// { -// int retval; -// ARKodeMem ark_mem; -// ARKodeSPRKStepMem step_mem; -// struct McLachlan4Mem* method_mem; - -// /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_McLachlan4", -// &ark_mem, &step_mem); -// if (retval != ARK_SUCCESS) return(retval); - -// step_mem->istage = 0; -// method_mem = (struct McLachlan4Mem*) self->content; - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, -// method_mem->b1, method_mem->a1, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, -// method_mem->b2, method_mem->a2, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, -// method_mem->b3, method_mem->a3, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, method_mem->b4, -// method_mem->a4, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// *nflagPtr = 0; -// *dsmPtr = 0; - -// return ARK_SUCCESS; -// } - -// int sprkStep_TakeStep_Ruth3(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -// { -// int retval; -// ARKodeMem ark_mem; -// ARKodeSPRKStepMem step_mem; -// struct Ruth3Mem* method_mem; - -// /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_Ruth3", -// &ark_mem, &step_mem); -// if (retval != ARK_SUCCESS) return(retval); - -// step_mem->istage = 0; -// method_mem = (struct Ruth3Mem*) self->content; - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, -// method_mem->b1, method_mem->a1, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, -// method_mem->b2, method_mem->a2, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, -// method_mem->b3, method_mem->a3, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// *nflagPtr = 0; -// *dsmPtr = 0; - -// return ARK_SUCCESS; -// } - -// int sprkStep_TakeStep_PseudoLeapfrog(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -// { -// int retval; -// ARKodeMem ark_mem; -// ARKodeSPRKStepMem step_mem; -// struct Ruth3Mem* method_mem; - -// /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_PseudoLeapfrog", -// &ark_mem, &step_mem); -// if (retval != ARK_SUCCESS) return(retval); - -// step_mem->istage = 0; -// method_mem = (struct Ruth3Mem*) self->content; - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, -// method_mem->b1, method_mem->a1, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->ycur, method_mem->Fk, -// method_mem->b2, method_mem->a2, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// *nflagPtr = 0; -// *dsmPtr = 0; - -// return ARK_SUCCESS; -// } - -// int sprkStep_TakeStep_SymplecticEuler(TakeStep self, void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -// { -// int retval; -// ARKodeMem ark_mem; -// ARKodeSPRKStepMem step_mem; -// struct SymplecticEulerMem* method_mem; - -// /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SymplecticEuler", -// &ark_mem, &step_mem); -// if (retval != ARK_SUCCESS) return(retval); - -// step_mem->istage = 0; -// method_mem = (struct SymplecticEulerMem*) self->content; - -// retval = sprkStep_SPRKStage(ark_mem, step_mem, ark_mem->yn, method_mem->Fk, -// method_mem->b1, method_mem->a1, ark_mem->ycur); -// if (retval != ARK_SUCCESS) return(retval); - -// *nflagPtr = 0; -// *dsmPtr = 0; - -// return ARK_SUCCESS; -// } - -// /* Increment SPRK algorithm with compensated summation */ -// int sprkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) -// { -// ARKodeMem ark_mem; -// ARKodeSPRKStepMem step_mem; -// int retval, is; -// N_Vector delta_Yi, yn_plus_delta_Yi; - -// /* access ARKodeSPRKStepMem structure */ -// retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", -// &ark_mem, &step_mem); -// if (retval != ARK_SUCCESS) return(retval); - -// // if (!ark_mem->fixedstep) { -// // arkProcessError(NULL, ARK_UNRECOGNIZED_ERROR, "ARKODE::SPRKStep", -// // "sprkStep_TakeStep_SPRK", "!!!! This TakeStep only works with fixed steps !!!!"); -// // return(ARK_UNRECOGNIZED_ERROR); -// // } - -// /* other shortcuts */ -// delta_Yi = ark_mem->tempv1; -// yn_plus_delta_Yi = ark_mem->tempv2; - -// /* [ \Delta Q_0 ] = [ 0 ] -// [ \Delta P_0 ] = [ 0 ] */ -// N_VConst(ZERO, delta_Yi); - -// /* loop over internal stages to the step */ -// for (is=0; isstages; is++) { -// /* store current stage index */ -// step_mem->istage = is; - -// /* set current stage time(s) */ -// if (step_mem->implicit) -// ark_mem->tcur = ark_mem->tn + step_mem->Bi->c[is]*ark_mem->h; -// else -// ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; - -// /* [ q_n ] + [ \Delta Q_i ] -// [ ] + [ ] */ -// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); - -// /* evaluate Fi with previous stage increment */ -// N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ -// retval = sprkStep_Fi(step_mem, ark_mem->tcur, yn_plus_delta_Yi, -// step_mem->sdata, ark_mem->user_data); -// if (retval != 0) return(ARK_RHSFUNC_FAIL); - -// /* update the implicit stage -// [ ] = [ ] + [ ] -// [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ -// N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Bi->b[is], step_mem->sdata, delta_Yi); - -// /* [ ] + [ ] -// [ p_n ] + [ \Delta P_i ] */ -// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); - -// /* evaluate Fe with the current p_n + \Delta P_i */ -// N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ -// retval = sprkStep_Fe(step_mem, ark_mem->tn + step_mem->Be->c[is]*ark_mem->h, -// yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); -// if (retval != 0) return(ARK_RHSFUNC_FAIL); - -// /* update the explicit stage -// [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] -// [ ] = [ ] + [ ] */ -// N_VLinearSum(ONE, delta_Yi, ark_mem->h * step_mem->Be->b[is], step_mem->sdata, delta_Yi); -// } - -// /* -// Now we compute the step solution via compensated summation. -// [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] -// [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ -// N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); -// N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); -// N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); -// N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); - -// *nflagPtr = 0; -// *dsmPtr = 0; - -// return 0; -// } diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 548481a1f9..5b3ec24b3b 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -48,8 +48,7 @@ typedef struct ARKodeSPRKStepMemRec { /* SPRK method and storage */ ARKodeSPRKMem method; int q; /* method order */ - N_Vector f1vec; - N_Vector f2vec; + N_Vector sdata; /* SPRK problem specification */ ARKRhsFn f1; /* p' = f1(t,q) = - dV(t,q)/dq */ @@ -58,6 +57,7 @@ typedef struct ARKodeSPRKStepMemRec { /* Counters */ long int nf1; /* number of calls to f1 */ long int nf2; /* number of calls to f2 */ + int istage; } *ARKodeSPRKStepMem; @@ -70,7 +70,7 @@ int sprkStep_Init(void* arkode_mem, int init_type); int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode); int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); -int sprkStep_TakeStep_SPRKInc(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); /* Internal utility routines */ int sprkStep_AccessStepMem(void* arkode_mem, const char *fname, diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 1282b9373c..0644eebc66 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -227,18 +227,43 @@ int SPRKStepSetDefaults(void* arkode_mem) } /*--------------------------------------------------------------- - SPRKStepSetOrder: + SPRKStepSetUseCompSums: + + Turns on/off compensated summation in SPRKStep and ARKODE. + ---------------------------------------------------------------*/ +int SPRKStepSetUseCompSums(void *arkode_mem, sunbooleantype onoff) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) { return(retval); } + + if (onoff) { + ark_mem->step = sprkStep_TakeStep_Compensated; + } else { + ark_mem->step = sprkStep_TakeStep; + } + + return(ARK_SUCCESS); +} + + +/*--------------------------------------------------------------- + SPRKStepSetMethod: Specifies the SPRK method ** Note in documentation that this should not be called along - with SPRKStepSetOrder. + with SPRKStepSetOrder. ** ---------------------------------------------------------------*/ int SPRKStepSetMethod(void *arkode_mem, ARKODE_SPRKMethodID id) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; - sunindextype Blrw, Bliw; int retval; /* access ARKodeSPRKStepMem structure */ @@ -263,16 +288,12 @@ int SPRKStepSetMethod(void *arkode_mem, ARKODE_SPRKMethodID id) Specifies the method order ** Note in documentation that this should not be called along - with SPRKStepSetTable or SPRKStepSetTableNum. This routine - is used to specify a desired method order using default Butcher - tables, whereas any user-supplied table will have their own - order associated with them. + with SPRKStepSetMethod. ** ---------------------------------------------------------------*/ int SPRKStepSetOrder(void *arkode_mem, int ord) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; - sunindextype Blrw, Bliw; int retval; /* access ARKodeSPRKStepMem structure */ @@ -292,12 +313,6 @@ int SPRKStepSetOrder(void *arkode_mem, int ord) step_mem->method = NULL; } - // /* clear method specification, since user is requesting a change in method - // or a reset to defaults. Spec will be set in ARKInitialSetup. */ - // step_mem->stages = 0; - // step_mem->istage = 0; - // step_mem->p = 0; - return(ARK_SUCCESS); } From b0b46e74212e8d5b0fc54aa8b16254124c06a1fd Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 17 Mar 2023 17:33:16 -0700 Subject: [PATCH 029/177] fix some io options --- examples/arkode/C_serial/ark_kepler.c | 63 +++++++++++++++++-- .../C_serial/ark_kepler_test_all_methods.c | 13 +++- include/arkode/arkode_sprkstep.h | 56 ++++++++--------- src/arkode/arkode_sprkstep_io.c | 49 +++++++-------- 4 files changed, 118 insertions(+), 63 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 6d5d72f2ee..fb219f77f1 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -109,6 +109,7 @@ int main(int argc, char* argv[]) int step_mode = 0; int method = 0; int order = 1; + int use_compsums = 0; const sunrealtype dTout = SUN_RCONST(dt); // const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); @@ -124,6 +125,9 @@ int main(int argc, char* argv[]) if (argc > 3) { order = atoi(argv[++argi]); } + if (argc > 4) { + use_compsums = atoi(argv[++argi]); + } /* Allocate and fill udata structure */ udata = (UserData) malloc(sizeof(*udata)); @@ -147,10 +151,61 @@ int main(int argc, char* argv[]) if (method == 0) { arkode_mem = SPRKStepCreate(dpdt, dqdt, T0, y, sunctx); - retval = SPRKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; + switch (order) { + case 1: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_EULER_1); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 2: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_LEAPFROG_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 22: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 222: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_2); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 3: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_RUTH_3); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 33: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_3); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 4: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_CANDY_ROZMUS_4); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 44: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_4); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 5: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_5); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 6: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_YOSHIDA_6); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 8: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_8); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 10: + retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_SOFRONIOU_10); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + default: + fprintf(stderr, "Not a valid method\n"); + return 1; + } - retval = SPRKStepSetUseCompSums(arkode_mem, 1); + retval = SPRKStepSetUseCompSums(arkode_mem, use_compsums); if (check_retval(&retval, "SPRKStepSetUseCompSums", 1)) return 1; if (step_mode == 0) { @@ -323,7 +378,7 @@ int main(int argc, char* argv[]) } N_VDestroy(y); if (method == 0) { - // SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); SPRKStepFree(&arkode_mem); } else { ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); diff --git a/examples/arkode/C_serial/ark_kepler_test_all_methods.c b/examples/arkode/C_serial/ark_kepler_test_all_methods.c index 0c8462ad8f..8fb7cd78fa 100644 --- a/examples/arkode/C_serial/ark_kepler_test_all_methods.c +++ b/examples/arkode/C_serial/ark_kepler_test_all_methods.c @@ -106,6 +106,7 @@ int main(int argc, char* argv[]) /* Default integrator Options */ int step_mode = 0; int method = 0; + int use_compsums = 0; sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype dTout = SUN_RCONST(dt); // const sunrealtype dTout = SUN_RCONST(100.0); @@ -122,6 +123,9 @@ int main(int argc, char* argv[]) if (argc > 3) { dt = atof(argv[++argi]); } + if (argc > 4) { + use_compsums = atoi(argv[++argi]); + } /* Create the SUNDIALS context object for this simulation */ retval = SUNContext_Create(NULL, &sunctx); @@ -152,6 +156,9 @@ int main(int argc, char* argv[]) if (method == 0) { arkode_mem = SPRKStepCreate(dpdt, dqdt, T0, y, sunctx); + retval = SPRKStepSetUseCompSums(arkode_mem, use_compsums); + if (check_retval(&retval, "SPRKStepSetUseCompSums", 1)) return 1; + switch (order) { case 1: retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_EULER_1); @@ -313,8 +320,8 @@ int main(int argc, char* argv[]) retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", - tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); + // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", + // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); fprintf(times_fp, "%.16f\n", tret); fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); N_VPrintFile(y, solution_fp); @@ -380,7 +387,7 @@ int main(int argc, char* argv[]) } N_VDestroy(y); if (method == 0) { - // SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); SPRKStepFree(&arkode_mem); } else { ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 177d2ca25d..662bed92f6 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -93,22 +93,22 @@ SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void *arkode_mem, int degree); SUNDIALS_EXPORT int SPRKStepSetDenseOrder(void *arkode_mem, int dord); SUNDIALS_EXPORT int SPRKStepSetSafetyFactor(void *arkode_mem, - realtype safety); + realtype safety); SUNDIALS_EXPORT int SPRKStepSetErrorBias(void *arkode_mem, - realtype bias); + realtype bias); SUNDIALS_EXPORT int SPRKStepSetMaxGrowth(void *arkode_mem, - realtype mx_growth); + realtype mx_growth); SUNDIALS_EXPORT int SPRKStepSetMinReduction(void *arkode_mem, - realtype eta_min); + realtype eta_min); SUNDIALS_EXPORT int SPRKStepSetFixedStepBounds(void *arkode_mem, - realtype lb, realtype ub); + realtype lb, realtype ub); SUNDIALS_EXPORT int SPRKStepSetAdaptivityMethod(void *arkode_mem, - int imethod, - int idefault, int pq, - realtype adapt_params[3]); + int imethod, + int idefault, int pq, + realtype adapt_params[3]); SUNDIALS_EXPORT int SPRKStepSetAdaptivityFn(void *arkode_mem, - ARKAdaptFn hfun, - void *h_data); + ARKAdaptFn hfun, + void *h_data); SUNDIALS_EXPORT int SPRKStepSetMaxFirstGrowth(void *arkode_mem, realtype etamx1); SUNDIALS_EXPORT int SPRKStepSetMaxEFailGrowth(void *arkode_mem, @@ -162,10 +162,6 @@ SUNDIALS_EXPORT int SPRKStepEvolve(void *arkode_mem, realtype tout, SUNDIALS_EXPORT int SPRKStepGetDky(void *arkode_mem, realtype t, int k, N_Vector dky); -/* Utility function to update/compute y based on zcor */ -SUNDIALS_EXPORT int SPRKStepComputeState(void *arkode_mem, N_Vector zcor, - N_Vector z); - /* Optional output functions */ SUNDIALS_EXPORT int SPRKStepGetNumExpSteps(void *arkode_mem, long int *expsteps); @@ -173,40 +169,40 @@ SUNDIALS_EXPORT int SPRKStepGetNumAccSteps(void *arkode_mem, long int *accsteps); SUNDIALS_EXPORT int SPRKStepGetNumStepAttempts(void *arkode_mem, long int *step_attempts); -SUNDIALS_EXPORT int SPRKStepGetNumRhsEvals(void *arkode_mem, long int** fk_evals); +SUNDIALS_EXPORT int SPRKStepGetNumRhsEvals(void *arkode_mem, long int* nf1, long int* nf2); SUNDIALS_EXPORT int SPRKStepGetNumErrTestFails(void *arkode_mem, - long int *netfails); + long int *netfails); SUNDIALS_EXPORT int SPRKStepGetEstLocalErrors(void *arkode_mem, - N_Vector ele); + N_Vector ele); SUNDIALS_EXPORT int SPRKStepGetWorkSpace(void *arkode_mem, long int *lenrw, long int *leniw); SUNDIALS_EXPORT int SPRKStepGetNumSteps(void *arkode_mem, long int *nsteps); SUNDIALS_EXPORT int SPRKStepGetActualInitStep(void *arkode_mem, - realtype *hinused); + realtype *hinused); SUNDIALS_EXPORT int SPRKStepGetLastStep(void *arkode_mem, - realtype *hlast); + realtype *hlast); SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void *arkode_mem, - realtype *hcur); + realtype *hcur); SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void *arkode_mem, - realtype *tcur); + realtype *tcur); SUNDIALS_EXPORT int SPRKStepGetCurrentState(void *arkode_mem, - N_Vector *state); + N_Vector *state); SUNDIALS_EXPORT int SPRKStepGetCurrentGamma(void *arkode_mem, - realtype *gamma); + realtype *gamma); SUNDIALS_EXPORT int SPRKStepGetCurrentMassMatrix(void *arkode_mem, - SUNMatrix *M); + SUNMatrix *M); SUNDIALS_EXPORT int SPRKStepGetTolScaleFactor(void *arkode_mem, - realtype *tolsfac); + realtype *tolsfac); SUNDIALS_EXPORT int SPRKStepGetErrWeights(void *arkode_mem, - N_Vector eweight); + N_Vector eweight); SUNDIALS_EXPORT int SPRKStepGetResWeights(void *arkode_mem, - N_Vector rweight); + N_Vector rweight); SUNDIALS_EXPORT int SPRKStepGetUserData(void *arkode_mem, - void **user_data); + void **user_data); SUNDIALS_EXPORT int SPRKStepPrintAllStats(void *arkode_mem, FILE *outfile, - SUNOutputFormat fmt); + SUNOutputFormat fmt); SUNDIALS_EXPORT char *SPRKStepGetReturnFlagName(long int flag); SUNDIALS_EXPORT int SPRKStepWriteParameters(void *arkode_mem, FILE *fp); @@ -216,7 +212,7 @@ SUNDIALS_EXPORT int SPRKStepGetTimestepperStats(void *arkode_mem, long int *expsteps, long int *accsteps, long int *step_attempts, - long int **nfk_evals, + long int *nf1, long int *nf2, long int *nlinsetups, long int *netfails); SUNDIALS_EXPORT int SPRKStepGetStepStats(void *arkode_mem, diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 0644eebc66..58079ddbfe 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -323,13 +323,12 @@ int SPRKStepSetOrder(void *arkode_mem, int ord) /*--------------------------------------------------------------- SPRKStepGetNumRhsEvals: - Returns the current number of calls to fe and fi + Returns the current number of calls to f1 and f2 ---------------------------------------------------------------*/ -int SPRKStepGetNumRhsEvals(void *arkode_mem, long int** fk_evals) +int SPRKStepGetNumRhsEvals(void *arkode_mem, long int* nf1, long int* nf2) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; - int rhs_k; int retval; /* access ARKodeSPRKStepMem structure */ @@ -337,9 +336,8 @@ int SPRKStepGetNumRhsEvals(void *arkode_mem, long int** fk_evals) &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - // /* get values from step_mem */ - // for (rhs_k = 0; rhs_k < step_mem->num_rhs; ++rhs_k) - // *fk_evals[rhs_k] = step_mem->nfk[rhs_k]; + *nf1 = step_mem->nf1; + *nf2 = step_mem->nf2; return(ARK_SUCCESS); } @@ -376,14 +374,14 @@ int SPRKStepGetEstLocalErrors(void *arkode_mem, N_Vector ele) ---------------------------------------------------------------*/ int SPRKStepGetTimestepperStats(void *arkode_mem, long int *expsteps, long int *accsteps, long int *step_attempts, - long int **fk_evals, + long int *nf1, long int *nf2, long int *nlinsetups, long int *netfails) { ARKodeMem ark_mem; SPRKStepGetNumExpSteps(arkode_mem, expsteps); SPRKStepGetNumAccSteps(arkode_mem, accsteps); - SPRKStepGetNumRhsEvals(arkode_mem, fk_evals); + SPRKStepGetNumRhsEvals(arkode_mem, nf1, nf2); SPRKStepGetNumStepAttempts(arkode_mem, step_attempts); SPRKStepGetNumErrTestFails(arkode_mem, netfails); @@ -410,24 +408,23 @@ int SPRKStepPrintAllStats(void *arkode_mem, FILE *outfile, SUNOutputFormat fmt) retval = arkPrintAllStats(arkode_mem, outfile, fmt); if (retval != ARK_SUCCESS) return(retval); - // switch(fmt) - // { - // case SUN_OUTPUTFORMAT_TABLE: - // /* function evaluations */ - // fprintf(outfile, "Explicit RHS fn evals = %ld\n", step_mem->nfe); - // fprintf(outfile, "Implicit RHS fn evals = %ld\n", step_mem->nfi); - // break; - // case SUN_OUTPUTFORMAT_CSV: - // /* function evaluations */ - // fprintf(outfile, ",Explicit RHS fn evals,%ld", step_mem->nfe); - // fprintf(outfile, ",Implicit RHS fn evals,%ld", step_mem->nfi); - // break; - - // default: - // arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE", "SPRKStepPrintAllStats", - // "Invalid formatting option."); - // return(ARK_ILL_INPUT); - // } + switch(fmt) + { + case SUN_OUTPUTFORMAT_TABLE: + /* function evaluations */ + fprintf(outfile, "f1 RHS fn evals = %ld\n", step_mem->nf1); + fprintf(outfile, "f2 RHS fn evals = %ld\n", step_mem->nf2); + break; + case SUN_OUTPUTFORMAT_CSV: + /* function evaluations */ + fprintf(outfile, ",f1 RHS evals,%ld", step_mem->nf1); + fprintf(outfile, ",f2 RHS fn evals,%ld", step_mem->nf2); + break; + default: + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE", "SPRKStepPrintAllStats", + "Invalid formatting option."); + return(ARK_ILL_INPUT); + } return(ARK_SUCCESS); } From c2d61885c34998cc3222afd1811683d79b7ea9d7 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sat, 18 Mar 2023 15:26:34 -0700 Subject: [PATCH 030/177] fix mc2 --- examples/arkode/C_serial/ark_kepler.c | 30 ++++----- .../C_serial/ark_kepler_plot_order_work.py | 61 ++++++++++++++----- .../C_serial/ark_kepler_test_all_methods.c | 30 ++++----- src/arkode/arkode_sprk.c | 18 +++--- 4 files changed, 85 insertions(+), 54 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index fb219f77f1..69f3258492 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -110,7 +110,7 @@ int main(int argc, char* argv[]) int method = 0; int order = 1; int use_compsums = 0; - const sunrealtype dTout = SUN_RCONST(dt); + const sunrealtype dTout = dt; // const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); @@ -255,7 +255,7 @@ int main(int argc, char* argv[]) if (step_mode == 0) { retval = ARKStepSetFixedStep(arkode_mem, dt); } else { - retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); + retval = ARKStepSStolerances(arkode_mem, 10*SUN_UNIT_ROUNDOFF, 10*SUN_UNIT_ROUNDOFF); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } } @@ -299,10 +299,10 @@ int main(int argc, char* argv[]) H0 = Hamiltonian(y); L0 = AngularMomentum(y); sunrealtype Q0 = Q(y, udata->alpha)/udata->rho_n; - fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f, Q(p,q) = %.16f\n", + fprintf(stdout, "t = %.4f, H(p,q) = %.16Lf, L(p,q) = %.16Lf, Q(p,q) = %.16Lf\n", tret, H0, L0, Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); N_VPrintFile(y, solution_fp); /* Do integration */ @@ -313,11 +313,11 @@ int main(int argc, char* argv[]) retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); N_VPrintFile(y, solution_fp); /* Check if the solve was successful, if so, update the time and continue */ @@ -338,22 +338,22 @@ int main(int argc, char* argv[]) if (retval < 0) break; /* Output current integration status */ - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); N_VPrintFile(y, solution_fp); } } else { retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); N_VPrintFile(y, solution_fp); } @@ -508,7 +508,7 @@ int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, { UserData udata = (UserData) user_data; - // fprintf(udata->hhist_fp, "%.16f\n", h1); + // fprintf(udata->hhist_fp, "%.16Lf\n", h1); const sunrealtype G_np1 = G(y, udata->alpha); udata->rho_np1 = udata->rho_nphalf + udata->eps*G_np1/SUN_RCONST(2.0); diff --git a/examples/arkode/C_serial/ark_kepler_plot_order_work.py b/examples/arkode/C_serial/ark_kepler_plot_order_work.py index c30e69f0eb..841a9814b5 100755 --- a/examples/arkode/C_serial/ark_kepler_plot_order_work.py +++ b/examples/arkode/C_serial/ark_kepler_plot_order_work.py @@ -23,7 +23,8 @@ def load_results(case): sprk8 = [] # McLachlan 8th order sprk10 = [] # Sofroniou 10th order -step_sizes = [0.000010, 0.000100, 0.001000, 0.010000, 0.100000] +# step_sizes = [0.000010, 0.000100, 0.001000, 0.010000, 0.100000] +step_sizes = [0.000100, 0.001000, 0.010000, 0.100000] for dt in step_sizes: sprk1.append({ 'method': 'Symplectic Euler', @@ -123,20 +124,10 @@ def load_results(case): # Reference reference = load_results('_erk-8') -# energy = [] -# energy_0 = [] -# for _, sol, consv in all_methods: -# energy.append(consv[:,0]) -# energy_0.append(consv[0,0]) -# energy = np.array(energy) -# energy_0 = np.array(energy_0) -# energy_diff = np.abs(energy.T - energy_0) - # # Solution error plot # orders = [1, 2, 3, 4, 5, 6, 8, 10] -# orders = [4] for order in orders: plt.figure(dpi=200) legend = [] @@ -146,20 +137,60 @@ def load_results(case): _, y_ref, _ = reference for method in all_methods[order]: errs = [] + dts = [] for d in method: _, y, _ = d['data'] err = np.linalg.norm(y - y_ref, np.inf) / np.linalg.norm(y_ref, np.inf) print('method: %s, dt = %s' % (d['method'], d['dt'])) print(np.max(y)) - # print(y_ref) - errs.append(err) + if err >= 10.: + continue + else: + dts.append(d['dt']) + errs.append(err) legend.append(method[0]['method']) - plt.plot(step_sizes, errs) + plt.plot(dts, errs) plt.xscale('log') plt.yscale('log') plt.xlabel('h') plt.ylabel('error') plt.title('Order plot for $O(h^{%d})$ methods' % order) plt.legend(legend) - plt.savefig('ark_kepler_order%d.png' % order) + plt.savefig('ark_kepler_sol_order%d.png' % order) plt.close() + +# +# Energy error plot +# +orders = [1, 2, 3, 4, 5, 6, 8, 10] +for order in orders: + plt.figure(dpi=200) + legend = [] + legend.append('$O(h^{%d})$' % order) + order_line = np.power(step_sizes, order) + plt.plot(np.array(step_sizes), np.array(order_line).T, 'k--') + _, y_ref, _ = reference + for method in all_methods[order]: + errs = [] + dts = [] + for d in method: + _, y, conserved = d['data'] + energy_0 = conserved[0,0] + energy = conserved[:,0] + err = np.linalg.norm(energy-energy_0, np.inf) + if err >= 10.: + continue + else: + dts.append(d['dt']) + errs.append(err) + legend.append(method[0]['method']) + plt.plot(dts, errs) + plt.xscale('log') + plt.yscale('log') + plt.xlabel('h') + plt.ylabel('error in energy') + plt.title('Order plot for $O(h^{%d})$ methods' % order) + plt.legend(legend) + plt.savefig('ark_kepler_energy_order%d.png' % order) + plt.close() + diff --git a/examples/arkode/C_serial/ark_kepler_test_all_methods.c b/examples/arkode/C_serial/ark_kepler_test_all_methods.c index 8fb7cd78fa..f2b12c218d 100644 --- a/examples/arkode/C_serial/ark_kepler_test_all_methods.c +++ b/examples/arkode/C_serial/ark_kepler_test_all_methods.c @@ -108,7 +108,7 @@ int main(int argc, char* argv[]) int method = 0; int use_compsums = 0; sunrealtype dt = SUN_RCONST(1e-2); - const sunrealtype dTout = SUN_RCONST(dt); + const sunrealtype dTout = dt; // const sunrealtype dTout = SUN_RCONST(100.0); const int num_output_times = (int) ceil(Tf/dTout); @@ -307,9 +307,9 @@ int main(int argc, char* argv[]) tout = T0+dTout; H0 = Hamiltonian(y); L0 = AngularMomentum(y); - fprintf(stdout, "t = %.4f, H(p,q) = %.16f, L(p,q) = %.16f\n", tret, H0, L0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", H0, L0); + fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf\n", tret, H0, L0); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); N_VPrintFile(y, solution_fp); /* Do integration */ @@ -320,10 +320,10 @@ int main(int argc, char* argv[]) retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", + // fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); N_VPrintFile(y, solution_fp); /* Check if the solve was successful, if so, update the time and continue */ @@ -344,22 +344,22 @@ int main(int argc, char* argv[]) if (retval < 0) break; /* Output current integration status */ - // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + // fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, // Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); N_VPrintFile(y, solution_fp); } } else { retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - // fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f, Q(p,q)-Q0 = %.16f\n", + // fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, // Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16f\n", tret); - fprintf(conserved_fp, "%.16f, %.16f\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); N_VPrintFile(y, solution_fp); } @@ -374,7 +374,7 @@ int main(int argc, char* argv[]) } } - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16f, L(p,q)-L0 = %.16f\n", + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); // fclose(udata->hhist_fp); @@ -518,7 +518,7 @@ int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, { UserData udata = (UserData) user_data; - // fprintf(udata->hhist_fp, "%.16f\n", h1); + // fprintf(udata->hhist_fp, "%.16Lf\n", h1); const sunrealtype G_np1 = G(y, udata->alpha); udata->rho_np1 = udata->rho_nphalf + udata->eps*G_np1/SUN_RCONST(2.0); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 1cbf5e775d..cacd4e1a4b 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -42,10 +42,10 @@ ARKodeSPRKMem ARKodeSymplecticLeapfrog2() { ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); sprk_mem->q = 2; sprk_mem->stages = 2; - sprk_mem->b[0] = SUN_RCONST(0.0); - sprk_mem->b[1] = SUN_RCONST(1.0); sprk_mem->a[0] = SUN_RCONST(0.5); sprk_mem->a[1] = SUN_RCONST(0.5); + sprk_mem->b[0] = SUN_RCONST(0.0); + sprk_mem->b[1] = SUN_RCONST(1.0); return sprk_mem; } @@ -53,10 +53,10 @@ ARKodeSPRKMem ARKodeSymplecticPseudoLeapfrog2() { ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); sprk_mem->q = 2; sprk_mem->stages = 2; - sprk_mem->b[0] = SUN_RCONST(0.5); - sprk_mem->b[1] = SUN_RCONST(0.5); sprk_mem->a[0] = SUN_RCONST(1.0); sprk_mem->a[1] = SUN_RCONST(0.0); + sprk_mem->b[0] = SUN_RCONST(0.5); + sprk_mem->b[1] = SUN_RCONST(0.5); return sprk_mem; } @@ -108,13 +108,13 @@ ARKodeSPRKMem ARKodeSymplecticRuth3() { */ ARKodeSPRKMem ARKodeSymplecticMcLachlan2() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(3); + ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); sprk_mem->q = 2; sprk_mem->stages = 2; - sprk_mem->a[0] = SUN_RCONST(1.0)/SUNRsqrt(SUN_RCONST(2.0)); - sprk_mem->a[1] = SUN_RCONST(1.0) - sprk_mem->a[0]; - sprk_mem->b[0] = SUN_RCONST(1.0)/SUNRsqrt(SUN_RCONST(2.0)); - sprk_mem->b[1] = SUN_RCONST(1.0) - sprk_mem->b[0]; + sprk_mem->a[1] = SUN_RCONST(1.0) - (SUN_RCONST(1.0) / SUN_RCONST(2.0)) * SUNRsqrt(2.0); + sprk_mem->a[0] = SUN_RCONST(1.0) - sprk_mem->a[1]; + sprk_mem->b[1] = SUN_RCONST(1.0) / (SUN_RCONST(2.0) * (SUN_RCONST(1.0) - sprk_mem->a[1])); + sprk_mem->b[0] = SUN_RCONST(1.0) - sprk_mem->b[1]; return sprk_mem; } From bbd550033627372343c73b1964e96131b6f8e27c Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 29 Mar 2023 16:02:34 -0700 Subject: [PATCH 031/177] udpates that fix convergence (mostly) --- examples/arkode/C_serial/CMakeLists.txt | 1 - examples/arkode/C_serial/ark_kepler.c | 52 +- examples/arkode/C_serial/ark_kepler_plot.py | 9 +- .../arkode/C_serial/ark_kepler_plot_all.py | 38 +- .../C_serial/ark_kepler_plot_order_work.py | 62 +- .../C_serial/ark_kepler_test_all_methods.c | 567 ------------------ .../C_serial/ark_kepler_test_convergence.sh | 18 + include/arkode/arkode_sprk.h | 7 +- include/arkode/arkode_sprkstep.h | 2 +- src/arkode/arkode.c | 28 +- src/arkode/arkode_impl.h | 3 + src/arkode/arkode_io.c | 26 + src/arkode/arkode_sprkstep.c | 76 +-- src/arkode/arkode_sprkstep_impl.h | 4 +- src/arkode/arkode_sprkstep_io.c | 6 +- 15 files changed, 191 insertions(+), 708 deletions(-) delete mode 100644 examples/arkode/C_serial/ark_kepler_test_all_methods.c create mode 100755 examples/arkode/C_serial/ark_kepler_test_convergence.sh diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 6ac63396ee..e47d3a3ae5 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -40,7 +40,6 @@ set(ARKODE_examples "ark_reaction_diffusion_mri\;\;develop" "ark_brusselator_1D_mri\;\;develop" "ark_kepler\;\;develop" - "ark_kepler_test_all_methods\;\;develop" "ark_kpr_mri\;\;develop" "ark_kpr_mri\;0 0.002\;develop" "ark_kpr_mri\;1 0.002\;develop" diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 69f3258492..ffa6d90a0d 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -56,8 +56,8 @@ static sunrealtype Hamiltonian(N_Vector y); static sunrealtype AngularMomentum(N_Vector y); static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); -static int dqdt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); -static int dpdt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); +static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); +static int force(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); static sunrealtype Q(N_Vector yvec, sunrealtype alpha); static sunrealtype G(N_Vector yvec, sunrealtype alpha); @@ -98,9 +98,10 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); + // sunrealtype Tf = SUN_RCONST(150.0); sunrealtype Tf = SUN_RCONST(1000.0); // sunrealtype Tf = SUN_RCONST(100000.0); - const sunrealtype dt = SUN_RCONST(1e-2); + sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); // const sunrealtype delta = SUN_RCONST(0.015); const sunrealtype delta = SUN_RCONST(0.0); // unperturbed @@ -110,8 +111,7 @@ int main(int argc, char* argv[]) int method = 0; int order = 1; int use_compsums = 0; - const sunrealtype dTout = dt; - // const sunrealtype dTout = SUN_RCONST(100.0); + const sunrealtype dTout = SUN_RCONST(1.); const int num_output_times = (int) ceil(Tf/dTout); /* Parse CLI args */ @@ -126,6 +126,9 @@ int main(int argc, char* argv[]) order = atoi(argv[++argi]); } if (argc > 4) { + dt = atof(argv[++argi]); + } + if (argc > 5) { use_compsums = atoi(argv[++argi]); } @@ -147,9 +150,9 @@ int main(int argc, char* argv[]) /* Fill the initial conditions */ InitialConditions(y, ecc); - /* Create SPRKStep integrator where we treat dqdt explicitly and dpdt implicitly */ + /* Create SPRKStep integrator */ if (method == 0) { - arkode_mem = SPRKStepCreate(dpdt, dqdt, T0, y, sunctx); + arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); switch (order) { case 1: @@ -205,8 +208,8 @@ int main(int argc, char* argv[]) return 1; } - retval = SPRKStepSetUseCompSums(arkode_mem, use_compsums); - if (check_retval(&retval, "SPRKStepSetUseCompSums", 1)) return 1; + retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); + if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) return 1; if (step_mode == 0) { retval = SPRKStepSetFixedStep(arkode_mem, dt); @@ -237,7 +240,7 @@ int main(int argc, char* argv[]) retval = ARKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; } else { - arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); + arkode_mem = ARKStepCreate(velocity, force, T0, y, sunctx); retval = ARKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; @@ -262,16 +265,16 @@ int main(int argc, char* argv[]) /* Open output files */ if (method == 0) { - const char* fmt1 = "ark_kepler_conserved_sprk-%d.txt"; - const char* fmt2 = "ark_kepler_solution_sprk-%d.txt"; - const char* fmt3 = "ark_kepler_times_sprk-%d.txt"; + const char* fmt1 = "ark_kepler_conserved_sprk-%d-dt-%.6f.txt"; + const char* fmt2 = "ark_kepler_solution_sprk-%d-dt-%.6f.txt"; + const char* fmt3 = "ark_kepler_times_sprk-%d-dt-%.6f.txt"; // const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; char fname[64]; - sprintf(fname, fmt1, order); + sprintf(fname, fmt1, order, dt); conserved_fp = fopen(fname, "w+"); - sprintf(fname, fmt2, order); + sprintf(fname, fmt2, order, dt); solution_fp = fopen(fname, "w+"); - sprintf(fname, fmt3, order); + sprintf(fname, fmt3, order, dt); times_fp = fopen(fname, "w+"); // sprintf(fname, fmt4, order); // udata->hhist_fp = fopen(fname, "w+"); @@ -299,7 +302,7 @@ int main(int argc, char* argv[]) H0 = Hamiltonian(y); L0 = AngularMomentum(y); sunrealtype Q0 = Q(y, udata->alpha)/udata->rho_n; - fprintf(stdout, "t = %.4f, H(p,q) = %.16Lf, L(p,q) = %.16Lf, Q(p,q) = %.16Lf\n", + fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf, Q(p,q) = %.16Lf\n", tret, H0, L0, Q0); fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); @@ -309,11 +312,10 @@ int main(int argc, char* argv[]) if (method == 0) { for (iout = 0; iout < num_output_times; iout++) { // SPRKStepSetStopTime(arkode_mem, tout); - retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, Q(y, udata->alpha)/udata->rho_np1-Q0); fprintf(times_fp, "%.16Lf\n", tret); @@ -338,7 +340,7 @@ int main(int argc, char* argv[]) if (retval < 0) break; /* Output current integration status */ - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, Q(y, udata->alpha)/udata->rho_np1-Q0); fprintf(times_fp, "%.16Lf\n", tret); @@ -349,7 +351,7 @@ int main(int argc, char* argv[]) retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - fprintf(stdout, "t = %.4f, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, Q(y, udata->alpha)/udata->rho_np1-Q0); fprintf(times_fp, "%.16Lf\n", tret); @@ -437,13 +439,13 @@ int dydt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { int retval = 0; - retval += dpdt(t, yvec, ydotvec, user_data); - retval += dqdt(t, yvec, ydotvec, user_data); + retval += force(t, yvec, ydotvec, user_data); + retval += velocity(t, yvec, ydotvec, user_data); return retval; } -int dqdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { sunrealtype* y = N_VGetArrayPointer(yvec); sunrealtype* ydot = N_VGetArrayPointer(ydotvec); @@ -457,7 +459,7 @@ int dqdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) return 0; } -int dpdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { UserData udata = (UserData) user_data; sunrealtype* y = N_VGetArrayPointer(yvec); diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index 94a3edba53..2d8c4177b3 100755 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -18,8 +18,8 @@ import numpy as np import matplotlib.pyplot as plt -t = np.loadtxt('ark_kepler_times_sprk-2.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_sprk-2.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_erk-4.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_erk-4.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) @@ -27,7 +27,7 @@ plt.savefig('ark_kepler_phase.png') plt.close() -conserved = np.loadtxt('ark_kepler_conserved_sprk-2.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_erk-4.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] @@ -54,7 +54,7 @@ plt.close() # # Step history -# hhist = np.loadtxt('ark_kepler_hhist_sprk-2.txt', dtype=np.float64) +# hhist = np.loadtxt('ark_kepler_hhist_erk-4.txt', dtype=np.float64) # plt.figure(dpi=200) # plt.title('Step Size History') # plt.plot(t[:-1], hhist) @@ -72,6 +72,7 @@ plt.plot(t, y[:,2], linewidth = 2) plt.plot(t, y[:,3], linewidth = 2) plt.grid(True) +plt.legend(['P', 'P\'', 'Q', 'Q\'']) plt.xlabel('<--- t --->') plt.ylabel('<--- y(1:4) --->') plt.title('ark_kepler: Time Plot') diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_all.py index e12fb63f6d..53c3250263 100755 --- a/examples/arkode/C_serial/ark_kepler_plot_all.py +++ b/examples/arkode/C_serial/ark_kepler_plot_all.py @@ -10,50 +10,46 @@ def load_results(case): conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) return t, y, conserved -sprk1 = load_results('_sprk-1') -sprk2 = load_results('_sprk-2') +# sprk1 = load_results('_sprk-1') +# sprk2 = load_results('_sprk-2') sprk3 = load_results('_sprk-3') sprk4 = load_results('_sprk-4') -sprk5 = load_results('_sprk-5') -erk2 = load_results('_erk-2') -erk3 = load_results('_erk-3') +# sprk5 = load_results('_sprk-5') +# erk2 = load_results('_erk-2') +# erk3 = load_results('_erk-3') erk4 = load_results('_erk-4') -erk5 = load_results('_erk-5') +erk5 = load_results('_erk-8') # sprkinc1 = load_results('_sprkinc-1') # sprkinc2 = load_results('_sprkinc-2') # sprkinc3 = load_results('_sprkinc-3') all_to_compare = [] -all_to_compare.append(sprk1) -all_to_compare.append(sprk2) +# all_to_compare.append(sprk1) +# all_to_compare.append(sprk2) all_to_compare.append(sprk3) all_to_compare.append(sprk4) -all_to_compare.append(sprk5) +# all_to_compare.append(sprk5) # all_to_compare.append(erk2) # all_to_compare.append(erk3) -# all_to_compare.append(erk4) -# all_to_compare.append(erk5) +all_to_compare.append(erk4) +all_to_compare.append(erk5) # all_to_compare.append(sprkinc1) # all_to_compare.append(sprkinc2) # all_to_compare.append(sprkinc3) legend = [] -legend.append(r'$O(h^1)$ SPRK') -legend.append(r'$O(h^2)$ SPRK') +# legend.append(r'$O(h^1)$ SPRK') +# legend.append(r'$O(h^2)$ SPRK') legend.append(r'$O(h^3)$ SPRK') legend.append(r'$O(h^4)$ SPRK') -legend.append(r'$O(h^5)$ SPRK') -# legend.append(r'$O(h^1)$ SPRK (inc)') -# legend.append(r'$O(h^2)$ SPRK (inc)') -# legend.append(r'$O(h^3)$ SPRK (inc)') +# legend.append(r'$O(h^5)$ SPRK') # legend.append(r'$O(h^2)$ ERK') # legend.append(r'$O(h^3)$ ERK') -# legend.append(r'$O(h^4)$ ERK') -# legend.append(r'$O(h^5)$ ERK') +legend.append(r'$O(h^4)$ ERK') +legend.append(r'$O(h^5)$ ERK') h = 0.01 -t = erk2[0] -trend_line_erk_2 = t*h*h +t = erk4[0] energy = [] energy_0 = [] diff --git a/examples/arkode/C_serial/ark_kepler_plot_order_work.py b/examples/arkode/C_serial/ark_kepler_plot_order_work.py index 841a9814b5..b2d572e43d 100755 --- a/examples/arkode/C_serial/ark_kepler_plot_order_work.py +++ b/examples/arkode/C_serial/ark_kepler_plot_order_work.py @@ -99,50 +99,56 @@ def load_results(case): 'dt': dt }) +orders = [1, 2, 3, 4, 5, 6, 8, 10] all_methods = {} -all_methods[1] = [] -all_methods[1].append(sprk1) -all_methods[2] = [] -all_methods[2].append(sprk2) -all_methods[2].append(sprk22) -all_methods[2].append(sprk222) -all_methods[3] = [] -all_methods[3].append(sprk3) -all_methods[3].append(sprk33) -all_methods[4] = [] -all_methods[4].append(sprk4) -all_methods[4].append(sprk44) -all_methods[5] = [] -all_methods[5].append(sprk5) -all_methods[6] = [] -all_methods[6].append(sprk6) -all_methods[8] = [] -all_methods[8].append(sprk8) -all_methods[10] = [] -all_methods[10].append(sprk10) +if 1 in orders: + all_methods[1] = [] + all_methods[1].append(sprk1) +if 2 in orders: + all_methods[2] = [] + all_methods[2].append(sprk2) + all_methods[2].append(sprk22) + all_methods[2].append(sprk222) +if 3 in orders: + all_methods[3] = [] + all_methods[3].append(sprk3) + all_methods[3].append(sprk33) +if 4 in orders: + all_methods[4] = [] + all_methods[4].append(sprk4) + all_methods[4].append(sprk44) +if 5 in orders: + all_methods[5] = [] + all_methods[5].append(sprk5) +if 6 in orders: + all_methods[6] = [] + all_methods[6].append(sprk6) +if 8 in orders: + all_methods[8] = [] + all_methods[8].append(sprk8) +if 10 in orders: + all_methods[10] = [] + all_methods[10].append(sprk10) -# Reference -reference = load_results('_erk-8') +# Reference solution +_, y_ref, _ = load_results('_erk-8') # # Solution error plot # -orders = [1, 2, 3, 4, 5, 6, 8, 10] for order in orders: plt.figure(dpi=200) legend = [] legend.append('$O(h^{%d})$' % order) order_line = np.power(step_sizes, order) plt.plot(np.array(step_sizes), np.array(order_line).T, 'k--') - _, y_ref, _ = reference for method in all_methods[order]: errs = [] dts = [] for d in method: _, y, _ = d['data'] err = np.linalg.norm(y - y_ref, np.inf) / np.linalg.norm(y_ref, np.inf) - print('method: %s, dt = %s' % (d['method'], d['dt'])) - print(np.max(y)) + print('method: %15s, dt = %.6f, err = %g' % (d['method'], d['dt'], err)) if err >= 10.: continue else: @@ -162,14 +168,12 @@ def load_results(case): # # Energy error plot # -orders = [1, 2, 3, 4, 5, 6, 8, 10] for order in orders: plt.figure(dpi=200) legend = [] legend.append('$O(h^{%d})$' % order) order_line = np.power(step_sizes, order) plt.plot(np.array(step_sizes), np.array(order_line).T, 'k--') - _, y_ref, _ = reference for method in all_methods[order]: errs = [] dts = [] @@ -178,6 +182,7 @@ def load_results(case): energy_0 = conserved[0,0] energy = conserved[:,0] err = np.linalg.norm(energy-energy_0, np.inf) + print('method: %15s, dt = %.6f, energy err = %g' % (d['method'], d['dt'], err)) if err >= 10.: continue else: @@ -193,4 +198,3 @@ def load_results(case): plt.legend(legend) plt.savefig('ark_kepler_energy_order%d.png' % order) plt.close() - diff --git a/examples/arkode/C_serial/ark_kepler_test_all_methods.c b/examples/arkode/C_serial/ark_kepler_test_all_methods.c deleted file mode 100644 index f2b12c218d..0000000000 --- a/examples/arkode/C_serial/ark_kepler_test_all_methods.c +++ /dev/null @@ -1,567 +0,0 @@ -/* ---------------------------------------------------------------- - * Programmer(s): Cody J. Balos @ LLNL - * ---------------------------------------------------------------- - * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security - * and Southern Methodist University. - * All rights reserved. - * - * See the top-level LICENSE and NOTICE files for details. - * - * SPDX-License-Identifier: BSD-3-Clause - * SUNDIALS Copyright End - * ---------------------------------------------------------------- - * We consider the perturbed Kepler problem - * dq/dt = [ p1 ] - * [ p2 ] - * dp/dt = [ -q1 / (q1^2 + q2^2)^(3/2) - delta*q1 / (q1^2 + q2^2)^(5/2) ] - * = [ -q2 / (q1^2 + q2^2)^(3/2) - delta*q2 / (q1^2 + q2^2)^(5/2) ] - * (delta = 0.015) with the initial conditions - * q(0) = [ 1 - e ], p(0) = [ 0 ] - * [ 0 ] [ sqrt((1+e)/(1-e)) ] - * where e = 0.6 is the eccentricity. - * - * The Hamiltonian for the system, - * H(p,q) = 1/2 * (p1^2 + p2^2) - 1/sqrt(q1^2 + q2^2) - * - 1/200 / (2 * sqrt(q1^2 + q2^2)^3)) - * is conserved as well as the angular momentum, - * L(p,q) = q1*p2 - q2*p1. - * - * We solve the problem by letting y = [ q, p ]^T then using - * ARKStep. - * - * References: - * Ernst Hairer, Christain Lubich, Gerhard Wanner - * Geometric Numerical Integration: Structure-Preserving - * Algorithms for Ordinary Differential Equations - * Springer, 2006, - * ISSN 0179-3632 - * ----------------------------------------------------------------*/ - -#include -#include -#include /* prototypes for MRIStep fcts., consts */ -#include /* prototypes for ARKStep fcts., consts */ -#include /* serial N_Vector type, fcts., macros */ -#include /* def. math fcns, 'sunrealtype' */ -#include "sundials/sundials_nonlinearsolver.h" -#include "sundials/sundials_nvector.h" -#include "sundials/sundials_types.h" -#include "sunnonlinsol/sunnonlinsol_fixedpoint.h" - -static int check_retval(void *returnvalue, const char *funcname, int opt); - -static void InitialConditions(N_Vector y0, sunrealtype ecc); -static sunrealtype Hamiltonian(N_Vector y); -static sunrealtype AngularMomentum(N_Vector y); - -static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); -static int dqdt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); -static int dpdt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); - -static sunrealtype Q(N_Vector yvec, sunrealtype alpha); -static sunrealtype G(N_Vector yvec, sunrealtype alpha); -static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, - sunrealtype h3, sunrealtype e1, sunrealtype e2, - sunrealtype e3, int q, int p, sunrealtype *hnew, - void *user_data); - -typedef struct { - sunrealtype ecc; - sunrealtype delta; - - /* for time-step control */ - sunrealtype eps; - sunrealtype alpha; - sunrealtype rho_nmhalf; - sunrealtype rho_nphalf; - sunrealtype rho_n; - sunrealtype rho_np1; - - FILE *hhist_fp; -} *UserData; - -int main(int argc, char* argv[]) -{ - SUNContext sunctx; - N_Vector y; - SUNNonlinearSolver NLS; - UserData udata; - sunrealtype tout, tret; - sunrealtype H0, L0; - void* arkode_mem; - FILE *conserved_fp, *solution_fp, *times_fp; - int argi, iout, retval; - - NLS = NULL; - y = NULL; - - /* Default problem parameters */ - const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(1000.0); - const sunrealtype ecc = SUN_RCONST(0.6); - // const sunrealtype delta = SUN_RCONST(0.015); // perturbed - const sunrealtype delta = SUN_RCONST(0.0); // unperturbed - - /* Default integrator Options */ - int step_mode = 0; - int method = 0; - int use_compsums = 0; - sunrealtype dt = SUN_RCONST(1e-2); - const sunrealtype dTout = dt; - // const sunrealtype dTout = SUN_RCONST(100.0); - const int num_output_times = (int) ceil(Tf/dTout); - - /* Parse CLI args */ - argi = 0; - if (argc > 1) { - step_mode = atoi(argv[++argi]); - } - if (argc > 2) { - method = atoi(argv[++argi]); - } - if (argc > 3) { - dt = atof(argv[++argi]); - } - if (argc > 4) { - use_compsums = atoi(argv[++argi]); - } - - /* Create the SUNDIALS context object for this simulation */ - retval = SUNContext_Create(NULL, &sunctx); - if (check_retval(&retval, "SUNContext_Create", 1)) return 1; - - const int num_orders = 12; - int orders[num_orders] = { 1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10 }; - - for (int test_idx = 0; test_idx < num_orders; test_idx++) { - int order = orders[test_idx]; - - /* Allocate our state vector */ - y = N_VNew_Serial(4, sunctx); - - /* Allocate and fill udata structure */ - udata = (UserData) malloc(sizeof(*udata)); - udata->ecc = ecc; - udata->delta = delta; - udata->alpha = SUN_RCONST(3.0)/SUN_RCONST(2.0); - udata->eps = dt; - udata->rho_n = SUN_RCONST(1.0); - - /* Fill the initial conditions */ - InitialConditions(y, ecc); - Tf = SUN_RCONST(1000.0); - - /* Create SPRKStep integrator where we treat dqdt explicitly and dpdt implicitly */ - if (method == 0) { - arkode_mem = SPRKStepCreate(dpdt, dqdt, T0, y, sunctx); - - retval = SPRKStepSetUseCompSums(arkode_mem, use_compsums); - if (check_retval(&retval, "SPRKStepSetUseCompSums", 1)) return 1; - - switch (order) { - case 1: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_EULER_1); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 2: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_LEAPFROG_2); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 22: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 222: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_2); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 3: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_RUTH_3); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 33: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_3); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 4: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_CANDY_ROZMUS_4); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 44: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_4); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 5: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_5); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 6: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_YOSHIDA_6); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 8: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_8); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 10: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_SOFRONIOU_10); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - default: - fprintf(stderr, "Not a valid method\n"); - return 1; - } - - if (step_mode == 0) { - retval = SPRKStepSetFixedStep(arkode_mem, dt); - if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - - retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); - if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; - } else { - /* Adaptivity based on [Hairer and Soderlind, 2005] */ - retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); - if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - - udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); - udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); - retval = SPRKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); - if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; - - retval = SPRKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); - if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; - } - - retval = SPRKStepSetUserData(arkode_mem, (void *) udata); - if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; - } else if (method >= 1) { - if (method == 1) { - arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); - - retval = ARKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - } else { - arkode_mem = ARKStepCreate(dqdt, dpdt, T0, y, sunctx); - - retval = ARKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - - NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); - ARKStepSetNonlinearSolver(arkode_mem, NLS); - } - - retval = ARKStepSetUserData(arkode_mem, (void *) udata); - if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - - retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); - if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - - if (step_mode == 0) { - retval = ARKStepSetFixedStep(arkode_mem, dt); - } else { - retval = ARKStepSStolerances(arkode_mem, SUN_RCONST(10e-12), SUN_RCONST(10e-14)); - if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; - } - } - - /* Open output files */ - if (method == 0) { - const char* fmt1 = "ark_kepler_conserved_sprk-%d-dt-%.6f.txt"; - const char* fmt2 = "ark_kepler_solution_sprk-%d-dt-%.6f.txt"; - const char* fmt3 = "ark_kepler_times_sprk-%d-dt-%.6f.txt"; - // const char* fmt4 = "ark_kepler_hhist_sprk-%d-dt-%.6f.txt"; - // const char* fmt1 = "ark_kepler_conserved_sprkinc-%d.txt"; - // const char* fmt2 = "ark_kepler_solution_sprkinc-%d.txt"; - // const char* fmt3 = "ark_kepler_times_sprkinc-%d.txt"; - char fname[64]; - sprintf(fname, fmt1, order, dt); - conserved_fp = fopen(fname, "w+"); - sprintf(fname, fmt2, order, dt); - solution_fp = fopen(fname, "w+"); - sprintf(fname, fmt3, order, dt); - times_fp = fopen(fname, "w+"); - // sprintf(fname, fmt4, order, dt); - // udata->hhist_fp = fopen(fname, "w+"); - } else { - const char* fmt1 = "ark_kepler_conserved_erk-%d-dt-%.6f.txt"; - const char* fmt2 = "ark_kepler_solution_erk-%d-dt-%.6f.txt"; - const char* fmt3 = "ark_kepler_times_erk-%d-dt-%.6f.txt"; - // const char* fmt4 = "ark_kepler_hhist_erk-%d-dt-%.6f.txt"; - char fname[64]; - sprintf(fname, fmt1, order, dt); - conserved_fp = fopen(fname, "w+"); - sprintf(fname, fmt2, order, dt); - solution_fp = fopen(fname, "w+"); - sprintf(fname, fmt3, order, dt); - times_fp = fopen(fname, "w+"); - // sprintf(fname, fmt4, order, dt); - // udata->hhist_fp = fopen(fname, "w+"); - } - - printf("\n Begin Kepler Problem\n\n"); - printf(" order: %d\n", order); - - /* Print out starting energy, momentum before integrating */ - tret = T0; - tout = T0+dTout; - H0 = Hamiltonian(y); - L0 = AngularMomentum(y); - fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf\n", tret, H0, L0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); - N_VPrintFile(y, solution_fp); - - /* Do integration */ - if (method == 0) { - for (iout = 0; iout < num_output_times; iout++) { - // SPRKStepSetStopTime(arkode_mem, tout); - - retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - - /* Output current integration status */ - // fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", - // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); - N_VPrintFile(y, solution_fp); - - /* Check if the solve was successful, if so, update the time and continue */ - if (retval >= 0) { - tout += dTout; - tout = (tout > Tf) ? Tf : tout; - } else { - fprintf(stderr, "Solver failure, stopping integration\n"); - break; - } - } - } else { - for (iout = 0; iout < num_output_times; iout++) { - ARKStepSetStopTime(arkode_mem, tout); - if (step_mode == 3) { - while(tret < tout) { - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - if (retval < 0) break; - - /* Output current integration status */ - // fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - // Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); - N_VPrintFile(y, solution_fp); - } - } else { - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - - /* Output current integration status */ - // fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - // tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - // Q(y, udata->alpha)/udata->rho_np1-Q0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); - N_VPrintFile(y, solution_fp); - } - - /* Check if the solve was successful, if so, update the time and continue */ - if (retval >= 0) { - tout += dTout; - tout = (tout > Tf) ? Tf : tout; - } else { - fprintf(stderr, "Solver failure, stopping integration\n"); - break; - } - } - } - - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", - tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0); - - // fclose(udata->hhist_fp); - free(udata); - fclose(times_fp); - fclose(conserved_fp); - fclose(solution_fp); - if (NLS) { - SUNNonlinSolFree(NLS); - } - N_VDestroy(y); - if (method == 0) { - SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - SPRKStepFree(&arkode_mem); - } else { - ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - ARKStepFree(&arkode_mem); - } - } - - SUNContext_Free(&sunctx); - - return 0; -} - -void InitialConditions(N_Vector y0vec, sunrealtype ecc) -{ - const sunrealtype zero = SUN_RCONST(0.0); - const sunrealtype one = SUN_RCONST(1.0); - sunrealtype* y0 = N_VGetArrayPointer(y0vec); - - y0[0] = one - ecc; - y0[1] = zero; - y0[2] = zero; - y0[3] = SUNRsqrt((one + ecc)/(one - ecc)); -} - -sunrealtype Hamiltonian(N_Vector yvec) -{ - sunrealtype H = 0.0; - sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype sqrt_qTq = SUNRsqrt(y[0]*y[0] + y[1]*y[1]); - const sunrealtype pTp = y[2]*y[2] + y[3]*y[3]; - - // Perturbed - // H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq - // - SUN_RCONST(0.005) / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) / SUN_RCONST(2.0); - - // Unperturbed - H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq; - - return H; -} - -sunrealtype AngularMomentum(N_Vector yvec) -{ - sunrealtype L = 0.0; - sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype q1 = y[0]; - const sunrealtype q2 = y[1]; - const sunrealtype p1 = y[2]; - const sunrealtype p2 = y[3]; - - L = q1*p2 - q2*p1; - - return L; -} - -int dydt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) -{ - int retval = 0; - - retval += dpdt(t, yvec, ydotvec, user_data); - retval += dqdt(t, yvec, ydotvec, user_data); - - return retval; -} - -int dqdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) -{ - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - const sunrealtype p1 = y[2]; - const sunrealtype p2 = y[3]; - - ydot[0] = p1; - ydot[1] = p2; - // ydot[2] = ydot[3] = SUN_RCONST(0.0); - - return 0; -} - -int dpdt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) -{ - UserData udata = (UserData) user_data; - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - const sunrealtype delta = udata->delta; - const sunrealtype q1 = y[0]; - const sunrealtype q2 = y[1]; - const sunrealtype sqrt_qTq = SUNRsqrt(q1*q1 + q2*q2); - - // ydot[0] = ydot[1] = SUN_RCONST(0.0); - ydot[2] = - q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) - - delta * q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(5.0)); - ydot[3] = - q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) - - delta * q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(5.0)); - - return 0; -} - -sunrealtype G(N_Vector yvec, sunrealtype alpha) -{ - sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype q1 = y[0]; - const sunrealtype q2 = y[1]; - const sunrealtype p1 = y[2]; - const sunrealtype p2 = y[3]; - - const sunrealtype pTq = p1*q1 + p2*q2; - const sunrealtype qTq = q1*q1 + q2*q2; - - return (-alpha * pTq / qTq); -} - -sunrealtype Q(N_Vector yvec, sunrealtype alpha) -{ - sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype q1 = y[0]; - const sunrealtype q2 = y[1]; - - const sunrealtype qTq = q1*q1 + q2*q2; - - return SUNRpowerR(qTq, -alpha/SUN_RCONST(2.0)); -} - -int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, - sunrealtype h3, sunrealtype e1, sunrealtype e2, - sunrealtype e3, int q, int p, sunrealtype *hnew, - void *user_data) -{ - UserData udata = (UserData) user_data; - - // fprintf(udata->hhist_fp, "%.16Lf\n", h1); - - const sunrealtype G_np1 = G(y, udata->alpha); - udata->rho_np1 = udata->rho_nphalf + udata->eps*G_np1/SUN_RCONST(2.0); - - udata->rho_nmhalf = udata->rho_nphalf; - const sunrealtype rho_nphalf_next = udata->rho_nmhalf + udata->eps*G_np1; - - *hnew = udata->eps/rho_nphalf_next; - - return 0; -} - -/* Check function return value... - opt == 0 means SUNDIALS function allocates memory so check if - returned NULL pointer - opt == 1 means SUNDIALS function returns a retval so check if - retval < 0 - opt == 2 means function allocates memory so check if returned - NULL pointer -*/ -int check_retval(void *returnvalue, const char *funcname, int opt) -{ - int *retval; - - /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ - if (opt == 0 && returnvalue == NULL) { - fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed - returned NULL pointer\n\n", - funcname); - return 1; } - - /* Check if retval < 0 */ - else if (opt == 1) { - retval = (int *) returnvalue; - if (*retval < 0) { - fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed with retval = %d\n\n", - funcname, *retval); - return 1; }} - - /* Check if function returned NULL pointer - no memory allocated */ - else if (opt == 2 && returnvalue == NULL) { - fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", - funcname); - return 1; } - - return 0; -} diff --git a/examples/arkode/C_serial/ark_kepler_test_convergence.sh b/examples/arkode/C_serial/ark_kepler_test_convergence.sh new file mode 100755 index 0000000000..32ba6d8110 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_test_convergence.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# generate reference solution - use 8th order ERK method and near roundoff tolerances +./ark_kepler 1 1 8 + +orders=(1 2 22 222 3 33 4 44 5 6 8 10) +dts=(0.1 0.01 0.001 0.0001) +for order in ${orders[@]}; +do + for dt in ${dts[@]}; + do + # ./ark_kepler 0 0 $order $dt 0 # no compensated sums + ./ark_kepler 0 0 $order $dt 1 # compensated sums + done +done + +# plot +./ark_kepler_plot_order_work.py diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index cc57e95bff..7f157a0492 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -45,8 +45,11 @@ struct ARKodeSPRKMem_s { int q; /* method order of accuracy */ int stages; /* number of stages */ - sunrealtype* a; /* coefficients multiplying T' */ - sunrealtype* b; /* coefficients multiplying -V' */ + sunrealtype* a; /* coefficients multiplying q' */ + sunrealtype* b; /* coefficients multiplying p' */ + + /* the a_i coefficients generate the explicit Butcher table */ + /* the b_i coefficients generate the diagonally-implicit Butcher table */ }; diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 662bed92f6..1fa7e9994a 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -85,7 +85,7 @@ SUNDIALS_EXPORT int SPRKStepResFtolerance(void *arkode_mem, /* Optional input functions -- must be called AFTER SPRKStepCreate */ SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetOptimalParams(void *arkode_mem); -SUNDIALS_EXPORT int SPRKStepSetUseCompSums(void *arkode_mem, sunbooleantype onoff); +SUNDIALS_EXPORT int SPRKStepSetUseCompensatedSums(void *arkode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int SPRKStepSetMethod(void *arkode_mem, ARKODE_SPRKMethodID id); SUNDIALS_EXPORT int SPRKStepSetOrder(void *arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void *arkode_mem, int itype); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 2783c63d47..2f898e0200 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -952,10 +952,10 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, (ark_mem->tcur-tout)*ark_mem->h >= ZERO ) { istate = ARK_SUCCESS; ark_mem->tretlast = *tret = tout; - // /* Only use dense output when we tcur is not within 10*eps of tout already.*/ - // if (SUNRCompare(ark_mem->tcur - tout, ZERO)) { - // (void) arkGetDky(ark_mem, tout, 0, yout); - // } + /* Only use dense output when we tcur is not within 10*eps of tout already.*/ + if (SUNRCompare(ark_mem->tcur - tout, ZERO)) { + (void) arkGetDky(ark_mem, tout, 0, yout); + } ark_mem->next_h = ark_mem->hprime; break; } @@ -965,10 +965,10 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, troundoff = FUZZ_FACTOR*ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); if (SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { - // /* Only use dense output when we tcur is not within 10*eps of tstop already.*/ - // if (SUNRCompare(ark_mem->tcur - ark_mem->tstop, ZERO)) { - // (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); - // } + /* Only use dense output when we tcur is not within 10*eps of tstop already.*/ + if (SUNRCompare(ark_mem->tcur - ark_mem->tstop, ZERO)) { + (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); + } ark_mem->tretlast = *tret = ark_mem->tstop; ark_mem->tstopset = SUNFALSE; istate = ARK_TSTOP_RETURN; @@ -2374,14 +2374,20 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) int retval, mode; realtype troundoff; - /* Set current time to the end of the step (in case the last stage time does not coincide with the step solution time). If tstop is enabled, it is possible for tn + h to be past tstop by roundoff, and in that case, we reset tn (after incrementing by h) to tstop. */ - // compensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); /* TODO(CJB): I am guessing we would want this to be optional, but perhaps performance comparisons should be done (with small problems). */ - ark_mem->tcur = ark_mem->tn + ark_mem->h; + + /* During long-time integration, roundoff can creep into tcur. + Compensated summation fixes this but with increased cost, so it is optional. */ + if (ark_mem->use_compensated_sums) { + compensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); + } else { + ark_mem->tcur = ark_mem->tn + ark_mem->h; + } + if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR * ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 82fed13c41..a22681de00 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -413,6 +413,8 @@ typedef struct ARKodeMemRec { /* User-supplied stage solution post-processing function */ ARKPostProcessFn ProcessStage; + sunbooleantype use_compensated_sums; + /* XBraid interface variables */ booleantype force_pass; /* when true the step attempt loop will ignore the return value (kflag) from arkCheckTemporalError @@ -1003,6 +1005,7 @@ int arkSetMaxCFailGrowth(void *arkode_mem, realtype etacf); int arkSetStabilityFn(void *arkode_mem, ARKExpStabFn EStab, void *estab_data); int arkSetMaxErrTestFails(void *arkode_mem, int maxnef); int arkSetMaxConvFails(void *arkode_mem, int maxncf); +int arkSetUseCompensatedSums(void *arkode_mem, sunbooleantype onoff); int arkGetWorkSpace(void *arkode_mem, long int *lenrw, long int *leniw); int arkGetNumStepAttempts(void *arkode_mem, long int *nstep_attempts); int arkGetNumSteps(void *arkode_mem, long int *nsteps); diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index aadc4044f4..f6afbdca1a 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -51,6 +51,7 @@ int arkSetDefaults(void *arkode_mem) ark_mem = (ARKodeMem) arkode_mem; /* Set default values for integrator optional inputs */ + ark_mem->use_compensated_sums = SUNFALSE; ark_mem->fixedstep = SUNFALSE; /* default to use adaptive steps */ ark_mem->reltol = RCONST(1.e-4); /* relative tolerance */ ark_mem->itol = ARK_SS; /* scalar-scalar solution tolerances */ @@ -1258,6 +1259,31 @@ int arkSetMaxConvFails(void *arkode_mem, int maxncf) return(ARK_SUCCESS); } +/*--------------------------------------------------------------- + arkSetUseCompensatedSums: + + Specifies that ARKODE should use compensated (Kahan) summation + where relevant to mitigate roundoff error. + ---------------------------------------------------------------*/ +int arkSetUseCompensatedSums(void *arkode_mem, sunbooleantype onoff) +{ + ARKodeMem ark_mem; + if (arkode_mem==NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE", + "arkSetUseCompensatedSums", MSG_ARK_NO_MEM); + return(ARK_MEM_NULL); + } + ark_mem = (ARKodeMem) arkode_mem; + + /* argument <= 0 sets default, otherwise set input */ + if (onoff) { + ark_mem->use_compensated_sums = SUNTRUE; + } else { + ark_mem->use_compensated_sums = SUNFALSE; + } + + return(ARK_SUCCESS); +} /*=============================================================== diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 2f3f8f27e1..271bdb85ea 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -743,8 +743,7 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; - ARKodeSPRKMem method_mem; - N_Vector prev_stage; + N_Vector prev_stage, curr_stage; int retval, is; /* access ARKodeSPRKStepMem structure */ @@ -752,14 +751,35 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - method_mem = step_mem->method; - prev_stage = ark_mem->yn; - for (is = 0; is < method_mem->stages; is++) { - retval = sprkStep_SPRKStage(ark_mem, step_mem, prev_stage, - method_mem->b[is], method_mem->a[is], ark_mem->ycur); - if (retval != ARK_SUCCESS) return(retval); - prev_stage = ark_mem->ycur; + curr_stage = ark_mem->ycur; + for (is = 0; is < step_mem->method->stages; is++) { + sunrealtype ai = step_mem->method->a[is]; + sunrealtype bi = step_mem->method->b[is]; + + /* Set current stage time(s) */ + ark_mem->tcur = ark_mem->tn + ai*ark_mem->h; + + /* Evaluate p' with the previous velocity */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_f1(step_mem, ark_mem->tcur, prev_stage, step_mem->sdata, ark_mem->user_data); + if (retval != 0) return ARK_RHSFUNC_FAIL; + + /* Position update */ + N_VLinearSum(ONE, prev_stage, ark_mem->h*bi, step_mem->sdata, curr_stage); + + /* Evaluate q' with the current positions */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + retval = sprkStep_f2(step_mem, ark_mem->tcur, curr_stage, step_mem->sdata, ark_mem->user_data); + if (retval != 0) return ARK_RHSFUNC_FAIL; + + /* Velocity update */ + N_VLinearSum(ONE, curr_stage, ark_mem->h*ai, step_mem->sdata, curr_stage); + + /* keep track of the stage number */ + step_mem->istage++; + + prev_stage = curr_stage; } *nflagPtr = 0; @@ -804,13 +824,13 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflag [ ] + [ ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); - /* evaluate Fi with previous stage increment */ + /* Evaluate p' with the previous velocity */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ retval = sprkStep_f1(step_mem, ark_mem->tcur, yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); if (retval != 0) return(ARK_RHSFUNC_FAIL); - /* update the implicit stage + /* Incremental position update: [ ] = [ ] + [ ] [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->b[is], step_mem->sdata, delta_Yi); @@ -819,13 +839,13 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflag [ p_n ] + [ \Delta P_i ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); - /* evaluate Fe with the current p_n + \Delta P_i */ + /* Evaluate q' with the current positions */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ retval = sprkStep_f2(step_mem, ark_mem->tn + method->a[is]*ark_mem->h, yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); if (retval != 0) return(ARK_RHSFUNC_FAIL); - /* update the explicit stage + /* Incremental velocity update: [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] [ ] = [ ] + [ ] */ N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->a[is], step_mem->sdata, delta_Yi); @@ -894,33 +914,3 @@ booleantype sprkStep_CheckNVector(N_Vector tmpl) return(SUNFALSE); return(SUNTRUE); } - -int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector prev_stage, - sunrealtype bi, sunrealtype ai, N_Vector stage_result) -{ - int retval = 0; - - /* set current stage time(s) */ - ark_mem->tcur = ark_mem->tn + bi*ark_mem->h; - - /* evaluate f_1 at the previous stage value */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tcur, prev_stage, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return ARK_RHSFUNC_FAIL; - - /* update ycur with the q stage */ - N_VLinearSum(ONE, prev_stage, ark_mem->h*bi, step_mem->sdata, stage_result); - - /* evaluate f_2 with the stage value for q */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f1(step_mem, ark_mem->tn + ai*ark_mem->h, stage_result, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return ARK_RHSFUNC_FAIL; - - /* update ycur with the stage value for p */ - N_VLinearSum(ONE, stage_result, ark_mem->h*ai, step_mem->sdata, stage_result); - - /* keep track of the stage number */ - step_mem->istage++; - - return ARK_SUCCESS; -} diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 5b3ec24b3b..32c271397a 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -76,10 +76,10 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflag int sprkStep_AccessStepMem(void* arkode_mem, const char *fname, ARKodeMem *ark_mem, ARKodeSPRKStepMem *step_mem); booleantype sprkStep_CheckNVector(N_Vector tmpl); +/* f1 = p' (Force evaluation) */ int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f1, void* user_data); +/* f2 = q' (Velocity evaluation) */ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f2, void* user_data); -int sprkStep_SPRKStage(ARKodeMem ark_mem, ARKodeSPRKStepMem step_mem, N_Vector prev_stage, - sunrealtype bi, sunrealtype Bi, N_Vector stage_result); // /* private functions for interfacing with MRIStep */ // int sprkStep_SetInnerForcing(void* arkode_mem, realtype tshift, realtype tscale, diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 58079ddbfe..6dd6d01575 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -227,11 +227,11 @@ int SPRKStepSetDefaults(void* arkode_mem) } /*--------------------------------------------------------------- - SPRKStepSetUseCompSums: + SPRKStepSetUseCompensatedSums: Turns on/off compensated summation in SPRKStep and ARKODE. ---------------------------------------------------------------*/ -int SPRKStepSetUseCompSums(void *arkode_mem, sunbooleantype onoff) +int SPRKStepSetUseCompensatedSums(void *arkode_mem, sunbooleantype onoff) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -243,8 +243,10 @@ int SPRKStepSetUseCompSums(void *arkode_mem, sunbooleantype onoff) if (retval != ARK_SUCCESS) { return(retval); } if (onoff) { + arkSetUseCompensatedSums(arkode_mem, SUNTRUE); ark_mem->step = sprkStep_TakeStep_Compensated; } else { + arkSetUseCompensatedSums(arkode_mem, SUNFALSE); ark_mem->step = sprkStep_TakeStep; } From a4e952405bd8f07f5617791d1bd8e240bc039576 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 11:00:11 -0700 Subject: [PATCH 032/177] various cleanup of unused functions --- examples/arkode/C_serial/ark_kepler.c | 29 +- .../C_serial/ark_kepler_test_convergence.sh | 4 +- include/arkode/arkode.h | 1 + include/arkode/arkode_sprk.h | 2 + include/arkode/arkode_sprkstep.h | 298 ++++------ src/arkode/arkode.c | 7 +- src/arkode/arkode_io.c | 10 +- src/arkode/arkode_sprk.c | 2 + src/arkode/arkode_sprkstep.c | 405 +++++-------- src/arkode/arkode_sprkstep_io.c | 560 +++++++++++------- 10 files changed, 627 insertions(+), 691 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index ffa6d90a0d..b9eb656844 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -44,6 +44,7 @@ #include /* prototypes for ARKStep fcts., consts */ #include /* serial N_Vector type, fcts., macros */ #include /* def. math fcns, 'sunrealtype' */ +#include "arkode/arkode_sprk.h" #include "sundials/sundials_nonlinearsolver.h" #include "sundials/sundials_nvector.h" #include "sundials/sundials_types.h" @@ -156,51 +157,51 @@ int main(int argc, char* argv[]) switch (order) { case 1: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_EULER_1); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticEuler()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 2: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_LEAPFROG_2); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticLeapfrog2()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 22: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticPseudoLeapfrog2()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 222: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_2); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan2()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 3: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_RUTH_3); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan3()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 33: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_3); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 4: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_CANDY_ROZMUS_4); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticCandyRozmus4()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 44: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_4); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 5: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_5); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan5()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 6: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_YOSHIDA_6); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticYoshida6()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 8: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_MCLACHLAN_8); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan8()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 10: - retval = SPRKStepSetMethod(arkode_mem, ARKODE_SYMPLECTIC_SOFRONIOU_10); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticSofroniou10()); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; default: @@ -258,7 +259,7 @@ int main(int argc, char* argv[]) if (step_mode == 0) { retval = ARKStepSetFixedStep(arkode_mem, dt); } else { - retval = ARKStepSStolerances(arkode_mem, 10*SUN_UNIT_ROUNDOFF, 10*SUN_UNIT_ROUNDOFF); + retval = ARKStepSStolerances(arkode_mem, 100*SUN_UNIT_ROUNDOFF, 100*SUN_UNIT_ROUNDOFF); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } } @@ -311,7 +312,7 @@ int main(int argc, char* argv[]) /* Do integration */ if (method == 0) { for (iout = 0; iout < num_output_times; iout++) { - // SPRKStepSetStopTime(arkode_mem, tout); + SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ diff --git a/examples/arkode/C_serial/ark_kepler_test_convergence.sh b/examples/arkode/C_serial/ark_kepler_test_convergence.sh index 32ba6d8110..8cf79937fa 100755 --- a/examples/arkode/C_serial/ark_kepler_test_convergence.sh +++ b/examples/arkode/C_serial/ark_kepler_test_convergence.sh @@ -1,7 +1,7 @@ #!/bin/bash -# generate reference solution - use 8th order ERK method and near roundoff tolerances -./ark_kepler 1 1 8 +# generate reference solution - use 8th order ERK method with tiny timestep +./ark_kepler 1 0 8 0.000001 orders=(1 2 22 222 3 33 4 44 5 6 8 10) dts=(0.1 0.01 0.001 0.0001) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index be8bd7a543..6f54177e7f 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -67,6 +67,7 @@ extern "C" { /* interpolation module types */ #define ARK_INTERP_HERMITE 0 #define ARK_INTERP_LAGRANGE 1 +#define ARK_INTERP_NONE 2 /* return values */ diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 7f157a0492..6ded500e20 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -69,12 +69,14 @@ ARKodeSPRKMem ARKodeSymplecticEuler(); ARKodeSPRKMem ARKodeSymplecticLeapfrog2(); ARKodeSPRKMem ARKodeSymplecticPseudoLeapfrog2(); ARKodeSPRKMem ARKodeSymplecticRuth3(); +ARKodeSPRKMem ARKodeSymplecticCandyRozmus4(); ARKodeSPRKMem ARKodeSymplecticMcLachlan2(); ARKodeSPRKMem ARKodeSymplecticMcLachlan3(); ARKodeSPRKMem ARKodeSymplecticMcLachlan4(); ARKodeSPRKMem ARKodeSymplecticMcLachlan5(); ARKodeSPRKMem ARKodeSymplecticYoshida6(); ARKodeSPRKMem ARKodeSymplecticMcLachlan8(); +ARKodeSPRKMem ARKodeSymplecticSofroniou10(); #ifdef __cplusplus } diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 1fa7e9994a..3692710e69 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -17,14 +17,14 @@ #ifndef _SPRKSTEP_H #define _SPRKSTEP_H -#include -#include -#include #include #include #include +#include +#include +#include -#ifdef __cplusplus /* wrapper to enable C++ usage */ +#ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif @@ -32,13 +32,13 @@ extern "C" { * SPRKStep Constants * ----------------- */ -static const int SPRKSTEP_DEFAULT_1 = ARKODE_SYMPLECTIC_EULER_1; -static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_MCLACHLAN_2; -static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_MCLACHLAN_3; -static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLACHLAN_4; -static const int SPRKSTEP_DEFAULT_5 = ARKODE_SYMPLECTIC_MCLACHLAN_5; -static const int SPRKSTEP_DEFAULT_6 = ARKODE_SYMPLECTIC_YOSHIDA_6; -static const int SPRKSTEP_DEFAULT_8 = ARKODE_SYMPLECTIC_MCLACHLAN_8; +static const int SPRKSTEP_DEFAULT_1 = ARKODE_SYMPLECTIC_EULER_1; +static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_MCLACHLAN_2; +static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_MCLACHLAN_3; +static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLACHLAN_4; +static const int SPRKSTEP_DEFAULT_5 = ARKODE_SYMPLECTIC_MCLACHLAN_5; +static const int SPRKSTEP_DEFAULT_6 = ARKODE_SYMPLECTIC_YOSHIDA_6; +static const int SPRKSTEP_DEFAULT_8 = ARKODE_SYMPLECTIC_MCLACHLAN_8; static const int SPRKSTEP_DEFAULT_10 = ARKODE_SYMPLECTIC_SOFRONIOU_10; /* ------------------- @@ -46,194 +46,142 @@ static const int SPRKSTEP_DEFAULT_10 = ARKODE_SYMPLECTIC_SOFRONIOU_10; * ------------------- */ /* Create, Resize, and Reinitialization functions */ -SUNDIALS_EXPORT void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, - realtype t0, N_Vector y0, - SUNContext sunctx); +SUNDIALS_EXPORT void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, + N_Vector y0, SUNContext sunctx); -SUNDIALS_EXPORT int SPRKStepResize(void *arkode_mem, N_Vector ynew, +SUNDIALS_EXPORT int SPRKStepResize(void* arkode_mem, N_Vector ynew, realtype hscale, realtype t0, - ARKVecResizeFn resize, - void *resize_data); + ARKVecResizeFn resize, void* resize_data); -SUNDIALS_EXPORT int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0); +SUNDIALS_EXPORT int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, + realtype t0, N_Vector y0); SUNDIALS_EXPORT int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR); -/* Tolerance input functions */ -SUNDIALS_EXPORT int SPRKStepSStolerances(void *arkode_mem, - realtype reltol, - realtype abstol); -SUNDIALS_EXPORT int SPRKStepSVtolerances(void *arkode_mem, - realtype reltol, - N_Vector abstol); -SUNDIALS_EXPORT int SPRKStepWFtolerances(void *arkode_mem, - ARKEwtFn efun); - -/* Residual tolerance input functions */ -SUNDIALS_EXPORT int SPRKStepResStolerance(void *arkode_mem, - realtype rabstol); -SUNDIALS_EXPORT int SPRKStepResVtolerance(void *arkode_mem, - N_Vector rabstol); -SUNDIALS_EXPORT int SPRKStepResFtolerance(void *arkode_mem, - ARKRwtFn rfun); - -// SUNDIALS_EXPORT int SPRKStepSetMassLinearSolver(void *arkode_mem, -// SUNLinearSolver LS, -// SUNMatrix M, -// booleantype time_dep); - /* Optional input functions -- must be called AFTER SPRKStepCreate */ SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); -SUNDIALS_EXPORT int SPRKStepSetOptimalParams(void *arkode_mem); -SUNDIALS_EXPORT int SPRKStepSetUseCompensatedSums(void *arkode_mem, sunbooleantype onoff); -SUNDIALS_EXPORT int SPRKStepSetMethod(void *arkode_mem, ARKODE_SPRKMethodID id); -SUNDIALS_EXPORT int SPRKStepSetOrder(void *arkode_mem, int maxord); -SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void *arkode_mem, int itype); -SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void *arkode_mem, int degree); -SUNDIALS_EXPORT int SPRKStepSetDenseOrder(void *arkode_mem, int dord); - -SUNDIALS_EXPORT int SPRKStepSetSafetyFactor(void *arkode_mem, - realtype safety); -SUNDIALS_EXPORT int SPRKStepSetErrorBias(void *arkode_mem, - realtype bias); -SUNDIALS_EXPORT int SPRKStepSetMaxGrowth(void *arkode_mem, - realtype mx_growth); -SUNDIALS_EXPORT int SPRKStepSetMinReduction(void *arkode_mem, - realtype eta_min); -SUNDIALS_EXPORT int SPRKStepSetFixedStepBounds(void *arkode_mem, - realtype lb, realtype ub); -SUNDIALS_EXPORT int SPRKStepSetAdaptivityMethod(void *arkode_mem, - int imethod, - int idefault, int pq, - realtype adapt_params[3]); -SUNDIALS_EXPORT int SPRKStepSetAdaptivityFn(void *arkode_mem, - ARKAdaptFn hfun, - void *h_data); -SUNDIALS_EXPORT int SPRKStepSetMaxFirstGrowth(void *arkode_mem, - realtype etamx1); -SUNDIALS_EXPORT int SPRKStepSetMaxEFailGrowth(void *arkode_mem, - realtype etamxf); -SUNDIALS_EXPORT int SPRKStepSetSmallNumEFails(void *arkode_mem, - int small_nef); -SUNDIALS_EXPORT int SPRKStepSetMaxCFailGrowth(void *arkode_mem, - realtype etacf); -SUNDIALS_EXPORT int SPRKStepSetNonlinCRDown(void *arkode_mem, - realtype crdown); -SUNDIALS_EXPORT int SPRKStepSetNonlinRDiv(void *arkode_mem, - realtype rdiv); -SUNDIALS_EXPORT int SPRKStepSetStabilityFn(void *arkode_mem, - ARKExpStabFn EStab, - void *estab_data); -SUNDIALS_EXPORT int SPRKStepSetMaxErrTestFails(void *arkode_mem, - int maxnef); -SUNDIALS_EXPORT int SPRKStepSetMaxNumSteps(void *arkode_mem, - long int mxsteps); -SUNDIALS_EXPORT int SPRKStepSetMaxHnilWarns(void *arkode_mem, - int mxhnil); -SUNDIALS_EXPORT int SPRKStepSetInitStep(void *arkode_mem, - realtype hin); -SUNDIALS_EXPORT int SPRKStepSetMinStep(void *arkode_mem, - realtype hmin); -SUNDIALS_EXPORT int SPRKStepSetMaxStep(void *arkode_mem, - realtype hmax); -SUNDIALS_EXPORT int SPRKStepSetStopTime(void *arkode_mem, - realtype tstop); -SUNDIALS_EXPORT int SPRKStepSetFixedStep(void *arkode_mem, - realtype hfixed); -SUNDIALS_EXPORT int SPRKStepSetErrHandlerFn(void *arkode_mem, - ARKErrHandlerFn ehfun, - void *eh_data); -SUNDIALS_EXPORT int SPRKStepSetErrFile(void *arkode_mem, - FILE *errfp); -SUNDIALS_EXPORT int SPRKStepSetUserData(void *arkode_mem, - void *user_data); - -SUNDIALS_EXPORT int SPRKStepSetPostprocessStepFn(void *arkode_mem, - ARKPostProcessFn ProcessStep); -SUNDIALS_EXPORT int SPRKStepSetPostprocessStageFn(void *arkode_mem, - ARKPostProcessFn ProcessStage); +SUNDIALS_EXPORT int SPRKStepSetOptimalParams(void* arkode_mem); +SUNDIALS_EXPORT int SPRKStepSetUseCompensatedSums(void* arkode_mem, + sunbooleantype onoff); +SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem); +SUNDIALS_EXPORT int SPRKStepSetOrder(void* arkode_mem, int maxord); +SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); +SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree); +SUNDIALS_EXPORT int SPRKStepSetDenseOrder(void* arkode_mem, int dord); + +// SUNDIALS_EXPORT int SPRKStepSetSafetyFactor(void *arkode_mem, +// realtype safety); +// SUNDIALS_EXPORT int SPRKStepSetErrorBias(void *arkode_mem, +// realtype bias); +// SUNDIALS_EXPORT int SPRKStepSetMaxGrowth(void *arkode_mem, +// realtype mx_growth); +// SUNDIALS_EXPORT int SPRKStepSetMinReduction(void *arkode_mem, +// realtype eta_min); +// SUNDIALS_EXPORT int SPRKStepSetFixedStepBounds(void *arkode_mem, +// realtype lb, realtype ub); +// SUNDIALS_EXPORT int SPRKStepSetAdaptivityMethod(void *arkode_mem, +// int imethod, +// int idefault, int pq, +// realtype adapt_params[3]); +SUNDIALS_EXPORT int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, + void* h_data); +// SUNDIALS_EXPORT int SPRKStepSetMaxFirstGrowth(void *arkode_mem, +// realtype etamx1); +// SUNDIALS_EXPORT int SPRKStepSetMaxEFailGrowth(void *arkode_mem, +// realtype etamxf); +// SUNDIALS_EXPORT int SPRKStepSetSmallNumEFails(void *arkode_mem, +// int small_nef); +// SUNDIALS_EXPORT int SPRKStepSetMaxCFailGrowth(void *arkode_mem, +// realtype etacf); +// SUNDIALS_EXPORT int SPRKStepSetNonlinCRDown(void *arkode_mem, +// realtype crdown); +// SUNDIALS_EXPORT int SPRKStepSetNonlinRDiv(void *arkode_mem, +// realtype rdiv); +SUNDIALS_EXPORT int SPRKStepSetStabilityFn(void* arkode_mem, ARKExpStabFn EStab, + void* estab_data); +SUNDIALS_EXPORT int SPRKStepSetMaxErrTestFails(void* arkode_mem, int maxnef); +SUNDIALS_EXPORT int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps); +SUNDIALS_EXPORT int SPRKStepSetMaxHnilWarns(void* arkode_mem, int mxhnil); +SUNDIALS_EXPORT int SPRKStepSetInitStep(void* arkode_mem, realtype hin); +SUNDIALS_EXPORT int SPRKStepSetMinStep(void* arkode_mem, realtype hmin); +SUNDIALS_EXPORT int SPRKStepSetMaxStep(void* arkode_mem, realtype hmax); +SUNDIALS_EXPORT int SPRKStepSetStopTime(void* arkode_mem, realtype tstop); +SUNDIALS_EXPORT int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed); +SUNDIALS_EXPORT int SPRKStepSetErrHandlerFn(void* arkode_mem, + ARKErrHandlerFn ehfun, void* eh_data); +SUNDIALS_EXPORT int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp); +SUNDIALS_EXPORT int SPRKStepSetUserData(void* arkode_mem, void* user_data); + +SUNDIALS_EXPORT int SPRKStepSetPostprocessStepFn(void* arkode_mem, + ARKPostProcessFn ProcessStep); +SUNDIALS_EXPORT int SPRKStepSetPostprocessStageFn(void* arkode_mem, + ARKPostProcessFn ProcessStage); /* Integrate the ODE over an interval in t */ -SUNDIALS_EXPORT int SPRKStepEvolve(void *arkode_mem, realtype tout, - N_Vector yout, realtype *tret, - int itask); +SUNDIALS_EXPORT int SPRKStepEvolve(void* arkode_mem, realtype tout, + N_Vector yout, realtype* tret, int itask); /* Computes the kth derivative of the y function at time t */ -SUNDIALS_EXPORT int SPRKStepGetDky(void *arkode_mem, realtype t, - int k, N_Vector dky); +SUNDIALS_EXPORT int SPRKStepGetDky(void* arkode_mem, realtype t, int k, + N_Vector dky); /* Optional output functions */ -SUNDIALS_EXPORT int SPRKStepGetNumExpSteps(void *arkode_mem, - long int *expsteps); -SUNDIALS_EXPORT int SPRKStepGetNumAccSteps(void *arkode_mem, - long int *accsteps); -SUNDIALS_EXPORT int SPRKStepGetNumStepAttempts(void *arkode_mem, - long int *step_attempts); -SUNDIALS_EXPORT int SPRKStepGetNumRhsEvals(void *arkode_mem, long int* nf1, long int* nf2); -SUNDIALS_EXPORT int SPRKStepGetNumErrTestFails(void *arkode_mem, - long int *netfails); -SUNDIALS_EXPORT int SPRKStepGetEstLocalErrors(void *arkode_mem, - N_Vector ele); -SUNDIALS_EXPORT int SPRKStepGetWorkSpace(void *arkode_mem, - long int *lenrw, - long int *leniw); -SUNDIALS_EXPORT int SPRKStepGetNumSteps(void *arkode_mem, - long int *nsteps); -SUNDIALS_EXPORT int SPRKStepGetActualInitStep(void *arkode_mem, - realtype *hinused); -SUNDIALS_EXPORT int SPRKStepGetLastStep(void *arkode_mem, - realtype *hlast); -SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void *arkode_mem, - realtype *hcur); -SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void *arkode_mem, - realtype *tcur); -SUNDIALS_EXPORT int SPRKStepGetCurrentState(void *arkode_mem, - N_Vector *state); -SUNDIALS_EXPORT int SPRKStepGetCurrentGamma(void *arkode_mem, - realtype *gamma); -SUNDIALS_EXPORT int SPRKStepGetCurrentMassMatrix(void *arkode_mem, - SUNMatrix *M); -SUNDIALS_EXPORT int SPRKStepGetTolScaleFactor(void *arkode_mem, - realtype *tolsfac); -SUNDIALS_EXPORT int SPRKStepGetErrWeights(void *arkode_mem, - N_Vector eweight); -SUNDIALS_EXPORT int SPRKStepGetResWeights(void *arkode_mem, - N_Vector rweight); -SUNDIALS_EXPORT int SPRKStepGetUserData(void *arkode_mem, - void **user_data); -SUNDIALS_EXPORT int SPRKStepPrintAllStats(void *arkode_mem, FILE *outfile, +SUNDIALS_EXPORT int SPRKStepGetNumExpSteps(void* arkode_mem, long int* expsteps); +SUNDIALS_EXPORT int SPRKStepGetNumAccSteps(void* arkode_mem, long int* accsteps); +SUNDIALS_EXPORT int SPRKStepGetNumStepAttempts(void* arkode_mem, + long int* step_attempts); +SUNDIALS_EXPORT int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, + long int* nf2); +SUNDIALS_EXPORT int SPRKStepGetNumErrTestFails(void* arkode_mem, + long int* netfails); +// SUNDIALS_EXPORT int SPRKStepGetEstLocalErrors(void *arkode_mem, +// N_Vector ele); +SUNDIALS_EXPORT int SPRKStepGetWorkSpace(void* arkode_mem, long int* lenrw, + long int* leniw); +SUNDIALS_EXPORT int SPRKStepGetNumSteps(void* arkode_mem, long int* nsteps); +SUNDIALS_EXPORT int SPRKStepGetActualInitStep(void* arkode_mem, + realtype* hinused); +SUNDIALS_EXPORT int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast); +SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur); +SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur); +SUNDIALS_EXPORT int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state); +// SUNDIALS_EXPORT int SPRKStepGetCurrentGamma(void *arkode_mem, +// realtype *gamma); +// SUNDIALS_EXPORT int SPRKStepGetCurrentMassMatrix(void *arkode_mem, +// SUNMatrix *M); +// SUNDIALS_EXPORT int SPRKStepGetTolScaleFactor(void *arkode_mem, +// realtype *tolsfac); +// SUNDIALS_EXPORT int SPRKStepGetErrWeights(void *arkode_mem, +// N_Vector eweight); +// SUNDIALS_EXPORT int SPRKStepGetResWeights(void *arkode_mem, +// N_Vector rweight); +SUNDIALS_EXPORT int SPRKStepGetUserData(void* arkode_mem, void** user_data); +SUNDIALS_EXPORT int SPRKStepPrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt); -SUNDIALS_EXPORT char *SPRKStepGetReturnFlagName(long int flag); -SUNDIALS_EXPORT int SPRKStepWriteParameters(void *arkode_mem, FILE *fp); - +SUNDIALS_EXPORT char* SPRKStepGetReturnFlagName(long int flag); +SUNDIALS_EXPORT int SPRKStepWriteParameters(void* arkode_mem, FILE* fp); /* Grouped optional output functions */ -SUNDIALS_EXPORT int SPRKStepGetTimestepperStats(void *arkode_mem, - long int *expsteps, - long int *accsteps, - long int *step_attempts, - long int *nf1, long int *nf2, - long int *nlinsetups, - long int *netfails); -SUNDIALS_EXPORT int SPRKStepGetStepStats(void *arkode_mem, - long int *nsteps, - realtype *hinused, - realtype *hlast, - realtype *hcur, - realtype *tcur); - -SUNDIALS_EXPORT int SPRKStepGetNumStepSolveFails(void *arkode_mem, - long int *nncfails); +SUNDIALS_EXPORT int SPRKStepGetTimestepperStats( + void* arkode_mem, long int* expsteps, long int* accsteps, + long int* step_attempts, long int* nf1, long int* nf2, long int* nlinsetups, + long int* netfails); +SUNDIALS_EXPORT int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, + realtype* hinused, realtype* hlast, + realtype* hcur, realtype* tcur); + +// SUNDIALS_EXPORT int SPRKStepGetNumStepSolveFails(void *arkode_mem, +// long int *nncfails); /* Free function */ -SUNDIALS_EXPORT void SPRKStepFree(void **arkode_mem); +SUNDIALS_EXPORT void SPRKStepFree(void** arkode_mem); /* Output the SPRKStep memory structure (useful when debugging) */ SUNDIALS_EXPORT void SPRKStepPrintMem(void* arkode_mem, FILE* outfile); /* MRIStep interface functions */ -SUNDIALS_EXPORT int SPRKStepCreateMRIStepInnerStepper(void *arkode_mem, - MRIStepInnerStepper *stepper); +SUNDIALS_EXPORT int SPRKStepCreateMRIStepInnerStepper(void* arkode_mem, + MRIStepInnerStepper* stepper); #ifdef __cplusplus } diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 2f898e0200..f35b4f703b 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -952,8 +952,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, (ark_mem->tcur-tout)*ark_mem->h >= ZERO ) { istate = ARK_SUCCESS; ark_mem->tretlast = *tret = tout; - /* Only use dense output when we tcur is not within 10*eps of tout already.*/ - if (SUNRCompare(ark_mem->tcur - tout, ZERO)) { + if (!SUNRCompare(SUNRabs(ark_mem->tcur - tout), FUZZ_FACTOR*ark_mem->uround)) { (void) arkGetDky(ark_mem, tout, 0, yout); } ark_mem->next_h = ark_mem->hprime; @@ -965,8 +964,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, troundoff = FUZZ_FACTOR*ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); if (SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { - /* Only use dense output when we tcur is not within 10*eps of tstop already.*/ - if (SUNRCompare(ark_mem->tcur - ark_mem->tstop, ZERO)) { + if (!SUNRCompare(SUNRabs(ark_mem->tcur - ark_mem->tstop), FUZZ_FACTOR*ark_mem->uround)) { (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); } ark_mem->tretlast = *tret = ark_mem->tstop; @@ -976,7 +974,6 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, } /* limit upcoming step if it will overcome tstop */ if ( (ark_mem->tcur + ark_mem->hprime - ark_mem->tstop)*ark_mem->h > ZERO ) { - // printf(">>> hprime = %g\n", ark_mem->hprime); ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE-FOUR*ark_mem->uround); ark_mem->eta = ark_mem->hprime/ark_mem->h; diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index f6afbdca1a..3fdd1b3df6 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -21,6 +21,7 @@ #include #include +#include "arkode/arkode.h" #include "arkode_impl.h" #include "arkode_interp_impl.h" #include @@ -51,7 +52,7 @@ int arkSetDefaults(void *arkode_mem) ark_mem = (ARKodeMem) arkode_mem; /* Set default values for integrator optional inputs */ - ark_mem->use_compensated_sums = SUNFALSE; + ark_mem->use_compensated_sums = SUNFALSE; ark_mem->fixedstep = SUNFALSE; /* default to use adaptive steps */ ark_mem->reltol = RCONST(1.e-4); /* relative tolerance */ ark_mem->itol = ARK_SS; /* scalar-scalar solution tolerances */ @@ -134,7 +135,8 @@ int arkSetInterpolantType(void *arkode_mem, int itype) ark_mem = (ARKodeMem) arkode_mem; /* check for legal itype input */ - if ((itype != ARK_INTERP_HERMITE) && (itype != ARK_INTERP_LAGRANGE)) { + if ((itype != ARK_INTERP_HERMITE) && (itype != ARK_INTERP_LAGRANGE) + && (itype != ARK_INTERP_NONE)) { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE", "arkSetInterpolantType", "Illegal interpolation type input."); @@ -159,8 +161,10 @@ int arkSetInterpolantType(void *arkode_mem, int itype) the maximum possible interpolant degree. */ if (itype == ARK_INTERP_HERMITE) { ark_mem->interp = arkInterpCreate_Hermite(arkode_mem, ARK_INTERP_MAX_DEGREE); - } else { + } else if (itype == ARK_INTERP_NONE) { ark_mem->interp = arkInterpCreate_Lagrange(arkode_mem, ARK_INTERP_MAX_DEGREE); + } else { + ark_mem->interp = NULL; } if (ark_mem->interp == NULL) { arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE", "arkSetInterpolantType", diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index cacd4e1a4b..356558ec5c 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -356,6 +356,8 @@ ARKodeSPRKMem ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) return ARKodeSymplecticEuler(); case ARKODE_SYMPLECTIC_LEAPFROG_2: return ARKodeSymplecticLeapfrog2(); + case ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2: + return ARKodeSymplecticPseudoLeapfrog2(); case ARKODE_SYMPLECTIC_RUTH_3: return ARKodeSymplecticRuth3(); case ARKODE_SYMPLECTIC_MCLACHLAN_2: diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 271bdb85ea..1aa824182d 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -281,46 +281,6 @@ int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) return(ARK_SUCCESS); } - -/*--------------------------------------------------------------- - SPRKStepSStolerances, SPRKStepSVtolerances, SPRKStepWFtolerances, - SPRKStepResStolerance, SPRKStepResVtolerance, SPRKStepResFtolerance: - - These routines set integration tolerances (wrappers for general - ARKODE utility routines) - ---------------------------------------------------------------*/ - -// int SPRKStepSStolerances(void *arkode_mem, realtype reltol, realtype abstol) -// { -// return(arkSStolerances((ARKodeMem) arkode_mem, reltol, abstol)); -// } - -// int SPRKStepSVtolerances(void *arkode_mem, realtype reltol, N_Vector abstol) -// { -// return(arkSVtolerances((ARKodeMem) arkode_mem, reltol, abstol)); -// } - -// int SPRKStepWFtolerances(void *arkode_mem, ARKEwtFn efun) -// { -// return(arkWFtolerances((ARKodeMem) arkode_mem, efun)); -// } - -// int SPRKStepResStolerance(void *arkode_mem, realtype rabstol) -// { -// return(arkResStolerance((ARKodeMem) arkode_mem, rabstol)); -// } - -// int SPRKStepResVtolerance(void *arkode_mem, N_Vector rabstol) -// { -// return(arkResVtolerance((ARKodeMem) arkode_mem, rabstol)); -// } - -// int SPRKStepResFtolerance(void *arkode_mem, ARKRwtFn rfun) -// { -// return(arkResFtolerance((ARKodeMem) arkode_mem, rfun)); -// } - - /*--------------------------------------------------------------- SPRKStepEvolve: @@ -467,6 +427,18 @@ int sprkStep_Init(void* arkode_mem, int init_type) } + /* Signal to shared arkode module that fullrhs is not required after each step */ + ark_mem->call_fullrhs = SUNFALSE; + + if (ark_mem->fixedstep && !ark_mem->root_mem) { + /* In fixed step mode, we do not need an interpolation module. + If adaptivity or rootfinding is enabled, we will need it. */ + arkSetInterpolantType(ark_mem, ARK_INTERP_NONE); + } + + // TODO(CJB): setting this to NULL is not supported in arkode right now. Should this really exist in fixed step mode? + // ark_mem->hadapt_mem = NULL; + return(ARK_SUCCESS); } @@ -489,12 +461,8 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_V /*--------------------------------------------------------------- sprkStep_FullRHS: - Rewriting the problem - My' = fe(t,y) + fi(t,y) - in the form - y' = M^{-1}*[ fe(t,y) + fi(t,y) ], - this routine computes the full right-hand side vector, - f = M^{-1}*[ fe(t,y) + fi(t,y) ] + This is just a wrapper to call the user-supplied RHS, + f1(t,y) + f2(t,y). This will be called in one of three 'modes': ARK_FULLRHS_START -> called at the beginning of a simulation @@ -503,238 +471,133 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_V ARK_FULLRHS_OTHER -> called elsewhere (e.g. for dense output) If it is called in ARK_FULLRHS_START mode, we store the vectors - fe(t,y) and fi(t,y) in Fe[0] and Fi[0] for possible reuse in the - first stage of the subsequent time step. + f1(t,y) and f2(t,y) in sdata for possible reuse in the first stage + of the subsequent time step. - If it is called in ARK_FULLRHS_END mode and the ARK method - coefficients support it, we may just copy vectors Fe[stages] and - Fi[stages] to fill f instead of calling fe() and fi(). + TODO(CJB): the reuse is not yet supported + If it is called in ARK_FULLRHS_END mode and the method coefficients + support it, we may just copy the stage vectors to fill f instead + of calling f(). ARK_FULLRHS_OTHER mode is only called for dense output in-between - steps, or 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. + steps, so we strive to store the intermediate parts so that they + do not interfere with the other two modes. ---------------------------------------------------------------*/ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode) { - // ARKodeMem ark_mem; - // ARKodeSPRKStepMem step_mem; - // int nvec, retval; - // booleantype recomputeRHS; - // realtype* cvals; - // N_Vector* Xvecs; - - // /* access ARKodeSPRKStepMem structure */ - // retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_FullRHS", - // &ark_mem, &step_mem); - // if (retval != ARK_SUCCESS) return(retval); - - // /* local shortcuts for use with fused vector operations */ - // cvals = step_mem->cvals; - // Xvecs = step_mem->Xvecs; - - // /* setup mass-matrix if required (use output f as a temporary) */ - // if ((step_mem->mass_type == MASS_TIMEDEP) && (step_mem->msetup != NULL)) { - // retval = step_mem->msetup((void *) ark_mem, t, f, - // ark_mem->tempv2, ark_mem->tempv3); - // if (retval != ARK_SUCCESS) return(ARK_MASSSETUP_FAIL); - // } - - // /* perform RHS functions contingent on 'mode' argument */ - // switch(mode) { - - // /* ARK_FULLRHS_START: called at the beginning of a simulation - // Store the vectors fe(t,y) and fi(t,y) in Fe[0] and Fi[0] for - // possible reuse in the first stage of the subsequent time step */ - // case ARK_FULLRHS_START: - - // /* call fe if the problem has an explicit component */ - // if (step_mem->explicit) { - // retval = sprkStep_Fe(step_mem, t, y, step_mem->Fe[0], ark_mem->user_data); - // if (retval != 0) { - // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - // return(ARK_RHSFUNC_FAIL); - // } - // /* apply external polynomial forcing */ - // if (step_mem->expforcing) { - // cvals[0] = ONE; - // Xvecs[0] = step_mem->Fe[0]; - // nvec = 1; - // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); - // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->Fe[0]); - // } - // } - - // /* call fi if the problem has an implicit component */ - // if (step_mem->implicit) { - // retval = sprkStep_Fi(step_mem, t, y, step_mem->Fi[0], ark_mem->user_data); - // if (retval != 0) { - // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - // return(ARK_RHSFUNC_FAIL); - // } - // /* apply external polynomial forcing */ - // if (step_mem->impforcing) { - // cvals[0] = ONE; - // Xvecs[0] = step_mem->Fi[0]; - // nvec = 1; - // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); - // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->Fi[0]); - // } - // } - - // /* combine RHS vector(s) into output */ - // if (step_mem->explicit && step_mem->implicit) { /* ImEx */ - // N_VLinearSum(ONE, step_mem->Fi[0], ONE, step_mem->Fe[0], f); - // } else if (step_mem->implicit) { /* implicit */ - // N_VScale(ONE, step_mem->Fi[0], f); - // } else { /* explicit */ - // N_VScale(ONE, step_mem->Fe[0], f); - // } - - // break; - - - // /* ARK_FULLRHS_END: called at the end of a successful step - // If the ARK method coefficients support it, we just copy the last stage RHS - // vectors to fill f instead of calling fe() and fi(). - // Copy the results to Fe[0] and Fi[0] if the ARK coefficients support it. */ - // case ARK_FULLRHS_END: - - // /* determine if explicit/implicit RHS functions need to be recomputed */ - // recomputeRHS = SUNFALSE; - // if ( step_mem->explicit && (SUNRabs(step_mem->Be->c[step_mem->stages-1]-ONE)>TINY) ) - // recomputeRHS = SUNTRUE; - // if ( step_mem->implicit && (SUNRabs(step_mem->Bi->c[step_mem->stages-1]-ONE)>TINY) ) - // recomputeRHS = SUNTRUE; - - // /* base RHS calls on recomputeRHS argument */ - // if (recomputeRHS) { - - // /* call fe if the problem has an explicit component */ - // if (step_mem->explicit) { - // retval = sprkStep_Fe(step_mem, t, y, step_mem->Fe[0], ark_mem->user_data); - // if (retval != 0) { - // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - // return(ARK_RHSFUNC_FAIL); - // } - // /* apply external polynomial forcing */ - // if (step_mem->expforcing) { - // cvals[0] = ONE; - // Xvecs[0] = step_mem->Fe[0]; - // nvec = 1; - // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); - // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->Fe[0]); - // } - // } - - // /* call fi if the problem has an implicit component */ - // if (step_mem->implicit) { - // retval = sprkStep_Fi(step_mem, t, y, step_mem->Fi[0], ark_mem->user_data); - // if (retval != 0) { - // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - // return(ARK_RHSFUNC_FAIL); - // } - // /* apply external polynomial forcing */ - // if (step_mem->impforcing) { - // cvals[0] = ONE; - // Xvecs[0] = step_mem->Fi[0]; - // nvec = 1; - // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); - // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->Fi[0]); - // } - // } - // } else { - // if (step_mem->explicit) - // N_VScale(ONE, step_mem->Fe[step_mem->stages-1], step_mem->Fe[0]); - // if (step_mem->implicit) - // N_VScale(ONE, step_mem->Fi[step_mem->stages-1], step_mem->Fi[0]); - // } - - // /* combine RHS vector(s) into output */ - // if (step_mem->explicit && step_mem->implicit) { /* ImEx */ - // N_VLinearSum(ONE, step_mem->Fi[0], ONE, step_mem->Fe[0], f); - // } else if (step_mem->implicit) { /* implicit */ - // N_VScale(ONE, step_mem->Fi[0], f); - // } else { /* explicit */ - // N_VScale(ONE, step_mem->Fe[0], f); - // } - - // break; - - // /* ARK_FULLRHS_OTHER: called for dense output in-between steps or for - // estimation of the initial time step size, store the intermediate - // calculations in such a way as to not interfere with the other two modes */ - // case ARK_FULLRHS_OTHER: - - // /* call fe if the problem has an explicit component (store in ark_tempv2) */ - // if (step_mem->explicit) { - // retval = sprkStep_Fe(step_mem, t, y, ark_mem->tempv2, ark_mem->user_data); - // if (retval != 0) { - // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - // return(ARK_RHSFUNC_FAIL); - // } - // /* apply external polynomial forcing */ - // if (step_mem->expforcing) { - // cvals[0] = ONE; - // Xvecs[0] = ark_mem->tempv2; - // nvec = 1; - // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); - // N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->tempv2); - // } - // } - - // /* call fi if the problem has an implicit component (store in sdata) */ - // if (step_mem->implicit) { - // retval = sprkStep_Fi(step_mem, t, y, step_mem->sdata, ark_mem->user_data); - // if (retval != 0) { - // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - // "sprkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - // return(ARK_RHSFUNC_FAIL); - // } - // /* apply external polynomial forcing */ - // if (step_mem->impforcing) { - // cvals[0] = ONE; - // Xvecs[0] = step_mem->sdata; - // nvec = 1; - // sprkStep_ApplyForcing(step_mem, t, ONE, &nvec); - // N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); - // } - // } - - // /* combine RHS vector(s) into output */ - // if (step_mem->explicit && step_mem->implicit) { /* ImEx */ - // N_VLinearSum(ONE, step_mem->sdata, ONE, ark_mem->tempv2, f); - // } else if (step_mem->implicit) { /* implicit */ - // N_VScale(ONE, step_mem->sdata, f); - // } else { /* explicit */ - // N_VScale(ONE, ark_mem->tempv2, f); - // } - - // break; - - // default: - // /* return with RHS failure if unknown mode is passed */ - // arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - // "sprkStep_FullRHS", "Unknown full RHS mode"); - // return(ARK_RHSFUNC_FAIL); - // } - - // /* if M != I, then update f = M^{-1}*f */ - // if (step_mem->mass_type != MASS_IDENTITY) { - // retval = step_mem->msolve((void *) ark_mem, f, - // step_mem->nlscoef/ark_mem->h); - // if (retval != ARK_SUCCESS) { - // arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, "ARKODE::SPRKStep", - // "sprkStep_FullRHS", "Mass matrix solver failure"); - // return(ARK_MASSSOLVE_FAIL); - // } - // } + int retval; + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + booleantype recomputeRHS; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStep_FullRHS", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); + + /* perform RHS functions contingent on 'mode' argument */ + switch(mode) { + + /* ARK_FULLRHS_START: called at the beginning of a simulation + Store the vectors f1(t,y) in sdata for possible reuse + in the first stage of the subsequent time step. + We don't store f2(t,y) because it is not reusable in + the subsequent time step (which calls it with a updated state). */ + case ARK_FULLRHS_START: + + /* Since the RHS is component-wise split, we assume that only the relevant + components are modified in a call to f1/f2. Under this assumption we can + call both with the same output vector. */ + retval = sprkStep_f1(step_mem, t, y, step_mem->sdata, ark_mem->user_data); + if (retval != 0) { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + return(ARK_RHSFUNC_FAIL); + } + + /* Copy sdata into the output vector f */ + N_VScale(ONE, step_mem->sdata, f); + + retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); + if (retval != 0) { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + return(ARK_RHSFUNC_FAIL); + } + + break; + + + /* ARK_FULLRHS_END: called at the end of a successful step + If the method coefficients support it, we just copy the last stage RHS + vectors to fill f instead of calling f(t,y). + Copy the results to sdata if the coefficients support it. */ + case ARK_FULLRHS_END: + + /* TODO(CJB): Right now we cannot leverage this because we do + not store the function evals for reuse anywhere. Consider + doing this if it does drastically increase storage. */ + + /* determine if explicit RHS function needs to be recomputed */ + recomputeRHS = SUNFALSE; + if (SUNRabs(step_mem->method->a[step_mem->method->stages - 1] - ONE) > TINY) { + recomputeRHS = SUNTRUE; + } + + /* base RHS calls on recomputeRHS argument */ + // if (recomputeRHS) { + + retval = sprkStep_f1(step_mem, t, y, step_mem->sdata, ark_mem->user_data); + if (retval != 0) { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + return(ARK_RHSFUNC_FAIL); + } + + /* Copy sdata into the output vector f */ + N_VScale(ONE, step_mem->sdata, f); + + retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); + if (retval != 0) { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + return(ARK_RHSFUNC_FAIL); + } + + // } else { + // N_VScale(ONE, step_mem->F[step_mem->stages-1], step_mem->sdata); + // } + + break; + + /* ARK_FULLRHS_OTHER: called for dense output in-between steps + store the intermediate calculations in such a way as to not + interfere with the other two modes */ + case ARK_FULLRHS_OTHER: + + retval = sprkStep_f1(step_mem, t, y, f, ark_mem->user_data); + if (retval != 0) { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + return(ARK_RHSFUNC_FAIL); + } + + retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); + if (retval != 0) { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + return(ARK_RHSFUNC_FAIL); + } + + break; + + default: + /* return with RHS failure if unknown mode is passed */ + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", "Unknown full RHS mode"); + return(ARK_RHSFUNC_FAIL); + } return(ARK_SUCCESS); } diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 6dd6d01575..9dfa449931 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -21,134 +21,287 @@ #include #include - -#include "arkode_sprkstep_impl.h" #include #include +#include "arkode/arkode_sprk.h" +#include "arkode_sprkstep_impl.h" /*=============================================================== SPRKStep Optional input functions (wrappers for generic ARKODE utility routines). All are documented in arkode_io.c. ===============================================================*/ -int SPRKStepSetDenseOrder(void *arkode_mem, int dord) { - return(SPRKStepSetInterpolantDegree(arkode_mem, dord)); } -int SPRKStepSetInterpolantDegree(void *arkode_mem, int degree) { +int SPRKStepSetDenseOrder(void* arkode_mem, int dord) +{ + return (SPRKStepSetInterpolantDegree(arkode_mem, dord)); +} + +int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree) +{ if (degree < 0) degree = ARK_INTERP_MAX_DEGREE; - return(arkSetInterpolantDegree(arkode_mem, degree)); } -int SPRKStepSetInterpolantType(void *arkode_mem, int itype) { - return(arkSetInterpolantType(arkode_mem, itype)); } -int SPRKStepSetErrHandlerFn(void *arkode_mem, ARKErrHandlerFn ehfun, - void *eh_data) { - return(arkSetErrHandlerFn(arkode_mem, ehfun, eh_data)); } -int SPRKStepSetErrFile(void *arkode_mem, FILE *errfp) { - return(arkSetErrFile(arkode_mem, errfp)); } -int SPRKStepSetDiagnostics(void *arkode_mem, FILE *diagfp) { - return(arkSetDiagnostics(arkode_mem, diagfp)); } -int SPRKStepSetMaxNumSteps(void *arkode_mem, long int mxsteps) { - return(arkSetMaxNumSteps(arkode_mem, mxsteps)); } -int SPRKStepSetMaxHnilWarns(void *arkode_mem, int mxhnil) { - return(arkSetMaxHnilWarns(arkode_mem, mxhnil)); } -int SPRKStepSetInitStep(void *arkode_mem, realtype hin) { - return(arkSetInitStep(arkode_mem, hin)); } -int SPRKStepSetMinStep(void *arkode_mem, realtype hmin) { - return(arkSetMinStep(arkode_mem, hmin)); } -int SPRKStepSetMaxStep(void *arkode_mem, realtype hmax) { - return(arkSetMaxStep(arkode_mem, hmax)); } -int SPRKStepSetStopTime(void *arkode_mem, realtype tstop) { - return(arkSetStopTime(arkode_mem, tstop)); } -int SPRKStepSetRootDirection(void *arkode_mem, int *rootdir) { - return(arkSetRootDirection(arkode_mem, rootdir)); } -int SPRKStepSetNoInactiveRootWarn(void *arkode_mem) { - return(arkSetNoInactiveRootWarn(arkode_mem)); } -int SPRKStepSetConstraints(void *arkode_mem, N_Vector constraints) { - return(arkSetConstraints(arkode_mem, constraints)); } -int SPRKStepSetMaxNumConstrFails(void *arkode_mem, int maxfails) { - return(arkSetMaxNumConstrFails(arkode_mem, maxfails)); } -int SPRKStepSetPostprocessStepFn(void *arkode_mem, - ARKPostProcessFn ProcessStep) { - return(arkSetPostprocessStepFn(arkode_mem, ProcessStep)); } -int SPRKStepSetPostprocessStageFn(void *arkode_mem, - ARKPostProcessFn ProcessStage) { - return(arkSetPostprocessStageFn(arkode_mem, ProcessStage)); } -int SPRKStepSetCFLFraction(void *arkode_mem, realtype cfl_frac) { - return(arkSetCFLFraction(arkode_mem, cfl_frac)); } -int SPRKStepSetSafetyFactor(void *arkode_mem, realtype safety) { - return(arkSetSafetyFactor(arkode_mem, safety)); } -int SPRKStepSetErrorBias(void *arkode_mem, realtype bias) { - return(arkSetErrorBias(arkode_mem, bias)); } -int SPRKStepSetMaxGrowth(void *arkode_mem, realtype mx_growth) { - return(arkSetMaxGrowth(arkode_mem, mx_growth)); } -int SPRKStepSetMinReduction(void *arkode_mem, realtype eta_min) { - return(arkSetMinReduction(arkode_mem, eta_min)); } -int SPRKStepSetFixedStepBounds(void *arkode_mem, realtype lb, realtype ub) { - return(arkSetFixedStepBounds(arkode_mem, lb, ub)); } -int SPRKStepSetAdaptivityMethod(void *arkode_mem, int imethod, int idefault, - int pq, realtype adapt_params[3]) { - return(arkSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params)); } -int SPRKStepSetAdaptivityFn(void *arkode_mem, ARKAdaptFn hfun, void *h_data) { - return(arkSetAdaptivityFn(arkode_mem, hfun, h_data)); } -int SPRKStepSetMaxFirstGrowth(void *arkode_mem, realtype etamx1) { - return(arkSetMaxFirstGrowth(arkode_mem, etamx1)); } -int SPRKStepSetMaxEFailGrowth(void *arkode_mem, realtype etamxf) { - return(arkSetMaxEFailGrowth(arkode_mem, etamxf)); } -int SPRKStepSetSmallNumEFails(void *arkode_mem, int small_nef) { - return(arkSetSmallNumEFails(arkode_mem, small_nef)); } -int SPRKStepSetMaxCFailGrowth(void *arkode_mem, realtype etacf) { - return(arkSetMaxCFailGrowth(arkode_mem, etacf)); } -int SPRKStepSetStabilityFn(void *arkode_mem, ARKExpStabFn EStab, void *estab_data) { - return(arkSetStabilityFn(arkode_mem, EStab, estab_data)); } -int SPRKStepSetMaxErrTestFails(void *arkode_mem, int maxnef) { - return(arkSetMaxErrTestFails(arkode_mem, maxnef)); } -int SPRKStepSetMaxConvFails(void *arkode_mem, int maxncf) { - return(arkSetMaxConvFails(arkode_mem, maxncf)); } -int SPRKStepSetFixedStep(void *arkode_mem, realtype hfixed) { - return(arkSetFixedStep(arkode_mem, hfixed)); } + return (arkSetInterpolantDegree(arkode_mem, degree)); +} + +int SPRKStepSetInterpolantType(void* arkode_mem, int itype) +{ + return (arkSetInterpolantType(arkode_mem, itype)); +} + +int SPRKStepSetErrHandlerFn(void* arkode_mem, ARKErrHandlerFn ehfun, void* eh_data) +{ + return (arkSetErrHandlerFn(arkode_mem, ehfun, eh_data)); +} + +int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp) +{ + return (arkSetErrFile(arkode_mem, errfp)); +} + +int SPRKStepSetDiagnostics(void* arkode_mem, FILE* diagfp) +{ + return (arkSetDiagnostics(arkode_mem, diagfp)); +} + +int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps) +{ + return (arkSetMaxNumSteps(arkode_mem, mxsteps)); +} + +int SPRKStepSetMaxHnilWarns(void* arkode_mem, int mxhnil) +{ + return (arkSetMaxHnilWarns(arkode_mem, mxhnil)); +} + +int SPRKStepSetInitStep(void* arkode_mem, realtype hin) +{ + return (arkSetInitStep(arkode_mem, hin)); +} + +int SPRKStepSetMinStep(void* arkode_mem, realtype hmin) +{ + return (arkSetMinStep(arkode_mem, hmin)); +} + +int SPRKStepSetMaxStep(void* arkode_mem, realtype hmax) +{ + return (arkSetMaxStep(arkode_mem, hmax)); +} + +int SPRKStepSetStopTime(void* arkode_mem, realtype tstop) +{ + return (arkSetStopTime(arkode_mem, tstop)); +} + +int SPRKStepSetRootDirection(void* arkode_mem, int* rootdir) +{ + return (arkSetRootDirection(arkode_mem, rootdir)); +} + +int SPRKStepSetNoInactiveRootWarn(void* arkode_mem) +{ + return (arkSetNoInactiveRootWarn(arkode_mem)); +} + +// int SPRKStepSetConstraints(void* arkode_mem, N_Vector constraints) +// { +// return (arkSetConstraints(arkode_mem, constraints)); +// } + +int SPRKStepSetMaxNumConstrFails(void* arkode_mem, int maxfails) +{ + return (arkSetMaxNumConstrFails(arkode_mem, maxfails)); +} + +int SPRKStepSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +{ + return (arkSetPostprocessStepFn(arkode_mem, ProcessStep)); +} + +int SPRKStepSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) +{ + return (arkSetPostprocessStageFn(arkode_mem, ProcessStage)); +} + +// int SPRKStepSetCFLFraction(void* arkode_mem, realtype cfl_frac) +// { +// return (arkSetCFLFraction(arkode_mem, cfl_frac)); +// } + +// int SPRKStepSetSafetyFactor(void* arkode_mem, realtype safety) +// { +// return (arkSetSafetyFactor(arkode_mem, safety)); +// } + +// int SPRKStepSetErrorBias(void* arkode_mem, realtype bias) +// { +// return (arkSetErrorBias(arkode_mem, bias)); +// } + +// int SPRKStepSetMaxGrowth(void* arkode_mem, realtype mx_growth) +// { +// return (arkSetMaxGrowth(arkode_mem, mx_growth)); +// } + +// int SPRKStepSetMinReduction(void* arkode_mem, realtype eta_min) +// { +// return (arkSetMinReduction(arkode_mem, eta_min)); +// } + +// int SPRKStepSetFixedStepBounds(void* arkode_mem, realtype lb, realtype ub) +// { +// return (arkSetFixedStepBounds(arkode_mem, lb, ub)); +// } + +int SPRKStepSetAdaptivityMethod(void* arkode_mem, int imethod, int idefault, + int pq, realtype adapt_params[3]) +{ + return (arkSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params)); +} + +int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data) +{ + return (arkSetAdaptivityFn(arkode_mem, hfun, h_data)); +} + +// int SPRKStepSetMaxFirstGrowth(void* arkode_mem, realtype etamx1) +// { +// return (arkSetMaxFirstGrowth(arkode_mem, etamx1)); +// } + +// int SPRKStepSetMaxEFailGrowth(void* arkode_mem, realtype etamxf) +// { +// return (arkSetMaxEFailGrowth(arkode_mem, etamxf)); +// } + +// int SPRKStepSetSmallNumEFails(void* arkode_mem, int small_nef) +// { +// return (arkSetSmallNumEFails(arkode_mem, small_nef)); +// } + +// int SPRKStepSetMaxCFailGrowth(void* arkode_mem, realtype etacf) +// { +// return (arkSetMaxCFailGrowth(arkode_mem, etacf)); +// } + +int SPRKStepSetStabilityFn(void* arkode_mem, ARKExpStabFn EStab, void* estab_data) +{ + return (arkSetStabilityFn(arkode_mem, EStab, estab_data)); +} + +// int SPRKStepSetMaxErrTestFails(void* arkode_mem, int maxnef) +// { +// return (arkSetMaxErrTestFails(arkode_mem, maxnef)); +// } + +// int SPRKStepSetMaxConvFails(void* arkode_mem, int maxncf) +// { +// return (arkSetMaxConvFails(arkode_mem, maxncf)); +// } + +int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed) +{ + return (arkSetFixedStep(arkode_mem, hfixed)); +} /*=============================================================== SPRKStep Optional output functions (wrappers for generic ARKODE utility routines). All are documented in arkode_io.c. ===============================================================*/ -int SPRKStepGetNumStepAttempts(void *arkode_mem, long int *nstep_attempts) { - return(arkGetNumStepAttempts(arkode_mem, nstep_attempts)); } -int SPRKStepGetNumSteps(void *arkode_mem, long int *nsteps) { - return(arkGetNumSteps(arkode_mem, nsteps)); } -int SPRKStepGetActualInitStep(void *arkode_mem, realtype *hinused) { - return(arkGetActualInitStep(arkode_mem, hinused)); } -int SPRKStepGetLastStep(void *arkode_mem, realtype *hlast) { - return(arkGetLastStep(arkode_mem, hlast)); } -int SPRKStepGetCurrentStep(void *arkode_mem, realtype *hcur) { - return(arkGetCurrentStep(arkode_mem, hcur)); } -int SPRKStepGetCurrentTime(void *arkode_mem, realtype *tcur) { - return(arkGetCurrentTime(arkode_mem, tcur)); } -int SPRKStepGetCurrentState(void *arkode_mem, N_Vector *state) { - return(arkGetCurrentState(arkode_mem, state)); } -int SPRKStepGetTolScaleFactor(void *arkode_mem, realtype *tolsfact) { - return(arkGetTolScaleFactor(arkode_mem, tolsfact)); } -int SPRKStepGetErrWeights(void *arkode_mem, N_Vector eweight) { - return(arkGetErrWeights(arkode_mem, eweight)); } -int SPRKStepGetResWeights(void *arkode_mem, N_Vector rweight) { - return(arkGetResWeights(arkode_mem, rweight)); } -int SPRKStepGetWorkSpace(void *arkode_mem, long int *lenrw, long int *leniw) { - return(arkGetWorkSpace(arkode_mem, lenrw, leniw)); } -int SPRKStepGetStepStats(void *arkode_mem, long int *nsteps, - realtype *hinused, realtype *hlast, - realtype *hcur, realtype *tcur) { - return(arkGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur)); } -int SPRKStepGetNumConstrFails(void *arkode_mem, long int *nconstrfails) { - return(arkGetNumConstrFails(arkode_mem, nconstrfails)); } -int SPRKStepGetNumExpSteps(void *arkode_mem, long int *nsteps) { - return(arkGetNumExpSteps(arkode_mem, nsteps)); } -int SPRKStepGetNumAccSteps(void *arkode_mem, long int *nsteps) { - return(arkGetNumAccSteps(arkode_mem, nsteps)); } -int SPRKStepGetNumErrTestFails(void *arkode_mem, long int *netfails) { - return(arkGetNumErrTestFails(arkode_mem, netfails)); } -int SPRKStepGetNumStepSolveFails(void *arkode_mem, long int *nncfails) { - return(arkGetNumStepSolveFails(arkode_mem, nncfails)); } -int SPRKStepGetUserData(void *arkode_mem, void** user_data) { - return(arkGetUserData(arkode_mem, user_data)); } -char *SPRKStepGetReturnFlagName(long int flag) { - return(arkGetReturnFlagName(flag)); } +int SPRKStepGetNumStepAttempts(void* arkode_mem, long int* nstep_attempts) +{ + return (arkGetNumStepAttempts(arkode_mem, nstep_attempts)); +} + +int SPRKStepGetNumSteps(void* arkode_mem, long int* nsteps) +{ + return (arkGetNumSteps(arkode_mem, nsteps)); +} + +int SPRKStepGetActualInitStep(void* arkode_mem, realtype* hinused) +{ + return (arkGetActualInitStep(arkode_mem, hinused)); +} + +int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast) +{ + return (arkGetLastStep(arkode_mem, hlast)); +} + +int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur) +{ + return (arkGetCurrentStep(arkode_mem, hcur)); +} + +int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur) +{ + return (arkGetCurrentTime(arkode_mem, tcur)); +} + +int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state) +{ + return (arkGetCurrentState(arkode_mem, state)); +} + +// int SPRKStepGetTolScaleFactor(void* arkode_mem, realtype* tolsfact) +// { +// return (arkGetTolScaleFactor(arkode_mem, tolsfact)); +// } + +// int SPRKStepGetErrWeights(void* arkode_mem, N_Vector eweight) +// { +// return (arkGetErrWeights(arkode_mem, eweight)); +// } + +// int SPRKStepGetResWeights(void* arkode_mem, N_Vector rweight) +// { +// return (arkGetResWeights(arkode_mem, rweight)); +// } + +int SPRKStepGetWorkSpace(void* arkode_mem, long int* lenrw, long int* leniw) +{ + return (arkGetWorkSpace(arkode_mem, lenrw, leniw)); +} + +int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, realtype* hinused, + realtype* hlast, realtype* hcur, realtype* tcur) +{ + return (arkGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur)); +} + +int SPRKStepGetNumConstrFails(void* arkode_mem, long int* nconstrfails) +{ + return (arkGetNumConstrFails(arkode_mem, nconstrfails)); +} + +int SPRKStepGetNumExpSteps(void* arkode_mem, long int* nsteps) +{ + return (arkGetNumExpSteps(arkode_mem, nsteps)); +} + +int SPRKStepGetNumAccSteps(void* arkode_mem, long int* nsteps) +{ + return (arkGetNumAccSteps(arkode_mem, nsteps)); +} + +int SPRKStepGetNumErrTestFails(void* arkode_mem, long int* netfails) +{ + return (arkGetNumErrTestFails(arkode_mem, netfails)); +} + +int SPRKStepGetNumStepSolveFails(void* arkode_mem, long int* nncfails) +{ + return (arkGetNumStepSolveFails(arkode_mem, nncfails)); +} + +int SPRKStepGetUserData(void* arkode_mem, void** user_data) +{ + return (arkGetUserData(arkode_mem, user_data)); +} + +char* SPRKStepGetReturnFlagName(long int flag) +{ + return (arkGetReturnFlagName(flag)); +} /*=============================================================== SPRKStep optional input functions -- stepper-specific @@ -160,37 +313,24 @@ char *SPRKStepGetReturnFlagName(long int flag) { Wrapper for generic arkSetUserData and arkLSSetUserData routines. ---------------------------------------------------------------*/ -int SPRKStepSetUserData(void *arkode_mem, void *user_data) +int SPRKStepSetUserData(void* arkode_mem, void* user_data) { - ARKodeMem ark_mem; + ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; - int retval; + int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUserData", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUserData", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* set user_data in ARKODE mem */ retval = arkSetUserData(arkode_mem, user_data); - if (retval != ARK_SUCCESS) return(retval); - - // /* set user data in ARKODE LS mem */ - // if (step_mem->lmem != NULL) { - // retval = arkLSSetUserData(arkode_mem, user_data); - // if (retval != ARKLS_SUCCESS) return(retval); - // } - - // /* set user data in ARKODE LSMass mem */ - // if (step_mem->mass_mem != NULL) { - // retval = arkLSSetMassUserData(arkode_mem, user_data); - // if (retval != ARKLS_SUCCESS) return(retval); - // } + if (retval != ARK_SUCCESS) return (retval); - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- SPRKStepSetDefaults: @@ -207,23 +347,26 @@ int SPRKStepSetDefaults(void* arkode_mem) int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetDefaults", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetDefaults", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* Set default ARKODE infrastructure parameters */ retval = arkSetDefaults(ark_mem); - if (retval != ARK_SUCCESS) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", - "SPRKStepSetDefaults", + if (retval != ARK_SUCCESS) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKStepSetDefaults", "Error setting ARKODE infrastructure defaults"); - return(retval); + return (retval); } + /* Fixed step mode by default */ + SPRKStepSetFixedStep(ark_mem, 0.01); + /* set using default method order */ SPRKStepSetOrder(arkode_mem, 0); - - return(ARK_SUCCESS); + + return (ARK_SUCCESS); } /*--------------------------------------------------------------- @@ -231,29 +374,31 @@ int SPRKStepSetDefaults(void* arkode_mem) Turns on/off compensated summation in SPRKStep and ARKODE. ---------------------------------------------------------------*/ -int SPRKStepSetUseCompensatedSums(void *arkode_mem, sunbooleantype onoff) +int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) { return(retval); } + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } - if (onoff) { + if (onoff) + { arkSetUseCompensatedSums(arkode_mem, SUNTRUE); ark_mem->step = sprkStep_TakeStep_Compensated; - } else { + } + else + { arkSetUseCompensatedSums(arkode_mem, SUNFALSE); ark_mem->step = sprkStep_TakeStep; } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- SPRKStepSetMethod: @@ -262,60 +407,58 @@ int SPRKStepSetUseCompensatedSums(void *arkode_mem, sunbooleantype onoff) ** Note in documentation that this should not be called along with SPRKStepSetOrder. ** ---------------------------------------------------------------*/ -int SPRKStepSetMethod(void *arkode_mem, ARKODE_SPRKMethodID id) +int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) { return(retval); } + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } - if (step_mem->method) { + if (step_mem->method) + { ARKodeSPRKMem_Free(step_mem->method); step_mem->method = NULL; } - step_mem->method = ARKodeSPRKMem_Load(id); + step_mem->method = sprk_mem; - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- SPRKStepSetOrder: Specifies the method order ** Note in documentation that this should not be called along - with SPRKStepSetMethod. ** + with SPRKStepSetMethod. ** ---------------------------------------------------------------*/ -int SPRKStepSetOrder(void *arkode_mem, int ord) +int SPRKStepSetOrder(void* arkode_mem, int ord) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* set user-provided value, or default, depending on argument */ - if (ord <= 0) { - step_mem->q = 4; - } else { - step_mem->q = ord; - } + if (ord <= 0) { step_mem->q = 4; } + else { step_mem->q = ord; } - if (step_mem->method) { + if (step_mem->method) + { ARKodeSPRKMem_Free(step_mem->method); step_mem->method = NULL; } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } /*=============================================================== @@ -327,7 +470,7 @@ int SPRKStepSetOrder(void *arkode_mem, int ord) Returns the current number of calls to f1 and f2 ---------------------------------------------------------------*/ -int SPRKStepGetNumRhsEvals(void *arkode_mem, long int* nf1, long int* nf2) +int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -335,49 +478,24 @@ int SPRKStepGetNumRhsEvals(void *arkode_mem, long int* nf1, long int* nf2) /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepGetNumRhsEvals", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return (retval); *nf1 = step_mem->nf1; *nf2 = step_mem->nf2; - return(ARK_SUCCESS); + return (ARK_SUCCESS); } -/*--------------------------------------------------------------- - SPRKStepGetEstLocalErrors: (updated to the correct vector, but - need to verify that it is unchanged between filling the - estimated error and the end of the time step) - - Returns an estimate of the local error - ---------------------------------------------------------------*/ -int SPRKStepGetEstLocalErrors(void *arkode_mem, N_Vector ele) -{ - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; - - /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepGetEstLocalErrors", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); - - /* copy vector to output */ - N_VScale(ONE, ark_mem->tempv1, ele); - - return(ARK_SUCCESS); -} - - /*--------------------------------------------------------------- SPRKStepGetTimestepperStats: Returns integrator statistics ---------------------------------------------------------------*/ -int SPRKStepGetTimestepperStats(void *arkode_mem, long int *expsteps, - long int *accsteps, long int *step_attempts, - long int *nf1, long int *nf2, - long int *nlinsetups, long int *netfails) +int SPRKStepGetTimestepperStats(void* arkode_mem, long int* expsteps, + long int* accsteps, long int* step_attempts, + long int* nf1, long int* nf2, + long int* nlinsetups, long int* netfails) { ARKodeMem ark_mem; @@ -387,7 +505,7 @@ int SPRKStepGetTimestepperStats(void *arkode_mem, long int *expsteps, SPRKStepGetNumStepAttempts(arkode_mem, step_attempts); SPRKStepGetNumErrTestFails(arkode_mem, netfails); - return(ARK_SUCCESS); + return (ARK_SUCCESS); } /*--------------------------------------------------------------- @@ -395,22 +513,22 @@ int SPRKStepGetTimestepperStats(void *arkode_mem, long int *expsteps, Prints integrator statistics ---------------------------------------------------------------*/ -int SPRKStepPrintAllStats(void *arkode_mem, FILE *outfile, SUNOutputFormat fmt) +int SPRKStepPrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepPrintAllStats", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepPrintAllStats", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* step and rootfinding stats */ retval = arkPrintAllStats(arkode_mem, outfile, fmt); - if (retval != ARK_SUCCESS) return(retval); + if (retval != ARK_SUCCESS) return (retval); - switch(fmt) + switch (fmt) { case SUN_OUTPUTFORMAT_TABLE: /* function evaluations */ @@ -425,13 +543,12 @@ int SPRKStepPrintAllStats(void *arkode_mem, FILE *outfile, SUNOutputFormat fmt) default: arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE", "SPRKStepPrintAllStats", "Invalid formatting option."); - return(ARK_ILL_INPUT); + return (ARK_ILL_INPUT); } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*=============================================================== SPRKStep parameter output ===============================================================*/ @@ -441,7 +558,7 @@ int SPRKStepPrintAllStats(void *arkode_mem, FILE *outfile, SUNOutputFormat fmt) Outputs all solver parameters to the provided file pointer. ---------------------------------------------------------------*/ -int SPRKStepWriteParameters(void *arkode_mem, FILE *fp) +int SPRKStepWriteParameters(void* arkode_mem, FILE* fp) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -449,16 +566,17 @@ int SPRKStepWriteParameters(void *arkode_mem, FILE *fp) /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepWriteParameters", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* output ARKODE infrastructure parameters first */ flag = arkWriteParameters(ark_mem, fp); - if (flag != ARK_SUCCESS) { + if (flag != ARK_SUCCESS) + { arkProcessError(ark_mem, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKStepWriteParameters", "Error writing ARKODE infrastructure parameters"); - return(flag); + return (flag); } /* print integrator parameters to file */ @@ -466,7 +584,7 @@ int SPRKStepWriteParameters(void *arkode_mem, FILE *fp) fprintf(fp, " Method order %i\n", step_mem->method->q); fprintf(fp, "\n"); - return(ARK_SUCCESS); + return (ARK_SUCCESS); } /*--------------------------------------------------------------- From e6a3cb6b442d6fe83db39d3ac4fa3b7586119b45 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 13:02:50 -0700 Subject: [PATCH 033/177] cleanup the vectors being used --- include/arkode/arkode_sprkstep.h | 4 ++-- src/arkode/arkode_sprkstep.c | 21 ++++++++++++--------- src/arkode/arkode_sprkstep_impl.h | 4 ++-- src/arkode/arkode_sprkstep_io.c | 8 ++++---- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 3692710e69..ed083482bb 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -136,8 +136,8 @@ SUNDIALS_EXPORT int SPRKStepGetNumErrTestFails(void* arkode_mem, long int* netfails); // SUNDIALS_EXPORT int SPRKStepGetEstLocalErrors(void *arkode_mem, // N_Vector ele); -SUNDIALS_EXPORT int SPRKStepGetWorkSpace(void* arkode_mem, long int* lenrw, - long int* leniw); +// SUNDIALS_EXPORT int SPRKStepGetWorkSpace(void* arkode_mem, long int* lenrw, +// long int* leniw); SUNDIALS_EXPORT int SPRKStepGetNumSteps(void* arkode_mem, long int* nsteps); SUNDIALS_EXPORT int SPRKStepGetActualInitStep(void* arkode_mem, realtype* hinused); diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 1aa824182d..b5063cc6d5 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -127,10 +127,6 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont step_mem->f1 = f1; step_mem->f2 = f2; - /* Update the ARKODE workspace requirements */ - // ark_mem->liw += 41; /* fcn/data ptr, int, long int, sunindextype, booleantype */ - // ark_mem->lrw += 10; - /* Initialize the counters */ step_mem->nf1 = 0; step_mem->nf2 = 0; @@ -602,6 +598,10 @@ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, return(ARK_SUCCESS); } +/* Standard formulation of SPRK. + This requires only 2 vectors in principle, but we use three + since we persist the stage data. Only the stage data vector + belongs to SPRKStep, the rest are reused from ARKODE. */ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; @@ -651,14 +651,16 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) return ARK_SUCCESS; } -/* Increment SPRK algorithm with compensated summation */ +/* Increment SPRK algorithm with compensated summation. + This algorithm requires 6 vectors, but 5 of them are reused + from the ARKODE core. */ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; ARKodeSPRKMem method; int retval, is; - N_Vector delta_Yi, yn_plus_delta_Yi; + N_Vector delta_Yi, yn_plus_delta_Yi, diff; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", @@ -667,9 +669,10 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflag method = step_mem->method; - /* other shortcuts */ + /* Vector shortcuts */ delta_Yi = ark_mem->tempv1; yn_plus_delta_Yi = ark_mem->tempv2; + diff = ark_mem->tempv3; /* [ \Delta Q_0 ] = [ 0 ] [ \Delta P_0 ] = [ 0 ] */ @@ -720,8 +723,8 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflag [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); - N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, ark_mem->tempv3); - N_VLinearSum(ONE, ark_mem->tempv3, -ONE, delta_Yi, ark_mem->yerr); + N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, diff); + N_VLinearSum(ONE, diff, -ONE, delta_Yi, ark_mem->yerr); *nflagPtr = 0; *dsmPtr = 0; diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 32c271397a..5b2f44421e 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -46,9 +46,9 @@ extern "C" { typedef struct ARKodeSPRKStepMemRec { /* SPRK method and storage */ - ARKodeSPRKMem method; + ARKodeSPRKMem method; /* method spec */ int q; /* method order */ - N_Vector sdata; + N_Vector sdata; /* persisted stage data */ /* SPRK problem specification */ ARKRhsFn f1; /* p' = f1(t,q) = - dV(t,q)/dq */ diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 9dfa449931..bfb24b37c9 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -257,10 +257,10 @@ int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state) // return (arkGetResWeights(arkode_mem, rweight)); // } -int SPRKStepGetWorkSpace(void* arkode_mem, long int* lenrw, long int* leniw) -{ - return (arkGetWorkSpace(arkode_mem, lenrw, leniw)); -} +// int SPRKStepGetWorkSpace(void* arkode_mem, long int* lenrw, long int* leniw) +// { +// return (arkGetWorkSpace(arkode_mem, lenrw, leniw)); +// } int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, realtype* hinused, realtype* hlast, realtype* hcur, realtype* tcur) From d1f61ea4ea656fb1cf6a605e2942c577c5892752 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 13:55:14 -0700 Subject: [PATCH 034/177] remove perturbed code --- examples/arkode/C_serial/ark_kepler.c | 56 +++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index b9eb656844..dd2214f8f3 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -1,6 +1,6 @@ -/* ---------------------------------------------------------------- +/* ---------------------------------------------------------------------------- * Programmer(s): Cody J. Balos @ LLNL - * ---------------------------------------------------------------- + * ---------------------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2022, Lawrence Livermore National Security * and Southern Methodist University. @@ -10,16 +10,20 @@ * * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End - * ---------------------------------------------------------------- - * We consider the perturbed Kepler problem + * ---------------------------------------------------------------------------- + * We consider the Kepler problem. We choose one + * body to be the center of our coordinate system and then we use the + * coordinates q = (q1, q2) to represent the position of the second body + * relative to the first (center). This yields the + * ODE: * dq/dt = [ p1 ] * [ p2 ] - * dp/dt = [ -q1 / (q1^2 + q2^2)^(3/2) - delta*q1 / (q1^2 + q2^2)^(5/2) ] - * = [ -q2 / (q1^2 + q2^2)^(3/2) - delta*q2 / (q1^2 + q2^2)^(5/2) ] - * (delta = 0.015) with the initial conditions + * dp/dt = [ -q1 / (q1^2 + q2^2)^(3/2) - q1 / (q1^2 + q2^2)^(5/2) ] + * = [ -q2 / (q1^2 + q2^2)^(3/2) - q2 / (q1^2 + q2^2)^(5/2) ] + * with the initial conditions * q(0) = [ 1 - e ], p(0) = [ 0 ] * [ 0 ] [ sqrt((1+e)/(1-e)) ] - * where e = 0.6 is the eccentricity. + * where e = 0.6 is the eccentricity. * * The Hamiltonian for the system, * H(p,q) = 1/2 * (p1^2 + p2^2) - 1/sqrt(q1^2 + q2^2) @@ -27,8 +31,8 @@ * is conserved as well as the angular momentum, * L(p,q) = q1*p2 - q2*p1. * - * We solve the problem by letting y = [ q, p ]^T then using - * ARKStep. + * We solve the problem by letting y = [ q, p ]^T then using a symplectic + * integrator via the SPRKStep time-stepper of ARKODE. * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner @@ -36,7 +40,7 @@ * Algorithms for Ordinary Differential Equations * Springer, 2006, * ISSN 0179-3632 - * ----------------------------------------------------------------*/ + * --------------------------------------------------------------------------*/ #include #include @@ -53,7 +57,7 @@ static int check_retval(void *returnvalue, const char *funcname, int opt); static void InitialConditions(N_Vector y0, sunrealtype ecc); -static sunrealtype Hamiltonian(N_Vector y); +static sunrealtype Hamiltonian(N_Vector yvec); static sunrealtype AngularMomentum(N_Vector y); static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); @@ -69,7 +73,7 @@ static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, typedef struct { sunrealtype ecc; - sunrealtype delta; + sunrealtype mu; /* for time-step control */ sunrealtype eps; @@ -99,13 +103,12 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - // sunrealtype Tf = SUN_RCONST(150.0); - sunrealtype Tf = SUN_RCONST(1000.0); + sunrealtype Tf = SUN_RCONST(150.0); + // sunrealtype Tf = SUN_RCONST(1000.0); // sunrealtype Tf = SUN_RCONST(100000.0); sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); - // const sunrealtype delta = SUN_RCONST(0.015); - const sunrealtype delta = SUN_RCONST(0.0); // unperturbed + const sunrealtype mu = SUN_RCONST(0.005); /* Default integrator Options */ int step_mode = 0; @@ -136,7 +139,7 @@ int main(int argc, char* argv[]) /* Allocate and fill udata structure */ udata = (UserData) malloc(sizeof(*udata)); udata->ecc = ecc; - udata->delta = delta; + udata->mu = mu; udata->alpha = SUN_RCONST(3.0)/SUN_RCONST(2.0); udata->eps = dt; udata->rho_n = SUN_RCONST(1.0); @@ -405,6 +408,11 @@ void InitialConditions(N_Vector y0vec, sunrealtype ecc) y0[3] = SUNRsqrt((one + ecc)/(one - ecc)); } +void Solution(N_Vector yvec, UserData user_data) +{ + +} + sunrealtype Hamiltonian(N_Vector yvec) { sunrealtype H = 0.0; @@ -412,11 +420,6 @@ sunrealtype Hamiltonian(N_Vector yvec) const sunrealtype sqrt_qTq = SUNRsqrt(y[0]*y[0] + y[1]*y[1]); const sunrealtype pTp = y[2]*y[2] + y[3]*y[3]; - // Perturbed - // H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq - // - SUN_RCONST(0.005) / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) / SUN_RCONST(2.0); - - // Unperturbed H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq; return H; @@ -465,16 +468,13 @@ int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) UserData udata = (UserData) user_data; sunrealtype* y = N_VGetArrayPointer(yvec); sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - const sunrealtype delta = udata->delta; const sunrealtype q1 = y[0]; const sunrealtype q2 = y[1]; const sunrealtype sqrt_qTq = SUNRsqrt(q1*q1 + q2*q2); // ydot[0] = ydot[1] = SUN_RCONST(0.0); - ydot[2] = - q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) - - delta * q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(5.0)); - ydot[3] = - q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)) - - delta * q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(5.0)); + ydot[2] = - q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)); + ydot[3] = - q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)); return 0; } From 87349615e4d132ab39899b721895283ca2918ba2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 13:55:46 -0700 Subject: [PATCH 035/177] remove perturbed code --- examples/arkode/C_serial/ark_kepler.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index dd2214f8f3..50afe663e1 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -11,15 +11,14 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End * ---------------------------------------------------------------------------- - * We consider the Kepler problem. We choose one - * body to be the center of our coordinate system and then we use the - * coordinates q = (q1, q2) to represent the position of the second body - * relative to the first (center). This yields the - * ODE: + * We consider the Kepler problem. We choose one body to be the center of our + * coordinate system and then we use the coordinates q = (q1, q2) to represent + * the position of the second body relative to the first (center). This yields + * the ODE: * dq/dt = [ p1 ] * [ p2 ] - * dp/dt = [ -q1 / (q1^2 + q2^2)^(3/2) - q1 / (q1^2 + q2^2)^(5/2) ] - * = [ -q2 / (q1^2 + q2^2)^(3/2) - q2 / (q1^2 + q2^2)^(5/2) ] + * dp/dt = [ -q1 / (q1^2 + q2^2)^(3/2) ] + * = [ -q2 / (q1^2 + q2^2)^(3/2) ] * with the initial conditions * q(0) = [ 1 - e ], p(0) = [ 0 ] * [ 0 ] [ sqrt((1+e)/(1-e)) ] From d58362d08bf67deacf2f990b7f0eab8d1e3c0f80 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 13:56:17 -0700 Subject: [PATCH 036/177] remove perturbed code --- examples/arkode/C_serial/ark_kepler.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 50afe663e1..8be92605b8 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -72,7 +72,6 @@ static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, typedef struct { sunrealtype ecc; - sunrealtype mu; /* for time-step control */ sunrealtype eps; @@ -107,7 +106,6 @@ int main(int argc, char* argv[]) // sunrealtype Tf = SUN_RCONST(100000.0); sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); - const sunrealtype mu = SUN_RCONST(0.005); /* Default integrator Options */ int step_mode = 0; @@ -138,7 +136,6 @@ int main(int argc, char* argv[]) /* Allocate and fill udata structure */ udata = (UserData) malloc(sizeof(*udata)); udata->ecc = ecc; - udata->mu = mu; udata->alpha = SUN_RCONST(3.0)/SUN_RCONST(2.0); udata->eps = dt; udata->rho_n = SUN_RCONST(1.0); From f409a05c2d76e8ce24f0ef2d2dd487ffda530af2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 14:16:49 -0700 Subject: [PATCH 037/177] update example documentation --- examples/arkode/C_serial/ark_kepler.c | 43 ++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 8be92605b8..633365a48c 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -11,7 +11,7 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End * ---------------------------------------------------------------------------- - * We consider the Kepler problem. We choose one body to be the center of our + * We consider the Kepler problem. We choose one body to be the center of our * coordinate system and then we use the coordinates q = (q1, q2) to represent * the position of the second body relative to the first (center). This yields * the ODE: @@ -26,13 +26,40 @@ * * The Hamiltonian for the system, * H(p,q) = 1/2 * (p1^2 + p2^2) - 1/sqrt(q1^2 + q2^2) - * - 1/200 / (2 * sqrt(q1^2 + q2^2)^3)) * is conserved as well as the angular momentum, * L(p,q) = q1*p2 - q2*p1. * - * We solve the problem by letting y = [ q, p ]^T then using a symplectic - * integrator via the SPRKStep time-stepper of ARKODE. - * + * By default We solve the problem by letting y = [ q, p ]^T then using a 4th + * order symplectic integrator via the SPRKStep time-stepper of ARKODE with a + * fixed time-step size. + * + * The program also accepts command line arguments to change the method + * used and time-stepping strategy. The program can be run like so + * ./ark_kepler [step mode] [method family] [method order/variant] [dt] [compensated sums] + * where + * [step mode] = 0 uses a fixed time step dt + * [step mode] = 1 uses adaptive time stepping + * [method family] = 0 indicates a SPRK method should be used + * [method family] = 1 indicates an ERK method should be used + * [method order] in {1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10} indicates the method order, and + * for 2nd, 3rd, and 4th order SPRK, the variant of the method family to use. + * I.e., when method family = 1, then: + * 1 - Symplectic Euler + * 2 - 2nd order Leapfrog + * 22 - 2nd order Pseudo Leapfrog + * 222 - 2nd order McLachlan + * 3 - 3rd order Ruth + * 33 - 3rd order McLachlan + * 4 - 4th order Candy-Rozmus + * 44 - 4th order McLachlan + * 5 - 5th order McLachlan + * 6 - 6th order Yoshid + * 8 - 8th order McLachlan + * 10 - 10th order Sofroniou + * When method family = 1, then method order just is the order of the ERK method. + * [dt] - time step size for fixed-step time stepping + * [compensated sums] - use compensated summation for greater accuracy when using SPRK methods + * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner * Geometric Numerical Integration: Structure-Preserving @@ -101,8 +128,8 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(150.0); - // sunrealtype Tf = SUN_RCONST(1000.0); + // sunrealtype Tf = SUN_RCONST(150.0); + sunrealtype Tf = SUN_RCONST(1000.0); // sunrealtype Tf = SUN_RCONST(100000.0); sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); @@ -110,7 +137,7 @@ int main(int argc, char* argv[]) /* Default integrator Options */ int step_mode = 0; int method = 0; - int order = 1; + int order = 4; int use_compsums = 0; const sunrealtype dTout = SUN_RCONST(1.); const int num_output_times = (int) ceil(Tf/dTout); From f9631d85fabceb96e9f73541110971581b9ead6a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 14:17:05 -0700 Subject: [PATCH 038/177] format --- examples/arkode/C_serial/ark_kepler.c | 479 ++++++++++++++------------ 1 file changed, 250 insertions(+), 229 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 633365a48c..7745924084 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -14,7 +14,7 @@ * We consider the Kepler problem. We choose one body to be the center of our * coordinate system and then we use the coordinates q = (q1, q2) to represent * the position of the second body relative to the first (center). This yields - * the ODE: + * the ODE: * dq/dt = [ p1 ] * [ p2 ] * dp/dt = [ -q1 / (q1^2 + q2^2)^(3/2) ] @@ -22,7 +22,7 @@ * with the initial conditions * q(0) = [ 1 - e ], p(0) = [ 0 ] * [ 0 ] [ sqrt((1+e)/(1-e)) ] - * where e = 0.6 is the eccentricity. + * where e = 0.6 is the eccentricity. * * The Hamiltonian for the system, * H(p,q) = 1/2 * (p1^2 + p2^2) - 1/sqrt(q1^2 + q2^2) @@ -32,34 +32,24 @@ * By default We solve the problem by letting y = [ q, p ]^T then using a 4th * order symplectic integrator via the SPRKStep time-stepper of ARKODE with a * fixed time-step size. - * + * * The program also accepts command line arguments to change the method * used and time-stepping strategy. The program can be run like so - * ./ark_kepler [step mode] [method family] [method order/variant] [dt] [compensated sums] - * where - * [step mode] = 0 uses a fixed time step dt - * [step mode] = 1 uses adaptive time stepping - * [method family] = 0 indicates a SPRK method should be used - * [method family] = 1 indicates an ERK method should be used - * [method order] in {1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10} indicates the method order, and - * for 2nd, 3rd, and 4th order SPRK, the variant of the method family to use. - * I.e., when method family = 1, then: - * 1 - Symplectic Euler - * 2 - 2nd order Leapfrog - * 22 - 2nd order Pseudo Leapfrog - * 222 - 2nd order McLachlan - * 3 - 3rd order Ruth - * 33 - 3rd order McLachlan - * 4 - 4th order Candy-Rozmus - * 44 - 4th order McLachlan - * 5 - 5th order McLachlan - * 6 - 6th order Yoshid - * 8 - 8th order McLachlan - * 10 - 10th order Sofroniou - * When method family = 1, then method order just is the order of the ERK method. - * [dt] - time step size for fixed-step time stepping - * [compensated sums] - use compensated summation for greater accuracy when using SPRK methods - * + * ./ark_kepler [step mode] [method family] [method order/variant] [dt] + * [compensated sums] where [step mode] = 0 uses a fixed time step dt [step + * mode] = 1 uses adaptive time stepping [method family] = 0 indicates a SPRK + * method should be used [method family] = 1 indicates an ERK method should be + * used [method order] in {1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10} indicates + * the method order, and for 2nd, 3rd, and 4th order SPRK, the variant of the + * method family to use. I.e., when method family = 1, then: 1 - Symplectic + * Euler 2 - 2nd order Leapfrog 22 - 2nd order Pseudo Leapfrog 222 - 2nd order + * McLachlan 3 - 3rd order Ruth 33 - 3rd order McLachlan 4 - 4th order + * Candy-Rozmus 44 - 4th order McLachlan 5 - 5th order McLachlan 6 - 6th order + * Yoshid 8 - 8th order McLachlan 10 - 10th order Sofroniou When method family = + * 1, then method order just is the order of the ERK method. [dt] - time step + * size for fixed-step time stepping [compensated sums] - use compensated + * summation for greater accuracy when using SPRK methods + * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner * Geometric Numerical Integration: Structure-Preserving @@ -68,36 +58,37 @@ * ISSN 0179-3632 * --------------------------------------------------------------------------*/ -#include +#include /* prototypes for ARKStep fcts., consts */ +#include /* prototypes for MRIStep fcts., consts */ #include -#include /* prototypes for MRIStep fcts., consts */ -#include /* prototypes for ARKStep fcts., consts */ -#include /* serial N_Vector type, fcts., macros */ -#include /* def. math fcns, 'sunrealtype' */ +#include /* serial N_Vector type, fcts., macros */ +#include +#include /* def. math fcns, 'sunrealtype' */ + #include "arkode/arkode_sprk.h" #include "sundials/sundials_nonlinearsolver.h" #include "sundials/sundials_nvector.h" #include "sundials/sundials_types.h" #include "sunnonlinsol/sunnonlinsol_fixedpoint.h" -static int check_retval(void *returnvalue, const char *funcname, int opt); +static int check_retval(void* returnvalue, const char* funcname, int opt); static void InitialConditions(N_Vector y0, sunrealtype ecc); static sunrealtype Hamiltonian(N_Vector yvec); static sunrealtype AngularMomentum(N_Vector y); -static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); -static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); -static int force(sunrealtype t, N_Vector y, N_Vector ydot, void *user_data); +static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static sunrealtype Q(N_Vector yvec, sunrealtype alpha); static sunrealtype G(N_Vector yvec, sunrealtype alpha); static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, - sunrealtype h3, sunrealtype e1, sunrealtype e2, - sunrealtype e3, int q, int p, sunrealtype *hnew, - void *user_data); + sunrealtype h3, sunrealtype e1, sunrealtype e2, sunrealtype e3, + int q, int p, sunrealtype* hnew, void* user_data); -typedef struct { +typedef struct +{ sunrealtype ecc; /* for time-step control */ @@ -108,8 +99,8 @@ typedef struct { sunrealtype rho_n; sunrealtype rho_np1; - FILE *hhist_fp; -} *UserData; + FILE* hhist_fp; +} * UserData; int main(int argc, char* argv[]) { @@ -124,46 +115,36 @@ int main(int argc, char* argv[]) int argi, iout, retval; NLS = NULL; - y = NULL; + y = NULL; /* Default problem parameters */ - const sunrealtype T0 = SUN_RCONST(0.0); + const sunrealtype T0 = SUN_RCONST(0.0); // sunrealtype Tf = SUN_RCONST(150.0); - sunrealtype Tf = SUN_RCONST(1000.0); + sunrealtype Tf = SUN_RCONST(1000.0); // sunrealtype Tf = SUN_RCONST(100000.0); - sunrealtype dt = SUN_RCONST(1e-2); - const sunrealtype ecc = SUN_RCONST(0.6); + sunrealtype dt = SUN_RCONST(1e-2); + const sunrealtype ecc = SUN_RCONST(0.6); /* Default integrator Options */ - int step_mode = 0; - int method = 0; - int order = 4; - int use_compsums = 0; - const sunrealtype dTout = SUN_RCONST(1.); - const int num_output_times = (int) ceil(Tf/dTout); + int step_mode = 0; + int method = 0; + int order = 4; + int use_compsums = 0; + const sunrealtype dTout = SUN_RCONST(1.); + const int num_output_times = (int)ceil(Tf / dTout); /* Parse CLI args */ argi = 0; - if (argc > 1) { - step_mode = atoi(argv[++argi]); - } - if (argc > 2) { - method = atoi(argv[++argi]); - } - if (argc > 3) { - order = atoi(argv[++argi]); - } - if (argc > 4) { - dt = atof(argv[++argi]); - } - if (argc > 5) { - use_compsums = atoi(argv[++argi]); - } + if (argc > 1) { step_mode = atoi(argv[++argi]); } + if (argc > 2) { method = atoi(argv[++argi]); } + if (argc > 3) { order = atoi(argv[++argi]); } + if (argc > 4) { dt = atof(argv[++argi]); } + if (argc > 5) { use_compsums = atoi(argv[++argi]); } /* Allocate and fill udata structure */ - udata = (UserData) malloc(sizeof(*udata)); + udata = (UserData)malloc(sizeof(*udata)); udata->ecc = ecc; - udata->alpha = SUN_RCONST(3.0)/SUN_RCONST(2.0); + udata->alpha = SUN_RCONST(3.0) / SUN_RCONST(2.0); udata->eps = dt; udata->rho_n = SUN_RCONST(1.0); @@ -178,95 +159,105 @@ int main(int argc, char* argv[]) InitialConditions(y, ecc); /* Create SPRKStep integrator */ - if (method == 0) { + if (method == 0) + { arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); - switch (order) { - case 1: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticEuler()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 2: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticLeapfrog2()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 22: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticPseudoLeapfrog2()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 222: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan2()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 3: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan3()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 33: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 4: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticCandyRozmus4()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 44: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 5: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan5()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 6: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticYoshida6()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 8: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan8()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 10: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticSofroniou10()); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - default: - fprintf(stderr, "Not a valid method\n"); - return 1; + switch (order) + { + case 1: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticEuler()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 2: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticLeapfrog2()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 22: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticPseudoLeapfrog2()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 222: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan2()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 3: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan3()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 33: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 4: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticCandyRozmus4()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 44: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 5: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan5()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 6: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticYoshida6()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 8: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan8()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 10: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticSofroniou10()); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + default: fprintf(stderr, "Not a valid method\n"); return 1; } retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); - if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) return 1; + if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) return 1; - if (step_mode == 0) { + if (step_mode == 0) + { retval = SPRKStepSetFixedStep(arkode_mem, dt); if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int) ceil(Tf/dt)) + 1); + retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt)) + 1); if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; - } else { + } + else + { /* Adaptivity based on [Hairer and Soderlind, 2005] */ retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - udata->rho_nmhalf = udata->rho_n - udata->eps*G(y, udata->alpha)/SUN_RCONST(2.0); - udata->rho_nphalf = udata->rho_nmhalf + udata->eps*G(y, udata->alpha); - retval = SPRKStepSetInitStep(arkode_mem, udata->eps/udata->rho_nphalf); + udata->rho_nmhalf = udata->rho_n - + udata->eps * G(y, udata->alpha) / SUN_RCONST(2.0); + udata->rho_nphalf = udata->rho_nmhalf + udata->eps * G(y, udata->alpha); + retval = SPRKStepSetInitStep(arkode_mem, udata->eps / udata->rho_nphalf); if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; - retval = SPRKStepSetMaxNumSteps(arkode_mem, (long int) 100*(ceil(Tf/dt) + 1)); + retval = SPRKStepSetMaxNumSteps(arkode_mem, + (long int)100 * (ceil(Tf / dt) + 1)); if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; } - retval = SPRKStepSetUserData(arkode_mem, (void *) udata); + retval = SPRKStepSetUserData(arkode_mem, (void*)udata); if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; - } else if (method >= 1) { - if (method == 1) { + } + else if (method >= 1) + { + if (method == 1) + { arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); retval = ARKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - } else { + } + else + { arkode_mem = ARKStepCreate(velocity, force, T0, y, sunctx); retval = ARKStepSetOrder(arkode_mem, order); @@ -276,22 +267,24 @@ int main(int argc, char* argv[]) ARKStepSetNonlinearSolver(arkode_mem, NLS); } - retval = ARKStepSetUserData(arkode_mem, (void *) udata); + retval = ARKStepSetUserData(arkode_mem, (void*)udata); if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - if (step_mode == 0) { - retval = ARKStepSetFixedStep(arkode_mem, dt); - } else { - retval = ARKStepSStolerances(arkode_mem, 100*SUN_UNIT_ROUNDOFF, 100*SUN_UNIT_ROUNDOFF); + if (step_mode == 0) { retval = ARKStepSetFixedStep(arkode_mem, dt); } + else + { + retval = ARKStepSStolerances(arkode_mem, 100 * SUN_UNIT_ROUNDOFF, + 100 * SUN_UNIT_ROUNDOFF); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } } /* Open output files */ - if (method == 0) { + if (method == 0) + { const char* fmt1 = "ark_kepler_conserved_sprk-%d-dt-%.6f.txt"; const char* fmt2 = "ark_kepler_solution_sprk-%d-dt-%.6f.txt"; const char* fmt3 = "ark_kepler_times_sprk-%d-dt-%.6f.txt"; @@ -305,7 +298,9 @@ int main(int argc, char* argv[]) times_fp = fopen(fname, "w+"); // sprintf(fname, fmt4, order); // udata->hhist_fp = fopen(fname, "w+"); - } else { + } + else + { const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; const char* fmt3 = "ark_kepler_times_erk-%d.txt"; @@ -324,73 +319,94 @@ int main(int argc, char* argv[]) printf("\n Begin Kepler Problem\n\n"); /* Print out starting energy, momentum before integrating */ - tret = T0; - tout = T0+dTout; - H0 = Hamiltonian(y); - L0 = AngularMomentum(y); - sunrealtype Q0 = Q(y, udata->alpha)/udata->rho_n; - fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf, Q(p,q) = %.16Lf\n", + tret = T0; + tout = T0 + dTout; + H0 = Hamiltonian(y); + L0 = AngularMomentum(y); + sunrealtype Q0 = Q(y, udata->alpha) / udata->rho_n; + fprintf(stdout, + "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf, Q(p,q) = %.16Lf\n", tret, H0, L0, Q0); fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); N_VPrintFile(y, solution_fp); /* Do integration */ - if (method == 0) { - for (iout = 0; iout < num_output_times; iout++) { + if (method == 0) + { + for (iout = 0; iout < num_output_times; iout++) + { SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - Q(y, udata->alpha)/udata->rho_np1-Q0); + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, + Q(y, udata->alpha) / udata->rho_np1 - Q0); fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), + AngularMomentum(y)); N_VPrintFile(y, solution_fp); - - /* Check if the solve was successful, if so, update the time and continue */ - if (retval >= 0) { + + /* Check if the solve was successful, if so, update the time and continue + */ + if (retval >= 0) + { tout += dTout; tout = (tout > Tf) ? Tf : tout; - } else { + } + else + { fprintf(stderr, "Solver failure, stopping integration\n"); break; } } - } else { - for (iout = 0; iout < num_output_times; iout++) { + } + else + { + for (iout = 0; iout < num_output_times; iout++) + { ARKStepSetStopTime(arkode_mem, tout); - if (step_mode == 3) { - while(tret < tout) { + if (step_mode == 3) + { + while (tret < tout) + { retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); if (retval < 0) break; - + /* Output current integration status */ fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - Q(y, udata->alpha)/udata->rho_np1-Q0); + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, + Q(y, udata->alpha) / udata->rho_np1 - Q0); fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), + AngularMomentum(y)); N_VPrintFile(y, solution_fp); } - } else { + } + else + { retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - + /* Output current integration status */ fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y)-H0, AngularMomentum(y)-L0, - Q(y, udata->alpha)/udata->rho_np1-Q0); + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, + Q(y, udata->alpha) / udata->rho_np1 - Q0); fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), + AngularMomentum(y)); N_VPrintFile(y, solution_fp); } - /* Check if the solve was successful, if so, update the time and continue */ - if (retval >= 0) { + /* Check if the solve was successful, if so, update the time and continue + */ + if (retval >= 0) + { tout += dTout; tout = (tout > Tf) ? Tf : tout; - } else { + } + else + { fprintf(stderr, "Solver failure, stopping integration\n"); break; } @@ -402,16 +418,17 @@ int main(int argc, char* argv[]) fclose(times_fp); fclose(conserved_fp); fclose(solution_fp); - if (NLS) { - SUNNonlinSolFree(NLS); - } + if (NLS) { SUNNonlinSolFree(NLS); } N_VDestroy(y); - if (method == 0) { + if (method == 0) + { SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - SPRKStepFree(&arkode_mem); - } else { + SPRKStepFree(&arkode_mem); + } + else + { ARKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - ARKStepFree(&arkode_mem); + ARKStepFree(&arkode_mem); } SUNContext_Free(&sunctx); @@ -423,41 +440,38 @@ void InitialConditions(N_Vector y0vec, sunrealtype ecc) { const sunrealtype zero = SUN_RCONST(0.0); const sunrealtype one = SUN_RCONST(1.0); - sunrealtype* y0 = N_VGetArrayPointer(y0vec); + sunrealtype* y0 = N_VGetArrayPointer(y0vec); y0[0] = one - ecc; y0[1] = zero; y0[2] = zero; - y0[3] = SUNRsqrt((one + ecc)/(one - ecc)); + y0[3] = SUNRsqrt((one + ecc) / (one - ecc)); } -void Solution(N_Vector yvec, UserData user_data) -{ - -} +void Solution(N_Vector yvec, UserData user_data) {} sunrealtype Hamiltonian(N_Vector yvec) { - sunrealtype H = 0.0; - sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype sqrt_qTq = SUNRsqrt(y[0]*y[0] + y[1]*y[1]); - const sunrealtype pTp = y[2]*y[2] + y[3]*y[3]; + sunrealtype H = 0.0; + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype sqrt_qTq = SUNRsqrt(y[0] * y[0] + y[1] * y[1]); + const sunrealtype pTp = y[2] * y[2] + y[3] * y[3]; - H = SUN_RCONST(0.5)*pTp - SUN_RCONST(1.0)/sqrt_qTq; + H = SUN_RCONST(0.5) * pTp - SUN_RCONST(1.0) / sqrt_qTq; return H; } sunrealtype AngularMomentum(N_Vector yvec) { - sunrealtype L = 0.0; - sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype L = 0.0; + sunrealtype* y = N_VGetArrayPointer(yvec); const sunrealtype q1 = y[0]; const sunrealtype q2 = y[1]; const sunrealtype p1 = y[2]; const sunrealtype p2 = y[3]; - L = q1*p2 - q2*p1; + L = q1 * p2 - q2 * p1; return L; } @@ -474,8 +488,8 @@ int dydt(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); const sunrealtype p1 = y[2]; const sunrealtype p2 = y[3]; @@ -488,61 +502,60 @@ int velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - UserData udata = (UserData) user_data; - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - const sunrealtype q1 = y[0]; - const sunrealtype q2 = y[1]; - const sunrealtype sqrt_qTq = SUNRsqrt(q1*q1 + q2*q2); + UserData udata = (UserData)user_data; + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + const sunrealtype sqrt_qTq = SUNRsqrt(q1 * q1 + q2 * q2); // ydot[0] = ydot[1] = SUN_RCONST(0.0); - ydot[2] = - q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)); - ydot[3] = - q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)); + ydot[2] = -q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)); + ydot[3] = -q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)); return 0; } sunrealtype G(N_Vector yvec, sunrealtype alpha) { - sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* y = N_VGetArrayPointer(yvec); const sunrealtype q1 = y[0]; const sunrealtype q2 = y[1]; const sunrealtype p1 = y[2]; const sunrealtype p2 = y[3]; - const sunrealtype pTq = p1*q1 + p2*q2; - const sunrealtype qTq = q1*q1 + q2*q2; + const sunrealtype pTq = p1 * q1 + p2 * q2; + const sunrealtype qTq = q1 * q1 + q2 * q2; return (-alpha * pTq / qTq); } sunrealtype Q(N_Vector yvec, sunrealtype alpha) { - sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* y = N_VGetArrayPointer(yvec); const sunrealtype q1 = y[0]; const sunrealtype q2 = y[1]; - const sunrealtype qTq = q1*q1 + q2*q2; + const sunrealtype qTq = q1 * q1 + q2 * q2; - return SUNRpowerR(qTq, -alpha/SUN_RCONST(2.0)); + return SUNRpowerR(qTq, -alpha / SUN_RCONST(2.0)); } int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, - sunrealtype h3, sunrealtype e1, sunrealtype e2, - sunrealtype e3, int q, int p, sunrealtype *hnew, - void *user_data) + sunrealtype h3, sunrealtype e1, sunrealtype e2, sunrealtype e3, int q, + int p, sunrealtype* hnew, void* user_data) { - UserData udata = (UserData) user_data; + UserData udata = (UserData)user_data; // fprintf(udata->hhist_fp, "%.16Lf\n", h1); const sunrealtype G_np1 = G(y, udata->alpha); - udata->rho_np1 = udata->rho_nphalf + udata->eps*G_np1/SUN_RCONST(2.0); + udata->rho_np1 = udata->rho_nphalf + udata->eps * G_np1 / SUN_RCONST(2.0); - udata->rho_nmhalf = udata->rho_nphalf; - const sunrealtype rho_nphalf_next = udata->rho_nmhalf + udata->eps*G_np1; + udata->rho_nmhalf = udata->rho_nphalf; + const sunrealtype rho_nphalf_next = udata->rho_nmhalf + udata->eps * G_np1; - *hnew = udata->eps/rho_nphalf_next; + *hnew = udata->eps / rho_nphalf_next; return 0; } @@ -555,29 +568,37 @@ int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, opt == 2 means function allocates memory so check if returned NULL pointer */ -int check_retval(void *returnvalue, const char *funcname, int opt) +int check_retval(void* returnvalue, const char* funcname, int opt) { - int *retval; + int* retval; /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ - if (opt == 0 && returnvalue == NULL) { + if (opt == 0 && returnvalue == NULL) + { fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed - returned NULL pointer\n\n", funcname); - return 1; } + return 1; + } /* Check if retval < 0 */ - else if (opt == 1) { - retval = (int *) returnvalue; - if (*retval < 0) { + else if (opt == 1) + { + retval = (int*)returnvalue; + if (*retval < 0) + { fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed with retval = %d\n\n", funcname, *retval); - return 1; }} + return 1; + } + } /* Check if function returned NULL pointer - no memory allocated */ - else if (opt == 2 && returnvalue == NULL) { + else if (opt == 2 && returnvalue == NULL) + { fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", funcname); - return 1; } + return 1; + } return 0; } From ef41db0f240a6a1e9439910ac0bc010b004d2217 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 15:17:14 -0700 Subject: [PATCH 039/177] updates for adaptivity --- examples/arkode/C_serial/ark_kepler.c | 96 ++++++++++--------- examples/arkode/C_serial/ark_kepler_plot.py | 24 ++--- .../C_serial/ark_kepler_plot_order_work.py | 8 +- .../C_serial/ark_kepler_test_convergence.sh | 2 +- src/arkode/arkode_sprkstep_io.c | 3 - 5 files changed, 70 insertions(+), 63 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 7745924084..7bb7595c22 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -35,20 +35,24 @@ * * The program also accepts command line arguments to change the method * used and time-stepping strategy. The program can be run like so - * ./ark_kepler [step mode] [method family] [method order/variant] [dt] - * [compensated sums] where [step mode] = 0 uses a fixed time step dt [step - * mode] = 1 uses adaptive time stepping [method family] = 0 indicates a SPRK - * method should be used [method family] = 1 indicates an ERK method should be - * used [method order] in {1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10} indicates - * the method order, and for 2nd, 3rd, and 4th order SPRK, the variant of the - * method family to use. I.e., when method family = 1, then: 1 - Symplectic - * Euler 2 - 2nd order Leapfrog 22 - 2nd order Pseudo Leapfrog 222 - 2nd order - * McLachlan 3 - 3rd order Ruth 33 - 3rd order McLachlan 4 - 4th order - * Candy-Rozmus 44 - 4th order McLachlan 5 - 5th order McLachlan 6 - 6th order - * Yoshid 8 - 8th order McLachlan 10 - 10th order Sofroniou When method family = - * 1, then method order just is the order of the ERK method. [dt] - time step - * size for fixed-step time stepping [compensated sums] - use compensated - * summation for greater accuracy when using SPRK methods + * ./ark_kepler [step mode] [method family] [method order/variant] [dt] [compensated sums] + * where + * [step mode] = 0 uses a fixed time step dt + * [step mode] = 1 uses adaptive time stepping + * [method family] = 0 indicates a SPRK method should be used + * [method family] = 1 indicates an ERK method should be used + * [method order] in {1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10} indicates the method order, + * and for 2nd, 3rd, and 4th order SPRK, the variant of the method family to use. I.e., + * when method family = 1, then: + * 1 - Symplectic Euler, 2 - 2nd order Leapfrog, 22 - 2nd order Pseudo Leapfrog, + * 222 - 2nd order McLachlan, 3 - 3rd order Ruth, 33 - 3rd order McLachlan, + * 4 - 4th order Candy-Rozmus, 44 - 4th order McLachlan, 5 - 5th order McLachlan, + * 6 - 6th order Yoshida, 8 - 8th order McLachlan, 10 - 10th order Sofroniou + * When method family = 1, then method order just is the order of the ERK method. + * [dt] - time step size for fixed-step time stepping, or when using adaptivity the + * constant which bounds the error like O(eps^p) where p is the method order. + * [compensated sums] = 0, dont use compensated summation for greater accuracy when using SPRK methods + * [compensated sums] = 1, use compensated summation for greater accuracy when using SPRK methods * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner @@ -58,18 +62,17 @@ * ISSN 0179-3632 * --------------------------------------------------------------------------*/ -#include /* prototypes for ARKStep fcts., consts */ +#include /* prototypes for ARKStep fcts., consts */ +#include #include /* prototypes for MRIStep fcts., consts */ #include #include /* serial N_Vector type, fcts., macros */ #include #include /* def. math fcns, 'sunrealtype' */ - -#include "arkode/arkode_sprk.h" -#include "sundials/sundials_nonlinearsolver.h" -#include "sundials/sundials_nvector.h" -#include "sundials/sundials_types.h" -#include "sunnonlinsol/sunnonlinsol_fixedpoint.h" +#include +#include +#include +#include static int check_retval(void* returnvalue, const char* funcname, int opt); @@ -118,10 +121,8 @@ int main(int argc, char* argv[]) y = NULL; /* Default problem parameters */ - const sunrealtype T0 = SUN_RCONST(0.0); - // sunrealtype Tf = SUN_RCONST(150.0); - sunrealtype Tf = SUN_RCONST(1000.0); - // sunrealtype Tf = SUN_RCONST(100000.0); + const sunrealtype T0 = SUN_RCONST(0.0); + sunrealtype Tf = SUN_RCONST(1000.0); sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); @@ -142,10 +143,17 @@ int main(int argc, char* argv[]) if (argc > 5) { use_compsums = atoi(argv[++argi]); } /* Allocate and fill udata structure */ - udata = (UserData)malloc(sizeof(*udata)); - udata->ecc = ecc; + udata = (UserData)malloc(sizeof(*udata)); + udata->ecc = ecc; + /* Adaptivity controller parameters */ + /* Controller's integral gain. Increasing this will result in a higher + rate of change in the step size, while decreasing it will result in + a lower rate of change. */ udata->alpha = SUN_RCONST(3.0) / SUN_RCONST(2.0); + /* Controller's set-point. The error in the Hamiltonian is bounded by + * O(eps^p) where p is the method order. */ udata->eps = dt; + /* Controller step density initial value. */ udata->rho_n = SUN_RCONST(1.0); /* Create the SUNDIALS context object for this simulation */ @@ -229,9 +237,10 @@ int main(int argc, char* argv[]) } else { - /* Adaptivity based on [Hairer and Soderlind, 2005] */ + /* Adaptivity based on https://doi.org/10.1137/04060699 (Hairer and + * Soderlind, 2005). */ retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); - if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + if (check_retval(&retval, "SPRKStepSetAdaptivityFn", 1)) return 1; udata->rho_nmhalf = udata->rho_n - udata->eps * G(y, udata->alpha) / SUN_RCONST(2.0); @@ -239,8 +248,8 @@ int main(int argc, char* argv[]) retval = SPRKStepSetInitStep(arkode_mem, udata->eps / udata->rho_nphalf); if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; - retval = SPRKStepSetMaxNumSteps(arkode_mem, - (long int)100 * (ceil(Tf / dt) + 1)); + /* Set the max number of time steps to something large. */ + retval = SPRKStepSetMaxNumSteps(arkode_mem, 100000000); if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; } @@ -288,7 +297,7 @@ int main(int argc, char* argv[]) const char* fmt1 = "ark_kepler_conserved_sprk-%d-dt-%.6f.txt"; const char* fmt2 = "ark_kepler_solution_sprk-%d-dt-%.6f.txt"; const char* fmt3 = "ark_kepler_times_sprk-%d-dt-%.6f.txt"; - // const char* fmt4 = "ark_kepler_hhist_sprk-%d.txt"; + const char* fmt4 = "ark_kepler_hhist_sprk-%d-dt-%.6f.txt"; char fname[64]; sprintf(fname, fmt1, order, dt); conserved_fp = fopen(fname, "w+"); @@ -296,15 +305,14 @@ int main(int argc, char* argv[]) solution_fp = fopen(fname, "w+"); sprintf(fname, fmt3, order, dt); times_fp = fopen(fname, "w+"); - // sprintf(fname, fmt4, order); - // udata->hhist_fp = fopen(fname, "w+"); + sprintf(fname, fmt4, order, dt); + udata->hhist_fp = fopen(fname, "w+"); } else { - const char* fmt1 = "ark_kepler_conserved_erk-%d.txt"; - const char* fmt2 = "ark_kepler_solution_erk-%d.txt"; - const char* fmt3 = "ark_kepler_times_erk-%d.txt"; - // const char* fmt4 = "ark_kepler_hhist_erk-%d.txt"; + const char* fmt1 = "ark_kepler_conserved_erk-%d-dt-%.6f.txt"; + const char* fmt2 = "ark_kepler_solution_erk-%d-dt-%.6f.txt"; + const char* fmt3 = "ark_kepler_times_erk-%d-dt-%.6f.txt"; char fname[64]; sprintf(fname, fmt1, order); conserved_fp = fopen(fname, "w+"); @@ -312,8 +320,6 @@ int main(int argc, char* argv[]) solution_fp = fopen(fname, "w+"); sprintf(fname, fmt3, order); times_fp = fopen(fname, "w+"); - // sprintf(fname, fmt4, order); - // udata->hhist_fp = fopen(fname, "w+"); } printf("\n Begin Kepler Problem\n\n"); @@ -346,6 +352,9 @@ int main(int argc, char* argv[]) fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); + sunrealtype hlast; + SPRKStepGetLastStep(arkode_mem, &hlast); + fprintf(udata->hhist_fp, "%.16Lf\n", hlast); N_VPrintFile(y, solution_fp); /* Check if the solve was successful, if so, update the time and continue @@ -413,7 +422,7 @@ int main(int argc, char* argv[]) } } - // fclose(udata->hhist_fp); + if (udata->hhist_fp) { fclose(udata->hhist_fp); } free(udata); fclose(times_fp); fclose(conserved_fp); @@ -516,6 +525,9 @@ int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) return 0; } +/* Functions needed to implement the step density integrating controller + proposed by Hairer and Soderlind in https://doi.org/10.1137/04060699. */ + sunrealtype G(N_Vector yvec, sunrealtype alpha) { sunrealtype* y = N_VGetArrayPointer(yvec); @@ -547,8 +559,6 @@ int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, { UserData udata = (UserData)user_data; - // fprintf(udata->hhist_fp, "%.16Lf\n", h1); - const sunrealtype G_np1 = G(y, udata->alpha); udata->rho_np1 = udata->rho_nphalf + udata->eps * G_np1 / SUN_RCONST(2.0); diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index 2d8c4177b3..b4d4582c84 100755 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -18,8 +18,8 @@ import numpy as np import matplotlib.pyplot as plt -t = np.loadtxt('ark_kepler_times_erk-4.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_erk-4.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_sprk-10-dt-0.100000.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_sprk-10-dt-0.100000.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) @@ -27,7 +27,7 @@ plt.savefig('ark_kepler_phase.png') plt.close() -conserved = np.loadtxt('ark_kepler_conserved_erk-4.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_sprk-10-dt-0.100000.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] @@ -53,15 +53,15 @@ plt.savefig('ark_kepler_momentum.png') plt.close() -# # Step history -# hhist = np.loadtxt('ark_kepler_hhist_erk-4.txt', dtype=np.float64) -# plt.figure(dpi=200) -# plt.title('Step Size History') -# plt.plot(t[:-1], hhist) -# plt.xlabel('<--- t --->') -# plt.yscale('log') -# plt.savefig('ark_kepler_hhist.png') -# plt.close() +# Step history +hhist = np.loadtxt('ark_kepler_hhist_sprk-10-dt-0.100000.txt', dtype=np.float64) +plt.figure(dpi=200) +plt.title('Step Size History') +plt.plot(t[:-1], hhist) +plt.xlabel('<--- t --->') +plt.yscale('log') +plt.savefig('ark_kepler_hhist.png') +plt.close() # # Time plot. diff --git a/examples/arkode/C_serial/ark_kepler_plot_order_work.py b/examples/arkode/C_serial/ark_kepler_plot_order_work.py index b2d572e43d..9e2d923bce 100755 --- a/examples/arkode/C_serial/ark_kepler_plot_order_work.py +++ b/examples/arkode/C_serial/ark_kepler_plot_order_work.py @@ -24,7 +24,7 @@ def load_results(case): sprk10 = [] # Sofroniou 10th order # step_sizes = [0.000010, 0.000100, 0.001000, 0.010000, 0.100000] -step_sizes = [0.000100, 0.001000, 0.010000, 0.100000] +step_sizes = [0.000100, 0.001000, 0.010000, 0.100000, 0.500000] for dt in step_sizes: sprk1.append({ 'method': 'Symplectic Euler', @@ -131,7 +131,7 @@ def load_results(case): all_methods[10].append(sprk10) # Reference solution -_, y_ref, _ = load_results('_erk-8') +_, y_ref, _ = load_results('_sprk-10-dt-0.000100') # # Solution error plot @@ -147,7 +147,7 @@ def load_results(case): dts = [] for d in method: _, y, _ = d['data'] - err = np.linalg.norm(y - y_ref, np.inf) / np.linalg.norm(y_ref, np.inf) + err = np.linalg.norm(y - y_ref, 2) / np.linalg.norm(y_ref, 2) print('method: %15s, dt = %.6f, err = %g' % (d['method'], d['dt'], err)) if err >= 10.: continue @@ -181,7 +181,7 @@ def load_results(case): _, y, conserved = d['data'] energy_0 = conserved[0,0] energy = conserved[:,0] - err = np.linalg.norm(energy-energy_0, np.inf) + err = np.linalg.norm(energy-energy_0, 2) print('method: %15s, dt = %.6f, energy err = %g' % (d['method'], d['dt'], err)) if err >= 10.: continue diff --git a/examples/arkode/C_serial/ark_kepler_test_convergence.sh b/examples/arkode/C_serial/ark_kepler_test_convergence.sh index 8cf79937fa..73b17225cd 100755 --- a/examples/arkode/C_serial/ark_kepler_test_convergence.sh +++ b/examples/arkode/C_serial/ark_kepler_test_convergence.sh @@ -4,7 +4,7 @@ ./ark_kepler 1 0 8 0.000001 orders=(1 2 22 222 3 33 4 44 5 6 8 10) -dts=(0.1 0.01 0.001 0.0001) +dts=(0.5 0.1 0.01 0.001 0.0001) for order in ${orders[@]}; do for dt in ${dts[@]}; diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index bfb24b37c9..db870eb3ac 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -360,9 +360,6 @@ int SPRKStepSetDefaults(void* arkode_mem) return (retval); } - /* Fixed step mode by default */ - SPRKStepSetFixedStep(ark_mem, 0.01); - /* set using default method order */ SPRKStepSetOrder(arkode_mem, 0); From 13bb42e77473e6cfe682f605f664e63f7ad5d66a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 15:19:38 -0700 Subject: [PATCH 040/177] format sprkstep --- include/arkode/arkode_sprkstep.h | 5 + src/arkode/arkode_sprkstep.c | 491 ++++++++++++++++--------------- 2 files changed, 266 insertions(+), 230 deletions(-) diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index ed083482bb..5274f2978b 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -58,6 +58,11 @@ SUNDIALS_EXPORT int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, SUNDIALS_EXPORT int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR); +/* Rootfinding functions */ + +/* Rootfinding initialization */ +SUNDIALS_EXPORT int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g); + /* Optional input functions -- must be called AFTER SPRKStepCreate */ SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetOptimalParams(void* arkode_mem); diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index b5063cc6d5..4d659dd0c8 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -15,26 +15,27 @@ * module. *--------------------------------------------------------------*/ +#include "arkode/arkode_sprkstep.h" + +#include #include #include #include - -#include +#include #include #include -#include #include -#include "arkode/arkode_sprkstep.h" #include "arkode_impl.h" -#include "arkode_sprkstep_impl.h" #include "arkode_interp_impl.h" +#include "arkode_sprkstep_impl.h" /*=============================================================== SPRKStep Exported functions -- Required ===============================================================*/ -void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNContext sunctx) +void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, + SUNContext sunctx) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -42,61 +43,69 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont int retval; /* Check that f1 and f2 are supplied */ - if (f1 == NULL) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", - "SPRKStepCreate", MSG_ARK_NULL_F); - return(NULL); + if (f1 == NULL) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", + MSG_ARK_NULL_F); + return (NULL); } - if (f2 == NULL) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", - "SPRKStepCreate", MSG_ARK_NULL_F); - return(NULL); + if (f2 == NULL) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", + MSG_ARK_NULL_F); + return (NULL); } /* Check for legal input parameters */ - if (y0 == NULL) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", - "SPRKStepCreate", MSG_ARK_NULL_Y0); - return(NULL); + if (y0 == NULL) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", + MSG_ARK_NULL_Y0); + return (NULL); } - if (!sunctx) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", - "SPRKStepCreate", MSG_ARK_NULL_SUNCTX); - return(NULL); + if (!sunctx) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", + MSG_ARK_NULL_SUNCTX); + return (NULL); } /* Test if all required vector operations are implemented */ nvectorOK = sprkStep_CheckNVector(y0); - if (!nvectorOK) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", - "SPRKStepCreate", MSG_ARK_BAD_NVECTOR); - return(NULL); + if (!nvectorOK) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", + MSG_ARK_BAD_NVECTOR); + return (NULL); } /* Create ark_mem structure and set default values */ ark_mem = arkCreate(sunctx); - if (ark_mem == NULL) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", - "SPRKStepCreate", MSG_ARK_NO_MEM); - return(NULL); + if (ark_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKStepCreate", + MSG_ARK_NO_MEM); + return (NULL); } /* Allocate ARKodeSPRKStepMem structure, and initialize to zero */ step_mem = NULL; - step_mem = (ARKodeSPRKStepMem) malloc(sizeof(struct ARKodeSPRKStepMemRec)); - if (step_mem == NULL) { - arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::SPRKStep", - "SPRKStepCreate", MSG_ARK_ARKMEM_FAIL); - return(NULL); + step_mem = (ARKodeSPRKStepMem)malloc(sizeof(struct ARKodeSPRKStepMemRec)); + if (step_mem == NULL) + { + arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::SPRKStep", "SPRKStepCreate", + MSG_ARK_ARKMEM_FAIL); + return (NULL); } memset(step_mem, 0, sizeof(struct ARKodeSPRKStepMemRec)); /* Allocate vectors in stepper mem */ - if (!arkAllocVec(ark_mem, y0, &(step_mem->sdata))) { - SPRKStepFree((void**) &ark_mem); - return(NULL); + if (!arkAllocVec(ark_mem, y0, &(step_mem->sdata))) + { + SPRKStepFree((void**)&ark_mem); + return (NULL); } /* Attach step_mem structure and function pointers to ark_mem */ @@ -112,15 +121,16 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont ark_mem->step_init = sprkStep_Init; ark_mem->step_fullrhs = sprkStep_FullRHS; ark_mem->step = sprkStep_TakeStep; - ark_mem->step_mem = (void*) step_mem; + ark_mem->step_mem = (void*)step_mem; /* Set default values for SPRKStep optional inputs */ - retval = SPRKStepSetDefaults((void *)ark_mem); - if (retval != ARK_SUCCESS) { - arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", - "SPRKStepCreate", + retval = SPRKStepSetDefaults((void*)ark_mem); + if (retval != ARK_SUCCESS) + { + arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepCreate", "Error setting default solver options"); - SPRKStepFree((void**) &ark_mem); return(NULL); + SPRKStepFree((void**)&ark_mem); + return (NULL); } /* Copy the input parameters into ARKODE state */ @@ -128,8 +138,8 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont step_mem->f2 = f2; /* Initialize the counters */ - step_mem->nf1 = 0; - step_mem->nf2 = 0; + step_mem->nf1 = 0; + step_mem->nf2 = 0; step_mem->istage = 0; // /* Initialize external polynomial forcing data */ @@ -140,16 +150,17 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepCreate", "Unable to initialize main ARKODE infrastructure"); - SPRKStepFree((void**) &ark_mem); return(NULL); + SPRKStepFree((void**)&ark_mem); + return (NULL); } - return((void *)ark_mem); + return ((void*)ark_mem); } - /*--------------------------------------------------------------- SPRKStepResize: @@ -157,8 +168,8 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNCont It first resizes the main ARKODE infrastructure memory, and then resizes its own data. ---------------------------------------------------------------*/ -int SPRKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, - realtype t0, ARKVecResizeFn resize, void *resize_data) +int SPRKStepResize(void* arkode_mem, N_Vector y0, realtype hscale, realtype t0, + ARKVecResizeFn resize, void* resize_data) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -167,22 +178,22 @@ int SPRKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, int i, retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepResize", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepResize", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* resize ARKODE infrastructure memory */ retval = arkResize(ark_mem, y0, hscale, t0, resize, resize_data); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepResize", "Unable to resize main ARKODE infrastructure"); - return(retval); + return (retval); } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- SPRKStepReInit: @@ -194,36 +205,40 @@ int SPRKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, Note all internal counters are set to 0 on re-initialization. ---------------------------------------------------------------*/ -int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0) +int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, + N_Vector y0) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepReInit", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepReInit", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* Check if ark_mem was allocated */ - if (ark_mem->MallocDone == SUNFALSE) { + if (ark_mem->MallocDone == SUNFALSE) + { arkProcessError(ark_mem, ARK_NO_MALLOC, "ARKODE::SPRKStep", "SPRKStepReInit", MSG_ARK_NO_MALLOC); - return(ARK_NO_MALLOC); + return (ARK_NO_MALLOC); } /* Check that f1 and f2 are supplied */ - if (f1 == NULL || f2 == NULL) { + if (f1 == NULL || f2 == NULL) + { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepReInit", MSG_ARK_NULL_F); - return(ARK_ILL_INPUT); + return (ARK_ILL_INPUT); } /* Check that y0 is supplied */ - if (y0 == NULL) { + if (y0 == NULL) + { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepReInit", MSG_ARK_NULL_Y0); - return(ARK_ILL_INPUT); + return (ARK_ILL_INPUT); } /* Copy the input parameters into ARKODE state */ @@ -232,21 +247,21 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Ve /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepReInit", "Unable to reinitialize main ARKODE infrastructure"); - return(retval); + return (retval); } /* Initialize the counters */ - step_mem->nf1 = 0; - step_mem->nf2 = 0; + step_mem->nf1 = 0; + step_mem->nf2 = 0; step_mem->istage = 0; - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- SPRKStepReset: @@ -261,20 +276,21 @@ int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepReset", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepReset", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, tR, yR, RESET_INIT); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepReset", "Unable to initialize main ARKODE infrastructure"); - return(retval); + return (retval); } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } /*--------------------------------------------------------------- @@ -283,17 +299,16 @@ int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) This is the main time-integration driver (wrappers for general ARKODE utility routine) ---------------------------------------------------------------*/ -int SPRKStepEvolve(void *arkode_mem, realtype tout, N_Vector yout, - realtype *tret, int itask) +int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, + realtype* tret, int itask) { int retval; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); - retval = arkEvolve((ARKodeMem) arkode_mem, tout, yout, tret, itask); + retval = arkEvolve((ARKodeMem)arkode_mem, tout, yout, tret, itask); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); - return(retval); + return (retval); } - /*--------------------------------------------------------------- SPRKStepGetDky: @@ -301,20 +316,20 @@ int SPRKStepEvolve(void *arkode_mem, realtype tout, N_Vector yout, derivatives over the most-recently-computed step (wrapper for generic ARKODE utility routine) ---------------------------------------------------------------*/ -int SPRKStepGetDky(void *arkode_mem, realtype t, int k, N_Vector dky) +int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) { int retval; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); - retval = arkGetDky((ARKodeMem) arkode_mem, t, k, dky); + retval = arkGetDky((ARKodeMem)arkode_mem, t, k, dky); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); - return(retval); + return (retval); } /*--------------------------------------------------------------- SPRKStepFree frees all SPRKStep memory, and then calls an ARKODE utility routine to free the ARKODE infrastructure memory. ---------------------------------------------------------------*/ -void SPRKStepFree(void **arkode_mem) +void SPRKStepFree(void** arkode_mem) { int j; sunindextype Bliw, Blrw; @@ -322,18 +337,20 @@ void SPRKStepFree(void **arkode_mem) ARKodeSPRKStepMem step_mem; /* nothing to do if arkode_mem is already NULL */ - if (*arkode_mem == NULL) return; + if (*arkode_mem == NULL) return; /* conditional frees on non-NULL SPRKStep module */ - ark_mem = (ARKodeMem) (*arkode_mem); - if (ark_mem->step_mem != NULL) { - step_mem = (ARKodeSPRKStepMem) ark_mem->step_mem; - - if (step_mem->sdata != NULL) { + ark_mem = (ARKodeMem)(*arkode_mem); + if (ark_mem->step_mem != NULL) + { + step_mem = (ARKodeSPRKStepMem)ark_mem->step_mem; + + if (step_mem->sdata != NULL) + { arkFreeVec(ark_mem, &step_mem->sdata); step_mem->sdata = NULL; } - + ARKodeSPRKMem_Free(step_mem->method); free(ark_mem->step_mem); @@ -344,7 +361,6 @@ void SPRKStepFree(void **arkode_mem) arkFree(arkode_mem); } - /*=============================================================== SPRKStep Private functions ===============================================================*/ @@ -353,7 +369,6 @@ void SPRKStepFree(void **arkode_mem) Interface routines supplied to ARKODE ---------------------------------------------------------------*/ - /*--------------------------------------------------------------- sprkStep_Init: @@ -378,68 +393,69 @@ int sprkStep_Init(void* arkode_mem, int init_type) booleantype reset_efun; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_Init", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_Init", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* immediately return if reset */ - if (init_type == RESET_INIT) { return(ARK_SUCCESS); } + if (init_type == RESET_INIT) { return (ARK_SUCCESS); } /* initializations/checks for (re-)initialization call */ - if (init_type == FIRST_INIT) { - - if (!step_mem->method) { - switch (step_mem->q) { - case 1: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_1); - break; - case 2: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_2); - break; - case 3: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_3); - break; - case 4: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); - break; - case 5: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_5); - break; - case 6: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_6); - break; - case 7: - case 8: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_8); - break; - case 9: - case 10: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_10); - default: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); - break; + if (init_type == FIRST_INIT) + { + if (!step_mem->method) + { + switch (step_mem->q) + { + case 1: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_1); break; + case 2: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_2); break; + case 3: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_3); break; + case 4: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); break; + case 5: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_5); break; + case 6: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_6); break; + case 7: + case 8: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_8); break; + case 9: + case 10: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_10); + default: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); break; } } - } - /* Signal to shared arkode module that fullrhs is not required after each step */ + /* Signal to shared arkode module that fullrhs is not required after each step + */ ark_mem->call_fullrhs = SUNFALSE; - if (ark_mem->fixedstep && !ark_mem->root_mem) { + if (ark_mem->fixedstep && !ark_mem->root_mem) + { /* In fixed step mode, we do not need an interpolation module. If adaptivity or rootfinding is enabled, we will need it. */ arkSetInterpolantType(ark_mem, ARK_INTERP_NONE); } - // TODO(CJB): setting this to NULL is not supported in arkode right now. Should this really exist in fixed step mode? - // ark_mem->hadapt_mem = NULL; + // TODO(CJB): setting this to NULL is not supported in arkode right now. + // Should this really exist in fixed step mode? ark_mem->hadapt_mem = NULL; - return(ARK_SUCCESS); + return (ARK_SUCCESS); +} + +int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g) +{ + /* unpack ark_mem, call arkRootInit, and return */ + ARKodeMem ark_mem; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKStepRootInit", + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + return (arkRootInit(ark_mem, nrtfn, g)); } /* Utility to call f1 and increment the counter */ -int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f1, void* user_data) +int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, + N_Vector f1, void* user_data) { int retval = step_mem->f1(tcur, ycur, f1, user_data); step_mem->nf1++; @@ -447,7 +463,8 @@ int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_V } /* Utility to call f2 and increment the counter */ -int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f2, void* user_data) +int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, + N_Vector f2, void* user_data) { int retval = step_mem->f2(tcur, ycur, f2, user_data); step_mem->nf2++; @@ -467,7 +484,7 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_V ARK_FULLRHS_OTHER -> called elsewhere (e.g. for dense output) If it is called in ARK_FULLRHS_START mode, we store the vectors - f1(t,y) and f2(t,y) in sdata for possible reuse in the first stage + f1(t,y) and f2(t,y) in sdata for possible reuse in the first stage of the subsequent time step. TODO(CJB): the reuse is not yet supported @@ -488,16 +505,16 @@ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, booleantype recomputeRHS; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStep_FullRHS", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStep_FullRHS", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* perform RHS functions contingent on 'mode' argument */ - switch(mode) { - + switch (mode) + { /* ARK_FULLRHS_START: called at the beginning of a simulation Store the vectors f1(t,y) in sdata for possible reuse - in the first stage of the subsequent time step. + in the first stage of the subsequent time step. We don't store f2(t,y) because it is not reusable in the subsequent time step (which calls it with a updated state). */ case ARK_FULLRHS_START: @@ -506,63 +523,67 @@ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, components are modified in a call to f1/f2. Under this assumption we can call both with the same output vector. */ retval = sprkStep_f1(step_mem, t, y, step_mem->sdata, ark_mem->user_data); - if (retval != 0) { + if (retval != 0) + { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } /* Copy sdata into the output vector f */ N_VScale(ONE, step_mem->sdata, f); retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); - if (retval != 0) { + if (retval != 0) + { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } break; - /* ARK_FULLRHS_END: called at the end of a successful step If the method coefficients support it, we just copy the last stage RHS vectors to fill f instead of calling f(t,y). Copy the results to sdata if the coefficients support it. */ case ARK_FULLRHS_END: - /* TODO(CJB): Right now we cannot leverage this because we do + /* TODO(CJB): Right now we cannot leverage this because we do not store the function evals for reuse anywhere. Consider doing this if it does drastically increase storage. */ /* determine if explicit RHS function needs to be recomputed */ recomputeRHS = SUNFALSE; - if (SUNRabs(step_mem->method->a[step_mem->method->stages - 1] - ONE) > TINY) { + if (SUNRabs(step_mem->method->a[step_mem->method->stages - 1] - ONE) > TINY) + { recomputeRHS = SUNTRUE; } /* base RHS calls on recomputeRHS argument */ // if (recomputeRHS) { - retval = sprkStep_f1(step_mem, t, y, step_mem->sdata, ark_mem->user_data); - if (retval != 0) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); - } + retval = sprkStep_f1(step_mem, t, y, step_mem->sdata, ark_mem->user_data); + if (retval != 0) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } - /* Copy sdata into the output vector f */ - N_VScale(ONE, step_mem->sdata, f); + /* Copy sdata into the output vector f */ + N_VScale(ONE, step_mem->sdata, f); - retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); - if (retval != 0) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); - } + retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); + if (retval != 0) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", + "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } // } else { - // N_VScale(ONE, step_mem->F[step_mem->stages-1], step_mem->sdata); + // N_VScale(ONE, step_mem->F[step_mem->stages-1], step_mem->sdata); // } break; @@ -573,17 +594,19 @@ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: retval = sprkStep_f1(step_mem, t, y, f, ark_mem->user_data); - if (retval != 0) { + if (retval != 0) + { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); - if (retval != 0) { + if (retval != 0) + { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } break; @@ -592,17 +615,17 @@ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* return with RHS failure if unknown mode is passed */ arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", "SPRKStep_FullRHS", "Unknown full RHS mode"); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } -/* Standard formulation of SPRK. +/* Standard formulation of SPRK. This requires only 2 vectors in principle, but we use three since we persist the stage data. Only the stage data vector belongs to SPRKStep, the rest are reused from ARKODE. */ -int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -610,43 +633,48 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) int retval, is; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); prev_stage = ark_mem->yn; curr_stage = ark_mem->ycur; - for (is = 0; is < step_mem->method->stages; is++) { + for (is = 0; is < step_mem->method->stages; is++) + { sunrealtype ai = step_mem->method->a[is]; sunrealtype bi = step_mem->method->b[is]; /* Set current stage time(s) */ - ark_mem->tcur = ark_mem->tn + ai*ark_mem->h; + ark_mem->tcur = ark_mem->tn + ai * ark_mem->h; /* Evaluate p' with the previous velocity */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f1(step_mem, ark_mem->tcur, prev_stage, step_mem->sdata, ark_mem->user_data); + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to + set other outputs to zero */ + retval = sprkStep_f1(step_mem, ark_mem->tcur, prev_stage, step_mem->sdata, + ark_mem->user_data); if (retval != 0) return ARK_RHSFUNC_FAIL; /* Position update */ - N_VLinearSum(ONE, prev_stage, ark_mem->h*bi, step_mem->sdata, curr_stage); + N_VLinearSum(ONE, prev_stage, ark_mem->h * bi, step_mem->sdata, curr_stage); /* Evaluate q' with the current positions */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tcur, curr_stage, step_mem->sdata, ark_mem->user_data); + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to + set other outputs to zero */ + retval = sprkStep_f2(step_mem, ark_mem->tcur, curr_stage, step_mem->sdata, + ark_mem->user_data); if (retval != 0) return ARK_RHSFUNC_FAIL; /* Velocity update */ - N_VLinearSum(ONE, curr_stage, ark_mem->h*ai, step_mem->sdata, curr_stage); + N_VLinearSum(ONE, curr_stage, ark_mem->h * ai, step_mem->sdata, curr_stage); /* keep track of the stage number */ step_mem->istage++; - + prev_stage = curr_stage; } *nflagPtr = 0; - *dsmPtr = 0; + *dsmPtr = 0; return ARK_SUCCESS; } @@ -654,7 +682,8 @@ int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* Increment SPRK algorithm with compensated summation. This algorithm requires 6 vectors, but 5 of them are reused from the ARKODE core. */ -int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, + int* nflagPtr) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -665,56 +694,61 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflag /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + if (retval != ARK_SUCCESS) return (retval); method = step_mem->method; /* Vector shortcuts */ - delta_Yi = ark_mem->tempv1; + delta_Yi = ark_mem->tempv1; yn_plus_delta_Yi = ark_mem->tempv2; - diff = ark_mem->tempv3; + diff = ark_mem->tempv3; /* [ \Delta Q_0 ] = [ 0 ] [ \Delta P_0 ] = [ 0 ] */ N_VConst(ZERO, delta_Yi); /* loop over internal stages to the step */ - for (is=0; is < method->stages; is++) { + for (is = 0; is < method->stages; is++) + { /* store current stage index */ step_mem->istage = is; /* set current stage time(s) */ - ark_mem->tcur = ark_mem->tn + method->b[is]*ark_mem->h; + ark_mem->tcur = ark_mem->tn + method->b[is] * ark_mem->h; /* [ q_n ] + [ \Delta Q_i ] [ ] + [ ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); /* Evaluate p' with the previous velocity */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to + set other outputs to zero */ retval = sprkStep_f1(step_mem, ark_mem->tcur, yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return(ARK_RHSFUNC_FAIL); + if (retval != 0) return (ARK_RHSFUNC_FAIL); /* Incremental position update: [ ] = [ ] + [ ] [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ - N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->b[is], step_mem->sdata, delta_Yi); + N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->b[is], step_mem->sdata, + delta_Yi); /* [ ] + [ ] [ p_n ] + [ \Delta P_i ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); /* Evaluate q' with the current positions */ - N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tn + method->a[is]*ark_mem->h, + N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to + set other outputs to zero */ + retval = sprkStep_f2(step_mem, ark_mem->tn + method->a[is] * ark_mem->h, yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return(ARK_RHSFUNC_FAIL); + if (retval != 0) return (ARK_RHSFUNC_FAIL); /* Incremental velocity update: [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] [ ] = [ ] + [ ] */ - N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->a[is], step_mem->sdata, delta_Yi); + N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->a[is], step_mem->sdata, + delta_Yi); } /* @@ -727,7 +761,7 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflag N_VLinearSum(ONE, diff, -ONE, delta_Yi, ark_mem->yerr); *nflagPtr = 0; - *dsmPtr = 0; + *dsmPtr = 0; return 0; } @@ -736,33 +770,33 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflag Internal utility routines ---------------------------------------------------------------*/ - /*--------------------------------------------------------------- sprkStep_AccessStepMem: Shortcut routine to unpack ark_mem and step_mem structures from void* pointer. If either is missing it returns ARK_MEM_NULL. ---------------------------------------------------------------*/ -int sprkStep_AccessStepMem(void* arkode_mem, const char *fname, - ARKodeMem *ark_mem, ARKodeSPRKStepMem *step_mem) +int sprkStep_AccessStepMem(void* arkode_mem, const char* fname, + ARKodeMem* ark_mem, ARKodeSPRKStepMem* step_mem) { /* access ARKodeMem structure */ - if (arkode_mem==NULL) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", - fname, MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", fname, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); } - *ark_mem = (ARKodeMem) arkode_mem; - if ((*ark_mem)->step_mem==NULL) { - arkProcessError(*ark_mem, ARK_MEM_NULL, "ARKODE::SPRKStep", - fname, MSG_SPRKSTEP_NO_MEM); - return(ARK_MEM_NULL); + *ark_mem = (ARKodeMem)arkode_mem; + if ((*ark_mem)->step_mem == NULL) + { + arkProcessError(*ark_mem, ARK_MEM_NULL, "ARKODE::SPRKStep", fname, + MSG_SPRKSTEP_NO_MEM); + return (ARK_MEM_NULL); } - *step_mem = (ARKodeSPRKStepMem) (*ark_mem)->step_mem; - return(ARK_SUCCESS); + *step_mem = (ARKodeSPRKStepMem)(*ark_mem)->step_mem; + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- sprkStep_CheckNVector: @@ -771,12 +805,9 @@ int sprkStep_AccessStepMem(void* arkode_mem, const char *fname, ---------------------------------------------------------------*/ booleantype sprkStep_CheckNVector(N_Vector tmpl) { - if ( (tmpl->ops->nvclone == NULL) || - (tmpl->ops->nvdestroy == NULL) || - (tmpl->ops->nvlinearsum == NULL) || - (tmpl->ops->nvconst == NULL) || - (tmpl->ops->nvscale == NULL) || - (tmpl->ops->nvwrmsnorm == NULL) ) - return(SUNFALSE); - return(SUNTRUE); + if ((tmpl->ops->nvclone == NULL) || (tmpl->ops->nvdestroy == NULL) || + (tmpl->ops->nvlinearsum == NULL) || (tmpl->ops->nvconst == NULL) || + (tmpl->ops->nvscale == NULL) || (tmpl->ops->nvwrmsnorm == NULL)) + return (SUNFALSE); + return (SUNTRUE); } From c05c186c69c90fe0ccf74c3e534763e190d6cc77 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 16:26:16 -0700 Subject: [PATCH 041/177] add rootfinding --- examples/arkode/C_serial/ark_kepler.c | 90 ++++++++++++++++++--------- include/arkode/arkode_sprkstep.h | 1 + src/arkode/arkode_sprkstep.c | 6 -- src/arkode/arkode_sprkstep_io.c | 5 ++ 4 files changed, 67 insertions(+), 35 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 7bb7595c22..6016ff785b 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -73,6 +73,7 @@ #include #include #include +#include "arkode/arkode.h" static int check_retval(void* returnvalue, const char* funcname, int opt); @@ -83,6 +84,7 @@ static sunrealtype AngularMomentum(N_Vector y); static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int rootfn(sunrealtype t, N_Vector y, sunrealtype *gout, void* user_data); static sunrealtype Q(N_Vector yvec, sunrealtype alpha); static sunrealtype G(N_Vector yvec, sunrealtype alpha); @@ -116,6 +118,7 @@ int main(int argc, char* argv[]) void* arkode_mem; FILE *conserved_fp, *solution_fp, *times_fp; int argi, iout, retval; + int rootsfound = 0; NLS = NULL; y = NULL; @@ -171,6 +174,11 @@ int main(int argc, char* argv[]) { arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); + /* TODO(CJB): Enabling rootfinding results in 1 extra RHS eval per time step + because it makes us enable Hermite interpolation, which calls fullrhs. */ + SPRKStepRootInit(arkode_mem, 1, rootfn); + if (check_retval(&retval, "SPRKStepRootInit", 1)) return 1; + switch (order) { case 1: @@ -276,6 +284,9 @@ int main(int argc, char* argv[]) ARKStepSetNonlinearSolver(arkode_mem, NLS); } + ARKStepRootInit(arkode_mem, 1, rootfn); + if (check_retval(&retval, "ARKStepRootInit", 1)) return 1; + retval = ARKStepSetUserData(arkode_mem, (void*)udata); if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; @@ -314,11 +325,11 @@ int main(int argc, char* argv[]) const char* fmt2 = "ark_kepler_solution_erk-%d-dt-%.6f.txt"; const char* fmt3 = "ark_kepler_times_erk-%d-dt-%.6f.txt"; char fname[64]; - sprintf(fname, fmt1, order); + sprintf(fname, fmt1, order, dt); conserved_fp = fopen(fname, "w+"); - sprintf(fname, fmt2, order); + sprintf(fname, fmt2, order, dt); solution_fp = fopen(fname, "w+"); - sprintf(fname, fmt3, order); + sprintf(fname, fmt3, order, dt); times_fp = fopen(fname, "w+"); } @@ -342,9 +353,24 @@ int main(int argc, char* argv[]) { for (iout = 0; iout < num_output_times; iout++) { + sunrealtype hlast = SUN_RCONST(0.0); + SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + if (retval == ARK_ROOT_RETURN) { + fprintf(stdout, "ROOT RETURN:\t"); + SPRKStepGetRootInfo(arkode_mem, &rootsfound); + fprintf(stdout, "t = %.4Lf g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg\n", tret, + rootsfound, N_VGetArrayPointer(y)[0], N_VGetArrayPointer(y)[1]); + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, + Q(y, udata->alpha) / udata->rho_np1 - Q0); + + /* Continue to tout */ + retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + } + /* Output current integration status */ fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, @@ -352,7 +378,7 @@ int main(int argc, char* argv[]) fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); - sunrealtype hlast; + SPRKStepGetLastStep(arkode_mem, &hlast); fprintf(udata->hhist_fp, "%.16Lf\n", hlast); N_VPrintFile(y, solution_fp); @@ -376,37 +402,30 @@ int main(int argc, char* argv[]) for (iout = 0; iout < num_output_times; iout++) { ARKStepSetStopTime(arkode_mem, tout); - if (step_mode == 3) - { - while (tret < tout) - { - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - if (retval < 0) break; - - /* Output current integration status */ - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, - Q(y, udata->alpha) / udata->rho_np1 - Q0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), - AngularMomentum(y)); - N_VPrintFile(y, solution_fp); - } - } - else - { - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - /* Output current integration status */ + if (retval == ARK_ROOT_RETURN) { + fprintf(stdout, "ROOT RETURN:\t"); + ARKStepGetRootInfo(arkode_mem, &rootsfound); + fprintf(stdout, "t = %.4Lf g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg\n", tret, + rootsfound, N_VGetArrayPointer(y)[0], N_VGetArrayPointer(y)[1]); fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, Q(y, udata->alpha) / udata->rho_np1 - Q0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), - AngularMomentum(y)); - N_VPrintFile(y, solution_fp); + + /* Continue to tout */ + retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); } + /* Output current integration status */ + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, + Q(y, udata->alpha) / udata->rho_np1 - Q0); + fprintf(times_fp, "%.16Lf\n", tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), + AngularMomentum(y)); + N_VPrintFile(y, solution_fp); + /* Check if the solve was successful, if so, update the time and continue */ if (retval >= 0) @@ -525,6 +544,19 @@ int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) return 0; } +int rootfn(sunrealtype t, N_Vector yvec, sunrealtype *gout, void* user_data) +{ + UserData udata = (UserData)user_data; + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype q1 = y[0]; + const sunrealtype q2 = y[1]; + + /* We want to know when the body crosses the position (0.36, -0.22) */ + gout[0] = (q1 - SUN_RCONST(0.36)) + (q2 + SUN_RCONST(0.22)); + + return 0; +} + /* Functions needed to implement the step density integrating controller proposed by Hairer and Soderlind in https://doi.org/10.1137/04060699. */ diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 5274f2978b..165516088c 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -150,6 +150,7 @@ SUNDIALS_EXPORT int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast); SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur); SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur); SUNDIALS_EXPORT int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state); +SUNDIALS_EXPORT int SPRKStepGetRootInfo(void* arkode_mem, int* rootsfound); // SUNDIALS_EXPORT int SPRKStepGetCurrentGamma(void *arkode_mem, // realtype *gamma); // SUNDIALS_EXPORT int SPRKStepGetCurrentMassMatrix(void *arkode_mem, diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 4d659dd0c8..0e3419b1f0 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -142,12 +142,6 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, step_mem->nf2 = 0; step_mem->istage = 0; - // /* Initialize external polynomial forcing data */ - // step_mem->expforcing = SUNFALSE; - // step_mem->impforcing = SUNFALSE; - // step_mem->forcing = NULL; - // step_mem->nforcing = 0; - /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT); if (retval != ARK_SUCCESS) diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index db870eb3ac..ad0774cbc6 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -262,6 +262,11 @@ int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state) // return (arkGetWorkSpace(arkode_mem, lenrw, leniw)); // } +int SPRKStepGetRootInfo(void* arkode_mem, int* rootsfound) +{ + return (arkGetRootInfo(arkode_mem, rootsfound)); +} + int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, realtype* hinused, realtype* hlast, realtype* hcur, realtype* tcur) { From 2908a6cd1ac6176d630adc59eeacff945edccecf Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 16:52:48 -0700 Subject: [PATCH 042/177] add missing stdio include --- include/arkode/arkode_butcher.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/arkode/arkode_butcher.h b/include/arkode/arkode_butcher.h index 4e4f8e8609..5ee6875844 100644 --- a/include/arkode/arkode_butcher.h +++ b/include/arkode/arkode_butcher.h @@ -17,6 +17,7 @@ #ifndef _ARKODE_BUTCHER_H #define _ARKODE_BUTCHER_H +#include #include #ifdef __cplusplus /* wrapper to enable C++ usage */ From 941b862cb253627d099c6fdc170c47e1a97dca52 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 31 Mar 2023 17:08:55 -0700 Subject: [PATCH 043/177] add hookes law example --- examples/arkode/C_serial/CMakeLists.txt | 49 ++-- examples/arkode/C_serial/ark_hookes_law.c | 309 ++++++++++++++++++++++ examples/arkode/C_serial/ark_kepler.c | 20 +- 3 files changed, 350 insertions(+), 28 deletions(-) create mode 100644 examples/arkode/C_serial/ark_hookes_law.c diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index e47d3a3ae5..3dd701307b 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -20,25 +20,24 @@ # Examples using SUNDIALS linear solvers set(ARKODE_examples - "ark_analytic\;\;" "ark_analytic_mels\;\;develop" "ark_analytic_nonlin\;\;develop" - "ark_brusselator\;\;develop" + "ark_analytic\;\;" + "ark_brusselator_1D_mri\;\;develop" "ark_brusselator_fp\;\;exclude-single" + "ark_brusselator_mri\;\;develop" + "ark_brusselator\;\;develop" + "ark_brusselator1D_imexmri\;0 0.001\;exclude-single" + "ark_brusselator1D_imexmri\;2 0.001\;exclude-single" + "ark_brusselator1D_imexmri\;3 0.001\;exclude-single" + "ark_brusselator1D_imexmri\;4 0.001\;exclude-single" + "ark_brusselator1D_imexmri\;5 0.001\;exclude-single" + "ark_brusselator1D_imexmri\;6 0.001\;exclude-single" + "ark_brusselator1D_imexmri\;7 0.001\;exclude-single" "ark_brusselator1D\;\;exclude-single" - "ark_heat1D\;\;develop" "ark_heat1D_adapt\;\;develop" - "ark_KrylovDemo_prec\;\;exclude-single" - "ark_KrylovDemo_prec\;1\;exclude-single" - "ark_KrylovDemo_prec\;2\;exclude-single" - "ark_robertson\;\;exclude-single" - "ark_robertson_constraints\;\;exclude-single" - "ark_robertson_root\;\;exclude-single" - "ark_brusselator_mri\;\;develop" - "ark_onewaycouple_mri\;\;develop" - "ark_twowaycouple_mri\;\;develop" - "ark_reaction_diffusion_mri\;\;develop" - "ark_brusselator_1D_mri\;\;develop" + "ark_heat1D\;\;develop" + "ark_hookes_law\;\;develop" "ark_kepler\;\;develop" "ark_kpr_mri\;\;develop" "ark_kpr_mri\;0 0.002\;develop" @@ -48,19 +47,21 @@ set(ARKODE_examples "ark_kpr_mri\;4 0.002\;develop" "ark_kpr_mri\;5 0.002\;develop" "ark_kpr_mri\;6 0.005\;develop" - "ark_kpr_mri\;7 0.001\;exclude-single" "ark_kpr_mri\;7 0.001 -100 100 0.5 1\;exclude-single" - "ark_kpr_mri\;8 0.001\;exclude-single" + "ark_kpr_mri\;7 0.001\;exclude-single" "ark_kpr_mri\;8 0.001 -100 100 0.5 1\;exclude-single" - "ark_kpr_mri\;9 0.001\;exclude-single" + "ark_kpr_mri\;8 0.001\;exclude-single" "ark_kpr_mri\;9 0.001 -100 100 0.5 1\;exclude-single" - "ark_brusselator1D_imexmri\;0 0.001\;exclude-single" - "ark_brusselator1D_imexmri\;2 0.001\;exclude-single" - "ark_brusselator1D_imexmri\;3 0.001\;exclude-single" - "ark_brusselator1D_imexmri\;4 0.001\;exclude-single" - "ark_brusselator1D_imexmri\;5 0.001\;exclude-single" - "ark_brusselator1D_imexmri\;6 0.001\;exclude-single" - "ark_brusselator1D_imexmri\;7 0.001\;exclude-single" + "ark_kpr_mri\;9 0.001\;exclude-single" + "ark_KrylovDemo_prec\;\;exclude-single" + "ark_KrylovDemo_prec\;1\;exclude-single" + "ark_KrylovDemo_prec\;2\;exclude-single" + "ark_onewaycouple_mri\;\;develop" + "ark_reaction_diffusion_mri\;\;develop" + "ark_robertson_constraints\;\;exclude-single" + "ark_robertson_root\;\;exclude-single" + "ark_robertson\;\;exclude-single" + "ark_twowaycouple_mri\;\;develop" ) if(SUNDIALS_BUILD_WITH_MONITORING) diff --git a/examples/arkode/C_serial/ark_hookes_law.c b/examples/arkode/C_serial/ark_hookes_law.c new file mode 100644 index 0000000000..697735288e --- /dev/null +++ b/examples/arkode/C_serial/ark_hookes_law.c @@ -0,0 +1,309 @@ +/* ---------------------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ---------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2022, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ---------------------------------------------------------------------------- + + * --------------------------------------------------------------------------*/ + +#include +#include /* prototypes for MRIStep fcts., consts */ +#include +#include /* serial N_Vector type, fcts., macros */ +#include +#include /* def. math fcns, 'sunrealtype' */ +#include +#include +#include +#include + +#include "arkode/arkode.h" + +typedef struct +{ + sunrealtype A, B, omega; +} * UserData; + +static int check_retval(void* returnvalue, const char* funcname, int opt); + +static void InitialConditions(N_Vector y0); +static sunrealtype Hamiltonian(N_Vector yvec, sunrealtype dt, UserData udata); + +static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); + +int main(int argc, char* argv[]) +{ + SUNContext sunctx; + N_Vector y; + SUNNonlinearSolver NLS; + UserData udata; + sunrealtype tout, tret; + sunrealtype H0; + void* arkode_mem; + // FILE *conserved_fp, *solution_fp, *times_fp; + int argi, iout, retval; + + NLS = NULL; + y = NULL; + + /* Default problem parameters */ + const sunrealtype T0 = SUN_RCONST(0.0); + sunrealtype Tf = SUN_RCONST(0.1); + sunrealtype dt = SUN_RCONST(1e-4); + const sunrealtype A = SUN_RCONST(0.2); + const sunrealtype B = SUN_RCONST(0.0); + const sunrealtype omega = SUN_RCONST(64.); + + /* Default integrator Options */ + int step_mode = 0; + int method = 0; + int order = 4; + int use_compsums = 1; + const sunrealtype dTout = SUN_RCONST(0.01); + const int num_output_times = (int)ceil(Tf / dTout); + + printf("\n Begin Hooke's Law Problem\n\n"); + + /* Parse CLI args */ + argi = 0; + if (argc > 1) { order = atoi(argv[++argi]); } + if (argc > 2) { dt = atof(argv[++argi]); } + if (argc > 3) { use_compsums = atoi(argv[++argi]); } + + /* Allocate and fill udata structure */ + udata = (UserData)malloc(sizeof(*udata)); + udata->A = A; + udata->B = B; + udata->omega = omega; + + /* Create the SUNDIALS context object for this simulation */ + retval = SUNContext_Create(NULL, &sunctx); + if (check_retval(&retval, "SUNContext_Create", 1)) return 1; + + /* Allocate our state vector */ + y = N_VNew_Serial(4, sunctx); + + /* Fill the initial conditions */ + InitialConditions(y); + + /* Create SPRKStep integrator */ + arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); + + switch (order) + { + case 1: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticEuler()); + fprintf(stdout, "Using symplectic Euler O(h^1)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 2: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticLeapfrog2()); + fprintf(stdout, "Using symplectic Leapfrog O(h^2)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 22: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticPseudoLeapfrog2()); + fprintf(stdout, "Using symplectic Pseudo Leapfrog O(h^2)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 222: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan2()); + fprintf(stdout, "Using symplectic McLachlan O(h^2)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 3: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticRuth3()); + fprintf(stdout, "Using symplectic Ruth O(h^3)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 33: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan3()); + fprintf(stdout, "Using symplectic McLachlan O(h^3)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 4: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticCandyRozmus4()); + fprintf(stdout, "Using symplectic Candy-Rozmus O(h^4)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 44: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); + fprintf(stdout, "Using symplectic McLachlan O(h^4)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 5: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan5()); + fprintf(stdout, "Using symplectic McLachlan O(h^5)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 6: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticYoshida6()); + fprintf(stdout, "Using symplectic Yoshida O(h^6)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 8: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan8()); + fprintf(stdout, "Using symplectic McLachlan O(h^8)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + case 10: + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticSofroniou10()); + fprintf(stdout, "Using symplectic Sofroniou O(h^10)\n\n"); + if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; + break; + default: fprintf(stderr, "Not a valid method\n"); return 1; + } + + retval = SPRKStepSetUserData(arkode_mem, udata); + if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; + + retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); + if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) return 1; + + retval = SPRKStepSetFixedStep(arkode_mem, dt); + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + + retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt)) + 2); + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + + /* Print out starting energy, momentum before integrating */ + tret = T0; + tout = T0 + dTout; + H0 = Hamiltonian(y, dt, udata); + fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf\n", tret, H0); + + /* Do integration */ + for (iout = 0; iout < num_output_times; iout++) + { + SPRKStepSetStopTime(arkode_mem, tout); + retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + + /* Output current integration status */ + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf\n", tret, Hamiltonian(y, dt, udata) - H0); + + /* Check if the solve was successful, if so, update the time and continue + */ + if (retval >= 0) + { + tout += dTout; + tout = (tout > Tf) ? Tf : tout; + } + else + { + fprintf(stderr, "Solver failure, stopping integration\n"); + break; + } + } + + free(udata); + N_VDestroy(y); + fprintf(stdout, "\n"); + SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + SPRKStepFree(&arkode_mem); + SUNContext_Free(&sunctx); + + return 0; +} + +void InitialConditions(N_Vector y0vec) +{ + sunrealtype* y0 = N_VGetArrayPointer(y0vec); + y0[0] = SUN_RCONST(0.2); + y0[1] = SUN_RCONST(0.0); +} + +void Solution(sunrealtype t, N_Vector solvec, UserData udata) +{ + sunrealtype* sol = N_VGetArrayPointer(solvec); + + sol[0] = udata->A * sin(t * udata->omega) + udata->B * cos(t * udata->omega); + + return; +} + +sunrealtype Hamiltonian(N_Vector yvec, sunrealtype dt, UserData udata) +{ + sunrealtype H = 0.0; + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype x = y[0]; + const sunrealtype v = y[1]; + const sunrealtype omega2 = udata->omega * udata->omega; + + H = (v*v + omega2 * x*x - omega2 * dt * v * x) / SUN_RCONST(2.0); + + return H; +} + +int velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + + ydot[0] = ydot[1]; + + return 0; +} + +int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + UserData udata = (UserData)user_data; + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype omega2 = udata->omega * udata->omega; + + ydot[1] = -omega2 * y[0]; + + return 0; +} + +/* Check function return value... + opt == 0 means SUNDIALS function allocates memory so check if + returned NULL pointer + opt == 1 means SUNDIALS function returns a retval so check if + retval < 0 + opt == 2 means function allocates memory so check if returned + NULL pointer +*/ +int check_retval(void* returnvalue, const char* funcname, int opt) +{ + int* retval; + + /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ + if (opt == 0 && returnvalue == NULL) + { + fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; + } + + /* Check if retval < 0 */ + else if (opt == 1) + { + retval = (int*)returnvalue; + if (*retval < 0) + { + fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed with retval = %d\n\n", + funcname, *retval); + return 1; + } + } + + /* Check if function returned NULL pointer - no memory allocated */ + else if (opt == 2 && returnvalue == NULL) + { + fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; + } + + return 0; +} diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 6016ff785b..4d661937f4 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -137,6 +137,8 @@ int main(int argc, char* argv[]) const sunrealtype dTout = SUN_RCONST(1.); const int num_output_times = (int)ceil(Tf / dTout); + printf("\n Begin Kepler Problem\n\n"); + /* Parse CLI args */ argi = 0; if (argc > 1) { step_mode = atoi(argv[++argi]); } @@ -183,50 +185,62 @@ int main(int argc, char* argv[]) { case 1: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticEuler()); + fprintf(stdout, "Using symplectic Euler O(h^1)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 2: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticLeapfrog2()); + fprintf(stdout, "Using symplectic Leapfrog O(h^2)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 22: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticPseudoLeapfrog2()); + fprintf(stdout, "Using symplectic Pseudo Leapfrog O(h^2)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 222: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan2()); + fprintf(stdout, "Using symplectic McLachlan O(h^2)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 3: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan3()); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticRuth3()); + fprintf(stdout, "Using symplectic Ruth O(h^3)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 33: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); + retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan3()); + fprintf(stdout, "Using symplectic McLachlan O(h^3)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 4: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticCandyRozmus4()); + fprintf(stdout, "Using symplectic Candy-Rozmus O(h^4)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 44: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); + fprintf(stdout, "Using symplectic McLachlan O(h^4)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 5: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan5()); + fprintf(stdout, "Using symplectic McLachlan O(h^5)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 6: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticYoshida6()); + fprintf(stdout, "Using symplectic Yoshida O(h^6)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 8: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan8()); + fprintf(stdout, "Using symplectic McLachlan O(h^8)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; case 10: retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticSofroniou10()); + fprintf(stdout, "Using symplectic Sofroniou O(h^10)\n"); if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; break; default: fprintf(stderr, "Not a valid method\n"); return 1; @@ -333,8 +347,6 @@ int main(int argc, char* argv[]) times_fp = fopen(fname, "w+"); } - printf("\n Begin Kepler Problem\n\n"); - /* Print out starting energy, momentum before integrating */ tret = T0; tout = T0 + dTout; From b3950c66b203218ff04b0a46f9fff7b82c7d4854 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 3 Apr 2023 16:26:54 -0700 Subject: [PATCH 044/177] add out files and fix hookes law problem --- examples/arkode/C_serial/ark_hookes_law.c | 148 +- examples/arkode/C_serial/ark_hookes_law.out | 28 + examples/arkode/C_serial/ark_kepler.out | 1655 +++++++++++++++++++ src/arkode/arkode_sprk.c | 2 + src/arkode/arkode_sprkstep.c | 2 +- 5 files changed, 1742 insertions(+), 93 deletions(-) create mode 100644 examples/arkode/C_serial/ark_hookes_law.out create mode 100644 examples/arkode/C_serial/ark_kepler.out diff --git a/examples/arkode/C_serial/ark_hookes_law.c b/examples/arkode/C_serial/ark_hookes_law.c index 697735288e..215a9e2809 100644 --- a/examples/arkode/C_serial/ark_hookes_law.c +++ b/examples/arkode/C_serial/ark_hookes_law.c @@ -11,7 +11,27 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End * ---------------------------------------------------------------------------- - + * This example considers the motion of a spring with an attached mass using + * the symplectic integrators available in SPRKStep. Our ODE model is, + * x'(t) = v + * v'(t) = -k/m x + * where k is the spring constant and m is the mass. For convenience we choose + * k = 8 and m = 1 and let omega = sqrt(k/m). We simulate the problem on + * t = [0, 0.1] with the initial conditions x(0) = 0.2, v(0) = 0. + * This problem setup has the exact solution + * x(t) = 0.2*cos(t*omega), + * v(t) = -0.2*omega*sin(t*omega). + * The potential energy, + * U = 1/2*k*x^2 + * is conserved and is the Hamiltonian for the system. The symplectic methods + * in SPRKStep conserve U provided a sufficiently small time-step size is used. + * + * The problem can be run like so: + * ./ark_hookes_law [order] [dt] [use_compsums] + * + * Order sets the order of the method to use, dt is the time step size, and + * use_compsums turns on (1) or off (0) compensated summation inside SPRKStep. + * Compensated summation increases accuracy but at increased cost. * --------------------------------------------------------------------------*/ #include @@ -35,25 +55,26 @@ typedef struct static int check_retval(void* returnvalue, const char* funcname, int opt); static void InitialConditions(N_Vector y0); -static sunrealtype Hamiltonian(N_Vector yvec, sunrealtype dt, UserData udata); +static sunrealtype Solution(sunrealtype t, N_Vector y, N_Vector solvec, + UserData udata); +static sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData udata); -static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); -static int force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int Velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int Force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); int main(int argc, char* argv[]) { SUNContext sunctx; - N_Vector y; + N_Vector y, solution; SUNNonlinearSolver NLS; UserData udata; sunrealtype tout, tret; - sunrealtype H0; void* arkode_mem; - // FILE *conserved_fp, *solution_fp, *times_fp; int argi, iout, retval; - NLS = NULL; - y = NULL; + NLS = NULL; + y = NULL; + solution = NULL; /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); @@ -61,10 +82,9 @@ int main(int argc, char* argv[]) sunrealtype dt = SUN_RCONST(1e-4); const sunrealtype A = SUN_RCONST(0.2); const sunrealtype B = SUN_RCONST(0.0); - const sunrealtype omega = SUN_RCONST(64.); + const sunrealtype omega = SUN_RCONST(64.0); /* Default integrator Options */ - int step_mode = 0; int method = 0; int order = 4; int use_compsums = 1; @@ -90,78 +110,17 @@ int main(int argc, char* argv[]) if (check_retval(&retval, "SUNContext_Create", 1)) return 1; /* Allocate our state vector */ - y = N_VNew_Serial(4, sunctx); + y = N_VNew_Serial(2, sunctx); + solution = N_VClone(y); /* Fill the initial conditions */ InitialConditions(y); /* Create SPRKStep integrator */ - arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); + arkode_mem = SPRKStepCreate(Force, Velocity, T0, y, sunctx); - switch (order) - { - case 1: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticEuler()); - fprintf(stdout, "Using symplectic Euler O(h^1)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 2: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticLeapfrog2()); - fprintf(stdout, "Using symplectic Leapfrog O(h^2)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 22: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticPseudoLeapfrog2()); - fprintf(stdout, "Using symplectic Pseudo Leapfrog O(h^2)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 222: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan2()); - fprintf(stdout, "Using symplectic McLachlan O(h^2)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 3: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticRuth3()); - fprintf(stdout, "Using symplectic Ruth O(h^3)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 33: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan3()); - fprintf(stdout, "Using symplectic McLachlan O(h^3)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 4: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticCandyRozmus4()); - fprintf(stdout, "Using symplectic Candy-Rozmus O(h^4)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 44: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); - fprintf(stdout, "Using symplectic McLachlan O(h^4)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 5: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan5()); - fprintf(stdout, "Using symplectic McLachlan O(h^5)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 6: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticYoshida6()); - fprintf(stdout, "Using symplectic Yoshida O(h^6)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 8: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan8()); - fprintf(stdout, "Using symplectic McLachlan O(h^8)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 10: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticSofroniou10()); - fprintf(stdout, "Using symplectic Sofroniou O(h^10)\n\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - default: fprintf(stderr, "Not a valid method\n"); return 1; - } + retval = SPRKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; retval = SPRKStepSetUserData(arkode_mem, udata); if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; @@ -178,8 +137,7 @@ int main(int argc, char* argv[]) /* Print out starting energy, momentum before integrating */ tret = T0; tout = T0 + dTout; - H0 = Hamiltonian(y, dt, udata); - fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf\n", tret, H0); + fprintf(stdout, "t = %.6Lf, energy = %.6Lf\n", tret, Energy(y, dt, udata)); /* Do integration */ for (iout = 0; iout < num_output_times; iout++) @@ -188,7 +146,8 @@ int main(int argc, char* argv[]) retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf\n", tret, Hamiltonian(y, dt, udata) - H0); + fprintf(stdout, "t = %.6Lf, sol. err = %.6Lf, energy = %.6Lf\n", tret, + Solution(tret, y, solution, udata), Energy(y, dt, udata)); /* Check if the solve was successful, if so, update the time and continue */ @@ -221,16 +180,21 @@ void InitialConditions(N_Vector y0vec) y0[1] = SUN_RCONST(0.0); } -void Solution(sunrealtype t, N_Vector solvec, UserData udata) +sunrealtype Solution(sunrealtype t, N_Vector y, N_Vector solvec, UserData udata) { sunrealtype* sol = N_VGetArrayPointer(solvec); - - sol[0] = udata->A * sin(t * udata->omega) + udata->B * cos(t * udata->omega); - - return; + /* compute error */ + sol[0] = SUN_RCONST(0.2) * cos(udata->omega * t); + sol[1] = -SUN_RCONST(0.2) * udata->omega * sin(udata->omega * t); + N_VLinearSum(SUN_RCONST(1.0), y, -SUN_RCONST(1.0), solvec, solvec); + sunrealtype err = N_VMaxNorm(solvec); + /* restore solution vec */ + sol[0] = SUN_RCONST(0.2) * cos(udata->omega * t); + sol[1] = -SUN_RCONST(0.2) * udata->omega * sin(udata->omega * t); + return err; } -sunrealtype Hamiltonian(N_Vector yvec, sunrealtype dt, UserData udata) +sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData udata) { sunrealtype H = 0.0; sunrealtype* y = N_VGetArrayPointer(yvec); @@ -238,22 +202,22 @@ sunrealtype Hamiltonian(N_Vector yvec, sunrealtype dt, UserData udata) const sunrealtype v = y[1]; const sunrealtype omega2 = udata->omega * udata->omega; - H = (v*v + omega2 * x*x - omega2 * dt * v * x) / SUN_RCONST(2.0); + H = (v * v + omega2 * x * x) / SUN_RCONST(2.0); return H; } -int velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int Velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - ydot[0] = ydot[1]; + ydot[0] = y[1]; return 0; } -int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int Force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { UserData udata = (UserData)user_data; sunrealtype* y = N_VGetArrayPointer(yvec); diff --git a/examples/arkode/C_serial/ark_hookes_law.out b/examples/arkode/C_serial/ark_hookes_law.out new file mode 100644 index 0000000000..769ee9996c --- /dev/null +++ b/examples/arkode/C_serial/ark_hookes_law.out @@ -0,0 +1,28 @@ + + Begin Hooke's Law Problem + +t = 0.000000, energy = 81.920000 +t = 0.010000, sol. err = 0.000000, energy = 81.920000 +t = 0.020000, sol. err = 0.000000, energy = 81.920000 +t = 0.030000, sol. err = 0.000000, energy = 81.920000 +t = 0.040000, sol. err = 0.000000, energy = 81.920000 +t = 0.050000, sol. err = 0.000000, energy = 81.920000 +t = 0.060000, sol. err = 0.000000, energy = 81.920000 +t = 0.070000, sol. err = 0.000000, energy = 81.920000 +t = 0.080000, sol. err = 0.000000, energy = 81.920000 +t = 0.090000, sol. err = 0.000000, energy = 81.920000 +t = 0.100000, sol. err = 0.000000, energy = 81.920000 + +Current time = 0.099999999999999991673327315311326 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00010000000000000000479217360238593 +Last step size = 0.00010000000000000000479217360238593 +Current step size = 0.00010000000000000000479217360238593 +f1 RHS fn evals = 4001 +f2 RHS fn evals = 4001 diff --git a/examples/arkode/C_serial/ark_kepler.out b/examples/arkode/C_serial/ark_kepler.out new file mode 100644 index 0000000000..830aa7b6e1 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler.out @@ -0,0 +1,1655 @@ + + Begin Kepler Problem + +Using symplectic Candy-Rozmus O(h^4) +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000, Q(p,q) = 3.9528470752104736 +t = 1.0000, H(p,q)-H0 = 0.0000002043466951, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf +ROOT RETURN: t = 1.0305 g[0] = -1, y[0] = -0.658625, y[1] = 0.798625 +t = 1.0305, H(p,q)-H0 = 0.0000002044177555, L(p,q)-L0 = 0.0000000000000415, Q(p,q)-Q0 = inf +t = 2.0000, H(p,q)-H0 = 0.0000002049421988, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf +t = 3.0000, H(p,q)-H0 = 0.0000002049738428, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf +t = 4.0000, H(p,q)-H0 = 0.0000002049594153, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf +t = 5.0000, H(p,q)-H0 = 0.0000002047443888, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf +t = 6.0000, H(p,q)-H0 = 0.0000001625046178, L(p,q)-L0 = 0.0000000000000020, Q(p,q)-Q0 = inf +ROOT RETURN: t = 6.1690 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 6.1690, H(p,q)-H0 = 0.0000000618955069, L(p,q)-L0 = 0.0000000000445040, Q(p,q)-Q0 = inf +t = 7.0000, H(p,q)-H0 = 0.0000002026654433, L(p,q)-L0 = 0.0000000000000024, Q(p,q)-Q0 = inf +ROOT RETURN: t = 7.3137 g[0] = -1, y[0] = -0.658625, y[1] = 0.798625 +t = 7.3137, H(p,q)-H0 = 0.0000002044244631, L(p,q)-L0 = 0.0000000000004792, Q(p,q)-Q0 = inf +t = 8.0000, H(p,q)-H0 = 0.0000002049074176, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf +t = 9.0000, H(p,q)-H0 = 0.0000002049711518, L(p,q)-L0 = 0.0000000000000017, Q(p,q)-Q0 = inf +t = 10.0000, H(p,q)-H0 = 0.0000002049683722, L(p,q)-L0 = 0.0000000000000012, Q(p,q)-Q0 = inf +t = 11.0000, H(p,q)-H0 = 0.0000002048742218, L(p,q)-L0 = 0.0000000000000008, Q(p,q)-Q0 = inf +t = 12.0000, H(p,q)-H0 = 0.0000001994568363, L(p,q)-L0 = -0.0000000000000016, Q(p,q)-Q0 = inf +ROOT RETURN: t = 12.4522 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 12.4522, H(p,q)-H0 = 0.0000000591528380, L(p,q)-L0 = 0.0000000003874632, Q(p,q)-Q0 = inf +t = 13.0000, H(p,q)-H0 = 0.0000001914521934, L(p,q)-L0 = -0.0000000000000020, Q(p,q)-Q0 = inf +ROOT RETURN: t = 13.5969 g[0] = -1, y[0] = -0.658626, y[1] = 0.798626 +t = 13.5969, H(p,q)-H0 = 0.0000002044091752, L(p,q)-L0 = 0.0000000000001069, Q(p,q)-Q0 = inf +t = 14.0000, H(p,q)-H0 = 0.0000002048287348, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf +t = 15.0000, H(p,q)-H0 = 0.0000002049648922, L(p,q)-L0 = -0.0000000000000019, Q(p,q)-Q0 = inf +t = 16.0000, H(p,q)-H0 = 0.0000002049727805, L(p,q)-L0 = -0.0000000000000014, Q(p,q)-Q0 = inf +t = 17.0000, H(p,q)-H0 = 0.0000002049269368, L(p,q)-L0 = -0.0000000000000021, Q(p,q)-Q0 = inf +t = 18.0000, H(p,q)-H0 = 0.0000002037784197, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf +ROOT RETURN: t = 18.7354 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 18.7354, H(p,q)-H0 = 0.0000000627550842, L(p,q)-L0 = 0.0000000003209815, Q(p,q)-Q0 = inf +t = 19.0000, H(p,q)-H0 = 0.0000000899039478, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf +ROOT RETURN: t = 19.8801 g[0] = -1, y[0] = -0.658627, y[1] = 0.798627 +t = 19.8801, H(p,q)-H0 = 0.0000002044174572, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf +t = 20.0000, H(p,q)-H0 = 0.0000002046163375, L(p,q)-L0 = -0.0000000000000019, Q(p,q)-Q0 = inf +t = 21.0000, H(p,q)-H0 = 0.0000002049527451, L(p,q)-L0 = -0.0000000000000019, Q(p,q)-Q0 = inf +t = 22.0000, H(p,q)-H0 = 0.0000002049741641, L(p,q)-L0 = -0.0000000000000016, Q(p,q)-Q0 = inf +t = 23.0000, H(p,q)-H0 = 0.0000002049516927, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf +t = 24.0000, H(p,q)-H0 = 0.0000002045933044, L(p,q)-L0 = -0.0000000000000016, Q(p,q)-Q0 = inf +t = 25.0000, H(p,q)-H0 = 0.0000000760000369, L(p,q)-L0 = -0.0000000000000009, Q(p,q)-Q0 = inf +ROOT RETURN: t = 25.0186 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 25.0186, H(p,q)-H0 = 0.0000000628120624, L(p,q)-L0 = 0.0000000000752147, Q(p,q)-Q0 = inf +t = 26.0000, H(p,q)-H0 = 0.0000002038713013, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf +ROOT RETURN: t = 26.1633 g[0] = -1, y[0] = -0.658628, y[1] = 0.798628 +t = 26.1633, H(p,q)-H0 = 0.0000002044256130, L(p,q)-L0 = 0.0000000000004819, Q(p,q)-Q0 = inf +t = 27.0000, H(p,q)-H0 = 0.0000002049290551, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf +t = 28.0000, H(p,q)-H0 = 0.0000002049729524, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf +t = 29.0000, H(p,q)-H0 = 0.0000002049643474, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf +t = 30.0000, H(p,q)-H0 = 0.0000002048210159, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf +t = 31.0000, H(p,q)-H0 = 0.0000001895989656, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf +ROOT RETURN: t = 31.3018 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 31.3018, H(p,q)-H0 = 0.0000000595519092, L(p,q)-L0 = 0.0000000003151657, Q(p,q)-Q0 = inf +t = 32.0000, H(p,q)-H0 = 0.0000002000320204, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf +ROOT RETURN: t = 32.4464 g[0] = -1, y[0] = -0.658628, y[1] = 0.798628 +t = 32.4464, H(p,q)-H0 = 0.0000002044101368, L(p,q)-L0 = 0.0000000000001533, Q(p,q)-Q0 = inf +t = 33.0000, H(p,q)-H0 = 0.0000002048789493, L(p,q)-L0 = 0.0000000000000003, Q(p,q)-Q0 = inf +t = 34.0000, H(p,q)-H0 = 0.0000002049687612, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf +t = 35.0000, H(p,q)-H0 = 0.0000002049708831, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf +t = 36.0000, H(p,q)-H0 = 0.0000002049042367, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf +t = 37.0000, H(p,q)-H0 = 0.0000002024354354, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf +ROOT RETURN: t = 37.5850 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 37.5850, H(p,q)-H0 = 0.0000000618555891, L(p,q)-L0 = 0.0000000003627523, Q(p,q)-Q0 = inf +t = 38.0000, H(p,q)-H0 = 0.0000001680057595, L(p,q)-L0 = -0.0000000000000014, Q(p,q)-Q0 = inf +ROOT RETURN: t = 38.7296 g[0] = -1, y[0] = -0.658629, y[1] = 0.798629 +t = 38.7296, H(p,q)-H0 = 0.0000002044176056, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf +t = 39.0000, H(p,q)-H0 = 0.0000002047568957, L(p,q)-L0 = 0.0000000000000006, Q(p,q)-Q0 = inf +t = 40.0000, H(p,q)-H0 = 0.0000002049601668, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf +t = 41.0000, H(p,q)-H0 = 0.0000002049737660, L(p,q)-L0 = 0.0000000000000006, Q(p,q)-Q0 = inf +t = 42.0000, H(p,q)-H0 = 0.0000002049406972, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf +t = 43.0000, H(p,q)-H0 = 0.0000002043005216, L(p,q)-L0 = 0.0000000000000006, Q(p,q)-Q0 = inf +ROOT RETURN: t = 43.8682 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 43.8682, H(p,q)-H0 = 0.0000000636672108, L(p,q)-L0 = 0.0000000001058789, Q(p,q)-Q0 = inf +t = 44.0000, H(p,q)-H0 = 0.0000000018859838, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf +t = 45.0000, H(p,q)-H0 = 0.0000002043890478, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf +ROOT RETURN: t = 45.0128 g[0] = -1, y[0] = -0.65863, y[1] = 0.79863 +t = 45.0128, H(p,q)-H0 = 0.0000002044259659, L(p,q)-L0 = 0.0000000000004636, Q(p,q)-Q0 = inf +t = 46.0000, H(p,q)-H0 = 0.0000002049436505, L(p,q)-L0 = 0.0000000000000016, Q(p,q)-Q0 = inf +t = 47.0000, H(p,q)-H0 = 0.0000002049739257, L(p,q)-L0 = 0.0000000000000029, Q(p,q)-Q0 = inf +t = 48.0000, H(p,q)-H0 = 0.0000002049586466, L(p,q)-L0 = 0.0000000000000028, Q(p,q)-Q0 = inf +t = 49.0000, H(p,q)-H0 = 0.0000002047310156, L(p,q)-L0 = 0.0000000000000028, Q(p,q)-Q0 = inf +t = 50.0000, H(p,q)-H0 = 0.0000001561815122, L(p,q)-L0 = 0.0000000000000022, Q(p,q)-Q0 = inf +ROOT RETURN: t = 50.1513 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 50.1513, H(p,q)-H0 = 0.0000000600768491, L(p,q)-L0 = 0.0000000002246490, Q(p,q)-Q0 = inf +t = 51.0000, H(p,q)-H0 = 0.0000002028707665, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf +ROOT RETURN: t = 51.2960 g[0] = -1, y[0] = -0.658631, y[1] = 0.798631 +t = 51.2960, H(p,q)-H0 = 0.0000002044118099, L(p,q)-L0 = 0.0000000000002085, Q(p,q)-Q0 = inf +t = 52.0000, H(p,q)-H0 = 0.0000002049104473, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf +t = 53.0000, H(p,q)-H0 = 0.0000002049714104, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf +t = 54.0000, H(p,q)-H0 = 0.0000002049679719, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf +t = 55.0000, H(p,q)-H0 = 0.0000002048692325, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf +t = 56.0000, H(p,q)-H0 = 0.0000001988013947, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf +ROOT RETURN: t = 56.4345 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 56.4345, H(p,q)-H0 = 0.0000000609620590, L(p,q)-L0 = 0.0000000004024047, Q(p,q)-Q0 = inf +t = 57.0000, H(p,q)-H0 = 0.0000001930576761, L(p,q)-L0 = -0.0000000000000007, Q(p,q)-Q0 = inf +ROOT RETURN: t = 57.5792 g[0] = -1, y[0] = -0.658632, y[1] = 0.798632 +t = 57.5792, H(p,q)-H0 = 0.0000002044162695, L(p,q)-L0 = 0.0000000000000028, Q(p,q)-Q0 = inf +t = 58.0000, H(p,q)-H0 = 0.0000002048360039, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf +t = 59.0000, H(p,q)-H0 = 0.0000002049654226, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf +t = 60.0000, H(p,q)-H0 = 0.0000002049726056, L(p,q)-L0 = 0.0000000000000019, Q(p,q)-Q0 = inf +t = 61.0000, H(p,q)-H0 = 0.0000002049247275, L(p,q)-L0 = 0.0000000000000029, Q(p,q)-Q0 = inf +t = 62.0000, H(p,q)-H0 = 0.0000002036757942, L(p,q)-L0 = 0.0000000000000033, Q(p,q)-Q0 = inf +ROOT RETURN: t = 62.7177 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 62.7177, H(p,q)-H0 = 0.0000000643121354, L(p,q)-L0 = 0.0000000001355760, Q(p,q)-Q0 = inf +t = 63.0000, H(p,q)-H0 = 0.0000001030286585, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf +ROOT RETURN: t = 63.8624 g[0] = -1, y[0] = -0.658632, y[1] = 0.798632 +t = 63.8624, H(p,q)-H0 = 0.0000002044254884, L(p,q)-L0 = 0.0000000000004233, Q(p,q)-Q0 = inf +t = 64.0000, H(p,q)-H0 = 0.0000002046376894, L(p,q)-L0 = 0.0000000000000021, Q(p,q)-Q0 = inf +t = 65.0000, H(p,q)-H0 = 0.0000002049537554, L(p,q)-L0 = 0.0000000000000017, Q(p,q)-Q0 = inf +t = 66.0000, H(p,q)-H0 = 0.0000002049741533, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf +t = 67.0000, H(p,q)-H0 = 0.0000002049505941, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf +t = 68.0000, H(p,q)-H0 = 0.0000002045684235, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf +t = 69.0000, H(p,q)-H0 = 0.0000000616601921, L(p,q)-L0 = -0.0000000000000007, Q(p,q)-Q0 = inf +ROOT RETURN: t = 69.0009 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 69.0009, H(p,q)-H0 = 0.0000000606041561, L(p,q)-L0 = 0.0000000001274141, Q(p,q)-Q0 = inf +t = 70.0000, H(p,q)-H0 = 0.0000002039554869, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf +ROOT RETURN: t = 70.1456 g[0] = -1, y[0] = -0.658633, y[1] = 0.798633 +t = 70.1456, H(p,q)-H0 = 0.0000002044140265, L(p,q)-L0 = 0.0000000000002658, Q(p,q)-Q0 = inf +t = 71.0000, H(p,q)-H0 = 0.0000002049310657, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf +t = 72.0000, H(p,q)-H0 = 0.0000002049730993, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf +t = 73.0000, H(p,q)-H0 = 0.0000002049637668, L(p,q)-L0 = -0.0000000000000024, Q(p,q)-Q0 = inf +t = 74.0000, H(p,q)-H0 = 0.0000002048127971, L(p,q)-L0 = -0.0000000000000022, Q(p,q)-Q0 = inf +t = 75.0000, H(p,q)-H0 = 0.0000001874573972, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf +ROOT RETURN: t = 75.2841 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 75.2841, H(p,q)-H0 = 0.0000000601599359, L(p,q)-L0 = 0.0000000004357263, Q(p,q)-Q0 = inf +t = 76.0000, H(p,q)-H0 = 0.0000002005377685, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf +ROOT RETURN: t = 76.4288 g[0] = -1, y[0] = -0.658634, y[1] = 0.798634 +t = 76.4288, H(p,q)-H0 = 0.0000002044142373, L(p,q)-L0 = 0.0000000000000037, Q(p,q)-Q0 = inf +t = 77.0000, H(p,q)-H0 = 0.0000002048834123, L(p,q)-L0 = -0.0000000000000039, Q(p,q)-Q0 = inf +t = 78.0000, H(p,q)-H0 = 0.0000002049691188, L(p,q)-L0 = -0.0000000000000043, Q(p,q)-Q0 = inf +t = 79.0000, H(p,q)-H0 = 0.0000002049705883, L(p,q)-L0 = -0.0000000000000037, Q(p,q)-Q0 = inf +t = 80.0000, H(p,q)-H0 = 0.0000002049008769, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +t = 81.0000, H(p,q)-H0 = 0.0000002021772509, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +ROOT RETURN: t = 81.5673 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 81.5673, H(p,q)-H0 = 0.0000000646622964, L(p,q)-L0 = 0.0000000001649986, Q(p,q)-Q0 = inf +t = 82.0000, H(p,q)-H0 = 0.0000001727780274, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf +ROOT RETURN: t = 82.7120 g[0] = -1, y[0] = -0.658635, y[1] = 0.798635 +t = 82.7120, H(p,q)-H0 = 0.0000002044242360, L(p,q)-L0 = 0.0000000000003475, Q(p,q)-Q0 = inf +t = 83.0000, H(p,q)-H0 = 0.0000002047685705, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf +t = 84.0000, H(p,q)-H0 = 0.0000002049608696, L(p,q)-L0 = -0.0000000000000038, Q(p,q)-Q0 = inf +t = 85.0000, H(p,q)-H0 = 0.0000002049736565, L(p,q)-L0 = -0.0000000000000039, Q(p,q)-Q0 = inf +t = 86.0000, H(p,q)-H0 = 0.0000002049391069, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +t = 87.0000, H(p,q)-H0 = 0.0000002042500727, L(p,q)-L0 = -0.0000000000000037, Q(p,q)-Q0 = inf +ROOT RETURN: t = 87.8505 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 87.8505, H(p,q)-H0 = 0.0000000609665067, L(p,q)-L0 = 0.0000000000428871, Q(p,q)-Q0 = inf +t = 88.0000, H(p,q)-H0 = 0.0000000073887751, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf +ROOT RETURN: t = 88.9952 g[0] = -1, y[0] = -0.658635, y[1] = 0.798635 +t = 88.9952, H(p,q)-H0 = 0.0000002044165731, L(p,q)-L0 = 0.0000000000003237, Q(p,q)-Q0 = inf +t = 89.0000, H(p,q)-H0 = 0.0000002044279248, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf +t = 90.0000, H(p,q)-H0 = 0.0000002049450250, L(p,q)-L0 = -0.0000000000000020, Q(p,q)-Q0 = inf +t = 91.0000, H(p,q)-H0 = 0.0000002049739793, L(p,q)-L0 = -0.0000000000000026, Q(p,q)-Q0 = inf +t = 92.0000, H(p,q)-H0 = 0.0000002049578287, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf +t = 93.0000, H(p,q)-H0 = 0.0000002047166712, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf +t = 94.0000, H(p,q)-H0 = 0.0000001489424117, L(p,q)-L0 = -0.0000000000000023, Q(p,q)-Q0 = inf +ROOT RETURN: t = 94.1337 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 94.1337, H(p,q)-H0 = 0.0000000595232956, L(p,q)-L0 = 0.0000000004577891, Q(p,q)-Q0 = inf +t = 95.0000, H(p,q)-H0 = 0.0000002030543977, L(p,q)-L0 = -0.0000000000000019, Q(p,q)-Q0 = inf +ROOT RETURN: t = 95.2784 g[0] = -1, y[0] = -0.658636, y[1] = 0.798636 +t = 95.2784, H(p,q)-H0 = 0.0000002044121415, L(p,q)-L0 = 0.0000000000000150, Q(p,q)-Q0 = inf +t = 96.0000, H(p,q)-H0 = 0.0000002049133234, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf +t = 97.0000, H(p,q)-H0 = 0.0000002049716499, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf +t = 98.0000, H(p,q)-H0 = 0.0000002049675457, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf +t = 99.0000, H(p,q)-H0 = 0.0000002048639480, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf +t = 100.0000, H(p,q)-H0 = 0.0000001980530047, L(p,q)-L0 = -0.0000000000000009, Q(p,q)-Q0 = inf +ROOT RETURN: t = 100.4169 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 100.4169, H(p,q)-H0 = 0.0000000646865441, L(p,q)-L0 = 0.0000000001955873, Q(p,q)-Q0 = inf +t = 101.0000, H(p,q)-H0 = 0.0000001944503385, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf +ROOT RETURN: t = 101.5615 g[0] = -1, y[0] = -0.658637, y[1] = 0.798637 +t = 101.5615, H(p,q)-H0 = 0.0000002044224177, L(p,q)-L0 = 0.0000000000002655, Q(p,q)-Q0 = inf +t = 102.0000, H(p,q)-H0 = 0.0000002048428450, L(p,q)-L0 = -0.0000000000000016, Q(p,q)-Q0 = inf +t = 103.0000, H(p,q)-H0 = 0.0000002049659237, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf +t = 104.0000, H(p,q)-H0 = 0.0000002049724101, L(p,q)-L0 = -0.0000000000000007, Q(p,q)-Q0 = inf +t = 105.0000, H(p,q)-H0 = 0.0000002049224005, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf +t = 106.0000, H(p,q)-H0 = 0.0000002035621856, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf +ROOT RETURN: t = 106.7000 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 106.7000, H(p,q)-H0 = 0.0000000609512092, L(p,q)-L0 = 0.0000000000004452, Q(p,q)-Q0 = inf +t = 107.0000, H(p,q)-H0 = 0.0000001151592957, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf +ROOT RETURN: t = 107.8447 g[0] = -1, y[0] = -0.658638, y[1] = 0.798638 +t = 107.8447, H(p,q)-H0 = 0.0000002044192116, L(p,q)-L0 = 0.0000000000003814, Q(p,q)-Q0 = inf +t = 108.0000, H(p,q)-H0 = 0.0000002046574967, L(p,q)-L0 = -0.0000000000000024, Q(p,q)-Q0 = inf +t = 109.0000, H(p,q)-H0 = 0.0000002049547190, L(p,q)-L0 = -0.0000000000000029, Q(p,q)-Q0 = inf +t = 110.0000, H(p,q)-H0 = 0.0000002049741274, L(p,q)-L0 = -0.0000000000000029, Q(p,q)-Q0 = inf +t = 111.0000, H(p,q)-H0 = 0.0000002049494448, L(p,q)-L0 = -0.0000000000000009, Q(p,q)-Q0 = inf +t = 112.0000, H(p,q)-H0 = 0.0000002045415152, L(p,q)-L0 = -0.0000000000000014, Q(p,q)-Q0 = inf +ROOT RETURN: t = 112.9832 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 +t = 112.9832, H(p,q)-H0 = 0.0000000591084393, L(p,q)-L0 = 0.0000000004634866, Q(p,q)-Q0 = inf +t = 113.0000, H(p,q)-H0 = 0.0000000473694242, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf +t = 114.0000, H(p,q)-H0 = 0.0000002040319292, L(p,q)-L0 = -0.0000000000000024, Q(p,q)-Q0 = inf +ROOT RETURN: t = 114.1279 g[0] = -1, y[0] = -0.658638, y[1] = 0.798638 +t = 114.1279, H(p,q)-H0 = 0.0000002044104154, L(p,q)-L0 = 0.0000000000000290, Q(p,q)-Q0 = inf +t = 115.0000, H(p,q)-H0 = 0.0000002049329899, L(p,q)-L0 = -0.0000000000000026, Q(p,q)-Q0 = inf +t = 116.0000, H(p,q)-H0 = 0.0000002049732397, L(p,q)-L0 = -0.0000000000000030, Q(p,q)-Q0 = inf +t = 117.0000, H(p,q)-H0 = 0.0000002049631667, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf +t = 118.0000, H(p,q)-H0 = 0.0000002048040542, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf +t = 119.0000, H(p,q)-H0 = 0.0000001849806039, L(p,q)-L0 = -0.0000000000000047, Q(p,q)-Q0 = inf +ROOT RETURN: t = 119.2664 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 119.2664, H(p,q)-H0 = 0.0000000643966473, L(p,q)-L0 = 0.0000000002287358, Q(p,q)-Q0 = inf +t = 120.0000, H(p,q)-H0 = 0.0000002009833776, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf +ROOT RETURN: t = 120.4111 g[0] = -1, y[0] = -0.658639, y[1] = 0.798639 +t = 120.4111, H(p,q)-H0 = 0.0000002044203272, L(p,q)-L0 = 0.0000000000001624, Q(p,q)-Q0 = inf +t = 121.0000, H(p,q)-H0 = 0.0000002048876452, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf +t = 122.0000, H(p,q)-H0 = 0.0000002049694665, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf +t = 123.0000, H(p,q)-H0 = 0.0000002049702837, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf +t = 124.0000, H(p,q)-H0 = 0.0000002048973473, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf +t = 125.0000, H(p,q)-H0 = 0.0000002018868853, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf +ROOT RETURN: t = 125.5496 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 125.5496, H(p,q)-H0 = 0.0000000609529685, L(p,q)-L0 = 0.0000000000091984, Q(p,q)-Q0 = inf +t = 126.0000, H(p,q)-H0 = 0.0000001769098574, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf +ROOT RETURN: t = 126.6943 g[0] = -1, y[0] = -0.65864, y[1] = 0.79864 +t = 126.6943, H(p,q)-H0 = 0.0000002044216824, L(p,q)-L0 = 0.0000000000004233, Q(p,q)-Q0 = inf +t = 127.0000, H(p,q)-H0 = 0.0000002047795121, L(p,q)-L0 = -0.0000000000000071, Q(p,q)-Q0 = inf +t = 128.0000, H(p,q)-H0 = 0.0000002049615558, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf +t = 129.0000, H(p,q)-H0 = 0.0000002049735497, L(p,q)-L0 = -0.0000000000000049, Q(p,q)-Q0 = inf +t = 130.0000, H(p,q)-H0 = 0.0000002049374590, L(p,q)-L0 = -0.0000000000000051, Q(p,q)-Q0 = inf +t = 131.0000, H(p,q)-H0 = 0.0000002041949115, L(p,q)-L0 = -0.0000000000000059, Q(p,q)-Q0 = inf +ROOT RETURN: t = 131.8328 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 131.8328, H(p,q)-H0 = 0.0000000589480340, L(p,q)-L0 = 0.0000000004482658, Q(p,q)-Q0 = inf +t = 132.0000, H(p,q)-H0 = 0.0000000160710514, L(p,q)-L0 = -0.0000000000000064, Q(p,q)-Q0 = inf +ROOT RETURN: t = 132.9775 g[0] = -1, y[0] = -0.658641, y[1] = 0.798641 +t = 132.9775, H(p,q)-H0 = 0.0000002044093466, L(p,q)-L0 = 0.0000000000000487, Q(p,q)-Q0 = inf +t = 133.0000, H(p,q)-H0 = 0.0000002044636734, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf +t = 134.0000, H(p,q)-H0 = 0.0000002049463477, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf +t = 135.0000, H(p,q)-H0 = 0.0000002049740317, L(p,q)-L0 = -0.0000000000000049, Q(p,q)-Q0 = inf +t = 136.0000, H(p,q)-H0 = 0.0000002049569842, L(p,q)-L0 = -0.0000000000000044, Q(p,q)-Q0 = inf +t = 137.0000, H(p,q)-H0 = 0.0000002047012927, L(p,q)-L0 = -0.0000000000000047, Q(p,q)-Q0 = inf +t = 138.0000, H(p,q)-H0 = 0.0000001406985852, L(p,q)-L0 = -0.0000000000000044, Q(p,q)-Q0 = inf +ROOT RETURN: t = 138.1160 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 138.1160, H(p,q)-H0 = 0.0000000638374229, L(p,q)-L0 = 0.0000000002652900, Q(p,q)-Q0 = inf +t = 139.0000, H(p,q)-H0 = 0.0000002032189499, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf +ROOT RETURN: t = 139.2607 g[0] = -1, y[0] = -0.658642, y[1] = 0.798642 +t = 139.2607, H(p,q)-H0 = 0.0000002044184653, L(p,q)-L0 = 0.0000000000000731, Q(p,q)-Q0 = inf +t = 140.0000, H(p,q)-H0 = 0.0000002049160649, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf +t = 141.0000, H(p,q)-H0 = 0.0000002049718772, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf +t = 142.0000, H(p,q)-H0 = 0.0000002049671014, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf +t = 143.0000, H(p,q)-H0 = 0.0000002048583581, L(p,q)-L0 = -0.0000000000000080, Q(p,q)-Q0 = inf +t = 144.0000, H(p,q)-H0 = 0.0000001971968370, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf +ROOT RETURN: t = 144.3992 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 144.3992, H(p,q)-H0 = 0.0000000615662814, L(p,q)-L0 = 0.0000000000333338, Q(p,q)-Q0 = inf +t = 145.0000, H(p,q)-H0 = 0.0000001956601925, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf +ROOT RETURN: t = 145.5439 g[0] = -1, y[0] = -0.658642, y[1] = 0.798642 +t = 145.5439, H(p,q)-H0 = 0.0000002044237625, L(p,q)-L0 = 0.0000000000004587, Q(p,q)-Q0 = inf +t = 146.0000, H(p,q)-H0 = 0.0000002048492919, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +t = 147.0000, H(p,q)-H0 = 0.0000002049664016, L(p,q)-L0 = -0.0000000000000088, Q(p,q)-Q0 = inf +t = 148.0000, H(p,q)-H0 = 0.0000002049721995, L(p,q)-L0 = -0.0000000000000094, Q(p,q)-Q0 = inf +t = 149.0000, H(p,q)-H0 = 0.0000002049199580, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf +t = 150.0000, H(p,q)-H0 = 0.0000002034362154, L(p,q)-L0 = -0.0000000000000105, Q(p,q)-Q0 = inf +ROOT RETURN: t = 150.6824 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 150.6824, H(p,q)-H0 = 0.0000000590459728, L(p,q)-L0 = 0.0000000004090777, Q(p,q)-Q0 = inf +t = 151.0000, H(p,q)-H0 = 0.0000001261863694, L(p,q)-L0 = -0.0000000000000103, Q(p,q)-Q0 = inf +ROOT RETURN: t = 151.8271 g[0] = -1, y[0] = -0.658643, y[1] = 0.798643 +t = 151.8271, H(p,q)-H0 = 0.0000002044090854, L(p,q)-L0 = 0.0000000000000768, Q(p,q)-Q0 = inf +t = 152.0000, H(p,q)-H0 = 0.0000002046758949, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf +t = 153.0000, H(p,q)-H0 = 0.0000002049556415, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf +t = 154.0000, H(p,q)-H0 = 0.0000002049740890, L(p,q)-L0 = -0.0000000000000107, Q(p,q)-Q0 = inf +t = 155.0000, H(p,q)-H0 = 0.0000002049482429, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf +t = 156.0000, H(p,q)-H0 = 0.0000002045123801, L(p,q)-L0 = -0.0000000000000103, Q(p,q)-Q0 = inf +ROOT RETURN: t = 156.9656 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 156.9656, H(p,q)-H0 = 0.0000000630772743, L(p,q)-L0 = 0.0000000003050860, Q(p,q)-Q0 = inf +t = 157.0000, H(p,q)-H0 = 0.0000000337490764, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf +t = 158.0000, H(p,q)-H0 = 0.0000002041014376, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf +ROOT RETURN: t = 158.1103 g[0] = -1, y[0] = -0.658644, y[1] = 0.798644 +t = 158.1103, H(p,q)-H0 = 0.0000002044174612, L(p,q)-L0 = -0.0000000000000006, Q(p,q)-Q0 = inf +t = 159.0000, H(p,q)-H0 = 0.0000002049348182, L(p,q)-L0 = -0.0000000000000131, Q(p,q)-Q0 = inf +t = 160.0000, H(p,q)-H0 = 0.0000002049733595, L(p,q)-L0 = -0.0000000000000127, Q(p,q)-Q0 = inf +t = 161.0000, H(p,q)-H0 = 0.0000002049625329, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf +t = 162.0000, H(p,q)-H0 = 0.0000002047947361, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf +t = 163.0000, H(p,q)-H0 = 0.0000001821146405, L(p,q)-L0 = -0.0000000000000128, Q(p,q)-Q0 = inf +ROOT RETURN: t = 163.2487 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 163.2487, H(p,q)-H0 = 0.0000000624513086, L(p,q)-L0 = 0.0000000000633000, Q(p,q)-Q0 = inf +t = 164.0000, H(p,q)-H0 = 0.0000002013767927, L(p,q)-L0 = -0.0000000000000129, Q(p,q)-Q0 = inf +ROOT RETURN: t = 164.3935 g[0] = -1, y[0] = -0.658645, y[1] = 0.798645 +t = 164.3935, H(p,q)-H0 = 0.0000002044252375, L(p,q)-L0 = 0.0000000000004687, Q(p,q)-Q0 = inf +t = 165.0000, H(p,q)-H0 = 0.0000002048916541, L(p,q)-L0 = -0.0000000000000144, Q(p,q)-Q0 = inf +t = 166.0000, H(p,q)-H0 = 0.0000002049697939, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf +t = 167.0000, H(p,q)-H0 = 0.0000002049699599, L(p,q)-L0 = -0.0000000000000144, Q(p,q)-Q0 = inf +t = 168.0000, H(p,q)-H0 = 0.0000002048936254, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf +t = 169.0000, H(p,q)-H0 = 0.0000002015596684, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf +ROOT RETURN: t = 169.5319 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 169.5319, H(p,q)-H0 = 0.0000000593727620, L(p,q)-L0 = 0.0000000003454788, Q(p,q)-Q0 = inf +t = 170.0000, H(p,q)-H0 = 0.0000001804827845, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf +ROOT RETURN: t = 170.6766 g[0] = -1, y[0] = -0.658645, y[1] = 0.798645 +t = 170.6766, H(p,q)-H0 = 0.0000002044096650, L(p,q)-L0 = 0.0000000000001183, Q(p,q)-Q0 = inf +t = 171.0000, H(p,q)-H0 = 0.0000002047897568, L(p,q)-L0 = -0.0000000000000118, Q(p,q)-Q0 = inf +t = 172.0000, H(p,q)-H0 = 0.0000002049622086, L(p,q)-L0 = -0.0000000000000111, Q(p,q)-Q0 = inf +t = 173.0000, H(p,q)-H0 = 0.0000002049734258, L(p,q)-L0 = -0.0000000000000110, Q(p,q)-Q0 = inf +t = 174.0000, H(p,q)-H0 = 0.0000002049357303, L(p,q)-L0 = -0.0000000000000104, Q(p,q)-Q0 = inf +t = 175.0000, H(p,q)-H0 = 0.0000002041344870, L(p,q)-L0 = -0.0000000000000108, Q(p,q)-Q0 = inf +ROOT RETURN: t = 175.8151 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 175.8151, H(p,q)-H0 = 0.0000000621993272, L(p,q)-L0 = 0.0000000003467728, Q(p,q)-Q0 = inf +t = 176.0000, H(p,q)-H0 = 0.0000000272887137, L(p,q)-L0 = -0.0000000000000098, Q(p,q)-Q0 = inf +ROOT RETURN: t = 176.9598 g[0] = -1, y[0] = -0.658646, y[1] = 0.798646 +t = 176.9598, H(p,q)-H0 = 0.0000002044178394, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf +t = 177.0000, H(p,q)-H0 = 0.0000002044965889, L(p,q)-L0 = -0.0000000000000113, Q(p,q)-Q0 = inf +t = 178.0000, H(p,q)-H0 = 0.0000002049476138, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf +t = 179.0000, H(p,q)-H0 = 0.0000002049740697, L(p,q)-L0 = -0.0000000000000127, Q(p,q)-Q0 = inf +t = 180.0000, H(p,q)-H0 = 0.0000002049561020, L(p,q)-L0 = -0.0000000000000127, Q(p,q)-Q0 = inf +t = 181.0000, H(p,q)-H0 = 0.0000002046847841, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf +t = 182.0000, H(p,q)-H0 = 0.0000001313757614, L(p,q)-L0 = -0.0000000000000124, Q(p,q)-Q0 = inf +ROOT RETURN: t = 182.0983 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 182.0983, H(p,q)-H0 = 0.0000000633515107, L(p,q)-L0 = 0.0000000000942132, Q(p,q)-Q0 = inf +t = 183.0000, H(p,q)-H0 = 0.0000002033666721, L(p,q)-L0 = -0.0000000000000123, Q(p,q)-Q0 = inf +ROOT RETURN: t = 183.2430 g[0] = -1, y[0] = -0.658647, y[1] = 0.798647 +t = 183.2430, H(p,q)-H0 = 0.0000002044259765, L(p,q)-L0 = 0.0000000000004635, Q(p,q)-Q0 = inf +t = 184.0000, H(p,q)-H0 = 0.0000002049186698, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf +t = 185.0000, H(p,q)-H0 = 0.0000002049720896, L(p,q)-L0 = -0.0000000000000128, Q(p,q)-Q0 = inf +t = 186.0000, H(p,q)-H0 = 0.0000002049666383, L(p,q)-L0 = -0.0000000000000135, Q(p,q)-Q0 = inf +t = 187.0000, H(p,q)-H0 = 0.0000002048524398, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf +t = 188.0000, H(p,q)-H0 = 0.0000001962155347, L(p,q)-L0 = -0.0000000000000148, Q(p,q)-Q0 = inf +ROOT RETURN: t = 188.3815 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 +t = 188.3815, H(p,q)-H0 = 0.0000000598616603, L(p,q)-L0 = 0.0000000002609626, Q(p,q)-Q0 = inf +t = 189.0000, H(p,q)-H0 = 0.0000001967129617, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf +ROOT RETURN: t = 189.5262 g[0] = -1, y[0] = -0.658648, y[1] = 0.798648 +t = 189.5262, H(p,q)-H0 = 0.0000002044110309, L(p,q)-L0 = 0.0000000000001704, Q(p,q)-Q0 = inf +t = 190.0000, H(p,q)-H0 = 0.0000002048553853, L(p,q)-L0 = -0.0000000000000119, Q(p,q)-Q0 = inf +t = 191.0000, H(p,q)-H0 = 0.0000002049668727, L(p,q)-L0 = -0.0000000000000115, Q(p,q)-Q0 = inf +t = 192.0000, H(p,q)-H0 = 0.0000002049719920, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf +t = 193.0000, H(p,q)-H0 = 0.0000002049174148, L(p,q)-L0 = -0.0000000000000102, Q(p,q)-Q0 = inf +t = 194.0000, H(p,q)-H0 = 0.0000002032963038, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +ROOT RETURN: t = 194.6647 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 194.6647, H(p,q)-H0 = 0.0000000612930162, L(p,q)-L0 = 0.0000000003876842, Q(p,q)-Q0 = inf +t = 195.0000, H(p,q)-H0 = 0.0000001360801176, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf +ROOT RETURN: t = 195.8094 g[0] = -1, y[0] = -0.658648, y[1] = 0.798648 +t = 195.8094, H(p,q)-H0 = 0.0000002044171137, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf +t = 196.0000, H(p,q)-H0 = 0.0000002046930251, L(p,q)-L0 = -0.0000000000000077, Q(p,q)-Q0 = inf +t = 197.0000, H(p,q)-H0 = 0.0000002049565468, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf +t = 198.0000, H(p,q)-H0 = 0.0000002049740604, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf +t = 199.0000, H(p,q)-H0 = 0.0000002049470088, L(p,q)-L0 = -0.0000000000000074, Q(p,q)-Q0 = inf +t = 200.0000, H(p,q)-H0 = 0.0000002044808124, L(p,q)-L0 = -0.0000000000000088, Q(p,q)-Q0 = inf +ROOT RETURN: t = 200.9479 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 200.9479, H(p,q)-H0 = 0.0000000640904072, L(p,q)-L0 = 0.0000000001242713, Q(p,q)-Q0 = inf +t = 201.0000, H(p,q)-H0 = 0.0000000215241154, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf +t = 202.0000, H(p,q)-H0 = 0.0000002041647824, L(p,q)-L0 = -0.0000000000000058, Q(p,q)-Q0 = inf +ROOT RETURN: t = 202.0926 g[0] = -1, y[0] = -0.658649, y[1] = 0.798649 +t = 202.0926, H(p,q)-H0 = 0.0000002044259015, L(p,q)-L0 = 0.0000000000004385, Q(p,q)-Q0 = inf +t = 203.0000, H(p,q)-H0 = 0.0000002049365964, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf +t = 204.0000, H(p,q)-H0 = 0.0000002049734983, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf +t = 205.0000, H(p,q)-H0 = 0.0000002049619030, L(p,q)-L0 = -0.0000000000000050, Q(p,q)-Q0 = inf +t = 206.0000, H(p,q)-H0 = 0.0000002047848349, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +t = 207.0000, H(p,q)-H0 = 0.0000001787979984, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +ROOT RETURN: t = 207.2311 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 207.2311, H(p,q)-H0 = 0.0000000604054162, L(p,q)-L0 = 0.0000000001644913, Q(p,q)-Q0 = inf +t = 208.0000, H(p,q)-H0 = 0.0000002017248631, L(p,q)-L0 = -0.0000000000000040, Q(p,q)-Q0 = inf +ROOT RETURN: t = 208.3758 g[0] = -1, y[0] = -0.65865, y[1] = 0.79865 +t = 208.3758, H(p,q)-H0 = 0.0000002044130298, L(p,q)-L0 = 0.0000000000002348, Q(p,q)-Q0 = inf +t = 209.0000, H(p,q)-H0 = 0.0000002048954887, L(p,q)-L0 = -0.0000000000000047, Q(p,q)-Q0 = inf +t = 210.0000, H(p,q)-H0 = 0.0000002049701368, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf +t = 211.0000, H(p,q)-H0 = 0.0000002049696521, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf +t = 212.0000, H(p,q)-H0 = 0.0000002048897333, L(p,q)-L0 = -0.0000000000000059, Q(p,q)-Q0 = inf +t = 213.0000, H(p,q)-H0 = 0.0000002011902032, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf +ROOT RETURN: t = 213.5143 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 213.5143, H(p,q)-H0 = 0.0000000604462869, L(p,q)-L0 = 0.0000000004239924, Q(p,q)-Q0 = inf +t = 214.0000, H(p,q)-H0 = 0.0000001835705437, L(p,q)-L0 = -0.0000000000000073, Q(p,q)-Q0 = inf +ROOT RETURN: t = 214.6590 g[0] = -1, y[0] = -0.658651, y[1] = 0.798651 +t = 214.6590, H(p,q)-H0 = 0.0000002044153266, L(p,q)-L0 = -0.0000000000000029, Q(p,q)-Q0 = inf +t = 215.0000, H(p,q)-H0 = 0.0000002047993857, L(p,q)-L0 = -0.0000000000000080, Q(p,q)-Q0 = inf +t = 216.0000, H(p,q)-H0 = 0.0000002049628581, L(p,q)-L0 = -0.0000000000000074, Q(p,q)-Q0 = inf +t = 217.0000, H(p,q)-H0 = 0.0000002049733131, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf +t = 218.0000, H(p,q)-H0 = 0.0000002049339445, L(p,q)-L0 = -0.0000000000000068, Q(p,q)-Q0 = inf +t = 219.0000, H(p,q)-H0 = 0.0000002040682244, L(p,q)-L0 = -0.0000000000000071, Q(p,q)-Q0 = inf +ROOT RETURN: t = 219.7975 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 219.7975, H(p,q)-H0 = 0.0000000645600975, L(p,q)-L0 = 0.0000000001536600, Q(p,q)-Q0 = inf +t = 220.0000, H(p,q)-H0 = 0.0000000402919840, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf +ROOT RETURN: t = 220.9422 g[0] = -1, y[0] = -0.658651, y[1] = 0.798651 +t = 220.9422, H(p,q)-H0 = 0.0000002044250074, L(p,q)-L0 = 0.0000000000003810, Q(p,q)-Q0 = inf +t = 221.0000, H(p,q)-H0 = 0.0000002045269503, L(p,q)-L0 = -0.0000000000000067, Q(p,q)-Q0 = inf +t = 222.0000, H(p,q)-H0 = 0.0000002049488491, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf +t = 223.0000, H(p,q)-H0 = 0.0000002049741205, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf +t = 224.0000, H(p,q)-H0 = 0.0000002049552051, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf +t = 225.0000, H(p,q)-H0 = 0.0000002046670631, L(p,q)-L0 = -0.0000000000000068, Q(p,q)-Q0 = inf +t = 226.0000, H(p,q)-H0 = 0.0000001209273015, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf +ROOT RETURN: t = 226.0806 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 226.0806, H(p,q)-H0 = 0.0000000608537341, L(p,q)-L0 = 0.0000000000722000, Q(p,q)-Q0 = inf +t = 227.0000, H(p,q)-H0 = 0.0000002034995585, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf +ROOT RETURN: t = 227.2254 g[0] = -1, y[0] = -0.658652, y[1] = 0.798652 +t = 227.2254, H(p,q)-H0 = 0.0000002044154518, L(p,q)-L0 = 0.0000000000002905, Q(p,q)-Q0 = inf +t = 228.0000, H(p,q)-H0 = 0.0000002049211781, L(p,q)-L0 = -0.0000000000000080, Q(p,q)-Q0 = inf +t = 229.0000, H(p,q)-H0 = 0.0000002049723132, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf +t = 230.0000, H(p,q)-H0 = 0.0000002049661791, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf +t = 231.0000, H(p,q)-H0 = 0.0000002048461902, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf +t = 232.0000, H(p,q)-H0 = 0.0000001950888167, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf +ROOT RETURN: t = 232.3638 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 232.3638, H(p,q)-H0 = 0.0000000597383707, L(p,q)-L0 = 0.0000000004509856, Q(p,q)-Q0 = inf +t = 233.0000, H(p,q)-H0 = 0.0000001976306370, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf +ROOT RETURN: t = 233.5086 g[0] = -1, y[0] = -0.658653, y[1] = 0.798653 +t = 233.5086, H(p,q)-H0 = 0.0000002044131976, L(p,q)-L0 = 0.0000000000000036, Q(p,q)-Q0 = inf +t = 234.0000, H(p,q)-H0 = 0.0000002048611419, L(p,q)-L0 = -0.0000000000000080, Q(p,q)-Q0 = inf +t = 235.0000, H(p,q)-H0 = 0.0000002049673273, L(p,q)-L0 = -0.0000000000000088, Q(p,q)-Q0 = inf +t = 236.0000, H(p,q)-H0 = 0.0000002049717733, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf +t = 237.0000, H(p,q)-H0 = 0.0000002049147449, L(p,q)-L0 = -0.0000000000000073, Q(p,q)-Q0 = inf +t = 238.0000, H(p,q)-H0 = 0.0000002031406034, L(p,q)-L0 = -0.0000000000000053, Q(p,q)-Q0 = inf +ROOT RETURN: t = 238.6470 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 238.6470, H(p,q)-H0 = 0.0000000647101766, L(p,q)-L0 = 0.0000000001836198, Q(p,q)-Q0 = inf +t = 239.0000, H(p,q)-H0 = 0.0000001448666112, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf +ROOT RETURN: t = 239.7917 g[0] = -1, y[0] = -0.658654, y[1] = 0.798654 +t = 239.7917, H(p,q)-H0 = 0.0000002044234235, L(p,q)-L0 = 0.0000000000003015, Q(p,q)-Q0 = inf +t = 240.0000, H(p,q)-H0 = 0.0000002047089658, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf +t = 241.0000, H(p,q)-H0 = 0.0000002049574083, L(p,q)-L0 = -0.0000000000000067, Q(p,q)-Q0 = inf +t = 242.0000, H(p,q)-H0 = 0.0000002049740142, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf +t = 243.0000, H(p,q)-H0 = 0.0000002049457142, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf +t = 244.0000, H(p,q)-H0 = 0.0000002044465450, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf +ROOT RETURN: t = 244.9302 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 244.9302, H(p,q)-H0 = 0.0000000610114852, L(p,q)-L0 = 0.0000000000094080, Q(p,q)-Q0 = inf +t = 245.0000, H(p,q)-H0 = 0.0000000114585323, L(p,q)-L0 = -0.0000000000000048, Q(p,q)-Q0 = inf +t = 246.0000, H(p,q)-H0 = 0.0000002042225629, L(p,q)-L0 = -0.0000000000000039, Q(p,q)-Q0 = inf +ROOT RETURN: t = 246.0749 g[0] = -1, y[0] = -0.658655, y[1] = 0.798655 +t = 246.0749, H(p,q)-H0 = 0.0000002044180860, L(p,q)-L0 = 0.0000000000003539, Q(p,q)-Q0 = inf +t = 247.0000, H(p,q)-H0 = 0.0000002049382891, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +t = 248.0000, H(p,q)-H0 = 0.0000002049736170, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +t = 249.0000, H(p,q)-H0 = 0.0000002049612364, L(p,q)-L0 = -0.0000000000000047, Q(p,q)-Q0 = inf +t = 250.0000, H(p,q)-H0 = 0.0000002047742579, L(p,q)-L0 = -0.0000000000000048, Q(p,q)-Q0 = inf +t = 251.0000, H(p,q)-H0 = 0.0000001749610650, L(p,q)-L0 = -0.0000000000000049, Q(p,q)-Q0 = inf +ROOT RETURN: t = 251.2134 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 251.2134, H(p,q)-H0 = 0.0000000592331157, L(p,q)-L0 = 0.0000000004635544, Q(p,q)-Q0 = inf +t = 252.0000, H(p,q)-H0 = 0.0000002020334031, L(p,q)-L0 = -0.0000000000000046, Q(p,q)-Q0 = inf +ROOT RETURN: t = 252.3581 g[0] = -1, y[0] = -0.658655, y[1] = 0.798655 +t = 252.3581, H(p,q)-H0 = 0.0000002044112611, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf +t = 253.0000, H(p,q)-H0 = 0.0000002048991122, L(p,q)-L0 = -0.0000000000000050, Q(p,q)-Q0 = inf +t = 254.0000, H(p,q)-H0 = 0.0000002049704483, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf +t = 255.0000, H(p,q)-H0 = 0.0000002049693120, L(p,q)-L0 = -0.0000000000000059, Q(p,q)-Q0 = inf +t = 256.0000, H(p,q)-H0 = 0.0000002048856115, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf +t = 257.0000, H(p,q)-H0 = 0.0000002007721391, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf +ROOT RETURN: t = 257.4966 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 257.4966, H(p,q)-H0 = 0.0000000645371567, L(p,q)-L0 = 0.0000000002156431, Q(p,q)-Q0 = inf +t = 258.0000, H(p,q)-H0 = 0.0000001862387087, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf +ROOT RETURN: t = 258.6413 g[0] = -1, y[0] = -0.658656, y[1] = 0.798656 +t = 258.6413, H(p,q)-H0 = 0.0000002044214203, L(p,q)-L0 = 0.0000000000002087, Q(p,q)-Q0 = inf +t = 259.0000, H(p,q)-H0 = 0.0000002048084180, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf +t = 260.0000, H(p,q)-H0 = 0.0000002049634770, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf +t = 261.0000, H(p,q)-H0 = 0.0000002049731854, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf +t = 262.0000, H(p,q)-H0 = 0.0000002049320703, L(p,q)-L0 = -0.0000000000000067, Q(p,q)-Q0 = inf +t = 263.0000, H(p,q)-H0 = 0.0000002039954176, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf +ROOT RETURN: t = 263.7798 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 +t = 263.7798, H(p,q)-H0 = 0.0000000608543091, L(p,q)-L0 = 0.0000000000032646, Q(p,q)-Q0 = inf +t = 264.0000, H(p,q)-H0 = 0.0000000543259482, L(p,q)-L0 = -0.0000000000000079, Q(p,q)-Q0 = inf +ROOT RETURN: t = 264.9245 g[0] = -1, y[0] = -0.658657, y[1] = 0.798657 +t = 264.9245, H(p,q)-H0 = 0.0000002044206707, L(p,q)-L0 = 0.0000000000004033, Q(p,q)-Q0 = inf +t = 265.0000, H(p,q)-H0 = 0.0000002045549692, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf +t = 266.0000, H(p,q)-H0 = 0.0000002049500240, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf +t = 267.0000, H(p,q)-H0 = 0.0000002049741497, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf +t = 268.0000, H(p,q)-H0 = 0.0000002049542603, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf +t = 269.0000, H(p,q)-H0 = 0.0000002046479867, L(p,q)-L0 = -0.0000000000000119, Q(p,q)-Q0 = inf +t = 270.0000, H(p,q)-H0 = 0.0000001093516970, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf +ROOT RETURN: t = 270.0630 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 270.0630, H(p,q)-H0 = 0.0000000589729037, L(p,q)-L0 = 0.0000000004568250, Q(p,q)-Q0 = inf +t = 271.0000, H(p,q)-H0 = 0.0000002036192879, L(p,q)-L0 = -0.0000000000000098, Q(p,q)-Q0 = inf +ROOT RETURN: t = 271.2077 g[0] = -1, y[0] = -0.658658, y[1] = 0.798658 +t = 271.2077, H(p,q)-H0 = 0.0000002044098636, L(p,q)-L0 = 0.0000000000000332, Q(p,q)-Q0 = inf +t = 272.0000, H(p,q)-H0 = 0.0000002049235631, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf +t = 273.0000, H(p,q)-H0 = 0.0000002049725170, L(p,q)-L0 = -0.0000000000000094, Q(p,q)-Q0 = inf +t = 274.0000, H(p,q)-H0 = 0.0000002049656909, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf +t = 275.0000, H(p,q)-H0 = 0.0000002048395561, L(p,q)-L0 = -0.0000000000000100, Q(p,q)-Q0 = inf +t = 276.0000, H(p,q)-H0 = 0.0000001937929017, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf +ROOT RETURN: t = 276.3462 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 276.3462, H(p,q)-H0 = 0.0000000640743190, L(p,q)-L0 = 0.0000000002508480, Q(p,q)-Q0 = inf +t = 277.0000, H(p,q)-H0 = 0.0000001984320273, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf +ROOT RETURN: t = 277.4909 g[0] = -1, y[0] = -0.658658, y[1] = 0.798658 +t = 277.4909, H(p,q)-H0 = 0.0000002044193874, L(p,q)-L0 = 0.0000000000001114, Q(p,q)-Q0 = inf +t = 278.0000, H(p,q)-H0 = 0.0000002048665860, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf +t = 279.0000, H(p,q)-H0 = 0.0000002049677686, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf +t = 280.0000, H(p,q)-H0 = 0.0000002049715478, L(p,q)-L0 = -0.0000000000000079, Q(p,q)-Q0 = inf +t = 281.0000, H(p,q)-H0 = 0.0000002049119465, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf +t = 282.0000, H(p,q)-H0 = 0.0000002029670150, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +ROOT RETURN: t = 282.6293 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 282.6293, H(p,q)-H0 = 0.0000000612761599, L(p,q)-L0 = 0.0000000000229872, Q(p,q)-Q0 = inf +t = 283.0000, H(p,q)-H0 = 0.0000001526079532, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf +ROOT RETURN: t = 283.7741 g[0] = -1, y[0] = -0.658659, y[1] = 0.798659 +t = 283.7741, H(p,q)-H0 = 0.0000002044229694, L(p,q)-L0 = 0.0000000000004439, Q(p,q)-Q0 = inf +t = 284.0000, H(p,q)-H0 = 0.0000002047238329, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf +t = 285.0000, H(p,q)-H0 = 0.0000002049582453, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf +t = 286.0000, H(p,q)-H0 = 0.0000002049739676, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf +t = 287.0000, H(p,q)-H0 = 0.0000002049443737, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf +t = 288.0000, H(p,q)-H0 = 0.0000002044093119, L(p,q)-L0 = -0.0000000000000074, Q(p,q)-Q0 = inf +ROOT RETURN: t = 288.9125 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 288.9125, H(p,q)-H0 = 0.0000000589732607, L(p,q)-L0 = 0.0000000004270665, Q(p,q)-Q0 = inf +t = 289.0000, H(p,q)-H0 = 0.0000000042635371, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf +t = 290.0000, H(p,q)-H0 = 0.0000002042753529, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf +ROOT RETURN: t = 290.0573 g[0] = -1, y[0] = -0.65866, y[1] = 0.79866 +t = 290.0573, H(p,q)-H0 = 0.0000002044092232, L(p,q)-L0 = 0.0000000000000642, Q(p,q)-Q0 = inf +t = 291.0000, H(p,q)-H0 = 0.0000002049399074, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf +t = 292.0000, H(p,q)-H0 = 0.0000002049737245, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf +t = 293.0000, H(p,q)-H0 = 0.0000002049605422, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf +t = 294.0000, H(p,q)-H0 = 0.0000002047629634, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf +t = 295.0000, H(p,q)-H0 = 0.0000001705262338, L(p,q)-L0 = -0.0000000000000091, Q(p,q)-Q0 = inf +ROOT RETURN: t = 295.1957 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 295.1957, H(p,q)-H0 = 0.0000000633820858, L(p,q)-L0 = 0.0000000002894960, Q(p,q)-Q0 = inf +t = 296.0000, H(p,q)-H0 = 0.0000002023074644, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf +ROOT RETURN: t = 296.3405 g[0] = -1, y[0] = -0.658661, y[1] = 0.798661 +t = 296.3405, H(p,q)-H0 = 0.0000002044178938, L(p,q)-L0 = 0.0000000000000295, Q(p,q)-Q0 = inf +t = 297.0000, H(p,q)-H0 = 0.0000002049025567, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf +t = 298.0000, H(p,q)-H0 = 0.0000002049707477, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf +t = 299.0000, H(p,q)-H0 = 0.0000002049689600, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf +t = 300.0000, H(p,q)-H0 = 0.0000002048812703, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf +t = 301.0000, H(p,q)-H0 = 0.0000002002981537, L(p,q)-L0 = -0.0000000000000073, Q(p,q)-Q0 = inf +ROOT RETURN: t = 301.4789 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 301.4789, H(p,q)-H0 = 0.0000000620919978, L(p,q)-L0 = 0.0000000000515072, Q(p,q)-Q0 = inf +t = 302.0000, H(p,q)-H0 = 0.0000001885450391, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf +ROOT RETURN: t = 302.6237 g[0] = -1, y[0] = -0.658661, y[1] = 0.798661 +t = 302.6237, H(p,q)-H0 = 0.0000002044247518, L(p,q)-L0 = 0.0000000000004693, Q(p,q)-Q0 = inf +t = 303.0000, H(p,q)-H0 = 0.0000002048168956, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +t = 304.0000, H(p,q)-H0 = 0.0000002049640653, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +t = 305.0000, H(p,q)-H0 = 0.0000002049730389, L(p,q)-L0 = -0.0000000000000097, Q(p,q)-Q0 = inf +t = 306.0000, H(p,q)-H0 = 0.0000002049301034, L(p,q)-L0 = -0.0000000000000088, Q(p,q)-Q0 = inf +t = 307.0000, H(p,q)-H0 = 0.0000002039152911, L(p,q)-L0 = -0.0000000000000092, Q(p,q)-Q0 = inf +ROOT RETURN: t = 307.7621 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 307.7621, H(p,q)-H0 = 0.0000000592179796, L(p,q)-L0 = 0.0000000003726697, Q(p,q)-Q0 = inf +t = 308.0000, H(p,q)-H0 = 0.0000000687103401, L(p,q)-L0 = -0.0000000000000102, Q(p,q)-Q0 = inf +ROOT RETURN: t = 308.9068 g[0] = -1, y[0] = -0.658662, y[1] = 0.798662 +t = 308.9068, H(p,q)-H0 = 0.0000002044094146, L(p,q)-L0 = 0.0000000000001003, Q(p,q)-Q0 = inf +t = 309.0000, H(p,q)-H0 = 0.0000002045808604, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf +t = 310.0000, H(p,q)-H0 = 0.0000002049511486, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf +t = 311.0000, H(p,q)-H0 = 0.0000002049741704, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf +t = 312.0000, H(p,q)-H0 = 0.0000002049532770, L(p,q)-L0 = -0.0000000000000077, Q(p,q)-Q0 = inf +t = 313.0000, H(p,q)-H0 = 0.0000002046274431, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf +t = 314.0000, H(p,q)-H0 = 0.0000000967146014, L(p,q)-L0 = -0.0000000000000094, Q(p,q)-Q0 = inf +ROOT RETURN: t = 314.0453 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 314.0453, H(p,q)-H0 = 0.0000000625389425, L(p,q)-L0 = 0.0000000003307021, Q(p,q)-Q0 = inf +t = 315.0000, H(p,q)-H0 = 0.0000002037273511, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf +ROOT RETURN: t = 315.1900 g[0] = -1, y[0] = -0.658663, y[1] = 0.798663 +t = 315.1900, H(p,q)-H0 = 0.0000002044176947, L(p,q)-L0 = -0.0000000000000105, Q(p,q)-Q0 = inf +t = 316.0000, H(p,q)-H0 = 0.0000002049258276, L(p,q)-L0 = -0.0000000000000107, Q(p,q)-Q0 = inf +t = 317.0000, H(p,q)-H0 = 0.0000002049726984, L(p,q)-L0 = -0.0000000000000114, Q(p,q)-Q0 = inf +t = 318.0000, H(p,q)-H0 = 0.0000002049651724, L(p,q)-L0 = -0.0000000000000102, Q(p,q)-Q0 = inf +t = 319.0000, H(p,q)-H0 = 0.0000002048325045, L(p,q)-L0 = -0.0000000000000113, Q(p,q)-Q0 = inf +t = 320.0000, H(p,q)-H0 = 0.0000001923000481, L(p,q)-L0 = -0.0000000000000117, Q(p,q)-Q0 = inf +ROOT RETURN: t = 320.3285 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 320.3285, H(p,q)-H0 = 0.0000000630113586, L(p,q)-L0 = 0.0000000000824136, Q(p,q)-Q0 = inf +t = 321.0000, H(p,q)-H0 = 0.0000001991331846, L(p,q)-L0 = -0.0000000000000094, Q(p,q)-Q0 = inf +ROOT RETURN: t = 321.4732 g[0] = -1, y[0] = -0.658664, y[1] = 0.798664 +t = 321.4732, H(p,q)-H0 = 0.0000002044258534, L(p,q)-L0 = 0.0000000000004730, Q(p,q)-Q0 = inf +t = 322.0000, H(p,q)-H0 = 0.0000002048717222, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf +t = 323.0000, H(p,q)-H0 = 0.0000002049681809, L(p,q)-L0 = -0.0000000000000097, Q(p,q)-Q0 = inf +t = 324.0000, H(p,q)-H0 = 0.0000002049712969, L(p,q)-L0 = -0.0000000000000098, Q(p,q)-Q0 = inf +t = 325.0000, H(p,q)-H0 = 0.0000002049089922, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf +t = 326.0000, H(p,q)-H0 = 0.0000002027731077, L(p,q)-L0 = -0.0000000000000108, Q(p,q)-Q0 = inf +ROOT RETURN: t = 326.6117 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 326.6117, H(p,q)-H0 = 0.0000000596550571, L(p,q)-L0 = 0.0000000002954570, Q(p,q)-Q0 = inf +t = 327.0000, H(p,q)-H0 = 0.0000001593868577, L(p,q)-L0 = -0.0000000000000103, Q(p,q)-Q0 = inf +ROOT RETURN: t = 327.7564 g[0] = -1, y[0] = -0.658664, y[1] = 0.798664 +t = 327.7564, H(p,q)-H0 = 0.0000002044104224, L(p,q)-L0 = 0.0000000000001464, Q(p,q)-Q0 = inf +t = 328.0000, H(p,q)-H0 = 0.0000002047376884, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf +t = 329.0000, H(p,q)-H0 = 0.0000002049590364, L(p,q)-L0 = -0.0000000000000099, Q(p,q)-Q0 = inf +t = 330.0000, H(p,q)-H0 = 0.0000002049738960, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf +t = 331.0000, H(p,q)-H0 = 0.0000002049429565, L(p,q)-L0 = -0.0000000000000115, Q(p,q)-Q0 = inf +t = 332.0000, H(p,q)-H0 = 0.0000002043687722, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf +ROOT RETURN: t = 332.8949 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 +t = 332.8949, H(p,q)-H0 = 0.0000000616328681, L(p,q)-L0 = 0.0000000003723002, Q(p,q)-Q0 = inf +t = 333.0000, H(p,q)-H0 = 0.0000000004936018, L(p,q)-L0 = -0.0000000000000121, Q(p,q)-Q0 = inf +t = 334.0000, H(p,q)-H0 = 0.0000002043236466, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf +ROOT RETURN: t = 334.0396 g[0] = -1, y[0] = -0.658665, y[1] = 0.798665 +t = 334.0396, H(p,q)-H0 = 0.0000002044177470, L(p,q)-L0 = -0.0000000000000121, Q(p,q)-Q0 = inf +t = 335.0000, H(p,q)-H0 = 0.0000002049414485, L(p,q)-L0 = -0.0000000000000124, Q(p,q)-Q0 = inf +t = 336.0000, H(p,q)-H0 = 0.0000002049738119, L(p,q)-L0 = -0.0000000000000131, Q(p,q)-Q0 = inf +t = 337.0000, H(p,q)-H0 = 0.0000002049598103, L(p,q)-L0 = -0.0000000000000118, Q(p,q)-Q0 = inf +t = 338.0000, H(p,q)-H0 = 0.0000002047508827, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf +t = 339.0000, H(p,q)-H0 = 0.0000001654084074, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf +ROOT RETURN: t = 339.1781 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 339.1781, H(p,q)-H0 = 0.0000000638284305, L(p,q)-L0 = 0.0000000001128619, Q(p,q)-Q0 = inf +t = 340.0000, H(p,q)-H0 = 0.0000002025513762, L(p,q)-L0 = -0.0000000000000124, Q(p,q)-Q0 = inf +ROOT RETURN: t = 340.3228 g[0] = -1, y[0] = -0.658666, y[1] = 0.798666 +t = 340.3228, H(p,q)-H0 = 0.0000002044261508, L(p,q)-L0 = 0.0000000000004504, Q(p,q)-Q0 = inf +t = 341.0000, H(p,q)-H0 = 0.0000002049058191, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf +t = 342.0000, H(p,q)-H0 = 0.0000002049710202, L(p,q)-L0 = -0.0000000000000143, Q(p,q)-Q0 = inf +t = 343.0000, H(p,q)-H0 = 0.0000002049685768, L(p,q)-L0 = -0.0000000000000135, Q(p,q)-Q0 = inf +t = 344.0000, H(p,q)-H0 = 0.0000002048766713, L(p,q)-L0 = -0.0000000000000129, Q(p,q)-Q0 = inf +t = 345.0000, H(p,q)-H0 = 0.0000001997596439, L(p,q)-L0 = -0.0000000000000121, Q(p,q)-Q0 = inf +ROOT RETURN: t = 345.4612 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 345.4612, H(p,q)-H0 = 0.0000000601931085, L(p,q)-L0 = 0.0000000002020891, Q(p,q)-Q0 = inf +t = 346.0000, H(p,q)-H0 = 0.0000001905399427, L(p,q)-L0 = -0.0000000000000119, Q(p,q)-Q0 = inf +ROOT RETURN: t = 346.6060 g[0] = -1, y[0] = -0.658667, y[1] = 0.798667 +t = 346.6060, H(p,q)-H0 = 0.0000002044121343, L(p,q)-L0 = 0.0000000000001991, Q(p,q)-Q0 = inf +t = 347.0000, H(p,q)-H0 = 0.0000002048248616, L(p,q)-L0 = -0.0000000000000124, Q(p,q)-Q0 = inf +t = 348.0000, H(p,q)-H0 = 0.0000002049646229, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf +t = 349.0000, H(p,q)-H0 = 0.0000002049728747, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf +t = 350.0000, H(p,q)-H0 = 0.0000002049280354, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf +t = 351.0000, H(p,q)-H0 = 0.0000002038269655, L(p,q)-L0 = -0.0000000000000147, Q(p,q)-Q0 = inf +ROOT RETURN: t = 351.7444 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 351.7444, H(p,q)-H0 = 0.0000000607532638, L(p,q)-L0 = 0.0000000004108887, Q(p,q)-Q0 = inf +t = 352.0000, H(p,q)-H0 = 0.0000000828883553, L(p,q)-L0 = -0.0000000000000149, Q(p,q)-Q0 = inf +ROOT RETURN: t = 352.8892 g[0] = -1, y[0] = -0.658668, y[1] = 0.798668 +t = 352.8892, H(p,q)-H0 = 0.0000002044163495, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf +t = 353.0000, H(p,q)-H0 = 0.0000002046048115, L(p,q)-L0 = -0.0000000000000150, Q(p,q)-Q0 = inf +t = 354.0000, H(p,q)-H0 = 0.0000002049522198, L(p,q)-L0 = -0.0000000000000148, Q(p,q)-Q0 = inf +t = 355.0000, H(p,q)-H0 = 0.0000002049741721, L(p,q)-L0 = -0.0000000000000144, Q(p,q)-Q0 = inf +t = 356.0000, H(p,q)-H0 = 0.0000002049522424, L(p,q)-L0 = -0.0000000000000134, Q(p,q)-Q0 = inf +t = 357.0000, H(p,q)-H0 = 0.0000002046052839, L(p,q)-L0 = -0.0000000000000148, Q(p,q)-Q0 = inf +t = 358.0000, H(p,q)-H0 = 0.0000000831739333, L(p,q)-L0 = -0.0000000000000158, Q(p,q)-Q0 = inf +ROOT RETURN: t = 358.0276 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 358.0276, H(p,q)-H0 = 0.0000000644103064, L(p,q)-L0 = 0.0000000001423925, Q(p,q)-Q0 = inf +t = 359.0000, H(p,q)-H0 = 0.0000002038250593, L(p,q)-L0 = -0.0000000000000151, Q(p,q)-Q0 = inf +ROOT RETURN: t = 359.1724 g[0] = -1, y[0] = -0.658668, y[1] = 0.798668 +t = 359.1724, H(p,q)-H0 = 0.0000002044256217, L(p,q)-L0 = 0.0000000000004037, Q(p,q)-Q0 = inf +t = 360.0000, H(p,q)-H0 = 0.0000002049279912, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf +t = 361.0000, H(p,q)-H0 = 0.0000002049728709, L(p,q)-L0 = -0.0000000000000132, Q(p,q)-Q0 = inf +t = 362.0000, H(p,q)-H0 = 0.0000002049646348, L(p,q)-L0 = -0.0000000000000117, Q(p,q)-Q0 = inf +t = 363.0000, H(p,q)-H0 = 0.0000002048250195, L(p,q)-L0 = -0.0000000000000107, Q(p,q)-Q0 = inf +t = 364.0000, H(p,q)-H0 = 0.0000001905779314, L(p,q)-L0 = -0.0000000000000127, Q(p,q)-Q0 = inf +ROOT RETURN: t = 364.3108 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 364.3108, H(p,q)-H0 = 0.0000000606986386, L(p,q)-L0 = 0.0000000001057414, Q(p,q)-Q0 = inf +t = 365.0000, H(p,q)-H0 = 0.0000001997478494, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf +ROOT RETURN: t = 365.4556 g[0] = -1, y[0] = -0.658669, y[1] = 0.798669 +t = 365.4556, H(p,q)-H0 = 0.0000002044143791, L(p,q)-L0 = 0.0000000000002577, Q(p,q)-Q0 = inf +t = 366.0000, H(p,q)-H0 = 0.0000002048765737, L(p,q)-L0 = -0.0000000000000131, Q(p,q)-Q0 = inf +t = 367.0000, H(p,q)-H0 = 0.0000002049685690, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf +t = 368.0000, H(p,q)-H0 = 0.0000002049710260, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf +t = 369.0000, H(p,q)-H0 = 0.0000002049058829, L(p,q)-L0 = -0.0000000000000153, Q(p,q)-Q0 = inf +t = 370.0000, H(p,q)-H0 = 0.0000002025560892, L(p,q)-L0 = -0.0000000000000153, Q(p,q)-Q0 = inf +ROOT RETURN: t = 370.5940 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 370.5940, H(p,q)-H0 = 0.0000000599835317, L(p,q)-L0 = 0.0000000004420531, Q(p,q)-Q0 = inf +t = 371.0000, H(p,q)-H0 = 0.0000001652956036, L(p,q)-L0 = -0.0000000000000155, Q(p,q)-Q0 = inf +ROOT RETURN: t = 371.7388 g[0] = -1, y[0] = -0.65867, y[1] = 0.79867 +t = 371.7388, H(p,q)-H0 = 0.0000002044142964, L(p,q)-L0 = -0.0000000000000090, Q(p,q)-Q0 = inf +t = 372.0000, H(p,q)-H0 = 0.0000002047506180, L(p,q)-L0 = -0.0000000000000171, Q(p,q)-Q0 = inf +t = 373.0000, H(p,q)-H0 = 0.0000002049597858, L(p,q)-L0 = -0.0000000000000173, Q(p,q)-Q0 = inf +t = 374.0000, H(p,q)-H0 = 0.0000002049738052, L(p,q)-L0 = -0.0000000000000178, Q(p,q)-Q0 = inf +t = 375.0000, H(p,q)-H0 = 0.0000002049414712, L(p,q)-L0 = -0.0000000000000167, Q(p,q)-Q0 = inf +t = 376.0000, H(p,q)-H0 = 0.0000002043245866, L(p,q)-L0 = -0.0000000000000167, Q(p,q)-Q0 = inf +ROOT RETURN: t = 376.8772 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 376.8772, H(p,q)-H0 = 0.0000000646858112, L(p,q)-L0 = 0.0000000001719540, Q(p,q)-Q0 = inf +t = 377.0000, H(p,q)-H0 = 0.0000000004547589, L(p,q)-L0 = -0.0000000000000170, Q(p,q)-Q0 = inf +t = 378.0000, H(p,q)-H0 = 0.0000002043678941, L(p,q)-L0 = -0.0000000000000165, Q(p,q)-Q0 = inf +ROOT RETURN: t = 378.0219 g[0] = -1, y[0] = -0.658671, y[1] = 0.798671 +t = 378.0219, H(p,q)-H0 = 0.0000002044243321, L(p,q)-L0 = 0.0000000000003318, Q(p,q)-Q0 = inf +t = 379.0000, H(p,q)-H0 = 0.0000002049429178, L(p,q)-L0 = -0.0000000000000162, Q(p,q)-Q0 = inf +t = 380.0000, H(p,q)-H0 = 0.0000002049738838, L(p,q)-L0 = -0.0000000000000171, Q(p,q)-Q0 = inf +t = 381.0000, H(p,q)-H0 = 0.0000002049590409, L(p,q)-L0 = -0.0000000000000177, Q(p,q)-Q0 = inf +t = 382.0000, H(p,q)-H0 = 0.0000002047379524, L(p,q)-L0 = -0.0000000000000173, Q(p,q)-Q0 = inf +t = 383.0000, H(p,q)-H0 = 0.0000001595165064, L(p,q)-L0 = -0.0000000000000178, Q(p,q)-Q0 = inf +ROOT RETURN: t = 383.1604 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 383.1604, H(p,q)-H0 = 0.0000000609938942, L(p,q)-L0 = 0.0000000000279561, Q(p,q)-Q0 = inf +t = 384.0000, H(p,q)-H0 = 0.0000002027688805, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf +ROOT RETURN: t = 384.3051 g[0] = -1, y[0] = -0.658671, y[1] = 0.798671 +t = 384.3051, H(p,q)-H0 = 0.0000002044169287, L(p,q)-L0 = 0.0000000000003102, Q(p,q)-Q0 = inf +t = 385.0000, H(p,q)-H0 = 0.0000002049089137, L(p,q)-L0 = -0.0000000000000190, Q(p,q)-Q0 = inf +t = 386.0000, H(p,q)-H0 = 0.0000002049712746, L(p,q)-L0 = -0.0000000000000180, Q(p,q)-Q0 = inf +t = 387.0000, H(p,q)-H0 = 0.0000002049681721, L(p,q)-L0 = -0.0000000000000184, Q(p,q)-Q0 = inf +t = 388.0000, H(p,q)-H0 = 0.0000002048718055, L(p,q)-L0 = -0.0000000000000195, Q(p,q)-Q0 = inf +t = 389.0000, H(p,q)-H0 = 0.0000001991466010, L(p,q)-L0 = -0.0000000000000221, Q(p,q)-Q0 = inf +ROOT RETURN: t = 389.4436 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 389.4436, H(p,q)-H0 = 0.0000000593941551, L(p,q)-L0 = 0.0000000004607547, Q(p,q)-Q0 = inf +t = 390.0000, H(p,q)-H0 = 0.0000001922671196, L(p,q)-L0 = -0.0000000000000223, Q(p,q)-Q0 = inf +ROOT RETURN: t = 390.5883 g[0] = -1, y[0] = -0.658672, y[1] = 0.798672 +t = 390.5883, H(p,q)-H0 = 0.0000002044121997, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf +t = 391.0000, H(p,q)-H0 = 0.0000002048323380, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf +t = 392.0000, H(p,q)-H0 = 0.0000002049651432, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf +t = 393.0000, H(p,q)-H0 = 0.0000002049726853, L(p,q)-L0 = -0.0000000000000222, Q(p,q)-Q0 = inf +t = 394.0000, H(p,q)-H0 = 0.0000002049258560, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf +t = 395.0000, H(p,q)-H0 = 0.0000002037294383, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf +ROOT RETURN: t = 395.7268 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 395.7268, H(p,q)-H0 = 0.0000000646346592, L(p,q)-L0 = 0.0000000002030187, Q(p,q)-Q0 = inf +t = 396.0000, H(p,q)-H0 = 0.0000000964451048, L(p,q)-L0 = -0.0000000000000210, Q(p,q)-Q0 = inf +ROOT RETURN: t = 396.8715 g[0] = -1, y[0] = -0.658673, y[1] = 0.798673 +t = 396.8715, H(p,q)-H0 = 0.0000002044224715, L(p,q)-L0 = 0.0000000000002383, Q(p,q)-Q0 = inf +t = 397.0000, H(p,q)-H0 = 0.0000002046269864, L(p,q)-L0 = -0.0000000000000219, Q(p,q)-Q0 = inf +t = 398.0000, H(p,q)-H0 = 0.0000002049532364, L(p,q)-L0 = -0.0000000000000210, Q(p,q)-Q0 = inf +t = 399.0000, H(p,q)-H0 = 0.0000002049741514, L(p,q)-L0 = -0.0000000000000208, Q(p,q)-Q0 = inf +t = 400.0000, H(p,q)-H0 = 0.0000002049511520, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf +t = 401.0000, H(p,q)-H0 = 0.0000002045813517, L(p,q)-L0 = -0.0000000000000199, Q(p,q)-Q0 = inf +t = 402.0000, H(p,q)-H0 = 0.0000000690049708, L(p,q)-L0 = -0.0000000000000201, Q(p,q)-Q0 = inf +ROOT RETURN: t = 402.0099 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 402.0099, H(p,q)-H0 = 0.0000000608695789, L(p,q)-L0 = 0.0000000000002069, Q(p,q)-Q0 = inf +t = 403.0000, H(p,q)-H0 = 0.0000002039135453, L(p,q)-L0 = -0.0000000000000211, Q(p,q)-Q0 = inf +ROOT RETURN: t = 403.1547 g[0] = -1, y[0] = -0.658674, y[1] = 0.798674 +t = 403.1547, H(p,q)-H0 = 0.0000002044195616, L(p,q)-L0 = 0.0000000000003656, Q(p,q)-Q0 = inf +t = 404.0000, H(p,q)-H0 = 0.0000002049300435, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf +t = 405.0000, H(p,q)-H0 = 0.0000002049730176, L(p,q)-L0 = -0.0000000000000203, Q(p,q)-Q0 = inf +t = 406.0000, H(p,q)-H0 = 0.0000002049640583, L(p,q)-L0 = -0.0000000000000204, Q(p,q)-Q0 = inf +t = 407.0000, H(p,q)-H0 = 0.0000002048170465, L(p,q)-L0 = -0.0000000000000204, Q(p,q)-Q0 = inf +t = 408.0000, H(p,q)-H0 = 0.0000001885889234, L(p,q)-L0 = -0.0000000000000208, Q(p,q)-Q0 = inf +ROOT RETURN: t = 408.2931 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 +t = 408.2931, H(p,q)-H0 = 0.0000000590364697, L(p,q)-L0 = 0.0000000004619620, Q(p,q)-Q0 = inf +t = 409.0000, H(p,q)-H0 = 0.0000002002877644, L(p,q)-L0 = -0.0000000000000207, Q(p,q)-Q0 = inf +ROOT RETURN: t = 409.4379 g[0] = -1, y[0] = -0.658674, y[1] = 0.798674 +t = 409.4379, H(p,q)-H0 = 0.0000002044105160, L(p,q)-L0 = 0.0000000000000117, Q(p,q)-Q0 = inf +t = 410.0000, H(p,q)-H0 = 0.0000002048811595, L(p,q)-L0 = -0.0000000000000211, Q(p,q)-Q0 = inf +t = 411.0000, H(p,q)-H0 = 0.0000002049689338, L(p,q)-L0 = -0.0000000000000207, Q(p,q)-Q0 = inf +t = 412.0000, H(p,q)-H0 = 0.0000002049707349, L(p,q)-L0 = -0.0000000000000221, Q(p,q)-Q0 = inf +t = 413.0000, H(p,q)-H0 = 0.0000002049026068, L(p,q)-L0 = -0.0000000000000222, Q(p,q)-Q0 = inf +t = 414.0000, H(p,q)-H0 = 0.0000002023127402, L(p,q)-L0 = -0.0000000000000231, Q(p,q)-Q0 = inf +ROOT RETURN: t = 414.5763 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 414.5763, H(p,q)-H0 = 0.0000000642771920, L(p,q)-L0 = 0.0000000002369149, Q(p,q)-Q0 = inf +t = 415.0000, H(p,q)-H0 = 0.0000001704283707, L(p,q)-L0 = -0.0000000000000231, Q(p,q)-Q0 = inf +ROOT RETURN: t = 415.7211 g[0] = -1, y[0] = -0.658675, y[1] = 0.798675 +t = 415.7211, H(p,q)-H0 = 0.0000002044203883, L(p,q)-L0 = 0.0000000000001406, Q(p,q)-Q0 = inf +t = 416.0000, H(p,q)-H0 = 0.0000002047627068, L(p,q)-L0 = -0.0000000000000224, Q(p,q)-Q0 = inf +t = 417.0000, H(p,q)-H0 = 0.0000002049605110, L(p,q)-L0 = -0.0000000000000216, Q(p,q)-Q0 = inf +t = 418.0000, H(p,q)-H0 = 0.0000002049737086, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf +t = 419.0000, H(p,q)-H0 = 0.0000002049399215, L(p,q)-L0 = -0.0000000000000240, Q(p,q)-Q0 = inf +t = 420.0000, H(p,q)-H0 = 0.0000002042763687, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf +ROOT RETURN: t = 420.8595 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 420.8595, H(p,q)-H0 = 0.0000000610430280, L(p,q)-L0 = 0.0000000000138701, Q(p,q)-Q0 = inf +t = 421.0000, H(p,q)-H0 = 0.0000000041502268, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf +t = 422.0000, H(p,q)-H0 = 0.0000002044084960, L(p,q)-L0 = -0.0000000000000212, Q(p,q)-Q0 = inf +ROOT RETURN: t = 422.0043 g[0] = -1, y[0] = -0.658676, y[1] = 0.798676 +t = 422.0043, H(p,q)-H0 = 0.0000002044220221, L(p,q)-L0 = 0.0000000000004128, Q(p,q)-Q0 = inf +t = 423.0000, H(p,q)-H0 = 0.0000002049443271, L(p,q)-L0 = -0.0000000000000228, Q(p,q)-Q0 = inf +t = 424.0000, H(p,q)-H0 = 0.0000002049739491, L(p,q)-L0 = -0.0000000000000224, Q(p,q)-Q0 = inf +t = 425.0000, H(p,q)-H0 = 0.0000002049582449, L(p,q)-L0 = -0.0000000000000231, Q(p,q)-Q0 = inf +t = 426.0000, H(p,q)-H0 = 0.0000002047241099, L(p,q)-L0 = -0.0000000000000224, Q(p,q)-Q0 = inf +t = 427.0000, H(p,q)-H0 = 0.0000001527563975, L(p,q)-L0 = -0.0000000000000211, Q(p,q)-Q0 = inf +ROOT RETURN: t = 427.1427 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 427.1427, H(p,q)-H0 = 0.0000000589368900, L(p,q)-L0 = 0.0000000004413743, Q(p,q)-Q0 = inf +t = 428.0000, H(p,q)-H0 = 0.0000002029632324, L(p,q)-L0 = -0.0000000000000220, Q(p,q)-Q0 = inf +ROOT RETURN: t = 428.2875 g[0] = -1, y[0] = -0.658677, y[1] = 0.798677 +t = 428.2875, H(p,q)-H0 = 0.0000002044095015, L(p,q)-L0 = 0.0000000000000352, Q(p,q)-Q0 = inf +t = 429.0000, H(p,q)-H0 = 0.0000002049118702, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf +t = 430.0000, H(p,q)-H0 = 0.0000002049715269, L(p,q)-L0 = -0.0000000000000210, Q(p,q)-Q0 = inf +t = 431.0000, H(p,q)-H0 = 0.0000002049677619, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf +t = 432.0000, H(p,q)-H0 = 0.0000002048666779, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf +t = 433.0000, H(p,q)-H0 = 0.0000001984473550, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf +ROOT RETURN: t = 433.4259 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 433.4259, H(p,q)-H0 = 0.0000000636645177, L(p,q)-L0 = 0.0000000002742785, Q(p,q)-Q0 = inf +t = 434.0000, H(p,q)-H0 = 0.0000001937643357, L(p,q)-L0 = -0.0000000000000233, Q(p,q)-Q0 = inf +ROOT RETURN: t = 434.5707 g[0] = -1, y[0] = -0.658677, y[1] = 0.798677 +t = 434.5707, H(p,q)-H0 = 0.0000002044185564, L(p,q)-L0 = 0.0000000000000494, Q(p,q)-Q0 = inf +t = 435.0000, H(p,q)-H0 = 0.0000002048394011, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf +t = 436.0000, H(p,q)-H0 = 0.0000002049656668, L(p,q)-L0 = -0.0000000000000212, Q(p,q)-Q0 = inf +t = 437.0000, H(p,q)-H0 = 0.0000002049725072, L(p,q)-L0 = -0.0000000000000214, Q(p,q)-Q0 = inf +t = 438.0000, H(p,q)-H0 = 0.0000002049235960, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf +t = 439.0000, H(p,q)-H0 = 0.0000002036216028, L(p,q)-L0 = -0.0000000000000242, Q(p,q)-Q0 = inf +ROOT RETURN: t = 439.7091 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 439.7091, H(p,q)-H0 = 0.0000000617469929, L(p,q)-L0 = 0.0000000000400058, Q(p,q)-Q0 = inf +t = 440.0000, H(p,q)-H0 = 0.0000001091026891, L(p,q)-L0 = -0.0000000000000249, Q(p,q)-Q0 = inf +ROOT RETURN: t = 440.8539 g[0] = -1, y[0] = -0.658678, y[1] = 0.798678 +t = 440.8539, H(p,q)-H0 = 0.0000002044240650, L(p,q)-L0 = 0.0000000000004431, Q(p,q)-Q0 = inf +t = 441.0000, H(p,q)-H0 = 0.0000002046475669, L(p,q)-L0 = -0.0000000000000251, Q(p,q)-Q0 = inf +t = 442.0000, H(p,q)-H0 = 0.0000002049542267, L(p,q)-L0 = -0.0000000000000241, Q(p,q)-Q0 = inf +t = 443.0000, H(p,q)-H0 = 0.0000002049741364, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf +t = 444.0000, H(p,q)-H0 = 0.0000002049500319, L(p,q)-L0 = -0.0000000000000225, Q(p,q)-Q0 = inf +t = 445.0000, H(p,q)-H0 = 0.0000002045555053, L(p,q)-L0 = -0.0000000000000236, Q(p,q)-Q0 = inf +ROOT RETURN: t = 445.9923 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 445.9923, H(p,q)-H0 = 0.0000000590919167, L(p,q)-L0 = 0.0000000003964340, Q(p,q)-Q0 = inf +t = 446.0000, H(p,q)-H0 = 0.0000000546196970, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf +t = 447.0000, H(p,q)-H0 = 0.0000002039938343, L(p,q)-L0 = -0.0000000000000233, Q(p,q)-Q0 = inf +ROOT RETURN: t = 447.1370 g[0] = -1, y[0] = -0.658679, y[1] = 0.798679 +t = 447.1370, H(p,q)-H0 = 0.0000002044092972, L(p,q)-L0 = 0.0000000000000677, Q(p,q)-Q0 = inf +t = 448.0000, H(p,q)-H0 = 0.0000002049320150, L(p,q)-L0 = -0.0000000000000233, Q(p,q)-Q0 = inf +t = 449.0000, H(p,q)-H0 = 0.0000002049731661, L(p,q)-L0 = -0.0000000000000231, Q(p,q)-Q0 = inf +t = 450.0000, H(p,q)-H0 = 0.0000002049634732, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf +t = 451.0000, H(p,q)-H0 = 0.0000002048085815, L(p,q)-L0 = -0.0000000000000225, Q(p,q)-Q0 = inf +t = 452.0000, H(p,q)-H0 = 0.0000001862894685, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf +ROOT RETURN: t = 452.2755 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 452.2755, H(p,q)-H0 = 0.0000000628692318, L(p,q)-L0 = 0.0000000003146889, Q(p,q)-Q0 = inf +t = 453.0000, H(p,q)-H0 = 0.0000002007629903, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf +ROOT RETURN: t = 453.4202 g[0] = -1, y[0] = -0.65868, y[1] = 0.79868 +t = 453.4202, H(p,q)-H0 = 0.0000002044176431, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf +t = 454.0000, H(p,q)-H0 = 0.0000002048855108, L(p,q)-L0 = -0.0000000000000234, Q(p,q)-Q0 = inf +t = 455.0000, H(p,q)-H0 = 0.0000002049692897, L(p,q)-L0 = -0.0000000000000233, Q(p,q)-Q0 = inf +t = 456.0000, H(p,q)-H0 = 0.0000002049704385, L(p,q)-L0 = -0.0000000000000242, Q(p,q)-Q0 = inf +t = 457.0000, H(p,q)-H0 = 0.0000002048991696, L(p,q)-L0 = -0.0000000000000223, Q(p,q)-Q0 = inf +t = 458.0000, H(p,q)-H0 = 0.0000002020393404, L(p,q)-L0 = -0.0000000000000228, Q(p,q)-Q0 = inf +ROOT RETURN: t = 458.5586 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 458.5586, H(p,q)-H0 = 0.0000000626553203, L(p,q)-L0 = 0.0000000000705055, Q(p,q)-Q0 = inf +t = 459.0000, H(p,q)-H0 = 0.0000001748763359, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf +ROOT RETURN: t = 459.7034 g[0] = -1, y[0] = -0.658681, y[1] = 0.798681 +t = 459.7034, H(p,q)-H0 = 0.0000002044254995, L(p,q)-L0 = 0.0000000000004602, Q(p,q)-Q0 = inf +t = 460.0000, H(p,q)-H0 = 0.0000002047740164, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf +t = 461.0000, H(p,q)-H0 = 0.0000002049612067, L(p,q)-L0 = -0.0000000000000209, Q(p,q)-Q0 = inf +t = 462.0000, H(p,q)-H0 = 0.0000002049736028, L(p,q)-L0 = -0.0000000000000208, Q(p,q)-Q0 = inf +t = 463.0000, H(p,q)-H0 = 0.0000002049383057, L(p,q)-L0 = -0.0000000000000211, Q(p,q)-Q0 = inf +t = 464.0000, H(p,q)-H0 = 0.0000002042236770, L(p,q)-L0 = -0.0000000000000207, Q(p,q)-Q0 = inf +ROOT RETURN: t = 464.8418 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 464.8418, H(p,q)-H0 = 0.0000000594637291, L(p,q)-L0 = 0.0000000003274908, Q(p,q)-Q0 = inf +t = 465.0000, H(p,q)-H0 = 0.0000000112798064, L(p,q)-L0 = -0.0000000000000220, Q(p,q)-Q0 = inf +ROOT RETURN: t = 465.9866 g[0] = -1, y[0] = -0.658681, y[1] = 0.798681 +t = 465.9866, H(p,q)-H0 = 0.0000002044099220, L(p,q)-L0 = 0.0000000000001109, Q(p,q)-Q0 = inf +t = 466.0000, H(p,q)-H0 = 0.0000002044457960, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf +t = 467.0000, H(p,q)-H0 = 0.0000002049456716, L(p,q)-L0 = -0.0000000000000220, Q(p,q)-Q0 = inf +t = 468.0000, H(p,q)-H0 = 0.0000002049739987, L(p,q)-L0 = -0.0000000000000210, Q(p,q)-Q0 = inf +t = 469.0000, H(p,q)-H0 = 0.0000002049574120, L(p,q)-L0 = -0.0000000000000197, Q(p,q)-Q0 = inf +t = 470.0000, H(p,q)-H0 = 0.0000002047092674, L(p,q)-L0 = -0.0000000000000199, Q(p,q)-Q0 = inf +t = 471.0000, H(p,q)-H0 = 0.0000001450356866, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf +ROOT RETURN: t = 471.1250 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 471.1250, H(p,q)-H0 = 0.0000000619766440, L(p,q)-L0 = 0.0000000003564797, Q(p,q)-Q0 = inf +t = 472.0000, H(p,q)-H0 = 0.0000002031372175, L(p,q)-L0 = -0.0000000000000184, Q(p,q)-Q0 = inf +ROOT RETURN: t = 472.2698 g[0] = -1, y[0] = -0.658682, y[1] = 0.798682 +t = 472.2698, H(p,q)-H0 = 0.0000002044180308, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf +t = 473.0000, H(p,q)-H0 = 0.0000002049146776, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf +t = 474.0000, H(p,q)-H0 = 0.0000002049717569, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf +t = 475.0000, H(p,q)-H0 = 0.0000002049673254, L(p,q)-L0 = -0.0000000000000216, Q(p,q)-Q0 = inf +t = 476.0000, H(p,q)-H0 = 0.0000002048612460, L(p,q)-L0 = -0.0000000000000209, Q(p,q)-Q0 = inf +t = 477.0000, H(p,q)-H0 = 0.0000001976481795, L(p,q)-L0 = -0.0000000000000219, Q(p,q)-Q0 = inf +ROOT RETURN: t = 477.4082 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 +t = 477.4082, H(p,q)-H0 = 0.0000000635311066, L(p,q)-L0 = 0.0000000001012948, Q(p,q)-Q0 = inf +t = 478.0000, H(p,q)-H0 = 0.0000001950639985, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf +ROOT RETURN: t = 478.5530 g[0] = -1, y[0] = -0.658683, y[1] = 0.798683 +t = 478.5530, H(p,q)-H0 = 0.0000002044261806, L(p,q)-L0 = 0.0000000000004522, Q(p,q)-Q0 = inf +t = 479.0000, H(p,q)-H0 = 0.0000002048460433, L(p,q)-L0 = -0.0000000000000221, Q(p,q)-Q0 = inf +t = 480.0000, H(p,q)-H0 = 0.0000002049661542, L(p,q)-L0 = -0.0000000000000213, Q(p,q)-Q0 = inf +t = 481.0000, H(p,q)-H0 = 0.0000002049723031, L(p,q)-L0 = -0.0000000000000209, Q(p,q)-Q0 = inf +t = 482.0000, H(p,q)-H0 = 0.0000002049212155, L(p,q)-L0 = -0.0000000000000193, Q(p,q)-Q0 = inf +t = 483.0000, H(p,q)-H0 = 0.0000002035021286, L(p,q)-L0 = -0.0000000000000192, Q(p,q)-Q0 = inf +ROOT RETURN: t = 483.6914 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 483.6914, H(p,q)-H0 = 0.0000000599764485, L(p,q)-L0 = 0.0000000002391616, Q(p,q)-Q0 = inf +t = 484.0000, H(p,q)-H0 = 0.0000001207010087, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf +ROOT RETURN: t = 484.8362 g[0] = -1, y[0] = -0.658684, y[1] = 0.798684 +t = 484.8362, H(p,q)-H0 = 0.0000002044113280, L(p,q)-L0 = 0.0000000000001663, Q(p,q)-Q0 = inf +t = 485.0000, H(p,q)-H0 = 0.0000002046666733, L(p,q)-L0 = -0.0000000000000190, Q(p,q)-Q0 = inf +t = 486.0000, H(p,q)-H0 = 0.0000002049551729, L(p,q)-L0 = -0.0000000000000202, Q(p,q)-Q0 = inf +t = 487.0000, H(p,q)-H0 = 0.0000002049741070, L(p,q)-L0 = -0.0000000000000200, Q(p,q)-Q0 = inf +t = 488.0000, H(p,q)-H0 = 0.0000002049488583, L(p,q)-L0 = -0.0000000000000207, Q(p,q)-Q0 = inf +t = 489.0000, H(p,q)-H0 = 0.0000002045275332, L(p,q)-L0 = -0.0000000000000204, Q(p,q)-Q0 = inf +ROOT RETURN: t = 489.9746 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 489.9746, H(p,q)-H0 = 0.0000000610765312, L(p,q)-L0 = 0.0000000003966991, Q(p,q)-Q0 = inf +t = 490.0000, H(p,q)-H0 = 0.0000000405720648, L(p,q)-L0 = -0.0000000000000201, Q(p,q)-Q0 = inf +t = 491.0000, H(p,q)-H0 = 0.0000002040667898, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf +ROOT RETURN: t = 491.1194 g[0] = -1, y[0] = -0.658684, y[1] = 0.798684 +t = 491.1194, H(p,q)-H0 = 0.0000002044172050, L(p,q)-L0 = -0.0000000000000174, Q(p,q)-Q0 = inf +t = 492.0000, H(p,q)-H0 = 0.0000002049338971, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf +t = 493.0000, H(p,q)-H0 = 0.0000002049733009, L(p,q)-L0 = -0.0000000000000197, Q(p,q)-Q0 = inf +t = 494.0000, H(p,q)-H0 = 0.0000002049628611, L(p,q)-L0 = -0.0000000000000195, Q(p,q)-Q0 = inf +t = 495.0000, H(p,q)-H0 = 0.0000002047995677, L(p,q)-L0 = -0.0000000000000193, Q(p,q)-Q0 = inf +t = 496.0000, H(p,q)-H0 = 0.0000001836292873, L(p,q)-L0 = -0.0000000000000192, Q(p,q)-Q0 = inf +ROOT RETURN: t = 496.2578 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 496.2578, H(p,q)-H0 = 0.0000000642148157, L(p,q)-L0 = 0.0000000001311291, Q(p,q)-Q0 = inf +t = 497.0000, H(p,q)-H0 = 0.0000002011821281, L(p,q)-L0 = -0.0000000000000189, Q(p,q)-Q0 = inf +ROOT RETURN: t = 497.4026 g[0] = -1, y[0] = -0.658685, y[1] = 0.798685 +t = 497.4026, H(p,q)-H0 = 0.0000002044260460, L(p,q)-L0 = 0.0000000000004220, Q(p,q)-Q0 = inf +t = 498.0000, H(p,q)-H0 = 0.0000002048896410, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf +t = 499.0000, H(p,q)-H0 = 0.0000002049696360, L(p,q)-L0 = -0.0000000000000188, Q(p,q)-Q0 = inf +t = 500.0000, H(p,q)-H0 = 0.0000002049701333, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf +t = 501.0000, H(p,q)-H0 = 0.0000002048955550, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf +t = 502.0000, H(p,q)-H0 = 0.0000002017315639, L(p,q)-L0 = -0.0000000000000178, Q(p,q)-Q0 = inf +ROOT RETURN: t = 502.5410 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 502.5410, H(p,q)-H0 = 0.0000000605130261, L(p,q)-L0 = 0.0000000001419109, Q(p,q)-Q0 = inf +t = 503.0000, H(p,q)-H0 = 0.0000001787247448, L(p,q)-L0 = -0.0000000000000167, Q(p,q)-Q0 = inf +ROOT RETURN: t = 503.6858 g[0] = -1, y[0] = -0.658686, y[1] = 0.798686 +t = 503.6858, H(p,q)-H0 = 0.0000002044133574, L(p,q)-L0 = 0.0000000000002266, Q(p,q)-Q0 = inf +t = 504.0000, H(p,q)-H0 = 0.0000002047846222, L(p,q)-L0 = -0.0000000000000150, Q(p,q)-Q0 = inf +t = 505.0000, H(p,q)-H0 = 0.0000002049618872, L(p,q)-L0 = -0.0000000000000155, Q(p,q)-Q0 = inf +t = 506.0000, H(p,q)-H0 = 0.0000002049734990, L(p,q)-L0 = -0.0000000000000140, Q(p,q)-Q0 = inf +t = 507.0000, H(p,q)-H0 = 0.0000002049366312, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf +t = 508.0000, H(p,q)-H0 = 0.0000002041660218, L(p,q)-L0 = -0.0000000000000129, Q(p,q)-Q0 = inf +ROOT RETURN: t = 508.8242 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 508.8242, H(p,q)-H0 = 0.0000000602554537, L(p,q)-L0 = 0.0000000004312937, Q(p,q)-Q0 = inf +t = 509.0000, H(p,q)-H0 = 0.0000000212932962, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf +ROOT RETURN: t = 509.9690 g[0] = -1, y[0] = -0.658687, y[1] = 0.798687 +t = 509.9690, H(p,q)-H0 = 0.0000002044153787, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf +t = 510.0000, H(p,q)-H0 = 0.0000002044801354, L(p,q)-L0 = -0.0000000000000150, Q(p,q)-Q0 = inf +t = 511.0000, H(p,q)-H0 = 0.0000002049469784, L(p,q)-L0 = -0.0000000000000155, Q(p,q)-Q0 = inf +t = 512.0000, H(p,q)-H0 = 0.0000002049740561, L(p,q)-L0 = -0.0000000000000148, Q(p,q)-Q0 = inf +t = 513.0000, H(p,q)-H0 = 0.0000002049565601, L(p,q)-L0 = -0.0000000000000163, Q(p,q)-Q0 = inf +t = 514.0000, H(p,q)-H0 = 0.0000002046933604, L(p,q)-L0 = -0.0000000000000151, Q(p,q)-Q0 = inf +t = 515.0000, H(p,q)-H0 = 0.0000001362713660, L(p,q)-L0 = -0.0000000000000135, Q(p,q)-Q0 = inf +ROOT RETURN: t = 515.1074 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 515.1074, H(p,q)-H0 = 0.0000000646128797, L(p,q)-L0 = 0.0000000001605260, Q(p,q)-Q0 = inf +t = 516.0000, H(p,q)-H0 = 0.0000002032932722, L(p,q)-L0 = -0.0000000000000147, Q(p,q)-Q0 = inf +ROOT RETURN: t = 516.2521 g[0] = -1, y[0] = -0.658687, y[1] = 0.798687 +t = 516.2521, H(p,q)-H0 = 0.0000002044251016, L(p,q)-L0 = 0.0000000000003686, Q(p,q)-Q0 = inf +t = 517.0000, H(p,q)-H0 = 0.0000002049173617, L(p,q)-L0 = -0.0000000000000141, Q(p,q)-Q0 = inf +t = 518.0000, H(p,q)-H0 = 0.0000002049719885, L(p,q)-L0 = -0.0000000000000139, Q(p,q)-Q0 = inf +t = 519.0000, H(p,q)-H0 = 0.0000002049668832, L(p,q)-L0 = -0.0000000000000139, Q(p,q)-Q0 = inf +t = 520.0000, H(p,q)-H0 = 0.0000002048555080, L(p,q)-L0 = -0.0000000000000150, Q(p,q)-Q0 = inf +t = 521.0000, H(p,q)-H0 = 0.0000001967330823, L(p,q)-L0 = -0.0000000000000135, Q(p,q)-Q0 = inf +ROOT RETURN: t = 521.3905 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 521.3905, H(p,q)-H0 = 0.0000000609128965, L(p,q)-L0 = 0.0000000000538399, Q(p,q)-Q0 = inf +t = 522.0000, H(p,q)-H0 = 0.0000001961939631, L(p,q)-L0 = -0.0000000000000138, Q(p,q)-Q0 = inf +ROOT RETURN: t = 522.5353 g[0] = -1, y[0] = -0.658688, y[1] = 0.798688 +t = 522.5353, H(p,q)-H0 = 0.0000002044157992, L(p,q)-L0 = 0.0000000000002897, Q(p,q)-Q0 = inf +t = 523.0000, H(p,q)-H0 = 0.0000002048523252, L(p,q)-L0 = -0.0000000000000132, Q(p,q)-Q0 = inf +t = 524.0000, H(p,q)-H0 = 0.0000002049666393, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf +t = 525.0000, H(p,q)-H0 = 0.0000002049721043, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf +t = 526.0000, H(p,q)-H0 = 0.0000002049187332, L(p,q)-L0 = -0.0000000000000140, Q(p,q)-Q0 = inf +t = 527.0000, H(p,q)-H0 = 0.0000002033695515, L(p,q)-L0 = -0.0000000000000139, Q(p,q)-Q0 = inf +ROOT RETURN: t = 527.6737 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 527.6737, H(p,q)-H0 = 0.0000000595896104, L(p,q)-L0 = 0.0000000004553944, Q(p,q)-Q0 = inf +t = 528.0000, H(p,q)-H0 = 0.0000001311727855, L(p,q)-L0 = -0.0000000000000149, Q(p,q)-Q0 = inf +ROOT RETURN: t = 528.8185 g[0] = -1, y[0] = -0.658689, y[1] = 0.798689 +t = 528.8185, H(p,q)-H0 = 0.0000002044132445, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +t = 529.0000, H(p,q)-H0 = 0.0000002046844363, L(p,q)-L0 = -0.0000000000000164, Q(p,q)-Q0 = inf +t = 530.0000, H(p,q)-H0 = 0.0000002049560875, L(p,q)-L0 = -0.0000000000000160, Q(p,q)-Q0 = inf +t = 531.0000, H(p,q)-H0 = 0.0000002049740745, L(p,q)-L0 = -0.0000000000000160, Q(p,q)-Q0 = inf +t = 532.0000, H(p,q)-H0 = 0.0000002049476426, L(p,q)-L0 = -0.0000000000000164, Q(p,q)-Q0 = inf +t = 533.0000, H(p,q)-H0 = 0.0000002044972393, L(p,q)-L0 = -0.0000000000000157, Q(p,q)-Q0 = inf +ROOT RETURN: t = 533.9569 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 533.9569, H(p,q)-H0 = 0.0000000646867151, L(p,q)-L0 = 0.0000000001908389, Q(p,q)-Q0 = inf +t = 534.0000, H(p,q)-H0 = 0.0000000275402194, L(p,q)-L0 = -0.0000000000000138, Q(p,q)-Q0 = inf +t = 535.0000, H(p,q)-H0 = 0.0000002041331950, L(p,q)-L0 = -0.0000000000000147, Q(p,q)-Q0 = inf +ROOT RETURN: t = 535.1017 g[0] = -1, y[0] = -0.65869, y[1] = 0.79869 +t = 535.1017, H(p,q)-H0 = 0.0000002044234820, L(p,q)-L0 = 0.0000000000002882, Q(p,q)-Q0 = inf +t = 536.0000, H(p,q)-H0 = 0.0000002049357004, L(p,q)-L0 = -0.0000000000000154, Q(p,q)-Q0 = inf +t = 537.0000, H(p,q)-H0 = 0.0000002049734306, L(p,q)-L0 = -0.0000000000000151, Q(p,q)-Q0 = inf +t = 538.0000, H(p,q)-H0 = 0.0000002049622307, L(p,q)-L0 = -0.0000000000000131, Q(p,q)-Q0 = inf +t = 539.0000, H(p,q)-H0 = 0.0000002047899709, L(p,q)-L0 = -0.0000000000000118, Q(p,q)-Q0 = inf +t = 540.0000, H(p,q)-H0 = 0.0000001805507901, L(p,q)-L0 = -0.0000000000000129, Q(p,q)-Q0 = inf +ROOT RETURN: t = 540.2401 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 540.2401, H(p,q)-H0 = 0.0000000609703235, L(p,q)-L0 = 0.0000000000026714, Q(p,q)-Q0 = inf +t = 541.0000, H(p,q)-H0 = 0.0000002015525499, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf +ROOT RETURN: t = 541.3849 g[0] = -1, y[0] = -0.65869, y[1] = 0.79869 +t = 541.3849, H(p,q)-H0 = 0.0000002044184342, L(p,q)-L0 = 0.0000000000003493, Q(p,q)-Q0 = inf +t = 542.0000, H(p,q)-H0 = 0.0000002048935653, L(p,q)-L0 = -0.0000000000000111, Q(p,q)-Q0 = inf +t = 543.0000, H(p,q)-H0 = 0.0000002049699729, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf +t = 544.0000, H(p,q)-H0 = 0.0000002049698214, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf +t = 545.0000, H(p,q)-H0 = 0.0000002048917546, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf +t = 546.0000, H(p,q)-H0 = 0.0000002013843847, L(p,q)-L0 = -0.0000000000000100, Q(p,q)-Q0 = inf +ROOT RETURN: t = 546.5233 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 546.5233, H(p,q)-H0 = 0.0000000591383988, L(p,q)-L0 = 0.0000000004638913, Q(p,q)-Q0 = inf +t = 547.0000, H(p,q)-H0 = 0.0000001820513573, L(p,q)-L0 = -0.0000000000000102, Q(p,q)-Q0 = inf +ROOT RETURN: t = 547.6681 g[0] = -1, y[0] = -0.658691, y[1] = 0.798691 +t = 547.6681, H(p,q)-H0 = 0.0000002044113361, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf +t = 548.0000, H(p,q)-H0 = 0.0000002047945559, L(p,q)-L0 = -0.0000000000000110, Q(p,q)-Q0 = inf +t = 549.0000, H(p,q)-H0 = 0.0000002049625367, L(p,q)-L0 = -0.0000000000000108, Q(p,q)-Q0 = inf +t = 550.0000, H(p,q)-H0 = 0.0000002049733779, L(p,q)-L0 = -0.0000000000000122, Q(p,q)-Q0 = inf +t = 551.0000, H(p,q)-H0 = 0.0000002049348715, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf +t = 552.0000, H(p,q)-H0 = 0.0000002041028155, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf +ROOT RETURN: t = 552.8065 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 +t = 552.8065, H(p,q)-H0 = 0.0000000644422617, L(p,q)-L0 = 0.0000000002235332, Q(p,q)-Q0 = inf +t = 553.0000, H(p,q)-H0 = 0.0000000334816286, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf +ROOT RETURN: t = 553.9513 g[0] = -1, y[0] = -0.658692, y[1] = 0.798692 +t = 553.9513, H(p,q)-H0 = 0.0000002044214639, L(p,q)-L0 = 0.0000000000002001, Q(p,q)-Q0 = inf +t = 554.0000, H(p,q)-H0 = 0.0000002045117688, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf +t = 555.0000, H(p,q)-H0 = 0.0000002049482292, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +t = 556.0000, H(p,q)-H0 = 0.0000002049740997, L(p,q)-L0 = -0.0000000000000099, Q(p,q)-Q0 = inf +t = 557.0000, H(p,q)-H0 = 0.0000002049556715, L(p,q)-L0 = -0.0000000000000100, Q(p,q)-Q0 = inf +t = 558.0000, H(p,q)-H0 = 0.0000002046762713, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +t = 559.0000, H(p,q)-H0 = 0.0000001264007636, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf +ROOT RETURN: t = 559.0897 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 559.0897, H(p,q)-H0 = 0.0000000608870159, L(p,q)-L0 = 0.0000000000065596, Q(p,q)-Q0 = inf +t = 560.0000, H(p,q)-H0 = 0.0000002034335030, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf +ROOT RETURN: t = 560.2345 g[0] = -1, y[0] = -0.658693, y[1] = 0.798693 +t = 560.2345, H(p,q)-H0 = 0.0000002044210043, L(p,q)-L0 = 0.0000000000004056, Q(p,q)-Q0 = inf +t = 561.0000, H(p,q)-H0 = 0.0000002049199195, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf +t = 562.0000, H(p,q)-H0 = 0.0000002049722061, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf +t = 563.0000, H(p,q)-H0 = 0.0000002049664226, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf +t = 564.0000, H(p,q)-H0 = 0.0000002048494310, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf +t = 565.0000, H(p,q)-H0 = 0.0000001956833013, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +ROOT RETURN: t = 565.3729 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 565.3729, H(p,q)-H0 = 0.0000000589384175, L(p,q)-L0 = 0.0000000004520913, Q(p,q)-Q0 = inf +t = 566.0000, H(p,q)-H0 = 0.0000001971780329, L(p,q)-L0 = -0.0000000000000077, Q(p,q)-Q0 = inf +ROOT RETURN: t = 566.5177 g[0] = -1, y[0] = -0.658694, y[1] = 0.798694 +t = 566.5177, H(p,q)-H0 = 0.0000002044099797, L(p,q)-L0 = 0.0000000000000364, Q(p,q)-Q0 = inf +t = 567.0000, H(p,q)-H0 = 0.0000002048582463, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf +t = 568.0000, H(p,q)-H0 = 0.0000002049670993, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf +t = 569.0000, H(p,q)-H0 = 0.0000002049718867, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +t = 570.0000, H(p,q)-H0 = 0.0000002049161238, L(p,q)-L0 = -0.0000000000000079, Q(p,q)-Q0 = inf +t = 571.0000, H(p,q)-H0 = 0.0000002032221458, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf +ROOT RETURN: t = 571.6561 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 571.6561, H(p,q)-H0 = 0.0000000639199307, L(p,q)-L0 = 0.0000000002595532, Q(p,q)-Q0 = inf +t = 572.0000, H(p,q)-H0 = 0.0000001405183583, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf +ROOT RETURN: t = 572.8009 g[0] = -1, y[0] = -0.658694, y[1] = 0.798694 +t = 572.8009, H(p,q)-H0 = 0.0000002044194414, L(p,q)-L0 = 0.0000000000001057, Q(p,q)-Q0 = inf +t = 573.0000, H(p,q)-H0 = 0.0000002047009724, L(p,q)-L0 = -0.0000000000000071, Q(p,q)-Q0 = inf +t = 574.0000, H(p,q)-H0 = 0.0000002049569708, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf +t = 575.0000, H(p,q)-H0 = 0.0000002049740374, L(p,q)-L0 = -0.0000000000000077, Q(p,q)-Q0 = inf +t = 576.0000, H(p,q)-H0 = 0.0000002049463794, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf +t = 577.0000, H(p,q)-H0 = 0.0000002044643826, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf +ROOT RETURN: t = 577.9392 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 577.9392, H(p,q)-H0 = 0.0000000614311848, L(p,q)-L0 = 0.0000000000291374, Q(p,q)-Q0 = inf +t = 578.0000, H(p,q)-H0 = 0.0000000162782121, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf +t = 579.0000, H(p,q)-H0 = 0.0000002041937378, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf +ROOT RETURN: t = 579.0841 g[0] = -1, y[0] = -0.658695, y[1] = 0.798695 +t = 579.0841, H(p,q)-H0 = 0.0000002044232743, L(p,q)-L0 = 0.0000000000004483, Q(p,q)-Q0 = inf +t = 580.0000, H(p,q)-H0 = 0.0000002049374356, L(p,q)-L0 = -0.0000000000000058, Q(p,q)-Q0 = inf +t = 581.0000, H(p,q)-H0 = 0.0000002049735572, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf +t = 582.0000, H(p,q)-H0 = 0.0000002049615799, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf +t = 583.0000, H(p,q)-H0 = 0.0000002047797411, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf +t = 584.0000, H(p,q)-H0 = 0.0000001769885321, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf +ROOT RETURN: t = 584.2224 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 584.2224, H(p,q)-H0 = 0.0000000589982228, L(p,q)-L0 = 0.0000000004166476, Q(p,q)-Q0 = inf +t = 585.0000, H(p,q)-H0 = 0.0000002018805720, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf +ROOT RETURN: t = 585.3672 g[0] = -1, y[0] = -0.658696, y[1] = 0.798696 +t = 585.3672, H(p,q)-H0 = 0.0000002044093892, L(p,q)-L0 = 0.0000000000000673, Q(p,q)-Q0 = inf +t = 586.0000, H(p,q)-H0 = 0.0000002048972832, L(p,q)-L0 = -0.0000000000000067, Q(p,q)-Q0 = inf +t = 587.0000, H(p,q)-H0 = 0.0000002049702891, L(p,q)-L0 = -0.0000000000000059, Q(p,q)-Q0 = inf +t = 588.0000, H(p,q)-H0 = 0.0000002049694859, L(p,q)-L0 = -0.0000000000000051, Q(p,q)-Q0 = inf +t = 589.0000, H(p,q)-H0 = 0.0000002048877408, L(p,q)-L0 = -0.0000000000000064, Q(p,q)-Q0 = inf +t = 590.0000, H(p,q)-H0 = 0.0000002009919581, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf +ROOT RETURN: t = 590.5056 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 590.5056, H(p,q)-H0 = 0.0000000631851624, L(p,q)-L0 = 0.0000000002989198, Q(p,q)-Q0 = inf +t = 591.0000, H(p,q)-H0 = 0.0000001849259144, L(p,q)-L0 = -0.0000000000000079, Q(p,q)-Q0 = inf +ROOT RETURN: t = 591.6504 g[0] = -1, y[0] = -0.658697, y[1] = 0.798697 +t = 591.6504, H(p,q)-H0 = 0.0000002044180130, L(p,q)-L0 = 0.0000000000000282, Q(p,q)-Q0 = inf +t = 592.0000, H(p,q)-H0 = 0.0000002048038804, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf +t = 593.0000, H(p,q)-H0 = 0.0000002049631649, L(p,q)-L0 = -0.0000000000000050, Q(p,q)-Q0 = inf +t = 594.0000, H(p,q)-H0 = 0.0000002049732541, L(p,q)-L0 = -0.0000000000000031, Q(p,q)-Q0 = inf +t = 595.0000, H(p,q)-H0 = 0.0000002049330393, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf +t = 596.0000, H(p,q)-H0 = 0.0000002040334323, L(p,q)-L0 = -0.0000000000000040, Q(p,q)-Q0 = inf +ROOT RETURN: t = 596.7888 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 596.7888, H(p,q)-H0 = 0.0000000622937046, L(p,q)-L0 = 0.0000000000586402, Q(p,q)-Q0 = inf +t = 597.0000, H(p,q)-H0 = 0.0000000470808912, L(p,q)-L0 = -0.0000000000000039, Q(p,q)-Q0 = inf +ROOT RETURN: t = 597.9336 g[0] = -1, y[0] = -0.658697, y[1] = 0.798697 +t = 597.9336, H(p,q)-H0 = 0.0000002044250245, L(p,q)-L0 = 0.0000000000004745, Q(p,q)-Q0 = inf +t = 598.0000, H(p,q)-H0 = 0.0000002045409524, L(p,q)-L0 = -0.0000000000000043, Q(p,q)-Q0 = inf +t = 599.0000, H(p,q)-H0 = 0.0000002049494313, L(p,q)-L0 = -0.0000000000000053, Q(p,q)-Q0 = inf +t = 600.0000, H(p,q)-H0 = 0.0000002049741390, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf +t = 601.0000, H(p,q)-H0 = 0.0000002049547505, L(p,q)-L0 = -0.0000000000000046, Q(p,q)-Q0 = inf +t = 602.0000, H(p,q)-H0 = 0.0000002046578997, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf +t = 603.0000, H(p,q)-H0 = 0.0000001153968732, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf +ROOT RETURN: t = 603.0720 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 603.0720, H(p,q)-H0 = 0.0000000592936455, L(p,q)-L0 = 0.0000000003566358, Q(p,q)-Q0 = inf +t = 604.0000, H(p,q)-H0 = 0.0000002035597395, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf +ROOT RETURN: t = 604.2168 g[0] = -1, y[0] = -0.658698, y[1] = 0.798698 +t = 604.2168, H(p,q)-H0 = 0.0000002044096366, L(p,q)-L0 = 0.0000000000001055, Q(p,q)-Q0 = inf +t = 605.0000, H(p,q)-H0 = 0.0000002049223583, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf +t = 606.0000, H(p,q)-H0 = 0.0000002049724122, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf +t = 607.0000, H(p,q)-H0 = 0.0000002049659397, L(p,q)-L0 = -0.0000000000000064, Q(p,q)-Q0 = inf +t = 608.0000, H(p,q)-H0 = 0.0000002048429875, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf +t = 609.0000, H(p,q)-H0 = 0.0000001944769126, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf +ROOT RETURN: t = 609.3552 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 609.3552, H(p,q)-H0 = 0.0000000623193848, L(p,q)-L0 = 0.0000000003404608, Q(p,q)-Q0 = inf +t = 610.0000, H(p,q)-H0 = 0.0000001980365811, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf +ROOT RETURN: t = 610.5000 g[0] = -1, y[0] = -0.658699, y[1] = 0.798699 +t = 610.5000, H(p,q)-H0 = 0.0000002044179295, L(p,q)-L0 = -0.0000000000000071, Q(p,q)-Q0 = inf +t = 611.0000, H(p,q)-H0 = 0.0000002048638429, L(p,q)-L0 = -0.0000000000000058, Q(p,q)-Q0 = inf +t = 612.0000, H(p,q)-H0 = 0.0000002049675430, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf +t = 613.0000, H(p,q)-H0 = 0.0000002049716615, L(p,q)-L0 = -0.0000000000000046, Q(p,q)-Q0 = inf +t = 614.0000, H(p,q)-H0 = 0.0000002049133883, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +t = 615.0000, H(p,q)-H0 = 0.0000002030579643, L(p,q)-L0 = -0.0000000000000033, Q(p,q)-Q0 = inf +ROOT RETURN: t = 615.6384 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 615.6384, H(p,q)-H0 = 0.0000000632048238, L(p,q)-L0 = 0.0000000000895963, Q(p,q)-Q0 = inf +t = 616.0000, H(p,q)-H0 = 0.0000001487836494, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf +ROOT RETURN: t = 616.7832 g[0] = -1, y[0] = -0.6587, y[1] = 0.7987 +t = 616.7832, H(p,q)-H0 = 0.0000002044260720, L(p,q)-L0 = 0.0000000000004786, Q(p,q)-Q0 = inf +t = 617.0000, H(p,q)-H0 = 0.0000002047163740, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf +t = 618.0000, H(p,q)-H0 = 0.0000002049578210, L(p,q)-L0 = -0.0000000000000013, Q(p,q)-Q0 = inf +t = 619.0000, H(p,q)-H0 = 0.0000002049739905, L(p,q)-L0 = -0.0000000000000021, Q(p,q)-Q0 = inf +t = 620.0000, H(p,q)-H0 = 0.0000002049450619, L(p,q)-L0 = -0.0000000000000030, Q(p,q)-Q0 = inf +t = 621.0000, H(p,q)-H0 = 0.0000002044286982, L(p,q)-L0 = -0.0000000000000026, Q(p,q)-Q0 = inf +ROOT RETURN: t = 621.9216 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 +t = 621.9216, H(p,q)-H0 = 0.0000000597638055, L(p,q)-L0 = 0.0000000002748647, Q(p,q)-Q0 = inf +t = 622.0000, H(p,q)-H0 = 0.0000000075368993, L(p,q)-L0 = -0.0000000000000043, Q(p,q)-Q0 = inf +t = 623.0000, H(p,q)-H0 = 0.0000002042489998, L(p,q)-L0 = -0.0000000000000051, Q(p,q)-Q0 = inf +ROOT RETURN: t = 623.0664 g[0] = -1, y[0] = -0.6587, y[1] = 0.7987 +t = 623.0664, H(p,q)-H0 = 0.0000002044106915, L(p,q)-L0 = 0.0000000000001541, Q(p,q)-Q0 = inf +t = 624.0000, H(p,q)-H0 = 0.0000002049390829, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf +t = 625.0000, H(p,q)-H0 = 0.0000002049736637, L(p,q)-L0 = -0.0000000000000048, Q(p,q)-Q0 = inf +t = 626.0000, H(p,q)-H0 = 0.0000002049608939, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf +t = 627.0000, H(p,q)-H0 = 0.0000002047688139, L(p,q)-L0 = -0.0000000000000034, Q(p,q)-Q0 = inf +t = 628.0000, H(p,q)-H0 = 0.0000001728689620, L(p,q)-L0 = -0.0000000000000038, Q(p,q)-Q0 = inf +ROOT RETURN: t = 628.2048 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 628.2048, H(p,q)-H0 = 0.0000000614115896, L(p,q)-L0 = 0.0000000003817106, Q(p,q)-Q0 = inf +t = 629.0000, H(p,q)-H0 = 0.0000002021716354, L(p,q)-L0 = -0.0000000000000049, Q(p,q)-Q0 = inf +ROOT RETURN: t = 629.3496 g[0] = -1, y[0] = -0.658701, y[1] = 0.798701 +t = 629.3496, H(p,q)-H0 = 0.0000002044178704, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf +t = 630.0000, H(p,q)-H0 = 0.0000002049008113, L(p,q)-L0 = -0.0000000000000053, Q(p,q)-Q0 = inf +t = 631.0000, H(p,q)-H0 = 0.0000002049705867, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf +t = 632.0000, H(p,q)-H0 = 0.0000002049691304, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf +t = 633.0000, H(p,q)-H0 = 0.0000002048835037, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf +t = 634.0000, H(p,q)-H0 = 0.0000002005474875, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf +ROOT RETURN: t = 634.4879 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 634.4879, H(p,q)-H0 = 0.0000000639766822, L(p,q)-L0 = 0.0000000001198085, Q(p,q)-Q0 = inf +t = 635.0000, H(p,q)-H0 = 0.0000001874101185, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf +ROOT RETURN: t = 635.6328 g[0] = -1, y[0] = -0.658702, y[1] = 0.798702 +t = 635.6328, H(p,q)-H0 = 0.0000002044263138, L(p,q)-L0 = 0.0000000000004540, Q(p,q)-Q0 = inf +t = 636.0000, H(p,q)-H0 = 0.0000002048126228, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf +t = 637.0000, H(p,q)-H0 = 0.0000002049637536, L(p,q)-L0 = -0.0000000000000063, Q(p,q)-Q0 = inf +t = 638.0000, H(p,q)-H0 = 0.0000002049731011, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf +t = 639.0000, H(p,q)-H0 = 0.0000002049311046, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf +t = 640.0000, H(p,q)-H0 = 0.0000002039571302, L(p,q)-L0 = -0.0000000000000038, Q(p,q)-Q0 = inf +ROOT RETURN: t = 640.7711 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 640.7711, H(p,q)-H0 = 0.0000000603077710, L(p,q)-L0 = 0.0000000001793509, Q(p,q)-Q0 = inf +t = 641.0000, H(p,q)-H0 = 0.0000000613645634, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf +ROOT RETURN: t = 641.9160 g[0] = -1, y[0] = -0.658703, y[1] = 0.798703 +t = 641.9160, H(p,q)-H0 = 0.0000002044124374, L(p,q)-L0 = 0.0000000000002087, Q(p,q)-Q0 = inf +t = 642.0000, H(p,q)-H0 = 0.0000002045678865, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf +t = 643.0000, H(p,q)-H0 = 0.0000002049505652, L(p,q)-L0 = -0.0000000000000051, Q(p,q)-Q0 = inf +t = 644.0000, H(p,q)-H0 = 0.0000002049741472, L(p,q)-L0 = -0.0000000000000048, Q(p,q)-Q0 = inf +t = 645.0000, H(p,q)-H0 = 0.0000002049537697, L(p,q)-L0 = -0.0000000000000044, Q(p,q)-Q0 = inf +t = 646.0000, H(p,q)-H0 = 0.0000002046381053, L(p,q)-L0 = -0.0000000000000030, Q(p,q)-Q0 = inf +t = 647.0000, H(p,q)-H0 = 0.0000001032880839, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf +ROOT RETURN: t = 647.0543 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 647.0543, H(p,q)-H0 = 0.0000000605504351, L(p,q)-L0 = 0.0000000004190024, Q(p,q)-Q0 = inf +t = 648.0000, H(p,q)-H0 = 0.0000002036735738, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf +ROOT RETURN: t = 648.1992 g[0] = -1, y[0] = -0.658704, y[1] = 0.798704 +t = 648.1992, H(p,q)-H0 = 0.0000002044164115, L(p,q)-L0 = 0.0000000000000024, Q(p,q)-Q0 = inf +t = 649.0000, H(p,q)-H0 = 0.0000002049246778, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf +t = 650.0000, H(p,q)-H0 = 0.0000002049725999, L(p,q)-L0 = 0.0000000000000001, Q(p,q)-Q0 = inf +t = 651.0000, H(p,q)-H0 = 0.0000002049654323, L(p,q)-L0 = 0.0000000000000008, Q(p,q)-Q0 = inf +t = 652.0000, H(p,q)-H0 = 0.0000002048361477, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf +t = 653.0000, H(p,q)-H0 = 0.0000001930882794, L(p,q)-L0 = 0.0000000000000001, Q(p,q)-Q0 = inf +ROOT RETURN: t = 653.3375 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 653.3375, H(p,q)-H0 = 0.0000000644917213, L(p,q)-L0 = 0.0000000001492417, Q(p,q)-Q0 = inf +t = 654.0000, H(p,q)-H0 = 0.0000001987870161, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf +ROOT RETURN: t = 654.4823 g[0] = -1, y[0] = -0.658704, y[1] = 0.798704 +t = 654.4823, H(p,q)-H0 = 0.0000002044257358, L(p,q)-L0 = 0.0000000000004119, Q(p,q)-Q0 = inf +t = 655.0000, H(p,q)-H0 = 0.0000002048691213, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf +t = 656.0000, H(p,q)-H0 = 0.0000002049679589, L(p,q)-L0 = -0.0000000000000002, Q(p,q)-Q0 = inf +t = 657.0000, H(p,q)-H0 = 0.0000002049714126, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf +t = 658.0000, H(p,q)-H0 = 0.0000002049105056, L(p,q)-L0 = 0.0000000000000018, Q(p,q)-Q0 = inf +t = 659.0000, H(p,q)-H0 = 0.0000002028747380, L(p,q)-L0 = 0.0000000000000010, Q(p,q)-Q0 = inf +ROOT RETURN: t = 659.6207 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 659.6207, H(p,q)-H0 = 0.0000000607819457, L(p,q)-L0 = 0.0000000000850513, Q(p,q)-Q0 = inf +t = 660.0000, H(p,q)-H0 = 0.0000001560424945, L(p,q)-L0 = 0.0000000000000027, Q(p,q)-Q0 = inf +ROOT RETURN: t = 660.7655 g[0] = -1, y[0] = -0.658705, y[1] = 0.798705 +t = 660.7655, H(p,q)-H0 = 0.0000002044147167, L(p,q)-L0 = 0.0000000000002754, Q(p,q)-Q0 = inf +t = 661.0000, H(p,q)-H0 = 0.0000002047307256, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf +t = 662.0000, H(p,q)-H0 = 0.0000002049586245, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf +t = 663.0000, H(p,q)-H0 = 0.0000002049739213, L(p,q)-L0 = 0.0000000000000006, Q(p,q)-Q0 = inf +t = 664.0000, H(p,q)-H0 = 0.0000002049436753, L(p,q)-L0 = 0.0000000000000010, Q(p,q)-Q0 = inf +t = 665.0000, H(p,q)-H0 = 0.0000002043898775, L(p,q)-L0 = 0.0000000000000012, Q(p,q)-Q0 = inf +ROOT RETURN: t = 665.9039 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 665.9039, H(p,q)-H0 = 0.0000000598169319, L(p,q)-L0 = 0.0000000004477355, Q(p,q)-Q0 = inf +t = 666.0000, H(p,q)-H0 = 0.0000000019636004, L(p,q)-L0 = -0.0000000000000002, Q(p,q)-Q0 = inf +t = 667.0000, H(p,q)-H0 = 0.0000002042995267, L(p,q)-L0 = -0.0000000000000004, Q(p,q)-Q0 = inf +ROOT RETURN: t = 667.0487 g[0] = -1, y[0] = -0.658706, y[1] = 0.798706 +t = 667.0487, H(p,q)-H0 = 0.0000002044143491, L(p,q)-L0 = 0.0000000000000078, Q(p,q)-Q0 = inf +t = 668.0000, H(p,q)-H0 = 0.0000002049406607, L(p,q)-L0 = -0.0000000000000001, Q(p,q)-Q0 = inf +t = 669.0000, H(p,q)-H0 = 0.0000002049737594, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf +t = 670.0000, H(p,q)-H0 = 0.0000002049601794, L(p,q)-L0 = 0.0000000000000019, Q(p,q)-Q0 = inf +t = 671.0000, H(p,q)-H0 = 0.0000002047571394, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf +t = 672.0000, H(p,q)-H0 = 0.0000001681106891, L(p,q)-L0 = -0.0000000000000001, Q(p,q)-Q0 = inf +ROOT RETURN: t = 672.1871 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 672.1871, H(p,q)-H0 = 0.0000000646915175, L(p,q)-L0 = 0.0000000001790202, Q(p,q)-Q0 = inf +t = 673.0000, H(p,q)-H0 = 0.0000002024304293, L(p,q)-L0 = -0.0000000000000002, Q(p,q)-Q0 = inf +ROOT RETURN: t = 673.3319 g[0] = -1, y[0] = -0.658707, y[1] = 0.798707 +t = 673.3319, H(p,q)-H0 = 0.0000002044244131, L(p,q)-L0 = 0.0000000000003431, Q(p,q)-Q0 = inf +t = 674.0000, H(p,q)-H0 = 0.0000002049041669, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf +t = 675.0000, H(p,q)-H0 = 0.0000002049708746, L(p,q)-L0 = 0.0000000000000001, Q(p,q)-Q0 = inf +t = 676.0000, H(p,q)-H0 = 0.0000002049687662, L(p,q)-L0 = 0.0000000000000018, Q(p,q)-Q0 = inf +t = 677.0000, H(p,q)-H0 = 0.0000002048790400, L(p,q)-L0 = 0.0000000000000010, Q(p,q)-Q0 = inf +t = 678.0000, H(p,q)-H0 = 0.0000002000430586, L(p,q)-L0 = 0.0000000000000016, Q(p,q)-Q0 = inf +ROOT RETURN: t = 678.4703 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 678.4703, H(p,q)-H0 = 0.0000000609980682, L(p,q)-L0 = 0.0000000000157312, Q(p,q)-Q0 = inf +t = 679.0000, H(p,q)-H0 = 0.0000001895580650, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf +ROOT RETURN: t = 679.6151 g[0] = -1, y[0] = -0.658707, y[1] = 0.798707 +t = 679.6151, H(p,q)-H0 = 0.0000002044172895, L(p,q)-L0 = 0.0000000000003350, Q(p,q)-Q0 = inf +t = 680.0000, H(p,q)-H0 = 0.0000002048208472, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf +t = 681.0000, H(p,q)-H0 = 0.0000002049643328, L(p,q)-L0 = 0.0000000000000030, Q(p,q)-Q0 = inf +t = 682.0000, H(p,q)-H0 = 0.0000002049729514, L(p,q)-L0 = 0.0000000000000027, Q(p,q)-Q0 = inf +t = 683.0000, H(p,q)-H0 = 0.0000002049290941, L(p,q)-L0 = 0.0000000000000032, Q(p,q)-Q0 = inf +t = 684.0000, H(p,q)-H0 = 0.0000002038731097, L(p,q)-L0 = 0.0000000000000042, Q(p,q)-Q0 = inf +ROOT RETURN: t = 684.7535 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 684.7535, H(p,q)-H0 = 0.0000000592776419, L(p,q)-L0 = 0.0000000004628220, Q(p,q)-Q0 = inf +t = 685.0000, H(p,q)-H0 = 0.0000000757087750, L(p,q)-L0 = 0.0000000000000068, Q(p,q)-Q0 = inf +ROOT RETURN: t = 685.8983 g[0] = -1, y[0] = -0.658708, y[1] = 0.798708 +t = 685.8983, H(p,q)-H0 = 0.0000002044122857, L(p,q)-L0 = 0.0000000000000245, Q(p,q)-Q0 = inf +t = 686.0000, H(p,q)-H0 = 0.0000002045928184, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf +t = 687.0000, H(p,q)-H0 = 0.0000002049516757, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf +t = 688.0000, H(p,q)-H0 = 0.0000002049741699, L(p,q)-L0 = 0.0000000000000077, Q(p,q)-Q0 = inf +t = 689.0000, H(p,q)-H0 = 0.0000002049527718, L(p,q)-L0 = 0.0000000000000067, Q(p,q)-Q0 = inf +t = 690.0000, H(p,q)-H0 = 0.0000002046167980, L(p,q)-L0 = 0.0000000000000061, Q(p,q)-Q0 = inf +t = 691.0000, H(p,q)-H0 = 0.0000000901820258, L(p,q)-L0 = 0.0000000000000077, Q(p,q)-Q0 = inf +ROOT RETURN: t = 691.0367 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 691.0367, H(p,q)-H0 = 0.0000000645661324, L(p,q)-L0 = 0.0000000002106544, Q(p,q)-Q0 = inf +t = 692.0000, H(p,q)-H0 = 0.0000002037764217, L(p,q)-L0 = 0.0000000000000064, Q(p,q)-Q0 = inf +ROOT RETURN: t = 692.1815 g[0] = -1, y[0] = -0.658709, y[1] = 0.798709 +t = 692.1815, H(p,q)-H0 = 0.0000002044225405, L(p,q)-L0 = 0.0000000000002595, Q(p,q)-Q0 = inf +t = 693.0000, H(p,q)-H0 = 0.0000002049268982, L(p,q)-L0 = 0.0000000000000053, Q(p,q)-Q0 = inf +t = 694.0000, H(p,q)-H0 = 0.0000002049727836, L(p,q)-L0 = 0.0000000000000061, Q(p,q)-Q0 = inf +t = 695.0000, H(p,q)-H0 = 0.0000002049649106, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf +t = 696.0000, H(p,q)-H0 = 0.0000002048288942, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf +t = 697.0000, H(p,q)-H0 = 0.0000001914875067, L(p,q)-L0 = 0.0000000000000073, Q(p,q)-Q0 = inf +ROOT RETURN: t = 697.3198 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 +t = 697.3198, H(p,q)-H0 = 0.0000000608303887, L(p,q)-L0 = 0.0000000000016873, Q(p,q)-Q0 = inf +t = 698.0000, H(p,q)-H0 = 0.0000001994442443, L(p,q)-L0 = 0.0000000000000082, Q(p,q)-Q0 = inf +ROOT RETURN: t = 698.4647 g[0] = -1, y[0] = -0.65871, y[1] = 0.79871 +t = 698.4647, H(p,q)-H0 = 0.0000002044199270, L(p,q)-L0 = 0.0000000000003977, Q(p,q)-Q0 = inf +t = 699.0000, H(p,q)-H0 = 0.0000002048741288, L(p,q)-L0 = 0.0000000000000078, Q(p,q)-Q0 = inf +t = 700.0000, H(p,q)-H0 = 0.0000002049683710, L(p,q)-L0 = 0.0000000000000081, Q(p,q)-Q0 = inf +t = 701.0000, H(p,q)-H0 = 0.0000002049711649, L(p,q)-L0 = 0.0000000000000093, Q(p,q)-Q0 = inf +t = 702.0000, H(p,q)-H0 = 0.0000002049074895, L(p,q)-L0 = 0.0000000000000098, Q(p,q)-Q0 = inf +t = 703.0000, H(p,q)-H0 = 0.0000002026699014, L(p,q)-L0 = 0.0000000000000112, Q(p,q)-Q0 = inf +ROOT RETURN: t = 703.6030 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 703.6030, H(p,q)-H0 = 0.0000000589785794, L(p,q)-L0 = 0.0000000004593076, Q(p,q)-Q0 = inf +t = 704.0000, H(p,q)-H0 = 0.0000001623834691, L(p,q)-L0 = 0.0000000000000123, Q(p,q)-Q0 = inf +ROOT RETURN: t = 704.7479 g[0] = -1, y[0] = -0.65871, y[1] = 0.79871 +t = 704.7479, H(p,q)-H0 = 0.0000002044106397, L(p,q)-L0 = 0.0000000000000474, Q(p,q)-Q0 = inf +t = 705.0000, H(p,q)-H0 = 0.0000002047441359, L(p,q)-L0 = 0.0000000000000124, Q(p,q)-Q0 = inf +t = 706.0000, H(p,q)-H0 = 0.0000002049594127, L(p,q)-L0 = 0.0000000000000131, Q(p,q)-Q0 = inf +t = 707.0000, H(p,q)-H0 = 0.0000002049738596, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf +t = 708.0000, H(p,q)-H0 = 0.0000002049422434, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf +t = 709.0000, H(p,q)-H0 = 0.0000002043476170, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf +ROOT RETURN: t = 709.8862 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 709.8862, H(p,q)-H0 = 0.0000000641438931, L(p,q)-L0 = 0.0000000002453422, Q(p,q)-Q0 = inf +t = 710.0000, H(p,q)-H0 = 0.0000000000008149, L(p,q)-L0 = 0.0000000000000153, Q(p,q)-Q0 = inf +t = 711.0000, H(p,q)-H0 = 0.0000002043458088, L(p,q)-L0 = 0.0000000000000171, Q(p,q)-Q0 = inf +ROOT RETURN: t = 711.0311 g[0] = -1, y[0] = -0.658711, y[1] = 0.798711 +t = 711.0311, H(p,q)-H0 = 0.0000002044204692, L(p,q)-L0 = 0.0000000000001736, Q(p,q)-Q0 = inf +t = 712.0000, H(p,q)-H0 = 0.0000002049421899, L(p,q)-L0 = 0.0000000000000181, Q(p,q)-Q0 = inf +t = 713.0000, H(p,q)-H0 = 0.0000002049738632, L(p,q)-L0 = 0.0000000000000181, Q(p,q)-Q0 = inf +t = 714.0000, H(p,q)-H0 = 0.0000002049594525, L(p,q)-L0 = 0.0000000000000185, Q(p,q)-Q0 = inf +t = 715.0000, H(p,q)-H0 = 0.0000002047446747, L(p,q)-L0 = 0.0000000000000181, Q(p,q)-Q0 = inf +t = 716.0000, H(p,q)-H0 = 0.0000001626254460, L(p,q)-L0 = 0.0000000000000162, Q(p,q)-Q0 = inf +ROOT RETURN: t = 716.1694 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 716.1694, H(p,q)-H0 = 0.0000000611613047, L(p,q)-L0 = 0.0000000000192453, Q(p,q)-Q0 = inf +t = 717.0000, H(p,q)-H0 = 0.0000002026610000, L(p,q)-L0 = 0.0000000000000169, Q(p,q)-Q0 = inf +ROOT RETURN: t = 717.3143 g[0] = -1, y[0] = -0.658712, y[1] = 0.798712 +t = 717.3143, H(p,q)-H0 = 0.0000002044223758, L(p,q)-L0 = 0.0000000000004543, Q(p,q)-Q0 = inf +t = 718.0000, H(p,q)-H0 = 0.0000002049073725, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf +t = 719.0000, H(p,q)-H0 = 0.0000002049711648, L(p,q)-L0 = 0.0000000000000174, Q(p,q)-Q0 = inf +t = 720.0000, H(p,q)-H0 = 0.0000002049684001, L(p,q)-L0 = 0.0000000000000190, Q(p,q)-Q0 = inf +t = 721.0000, H(p,q)-H0 = 0.0000002048743409, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf +t = 722.0000, H(p,q)-H0 = 0.0000001994694276, L(p,q)-L0 = 0.0000000000000195, Q(p,q)-Q0 = inf +ROOT RETURN: t = 722.4526 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 722.4526, H(p,q)-H0 = 0.0000000589396452, L(p,q)-L0 = 0.0000000004332104, Q(p,q)-Q0 = inf +t = 723.0000, H(p,q)-H0 = 0.0000001914168128, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf +ROOT RETURN: t = 723.5974 g[0] = -1, y[0] = -0.658713, y[1] = 0.798713 +t = 723.5974, H(p,q)-H0 = 0.0000002044096870, L(p,q)-L0 = 0.0000000000000802, Q(p,q)-Q0 = inf +t = 724.0000, H(p,q)-H0 = 0.0000002048286055, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf +t = 725.0000, H(p,q)-H0 = 0.0000002049649063, L(p,q)-L0 = 0.0000000000000188, Q(p,q)-Q0 = inf +t = 726.0000, H(p,q)-H0 = 0.0000002049728088, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf +t = 727.0000, H(p,q)-H0 = 0.0000002049270061, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf +t = 728.0000, H(p,q)-H0 = 0.0000002037804447, L(p,q)-L0 = 0.0000000000000192, Q(p,q)-Q0 = inf +ROOT RETURN: t = 728.7358 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 728.7358, H(p,q)-H0 = 0.0000000634817319, L(p,q)-L0 = 0.0000000002834988, Q(p,q)-Q0 = inf +t = 729.0000, H(p,q)-H0 = 0.0000000896255727, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf +ROOT RETURN: t = 729.8806 g[0] = -1, y[0] = -0.658713, y[1] = 0.798713 +t = 729.8806, H(p,q)-H0 = 0.0000002044186851, L(p,q)-L0 = 0.0000000000000877, Q(p,q)-Q0 = inf +t = 730.0000, H(p,q)-H0 = 0.0000002046159090, L(p,q)-L0 = 0.0000000000000204, Q(p,q)-Q0 = inf +t = 731.0000, H(p,q)-H0 = 0.0000002049527499, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf +t = 732.0000, H(p,q)-H0 = 0.0000002049741893, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf +t = 733.0000, H(p,q)-H0 = 0.0000002049517395, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf +t = 734.0000, H(p,q)-H0 = 0.0000002045938207, L(p,q)-L0 = 0.0000000000000199, Q(p,q)-Q0 = inf +t = 735.0000, H(p,q)-H0 = 0.0000000762911401, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf +ROOT RETURN: t = 735.0190 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 735.0190, H(p,q)-H0 = 0.0000000619383926, L(p,q)-L0 = 0.0000000000469587, Q(p,q)-Q0 = inf +t = 736.0000, H(p,q)-H0 = 0.0000002038695082, L(p,q)-L0 = 0.0000000000000207, Q(p,q)-Q0 = inf +ROOT RETURN: t = 736.1638 g[0] = -1, y[0] = -0.658714, y[1] = 0.798714 +t = 736.1638, H(p,q)-H0 = 0.0000002044243973, L(p,q)-L0 = 0.0000000000004903, Q(p,q)-Q0 = inf +t = 737.0000, H(p,q)-H0 = 0.0000002049290345, L(p,q)-L0 = 0.0000000000000210, Q(p,q)-Q0 = inf +t = 738.0000, H(p,q)-H0 = 0.0000002049729718, L(p,q)-L0 = 0.0000000000000226, Q(p,q)-Q0 = inf +t = 739.0000, H(p,q)-H0 = 0.0000002049643816, L(p,q)-L0 = 0.0000000000000221, Q(p,q)-Q0 = inf +t = 740.0000, H(p,q)-H0 = 0.0000002048212012, L(p,q)-L0 = 0.0000000000000209, Q(p,q)-Q0 = inf +t = 741.0000, H(p,q)-H0 = 0.0000001896397623, L(p,q)-L0 = 0.0000000000000214, Q(p,q)-Q0 = inf +ROOT RETURN: t = 741.3022 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 741.3022, H(p,q)-H0 = 0.0000000591497438, L(p,q)-L0 = 0.0000000003825334, Q(p,q)-Q0 = inf +t = 742.0000, H(p,q)-H0 = 0.0000002000209774, L(p,q)-L0 = 0.0000000000000231, Q(p,q)-Q0 = inf +ROOT RETURN: t = 742.4470 g[0] = -1, y[0] = -0.658715, y[1] = 0.798715 +t = 742.4470, H(p,q)-H0 = 0.0000002044095430, L(p,q)-L0 = 0.0000000000001170, Q(p,q)-Q0 = inf +t = 743.0000, H(p,q)-H0 = 0.0000002048788817, L(p,q)-L0 = 0.0000000000000236, Q(p,q)-Q0 = inf +t = 744.0000, H(p,q)-H0 = 0.0000002049687813, L(p,q)-L0 = 0.0000000000000248, Q(p,q)-Q0 = inf +t = 745.0000, H(p,q)-H0 = 0.0000002049709182, L(p,q)-L0 = 0.0000000000000255, Q(p,q)-Q0 = inf +t = 746.0000, H(p,q)-H0 = 0.0000002049043324, L(p,q)-L0 = 0.0000000000000252, Q(p,q)-Q0 = inf +t = 747.0000, H(p,q)-H0 = 0.0000002024404512, L(p,q)-L0 = 0.0000000000000233, Q(p,q)-Q0 = inf +ROOT RETURN: t = 747.5854 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 747.5854, H(p,q)-H0 = 0.0000000626559493, L(p,q)-L0 = 0.0000000003244277, Q(p,q)-Q0 = inf +t = 748.0000, H(p,q)-H0 = 0.0000001679005459, L(p,q)-L0 = 0.0000000000000229, Q(p,q)-Q0 = inf +ROOT RETURN: t = 748.7302 g[0] = -1, y[0] = -0.658716, y[1] = 0.798716 +t = 748.7302, H(p,q)-H0 = 0.0000002044178616, L(p,q)-L0 = 0.0000000000000294, Q(p,q)-Q0 = inf +t = 749.0000, H(p,q)-H0 = 0.0000002047566684, L(p,q)-L0 = 0.0000000000000213, Q(p,q)-Q0 = inf +t = 750.0000, H(p,q)-H0 = 0.0000002049601727, L(p,q)-L0 = 0.0000000000000204, Q(p,q)-Q0 = inf +t = 751.0000, H(p,q)-H0 = 0.0000002049737878, L(p,q)-L0 = 0.0000000000000205, Q(p,q)-Q0 = inf +t = 752.0000, H(p,q)-H0 = 0.0000002049407492, L(p,q)-L0 = 0.0000000000000207, Q(p,q)-Q0 = inf +t = 753.0000, H(p,q)-H0 = 0.0000002043015297, L(p,q)-L0 = 0.0000000000000192, Q(p,q)-Q0 = inf +ROOT RETURN: t = 753.8685 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 753.8685, H(p,q)-H0 = 0.0000000628572869, L(p,q)-L0 = 0.0000000000777687, Q(p,q)-Q0 = inf +t = 754.0000, H(p,q)-H0 = 0.0000000018099149, L(p,q)-L0 = 0.0000000000000182, Q(p,q)-Q0 = inf +t = 755.0000, H(p,q)-H0 = 0.0000002043882371, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf +ROOT RETURN: t = 755.0134 g[0] = -1, y[0] = -0.658717, y[1] = 0.798717 +t = 755.0134, H(p,q)-H0 = 0.0000002044257884, L(p,q)-L0 = 0.0000000000005013, Q(p,q)-Q0 = inf +t = 756.0000, H(p,q)-H0 = 0.0000002049436428, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf +t = 757.0000, H(p,q)-H0 = 0.0000002049739459, L(p,q)-L0 = 0.0000000000000208, Q(p,q)-Q0 = inf +t = 758.0000, H(p,q)-H0 = 0.0000002049586841, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf +t = 759.0000, H(p,q)-H0 = 0.0000002047313204, L(p,q)-L0 = 0.0000000000000197, Q(p,q)-Q0 = inf +t = 760.0000, H(p,q)-H0 = 0.0000001563201595, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf +ROOT RETURN: t = 760.1517 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 760.1517, H(p,q)-H0 = 0.0000000595625027, L(p,q)-L0 = 0.0000000003084791, Q(p,q)-Q0 = inf +t = 761.0000, H(p,q)-H0 = 0.0000002028668047, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf +ROOT RETURN: t = 761.2966 g[0] = -1, y[0] = -0.658717, y[1] = 0.798717 +t = 761.2966, H(p,q)-H0 = 0.0000002044102232, L(p,q)-L0 = 0.0000000000001554, Q(p,q)-Q0 = inf +t = 762.0000, H(p,q)-H0 = 0.0000002049104124, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf +t = 763.0000, H(p,q)-H0 = 0.0000002049714317, L(p,q)-L0 = 0.0000000000000193, Q(p,q)-Q0 = inf +t = 764.0000, H(p,q)-H0 = 0.0000002049680061, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf +t = 765.0000, H(p,q)-H0 = 0.0000002048693648, L(p,q)-L0 = 0.0000000000000210, Q(p,q)-Q0 = inf +t = 766.0000, H(p,q)-H0 = 0.0000001988157592, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf +ROOT RETURN: t = 766.4349 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 +t = 766.4349, H(p,q)-H0 = 0.0000000617536058, L(p,q)-L0 = 0.0000000003661546, Q(p,q)-Q0 = inf +t = 767.0000, H(p,q)-H0 = 0.0000001930270090, L(p,q)-L0 = 0.0000000000000192, Q(p,q)-Q0 = inf +ROOT RETURN: t = 767.5798 g[0] = -1, y[0] = -0.658718, y[1] = 0.798718 +t = 767.5798, H(p,q)-H0 = 0.0000002044182482, L(p,q)-L0 = 0.0000000000000188, Q(p,q)-Q0 = inf +t = 768.0000, H(p,q)-H0 = 0.0000002048358831, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf +t = 769.0000, H(p,q)-H0 = 0.0000002049654358, L(p,q)-L0 = 0.0000000000000185, Q(p,q)-Q0 = inf +t = 770.0000, H(p,q)-H0 = 0.0000002049726328, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf +t = 771.0000, H(p,q)-H0 = 0.0000002049247968, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf +t = 772.0000, H(p,q)-H0 = 0.0000002036780286, L(p,q)-L0 = 0.0000000000000197, Q(p,q)-Q0 = inf +ROOT RETURN: t = 772.7181 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 772.7181, H(p,q)-H0 = 0.0000000637000992, L(p,q)-L0 = 0.0000000001083683, Q(p,q)-Q0 = inf +t = 773.0000, H(p,q)-H0 = 0.0000001027688317, L(p,q)-L0 = 0.0000000000000181, Q(p,q)-Q0 = inf +ROOT RETURN: t = 773.8630 g[0] = -1, y[0] = -0.658719, y[1] = 0.798719 +t = 773.8630, H(p,q)-H0 = 0.0000002044264167, L(p,q)-L0 = 0.0000000000004904, Q(p,q)-Q0 = inf +t = 774.0000, H(p,q)-H0 = 0.0000002046372859, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf +t = 775.0000, H(p,q)-H0 = 0.0000002049537534, L(p,q)-L0 = 0.0000000000000169, Q(p,q)-Q0 = inf +t = 776.0000, H(p,q)-H0 = 0.0000002049741713, L(p,q)-L0 = 0.0000000000000161, Q(p,q)-Q0 = inf +t = 777.0000, H(p,q)-H0 = 0.0000002049506336, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf +t = 778.0000, H(p,q)-H0 = 0.0000002045689708, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf +t = 779.0000, H(p,q)-H0 = 0.0000000619558527, L(p,q)-L0 = 0.0000000000000161, Q(p,q)-Q0 = inf +ROOT RETURN: t = 779.0013 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 779.0013, H(p,q)-H0 = 0.0000000600927310, L(p,q)-L0 = 0.0000000002168873, Q(p,q)-Q0 = inf +t = 780.0000, H(p,q)-H0 = 0.0000002039538617, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf +ROOT RETURN: t = 780.1462 g[0] = -1, y[0] = -0.65872, y[1] = 0.79872 +t = 780.1462, H(p,q)-H0 = 0.0000002044116608, L(p,q)-L0 = 0.0000000000002059, Q(p,q)-Q0 = inf +t = 781.0000, H(p,q)-H0 = 0.0000002049310475, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf +t = 782.0000, H(p,q)-H0 = 0.0000002049731183, L(p,q)-L0 = 0.0000000000000174, Q(p,q)-Q0 = inf +t = 783.0000, H(p,q)-H0 = 0.0000002049638017, L(p,q)-L0 = 0.0000000000000179, Q(p,q)-Q0 = inf +t = 784.0000, H(p,q)-H0 = 0.0000002048129933, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf +t = 785.0000, H(p,q)-H0 = 0.0000001875045583, L(p,q)-L0 = 0.0000000000000169, Q(p,q)-Q0 = inf +ROOT RETURN: t = 785.2845 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 785.2845, H(p,q)-H0 = 0.0000000608643962, L(p,q)-L0 = 0.0000000004054622, Q(p,q)-Q0 = inf +t = 786.0000, H(p,q)-H0 = 0.0000002005280486, L(p,q)-L0 = 0.0000000000000162, Q(p,q)-Q0 = inf +ROOT RETURN: t = 786.4294 g[0] = -1, y[0] = -0.65872, y[1] = 0.79872 +t = 786.4294, H(p,q)-H0 = 0.0000002044173282, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf +t = 787.0000, H(p,q)-H0 = 0.0000002048833483, L(p,q)-L0 = 0.0000000000000164, Q(p,q)-Q0 = inf +t = 788.0000, H(p,q)-H0 = 0.0000002049691392, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf +t = 789.0000, H(p,q)-H0 = 0.0000002049706220, L(p,q)-L0 = 0.0000000000000188, Q(p,q)-Q0 = inf +t = 790.0000, H(p,q)-H0 = 0.0000002049009758, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf +t = 791.0000, H(p,q)-H0 = 0.0000002021828842, L(p,q)-L0 = 0.0000000000000183, Q(p,q)-Q0 = inf +ROOT RETURN: t = 791.5677 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 791.5677, H(p,q)-H0 = 0.0000000643236246, L(p,q)-L0 = 0.0000000001380124, Q(p,q)-Q0 = inf +t = 792.0000, H(p,q)-H0 = 0.0000001726868679, L(p,q)-L0 = 0.0000000000000195, Q(p,q)-Q0 = inf +ROOT RETURN: t = 792.7125 g[0] = -1, y[0] = -0.658721, y[1] = 0.798721 +t = 792.7125, H(p,q)-H0 = 0.0000002044262272, L(p,q)-L0 = 0.0000000000004582, Q(p,q)-Q0 = inf +t = 793.0000, H(p,q)-H0 = 0.0000002047683716, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf +t = 794.0000, H(p,q)-H0 = 0.0000002049608866, L(p,q)-L0 = 0.0000000000000202, Q(p,q)-Q0 = inf +t = 795.0000, H(p,q)-H0 = 0.0000002049736905, L(p,q)-L0 = 0.0000000000000205, Q(p,q)-Q0 = inf +t = 796.0000, H(p,q)-H0 = 0.0000002049391727, L(p,q)-L0 = 0.0000000000000209, Q(p,q)-Q0 = inf +t = 797.0000, H(p,q)-H0 = 0.0000002042511867, L(p,q)-L0 = 0.0000000000000213, Q(p,q)-Q0 = inf +ROOT RETURN: t = 797.8509 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 797.8509, H(p,q)-H0 = 0.0000000606134791, L(p,q)-L0 = 0.0000000001198346, Q(p,q)-Q0 = inf +t = 798.0000, H(p,q)-H0 = 0.0000000072420379, L(p,q)-L0 = 0.0000000000000210, Q(p,q)-Q0 = inf +ROOT RETURN: t = 798.9957 g[0] = -1, y[0] = -0.658722, y[1] = 0.798722 +t = 798.9957, H(p,q)-H0 = 0.0000002044137175, L(p,q)-L0 = 0.0000000000002657, Q(p,q)-Q0 = inf +t = 799.0000, H(p,q)-H0 = 0.0000002044271864, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf +t = 800.0000, H(p,q)-H0 = 0.0000002049450246, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf +t = 801.0000, H(p,q)-H0 = 0.0000002049740057, L(p,q)-L0 = 0.0000000000000195, Q(p,q)-Q0 = inf +t = 802.0000, H(p,q)-H0 = 0.0000002049578719, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf +t = 803.0000, H(p,q)-H0 = 0.0000002047170005, L(p,q)-L0 = 0.0000000000000190, Q(p,q)-Q0 = inf +t = 804.0000, H(p,q)-H0 = 0.0000001491007817, L(p,q)-L0 = 0.0000000000000172, Q(p,q)-Q0 = inf +ROOT RETURN: t = 804.1341 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 804.1341, H(p,q)-H0 = 0.0000000600730945, L(p,q)-L0 = 0.0000000004380675, Q(p,q)-Q0 = inf +t = 805.0000, H(p,q)-H0 = 0.0000002030508510, L(p,q)-L0 = 0.0000000000000167, Q(p,q)-Q0 = inf +ROOT RETURN: t = 805.2789 g[0] = -1, y[0] = -0.658723, y[1] = 0.798723 +t = 805.2789, H(p,q)-H0 = 0.0000002044154607, L(p,q)-L0 = 0.0000000000000229, Q(p,q)-Q0 = inf +t = 806.0000, H(p,q)-H0 = 0.0000002049132888, L(p,q)-L0 = 0.0000000000000182, Q(p,q)-Q0 = inf +t = 807.0000, H(p,q)-H0 = 0.0000002049716682, L(p,q)-L0 = 0.0000000000000192, Q(p,q)-Q0 = inf +t = 808.0000, H(p,q)-H0 = 0.0000002049675771, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf +t = 809.0000, H(p,q)-H0 = 0.0000002048640831, L(p,q)-L0 = 0.0000000000000194, Q(p,q)-Q0 = inf +t = 810.0000, H(p,q)-H0 = 0.0000001980694146, L(p,q)-L0 = 0.0000000000000211, Q(p,q)-Q0 = inf +ROOT RETURN: t = 810.4173 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 810.4173, H(p,q)-H0 = 0.0000000646480145, L(p,q)-L0 = 0.0000000001674836, Q(p,q)-Q0 = inf +t = 811.0000, H(p,q)-H0 = 0.0000001944237198, L(p,q)-L0 = 0.0000000000000203, Q(p,q)-Q0 = inf +ROOT RETURN: t = 811.5621 g[0] = -1, y[0] = -0.658723, y[1] = 0.798723 +t = 811.5621, H(p,q)-H0 = 0.0000002044252258, L(p,q)-L0 = 0.0000000000003966, Q(p,q)-Q0 = inf +t = 812.0000, H(p,q)-H0 = 0.0000002048427287, L(p,q)-L0 = 0.0000000000000171, Q(p,q)-Q0 = inf +t = 813.0000, H(p,q)-H0 = 0.0000002049659328, L(p,q)-L0 = 0.0000000000000167, Q(p,q)-Q0 = inf +t = 814.0000, H(p,q)-H0 = 0.0000002049724331, L(p,q)-L0 = 0.0000000000000165, Q(p,q)-Q0 = inf +t = 815.0000, H(p,q)-H0 = 0.0000002049224689, L(p,q)-L0 = 0.0000000000000162, Q(p,q)-Q0 = inf +t = 816.0000, H(p,q)-H0 = 0.0000002035646574, L(p,q)-L0 = 0.0000000000000172, Q(p,q)-Q0 = inf +ROOT RETURN: t = 816.7004 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 816.7004, H(p,q)-H0 = 0.0000000609537980, L(p,q)-L0 = 0.0000000000374563, Q(p,q)-Q0 = inf +t = 817.0000, H(p,q)-H0 = 0.0000001149212812, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf +ROOT RETURN: t = 817.8453 g[0] = -1, y[0] = -0.658724, y[1] = 0.798724 +t = 817.8453, H(p,q)-H0 = 0.0000002044161722, L(p,q)-L0 = 0.0000000000003235, Q(p,q)-Q0 = inf +t = 818.0000, H(p,q)-H0 = 0.0000002046571251, L(p,q)-L0 = 0.0000000000000183, Q(p,q)-Q0 = inf +t = 819.0000, H(p,q)-H0 = 0.0000002049547203, L(p,q)-L0 = 0.0000000000000193, Q(p,q)-Q0 = inf +t = 820.0000, H(p,q)-H0 = 0.0000002049741476, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf +t = 821.0000, H(p,q)-H0 = 0.0000002049494871, L(p,q)-L0 = 0.0000000000000182, Q(p,q)-Q0 = inf +t = 822.0000, H(p,q)-H0 = 0.0000002045421079, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf +ROOT RETURN: t = 822.9836 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 822.9836, H(p,q)-H0 = 0.0000000594525529, L(p,q)-L0 = 0.0000000004589971, Q(p,q)-Q0 = inf +t = 823.0000, H(p,q)-H0 = 0.0000000476582624, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf +t = 824.0000, H(p,q)-H0 = 0.0000002040304519, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf +ROOT RETURN: t = 824.1285 g[0] = -1, y[0] = -0.658725, y[1] = 0.798725 +t = 824.1285, H(p,q)-H0 = 0.0000002044133268, L(p,q)-L0 = 0.0000000000000316, Q(p,q)-Q0 = inf +t = 825.0000, H(p,q)-H0 = 0.0000002049329718, L(p,q)-L0 = 0.0000000000000202, Q(p,q)-Q0 = inf +t = 826.0000, H(p,q)-H0 = 0.0000002049732587, L(p,q)-L0 = 0.0000000000000211, Q(p,q)-Q0 = inf +t = 827.0000, H(p,q)-H0 = 0.0000002049632014, L(p,q)-L0 = 0.0000000000000209, Q(p,q)-Q0 = inf +t = 828.0000, H(p,q)-H0 = 0.0000002048042615, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf +t = 829.0000, H(p,q)-H0 = 0.0000001850351574, L(p,q)-L0 = 0.0000000000000188, Q(p,q)-Q0 = inf +ROOT RETURN: t = 829.2668 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 829.2668, H(p,q)-H0 = 0.0000000646459586, L(p,q)-L0 = 0.0000000001982275, Q(p,q)-Q0 = inf +t = 830.0000, H(p,q)-H0 = 0.0000002009748064, L(p,q)-L0 = 0.0000000000000187, Q(p,q)-Q0 = inf +ROOT RETURN: t = 830.4117 g[0] = -1, y[0] = -0.658726, y[1] = 0.798726 +t = 830.4117, H(p,q)-H0 = 0.0000002044235694, L(p,q)-L0 = 0.0000000000003157, Q(p,q)-Q0 = inf +t = 831.0000, H(p,q)-H0 = 0.0000002048875841, L(p,q)-L0 = 0.0000000000000194, Q(p,q)-Q0 = inf +t = 832.0000, H(p,q)-H0 = 0.0000002049694841, L(p,q)-L0 = 0.0000000000000203, Q(p,q)-Q0 = inf +t = 833.0000, H(p,q)-H0 = 0.0000002049703151, L(p,q)-L0 = 0.0000000000000218, Q(p,q)-Q0 = inf +t = 834.0000, H(p,q)-H0 = 0.0000002048974466, L(p,q)-L0 = 0.0000000000000229, Q(p,q)-Q0 = inf +t = 835.0000, H(p,q)-H0 = 0.0000002018932244, L(p,q)-L0 = 0.0000000000000242, Q(p,q)-Q0 = inf +ROOT RETURN: t = 835.5500 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 835.5500, H(p,q)-H0 = 0.0000000608973183, L(p,q)-L0 = 0.0000000000000431, Q(p,q)-Q0 = inf +t = 836.0000, H(p,q)-H0 = 0.0000001768309819, L(p,q)-L0 = 0.0000000000000229, Q(p,q)-Q0 = inf +ROOT RETURN: t = 836.6949 g[0] = -1, y[0] = -0.658726, y[1] = 0.798726 +t = 836.6949, H(p,q)-H0 = 0.0000002044188021, L(p,q)-L0 = 0.0000000000003870, Q(p,q)-Q0 = inf +t = 837.0000, H(p,q)-H0 = 0.0000002047793164, L(p,q)-L0 = 0.0000000000000236, Q(p,q)-Q0 = inf +t = 838.0000, H(p,q)-H0 = 0.0000002049615638, L(p,q)-L0 = 0.0000000000000246, Q(p,q)-Q0 = inf +t = 839.0000, H(p,q)-H0 = 0.0000002049735743, L(p,q)-L0 = 0.0000000000000256, Q(p,q)-Q0 = inf +t = 840.0000, H(p,q)-H0 = 0.0000002049375165, L(p,q)-L0 = 0.0000000000000258, Q(p,q)-Q0 = inf +t = 841.0000, H(p,q)-H0 = 0.0000002041961175, L(p,q)-L0 = 0.0000000000000259, Q(p,q)-Q0 = inf +ROOT RETURN: t = 841.8332 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 +t = 841.8332, H(p,q)-H0 = 0.0000000590573825, L(p,q)-L0 = 0.0000000004631682, Q(p,q)-Q0 = inf +t = 842.0000, H(p,q)-H0 = 0.0000000158649975, L(p,q)-L0 = 0.0000000000000259, Q(p,q)-Q0 = inf +ROOT RETURN: t = 842.9781 g[0] = -1, y[0] = -0.658727, y[1] = 0.798727 +t = 842.9781, H(p,q)-H0 = 0.0000002044114383, L(p,q)-L0 = 0.0000000000000515, Q(p,q)-Q0 = inf +t = 843.0000, H(p,q)-H0 = 0.0000002044629943, L(p,q)-L0 = 0.0000000000000256, Q(p,q)-Q0 = inf +t = 844.0000, H(p,q)-H0 = 0.0000002049463437, L(p,q)-L0 = 0.0000000000000245, Q(p,q)-Q0 = inf +t = 845.0000, H(p,q)-H0 = 0.0000002049740521, L(p,q)-L0 = 0.0000000000000243, Q(p,q)-Q0 = inf +t = 846.0000, H(p,q)-H0 = 0.0000002049570241, L(p,q)-L0 = 0.0000000000000251, Q(p,q)-Q0 = inf +t = 847.0000, H(p,q)-H0 = 0.0000002047016419, L(p,q)-L0 = 0.0000000000000231, Q(p,q)-Q0 = inf +t = 848.0000, H(p,q)-H0 = 0.0000001408783836, L(p,q)-L0 = 0.0000000000000218, Q(p,q)-Q0 = inf +ROOT RETURN: t = 848.1164 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 848.1164, H(p,q)-H0 = 0.0000000643322804, L(p,q)-L0 = 0.0000000002316378, Q(p,q)-Q0 = inf +t = 849.0000, H(p,q)-H0 = 0.0000002032157668, L(p,q)-L0 = 0.0000000000000216, Q(p,q)-Q0 = inf +ROOT RETURN: t = 849.2613 g[0] = -1, y[0] = -0.658728, y[1] = 0.798728 +t = 849.2613, H(p,q)-H0 = 0.0000002044215293, L(p,q)-L0 = 0.0000000000002244, Q(p,q)-Q0 = inf +t = 850.0000, H(p,q)-H0 = 0.0000002049160269, L(p,q)-L0 = 0.0000000000000199, Q(p,q)-Q0 = inf +t = 851.0000, H(p,q)-H0 = 0.0000002049718916, L(p,q)-L0 = 0.0000000000000211, Q(p,q)-Q0 = inf +t = 852.0000, H(p,q)-H0 = 0.0000002049671315, L(p,q)-L0 = 0.0000000000000221, Q(p,q)-Q0 = inf +t = 853.0000, H(p,q)-H0 = 0.0000002048584976, L(p,q)-L0 = 0.0000000000000220, Q(p,q)-Q0 = inf +t = 854.0000, H(p,q)-H0 = 0.0000001972156204, L(p,q)-L0 = 0.0000000000000221, Q(p,q)-Q0 = inf +ROOT RETURN: t = 854.3996 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 854.3996, H(p,q)-H0 = 0.0000000609561042, L(p,q)-L0 = 0.0000000000107792, Q(p,q)-Q0 = inf +t = 855.0000, H(p,q)-H0 = 0.0000001956370521, L(p,q)-L0 = 0.0000000000000218, Q(p,q)-Q0 = inf +ROOT RETURN: t = 855.5445 g[0] = -1, y[0] = -0.658729, y[1] = 0.798729 +t = 855.5445, H(p,q)-H0 = 0.0000002044213578, L(p,q)-L0 = 0.0000000000004370, Q(p,q)-Q0 = inf +t = 856.0000, H(p,q)-H0 = 0.0000002048491868, L(p,q)-L0 = 0.0000000000000211, Q(p,q)-Q0 = inf +t = 857.0000, H(p,q)-H0 = 0.0000002049664152, L(p,q)-L0 = 0.0000000000000215, Q(p,q)-Q0 = inf +t = 858.0000, H(p,q)-H0 = 0.0000002049722283, L(p,q)-L0 = 0.0000000000000223, Q(p,q)-Q0 = inf +t = 859.0000, H(p,q)-H0 = 0.0000002049200353, L(p,q)-L0 = 0.0000000000000231, Q(p,q)-Q0 = inf +t = 860.0000, H(p,q)-H0 = 0.0000002034389585, L(p,q)-L0 = 0.0000000000000219, Q(p,q)-Q0 = inf +ROOT RETURN: t = 860.6828 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 860.6828, H(p,q)-H0 = 0.0000000589181035, L(p,q)-L0 = 0.0000000004460974, Q(p,q)-Q0 = inf +t = 861.0000, H(p,q)-H0 = 0.0000001259715270, L(p,q)-L0 = 0.0000000000000210, Q(p,q)-Q0 = inf +ROOT RETURN: t = 861.8276 g[0] = -1, y[0] = -0.65873, y[1] = 0.79873 +t = 861.8276, H(p,q)-H0 = 0.0000002044101188, L(p,q)-L0 = 0.0000000000000667, Q(p,q)-Q0 = inf +t = 862.0000, H(p,q)-H0 = 0.0000002046755507, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf +t = 863.0000, H(p,q)-H0 = 0.0000002049556420, L(p,q)-L0 = 0.0000000000000178, Q(p,q)-Q0 = inf +t = 864.0000, H(p,q)-H0 = 0.0000002049741079, L(p,q)-L0 = 0.0000000000000162, Q(p,q)-Q0 = inf +t = 865.0000, H(p,q)-H0 = 0.0000002049482853, L(p,q)-L0 = 0.0000000000000165, Q(p,q)-Q0 = inf +t = 866.0000, H(p,q)-H0 = 0.0000002045130170, L(p,q)-L0 = 0.0000000000000152, Q(p,q)-Q0 = inf +ROOT RETURN: t = 866.9660 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 866.9660, H(p,q)-H0 = 0.0000000637540332, L(p,q)-L0 = 0.0000000002684681, Q(p,q)-Q0 = inf +t = 867.0000, H(p,q)-H0 = 0.0000000340171449, L(p,q)-L0 = 0.0000000000000164, Q(p,q)-Q0 = inf +t = 868.0000, H(p,q)-H0 = 0.0000002041000977, L(p,q)-L0 = 0.0000000000000160, Q(p,q)-Q0 = inf +ROOT RETURN: t = 868.1108 g[0] = -1, y[0] = -0.65873, y[1] = 0.79873 +t = 868.1108, H(p,q)-H0 = 0.0000002044195174, L(p,q)-L0 = 0.0000000000001222, Q(p,q)-Q0 = inf +t = 869.0000, H(p,q)-H0 = 0.0000002049348016, L(p,q)-L0 = 0.0000000000000147, Q(p,q)-Q0 = inf +t = 870.0000, H(p,q)-H0 = 0.0000002049733772, L(p,q)-L0 = 0.0000000000000152, Q(p,q)-Q0 = inf +t = 871.0000, H(p,q)-H0 = 0.0000002049625665, L(p,q)-L0 = 0.0000000000000158, Q(p,q)-Q0 = inf +t = 872.0000, H(p,q)-H0 = 0.0000002047949549, L(p,q)-L0 = 0.0000000000000154, Q(p,q)-Q0 = inf +t = 873.0000, H(p,q)-H0 = 0.0000001821777740, L(p,q)-L0 = 0.0000000000000165, Q(p,q)-Q0 = inf +ROOT RETURN: t = 873.2491 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 873.2491, H(p,q)-H0 = 0.0000000616030174, L(p,q)-L0 = 0.0000000000356655, Q(p,q)-Q0 = inf +t = 874.0000, H(p,q)-H0 = 0.0000002013692153, L(p,q)-L0 = 0.0000000000000144, Q(p,q)-Q0 = inf +ROOT RETURN: t = 874.3940 g[0] = -1, y[0] = -0.658731, y[1] = 0.798731 +t = 874.3940, H(p,q)-H0 = 0.0000002044235853, L(p,q)-L0 = 0.0000000000004705, Q(p,q)-Q0 = inf +t = 875.0000, H(p,q)-H0 = 0.0000002048915941, L(p,q)-L0 = 0.0000000000000155, Q(p,q)-Q0 = inf +t = 876.0000, H(p,q)-H0 = 0.0000002049698078, L(p,q)-L0 = 0.0000000000000154, Q(p,q)-Q0 = inf +t = 877.0000, H(p,q)-H0 = 0.0000002049699876, L(p,q)-L0 = 0.0000000000000155, Q(p,q)-Q0 = inf +t = 878.0000, H(p,q)-H0 = 0.0000002048937237, L(p,q)-L0 = 0.0000000000000154, Q(p,q)-Q0 = inf +t = 879.0000, H(p,q)-H0 = 0.0000002015668072, L(p,q)-L0 = 0.0000000000000159, Q(p,q)-Q0 = inf +ROOT RETURN: t = 879.5323 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 879.5323, H(p,q)-H0 = 0.0000000590360629, L(p,q)-L0 = 0.0000000004049061, Q(p,q)-Q0 = inf +t = 880.0000, H(p,q)-H0 = 0.0000001804146041, L(p,q)-L0 = 0.0000000000000154, Q(p,q)-Q0 = inf +ROOT RETURN: t = 880.6772 g[0] = -1, y[0] = -0.658732, y[1] = 0.798732 +t = 880.6772, H(p,q)-H0 = 0.0000002044095700, L(p,q)-L0 = 0.0000000000000914, Q(p,q)-Q0 = inf +t = 881.0000, H(p,q)-H0 = 0.0000002047895690, L(p,q)-L0 = 0.0000000000000158, Q(p,q)-Q0 = inf +t = 882.0000, H(p,q)-H0 = 0.0000002049622105, L(p,q)-L0 = 0.0000000000000161, Q(p,q)-Q0 = inf +t = 883.0000, H(p,q)-H0 = 0.0000002049734437, L(p,q)-L0 = 0.0000000000000170, Q(p,q)-Q0 = inf +t = 884.0000, H(p,q)-H0 = 0.0000002049357810, L(p,q)-L0 = 0.0000000000000168, Q(p,q)-Q0 = inf +t = 885.0000, H(p,q)-H0 = 0.0000002041357986, L(p,q)-L0 = 0.0000000000000173, Q(p,q)-Q0 = inf +ROOT RETURN: t = 885.8155 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 885.8155, H(p,q)-H0 = 0.0000000629811521, L(p,q)-L0 = 0.0000000003084932, Q(p,q)-Q0 = inf +t = 886.0000, H(p,q)-H0 = 0.0000000270379752, L(p,q)-L0 = 0.0000000000000178, Q(p,q)-Q0 = inf +ROOT RETURN: t = 886.9604 g[0] = -1, y[0] = -0.658733, y[1] = 0.798733 +t = 886.9604, H(p,q)-H0 = 0.0000002044181416, L(p,q)-L0 = 0.0000000000000475, Q(p,q)-Q0 = inf +t = 887.0000, H(p,q)-H0 = 0.0000002044959527, L(p,q)-L0 = 0.0000000000000173, Q(p,q)-Q0 = inf +t = 888.0000, H(p,q)-H0 = 0.0000002049476013, L(p,q)-L0 = 0.0000000000000178, Q(p,q)-Q0 = inf +t = 889.0000, H(p,q)-H0 = 0.0000002049740818, L(p,q)-L0 = 0.0000000000000170, Q(p,q)-Q0 = inf +t = 890.0000, H(p,q)-H0 = 0.0000002049561341, L(p,q)-L0 = 0.0000000000000179, Q(p,q)-Q0 = inf +t = 891.0000, H(p,q)-H0 = 0.0000002046851488, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf +t = 892.0000, H(p,q)-H0 = 0.0000001315782827, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf +ROOT RETURN: t = 892.0987 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 892.0987, H(p,q)-H0 = 0.0000000624977063, L(p,q)-L0 = 0.0000000000658597, Q(p,q)-Q0 = inf +t = 893.0000, H(p,q)-H0 = 0.0000002033638135, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf +ROOT RETURN: t = 893.2436 g[0] = -1, y[0] = -0.658733, y[1] = 0.798733 +t = 893.2436, H(p,q)-H0 = 0.0000002044252925, L(p,q)-L0 = 0.0000000000004973, Q(p,q)-Q0 = inf +t = 894.0000, H(p,q)-H0 = 0.0000002049186359, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf +t = 895.0000, H(p,q)-H0 = 0.0000002049721031, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf +t = 896.0000, H(p,q)-H0 = 0.0000002049666649, L(p,q)-L0 = 0.0000000000000159, Q(p,q)-Q0 = inf +t = 897.0000, H(p,q)-H0 = 0.0000002048525803, L(p,q)-L0 = 0.0000000000000149, Q(p,q)-Q0 = inf +t = 898.0000, H(p,q)-H0 = 0.0000001962370738, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf +ROOT RETURN: t = 898.3819 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 898.3819, H(p,q)-H0 = 0.0000000593789067, L(p,q)-L0 = 0.0000000003394204, Q(p,q)-Q0 = inf +t = 899.0000, H(p,q)-H0 = 0.0000001966927956, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf +ROOT RETURN: t = 899.5268 g[0] = -1, y[0] = -0.658734, y[1] = 0.798734 +t = 899.5268, H(p,q)-H0 = 0.0000002044098684, L(p,q)-L0 = 0.0000000000001296, Q(p,q)-Q0 = inf +t = 900.0000, H(p,q)-H0 = 0.0000002048552705, L(p,q)-L0 = 0.0000000000000144, Q(p,q)-Q0 = inf +t = 901.0000, H(p,q)-H0 = 0.0000002049668696, L(p,q)-L0 = 0.0000000000000149, Q(p,q)-Q0 = inf +t = 902.0000, H(p,q)-H0 = 0.0000002049720016, L(p,q)-L0 = 0.0000000000000138, Q(p,q)-Q0 = inf +t = 903.0000, H(p,q)-H0 = 0.0000002049174740, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf +t = 904.0000, H(p,q)-H0 = 0.0000002032993300, L(p,q)-L0 = 0.0000000000000138, Q(p,q)-Q0 = inf +ROOT RETURN: t = 904.6651 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 904.6651, H(p,q)-H0 = 0.0000000620975598, L(p,q)-L0 = 0.0000000003502251, Q(p,q)-Q0 = inf +t = 905.0000, H(p,q)-H0 = 0.0000001358884045, L(p,q)-L0 = 0.0000000000000141, Q(p,q)-Q0 = inf +ROOT RETURN: t = 905.8100 g[0] = -1, y[0] = -0.658735, y[1] = 0.798735 +t = 905.8100, H(p,q)-H0 = 0.0000002044181727, L(p,q)-L0 = 0.0000000000000147, Q(p,q)-Q0 = inf +t = 906.0000, H(p,q)-H0 = 0.0000002046926894, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf +t = 907.0000, H(p,q)-H0 = 0.0000002049565320, L(p,q)-L0 = 0.0000000000000150, Q(p,q)-Q0 = inf +t = 908.0000, H(p,q)-H0 = 0.0000002049740641, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf +t = 909.0000, H(p,q)-H0 = 0.0000002049470378, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf +t = 910.0000, H(p,q)-H0 = 0.0000002044814912, L(p,q)-L0 = 0.0000000000000137, Q(p,q)-Q0 = inf +ROOT RETURN: t = 910.9483 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 +t = 910.9483, H(p,q)-H0 = 0.0000000633904909, L(p,q)-L0 = 0.0000000000967431, Q(p,q)-Q0 = inf +t = 911.0000, H(p,q)-H0 = 0.0000000217558536, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf +t = 912.0000, H(p,q)-H0 = 0.0000002041635443, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf +ROOT RETURN: t = 912.0932 g[0] = -1, y[0] = -0.658736, y[1] = 0.798736 +t = 912.0932, H(p,q)-H0 = 0.0000002044262944, L(p,q)-L0 = 0.0000000000004957, Q(p,q)-Q0 = inf +t = 913.0000, H(p,q)-H0 = 0.0000002049365665, L(p,q)-L0 = 0.0000000000000170, Q(p,q)-Q0 = inf +t = 914.0000, H(p,q)-H0 = 0.0000002049735011, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf +t = 915.0000, H(p,q)-H0 = 0.0000002049619215, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf +t = 916.0000, H(p,q)-H0 = 0.0000002047850496, L(p,q)-L0 = 0.0000000000000182, Q(p,q)-Q0 = inf +t = 917.0000, H(p,q)-H0 = 0.0000001788710320, L(p,q)-L0 = 0.0000000000000173, Q(p,q)-Q0 = inf +ROOT RETURN: t = 917.2315 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 917.2315, H(p,q)-H0 = 0.0000000598767218, L(p,q)-L0 = 0.0000000002535148, Q(p,q)-Q0 = inf +t = 918.0000, H(p,q)-H0 = 0.0000002017181392, L(p,q)-L0 = 0.0000000000000168, Q(p,q)-Q0 = inf +ROOT RETURN: t = 918.3764 g[0] = -1, y[0] = -0.658736, y[1] = 0.798736 +t = 918.3764, H(p,q)-H0 = 0.0000002044109746, L(p,q)-L0 = 0.0000000000001783, Q(p,q)-Q0 = inf +t = 919.0000, H(p,q)-H0 = 0.0000002048954111, L(p,q)-L0 = 0.0000000000000144, Q(p,q)-Q0 = inf +t = 920.0000, H(p,q)-H0 = 0.0000002049701303, L(p,q)-L0 = 0.0000000000000153, Q(p,q)-Q0 = inf +t = 921.0000, H(p,q)-H0 = 0.0000002049696587, L(p,q)-L0 = 0.0000000000000147, Q(p,q)-Q0 = inf +t = 922.0000, H(p,q)-H0 = 0.0000002048898162, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf +t = 923.0000, H(p,q)-H0 = 0.0000002011982504, L(p,q)-L0 = 0.0000000000000149, Q(p,q)-Q0 = inf +ROOT RETURN: t = 923.5147 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 923.5147, H(p,q)-H0 = 0.0000000611928677, L(p,q)-L0 = 0.0000000003909214, Q(p,q)-Q0 = inf +t = 924.0000, H(p,q)-H0 = 0.0000001835116181, L(p,q)-L0 = 0.0000000000000157, Q(p,q)-Q0 = inf +ROOT RETURN: t = 924.6596 g[0] = -1, y[0] = -0.658737, y[1] = 0.798737 +t = 924.6596, H(p,q)-H0 = 0.0000002044180019, L(p,q)-L0 = 0.0000000000000171, Q(p,q)-Q0 = inf +t = 925.0000, H(p,q)-H0 = 0.0000002047991994, L(p,q)-L0 = 0.0000000000000165, Q(p,q)-Q0 = inf +t = 926.0000, H(p,q)-H0 = 0.0000002049628492, L(p,q)-L0 = 0.0000000000000157, Q(p,q)-Q0 = inf +t = 927.0000, H(p,q)-H0 = 0.0000002049733187, L(p,q)-L0 = 0.0000000000000143, Q(p,q)-Q0 = inf +t = 928.0000, H(p,q)-H0 = 0.0000002049339835, L(p,q)-L0 = 0.0000000000000124, Q(p,q)-Q0 = inf +t = 929.0000, H(p,q)-H0 = 0.0000002040696492, L(p,q)-L0 = 0.0000000000000120, Q(p,q)-Q0 = inf +ROOT RETURN: t = 929.7978 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 929.7978, H(p,q)-H0 = 0.0000000641108504, L(p,q)-L0 = 0.0000000001267221, Q(p,q)-Q0 = inf +t = 930.0000, H(p,q)-H0 = 0.0000000400123161, L(p,q)-L0 = 0.0000000000000121, Q(p,q)-Q0 = inf +ROOT RETURN: t = 930.9427 g[0] = -1, y[0] = -0.658738, y[1] = 0.798738 +t = 930.9427, H(p,q)-H0 = 0.0000002044264902, L(p,q)-L0 = 0.0000000000004714, Q(p,q)-Q0 = inf +t = 931.0000, H(p,q)-H0 = 0.0000002045263514, L(p,q)-L0 = 0.0000000000000135, Q(p,q)-Q0 = inf +t = 932.0000, H(p,q)-H0 = 0.0000002049488224, L(p,q)-L0 = 0.0000000000000133, Q(p,q)-Q0 = inf +t = 933.0000, H(p,q)-H0 = 0.0000002049741180, L(p,q)-L0 = 0.0000000000000125, Q(p,q)-Q0 = inf +t = 934.0000, H(p,q)-H0 = 0.0000002049552229, L(p,q)-L0 = 0.0000000000000124, Q(p,q)-Q0 = inf +t = 935.0000, H(p,q)-H0 = 0.0000002046674394, L(p,q)-L0 = 0.0000000000000133, Q(p,q)-Q0 = inf +t = 936.0000, H(p,q)-H0 = 0.0000001211531095, L(p,q)-L0 = 0.0000000000000125, Q(p,q)-Q0 = inf +ROOT RETURN: t = 936.0810 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 936.0810, H(p,q)-H0 = 0.0000000604188675, L(p,q)-L0 = 0.0000000001566494, Q(p,q)-Q0 = inf +t = 937.0000, H(p,q)-H0 = 0.0000002034969695, L(p,q)-L0 = 0.0000000000000120, Q(p,q)-Q0 = inf +ROOT RETURN: t = 937.2259 g[0] = -1, y[0] = -0.658739, y[1] = 0.798739 +t = 937.2259, H(p,q)-H0 = 0.0000002044127637, L(p,q)-L0 = 0.0000000000002298, Q(p,q)-Q0 = inf +t = 938.0000, H(p,q)-H0 = 0.0000002049211278, L(p,q)-L0 = 0.0000000000000111, Q(p,q)-Q0 = inf +t = 939.0000, H(p,q)-H0 = 0.0000002049723087, L(p,q)-L0 = 0.0000000000000112, Q(p,q)-Q0 = inf +t = 940.0000, H(p,q)-H0 = 0.0000002049661892, L(p,q)-L0 = 0.0000000000000127, Q(p,q)-Q0 = inf +t = 941.0000, H(p,q)-H0 = 0.0000002048463239, L(p,q)-L0 = 0.0000000000000129, Q(p,q)-Q0 = inf +t = 942.0000, H(p,q)-H0 = 0.0000001951135480, L(p,q)-L0 = 0.0000000000000119, Q(p,q)-Q0 = inf +ROOT RETURN: t = 942.3642 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 942.3642, H(p,q)-H0 = 0.0000000603545709, L(p,q)-L0 = 0.0000000004266573, Q(p,q)-Q0 = inf +t = 943.0000, H(p,q)-H0 = 0.0000001976130376, L(p,q)-L0 = 0.0000000000000121, Q(p,q)-Q0 = inf +ROOT RETURN: t = 943.5091 g[0] = -1, y[0] = -0.658739, y[1] = 0.798739 +t = 943.5091, H(p,q)-H0 = 0.0000002044164798, L(p,q)-L0 = 0.0000000000000149, Q(p,q)-Q0 = inf +t = 944.0000, H(p,q)-H0 = 0.0000002048610273, L(p,q)-L0 = 0.0000000000000117, Q(p,q)-Q0 = inf +t = 945.0000, H(p,q)-H0 = 0.0000002049673189, L(p,q)-L0 = 0.0000000000000113, Q(p,q)-Q0 = inf +t = 946.0000, H(p,q)-H0 = 0.0000002049717775, L(p,q)-L0 = 0.0000000000000101, Q(p,q)-Q0 = inf +t = 947.0000, H(p,q)-H0 = 0.0000002049147996, L(p,q)-L0 = 0.0000000000000091, Q(p,q)-Q0 = inf +t = 948.0000, H(p,q)-H0 = 0.0000002031439666, L(p,q)-L0 = 0.0000000000000093, Q(p,q)-Q0 = inf +ROOT RETURN: t = 948.6474 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 948.6474, H(p,q)-H0 = 0.0000000645559284, L(p,q)-L0 = 0.0000000001561030, Q(p,q)-Q0 = inf +t = 949.0000, H(p,q)-H0 = 0.0000001446970832, L(p,q)-L0 = 0.0000000000000090, Q(p,q)-Q0 = inf +ROOT RETURN: t = 949.7923 g[0] = -1, y[0] = -0.65874, y[1] = 0.79874 +t = 949.7923, H(p,q)-H0 = 0.0000002044258608, L(p,q)-L0 = 0.0000000000004192, Q(p,q)-Q0 = inf +t = 950.0000, H(p,q)-H0 = 0.0000002047086510, L(p,q)-L0 = 0.0000000000000102, Q(p,q)-Q0 = inf +t = 951.0000, H(p,q)-H0 = 0.0000002049573921, L(p,q)-L0 = 0.0000000000000095, Q(p,q)-Q0 = inf +t = 952.0000, H(p,q)-H0 = 0.0000002049740153, L(p,q)-L0 = 0.0000000000000085, Q(p,q)-Q0 = inf +t = 953.0000, H(p,q)-H0 = 0.0000002049457423, L(p,q)-L0 = 0.0000000000000097, Q(p,q)-Q0 = inf +t = 954.0000, H(p,q)-H0 = 0.0000002044472789, L(p,q)-L0 = 0.0000000000000100, Q(p,q)-Q0 = inf +ROOT RETURN: t = 954.9306 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 954.9306, H(p,q)-H0 = 0.0000000608515198, L(p,q)-L0 = 0.0000000000656522, Q(p,q)-Q0 = inf +t = 955.0000, H(p,q)-H0 = 0.0000000116384511, L(p,q)-L0 = 0.0000000000000085, Q(p,q)-Q0 = inf +t = 956.0000, H(p,q)-H0 = 0.0000002042214238, L(p,q)-L0 = 0.0000000000000092, Q(p,q)-Q0 = inf +ROOT RETURN: t = 956.0755 g[0] = -1, y[0] = -0.658741, y[1] = 0.798741 +t = 956.0755, H(p,q)-H0 = 0.0000002044150632, L(p,q)-L0 = 0.0000000000002869, Q(p,q)-Q0 = inf +t = 957.0000, H(p,q)-H0 = 0.0000002049382501, L(p,q)-L0 = 0.0000000000000088, Q(p,q)-Q0 = inf +t = 958.0000, H(p,q)-H0 = 0.0000002049736090, L(p,q)-L0 = 0.0000000000000080, Q(p,q)-Q0 = inf +t = 959.0000, H(p,q)-H0 = 0.0000002049612455, L(p,q)-L0 = 0.0000000000000084, Q(p,q)-Q0 = inf +t = 960.0000, H(p,q)-H0 = 0.0000002047744759, L(p,q)-L0 = 0.0000000000000074, Q(p,q)-Q0 = inf +t = 961.0000, H(p,q)-H0 = 0.0000001750455147, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf +ROOT RETURN: t = 961.2138 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 961.2138, H(p,q)-H0 = 0.0000000596608996, L(p,q)-L0 = 0.0000000004526731, Q(p,q)-Q0 = inf +t = 962.0000, H(p,q)-H0 = 0.0000002020274281, L(p,q)-L0 = 0.0000000000000071, Q(p,q)-Q0 = inf +ROOT RETURN: t = 962.3587 g[0] = -1, y[0] = -0.658742, y[1] = 0.798742 +t = 962.3587, H(p,q)-H0 = 0.0000002044144006, L(p,q)-L0 = 0.0000000000000160, Q(p,q)-Q0 = inf +t = 963.0000, H(p,q)-H0 = 0.0000002048990325, L(p,q)-L0 = 0.0000000000000062, Q(p,q)-Q0 = inf +t = 964.0000, H(p,q)-H0 = 0.0000002049704351, L(p,q)-L0 = 0.0000000000000061, Q(p,q)-Q0 = inf +t = 965.0000, H(p,q)-H0 = 0.0000002049693122, L(p,q)-L0 = 0.0000000000000061, Q(p,q)-Q0 = inf +t = 966.0000, H(p,q)-H0 = 0.0000002048856934, L(p,q)-L0 = 0.0000000000000059, Q(p,q)-Q0 = inf +t = 967.0000, H(p,q)-H0 = 0.0000002007812476, L(p,q)-L0 = 0.0000000000000049, Q(p,q)-Q0 = inf +ROOT RETURN: t = 967.4970 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 967.4970, H(p,q)-H0 = 0.0000000646795120, L(p,q)-L0 = 0.0000000001861755, Q(p,q)-Q0 = inf +t = 968.0000, H(p,q)-H0 = 0.0000001861877723, L(p,q)-L0 = 0.0000000000000052, Q(p,q)-Q0 = inf +ROOT RETURN: t = 968.6419 g[0] = -1, y[0] = -0.658743, y[1] = 0.798743 +t = 968.6419, H(p,q)-H0 = 0.0000002044244880, L(p,q)-L0 = 0.0000000000003418, Q(p,q)-Q0 = inf +t = 969.0000, H(p,q)-H0 = 0.0000002048082257, L(p,q)-L0 = 0.0000000000000033, Q(p,q)-Q0 = inf +t = 970.0000, H(p,q)-H0 = 0.0000002049634518, L(p,q)-L0 = 0.0000000000000034, Q(p,q)-Q0 = inf +t = 971.0000, H(p,q)-H0 = 0.0000002049731755, L(p,q)-L0 = 0.0000000000000033, Q(p,q)-Q0 = inf +t = 972.0000, H(p,q)-H0 = 0.0000002049320982, L(p,q)-L0 = 0.0000000000000041, Q(p,q)-Q0 = inf +t = 973.0000, H(p,q)-H0 = 0.0000002039969692, L(p,q)-L0 = 0.0000000000000036, Q(p,q)-Q0 = inf +ROOT RETURN: t = 973.7802 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 973.7802, H(p,q)-H0 = 0.0000000609758701, L(p,q)-L0 = 0.0000000000066527, Q(p,q)-Q0 = inf +t = 974.0000, H(p,q)-H0 = 0.0000000540323211, L(p,q)-L0 = 0.0000000000000033, Q(p,q)-Q0 = inf +ROOT RETURN: t = 974.9251 g[0] = -1, y[0] = -0.658743, y[1] = 0.798743 +t = 974.9251, H(p,q)-H0 = 0.0000002044176416, L(p,q)-L0 = 0.0000000000003411, Q(p,q)-Q0 = inf +t = 975.0000, H(p,q)-H0 = 0.0000002045544040, L(p,q)-L0 = 0.0000000000000040, Q(p,q)-Q0 = inf +t = 976.0000, H(p,q)-H0 = 0.0000002049499875, L(p,q)-L0 = 0.0000000000000036, Q(p,q)-Q0 = inf +t = 977.0000, H(p,q)-H0 = 0.0000002049741388, L(p,q)-L0 = 0.0000000000000028, Q(p,q)-Q0 = inf +t = 978.0000, H(p,q)-H0 = 0.0000002049542684, L(p,q)-L0 = 0.0000000000000008, Q(p,q)-Q0 = inf +t = 979.0000, H(p,q)-H0 = 0.0000002046483805, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf +t = 980.0000, H(p,q)-H0 = 0.0000001096002278, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf +ROOT RETURN: t = 980.0634 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 980.0634, H(p,q)-H0 = 0.0000000591741722, L(p,q)-L0 = 0.0000000004638443, Q(p,q)-Q0 = inf +t = 981.0000, H(p,q)-H0 = 0.0000002036169391, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf +ROOT RETURN: t = 981.2083 g[0] = -1, y[0] = -0.658744, y[1] = 0.798744 +t = 981.2083, H(p,q)-H0 = 0.0000002044123416, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf +t = 982.0000, H(p,q)-H0 = 0.0000002049235003, L(p,q)-L0 = -0.0000000000000004, Q(p,q)-Q0 = inf +t = 983.0000, H(p,q)-H0 = 0.0000002049724979, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf +t = 984.0000, H(p,q)-H0 = 0.0000002049656862, L(p,q)-L0 = -0.0000000000000004, Q(p,q)-Q0 = inf +t = 985.0000, H(p,q)-H0 = 0.0000002048396803, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf +t = 986.0000, H(p,q)-H0 = 0.0000001938213499, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf +ROOT RETURN: t = 986.3466 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 +t = 986.3466, H(p,q)-H0 = 0.0000000644814311, L(p,q)-L0 = 0.0000000002184182, Q(p,q)-Q0 = inf +t = 987.0000, H(p,q)-H0 = 0.0000001984166235, L(p,q)-L0 = -0.0000000000000031, Q(p,q)-Q0 = inf +ROOT RETURN: t = 987.4915 g[0] = -1, y[0] = -0.658745, y[1] = 0.798745 +t = 987.4915, H(p,q)-H0 = 0.0000002044225862, L(p,q)-L0 = 0.0000000000002461, Q(p,q)-Q0 = inf +t = 988.0000, H(p,q)-H0 = 0.0000002048664609, L(p,q)-L0 = -0.0000000000000020, Q(p,q)-Q0 = inf +t = 989.0000, H(p,q)-H0 = 0.0000002049677437, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf +t = 990.0000, H(p,q)-H0 = 0.0000002049715348, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf +t = 991.0000, H(p,q)-H0 = 0.0000002049119866, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf +t = 992.0000, H(p,q)-H0 = 0.0000002029707531, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf +ROOT RETURN: t = 992.6297 g[0] = 1, y[0] = 0.361049, y[1] = -0.221049 +t = 992.6297, H(p,q)-H0 = 0.0000000608365176, L(p,q)-L0 = 0.0000000000043042, Q(p,q)-Q0 = inf +t = 993.0000, H(p,q)-H0 = 0.0000001524590705, L(p,q)-L0 = -0.0000000000000037, Q(p,q)-Q0 = inf +ROOT RETURN: t = 993.7747 g[0] = -1, y[0] = -0.658746, y[1] = 0.798746 +t = 993.7747, H(p,q)-H0 = 0.0000002044202644, L(p,q)-L0 = 0.0000000000003899, Q(p,q)-Q0 = inf +t = 994.0000, H(p,q)-H0 = 0.0000002047235210, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf +t = 995.0000, H(p,q)-H0 = 0.0000002049582109, L(p,q)-L0 = -0.0000000000000031, Q(p,q)-Q0 = inf +t = 996.0000, H(p,q)-H0 = 0.0000002049739506, L(p,q)-L0 = -0.0000000000000028, Q(p,q)-Q0 = inf +t = 997.0000, H(p,q)-H0 = 0.0000002049443828, L(p,q)-L0 = -0.0000000000000029, Q(p,q)-Q0 = inf +t = 998.0000, H(p,q)-H0 = 0.0000002044100896, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf +ROOT RETURN: t = 998.9129 g[0] = 1, y[0] = 0.361049, y[1] = -0.221049 +t = 998.9129, H(p,q)-H0 = 0.0000000589348204, L(p,q)-L0 = 0.0000000004553780, Q(p,q)-Q0 = inf +t = 999.0000, H(p,q)-H0 = 0.0000000043782606, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf +t = 1000.0000, H(p,q)-H0 = 0.0000002042743010, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf +Current time = 1000 +Steps = 100000 +Step attempts = 100000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.010000000000000000208166817117217 +Last step size = 0.010000000000000000208166817117217 +Current step size = 0.010000000000000000208166817117217 +Root fn evals = 102775 +f1 RHS fn evals = 511109 +f2 RHS fn evals = 511109 diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 356558ec5c..44c129eefd 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -374,6 +374,8 @@ ARKodeSPRKMem ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) return ARKodeSymplecticYoshida6(); case ARKODE_SYMPLECTIC_MCLACHLAN_8: return ARKodeSymplecticMcLachlan8(); + case ARKODE_SYMPLECTIC_SOFRONIOU_10: + return ARKodeSymplecticSofroniou10(); default: return NULL; } diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 0e3419b1f0..973a5d5c2e 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -410,7 +410,7 @@ int sprkStep_Init(void* arkode_mem, int init_type) case 7: case 8: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_8); break; case 9: - case 10: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_10); + case 10: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_10); break; default: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); break; } } From 15d3b742aaae057cf2d80e8a54d367a5b1c753d1 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Apr 2023 22:42:28 -0700 Subject: [PATCH 045/177] order --- src/arkode/arkode_sprk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 44c129eefd..04e305bc56 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -25,8 +25,8 @@ ARKodeSPRKMem ARKodeSymplecticEuler() { ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(1); sprk_mem->q = 1; sprk_mem->stages = 1; - sprk_mem->b[0] = SUN_RCONST(1.0); sprk_mem->a[0] = SUN_RCONST(1.0); + sprk_mem->b[0] = SUN_RCONST(1.0); return sprk_mem; } From e1cdc6822f1740173c60909f89b430050e9ba2f6 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 21 Apr 2023 15:55:31 -0700 Subject: [PATCH 046/177] use lagrange interpolant --- examples/arkode/C_serial/ark_kepler.c | 14 ++- examples/arkode/C_serial/ark_kepler_plot.py | 32 +++--- .../arkode/C_serial/ark_kepler_plot_all.py | 25 +++-- src/arkode/arkode_io.c | 2 +- src/arkode/arkode_sprkstep.c | 98 +++---------------- 5 files changed, 48 insertions(+), 123 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 4d661937f4..ab060d8f98 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -176,8 +176,7 @@ int main(int argc, char* argv[]) { arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); - /* TODO(CJB): Enabling rootfinding results in 1 extra RHS eval per time step - because it makes us enable Hermite interpolation, which calls fullrhs. */ + /* Enable temporal root-finding */ SPRKStepRootInit(arkode_mem, 1, rootfn); if (check_retval(&retval, "SPRKStepRootInit", 1)) return 1; @@ -360,6 +359,8 @@ int main(int argc, char* argv[]) fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); N_VPrintFile(y, solution_fp); + N_Vector dky = N_VClone(y); + /* Do integration */ if (method == 0) { @@ -383,13 +384,16 @@ int main(int argc, char* argv[]) retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); } + /* Show what happens when you do dense output */ + SPRKStepGetDky(arkode_mem, tret-SUN_RCONST(0.1)*dt, 0, dky); + /* Output current integration status */ fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, + tret-SUN_RCONST(0.5)*dt, Hamiltonian(dky) - H0, AngularMomentum(dky) - L0, Q(y, udata->alpha) / udata->rho_np1 - Q0); fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), - AngularMomentum(y)); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(dky), + AngularMomentum(dky)); SPRKStepGetLastStep(arkode_mem, &hlast); fprintf(udata->hhist_fp, "%.16Lf\n", hlast); diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index b4d4582c84..055fc980c5 100755 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -3,7 +3,7 @@ # Programmer(s): Cody J. Balos @ LLNL # ---------------------------------------------------------------- # SUNDIALS Copyright Start -# Copyright (c) 2002-2022, Lawrence Livermore National Security +# Copyright (c) 2002-4022, Lawrence Livermore National Security # and Southern Methodist University. # All rights reserved. # @@ -18,8 +18,8 @@ import numpy as np import matplotlib.pyplot as plt -t = np.loadtxt('ark_kepler_times_sprk-10-dt-0.100000.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_sprk-10-dt-0.100000.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_erk-4-dt-0.010000.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_erk-4-dt-0.010000.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) @@ -27,16 +27,16 @@ plt.savefig('ark_kepler_phase.png') plt.close() -conserved = np.loadtxt('ark_kepler_conserved_sprk-10-dt-0.100000.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_erk-4-dt-0.010000.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] L_0 = conserved[0,1] plt.figure(dpi=200) -plt.title('Error in Hamiltonian') +plt.title('Error in Energy') plt.plot(t, np.abs(energy-energy_0)) -plt.ylabel('| error |') +plt.ylabel(r'$| H(t,p,q) - H(t_0,p_0,q_0) |$') plt.xlabel('<--- t --->') plt.xscale('log') plt.yscale('log') @@ -46,22 +46,22 @@ plt.figure(dpi=200) plt.title('Error in Momentum') plt.plot(t, np.abs(L-L_0)) -plt.ylabel('| error |') +plt.ylabel(r'$| L(t,p,q) - L(t_0,p_0,q_0) |$') plt.xlabel('<--- t --->') plt.xscale('log') plt.yscale('log') plt.savefig('ark_kepler_momentum.png') plt.close() -# Step history -hhist = np.loadtxt('ark_kepler_hhist_sprk-10-dt-0.100000.txt', dtype=np.float64) -plt.figure(dpi=200) -plt.title('Step Size History') -plt.plot(t[:-1], hhist) -plt.xlabel('<--- t --->') -plt.yscale('log') -plt.savefig('ark_kepler_hhist.png') -plt.close() +# # Step history +# hhist = np.loadtxt('ark_kepler_hhist_erk-4-dt-0.010000.txt', dtype=np.float64) +# plt.figure(dpi=200) +# plt.title('Step Size History') +# plt.plot(t[:-1], hhist) +# plt.xlabel('<--- t --->') +# plt.yscale('log') +# plt.savefig('ark_kepler_hhist.png') +# plt.close() # # Time plot. diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_all.py index 53c3250263..dbb2443320 100755 --- a/examples/arkode/C_serial/ark_kepler_plot_all.py +++ b/examples/arkode/C_serial/ark_kepler_plot_all.py @@ -12,27 +12,24 @@ def load_results(case): # sprk1 = load_results('_sprk-1') # sprk2 = load_results('_sprk-2') -sprk3 = load_results('_sprk-3') -sprk4 = load_results('_sprk-4') +# sprk3 = load_results('_sprk-3') +sprk4 = load_results('_sprk-4-dt-0.010000') # sprk5 = load_results('_sprk-5') # erk2 = load_results('_erk-2') # erk3 = load_results('_erk-3') -erk4 = load_results('_erk-4') -erk5 = load_results('_erk-8') -# sprkinc1 = load_results('_sprkinc-1') -# sprkinc2 = load_results('_sprkinc-2') -# sprkinc3 = load_results('_sprkinc-3') +erk4 = load_results('_erk-4-dt-0.010000') +# erk5 = load_results('_erk-8') all_to_compare = [] # all_to_compare.append(sprk1) # all_to_compare.append(sprk2) -all_to_compare.append(sprk3) +# all_to_compare.append(sprk3) all_to_compare.append(sprk4) # all_to_compare.append(sprk5) # all_to_compare.append(erk2) # all_to_compare.append(erk3) all_to_compare.append(erk4) -all_to_compare.append(erk5) +# all_to_compare.append(erk5) # all_to_compare.append(sprkinc1) # all_to_compare.append(sprkinc2) # all_to_compare.append(sprkinc3) @@ -40,13 +37,13 @@ def load_results(case): legend = [] # legend.append(r'$O(h^1)$ SPRK') # legend.append(r'$O(h^2)$ SPRK') -legend.append(r'$O(h^3)$ SPRK') +# legend.append(r'$O(h^3)$ SPRK') legend.append(r'$O(h^4)$ SPRK') # legend.append(r'$O(h^5)$ SPRK') # legend.append(r'$O(h^2)$ ERK') # legend.append(r'$O(h^3)$ ERK') legend.append(r'$O(h^4)$ ERK') -legend.append(r'$O(h^5)$ ERK') +# legend.append(r'$O(h^5)$ ERK') h = 0.01 t = erk4[0] @@ -61,9 +58,9 @@ def load_results(case): energy_diff = np.abs(energy.T - energy_0) plt.figure(dpi=200) -plt.title('Error in Hamiltonian, h = %g' % h) +plt.title('Error in Energy') plt.plot(t, energy_diff) -plt.ylabel('| error |') +plt.ylabel(r'$| H(t,p,q) - H(t_0,p_0,q_0) |$') plt.xlabel('<--- t --->') plt.xscale('log') plt.yscale('log') @@ -82,7 +79,7 @@ def load_results(case): plt.figure(dpi=200) plt.title('Error in Momentum, h = %g' % h) plt.plot(t, momentum_diff) -plt.ylabel('| error |') +plt.ylabel(r'$| L(t,p,q) - L(t_0,p_0,q_0) |$') plt.xlabel('<--- t --->') plt.xscale('log') plt.yscale('log') diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 3fdd1b3df6..8727987590 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -161,7 +161,7 @@ int arkSetInterpolantType(void *arkode_mem, int itype) the maximum possible interpolant degree. */ if (itype == ARK_INTERP_HERMITE) { ark_mem->interp = arkInterpCreate_Hermite(arkode_mem, ARK_INTERP_MAX_DEGREE); - } else if (itype == ARK_INTERP_NONE) { + } else if (itype == ARK_INTERP_LAGRANGE) { ark_mem->interp = arkInterpCreate_Lagrange(arkode_mem, ARK_INTERP_MAX_DEGREE); } else { ark_mem->interp = NULL; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 973a5d5c2e..c9b68128a3 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -152,6 +152,12 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, return (NULL); } + /* We use Lagrange interpolation by default otherwise extra RHS calls are + needed. This is because we cannot reuse the f2 RHS in TakeStep since it is + a staggered time step. Additionally, it seems Lagrange interpolation does + a better job of conservation. */ + arkSetInterpolantType(ark_mem, ARK_INTERP_LAGRANGE); + return ((void*)ark_mem); } @@ -410,7 +416,9 @@ int sprkStep_Init(void* arkode_mem, int init_type) case 7: case 8: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_8); break; case 9: - case 10: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_10); break; + case 10: + step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_10); + break; default: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); break; } } @@ -420,15 +428,9 @@ int sprkStep_Init(void* arkode_mem, int init_type) */ ark_mem->call_fullrhs = SUNFALSE; - if (ark_mem->fixedstep && !ark_mem->root_mem) - { - /* In fixed step mode, we do not need an interpolation module. - If adaptivity or rootfinding is enabled, we will need it. */ - arkSetInterpolantType(ark_mem, ARK_INTERP_NONE); - } - // TODO(CJB): setting this to NULL is not supported in arkode right now. - // Should this really exist in fixed step mode? ark_mem->hadapt_mem = NULL; + // Should this really exist in fixed step mode? + // ark_mem->hadapt_mem = NULL; return (ARK_SUCCESS); } @@ -481,7 +483,6 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, f1(t,y) and f2(t,y) in sdata for possible reuse in the first stage of the subsequent time step. - TODO(CJB): the reuse is not yet supported If it is called in ARK_FULLRHS_END mode and the method coefficients support it, we may just copy the stage vectors to fill f instead of calling f(). @@ -506,85 +507,8 @@ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* perform RHS functions contingent on 'mode' argument */ switch (mode) { - /* ARK_FULLRHS_START: called at the beginning of a simulation - Store the vectors f1(t,y) in sdata for possible reuse - in the first stage of the subsequent time step. - We don't store f2(t,y) because it is not reusable in - the subsequent time step (which calls it with a updated state). */ case ARK_FULLRHS_START: - - /* Since the RHS is component-wise split, we assume that only the relevant - components are modified in a call to f1/f2. Under this assumption we can - call both with the same output vector. */ - retval = sprkStep_f1(step_mem, t, y, step_mem->sdata, ark_mem->user_data); - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } - - /* Copy sdata into the output vector f */ - N_VScale(ONE, step_mem->sdata, f); - - retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } - - break; - - /* ARK_FULLRHS_END: called at the end of a successful step - If the method coefficients support it, we just copy the last stage RHS - vectors to fill f instead of calling f(t,y). - Copy the results to sdata if the coefficients support it. */ case ARK_FULLRHS_END: - - /* TODO(CJB): Right now we cannot leverage this because we do - not store the function evals for reuse anywhere. Consider - doing this if it does drastically increase storage. */ - - /* determine if explicit RHS function needs to be recomputed */ - recomputeRHS = SUNFALSE; - if (SUNRabs(step_mem->method->a[step_mem->method->stages - 1] - ONE) > TINY) - { - recomputeRHS = SUNTRUE; - } - - /* base RHS calls on recomputeRHS argument */ - // if (recomputeRHS) { - - retval = sprkStep_f1(step_mem, t, y, step_mem->sdata, ark_mem->user_data); - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } - - /* Copy sdata into the output vector f */ - N_VScale(ONE, step_mem->sdata, f); - - retval = sprkStep_f2(step_mem, t, y, f, ark_mem->user_data); - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::SPRKStep", - "SPRKStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } - - // } else { - // N_VScale(ONE, step_mem->F[step_mem->stages-1], step_mem->sdata); - // } - - break; - - /* ARK_FULLRHS_OTHER: called for dense output in-between steps - store the intermediate calculations in such a way as to not - interfere with the other two modes */ case ARK_FULLRHS_OTHER: retval = sprkStep_f1(step_mem, t, y, f, ark_mem->user_data); From 3b463dd8e80bde39eb5de2659e90cdb517fd1bcc Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sun, 23 Apr 2023 14:21:19 -0700 Subject: [PATCH 047/177] update plot scripts --- examples/arkode/C_serial/ark_kepler_plot.py | 56 ++++++----- ...plot_all.py => ark_kepler_plot_compare.py} | 95 ++++++++----------- .../C_serial/ark_kepler_work_precision.py | 68 +++++++++++++ .../ark_kepler_work_precision_comp.py | 70 ++++++++++++++ 4 files changed, 213 insertions(+), 76 deletions(-) rename examples/arkode/C_serial/{ark_kepler_plot_all.py => ark_kepler_plot_compare.py} (56%) create mode 100755 examples/arkode/C_serial/ark_kepler_work_precision.py create mode 100755 examples/arkode/C_serial/ark_kepler_work_precision_comp.py diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index 055fc980c5..9ede7b6a71 100755 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -18,8 +18,8 @@ import numpy as np import matplotlib.pyplot as plt -t = np.loadtxt('ark_kepler_times_erk-4-dt-0.010000.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_erk-4-dt-0.010000.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_sprk-2-dt-2.00e-02.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_sprk-2-dt-2.00e-02.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) @@ -27,41 +27,53 @@ plt.savefig('ark_kepler_phase.png') plt.close() -conserved = np.loadtxt('ark_kepler_conserved_erk-4-dt-0.010000.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_sprk-2-dt-2.00e-02.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] L_0 = conserved[0,1] plt.figure(dpi=200) -plt.title('Error in Energy') -plt.plot(t, np.abs(energy-energy_0)) -plt.ylabel(r'$| H(t,p,q) - H(t_0,p_0,q_0) |$') +plt.title('Energy') +plt.plot(t, np.abs(energy)) +plt.ylabel('H(t,p,q)') plt.xlabel('<--- t --->') plt.xscale('log') -plt.yscale('log') plt.savefig('ark_kepler_energy.png') plt.close() plt.figure(dpi=200) -plt.title('Error in Momentum') +plt.title('Momentum') +plt.plot(t, L) +plt.ylabel('L(t,p,q)') +plt.xlabel('<--- t --->') +plt.xscale('log') +plt.savefig('ark_kepler_momentum.png') +plt.close() + +plt.figure(dpi=200) +plt.title('Error in Energy, Momentum') +plt.plot(t, np.abs(energy-energy_0)) plt.plot(t, np.abs(L-L_0)) -plt.ylabel(r'$| L(t,p,q) - L(t_0,p_0,q_0) |$') +plt.ylabel('Error') plt.xlabel('<--- t --->') plt.xscale('log') plt.yscale('log') -plt.savefig('ark_kepler_momentum.png') +plt.legend([r'$|H(t,p,q)-H(t_0,p_0,q_0)|$', r'$|L(t,p,q)-L(t_0,p_0,q_0)|$']) +plt.savefig('ark_kepler_error_energy_momentum.png') plt.close() -# # Step history -# hhist = np.loadtxt('ark_kepler_hhist_erk-4-dt-0.010000.txt', dtype=np.float64) -# plt.figure(dpi=200) -# plt.title('Step Size History') -# plt.plot(t[:-1], hhist) -# plt.xlabel('<--- t --->') -# plt.yscale('log') -# plt.savefig('ark_kepler_hhist.png') -# plt.close() +# Step history +hhist = np.loadtxt('ark_kepler_hhist_sprk-2-dt-2.00e-02.txt', delimiter=',', dtype=np.float64) +plt.figure(dpi=200) +plt.title('Step Size History and Control Error') +plt.plot(t[:-1], hhist[:,0]) +plt.plot(t[:-1], hhist[:,1]) +plt.xlabel('<--- t --->') +plt.legend(['step size', 'control error']) +plt.yscale('log') +plt.savefig('ark_kepler_control.png') +plt.close() # # Time plot. @@ -75,7 +87,7 @@ plt.legend(['P', 'P\'', 'Q', 'Q\'']) plt.xlabel('<--- t --->') plt.ylabel('<--- y(1:4) --->') -plt.title('ark_kepler: Time Plot') +plt.title('Solution in Time') plt.savefig('ark_kepler_plot.png') plt.close() @@ -83,10 +95,10 @@ # Phase plot. # plt.figure(dpi=200) -plt.plot(y[:,0], y[:,1], linewidth = 2) +plt.plot(y[:,0], y[:,1], linewidth=0.1) plt.grid(True) plt.xlabel('<--- y1 --->') plt.ylabel('<--- y2 --->') -plt.title('ark_kepler: Phase Plot') +plt.title('Phase Plot') plt.savefig('ark_kepler_phase.png') plt.close() diff --git a/examples/arkode/C_serial/ark_kepler_plot_all.py b/examples/arkode/C_serial/ark_kepler_plot_compare.py similarity index 56% rename from examples/arkode/C_serial/ark_kepler_plot_all.py rename to examples/arkode/C_serial/ark_kepler_plot_compare.py index dbb2443320..f8a2c4b6a5 100755 --- a/examples/arkode/C_serial/ark_kepler_plot_all.py +++ b/examples/arkode/C_serial/ark_kepler_plot_compare.py @@ -13,11 +13,11 @@ def load_results(case): # sprk1 = load_results('_sprk-1') # sprk2 = load_results('_sprk-2') # sprk3 = load_results('_sprk-3') -sprk4 = load_results('_sprk-4-dt-0.010000') +sprk4 = load_results('_sprkinc-4-dt-1.00e-01') # sprk5 = load_results('_sprk-5') # erk2 = load_results('_erk-2') # erk3 = load_results('_erk-3') -erk4 = load_results('_erk-4-dt-0.010000') +erk4 = load_results('_sprk-4-dt-1.00e-01') # erk5 = load_results('_erk-8') all_to_compare = [] @@ -35,15 +35,10 @@ def load_results(case): # all_to_compare.append(sprkinc3) legend = [] -# legend.append(r'$O(h^1)$ SPRK') -# legend.append(r'$O(h^2)$ SPRK') -# legend.append(r'$O(h^3)$ SPRK') -legend.append(r'$O(h^4)$ SPRK') -# legend.append(r'$O(h^5)$ SPRK') -# legend.append(r'$O(h^2)$ ERK') -# legend.append(r'$O(h^3)$ ERK') -legend.append(r'$O(h^4)$ ERK') -# legend.append(r'$O(h^5)$ ERK') +legend.append(r'$O(h^4)$ SPRK error in E') +legend.append(r'$O(h^4)$ ERK error in E') +legend.append(r'$O(h^4)$ SPRK error in L') +legend.append(r'$O(h^4)$ ERK error in L') h = 0.01 t = erk4[0] @@ -57,16 +52,6 @@ def load_results(case): energy_0 = np.array(energy_0) energy_diff = np.abs(energy.T - energy_0) -plt.figure(dpi=200) -plt.title('Error in Energy') -plt.plot(t, energy_diff) -plt.ylabel(r'$| H(t,p,q) - H(t_0,p_0,q_0) |$') -plt.xlabel('<--- t --->') -plt.xscale('log') -plt.yscale('log') -plt.legend(legend) -plt.savefig('ark_kepler_energy_compare.png') - momentum = [] momentum_0 = [] for _, _, consv in all_to_compare: @@ -77,14 +62,16 @@ def load_results(case): momentum_diff = np.abs(momentum.T - momentum_0) plt.figure(dpi=200) -plt.title('Error in Momentum, h = %g' % h) -plt.plot(t, momentum_diff) -plt.ylabel(r'$| L(t,p,q) - L(t_0,p_0,q_0) |$') +plt.title('Error in Momentum') +# plt.plot(t, np.abs(energy_diff)) +plt.plot(t, np.abs(momentum_diff)) +plt.ylabel('Error') plt.xlabel('<--- t --->') plt.xscale('log') plt.yscale('log') plt.legend(legend) -plt.savefig('ark_kepler_momentum_compare.png') +plt.savefig('ark_kepler_error_energy_momentum_comparison.png') +plt.close() # _, sol1, _ = sprk1 # _, sol2, _ = sprkinc1 @@ -100,33 +87,33 @@ def load_results(case): # plt.legend(legend) # plt.savefig('ark_kepler_phase_compare.png') -# -# Time plot. -# -plt.figure(dpi=200) -for _, y, _ in all_to_compare: - plt.plot(t, y[:,0], linewidth = 2) - plt.plot(t, y[:,1], linewidth = 2) - plt.plot(t, y[:,2], linewidth = 2) - plt.plot(t, y[:,3], linewidth = 2) -plt.legend(legend) -plt.grid(True) -plt.xlabel('<--- t --->') -plt.ylabel('<--- y(1:4) --->') -plt.title('ark_kepler: Solution in Time') -plt.savefig('ark_kepler_solution_compare.png') -plt.close() +# # +# # Time plot. +# # +# plt.figure(dpi=200) +# for _, y, _ in all_to_compare: +# plt.plot(t, y[:,0], linewidth = 2) +# plt.plot(t, y[:,1], linewidth = 2) +# plt.plot(t, y[:,2], linewidth = 2) +# plt.plot(t, y[:,3], linewidth = 2) +# plt.legend(legend) +# plt.grid(True) +# plt.xlabel('<--- t --->') +# plt.ylabel('<--- y(1:4) --->') +# plt.title('ark_kepler: Solution in Time') +# plt.savefig('ark_kepler_solution_compare.png') +# plt.close() -# -# Phase plot. -# -plt.figure(dpi=200) -for _, y, _ in all_to_compare: - plt.plot(y[:,0], y[:,1], linewidth = 2) -plt.legend(legend) -plt.grid(True) -plt.xlabel('<--- y1 --->') -plt.ylabel('<--- y2 --->') -plt.title('ark_kepler: Phase Plot') -plt.savefig('ark_kepler_phase_compare.png') -plt.close() +# # +# # Phase plot. +# # +# plt.figure(dpi=200) +# for _, y, _ in all_to_compare: +# plt.plot(y[:,0], y[:,1], linewidth = 2) +# plt.legend(legend) +# plt.grid(True) +# plt.xlabel('<--- y1 --->') +# plt.ylabel('<--- y2 --->') +# plt.title('ark_kepler: Phase Plot') +# plt.savefig('ark_kepler_phase_compare.png') +# plt.close() diff --git a/examples/arkode/C_serial/ark_kepler_work_precision.py b/examples/arkode/C_serial/ark_kepler_work_precision.py new file mode 100755 index 0000000000..05da1ac9ee --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_work_precision.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python + +import numpy as np +import matplotlib.pyplot as plt +import matplotlib.lines as lines +import seaborn as sns + +def load_results(case): + t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) + y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) + y = np.reshape(y, (y.shape[0]//4, 4)) + conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) + return t, y, conserved + +def compute_energy_err(case): + _, sol, consv = case + energy = consv[:,0] + energy_0 = consv[0,0] + return np.max(np.abs(energy - energy_0)) + +def compute_momentum_err(case): + _, sol, consv = case + momentum = consv[:,1] + momentum_0 = consv[0,1] + return np.max(np.abs(momentum - momentum_0)) + +sprk = [] +erk = [] +# sprk.append((1000010909,load_results('_sprk-1-dt-1.00e-05'))) +# sprk.append((100006814, load_results('_sprk-1-dt-1.00e-04'))) +# sprk.append((10004035, load_results('_sprk-1-dt-1.00e-03'))) +# sprk.append((1003175, load_results('_sprk-1-dt-1.00e-02'))) +# sprk.append((200010444,load_results('_sprk-2-dt-1.00e-04'))) +# sprk.append((20004886, load_results('_sprk-2-dt-1.00e-03'))) +# sprk.append((2003183, load_results('_sprk-2-dt-1.00e-02'))) +# sprk.append((203098, load_results('_sprk-2-dt-1.00e-01'))) +sprk.append((400017704,load_results('_sprk-4-dt-1.00e-04'))) +sprk.append((40006588, load_results('_sprk-4-dt-1.00e-03'))) +sprk.append((4003184, load_results('_sprk-4-dt-1.00e-02'))) +sprk.append((403163, load_results('_sprk-4-dt-1.00e-01'))) +erk.append((581420890, load_results('_erk-4-dt-1.00e-16'))) +erk.append((58012802, load_results('_erk-4-dt-1.00e-12'))) +erk.append((5823147, load_results('_erk-4-dt-1.00e-08'))) +erk.append((633933, load_results('_erk-4-dt-1.00e-04'))) + +legend = [] +legend.append(r'$O(h^4) ERK$') +legend.append(r'$O(h^4) SPRK$') + +blue_star = lines.Line2D([], [], color='blue', marker='*', linestyle='None', + markersize=10, label='Blue stars') +red_square = lines.Line2D([], [], color='red', marker='s', linestyle='None', + markersize=10, label='Red squares') + +plt.figure(dpi=200) +plt.title('Work vs Precision') +for work, method in erk: + plt.scatter(compute_energy_err(method), work, color='b', marker='*', label=r'$O(h^4) ERK$') + # plt.scatter(compute_momentum_err(method), work, color='b', marker='o', label=r'$O(h^4) ERK$') +for work, method in sprk: + plt.scatter(compute_energy_err(method), work, color='r', marker='s', label=r'$O(h^4) SPRK$') + # plt.scatter(compute_momentum_err(method), work, color='r', marker='^', label=r'$O(h^4) SPRK$') +plt.xscale('log') +plt.yscale('log') +plt.ylabel('Number of function evals.') +plt.xlabel('Error in Energy') +plt.legend(labels=legend, handles=[blue_star, red_square]) +plt.savefig('ark_kepler_work_precision.png') diff --git a/examples/arkode/C_serial/ark_kepler_work_precision_comp.py b/examples/arkode/C_serial/ark_kepler_work_precision_comp.py new file mode 100755 index 0000000000..934a539b74 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_work_precision_comp.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python + +import numpy as np +import matplotlib.pyplot as plt +import matplotlib.lines as lines +import seaborn as sns + +def load_results(case): + t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) + y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) + y = np.reshape(y, (y.shape[0]//4, 4)) + conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) + return t, y, conserved + +def compute_energy_err(case): + _, sol, consv = case + energy = consv[:,0] + energy_0 = consv[0,0] + return np.max(np.abs(energy - energy_0)) + +def compute_momentum_err(case): + _, sol, consv = case + momentum = consv[:,1] + momentum_0 = consv[0,1] + return np.max(np.abs(momentum - momentum_0)) + +sprk = [] +sprkinc = [] +sprk.append((105.695, load_results('_sprk-6-dt-1.00e-03'))) +sprk.append((12.773, load_results('_sprk-6-dt-1.00e-02'))) +sprk.append((3.706, load_results('_sprk-6-dt-1.00e-01'))) +sprk.append((66.015, load_results('_sprk-4-dt-1.00e-03'))) +sprk.append((6.772, load_results('_sprk-4-dt-1.00e-02'))) +sprk.append((3.646, load_results('_sprk-4-dt-1.00e-01'))) +sprk.append((45.116, load_results('_sprk-2-dt-1.00e-03'))) +sprk.append((6.707, load_results('_sprk-2-dt-1.00e-02'))) +sprk.append((3.439, load_results('_sprk-2-dt-1.00e-01'))) +sprkinc.append((137.000, load_results('_sprkinc-6-dt-1.00e-03'))) +sprkinc.append((15.720, load_results('_sprkinc-6-dt-1.00e-02'))) +sprkinc.append((4.165, load_results('_sprkinc-6-dt-1.00e-01'))) +sprkinc.append((84.957, load_results('_sprkinc-4-dt-1.00e-03'))) +sprkinc.append((10.859, load_results('_sprkinc-4-dt-1.00e-02'))) +sprkinc.append((3.597, load_results('_sprkinc-4-dt-1.00e-01'))) +sprkinc.append((59.029, load_results('_sprkinc-2-dt-1.00e-03'))) +sprkinc.append((8.100, load_results('_sprkinc-2-dt-1.00e-02'))) +sprkinc.append((3.514, load_results('_sprkinc-2-dt-1.00e-01'))) + +legend = [] +legend.append(r'$O(h^4)$ SPRK Compensated') +legend.append(r'$O(h^4) SPRK$') + +blue_star = lines.Line2D([], [], color='blue', marker='*', linestyle='None', + markersize=10, label='Blue stars') +red_square = lines.Line2D([], [], color='red', marker='s', linestyle='None', + markersize=10, label='Red squares') + +plt.figure(dpi=200) +plt.title('Work vs Precision') +for work, method in sprkinc: + plt.scatter(compute_energy_err(method), work, color='b', marker='*', label=r'$O(h^4) sprkinc$') + # plt.scatter(compute_momentum_err(method), work, color='b', marker='o', label=r'$O(h^4) sprkinc$') +for work, method in sprk: + plt.scatter(compute_energy_err(method), work, color='r', marker='s', label=r'$O(h^4) SPRK$') + # plt.scatter(compute_momentum_err(method), work, color='r', marker='^', label=r'$O(h^4) SPRK$') +plt.xscale('log') +plt.yscale('log') +plt.ylabel('Number of function evals.') +plt.xlabel('Error in Energy') +plt.legend(labels=legend, handles=[blue_star, red_square]) +plt.savefig('ark_kepler_work_precision.png') From 78fb0eb79f11a47dd5d7f3e2a1fa3239bf153224 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sun, 23 Apr 2023 14:33:23 -0700 Subject: [PATCH 048/177] fix adaptive step control (sort-of) --- examples/arkode/C_serial/ark_kepler.c | 140 ++++++++++---------- examples/arkode/C_serial/ark_kepler_plot.py | 8 +- src/arkode/arkode.c | 1 + src/arkode/arkode_adapt.c | 8 ++ src/arkode/arkode_impl.h | 2 +- 5 files changed, 86 insertions(+), 73 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index ab060d8f98..514af7c644 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -35,24 +35,23 @@ * * The program also accepts command line arguments to change the method * used and time-stepping strategy. The program can be run like so - * ./ark_kepler [step mode] [method family] [method order/variant] [dt] [compensated sums] - * where - * [step mode] = 0 uses a fixed time step dt - * [step mode] = 1 uses adaptive time stepping - * [method family] = 0 indicates a SPRK method should be used - * [method family] = 1 indicates an ERK method should be used - * [method order] in {1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10} indicates the method order, - * and for 2nd, 3rd, and 4th order SPRK, the variant of the method family to use. I.e., - * when method family = 1, then: - * 1 - Symplectic Euler, 2 - 2nd order Leapfrog, 22 - 2nd order Pseudo Leapfrog, - * 222 - 2nd order McLachlan, 3 - 3rd order Ruth, 33 - 3rd order McLachlan, - * 4 - 4th order Candy-Rozmus, 44 - 4th order McLachlan, 5 - 5th order McLachlan, - * 6 - 6th order Yoshida, 8 - 8th order McLachlan, 10 - 10th order Sofroniou - * When method family = 1, then method order just is the order of the ERK method. - * [dt] - time step size for fixed-step time stepping, or when using adaptivity the - * constant which bounds the error like O(eps^p) where p is the method order. - * [compensated sums] = 0, dont use compensated summation for greater accuracy when using SPRK methods - * [compensated sums] = 1, use compensated summation for greater accuracy when using SPRK methods + * ./ark_kepler [step mode] [method family] [method order/variant] [dt] + * [compensated sums] where [step mode] = 0 uses a fixed time step dt [step + * mode] = 1 uses adaptive time stepping [method family] = 0 indicates a SPRK + * method should be used [method family] = 1 indicates an ERK method should be + * used [method order] in {1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10} indicates + * the method order, and for 2nd, 3rd, and 4th order SPRK, the variant of the + * method family to use. I.e., when method family = 1, then: 1 - Symplectic + * Euler, 2 - 2nd order Leapfrog, 22 - 2nd order Pseudo Leapfrog, 222 - 2nd + * order McLachlan, 3 - 3rd order Ruth, 33 - 3rd order McLachlan, 4 - 4th order + * Candy-Rozmus, 44 - 4th order McLachlan, 5 - 5th order McLachlan, 6 - 6th + * order Yoshida, 8 - 8th order McLachlan, 10 - 10th order Sofroniou When method + * family = 1, then method order just is the order of the ERK method. [dt] - + * time step size for fixed-step time stepping, or when using adaptivity the + * constant which bounds the error like O(eps^p) where p is the method + * order. [compensated sums] = 0, dont use compensated summation for greater + * accuracy when using SPRK methods [compensated sums] = 1, use compensated + * summation for greater accuracy when using SPRK methods * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner @@ -73,6 +72,7 @@ #include #include #include + #include "arkode/arkode.h" static int check_retval(void* returnvalue, const char* funcname, int opt); @@ -84,13 +84,14 @@ static sunrealtype AngularMomentum(N_Vector y); static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); -static int rootfn(sunrealtype t, N_Vector y, sunrealtype *gout, void* user_data); +static int rootfn(sunrealtype t, N_Vector y, sunrealtype* gout, void* user_data); static sunrealtype Q(N_Vector yvec, sunrealtype alpha); static sunrealtype G(N_Vector yvec, sunrealtype alpha); static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, sunrealtype h3, sunrealtype e1, sunrealtype e2, sunrealtype e3, int q, int p, sunrealtype* hnew, void* user_data); +static sunrealtype ControlError(N_Vector yvec, void* user_data); typedef struct { @@ -99,10 +100,10 @@ typedef struct /* for time-step control */ sunrealtype eps; sunrealtype alpha; - sunrealtype rho_nmhalf; + sunrealtype rho_0; sunrealtype rho_nphalf; sunrealtype rho_n; - sunrealtype rho_np1; + sunrealtype Q0; FILE* hhist_fp; } * UserData; @@ -118,14 +119,14 @@ int main(int argc, char* argv[]) void* arkode_mem; FILE *conserved_fp, *solution_fp, *times_fp; int argi, iout, retval; - int rootsfound = 0; + int rootsfound = 0; NLS = NULL; y = NULL; /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(1000.0); + sunrealtype Tf = SUN_RCONST(50.0); sunrealtype dt = SUN_RCONST(1e-2); const sunrealtype ecc = SUN_RCONST(0.6); @@ -134,7 +135,7 @@ int main(int argc, char* argv[]) int method = 0; int order = 4; int use_compsums = 0; - const sunrealtype dTout = SUN_RCONST(1.); + const sunrealtype dTout = 10*dt; // SUN_RCONST(1.); const int num_output_times = (int)ceil(Tf / dTout); printf("\n Begin Kepler Problem\n\n"); @@ -152,14 +153,12 @@ int main(int argc, char* argv[]) udata->ecc = ecc; /* Adaptivity controller parameters */ /* Controller's integral gain. Increasing this will result in a higher - rate of change in the step size, while decreasing it will result in + rate of change in the step size, while decreasing it will result in a lower rate of change. */ udata->alpha = SUN_RCONST(3.0) / SUN_RCONST(2.0); /* Controller's set-point. The error in the Hamiltonian is bounded by * O(eps^p) where p is the method order. */ - udata->eps = dt; - /* Controller step density initial value. */ - udata->rho_n = SUN_RCONST(1.0); + udata->eps = dt; /* Create the SUNDIALS context object for this simulation */ retval = SUNContext_Create(NULL, &sunctx); @@ -258,14 +257,15 @@ int main(int argc, char* argv[]) } else { - /* Adaptivity based on https://doi.org/10.1137/04060699 (Hairer and + /* Adaptivity based on https://doi.org/10.1137/04060699 (Hairer and * Soderlind, 2005). */ retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); if (check_retval(&retval, "SPRKStepSetAdaptivityFn", 1)) return 1; - udata->rho_nmhalf = udata->rho_n - + /* Compute the initial advance of rho_nphalf */ + udata->rho_0 = SUN_RCONST(1.0) / Q(y, udata->alpha); + udata->rho_nphalf = udata->rho_0 + udata->eps * G(y, udata->alpha) / SUN_RCONST(2.0); - udata->rho_nphalf = udata->rho_nmhalf + udata->eps * G(y, udata->alpha); retval = SPRKStepSetInitStep(arkode_mem, udata->eps / udata->rho_nphalf); if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; @@ -309,8 +309,7 @@ int main(int argc, char* argv[]) if (step_mode == 0) { retval = ARKStepSetFixedStep(arkode_mem, dt); } else { - retval = ARKStepSStolerances(arkode_mem, 100 * SUN_UNIT_ROUNDOFF, - 100 * SUN_UNIT_ROUNDOFF); + retval = ARKStepSStolerances(arkode_mem, dt, dt); if (check_retval(&retval, "ARKStepSStolerances", 1)) return 1; } } @@ -318,10 +317,10 @@ int main(int argc, char* argv[]) /* Open output files */ if (method == 0) { - const char* fmt1 = "ark_kepler_conserved_sprk-%d-dt-%.6f.txt"; - const char* fmt2 = "ark_kepler_solution_sprk-%d-dt-%.6f.txt"; - const char* fmt3 = "ark_kepler_times_sprk-%d-dt-%.6f.txt"; - const char* fmt4 = "ark_kepler_hhist_sprk-%d-dt-%.6f.txt"; + const char* fmt1 = "ark_kepler_conserved_sprk-%d-dt-%.2e.txt"; + const char* fmt2 = "ark_kepler_solution_sprk-%d-dt-%.2e.txt"; + const char* fmt3 = "ark_kepler_times_sprk-%d-dt-%.2e.txt"; + const char* fmt4 = "ark_kepler_hhist_sprk-%d-dt-%.2e.txt"; char fname[64]; sprintf(fname, fmt1, order, dt); conserved_fp = fopen(fname, "w+"); @@ -334,9 +333,9 @@ int main(int argc, char* argv[]) } else { - const char* fmt1 = "ark_kepler_conserved_erk-%d-dt-%.6f.txt"; - const char* fmt2 = "ark_kepler_solution_erk-%d-dt-%.6f.txt"; - const char* fmt3 = "ark_kepler_times_erk-%d-dt-%.6f.txt"; + const char* fmt1 = "ark_kepler_conserved_erk-%d-dt-%.2e.txt"; + const char* fmt2 = "ark_kepler_solution_erk-%d-dt-%.2e.txt"; + const char* fmt3 = "ark_kepler_times_erk-%d-dt-%.2e.txt"; char fname[64]; sprintf(fname, fmt1, order, dt); conserved_fp = fopen(fname, "w+"); @@ -347,20 +346,18 @@ int main(int argc, char* argv[]) } /* Print out starting energy, momentum before integrating */ - tret = T0; - tout = T0 + dTout; - H0 = Hamiltonian(y); - L0 = AngularMomentum(y); - sunrealtype Q0 = Q(y, udata->alpha) / udata->rho_n; + tret = T0; + tout = T0 + dTout; + H0 = Hamiltonian(y); + L0 = AngularMomentum(y); + udata->Q0 = Q(y, udata->alpha); fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf, Q(p,q) = %.16Lf\n", - tret, H0, L0, Q0); + tret, H0, L0, udata->Q0); fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); N_VPrintFile(y, solution_fp); - N_Vector dky = N_VClone(y); - /* Do integration */ if (method == 0) { @@ -371,32 +368,30 @@ int main(int argc, char* argv[]) SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - if (retval == ARK_ROOT_RETURN) { + if (retval == ARK_ROOT_RETURN) + { fprintf(stdout, "ROOT RETURN:\t"); SPRKStepGetRootInfo(arkode_mem, &rootsfound); fprintf(stdout, "t = %.4Lf g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg\n", tret, rootsfound, N_VGetArrayPointer(y)[0], N_VGetArrayPointer(y)[1]); fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, - Q(y, udata->alpha) / udata->rho_np1 - Q0); + ControlError(y, udata)); /* Continue to tout */ retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); } - /* Show what happens when you do dense output */ - SPRKStepGetDky(arkode_mem, tret-SUN_RCONST(0.1)*dt, 0, dky); - /* Output current integration status */ fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret-SUN_RCONST(0.5)*dt, Hamiltonian(dky) - H0, AngularMomentum(dky) - L0, - Q(y, udata->alpha) / udata->rho_np1 - Q0); + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, + ControlError(y, udata)); fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(dky), - AngularMomentum(dky)); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), + AngularMomentum(y)); SPRKStepGetLastStep(arkode_mem, &hlast); - fprintf(udata->hhist_fp, "%.16Lf\n", hlast); + fprintf(udata->hhist_fp, "%.16Lf, %.16Lf\n", hlast, ControlError(y, udata)); N_VPrintFile(y, solution_fp); /* Check if the solve was successful, if so, update the time and continue @@ -420,14 +415,15 @@ int main(int argc, char* argv[]) ARKStepSetStopTime(arkode_mem, tout); retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - if (retval == ARK_ROOT_RETURN) { + if (retval == ARK_ROOT_RETURN) + { fprintf(stdout, "ROOT RETURN:\t"); ARKStepGetRootInfo(arkode_mem, &rootsfound); fprintf(stdout, "t = %.4Lf g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg\n", tret, rootsfound, N_VGetArrayPointer(y)[0], N_VGetArrayPointer(y)[1]); fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, - Q(y, udata->alpha) / udata->rho_np1 - Q0); + ControlError(y, udata)); /* Continue to tout */ retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); @@ -436,7 +432,7 @@ int main(int argc, char* argv[]) /* Output current integration status */ fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, - Q(y, udata->alpha) / udata->rho_np1 - Q0); + ControlError(y, udata)); fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); @@ -560,7 +556,7 @@ int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) return 0; } -int rootfn(sunrealtype t, N_Vector yvec, sunrealtype *gout, void* user_data) +int rootfn(sunrealtype t, N_Vector yvec, sunrealtype* gout, void* user_data) { UserData udata = (UserData)user_data; sunrealtype* y = N_VGetArrayPointer(yvec); @@ -598,7 +594,7 @@ sunrealtype Q(N_Vector yvec, sunrealtype alpha) const sunrealtype qTq = q1 * q1 + q2 * q2; - return SUNRpowerR(qTq, -alpha / SUN_RCONST(2.0)); + return SUNRpowerR(qTq, alpha / SUN_RCONST(2.0)); } int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, @@ -607,17 +603,25 @@ int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, { UserData udata = (UserData)user_data; - const sunrealtype G_np1 = G(y, udata->alpha); - udata->rho_np1 = udata->rho_nphalf + udata->eps * G_np1 / SUN_RCONST(2.0); + /* When we enter this function, we are have already computed y_n+1 and are + * preparing for the next step. */ + sunrealtype Gyn = G(y, udata->alpha); + udata->rho_n = udata->rho_nphalf + udata->eps * Gyn / SUN_RCONST(2.0); + udata->rho_nphalf = udata->rho_n + udata->eps * Gyn / SUN_RCONST(2.0); - udata->rho_nmhalf = udata->rho_nphalf; - const sunrealtype rho_nphalf_next = udata->rho_nmhalf + udata->eps * G_np1; + *hnew = udata->eps / udata->rho_nphalf; - *hnew = udata->eps / rho_nphalf_next; + // fprintf(stderr, "<<< hnew =%g\n", (double) *hnew); return 0; } +sunrealtype ControlError(N_Vector yvec, void* user_data) +{ + UserData udata = (UserData)user_data; + return udata->rho_n * Q(yvec, udata->alpha) - udata->rho_0 * udata->Q0; +} + /* Check function return value... opt == 0 means SUNDIALS function allocates memory so check if returned NULL pointer diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index 9ede7b6a71..abbd4d6ddf 100755 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -18,8 +18,8 @@ import numpy as np import matplotlib.pyplot as plt -t = np.loadtxt('ark_kepler_times_sprk-2-dt-2.00e-02.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_sprk-2-dt-2.00e-02.txt', dtype=np.float64) +t = np.loadtxt('ark_kepler_times_sprk-4-dt-5.00e-02.txt', dtype=np.float64) +y = np.loadtxt('ark_kepler_solution_sprk-4-dt-5.00e-02.txt', dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) @@ -27,7 +27,7 @@ plt.savefig('ark_kepler_phase.png') plt.close() -conserved = np.loadtxt('ark_kepler_conserved_sprk-2-dt-2.00e-02.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt('ark_kepler_conserved_sprk-4-dt-5.00e-02.txt', delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] @@ -64,7 +64,7 @@ plt.close() # Step history -hhist = np.loadtxt('ark_kepler_hhist_sprk-2-dt-2.00e-02.txt', delimiter=',', dtype=np.float64) +hhist = np.loadtxt('ark_kepler_hhist_sprk-4-dt-5.00e-02.txt', delimiter=',', dtype=np.float64) plt.figure(dpi=200) plt.title('Step Size History and Control Error') plt.plot(t[:-1], hhist[:,0]) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index f35b4f703b..7bd3362249 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -726,6 +726,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, for(;;) { ark_mem->next_h = ark_mem->h; + // fprintf(stderr, ">>> next_h=%g\n", (double) ark_mem->next_h); /* Reset and check ewt and rwt */ if (!ark_mem->initsetup) { diff --git a/src/arkode/arkode_adapt.c b/src/arkode/arkode_adapt.c index 617681e9f5..8155ceae66 100644 --- a/src/arkode/arkode_adapt.c +++ b/src/arkode/arkode_adapt.c @@ -20,6 +20,7 @@ #include #include +#include "arkode/arkode.h" #include "arkode_impl.h" #include #include @@ -165,6 +166,13 @@ int arkAdapt(void* arkode_mem, ARKodeHAdaptMem hadapt_mem, return (ARK_ILL_INPUT); } + /* TODO(CJB): with the Symplectic controller, I want ARKODE to take exactly the step my adaptivity function says to take. */ + if (hadapt_mem->imethod == ARK_ADAPT_CUSTOM) { + ark_mem->eta = ONE; + ark_mem->h = h_acc; + return ARK_SUCCESS; + } + /* determine direction of integration */ int_dir = hcur / SUNRabs(hcur); diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index a22681de00..c64df86e8f 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -346,7 +346,7 @@ typedef struct ARKodeMemRec { realtype hmax_inv; /* |h| <= 1/hmax_inv */ realtype hprime; /* next actual step size to be used */ realtype next_h; /* next dynamical step size (only used in - getCurrenStep); note that this could + getCurrentStep); note that this could overtake tstop */ realtype eta; /* eta = hprime / h */ realtype tcur; /* current internal value of t From 0f2eedd813c32e58999e332eb9438ca2eced85cc Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 8 Jun 2023 16:55:15 -0700 Subject: [PATCH 049/177] docs --- doc/arkode/guide/source/Mathematics.rst | 22 +++++++++++ .../Usage/SPRKStep_c_interface/Skeleton.rst | 0 .../Usage/SPRKStep_c_interface/index.rst | 39 +++++++++++++++++++ doc/arkode/guide/source/Usage/index.rst | 9 +++-- 4 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst create mode 100644 doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 38c36b0c24..5379bd05d4 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -460,6 +460,28 @@ simplified form admits a more efficient and memory-friendly implementation than the more general form :eq:`ARKODE_IVP_simple_explicit`. +.. _ARKODE.Mathematics.SPRKStep: + +SPRKStep -- Symplectic Partitioned Runge--Kutta methods +======================================================= + +The SPRKStep time-stepping module in ARKODE is designed for IVPs of the form + +.. math:: + \dot{y} = [\dot{p}, \dot{q}]^T, \quad + \dot{p} = f(q,t) = \frac{\partial V(q,t)}{\partial q}, \quad + \dot{q} = g(p) = \frac{\partial T(p)}{\partial p}, + \qquad y(t_0) = [p_0, q_0]^T,\quad p(t_0) = p_0,\quad q(t_0) = q_0, + :label: ARKODE_IVP_Hamiltonian + +where + +.. math:: + H(p, q, t) = T(p) + V(q, t) + +is a separable Hamiltonian. Symplectic Partitioned Runge-Kutta (SPRK) methods approximately conserve a nearby Hamiltonian for +exponentially long times (((CITE))). For separable Hamiltonian problems, SPRK methids are also explicit. + .. _ARKODE.Mathematics.MRIStep: MRIStep -- Multirate infinitesimal step methods diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst new file mode 100644 index 0000000000..e69de29bb2 diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst new file mode 100644 index 0000000000..dbe4a5ff38 --- /dev/null +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst @@ -0,0 +1,39 @@ +.. ---------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2002-2023, Lawrence Livermore National Security + and Southern Methodist University. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ---------------------------------------------------------------- + +.. _ARKODE.Usage.SPRKStep: + +========================================== +Using the SPRKStep time-stepping module +========================================== + +This chapter is concerned with the use of the SPRKStep time-stepping module for +the solution of Hamiltonian initial value problems (IVPs) of the form +:eq:`ARKODE_IVP_Hamiltonian` in a C or C++ language setting. The following sections +discuss the header files and the layout of the user's main program, and provide +descriptions of the SPRKStep user-callable functions and user-supplied functions. + +The example programs located in the source code ``examples/arkode`` folder, may +be helpful as templates for new codes. + +SPRKStep uses the input and output constants from the shared ARKODE infrastructure. +These are defined as needed in this chapter, but for convenience the full list is +provided separately in :numref:`ARKODE.Constants`. + +The relevant information on using SPRKStep's C and C++ interfaces is +detailed in the following subsections. + +.. toctree:: + :maxdepth: 1 + + Skeleton + User_callable diff --git a/doc/arkode/guide/source/Usage/index.rst b/doc/arkode/guide/source/Usage/index.rst index e2e3657089..9fffdaa5ee 100644 --- a/doc/arkode/guide/source/Usage/index.rst +++ b/doc/arkode/guide/source/Usage/index.rst @@ -22,10 +22,10 @@ each of ARKODE's time-stepping modules, including locations and naming conventions for the library and header files, and discussion of data types in SUNDIALS. We then separately discuss the C and C++ interfaces to each of ARKODE's time stepping modules: :ref:`ARKStep `, -:ref:`ERKStep `, and :ref:`MRIStep -`. Following these, we describe set of :ref:`user-supplied -routines ` (both required and optional) that can be -supplied to ARKODE. +:ref:`ERKStep `, :ref:`SPRKStep ` +and :ref:`MRIStep `. Following these, we describe set of +:ref:`user-supplied routines ` +(both required and optional) that can be supplied to ARKODE. .. toctree:: :maxdepth: 1 @@ -33,5 +33,6 @@ supplied to ARKODE. General.rst ARKStep_c_interface/index.rst ERKStep_c_interface/index.rst + SPRKStep_c_interface/index.rst MRIStep_c_interface/index.rst User_supplied.rst From e60b8787c4c571381476b610eab1e8897c9a703e Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 9 Jun 2023 12:00:52 -0700 Subject: [PATCH 050/177] finish mathematics section --- doc/arkode/guide/source/Mathematics.rst | 111 ++++++++++++++++++++---- doc/shared/sundials.bib | 34 +++++++- 2 files changed, 127 insertions(+), 18 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 5379bd05d4..765a224dbb 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -468,19 +468,92 @@ SPRKStep -- Symplectic Partitioned Runge--Kutta methods The SPRKStep time-stepping module in ARKODE is designed for IVPs of the form .. math:: - \dot{y} = [\dot{p}, \dot{q}]^T, \quad \dot{p} = f(q,t) = \frac{\partial V(q,t)}{\partial q}, \quad \dot{q} = g(p) = \frac{\partial T(p)}{\partial p}, - \qquad y(t_0) = [p_0, q_0]^T,\quad p(t_0) = p_0,\quad q(t_0) = q_0, + \qquad p(t_0) = p_0,\quad q(t_0) = q_0, :label: ARKODE_IVP_Hamiltonian - + where .. math:: H(p, q, t) = T(p) + V(q, t) -is a separable Hamiltonian. Symplectic Partitioned Runge-Kutta (SPRK) methods approximately conserve a nearby Hamiltonian for -exponentially long times (((CITE))). For separable Hamiltonian problems, SPRK methids are also explicit. +is the system Hamiltonian. When :math:`dH/dt = 0`, i.e. when *H* is autonomous, then H is a conserved quantity. +Often this correponds to the conservation of energy (for example, in *n*-body problems). + +In solving the IVP :ref:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form + +.. math:: + \dot{y} = + \begin{bmatrix} + f(q,t) \\ + g(p) + \end{bmatrix} \qquad + y(t_0) = + \begin{bmatrix} + p_0\\ + q_0 + \end{bmatrix} + :label: ARKODE_IVP_Hamiltonian + +SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair of Butcher tableau, + +.. math:: + \begin{array}{c|cccc} + c_1 & 0 & \cdots & 0 & 0 \\ + c_2 & a_1 & 0 & \cdots & \vdots \\ + \vdots & \vdots & \ddots & \ddots & \vdots \\ + c_s & a_1 & \cdots & a_{s-1} & 0 \\ + \hline + & a_1 & \cdots & a_{s-1} & a_s + \end{array} + \qquad \qquad + \begin{array}{c|cccc} + C_1 & b_1 & \cdots & 0 & 0 \\ + C_2 & b_1 & b_2 & \cdots & \vdots \\ + \vdots & \vdots & \ddots & \ddots & \vdots \\ + C_s & b_1 & b_2 & \cdots & b_{s-1} \\ + \hline + & b_1 & b_2 & \cdots & b_{s-1} + \end{array} + +We use a compact storage of these coefficients in terms of two arrays, one for *a* and one for *b*. +The time weights are computed on the fly. These methods approximately conserve a nearby Hamiltonian +for exponentially long times :cite:p:`HaWa:06`. SPRKStep makes the assumption that the Hamiltonian is separable, +in which case the schemes are explicit. SPRKStep provides methods with order of accuracy and conservation +of :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these methods, and the default methods used, +are given in the section ???. + +In the default case, the algorithm for a single time-step is as follows + +#. Set :math:`P_0 = p_n, Q_1 = q_n` + +#. For :math:`i = 1,\ldots,s` do: + + #. :math:`P_i = P_{i-1} + h_{n+1} a_i f(Q_i, t_n + C_i h_{n+1})` + #. :math:`Q_{i+1} = Q_i + h_{n+1} b_i g(P_i)` + +#. Set :math:`p_{n+1} = P_s, q_{n+1} = Q_{s+1}` + +Optionally, a different algorithm can be used that is more robust to roundoff error at the expense of +additional storage and vector operations :cite:p:`Sof:03`. + +#. Set :math:`\Delta P_0 = 0, \Delta Q_1 = 0` + +#. For :math:`i = 1,\ldots,s` do: + + #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} a_i f(q_n + \Delta Q_i, t_n + C_i h_{n+1})` + #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} b_i g(p_n + \Delta P_i)` + +#. Set :math:`\Delta p_{n+1} = \Delta P_s, \Delta q_{n+1} = \Delta Q_{s+1}` + +#. Using compensated summation, set :math:`p_{n+1} = p_n + \Delta p_{n+1}, q_{n+1} = q_n + \Delta Q_{s+1}` + +Since temporal error based adaptive time-stepping is known to ruin the conservation property :cite:p:`HaWa:06`, +SPRKStep employs a fixed time-step size by default. However, it is possible for a user to provide a +problem-specific adaptivity controller such as the one described in :cite:p:`HaSo:05`. +The `ark_kepler.c` example demonstrates an implementation of such controller. + .. _ARKODE.Mathematics.MRIStep: @@ -1024,14 +1097,12 @@ Here the explicit stability step factor :math:`c>0` (often called the Fixed time stepping =================== -While both the ARKStep and ERKStep time-stepping modules are designed -for tolerance-based time step adaptivity, they additionally support a -"fixed-step" mode (*note: fixed-step mode is currently required for -the slow time scale in the MRIStep module*). This mode is typically -used for debugging purposes, for verification against hand-coded -Runge--Kutta methods, or for problems where the time steps should be -chosen based on other problem-specific information. In this mode, -all internal time step adaptivity is disabled: +While both the ARKStep and ERKStep time-stepping modules are +designed for tolerance-based time step adaptivity, they additionally support a +"fixed-step" mode. This mode is typically used for debugging +purposes, for verification against hand-coded Runge--Kutta methods, or for +problems where the time steps should be chosen based on other problem-specific +information. In this mode, all internal time step adaptivity is disabled: * temporal error control is disabled, @@ -1040,16 +1111,22 @@ all internal time step adaptivity is disabled: * no check against an explicit stability condition is performed. +.. note:: + Since temporal error based adaptive time-stepping is known to ruin the + conservation property of SPRK methods, the SPRKStep employs a fixed time-step + size by default. + +.. note:: + Fixed-step mode is currently required for the slow time scale in the MRIStep module. + Additional information on this mode is provided in the sections :ref:`ARKStep Optional Inputs `, -:ref:`ERKStep Optional Inputs `, and +:ref:`SPRKStep Optional Inputs `, +:ref:`MRIStep Optional Inputs `, and :ref:`MRIStep Optional Inputs `. - - - .. _ARKODE.Mathematics.AlgebraicSolvers: Algebraic solvers diff --git a/doc/shared/sundials.bib b/doc/shared/sundials.bib index d62f0d9c22..fe702d9159 100644 --- a/doc/shared/sundials.bib +++ b/doc/shared/sundials.bib @@ -443,7 +443,14 @@ @book{HaWa:91 title = {{Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems}}, publisher = {Springer-Verlag}, address = {Berlin}, -year = 1991 +year = 1991, +} +@book{HaWa:06, +author = {Hairer, Ernst and Wanner, Gerhard and Lubich, Christian}, +title = {{Geometric Numerical Integration, Structure-Preserving Algorithms for Ordinary Differential Equations}}, +publisher = {Springer Series in Computational Mathematics}, +doi = {10.1007/3-540-30666-8}, +year = {2006} } @article{GGL:85, author = {C.W. Gear and B. Leimkuhler and G.K. Gupta}, @@ -1765,6 +1772,17 @@ @article{DorPri:80 doi = {10.1016/0771-050X(80)90013-3} } +@article{HaSo:05, + title={Explicit, time reversible, adaptive step size control}, + author={Hairer, Ernst and S{\"o}derlind, Gustaf}, + journal={SIAM Journal on Scientific Computing}, + volume={26}, + number={6}, + pages={1838--1851}, + year={2005}, + publisher={SIAM} +} + @article{FFKMS:14, author = {Falgout, R.D. and Friedhoff, S. and Kolev, TZ.V. and MacLachlan, S.P. and Schroder, J.B.}, title = {Parallel Time Integration with Multigrid}, @@ -1966,6 +1984,20 @@ @article{Sod:06 doi = {10.1016/j.apnum.2005.04.026} } +@article{Sof:03, +title = {Increment formulations for rounding error reduction in the numerical solution of structured differential systems}, +journal = {Future Generation Computer Systems}, +volume = {19}, +number = {3}, +pages = {375-383}, +year = {2003}, +note = {Special Issue on Geometric Numerical Algorithms}, +issn = {0167-739X}, +doi = {https://doi.org/10.1016/S0167-739X(02)00164-4}, +url = {https://www.sciencedirect.com/science/article/pii/S0167739X02001644}, +author = {Mark Sofroniou and Giulia Spaletta} +} + @article{Ver:78, author = {Verner, J.H}, title = {Explicit Runge-Kutta methods with estimates of the local truncation error}, From 43c2c87ca92c3d092d29c37634cff08698318620 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 9 Jun 2023 15:11:25 -0700 Subject: [PATCH 051/177] cleanup unused functions and add their docs --- .../Usage/SPRKStep_c_interface/Skeleton.rst | 5 + .../SPRKStep_c_interface/User_callable.rst | 1411 +++++++++++++++++ examples/arkode/C_serial/ark_kepler.c | 2 +- include/arkode/arkode_sprkstep.h | 78 +- src/arkode/arkode_sprkstep_io.c | 152 -- 5 files changed, 1429 insertions(+), 219 deletions(-) create mode 100644 doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst index e69de29bb2..647938b0de 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst @@ -0,0 +1,5 @@ + +.. _ARKODE.Usage.SPRKStep.Skeleton: + +A skeleton of the user's main program +===================================== \ No newline at end of file diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst new file mode 100644 index 0000000000..020fa42f6b --- /dev/null +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -0,0 +1,1411 @@ +.. ---------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2002-2023, Lawrence Livermore National Security + and Southern Methodist University. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ---------------------------------------------------------------- + +.. _ARKODE.Usage.SPRKStep.UserCallable: + +SPRKStep User-callable functions +================================== + +This section describes the functions that are called by the +user to setup and then solve an IVP using the SPRKStep time-stepping +module. Some of these are required; however, starting with +:numref:`ARKODE.Usage.SPRKStep.OptionalInputs`, the functions listed involve +optional inputs/outputs or restarting, and those paragraphs may be +skipped for a casual use of ARKODE's SPRKStep module. In any case, +refer to the preceding section, :numref:`ARKODE.Usage.SPRKStep.Skeleton`, +for the correct order of these calls. + +On an error, each user-callable function returns a negative value (or +``NULL`` if the function returns a pointer) and sends an error message +to the error handler routine, which prints the message to ``stderr`` +by default. However, the user can set a file as error output or can +provide her own error handler function (see +:numref:`ARKODE.Usage.SPRKStep.OptionalInputs` for details). + + + +.. _ARKODE.Usage.SPRKStep.Initialization: + +SPRKStep initialization and deallocation functions +------------------------------------------------------ + + +.. c:function:: void* SPRKStepCreate(ARKRhsFn f, ARKRhsFn g, realtype t0,\ + N_Vector y0, SUNContext sunctx) + + This function allocates and initializes memory for a problem to + be solved using the SPRKStep time-stepping module in ARKODE. + + :param f: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f(q,t) = \frac{\partial V(q,t)}{\partial q}` + :param g: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`g(p) = \frac{\partial T(p)}{\partial p}` + :param t0: the initial value of :math:`t` + :param y0: the initial condition vector :math:`y(t_0)` + :param sunctx: the :c:type:`SUNContext` object (see :numref:`SUNDIALS.SUNContext`) + + :returns: If successful, a pointer to initialized problem memory of type ``void*``, to be passed to all user-facing SPRKStep routines listed below. If unsuccessful, a ``NULL`` pointer will be returned, and an error message will be printed to ``stderr``. + + +.. c:function:: void SPRKStepFree(void** arkode_mem) + + This function frees the problem memory *arkode_mem* created by + :c:func:`SPRKStepCreate`. + + :param arkode_mem: pointer to the SPRKStep memory block. + + +.. _ARKODE.Usage.SPRKStep.RootFinding: + +Rootfinding initialization function +-------------------------------------- + +As described in :numref:`ARKODE.Mathematics.Rootfinding`, while +solving the IVP, ARKODE's time-stepping modules have the capability to +find the roots of a set of user-defined functions. To activate the +root-finding algorithm, call the following function. This is normally +called only once, prior to the first call to +:c:func:`SPRKStepEvolve()`, but if the rootfinding problem is to be +changed during the solution, :c:func:`SPRKStepRootInit()` can also be +called prior to a continuation call to :c:func:`SPRKStepEvolve()`. + + +.. c:function:: int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g) + + Initializes a rootfinding problem to be solved during the + integration of the ODE system. It must be called after + :c:func:`SPRKStepCreate`, and before :c:func:`SPRKStepEvolve()`. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param nrtfn: number of functions :math:`g_i`, an integer :math:`\ge` 0. + :param g: name of user-supplied function, of type :c:func:`ARKRootFn()`, + defining the functions :math:`g_i` whose roots are sought. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + * *ARK_MEM_FAIL* if there was a memory allocation failure + * *ARK_ILL_INPUT* if *nrtfn* is greater than zero but *g* = ``NULL``. + + **Notes:** + To disable the rootfinding feature after it has already + been initialized, or to free memory associated with SPRKStep's + rootfinding module, call *SPRKStepRootInit* with *nrtfn = 0*. + + Similarly, if a new IVP is to be solved with a call to + :c:func:`SPRKStepReInit()`, where the new IVP has no rootfinding + problem but the prior one did, then call *SPRKStepRootInit* with + *nrtfn = 0*. + + + + +.. _ARKODE.Usage.SPRKStep.Integration: + +SPRKStep solver function +------------------------- + +This is the central step in the solution process -- the call to perform +the integration of the IVP. One of the input arguments (*itask*) +specifies one of two modes as to where SPRKStep is to return a +solution. These modes are modified if the user has set a stop time +(with a call to the optional input function :c:func:`SPRKStepSetStopTime()`) or +has requested rootfinding. + + + +.. c:function:: int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, realtype *tret, int itask) + + Integrates the ODE over an interval in :math:`t`. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param tout: the next time at which a computed solution is desired. + :param yout: the computed solution vector. + :param tret: the time corresponding to *yout* (output). + :param itask: a flag indicating the job of the solver for the next user step. + + The *ARK_NORMAL* option causes the solver to take internal + steps until it has just overtaken a user-specified output + time, *tout*, in the direction of integration, + i.e. :math:`t_{n-1} <` *tout* :math:`\le t_{n}` for forward + integration, or :math:`t_{n} \le` *tout* :math:`< t_{n-1}` for + backward integration. It will then compute an approximation + to the solution :math:`y(tout)` by interpolation (using one + of the dense output routines described in + :numref:`ARKODE.Mathematics.Interpolation`). + + The *ARK_ONE_STEP* option tells the solver to only take a + single internal step :math:`y_{n-1} \to y_{n}` and then return + control back to the calling program. If this step will + overtake *tout* then the solver will again return an + interpolated result; otherwise it will return a copy of the + internal solution :math:`y_{n}` in the vector *yout*. + + :return: + * *ARK_SUCCESS* if successful. + * *ARK_ROOT_RETURN* if :c:func:`SPRKStepEvolve()` succeeded, and + found one or more roots. If the number of root functions, + *nrtfn*, is greater than 1, call + :c:func:`SPRKStepGetRootInfo()` to see which :math:`g_i` were + found to have a root at (*\*tret*). + * *ARK_TSTOP_RETURN* if :c:func:`SPRKStepEvolve()` succeeded and + returned at *tstop*. + * *ARK_MEM_NULL* if the *arkode_mem* argument was ``NULL``. + * *ARK_NO_MALLOC* if *arkode_mem* was not allocated. + * *ARK_ILL_INPUT* if one of the inputs to + :c:func:`SPRKStepEvolve()` is illegal, or some other input to + the solver was either illegal or missing. Details will be + provided in the error message. Typical causes of this failure: + + (a) A component of the error weight vector became zero during + internal time-stepping. + + (b) A root of one of the root functions was found both at a + point :math:`t` and also very near :math:`t`. + + (c) The initial condition violates the inequality constraints. + + * *ARK_TOO_MUCH_WORK* if the solver took *mxstep* internal steps + but could not reach *tout*. The default value for *mxstep* is + *MXSTEP_DEFAULT = 500*. + * *ARK_TOO_MUCH_ACC* if the solver could not satisfy the accuracy + demanded by the user for some internal step. + * *ARK_ERR_FAILURE* if error test failures occurred either too many + times (*ark_maxnef*) during one internal time step or occurred + with :math:`|h| = h_{min}`. + * *ARK_VECTOROP_ERR* a vector operation error occurred. + + **Notes:** + The input vector *yout* can use the same memory as the + vector *y0* of initial conditions that was passed to + :c:func:`SPRKStepCreate`. + + In *ARK_ONE_STEP* mode, *tout* is used only on the first call, and + only to get the direction and a rough scale of the independent + variable. All failure return values are negative and so testing the + return argument for negative values will trap all + :c:func:`SPRKStepEvolve()` failures. + + Since interpolation may reduce the accuracy in the reported + solution, if full method accuracy is desired the user should issue + a call to :c:func:`SPRKStepSetStopTime()` before the call to + :c:func:`SPRKStepEvolve()` to specify a fixed stop time to + end the time step and return to the user. Upon return from + :c:func:`SPRKStepEvolve()`, a copy of the internal solution + :math:`y_{n}` will be returned in the vector *yout*. Once the + integrator returns at a *tstop* time, any future testing for + *tstop* is disabled (and can be re-enabled only though a new call + to :c:func:`SPRKStepSetStopTime()`). + + On any error return in which one or more internal steps were taken + by :c:func:`SPRKStepEvolve()`, the returned values of *tret* and + *yout* correspond to the farthest point reached in the integration. + On all other error returns, *tret* and *yout* are left unchanged + from those provided to the routine. + + + + +.. _ARKODE.Usage.SPRKStep.OptionalInputs: + +Optional input functions +------------------------- + +There are numerous optional input parameters that control the behavior +of SPRKStep, each of which may be modified from its default value through +calling an appropriate input function. The following tables list all +optional input functions, grouped by which aspect of SPRKStep they control. +Detailed information on the calling syntax and arguments for each +function are then provided following each table. + +The optional inputs are grouped into the following categories: + +* General SPRKStep options (:numref:`ARKODE.Usage.SPRKStep.SPRKStepInputTable`), + +* IVP method solver options (:numref:`ARKODE.Usage.SPRKStep.SPRKStepMethodInputTable`), + +* Step adaptivity solver options (:numref:`ARKODE.Usage.SPRKStep.SPRKStepAdaptivityInputTable`), and + +* Rootfinding options (:numref:`ARKODE.Usage.SPRKStep.SPRKStepRootfindingInputTable`). + +For the most casual use of SPRKStep, relying on the default set of +solver parameters, the reader can skip to section on user-supplied +functions, :numref:`ARKODE.Usage.UserSupplied`. + +We note that, on an error return, all of the optional input functions send an +error message to the error handler function. All error return values are +negative, so a test on the return arguments for negative values will catch all +errors. Finally, a call to an ``SPRKStepSet***`` function can generally be made +from the user's calling program at any time and, if successful, takes effect +immediately. ``SPRKStepSet***`` functions that cannot be called at any time note +this in the "**Notes**:" section of the function documentation. + + + +.. _ARKODE.Usage.SPRKStep.SPRKStepInput: + +Optional inputs for SPRKStep +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. _ARKODE.Usage.SPRKStep.SPRKStepInputTable: +.. table:: Optional inputs for SPRKStep + + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Optional input | Function name | Default | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Return SPRKStep solver parameters to their defaults | :c:func:`SPRKStepSetDefaults()` | internal | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Set dense output interpolation type | :c:func:`SPRKStepSetInterpolantType()` | ``ARK_INTERP_HERMITE`` | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Set dense output polynomial degree | :c:func:`SPRKStepSetInterpolantDegree()` | 5 | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Supply a pointer to a diagnostics output file | :c:func:`SPRKStepSetDiagnostics()` | ``NULL`` | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Supply a pointer to an error output file | :c:func:`SPRKStepSetErrFile()` | ``stderr`` | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Supply a custom error handler function | :c:func:`SPRKStepSetErrHandlerFn()` | internal fn | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Disable time step adaptivity (fixed-step mode) | :c:func:`SPRKStepSetFixedStep()` | disabled | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Supply an initial step size to attempt | :c:func:`SPRKStepSetInitStep()` | estimated | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Maximum no. of warnings for :math:`t_n+h = t_n` | :c:func:`SPRKStepSetMaxHnilWarns()` | 10 | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Maximum no. of internal steps before *tout* | :c:func:`SPRKStepSetMaxNumSteps()` | 500 | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Set a value for :math:`t_{stop}` | :c:func:`SPRKStepSetStopTime()` | undefined | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Disable the stop time | :c:func:`SPRKStepClearStopTime` | N/A | + +-----------------------------------------------------+------------------------------------------+------------------------+ + | Supply a pointer for user data | :c:func:`SPRKStepSetUserData()` | ``NULL`` | + +-----------------------------------------------------+------------------------------------------+------------------------+ + + +.. c:function:: int SPRKStepSetDefaults(void* arkode_mem) + + Resets all optional input parameters to SPRKStep's original + default values. + + :param arkode_mem: pointer to the SPRKStep memory block. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + Does not change problem-defining function pointer *f* + or the *user_data* pointer. + + Also leaves alone any data structures or options related to + root-finding (those can be reset using :c:func:`SPRKStepRootInit()`). + + + +.. c:function:: int SPRKStepSetInterpolantType(void* arkode_mem, int itype) + + Specifies use of the Lagrange or Hermite interpolation modules (used for + dense output -- interpolation of solution output values and implicit + method predictors). + + :param arkode_mem: pointer to the SPRKStep memory block. + :param itype: requested interpolant type (``ARK_INTERP_HERMITE`` or ``ARK_INTERP_LAGRANGE``) + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_MEM_FAIL* if the interpolation module cannot be allocated + * *ARK_ILL_INPUT* if the *itype* argument is not recognized or the + interpolation module has already been initialized + + **Notes:** + The Hermite interpolation module is described in + :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange interpolation module + is described in :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. + + This routine frees any previously-allocated interpolation module, and re-creates + one according to the specified argument. Thus any previous calls to + :c:func:`SPRKStepSetInterpolantDegree()` will be nullified. + + This routine must be called *after* the call to :c:func:`SPRKStepCreate`. + After the first call to :c:func:`SPRKStepEvolve()` the interpolation type may + not be changed without first calling :c:func:`SPRKStepReInit()`. + + If this routine is not called, the Hermite interpolation module will be used. + + + +.. c:function:: int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree) + + Specifies the degree of the polynomial interpolant + used for dense output (i.e. interpolation of solution output values + and implicit method predictors). + + :param arkode_mem: pointer to the SPRKStep memory block. + :param degree: requested polynomial degree. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory or interpolation module are ``NULL`` + * *ARK_INTERP_FAIL* if this is called after :c:func:`SPRKStepEvolve()` + * *ARK_ILL_INPUT* if an argument has an illegal value or the + interpolation module has already been initialized + + **Notes:** + Allowed values are between 0 and 5. + + This routine should be called *after* :c:func:`SPRKStepCreate` and *before* + :c:func:`SPRKStepEvolve()`. After the first call to :c:func:`SPRKStepEvolve()` + the interpolation degree may not be changed without first calling + :c:func:`SPRKStepReInit()`. + + If a user calls both this routine and :c:func:`SPRKStepSetInterpolantType()`, then + :c:func:`SPRKStepSetInterpolantType()` must be called first. + + Since the accuracy of any polynomial interpolant is limited by the + accuracy of the time-step solutions on which it is based, the *actual* + polynomial degree that is used by SPRKStep will be the minimum of + :math:`q-1` and the input *degree*, for :math:`q > 1` where :math:`q` is + the order of accuracy for the time integration method. + + .. versionchanged:: 5.5.1 + + When :math:`q=1`, a linear interpolant is the default to ensure values + obtained by the integrator are returned at the ends of the time + interval. + + + +.. c:function:: int SPRKStepSetDenseOrder(void* arkode_mem, int dord) + + *This function is deprecated, and will be removed in a future release. + Users should transition to calling* :c:func:`SPRKStepSetInterpolantDegree()` + *instead.* + + + +.. c:function:: int SPRKStepSetDiagnostics(void* arkode_mem, FILE* diagfp) + + Specifies the file pointer for a diagnostics file where + all SPRKStep step adaptivity and solver information is written. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param diagfp: pointer to the diagnostics output file. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + This parameter can be ``stdout`` or ``stderr``, although the + suggested approach is to specify a pointer to a unique file opened + by the user and returned by ``fopen``. If not called, or if called + with a ``NULL`` file pointer, all diagnostics output is disabled. + + When run in parallel, only one process should set a non-NULL value + for this pointer, since statistics from all processes would be + identical. + + .. deprecated:: 5.2.0 + + Use :c:func:`SUNLogger_SetInfoFilename` instead. + + +.. c:function:: int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp) + + Specifies a pointer to the file where all SPRKStep warning and error + messages will be written if the default internal error handling + function is used. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param errfp: pointer to the output file. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + The default value for *errfp* is ``stderr``. + + Passing a ``NULL`` value disables all future error message output + (except for the case wherein the SPRKStep memory pointer is + ``NULL``). This use of the function is strongly discouraged. + + If used, this routine should be called before any other + optional input functions, in order to take effect for subsequent + error messages. + + + +.. c:function:: int SPRKStepSetErrHandlerFn(void* arkode_mem, ARKErrHandlerFn ehfun, void* eh_data) + + Specifies the optional user-defined function to be used + in handling error messages. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param ehfun: name of user-supplied error handler function. + :param eh_data: pointer to user data passed to *ehfun* every time it is called. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + Error messages indicating that the SPRKStep solver memory is + ``NULL`` will always be directed to ``stderr``. + + + + +.. c:function:: int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed) + + Disabled time step adaptivity within SPRKStep, and specifies the + fixed time step size to use for the following internal step(s). + + :param arkode_mem: pointer to the SPRKStep memory block. + :param hfixed: value of the fixed step size to use. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + Pass 0.0 to return SPRKStep to the default (adaptive-step) mode. + + Use of this function is not generally recommended, since we it gives no + assurance of the validity of the computed solutions. It is + primarily provided for code-to-code verification testing purposes. + + If both :c:func:`SPRKStepSetFixedStep()` and + :c:func:`SPRKStepSetStopTime()` are used, then the fixed step size will be + used for all steps until the final step preceding the provided stop time + (which may be shorter). To resume use of the previous fixed step size, + another call to :c:func:`SPRKStepSetFixedStep()` must be made prior to + calling :c:func:`SPRKStepEvolve()` to resume integration. + + +.. c:function:: int SPRKStepSetInitStep(void* arkode_mem, realtype hin) + + Specifies the initial time step size SPRKStep should use after + initialization, re-initialization, or resetting. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param hin: value of the initial step to be attempted :math:`(\ne 0)`. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + Pass 0.0 to use the default value. + + By default, SPRKStep estimates the initial step size to be + :math:`h = \sqrt{\dfrac{2}{\left\| \ddot{y} \right\|}}`, where + :math:`\ddot{y}` is an estimate of the second derivative of the + solution at :math:`t_0`. + + This routine will also reset the step size and error history. + + +.. c:function:: int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps) + + Specifies the maximum number of steps to be taken by the + solver in its attempt to reach the next output time, before SPRKStep + will return with an error. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param mxsteps: maximum allowed number of internal steps. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + Passing *mxsteps* = 0 results in SPRKStep using the + default value (500). + + Passing *mxsteps* < 0 disables the test (not recommended). + + +.. c:function:: int SPRKStepSetStopTime(void* arkode_mem, realtype tstop) + + Specifies the value of the independent variable + :math:`t` past which the solution is not to proceed. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param tstop: stopping time for the integrator. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + The default is that no stop time is imposed. + + Once the integrator returns at a stop time, any future testing for + ``tstop`` is disabled (and can be reenabled only though a new call to + :c:func:`SPRKStepSetStopTime`). + + A stop time not reached before a call to :c:func:`SPRKStepReInit` or + :c:func:`SPRKStepReset` will remain active but can be disabled by calling + :c:func:`SPRKStepClearStopTime`. + + +.. c:function:: int SPRKStepClearStopTime(void* arkode_mem) + + Disables the stop time set with :c:func:`SPRKStepSetStopTime`. + + :param arkode_mem: pointer to the SPRKStep memory block. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + + **Notes:** + The stop time can be reenabled though a new call to + :c:func:`SPRKStepSetStopTime`. + + .. versionadded:: 5.5.1 + + +.. c:function:: int SPRKStepSetUserData(void* arkode_mem, void* user_data) + + Specifies the user data block *user_data* and + attaches it to the main SPRKStep memory block. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param user_data: pointer to the user data. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + If specified, the pointer to *user_data* is passed to all + user-supplied functions for which it is an argument; otherwise + ``NULL`` is passed. + + +.. _ARKODE.Usage.SPRKStep.SPRKStepMethodInput: + +Optional inputs for IVP method selection +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. _ARKODE.Usage.SPRKStep.SPRKStepMethodInputTable: +.. table:: Optional inputs for IVP method selection + + +--------------------------------------+----------------------------------+------------------+ + | Optional input | Function name | Default | + +--------------------------------------+----------------------------------+------------------+ + | Set integrator method order | :c:func:`SPRKStepSetOrder()` | 4 | + +--------------------------------------+----------------------------------+------------------+ + | Set SPRK method pair | :c:func:`SPRKStepSetMethod()` | internal | + +--------------------------------------+----------------------------------+------------------+ + + +.. c:function:: int SPRKStepSetOrder(void* arkode_mem, int ord) + + Specifies the order of accuracy for the SPRK integration method. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param ord: requested order of accuracy. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + The allowed values are :math:`1,2,3,4,5,6,8,10`. + Any illegal input will result in the default value of 4. + + Since *ord* affects the memory requirements for the internal + SPRKStep memory block, it cannot be changed after the first call to + :c:func:`SPRKStepEvolve()`, unless :c:func:`SPRKStepReInit()` is called. + + +.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem) + + Specifies the SPRK method. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param sprk_mem: the SPRK method memory. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + + For a description of the :c:type:`ARKodeSPRKMem` type and related + functions for creating Butcher tables, see :numref:`ARKodeSPRKMem`. + + No error checking is performed to ensure that either the method order *p* or + specified in the method structure correctly describe the coefficients. + + +.. _ARKODE.Usage.SPRKStep.SPRKStepAdaptivityInput: + +Optional inputs for time step adaptivity +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +SPRKStep only supports a custom time step adaptivity function. The adaptivity methods +described in :numref:`ARKODE.Mathematics.Adaptivity` are not compatible. + + +.. _ARKODE.Usage.SPRKStep.SPRKStepAdaptivityInputTable: +.. table:: Optional inputs for time step adaptivity + + +----------------------------------------------------------+-----------------------------------------+----------+ + | Optional input | Function name | Default | + +----------------------------------------------------------+-----------------------------------------+----------+ + | Set a custom time step adaptivity function | :c:func:`SPRKStepSetAdaptivityFn()` | internal | + +----------------------------------------------------------+-----------------------------------------+----------+ + + +.. c:function:: int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data) + + Sets a user-supplied time-step adaptivity function. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param hfun: name of user-supplied adaptivity function. + :param h_data: pointer to user data passed to *hfun* every time it is called. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + This function should focus on accuracy-based time step + estimation; for stability based time steps the function + :c:func:`SPRKStepSetStabilityFn()` should be used instead. + + + +.. _ARKODE.Usage.SPRKStep.SPRKStepRootfindingInput: + + +Rootfinding optional input functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following functions can be called to set optional inputs to +control the rootfinding algorithm, the mathematics of which are +described in :numref:`ARKODE.Mathematics.Rootfinding`. + + +.. _ARKODE.Usage.SPRKStep.SPRKStepRootfindingInputTable: +.. table:: Rootfinding optional input functions + + +-----------------------------------------+-------------------------------------------+----------+ + | Optional input | Function name | Default | + +-----------------------------------------+-------------------------------------------+----------+ + | Direction of zero-crossings to monitor | :c:func:`SPRKStepSetRootDirection()` | both | + +-----------------------------------------+-------------------------------------------+----------+ + | Disable inactive root warnings | :c:func:`SPRKStepSetNoInactiveRootWarn()` | enabled | + +-----------------------------------------+-------------------------------------------+----------+ + + + +.. c:function:: int SPRKStepSetRootDirection(void* arkode_mem, int* rootdir) + + Specifies the direction of zero-crossings to be located and returned. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param rootdir: state array of length *nrtfn*, the number of root + functions :math:`g_i` (the value of *nrtfn* was supplied in + the call to :c:func:`SPRKStepRootInit()`). If ``rootdir[i] == + 0`` then crossing in either direction for :math:`g_i` should be + reported. A value of +1 or -1 indicates that the solver + should report only zero-crossings where :math:`g_i` is + increasing or decreasing, respectively. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + The default behavior is to monitor for both zero-crossing directions. + + + +.. c:function:: int SPRKStepSetNoInactiveRootWarn(void* arkode_mem) + + Disables issuing a warning if some root function appears + to be identically zero at the beginning of the integration. + + :param arkode_mem: pointer to the SPRKStep memory block. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + + **Notes:** + SPRKStep will not report the initial conditions as a + possible zero-crossing (assuming that one or more components + :math:`g_i` are zero at the initial time). However, if it appears + that some :math:`g_i` is identically zero at the initial time + (i.e., :math:`g_i` is zero at the initial time *and* after the + first step), SPRKStep will issue a warning which can be disabled with + this optional input function. + + + + + +.. _ARKODE.Usage.SPRKStep.InterpolatedOutput: + +Interpolated output function +-------------------------------- + +An optional function :c:func:`SPRKStepGetDky()` is available to obtain +additional values of solution-related quantities. This function +should only be called after a successful return from +:c:func:`SPRKStepEvolve()`, as it provides interpolated values either of +:math:`y` or of its derivatives (up to the 5th derivative) +interpolated to any value of :math:`t` in the last internal step taken +by :c:func:`SPRKStepEvolve()`. Internally, this "dense output" or +"continuous extension" algorithm is identical to the algorithm used for +the maximum order implicit predictors, described in +:numref:`ARKODE.Mathematics.Predictors.Max`, except that +derivatives of the polynomial model may be evaluated upon request. + + + +.. c:function:: int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) + + Computes the *k*-th derivative of the function + :math:`y` at the time *t*, + i.e., :math:`y^{(k)}(t)`, for values of the + independent variable satisfying :math:`t_n-h_n \le t \le t_n`, with + :math:`t_n` as current internal time reached, and :math:`h_n` is + the last internal step size successfully used by the solver. This + routine uses an interpolating polynomial of degree *min(degree, 5)*, + where *degree* is the argument provided to + :c:func:`SPRKStepSetInterpolantDegree()`. The user may request *k* in the + range {0,..., *min(degree, kmax)*} where *kmax* depends on the choice of + interpolation module. For Hermite interpolants *kmax = 5* and for Lagrange + interpolants *kmax = 3*. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param t: the value of the independent variable at which the + derivative is to be evaluated. + :param k: the derivative order requested. + :param dky: output vector (must be allocated by the user). + + :return: + * *ARK_SUCCESS* if successful + * *ARK_BAD_K* if *k* is not in the range {0,..., *min(degree, kmax)*}. + * *ARK_BAD_T* if *t* is not in the interval :math:`[t_n-h_n, t_n]` + * *ARK_BAD_DKY* if the *dky* vector was ``NULL`` + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + + **Notes:** + It is only legal to call this function after a successful + return from :c:func:`SPRKStepEvolve()`. + + A user may access the values :math:`t_n` and :math:`h_n` via the + functions :c:func:`SPRKStepGetCurrentTime()` and + :c:func:`SPRKStepGetLastStep()`, respectively. + + + + +.. _ARKODE.Usage.SPRKStep.OptionalOutputs: + +Optional output functions +------------------------------ + +SPRKStep provides an extensive set of functions that can be used to +obtain solver performance information. We organize these into groups: + +#. General SPRKStep output routines are in + :numref:`ARKODE.Usage.SPRKStep.SPRKStepMainOutputs`, + +#. Output routines regarding root-finding results are in + :numref:`ARKODE.Usage.SPRKStep.SPRKStepRootOutputs`, + +#. General usability routines (e.g. to print the current SPRKStep + parameters, or output the current Butcher table) are in + :numref:`ARKODE.Usage.SPRKStep.SPRKStepExtraOutputs`. + +Following each table, we elaborate on each function. + +Some of the optional outputs, especially the various counters, can be +very useful in determining the efficiency of various methods inside +SPRKStep. For example: + +* The counters *nsteps* and *nf_evals* provide a rough measure of the + overall cost of a given run, and can be compared between runs with + different solver options to suggest which set of options is the most + efficient. + +* The ratio *nsteps/step_attempts* can measure the quality of the + time step adaptivity algorithm, since a poor algorithm will result + in more failed steps, and hence a lower ratio. + +It is therefore recommended that users retrieve and output these +statistics following each run, and take some time to investigate +alternate solver options that will be more optimal for their +particular problem of interest. + + + +.. _ARKODE.Usage.SPRKStep.SPRKStepMainOutputs: + +Main solver optional output functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. _ARKODE.Usage.SPRKStep.SPRKStepMainOutputsTable: +.. table:: Main solver optional output functions + + +-----------------------------------------------------+--------------------------------------------+ + | Optional output | Function name | + +-----------------------------------------------------+--------------------------------------------+ + | Cumulative number of internal steps | :c:func:`SPRKStepGetNumSteps()` | + +-----------------------------------------------------+--------------------------------------------+ + | Actual initial time step size used | :c:func:`SPRKStepGetActualInitStep()` | + +-----------------------------------------------------+--------------------------------------------+ + | Step size used for the last successful step | :c:func:`SPRKStepGetLastStep()` | + +-----------------------------------------------------+--------------------------------------------+ + | Step size to be attempted on the next step | :c:func:`SPRKStepGetCurrentStep()` | + +-----------------------------------------------------+--------------------------------------------+ + | Current internal time reached by the solver | :c:func:`SPRKStepGetCurrentTime()` | + +-----------------------------------------------------+--------------------------------------------+ + | Single accessor to many statistics at once | :c:func:`SPRKStepGetStepStats()` | + +-----------------------------------------------------+--------------------------------------------+ + | Print all statistics | :c:func:`SPRKStepPrintAllStats` | + +-----------------------------------------------------+--------------------------------------------+ + | Name of constant associated with a return flag | :c:func:`SPRKStepGetReturnFlagName()` | + +-----------------------------------------------------+--------------------------------------------+ + | No. of attempted steps | :c:func:`SPRKStepGetNumStepAttempts()` | + +-----------------------------------------------------+--------------------------------------------+ + | No. of calls to *f* function | :c:func:`SPRKStepGetNumRhsEvals()` | + +-----------------------------------------------------+--------------------------------------------+ + | Current method memory | :c:func:`SPRKStepGetCurrentMethod()` | + +-----------------------------------------------------+--------------------------------------------+ + | Retrieve a pointer for user data | :c:func:`SPRKStepGetUserData` | + +-----------------------------------------------------+--------------------------------------------+ + + + +.. c:function:: int SPRKStepGetNumSteps(void* arkode_mem, long int* nsteps) + + Returns the cumulative number of internal steps taken by + the solver (so far). + + :param arkode_mem: pointer to the SPRKStep memory block. + :param nsteps: number of steps taken in the solver. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + +.. c:function:: int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast) + + Returns the integration step size taken on the last successful + internal step. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param hlast: step size taken on the last internal step. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + +.. c:function:: int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur) + + Returns the integration step size to be attempted on the next internal step. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param hcur: step size to be attempted on the next internal step. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + +.. c:function:: int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur) + + Returns the current internal time reached by the solver. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param tcur: current internal time reached. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + +.. c:function:: int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, realtype* hinused, realtype* hlast, realtype* hcur, realtype* tcur) + + Returns many of the most useful optional outputs in a single call. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param nsteps: number of steps taken in the solver. + :param hinused: actual value of initial step size. + :param hlast: step size taken on the last internal step. + :param hcur: step size to be attempted on the next internal step. + :param tcur: current internal time reached. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + +.. c:function:: int SPRKStepPrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt) + + Outputs all of the integrator and other statistics. + + * *arkode_mem* -- pointer to the SPRKStep memory block. + * *outfile* -- pointer to output file. + * *fmt* -- the output format: + + * :c:enumerator:`SUN_OUTPUTFORMAT_TABLE` -- prints a table of values + * :c:enumerator:`SUN_OUTPUTFORMAT_CSV` -- prints a comma-separated list + of key and value pairs e.g., ``key1,value1,key2,value2,...`` + + :return: + * *ARK_SUCCESS* -- if the output was successfully. + * *CV_MEM_NULL* -- if the SPRKStep memory was ``NULL``. + * *CV_ILL_INPUT* -- if an invalid formatting option was provided. + + .. note:: + + The file ``scripts/sundials_csv.py`` provides python utility functions to + read and output the data from a SUNDIALS CSV output file using the key + and value pair format. + + .. versionadded:: 5.2.0 + + + +.. c:function:: char *SPRKStepGetReturnFlagName(long int flag) + + Returns the name of the SPRKStep constant corresponding to *flag*. + + :param flag: a return flag from an SPRKStep function. + + :return: + The return value is a string containing the name of + the corresponding constant. + + +.. c:function:: int SPRKStepGetNumStepAttempts(void* arkode_mem, long int* step_attempts) + + Returns the cumulative number of steps attempted by the solver (so far). + + :param arkode_mem: pointer to the SPRKStep memory block. + :param step_attempts: number of steps attempted by solver. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + +.. c:function:: int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf_evals) + + Returns the number of calls to the user's right-hand + side function, :math:`f` (so far). + + :param arkode_mem: pointer to the SPRKStep memory block. + :param nf_evals: number of calls to the user's :math:`f(t,y)` function. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + +.. c:function:: int SPRKStepGetNumErrTestFails(void* arkode_mem, long int* netfails) + + Returns the number of local error test failures that + have occurred (so far). + + :param arkode_mem: pointer to the SPRKStep memory block. + :param netfails: number of error test failures. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + + +.. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKMem *sprk_mem) + + Returns the SPRK method structure currently in use by the solver. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param sprk_mem: pointer to the SPRK method structure. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + **Notes:** + The :c:type:`ARKodeSPRKMem` data structure is defined as a + pointer to the following C structure: + + .. code-block:: c + + struct ARKodeSPRKMem_s { + + int q; /* method order of accuracy */ + int stages; /* number of stages */ + sunrealtype* a; /* coefficients multiplying q' */ + sunrealtype* b; /* coefficients multiplying p' */ + + /* the a_i coefficients generate the explicit Butcher table */ + /* the b_i coefficients generate the diagonally-implicit Butcher table */ + + }; + + For more details see :numref:`ARKodeSPRKMem`. + + + +.. c:function:: int SPRKStepGetUserData(void* arkode_mem, void** user_data) + + Returns the user data pointer previously set with + :c:func:`SPRKStepSetUserData`. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param user_data: memory reference to a user data pointer + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ARKStep memory was ``NULL`` + + .. versionadded:: 5.3.0 + + +.. _ARKODE.Usage.SPRKStep.SPRKStepRootOutputs: + +Rootfinding optional output functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +.. _ARKODE.Usage.SPRKStep.SPRKStepRootOutputsTable: +.. table:: Rootfinding optional output functions + + +--------------------------------------------------+---------------------------------+ + | Optional output | Function name | + +--------------------------------------------------+---------------------------------+ + | Array showing roots found | :c:func:`SPRKStepGetRootInfo()` | + +--------------------------------------------------+---------------------------------+ + | No. of calls to user root function | :c:func:`SPRKStepGetNumGEvals()`| + +--------------------------------------------------+---------------------------------+ + + + +.. c:function:: int SPRKStepGetRootInfo(void* arkode_mem, int* rootsfound) + + Returns an array showing which functions were found to + have a root. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param rootsfound: array of length *nrtfn* with the indices of the + user functions :math:`g_i` found to have a root (the value of + *nrtfn* was supplied in the call to + :c:func:`SPRKStepRootInit()`). For :math:`i = 0 \ldots` + *nrtfn*-1, ``rootsfound[i]`` is nonzero if :math:`g_i` has a + root, and 0 if not. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + **Notes:** + The user must allocate space for *rootsfound* prior to + calling this function. + + For the components of :math:`g_i` for which a root was found, the + sign of ``rootsfound[i]`` indicates the direction of + zero-crossing. A value of +1 indicates that :math:`g_i` is + increasing, while a value of -1 indicates a decreasing :math:`g_i`. + + + +.. c:function:: int SPRKStepGetNumGEvals(void* arkode_mem, long int* ngevals) + + Returns the cumulative number of calls made to the + user's root function :math:`g`. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param ngevals: number of calls made to :math:`g` so far. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + + + +.. _ARKODE.Usage.SPRKStep.SPRKStepExtraOutputs: + +General usability functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following optional routines may be called by a user to inquire +about existing solver parameters, to retrieve stored Butcher tables, +write the current Butcher table, or even to test a provided Butcher +table to determine its analytical order of accuracy. While none of +these would typically be called during the course of solving an +initial value problem, these may be useful for users wishing to better +understand SPRKStep and/or specific Runge--Kutta methods. + + +.. _ARKODE.Usage.SPRKStep.SPRKStepExtraOutputsTable: +.. table:: General usability functions + + +----------------------------------------+--------------------------------------+ + | Optional routine | Function name | + +----------------------------------------+--------------------------------------+ + | Output all SPRKStep solver parameters | :c:func:`SPRKStepWriteParameters()` | + +----------------------------------------+--------------------------------------+ + + +.. c:function:: int SPRKStepWriteParameters(void* arkode_mem, FILE *fp) + + Outputs all SPRKStep solver parameters to the provided file pointer. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param fp: pointer to use for printing the solver parameters. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + + **Notes:** + The *fp* argument can be ``stdout`` or ``stderr``, or it + may point to a specific file created using ``fopen``. + + When run in parallel, only one process should set a non-NULL value + for this pointer, since parameters for all processes would be + identical. + + + +.. _ARKODE.Usage.SPRKStep.Reinitialization: + +SPRKStep re-initialization function +------------------------------------- + +To reinitialize the SPRKStep module for the solution of a new problem, +where a prior call to :c:func:`SPRKStepCreate` has been made, the +user must call the function :c:func:`SPRKStepReInit()`. The new +problem must have the same size as the previous one. This routine +retains the current settings for all SPRKStep module options and +performs the same input checking and initializations that are done in +:c:func:`SPRKStepCreate`, but it performs no memory allocation as is +assumes that the existing internal memory is sufficient for the new +problem. A call to this re-initialization routine deletes the +solution history that was stored internally during the previous +integration, and deletes any previously-set *tstop* value specified via a +call to :c:func:`SPRKStepSetStopTime()`. Following a successful call to +:c:func:`SPRKStepReInit()`, call :c:func:`SPRKStepEvolve()` again for the +solution of the new problem. + +The use of :c:func:`SPRKStepReInit()` requires that the number of +Runge--Kutta stages, denoted by *s*, be no larger for the new problem than +for the previous problem. This condition is automatically fulfilled +if the method order *q* is left unchanged. + +One important use of the :c:func:`SPRKStepReInit()` function is in the +treating of jump discontinuities in the RHS function. Except in cases +of fairly small jumps, it is usually more efficient to stop at each +point of discontinuity and restart the integrator with a readjusted +ODE model, using a call to this routine. To stop when the location +of the discontinuity is known, simply make that location a value of +``tout``. To stop when the location of the discontinuity is +determined by the solution, use the rootfinding feature. In either +case, it is critical that the RHS function *not* incorporate the +discontinuity, but rather have a smooth extension over the +discontinuity, so that the step across it (and subsequent rootfinding, +if used) can be done efficiently. Then use a switch within the RHS +function (communicated through ``user_data``) that can be flipped +between the stopping of the integration and the restart, so that the +restarted problem uses the new values (which have jumped). Similar +comments apply if there is to be a jump in the dependent variable +vector. + + +.. c:function:: int SPRKStepReInit(void* arkode_mem, ARKRhsFn f, realtype t0, N_Vector y0) + + Provides required problem specifications and re-initializes the + SPRKStep time-stepper module. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param f: the name of the C function (of type :c:func:`ARKRhsFn()`) + defining the right-hand side function in :math:`\dot{y} = f(t,y)`. + :param t0: the initial value of :math:`t`. + :param y0: the initial condition vector :math:`y(t_0)`. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + * *ARK_MEM_FAIL* if a memory allocation failed + * *ARK_ILL_INPUT* if an argument has an illegal value. + + **Notes:** + All previously set options are retained but may be updated by calling + the appropriate "Set" functions. + + If an error occurred, :c:func:`SPRKStepReInit()` also + sends an error message to the error handler function. + + + + +.. _ARKODE.Usage.SPRKStep.Reset: + +SPRKStep reset function +----------------------- + +To reset the SPRKStep module to a particular state :math:`(t_R,y(t_R))` for the +continued solution of a problem, where a prior +call to :c:func:`SPRKStepCreate` has been made, the user must call the function +:c:func:`SPRKStepReset()`. Like :c:func:`SPRKStepReInit()` this routine retains +the current settings for all SPRKStep module options and performs no memory +allocations but, unlike :c:func:`SPRKStepReInit()`, this routine performs only a +*subset* of the input checking and initializations that are done in +:c:func:`SPRKStepCreate`. In particular this routine retains all internal +counter values and the step size/error history. Like :c:func:`SPRKStepReInit()`, a call to +:c:func:`SPRKStepReset()` will delete any previously-set *tstop* value specified +via a call to :c:func:`SPRKStepSetStopTime()`. Following a successful call to +:c:func:`SPRKStepReset()`, call :c:func:`SPRKStepEvolve()` again to continue +solving the problem. By default the next call to :c:func:`SPRKStepEvolve()` will +use the step size computed by SPRKStep prior to calling :c:func:`SPRKStepReset()`. +To set a different step size or have SPRKStep estimate a new step size use +:c:func:`SPRKStepSetInitStep()`. + +One important use of the :c:func:`SPRKStepReset()` function is in the +treating of jump discontinuities in the RHS functions. Except in cases +of fairly small jumps, it is usually more efficient to stop at each +point of discontinuity and restart the integrator with a readjusted +ODE model, using a call to :c:func:`SPRKStepReset()`. To stop when +the location of the discontinuity is known, simply make that location +a value of ``tout``. To stop when the location of the discontinuity +is determined by the solution, use the rootfinding feature. In either +case, it is critical that the RHS functions *not* incorporate the +discontinuity, but rather have a smooth extension over the +discontinuity, so that the step across it (and subsequent rootfinding, +if used) can be done efficiently. Then use a switch within the RHS +functions (communicated through ``user_data``) that can be flipped +between the stopping of the integration and the restart, so that the +restarted problem uses the new values (which have jumped). Similar +comments apply if there is to be a jump in the dependent variable +vector. + +.. c:function:: int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) + + Resets the current SPRKStep time-stepper module state to the provided + independent variable value and dependent variable vector. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param tR: the value of the independent variable :math:`t`. + :param yR: the value of the dependent variable vector :math:`y(t_R)`. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + * *ARK_MEM_FAIL* if a memory allocation failed + * *ARK_ILL_INPUT* if an argument has an illegal value. + + **Notes:** + By default the next call to :c:func:`SPRKStepEvolve()` will use the step size + computed by SPRKStep prior to calling :c:func:`SPRKStepReset()`. To set a + different step size or have SPRKStep estimate a new step size use + :c:func:`SPRKStepSetInitStep()`. + + All previously set options are retained but may be updated by calling + the appropriate "Set" functions. + + If an error occurred, :c:func:`SPRKStepReset()` also sends an error message to + the error handler function. + + + + +.. _ARKODE.Usage.SPRKStep.Resizing: + +SPRKStep system resize function +------------------------------------- + +For simulations involving changes to the number of equations and +unknowns in the ODE system (e.g. when using spatially-adaptive +PDE simulations under a method-of-lines approach), the SPRKStep +integrator may be "resized" between integration steps, through calls +to the :c:func:`SPRKStepResize()` function. This function modifies +SPRKStep's internal memory structures to use the new problem size, +without destruction of the temporal adaptivity heuristics. It is +assumed that the dynamical time scales before and after the vector +resize will be comparable, so that all time-stepping heuristics prior +to calling :c:func:`SPRKStepResize()` remain valid after the call. If +instead the dynamics should be recomputed from scratch, the SPRKStep +memory structure should be deleted with a call to +:c:func:`SPRKStepFree()`, and recreated with a call to +:c:func:`SPRKStepCreate`. + +To aid in the vector resize operation, the user can supply a vector +resize function that will take as input a vector with the previous +size, and transform it in-place to return a corresponding vector of +the new size. If this function (of type :c:func:`ARKVecResizeFn()`) +is not supplied (i.e., is set to ``NULL``), then all existing vectors +internal to SPRKStep will be destroyed and re-cloned from the new input +vector. + +In the case that the dynamical time scale should be modified slightly +from the previous time scale, an input *hscale* is allowed, that will +rescale the upcoming time step by the specified factor. If a value +*hscale* :math:`\le 0` is specified, the default of 1.0 will be used. + + + +.. c:function:: int SPRKStepResize(void* arkode_mem, N_Vector yR, realtype hscale, realtype tR, ARKVecResizeFn resize, void* resize_data) + + Re-sizes SPRKStep with a different state vector but with comparable + dynamical time scale. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param yR: the newly-sized solution vector, holding the current + dependent variable values :math:`y(t_R)`. + :param hscale: the desired time step scaling factor (i.e. the next + step will be of size *h\*hscale*). + :param tR: the current value of the independent variable + :math:`t_R` (this must be consistent with *yR*). + :param resize: the user-supplied vector resize function (of type + :c:func:`ARKVecResizeFn()`. + :param resize_data: the user-supplied data structure to be passed + to *resize* when modifying internal SPRKStep vectors. + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + * *ARK_NO_MALLOC* if *arkode_mem* was not allocated. + * *ARK_ILL_INPUT* if an argument has an illegal value. + + **Notes:** + If an error occurred, :c:func:`SPRKStepResize()` also sends an error + message to the error handler function. + + If inequality constraint checking is enabled a call to + :c:func:`SPRKStepResize()` will disable constraint checking. diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 514af7c644..65f25531a9 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -175,7 +175,7 @@ int main(int argc, char* argv[]) { arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); - /* Enable temporal root-finding */ + /* Optional: enable temporal root-finding */ SPRKStepRootInit(arkode_mem, 1, rootfn); if (check_retval(&retval, "SPRKStepRootInit", 1)) return 1; diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 165516088c..042372137e 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -65,7 +65,6 @@ SUNDIALS_EXPORT int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g); /* Optional input functions -- must be called AFTER SPRKStepCreate */ SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); -SUNDIALS_EXPORT int SPRKStepSetOptimalParams(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem); @@ -73,43 +72,11 @@ SUNDIALS_EXPORT int SPRKStepSetOrder(void* arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree); SUNDIALS_EXPORT int SPRKStepSetDenseOrder(void* arkode_mem, int dord); - -// SUNDIALS_EXPORT int SPRKStepSetSafetyFactor(void *arkode_mem, -// realtype safety); -// SUNDIALS_EXPORT int SPRKStepSetErrorBias(void *arkode_mem, -// realtype bias); -// SUNDIALS_EXPORT int SPRKStepSetMaxGrowth(void *arkode_mem, -// realtype mx_growth); -// SUNDIALS_EXPORT int SPRKStepSetMinReduction(void *arkode_mem, -// realtype eta_min); -// SUNDIALS_EXPORT int SPRKStepSetFixedStepBounds(void *arkode_mem, -// realtype lb, realtype ub); -// SUNDIALS_EXPORT int SPRKStepSetAdaptivityMethod(void *arkode_mem, -// int imethod, -// int idefault, int pq, -// realtype adapt_params[3]); SUNDIALS_EXPORT int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data); -// SUNDIALS_EXPORT int SPRKStepSetMaxFirstGrowth(void *arkode_mem, -// realtype etamx1); -// SUNDIALS_EXPORT int SPRKStepSetMaxEFailGrowth(void *arkode_mem, -// realtype etamxf); -// SUNDIALS_EXPORT int SPRKStepSetSmallNumEFails(void *arkode_mem, -// int small_nef); -// SUNDIALS_EXPORT int SPRKStepSetMaxCFailGrowth(void *arkode_mem, -// realtype etacf); -// SUNDIALS_EXPORT int SPRKStepSetNonlinCRDown(void *arkode_mem, -// realtype crdown); -// SUNDIALS_EXPORT int SPRKStepSetNonlinRDiv(void *arkode_mem, -// realtype rdiv); -SUNDIALS_EXPORT int SPRKStepSetStabilityFn(void* arkode_mem, ARKExpStabFn EStab, - void* estab_data); -SUNDIALS_EXPORT int SPRKStepSetMaxErrTestFails(void* arkode_mem, int maxnef); SUNDIALS_EXPORT int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps); SUNDIALS_EXPORT int SPRKStepSetMaxHnilWarns(void* arkode_mem, int mxhnil); SUNDIALS_EXPORT int SPRKStepSetInitStep(void* arkode_mem, realtype hin); -SUNDIALS_EXPORT int SPRKStepSetMinStep(void* arkode_mem, realtype hmin); -SUNDIALS_EXPORT int SPRKStepSetMaxStep(void* arkode_mem, realtype hmax); SUNDIALS_EXPORT int SPRKStepSetStopTime(void* arkode_mem, realtype tstop); SUNDIALS_EXPORT int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed); SUNDIALS_EXPORT int SPRKStepSetErrHandlerFn(void* arkode_mem, @@ -131,54 +98,33 @@ SUNDIALS_EXPORT int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky); /* Optional output functions */ -SUNDIALS_EXPORT int SPRKStepGetNumExpSteps(void* arkode_mem, long int* expsteps); -SUNDIALS_EXPORT int SPRKStepGetNumAccSteps(void* arkode_mem, long int* accsteps); -SUNDIALS_EXPORT int SPRKStepGetNumStepAttempts(void* arkode_mem, - long int* step_attempts); -SUNDIALS_EXPORT int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, - long int* nf2); -SUNDIALS_EXPORT int SPRKStepGetNumErrTestFails(void* arkode_mem, - long int* netfails); -// SUNDIALS_EXPORT int SPRKStepGetEstLocalErrors(void *arkode_mem, -// N_Vector ele); -// SUNDIALS_EXPORT int SPRKStepGetWorkSpace(void* arkode_mem, long int* lenrw, -// long int* leniw); -SUNDIALS_EXPORT int SPRKStepGetNumSteps(void* arkode_mem, long int* nsteps); +SUNDIALS_EXPORT char* SPRKStepGetReturnFlagName(long int flag); SUNDIALS_EXPORT int SPRKStepGetActualInitStep(void* arkode_mem, realtype* hinused); -SUNDIALS_EXPORT int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast); +SUNDIALS_EXPORT int SPRKStepGetCurrentMethod(void* arkode_mem, + ARKodeSPRKMem* sprk_mem); +SUNDIALS_EXPORT int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state); SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur); SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur); -SUNDIALS_EXPORT int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state); +SUNDIALS_EXPORT int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast); +SUNDIALS_EXPORT int SPRKStepGetNumAccSteps(void* arkode_mem, long int* accsteps); +SUNDIALS_EXPORT int SPRKStepGetNumExpSteps(void* arkode_mem, long int* expsteps); +SUNDIALS_EXPORT int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, + long int* nf2); +SUNDIALS_EXPORT int SPRKStepGetNumStepAttempts(void* arkode_mem, + long int* step_attempts); +SUNDIALS_EXPORT int SPRKStepGetNumSteps(void* arkode_mem, long int* nsteps); SUNDIALS_EXPORT int SPRKStepGetRootInfo(void* arkode_mem, int* rootsfound); -// SUNDIALS_EXPORT int SPRKStepGetCurrentGamma(void *arkode_mem, -// realtype *gamma); -// SUNDIALS_EXPORT int SPRKStepGetCurrentMassMatrix(void *arkode_mem, -// SUNMatrix *M); -// SUNDIALS_EXPORT int SPRKStepGetTolScaleFactor(void *arkode_mem, -// realtype *tolsfac); -// SUNDIALS_EXPORT int SPRKStepGetErrWeights(void *arkode_mem, -// N_Vector eweight); -// SUNDIALS_EXPORT int SPRKStepGetResWeights(void *arkode_mem, -// N_Vector rweight); SUNDIALS_EXPORT int SPRKStepGetUserData(void* arkode_mem, void** user_data); SUNDIALS_EXPORT int SPRKStepPrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt); -SUNDIALS_EXPORT char* SPRKStepGetReturnFlagName(long int flag); SUNDIALS_EXPORT int SPRKStepWriteParameters(void* arkode_mem, FILE* fp); /* Grouped optional output functions */ -SUNDIALS_EXPORT int SPRKStepGetTimestepperStats( - void* arkode_mem, long int* expsteps, long int* accsteps, - long int* step_attempts, long int* nf1, long int* nf2, long int* nlinsetups, - long int* netfails); SUNDIALS_EXPORT int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, realtype* hinused, realtype* hlast, realtype* hcur, realtype* tcur); -// SUNDIALS_EXPORT int SPRKStepGetNumStepSolveFails(void *arkode_mem, -// long int *nncfails); - /* Free function */ SUNDIALS_EXPORT void SPRKStepFree(void** arkode_mem); diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index ad0774cbc6..4f021abde4 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -77,16 +77,6 @@ int SPRKStepSetInitStep(void* arkode_mem, realtype hin) return (arkSetInitStep(arkode_mem, hin)); } -int SPRKStepSetMinStep(void* arkode_mem, realtype hmin) -{ - return (arkSetMinStep(arkode_mem, hmin)); -} - -int SPRKStepSetMaxStep(void* arkode_mem, realtype hmax) -{ - return (arkSetMaxStep(arkode_mem, hmax)); -} - int SPRKStepSetStopTime(void* arkode_mem, realtype tstop) { return (arkSetStopTime(arkode_mem, tstop)); @@ -102,11 +92,6 @@ int SPRKStepSetNoInactiveRootWarn(void* arkode_mem) return (arkSetNoInactiveRootWarn(arkode_mem)); } -// int SPRKStepSetConstraints(void* arkode_mem, N_Vector constraints) -// { -// return (arkSetConstraints(arkode_mem, constraints)); -// } - int SPRKStepSetMaxNumConstrFails(void* arkode_mem, int maxfails) { return (arkSetMaxNumConstrFails(arkode_mem, maxfails)); @@ -122,82 +107,11 @@ int SPRKStepSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStag return (arkSetPostprocessStageFn(arkode_mem, ProcessStage)); } -// int SPRKStepSetCFLFraction(void* arkode_mem, realtype cfl_frac) -// { -// return (arkSetCFLFraction(arkode_mem, cfl_frac)); -// } - -// int SPRKStepSetSafetyFactor(void* arkode_mem, realtype safety) -// { -// return (arkSetSafetyFactor(arkode_mem, safety)); -// } - -// int SPRKStepSetErrorBias(void* arkode_mem, realtype bias) -// { -// return (arkSetErrorBias(arkode_mem, bias)); -// } - -// int SPRKStepSetMaxGrowth(void* arkode_mem, realtype mx_growth) -// { -// return (arkSetMaxGrowth(arkode_mem, mx_growth)); -// } - -// int SPRKStepSetMinReduction(void* arkode_mem, realtype eta_min) -// { -// return (arkSetMinReduction(arkode_mem, eta_min)); -// } - -// int SPRKStepSetFixedStepBounds(void* arkode_mem, realtype lb, realtype ub) -// { -// return (arkSetFixedStepBounds(arkode_mem, lb, ub)); -// } - -int SPRKStepSetAdaptivityMethod(void* arkode_mem, int imethod, int idefault, - int pq, realtype adapt_params[3]) -{ - return (arkSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params)); -} - int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data) { return (arkSetAdaptivityFn(arkode_mem, hfun, h_data)); } -// int SPRKStepSetMaxFirstGrowth(void* arkode_mem, realtype etamx1) -// { -// return (arkSetMaxFirstGrowth(arkode_mem, etamx1)); -// } - -// int SPRKStepSetMaxEFailGrowth(void* arkode_mem, realtype etamxf) -// { -// return (arkSetMaxEFailGrowth(arkode_mem, etamxf)); -// } - -// int SPRKStepSetSmallNumEFails(void* arkode_mem, int small_nef) -// { -// return (arkSetSmallNumEFails(arkode_mem, small_nef)); -// } - -// int SPRKStepSetMaxCFailGrowth(void* arkode_mem, realtype etacf) -// { -// return (arkSetMaxCFailGrowth(arkode_mem, etacf)); -// } - -int SPRKStepSetStabilityFn(void* arkode_mem, ARKExpStabFn EStab, void* estab_data) -{ - return (arkSetStabilityFn(arkode_mem, EStab, estab_data)); -} - -// int SPRKStepSetMaxErrTestFails(void* arkode_mem, int maxnef) -// { -// return (arkSetMaxErrTestFails(arkode_mem, maxnef)); -// } - -// int SPRKStepSetMaxConvFails(void* arkode_mem, int maxncf) -// { -// return (arkSetMaxConvFails(arkode_mem, maxncf)); -// } - int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed) { return (arkSetFixedStep(arkode_mem, hfixed)); @@ -217,11 +131,6 @@ int SPRKStepGetNumSteps(void* arkode_mem, long int* nsteps) return (arkGetNumSteps(arkode_mem, nsteps)); } -int SPRKStepGetActualInitStep(void* arkode_mem, realtype* hinused) -{ - return (arkGetActualInitStep(arkode_mem, hinused)); -} - int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast) { return (arkGetLastStep(arkode_mem, hlast)); @@ -242,26 +151,6 @@ int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state) return (arkGetCurrentState(arkode_mem, state)); } -// int SPRKStepGetTolScaleFactor(void* arkode_mem, realtype* tolsfact) -// { -// return (arkGetTolScaleFactor(arkode_mem, tolsfact)); -// } - -// int SPRKStepGetErrWeights(void* arkode_mem, N_Vector eweight) -// { -// return (arkGetErrWeights(arkode_mem, eweight)); -// } - -// int SPRKStepGetResWeights(void* arkode_mem, N_Vector rweight) -// { -// return (arkGetResWeights(arkode_mem, rweight)); -// } - -// int SPRKStepGetWorkSpace(void* arkode_mem, long int* lenrw, long int* leniw) -// { -// return (arkGetWorkSpace(arkode_mem, lenrw, leniw)); -// } - int SPRKStepGetRootInfo(void* arkode_mem, int* rootsfound) { return (arkGetRootInfo(arkode_mem, rootsfound)); @@ -278,26 +167,6 @@ int SPRKStepGetNumConstrFails(void* arkode_mem, long int* nconstrfails) return (arkGetNumConstrFails(arkode_mem, nconstrfails)); } -int SPRKStepGetNumExpSteps(void* arkode_mem, long int* nsteps) -{ - return (arkGetNumExpSteps(arkode_mem, nsteps)); -} - -int SPRKStepGetNumAccSteps(void* arkode_mem, long int* nsteps) -{ - return (arkGetNumAccSteps(arkode_mem, nsteps)); -} - -int SPRKStepGetNumErrTestFails(void* arkode_mem, long int* netfails) -{ - return (arkGetNumErrTestFails(arkode_mem, netfails)); -} - -int SPRKStepGetNumStepSolveFails(void* arkode_mem, long int* nncfails) -{ - return (arkGetNumStepSolveFails(arkode_mem, nncfails)); -} - int SPRKStepGetUserData(void* arkode_mem, void** user_data) { return (arkGetUserData(arkode_mem, user_data)); @@ -489,27 +358,6 @@ int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) return (ARK_SUCCESS); } -/*--------------------------------------------------------------- - SPRKStepGetTimestepperStats: - - Returns integrator statistics - ---------------------------------------------------------------*/ -int SPRKStepGetTimestepperStats(void* arkode_mem, long int* expsteps, - long int* accsteps, long int* step_attempts, - long int* nf1, long int* nf2, - long int* nlinsetups, long int* netfails) -{ - ARKodeMem ark_mem; - - SPRKStepGetNumExpSteps(arkode_mem, expsteps); - SPRKStepGetNumAccSteps(arkode_mem, accsteps); - SPRKStepGetNumRhsEvals(arkode_mem, nf1, nf2); - SPRKStepGetNumStepAttempts(arkode_mem, step_attempts); - SPRKStepGetNumErrTestFails(arkode_mem, netfails); - - return (ARK_SUCCESS); -} - /*--------------------------------------------------------------- SPRKStepPrintAllStats: From fe5166250c3324e2e9d4ec3b92c37e68d4f8d6a4 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sun, 11 Jun 2023 00:13:13 -0700 Subject: [PATCH 052/177] automatically use tstop mode if a fixed step is used --- examples/arkode/C_serial/ark_hookes_law.c | 51 ++++++++++++++++------- examples/arkode/C_serial/ark_kepler.c | 2 - src/arkode/arkode.c | 10 +++++ src/arkode/arkode_io.c | 7 ++++ src/arkode/arkode_sprkstep.c | 10 ++++- 5 files changed, 61 insertions(+), 19 deletions(-) diff --git a/examples/arkode/C_serial/ark_hookes_law.c b/examples/arkode/C_serial/ark_hookes_law.c index 215a9e2809..e99f478551 100644 --- a/examples/arkode/C_serial/ark_hookes_law.c +++ b/examples/arkode/C_serial/ark_hookes_law.c @@ -31,7 +31,7 @@ * * Order sets the order of the method to use, dt is the time step size, and * use_compsums turns on (1) or off (0) compensated summation inside SPRKStep. - * Compensated summation increases accuracy but at increased cost. + * Compensated summation increases accuracy but at increased cost. * --------------------------------------------------------------------------*/ #include @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) y = NULL; solution = NULL; - /* Default problem parameters */ + /* Set the default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); sunrealtype Tf = SUN_RCONST(0.1); sunrealtype dt = SUN_RCONST(1e-4); @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) const sunrealtype B = SUN_RCONST(0.0); const sunrealtype omega = SUN_RCONST(64.0); - /* Default integrator Options */ + /* Set the default integrator Options */ int method = 0; int order = 4; int use_compsums = 1; @@ -93,13 +93,13 @@ int main(int argc, char* argv[]) printf("\n Begin Hooke's Law Problem\n\n"); - /* Parse CLI args */ + /* Parse the CLI args */ argi = 0; if (argc > 1) { order = atoi(argv[++argi]); } if (argc > 2) { dt = atof(argv[++argi]); } if (argc > 3) { use_compsums = atoi(argv[++argi]); } - /* Allocate and fill udata structure */ + /* Allocate and fill the user data structure */ udata = (UserData)malloc(sizeof(*udata)); udata->A = A; udata->B = B; @@ -109,29 +109,41 @@ int main(int argc, char* argv[]) retval = SUNContext_Create(NULL, &sunctx); if (check_retval(&retval, "SUNContext_Create", 1)) return 1; - /* Allocate our state vector */ - y = N_VNew_Serial(2, sunctx); + /* Required: Allocate our state vector */ + y = N_VNew_Serial(2, sunctx); + + /* Optional: Allocate a vector for the exact solution */ solution = N_VClone(y); - /* Fill the initial conditions */ + /* Required: Fill the initial conditions */ InitialConditions(y); - /* Create SPRKStep integrator */ + /* Required: Create SPRKStep integrator */ arkode_mem = SPRKStepCreate(Force, Velocity, T0, y, sunctx); + /* Optional: set the order of accuracy to use */ retval = SPRKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; + /* Optional: set the user data pointer that will be provided in callbacks */ retval = SPRKStepSetUserData(arkode_mem, udata); if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; + /* Optional: enable the compensated summation version of the SPRK + * implementation */ retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) return 1; + /* Conditionally optional: set the time step size to use + While this is technically optional, it is required unless a user-provied + adaptivity module is attached with SPRKStepSetAdaptivityMethod. */ retval = SPRKStepSetFixedStep(arkode_mem, dt); if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt)) + 2); + /* Conditionally optional: set the max number of time steps to take + While this is optional, it is often necessary with a fixed time step + size since the default is only 500. */ + retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt))); if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; /* Print out starting energy, momentum before integrating */ @@ -139,17 +151,20 @@ int main(int argc, char* argv[]) tout = T0 + dTout; fprintf(stdout, "t = %.6Lf, energy = %.6Lf\n", tret, Energy(y, dt, udata)); - /* Do integration */ + /* Do integration by looping over the output intervals. + We do this so we can output the integration status at a regular + interval. We do not have to do this and could just call SPRKStepEvolve + with the final time instead. */ for (iout = 0; iout < num_output_times; iout++) { - SPRKStepSetStopTime(arkode_mem, tout); + /* Required: evolve the solution in time */ retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - /* Output current integration status */ + /* Optional: output current integration status */ fprintf(stdout, "t = %.6Lf, sol. err = %.6Lf, energy = %.6Lf\n", tret, Solution(tret, y, solution, udata), Energy(y, dt, udata)); - /* Check if the solve was successful, if so, update the time and continue + /* Recommended: check if the solve was successful */ if (retval >= 0) { @@ -163,10 +178,14 @@ int main(int argc, char* argv[]) } } - free(udata); - N_VDestroy(y); fprintf(stdout, "\n"); + + /* Optional: output integrator statistics like the number of steps taken */ SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + + /* Required: free the user data and SUNDIALS objects */ + free(udata); + N_VDestroy(y); SPRKStepFree(&arkode_mem); SUNContext_Free(&sunctx); diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 65f25531a9..d8819c0af4 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -365,7 +365,6 @@ int main(int argc, char* argv[]) { sunrealtype hlast = SUN_RCONST(0.0); - SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); if (retval == ARK_ROOT_RETURN) @@ -412,7 +411,6 @@ int main(int argc, char* argv[]) { for (iout = 0; iout < num_output_times; iout++) { - ARKStepSetStopTime(arkode_mem, tout); retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); if (retval == ARK_ROOT_RETURN) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 7bd3362249..192bacffa6 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -696,6 +696,16 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, if (retval!= ARK_SUCCESS) return(retval); } + /* In fixed-step mode, use tstop mode by default since a fixed-step + user will expect to hit an exact multiple of their step size. + We have to call arkSetStopTime in arkEvolve (here) with tout since + we don't know tout until now. In this scenario if tstopset is false, + then this means that arkSetClearStopTime was called as we set tstopset + when the fixed step is set. */ + if (ark_mem->fixedstep && ark_mem->tstopset) { + arkSetStopTime(ark_mem, tout); + } + /* perform stopping tests */ if (!ark_mem->initsetup) if (arkStopTests(ark_mem, tout, yout, tret, itask, &retval)) diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 8727987590..66f4196ac4 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -569,6 +569,13 @@ int arkSetFixedStep(void *arkode_mem, realtype hfixed) } ark_mem = (ARKodeMem) arkode_mem; + /* By default, with a fixed-step we assume the user wants to hit + a multiple of the step size exactly. Setting the stop time + ensures this. However, we dont know the tout until arkEvolve + so we just set it to hfixed for now to ensure tstopset is set + to true. Later, in arkEvolve, we set the actual tstop value. */ + arkSetStopTime(ark_mem, hfixed); + /* re-attach internal error weight functions if necessary */ if ((hfixed == ZERO) && (!ark_mem->user_efun)) { if (ark_mem->itol == ARK_SV && ark_mem->Vabstol != NULL) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index c9b68128a3..88860df6ca 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -155,7 +155,7 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, /* We use Lagrange interpolation by default otherwise extra RHS calls are needed. This is because we cannot reuse the f2 RHS in TakeStep since it is a staggered time step. Additionally, it seems Lagrange interpolation does - a better job of conservation. */ + a better job conserving the system Hamiltonian. */ arkSetInterpolantType(ark_mem, ARK_INTERP_LAGRANGE); return ((void*)ark_mem); @@ -304,7 +304,15 @@ int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, { int retval; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); + + /* We set the tstop with SPRKStep by default because we usually + want to hit the tout exactly since a fixed time step is typically used. + The stop time can be cleared by a user with SPRKStepClearStopTime. */ + if (arkode_mem) + arkSetStopTime((ARKodeMem)arkode_mem, tout); + retval = arkEvolve((ARKodeMem)arkode_mem, tout, yout, tret, itask); + SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); return (retval); } From 820ec83a1caf7b1df1e2ff6ee074e543460b7277 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sun, 11 Jun 2023 00:13:19 -0700 Subject: [PATCH 053/177] add skeleton --- .../Usage/SPRKStep_c_interface/Skeleton.rst | 127 +++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst index 647938b0de..faa480aac0 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst @@ -2,4 +2,129 @@ .. _ARKODE.Usage.SPRKStep.Skeleton: A skeleton of the user's main program -===================================== \ No newline at end of file +============================================ + +The following is a skeleton of the user's main program (or calling +program) for the integration of an ODE IVP using the SPRKStep module. +Most of the steps are independent of the NVECTOR implementation used. +For the steps that are not, refer to :numref:`NVectors` for +the specific name of the function to be called or macro to be +referenced. + +.. index:: User main program + +#. Initialize parallel or multi-threaded environment, if appropriate. + + For example, call ``MPI_Init`` to initialize MPI if used, or set + ``num_threads``, the number of threads to use within the threaded + vector functions, if used. + +#. Create the SUNDIALS simulation context object. + + Call :c:func:`SUNContext_Create` to allocate the ``SUNContext`` object. + +#. Set problem dimensions, etc. + + This generally includes the problem size, ``N``, and may include + the local vector length ``Nlocal``. + + .. note:: + + The variables ``N`` and ``Nlocal`` should be of type + ``sunindextype``. + +#. Set vector of initial values + + To set the vector ``y0`` of initial values, use the appropriate + functions defined by the particular NVECTOR implementation. + + For native SUNDIALS vector implementations (except the CUDA and + RAJA based ones), use a call of the form + + .. code-block:: c + + y0 = N_VMake_***(..., ydata); + + if the ``realtype`` array ``ydata`` containing the initial values of + :math:`y` already exists. Otherwise, create a new vector by making + a call of the form + + .. code-block:: c + + y0 = N_VNew_***(...); + + and then set its elements by accessing the underlying data where it + is located with a call of the form + + .. code-block:: c + + ydata = N_VGetArrayPointer_***(y0); + + For details on each of SUNDIALS' provided vector implementations, see + the corresponding sections in :numref:`NVectors` for details. + +#. Create SPRKStep object + + Call ``arkode_mem = SPRKStepCreate(...)`` to create the SPRKStep memory + block. :c:func:`SPRKStepCreate` returns a ``void*`` pointer to + this memory structure. See :numref:`ARKODE.Usage.SPRKStep.Initialization` for + details. + +#. Specify time step size or adaptivity module + + Call :c:func:`SPRKStepSetFixedStep()` or + :c:func:`SPRKStepAdaptivityFn()` to specify either a fixed time-step + size or a callback function that adapts the time-step size. SPRKStep + does not support error-based adaptivity like other ARKODE time-stepper + modules due to the incompatibility with symplectic methods. + +#. Set optional inputs + + Call ``SPRKStepSet*`` functions to change any optional inputs that + control the behavior of SPRKStep from their default values. See + :numref:`ARKODE.Usage.SPRKStep.OptionalInputs` for details. + +#. Specify rootfinding problem + + Optionally, call :c:func:`SPRKStepRootInit()` to initialize a rootfinding + problem to be solved during the integration of the ODE system. See + :numref:`ARKODE.Usage.SPRKStep.RootFinding` for general details, and + :numref:`ARKODE.Usage.SPRKStep.OptionalInputs` for relevant optional + input calls. + +#. Advance solution in time + + For each point at which output is desired, call + + .. code-block:: c + + ier = SPRKStepEvolve(arkode_mem, tout, yout, &tret, itask); + + Here, ``itask`` specifies the return mode. The vector ``yout`` + (which can be the same as the vector ``y0`` above) will contain + :math:`y(t_\text{out})`. See :numref:`ARKODE.Usage.SPRKStep.Integration` + for details. + +#. Get optional outputs + + Call ``SPRKStepGet*`` functions to obtain optional output. See + :numref:`ARKODE.Usage.SPRKStep.OptionalOutputs` for details. + +#. Deallocate memory for solution vector + + Upon completion of the integration, deallocate memory for the + vector ``y`` (or ``yout``) by calling the NVECTOR destructor + function: + + .. code-block:: c + + N_VDestroy(y); + +#. Free solver memory + + Call :c:func:`SPRKStepFree()` to free the memory allocated for + the SPRKStep module. + +#. Finalize MPI, if used + + Call ``MPI_Finalize`` to terminate MPI. From 680607a7d8b6100d8fb1dd6ac1884429156664dd Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 12 Jun 2023 12:57:15 -0700 Subject: [PATCH 054/177] add example paths to index --- .../guide/source/Usage/SPRKStep_c_interface/index.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst index dbe4a5ff38..cde42d0258 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst @@ -23,7 +23,12 @@ discuss the header files and the layout of the user's main program, and provide descriptions of the SPRKStep user-callable functions and user-supplied functions. The example programs located in the source code ``examples/arkode`` folder, may -be helpful as templates for new codes. +be helpful as templates for new codes. In particular, + +* ``examples/arkode/C_serial/ark_hookes_law.c``, and +* ``examples/arkode/C_serial/ark_kepler.c`` + +demonstrate ``SPRKStep`` usage. SPRKStep uses the input and output constants from the shared ARKODE infrastructure. These are defined as needed in this chapter, but for convenience the full list is From 386244b887c3c2b6d59d7c5058b1213b2c181a91 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 12 Jun 2023 12:57:20 -0700 Subject: [PATCH 055/177] Revert "automatically use tstop mode if a fixed step is used" This reverts commit c9538b2a5d9f8640156f92d6730588353f7c2195. --- examples/arkode/C_serial/ark_hookes_law.c | 51 +++++++---------------- examples/arkode/C_serial/ark_kepler.c | 2 + src/arkode/arkode.c | 10 ----- src/arkode/arkode_io.c | 7 ---- src/arkode/arkode_sprkstep.c | 10 +---- 5 files changed, 19 insertions(+), 61 deletions(-) diff --git a/examples/arkode/C_serial/ark_hookes_law.c b/examples/arkode/C_serial/ark_hookes_law.c index e99f478551..215a9e2809 100644 --- a/examples/arkode/C_serial/ark_hookes_law.c +++ b/examples/arkode/C_serial/ark_hookes_law.c @@ -31,7 +31,7 @@ * * Order sets the order of the method to use, dt is the time step size, and * use_compsums turns on (1) or off (0) compensated summation inside SPRKStep. - * Compensated summation increases accuracy but at increased cost. + * Compensated summation increases accuracy but at increased cost. * --------------------------------------------------------------------------*/ #include @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) y = NULL; solution = NULL; - /* Set the default problem parameters */ + /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); sunrealtype Tf = SUN_RCONST(0.1); sunrealtype dt = SUN_RCONST(1e-4); @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) const sunrealtype B = SUN_RCONST(0.0); const sunrealtype omega = SUN_RCONST(64.0); - /* Set the default integrator Options */ + /* Default integrator Options */ int method = 0; int order = 4; int use_compsums = 1; @@ -93,13 +93,13 @@ int main(int argc, char* argv[]) printf("\n Begin Hooke's Law Problem\n\n"); - /* Parse the CLI args */ + /* Parse CLI args */ argi = 0; if (argc > 1) { order = atoi(argv[++argi]); } if (argc > 2) { dt = atof(argv[++argi]); } if (argc > 3) { use_compsums = atoi(argv[++argi]); } - /* Allocate and fill the user data structure */ + /* Allocate and fill udata structure */ udata = (UserData)malloc(sizeof(*udata)); udata->A = A; udata->B = B; @@ -109,41 +109,29 @@ int main(int argc, char* argv[]) retval = SUNContext_Create(NULL, &sunctx); if (check_retval(&retval, "SUNContext_Create", 1)) return 1; - /* Required: Allocate our state vector */ - y = N_VNew_Serial(2, sunctx); - - /* Optional: Allocate a vector for the exact solution */ + /* Allocate our state vector */ + y = N_VNew_Serial(2, sunctx); solution = N_VClone(y); - /* Required: Fill the initial conditions */ + /* Fill the initial conditions */ InitialConditions(y); - /* Required: Create SPRKStep integrator */ + /* Create SPRKStep integrator */ arkode_mem = SPRKStepCreate(Force, Velocity, T0, y, sunctx); - /* Optional: set the order of accuracy to use */ retval = SPRKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; - /* Optional: set the user data pointer that will be provided in callbacks */ retval = SPRKStepSetUserData(arkode_mem, udata); if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; - /* Optional: enable the compensated summation version of the SPRK - * implementation */ retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) return 1; - /* Conditionally optional: set the time step size to use - While this is technically optional, it is required unless a user-provied - adaptivity module is attached with SPRKStepSetAdaptivityMethod. */ retval = SPRKStepSetFixedStep(arkode_mem, dt); if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; - /* Conditionally optional: set the max number of time steps to take - While this is optional, it is often necessary with a fixed time step - size since the default is only 500. */ - retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt))); + retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt)) + 2); if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; /* Print out starting energy, momentum before integrating */ @@ -151,20 +139,17 @@ int main(int argc, char* argv[]) tout = T0 + dTout; fprintf(stdout, "t = %.6Lf, energy = %.6Lf\n", tret, Energy(y, dt, udata)); - /* Do integration by looping over the output intervals. - We do this so we can output the integration status at a regular - interval. We do not have to do this and could just call SPRKStepEvolve - with the final time instead. */ + /* Do integration */ for (iout = 0; iout < num_output_times; iout++) { - /* Required: evolve the solution in time */ + SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); - /* Optional: output current integration status */ + /* Output current integration status */ fprintf(stdout, "t = %.6Lf, sol. err = %.6Lf, energy = %.6Lf\n", tret, Solution(tret, y, solution, udata), Energy(y, dt, udata)); - /* Recommended: check if the solve was successful + /* Check if the solve was successful, if so, update the time and continue */ if (retval >= 0) { @@ -178,14 +163,10 @@ int main(int argc, char* argv[]) } } - fprintf(stdout, "\n"); - - /* Optional: output integrator statistics like the number of steps taken */ - SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - - /* Required: free the user data and SUNDIALS objects */ free(udata); N_VDestroy(y); + fprintf(stdout, "\n"); + SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); SPRKStepFree(&arkode_mem); SUNContext_Free(&sunctx); diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index d8819c0af4..65f25531a9 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -365,6 +365,7 @@ int main(int argc, char* argv[]) { sunrealtype hlast = SUN_RCONST(0.0); + SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); if (retval == ARK_ROOT_RETURN) @@ -411,6 +412,7 @@ int main(int argc, char* argv[]) { for (iout = 0; iout < num_output_times; iout++) { + ARKStepSetStopTime(arkode_mem, tout); retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); if (retval == ARK_ROOT_RETURN) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 192bacffa6..7bd3362249 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -696,16 +696,6 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, if (retval!= ARK_SUCCESS) return(retval); } - /* In fixed-step mode, use tstop mode by default since a fixed-step - user will expect to hit an exact multiple of their step size. - We have to call arkSetStopTime in arkEvolve (here) with tout since - we don't know tout until now. In this scenario if tstopset is false, - then this means that arkSetClearStopTime was called as we set tstopset - when the fixed step is set. */ - if (ark_mem->fixedstep && ark_mem->tstopset) { - arkSetStopTime(ark_mem, tout); - } - /* perform stopping tests */ if (!ark_mem->initsetup) if (arkStopTests(ark_mem, tout, yout, tret, itask, &retval)) diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 66f4196ac4..8727987590 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -569,13 +569,6 @@ int arkSetFixedStep(void *arkode_mem, realtype hfixed) } ark_mem = (ARKodeMem) arkode_mem; - /* By default, with a fixed-step we assume the user wants to hit - a multiple of the step size exactly. Setting the stop time - ensures this. However, we dont know the tout until arkEvolve - so we just set it to hfixed for now to ensure tstopset is set - to true. Later, in arkEvolve, we set the actual tstop value. */ - arkSetStopTime(ark_mem, hfixed); - /* re-attach internal error weight functions if necessary */ if ((hfixed == ZERO) && (!ark_mem->user_efun)) { if (ark_mem->itol == ARK_SV && ark_mem->Vabstol != NULL) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 88860df6ca..c9b68128a3 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -155,7 +155,7 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, /* We use Lagrange interpolation by default otherwise extra RHS calls are needed. This is because we cannot reuse the f2 RHS in TakeStep since it is a staggered time step. Additionally, it seems Lagrange interpolation does - a better job conserving the system Hamiltonian. */ + a better job of conservation. */ arkSetInterpolantType(ark_mem, ARK_INTERP_LAGRANGE); return ((void*)ark_mem); @@ -304,15 +304,7 @@ int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, { int retval; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); - - /* We set the tstop with SPRKStep by default because we usually - want to hit the tout exactly since a fixed time step is typically used. - The stop time can be cleared by a user with SPRKStepClearStopTime. */ - if (arkode_mem) - arkSetStopTime((ARKodeMem)arkode_mem, tout); - retval = arkEvolve((ARKodeMem)arkode_mem, tout, yout, tret, itask); - SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); return (retval); } From dad649985ef7f9653420dde750e1b476b4763179 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 12 Jun 2023 13:42:14 -0700 Subject: [PATCH 056/177] add better command line arguments --- examples/arkode/C_serial/ark_kepler.c | 235 ++++++++++++++++++-------- 1 file changed, 167 insertions(+), 68 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 65f25531a9..5ff17686bb 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -1,3 +1,4 @@ +/* clang-format off */ /* ---------------------------------------------------------------------------- * Programmer(s): Cody J. Balos @ LLNL * ---------------------------------------------------------------------------- @@ -34,25 +35,26 @@ * fixed time-step size. * * The program also accepts command line arguments to change the method - * used and time-stepping strategy. The program can be run like so - * ./ark_kepler [step mode] [method family] [method order/variant] [dt] - * [compensated sums] where [step mode] = 0 uses a fixed time step dt [step - * mode] = 1 uses adaptive time stepping [method family] = 0 indicates a SPRK - * method should be used [method family] = 1 indicates an ERK method should be - * used [method order] in {1, 2, 22, 222, 3, 33, 4, 44, 5, 6, 8, 10} indicates - * the method order, and for 2nd, 3rd, and 4th order SPRK, the variant of the - * method family to use. I.e., when method family = 1, then: 1 - Symplectic - * Euler, 2 - 2nd order Leapfrog, 22 - 2nd order Pseudo Leapfrog, 222 - 2nd - * order McLachlan, 3 - 3rd order Ruth, 33 - 3rd order McLachlan, 4 - 4th order - * Candy-Rozmus, 44 - 4th order McLachlan, 5 - 5th order McLachlan, 6 - 6th - * order Yoshida, 8 - 8th order McLachlan, 10 - 10th order Sofroniou When method - * family = 1, then method order just is the order of the ERK method. [dt] - - * time step size for fixed-step time stepping, or when using adaptivity the - * constant which bounds the error like O(eps^p) where p is the method - * order. [compensated sums] = 0, dont use compensated summation for greater - * accuracy when using SPRK methods [compensated sums] = 1, use compensated - * summation for greater accuracy when using SPRK methods - * + * used and time-stepping strategy. The program has the following CLI arguments: + * + * --step-mode should we use a fixed time-step or adaptive time-step (default fixed) + * --stepper should we use the ARKStep or SPRKStep time-stepping module + * --order <1,2,22,222,3,33,4,44,5,6,8,10> which method order and specific method to use (default 4) + * 1 - Symplectic Euler + * 2 - 2nd order Leapfrog + * 22 - 2nd order Pseudo Leapfrog + * 222 - 2nd order McLachlan + * 3 - 3rd order Ruth + * 33 - 3rd order McLachlan + * 4 - 4th order Candy-Rozmus + * 44 - 4th order McLachlan + * 5 - 5th order McLachlan + * 6 - 6th order Yoshida + * 8 - 8th order McLachlan + * 10 - 10th order Sofroniou + * --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) + * --use-compensated-sums turns on compensated summation in ARKODE where applicable + * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner * Geometric Numerical Integration: Structure-Preserving @@ -60,6 +62,7 @@ * Springer, 2006, * ISSN 0179-3632 * --------------------------------------------------------------------------*/ +/* clang-format on */ #include /* prototypes for ARKStep fcts., consts */ #include @@ -67,6 +70,7 @@ #include #include /* serial N_Vector type, fcts., macros */ #include +#include #include /* def. math fcns, 'sunrealtype' */ #include #include @@ -75,7 +79,33 @@ #include "arkode/arkode.h" +typedef struct +{ + sunrealtype ecc; + + /* for time-step control */ + sunrealtype eps; + sunrealtype alpha; + sunrealtype rho_0; + sunrealtype rho_nphalf; + sunrealtype rho_n; + sunrealtype Q0; + + FILE* hhist_fp; +} * UserData; + +typedef struct +{ + int step_mode; + int method; + int order; + int use_compsums; + sunrealtype dt; +} ProgramArgs; + static int check_retval(void* returnvalue, const char* funcname, int opt); +static int ParseArgs(int argc, char* argv[], ProgramArgs* args); +static void PrintHelp(); static void InitialConditions(N_Vector y0, sunrealtype ecc); static sunrealtype Hamiltonian(N_Vector yvec); @@ -93,61 +123,43 @@ static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, int q, int p, sunrealtype* hnew, void* user_data); static sunrealtype ControlError(N_Vector yvec, void* user_data); -typedef struct -{ - sunrealtype ecc; - - /* for time-step control */ - sunrealtype eps; - sunrealtype alpha; - sunrealtype rho_0; - sunrealtype rho_nphalf; - sunrealtype rho_n; - sunrealtype Q0; - - FILE* hhist_fp; -} * UserData; - int main(int argc, char* argv[]) { - SUNContext sunctx; - N_Vector y; - SUNNonlinearSolver NLS; - UserData udata; - sunrealtype tout, tret; - sunrealtype H0, L0; - void* arkode_mem; - FILE *conserved_fp, *solution_fp, *times_fp; - int argi, iout, retval; - int rootsfound = 0; - - NLS = NULL; - y = NULL; + ProgramArgs args; + void* arkode_mem = NULL; + SUNContext sunctx = NULL; + N_Vector y = NULL; + SUNNonlinearSolver NLS = NULL; + UserData udata = NULL; + sunrealtype tout = NAN; + sunrealtype tret = NAN; + sunrealtype H0 = NAN; + sunrealtype L0 = NAN; + FILE* conserved_fp = NULL; + FILE* solution_fp = NULL; + FILE* times_fp = NULL; + int rootsfound = 0; + int argi = 0; + int iout = 0; + int retval = 0; + + /* CLI args */ + if (ParseArgs(argc, argv, &args)) { return -1; }; + const int step_mode = args.step_mode; + const int method = args.method; + const int order = args.order; + const int use_compsums = args.use_compsums; + const sunrealtype dt = args.dt; /* Default problem parameters */ - const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(50.0); - sunrealtype dt = SUN_RCONST(1e-2); - const sunrealtype ecc = SUN_RCONST(0.6); - - /* Default integrator Options */ - int step_mode = 0; - int method = 0; - int order = 4; - int use_compsums = 0; - const sunrealtype dTout = 10*dt; // SUN_RCONST(1.); + const sunrealtype T0 = SUN_RCONST(0.0); + sunrealtype Tf = SUN_RCONST(50.0); + const sunrealtype ecc = SUN_RCONST(0.6); + const sunrealtype dTout = 10 * dt; // SUN_RCONST(1.); const int num_output_times = (int)ceil(Tf / dTout); printf("\n Begin Kepler Problem\n\n"); - /* Parse CLI args */ - argi = 0; - if (argc > 1) { step_mode = atoi(argv[++argi]); } - if (argc > 2) { method = atoi(argv[++argi]); } - if (argc > 3) { order = atoi(argv[++argi]); } - if (argc > 4) { dt = atof(argv[++argi]); } - if (argc > 5) { use_compsums = atoi(argv[++argi]); } - /* Allocate and fill udata structure */ udata = (UserData)malloc(sizeof(*udata)); udata->ecc = ecc; @@ -611,8 +623,6 @@ int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, *hnew = udata->eps / udata->rho_nphalf; - // fprintf(stderr, "<<< hnew =%g\n", (double) *hnew); - return 0; } @@ -622,6 +632,95 @@ sunrealtype ControlError(N_Vector yvec, void* user_data) return udata->rho_n * Q(yvec, udata->alpha) - udata->rho_0 * udata->Q0; } +int ParseArgs(int argc, char* argv[], ProgramArgs* args) +{ + args->step_mode = 0; + args->method = 0; + args->order = 4; + args->use_compsums = 0; + args->dt = SUN_RCONST(1e-2); + + for (int argi = 1; argi < argc; argi++) + { + if (!strcmp(argv[argi], "--step-mode")) + { + argi++; + if (!strcmp(argv[argi], "fixed")) { args->step_mode = 0; } + else if (!strcmp(argv[argi], "adapt")) { args->step_mode = 1; } + else + { + fprintf(stderr, "--step-mode must be 'fixed' or 'adapt'\n"); + return -1; + } + } + else if (!strcmp(argv[argi], "--stepper")) + { + argi++; + if (!strcmp(argv[argi], "sprk")) { args->method = 0; } + else if (!strcmp(argv[argi], "ark")) { args->method = 1; } + else + { + fprintf(stderr, "--stepper must be 'ark' or 'sprk'\n"); + return -1; + } + } + else if (!strcmp(argv[argi], "--order")) + { + argi++; + args->order = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--dt")) + { + argi++; + args->dt = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--use-compensated-sums")) + { + args->use_compsums = 1; + } + else if (!strcmp(argv[argi], "--help")) + { + PrintHelp(); + return -1; + } + else + { + fprintf(stderr, "Unrecognized argument %s\n", argv[argi]); + PrintHelp(); + return -1; + } + } + + return 0; +} + +void PrintHelp() +{ + fprintf(stderr, "ark_kepler: an ARKODE example demonstrating the SPRKStep time-stepping module solving the Kepler problem\n"); + fprintf(stderr, " --step-mode should we use a fixed " + "time-step or adaptive time-step (default fixed)\n"); + fprintf(stderr, " --stepper should we use the ARKStep or " + "SPRKStep time-stepping module\n"); + fprintf(stderr, " --order <1,2,22,222,3,33,4,44,5,6,8,10> which method " + "order and specific method to use (default 4)\n"); + fprintf(stderr, " 1 - Symplectic Euler\n"); + fprintf(stderr, " 2 - 2nd order Leapfrog\n"); + fprintf(stderr, " 22 - 2nd order Pseudo Leapfrog\n"); + fprintf(stderr, " 222 - 2nd order McLachlan\n"); + fprintf(stderr, " 3 - 3rd order Ruth\n"); + fprintf(stderr, " 33 - 3rd order McLachlan\n"); + fprintf(stderr, " 4 - 4th order Candy-Rozmus\n"); + fprintf(stderr, " 44 - 4th order McLachlan\n"); + fprintf(stderr, " 5 - 5th order McLachlan\n"); + fprintf(stderr, " 6 - 6th order Yoshida\n"); + fprintf(stderr, " 8 - 8th order McLachlan\n"); + fprintf(stderr, " 10 - 10th order Sofroniou\n"); + fprintf(stderr, " --dt the fixed-time step size to use if fixed " + "time stepping is turned on (default 0.01)\n"); + fprintf(stderr, " --use-compensated-sums turns on compensated summation in " + "ARKODE where applicable\n"); +} + /* Check function return value... opt == 0 means SUNDIALS function allocates memory so check if returned NULL pointer From 476a252ad6377633d307061f262be71769bbe869 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 12 Jun 2023 13:49:16 -0700 Subject: [PATCH 057/177] add comment regarding SetStopTime use --- examples/arkode/C_serial/ark_hookes_law.c | 1 - examples/arkode/C_serial/ark_kepler.c | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/arkode/C_serial/ark_hookes_law.c b/examples/arkode/C_serial/ark_hookes_law.c index 215a9e2809..055add542d 100644 --- a/examples/arkode/C_serial/ark_hookes_law.c +++ b/examples/arkode/C_serial/ark_hookes_law.c @@ -142,7 +142,6 @@ int main(int argc, char* argv[]) /* Do integration */ for (iout = 0; iout < num_output_times; iout++) { - SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 5ff17686bb..9dd87870ef 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -377,6 +377,10 @@ int main(int argc, char* argv[]) { sunrealtype hlast = SUN_RCONST(0.0); + /* Optional: if the stop time is not set, then its possible that the the + exact requested output time will not be hit (even with a fixed + time-step due to roundoff error accumulation) and interpolation will be + used to get the solution at the output time. */ SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); @@ -424,6 +428,10 @@ int main(int argc, char* argv[]) { for (iout = 0; iout < num_output_times; iout++) { + /* Optional: if the stop time is not set, then its possible that the the + exact requested output time will not be hit (even with a fixed + time-step due to roundoff error accumulation) and interpolation will be + used to get the solution at the output time. */ ARKStepSetStopTime(arkode_mem, tout); retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); @@ -696,7 +704,8 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) void PrintHelp() { - fprintf(stderr, "ark_kepler: an ARKODE example demonstrating the SPRKStep time-stepping module solving the Kepler problem\n"); + fprintf(stderr, "ark_kepler: an ARKODE example demonstrating the SPRKStep " + "time-stepping module solving the Kepler problem\n"); fprintf(stderr, " --step-mode should we use a fixed " "time-step or adaptive time-step (default fixed)\n"); fprintf(stderr, " --stepper should we use the ARKStep or " From ed8845ff5e2af791c802ab847320ef5d5935552b Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 12 Jun 2023 13:58:04 -0700 Subject: [PATCH 058/177] add SPRKStep to ARKODE introduction --- doc/arkode/guide/source/Introduction.rst | 14 +++++++++++++- doc/arkode/guide/source/Mathematics.rst | 19 +++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/doc/arkode/guide/source/Introduction.rst b/doc/arkode/guide/source/Introduction.rst index 7e8d6d6fa6..f21db6ceee 100644 --- a/doc/arkode/guide/source/Introduction.rst +++ b/doc/arkode/guide/source/Introduction.rst @@ -24,7 +24,8 @@ ordinary differential equations (ODEs). ARKODE itself is structured to support a wide range of one-step (but multi-stage) methods, allowing for rapid development of parallel implementations of state-of-the-art time integration methods. At present, ARKODE is -packaged with two time-stepping modules, *ARKStep* and *ERKStep*. +packaged with four time-stepping modules, *ARKStep*, *ERKStep*, *SPRKStep*, +and *MRIStep*. *ARKStep* supports ODE systems posed in split, linearly-implicit form, @@ -78,6 +79,17 @@ The algorithms used in ERKStep are adaptive- and fixed-step explicit Runge--Kutta methods. As with ARKStep, the ERKStep module is packaged with adaptive explicit methods of orders 2-8. +*SPRKStep* focuses on Hamiltonian systems posed in the form, + +.. math:: + H(p, q, t) = T(p) + V(q, t) + +.. math:: + \dot{p} = f_1(q,t) = \frac{\partial V(q,t)}{\partial q}, \quad + \dot{q} = f_2(p) = \frac{\partial T(p)}{\partial p}, + :label: ARKODE_ODE_hamiltonian + +allowing for conservation of quadratic invariants. *MRIStep* focuses specifically on problems posed in additive form, diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 765a224dbb..f2212abdd0 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -468,8 +468,8 @@ SPRKStep -- Symplectic Partitioned Runge--Kutta methods The SPRKStep time-stepping module in ARKODE is designed for IVPs of the form .. math:: - \dot{p} = f(q,t) = \frac{\partial V(q,t)}{\partial q}, \quad - \dot{q} = g(p) = \frac{\partial T(p)}{\partial p}, + \dot{p} = f_1(q,t) = \frac{\partial V(q,t)}{\partial q}, \quad + \dot{q} = f_2(p) = \frac{\partial T(p)}{\partial p}, \qquad p(t_0) = p_0,\quad q(t_0) = q_0, :label: ARKODE_IVP_Hamiltonian @@ -481,20 +481,19 @@ where is the system Hamiltonian. When :math:`dH/dt = 0`, i.e. when *H* is autonomous, then H is a conserved quantity. Often this correponds to the conservation of energy (for example, in *n*-body problems). -In solving the IVP :ref:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form +In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form .. math:: \dot{y} = \begin{bmatrix} - f(q,t) \\ - g(p) + f_1(q,t) \\ + f_2(p) \end{bmatrix} \qquad y(t_0) = \begin{bmatrix} p_0\\ q_0 \end{bmatrix} - :label: ARKODE_IVP_Hamiltonian SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair of Butcher tableau, @@ -530,8 +529,8 @@ In the default case, the algorithm for a single time-step is as follows #. For :math:`i = 1,\ldots,s` do: - #. :math:`P_i = P_{i-1} + h_{n+1} a_i f(Q_i, t_n + C_i h_{n+1})` - #. :math:`Q_{i+1} = Q_i + h_{n+1} b_i g(P_i)` + #. :math:`P_i = P_{i-1} + h_{n+1} a_i f_1(Q_i, t_n + C_i h_{n+1})` + #. :math:`Q_{i+1} = Q_i + h_{n+1} b_i f_2(P_i)` #. Set :math:`p_{n+1} = P_s, q_{n+1} = Q_{s+1}` @@ -542,8 +541,8 @@ additional storage and vector operations :cite:p:`Sof:03`. #. For :math:`i = 1,\ldots,s` do: - #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} a_i f(q_n + \Delta Q_i, t_n + C_i h_{n+1})` - #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} b_i g(p_n + \Delta P_i)` + #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} a_i f_1(q_n + \Delta Q_i, t_n + C_i h_{n+1})` + #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} b_i f_2(p_n + \Delta P_i)` #. Set :math:`\Delta p_{n+1} = \Delta P_s, \Delta q_{n+1} = \Delta Q_{s+1}` From 0d14ca0e9efa6effffe8b2365775f0910de5b7fb Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 12 Jun 2023 14:23:16 -0700 Subject: [PATCH 059/177] cross-verify docs and header/impls --- .../SPRKStep_c_interface/User_callable.rst | 114 +++++++++++++----- include/arkode/arkode_sprkstep.h | 11 +- src/arkode/arkode_sprkstep_io.c | 23 +++- 3 files changed, 107 insertions(+), 41 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 020fa42f6b..adb8f8aad2 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -39,14 +39,14 @@ SPRKStep initialization and deallocation functions ------------------------------------------------------ -.. c:function:: void* SPRKStepCreate(ARKRhsFn f, ARKRhsFn g, realtype t0,\ +.. c:function:: void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0,\ N_Vector y0, SUNContext sunctx) This function allocates and initializes memory for a problem to be solved using the SPRKStep time-stepping module in ARKODE. - :param f: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f(q,t) = \frac{\partial V(q,t)}{\partial q}` - :param g: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`g(p) = \frac{\partial T(p)}{\partial p}` + :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f1(q,t) = \frac{\partial V(q,t)}{\partial q}` + :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f2(p) = \frac{\partial T(p)}{\partial p}` :param t0: the initial value of :math:`t` :param y0: the initial condition vector :math:`y(t_0)` :param sunctx: the :c:type:`SUNContext` object (see :numref:`SUNDIALS.SUNContext`) @@ -262,7 +262,7 @@ Optional inputs for SPRKStep +-----------------------------------------------------+------------------------------------------+------------------------+ | Return SPRKStep solver parameters to their defaults | :c:func:`SPRKStepSetDefaults()` | internal | +-----------------------------------------------------+------------------------------------------+------------------------+ - | Set dense output interpolation type | :c:func:`SPRKStepSetInterpolantType()` | ``ARK_INTERP_HERMITE`` | + | Set dense output interpolation type | :c:func:`SPRKStepSetInterpolantType()` | ``ARK_INTERP_LAGRANGE``| +-----------------------------------------------------+------------------------------------------+------------------------+ | Set dense output polynomial degree | :c:func:`SPRKStepSetInterpolantDegree()` | 5 | +-----------------------------------------------------+------------------------------------------+------------------------+ @@ -338,7 +338,7 @@ Optional inputs for SPRKStep After the first call to :c:func:`SPRKStepEvolve()` the interpolation type may not be changed without first calling :c:func:`SPRKStepReInit()`. - If this routine is not called, the Hermite interpolation module will be used. + If this routine is not called, the Lagrange interpolation module will be used. @@ -382,15 +382,6 @@ Optional inputs for SPRKStep interval. - -.. c:function:: int SPRKStepSetDenseOrder(void* arkode_mem, int dord) - - *This function is deprecated, and will be removed in a future release. - Users should transition to calling* :c:func:`SPRKStepSetInterpolantDegree()` - *instead.* - - - .. c:function:: int SPRKStepSetDiagnostics(void* arkode_mem, FILE* diagfp) Specifies the file pointer for a diagnostics file where @@ -465,8 +456,6 @@ Optional inputs for SPRKStep ``NULL`` will always be directed to ``stderr``. - - .. c:function:: int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed) Disabled time step adaptivity within SPRKStep, and specifies the @@ -540,6 +529,28 @@ Optional inputs for SPRKStep Passing *mxsteps* < 0 disables the test (not recommended). +.. c:function:: int SPRKStepSetMaxHnilWarns(void* arkode_mem, int mxhnil) + + Specifies the maximum number of messages issued by the + solver to warn that :math:`t+h=t` on the next internal step, before + ERKStep will instead return with an error. + + **Arguments:** + * *arkode_mem* -- pointer to the ERKStep memory block. + * *mxhnil* -- maximum allowed number of warning messages :math:`(>0)`. + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ERKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + The default value is 10; set *mxhnil* to zero to specify + this default. + + A negative value indicates that no warning messages should be issued. + + .. c:function:: int SPRKStepSetStopTime(void* arkode_mem, realtype tstop) Specifies the value of the independent variable @@ -609,13 +620,15 @@ Optional inputs for IVP method selection .. _ARKODE.Usage.SPRKStep.SPRKStepMethodInputTable: .. table:: Optional inputs for IVP method selection - +--------------------------------------+----------------------------------+------------------+ - | Optional input | Function name | Default | - +--------------------------------------+----------------------------------+------------------+ - | Set integrator method order | :c:func:`SPRKStepSetOrder()` | 4 | - +--------------------------------------+----------------------------------+------------------+ - | Set SPRK method pair | :c:func:`SPRKStepSetMethod()` | internal | - +--------------------------------------+----------------------------------+------------------+ + +-----------------------------+-------------------------------------------+----------+ + | Optional input | Function name | Default | + +-----------------------------+-------------------------------------------+----------+ + | Set integrator method order | :c:func:`SPRKStepSetOrder()` | 4 | + +-----------------------------+-------------------------------------------+----------+ + | Set SPRK method pair | :c:func:`SPRKStepSetMethod()` | internal | + +-----------------------------+-------------------------------------------+----------+ + | Use compensated summation | :c:func:`SPRKStepSetUseCompensatedSums()` | false | + +-----------------------------+-------------------------------------------+----------+ .. c:function:: int SPRKStepSetOrder(void* arkode_mem, int ord) @@ -639,6 +652,24 @@ Optional inputs for IVP method selection :c:func:`SPRKStepEvolve()`, unless :c:func:`SPRKStepReInit()` is called. +.. c:function:: int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) + + Specifies if compensated summation should be used where applicable. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param onoff: should compensated summation be used (1) or not (0) + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + This increases the computational cost and memory usage of the SPRK methods + per stage, however, it signficantly more robust to roundoff error + accumulation. + + .. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem) Specifies the SPRK method. @@ -654,7 +685,7 @@ Optional inputs for IVP method selection **Notes:** For a description of the :c:type:`ARKodeSPRKMem` type and related - functions for creating Butcher tables, see :numref:`ARKodeSPRKMem`. + functions for creating the method structure, see :numref:`ARKodeSPRKMem`. No error checking is performed to ensure that either the method order *p* or specified in the method structure correctly describe the coefficients. @@ -881,14 +912,14 @@ Main solver optional output functions +-----------------------------------------------------+--------------------------------------------+ | Cumulative number of internal steps | :c:func:`SPRKStepGetNumSteps()` | +-----------------------------------------------------+--------------------------------------------+ - | Actual initial time step size used | :c:func:`SPRKStepGetActualInitStep()` | - +-----------------------------------------------------+--------------------------------------------+ | Step size used for the last successful step | :c:func:`SPRKStepGetLastStep()` | +-----------------------------------------------------+--------------------------------------------+ | Step size to be attempted on the next step | :c:func:`SPRKStepGetCurrentStep()` | +-----------------------------------------------------+--------------------------------------------+ | Current internal time reached by the solver | :c:func:`SPRKStepGetCurrentTime()` | +-----------------------------------------------------+--------------------------------------------+ + | Current internal state reached by the solver | :c:func:`SPRKStepGetCurrentState()` | + +-----------------------------------------------------+--------------------------------------------+ | Single accessor to many statistics at once | :c:func:`SPRKStepGetStepStats()` | +-----------------------------------------------------+--------------------------------------------+ | Print all statistics | :c:func:`SPRKStepPrintAllStats` | @@ -956,6 +987,24 @@ Main solver optional output functions * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` +.. c:function:: int SPRKStepGetCurrentState(void *arkode_mem, N_Vector *ycur) + + Returns the current internal solution reached by the solver. + + **Arguments:** + * *arkode_mem* -- pointer to the ARKStep memory block. + * *ycur* -- current internal solution. + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ARKStep memory was ``NULL`` + + **Notes:** + Users should exercise extreme caution when using this function, + as altering values of *ycur* may lead to undesirable behavior, depending + on the particular use case and on when this routine is called. + + .. c:function:: int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, realtype* hinused, realtype* hlast, realtype* hcur, realtype* tcur) Returns many of the most useful optional outputs in a single call. @@ -1022,13 +1071,14 @@ Main solver optional output functions * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` -.. c:function:: int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf_evals) +.. c:function:: int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) Returns the number of calls to the user's right-hand - side function, :math:`f` (so far). + side functions, :math:`f_1` and :math:`f_2` (so far). :param arkode_mem: pointer to the SPRKStep memory block. - :param nf_evals: number of calls to the user's :math:`f(t,y)` function. + :param nf1: number of calls to the user's :math:`f_1(t,p)` function. + :param nf2: number of calls to the user's :math:`f_2(q)` function. :return: * *ARK_SUCCESS* if successful @@ -1248,14 +1298,14 @@ comments apply if there is to be a jump in the dependent variable vector. -.. c:function:: int SPRKStepReInit(void* arkode_mem, ARKRhsFn f, realtype t0, N_Vector y0) +.. c:function:: int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0) Provides required problem specifications and re-initializes the SPRKStep time-stepper module. :param arkode_mem: pointer to the SPRKStep memory block. - :param f: the name of the C function (of type :c:func:`ARKRhsFn()`) - defining the right-hand side function in :math:`\dot{y} = f(t,y)`. + :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f1(q,t) = \frac{\partial V(q,t)}{\partial q}` + :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f2(p) = \frac{\partial T(p)}{\partial p}` :param t0: the initial value of :math:`t`. :param y0: the initial condition vector :math:`y(t_0)`. diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 042372137e..5a17ad3d5d 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -71,7 +71,7 @@ SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem); SUNDIALS_EXPORT int SPRKStepSetOrder(void* arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree); -SUNDIALS_EXPORT int SPRKStepSetDenseOrder(void* arkode_mem, int dord); +/* TODO(CJB): should we remove this from the initial release and wait for the OO adaptivity? */ SUNDIALS_EXPORT int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data); SUNDIALS_EXPORT int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps); @@ -84,6 +84,7 @@ SUNDIALS_EXPORT int SPRKStepSetErrHandlerFn(void* arkode_mem, SUNDIALS_EXPORT int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp); SUNDIALS_EXPORT int SPRKStepSetUserData(void* arkode_mem, void* user_data); +/* TODO(CJB): implement these */ SUNDIALS_EXPORT int SPRKStepSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep); SUNDIALS_EXPORT int SPRKStepSetPostprocessStageFn(void* arkode_mem, @@ -99,16 +100,12 @@ SUNDIALS_EXPORT int SPRKStepGetDky(void* arkode_mem, realtype t, int k, /* Optional output functions */ SUNDIALS_EXPORT char* SPRKStepGetReturnFlagName(long int flag); -SUNDIALS_EXPORT int SPRKStepGetActualInitStep(void* arkode_mem, - realtype* hinused); SUNDIALS_EXPORT int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKMem* sprk_mem); SUNDIALS_EXPORT int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state); SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur); SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur); SUNDIALS_EXPORT int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast); -SUNDIALS_EXPORT int SPRKStepGetNumAccSteps(void* arkode_mem, long int* accsteps); -SUNDIALS_EXPORT int SPRKStepGetNumExpSteps(void* arkode_mem, long int* expsteps); SUNDIALS_EXPORT int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2); SUNDIALS_EXPORT int SPRKStepGetNumStepAttempts(void* arkode_mem, @@ -128,10 +125,8 @@ SUNDIALS_EXPORT int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, /* Free function */ SUNDIALS_EXPORT void SPRKStepFree(void** arkode_mem); -/* Output the SPRKStep memory structure (useful when debugging) */ -SUNDIALS_EXPORT void SPRKStepPrintMem(void* arkode_mem, FILE* outfile); - /* MRIStep interface functions */ +/* TODO(CJB): implement */ SUNDIALS_EXPORT int SPRKStepCreateMRIStepInnerStepper(void* arkode_mem, MRIStepInnerStepper* stepper); diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 4f021abde4..cb6a01c3cd 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -234,7 +234,7 @@ int SPRKStepSetDefaults(void* arkode_mem) return (retval); } - /* set using default method order */ + /* use the default method order */ SPRKStepSetOrder(arkode_mem, 0); return (ARK_SUCCESS); @@ -358,6 +358,27 @@ int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + SPRKStepGetCurrentMethod: + + Returns the stepper method structure. + ---------------------------------------------------------------*/ +int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKMem* sprk_mem) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepGetNumRhsEvals", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return (retval); + + *sprk_mem = step_mem->method; + + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- SPRKStepPrintAllStats: From d5becec7e6e4a4b45b64a0f183ca87c3f28058cf Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 12 Jun 2023 14:42:12 -0700 Subject: [PATCH 060/177] add support of postprocess functions --- include/arkode/arkode_sprkstep.h | 1 - src/arkode/arkode_sprkstep.c | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 5a17ad3d5d..138e52b4f8 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -84,7 +84,6 @@ SUNDIALS_EXPORT int SPRKStepSetErrHandlerFn(void* arkode_mem, SUNDIALS_EXPORT int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp); SUNDIALS_EXPORT int SPRKStepSetUserData(void* arkode_mem, void* user_data); -/* TODO(CJB): implement these */ SUNDIALS_EXPORT int SPRKStepSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep); SUNDIALS_EXPORT int SPRKStepSetPostprocessStageFn(void* arkode_mem, diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index c9b68128a3..a59c37db68 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -429,7 +429,7 @@ int sprkStep_Init(void* arkode_mem, int init_type) ark_mem->call_fullrhs = SUNFALSE; // TODO(CJB): setting this to NULL is not supported in arkode right now. - // Should this really exist in fixed step mode? + // Should this really exist in fixed step mode? // ark_mem->hadapt_mem = NULL; return (ARK_SUCCESS); @@ -585,6 +585,14 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) /* Velocity update */ N_VLinearSum(ONE, curr_stage, ark_mem->h * ai, step_mem->sdata, curr_stage); + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->ProcessStage != NULL) + { + retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) return (ARK_POSTPROCESS_STAGE_FAIL); + } + /* keep track of the stage number */ step_mem->istage++; @@ -667,6 +675,17 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, [ ] = [ ] + [ ] */ N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->a[is], step_mem->sdata, delta_Yi); + + /* if user-supplied stage postprocessing function, we error out since it + * wont work with the increment form */ + if (ark_mem->ProcessStage != NULL) + { + arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, "SPRKStep", + "sprkStep_TakeStep_Compensated", + "Compensated summation is not compatible with stage " + "PostProcessing!\n"); + return (ARK_POSTPROCESS_STAGE_FAIL); + } } /* From 6046cec7866b121d46ca564b991c29ba6e6fde7f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 12 Jun 2023 14:44:22 -0700 Subject: [PATCH 061/177] remove inner stepper routine for now --- include/arkode/arkode_sprkstep.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 138e52b4f8..caea7c9ba0 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -124,11 +124,6 @@ SUNDIALS_EXPORT int SPRKStepGetStepStats(void* arkode_mem, long int* nsteps, /* Free function */ SUNDIALS_EXPORT void SPRKStepFree(void** arkode_mem); -/* MRIStep interface functions */ -/* TODO(CJB): implement */ -SUNDIALS_EXPORT int SPRKStepCreateMRIStepInnerStepper(void* arkode_mem, - MRIStepInnerStepper* stepper); - #ifdef __cplusplus } #endif From b5d6975460d37114134e71f82821fad7c4bd44d5 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 13 Jun 2023 14:10:06 -0700 Subject: [PATCH 062/177] add SPRK methods to Butcher section --- doc/arkode/guide/source/Butcher.rst | 127 ++++++++++++++++++++++++++++ doc/shared/sundials.bib | 76 ++++++++++++++--- 2 files changed, 192 insertions(+), 11 deletions(-) diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 6666a4f7dd..20a8f6b5c9 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1699,3 +1699,130 @@ Butcher table pairs are as follows: corresponding to Butcher tables ``ARKODE_ARK548L2SAb_ERK_8_4_5`` and ``ARKODE_ARK548L2SAb_ERK_8_4_5`` for :c:func:`ARKStepSetTableNum()` or :c:func:`ARKStepSetTableName()`. + + + + +.. _Butcher.symplectic: + +Symplectic Butcher tables +--------------------------- + +ARKODE_SYMPLECTIC_EULER_1 +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 1st-order symplectic Euler method + +Accessible via the constant ``ARKODE_SYMPLECTIC_EULER_1`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticEuler`. +This is the classic Symplectic Euler method. + + +ARKODE_SYMPLECTIC_LEAPFROG_2 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 2nd-order Leapfrog method + +Accessible via the constant ``ARKODE_SYMPLECTIC_LEAPFROG_2`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticLeapfrog2`. +This is the classic Leapfrog/Verlet method. + + +ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 2nd-order Pseudo Leapfrog method + +Accessible via the constant ``ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. +This is the classic Pseudo Leapfrog/Verlet method. + + +ARKODE_SYMPLECTIC_MCLACHLAN_2 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 2nd-order McLachlan method + +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_2`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan2`. +This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. + + +ARKODE_SYMPLECTIC_RUTH_3 +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 3rd-order Ruth method + +Accessible via the constant ``ARKODE_SYMPLECTIC_RUTH_3`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticRuth3`. +This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. + + +ARKODE_SYMPLECTIC_MCLACHLAN_3 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 3rd-order McLachlan method + +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_3`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan3`. +This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. + + +ARKODE_SYMPLECTIC_MCLACHLAN_4 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 4th-order McLachlan method + +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_4`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan4`. +This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. + + +ARKODE_SYMPLECTIC_CANDY_ROZMUS_4 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 4th-order Candy-Rozmus method + +Accessible via the constant ``ARKODE_SYMPLECTIC_CANDY_ROZMUS_4`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. +This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. + + +ARKODE_SYMPLECTIC_MCLACHLAN_5 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 5th-order McLachlan method + +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_5`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan5`. +This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. + + +ARKODE_SYMPLECTIC_YOSHIDA_6 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 6th-order Yoshida method + +Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticYoshida6`. +This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. + + +ARKODE_SYMPLECTIC_MCLACHLAN_8 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 8th-order McLachlan method + +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_8`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan8`. +This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. + + +ARKODE_SYMPLECTIC_SOFRONIOU_10 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: 10th-order Sofroniou method + +Accessible via the constant ``ARKODE_SYMPLECTIC_SOFRONIOU_10`` to +:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticSofroniou10`. +This is the 10th order method given by Sofroniou in :cite:p:`Sofroniou:05`. diff --git a/doc/shared/sundials.bib b/doc/shared/sundials.bib index fe702d9159..6613f3fb16 100644 --- a/doc/shared/sundials.bib +++ b/doc/shared/sundials.bib @@ -1727,6 +1727,17 @@ @book{Butcher:08 year = {2008} } +@article{CandyRozmus:91, + title={A symplectic integration algorithm for separable Hamiltonian functions}, + author={Candy, J and Rozmus, W}, + journal={Journal of Computational Physics}, + volume={92}, + number={1}, + pages={230--256}, + year={1991}, + publisher={Elsevier} +} + @article{Cash:79, author = {Cash, J.R.}, title = {{Diagonally Implicit Runge-Kutta Formulae with Error Estimates}}, @@ -1887,6 +1898,17 @@ @article{Kva:04 doi = {10.1023/B:BITN.0000046811.70614.38} } +@article{Mclachlan:92, + author = {Mclachlan, Robert I AND Atela, Pau}, + title = {The accuracy of symplectic integrators}, + journal = {Nonlinearity}, + volume = {5}, + number = {2}, + pages = {541}, + year = {1992}, + publisher = {IOP Publishing} +} + @article{Sandu:19, author = {Sandu, A.}, title = {A Class of Multirate Infinitesimal GARK Methods}, @@ -1985,17 +2007,17 @@ @article{Sod:06 } @article{Sof:03, -title = {Increment formulations for rounding error reduction in the numerical solution of structured differential systems}, -journal = {Future Generation Computer Systems}, -volume = {19}, -number = {3}, -pages = {375-383}, -year = {2003}, -note = {Special Issue on Geometric Numerical Algorithms}, -issn = {0167-739X}, -doi = {https://doi.org/10.1016/S0167-739X(02)00164-4}, -url = {https://www.sciencedirect.com/science/article/pii/S0167739X02001644}, -author = {Mark Sofroniou and Giulia Spaletta} + title = {Increment formulations for rounding error reduction in the numerical solution of structured differential systems}, + journal = {Future Generation Computer Systems}, + volume = {19}, + number = {3}, + pages = {375-383}, + year = {2003}, + note = {Special Issue on Geometric Numerical Algorithms}, + issn = {0167-739X}, + doi = {https://doi.org/10.1016/S0167-739X(02)00164-4}, + url = {https://www.sciencedirect.com/science/article/pii/S0167739X02001644}, + author = {Mark Sofroniou and Giulia Spaletta} } @article{Ver:78, @@ -2009,6 +2031,27 @@ @article{Ver:78 doi = {10.1137/0715051} } +@article{Ruth:93, + title={A canonical integration technique}, + author={Ruth, Ronald D}, + journal={IEEE Trans. Nucl. Sci.}, + volume={30}, + number={CERN-LEP-TH-83-14}, + pages={2669--2671}, + year={1983} +} + +@article{Sofroniou:05, + title={Derivation of symmetric composition constants for symmetric integrators}, + author={Sofroniou, Mark and Spaletta, Giulia}, + journal={Optimization Methods and Software}, + volume={20}, + number={4-5}, + pages={597--613}, + year={2005}, + publisher={Taylor \& Francis} +} + @article{KnWo:98, author = {Knoth, O. and Wolke, R.}, title = {Implicit-explicit Runge--Kutta methods for computiong atmospheric reactive flows}, @@ -2025,6 +2068,17 @@ @misc{xbraid howpublished = {\url{http://llnl.gov/casc/xbraid}} } +@article{Yoshida:90, + title={Construction of higher order symplectic integrators}, + author={Yoshida, Haruo}, + journal={Physics letters A}, + volume={150}, + number={5-7}, + pages={262--268}, + year={1990}, + publisher={Elsevier} +} + @techreport{Zon:63, author = {Zonneveld, J.A.}, title = {Automatic integration of ordinary differential equations}, From ceda91885f39c3a1106cf9f09cd21e473870e0f7 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 13 Jun 2023 15:17:46 -0700 Subject: [PATCH 063/177] add stage number to method constants --- doc/arkode/guide/source/Butcher.rst | 93 +++++++++++++++-------------- include/arkode/arkode_sprk.h | 26 ++++---- include/arkode/arkode_sprkstep.h | 16 ++--- src/arkode/arkode_sprk.c | 24 ++++---- 4 files changed, 81 insertions(+), 78 deletions(-) diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 20a8f6b5c9..df95179070 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -18,12 +18,12 @@ Appendix: Butcher tables ========================= -Here we catalog the full set of Butcher tables included in ARKODE. -We group these into three categories: *explicit*, *implicit* and -*additive*. However, since the methods that comprise an additive -Runge--Kutta method are themselves explicit and implicit, their -component Butcher tables are listed within their separate -sections, but are referenced together in the additive section. +Here we catalog the full set of Butcher tables included in ARKODE. We group +these into four categories: *explicit*, *implicit*, *additive* and symplectic. +However, since the methods that comprise an additive Runge--Kutta method are +themselves explicit and implicit, their component Butcher tables are listed +within their separate sections, but are referenced together in the additive +section. In each of the following tables, we use the following notation (shown for a 3-stage method): @@ -61,12 +61,15 @@ where here * ``Q`` is the global order of accuracy for the method. For methods without an embedding (e.g., fixed-step methods) ``P`` is omitted so -that methods follow the naming convention ``NAME-S-Q``. +that methods follow the naming convention ``NAME-S-Q``. + +For symplectic methods, In the code, unique integer IDs are defined inside ``arkode_butcher_erk.h`` and ``arkode_butcher_dirk.h`` for each method, which may be used by calling routines -to specify the desired method. These names are specified in ``fixed width -font`` at the start of each method's section below. +to specify the desired method. Symplectic methods are +These names are specified in ``fixed width font`` at the start of each method's +section below. Additionally, for each method we provide a plot of the linear stability region in the complex plane. These have been computed via @@ -1708,121 +1711,121 @@ Butcher table pairs are as follows: Symplectic Butcher tables --------------------------- -ARKODE_SYMPLECTIC_EULER_1 -^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_EULER_1_1 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 1st-order symplectic Euler method -Accessible via the constant ``ARKODE_SYMPLECTIC_EULER_1`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_EULER_1_1`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticEuler`. This is the classic Symplectic Euler method. -ARKODE_SYMPLECTIC_LEAPFROG_2 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_LEAPFROG_2_2 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 2nd-order Leapfrog method -Accessible via the constant ``ARKODE_SYMPLECTIC_LEAPFROG_2`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_LEAPFROG_2_2`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticLeapfrog2`. This is the classic Leapfrog/Verlet method. -ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 2nd-order Pseudo Leapfrog method -Accessible via the constant ``ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. This is the classic Pseudo Leapfrog/Verlet method. -ARKODE_SYMPLECTIC_MCLACHLAN_2 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_MCLACHLAN_2_2 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 2nd-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_2`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_2_2`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan2`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_RUTH_3 -^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_RUTH_3_3 +^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 3rd-order Ruth method -Accessible via the constant ``ARKODE_SYMPLECTIC_RUTH_3`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_RUTH_3_3`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticRuth3`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. -ARKODE_SYMPLECTIC_MCLACHLAN_3 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_MCLACHLAN_3_3 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 3rd-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_3`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_3_3`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan3`. This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_MCLACHLAN_4 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_MCLACHLAN_4_4 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 4th-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_4`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_4_4`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan4`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_CANDY_ROZMUS_4 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 4th-order Candy-Rozmus method -Accessible via the constant ``ARKODE_SYMPLECTIC_CANDY_ROZMUS_4`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. -ARKODE_SYMPLECTIC_MCLACHLAN_5 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_MCLACHLAN_5_6 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 5th-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_5`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_5_6`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan5`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_YOSHIDA_6 -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_YOSHIDA_6_8 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 6th-order Yoshida method -Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6_8`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticYoshida6`. This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. -ARKODE_SYMPLECTIC_MCLACHLAN_8 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_MCLACHLAN_8_16 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 8th-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_8`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_8_16`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan8`. This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_SOFRONIOU_10 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ARKODE_SYMPLECTIC_SOFRONIOU_10_36 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 10th-order Sofroniou method -Accessible via the constant ``ARKODE_SYMPLECTIC_SOFRONIOU_10`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_SOFRONIOU_10_36`` to :c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticSofroniou10`. This is the 10th order method given by Sofroniou in :cite:p:`Sofroniou:05`. diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 6ded500e20..768e700427 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -26,19 +26,19 @@ extern "C" { typedef enum { ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ ARKODE_MIN_SPRK_NUM = 0, - ARKODE_SYMPLECTIC_EULER_1 = ARKODE_MIN_SPRK_NUM, - ARKODE_SYMPLECTIC_LEAPFROG_2, - ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2, - ARKODE_SYMPLECTIC_RUTH_3, - ARKODE_SYMPLECTIC_MCLACHLAN_2, - ARKODE_SYMPLECTIC_MCLACHLAN_3, - ARKODE_SYMPLECTIC_CANDY_ROZMUS_4, - ARKODE_SYMPLECTIC_MCLACHLAN_4, - ARKODE_SYMPLECTIC_MCLACHLAN_5, - ARKODE_SYMPLECTIC_YOSHIDA_6, - ARKODE_SYMPLECTIC_MCLACHLAN_8, - ARKODE_SYMPLECTIC_SOFRONIOU_10, - ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_SOFRONIOU_10 + ARKODE_SYMPLECTIC_EULER_1_1 = ARKODE_MIN_SPRK_NUM, + ARKODE_SYMPLECTIC_LEAPFROG_2_2, + ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2, + ARKODE_SYMPLECTIC_RUTH_3_3, + ARKODE_SYMPLECTIC_MCLACHLAN_2_2, + ARKODE_SYMPLECTIC_MCLACHLAN_3_3, + ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4, + ARKODE_SYMPLECTIC_MCLACHLAN_4_4, + ARKODE_SYMPLECTIC_MCLACHLAN_5_6, + ARKODE_SYMPLECTIC_YOSHIDA_6_8, + ARKODE_SYMPLECTIC_MCLACHLAN_8_16, + ARKODE_SYMPLECTIC_SOFRONIOU_10_36, + ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_SOFRONIOU_10_36 } ARKODE_SPRKMethodID; struct ARKodeSPRKMem_s { diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index caea7c9ba0..04904bd574 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -32,14 +32,14 @@ extern "C" { * SPRKStep Constants * ----------------- */ -static const int SPRKSTEP_DEFAULT_1 = ARKODE_SYMPLECTIC_EULER_1; -static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_MCLACHLAN_2; -static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_MCLACHLAN_3; -static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLACHLAN_4; -static const int SPRKSTEP_DEFAULT_5 = ARKODE_SYMPLECTIC_MCLACHLAN_5; -static const int SPRKSTEP_DEFAULT_6 = ARKODE_SYMPLECTIC_YOSHIDA_6; -static const int SPRKSTEP_DEFAULT_8 = ARKODE_SYMPLECTIC_MCLACHLAN_8; -static const int SPRKSTEP_DEFAULT_10 = ARKODE_SYMPLECTIC_SOFRONIOU_10; +static const int SPRKSTEP_DEFAULT_1 = ARKODE_SYMPLECTIC_EULER_1_1; +static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_MCLACHLAN_2_2; +static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_MCLACHLAN_3_3; +static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLACHLAN_4_4; +static const int SPRKSTEP_DEFAULT_5 = ARKODE_SYMPLECTIC_MCLACHLAN_5_6; +static const int SPRKSTEP_DEFAULT_6 = ARKODE_SYMPLECTIC_YOSHIDA_6_8; +static const int SPRKSTEP_DEFAULT_8 = ARKODE_SYMPLECTIC_MCLACHLAN_8_16; +static const int SPRKSTEP_DEFAULT_10 = ARKODE_SYMPLECTIC_SOFRONIOU_10_36; /* ------------------- * Exported Functions diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 04e305bc56..676a25ec6e 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -352,29 +352,29 @@ ARKodeSPRKMem ARKodeSPRKMem_Alloc(int stages) ARKodeSPRKMem ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) { switch(id) { - case ARKODE_SYMPLECTIC_EULER_1: + case ARKODE_SYMPLECTIC_EULER_1_1: return ARKodeSymplecticEuler(); - case ARKODE_SYMPLECTIC_LEAPFROG_2: + case ARKODE_SYMPLECTIC_LEAPFROG_2_2: return ARKodeSymplecticLeapfrog2(); - case ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2: + case ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2: return ARKodeSymplecticPseudoLeapfrog2(); - case ARKODE_SYMPLECTIC_RUTH_3: + case ARKODE_SYMPLECTIC_RUTH_3_3: return ARKodeSymplecticRuth3(); - case ARKODE_SYMPLECTIC_MCLACHLAN_2: + case ARKODE_SYMPLECTIC_MCLACHLAN_2_2: return ARKodeSymplecticMcLachlan2(); - case ARKODE_SYMPLECTIC_MCLACHLAN_3: + case ARKODE_SYMPLECTIC_MCLACHLAN_3_3: return ARKodeSymplecticMcLachlan3(); - case ARKODE_SYMPLECTIC_MCLACHLAN_4: + case ARKODE_SYMPLECTIC_MCLACHLAN_4_4: return ARKodeSymplecticMcLachlan4(); - case ARKODE_SYMPLECTIC_CANDY_ROZMUS_4: + case ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4: return ARKodeSymplecticCandyRozmus4(); - case ARKODE_SYMPLECTIC_MCLACHLAN_5: + case ARKODE_SYMPLECTIC_MCLACHLAN_5_6: return ARKodeSymplecticMcLachlan5(); - case ARKODE_SYMPLECTIC_YOSHIDA_6: + case ARKODE_SYMPLECTIC_YOSHIDA_6_8: return ARKodeSymplecticYoshida6(); - case ARKODE_SYMPLECTIC_MCLACHLAN_8: + case ARKODE_SYMPLECTIC_MCLACHLAN_8_16: return ARKodeSymplecticMcLachlan8(); - case ARKODE_SYMPLECTIC_SOFRONIOU_10: + case ARKODE_SYMPLECTIC_SOFRONIOU_10_36: return ARKodeSymplecticSofroniou10(); default: return NULL; From de9fc58f60b8eea3b19dcd5ee170154c3100503a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 14 Jun 2023 15:20:42 -0700 Subject: [PATCH 064/177] ARKodeSPRKMem --> ARKodeSPRKStorage --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 20 + .../SPRKStep_c_interface/User_callable.rst | 16 +- include/arkode/arkode_sprk.h | 66 +- include/arkode/arkode_sprkstep.h | 4 +- src/arkode/arkode_sprk.c | 732 ++++++++++-------- src/arkode/arkode_sprkstep.c | 2 +- src/arkode/arkode_sprkstep_impl.h | 64 +- src/arkode/arkode_sprkstep_io.c | 8 +- 8 files changed, 494 insertions(+), 418 deletions(-) create mode 100644 doc/arkode/guide/source/ARKodeSPRKStorage.rst diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst new file mode 100644 index 0000000000..28537f0a7e --- /dev/null +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -0,0 +1,20 @@ +.. ---------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2002-2023, Lawrence Livermore National Security + and Southern Methodist University. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ---------------------------------------------------------------- + +.. _SPRKStorage: + +=================== +SPRK Method Storage +=================== + + + diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index adb8f8aad2..ae17f12c6f 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -670,12 +670,12 @@ Optional inputs for IVP method selection accumulation. -.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem) +.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) Specifies the SPRK method. :param arkode_mem: pointer to the SPRKStep memory block. - :param sprk_mem: the SPRK method memory. + :param sprk_storage: the SPRK method memory. :return: * *ARK_SUCCESS* if successful @@ -684,8 +684,8 @@ Optional inputs for IVP method selection **Notes:** - For a description of the :c:type:`ARKodeSPRKMem` type and related - functions for creating the method structure, see :numref:`ARKodeSPRKMem`. + For a description of the :c:type:`ARKodeSPRKStorage` type and related + functions for creating the method structure, see :numref:`ARKodeSPRKStorage`. No error checking is performed to ensure that either the method order *p* or specified in the method structure correctly describe the coefficients. @@ -1099,19 +1099,19 @@ Main solver optional output functions -.. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKMem *sprk_mem) +.. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKStorage *sprk_storage) Returns the SPRK method structure currently in use by the solver. :param arkode_mem: pointer to the SPRKStep memory block. - :param sprk_mem: pointer to the SPRK method structure. + :param sprk_storage: pointer to the SPRK method structure. :return: * *ARK_SUCCESS* if successful * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` **Notes:** - The :c:type:`ARKodeSPRKMem` data structure is defined as a + The :c:type:`ARKodeSPRKStorage` data structure is defined as a pointer to the following C structure: .. code-block:: c @@ -1128,7 +1128,7 @@ Main solver optional output functions }; - For more details see :numref:`ARKodeSPRKMem`. + For more details see :numref:`ARKodeSPRKStorage`. diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 768e700427..c34339e891 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -16,16 +16,17 @@ #ifndef _ARKODE_SPRKMEM_H #define _ARKODE_SPRKMEM_H -#include #include +#include -#ifdef __cplusplus /* wrapper to enable C++ usage */ +#ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif -typedef enum { - ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ - ARKODE_MIN_SPRK_NUM = 0, +typedef enum +{ + ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ + ARKODE_MIN_SPRK_NUM = 0, ARKODE_SYMPLECTIC_EULER_1_1 = ARKODE_MIN_SPRK_NUM, ARKODE_SYMPLECTIC_LEAPFROG_2_2, ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2, @@ -41,42 +42,45 @@ typedef enum { ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_SOFRONIOU_10_36 } ARKODE_SPRKMethodID; -struct ARKodeSPRKMem_s { - - int q; /* method order of accuracy */ - int stages; /* number of stages */ - sunrealtype* a; /* coefficients multiplying q' */ - sunrealtype* b; /* coefficients multiplying p' */ +struct ARKodeSPRKMem_s +{ + int q; /* method order of accuracy */ + int stages; /* number of stages */ + sunrealtype* a; /* coefficients that generate the explicit Butcher table */ + sunrealtype* b; /* coefficients that generate the diagonally-implicit Butcher + table */ /* the a_i coefficients generate the explicit Butcher table */ /* the b_i coefficients generate the diagonally-implicit Butcher table */ - }; -typedef _SUNDIALS_STRUCT_ ARKodeSPRKMem_s *ARKodeSPRKMem; +typedef _SUNDIALS_STRUCT_ ARKodeSPRKMem_s* ARKodeSPRKStorage; /* Utility routines to allocate/free/output SPRK structures */ -SUNDIALS_EXPORT ARKodeSPRKMem ARKodeSPRKMem_Alloc(int stages); -SUNDIALS_EXPORT ARKodeSPRKMem ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id); -SUNDIALS_EXPORT ARKodeSPRKMem ARKodeSPRKMem_Copy(ARKodeSPRKMem B); -SUNDIALS_EXPORT void ARKodeSPRKMem_Space(ARKodeSPRKMem B, sunindextype *liw, sunindextype *lrw); -SUNDIALS_EXPORT void ARKodeSPRKMem_Free(ARKodeSPRKMem B); -SUNDIALS_EXPORT int ARKodeSPRKMem_ToButcher(ARKodeSPRKMem sprk_mem, ARKodeButcherTable* b_ptr, ARKodeButcherTable* B_ptr); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage B); +SUNDIALS_EXPORT void ARKodeSPRKMem_Space(ARKodeSPRKStorage B, sunindextype* liw, + sunindextype* lrw); +SUNDIALS_EXPORT void ARKodeSPRKMem_Free(ARKodeSPRKStorage B); +SUNDIALS_EXPORT int ARKodeSPRKMem_ToButcher(ARKodeSPRKStorage sprk_storage, + ARKodeButcherTable* a_ptr, + ARKodeButcherTable* b_ptr); /* Different methods */ -ARKodeSPRKMem ARKodeSymplecticEuler(); -ARKodeSPRKMem ARKodeSymplecticLeapfrog2(); -ARKodeSPRKMem ARKodeSymplecticPseudoLeapfrog2(); -ARKodeSPRKMem ARKodeSymplecticRuth3(); -ARKodeSPRKMem ARKodeSymplecticCandyRozmus4(); -ARKodeSPRKMem ARKodeSymplecticMcLachlan2(); -ARKodeSPRKMem ARKodeSymplecticMcLachlan3(); -ARKodeSPRKMem ARKodeSymplecticMcLachlan4(); -ARKodeSPRKMem ARKodeSymplecticMcLachlan5(); -ARKodeSPRKMem ARKodeSymplecticYoshida6(); -ARKodeSPRKMem ARKodeSymplecticMcLachlan8(); -ARKodeSPRKMem ARKodeSymplecticSofroniou10(); +ARKodeSPRKStorage ARKodeSymplecticEuler(); +ARKodeSPRKStorage ARKodeSymplecticLeapfrog2(); +ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2(); +ARKodeSPRKStorage ARKodeSymplecticRuth3(); +ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4(); +ARKodeSPRKStorage ARKodeSymplecticMcLachlan2(); +ARKodeSPRKStorage ARKodeSymplecticMcLachlan3(); +ARKodeSPRKStorage ARKodeSymplecticMcLachlan4(); +ARKodeSPRKStorage ARKodeSymplecticMcLachlan5(); +ARKodeSPRKStorage ARKodeSymplecticYoshida6(); +ARKodeSPRKStorage ARKodeSymplecticMcLachlan8(); +ARKodeSPRKStorage ARKodeSymplecticSofroniou10(); #ifdef __cplusplus } diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 04904bd574..65acf05568 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -67,7 +67,7 @@ SUNDIALS_EXPORT int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g); SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff); -SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem); +SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage); SUNDIALS_EXPORT int SPRKStepSetOrder(void* arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree); @@ -100,7 +100,7 @@ SUNDIALS_EXPORT int SPRKStepGetDky(void* arkode_mem, realtype t, int k, /* Optional output functions */ SUNDIALS_EXPORT char* SPRKStepGetReturnFlagName(long int flag); SUNDIALS_EXPORT int SPRKStepGetCurrentMethod(void* arkode_mem, - ARKodeSPRKMem* sprk_mem); + ARKodeSPRKStorage* sprk_storage); SUNDIALS_EXPORT int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state); SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur); SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 676a25ec6e..c6e13d841c 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -11,457 +11,501 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End *--------------------------------------------------------------- - * + * *--------------------------------------------------------------*/ -#include -#include #include #include -#include +#include +#include #include +#include -ARKodeSPRKMem ARKodeSymplecticEuler() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(1); - sprk_mem->q = 1; - sprk_mem->stages = 1; - sprk_mem->a[0] = SUN_RCONST(1.0); - sprk_mem->b[0] = SUN_RCONST(1.0); - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticEuler() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(1); + sprk_storage->q = 1; + sprk_storage->stages = 1; + sprk_storage->a[0] = SUN_RCONST(1.0); + sprk_storage->b[0] = SUN_RCONST(1.0); + return sprk_storage; } -/* +/* The following methods are from: - J Candy, W Rozmus, A symplectic integration algorithm for separable Hamiltonian functions, - Journal of Computational Physics, Volume 92, Issue 1, 1991, Pages 230-256, ISSN 0021-9991, + J Candy, W Rozmus, A symplectic integration algorithm for separable + Hamiltonian functions, Journal of Computational Physics, Volume 92, Issue 1, + 1991, Pages 230-256, ISSN 0021-9991, https://doi.org/10.1016/0021-9991(91)90299-Z. */ -ARKodeSPRKMem ARKodeSymplecticLeapfrog2() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); - sprk_mem->q = 2; - sprk_mem->stages = 2; - sprk_mem->a[0] = SUN_RCONST(0.5); - sprk_mem->a[1] = SUN_RCONST(0.5); - sprk_mem->b[0] = SUN_RCONST(0.0); - sprk_mem->b[1] = SUN_RCONST(1.0); - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(2); + sprk_storage->q = 2; + sprk_storage->stages = 2; + sprk_storage->a[0] = SUN_RCONST(0.5); + sprk_storage->a[1] = SUN_RCONST(0.5); + sprk_storage->b[0] = SUN_RCONST(0.0); + sprk_storage->b[1] = SUN_RCONST(1.0); + return sprk_storage; } -ARKodeSPRKMem ARKodeSymplecticPseudoLeapfrog2() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); - sprk_mem->q = 2; - sprk_mem->stages = 2; - sprk_mem->a[0] = SUN_RCONST(1.0); - sprk_mem->a[1] = SUN_RCONST(0.0); - sprk_mem->b[0] = SUN_RCONST(0.5); - sprk_mem->b[1] = SUN_RCONST(0.5); - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(2); + sprk_storage->q = 2; + sprk_storage->stages = 2; + sprk_storage->a[0] = SUN_RCONST(1.0); + sprk_storage->a[1] = SUN_RCONST(0.0); + sprk_storage->b[0] = SUN_RCONST(0.5); + sprk_storage->b[1] = SUN_RCONST(0.5); + return sprk_storage; } -ARKodeSPRKMem ARKodeSymplecticCandyRozmus4() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(4); - sprk_mem->q = 4; - sprk_mem->stages = 4; - sprk_mem->a[0] = ( SUN_RCONST(2.0) + SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0)/SUN_RCONST(3.0)) - + SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0)/SUN_RCONST(3.0)) ) / SUN_RCONST(6.0); - sprk_mem->a[1] = ( SUN_RCONST(1.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0)/SUN_RCONST(3.0)) - - SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0)/SUN_RCONST(3.0)) ) / SUN_RCONST(6.0); - sprk_mem->a[2] = sprk_mem->a[1]; - sprk_mem->a[3] = sprk_mem->a[0]; - sprk_mem->b[0] = SUN_RCONST(0.0); - sprk_mem->b[1] = SUN_RCONST(1.0) / - ( SUN_RCONST(2.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0)/SUN_RCONST(3.0)) ); - sprk_mem->b[2] = SUN_RCONST(1.0) / - ( SUN_RCONST(1.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(2.0)/SUN_RCONST(3.0)) ); - sprk_mem->b[3] = sprk_mem->b[1]; - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(4); + sprk_storage->q = 4; + sprk_storage->stages = 4; + sprk_storage->a[0] = + (SUN_RCONST(2.0) + + SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0)) + + SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0) / SUN_RCONST(3.0))) / + SUN_RCONST(6.0); + sprk_storage->a[1] = + (SUN_RCONST(1.0) - + SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0)) - + SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0) / SUN_RCONST(3.0))) / + SUN_RCONST(6.0); + sprk_storage->a[2] = sprk_storage->a[1]; + sprk_storage->a[3] = sprk_storage->a[0]; + sprk_storage->b[0] = SUN_RCONST(0.0); + sprk_storage->b[1] = + SUN_RCONST(1.0) / + (SUN_RCONST(2.0) - + SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0))); + sprk_storage->b[2] = + SUN_RCONST(1.0) / + (SUN_RCONST(1.0) - + SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(2.0) / SUN_RCONST(3.0))); + sprk_storage->b[3] = sprk_storage->b[1]; + return sprk_storage; } -/* - The following methods are from: +/* + The following methods are from: Ruth, R. D. (1983). A CANONICAL INTEGRATION TECHNIQUE. IEEE Transactions on Nuclear Science, 30(4). - https://accelconf.web.cern.ch/p83/PDF/PAC1983_2669.PDF + https://accelconf.web.cern.ch/p83/PDF/PAC1983_2669.PDF */ -ARKodeSPRKMem ARKodeSymplecticRuth3() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(3); - sprk_mem->q = 3; - sprk_mem->stages = 3; - sprk_mem->a[0] = SUN_RCONST(2.0)/SUN_RCONST(3.0); - sprk_mem->a[1] = -SUN_RCONST(2.0)/SUN_RCONST(3.0); - sprk_mem->a[2] = SUN_RCONST(1.0); - sprk_mem->b[0] = SUN_RCONST(7.0)/SUN_RCONST(24.0); - sprk_mem->b[1] = SUN_RCONST(3.0)/SUN_RCONST(4.0); - sprk_mem->b[2] = -SUN_RCONST(1.0)/SUN_RCONST(24.0); - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticRuth3() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(3); + sprk_storage->q = 3; + sprk_storage->stages = 3; + sprk_storage->a[0] = SUN_RCONST(2.0) / SUN_RCONST(3.0); + sprk_storage->a[1] = -SUN_RCONST(2.0) / SUN_RCONST(3.0); + sprk_storage->a[2] = SUN_RCONST(1.0); + sprk_storage->b[0] = SUN_RCONST(7.0) / SUN_RCONST(24.0); + sprk_storage->b[1] = SUN_RCONST(3.0) / SUN_RCONST(4.0); + sprk_storage->b[2] = -SUN_RCONST(1.0) / SUN_RCONST(24.0); + return sprk_storage; } -/* - The following methods are from: +/* + The following methods are from: - McLachlan, R.I., Atela, P.: The accuracy of symplectic integrators. + McLachlan, R.I., Atela, P.: The accuracy of symplectic integrators. Nonlinearity. 5, 541–562 (1992). https://doi.org/10.1088/0951-7715/5/2/011 */ -ARKodeSPRKMem ARKodeSymplecticMcLachlan2() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(2); - sprk_mem->q = 2; - sprk_mem->stages = 2; - sprk_mem->a[1] = SUN_RCONST(1.0) - (SUN_RCONST(1.0) / SUN_RCONST(2.0)) * SUNRsqrt(2.0); - sprk_mem->a[0] = SUN_RCONST(1.0) - sprk_mem->a[1]; - sprk_mem->b[1] = SUN_RCONST(1.0) / (SUN_RCONST(2.0) * (SUN_RCONST(1.0) - sprk_mem->a[1])); - sprk_mem->b[0] = SUN_RCONST(1.0) - sprk_mem->b[1]; - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(2); + sprk_storage->q = 2; + sprk_storage->stages = 2; + sprk_storage->a[1] = SUN_RCONST(1.0) - + (SUN_RCONST(1.0) / SUN_RCONST(2.0)) * SUNRsqrt(2.0); + sprk_storage->a[0] = SUN_RCONST(1.0) - sprk_storage->a[1]; + sprk_storage->b[1] = + SUN_RCONST(1.0) / (SUN_RCONST(2.0) * (SUN_RCONST(1.0) - sprk_storage->a[1])); + sprk_storage->b[0] = SUN_RCONST(1.0) - sprk_storage->b[1]; + return sprk_storage; } -ARKodeSPRKMem ARKodeSymplecticMcLachlan3() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(3); - sprk_mem->q = 3; - sprk_mem->stages = 3; - sprk_mem->a[0] = SUN_RCONST(0.919661523017399857); - sprk_mem->a[1] = SUN_RCONST(0.25)/sprk_mem->a[0] - sprk_mem->a[0]/SUN_RCONST(2.0); - sprk_mem->a[2] = SUN_RCONST(1.0) - sprk_mem->a[0] - sprk_mem->a[1]; - sprk_mem->b[0] = sprk_mem->a[2]; - sprk_mem->b[1] = sprk_mem->a[1]; - sprk_mem->b[2] = sprk_mem->a[0]; - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(3); + sprk_storage->q = 3; + sprk_storage->stages = 3; + sprk_storage->a[0] = SUN_RCONST(0.919661523017399857); + sprk_storage->a[1] = SUN_RCONST(0.25) / sprk_storage->a[0] - + sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->a[2] = SUN_RCONST(1.0) - sprk_storage->a[0] - sprk_storage->a[1]; + sprk_storage->b[0] = sprk_storage->a[2]; + sprk_storage->b[1] = sprk_storage->a[1]; + sprk_storage->b[2] = sprk_storage->a[0]; + return sprk_storage; } -ARKodeSPRKMem ARKodeSymplecticMcLachlan4() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(4); - sprk_mem->q = 4; - sprk_mem->stages = 4; - sprk_mem->a[0] = SUN_RCONST(0.515352837431122936); - sprk_mem->a[1] = -SUN_RCONST(0.085782019412973646); - sprk_mem->a[2] = SUN_RCONST(0.441583023616466524); - sprk_mem->a[3] = SUN_RCONST(0.128846158365384185); - sprk_mem->b[0] = SUN_RCONST(0.134496199277431089); - sprk_mem->b[1] = -SUN_RCONST(0.224819803079420806); - sprk_mem->b[2] = SUN_RCONST(0.756320000515668291); - sprk_mem->b[3] = SUN_RCONST(0.33400360328632142); - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(4); + sprk_storage->q = 4; + sprk_storage->stages = 4; + sprk_storage->a[0] = SUN_RCONST(0.515352837431122936); + sprk_storage->a[1] = -SUN_RCONST(0.085782019412973646); + sprk_storage->a[2] = SUN_RCONST(0.441583023616466524); + sprk_storage->a[3] = SUN_RCONST(0.128846158365384185); + sprk_storage->b[0] = SUN_RCONST(0.134496199277431089); + sprk_storage->b[1] = -SUN_RCONST(0.224819803079420806); + sprk_storage->b[2] = SUN_RCONST(0.756320000515668291); + sprk_storage->b[3] = SUN_RCONST(0.33400360328632142); + return sprk_storage; } -ARKodeSPRKMem ARKodeSymplecticMcLachlan5() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(6); - sprk_mem->q = 5; - sprk_mem->stages = 6; - sprk_mem->a[0] = SUN_RCONST(0.339839625839110000); - sprk_mem->a[1] = -SUN_RCONST(0.088601336903027329); - sprk_mem->a[2] = SUN_RCONST(0.5858564768259621188); - sprk_mem->a[3] = -SUN_RCONST(0.603039356536491888); - sprk_mem->a[4] = SUN_RCONST(0.3235807965546976394); - sprk_mem->a[5] = SUN_RCONST(0.4423637942197494587); - sprk_mem->b[0] = SUN_RCONST(0.1193900292875672758); - sprk_mem->b[1] = SUN_RCONST(0.6989273703824752308); - sprk_mem->b[2] = -SUN_RCONST(0.1713123582716007754); - sprk_mem->b[3] = SUN_RCONST(0.4012695022513534480); - sprk_mem->b[4] = SUN_RCONST(0.0107050818482359840); - sprk_mem->b[5] = -SUN_RCONST(0.0589796254980311632); - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(6); + sprk_storage->q = 5; + sprk_storage->stages = 6; + sprk_storage->a[0] = SUN_RCONST(0.339839625839110000); + sprk_storage->a[1] = -SUN_RCONST(0.088601336903027329); + sprk_storage->a[2] = SUN_RCONST(0.5858564768259621188); + sprk_storage->a[3] = -SUN_RCONST(0.603039356536491888); + sprk_storage->a[4] = SUN_RCONST(0.3235807965546976394); + sprk_storage->a[5] = SUN_RCONST(0.4423637942197494587); + sprk_storage->b[0] = SUN_RCONST(0.1193900292875672758); + sprk_storage->b[1] = SUN_RCONST(0.6989273703824752308); + sprk_storage->b[2] = -SUN_RCONST(0.1713123582716007754); + sprk_storage->b[3] = SUN_RCONST(0.4012695022513534480); + sprk_storage->b[4] = SUN_RCONST(0.0107050818482359840); + sprk_storage->b[5] = -SUN_RCONST(0.0589796254980311632); + return sprk_storage; } -/* - The following methods are from: +/* + The following methods are from: - Yoshida, H.: Construction of higher order symplectic integrators. - Phys Lett A. 150, 262–268 (1990). + Yoshida, H.: Construction of higher order symplectic integrators. + Phys Lett A. 150, 262–268 (1990). https://doi.org/10.1016/0375-9601(90)90092-3 */ -ARKodeSPRKMem ARKodeSymplecticYoshida6() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(8); - sprk_mem->q = 6; - sprk_mem->stages = 8; - sprk_mem->a[0] = SUN_RCONST(0.78451361047755726382); - sprk_mem->a[1] = SUN_RCONST(0.23557321335935813368); - sprk_mem->a[2] = -SUN_RCONST(1.17767998417887100695); - sprk_mem->a[3] = SUN_RCONST(1.3151863206839); - sprk_mem->a[4] = sprk_mem->a[2]; - sprk_mem->a[5] = sprk_mem->a[1]; - sprk_mem->a[6] = sprk_mem->a[0]; - sprk_mem->a[7] = SUN_RCONST(0.0); - sprk_mem->b[0] = sprk_mem->a[0] / SUN_RCONST(2.0); - sprk_mem->b[1] = (sprk_mem->a[0] + sprk_mem->a[1]) / SUN_RCONST(2.0); - sprk_mem->b[2] = (sprk_mem->a[1] + sprk_mem->a[2]) / SUN_RCONST(2.0); - sprk_mem->b[3] = (sprk_mem->a[2] + sprk_mem->a[3]) / SUN_RCONST(2.0); - sprk_mem->b[4] = sprk_mem->b[3]; - sprk_mem->b[5] = sprk_mem->b[2]; - sprk_mem->b[6] = sprk_mem->b[1]; - sprk_mem->b[7] = sprk_mem->b[0]; - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticYoshida6() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(8); + sprk_storage->q = 6; + sprk_storage->stages = 8; + sprk_storage->a[0] = SUN_RCONST(0.78451361047755726382); + sprk_storage->a[1] = SUN_RCONST(0.23557321335935813368); + sprk_storage->a[2] = -SUN_RCONST(1.17767998417887100695); + sprk_storage->a[3] = SUN_RCONST(1.3151863206839); + sprk_storage->a[4] = sprk_storage->a[2]; + sprk_storage->a[5] = sprk_storage->a[1]; + sprk_storage->a[6] = sprk_storage->a[0]; + sprk_storage->a[7] = SUN_RCONST(0.0); + sprk_storage->b[0] = sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->b[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / + SUN_RCONST(2.0); + sprk_storage->b[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / + SUN_RCONST(2.0); + sprk_storage->b[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / + SUN_RCONST(2.0); + sprk_storage->b[4] = sprk_storage->b[3]; + sprk_storage->b[5] = sprk_storage->b[2]; + sprk_storage->b[6] = sprk_storage->b[1]; + sprk_storage->b[7] = sprk_storage->b[0]; + return sprk_storage; } -/* - The following methods are from: +/* + The following methods are from: - McLachlan, R.I.: On the Numerical Integration of Ordinary Differential Equations - by Symmetric Composition Methods. Siam J Sci Comput. 16, 151–168 (1995). - https://doi.org/10.1137/0916010 + McLachlan, R.I.: On the Numerical Integration of Ordinary Differential + Equations by Symmetric Composition Methods. Siam J Sci Comput. 16, 151–168 + (1995). https://doi.org/10.1137/0916010 */ -ARKodeSPRKMem ARKodeSymplecticMcLachlan8() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(16); - sprk_mem->q = 8; - sprk_mem->stages = 16; - sprk_mem->a[0] = SUN_RCONST(0.74167036435061295344822780); - sprk_mem->a[1] = -SUN_RCONST(0.40910082580003159399730010); - sprk_mem->a[2] = SUN_RCONST(0.19075471029623837995387626); - sprk_mem->a[3] = -SUN_RCONST(0.57386247111608226665638773); - sprk_mem->a[4] = SUN_RCONST(0.29906418130365592384446354); - sprk_mem->a[5] = SUN_RCONST(0.33462491824529818378495798); - sprk_mem->a[6] = SUN_RCONST(0.31529309239676659663205666); - sprk_mem->a[7] = -SUN_RCONST(0.79688793935291635401978884); - sprk_mem->a[8] = sprk_mem->a[6]; - sprk_mem->a[9] = sprk_mem->a[5]; - sprk_mem->a[10] = sprk_mem->a[4]; - sprk_mem->a[11] = sprk_mem->a[3]; - sprk_mem->a[12] = sprk_mem->a[2]; - sprk_mem->a[13] = sprk_mem->a[1]; - sprk_mem->a[14] = sprk_mem->a[0]; - sprk_mem->a[15] = SUN_RCONST(0.0); - sprk_mem->b[0] = sprk_mem->a[0] / SUN_RCONST(2.0); - sprk_mem->b[1] = (sprk_mem->a[0] + sprk_mem->a[1]) / SUN_RCONST(2.0); - sprk_mem->b[2] = (sprk_mem->a[1] + sprk_mem->a[2]) / SUN_RCONST(2.0); - sprk_mem->b[3] = (sprk_mem->a[2] + sprk_mem->a[3]) / SUN_RCONST(2.0); - sprk_mem->b[4] = (sprk_mem->a[3] + sprk_mem->a[4]) / SUN_RCONST(2.0); - sprk_mem->b[5] = (sprk_mem->a[4] + sprk_mem->a[5]) / SUN_RCONST(2.0); - sprk_mem->b[6] = (sprk_mem->a[5] + sprk_mem->a[6]) / SUN_RCONST(2.0); - sprk_mem->b[7] = (sprk_mem->a[6] + sprk_mem->a[7]) / SUN_RCONST(2.0); - sprk_mem->b[8] = sprk_mem->b[7]; - sprk_mem->b[9] = sprk_mem->b[6]; - sprk_mem->b[10] = sprk_mem->b[5]; - sprk_mem->b[11] = sprk_mem->b[4]; - sprk_mem->b[12] = sprk_mem->b[3]; - sprk_mem->b[13] = sprk_mem->b[2]; - sprk_mem->b[14] = sprk_mem->b[1]; - sprk_mem->b[15] = sprk_mem->b[0]; - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(16); + sprk_storage->q = 8; + sprk_storage->stages = 16; + sprk_storage->a[0] = SUN_RCONST(0.74167036435061295344822780); + sprk_storage->a[1] = -SUN_RCONST(0.40910082580003159399730010); + sprk_storage->a[2] = SUN_RCONST(0.19075471029623837995387626); + sprk_storage->a[3] = -SUN_RCONST(0.57386247111608226665638773); + sprk_storage->a[4] = SUN_RCONST(0.29906418130365592384446354); + sprk_storage->a[5] = SUN_RCONST(0.33462491824529818378495798); + sprk_storage->a[6] = SUN_RCONST(0.31529309239676659663205666); + sprk_storage->a[7] = -SUN_RCONST(0.79688793935291635401978884); + sprk_storage->a[8] = sprk_storage->a[6]; + sprk_storage->a[9] = sprk_storage->a[5]; + sprk_storage->a[10] = sprk_storage->a[4]; + sprk_storage->a[11] = sprk_storage->a[3]; + sprk_storage->a[12] = sprk_storage->a[2]; + sprk_storage->a[13] = sprk_storage->a[1]; + sprk_storage->a[14] = sprk_storage->a[0]; + sprk_storage->a[15] = SUN_RCONST(0.0); + sprk_storage->b[0] = sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->b[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / + SUN_RCONST(2.0); + sprk_storage->b[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / + SUN_RCONST(2.0); + sprk_storage->b[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / + SUN_RCONST(2.0); + sprk_storage->b[4] = (sprk_storage->a[3] + sprk_storage->a[4]) / + SUN_RCONST(2.0); + sprk_storage->b[5] = (sprk_storage->a[4] + sprk_storage->a[5]) / + SUN_RCONST(2.0); + sprk_storage->b[6] = (sprk_storage->a[5] + sprk_storage->a[6]) / + SUN_RCONST(2.0); + sprk_storage->b[7] = (sprk_storage->a[6] + sprk_storage->a[7]) / + SUN_RCONST(2.0); + sprk_storage->b[8] = sprk_storage->b[7]; + sprk_storage->b[9] = sprk_storage->b[6]; + sprk_storage->b[10] = sprk_storage->b[5]; + sprk_storage->b[11] = sprk_storage->b[4]; + sprk_storage->b[12] = sprk_storage->b[3]; + sprk_storage->b[13] = sprk_storage->b[2]; + sprk_storage->b[14] = sprk_storage->b[1]; + sprk_storage->b[15] = sprk_storage->b[0]; + return sprk_storage; } -/* - The following methods are from: +/* + The following methods are from: - Sofroniou, M., Spaletta, G.: Derivation of symmetric composition constants for - symmetric integrators. Optim Methods Softw. 20, 597–613 (2005). + Sofroniou, M., Spaletta, G.: Derivation of symmetric composition constants for + symmetric integrators. Optim Methods Softw. 20, 597–613 (2005). https://doi.org/10.1080/10556780500140664 - + */ -ARKodeSPRKMem ARKodeSymplecticSofroniou10() { - ARKodeSPRKMem sprk_mem = ARKodeSPRKMem_Alloc(36); - sprk_mem->q = 10; - sprk_mem->stages = 36; - - sprk_mem->a[0] = SUN_RCONST(0.078795722521686419263907679337684); - sprk_mem->a[1] = SUN_RCONST(0.31309610341510852776481247192647); - sprk_mem->a[2] = SUN_RCONST(0.027918383235078066109520273275299); - sprk_mem->a[3] = -SUN_RCONST(0.22959284159390709415121339679655); - sprk_mem->a[4] = SUN_RCONST(0.13096206107716486317465685927961); - sprk_mem->a[5] = -SUN_RCONST(0.26973340565451071434460973222411); - sprk_mem->a[6] = SUN_RCONST(0.074973343155891435666137105641410); - sprk_mem->a[7] = SUN_RCONST(0.11199342399981020488957508073640); - sprk_mem->a[8] = SUN_RCONST(0.36613344954622675119314812353150); - sprk_mem->a[9] = -SUN_RCONST(0.39910563013603589787862981058340); - sprk_mem->a[10] = SUN_RCONST(0.10308739852747107731580277001372); - sprk_mem->a[11] = SUN_RCONST(0.41143087395589023782070411897608); - sprk_mem->a[12] = -SUN_RCONST(0.0048663605831352617621956593099771); - sprk_mem->a[13] = -SUN_RCONST(0.39203335370863990644808193642610); - sprk_mem->a[14] = SUN_RCONST(0.051942502962449647037182904015976); - sprk_mem->a[15] = SUN_RCONST(0.050665090759924496335874344156866); - sprk_mem->a[16] = SUN_RCONST(0.049674370639729879054568800279461); - sprk_mem->a[17] = SUN_RCONST(0.049317735759594537917680008339338); - sprk_mem->a[18] = sprk_mem->a[16]; - sprk_mem->a[19] = sprk_mem->a[15]; - sprk_mem->a[20] = sprk_mem->a[14]; - sprk_mem->a[21] = sprk_mem->a[13]; - sprk_mem->a[22] = sprk_mem->a[12]; - sprk_mem->a[23] = sprk_mem->a[11]; - sprk_mem->a[24] = sprk_mem->a[10]; - sprk_mem->a[25] = sprk_mem->a[9]; - sprk_mem->a[26] = sprk_mem->a[8]; - sprk_mem->a[27] = sprk_mem->a[7]; - sprk_mem->a[28] = sprk_mem->a[6]; - sprk_mem->a[29] = sprk_mem->a[5]; - sprk_mem->a[30] = sprk_mem->a[4]; - sprk_mem->a[31] = sprk_mem->a[3]; - sprk_mem->a[32] = sprk_mem->a[2]; - sprk_mem->a[33] = sprk_mem->a[1]; - sprk_mem->a[34] = sprk_mem->a[0]; - sprk_mem->a[35] = SUN_RCONST(0.0); - sprk_mem->b[0] = sprk_mem->a[0] / SUN_RCONST(2.0); - sprk_mem->b[1] = (sprk_mem->a[0] + sprk_mem->a[1]) / SUN_RCONST(2.0); - sprk_mem->b[2] = (sprk_mem->a[1] + sprk_mem->a[2]) / SUN_RCONST(2.0); - sprk_mem->b[3] = (sprk_mem->a[2] + sprk_mem->a[3]) / SUN_RCONST(2.0); - sprk_mem->b[4] = (sprk_mem->a[3] + sprk_mem->a[4]) / SUN_RCONST(2.0); - sprk_mem->b[5] = (sprk_mem->a[4] + sprk_mem->a[5]) / SUN_RCONST(2.0); - sprk_mem->b[6] = (sprk_mem->a[5] + sprk_mem->a[6]) / SUN_RCONST(2.0); - sprk_mem->b[7] = (sprk_mem->a[6] + sprk_mem->a[7]) / SUN_RCONST(2.0); - sprk_mem->b[8] = (sprk_mem->a[7] + sprk_mem->a[8]) / SUN_RCONST(2.0); - sprk_mem->b[9] = (sprk_mem->a[8] + sprk_mem->a[9]) / SUN_RCONST(2.0); - sprk_mem->b[10] = (sprk_mem->a[9] + sprk_mem->a[10]) / SUN_RCONST(2.0); - sprk_mem->b[11] = (sprk_mem->a[10] + sprk_mem->a[11]) / SUN_RCONST(2.0); - sprk_mem->b[12] = (sprk_mem->a[11] + sprk_mem->a[12]) / SUN_RCONST(2.0); - sprk_mem->b[13] = (sprk_mem->a[12] + sprk_mem->a[13]) / SUN_RCONST(2.0); - sprk_mem->b[14] = (sprk_mem->a[13] + sprk_mem->a[14]) / SUN_RCONST(2.0); - sprk_mem->b[15] = (sprk_mem->a[14] + sprk_mem->a[15]) / SUN_RCONST(2.0); - sprk_mem->b[16] = (sprk_mem->a[15] + sprk_mem->a[16]) / SUN_RCONST(2.0); - sprk_mem->b[17] = (sprk_mem->a[16] + sprk_mem->a[17]) / SUN_RCONST(2.0); - sprk_mem->b[18] = sprk_mem->b[17]; - sprk_mem->b[19] = sprk_mem->b[16]; - sprk_mem->b[20] = sprk_mem->b[15]; - sprk_mem->b[21] = sprk_mem->b[14]; - sprk_mem->b[22] = sprk_mem->b[13]; - sprk_mem->b[23] = sprk_mem->b[12]; - sprk_mem->b[24] = sprk_mem->b[11]; - sprk_mem->b[25] = sprk_mem->b[10]; - sprk_mem->b[26] = sprk_mem->b[9]; - sprk_mem->b[27] = sprk_mem->b[8]; - sprk_mem->b[28] = sprk_mem->b[7]; - sprk_mem->b[29] = sprk_mem->b[6]; - sprk_mem->b[30] = sprk_mem->b[5]; - sprk_mem->b[31] = sprk_mem->b[4]; - sprk_mem->b[32] = sprk_mem->b[3]; - sprk_mem->b[33] = sprk_mem->b[2]; - sprk_mem->b[34] = sprk_mem->b[1]; - sprk_mem->b[35] = sprk_mem->b[0]; - - return sprk_mem; +ARKodeSPRKStorage ARKodeSymplecticSofroniou10() +{ + ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(36); + sprk_storage->q = 10; + sprk_storage->stages = 36; + + sprk_storage->a[0] = SUN_RCONST(0.078795722521686419263907679337684); + sprk_storage->a[1] = SUN_RCONST(0.31309610341510852776481247192647); + sprk_storage->a[2] = SUN_RCONST(0.027918383235078066109520273275299); + sprk_storage->a[3] = -SUN_RCONST(0.22959284159390709415121339679655); + sprk_storage->a[4] = SUN_RCONST(0.13096206107716486317465685927961); + sprk_storage->a[5] = -SUN_RCONST(0.26973340565451071434460973222411); + sprk_storage->a[6] = SUN_RCONST(0.074973343155891435666137105641410); + sprk_storage->a[7] = SUN_RCONST(0.11199342399981020488957508073640); + sprk_storage->a[8] = SUN_RCONST(0.36613344954622675119314812353150); + sprk_storage->a[9] = -SUN_RCONST(0.39910563013603589787862981058340); + sprk_storage->a[10] = SUN_RCONST(0.10308739852747107731580277001372); + sprk_storage->a[11] = SUN_RCONST(0.41143087395589023782070411897608); + sprk_storage->a[12] = -SUN_RCONST(0.0048663605831352617621956593099771); + sprk_storage->a[13] = -SUN_RCONST(0.39203335370863990644808193642610); + sprk_storage->a[14] = SUN_RCONST(0.051942502962449647037182904015976); + sprk_storage->a[15] = SUN_RCONST(0.050665090759924496335874344156866); + sprk_storage->a[16] = SUN_RCONST(0.049674370639729879054568800279461); + sprk_storage->a[17] = SUN_RCONST(0.049317735759594537917680008339338); + sprk_storage->a[18] = sprk_storage->a[16]; + sprk_storage->a[19] = sprk_storage->a[15]; + sprk_storage->a[20] = sprk_storage->a[14]; + sprk_storage->a[21] = sprk_storage->a[13]; + sprk_storage->a[22] = sprk_storage->a[12]; + sprk_storage->a[23] = sprk_storage->a[11]; + sprk_storage->a[24] = sprk_storage->a[10]; + sprk_storage->a[25] = sprk_storage->a[9]; + sprk_storage->a[26] = sprk_storage->a[8]; + sprk_storage->a[27] = sprk_storage->a[7]; + sprk_storage->a[28] = sprk_storage->a[6]; + sprk_storage->a[29] = sprk_storage->a[5]; + sprk_storage->a[30] = sprk_storage->a[4]; + sprk_storage->a[31] = sprk_storage->a[3]; + sprk_storage->a[32] = sprk_storage->a[2]; + sprk_storage->a[33] = sprk_storage->a[1]; + sprk_storage->a[34] = sprk_storage->a[0]; + sprk_storage->a[35] = SUN_RCONST(0.0); + sprk_storage->b[0] = sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->b[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / + SUN_RCONST(2.0); + sprk_storage->b[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / + SUN_RCONST(2.0); + sprk_storage->b[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / + SUN_RCONST(2.0); + sprk_storage->b[4] = (sprk_storage->a[3] + sprk_storage->a[4]) / + SUN_RCONST(2.0); + sprk_storage->b[5] = (sprk_storage->a[4] + sprk_storage->a[5]) / + SUN_RCONST(2.0); + sprk_storage->b[6] = (sprk_storage->a[5] + sprk_storage->a[6]) / + SUN_RCONST(2.0); + sprk_storage->b[7] = (sprk_storage->a[6] + sprk_storage->a[7]) / + SUN_RCONST(2.0); + sprk_storage->b[8] = (sprk_storage->a[7] + sprk_storage->a[8]) / + SUN_RCONST(2.0); + sprk_storage->b[9] = (sprk_storage->a[8] + sprk_storage->a[9]) / + SUN_RCONST(2.0); + sprk_storage->b[10] = (sprk_storage->a[9] + sprk_storage->a[10]) / + SUN_RCONST(2.0); + sprk_storage->b[11] = (sprk_storage->a[10] + sprk_storage->a[11]) / + SUN_RCONST(2.0); + sprk_storage->b[12] = (sprk_storage->a[11] + sprk_storage->a[12]) / + SUN_RCONST(2.0); + sprk_storage->b[13] = (sprk_storage->a[12] + sprk_storage->a[13]) / + SUN_RCONST(2.0); + sprk_storage->b[14] = (sprk_storage->a[13] + sprk_storage->a[14]) / + SUN_RCONST(2.0); + sprk_storage->b[15] = (sprk_storage->a[14] + sprk_storage->a[15]) / + SUN_RCONST(2.0); + sprk_storage->b[16] = (sprk_storage->a[15] + sprk_storage->a[16]) / + SUN_RCONST(2.0); + sprk_storage->b[17] = (sprk_storage->a[16] + sprk_storage->a[17]) / + SUN_RCONST(2.0); + sprk_storage->b[18] = sprk_storage->b[17]; + sprk_storage->b[19] = sprk_storage->b[16]; + sprk_storage->b[20] = sprk_storage->b[15]; + sprk_storage->b[21] = sprk_storage->b[14]; + sprk_storage->b[22] = sprk_storage->b[13]; + sprk_storage->b[23] = sprk_storage->b[12]; + sprk_storage->b[24] = sprk_storage->b[11]; + sprk_storage->b[25] = sprk_storage->b[10]; + sprk_storage->b[26] = sprk_storage->b[9]; + sprk_storage->b[27] = sprk_storage->b[8]; + sprk_storage->b[28] = sprk_storage->b[7]; + sprk_storage->b[29] = sprk_storage->b[6]; + sprk_storage->b[30] = sprk_storage->b[5]; + sprk_storage->b[31] = sprk_storage->b[4]; + sprk_storage->b[32] = sprk_storage->b[3]; + sprk_storage->b[33] = sprk_storage->b[2]; + sprk_storage->b[34] = sprk_storage->b[1]; + sprk_storage->b[35] = sprk_storage->b[0]; + + return sprk_storage; } -ARKodeSPRKMem ARKodeSPRKMem_Alloc(int stages) +ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages) { - ARKodeSPRKMem sprk_mem; + ARKodeSPRKStorage sprk_storage; - sprk_mem = (ARKodeSPRKMem) malloc(sizeof(struct ARKodeSPRKMem_s)); + sprk_storage = (ARKodeSPRKStorage)malloc(sizeof(struct ARKodeSPRKMem_s)); - sprk_mem->q = 0; - sprk_mem->stages = stages; - sprk_mem->b = (sunrealtype*) malloc(stages*sizeof(sunrealtype)); - sprk_mem->a = (sunrealtype*) malloc(stages*sizeof(sunrealtype)); + sprk_storage->q = 0; + sprk_storage->stages = stages; + sprk_storage->b = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); + sprk_storage->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); - return sprk_mem; + return sprk_storage; } -ARKodeSPRKMem ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) +ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) { - switch(id) { - case ARKODE_SYMPLECTIC_EULER_1_1: - return ARKodeSymplecticEuler(); - case ARKODE_SYMPLECTIC_LEAPFROG_2_2: - return ARKodeSymplecticLeapfrog2(); - case ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2: - return ARKodeSymplecticPseudoLeapfrog2(); - case ARKODE_SYMPLECTIC_RUTH_3_3: - return ARKodeSymplecticRuth3(); - case ARKODE_SYMPLECTIC_MCLACHLAN_2_2: - return ARKodeSymplecticMcLachlan2(); - case ARKODE_SYMPLECTIC_MCLACHLAN_3_3: - return ARKodeSymplecticMcLachlan3(); - case ARKODE_SYMPLECTIC_MCLACHLAN_4_4: - return ARKodeSymplecticMcLachlan4(); - case ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4: - return ARKodeSymplecticCandyRozmus4(); - case ARKODE_SYMPLECTIC_MCLACHLAN_5_6: - return ARKodeSymplecticMcLachlan5(); - case ARKODE_SYMPLECTIC_YOSHIDA_6_8: - return ARKodeSymplecticYoshida6(); - case ARKODE_SYMPLECTIC_MCLACHLAN_8_16: - return ARKodeSymplecticMcLachlan8(); - case ARKODE_SYMPLECTIC_SOFRONIOU_10_36: - return ARKodeSymplecticSofroniou10(); - default: - return NULL; + switch (id) + { + case ARKODE_SYMPLECTIC_EULER_1_1: return ARKodeSymplecticEuler(); + case ARKODE_SYMPLECTIC_LEAPFROG_2_2: return ARKodeSymplecticLeapfrog2(); + case ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2: + return ARKodeSymplecticPseudoLeapfrog2(); + case ARKODE_SYMPLECTIC_RUTH_3_3: return ARKodeSymplecticRuth3(); + case ARKODE_SYMPLECTIC_MCLACHLAN_2_2: return ARKodeSymplecticMcLachlan2(); + case ARKODE_SYMPLECTIC_MCLACHLAN_3_3: return ARKodeSymplecticMcLachlan3(); + case ARKODE_SYMPLECTIC_MCLACHLAN_4_4: return ARKodeSymplecticMcLachlan4(); + case ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4: + return ARKodeSymplecticCandyRozmus4(); + case ARKODE_SYMPLECTIC_MCLACHLAN_5_6: return ARKodeSymplecticMcLachlan5(); + case ARKODE_SYMPLECTIC_YOSHIDA_6_8: return ARKodeSymplecticYoshida6(); + case ARKODE_SYMPLECTIC_MCLACHLAN_8_16: return ARKodeSymplecticMcLachlan8(); + case ARKODE_SYMPLECTIC_SOFRONIOU_10_36: return ARKodeSymplecticSofroniou10(); + default: return NULL; } } -ARKodeSPRKMem ARKodeSPRKMem_Copy(ARKodeSPRKMem that_sprk_mem) +ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage that_sprk_mem) { int i; - ARKodeSPRKMem sprk_mem; + ARKodeSPRKStorage sprk_storage; - sprk_mem = ARKodeSPRKMem_Alloc(that_sprk_mem->stages); + sprk_storage = ARKodeSPRKMem_Alloc(that_sprk_mem->stages); - sprk_mem->q = that_sprk_mem->q; + sprk_storage->q = that_sprk_mem->q; - for (i = 0; i < sprk_mem->stages; ++i) + for (i = 0; i < sprk_storage->stages; ++i) { - sprk_mem->b[i] = that_sprk_mem->b[i]; - sprk_mem->a[i] = that_sprk_mem->a[i]; + sprk_storage->b[i] = that_sprk_mem->b[i]; + sprk_storage->a[i] = that_sprk_mem->a[i]; } - return sprk_mem; + return sprk_storage; } -void ARKodeSPRKMem_Space(ARKodeSPRKMem sprk_mem, sunindextype *liw, sunindextype *lrw) +void ARKodeSPRKMem_Space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, + sunindextype* lrw) { *liw = 2; - *lrw = sprk_mem->stages * 2; + *lrw = sprk_storage->stages * 2; return; } -void ARKodeSPRKMem_Free(ARKodeSPRKMem sprk_mem) +void ARKodeSPRKMem_Free(ARKodeSPRKStorage sprk_storage) { - if (sprk_mem) + if (sprk_storage) { - free(sprk_mem->b); - free(sprk_mem->a); - free(sprk_mem); + free(sprk_storage->b); + free(sprk_storage->a); + free(sprk_storage); } return; } -int ARKodeSPRKMem_ToButcher(ARKodeSPRKMem sprk_mem, ARKodeButcherTable* b_ptr, ARKodeButcherTable* B_ptr) +int ARKodeSPRKMem_ToButcher(ARKodeSPRKStorage sprk_storage, + ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) { int i, j; - ARKodeButcherTable b, B; - - b = *b_ptr; - B = *B_ptr; + ARKodeButcherTable a, b; - b = ARKodeButcherTable_Alloc(sprk_mem->stages, SUNFALSE); - B = ARKodeButcherTable_Alloc(sprk_mem->stages, SUNFALSE); + a = ARKodeButcherTable_Alloc(sprk_storage->stages, SUNFALSE); + b = ARKodeButcherTable_Alloc(sprk_storage->stages, SUNFALSE); /* DIRK table */ - for (i = 0; i < sprk_mem->stages; ++i) + for (i = 0; i < sprk_storage->stages; ++i) + { + b->b[i] = sprk_storage->b[i]; + for (j = 0; j <= i; ++j) { b->A[i][j] = sprk_storage->b[j]; } + } + + /* Time weights: C_j = sum_{i=0}^{j-1} B_i */ + for (j = 0; j < sprk_storage->stages; ++j) { - b->b[i] = sprk_mem->b[i]; - for (j = 0; j <= i; ++j) - { - b->A[i][j] = sprk_mem->b[j]; - } + for (i = 0; i < j; ++i) { b->c[j] += sprk_storage->b[i]; } } /* Explicit table */ - for (i = 0; i < sprk_mem->stages; ++i) + for (i = 0; i < sprk_storage->stages; ++i) { - B->b[i] = sprk_mem->a[i]; - for (j = 0; j < i; ++j) - { - B->A[i][j] = sprk_mem->a[j]; - } + a->b[i] = sprk_storage->a[i]; + for (j = 0; j < i; ++j) { a->A[i][j] = sprk_storage->a[j]; } } /* Time weights: C_j = sum_{i=0}^{j-1} B_i */ - for (j = 0; j < sprk_mem->stages; ++j) { - for (i = 0; i < j; ++i) { - b->c[j] += sprk_mem->a[i]; - } + for (j = 0; j < sprk_storage->stages; ++j) + { + for (i = 0; i < j; ++i) { a->c[j] += sprk_storage->a[i]; } } /* Set method order */ - b->q = sprk_mem->q; - B->q = sprk_mem->q; + a->q = sprk_storage->q; + b->q = sprk_storage->q; /* No embedding, so set embedding order to 0 */ + a->p = 0; b->p = 0; - B->p = 0; + + *a_ptr = a; + *b_ptr = b; return ARK_SUCCESS; } diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index a59c37db68..e2d663b5ea 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -613,7 +613,7 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; - ARKodeSPRKMem method; + ARKodeSPRKStorage method; int retval, is; N_Vector delta_Yi, yn_plus_delta_Yi, diff; diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 5b2f44421e..14a965a938 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -21,9 +21,10 @@ #include #include #include + #include "arkode_impl.h" -#ifdef __cplusplus /* wrapper to enable C++ usage */ +#ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif @@ -31,7 +32,6 @@ extern "C" { SPRK time step module constants ===============================================================*/ - /*=============================================================== SPRK time step module data structure ===============================================================*/ @@ -43,46 +43,49 @@ extern "C" { ARKodeSPRKStepMemRec. This structure contains fields to perform an symplectic-partitioned Runge-Kutta time step. ---------------------------------------------------------------*/ -typedef struct ARKodeSPRKStepMemRec { - +typedef struct ARKodeSPRKStepMemRec +{ /* SPRK method and storage */ - ARKodeSPRKMem method; /* method spec */ - int q; /* method order */ - N_Vector sdata; /* persisted stage data */ + ARKodeSPRKStorage method; /* method spec */ + int q; /* method order */ + N_Vector sdata; /* persisted stage data */ /* SPRK problem specification */ - ARKRhsFn f1; /* p' = f1(t,q) = - dV(t,q)/dq */ - ARKRhsFn f2; /* q' = f2(p) = dT(p)/dp */ + ARKRhsFn f1; /* p' = f1(t,q) = - dV(t,q)/dq */ + ARKRhsFn f2; /* q' = f2(p) = dT(p)/dp */ /* Counters */ - long int nf1; /* number of calls to f1 */ - long int nf2; /* number of calls to f2 */ + long int nf1; /* number of calls to f1 */ + long int nf2; /* number of calls to f2 */ int istage; -} *ARKodeSPRKStepMem; - +} * ARKodeSPRKStepMem; /*=============================================================== SPRK time step module private function prototypes ===============================================================*/ int sprkStep_Init(void* arkode_mem, int init_type); -int sprkStep_FullRHS(void* arkode_mem, realtype t, - N_Vector y, N_Vector f, int mode); -int sprkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); -int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype *dsmPtr, int *nflagPtr); +int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, + int mode); +int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr); +int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, + int* nflagPtr); /* Internal utility routines */ -int sprkStep_AccessStepMem(void* arkode_mem, const char *fname, - ARKodeMem *ark_mem, ARKodeSPRKStepMem *step_mem); +int sprkStep_AccessStepMem(void* arkode_mem, const char* fname, + ARKodeMem* ark_mem, ARKodeSPRKStepMem* step_mem); booleantype sprkStep_CheckNVector(N_Vector tmpl); /* f1 = p' (Force evaluation) */ -int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f1, void* user_data); +int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, + N_Vector f1, void* user_data); /* f2 = q' (Velocity evaluation) */ -int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f2, void* user_data); +int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, + N_Vector f2, void* user_data); // /* private functions for interfacing with MRIStep */ -// int sprkStep_SetInnerForcing(void* arkode_mem, realtype tshift, realtype tscale, +// int sprkStep_SetInnerForcing(void* arkode_mem, realtype tshift, realtype +// tscale, // N_Vector *f, int nvecs); // int sprkStep_MRIStepInnerEvolve(MRIStepInnerStepper stepper, // realtype t0, realtype tout, N_Vector y); @@ -91,19 +94,24 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_V // int sprkStep_MRIStepInnerReset(MRIStepInnerStepper stepper, realtype tR, // N_Vector yR); - /*=============================================================== Reusable SPRKStep Error Messages ===============================================================*/ /* Initialization and I/O error messages */ -#define MSG_SPRKSTEP_NO_MEM "Time step module memory is NULL." -#define MSG_NLS_INIT_FAIL "The nonlinear solver's init routine failed." +#define MSG_SPRKSTEP_NO_MEM "Time step module memory is NULL." +#define MSG_NLS_INIT_FAIL "The nonlinear solver's init routine failed." /* Other error messages */ -#define MSG_ARK_MISSING_FE "Cannot specify that method is explicit without providing a function pointer to fe(t,y)." -#define MSG_ARK_MISSING_FI "Cannot specify that method is implicit without providing a function pointer to fi(t,y)." -#define MSG_ARK_MISSING_F "Cannot specify that method is ImEx without providing function pointers to fi(t,y) and fe(t,y)." +#define MSG_ARK_MISSING_FE \ + "Cannot specify that method is explicit without providing a function " \ + "pointer to fe(t,y)." +#define MSG_ARK_MISSING_FI \ + "Cannot specify that method is implicit without providing a function " \ + "pointer to fi(t,y)." +#define MSG_ARK_MISSING_F \ + "Cannot specify that method is ImEx without providing function pointers to " \ + "fi(t,y) and fe(t,y)." #ifdef __cplusplus } diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index cb6a01c3cd..c696dd816a 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -278,7 +278,7 @@ int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) ** Note in documentation that this should not be called along with SPRKStepSetOrder. ** ---------------------------------------------------------------*/ -int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem) +int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -295,7 +295,7 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKMem sprk_mem) step_mem->method = NULL; } - step_mem->method = sprk_mem; + step_mem->method = sprk_storage; return (ARK_SUCCESS); } @@ -363,7 +363,7 @@ int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) Returns the stepper method structure. ---------------------------------------------------------------*/ -int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKMem* sprk_mem) +int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKStorage* sprk_storage) { ARKodeMem ark_mem; ARKodeSPRKStepMem step_mem; @@ -374,7 +374,7 @@ int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKMem* sprk_mem) &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return (retval); - *sprk_mem = step_mem->method; + *sprk_storage = step_mem->method; return (ARK_SUCCESS); } From 71ce30dba37b4072f514d32a9f07b38348096e47 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 15 Jun 2023 12:08:00 -0700 Subject: [PATCH 065/177] add loadbyname function --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 209 +++++++++++++++++- doc/arkode/guide/source/index.rst | 1 + .../source/arkode/ARKodeSPRKStorage_link.rst | 13 ++ doc/superbuild/source/arkode/index.rst | 1 + include/arkode/arkode_sprk.h | 9 +- src/arkode/arkode_sprk.c | 58 ++++- 6 files changed, 282 insertions(+), 9 deletions(-) create mode 100644 doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 28537f0a7e..5eb5553f67 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -12,9 +12,212 @@ .. _SPRKStorage: -=================== -SPRK Method Storage -=================== +============================== +SPRK Method Storage Structure +============================== +.. _SPRKStorage.id: +Method identifiers +------------------ +The following enum values are used to identify different SPRK methods: + +.. c:macro:: ARKODE_SPRK_NONE + + Identifier representing no SPRK method, this is solely used to mark the beginning of the enum. + +.. c:macro:: ARKODE_SYMPLECTIC_EULER_1_1 + + Identifier for the Symplectic Euler 1st order method with 1 stage. + +.. c:macro:: ARKODE_SYMPLECTIC_LEAPFROG_2_2 + + Identifier for the Symplectic Leapfrog 2nd order method with 2 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 + + Identifier for the Symplectic Pseudo Leapfrog 2nd order method with 2 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_RUTH_3_3 + + Identifier for the Symplectic Ruth 3rd order method with 3 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_2_2 + + Identifier for the Symplectic McLachlan 2nd order method with 2 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_3_3 + + Identifier for the Symplectic McLachlan 3rd order method with 3 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 + + Identifier for the Symplectic Candy Rozmus 4th order method with 4 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_4_4 + + Identifier for the Symplectic McLachlan 4th order method with 4 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_5_6 + + Identifier for the Symplectic McLachlan 5th order method with 6 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_YOSHIDA_6_8 + + Identifier for the Symplectic Yoshida 6th order method with 8 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_8_16 + + Identifier for the Symplectic McLachlan 8th order method with 16 stages. + +.. c:macro:: ARKODE_SYMPLECTIC_SOFRONIOU_10_36 + + Identifier for the Symplectic Sofroniou 10th order method with 36 stages. + +.. c:type:: ARKodeSPRKStorage_s + + Structure representing the SPRK method that holds the method coefficients. + + .. c:member:: int q + + The method order of accuracy. + + .. c:member:: int stages + + The number of stages. + + .. c:member:: sunrealtype* a + + Array of coefficients that generate the explicit Butcher table. + + .. c:member:: sunrealtype* b + + Array of coefficients that generate the diagonally-implicit Butcher table. + +.. c:type:: ARKodeSPRKStorage_s* ARKodeSPRKStorage + + +ARKodeSPRKStorage functions +--------------------------- + +.. _ARKodeSPRKStorage.FunctionsTable: +.. table:: ARKodeButcherTable functions + + +----------------------------------------------+------------------------------------------------------------+ + | **Function name** | **Description** | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Alloc()` | Allocate an empty storage structure | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Load()` | Load SPRK method using an identifier | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_LoadByName()` | Load SPRK method using a string version of the identifier | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Create()` | Create a new storage structure | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Copy()` | Create a copy of a storage structure | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Space()` | Get the storage structure real and integer workspace size | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Free()` | Deallocate a storage structure | + +----------------------------------------------+------------------------------------------------------------+ + + +.. c:function:: ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages) + + Allocate memory for the ARKodeSPRKStorage structure. + + :param stages: The number of stages. + :return: Pointer to the allocated ARKodeSPRKStorage structure. + +.. c:function:: ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) + + Load the ARKodeSPRKStorage structure for the specified method ID. + + :param id: The ID of the SPRK method. One of :ref:`SPRKStorage.id`. + :return: Pointer to the loaded ARKodeSPRKStorage structure. + +.. c:function:: ARKodeSPRKStorage ARKodeSPRKMem_LoadByName(const char* method) + + Load the ARKodeSPRKStorage structure for the specified method name. + + :param method: The name of the SPRK method. Must be one of :ref:`SPRKStorage.id` but as a string. + :return: Pointer to the loaded ARKodeSPRKStorage structure. + + +.. c:function:: ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage B) + + Create a copy of the ARKodeSPRKStorage structure. + + :param B: The original ARKodeSPRKStorage structure. + :return: Pointer to the copied ARKodeSPRKStorage structure. + +.. c:function:: void ARKodeSPRKStorage_Space(ARKodeSPRKStorage B, sunindextype* liw, sunindextype* lrw) + + Get the workspace sizes required for the ARKodeSPRKStorage structure. + + :param B: The ARKodeSPRKStorage structure. + :param liw: Pointer to store the integer workspace size. + :param lrw: Pointer to store the real workspace size. + +.. c:function:: void ARKodeSPRKMem_Free(ARKodeSPRKStorage B) + + Free the memory allocated for the ARKodeSPRKStorage structure. + + :param B: The ARKodeSPRKStorage structure to free. + +.. c:function:: int ARKodeSPRKMem_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) + + Convert the ARKodeSPRKStorage structure to the Butcher table representation. + + :param sprk_storage: The ARKodeSPRKStorage structure. + :param a_ptr: Pointer to store the explicit Butcher table. + :param b_ptr: Pointer to store the diagonally-implicit Butcher table. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticEuler() + + Create the ARKodeSPRKStorage structure for the Symplectic Euler method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() + + Create the ARKodeSPRKStorage structure for the Symplectic Leapfrog 2-2 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() + + Create the ARKodeSPRKStorage structure for the Symplectic Pseudo Leapfrog 2-2 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticRuth3() + + Create the ARKodeSPRKStorage structure for the Symplectic Ruth 3-3 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() + + Create the ARKodeSPRKStorage structure for the Symplectic Candy Rozmus 4-4 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() + + Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 2-2 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() + + Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 3-3 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() + + Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 4-4 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() + + Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 5-6 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticYoshida6() + + Create the ARKodeSPRKStorage structure for the Symplectic Yoshida 6-8 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() + + Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 8-16 method. + +.. c:function:: ARKodeSPRKStorage ARKodeSymplecticSofroniou10() + + Create the ARKodeSPRKStorage structure for the Symplectic Sofroniou 10-36 method. diff --git a/doc/arkode/guide/source/index.rst b/doc/arkode/guide/source/index.rst index 77de5ea11a..d09a3a4b83 100644 --- a/doc/arkode/guide/source/index.rst +++ b/doc/arkode/guide/source/index.rst @@ -59,6 +59,7 @@ with support by the `US Department of Energy `_, sundials/index.rst Usage/index.rst ARKodeButcherTable + ARKodeSPRKStorage nvectors/index.rst sunmatrix/index.rst sunlinsol/index.rst diff --git a/doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst b/doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst new file mode 100644 index 0000000000..eaeff6cd6b --- /dev/null +++ b/doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst @@ -0,0 +1,13 @@ +.. ---------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2002-2023, Lawrence Livermore National Security + and Southern Methodist University. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ---------------------------------------------------------------- + +.. include:: ../../../arkode/guide/source/ARKodeSPRKStorage.rst diff --git a/doc/superbuild/source/arkode/index.rst b/doc/superbuild/source/arkode/index.rst index 7190789667..73277dd5a2 100644 --- a/doc/superbuild/source/arkode/index.rst +++ b/doc/superbuild/source/arkode/index.rst @@ -24,5 +24,6 @@ ARKODE Documentation Organization_link.rst Usage/index.rst ARKodeButcherTable_link.rst + ARKodeSPRKStorage_link.rst Constants_link.rst Butcher_link.rst diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index c34339e891..a2d7e79f68 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -13,8 +13,8 @@ * ----------------------------------------------------------------- * -----------------------------------------------------------------*/ -#ifndef _ARKODE_SPRKMEM_H -#define _ARKODE_SPRKMEM_H +#ifndef _ARKODE_SPRKSTORAGE_H +#define _ARKODE_SPRKSTORAGE_H #include #include @@ -42,7 +42,7 @@ typedef enum ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_SOFRONIOU_10_36 } ARKODE_SPRKMethodID; -struct ARKodeSPRKMem_s +struct ARKodeSPRKStorage_s { int q; /* method order of accuracy */ int stages; /* number of stages */ @@ -54,11 +54,12 @@ struct ARKodeSPRKMem_s /* the b_i coefficients generate the diagonally-implicit Butcher table */ }; -typedef _SUNDIALS_STRUCT_ ARKodeSPRKMem_s* ARKodeSPRKStorage; +typedef _SUNDIALS_STRUCT_ ARKodeSPRKStorage_s* ARKodeSPRKStorage; /* Utility routines to allocate/free/output SPRK structures */ SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages); SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_LoadByName(const char* method); SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage B); SUNDIALS_EXPORT void ARKodeSPRKMem_Space(ARKodeSPRKStorage B, sunindextype* liw, sunindextype* lrw); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index c6e13d841c..60b80dc49f 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -392,7 +393,7 @@ ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages) { ARKodeSPRKStorage sprk_storage; - sprk_storage = (ARKodeSPRKStorage)malloc(sizeof(struct ARKodeSPRKMem_s)); + sprk_storage = (ARKodeSPRKStorage)malloc(sizeof(struct ARKodeSPRKStorage_s)); sprk_storage->q = 0; sprk_storage->stages = stages; @@ -424,6 +425,59 @@ ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) } } +ARKodeSPRKStorage ARKodeSPRKMem_LoadByName(const char* method) +{ + if (!strcmp(method, "ARKODE_SYMPLECTIC_EULER_1_1")) + { + return ARKodeSymplecticEuler(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_LEAPFROG_2_2")) + { + return ARKodeSymplecticLeapfrog2(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2")) + { + return ARKodeSymplecticPseudoLeapfrog2(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_RUTH_3_3")) + { + return ARKodeSymplecticRuth3(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_2_2")) + { + return ARKodeSymplecticMcLachlan2(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_3_3")) + { + return ARKodeSymplecticMcLachlan3(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_4_4")) + { + return ARKodeSymplecticMcLachlan4(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4")) + { + return ARKodeSymplecticCandyRozmus4(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_5_6")) + { + return ARKodeSymplecticMcLachlan5(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_YOSHIDA_6_8")) + { + return ARKodeSymplecticYoshida6(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_8_16")) + { + return ARKodeSymplecticMcLachlan8(); + } + else if (!strcmp(method, "ARKODE_SYMPLECTIC_SOFRONIOU_10_36")) + { + return ARKodeSymplecticSofroniou10(); + } + else { return NULL; } +} + ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage that_sprk_mem) { int i; @@ -442,7 +496,7 @@ ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage that_sprk_mem) return sprk_storage; } -void ARKodeSPRKMem_Space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, +void ARKodeSPRKStorage_space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, sunindextype* lrw) { *liw = 2; From 8451e0843e1f48cf25f1fbfc211ba7c262c5bacb Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 15 Jun 2023 12:54:05 -0700 Subject: [PATCH 066/177] add ability to provide method name --- .../SPRKStep_c_interface/User_callable.rst | 71 +++--- examples/arkode/C_serial/ark_kepler.c | 230 ++++++------------ include/arkode/arkode_sprkstep.h | 3 +- src/arkode/arkode_sprkstep_io.c | 32 ++- 4 files changed, 146 insertions(+), 190 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index ae17f12c6f..d574d5ccea 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -625,7 +625,9 @@ Optional inputs for IVP method selection +-----------------------------+-------------------------------------------+----------+ | Set integrator method order | :c:func:`SPRKStepSetOrder()` | 4 | +-----------------------------+-------------------------------------------+----------+ - | Set SPRK method pair | :c:func:`SPRKStepSetMethod()` | internal | + | Set SPRK method | :c:func:`SPRKStepSetMethod()` | internal | + +-----------------------------+-------------------------------------------+----------+ + | Set SPRK method by name | :c:func:`SPRKStepSetMethodName()` | internal | +-----------------------------+-------------------------------------------+----------+ | Use compensated summation | :c:func:`SPRKStepSetUseCompensatedSums()` | false | +-----------------------------+-------------------------------------------+----------+ @@ -651,13 +653,18 @@ Optional inputs for IVP method selection SPRKStep memory block, it cannot be changed after the first call to :c:func:`SPRKStepEvolve()`, unless :c:func:`SPRKStepReInit()` is called. + .. warning:: + + This overrides the method so it should not be used with :c:func:`SPRKStepSetMethod` + or :c:func:`SPRKStepMethodByName`. -.. c:function:: int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) - Specifies if compensated summation should be used where applicable. +.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) + + Specifies the SPRK method. :param arkode_mem: pointer to the SPRKStep memory block. - :param onoff: should compensated summation be used (1) or not (0) + :param sprk_storage: the SPRK method memory. :return: * *ARK_SUCCESS* if successful @@ -665,17 +672,17 @@ Optional inputs for IVP method selection * *ARK_ILL_INPUT* if an argument has an illegal value **Notes:** - This increases the computational cost and memory usage of the SPRK methods - per stage, however, it signficantly more robust to roundoff error - accumulation. + No error checking is performed to ensure that either the method order *p* or + specified in the method structure correctly describe the coefficients. -.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) - Specifies the SPRK method. +.. c:function:: int SPRKStepSetMethodName(void* arkode_mem, const char* method) + + Specifies the SPRK method by its name :param arkode_mem: pointer to the SPRKStep memory block. - :param sprk_storage: the SPRK method memory. + :param method: the SPRK method name. :return: * *ARK_SUCCESS* if successful @@ -683,14 +690,29 @@ Optional inputs for IVP method selection * *ARK_ILL_INPUT* if an argument has an illegal value **Notes:** - - For a description of the :c:type:`ARKodeSPRKStorage` type and related - functions for creating the method structure, see :numref:`ARKodeSPRKStorage`. - No error checking is performed to ensure that either the method order *p* or specified in the method structure correctly describe the coefficients. + +.. c:function:: int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) + + Specifies if compensated summation should be used where applicable. + + :param arkode_mem: pointer to the SPRKStep memory block. + :param onoff: should compensated summation be used (1) or not (0) + + :return: + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + This increases the computational cost and memory usage of the SPRK methods + per stage, however, it signficantly more robust to roundoff error + accumulation. + + .. _ARKODE.Usage.SPRKStep.SPRKStepAdaptivityInput: Optional inputs for time step adaptivity @@ -1110,27 +1132,6 @@ Main solver optional output functions * *ARK_SUCCESS* if successful * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` - **Notes:** - The :c:type:`ARKodeSPRKStorage` data structure is defined as a - pointer to the following C structure: - - .. code-block:: c - - struct ARKodeSPRKMem_s { - - int q; /* method order of accuracy */ - int stages; /* number of stages */ - sunrealtype* a; /* coefficients multiplying q' */ - sunrealtype* b; /* coefficients multiplying p' */ - - /* the a_i coefficients generate the explicit Butcher table */ - /* the b_i coefficients generate the diagonally-implicit Butcher table */ - - }; - - For more details see :numref:`ARKodeSPRKStorage`. - - .. c:function:: int SPRKStepGetUserData(void* arkode_mem, void** user_data) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 9dd87870ef..ec873f01a5 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -38,22 +38,11 @@ * used and time-stepping strategy. The program has the following CLI arguments: * * --step-mode should we use a fixed time-step or adaptive time-step (default fixed) - * --stepper should we use the ARKStep or SPRKStep time-stepping module - * --order <1,2,22,222,3,33,4,44,5,6,8,10> which method order and specific method to use (default 4) - * 1 - Symplectic Euler - * 2 - 2nd order Leapfrog - * 22 - 2nd order Pseudo Leapfrog - * 222 - 2nd order McLachlan - * 3 - 3rd order Ruth - * 33 - 3rd order McLachlan - * 4 - 4th order Candy-Rozmus - * 44 - 4th order McLachlan - * 5 - 5th order McLachlan - * 6 - 6th order Yoshida - * 8 - 8th order McLachlan - * 10 - 10th order Sofroniou - * --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) - * --use-compensated-sums turns on compensated summation in ARKODE where applicable + * --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK) + * --method which method to use (default ARKODE_SYMPLECTIC_MCLACHLAN_4_4) + * --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) + * --tf the final time for the simulation (default 100) + * --use-compensated-sums turns on compensated summation in ARKODE where applicable * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner @@ -97,10 +86,11 @@ typedef struct typedef struct { int step_mode; - int method; - int order; + int stepper; int use_compsums; sunrealtype dt; + sunrealtype tf; + const char* method_name; } ProgramArgs; static int check_retval(void* returnvalue, const char* funcname, int opt); @@ -145,15 +135,15 @@ int main(int argc, char* argv[]) /* CLI args */ if (ParseArgs(argc, argv, &args)) { return -1; }; - const int step_mode = args.step_mode; - const int method = args.method; - const int order = args.order; - const int use_compsums = args.use_compsums; - const sunrealtype dt = args.dt; + const int step_mode = args.step_mode; + const int stepper = args.stepper; + const char* method_name = args.method_name; + const int use_compsums = args.use_compsums; + const sunrealtype dt = args.dt; + sunrealtype Tf = args.tf; /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(50.0); const sunrealtype ecc = SUN_RCONST(0.6); const sunrealtype dTout = 10 * dt; // SUN_RCONST(1.); const int num_output_times = (int)ceil(Tf / dTout); @@ -183,7 +173,7 @@ int main(int argc, char* argv[]) InitialConditions(y, ecc); /* Create SPRKStep integrator */ - if (method == 0) + if (stepper == 0) { arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); @@ -191,70 +181,8 @@ int main(int argc, char* argv[]) SPRKStepRootInit(arkode_mem, 1, rootfn); if (check_retval(&retval, "SPRKStepRootInit", 1)) return 1; - switch (order) - { - case 1: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticEuler()); - fprintf(stdout, "Using symplectic Euler O(h^1)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 2: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticLeapfrog2()); - fprintf(stdout, "Using symplectic Leapfrog O(h^2)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 22: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticPseudoLeapfrog2()); - fprintf(stdout, "Using symplectic Pseudo Leapfrog O(h^2)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 222: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan2()); - fprintf(stdout, "Using symplectic McLachlan O(h^2)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 3: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticRuth3()); - fprintf(stdout, "Using symplectic Ruth O(h^3)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 33: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan3()); - fprintf(stdout, "Using symplectic McLachlan O(h^3)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 4: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticCandyRozmus4()); - fprintf(stdout, "Using symplectic Candy-Rozmus O(h^4)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 44: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan4()); - fprintf(stdout, "Using symplectic McLachlan O(h^4)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 5: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan5()); - fprintf(stdout, "Using symplectic McLachlan O(h^5)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 6: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticYoshida6()); - fprintf(stdout, "Using symplectic Yoshida O(h^6)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 8: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticMcLachlan8()); - fprintf(stdout, "Using symplectic McLachlan O(h^8)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - case 10: - retval = SPRKStepSetMethod(arkode_mem, ARKodeSymplecticSofroniou10()); - fprintf(stdout, "Using symplectic Sofroniou O(h^10)\n"); - if (check_retval(&retval, "SPRKStepSetMethod", 1)) return 1; - break; - default: fprintf(stderr, "Not a valid method\n"); return 1; - } + retval = SPRKStepSetMethodName(arkode_mem, method_name); + if (check_retval(&retval, "SPRKStepSetMethodName", 1)) return 1; retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) return 1; @@ -289,25 +217,12 @@ int main(int argc, char* argv[]) retval = SPRKStepSetUserData(arkode_mem, (void*)udata); if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; } - else if (method >= 1) + else if (stepper == 1) { - if (method == 1) - { - arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); - - retval = ARKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - } - else - { - arkode_mem = ARKStepCreate(velocity, force, T0, y, sunctx); + arkode_mem = ARKStepCreate(dydt, NULL, T0, y, sunctx); - retval = ARKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "ARKStepSetOrder", 1)) return 1; - - NLS = SUNNonlinSol_FixedPoint(y, 0, sunctx); - ARKStepSetNonlinearSolver(arkode_mem, NLS); - } + retval = ARKStepSetTableName(arkode_mem, "ARKODE_DIRK_NONE", method_name); + if (check_retval(&retval, "ARKStepSetTableName", 1)) return 1; ARKStepRootInit(arkode_mem, 1, rootfn); if (check_retval(&retval, "ARKStepRootInit", 1)) return 1; @@ -327,33 +242,33 @@ int main(int argc, char* argv[]) } /* Open output files */ - if (method == 0) + if (stepper == 0) { - const char* fmt1 = "ark_kepler_conserved_sprk-%d-dt-%.2e.txt"; - const char* fmt2 = "ark_kepler_solution_sprk-%d-dt-%.2e.txt"; - const char* fmt3 = "ark_kepler_times_sprk-%d-dt-%.2e.txt"; - const char* fmt4 = "ark_kepler_hhist_sprk-%d-dt-%.2e.txt"; - char fname[64]; - sprintf(fname, fmt1, order, dt); + const char* fmt1 = "ark_kepler_conserved_%s-dt-%.2e.txt"; + const char* fmt2 = "ark_kepler_solution_%s-dt-%.2e.txt"; + const char* fmt3 = "ark_kepler_times_%s-dt-%.2e.txt"; + const char* fmt4 = "ark_kepler_hhist_%s-dt-%.2e.txt"; + char fname[256]; + sprintf(fname, fmt1, method_name, dt); conserved_fp = fopen(fname, "w+"); - sprintf(fname, fmt2, order, dt); + sprintf(fname, fmt2, method_name, dt); solution_fp = fopen(fname, "w+"); - sprintf(fname, fmt3, order, dt); + sprintf(fname, fmt3, method_name, dt); times_fp = fopen(fname, "w+"); - sprintf(fname, fmt4, order, dt); + sprintf(fname, fmt4, method_name, dt); udata->hhist_fp = fopen(fname, "w+"); } else { - const char* fmt1 = "ark_kepler_conserved_erk-%d-dt-%.2e.txt"; - const char* fmt2 = "ark_kepler_solution_erk-%d-dt-%.2e.txt"; - const char* fmt3 = "ark_kepler_times_erk-%d-dt-%.2e.txt"; - char fname[64]; - sprintf(fname, fmt1, order, dt); + const char* fmt1 = "ark_kepler_conserved_%s-dt-%.2e.txt"; + const char* fmt2 = "ark_kepler_solution_%s-dt-%.2e.txt"; + const char* fmt3 = "ark_kepler_times_%s-dt-%.2e.txt"; + char fname[256]; + sprintf(fname, fmt1, method_name, dt); conserved_fp = fopen(fname, "w+"); - sprintf(fname, fmt2, order, dt); + sprintf(fname, fmt2, method_name, dt); solution_fp = fopen(fname, "w+"); - sprintf(fname, fmt3, order, dt); + sprintf(fname, fmt3, method_name, dt); times_fp = fopen(fname, "w+"); } @@ -371,7 +286,7 @@ int main(int argc, char* argv[]) N_VPrintFile(y, solution_fp); /* Do integration */ - if (method == 0) + if (stepper == 0) { for (iout = 0; iout < num_output_times; iout++) { @@ -480,7 +395,7 @@ int main(int argc, char* argv[]) fclose(solution_fp); if (NLS) { SUNNonlinSolFree(NLS); } N_VDestroy(y); - if (method == 0) + if (stepper == 0) { SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); SPRKStepFree(&arkode_mem); @@ -643,10 +558,11 @@ sunrealtype ControlError(N_Vector yvec, void* user_data) int ParseArgs(int argc, char* argv[], ProgramArgs* args) { args->step_mode = 0; - args->method = 0; - args->order = 4; + args->stepper = 0; + args->method_name = NULL; args->use_compsums = 0; args->dt = SUN_RCONST(1e-2); + args->tf = SUN_RCONST(100.); for (int argi = 1; argi < argc; argi++) { @@ -664,24 +580,29 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) else if (!strcmp(argv[argi], "--stepper")) { argi++; - if (!strcmp(argv[argi], "sprk")) { args->method = 0; } - else if (!strcmp(argv[argi], "ark")) { args->method = 1; } + if (!strcmp(argv[argi], "SPRK")) { args->stepper = 0; } + else if (!strcmp(argv[argi], "ERK")) { args->stepper = 1; } else { - fprintf(stderr, "--stepper must be 'ark' or 'sprk'\n"); + fprintf(stderr, "--stepper must be 'SPRK' or 'ERK'\n"); return -1; } } - else if (!strcmp(argv[argi], "--order")) + else if (!strcmp(argv[argi], "--method")) { argi++; - args->order = atoi(argv[argi]); + args->method_name = argv[argi]; } else if (!strcmp(argv[argi], "--dt")) { argi++; args->dt = atof(argv[argi]); } + else if (!strcmp(argv[argi], "--tf")) + { + argi++; + args->tf = atof(argv[argi]); + } else if (!strcmp(argv[argi], "--use-compensated-sums")) { args->use_compsums = 1; @@ -699,6 +620,18 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) } } + if (!args->method_name) + { + if (args->stepper == 0) + { + args->method_name = "ARKODE_SYMPLECTIC_MCLACHLAN_4_4"; + } + else if (args->stepper == 1) + { + args->method_name = "ARKODE_ZONNEVELD_5_3_4"; + } + } + return 0; } @@ -708,26 +641,19 @@ void PrintHelp() "time-stepping module solving the Kepler problem\n"); fprintf(stderr, " --step-mode should we use a fixed " "time-step or adaptive time-step (default fixed)\n"); - fprintf(stderr, " --stepper should we use the ARKStep or " - "SPRKStep time-stepping module\n"); - fprintf(stderr, " --order <1,2,22,222,3,33,4,44,5,6,8,10> which method " - "order and specific method to use (default 4)\n"); - fprintf(stderr, " 1 - Symplectic Euler\n"); - fprintf(stderr, " 2 - 2nd order Leapfrog\n"); - fprintf(stderr, " 22 - 2nd order Pseudo Leapfrog\n"); - fprintf(stderr, " 222 - 2nd order McLachlan\n"); - fprintf(stderr, " 3 - 3rd order Ruth\n"); - fprintf(stderr, " 33 - 3rd order McLachlan\n"); - fprintf(stderr, " 4 - 4th order Candy-Rozmus\n"); - fprintf(stderr, " 44 - 4th order McLachlan\n"); - fprintf(stderr, " 5 - 5th order McLachlan\n"); - fprintf(stderr, " 6 - 6th order Yoshida\n"); - fprintf(stderr, " 8 - 8th order McLachlan\n"); - fprintf(stderr, " 10 - 10th order Sofroniou\n"); - fprintf(stderr, " --dt the fixed-time step size to use if fixed " + fprintf(stderr, + " --stepper should we use SPRKStep or ARKStep " + "with an ERK method (default SPRK)\n"); + fprintf(stderr, " --method which method to use (default " + "ARKODE_SYMPLECTIC_MCLACHLAN_4_4)\n"); + fprintf(stderr, " --dt the fixed-time step size to " + "use if fixed " "time stepping is turned on (default 0.01)\n"); - fprintf(stderr, " --use-compensated-sums turns on compensated summation in " - "ARKODE where applicable\n"); + fprintf(stderr, " --tf the final time for the " + "simulation (default 100)\n"); + fprintf(stderr, + " --use-compensated-sums turns on compensated summation in " + "ARKODE where applicable\n"); } /* Check function return value... @@ -740,7 +666,7 @@ void PrintHelp() */ int check_retval(void* returnvalue, const char* funcname, int opt) { - int* retval; + int* retval = NULL; /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ if (opt == 0 && returnvalue == NULL) diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 65acf05568..c788cb3747 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -33,7 +33,7 @@ extern "C" { * ----------------- */ static const int SPRKSTEP_DEFAULT_1 = ARKODE_SYMPLECTIC_EULER_1_1; -static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_MCLACHLAN_2_2; +static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_LEAPFROG_2_2; static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_MCLACHLAN_3_3; static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLACHLAN_4_4; static const int SPRKSTEP_DEFAULT_5 = ARKODE_SYMPLECTIC_MCLACHLAN_5_6; @@ -68,6 +68,7 @@ SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage); +SUNDIALS_EXPORT int SPRKStepSetMethodName(void* arkode_mem, const char* method); SUNDIALS_EXPORT int SPRKStepSetOrder(void* arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree); diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index c696dd816a..01cd3d975f 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -252,7 +252,7 @@ int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", &ark_mem, + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUseCompensatedSums", &ark_mem, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } @@ -285,7 +285,7 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", &ark_mem, + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetMethod", &ark_mem, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } @@ -300,6 +300,34 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) return (ARK_SUCCESS); } + +/*--------------------------------------------------------------- + SPRKStepSetMethodName: + + Specifies the SPRK method. + ---------------------------------------------------------------*/ +int SPRKStepSetMethodName(void* arkode_mem, const char* method) +{ + ARKodeMem ark_mem; + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetMethodName", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } + + if (step_mem->method) + { + ARKodeSPRKMem_Free(step_mem->method); + step_mem->method = NULL; + } + + step_mem->method = ARKodeSPRKMem_LoadByName(method); + + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- SPRKStepSetOrder: From 045b4df2b2e18212425f910a04554c70f6aa0129 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 15 Jun 2023 13:00:42 -0700 Subject: [PATCH 067/177] remove adaptivity --- examples/arkode/C_serial/ark_kepler.c | 123 ++++++-------------------- 1 file changed, 28 insertions(+), 95 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index ec873f01a5..6f78294291 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -71,16 +71,6 @@ typedef struct { sunrealtype ecc; - - /* for time-step control */ - sunrealtype eps; - sunrealtype alpha; - sunrealtype rho_0; - sunrealtype rho_nphalf; - sunrealtype rho_n; - sunrealtype Q0; - - FILE* hhist_fp; } * UserData; typedef struct @@ -111,7 +101,6 @@ static sunrealtype G(N_Vector yvec, sunrealtype alpha); static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, sunrealtype h3, sunrealtype e1, sunrealtype e2, sunrealtype e3, int q, int p, sunrealtype* hnew, void* user_data); -static sunrealtype ControlError(N_Vector yvec, void* user_data); int main(int argc, char* argv[]) { @@ -134,7 +123,7 @@ int main(int argc, char* argv[]) int retval = 0; /* CLI args */ - if (ParseArgs(argc, argv, &args)) { return -1; }; + if (ParseArgs(argc, argv, &args)) { return 1; }; const int step_mode = args.step_mode; const int stepper = args.stepper; const char* method_name = args.method_name; @@ -153,14 +142,6 @@ int main(int argc, char* argv[]) /* Allocate and fill udata structure */ udata = (UserData)malloc(sizeof(*udata)); udata->ecc = ecc; - /* Adaptivity controller parameters */ - /* Controller's integral gain. Increasing this will result in a higher - rate of change in the step size, while decreasing it will result in - a lower rate of change. */ - udata->alpha = SUN_RCONST(3.0) / SUN_RCONST(2.0); - /* Controller's set-point. The error in the Hamiltonian is bounded by - * O(eps^p) where p is the method order. */ - udata->eps = dt; /* Create the SUNDIALS context object for this simulation */ retval = SUNContext_Create(NULL, &sunctx); @@ -197,21 +178,9 @@ int main(int argc, char* argv[]) } else { - /* Adaptivity based on https://doi.org/10.1137/04060699 (Hairer and - * Soderlind, 2005). */ - retval = SPRKStepSetAdaptivityFn(arkode_mem, Adapt, udata); - if (check_retval(&retval, "SPRKStepSetAdaptivityFn", 1)) return 1; - - /* Compute the initial advance of rho_nphalf */ - udata->rho_0 = SUN_RCONST(1.0) / Q(y, udata->alpha); - udata->rho_nphalf = udata->rho_0 + - udata->eps * G(y, udata->alpha) / SUN_RCONST(2.0); - retval = SPRKStepSetInitStep(arkode_mem, udata->eps / udata->rho_nphalf); - if (check_retval(&retval, "SPRKStepSetInitStep", 1)) return 1; - - /* Set the max number of time steps to something large. */ - retval = SPRKStepSetMaxNumSteps(arkode_mem, 100000000); - if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + fprintf(stderr, + "ERROR: adaptive time-steps are not supported with SPRKStep\n"); + return 1; } retval = SPRKStepSetUserData(arkode_mem, (void*)udata); @@ -247,7 +216,6 @@ int main(int argc, char* argv[]) const char* fmt1 = "ark_kepler_conserved_%s-dt-%.2e.txt"; const char* fmt2 = "ark_kepler_solution_%s-dt-%.2e.txt"; const char* fmt3 = "ark_kepler_times_%s-dt-%.2e.txt"; - const char* fmt4 = "ark_kepler_hhist_%s-dt-%.2e.txt"; char fname[256]; sprintf(fname, fmt1, method_name, dt); conserved_fp = fopen(fname, "w+"); @@ -255,8 +223,6 @@ int main(int argc, char* argv[]) solution_fp = fopen(fname, "w+"); sprintf(fname, fmt3, method_name, dt); times_fp = fopen(fname, "w+"); - sprintf(fname, fmt4, method_name, dt); - udata->hhist_fp = fopen(fname, "w+"); } else { @@ -273,14 +239,11 @@ int main(int argc, char* argv[]) } /* Print out starting energy, momentum before integrating */ - tret = T0; - tout = T0 + dTout; - H0 = Hamiltonian(y); - L0 = AngularMomentum(y); - udata->Q0 = Q(y, udata->alpha); - fprintf(stdout, - "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf, Q(p,q) = %.16Lf\n", - tret, H0, L0, udata->Q0); + tret = T0; + tout = T0 + dTout; + H0 = Hamiltonian(y); + L0 = AngularMomentum(y); + fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf\n", tret, H0, L0); fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); N_VPrintFile(y, solution_fp); @@ -305,24 +268,20 @@ int main(int argc, char* argv[]) SPRKStepGetRootInfo(arkode_mem, &rootsfound); fprintf(stdout, "t = %.4Lf g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg\n", tret, rootsfound, N_VGetArrayPointer(y)[0], N_VGetArrayPointer(y)[1]); - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, - ControlError(y, udata)); + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0); /* Continue to tout */ retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); } /* Output current integration status */ - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, - ControlError(y, udata)); + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0); fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); - SPRKStepGetLastStep(arkode_mem, &hlast); - fprintf(udata->hhist_fp, "%.16Lf, %.16Lf\n", hlast, ControlError(y, udata)); N_VPrintFile(y, solution_fp); /* Check if the solve was successful, if so, update the time and continue @@ -356,18 +315,16 @@ int main(int argc, char* argv[]) ARKStepGetRootInfo(arkode_mem, &rootsfound); fprintf(stdout, "t = %.4Lf g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg\n", tret, rootsfound, N_VGetArrayPointer(y)[0], N_VGetArrayPointer(y)[1]); - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, - ControlError(y, udata)); + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0); /* Continue to tout */ retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); } /* Output current integration status */ - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf, Q(p,q)-Q0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0, - ControlError(y, udata)); + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0); fprintf(times_fp, "%.16Lf\n", tret); fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), AngularMomentum(y)); @@ -382,13 +339,12 @@ int main(int argc, char* argv[]) } else { - fprintf(stderr, "Solver failure, stopping integration\n"); + fprintf(stderr, "ERROR: Solver failure, stopping integration\n"); break; } } } - if (udata->hhist_fp) { fclose(udata->hhist_fp); } free(udata); fclose(times_fp); fclose(conserved_fp); @@ -532,29 +488,6 @@ sunrealtype Q(N_Vector yvec, sunrealtype alpha) return SUNRpowerR(qTq, alpha / SUN_RCONST(2.0)); } -int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, - sunrealtype h3, sunrealtype e1, sunrealtype e2, sunrealtype e3, int q, - int p, sunrealtype* hnew, void* user_data) -{ - UserData udata = (UserData)user_data; - - /* When we enter this function, we are have already computed y_n+1 and are - * preparing for the next step. */ - sunrealtype Gyn = G(y, udata->alpha); - udata->rho_n = udata->rho_nphalf + udata->eps * Gyn / SUN_RCONST(2.0); - udata->rho_nphalf = udata->rho_n + udata->eps * Gyn / SUN_RCONST(2.0); - - *hnew = udata->eps / udata->rho_nphalf; - - return 0; -} - -sunrealtype ControlError(N_Vector yvec, void* user_data) -{ - UserData udata = (UserData)user_data; - return udata->rho_n * Q(yvec, udata->alpha) - udata->rho_0 * udata->Q0; -} - int ParseArgs(int argc, char* argv[], ProgramArgs* args) { args->step_mode = 0; @@ -573,8 +506,8 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) else if (!strcmp(argv[argi], "adapt")) { args->step_mode = 1; } else { - fprintf(stderr, "--step-mode must be 'fixed' or 'adapt'\n"); - return -1; + fprintf(stderr, "ERROR: --step-mode must be 'fixed' or 'adapt'\n"); + return 1; } } else if (!strcmp(argv[argi], "--stepper")) @@ -584,8 +517,8 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) else if (!strcmp(argv[argi], "ERK")) { args->stepper = 1; } else { - fprintf(stderr, "--stepper must be 'SPRK' or 'ERK'\n"); - return -1; + fprintf(stderr, "ERROR: --stepper must be 'SPRK' or 'ERK'\n"); + return 1; } } else if (!strcmp(argv[argi], "--method")) @@ -610,13 +543,13 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) else if (!strcmp(argv[argi], "--help")) { PrintHelp(); - return -1; + return 1; } else { - fprintf(stderr, "Unrecognized argument %s\n", argv[argi]); + fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); PrintHelp(); - return -1; + return 1; } } @@ -671,7 +604,7 @@ int check_retval(void* returnvalue, const char* funcname, int opt) /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ if (opt == 0 && returnvalue == NULL) { - fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed - returned NULL pointer\n\n", + fprintf(stderr, "\nSUNDIALS ERROR: %s() failed - returned NULL pointer\n\n", funcname); return 1; } @@ -682,7 +615,7 @@ int check_retval(void* returnvalue, const char* funcname, int opt) retval = (int*)returnvalue; if (*retval < 0) { - fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed with retval = %d\n\n", + fprintf(stderr, "\nSUNDIALS ERROR: %s() failed with retval = %d\n\n", funcname, *retval); return 1; } @@ -691,7 +624,7 @@ int check_retval(void* returnvalue, const char* funcname, int opt) /* Check if function returned NULL pointer - no memory allocated */ else if (opt == 2 && returnvalue == NULL) { - fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", + fprintf(stderr, "\nMEMORY ERROR: %s() failed - returned NULL pointer\n\n", funcname); return 1; } From ff4ba8e86aec1a68d17663024980565af4a60e13 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 15 Jun 2023 13:02:31 -0700 Subject: [PATCH 068/177] remove remaining adaptivity prototypes --- examples/arkode/C_serial/ark_kepler.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 6f78294291..bbe9b0768f 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -96,12 +96,6 @@ static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int rootfn(sunrealtype t, N_Vector y, sunrealtype* gout, void* user_data); -static sunrealtype Q(N_Vector yvec, sunrealtype alpha); -static sunrealtype G(N_Vector yvec, sunrealtype alpha); -static int Adapt(N_Vector y, sunrealtype t, sunrealtype h1, sunrealtype h2, - sunrealtype h3, sunrealtype e1, sunrealtype e2, sunrealtype e3, - int q, int p, sunrealtype* hnew, void* user_data); - int main(int argc, char* argv[]) { ProgramArgs args; From 14609b5856276f0ab2b81449f664f47ea1aeebc0 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 15 Jun 2023 13:12:11 -0700 Subject: [PATCH 069/177] add SPRK constants to constants table --- doc/arkode/guide/source/Constants.rst | 487 ++++++++++++++------------ 1 file changed, 256 insertions(+), 231 deletions(-) diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index 8558965ee4..092c09b8e9 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -28,237 +28,262 @@ contains the ARKODE output constants. .. table:: ARKODE input constants :widths: 38 52 - +---------------------------------------------+-----------------------------------------------------------+ - | **Shared input constants** | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARK_NORMAL` | Solver should return at a specified output time. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARK_ONE_STEP` | Solver should return after each successful step. | - +---------------------------------------------+-----------------------------------------------------------+ - | | - +---------------------------------------------+-----------------------------------------------------------+ - | **Full right-hand side evaluation constants** | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARK_FULLRHS_START` | Calling the full right-hand side function at the | - | | start of the integration. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARK_FULLRHS_END` | Calling the full right-hand side function at the end of | - | | a step. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARK_FULLRHS_OTHER` | Calling the full right-hand side function at the some | - | | other point e.g., for dense output. | - +---------------------------------------------+-----------------------------------------------------------+ - | | - +---------------------------------------------+-----------------------------------------------------------+ - | **Interpolation module input constants** | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARK_INTERP_HERMITE` | Specifies use of the Hermite polynomial interpolation | - | | module (for non-stiff problems). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARK_INTERP_LAGRANGE` | Specifies use of the Lagrange polynomial interpolation | - | | module (for stiff problems). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARK_INTERP_MAX_DEGREE` | Maximum possible interpolating polynomial degree. | - +---------------------------------------------+-----------------------------------------------------------+ - | | - +---------------------------------------------+-----------------------------------------------------------+ - | **Explicit Butcher table specification** | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_HEUN_EULER_2_1_2` | Use the Heun-Euler-2-1-2 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_BOGACKI_SHAMPINE_4_2_3` | Use the Bogacki-Shampine-4-2-3 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK324L2SA_ERK_4_2_3` | Use the ARK-4-2-3 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ZONNEVELD_5_3_4` | Use the Zonneveld-5-3-4 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK436L2SA_ERK_6_3_4` | Use the ARK-6-3-4 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_SAYFY_ABURUB_6_3_4` | Use the Sayfy-Aburub-6-3-4 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_CASH_KARP_6_4_5` | Use the Cash-Karp-6-4-5 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_FEHLBERG_6_4_5` | Use the Fehlberg-6-4-5 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_DORMAND_PRINCE_7_4_5` | Use the Dormand-Prince-7-4-5 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK548L2SA_ERK_8_4_5` | Use the ARK-8-4-5 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_VERNER_8_5_6` | Use the Verner-8-5-6 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_FEHLBERG_13_7_8` | Use the Fehlberg-13-7-8 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_KNOTH_WOLKE_3_3` | Use the Knoth-Wolke-3-3 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK437L2SA_ERK_7_3_4` | Use the ARK-7-3-4 ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK548L2SAb_ERK_8_4_5` | Use the ARK-8-4-5b ERK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ERK_2` | Use ARKStep's default second-order ERK method | - | | (ARKODE_HEUN_EULER_2_1_2). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ERK_3` | Use ARKStep's default third-order ERK method | - | | (ARKODE_BOGACKI_SHAMPINE_4_2_3). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ERK_4` | Use ARKStep's default fourth-order ERK method | - | | (ARKODE_ZONNEVELD_5_3_4). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ERK_5` | Use ARKStep's default fifth-order ERK method | - | | (ARKODE_CASH_KARP_6_4_5). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ERK_6` | Use ARKStep's default sixth-order ERK method | - | | (ARKODE_VERNER_8_5_6). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ERK_8` | Use ARKStep's default eighth-order ERK method | - | | (ARKODE_FEHLBERG_13_7_8). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ERKSTEP_DEFAULT_2` | Use ERKStep's default second-order ERK method | - | | (ARKODE_HEUN_EULER_2_1_2). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ERKSTEP_DEFAULT_3` | Use ERKStep's default third-order ERK method | - | | (ARKODE_BOGACKI_SHAMPINE_4_2_3). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ERKSTEP_DEFAULT_4` | Use ERKStep's default fourth-order ERK method | - | | (ARKODE_ZONNEVELD_5_3_4). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ERKSTEP_DEFAULT_5` | Use ERKStep's default fifth-order ERK method | - | | (ARKODE_CASH_KARP_6_4_5). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ERKSTEP_DEFAULT_6` | Use ERKStep's default sixth-order ERK method | - | | (ARKODE_VERNER_8_5_6). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ERKSTEP_DEFAULT_8` | Use ERKStep's default eighth-order ERK method | - | | (ARKODE_FEHLBERG_13_7_8). | - +---------------------------------------------+-----------------------------------------------------------+ - | | - +---------------------------------------------+-----------------------------------------------------------+ - | **Implicit Butcher table specification** | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_SDIRK_2_1_2` | Use the SDIRK-2-1-2 SDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_BILLINGTON_3_3_2` | Use the Billington-3-3-2 SDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_TRBDF2_3_3_2` | Use the TRBDF2-3-3-2 ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_KVAERNO_4_2_3` | Use the Kvaerno-4-2-3 ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK324L2SA_DIRK_4_2_3` | Use the ARK-4-2-3 ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_CASH_5_2_4` | Use the Cash-5-2-4 SDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_CASH_5_3_4` | Use the Cash-5-3-4 SDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_SDIRK_5_3_4` | Use the SDIRK-5-3-4 SDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_KVAERNO_5_3_4` | Use the Kvaerno-5-3-4 ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK436L2SA_DIRK_6_3_4` | Use the ARK-6-3-4 ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_KVAERNO_7_4_5` | Use the Kvaerno-7-4-5 ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK548L2SA_DIRK_8_4_5` | Use the ARK-8-4-5 ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK437L2SA_DIRK_7_3_4` | Use the ARK-7-3-4 ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_ARK548L2SAb_DIRK_8_4_5` | Use the ARK-8-4-5b ESDIRK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_DIRK_2` | Use ARKStep's default second-order DIRK method | - | | (ARKODE_SDIRK_2_1_2). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_DIRK_3` | Use ARKStep's default third-order DIRK method | - | | (ARKODE_ARK324L2SA_DIRK_4_2_3). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_DIRK_4` | Use ARKStep's default fourth-order DIRK method | - | | (ARKODE_SDIRK_5_3_4). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_DIRK_5` | Use ARKStep's default fifth-order DIRK method | - | | (ARKODE_ARK548L2SA_DIRK_8_4_5). | - +---------------------------------------------+-----------------------------------------------------------+ - | | - +---------------------------------------------+-----------------------------------------------------------+ - | **ImEx Butcher table specification** | - +---------------------------------------------+-----------------------------------------------------------+ - | ARKODE_ARK324L2SA_ERK_4_2_3 & | Use the :index:`ARK-4-2-3 ARK method`. | - | ARKODE_ARK324L2SA_DIRK_4_2_3 | | - +---------------------------------------------+-----------------------------------------------------------+ - | ARKODE_ARK436L2SA_ERK_6_3_4 & | Use the :index:`ARK-6-3-4 ARK method`. | - | ARKODE_ARK436L2SA_DIRK_6_3_4 | | - +---------------------------------------------+-----------------------------------------------------------+ - | ARKODE_ARK437L2SA_ERK_7_3_4 & | Use the :index:`ARK-7-3-4 ARK method`. | - | ARKODE_ARK437L2SA_DIRK_7_3_4 | | - +---------------------------------------------+-----------------------------------------------------------+ - | ARKODE_ARK548L2SA_ERK_8_4_5 & | Use the :index:`ARK-8-4-5 ARK method`. | - | ARKODE_ARK548L2SA_DIRK_8_4_5 | | - +---------------------------------------------+-----------------------------------------------------------+ - | ARKODE_ARK548L2SAb_ERK_8_4_5 & | Use the :index:`ARK-8-4-5b ARK method`. | - | ARKODE_ARK548L2SAb_DIRK_8_4_5 | | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ARK_ETABLE_3` & | Use ARKStep's default third-order ARK method | - | :index:`ARKSTEP_DEFAULT_ARK_ITABLE_3` | (ARKODE_ARK324L2SA_ERK_4_2_3 and | - | | ARKODE_ARK324L2SA_DIRK_4_2_3). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ARK_ETABLE_4` & | Use ARKStep's default fourth-order ARK method | - | :index:`ARKSTEP_DEFAULT_ARK_ITABLE_4` | (ARKODE_ARK436L2SA_ERK_6_3_4 and | - | | ARKODE_ARK436L2SA_DIRK_6_3_4). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKSTEP_DEFAULT_ARK_ETABLE_5` & | Use ARKStep's default fifth-order ARK method | - | :index:`ARKSTEP_DEFAULT_ARK_ITABLE_5` | (ARKODE_ARK548L2SA_ERK_8_4_5 and | - | | ARKODE_ARK548L2SA_DIRK_8_4_5). | - +---------------------------------------------+-----------------------------------------------------------+ - | | - +---------------------------------------------+-----------------------------------------------------------+ - | **MRI method types** | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_EXPLICIT` | Use an explicit (at the slow time scale) MRI method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_IMPLICIT` | Use an implicit (at the slow time scale) MRI method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_IMEX` | Use an ImEx (at the slow time scale) MRI method. | - +---------------------------------------------+-----------------------------------------------------------+ - | | - +---------------------------------------------+-----------------------------------------------------------+ - | **MRI coupling table specification** | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_MIS_MW3` | Use the Knoth-Wolke-3 MIS method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_MRI_GARK_ERK33a` | Use the ERK33a MRI-GARK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_MRI_GARK_ERK45a` | Use the ERK45a MRI-GARK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_MRI_GARK_IRK21a` | Use the IRK21a MRI-GARK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_MRI_GARK_ESDIRK34a` | Use the ESDIRK34a MRI-GARK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_MRI_GARK_ESDIRK46a` | Use the ESDIRK46a MRI-GARK method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_IMEX_MRI_GARK3a` | Use the IMEX-MRI-GARK3a method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_IMEX_MRI_GARK3b` | Use the IMEX-MRI-GARK3b method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`ARKODE_IMEX_MRI_GARK4` | Use the IMEX-MRI-GARK4 method. | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_DEFAULT_EXPL_TABLE_3` | Use MRIStep's default 3rd-order explicit method | - | | (MIS_MW3). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_DEFAULT_EXPL_TABLE_4` | Use MRIStep's default 4th-order explicit method | - | | (MRI_GARK_ERK45a). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_DEFAULT_IMPL_SD_TABLE_2` | Use MRIStep's default 2nd-order solve-decoupled implicit | - | | method (MRI_GARK_IRK21a). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_DEFAULT_IMPL_SD_TABLE_3` | Use MRIStep's default 3rd-order solve-decoupled implicit | - | | method (MRI_GARK_ESDIRK34a). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_DEFAULT_IMPL_SD_TABLE_4` | Use MRIStep's default 4th-order solve-decoupled implicit | - | | method (MRI_GARK_ESDIRK46a). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_DEFAULT_IMEX_SD_TABLE_3` | Use MRIStep's default 3rd-order solve-decoupled ImEx | - | | method (IMEX_MRI_GARK3b). | - +---------------------------------------------+-----------------------------------------------------------+ - | :index:`MRISTEP_DEFAULT_IMEX_SD_TABLE_4` | Use MRIStep's default 4th-order solve-decoupled ImEx | - | | method (IMEX_MRI_GARK4). | - +---------------------------------------------+-----------------------------------------------------------+ - + +--------------------------------------------------+------------------------------------------------------------+ + | **Shared input constants** | | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_NORMAL` | Solver should return at a specified output time. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_ONE_STEP` | Solver should return after each successful step. | + +--------------------------------------------------+------------------------------------------------------------+ + | | | + +--------------------------------------------------+------------------------------------------------------------+ + | **Full right-hand side evaluation constants** | | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_FULLRHS_START` | Calling the full right-hand side function at the | + | | start of the integration. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_FULLRHS_END` | Calling the full right-hand side function at the end of | + | | a step. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_FULLRHS_OTHER` | Calling the full right-hand side function at the some | + | | other point e.g., for dense output. | + +--------------------------------------------------+------------------------------------------------------------+ + | | | + +--------------------------------------------------+------------------------------------------------------------+ + | **Interpolation module input constants** | | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_INTERP_HERMITE` | Specifies use of the Hermite polynomial interpolation | + | | module (for non-stiff problems). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_INTERP_LAGRANGE` | Specifies use of the Lagrange polynomial interpolation | + | | module (for stiff problems). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_INTERP_MAX_DEGREE` | Maximum possible interpolating polynomial degree. | + +--------------------------------------------------+------------------------------------------------------------+ + | | | + +--------------------------------------------------+------------------------------------------------------------+ + | **Explicit Butcher table specification** | | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_HEUN_EULER_2_1_2` | Use the Heun-Euler-2-1-2 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_BOGACKI_SHAMPINE_4_2_3` | Use the Bogacki-Shampine-4-2-3 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK324L2SA_ERK_4_2_3` | Use the ARK-4-2-3 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ZONNEVELD_5_3_4` | Use the Zonneveld-5-3-4 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK436L2SA_ERK_6_3_4` | Use the ARK-6-3-4 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_SAYFY_ABURUB_6_3_4` | Use the Sayfy-Aburub-6-3-4 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_CASH_KARP_6_4_5` | Use the Cash-Karp-6-4-5 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_FEHLBERG_6_4_5` | Use the Fehlberg-6-4-5 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_DORMAND_PRINCE_7_4_5` | Use the Dormand-Prince-7-4-5 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK548L2SA_ERK_8_4_5` | Use the ARK-8-4-5 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_VERNER_8_5_6` | Use the Verner-8-5-6 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_FEHLBERG_13_7_8` | Use the Fehlberg-13-7-8 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_KNOTH_WOLKE_3_3` | Use the Knoth-Wolke-3-3 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK437L2SA_ERK_7_3_4` | Use the ARK-7-3-4 ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK548L2SAb_ERK_8_4_5` | Use the ARK-8-4-5b ERK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ERK_2` | Use ARKStep's default second-order ERK method | + | | (ARKODE_HEUN_EULER_2_1_2). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ERK_3` | Use ARKStep's default third-order ERK method | + | | (ARKODE_BOGACKI_SHAMPINE_4_2_3). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ERK_4` | Use ARKStep's default fourth-order ERK method | + | | (ARKODE_ZONNEVELD_5_3_4). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ERK_5` | Use ARKStep's default fifth-order ERK method | + | | (ARKODE_CASH_KARP_6_4_5). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ERK_6` | Use ARKStep's default sixth-order ERK method | + | | (ARKODE_VERNER_8_5_6). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ERK_8` | Use ARKStep's default eighth-order ERK method | + | | (ARKODE_FEHLBERG_13_7_8). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ERKSTEP_DEFAULT_2` | Use ERKStep's default second-order ERK method | + | | (ARKODE_HEUN_EULER_2_1_2). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ERKSTEP_DEFAULT_3` | Use ERKStep's default third-order ERK method | + | | (ARKODE_BOGACKI_SHAMPINE_4_2_3). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ERKSTEP_DEFAULT_4` | Use ERKStep's default fourth-order ERK method | + | | (ARKODE_ZONNEVELD_5_3_4). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ERKSTEP_DEFAULT_5` | Use ERKStep's default fifth-order ERK method | + | | (ARKODE_CASH_KARP_6_4_5). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ERKSTEP_DEFAULT_6` | Use ERKStep's default sixth-order ERK method | + | | (ARKODE_VERNER_8_5_6). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ERKSTEP_DEFAULT_8` | Use ERKStep's default eighth-order ERK method | + | | (ARKODE_FEHLBERG_13_7_8). | + +--------------------------------------------------+------------------------------------------------------------+ + | | | + +--------------------------------------------------+------------------------------------------------------------+ + | **Implicit Butcher table specification** | | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_SDIRK_2_1_2` | Use the SDIRK-2-1-2 SDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_BILLINGTON_3_3_2` | Use the Billington-3-3-2 SDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_TRBDF2_3_3_2` | Use the TRBDF2-3-3-2 ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_KVAERNO_4_2_3` | Use the Kvaerno-4-2-3 ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK324L2SA_DIRK_4_2_3` | Use the ARK-4-2-3 ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_CASH_5_2_4` | Use the Cash-5-2-4 SDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_CASH_5_3_4` | Use the Cash-5-3-4 SDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_SDIRK_5_3_4` | Use the SDIRK-5-3-4 SDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_KVAERNO_5_3_4` | Use the Kvaerno-5-3-4 ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK436L2SA_DIRK_6_3_4` | Use the ARK-6-3-4 ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_KVAERNO_7_4_5` | Use the Kvaerno-7-4-5 ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK548L2SA_DIRK_8_4_5` | Use the ARK-8-4-5 ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK437L2SA_DIRK_7_3_4` | Use the ARK-7-3-4 ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ARK548L2SAb_DIRK_8_4_5` | Use the ARK-8-4-5b ESDIRK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_DIRK_2` | Use ARKStep's default second-order DIRK method | + | | (ARKODE_SDIRK_2_1_2). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_DIRK_3` | Use ARKStep's default third-order DIRK method | + | | (ARKODE_ARK324L2SA_DIRK_4_2_3). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_DIRK_4` | Use ARKStep's default fourth-order DIRK method | + | | (ARKODE_SDIRK_5_3_4). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_DIRK_5` | Use ARKStep's default fifth-order DIRK method | + | | (ARKODE_ARK548L2SA_DIRK_8_4_5). | + +--------------------------------------------------+------------------------------------------------------------+ + | | | + +--------------------------------------------------+------------------------------------------------------------+ + | **ImEx Butcher table specification** | | + +--------------------------------------------------+------------------------------------------------------------+ + | ARKODE_ARK324L2SA_ERK_4_2_3 & | Use the :index:`ARK-4-2-3 ARK method`. | + | ARKODE_ARK324L2SA_DIRK_4_2_3 | | + +--------------------------------------------------+------------------------------------------------------------+ + | ARKODE_ARK436L2SA_ERK_6_3_4 & | Use the :index:`ARK-6-3-4 ARK method`. | + | ARKODE_ARK436L2SA_DIRK_6_3_4 | | + +--------------------------------------------------+------------------------------------------------------------+ + | ARKODE_ARK437L2SA_ERK_7_3_4 & | Use the :index:`ARK-7-3-4 ARK method`. | + | ARKODE_ARK437L2SA_DIRK_7_3_4 | | + +--------------------------------------------------+------------------------------------------------------------+ + | ARKODE_ARK548L2SA_ERK_8_4_5 & | Use the :index:`ARK-8-4-5 ARK method`. | + | ARKODE_ARK548L2SA_DIRK_8_4_5 | | + +--------------------------------------------------+------------------------------------------------------------+ + | ARKODE_ARK548L2SAb_ERK_8_4_5 & | Use the :index:`ARK-8-4-5b ARK method`. | + | ARKODE_ARK548L2SAb_DIRK_8_4_5 | | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ARK_ETABLE_3` & | Use ARKStep's default third-order ARK method | + | :index:`ARKSTEP_DEFAULT_ARK_ITABLE_3` | (ARKODE_ARK324L2SA_ERK_4_2_3 and | + | | ARKODE_ARK324L2SA_DIRK_4_2_3). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ARK_ETABLE_4` & | Use ARKStep's default fourth-order ARK method | + | :index:`ARKSTEP_DEFAULT_ARK_ITABLE_4` | (ARKODE_ARK436L2SA_ERK_6_3_4 and | + | | ARKODE_ARK436L2SA_DIRK_6_3_4). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ARK_ETABLE_5` & | Use ARKStep's default fifth-order ARK method | + | :index:`ARKSTEP_DEFAULT_ARK_ITABLE_5` | (ARKODE_ARK548L2SA_ERK_8_4_5 and | + | | ARKODE_ARK548L2SA_DIRK_8_4_5). | + +--------------------------------------------------+------------------------------------------------------------+ + | | | + +--------------------------------------------------+------------------------------------------------------------+ + | **MRI method types** | | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_EXPLICIT` | Use an explicit (at the slow time scale) MRI method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_IMPLICIT` | Use an implicit (at the slow time scale) MRI method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_IMEX` | Use an ImEx (at the slow time scale) MRI method. | + +--------------------------------------------------+------------------------------------------------------------+ + | | | + +--------------------------------------------------+------------------------------------------------------------+ + | **MRI coupling table specification** | | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_MIS_MW3` | Use the Knoth-Wolke-3 MIS method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_MRI_GARK_ERK33a` | Use the ERK33a MRI-GARK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_MRI_GARK_ERK45a` | Use the ERK45a MRI-GARK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_MRI_GARK_IRK21a` | Use the IRK21a MRI-GARK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_MRI_GARK_ESDIRK34a` | Use the ESDIRK34a MRI-GARK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_MRI_GARK_ESDIRK46a` | Use the ESDIRK46a MRI-GARK method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_IMEX_MRI_GARK3a` | Use the IMEX-MRI-GARK3a method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_IMEX_MRI_GARK3b` | Use the IMEX-MRI-GARK3b method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_IMEX_MRI_GARK4` | Use the IMEX-MRI-GARK4 method. | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_DEFAULT_EXPL_TABLE_3` | Use MRIStep's default 3rd-order explicit method | + | | (MIS_MW3). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_DEFAULT_EXPL_TABLE_4` | Use MRIStep's default 4th-order explicit method | + | | (MRI_GARK_ERK45a). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_DEFAULT_IMPL_SD_TABLE_2` | Use MRIStep's default 2nd-order solve-decoupled implicit | + | | method (MRI_GARK_IRK21a). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_DEFAULT_IMPL_SD_TABLE_3` | Use MRIStep's default 3rd-order solve-decoupled implicit | + | | method (MRI_GARK_ESDIRK34a). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_DEFAULT_IMPL_SD_TABLE_4` | Use MRIStep's default 4th-order solve-decoupled implicit | + | | method (MRI_GARK_ESDIRK46a). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_DEFAULT_IMEX_SD_TABLE_3` | Use MRIStep's default 3rd-order solve-decoupled ImEx | + | | method (IMEX_MRI_GARK3b). | + +--------------------------------------------------+------------------------------------------------------------+ + | :index:`MRISTEP_DEFAULT_IMEX_SD_TABLE_4` | Use MRIStep's default 4th-order solve-decoupled ImEx | + | | method (IMEX_MRI_GARK4). | + +--------------------------------------------------+------------------------------------------------------------+ + | **Symplectic Method storage specification** | | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_EULER_1_1` | Symplectic Euler 1st order method with 1 stage. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_LEAPFROG_2_2` | Symplectic Leapfrog 2nd order method with 2 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2` | Symplectic Pseudo Leapfrog 2nd order method with 2 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_RUTH_3_3` | Symplectic Ruth 3rd order method with 3 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_2_2` | Symplectic McLachlan 2nd order method with 2 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_3_3` | Symplectic McLachlan 3rd order method with 3 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4` | Symplectic Candy-Rozmus 4th order method with 4 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_4_4` | Symplectic McLachlan 4th order method with 4 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_5_6` | Symplectic McLachlan 5th order method with 6 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_YOSHIDA_6_8` | Symplectic Yoshida 6th order method with 8 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_8_16` | Symplectic McLachlan 8th order method with 16 stages. | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:macro:`ARKODE_SYMPLECTIC_SOFRONIOU_10_36` | Symplectic Sofroniou 10th order method with 36 stages. | + +--------------------------------------------------+------------------------------------------------------------+ .. _ARKODE.Constants.out_constants: From a9dc3d50b5fffd6093c95ba4b1ca4e94a7afaa5c Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 16 Jun 2023 15:59:00 -0700 Subject: [PATCH 070/177] clean up plotting scripts --- examples/arkode/C_serial/ark_kepler.c | 307 ++++++++++++++---- examples/arkode/C_serial/ark_kepler_plot.py | 38 +-- .../C_serial/ark_kepler_plot_compare.py | 119 ------- .../C_serial/ark_kepler_plot_order_work.py | 200 ------------ .../C_serial/ark_kepler_test_convergence.sh | 29 +- .../C_serial/ark_kepler_work_precision.py | 68 ---- .../ark_kepler_work_precision_comp.py | 70 ---- 7 files changed, 275 insertions(+), 556 deletions(-) delete mode 100755 examples/arkode/C_serial/ark_kepler_plot_compare.py delete mode 100755 examples/arkode/C_serial/ark_kepler_plot_order_work.py delete mode 100755 examples/arkode/C_serial/ark_kepler_work_precision.py delete mode 100755 examples/arkode/C_serial/ark_kepler_work_precision_comp.py diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index bbe9b0768f..0d8dcf72dc 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -40,9 +40,12 @@ * --step-mode should we use a fixed time-step or adaptive time-step (default fixed) * --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK) * --method which method to use (default ARKODE_SYMPLECTIC_MCLACHLAN_4_4) + * --use-compensated-sums turns on compensated summation in ARKODE where applicable * --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) * --tf the final time for the simulation (default 100) - * --use-compensated-sums turns on compensated summation in ARKODE where applicable + * --nout number of output times + * --find-roots turn on rootfinding + * --check-order compute the order of the method used and check if it is within range of the expected * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner @@ -67,30 +70,52 @@ #include #include "arkode/arkode.h" +#include "sundials/sundials_context.h" typedef struct { sunrealtype ecc; } * UserData; +typedef struct +{ + N_Vector sol; + sunrealtype energy_error; + int method_order; +} ProblemResult; + typedef struct { int step_mode; int stepper; + int num_output_times; int use_compsums; + int find_roots; + int check_order; sunrealtype dt; sunrealtype tf; const char* method_name; } ProgramArgs; -static int check_retval(void* returnvalue, const char* funcname, int opt); +/* Helper functions */ static int ParseArgs(int argc, char* argv[], ProgramArgs* args); +static void PrintArgs(ProgramArgs* args); static void PrintHelp(); +static int ComputeConvergence(int num_dt, sunrealtype* orders, + sunrealtype expected_order, sunrealtype a11, + sunrealtype a12, sunrealtype a21, sunrealtype a22, + sunrealtype b1, sunrealtype b2, + sunrealtype* ord_avg, sunrealtype* ord_max, + sunrealtype* ord_est); +static int check_retval(void* returnvalue, const char* funcname, int opt); +/* These functions do the interesting work that offer a good example of how to + * use SPRKStep */ +static int SolveProblem(ProgramArgs* args, ProblemResult* result, + SUNContext sunctx); static void InitialConditions(N_Vector y0, sunrealtype ecc); static sunrealtype Hamiltonian(N_Vector yvec); static sunrealtype AngularMomentum(N_Vector y); - static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); @@ -99,8 +124,147 @@ static int rootfn(sunrealtype t, N_Vector y, sunrealtype* gout, void* user_data) int main(int argc, char* argv[]) { ProgramArgs args; + ProblemResult result; + SUNContext sunctx = NULL; + int retval = 0; + + /* Create the SUNDIALS context object for this simulation */ + retval = SUNContext_Create(NULL, &sunctx); + if (check_retval(&retval, "SUNContext_Create", 1)) { return 1; } + + /* Parse the command line arguments */ + if (ParseArgs(argc, argv, &args)) { return 1; }; + + /* Allocate space for result variables */ + result.sol = N_VNew_Serial(4, sunctx); + + if (!args.check_order) + { + /* SolveProblem calls a stepper to evolve the problem to Tf */ + retval = SolveProblem(&args, &result, sunctx); + if (check_retval(&retval, "SolveProblem", 1)) { return 1; } + } + else + { + /* If we are checking the order of the method, then we solve with different + dt. Otherwise we solve once with the dt provided as a program argument. + */ + const int NUM_DT = 8; + sunrealtype acc_orders[NUM_DT]; + sunrealtype con_orders[NUM_DT]; + sunrealtype acc_errors[NUM_DT]; + sunrealtype con_errors[NUM_DT]; + int expected_order = 0; + N_Vector ref_sol = N_VClone(result.sol); + N_Vector error = N_VClone(result.sol); + + sunrealtype a11 = 0, a12 = 0, a21 = 0, a22 = 0; + sunrealtype b1 = 0, b2 = 0, b1e = 0, b2e = 0; + sunrealtype ord_max_acc = 0, ord_max_conv = 0, ord_avg = 0, ord_est = 0; + sunrealtype dts[NUM_DT] = {SUN_RCONST(1e-1), SUN_RCONST(5e-1), SUN_RCONST(1e-2), SUN_RCONST(5e-2), + SUN_RCONST(1e-3), SUN_RCONST(5e-3), SUN_RCONST(1e-4), SUN_RCONST(5e-4)}; + + /* Create a reference solution using ARKStep with a tiny time step */ + const int old_step_mode = args.step_mode; + const int old_stepper = args.stepper; + const char* old_method_name = args.method_name; + args.dt = SUN_RCONST(1e-5); + args.step_mode = 0; + args.stepper = 1; + args.method_name = "ARKODE_ARK548L2SAb_ERK_8_4_5"; + + /* SolveProblem calls a stepper to evolve the problem to Tf */ + retval = SolveProblem(&args, &result, sunctx); + if (check_retval(&retval, "SolveProblem", 1)) { return 1; } + + /* Store the reference solution */ + N_VScale(SUN_RCONST(1.0), result.sol, ref_sol); + + /* Restore the program args */ + args.step_mode = old_step_mode; + args.stepper = old_stepper; + args.method_name = old_method_name; + + /* Determine expected method order */ + expected_order = ARKodeSPRKMem_LoadByName(args.method_name)->q; + + /* Compute the error with various step sizes */ + for (int i = 0; i < NUM_DT; i++) + { + /* Set the dt to use for this solve */ + args.dt = dts[i]; + + /* SolveProblem calls a stepper to evolve the problem to Tf */ + retval = SolveProblem(&args, &result, sunctx); + if (check_retval(&retval, "SolveProblem", 1)) { return 1; } + + printf("\n"); + + /* Compute the error */ + N_VLinearSum(SUN_RCONST(1.0), result.sol, -SUN_RCONST(1.0), ref_sol, error); + acc_errors[i] = SUNRsqrt(N_VDotProd(error, error)) / + ((sunrealtype)N_VGetLength(error)); + con_errors[i] = SUNRabs(result.energy_error); + + a11 += 1; + a12 += log(dts[i]); + a21 += log(dts[i]); + a22 += (log(dts[i]) * log(dts[i])); + b1 += log(acc_errors[i]); + b2 += (log(acc_errors[i]) * log(dts[i])); + b1e += log(con_errors[i]); + b2e += (log(con_errors[i]) * log(dts[i])); + + if (i >= 1) + { + acc_orders[i - 1] = log(acc_errors[i] / acc_errors[i - 1]) / + log(dts[i] / dts[i - 1]); + con_orders[i - 1] = log(con_errors[i] / con_errors[i - 1]) / + log(dts[i] / dts[i - 1]); + } + } + + retval = ComputeConvergence(NUM_DT, acc_orders, expected_order, a11, a12, a21, + a22, b1, b2, &ord_avg, &ord_max_acc, &ord_est); + printf("Order of accuracy: expected = %d, max = %.4Lf, avg = %.4Lf, " + "overall = %.4Lf\n", + expected_order, (long double)ord_max_acc, (long double)ord_avg, + (long double)ord_est); + + retval = ComputeConvergence(NUM_DT, con_orders, expected_order, a11, a12, + a21, a22, b1e, b2e, &ord_avg, &ord_max_conv, + &ord_est); + + printf("Order of conservation: expected = %d, max = %.4Lf, avg = %.4Lf, " + "overall = %.4Lf\n", + expected_order, (long double)ord_max_conv, (long double)ord_avg, + (long double)ord_est); + + if (ord_max_acc < (expected_order - RCONST(0.5))) + { + printf(">>> FAILURE: computed order of accuracy is below expected (%d)\n", + expected_order); + return 1; + } + + if (ord_max_conv < (expected_order - RCONST(0.5))) + { + printf(">>> FAILURE: computed order of conservation is below expected " + "(%d)\n", + expected_order); + return 1; + } + } + + N_VDestroy(result.sol); + SUNContext_Free(&sunctx); + + return 0; +} + +int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) +{ void* arkode_mem = NULL; - SUNContext sunctx = NULL; N_Vector y = NULL; SUNNonlinearSolver NLS = NULL; UserData udata = NULL; @@ -116,31 +280,27 @@ int main(int argc, char* argv[]) int iout = 0; int retval = 0; - /* CLI args */ - if (ParseArgs(argc, argv, &args)) { return 1; }; - const int step_mode = args.step_mode; - const int stepper = args.stepper; - const char* method_name = args.method_name; - const int use_compsums = args.use_compsums; - const sunrealtype dt = args.dt; - sunrealtype Tf = args.tf; + const int find_roots = args->find_roots; + const int step_mode = args->step_mode; + const int stepper = args->stepper; + const int use_compsums = args->use_compsums; + const int num_output_times = args->num_output_times; + const char* method_name = args->method_name; + const sunrealtype dt = args->dt; + sunrealtype Tf = args->tf; /* Default problem parameters */ - const sunrealtype T0 = SUN_RCONST(0.0); - const sunrealtype ecc = SUN_RCONST(0.6); - const sunrealtype dTout = 10 * dt; // SUN_RCONST(1.); - const int num_output_times = (int)ceil(Tf / dTout); + const sunrealtype T0 = SUN_RCONST(0.0); + const sunrealtype dTout = (Tf - T0) / ((sunrealtype)num_output_times); + const sunrealtype ecc = SUN_RCONST(0.6); printf("\n Begin Kepler Problem\n\n"); + PrintArgs(args); /* Allocate and fill udata structure */ udata = (UserData)malloc(sizeof(*udata)); udata->ecc = ecc; - /* Create the SUNDIALS context object for this simulation */ - retval = SUNContext_Create(NULL, &sunctx); - if (check_retval(&retval, "SUNContext_Create", 1)) return 1; - /* Allocate our state vector */ y = N_VNew_Serial(4, sunctx); @@ -153,8 +313,11 @@ int main(int argc, char* argv[]) arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); /* Optional: enable temporal root-finding */ - SPRKStepRootInit(arkode_mem, 1, rootfn); - if (check_retval(&retval, "SPRKStepRootInit", 1)) return 1; + if (find_roots) + { + SPRKStepRootInit(arkode_mem, 1, rootfn); + if (check_retval(&retval, "SPRKStepRootInit", 1)) return 1; + } retval = SPRKStepSetMethodName(arkode_mem, method_name); if (check_retval(&retval, "SPRKStepSetMethodName", 1)) return 1; @@ -187,13 +350,16 @@ int main(int argc, char* argv[]) retval = ARKStepSetTableName(arkode_mem, "ARKODE_DIRK_NONE", method_name); if (check_retval(&retval, "ARKStepSetTableName", 1)) return 1; - ARKStepRootInit(arkode_mem, 1, rootfn); - if (check_retval(&retval, "ARKStepRootInit", 1)) return 1; + if (find_roots) + { + ARKStepRootInit(arkode_mem, 1, rootfn); + if (check_retval(&retval, "ARKStepRootInit", 1)) return 1; + } retval = ARKStepSetUserData(arkode_mem, (void*)udata); if (check_retval(&retval, "ARKStepSetUserData", 1)) return 1; - retval = ARKStepSetMaxNumSteps(arkode_mem, 1000000); + retval = ARKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt)) + 1); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; if (step_mode == 0) { retval = ARKStepSetFixedStep(arkode_mem, dt); } @@ -339,6 +505,10 @@ int main(int argc, char* argv[]) } } + /* Copy results */ + N_VScale(SUN_RCONST(1.0), y, result->sol); + result->energy_error = Hamiltonian(y) - H0; + free(udata); fclose(times_fp); fclose(conserved_fp); @@ -356,8 +526,6 @@ int main(int argc, char* argv[]) ARKStepFree(&arkode_mem); } - SUNContext_Free(&sunctx); - return 0; } @@ -454,42 +622,37 @@ int rootfn(sunrealtype t, N_Vector yvec, sunrealtype* gout, void* user_data) return 0; } -/* Functions needed to implement the step density integrating controller - proposed by Hairer and Soderlind in https://doi.org/10.1137/04060699. */ - -sunrealtype G(N_Vector yvec, sunrealtype alpha) +int ComputeConvergence(int num_dt, sunrealtype* orders, + sunrealtype expected_order, sunrealtype a11, + sunrealtype a12, sunrealtype a21, sunrealtype a22, + sunrealtype b1, sunrealtype b2, sunrealtype* ord_avg, + sunrealtype* ord_max, sunrealtype* ord_est) { - sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype q1 = y[0]; - const sunrealtype q2 = y[1]; - const sunrealtype p1 = y[2]; - const sunrealtype p2 = y[3]; - - const sunrealtype pTq = p1 * q1 + p2 * q2; - const sunrealtype qTq = q1 * q1 + q2 * q2; - - return (-alpha * pTq / qTq); -} - -sunrealtype Q(N_Vector yvec, sunrealtype alpha) -{ - sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype q1 = y[0]; - const sunrealtype q2 = y[1]; - - const sunrealtype qTq = q1 * q1 + q2 * q2; - - return SUNRpowerR(qTq, alpha / SUN_RCONST(2.0)); + /* Compute/print overall estimated convergence rate */ + sunrealtype det = 0; + *ord_avg = 0, *ord_max = 0, *ord_est = 0; + for (int i = 1; i < num_dt; i++) + { + *ord_avg += orders[i - 1]; + *ord_max = SUNMAX(*ord_max, orders[i - 1]); + } + *ord_avg = *ord_avg / ((realtype)num_dt - 1); + det = a11 * a22 - a12 * a21; + *ord_est = (a11 * b2 - a21 * b1) / det; + return 0; } int ParseArgs(int argc, char* argv[], ProgramArgs* args) { - args->step_mode = 0; - args->stepper = 0; - args->method_name = NULL; - args->use_compsums = 0; - args->dt = SUN_RCONST(1e-2); - args->tf = SUN_RCONST(100.); + args->step_mode = 0; + args->stepper = 0; + args->method_name = NULL; + args->find_roots = 0; + args->use_compsums = 0; + args->dt = SUN_RCONST(1e-2); + args->tf = SUN_RCONST(100.); + args->check_order = 0; + args->num_output_times = 1000; for (int argi = 1; argi < argc; argi++) { @@ -530,10 +693,17 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) argi++; args->tf = atof(argv[argi]); } + else if (!strcmp(argv[argi], "--nout")) + { + argi++; + args->num_output_times = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--find-roots")) { args->find_roots = 1; } else if (!strcmp(argv[argi], "--use-compensated-sums")) { args->use_compsums = 1; } + else if (!strcmp(argv[argi], "--check-order")) { args->check_order = 1; } else if (!strcmp(argv[argi], "--help")) { PrintHelp(); @@ -562,6 +732,17 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) return 0; } +void PrintArgs(ProgramArgs* args) +{ + fprintf(stdout, "Problem Arguments:\n"); + fprintf(stdout, " stepper: %d\n", args->stepper); + fprintf(stdout, " step mode: %d\n", args->step_mode); + fprintf(stdout, " use compensated sums: %d\n", args->use_compsums); + fprintf(stdout, " dt: %Lg\n", (long double)args->dt); + fprintf(stdout, " Tf: %Lg\n", (long double)args->tf); + fprintf(stdout, " nout: %d\n\n", args->num_output_times); +} + void PrintHelp() { fprintf(stderr, "ark_kepler: an ARKODE example demonstrating the SPRKStep " @@ -573,14 +754,20 @@ void PrintHelp() "with an ERK method (default SPRK)\n"); fprintf(stderr, " --method which method to use (default " "ARKODE_SYMPLECTIC_MCLACHLAN_4_4)\n"); + fprintf(stderr, + " --use-compensated-sums turns on compensated summation in " + "ARKODE where applicable\n"); fprintf(stderr, " --dt the fixed-time step size to " "use if fixed " "time stepping is turned on (default 0.01)\n"); fprintf(stderr, " --tf the final time for the " "simulation (default 100)\n"); + fprintf(stderr, " --nout the number of output times " + "(default 100)\n"); + fprintf(stderr, " --find-roots turns on rootfinding\n"); fprintf(stderr, - " --use-compensated-sums turns on compensated summation in " - "ARKODE where applicable\n"); + " --check-order compute the order of the method used " + "and check if it is within range of the expected\n"); } /* Check function return value... diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index abbd4d6ddf..2873c23abe 100755 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -17,9 +17,17 @@ import numpy as np import matplotlib.pyplot as plt +import argparse -t = np.loadtxt('ark_kepler_times_sprk-4-dt-5.00e-02.txt', dtype=np.float64) -y = np.loadtxt('ark_kepler_solution_sprk-4-dt-5.00e-02.txt', dtype=np.float64) +parser = argparse.ArgumentParser(description='Script for plotting the energy, angular momentum, and phase space solution for ark_kepler.c') +parser.add_argument('output_times', help='file with the output times') +parser.add_argument('solution', help='file with the solution') +parser.add_argument('conserved_quantities', help='file with conserved quantities') + +args = parser.parse_args() + +t = np.loadtxt(args.output_times, dtype=np.float64) +y = np.loadtxt(args.solution, dtype=np.float64) y = np.reshape(y, (y.shape[0]//4, 4)) plt.figure(dpi=200) @@ -27,7 +35,7 @@ plt.savefig('ark_kepler_phase.png') plt.close() -conserved = np.loadtxt('ark_kepler_conserved_sprk-4-dt-5.00e-02.txt', delimiter=',', dtype=np.float64) +conserved = np.loadtxt(args.conserved_quantities, delimiter=',', dtype=np.float64) energy = conserved[:,0] energy_0 = conserved[0,0] L = conserved[:,1] @@ -51,30 +59,6 @@ plt.savefig('ark_kepler_momentum.png') plt.close() -plt.figure(dpi=200) -plt.title('Error in Energy, Momentum') -plt.plot(t, np.abs(energy-energy_0)) -plt.plot(t, np.abs(L-L_0)) -plt.ylabel('Error') -plt.xlabel('<--- t --->') -plt.xscale('log') -plt.yscale('log') -plt.legend([r'$|H(t,p,q)-H(t_0,p_0,q_0)|$', r'$|L(t,p,q)-L(t_0,p_0,q_0)|$']) -plt.savefig('ark_kepler_error_energy_momentum.png') -plt.close() - -# Step history -hhist = np.loadtxt('ark_kepler_hhist_sprk-4-dt-5.00e-02.txt', delimiter=',', dtype=np.float64) -plt.figure(dpi=200) -plt.title('Step Size History and Control Error') -plt.plot(t[:-1], hhist[:,0]) -plt.plot(t[:-1], hhist[:,1]) -plt.xlabel('<--- t --->') -plt.legend(['step size', 'control error']) -plt.yscale('log') -plt.savefig('ark_kepler_control.png') -plt.close() - # # Time plot. # diff --git a/examples/arkode/C_serial/ark_kepler_plot_compare.py b/examples/arkode/C_serial/ark_kepler_plot_compare.py deleted file mode 100755 index f8a2c4b6a5..0000000000 --- a/examples/arkode/C_serial/ark_kepler_plot_compare.py +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python - -import numpy as np -import matplotlib.pyplot as plt - -def load_results(case): - t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) - y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) - y = np.reshape(y, (y.shape[0]//4, 4)) - conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) - return t, y, conserved - -# sprk1 = load_results('_sprk-1') -# sprk2 = load_results('_sprk-2') -# sprk3 = load_results('_sprk-3') -sprk4 = load_results('_sprkinc-4-dt-1.00e-01') -# sprk5 = load_results('_sprk-5') -# erk2 = load_results('_erk-2') -# erk3 = load_results('_erk-3') -erk4 = load_results('_sprk-4-dt-1.00e-01') -# erk5 = load_results('_erk-8') - -all_to_compare = [] -# all_to_compare.append(sprk1) -# all_to_compare.append(sprk2) -# all_to_compare.append(sprk3) -all_to_compare.append(sprk4) -# all_to_compare.append(sprk5) -# all_to_compare.append(erk2) -# all_to_compare.append(erk3) -all_to_compare.append(erk4) -# all_to_compare.append(erk5) -# all_to_compare.append(sprkinc1) -# all_to_compare.append(sprkinc2) -# all_to_compare.append(sprkinc3) - -legend = [] -legend.append(r'$O(h^4)$ SPRK error in E') -legend.append(r'$O(h^4)$ ERK error in E') -legend.append(r'$O(h^4)$ SPRK error in L') -legend.append(r'$O(h^4)$ ERK error in L') - -h = 0.01 -t = erk4[0] - -energy = [] -energy_0 = [] -for _, sol, consv in all_to_compare: - energy.append(consv[:,0]) - energy_0.append(consv[0,0]) -energy = np.array(energy) -energy_0 = np.array(energy_0) -energy_diff = np.abs(energy.T - energy_0) - -momentum = [] -momentum_0 = [] -for _, _, consv in all_to_compare: - momentum.append(consv[:,1]) - momentum_0.append(consv[0,1]) -momentum = np.array(momentum) -momentum_0 = np.array(momentum_0) -momentum_diff = np.abs(momentum.T - momentum_0) - -plt.figure(dpi=200) -plt.title('Error in Momentum') -# plt.plot(t, np.abs(energy_diff)) -plt.plot(t, np.abs(momentum_diff)) -plt.ylabel('Error') -plt.xlabel('<--- t --->') -plt.xscale('log') -plt.yscale('log') -plt.legend(legend) -plt.savefig('ark_kepler_error_energy_momentum_comparison.png') -plt.close() - -# _, sol1, _ = sprk1 -# _, sol2, _ = sprkinc1 -# phase_diff = np.abs(sol1 - sol2) -# print(phase_diff) - -# plt.figure(dpi=200) -# plt.title('Error in Phase, h = %g' % h) -# plt.plot(t, momentum_diff) -# plt.ylabel('| error |') -# plt.xlabel('t') -# plt.yscale('log') -# plt.legend(legend) -# plt.savefig('ark_kepler_phase_compare.png') - -# # -# # Time plot. -# # -# plt.figure(dpi=200) -# for _, y, _ in all_to_compare: -# plt.plot(t, y[:,0], linewidth = 2) -# plt.plot(t, y[:,1], linewidth = 2) -# plt.plot(t, y[:,2], linewidth = 2) -# plt.plot(t, y[:,3], linewidth = 2) -# plt.legend(legend) -# plt.grid(True) -# plt.xlabel('<--- t --->') -# plt.ylabel('<--- y(1:4) --->') -# plt.title('ark_kepler: Solution in Time') -# plt.savefig('ark_kepler_solution_compare.png') -# plt.close() - -# # -# # Phase plot. -# # -# plt.figure(dpi=200) -# for _, y, _ in all_to_compare: -# plt.plot(y[:,0], y[:,1], linewidth = 2) -# plt.legend(legend) -# plt.grid(True) -# plt.xlabel('<--- y1 --->') -# plt.ylabel('<--- y2 --->') -# plt.title('ark_kepler: Phase Plot') -# plt.savefig('ark_kepler_phase_compare.png') -# plt.close() diff --git a/examples/arkode/C_serial/ark_kepler_plot_order_work.py b/examples/arkode/C_serial/ark_kepler_plot_order_work.py deleted file mode 100755 index 9e2d923bce..0000000000 --- a/examples/arkode/C_serial/ark_kepler_plot_order_work.py +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env python - -import numpy as np -import matplotlib.pyplot as plt - -def load_results(case): - t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) - y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) - y = np.reshape(y, (y.shape[0]//4, 4)) - conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) - return t, y, conserved - -sprk1 = [] # Euler -sprk2 = [] # Leapforg -sprk22 = [] # Pseudo Leapfrog -sprk222 = [] # McLachlan 2nd order -sprk3 = [] # Ruth 3rd order -sprk33 = [] # McLachlan 3rd order -sprk4 = [] # Candy Rozmus 4th order -sprk44 = [] # McLachlan 4th order -sprk5 = [] # McLachlan 5th order -sprk6 = [] # Yoshida 6th order -sprk8 = [] # McLachlan 8th order -sprk10 = [] # Sofroniou 10th order - -# step_sizes = [0.000010, 0.000100, 0.001000, 0.010000, 0.100000] -step_sizes = [0.000100, 0.001000, 0.010000, 0.100000, 0.500000] -for dt in step_sizes: - sprk1.append({ - 'method': 'Symplectic Euler', - 'order': 1, - 'data': load_results('_sprk-1-dt-%.6f' % dt), - 'dt': dt - }) - sprk2.append({ - 'method': 'Leapfrog', - 'order': 2, - 'data': load_results('_sprk-2-dt-%.6f' % dt), - 'dt': dt - }) - sprk22.append({ - 'method': 'Pseudo Leapfrog', - 'order': 2, - 'data': load_results('_sprk-22-dt-%.6f' % dt), - 'dt': dt - }) - sprk222.append({ - 'method': 'McLachlan2', - 'order': 2, - 'data': load_results('_sprk-222-dt-%.6f' % dt), - 'dt': dt - }) - sprk3.append({ - 'method': 'Ruth3', - 'order': 3, - 'data': load_results('_sprk-3-dt-%.6f' % dt), - 'dt': dt - }) - sprk33.append({ - 'method': 'McLachlan3', - 'order': 3, - 'data': load_results('_sprk-33-dt-%.6f' % dt), - 'dt': dt - }) - sprk4.append({ - 'method': 'CandyRozmus4', - 'order': 4, - 'data': load_results('_sprk-4-dt-%.6f' % dt), - 'dt': dt - }) - sprk44.append({ - 'method': 'McLachlan4', - 'order': 4, - 'data': load_results('_sprk-44-dt-%.6f' % dt), - 'dt': dt - }) - sprk5.append({ - 'method': 'McLachlan5', - 'order': 5, - 'data': load_results('_sprk-5-dt-%.6f' % dt), - 'dt': dt - }) - sprk6.append({ - 'method': 'Yoshida6', - 'order': 6, - 'data': load_results('_sprk-6-dt-%.6f' % dt), - 'dt': dt - }) - sprk8.append({ - 'method': 'McLachlan8', - 'order': 8, - 'data': load_results('_sprk-8-dt-%.6f' % dt), - 'dt': dt - }) - sprk10.append({ - 'method': 'Sofroniou10', - 'order': 10, - 'data': load_results('_sprk-10-dt-%.6f' % dt), - 'dt': dt - }) - -orders = [1, 2, 3, 4, 5, 6, 8, 10] -all_methods = {} -if 1 in orders: - all_methods[1] = [] - all_methods[1].append(sprk1) -if 2 in orders: - all_methods[2] = [] - all_methods[2].append(sprk2) - all_methods[2].append(sprk22) - all_methods[2].append(sprk222) -if 3 in orders: - all_methods[3] = [] - all_methods[3].append(sprk3) - all_methods[3].append(sprk33) -if 4 in orders: - all_methods[4] = [] - all_methods[4].append(sprk4) - all_methods[4].append(sprk44) -if 5 in orders: - all_methods[5] = [] - all_methods[5].append(sprk5) -if 6 in orders: - all_methods[6] = [] - all_methods[6].append(sprk6) -if 8 in orders: - all_methods[8] = [] - all_methods[8].append(sprk8) -if 10 in orders: - all_methods[10] = [] - all_methods[10].append(sprk10) - -# Reference solution -_, y_ref, _ = load_results('_sprk-10-dt-0.000100') - -# -# Solution error plot -# -for order in orders: - plt.figure(dpi=200) - legend = [] - legend.append('$O(h^{%d})$' % order) - order_line = np.power(step_sizes, order) - plt.plot(np.array(step_sizes), np.array(order_line).T, 'k--') - for method in all_methods[order]: - errs = [] - dts = [] - for d in method: - _, y, _ = d['data'] - err = np.linalg.norm(y - y_ref, 2) / np.linalg.norm(y_ref, 2) - print('method: %15s, dt = %.6f, err = %g' % (d['method'], d['dt'], err)) - if err >= 10.: - continue - else: - dts.append(d['dt']) - errs.append(err) - legend.append(method[0]['method']) - plt.plot(dts, errs) - plt.xscale('log') - plt.yscale('log') - plt.xlabel('h') - plt.ylabel('error') - plt.title('Order plot for $O(h^{%d})$ methods' % order) - plt.legend(legend) - plt.savefig('ark_kepler_sol_order%d.png' % order) - plt.close() - -# -# Energy error plot -# -for order in orders: - plt.figure(dpi=200) - legend = [] - legend.append('$O(h^{%d})$' % order) - order_line = np.power(step_sizes, order) - plt.plot(np.array(step_sizes), np.array(order_line).T, 'k--') - for method in all_methods[order]: - errs = [] - dts = [] - for d in method: - _, y, conserved = d['data'] - energy_0 = conserved[0,0] - energy = conserved[:,0] - err = np.linalg.norm(energy-energy_0, 2) - print('method: %15s, dt = %.6f, energy err = %g' % (d['method'], d['dt'], err)) - if err >= 10.: - continue - else: - dts.append(d['dt']) - errs.append(err) - legend.append(method[0]['method']) - plt.plot(dts, errs) - plt.xscale('log') - plt.yscale('log') - plt.xlabel('h') - plt.ylabel('error in energy') - plt.title('Order plot for $O(h^{%d})$ methods' % order) - plt.legend(legend) - plt.savefig('ark_kepler_energy_order%d.png' % order) - plt.close() diff --git a/examples/arkode/C_serial/ark_kepler_test_convergence.sh b/examples/arkode/C_serial/ark_kepler_test_convergence.sh index 73b17225cd..88aed1242a 100755 --- a/examples/arkode/C_serial/ark_kepler_test_convergence.sh +++ b/examples/arkode/C_serial/ark_kepler_test_convergence.sh @@ -1,18 +1,23 @@ #!/bin/bash -# generate reference solution - use 8th order ERK method with tiny timestep -./ark_kepler 1 0 8 0.000001 - -orders=(1 2 22 222 3 33 4 44 5 6 8 10) -dts=(0.5 0.1 0.01 0.001 0.0001) -for order in ${orders[@]}; +methods=( + ARKODE_SYMPLECTIC_EULER_1_1 + ARKODE_SYMPLECTIC_LEAPFROG_2_2 + ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 + ARKODE_SYMPLECTIC_MCLACHLAN_2_2 + ARKODE_SYMPLECTIC_RUTH_3_3 + ARKODE_SYMPLECTIC_MCLACHLAN_3_3 + ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 + ARKODE_SYMPLECTIC_MCLACHLAN_4_4 + ARKODE_SYMPLECTIC_MCLACHLAN_5_6 + ARKODE_SYMPLECTIC_YOSHIDA_6_8 + ARKODE_SYMPLECTIC_MCLACHLAN_8_16 + ARKODE_SYMPLECTIC_SOFRONIOU_10_36 +) +for method in ${methods[@]}; do - for dt in ${dts[@]}; - do - # ./ark_kepler 0 0 $order $dt 0 # no compensated sums - ./ark_kepler 0 0 $order $dt 1 # compensated sums - done + ./ark_kepler --stepper SPRK --step-mode fixed --method $method --tf 50 --check-order --nout 1 done # plot -./ark_kepler_plot_order_work.py +# ./ark_kepler_plot_order_work.py diff --git a/examples/arkode/C_serial/ark_kepler_work_precision.py b/examples/arkode/C_serial/ark_kepler_work_precision.py deleted file mode 100755 index 05da1ac9ee..0000000000 --- a/examples/arkode/C_serial/ark_kepler_work_precision.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python - -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.lines as lines -import seaborn as sns - -def load_results(case): - t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) - y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) - y = np.reshape(y, (y.shape[0]//4, 4)) - conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) - return t, y, conserved - -def compute_energy_err(case): - _, sol, consv = case - energy = consv[:,0] - energy_0 = consv[0,0] - return np.max(np.abs(energy - energy_0)) - -def compute_momentum_err(case): - _, sol, consv = case - momentum = consv[:,1] - momentum_0 = consv[0,1] - return np.max(np.abs(momentum - momentum_0)) - -sprk = [] -erk = [] -# sprk.append((1000010909,load_results('_sprk-1-dt-1.00e-05'))) -# sprk.append((100006814, load_results('_sprk-1-dt-1.00e-04'))) -# sprk.append((10004035, load_results('_sprk-1-dt-1.00e-03'))) -# sprk.append((1003175, load_results('_sprk-1-dt-1.00e-02'))) -# sprk.append((200010444,load_results('_sprk-2-dt-1.00e-04'))) -# sprk.append((20004886, load_results('_sprk-2-dt-1.00e-03'))) -# sprk.append((2003183, load_results('_sprk-2-dt-1.00e-02'))) -# sprk.append((203098, load_results('_sprk-2-dt-1.00e-01'))) -sprk.append((400017704,load_results('_sprk-4-dt-1.00e-04'))) -sprk.append((40006588, load_results('_sprk-4-dt-1.00e-03'))) -sprk.append((4003184, load_results('_sprk-4-dt-1.00e-02'))) -sprk.append((403163, load_results('_sprk-4-dt-1.00e-01'))) -erk.append((581420890, load_results('_erk-4-dt-1.00e-16'))) -erk.append((58012802, load_results('_erk-4-dt-1.00e-12'))) -erk.append((5823147, load_results('_erk-4-dt-1.00e-08'))) -erk.append((633933, load_results('_erk-4-dt-1.00e-04'))) - -legend = [] -legend.append(r'$O(h^4) ERK$') -legend.append(r'$O(h^4) SPRK$') - -blue_star = lines.Line2D([], [], color='blue', marker='*', linestyle='None', - markersize=10, label='Blue stars') -red_square = lines.Line2D([], [], color='red', marker='s', linestyle='None', - markersize=10, label='Red squares') - -plt.figure(dpi=200) -plt.title('Work vs Precision') -for work, method in erk: - plt.scatter(compute_energy_err(method), work, color='b', marker='*', label=r'$O(h^4) ERK$') - # plt.scatter(compute_momentum_err(method), work, color='b', marker='o', label=r'$O(h^4) ERK$') -for work, method in sprk: - plt.scatter(compute_energy_err(method), work, color='r', marker='s', label=r'$O(h^4) SPRK$') - # plt.scatter(compute_momentum_err(method), work, color='r', marker='^', label=r'$O(h^4) SPRK$') -plt.xscale('log') -plt.yscale('log') -plt.ylabel('Number of function evals.') -plt.xlabel('Error in Energy') -plt.legend(labels=legend, handles=[blue_star, red_square]) -plt.savefig('ark_kepler_work_precision.png') diff --git a/examples/arkode/C_serial/ark_kepler_work_precision_comp.py b/examples/arkode/C_serial/ark_kepler_work_precision_comp.py deleted file mode 100755 index 934a539b74..0000000000 --- a/examples/arkode/C_serial/ark_kepler_work_precision_comp.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python - -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.lines as lines -import seaborn as sns - -def load_results(case): - t = np.loadtxt('ark_kepler_times' + case + '.txt', dtype=np.float64) - y = np.loadtxt('ark_kepler_solution' + case + '.txt', dtype=np.float64) - y = np.reshape(y, (y.shape[0]//4, 4)) - conserved = np.loadtxt('ark_kepler_conserved' + case + '.txt', delimiter=',', dtype=np.float64) - return t, y, conserved - -def compute_energy_err(case): - _, sol, consv = case - energy = consv[:,0] - energy_0 = consv[0,0] - return np.max(np.abs(energy - energy_0)) - -def compute_momentum_err(case): - _, sol, consv = case - momentum = consv[:,1] - momentum_0 = consv[0,1] - return np.max(np.abs(momentum - momentum_0)) - -sprk = [] -sprkinc = [] -sprk.append((105.695, load_results('_sprk-6-dt-1.00e-03'))) -sprk.append((12.773, load_results('_sprk-6-dt-1.00e-02'))) -sprk.append((3.706, load_results('_sprk-6-dt-1.00e-01'))) -sprk.append((66.015, load_results('_sprk-4-dt-1.00e-03'))) -sprk.append((6.772, load_results('_sprk-4-dt-1.00e-02'))) -sprk.append((3.646, load_results('_sprk-4-dt-1.00e-01'))) -sprk.append((45.116, load_results('_sprk-2-dt-1.00e-03'))) -sprk.append((6.707, load_results('_sprk-2-dt-1.00e-02'))) -sprk.append((3.439, load_results('_sprk-2-dt-1.00e-01'))) -sprkinc.append((137.000, load_results('_sprkinc-6-dt-1.00e-03'))) -sprkinc.append((15.720, load_results('_sprkinc-6-dt-1.00e-02'))) -sprkinc.append((4.165, load_results('_sprkinc-6-dt-1.00e-01'))) -sprkinc.append((84.957, load_results('_sprkinc-4-dt-1.00e-03'))) -sprkinc.append((10.859, load_results('_sprkinc-4-dt-1.00e-02'))) -sprkinc.append((3.597, load_results('_sprkinc-4-dt-1.00e-01'))) -sprkinc.append((59.029, load_results('_sprkinc-2-dt-1.00e-03'))) -sprkinc.append((8.100, load_results('_sprkinc-2-dt-1.00e-02'))) -sprkinc.append((3.514, load_results('_sprkinc-2-dt-1.00e-01'))) - -legend = [] -legend.append(r'$O(h^4)$ SPRK Compensated') -legend.append(r'$O(h^4) SPRK$') - -blue_star = lines.Line2D([], [], color='blue', marker='*', linestyle='None', - markersize=10, label='Blue stars') -red_square = lines.Line2D([], [], color='red', marker='s', linestyle='None', - markersize=10, label='Red squares') - -plt.figure(dpi=200) -plt.title('Work vs Precision') -for work, method in sprkinc: - plt.scatter(compute_energy_err(method), work, color='b', marker='*', label=r'$O(h^4) sprkinc$') - # plt.scatter(compute_momentum_err(method), work, color='b', marker='o', label=r'$O(h^4) sprkinc$') -for work, method in sprk: - plt.scatter(compute_energy_err(method), work, color='r', marker='s', label=r'$O(h^4) SPRK$') - # plt.scatter(compute_momentum_err(method), work, color='r', marker='^', label=r'$O(h^4) SPRK$') -plt.xscale('log') -plt.yscale('log') -plt.ylabel('Number of function evals.') -plt.xlabel('Error in Energy') -plt.legend(labels=legend, handles=[blue_star, red_square]) -plt.savefig('ark_kepler_work_precision.png') From c9e0f5361d9cdd75ff8d2678be0a575e2c418675 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 16 Jun 2023 16:28:09 -0700 Subject: [PATCH 071/177] update cmake to test order --- examples/arkode/C_serial/CMakeLists.txt | 15 +++++++++++++-- .../C_serial/ark_kepler_test_convergence.sh | 3 --- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 3dd701307b..ad7bff1fd5 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -38,7 +38,19 @@ set(ARKODE_examples "ark_heat1D_adapt\;\;develop" "ark_heat1D\;\;develop" "ark_hookes_law\;\;develop" - "ark_kepler\;\;develop" + "ark_kepler\;\;" + "ark_kepler\;--stepper ERK --step-mode adapt\;develop" + "ark_kepler\;--stepper ERK --step-mode fixed --find-roots\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --find-roots\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_EULER_1_1 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_2_2 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_RUTH_3_3 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_3_3 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_4_4 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_5_6 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_YOSHIDA_6_8 --tf 50 --check-order --nout 1\;develop" "ark_kpr_mri\;\;develop" "ark_kpr_mri\;0 0.002\;develop" "ark_kpr_mri\;1 0.002\;develop" @@ -81,7 +93,6 @@ set(ARKODE_examples_SUPERLUMT # Auxiliary files to install set(ARKODE_extras ark_kepler_plot.py - ark_kepler_order.py plot_brusselator1D.py plot_brusselator1D_FEM.py plot_heat1D.py diff --git a/examples/arkode/C_serial/ark_kepler_test_convergence.sh b/examples/arkode/C_serial/ark_kepler_test_convergence.sh index 88aed1242a..4aafe2fe51 100755 --- a/examples/arkode/C_serial/ark_kepler_test_convergence.sh +++ b/examples/arkode/C_serial/ark_kepler_test_convergence.sh @@ -18,6 +18,3 @@ for method in ${methods[@]}; do ./ark_kepler --stepper SPRK --step-mode fixed --method $method --tf 50 --check-order --nout 1 done - -# plot -# ./ark_kepler_plot_order_work.py From 7b7929315b98d0bdee2fcd3c9ec3a8f756ad218a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sat, 17 Jun 2023 16:07:13 -0700 Subject: [PATCH 072/177] update answers module to point to staging --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 96d6e170c1..de7bce4c8f 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 96d6e170c15f997d1e9062d4e6478e618d3f30ca +Subproject commit de7bce4c8fd3e6247a5bb7b89186e45d37bfe163 From 82fd037d9e9a7d1b95321c7ec311c55c96a51911 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sat, 17 Jun 2023 16:55:24 -0700 Subject: [PATCH 073/177] clean up order check --- examples/arkode/C_serial/ark_kepler.c | 45 ++++++++++++++++----------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 0d8dcf72dc..3b13eaaa75 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -146,29 +146,35 @@ int main(int argc, char* argv[]) } else { - /* If we are checking the order of the method, then we solve with different - dt. Otherwise we solve once with the dt provided as a program argument. - */ + /* Compute the order of accuracy of the method by testing + it with different step sizes. */ const int NUM_DT = 8; sunrealtype acc_orders[NUM_DT]; sunrealtype con_orders[NUM_DT]; sunrealtype acc_errors[NUM_DT]; sunrealtype con_errors[NUM_DT]; - int expected_order = 0; + int expected_order = ARKodeSPRKMem_LoadByName(args.method_name)->q; N_Vector ref_sol = N_VClone(result.sol); N_Vector error = N_VClone(result.sol); - sunrealtype a11 = 0, a12 = 0, a21 = 0, a22 = 0; sunrealtype b1 = 0, b2 = 0, b1e = 0, b2e = 0; sunrealtype ord_max_acc = 0, ord_max_conv = 0, ord_avg = 0, ord_est = 0; - sunrealtype dts[NUM_DT] = {SUN_RCONST(1e-1), SUN_RCONST(5e-1), SUN_RCONST(1e-2), SUN_RCONST(5e-2), - SUN_RCONST(1e-3), SUN_RCONST(5e-3), SUN_RCONST(1e-4), SUN_RCONST(5e-4)}; - - /* Create a reference solution using ARKStep with a tiny time step */ + sunrealtype refine = SUN_RCONST(.5); + sunrealtype dt = (expected_order >= 3) ? SUN_RCONST(1e-1) : SUN_RCONST(1e-3); + sunrealtype dts[NUM_DT] = {dt, + dt * refine, + dt * refine * refine, + dt * pow(refine, 3), + dt * pow(refine, 4), + dt * pow(refine, 5), + dt * pow(refine, 6), + dt * pow(refine, 7)}; + + /* Create a reference solution using 8th order ERK with a small time step */ const int old_step_mode = args.step_mode; const int old_stepper = args.stepper; const char* old_method_name = args.method_name; - args.dt = SUN_RCONST(1e-5); + args.dt = SUN_RCONST(1e-3); args.step_mode = 0; args.stepper = 1; args.method_name = "ARKODE_ARK548L2SAb_ERK_8_4_5"; @@ -185,9 +191,6 @@ int main(int argc, char* argv[]) args.stepper = old_stepper; args.method_name = old_method_name; - /* Determine expected method order */ - expected_order = ARKodeSPRKMem_LoadByName(args.method_name)->q; - /* Compute the error with various step sizes */ for (int i = 0; i < NUM_DT; i++) { @@ -224,33 +227,37 @@ int main(int argc, char* argv[]) } } + /* Compute the order of accuracy */ retval = ComputeConvergence(NUM_DT, acc_orders, expected_order, a11, a12, a21, a22, b1, b2, &ord_avg, &ord_max_acc, &ord_est); - printf("Order of accuracy: expected = %d, max = %.4Lf, avg = %.4Lf, " + printf("Order of accuracy wrt solution: expected = %d, max = %.4Lf, avg " + "= %.4Lf, " "overall = %.4Lf\n", expected_order, (long double)ord_max_acc, (long double)ord_avg, (long double)ord_est); + /* Comptue the order of accuracy with respect to conserving */ retval = ComputeConvergence(NUM_DT, con_orders, expected_order, a11, a12, a21, a22, b1e, b2e, &ord_avg, &ord_max_conv, &ord_est); - printf("Order of conservation: expected = %d, max = %.4Lf, avg = %.4Lf, " - "overall = %.4Lf\n", + printf("Order of accuracy wrt Hamiltonian: expected = %d, max = %.4Lf, " + "avg = %.4Lf, overall = %.4Lf\n", expected_order, (long double)ord_max_conv, (long double)ord_avg, (long double)ord_est); if (ord_max_acc < (expected_order - RCONST(0.5))) { - printf(">>> FAILURE: computed order of accuracy is below expected (%d)\n", + printf(">>> FAILURE: computed order of accuracy wrt solution is below " + "expected (%d)\n", expected_order); return 1; } if (ord_max_conv < (expected_order - RCONST(0.5))) { - printf(">>> FAILURE: computed order of conservation is below expected " - "(%d)\n", + printf(">>> FAILURE: computed order of accuracy wrt Hamiltonian is below " + "expected (%d)\n", expected_order); return 1; } From 8f2e4b37ae3d9ce31affe71d3fe34d372c0bdda5 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sun, 18 Jun 2023 00:08:50 -0700 Subject: [PATCH 074/177] further updates --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 12 +- doc/arkode/guide/source/Butcher.rst | 24 +- examples/arkode/C_serial/CMakeLists.txt | 4 +- ...hookes_law.c => ark_harmonic_symplectic.c} | 247 ++- examples/arkode/C_serial/ark_hookes_law.out | 28 - examples/arkode/C_serial/ark_kepler.c | 9 +- examples/arkode/C_serial/ark_kepler.out | 1655 ----------------- include/arkode/arkode_sprk.h | 21 +- include/arkode/arkode_sprkstep.h | 6 +- src/arkode/arkode_sprk.c | 38 +- src/arkode/arkode_sprkstep.c | 36 +- src/arkode/arkode_sprkstep_io.c | 13 +- 12 files changed, 248 insertions(+), 1845 deletions(-) rename examples/arkode/C_serial/{ark_hookes_law.c => ark_harmonic_symplectic.c} (51%) delete mode 100644 examples/arkode/C_serial/ark_hookes_law.out delete mode 100644 examples/arkode/C_serial/ark_kepler.out diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 5eb5553f67..c130bf93b9 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -123,21 +123,21 @@ ARKodeSPRKStorage functions +----------------------------------------------+------------------------------------------------------------+ -.. c:function:: ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages) +.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage__Alloc(int stages) Allocate memory for the ARKodeSPRKStorage structure. :param stages: The number of stages. :return: Pointer to the allocated ARKodeSPRKStorage structure. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) +.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage__Load(ARKODE_SPRKMethodID id) Load the ARKodeSPRKStorage structure for the specified method ID. :param id: The ID of the SPRK method. One of :ref:`SPRKStorage.id`. :return: Pointer to the loaded ARKodeSPRKStorage structure. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKMem_LoadByName(const char* method) +.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage__LoadByName(const char* method) Load the ARKodeSPRKStorage structure for the specified method name. @@ -145,7 +145,7 @@ ARKodeSPRKStorage functions :return: Pointer to the loaded ARKodeSPRKStorage structure. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage B) +.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage__Copy(ARKodeSPRKStorage B) Create a copy of the ARKodeSPRKStorage structure. @@ -160,13 +160,13 @@ ARKodeSPRKStorage functions :param liw: Pointer to store the integer workspace size. :param lrw: Pointer to store the real workspace size. -.. c:function:: void ARKodeSPRKMem_Free(ARKodeSPRKStorage B) +.. c:function:: void ARKodeSPRKStorage__Free(ARKodeSPRKStorage B) Free the memory allocated for the ARKodeSPRKStorage structure. :param B: The ARKodeSPRKStorage structure to free. -.. c:function:: int ARKodeSPRKMem_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) +.. c:function:: int ARKodeSPRKStorage__ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) Convert the ARKodeSPRKStorage structure to the Butcher table representation. diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index df95179070..f378eb8f42 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1717,7 +1717,7 @@ ARKODE_SYMPLECTIC_EULER_1_1 .. index:: 1st-order symplectic Euler method Accessible via the constant ``ARKODE_SYMPLECTIC_EULER_1_1`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticEuler`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticEuler`. This is the classic Symplectic Euler method. @@ -1727,7 +1727,7 @@ ARKODE_SYMPLECTIC_LEAPFROG_2_2 .. index:: 2nd-order Leapfrog method Accessible via the constant ``ARKODE_SYMPLECTIC_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticLeapfrog2`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticLeapfrog2`. This is the classic Leapfrog/Verlet method. @@ -1737,7 +1737,7 @@ ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 .. index:: 2nd-order Pseudo Leapfrog method Accessible via the constant ``ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. This is the classic Pseudo Leapfrog/Verlet method. @@ -1747,7 +1747,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_2_2 .. index:: 2nd-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_2_2`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan2`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan2`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1757,7 +1757,7 @@ ARKODE_SYMPLECTIC_RUTH_3_3 .. index:: 3rd-order Ruth method Accessible via the constant ``ARKODE_SYMPLECTIC_RUTH_3_3`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticRuth3`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticRuth3`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. @@ -1767,7 +1767,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_3_3 .. index:: 3rd-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_3_3`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan3`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan3`. This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1777,7 +1777,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_4_4 .. index:: 4th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_4_4`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan4`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan4`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1787,7 +1787,7 @@ ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 .. index:: 4th-order Candy-Rozmus method Accessible via the constant ``ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. @@ -1797,7 +1797,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_5_6 .. index:: 5th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_5_6`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan5`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan5`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1807,7 +1807,7 @@ ARKODE_SYMPLECTIC_YOSHIDA_6_8 .. index:: 6th-order Yoshida method Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6_8`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticYoshida6`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticYoshida6`. This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. @@ -1817,7 +1817,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_8_16 .. index:: 8th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_8_16`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan8`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan8`. This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1827,5 +1827,5 @@ ARKODE_SYMPLECTIC_SOFRONIOU_10_36 .. index:: 10th-order Sofroniou method Accessible via the constant ``ARKODE_SYMPLECTIC_SOFRONIOU_10_36`` to -:c:func:`ARKodeSPRKMem_Load()` or by calling :c:func:`ARKodeSymplecticSofroniou10`. +:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticSofroniou10`. This is the 10th order method given by Sofroniou in :cite:p:`Sofroniou:05`. diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index ad7bff1fd5..9ad7fa69eb 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -35,10 +35,10 @@ set(ARKODE_examples "ark_brusselator1D_imexmri\;6 0.001\;exclude-single" "ark_brusselator1D_imexmri\;7 0.001\;exclude-single" "ark_brusselator1D\;\;exclude-single" + "ark_harmonic_symplectic\;\;" "ark_heat1D_adapt\;\;develop" "ark_heat1D\;\;develop" - "ark_hookes_law\;\;develop" - "ark_kepler\;\;" + "ark_kepler\;\;develop" "ark_kepler\;--stepper ERK --step-mode adapt\;develop" "ark_kepler\;--stepper ERK --step-mode fixed --find-roots\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --find-roots\;develop" diff --git a/examples/arkode/C_serial/ark_hookes_law.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c similarity index 51% rename from examples/arkode/C_serial/ark_hookes_law.c rename to examples/arkode/C_serial/ark_harmonic_symplectic.c index 055add542d..9a4154dabe 100644 --- a/examples/arkode/C_serial/ark_hookes_law.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -1,8 +1,9 @@ +/* clang-format: off */ /* ---------------------------------------------------------------------------- * Programmer(s): Cody J. Balos @ LLNL * ---------------------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security + * Copyright (c) 2002-2023, Lawrence Livermore National Security * and Southern Methodist University. * All rights reserved. * @@ -11,34 +12,38 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End * ---------------------------------------------------------------------------- - * This example considers the motion of a spring with an attached mass using - * the symplectic integrators available in SPRKStep. Our ODE model is, - * x'(t) = v - * v'(t) = -k/m x - * where k is the spring constant and m is the mass. For convenience we choose - * k = 8 and m = 1 and let omega = sqrt(k/m). We simulate the problem on - * t = [0, 0.1] with the initial conditions x(0) = 0.2, v(0) = 0. - * This problem setup has the exact solution - * x(t) = 0.2*cos(t*omega), - * v(t) = -0.2*omega*sin(t*omega). - * The potential energy, + * In this example we consider the simple harmonic oscillator + * x''(t) + omega^2*x(t) = 0. + * We rewrite the second order ODE as the first order ODE model + * x'(t) = v(t) + * v'(t) = -omega^2*x(t). + * With the initial conditions x(0) = alpha and v(0) = beta*omega, + * the analytical solution is + * x(t) = A*cos(t*omega - phi), + * v(t) = -A*omega*sin(t*omega - phi) + * where A = sqrt(alpha + beta) and tan(phi) = beta/alpha. + * The potential energy in this system is given by * U = 1/2*k*x^2 - * is conserved and is the Hamiltonian for the system. The symplectic methods - * in SPRKStep conserve U provided a sufficiently small time-step size is used. + * U is conserved and is the system Hamiltonian. + * We simulate the problem on t = [0, 2pi] using the symplectic methods + * in SPRKStep. Symplectic methods will approximately conserve U. * * The problem can be run like so: - * ./ark_hookes_law [order] [dt] [use_compsums] + * ./ark_harmonic_symplectic [order] [dt] [use_compsums] * * Order sets the order of the method to use, dt is the time step size, and * use_compsums turns on (1) or off (0) compensated summation inside SPRKStep. - * Compensated summation increases accuracy but at increased cost. + * Compensated summation increases accuracy but at increased computational + * and memory cost. * --------------------------------------------------------------------------*/ +/* clang-format: on */ #include #include /* prototypes for MRIStep fcts., consts */ #include #include /* serial N_Vector type, fcts., macros */ #include +#include #include /* def. math fcns, 'sunrealtype' */ #include #include @@ -49,72 +54,81 @@ typedef struct { - sunrealtype A, B, omega; -} * UserData; + sunrealtype A, phi, omega; +} UserData; -static int check_retval(void* returnvalue, const char* funcname, int opt); - -static void InitialConditions(N_Vector y0); -static sunrealtype Solution(sunrealtype t, N_Vector y, N_Vector solvec, - UserData udata); -static sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData udata); +typedef struct +{ + int order; + int num_output_times; + int use_compsums; + sunrealtype dt; +} ProgramArgs; +/* RHS functions */ static int Velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int Force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +/* Helper functions */ +static void InitialConditions(N_Vector y0); +static void Solution(sunrealtype t, N_Vector y, N_Vector solvec, UserData* udata); +static sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData* udata); +static int ParseArgs(int argc, char* argv[], ProgramArgs* args); +static void PrintHelp(); +static int check_retval(void* returnvalue, const char* funcname, int opt); + int main(int argc, char* argv[]) { - SUNContext sunctx; - N_Vector y, solution; - SUNNonlinearSolver NLS; + ProgramArgs args; UserData udata; - sunrealtype tout, tret; - void* arkode_mem; - int argi, iout, retval; - - NLS = NULL; - y = NULL; - solution = NULL; + SUNContext sunctx = NULL; + N_Vector y = NULL; + N_Vector solution = NULL; + SUNNonlinearSolver NLS = NULL; + sunrealtype* ydata = NULL; + sunrealtype tout = NAN; + sunrealtype tret = NAN; + sunrealtype err = NAN; + void* arkode_mem = NULL; + int iout = 0; + int retval = 0; + + /* Parse the command line arguments */ + if (ParseArgs(argc, argv, &args)) { return 1; }; + + /* Default integrator options */ + int order = args.order; + int use_compsums = args.use_compsums; + const int num_output_times = args.num_output_times; /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(0.1); - sunrealtype dt = SUN_RCONST(1e-4); - const sunrealtype A = SUN_RCONST(0.2); - const sunrealtype B = SUN_RCONST(0.0); - const sunrealtype omega = SUN_RCONST(64.0); - - /* Default integrator Options */ - int method = 0; - int order = 4; - int use_compsums = 1; - const sunrealtype dTout = SUN_RCONST(0.01); - const int num_output_times = (int)ceil(Tf / dTout); - - printf("\n Begin Hooke's Law Problem\n\n"); - - /* Parse CLI args */ - argi = 0; - if (argc > 1) { order = atoi(argv[++argi]); } - if (argc > 2) { dt = atof(argv[++argi]); } - if (argc > 3) { use_compsums = atoi(argv[++argi]); } - - /* Allocate and fill udata structure */ - udata = (UserData)malloc(sizeof(*udata)); - udata->A = A; - udata->B = B; - udata->omega = omega; + sunrealtype Tf = SUN_RCONST(2 * M_PI); + sunrealtype dt = SUN_RCONST(args.dt); + const sunrealtype omega = SUN_RCONST(16.0); + const sunrealtype alpha = SUN_RCONST(0.0); + const sunrealtype beta = SUN_RCONST(0.2); + const sunrealtype dTout = (Tf - T0) / ((sunrealtype)num_output_times); /* Create the SUNDIALS context object for this simulation */ retval = SUNContext_Create(NULL, &sunctx); if (check_retval(&retval, "SUNContext_Create", 1)) return 1; + printf("\n Begin simple harmonic oscillator problem\n\n"); + + /* Allocate and fill udata structure */ + udata.A = sqrt(alpha * alpha + beta * beta); + udata.phi = atan(beta / omega / alpha); + udata.omega = omega; + /* Allocate our state vector */ y = N_VNew_Serial(2, sunctx); solution = N_VClone(y); /* Fill the initial conditions */ - InitialConditions(y); + ydata = N_VGetArrayPointer(y); + ydata[0] = alpha; + ydata[1] = omega * beta; /* Create SPRKStep integrator */ arkode_mem = SPRKStepCreate(Force, Velocity, T0, y, sunctx); @@ -122,7 +136,7 @@ int main(int argc, char* argv[]) retval = SPRKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; - retval = SPRKStepSetUserData(arkode_mem, udata); + retval = SPRKStepSetUserData(arkode_mem, &udata); if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); @@ -137,16 +151,24 @@ int main(int argc, char* argv[]) /* Print out starting energy, momentum before integrating */ tret = T0; tout = T0 + dTout; - fprintf(stdout, "t = %.6Lf, energy = %.6Lf\n", tret, Energy(y, dt, udata)); + fprintf(stdout, "t = %.6Lf, sol. err = %.6Lf, energy = %.6Lf\n", tret, + SUN_RCONST(0.0), Energy(y, dt, &udata)); /* Do integration */ for (iout = 0; iout < num_output_times; iout++) { retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + /* Compute the anaytical solution */ + Solution(tret, y, solution, &udata); + + /* Compute error */ + N_VLinearSum(SUN_RCONST(1.0), y, -SUN_RCONST(1.0), solution, solution); + err = sqrt(N_VDotProd(solution, solution)); + /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, sol. err = %.6Lf, energy = %.6Lf\n", tret, - Solution(tret, y, solution, udata), Energy(y, dt, udata)); + fprintf(stdout, "t = %.6Lf, sol. err = %.6Lf, energy = %.6Lf\n", tret, err, + Energy(y, dt, &udata)); /* Check if the solve was successful, if so, update the time and continue */ @@ -162,7 +184,6 @@ int main(int argc, char* argv[]) } } - free(udata); N_VDestroy(y); fprintf(stdout, "\n"); SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); @@ -172,28 +193,16 @@ int main(int argc, char* argv[]) return 0; } -void InitialConditions(N_Vector y0vec) -{ - sunrealtype* y0 = N_VGetArrayPointer(y0vec); - y0[0] = SUN_RCONST(0.2); - y0[1] = SUN_RCONST(0.0); -} - -sunrealtype Solution(sunrealtype t, N_Vector y, N_Vector solvec, UserData udata) +void Solution(sunrealtype t, N_Vector y, N_Vector solvec, UserData* udata) { sunrealtype* sol = N_VGetArrayPointer(solvec); - /* compute error */ - sol[0] = SUN_RCONST(0.2) * cos(udata->omega * t); - sol[1] = -SUN_RCONST(0.2) * udata->omega * sin(udata->omega * t); - N_VLinearSum(SUN_RCONST(1.0), y, -SUN_RCONST(1.0), solvec, solvec); - sunrealtype err = N_VMaxNorm(solvec); - /* restore solution vec */ - sol[0] = SUN_RCONST(0.2) * cos(udata->omega * t); - sol[1] = -SUN_RCONST(0.2) * udata->omega * sin(udata->omega * t); - return err; + + /* compute solution */ + sol[0] = udata->A * cos(udata->omega * t - udata->phi); + sol[1] = -udata->A * udata->omega * sin(udata->omega * t - udata->phi); } -sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData udata) +sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData* udata) { sunrealtype H = 0.0; sunrealtype* y = N_VGetArrayPointer(yvec); @@ -218,7 +227,7 @@ int Velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int Force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - UserData udata = (UserData)user_data; + UserData* udata = (UserData*)user_data; sunrealtype* y = N_VGetArrayPointer(yvec); sunrealtype* ydot = N_VGetArrayPointer(ydotvec); const sunrealtype omega2 = udata->omega * udata->omega; @@ -228,6 +237,67 @@ int Force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) return 0; } +int ParseArgs(int argc, char* argv[], ProgramArgs* args) +{ + args->order = 4; + args->num_output_times = 1000; + args->use_compsums = 0; + args->dt = SUN_RCONST(1e-2); + + for (int argi = 1; argi < argc; argi++) + { + if (!strcmp(argv[argi], "--order")) + { + argi++; + args->order = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--dt")) + { + argi++; + args->dt = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--nout")) + { + argi++; + args->num_output_times = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--use-compensated-sums")) + { + args->use_compsums = 1; + } + else if (!strcmp(argv[argi], "--help")) + { + PrintHelp(); + return 1; + } + else + { + fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); + PrintHelp(); + return 1; + } + } + + return 0; +} + +void PrintHelp() +{ + fprintf(stderr, "ark_harmonic_symplectic: an ARKODE example demonstrating " + "the SPRKStep time-stepping module solving a simple harmonic " + "oscillator\n"); + fprintf(stderr, " --order the order of the method to " + "use (default 4)\n"); + fprintf(stderr, + " --dt the fixed-time step size to use " + "(default 0.01)\n"); + fprintf(stderr, " --nout the number of output times " + "(default 100)\n"); + fprintf(stderr, + " --use-compensated-sums turns on compensated summation in " + "ARKODE where applicable\n"); +} + /* Check function return value... opt == 0 means SUNDIALS function allocates memory so check if returned NULL pointer @@ -243,8 +313,7 @@ int check_retval(void* returnvalue, const char* funcname, int opt) /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ if (opt == 0 && returnvalue == NULL) { - fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed - returned NULL pointer\n\n", - funcname); + fprintf(stderr, "\nERROR: %s() failed - returned NULL pointer\n\n", funcname); return 1; } @@ -254,8 +323,8 @@ int check_retval(void* returnvalue, const char* funcname, int opt) retval = (int*)returnvalue; if (*retval < 0) { - fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed with retval = %d\n\n", - funcname, *retval); + fprintf(stderr, "\nERROR: %s() failed with retval = %d\n\n", funcname, + *retval); return 1; } } diff --git a/examples/arkode/C_serial/ark_hookes_law.out b/examples/arkode/C_serial/ark_hookes_law.out deleted file mode 100644 index 769ee9996c..0000000000 --- a/examples/arkode/C_serial/ark_hookes_law.out +++ /dev/null @@ -1,28 +0,0 @@ - - Begin Hooke's Law Problem - -t = 0.000000, energy = 81.920000 -t = 0.010000, sol. err = 0.000000, energy = 81.920000 -t = 0.020000, sol. err = 0.000000, energy = 81.920000 -t = 0.030000, sol. err = 0.000000, energy = 81.920000 -t = 0.040000, sol. err = 0.000000, energy = 81.920000 -t = 0.050000, sol. err = 0.000000, energy = 81.920000 -t = 0.060000, sol. err = 0.000000, energy = 81.920000 -t = 0.070000, sol. err = 0.000000, energy = 81.920000 -t = 0.080000, sol. err = 0.000000, energy = 81.920000 -t = 0.090000, sol. err = 0.000000, energy = 81.920000 -t = 0.100000, sol. err = 0.000000, energy = 81.920000 - -Current time = 0.099999999999999991673327315311326 -Steps = 1000 -Step attempts = 1000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00010000000000000000479217360238593 -Last step size = 0.00010000000000000000479217360238593 -Current step size = 0.00010000000000000000479217360238593 -f1 RHS fn evals = 4001 -f2 RHS fn evals = 4001 diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 3b13eaaa75..6f9f4a4bf9 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -153,14 +153,14 @@ int main(int argc, char* argv[]) sunrealtype con_orders[NUM_DT]; sunrealtype acc_errors[NUM_DT]; sunrealtype con_errors[NUM_DT]; - int expected_order = ARKodeSPRKMem_LoadByName(args.method_name)->q; + int expected_order = ARKodeSPRKStorage__LoadByName(args.method_name)->q; N_Vector ref_sol = N_VClone(result.sol); N_Vector error = N_VClone(result.sol); sunrealtype a11 = 0, a12 = 0, a21 = 0, a22 = 0; sunrealtype b1 = 0, b2 = 0, b1e = 0, b2e = 0; sunrealtype ord_max_acc = 0, ord_max_conv = 0, ord_avg = 0, ord_est = 0; sunrealtype refine = SUN_RCONST(.5); - sunrealtype dt = (expected_order >= 3) ? SUN_RCONST(1e-1) : SUN_RCONST(1e-3); + sunrealtype dt = (expected_order >= 3) ? SUN_RCONST(1e-1) : SUN_RCONST(1e-3); sunrealtype dts[NUM_DT] = {dt, dt * refine, dt * refine * refine, @@ -230,7 +230,8 @@ int main(int argc, char* argv[]) /* Compute the order of accuracy */ retval = ComputeConvergence(NUM_DT, acc_orders, expected_order, a11, a12, a21, a22, b1, b2, &ord_avg, &ord_max_acc, &ord_est); - printf("Order of accuracy wrt solution: expected = %d, max = %.4Lf, avg " + printf("Order of accuracy wrt solution: expected = %d, max = %.4Lf, " + "avg " "= %.4Lf, " "overall = %.4Lf\n", expected_order, (long double)ord_max_acc, (long double)ord_avg, @@ -548,8 +549,6 @@ void InitialConditions(N_Vector y0vec, sunrealtype ecc) y0[3] = SUNRsqrt((one + ecc) / (one - ecc)); } -void Solution(N_Vector yvec, UserData user_data) {} - sunrealtype Hamiltonian(N_Vector yvec) { sunrealtype H = 0.0; diff --git a/examples/arkode/C_serial/ark_kepler.out b/examples/arkode/C_serial/ark_kepler.out deleted file mode 100644 index 830aa7b6e1..0000000000 --- a/examples/arkode/C_serial/ark_kepler.out +++ /dev/null @@ -1,1655 +0,0 @@ - - Begin Kepler Problem - -Using symplectic Candy-Rozmus O(h^4) -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000, Q(p,q) = 3.9528470752104736 -t = 1.0000, H(p,q)-H0 = 0.0000002043466951, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf -ROOT RETURN: t = 1.0305 g[0] = -1, y[0] = -0.658625, y[1] = 0.798625 -t = 1.0305, H(p,q)-H0 = 0.0000002044177555, L(p,q)-L0 = 0.0000000000000415, Q(p,q)-Q0 = inf -t = 2.0000, H(p,q)-H0 = 0.0000002049421988, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf -t = 3.0000, H(p,q)-H0 = 0.0000002049738428, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf -t = 4.0000, H(p,q)-H0 = 0.0000002049594153, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf -t = 5.0000, H(p,q)-H0 = 0.0000002047443888, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf -t = 6.0000, H(p,q)-H0 = 0.0000001625046178, L(p,q)-L0 = 0.0000000000000020, Q(p,q)-Q0 = inf -ROOT RETURN: t = 6.1690 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 6.1690, H(p,q)-H0 = 0.0000000618955069, L(p,q)-L0 = 0.0000000000445040, Q(p,q)-Q0 = inf -t = 7.0000, H(p,q)-H0 = 0.0000002026654433, L(p,q)-L0 = 0.0000000000000024, Q(p,q)-Q0 = inf -ROOT RETURN: t = 7.3137 g[0] = -1, y[0] = -0.658625, y[1] = 0.798625 -t = 7.3137, H(p,q)-H0 = 0.0000002044244631, L(p,q)-L0 = 0.0000000000004792, Q(p,q)-Q0 = inf -t = 8.0000, H(p,q)-H0 = 0.0000002049074176, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf -t = 9.0000, H(p,q)-H0 = 0.0000002049711518, L(p,q)-L0 = 0.0000000000000017, Q(p,q)-Q0 = inf -t = 10.0000, H(p,q)-H0 = 0.0000002049683722, L(p,q)-L0 = 0.0000000000000012, Q(p,q)-Q0 = inf -t = 11.0000, H(p,q)-H0 = 0.0000002048742218, L(p,q)-L0 = 0.0000000000000008, Q(p,q)-Q0 = inf -t = 12.0000, H(p,q)-H0 = 0.0000001994568363, L(p,q)-L0 = -0.0000000000000016, Q(p,q)-Q0 = inf -ROOT RETURN: t = 12.4522 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 12.4522, H(p,q)-H0 = 0.0000000591528380, L(p,q)-L0 = 0.0000000003874632, Q(p,q)-Q0 = inf -t = 13.0000, H(p,q)-H0 = 0.0000001914521934, L(p,q)-L0 = -0.0000000000000020, Q(p,q)-Q0 = inf -ROOT RETURN: t = 13.5969 g[0] = -1, y[0] = -0.658626, y[1] = 0.798626 -t = 13.5969, H(p,q)-H0 = 0.0000002044091752, L(p,q)-L0 = 0.0000000000001069, Q(p,q)-Q0 = inf -t = 14.0000, H(p,q)-H0 = 0.0000002048287348, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf -t = 15.0000, H(p,q)-H0 = 0.0000002049648922, L(p,q)-L0 = -0.0000000000000019, Q(p,q)-Q0 = inf -t = 16.0000, H(p,q)-H0 = 0.0000002049727805, L(p,q)-L0 = -0.0000000000000014, Q(p,q)-Q0 = inf -t = 17.0000, H(p,q)-H0 = 0.0000002049269368, L(p,q)-L0 = -0.0000000000000021, Q(p,q)-Q0 = inf -t = 18.0000, H(p,q)-H0 = 0.0000002037784197, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf -ROOT RETURN: t = 18.7354 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 18.7354, H(p,q)-H0 = 0.0000000627550842, L(p,q)-L0 = 0.0000000003209815, Q(p,q)-Q0 = inf -t = 19.0000, H(p,q)-H0 = 0.0000000899039478, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf -ROOT RETURN: t = 19.8801 g[0] = -1, y[0] = -0.658627, y[1] = 0.798627 -t = 19.8801, H(p,q)-H0 = 0.0000002044174572, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf -t = 20.0000, H(p,q)-H0 = 0.0000002046163375, L(p,q)-L0 = -0.0000000000000019, Q(p,q)-Q0 = inf -t = 21.0000, H(p,q)-H0 = 0.0000002049527451, L(p,q)-L0 = -0.0000000000000019, Q(p,q)-Q0 = inf -t = 22.0000, H(p,q)-H0 = 0.0000002049741641, L(p,q)-L0 = -0.0000000000000016, Q(p,q)-Q0 = inf -t = 23.0000, H(p,q)-H0 = 0.0000002049516927, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf -t = 24.0000, H(p,q)-H0 = 0.0000002045933044, L(p,q)-L0 = -0.0000000000000016, Q(p,q)-Q0 = inf -t = 25.0000, H(p,q)-H0 = 0.0000000760000369, L(p,q)-L0 = -0.0000000000000009, Q(p,q)-Q0 = inf -ROOT RETURN: t = 25.0186 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 25.0186, H(p,q)-H0 = 0.0000000628120624, L(p,q)-L0 = 0.0000000000752147, Q(p,q)-Q0 = inf -t = 26.0000, H(p,q)-H0 = 0.0000002038713013, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf -ROOT RETURN: t = 26.1633 g[0] = -1, y[0] = -0.658628, y[1] = 0.798628 -t = 26.1633, H(p,q)-H0 = 0.0000002044256130, L(p,q)-L0 = 0.0000000000004819, Q(p,q)-Q0 = inf -t = 27.0000, H(p,q)-H0 = 0.0000002049290551, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf -t = 28.0000, H(p,q)-H0 = 0.0000002049729524, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf -t = 29.0000, H(p,q)-H0 = 0.0000002049643474, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf -t = 30.0000, H(p,q)-H0 = 0.0000002048210159, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf -t = 31.0000, H(p,q)-H0 = 0.0000001895989656, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf -ROOT RETURN: t = 31.3018 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 31.3018, H(p,q)-H0 = 0.0000000595519092, L(p,q)-L0 = 0.0000000003151657, Q(p,q)-Q0 = inf -t = 32.0000, H(p,q)-H0 = 0.0000002000320204, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf -ROOT RETURN: t = 32.4464 g[0] = -1, y[0] = -0.658628, y[1] = 0.798628 -t = 32.4464, H(p,q)-H0 = 0.0000002044101368, L(p,q)-L0 = 0.0000000000001533, Q(p,q)-Q0 = inf -t = 33.0000, H(p,q)-H0 = 0.0000002048789493, L(p,q)-L0 = 0.0000000000000003, Q(p,q)-Q0 = inf -t = 34.0000, H(p,q)-H0 = 0.0000002049687612, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf -t = 35.0000, H(p,q)-H0 = 0.0000002049708831, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf -t = 36.0000, H(p,q)-H0 = 0.0000002049042367, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf -t = 37.0000, H(p,q)-H0 = 0.0000002024354354, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf -ROOT RETURN: t = 37.5850 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 37.5850, H(p,q)-H0 = 0.0000000618555891, L(p,q)-L0 = 0.0000000003627523, Q(p,q)-Q0 = inf -t = 38.0000, H(p,q)-H0 = 0.0000001680057595, L(p,q)-L0 = -0.0000000000000014, Q(p,q)-Q0 = inf -ROOT RETURN: t = 38.7296 g[0] = -1, y[0] = -0.658629, y[1] = 0.798629 -t = 38.7296, H(p,q)-H0 = 0.0000002044176056, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf -t = 39.0000, H(p,q)-H0 = 0.0000002047568957, L(p,q)-L0 = 0.0000000000000006, Q(p,q)-Q0 = inf -t = 40.0000, H(p,q)-H0 = 0.0000002049601668, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf -t = 41.0000, H(p,q)-H0 = 0.0000002049737660, L(p,q)-L0 = 0.0000000000000006, Q(p,q)-Q0 = inf -t = 42.0000, H(p,q)-H0 = 0.0000002049406972, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf -t = 43.0000, H(p,q)-H0 = 0.0000002043005216, L(p,q)-L0 = 0.0000000000000006, Q(p,q)-Q0 = inf -ROOT RETURN: t = 43.8682 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 43.8682, H(p,q)-H0 = 0.0000000636672108, L(p,q)-L0 = 0.0000000001058789, Q(p,q)-Q0 = inf -t = 44.0000, H(p,q)-H0 = 0.0000000018859838, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf -t = 45.0000, H(p,q)-H0 = 0.0000002043890478, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf -ROOT RETURN: t = 45.0128 g[0] = -1, y[0] = -0.65863, y[1] = 0.79863 -t = 45.0128, H(p,q)-H0 = 0.0000002044259659, L(p,q)-L0 = 0.0000000000004636, Q(p,q)-Q0 = inf -t = 46.0000, H(p,q)-H0 = 0.0000002049436505, L(p,q)-L0 = 0.0000000000000016, Q(p,q)-Q0 = inf -t = 47.0000, H(p,q)-H0 = 0.0000002049739257, L(p,q)-L0 = 0.0000000000000029, Q(p,q)-Q0 = inf -t = 48.0000, H(p,q)-H0 = 0.0000002049586466, L(p,q)-L0 = 0.0000000000000028, Q(p,q)-Q0 = inf -t = 49.0000, H(p,q)-H0 = 0.0000002047310156, L(p,q)-L0 = 0.0000000000000028, Q(p,q)-Q0 = inf -t = 50.0000, H(p,q)-H0 = 0.0000001561815122, L(p,q)-L0 = 0.0000000000000022, Q(p,q)-Q0 = inf -ROOT RETURN: t = 50.1513 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 50.1513, H(p,q)-H0 = 0.0000000600768491, L(p,q)-L0 = 0.0000000002246490, Q(p,q)-Q0 = inf -t = 51.0000, H(p,q)-H0 = 0.0000002028707665, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf -ROOT RETURN: t = 51.2960 g[0] = -1, y[0] = -0.658631, y[1] = 0.798631 -t = 51.2960, H(p,q)-H0 = 0.0000002044118099, L(p,q)-L0 = 0.0000000000002085, Q(p,q)-Q0 = inf -t = 52.0000, H(p,q)-H0 = 0.0000002049104473, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf -t = 53.0000, H(p,q)-H0 = 0.0000002049714104, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf -t = 54.0000, H(p,q)-H0 = 0.0000002049679719, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf -t = 55.0000, H(p,q)-H0 = 0.0000002048692325, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf -t = 56.0000, H(p,q)-H0 = 0.0000001988013947, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf -ROOT RETURN: t = 56.4345 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 56.4345, H(p,q)-H0 = 0.0000000609620590, L(p,q)-L0 = 0.0000000004024047, Q(p,q)-Q0 = inf -t = 57.0000, H(p,q)-H0 = 0.0000001930576761, L(p,q)-L0 = -0.0000000000000007, Q(p,q)-Q0 = inf -ROOT RETURN: t = 57.5792 g[0] = -1, y[0] = -0.658632, y[1] = 0.798632 -t = 57.5792, H(p,q)-H0 = 0.0000002044162695, L(p,q)-L0 = 0.0000000000000028, Q(p,q)-Q0 = inf -t = 58.0000, H(p,q)-H0 = 0.0000002048360039, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf -t = 59.0000, H(p,q)-H0 = 0.0000002049654226, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf -t = 60.0000, H(p,q)-H0 = 0.0000002049726056, L(p,q)-L0 = 0.0000000000000019, Q(p,q)-Q0 = inf -t = 61.0000, H(p,q)-H0 = 0.0000002049247275, L(p,q)-L0 = 0.0000000000000029, Q(p,q)-Q0 = inf -t = 62.0000, H(p,q)-H0 = 0.0000002036757942, L(p,q)-L0 = 0.0000000000000033, Q(p,q)-Q0 = inf -ROOT RETURN: t = 62.7177 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 62.7177, H(p,q)-H0 = 0.0000000643121354, L(p,q)-L0 = 0.0000000001355760, Q(p,q)-Q0 = inf -t = 63.0000, H(p,q)-H0 = 0.0000001030286585, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf -ROOT RETURN: t = 63.8624 g[0] = -1, y[0] = -0.658632, y[1] = 0.798632 -t = 63.8624, H(p,q)-H0 = 0.0000002044254884, L(p,q)-L0 = 0.0000000000004233, Q(p,q)-Q0 = inf -t = 64.0000, H(p,q)-H0 = 0.0000002046376894, L(p,q)-L0 = 0.0000000000000021, Q(p,q)-Q0 = inf -t = 65.0000, H(p,q)-H0 = 0.0000002049537554, L(p,q)-L0 = 0.0000000000000017, Q(p,q)-Q0 = inf -t = 66.0000, H(p,q)-H0 = 0.0000002049741533, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf -t = 67.0000, H(p,q)-H0 = 0.0000002049505941, L(p,q)-L0 = 0.0000000000000011, Q(p,q)-Q0 = inf -t = 68.0000, H(p,q)-H0 = 0.0000002045684235, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf -t = 69.0000, H(p,q)-H0 = 0.0000000616601921, L(p,q)-L0 = -0.0000000000000007, Q(p,q)-Q0 = inf -ROOT RETURN: t = 69.0009 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 69.0009, H(p,q)-H0 = 0.0000000606041561, L(p,q)-L0 = 0.0000000001274141, Q(p,q)-Q0 = inf -t = 70.0000, H(p,q)-H0 = 0.0000002039554869, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf -ROOT RETURN: t = 70.1456 g[0] = -1, y[0] = -0.658633, y[1] = 0.798633 -t = 70.1456, H(p,q)-H0 = 0.0000002044140265, L(p,q)-L0 = 0.0000000000002658, Q(p,q)-Q0 = inf -t = 71.0000, H(p,q)-H0 = 0.0000002049310657, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf -t = 72.0000, H(p,q)-H0 = 0.0000002049730993, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf -t = 73.0000, H(p,q)-H0 = 0.0000002049637668, L(p,q)-L0 = -0.0000000000000024, Q(p,q)-Q0 = inf -t = 74.0000, H(p,q)-H0 = 0.0000002048127971, L(p,q)-L0 = -0.0000000000000022, Q(p,q)-Q0 = inf -t = 75.0000, H(p,q)-H0 = 0.0000001874573972, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf -ROOT RETURN: t = 75.2841 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 75.2841, H(p,q)-H0 = 0.0000000601599359, L(p,q)-L0 = 0.0000000004357263, Q(p,q)-Q0 = inf -t = 76.0000, H(p,q)-H0 = 0.0000002005377685, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf -ROOT RETURN: t = 76.4288 g[0] = -1, y[0] = -0.658634, y[1] = 0.798634 -t = 76.4288, H(p,q)-H0 = 0.0000002044142373, L(p,q)-L0 = 0.0000000000000037, Q(p,q)-Q0 = inf -t = 77.0000, H(p,q)-H0 = 0.0000002048834123, L(p,q)-L0 = -0.0000000000000039, Q(p,q)-Q0 = inf -t = 78.0000, H(p,q)-H0 = 0.0000002049691188, L(p,q)-L0 = -0.0000000000000043, Q(p,q)-Q0 = inf -t = 79.0000, H(p,q)-H0 = 0.0000002049705883, L(p,q)-L0 = -0.0000000000000037, Q(p,q)-Q0 = inf -t = 80.0000, H(p,q)-H0 = 0.0000002049008769, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -t = 81.0000, H(p,q)-H0 = 0.0000002021772509, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -ROOT RETURN: t = 81.5673 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 81.5673, H(p,q)-H0 = 0.0000000646622964, L(p,q)-L0 = 0.0000000001649986, Q(p,q)-Q0 = inf -t = 82.0000, H(p,q)-H0 = 0.0000001727780274, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf -ROOT RETURN: t = 82.7120 g[0] = -1, y[0] = -0.658635, y[1] = 0.798635 -t = 82.7120, H(p,q)-H0 = 0.0000002044242360, L(p,q)-L0 = 0.0000000000003475, Q(p,q)-Q0 = inf -t = 83.0000, H(p,q)-H0 = 0.0000002047685705, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf -t = 84.0000, H(p,q)-H0 = 0.0000002049608696, L(p,q)-L0 = -0.0000000000000038, Q(p,q)-Q0 = inf -t = 85.0000, H(p,q)-H0 = 0.0000002049736565, L(p,q)-L0 = -0.0000000000000039, Q(p,q)-Q0 = inf -t = 86.0000, H(p,q)-H0 = 0.0000002049391069, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -t = 87.0000, H(p,q)-H0 = 0.0000002042500727, L(p,q)-L0 = -0.0000000000000037, Q(p,q)-Q0 = inf -ROOT RETURN: t = 87.8505 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 87.8505, H(p,q)-H0 = 0.0000000609665067, L(p,q)-L0 = 0.0000000000428871, Q(p,q)-Q0 = inf -t = 88.0000, H(p,q)-H0 = 0.0000000073887751, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf -ROOT RETURN: t = 88.9952 g[0] = -1, y[0] = -0.658635, y[1] = 0.798635 -t = 88.9952, H(p,q)-H0 = 0.0000002044165731, L(p,q)-L0 = 0.0000000000003237, Q(p,q)-Q0 = inf -t = 89.0000, H(p,q)-H0 = 0.0000002044279248, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf -t = 90.0000, H(p,q)-H0 = 0.0000002049450250, L(p,q)-L0 = -0.0000000000000020, Q(p,q)-Q0 = inf -t = 91.0000, H(p,q)-H0 = 0.0000002049739793, L(p,q)-L0 = -0.0000000000000026, Q(p,q)-Q0 = inf -t = 92.0000, H(p,q)-H0 = 0.0000002049578287, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf -t = 93.0000, H(p,q)-H0 = 0.0000002047166712, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf -t = 94.0000, H(p,q)-H0 = 0.0000001489424117, L(p,q)-L0 = -0.0000000000000023, Q(p,q)-Q0 = inf -ROOT RETURN: t = 94.1337 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 94.1337, H(p,q)-H0 = 0.0000000595232956, L(p,q)-L0 = 0.0000000004577891, Q(p,q)-Q0 = inf -t = 95.0000, H(p,q)-H0 = 0.0000002030543977, L(p,q)-L0 = -0.0000000000000019, Q(p,q)-Q0 = inf -ROOT RETURN: t = 95.2784 g[0] = -1, y[0] = -0.658636, y[1] = 0.798636 -t = 95.2784, H(p,q)-H0 = 0.0000002044121415, L(p,q)-L0 = 0.0000000000000150, Q(p,q)-Q0 = inf -t = 96.0000, H(p,q)-H0 = 0.0000002049133234, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf -t = 97.0000, H(p,q)-H0 = 0.0000002049716499, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf -t = 98.0000, H(p,q)-H0 = 0.0000002049675457, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf -t = 99.0000, H(p,q)-H0 = 0.0000002048639480, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf -t = 100.0000, H(p,q)-H0 = 0.0000001980530047, L(p,q)-L0 = -0.0000000000000009, Q(p,q)-Q0 = inf -ROOT RETURN: t = 100.4169 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 100.4169, H(p,q)-H0 = 0.0000000646865441, L(p,q)-L0 = 0.0000000001955873, Q(p,q)-Q0 = inf -t = 101.0000, H(p,q)-H0 = 0.0000001944503385, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf -ROOT RETURN: t = 101.5615 g[0] = -1, y[0] = -0.658637, y[1] = 0.798637 -t = 101.5615, H(p,q)-H0 = 0.0000002044224177, L(p,q)-L0 = 0.0000000000002655, Q(p,q)-Q0 = inf -t = 102.0000, H(p,q)-H0 = 0.0000002048428450, L(p,q)-L0 = -0.0000000000000016, Q(p,q)-Q0 = inf -t = 103.0000, H(p,q)-H0 = 0.0000002049659237, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf -t = 104.0000, H(p,q)-H0 = 0.0000002049724101, L(p,q)-L0 = -0.0000000000000007, Q(p,q)-Q0 = inf -t = 105.0000, H(p,q)-H0 = 0.0000002049224005, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf -t = 106.0000, H(p,q)-H0 = 0.0000002035621856, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf -ROOT RETURN: t = 106.7000 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 106.7000, H(p,q)-H0 = 0.0000000609512092, L(p,q)-L0 = 0.0000000000004452, Q(p,q)-Q0 = inf -t = 107.0000, H(p,q)-H0 = 0.0000001151592957, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf -ROOT RETURN: t = 107.8447 g[0] = -1, y[0] = -0.658638, y[1] = 0.798638 -t = 107.8447, H(p,q)-H0 = 0.0000002044192116, L(p,q)-L0 = 0.0000000000003814, Q(p,q)-Q0 = inf -t = 108.0000, H(p,q)-H0 = 0.0000002046574967, L(p,q)-L0 = -0.0000000000000024, Q(p,q)-Q0 = inf -t = 109.0000, H(p,q)-H0 = 0.0000002049547190, L(p,q)-L0 = -0.0000000000000029, Q(p,q)-Q0 = inf -t = 110.0000, H(p,q)-H0 = 0.0000002049741274, L(p,q)-L0 = -0.0000000000000029, Q(p,q)-Q0 = inf -t = 111.0000, H(p,q)-H0 = 0.0000002049494448, L(p,q)-L0 = -0.0000000000000009, Q(p,q)-Q0 = inf -t = 112.0000, H(p,q)-H0 = 0.0000002045415152, L(p,q)-L0 = -0.0000000000000014, Q(p,q)-Q0 = inf -ROOT RETURN: t = 112.9832 g[0] = 1, y[0] = 0.361062, y[1] = -0.221062 -t = 112.9832, H(p,q)-H0 = 0.0000000591084393, L(p,q)-L0 = 0.0000000004634866, Q(p,q)-Q0 = inf -t = 113.0000, H(p,q)-H0 = 0.0000000473694242, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf -t = 114.0000, H(p,q)-H0 = 0.0000002040319292, L(p,q)-L0 = -0.0000000000000024, Q(p,q)-Q0 = inf -ROOT RETURN: t = 114.1279 g[0] = -1, y[0] = -0.658638, y[1] = 0.798638 -t = 114.1279, H(p,q)-H0 = 0.0000002044104154, L(p,q)-L0 = 0.0000000000000290, Q(p,q)-Q0 = inf -t = 115.0000, H(p,q)-H0 = 0.0000002049329899, L(p,q)-L0 = -0.0000000000000026, Q(p,q)-Q0 = inf -t = 116.0000, H(p,q)-H0 = 0.0000002049732397, L(p,q)-L0 = -0.0000000000000030, Q(p,q)-Q0 = inf -t = 117.0000, H(p,q)-H0 = 0.0000002049631667, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf -t = 118.0000, H(p,q)-H0 = 0.0000002048040542, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf -t = 119.0000, H(p,q)-H0 = 0.0000001849806039, L(p,q)-L0 = -0.0000000000000047, Q(p,q)-Q0 = inf -ROOT RETURN: t = 119.2664 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 119.2664, H(p,q)-H0 = 0.0000000643966473, L(p,q)-L0 = 0.0000000002287358, Q(p,q)-Q0 = inf -t = 120.0000, H(p,q)-H0 = 0.0000002009833776, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf -ROOT RETURN: t = 120.4111 g[0] = -1, y[0] = -0.658639, y[1] = 0.798639 -t = 120.4111, H(p,q)-H0 = 0.0000002044203272, L(p,q)-L0 = 0.0000000000001624, Q(p,q)-Q0 = inf -t = 121.0000, H(p,q)-H0 = 0.0000002048876452, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf -t = 122.0000, H(p,q)-H0 = 0.0000002049694665, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf -t = 123.0000, H(p,q)-H0 = 0.0000002049702837, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf -t = 124.0000, H(p,q)-H0 = 0.0000002048973473, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf -t = 125.0000, H(p,q)-H0 = 0.0000002018868853, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf -ROOT RETURN: t = 125.5496 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 125.5496, H(p,q)-H0 = 0.0000000609529685, L(p,q)-L0 = 0.0000000000091984, Q(p,q)-Q0 = inf -t = 126.0000, H(p,q)-H0 = 0.0000001769098574, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf -ROOT RETURN: t = 126.6943 g[0] = -1, y[0] = -0.65864, y[1] = 0.79864 -t = 126.6943, H(p,q)-H0 = 0.0000002044216824, L(p,q)-L0 = 0.0000000000004233, Q(p,q)-Q0 = inf -t = 127.0000, H(p,q)-H0 = 0.0000002047795121, L(p,q)-L0 = -0.0000000000000071, Q(p,q)-Q0 = inf -t = 128.0000, H(p,q)-H0 = 0.0000002049615558, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf -t = 129.0000, H(p,q)-H0 = 0.0000002049735497, L(p,q)-L0 = -0.0000000000000049, Q(p,q)-Q0 = inf -t = 130.0000, H(p,q)-H0 = 0.0000002049374590, L(p,q)-L0 = -0.0000000000000051, Q(p,q)-Q0 = inf -t = 131.0000, H(p,q)-H0 = 0.0000002041949115, L(p,q)-L0 = -0.0000000000000059, Q(p,q)-Q0 = inf -ROOT RETURN: t = 131.8328 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 131.8328, H(p,q)-H0 = 0.0000000589480340, L(p,q)-L0 = 0.0000000004482658, Q(p,q)-Q0 = inf -t = 132.0000, H(p,q)-H0 = 0.0000000160710514, L(p,q)-L0 = -0.0000000000000064, Q(p,q)-Q0 = inf -ROOT RETURN: t = 132.9775 g[0] = -1, y[0] = -0.658641, y[1] = 0.798641 -t = 132.9775, H(p,q)-H0 = 0.0000002044093466, L(p,q)-L0 = 0.0000000000000487, Q(p,q)-Q0 = inf -t = 133.0000, H(p,q)-H0 = 0.0000002044636734, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf -t = 134.0000, H(p,q)-H0 = 0.0000002049463477, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf -t = 135.0000, H(p,q)-H0 = 0.0000002049740317, L(p,q)-L0 = -0.0000000000000049, Q(p,q)-Q0 = inf -t = 136.0000, H(p,q)-H0 = 0.0000002049569842, L(p,q)-L0 = -0.0000000000000044, Q(p,q)-Q0 = inf -t = 137.0000, H(p,q)-H0 = 0.0000002047012927, L(p,q)-L0 = -0.0000000000000047, Q(p,q)-Q0 = inf -t = 138.0000, H(p,q)-H0 = 0.0000001406985852, L(p,q)-L0 = -0.0000000000000044, Q(p,q)-Q0 = inf -ROOT RETURN: t = 138.1160 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 138.1160, H(p,q)-H0 = 0.0000000638374229, L(p,q)-L0 = 0.0000000002652900, Q(p,q)-Q0 = inf -t = 139.0000, H(p,q)-H0 = 0.0000002032189499, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf -ROOT RETURN: t = 139.2607 g[0] = -1, y[0] = -0.658642, y[1] = 0.798642 -t = 139.2607, H(p,q)-H0 = 0.0000002044184653, L(p,q)-L0 = 0.0000000000000731, Q(p,q)-Q0 = inf -t = 140.0000, H(p,q)-H0 = 0.0000002049160649, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf -t = 141.0000, H(p,q)-H0 = 0.0000002049718772, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf -t = 142.0000, H(p,q)-H0 = 0.0000002049671014, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf -t = 143.0000, H(p,q)-H0 = 0.0000002048583581, L(p,q)-L0 = -0.0000000000000080, Q(p,q)-Q0 = inf -t = 144.0000, H(p,q)-H0 = 0.0000001971968370, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf -ROOT RETURN: t = 144.3992 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 144.3992, H(p,q)-H0 = 0.0000000615662814, L(p,q)-L0 = 0.0000000000333338, Q(p,q)-Q0 = inf -t = 145.0000, H(p,q)-H0 = 0.0000001956601925, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf -ROOT RETURN: t = 145.5439 g[0] = -1, y[0] = -0.658642, y[1] = 0.798642 -t = 145.5439, H(p,q)-H0 = 0.0000002044237625, L(p,q)-L0 = 0.0000000000004587, Q(p,q)-Q0 = inf -t = 146.0000, H(p,q)-H0 = 0.0000002048492919, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -t = 147.0000, H(p,q)-H0 = 0.0000002049664016, L(p,q)-L0 = -0.0000000000000088, Q(p,q)-Q0 = inf -t = 148.0000, H(p,q)-H0 = 0.0000002049721995, L(p,q)-L0 = -0.0000000000000094, Q(p,q)-Q0 = inf -t = 149.0000, H(p,q)-H0 = 0.0000002049199580, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf -t = 150.0000, H(p,q)-H0 = 0.0000002034362154, L(p,q)-L0 = -0.0000000000000105, Q(p,q)-Q0 = inf -ROOT RETURN: t = 150.6824 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 150.6824, H(p,q)-H0 = 0.0000000590459728, L(p,q)-L0 = 0.0000000004090777, Q(p,q)-Q0 = inf -t = 151.0000, H(p,q)-H0 = 0.0000001261863694, L(p,q)-L0 = -0.0000000000000103, Q(p,q)-Q0 = inf -ROOT RETURN: t = 151.8271 g[0] = -1, y[0] = -0.658643, y[1] = 0.798643 -t = 151.8271, H(p,q)-H0 = 0.0000002044090854, L(p,q)-L0 = 0.0000000000000768, Q(p,q)-Q0 = inf -t = 152.0000, H(p,q)-H0 = 0.0000002046758949, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf -t = 153.0000, H(p,q)-H0 = 0.0000002049556415, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf -t = 154.0000, H(p,q)-H0 = 0.0000002049740890, L(p,q)-L0 = -0.0000000000000107, Q(p,q)-Q0 = inf -t = 155.0000, H(p,q)-H0 = 0.0000002049482429, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf -t = 156.0000, H(p,q)-H0 = 0.0000002045123801, L(p,q)-L0 = -0.0000000000000103, Q(p,q)-Q0 = inf -ROOT RETURN: t = 156.9656 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 156.9656, H(p,q)-H0 = 0.0000000630772743, L(p,q)-L0 = 0.0000000003050860, Q(p,q)-Q0 = inf -t = 157.0000, H(p,q)-H0 = 0.0000000337490764, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf -t = 158.0000, H(p,q)-H0 = 0.0000002041014376, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf -ROOT RETURN: t = 158.1103 g[0] = -1, y[0] = -0.658644, y[1] = 0.798644 -t = 158.1103, H(p,q)-H0 = 0.0000002044174612, L(p,q)-L0 = -0.0000000000000006, Q(p,q)-Q0 = inf -t = 159.0000, H(p,q)-H0 = 0.0000002049348182, L(p,q)-L0 = -0.0000000000000131, Q(p,q)-Q0 = inf -t = 160.0000, H(p,q)-H0 = 0.0000002049733595, L(p,q)-L0 = -0.0000000000000127, Q(p,q)-Q0 = inf -t = 161.0000, H(p,q)-H0 = 0.0000002049625329, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf -t = 162.0000, H(p,q)-H0 = 0.0000002047947361, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf -t = 163.0000, H(p,q)-H0 = 0.0000001821146405, L(p,q)-L0 = -0.0000000000000128, Q(p,q)-Q0 = inf -ROOT RETURN: t = 163.2487 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 163.2487, H(p,q)-H0 = 0.0000000624513086, L(p,q)-L0 = 0.0000000000633000, Q(p,q)-Q0 = inf -t = 164.0000, H(p,q)-H0 = 0.0000002013767927, L(p,q)-L0 = -0.0000000000000129, Q(p,q)-Q0 = inf -ROOT RETURN: t = 164.3935 g[0] = -1, y[0] = -0.658645, y[1] = 0.798645 -t = 164.3935, H(p,q)-H0 = 0.0000002044252375, L(p,q)-L0 = 0.0000000000004687, Q(p,q)-Q0 = inf -t = 165.0000, H(p,q)-H0 = 0.0000002048916541, L(p,q)-L0 = -0.0000000000000144, Q(p,q)-Q0 = inf -t = 166.0000, H(p,q)-H0 = 0.0000002049697939, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf -t = 167.0000, H(p,q)-H0 = 0.0000002049699599, L(p,q)-L0 = -0.0000000000000144, Q(p,q)-Q0 = inf -t = 168.0000, H(p,q)-H0 = 0.0000002048936254, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf -t = 169.0000, H(p,q)-H0 = 0.0000002015596684, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf -ROOT RETURN: t = 169.5319 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 169.5319, H(p,q)-H0 = 0.0000000593727620, L(p,q)-L0 = 0.0000000003454788, Q(p,q)-Q0 = inf -t = 170.0000, H(p,q)-H0 = 0.0000001804827845, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf -ROOT RETURN: t = 170.6766 g[0] = -1, y[0] = -0.658645, y[1] = 0.798645 -t = 170.6766, H(p,q)-H0 = 0.0000002044096650, L(p,q)-L0 = 0.0000000000001183, Q(p,q)-Q0 = inf -t = 171.0000, H(p,q)-H0 = 0.0000002047897568, L(p,q)-L0 = -0.0000000000000118, Q(p,q)-Q0 = inf -t = 172.0000, H(p,q)-H0 = 0.0000002049622086, L(p,q)-L0 = -0.0000000000000111, Q(p,q)-Q0 = inf -t = 173.0000, H(p,q)-H0 = 0.0000002049734258, L(p,q)-L0 = -0.0000000000000110, Q(p,q)-Q0 = inf -t = 174.0000, H(p,q)-H0 = 0.0000002049357303, L(p,q)-L0 = -0.0000000000000104, Q(p,q)-Q0 = inf -t = 175.0000, H(p,q)-H0 = 0.0000002041344870, L(p,q)-L0 = -0.0000000000000108, Q(p,q)-Q0 = inf -ROOT RETURN: t = 175.8151 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 175.8151, H(p,q)-H0 = 0.0000000621993272, L(p,q)-L0 = 0.0000000003467728, Q(p,q)-Q0 = inf -t = 176.0000, H(p,q)-H0 = 0.0000000272887137, L(p,q)-L0 = -0.0000000000000098, Q(p,q)-Q0 = inf -ROOT RETURN: t = 176.9598 g[0] = -1, y[0] = -0.658646, y[1] = 0.798646 -t = 176.9598, H(p,q)-H0 = 0.0000002044178394, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf -t = 177.0000, H(p,q)-H0 = 0.0000002044965889, L(p,q)-L0 = -0.0000000000000113, Q(p,q)-Q0 = inf -t = 178.0000, H(p,q)-H0 = 0.0000002049476138, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf -t = 179.0000, H(p,q)-H0 = 0.0000002049740697, L(p,q)-L0 = -0.0000000000000127, Q(p,q)-Q0 = inf -t = 180.0000, H(p,q)-H0 = 0.0000002049561020, L(p,q)-L0 = -0.0000000000000127, Q(p,q)-Q0 = inf -t = 181.0000, H(p,q)-H0 = 0.0000002046847841, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf -t = 182.0000, H(p,q)-H0 = 0.0000001313757614, L(p,q)-L0 = -0.0000000000000124, Q(p,q)-Q0 = inf -ROOT RETURN: t = 182.0983 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 182.0983, H(p,q)-H0 = 0.0000000633515107, L(p,q)-L0 = 0.0000000000942132, Q(p,q)-Q0 = inf -t = 183.0000, H(p,q)-H0 = 0.0000002033666721, L(p,q)-L0 = -0.0000000000000123, Q(p,q)-Q0 = inf -ROOT RETURN: t = 183.2430 g[0] = -1, y[0] = -0.658647, y[1] = 0.798647 -t = 183.2430, H(p,q)-H0 = 0.0000002044259765, L(p,q)-L0 = 0.0000000000004635, Q(p,q)-Q0 = inf -t = 184.0000, H(p,q)-H0 = 0.0000002049186698, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf -t = 185.0000, H(p,q)-H0 = 0.0000002049720896, L(p,q)-L0 = -0.0000000000000128, Q(p,q)-Q0 = inf -t = 186.0000, H(p,q)-H0 = 0.0000002049666383, L(p,q)-L0 = -0.0000000000000135, Q(p,q)-Q0 = inf -t = 187.0000, H(p,q)-H0 = 0.0000002048524398, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf -t = 188.0000, H(p,q)-H0 = 0.0000001962155347, L(p,q)-L0 = -0.0000000000000148, Q(p,q)-Q0 = inf -ROOT RETURN: t = 188.3815 g[0] = 1, y[0] = 0.361061, y[1] = -0.221061 -t = 188.3815, H(p,q)-H0 = 0.0000000598616603, L(p,q)-L0 = 0.0000000002609626, Q(p,q)-Q0 = inf -t = 189.0000, H(p,q)-H0 = 0.0000001967129617, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf -ROOT RETURN: t = 189.5262 g[0] = -1, y[0] = -0.658648, y[1] = 0.798648 -t = 189.5262, H(p,q)-H0 = 0.0000002044110309, L(p,q)-L0 = 0.0000000000001704, Q(p,q)-Q0 = inf -t = 190.0000, H(p,q)-H0 = 0.0000002048553853, L(p,q)-L0 = -0.0000000000000119, Q(p,q)-Q0 = inf -t = 191.0000, H(p,q)-H0 = 0.0000002049668727, L(p,q)-L0 = -0.0000000000000115, Q(p,q)-Q0 = inf -t = 192.0000, H(p,q)-H0 = 0.0000002049719920, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf -t = 193.0000, H(p,q)-H0 = 0.0000002049174148, L(p,q)-L0 = -0.0000000000000102, Q(p,q)-Q0 = inf -t = 194.0000, H(p,q)-H0 = 0.0000002032963038, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -ROOT RETURN: t = 194.6647 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 194.6647, H(p,q)-H0 = 0.0000000612930162, L(p,q)-L0 = 0.0000000003876842, Q(p,q)-Q0 = inf -t = 195.0000, H(p,q)-H0 = 0.0000001360801176, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf -ROOT RETURN: t = 195.8094 g[0] = -1, y[0] = -0.658648, y[1] = 0.798648 -t = 195.8094, H(p,q)-H0 = 0.0000002044171137, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf -t = 196.0000, H(p,q)-H0 = 0.0000002046930251, L(p,q)-L0 = -0.0000000000000077, Q(p,q)-Q0 = inf -t = 197.0000, H(p,q)-H0 = 0.0000002049565468, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf -t = 198.0000, H(p,q)-H0 = 0.0000002049740604, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf -t = 199.0000, H(p,q)-H0 = 0.0000002049470088, L(p,q)-L0 = -0.0000000000000074, Q(p,q)-Q0 = inf -t = 200.0000, H(p,q)-H0 = 0.0000002044808124, L(p,q)-L0 = -0.0000000000000088, Q(p,q)-Q0 = inf -ROOT RETURN: t = 200.9479 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 200.9479, H(p,q)-H0 = 0.0000000640904072, L(p,q)-L0 = 0.0000000001242713, Q(p,q)-Q0 = inf -t = 201.0000, H(p,q)-H0 = 0.0000000215241154, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf -t = 202.0000, H(p,q)-H0 = 0.0000002041647824, L(p,q)-L0 = -0.0000000000000058, Q(p,q)-Q0 = inf -ROOT RETURN: t = 202.0926 g[0] = -1, y[0] = -0.658649, y[1] = 0.798649 -t = 202.0926, H(p,q)-H0 = 0.0000002044259015, L(p,q)-L0 = 0.0000000000004385, Q(p,q)-Q0 = inf -t = 203.0000, H(p,q)-H0 = 0.0000002049365964, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf -t = 204.0000, H(p,q)-H0 = 0.0000002049734983, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf -t = 205.0000, H(p,q)-H0 = 0.0000002049619030, L(p,q)-L0 = -0.0000000000000050, Q(p,q)-Q0 = inf -t = 206.0000, H(p,q)-H0 = 0.0000002047848349, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -t = 207.0000, H(p,q)-H0 = 0.0000001787979984, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -ROOT RETURN: t = 207.2311 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 207.2311, H(p,q)-H0 = 0.0000000604054162, L(p,q)-L0 = 0.0000000001644913, Q(p,q)-Q0 = inf -t = 208.0000, H(p,q)-H0 = 0.0000002017248631, L(p,q)-L0 = -0.0000000000000040, Q(p,q)-Q0 = inf -ROOT RETURN: t = 208.3758 g[0] = -1, y[0] = -0.65865, y[1] = 0.79865 -t = 208.3758, H(p,q)-H0 = 0.0000002044130298, L(p,q)-L0 = 0.0000000000002348, Q(p,q)-Q0 = inf -t = 209.0000, H(p,q)-H0 = 0.0000002048954887, L(p,q)-L0 = -0.0000000000000047, Q(p,q)-Q0 = inf -t = 210.0000, H(p,q)-H0 = 0.0000002049701368, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf -t = 211.0000, H(p,q)-H0 = 0.0000002049696521, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf -t = 212.0000, H(p,q)-H0 = 0.0000002048897333, L(p,q)-L0 = -0.0000000000000059, Q(p,q)-Q0 = inf -t = 213.0000, H(p,q)-H0 = 0.0000002011902032, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf -ROOT RETURN: t = 213.5143 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 213.5143, H(p,q)-H0 = 0.0000000604462869, L(p,q)-L0 = 0.0000000004239924, Q(p,q)-Q0 = inf -t = 214.0000, H(p,q)-H0 = 0.0000001835705437, L(p,q)-L0 = -0.0000000000000073, Q(p,q)-Q0 = inf -ROOT RETURN: t = 214.6590 g[0] = -1, y[0] = -0.658651, y[1] = 0.798651 -t = 214.6590, H(p,q)-H0 = 0.0000002044153266, L(p,q)-L0 = -0.0000000000000029, Q(p,q)-Q0 = inf -t = 215.0000, H(p,q)-H0 = 0.0000002047993857, L(p,q)-L0 = -0.0000000000000080, Q(p,q)-Q0 = inf -t = 216.0000, H(p,q)-H0 = 0.0000002049628581, L(p,q)-L0 = -0.0000000000000074, Q(p,q)-Q0 = inf -t = 217.0000, H(p,q)-H0 = 0.0000002049733131, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf -t = 218.0000, H(p,q)-H0 = 0.0000002049339445, L(p,q)-L0 = -0.0000000000000068, Q(p,q)-Q0 = inf -t = 219.0000, H(p,q)-H0 = 0.0000002040682244, L(p,q)-L0 = -0.0000000000000071, Q(p,q)-Q0 = inf -ROOT RETURN: t = 219.7975 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 219.7975, H(p,q)-H0 = 0.0000000645600975, L(p,q)-L0 = 0.0000000001536600, Q(p,q)-Q0 = inf -t = 220.0000, H(p,q)-H0 = 0.0000000402919840, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf -ROOT RETURN: t = 220.9422 g[0] = -1, y[0] = -0.658651, y[1] = 0.798651 -t = 220.9422, H(p,q)-H0 = 0.0000002044250074, L(p,q)-L0 = 0.0000000000003810, Q(p,q)-Q0 = inf -t = 221.0000, H(p,q)-H0 = 0.0000002045269503, L(p,q)-L0 = -0.0000000000000067, Q(p,q)-Q0 = inf -t = 222.0000, H(p,q)-H0 = 0.0000002049488491, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf -t = 223.0000, H(p,q)-H0 = 0.0000002049741205, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf -t = 224.0000, H(p,q)-H0 = 0.0000002049552051, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf -t = 225.0000, H(p,q)-H0 = 0.0000002046670631, L(p,q)-L0 = -0.0000000000000068, Q(p,q)-Q0 = inf -t = 226.0000, H(p,q)-H0 = 0.0000001209273015, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf -ROOT RETURN: t = 226.0806 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 226.0806, H(p,q)-H0 = 0.0000000608537341, L(p,q)-L0 = 0.0000000000722000, Q(p,q)-Q0 = inf -t = 227.0000, H(p,q)-H0 = 0.0000002034995585, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf -ROOT RETURN: t = 227.2254 g[0] = -1, y[0] = -0.658652, y[1] = 0.798652 -t = 227.2254, H(p,q)-H0 = 0.0000002044154518, L(p,q)-L0 = 0.0000000000002905, Q(p,q)-Q0 = inf -t = 228.0000, H(p,q)-H0 = 0.0000002049211781, L(p,q)-L0 = -0.0000000000000080, Q(p,q)-Q0 = inf -t = 229.0000, H(p,q)-H0 = 0.0000002049723132, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf -t = 230.0000, H(p,q)-H0 = 0.0000002049661791, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf -t = 231.0000, H(p,q)-H0 = 0.0000002048461902, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf -t = 232.0000, H(p,q)-H0 = 0.0000001950888167, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf -ROOT RETURN: t = 232.3638 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 232.3638, H(p,q)-H0 = 0.0000000597383707, L(p,q)-L0 = 0.0000000004509856, Q(p,q)-Q0 = inf -t = 233.0000, H(p,q)-H0 = 0.0000001976306370, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf -ROOT RETURN: t = 233.5086 g[0] = -1, y[0] = -0.658653, y[1] = 0.798653 -t = 233.5086, H(p,q)-H0 = 0.0000002044131976, L(p,q)-L0 = 0.0000000000000036, Q(p,q)-Q0 = inf -t = 234.0000, H(p,q)-H0 = 0.0000002048611419, L(p,q)-L0 = -0.0000000000000080, Q(p,q)-Q0 = inf -t = 235.0000, H(p,q)-H0 = 0.0000002049673273, L(p,q)-L0 = -0.0000000000000088, Q(p,q)-Q0 = inf -t = 236.0000, H(p,q)-H0 = 0.0000002049717733, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf -t = 237.0000, H(p,q)-H0 = 0.0000002049147449, L(p,q)-L0 = -0.0000000000000073, Q(p,q)-Q0 = inf -t = 238.0000, H(p,q)-H0 = 0.0000002031406034, L(p,q)-L0 = -0.0000000000000053, Q(p,q)-Q0 = inf -ROOT RETURN: t = 238.6470 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 238.6470, H(p,q)-H0 = 0.0000000647101766, L(p,q)-L0 = 0.0000000001836198, Q(p,q)-Q0 = inf -t = 239.0000, H(p,q)-H0 = 0.0000001448666112, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf -ROOT RETURN: t = 239.7917 g[0] = -1, y[0] = -0.658654, y[1] = 0.798654 -t = 239.7917, H(p,q)-H0 = 0.0000002044234235, L(p,q)-L0 = 0.0000000000003015, Q(p,q)-Q0 = inf -t = 240.0000, H(p,q)-H0 = 0.0000002047089658, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf -t = 241.0000, H(p,q)-H0 = 0.0000002049574083, L(p,q)-L0 = -0.0000000000000067, Q(p,q)-Q0 = inf -t = 242.0000, H(p,q)-H0 = 0.0000002049740142, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf -t = 243.0000, H(p,q)-H0 = 0.0000002049457142, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf -t = 244.0000, H(p,q)-H0 = 0.0000002044465450, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf -ROOT RETURN: t = 244.9302 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 244.9302, H(p,q)-H0 = 0.0000000610114852, L(p,q)-L0 = 0.0000000000094080, Q(p,q)-Q0 = inf -t = 245.0000, H(p,q)-H0 = 0.0000000114585323, L(p,q)-L0 = -0.0000000000000048, Q(p,q)-Q0 = inf -t = 246.0000, H(p,q)-H0 = 0.0000002042225629, L(p,q)-L0 = -0.0000000000000039, Q(p,q)-Q0 = inf -ROOT RETURN: t = 246.0749 g[0] = -1, y[0] = -0.658655, y[1] = 0.798655 -t = 246.0749, H(p,q)-H0 = 0.0000002044180860, L(p,q)-L0 = 0.0000000000003539, Q(p,q)-Q0 = inf -t = 247.0000, H(p,q)-H0 = 0.0000002049382891, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -t = 248.0000, H(p,q)-H0 = 0.0000002049736170, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -t = 249.0000, H(p,q)-H0 = 0.0000002049612364, L(p,q)-L0 = -0.0000000000000047, Q(p,q)-Q0 = inf -t = 250.0000, H(p,q)-H0 = 0.0000002047742579, L(p,q)-L0 = -0.0000000000000048, Q(p,q)-Q0 = inf -t = 251.0000, H(p,q)-H0 = 0.0000001749610650, L(p,q)-L0 = -0.0000000000000049, Q(p,q)-Q0 = inf -ROOT RETURN: t = 251.2134 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 251.2134, H(p,q)-H0 = 0.0000000592331157, L(p,q)-L0 = 0.0000000004635544, Q(p,q)-Q0 = inf -t = 252.0000, H(p,q)-H0 = 0.0000002020334031, L(p,q)-L0 = -0.0000000000000046, Q(p,q)-Q0 = inf -ROOT RETURN: t = 252.3581 g[0] = -1, y[0] = -0.658655, y[1] = 0.798655 -t = 252.3581, H(p,q)-H0 = 0.0000002044112611, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf -t = 253.0000, H(p,q)-H0 = 0.0000002048991122, L(p,q)-L0 = -0.0000000000000050, Q(p,q)-Q0 = inf -t = 254.0000, H(p,q)-H0 = 0.0000002049704483, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf -t = 255.0000, H(p,q)-H0 = 0.0000002049693120, L(p,q)-L0 = -0.0000000000000059, Q(p,q)-Q0 = inf -t = 256.0000, H(p,q)-H0 = 0.0000002048856115, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf -t = 257.0000, H(p,q)-H0 = 0.0000002007721391, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf -ROOT RETURN: t = 257.4966 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 257.4966, H(p,q)-H0 = 0.0000000645371567, L(p,q)-L0 = 0.0000000002156431, Q(p,q)-Q0 = inf -t = 258.0000, H(p,q)-H0 = 0.0000001862387087, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf -ROOT RETURN: t = 258.6413 g[0] = -1, y[0] = -0.658656, y[1] = 0.798656 -t = 258.6413, H(p,q)-H0 = 0.0000002044214203, L(p,q)-L0 = 0.0000000000002087, Q(p,q)-Q0 = inf -t = 259.0000, H(p,q)-H0 = 0.0000002048084180, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf -t = 260.0000, H(p,q)-H0 = 0.0000002049634770, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf -t = 261.0000, H(p,q)-H0 = 0.0000002049731854, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf -t = 262.0000, H(p,q)-H0 = 0.0000002049320703, L(p,q)-L0 = -0.0000000000000067, Q(p,q)-Q0 = inf -t = 263.0000, H(p,q)-H0 = 0.0000002039954176, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf -ROOT RETURN: t = 263.7798 g[0] = 1, y[0] = 0.36106, y[1] = -0.22106 -t = 263.7798, H(p,q)-H0 = 0.0000000608543091, L(p,q)-L0 = 0.0000000000032646, Q(p,q)-Q0 = inf -t = 264.0000, H(p,q)-H0 = 0.0000000543259482, L(p,q)-L0 = -0.0000000000000079, Q(p,q)-Q0 = inf -ROOT RETURN: t = 264.9245 g[0] = -1, y[0] = -0.658657, y[1] = 0.798657 -t = 264.9245, H(p,q)-H0 = 0.0000002044206707, L(p,q)-L0 = 0.0000000000004033, Q(p,q)-Q0 = inf -t = 265.0000, H(p,q)-H0 = 0.0000002045549692, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf -t = 266.0000, H(p,q)-H0 = 0.0000002049500240, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf -t = 267.0000, H(p,q)-H0 = 0.0000002049741497, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf -t = 268.0000, H(p,q)-H0 = 0.0000002049542603, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf -t = 269.0000, H(p,q)-H0 = 0.0000002046479867, L(p,q)-L0 = -0.0000000000000119, Q(p,q)-Q0 = inf -t = 270.0000, H(p,q)-H0 = 0.0000001093516970, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf -ROOT RETURN: t = 270.0630 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 270.0630, H(p,q)-H0 = 0.0000000589729037, L(p,q)-L0 = 0.0000000004568250, Q(p,q)-Q0 = inf -t = 271.0000, H(p,q)-H0 = 0.0000002036192879, L(p,q)-L0 = -0.0000000000000098, Q(p,q)-Q0 = inf -ROOT RETURN: t = 271.2077 g[0] = -1, y[0] = -0.658658, y[1] = 0.798658 -t = 271.2077, H(p,q)-H0 = 0.0000002044098636, L(p,q)-L0 = 0.0000000000000332, Q(p,q)-Q0 = inf -t = 272.0000, H(p,q)-H0 = 0.0000002049235631, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf -t = 273.0000, H(p,q)-H0 = 0.0000002049725170, L(p,q)-L0 = -0.0000000000000094, Q(p,q)-Q0 = inf -t = 274.0000, H(p,q)-H0 = 0.0000002049656909, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf -t = 275.0000, H(p,q)-H0 = 0.0000002048395561, L(p,q)-L0 = -0.0000000000000100, Q(p,q)-Q0 = inf -t = 276.0000, H(p,q)-H0 = 0.0000001937929017, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf -ROOT RETURN: t = 276.3462 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 276.3462, H(p,q)-H0 = 0.0000000640743190, L(p,q)-L0 = 0.0000000002508480, Q(p,q)-Q0 = inf -t = 277.0000, H(p,q)-H0 = 0.0000001984320273, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf -ROOT RETURN: t = 277.4909 g[0] = -1, y[0] = -0.658658, y[1] = 0.798658 -t = 277.4909, H(p,q)-H0 = 0.0000002044193874, L(p,q)-L0 = 0.0000000000001114, Q(p,q)-Q0 = inf -t = 278.0000, H(p,q)-H0 = 0.0000002048665860, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf -t = 279.0000, H(p,q)-H0 = 0.0000002049677686, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf -t = 280.0000, H(p,q)-H0 = 0.0000002049715478, L(p,q)-L0 = -0.0000000000000079, Q(p,q)-Q0 = inf -t = 281.0000, H(p,q)-H0 = 0.0000002049119465, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf -t = 282.0000, H(p,q)-H0 = 0.0000002029670150, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -ROOT RETURN: t = 282.6293 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 282.6293, H(p,q)-H0 = 0.0000000612761599, L(p,q)-L0 = 0.0000000000229872, Q(p,q)-Q0 = inf -t = 283.0000, H(p,q)-H0 = 0.0000001526079532, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf -ROOT RETURN: t = 283.7741 g[0] = -1, y[0] = -0.658659, y[1] = 0.798659 -t = 283.7741, H(p,q)-H0 = 0.0000002044229694, L(p,q)-L0 = 0.0000000000004439, Q(p,q)-Q0 = inf -t = 284.0000, H(p,q)-H0 = 0.0000002047238329, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf -t = 285.0000, H(p,q)-H0 = 0.0000002049582453, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf -t = 286.0000, H(p,q)-H0 = 0.0000002049739676, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf -t = 287.0000, H(p,q)-H0 = 0.0000002049443737, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf -t = 288.0000, H(p,q)-H0 = 0.0000002044093119, L(p,q)-L0 = -0.0000000000000074, Q(p,q)-Q0 = inf -ROOT RETURN: t = 288.9125 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 288.9125, H(p,q)-H0 = 0.0000000589732607, L(p,q)-L0 = 0.0000000004270665, Q(p,q)-Q0 = inf -t = 289.0000, H(p,q)-H0 = 0.0000000042635371, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf -t = 290.0000, H(p,q)-H0 = 0.0000002042753529, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf -ROOT RETURN: t = 290.0573 g[0] = -1, y[0] = -0.65866, y[1] = 0.79866 -t = 290.0573, H(p,q)-H0 = 0.0000002044092232, L(p,q)-L0 = 0.0000000000000642, Q(p,q)-Q0 = inf -t = 291.0000, H(p,q)-H0 = 0.0000002049399074, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf -t = 292.0000, H(p,q)-H0 = 0.0000002049737245, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf -t = 293.0000, H(p,q)-H0 = 0.0000002049605422, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf -t = 294.0000, H(p,q)-H0 = 0.0000002047629634, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf -t = 295.0000, H(p,q)-H0 = 0.0000001705262338, L(p,q)-L0 = -0.0000000000000091, Q(p,q)-Q0 = inf -ROOT RETURN: t = 295.1957 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 295.1957, H(p,q)-H0 = 0.0000000633820858, L(p,q)-L0 = 0.0000000002894960, Q(p,q)-Q0 = inf -t = 296.0000, H(p,q)-H0 = 0.0000002023074644, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf -ROOT RETURN: t = 296.3405 g[0] = -1, y[0] = -0.658661, y[1] = 0.798661 -t = 296.3405, H(p,q)-H0 = 0.0000002044178938, L(p,q)-L0 = 0.0000000000000295, Q(p,q)-Q0 = inf -t = 297.0000, H(p,q)-H0 = 0.0000002049025567, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf -t = 298.0000, H(p,q)-H0 = 0.0000002049707477, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf -t = 299.0000, H(p,q)-H0 = 0.0000002049689600, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf -t = 300.0000, H(p,q)-H0 = 0.0000002048812703, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf -t = 301.0000, H(p,q)-H0 = 0.0000002002981537, L(p,q)-L0 = -0.0000000000000073, Q(p,q)-Q0 = inf -ROOT RETURN: t = 301.4789 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 301.4789, H(p,q)-H0 = 0.0000000620919978, L(p,q)-L0 = 0.0000000000515072, Q(p,q)-Q0 = inf -t = 302.0000, H(p,q)-H0 = 0.0000001885450391, L(p,q)-L0 = -0.0000000000000089, Q(p,q)-Q0 = inf -ROOT RETURN: t = 302.6237 g[0] = -1, y[0] = -0.658661, y[1] = 0.798661 -t = 302.6237, H(p,q)-H0 = 0.0000002044247518, L(p,q)-L0 = 0.0000000000004693, Q(p,q)-Q0 = inf -t = 303.0000, H(p,q)-H0 = 0.0000002048168956, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -t = 304.0000, H(p,q)-H0 = 0.0000002049640653, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -t = 305.0000, H(p,q)-H0 = 0.0000002049730389, L(p,q)-L0 = -0.0000000000000097, Q(p,q)-Q0 = inf -t = 306.0000, H(p,q)-H0 = 0.0000002049301034, L(p,q)-L0 = -0.0000000000000088, Q(p,q)-Q0 = inf -t = 307.0000, H(p,q)-H0 = 0.0000002039152911, L(p,q)-L0 = -0.0000000000000092, Q(p,q)-Q0 = inf -ROOT RETURN: t = 307.7621 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 307.7621, H(p,q)-H0 = 0.0000000592179796, L(p,q)-L0 = 0.0000000003726697, Q(p,q)-Q0 = inf -t = 308.0000, H(p,q)-H0 = 0.0000000687103401, L(p,q)-L0 = -0.0000000000000102, Q(p,q)-Q0 = inf -ROOT RETURN: t = 308.9068 g[0] = -1, y[0] = -0.658662, y[1] = 0.798662 -t = 308.9068, H(p,q)-H0 = 0.0000002044094146, L(p,q)-L0 = 0.0000000000001003, Q(p,q)-Q0 = inf -t = 309.0000, H(p,q)-H0 = 0.0000002045808604, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf -t = 310.0000, H(p,q)-H0 = 0.0000002049511486, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf -t = 311.0000, H(p,q)-H0 = 0.0000002049741704, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf -t = 312.0000, H(p,q)-H0 = 0.0000002049532770, L(p,q)-L0 = -0.0000000000000077, Q(p,q)-Q0 = inf -t = 313.0000, H(p,q)-H0 = 0.0000002046274431, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf -t = 314.0000, H(p,q)-H0 = 0.0000000967146014, L(p,q)-L0 = -0.0000000000000094, Q(p,q)-Q0 = inf -ROOT RETURN: t = 314.0453 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 314.0453, H(p,q)-H0 = 0.0000000625389425, L(p,q)-L0 = 0.0000000003307021, Q(p,q)-Q0 = inf -t = 315.0000, H(p,q)-H0 = 0.0000002037273511, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf -ROOT RETURN: t = 315.1900 g[0] = -1, y[0] = -0.658663, y[1] = 0.798663 -t = 315.1900, H(p,q)-H0 = 0.0000002044176947, L(p,q)-L0 = -0.0000000000000105, Q(p,q)-Q0 = inf -t = 316.0000, H(p,q)-H0 = 0.0000002049258276, L(p,q)-L0 = -0.0000000000000107, Q(p,q)-Q0 = inf -t = 317.0000, H(p,q)-H0 = 0.0000002049726984, L(p,q)-L0 = -0.0000000000000114, Q(p,q)-Q0 = inf -t = 318.0000, H(p,q)-H0 = 0.0000002049651724, L(p,q)-L0 = -0.0000000000000102, Q(p,q)-Q0 = inf -t = 319.0000, H(p,q)-H0 = 0.0000002048325045, L(p,q)-L0 = -0.0000000000000113, Q(p,q)-Q0 = inf -t = 320.0000, H(p,q)-H0 = 0.0000001923000481, L(p,q)-L0 = -0.0000000000000117, Q(p,q)-Q0 = inf -ROOT RETURN: t = 320.3285 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 320.3285, H(p,q)-H0 = 0.0000000630113586, L(p,q)-L0 = 0.0000000000824136, Q(p,q)-Q0 = inf -t = 321.0000, H(p,q)-H0 = 0.0000001991331846, L(p,q)-L0 = -0.0000000000000094, Q(p,q)-Q0 = inf -ROOT RETURN: t = 321.4732 g[0] = -1, y[0] = -0.658664, y[1] = 0.798664 -t = 321.4732, H(p,q)-H0 = 0.0000002044258534, L(p,q)-L0 = 0.0000000000004730, Q(p,q)-Q0 = inf -t = 322.0000, H(p,q)-H0 = 0.0000002048717222, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf -t = 323.0000, H(p,q)-H0 = 0.0000002049681809, L(p,q)-L0 = -0.0000000000000097, Q(p,q)-Q0 = inf -t = 324.0000, H(p,q)-H0 = 0.0000002049712969, L(p,q)-L0 = -0.0000000000000098, Q(p,q)-Q0 = inf -t = 325.0000, H(p,q)-H0 = 0.0000002049089922, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf -t = 326.0000, H(p,q)-H0 = 0.0000002027731077, L(p,q)-L0 = -0.0000000000000108, Q(p,q)-Q0 = inf -ROOT RETURN: t = 326.6117 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 326.6117, H(p,q)-H0 = 0.0000000596550571, L(p,q)-L0 = 0.0000000002954570, Q(p,q)-Q0 = inf -t = 327.0000, H(p,q)-H0 = 0.0000001593868577, L(p,q)-L0 = -0.0000000000000103, Q(p,q)-Q0 = inf -ROOT RETURN: t = 327.7564 g[0] = -1, y[0] = -0.658664, y[1] = 0.798664 -t = 327.7564, H(p,q)-H0 = 0.0000002044104224, L(p,q)-L0 = 0.0000000000001464, Q(p,q)-Q0 = inf -t = 328.0000, H(p,q)-H0 = 0.0000002047376884, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf -t = 329.0000, H(p,q)-H0 = 0.0000002049590364, L(p,q)-L0 = -0.0000000000000099, Q(p,q)-Q0 = inf -t = 330.0000, H(p,q)-H0 = 0.0000002049738960, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf -t = 331.0000, H(p,q)-H0 = 0.0000002049429565, L(p,q)-L0 = -0.0000000000000115, Q(p,q)-Q0 = inf -t = 332.0000, H(p,q)-H0 = 0.0000002043687722, L(p,q)-L0 = -0.0000000000000112, Q(p,q)-Q0 = inf -ROOT RETURN: t = 332.8949 g[0] = 1, y[0] = 0.361059, y[1] = -0.221059 -t = 332.8949, H(p,q)-H0 = 0.0000000616328681, L(p,q)-L0 = 0.0000000003723002, Q(p,q)-Q0 = inf -t = 333.0000, H(p,q)-H0 = 0.0000000004936018, L(p,q)-L0 = -0.0000000000000121, Q(p,q)-Q0 = inf -t = 334.0000, H(p,q)-H0 = 0.0000002043236466, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf -ROOT RETURN: t = 334.0396 g[0] = -1, y[0] = -0.658665, y[1] = 0.798665 -t = 334.0396, H(p,q)-H0 = 0.0000002044177470, L(p,q)-L0 = -0.0000000000000121, Q(p,q)-Q0 = inf -t = 335.0000, H(p,q)-H0 = 0.0000002049414485, L(p,q)-L0 = -0.0000000000000124, Q(p,q)-Q0 = inf -t = 336.0000, H(p,q)-H0 = 0.0000002049738119, L(p,q)-L0 = -0.0000000000000131, Q(p,q)-Q0 = inf -t = 337.0000, H(p,q)-H0 = 0.0000002049598103, L(p,q)-L0 = -0.0000000000000118, Q(p,q)-Q0 = inf -t = 338.0000, H(p,q)-H0 = 0.0000002047508827, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf -t = 339.0000, H(p,q)-H0 = 0.0000001654084074, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf -ROOT RETURN: t = 339.1781 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 339.1781, H(p,q)-H0 = 0.0000000638284305, L(p,q)-L0 = 0.0000000001128619, Q(p,q)-Q0 = inf -t = 340.0000, H(p,q)-H0 = 0.0000002025513762, L(p,q)-L0 = -0.0000000000000124, Q(p,q)-Q0 = inf -ROOT RETURN: t = 340.3228 g[0] = -1, y[0] = -0.658666, y[1] = 0.798666 -t = 340.3228, H(p,q)-H0 = 0.0000002044261508, L(p,q)-L0 = 0.0000000000004504, Q(p,q)-Q0 = inf -t = 341.0000, H(p,q)-H0 = 0.0000002049058191, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf -t = 342.0000, H(p,q)-H0 = 0.0000002049710202, L(p,q)-L0 = -0.0000000000000143, Q(p,q)-Q0 = inf -t = 343.0000, H(p,q)-H0 = 0.0000002049685768, L(p,q)-L0 = -0.0000000000000135, Q(p,q)-Q0 = inf -t = 344.0000, H(p,q)-H0 = 0.0000002048766713, L(p,q)-L0 = -0.0000000000000129, Q(p,q)-Q0 = inf -t = 345.0000, H(p,q)-H0 = 0.0000001997596439, L(p,q)-L0 = -0.0000000000000121, Q(p,q)-Q0 = inf -ROOT RETURN: t = 345.4612 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 345.4612, H(p,q)-H0 = 0.0000000601931085, L(p,q)-L0 = 0.0000000002020891, Q(p,q)-Q0 = inf -t = 346.0000, H(p,q)-H0 = 0.0000001905399427, L(p,q)-L0 = -0.0000000000000119, Q(p,q)-Q0 = inf -ROOT RETURN: t = 346.6060 g[0] = -1, y[0] = -0.658667, y[1] = 0.798667 -t = 346.6060, H(p,q)-H0 = 0.0000002044121343, L(p,q)-L0 = 0.0000000000001991, Q(p,q)-Q0 = inf -t = 347.0000, H(p,q)-H0 = 0.0000002048248616, L(p,q)-L0 = -0.0000000000000124, Q(p,q)-Q0 = inf -t = 348.0000, H(p,q)-H0 = 0.0000002049646229, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf -t = 349.0000, H(p,q)-H0 = 0.0000002049728747, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf -t = 350.0000, H(p,q)-H0 = 0.0000002049280354, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf -t = 351.0000, H(p,q)-H0 = 0.0000002038269655, L(p,q)-L0 = -0.0000000000000147, Q(p,q)-Q0 = inf -ROOT RETURN: t = 351.7444 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 351.7444, H(p,q)-H0 = 0.0000000607532638, L(p,q)-L0 = 0.0000000004108887, Q(p,q)-Q0 = inf -t = 352.0000, H(p,q)-H0 = 0.0000000828883553, L(p,q)-L0 = -0.0000000000000149, Q(p,q)-Q0 = inf -ROOT RETURN: t = 352.8892 g[0] = -1, y[0] = -0.658668, y[1] = 0.798668 -t = 352.8892, H(p,q)-H0 = 0.0000002044163495, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf -t = 353.0000, H(p,q)-H0 = 0.0000002046048115, L(p,q)-L0 = -0.0000000000000150, Q(p,q)-Q0 = inf -t = 354.0000, H(p,q)-H0 = 0.0000002049522198, L(p,q)-L0 = -0.0000000000000148, Q(p,q)-Q0 = inf -t = 355.0000, H(p,q)-H0 = 0.0000002049741721, L(p,q)-L0 = -0.0000000000000144, Q(p,q)-Q0 = inf -t = 356.0000, H(p,q)-H0 = 0.0000002049522424, L(p,q)-L0 = -0.0000000000000134, Q(p,q)-Q0 = inf -t = 357.0000, H(p,q)-H0 = 0.0000002046052839, L(p,q)-L0 = -0.0000000000000148, Q(p,q)-Q0 = inf -t = 358.0000, H(p,q)-H0 = 0.0000000831739333, L(p,q)-L0 = -0.0000000000000158, Q(p,q)-Q0 = inf -ROOT RETURN: t = 358.0276 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 358.0276, H(p,q)-H0 = 0.0000000644103064, L(p,q)-L0 = 0.0000000001423925, Q(p,q)-Q0 = inf -t = 359.0000, H(p,q)-H0 = 0.0000002038250593, L(p,q)-L0 = -0.0000000000000151, Q(p,q)-Q0 = inf -ROOT RETURN: t = 359.1724 g[0] = -1, y[0] = -0.658668, y[1] = 0.798668 -t = 359.1724, H(p,q)-H0 = 0.0000002044256217, L(p,q)-L0 = 0.0000000000004037, Q(p,q)-Q0 = inf -t = 360.0000, H(p,q)-H0 = 0.0000002049279912, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf -t = 361.0000, H(p,q)-H0 = 0.0000002049728709, L(p,q)-L0 = -0.0000000000000132, Q(p,q)-Q0 = inf -t = 362.0000, H(p,q)-H0 = 0.0000002049646348, L(p,q)-L0 = -0.0000000000000117, Q(p,q)-Q0 = inf -t = 363.0000, H(p,q)-H0 = 0.0000002048250195, L(p,q)-L0 = -0.0000000000000107, Q(p,q)-Q0 = inf -t = 364.0000, H(p,q)-H0 = 0.0000001905779314, L(p,q)-L0 = -0.0000000000000127, Q(p,q)-Q0 = inf -ROOT RETURN: t = 364.3108 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 364.3108, H(p,q)-H0 = 0.0000000606986386, L(p,q)-L0 = 0.0000000001057414, Q(p,q)-Q0 = inf -t = 365.0000, H(p,q)-H0 = 0.0000001997478494, L(p,q)-L0 = -0.0000000000000125, Q(p,q)-Q0 = inf -ROOT RETURN: t = 365.4556 g[0] = -1, y[0] = -0.658669, y[1] = 0.798669 -t = 365.4556, H(p,q)-H0 = 0.0000002044143791, L(p,q)-L0 = 0.0000000000002577, Q(p,q)-Q0 = inf -t = 366.0000, H(p,q)-H0 = 0.0000002048765737, L(p,q)-L0 = -0.0000000000000131, Q(p,q)-Q0 = inf -t = 367.0000, H(p,q)-H0 = 0.0000002049685690, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf -t = 368.0000, H(p,q)-H0 = 0.0000002049710260, L(p,q)-L0 = -0.0000000000000142, Q(p,q)-Q0 = inf -t = 369.0000, H(p,q)-H0 = 0.0000002049058829, L(p,q)-L0 = -0.0000000000000153, Q(p,q)-Q0 = inf -t = 370.0000, H(p,q)-H0 = 0.0000002025560892, L(p,q)-L0 = -0.0000000000000153, Q(p,q)-Q0 = inf -ROOT RETURN: t = 370.5940 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 370.5940, H(p,q)-H0 = 0.0000000599835317, L(p,q)-L0 = 0.0000000004420531, Q(p,q)-Q0 = inf -t = 371.0000, H(p,q)-H0 = 0.0000001652956036, L(p,q)-L0 = -0.0000000000000155, Q(p,q)-Q0 = inf -ROOT RETURN: t = 371.7388 g[0] = -1, y[0] = -0.65867, y[1] = 0.79867 -t = 371.7388, H(p,q)-H0 = 0.0000002044142964, L(p,q)-L0 = -0.0000000000000090, Q(p,q)-Q0 = inf -t = 372.0000, H(p,q)-H0 = 0.0000002047506180, L(p,q)-L0 = -0.0000000000000171, Q(p,q)-Q0 = inf -t = 373.0000, H(p,q)-H0 = 0.0000002049597858, L(p,q)-L0 = -0.0000000000000173, Q(p,q)-Q0 = inf -t = 374.0000, H(p,q)-H0 = 0.0000002049738052, L(p,q)-L0 = -0.0000000000000178, Q(p,q)-Q0 = inf -t = 375.0000, H(p,q)-H0 = 0.0000002049414712, L(p,q)-L0 = -0.0000000000000167, Q(p,q)-Q0 = inf -t = 376.0000, H(p,q)-H0 = 0.0000002043245866, L(p,q)-L0 = -0.0000000000000167, Q(p,q)-Q0 = inf -ROOT RETURN: t = 376.8772 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 376.8772, H(p,q)-H0 = 0.0000000646858112, L(p,q)-L0 = 0.0000000001719540, Q(p,q)-Q0 = inf -t = 377.0000, H(p,q)-H0 = 0.0000000004547589, L(p,q)-L0 = -0.0000000000000170, Q(p,q)-Q0 = inf -t = 378.0000, H(p,q)-H0 = 0.0000002043678941, L(p,q)-L0 = -0.0000000000000165, Q(p,q)-Q0 = inf -ROOT RETURN: t = 378.0219 g[0] = -1, y[0] = -0.658671, y[1] = 0.798671 -t = 378.0219, H(p,q)-H0 = 0.0000002044243321, L(p,q)-L0 = 0.0000000000003318, Q(p,q)-Q0 = inf -t = 379.0000, H(p,q)-H0 = 0.0000002049429178, L(p,q)-L0 = -0.0000000000000162, Q(p,q)-Q0 = inf -t = 380.0000, H(p,q)-H0 = 0.0000002049738838, L(p,q)-L0 = -0.0000000000000171, Q(p,q)-Q0 = inf -t = 381.0000, H(p,q)-H0 = 0.0000002049590409, L(p,q)-L0 = -0.0000000000000177, Q(p,q)-Q0 = inf -t = 382.0000, H(p,q)-H0 = 0.0000002047379524, L(p,q)-L0 = -0.0000000000000173, Q(p,q)-Q0 = inf -t = 383.0000, H(p,q)-H0 = 0.0000001595165064, L(p,q)-L0 = -0.0000000000000178, Q(p,q)-Q0 = inf -ROOT RETURN: t = 383.1604 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 383.1604, H(p,q)-H0 = 0.0000000609938942, L(p,q)-L0 = 0.0000000000279561, Q(p,q)-Q0 = inf -t = 384.0000, H(p,q)-H0 = 0.0000002027688805, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf -ROOT RETURN: t = 384.3051 g[0] = -1, y[0] = -0.658671, y[1] = 0.798671 -t = 384.3051, H(p,q)-H0 = 0.0000002044169287, L(p,q)-L0 = 0.0000000000003102, Q(p,q)-Q0 = inf -t = 385.0000, H(p,q)-H0 = 0.0000002049089137, L(p,q)-L0 = -0.0000000000000190, Q(p,q)-Q0 = inf -t = 386.0000, H(p,q)-H0 = 0.0000002049712746, L(p,q)-L0 = -0.0000000000000180, Q(p,q)-Q0 = inf -t = 387.0000, H(p,q)-H0 = 0.0000002049681721, L(p,q)-L0 = -0.0000000000000184, Q(p,q)-Q0 = inf -t = 388.0000, H(p,q)-H0 = 0.0000002048718055, L(p,q)-L0 = -0.0000000000000195, Q(p,q)-Q0 = inf -t = 389.0000, H(p,q)-H0 = 0.0000001991466010, L(p,q)-L0 = -0.0000000000000221, Q(p,q)-Q0 = inf -ROOT RETURN: t = 389.4436 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 389.4436, H(p,q)-H0 = 0.0000000593941551, L(p,q)-L0 = 0.0000000004607547, Q(p,q)-Q0 = inf -t = 390.0000, H(p,q)-H0 = 0.0000001922671196, L(p,q)-L0 = -0.0000000000000223, Q(p,q)-Q0 = inf -ROOT RETURN: t = 390.5883 g[0] = -1, y[0] = -0.658672, y[1] = 0.798672 -t = 390.5883, H(p,q)-H0 = 0.0000002044121997, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf -t = 391.0000, H(p,q)-H0 = 0.0000002048323380, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf -t = 392.0000, H(p,q)-H0 = 0.0000002049651432, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf -t = 393.0000, H(p,q)-H0 = 0.0000002049726853, L(p,q)-L0 = -0.0000000000000222, Q(p,q)-Q0 = inf -t = 394.0000, H(p,q)-H0 = 0.0000002049258560, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf -t = 395.0000, H(p,q)-H0 = 0.0000002037294383, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf -ROOT RETURN: t = 395.7268 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 395.7268, H(p,q)-H0 = 0.0000000646346592, L(p,q)-L0 = 0.0000000002030187, Q(p,q)-Q0 = inf -t = 396.0000, H(p,q)-H0 = 0.0000000964451048, L(p,q)-L0 = -0.0000000000000210, Q(p,q)-Q0 = inf -ROOT RETURN: t = 396.8715 g[0] = -1, y[0] = -0.658673, y[1] = 0.798673 -t = 396.8715, H(p,q)-H0 = 0.0000002044224715, L(p,q)-L0 = 0.0000000000002383, Q(p,q)-Q0 = inf -t = 397.0000, H(p,q)-H0 = 0.0000002046269864, L(p,q)-L0 = -0.0000000000000219, Q(p,q)-Q0 = inf -t = 398.0000, H(p,q)-H0 = 0.0000002049532364, L(p,q)-L0 = -0.0000000000000210, Q(p,q)-Q0 = inf -t = 399.0000, H(p,q)-H0 = 0.0000002049741514, L(p,q)-L0 = -0.0000000000000208, Q(p,q)-Q0 = inf -t = 400.0000, H(p,q)-H0 = 0.0000002049511520, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf -t = 401.0000, H(p,q)-H0 = 0.0000002045813517, L(p,q)-L0 = -0.0000000000000199, Q(p,q)-Q0 = inf -t = 402.0000, H(p,q)-H0 = 0.0000000690049708, L(p,q)-L0 = -0.0000000000000201, Q(p,q)-Q0 = inf -ROOT RETURN: t = 402.0099 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 402.0099, H(p,q)-H0 = 0.0000000608695789, L(p,q)-L0 = 0.0000000000002069, Q(p,q)-Q0 = inf -t = 403.0000, H(p,q)-H0 = 0.0000002039135453, L(p,q)-L0 = -0.0000000000000211, Q(p,q)-Q0 = inf -ROOT RETURN: t = 403.1547 g[0] = -1, y[0] = -0.658674, y[1] = 0.798674 -t = 403.1547, H(p,q)-H0 = 0.0000002044195616, L(p,q)-L0 = 0.0000000000003656, Q(p,q)-Q0 = inf -t = 404.0000, H(p,q)-H0 = 0.0000002049300435, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf -t = 405.0000, H(p,q)-H0 = 0.0000002049730176, L(p,q)-L0 = -0.0000000000000203, Q(p,q)-Q0 = inf -t = 406.0000, H(p,q)-H0 = 0.0000002049640583, L(p,q)-L0 = -0.0000000000000204, Q(p,q)-Q0 = inf -t = 407.0000, H(p,q)-H0 = 0.0000002048170465, L(p,q)-L0 = -0.0000000000000204, Q(p,q)-Q0 = inf -t = 408.0000, H(p,q)-H0 = 0.0000001885889234, L(p,q)-L0 = -0.0000000000000208, Q(p,q)-Q0 = inf -ROOT RETURN: t = 408.2931 g[0] = 1, y[0] = 0.361058, y[1] = -0.221058 -t = 408.2931, H(p,q)-H0 = 0.0000000590364697, L(p,q)-L0 = 0.0000000004619620, Q(p,q)-Q0 = inf -t = 409.0000, H(p,q)-H0 = 0.0000002002877644, L(p,q)-L0 = -0.0000000000000207, Q(p,q)-Q0 = inf -ROOT RETURN: t = 409.4379 g[0] = -1, y[0] = -0.658674, y[1] = 0.798674 -t = 409.4379, H(p,q)-H0 = 0.0000002044105160, L(p,q)-L0 = 0.0000000000000117, Q(p,q)-Q0 = inf -t = 410.0000, H(p,q)-H0 = 0.0000002048811595, L(p,q)-L0 = -0.0000000000000211, Q(p,q)-Q0 = inf -t = 411.0000, H(p,q)-H0 = 0.0000002049689338, L(p,q)-L0 = -0.0000000000000207, Q(p,q)-Q0 = inf -t = 412.0000, H(p,q)-H0 = 0.0000002049707349, L(p,q)-L0 = -0.0000000000000221, Q(p,q)-Q0 = inf -t = 413.0000, H(p,q)-H0 = 0.0000002049026068, L(p,q)-L0 = -0.0000000000000222, Q(p,q)-Q0 = inf -t = 414.0000, H(p,q)-H0 = 0.0000002023127402, L(p,q)-L0 = -0.0000000000000231, Q(p,q)-Q0 = inf -ROOT RETURN: t = 414.5763 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 414.5763, H(p,q)-H0 = 0.0000000642771920, L(p,q)-L0 = 0.0000000002369149, Q(p,q)-Q0 = inf -t = 415.0000, H(p,q)-H0 = 0.0000001704283707, L(p,q)-L0 = -0.0000000000000231, Q(p,q)-Q0 = inf -ROOT RETURN: t = 415.7211 g[0] = -1, y[0] = -0.658675, y[1] = 0.798675 -t = 415.7211, H(p,q)-H0 = 0.0000002044203883, L(p,q)-L0 = 0.0000000000001406, Q(p,q)-Q0 = inf -t = 416.0000, H(p,q)-H0 = 0.0000002047627068, L(p,q)-L0 = -0.0000000000000224, Q(p,q)-Q0 = inf -t = 417.0000, H(p,q)-H0 = 0.0000002049605110, L(p,q)-L0 = -0.0000000000000216, Q(p,q)-Q0 = inf -t = 418.0000, H(p,q)-H0 = 0.0000002049737086, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf -t = 419.0000, H(p,q)-H0 = 0.0000002049399215, L(p,q)-L0 = -0.0000000000000240, Q(p,q)-Q0 = inf -t = 420.0000, H(p,q)-H0 = 0.0000002042763687, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf -ROOT RETURN: t = 420.8595 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 420.8595, H(p,q)-H0 = 0.0000000610430280, L(p,q)-L0 = 0.0000000000138701, Q(p,q)-Q0 = inf -t = 421.0000, H(p,q)-H0 = 0.0000000041502268, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf -t = 422.0000, H(p,q)-H0 = 0.0000002044084960, L(p,q)-L0 = -0.0000000000000212, Q(p,q)-Q0 = inf -ROOT RETURN: t = 422.0043 g[0] = -1, y[0] = -0.658676, y[1] = 0.798676 -t = 422.0043, H(p,q)-H0 = 0.0000002044220221, L(p,q)-L0 = 0.0000000000004128, Q(p,q)-Q0 = inf -t = 423.0000, H(p,q)-H0 = 0.0000002049443271, L(p,q)-L0 = -0.0000000000000228, Q(p,q)-Q0 = inf -t = 424.0000, H(p,q)-H0 = 0.0000002049739491, L(p,q)-L0 = -0.0000000000000224, Q(p,q)-Q0 = inf -t = 425.0000, H(p,q)-H0 = 0.0000002049582449, L(p,q)-L0 = -0.0000000000000231, Q(p,q)-Q0 = inf -t = 426.0000, H(p,q)-H0 = 0.0000002047241099, L(p,q)-L0 = -0.0000000000000224, Q(p,q)-Q0 = inf -t = 427.0000, H(p,q)-H0 = 0.0000001527563975, L(p,q)-L0 = -0.0000000000000211, Q(p,q)-Q0 = inf -ROOT RETURN: t = 427.1427 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 427.1427, H(p,q)-H0 = 0.0000000589368900, L(p,q)-L0 = 0.0000000004413743, Q(p,q)-Q0 = inf -t = 428.0000, H(p,q)-H0 = 0.0000002029632324, L(p,q)-L0 = -0.0000000000000220, Q(p,q)-Q0 = inf -ROOT RETURN: t = 428.2875 g[0] = -1, y[0] = -0.658677, y[1] = 0.798677 -t = 428.2875, H(p,q)-H0 = 0.0000002044095015, L(p,q)-L0 = 0.0000000000000352, Q(p,q)-Q0 = inf -t = 429.0000, H(p,q)-H0 = 0.0000002049118702, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf -t = 430.0000, H(p,q)-H0 = 0.0000002049715269, L(p,q)-L0 = -0.0000000000000210, Q(p,q)-Q0 = inf -t = 431.0000, H(p,q)-H0 = 0.0000002049677619, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf -t = 432.0000, H(p,q)-H0 = 0.0000002048666779, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf -t = 433.0000, H(p,q)-H0 = 0.0000001984473550, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf -ROOT RETURN: t = 433.4259 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 433.4259, H(p,q)-H0 = 0.0000000636645177, L(p,q)-L0 = 0.0000000002742785, Q(p,q)-Q0 = inf -t = 434.0000, H(p,q)-H0 = 0.0000001937643357, L(p,q)-L0 = -0.0000000000000233, Q(p,q)-Q0 = inf -ROOT RETURN: t = 434.5707 g[0] = -1, y[0] = -0.658677, y[1] = 0.798677 -t = 434.5707, H(p,q)-H0 = 0.0000002044185564, L(p,q)-L0 = 0.0000000000000494, Q(p,q)-Q0 = inf -t = 435.0000, H(p,q)-H0 = 0.0000002048394011, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf -t = 436.0000, H(p,q)-H0 = 0.0000002049656668, L(p,q)-L0 = -0.0000000000000212, Q(p,q)-Q0 = inf -t = 437.0000, H(p,q)-H0 = 0.0000002049725072, L(p,q)-L0 = -0.0000000000000214, Q(p,q)-Q0 = inf -t = 438.0000, H(p,q)-H0 = 0.0000002049235960, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf -t = 439.0000, H(p,q)-H0 = 0.0000002036216028, L(p,q)-L0 = -0.0000000000000242, Q(p,q)-Q0 = inf -ROOT RETURN: t = 439.7091 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 439.7091, H(p,q)-H0 = 0.0000000617469929, L(p,q)-L0 = 0.0000000000400058, Q(p,q)-Q0 = inf -t = 440.0000, H(p,q)-H0 = 0.0000001091026891, L(p,q)-L0 = -0.0000000000000249, Q(p,q)-Q0 = inf -ROOT RETURN: t = 440.8539 g[0] = -1, y[0] = -0.658678, y[1] = 0.798678 -t = 440.8539, H(p,q)-H0 = 0.0000002044240650, L(p,q)-L0 = 0.0000000000004431, Q(p,q)-Q0 = inf -t = 441.0000, H(p,q)-H0 = 0.0000002046475669, L(p,q)-L0 = -0.0000000000000251, Q(p,q)-Q0 = inf -t = 442.0000, H(p,q)-H0 = 0.0000002049542267, L(p,q)-L0 = -0.0000000000000241, Q(p,q)-Q0 = inf -t = 443.0000, H(p,q)-H0 = 0.0000002049741364, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf -t = 444.0000, H(p,q)-H0 = 0.0000002049500319, L(p,q)-L0 = -0.0000000000000225, Q(p,q)-Q0 = inf -t = 445.0000, H(p,q)-H0 = 0.0000002045555053, L(p,q)-L0 = -0.0000000000000236, Q(p,q)-Q0 = inf -ROOT RETURN: t = 445.9923 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 445.9923, H(p,q)-H0 = 0.0000000590919167, L(p,q)-L0 = 0.0000000003964340, Q(p,q)-Q0 = inf -t = 446.0000, H(p,q)-H0 = 0.0000000546196970, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf -t = 447.0000, H(p,q)-H0 = 0.0000002039938343, L(p,q)-L0 = -0.0000000000000233, Q(p,q)-Q0 = inf -ROOT RETURN: t = 447.1370 g[0] = -1, y[0] = -0.658679, y[1] = 0.798679 -t = 447.1370, H(p,q)-H0 = 0.0000002044092972, L(p,q)-L0 = 0.0000000000000677, Q(p,q)-Q0 = inf -t = 448.0000, H(p,q)-H0 = 0.0000002049320150, L(p,q)-L0 = -0.0000000000000233, Q(p,q)-Q0 = inf -t = 449.0000, H(p,q)-H0 = 0.0000002049731661, L(p,q)-L0 = -0.0000000000000231, Q(p,q)-Q0 = inf -t = 450.0000, H(p,q)-H0 = 0.0000002049634732, L(p,q)-L0 = -0.0000000000000229, Q(p,q)-Q0 = inf -t = 451.0000, H(p,q)-H0 = 0.0000002048085815, L(p,q)-L0 = -0.0000000000000225, Q(p,q)-Q0 = inf -t = 452.0000, H(p,q)-H0 = 0.0000001862894685, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf -ROOT RETURN: t = 452.2755 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 452.2755, H(p,q)-H0 = 0.0000000628692318, L(p,q)-L0 = 0.0000000003146889, Q(p,q)-Q0 = inf -t = 453.0000, H(p,q)-H0 = 0.0000002007629903, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf -ROOT RETURN: t = 453.4202 g[0] = -1, y[0] = -0.65868, y[1] = 0.79868 -t = 453.4202, H(p,q)-H0 = 0.0000002044176431, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf -t = 454.0000, H(p,q)-H0 = 0.0000002048855108, L(p,q)-L0 = -0.0000000000000234, Q(p,q)-Q0 = inf -t = 455.0000, H(p,q)-H0 = 0.0000002049692897, L(p,q)-L0 = -0.0000000000000233, Q(p,q)-Q0 = inf -t = 456.0000, H(p,q)-H0 = 0.0000002049704385, L(p,q)-L0 = -0.0000000000000242, Q(p,q)-Q0 = inf -t = 457.0000, H(p,q)-H0 = 0.0000002048991696, L(p,q)-L0 = -0.0000000000000223, Q(p,q)-Q0 = inf -t = 458.0000, H(p,q)-H0 = 0.0000002020393404, L(p,q)-L0 = -0.0000000000000228, Q(p,q)-Q0 = inf -ROOT RETURN: t = 458.5586 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 458.5586, H(p,q)-H0 = 0.0000000626553203, L(p,q)-L0 = 0.0000000000705055, Q(p,q)-Q0 = inf -t = 459.0000, H(p,q)-H0 = 0.0000001748763359, L(p,q)-L0 = -0.0000000000000235, Q(p,q)-Q0 = inf -ROOT RETURN: t = 459.7034 g[0] = -1, y[0] = -0.658681, y[1] = 0.798681 -t = 459.7034, H(p,q)-H0 = 0.0000002044254995, L(p,q)-L0 = 0.0000000000004602, Q(p,q)-Q0 = inf -t = 460.0000, H(p,q)-H0 = 0.0000002047740164, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf -t = 461.0000, H(p,q)-H0 = 0.0000002049612067, L(p,q)-L0 = -0.0000000000000209, Q(p,q)-Q0 = inf -t = 462.0000, H(p,q)-H0 = 0.0000002049736028, L(p,q)-L0 = -0.0000000000000208, Q(p,q)-Q0 = inf -t = 463.0000, H(p,q)-H0 = 0.0000002049383057, L(p,q)-L0 = -0.0000000000000211, Q(p,q)-Q0 = inf -t = 464.0000, H(p,q)-H0 = 0.0000002042236770, L(p,q)-L0 = -0.0000000000000207, Q(p,q)-Q0 = inf -ROOT RETURN: t = 464.8418 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 464.8418, H(p,q)-H0 = 0.0000000594637291, L(p,q)-L0 = 0.0000000003274908, Q(p,q)-Q0 = inf -t = 465.0000, H(p,q)-H0 = 0.0000000112798064, L(p,q)-L0 = -0.0000000000000220, Q(p,q)-Q0 = inf -ROOT RETURN: t = 465.9866 g[0] = -1, y[0] = -0.658681, y[1] = 0.798681 -t = 465.9866, H(p,q)-H0 = 0.0000002044099220, L(p,q)-L0 = 0.0000000000001109, Q(p,q)-Q0 = inf -t = 466.0000, H(p,q)-H0 = 0.0000002044457960, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf -t = 467.0000, H(p,q)-H0 = 0.0000002049456716, L(p,q)-L0 = -0.0000000000000220, Q(p,q)-Q0 = inf -t = 468.0000, H(p,q)-H0 = 0.0000002049739987, L(p,q)-L0 = -0.0000000000000210, Q(p,q)-Q0 = inf -t = 469.0000, H(p,q)-H0 = 0.0000002049574120, L(p,q)-L0 = -0.0000000000000197, Q(p,q)-Q0 = inf -t = 470.0000, H(p,q)-H0 = 0.0000002047092674, L(p,q)-L0 = -0.0000000000000199, Q(p,q)-Q0 = inf -t = 471.0000, H(p,q)-H0 = 0.0000001450356866, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf -ROOT RETURN: t = 471.1250 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 471.1250, H(p,q)-H0 = 0.0000000619766440, L(p,q)-L0 = 0.0000000003564797, Q(p,q)-Q0 = inf -t = 472.0000, H(p,q)-H0 = 0.0000002031372175, L(p,q)-L0 = -0.0000000000000184, Q(p,q)-Q0 = inf -ROOT RETURN: t = 472.2698 g[0] = -1, y[0] = -0.658682, y[1] = 0.798682 -t = 472.2698, H(p,q)-H0 = 0.0000002044180308, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf -t = 473.0000, H(p,q)-H0 = 0.0000002049146776, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf -t = 474.0000, H(p,q)-H0 = 0.0000002049717569, L(p,q)-L0 = -0.0000000000000218, Q(p,q)-Q0 = inf -t = 475.0000, H(p,q)-H0 = 0.0000002049673254, L(p,q)-L0 = -0.0000000000000216, Q(p,q)-Q0 = inf -t = 476.0000, H(p,q)-H0 = 0.0000002048612460, L(p,q)-L0 = -0.0000000000000209, Q(p,q)-Q0 = inf -t = 477.0000, H(p,q)-H0 = 0.0000001976481795, L(p,q)-L0 = -0.0000000000000219, Q(p,q)-Q0 = inf -ROOT RETURN: t = 477.4082 g[0] = 1, y[0] = 0.361057, y[1] = -0.221057 -t = 477.4082, H(p,q)-H0 = 0.0000000635311066, L(p,q)-L0 = 0.0000000001012948, Q(p,q)-Q0 = inf -t = 478.0000, H(p,q)-H0 = 0.0000001950639985, L(p,q)-L0 = -0.0000000000000226, Q(p,q)-Q0 = inf -ROOT RETURN: t = 478.5530 g[0] = -1, y[0] = -0.658683, y[1] = 0.798683 -t = 478.5530, H(p,q)-H0 = 0.0000002044261806, L(p,q)-L0 = 0.0000000000004522, Q(p,q)-Q0 = inf -t = 479.0000, H(p,q)-H0 = 0.0000002048460433, L(p,q)-L0 = -0.0000000000000221, Q(p,q)-Q0 = inf -t = 480.0000, H(p,q)-H0 = 0.0000002049661542, L(p,q)-L0 = -0.0000000000000213, Q(p,q)-Q0 = inf -t = 481.0000, H(p,q)-H0 = 0.0000002049723031, L(p,q)-L0 = -0.0000000000000209, Q(p,q)-Q0 = inf -t = 482.0000, H(p,q)-H0 = 0.0000002049212155, L(p,q)-L0 = -0.0000000000000193, Q(p,q)-Q0 = inf -t = 483.0000, H(p,q)-H0 = 0.0000002035021286, L(p,q)-L0 = -0.0000000000000192, Q(p,q)-Q0 = inf -ROOT RETURN: t = 483.6914 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 483.6914, H(p,q)-H0 = 0.0000000599764485, L(p,q)-L0 = 0.0000000002391616, Q(p,q)-Q0 = inf -t = 484.0000, H(p,q)-H0 = 0.0000001207010087, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf -ROOT RETURN: t = 484.8362 g[0] = -1, y[0] = -0.658684, y[1] = 0.798684 -t = 484.8362, H(p,q)-H0 = 0.0000002044113280, L(p,q)-L0 = 0.0000000000001663, Q(p,q)-Q0 = inf -t = 485.0000, H(p,q)-H0 = 0.0000002046666733, L(p,q)-L0 = -0.0000000000000190, Q(p,q)-Q0 = inf -t = 486.0000, H(p,q)-H0 = 0.0000002049551729, L(p,q)-L0 = -0.0000000000000202, Q(p,q)-Q0 = inf -t = 487.0000, H(p,q)-H0 = 0.0000002049741070, L(p,q)-L0 = -0.0000000000000200, Q(p,q)-Q0 = inf -t = 488.0000, H(p,q)-H0 = 0.0000002049488583, L(p,q)-L0 = -0.0000000000000207, Q(p,q)-Q0 = inf -t = 489.0000, H(p,q)-H0 = 0.0000002045275332, L(p,q)-L0 = -0.0000000000000204, Q(p,q)-Q0 = inf -ROOT RETURN: t = 489.9746 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 489.9746, H(p,q)-H0 = 0.0000000610765312, L(p,q)-L0 = 0.0000000003966991, Q(p,q)-Q0 = inf -t = 490.0000, H(p,q)-H0 = 0.0000000405720648, L(p,q)-L0 = -0.0000000000000201, Q(p,q)-Q0 = inf -t = 491.0000, H(p,q)-H0 = 0.0000002040667898, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf -ROOT RETURN: t = 491.1194 g[0] = -1, y[0] = -0.658684, y[1] = 0.798684 -t = 491.1194, H(p,q)-H0 = 0.0000002044172050, L(p,q)-L0 = -0.0000000000000174, Q(p,q)-Q0 = inf -t = 492.0000, H(p,q)-H0 = 0.0000002049338971, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf -t = 493.0000, H(p,q)-H0 = 0.0000002049733009, L(p,q)-L0 = -0.0000000000000197, Q(p,q)-Q0 = inf -t = 494.0000, H(p,q)-H0 = 0.0000002049628611, L(p,q)-L0 = -0.0000000000000195, Q(p,q)-Q0 = inf -t = 495.0000, H(p,q)-H0 = 0.0000002047995677, L(p,q)-L0 = -0.0000000000000193, Q(p,q)-Q0 = inf -t = 496.0000, H(p,q)-H0 = 0.0000001836292873, L(p,q)-L0 = -0.0000000000000192, Q(p,q)-Q0 = inf -ROOT RETURN: t = 496.2578 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 496.2578, H(p,q)-H0 = 0.0000000642148157, L(p,q)-L0 = 0.0000000001311291, Q(p,q)-Q0 = inf -t = 497.0000, H(p,q)-H0 = 0.0000002011821281, L(p,q)-L0 = -0.0000000000000189, Q(p,q)-Q0 = inf -ROOT RETURN: t = 497.4026 g[0] = -1, y[0] = -0.658685, y[1] = 0.798685 -t = 497.4026, H(p,q)-H0 = 0.0000002044260460, L(p,q)-L0 = 0.0000000000004220, Q(p,q)-Q0 = inf -t = 498.0000, H(p,q)-H0 = 0.0000002048896410, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf -t = 499.0000, H(p,q)-H0 = 0.0000002049696360, L(p,q)-L0 = -0.0000000000000188, Q(p,q)-Q0 = inf -t = 500.0000, H(p,q)-H0 = 0.0000002049701333, L(p,q)-L0 = -0.0000000000000198, Q(p,q)-Q0 = inf -t = 501.0000, H(p,q)-H0 = 0.0000002048955550, L(p,q)-L0 = -0.0000000000000191, Q(p,q)-Q0 = inf -t = 502.0000, H(p,q)-H0 = 0.0000002017315639, L(p,q)-L0 = -0.0000000000000178, Q(p,q)-Q0 = inf -ROOT RETURN: t = 502.5410 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 502.5410, H(p,q)-H0 = 0.0000000605130261, L(p,q)-L0 = 0.0000000001419109, Q(p,q)-Q0 = inf -t = 503.0000, H(p,q)-H0 = 0.0000001787247448, L(p,q)-L0 = -0.0000000000000167, Q(p,q)-Q0 = inf -ROOT RETURN: t = 503.6858 g[0] = -1, y[0] = -0.658686, y[1] = 0.798686 -t = 503.6858, H(p,q)-H0 = 0.0000002044133574, L(p,q)-L0 = 0.0000000000002266, Q(p,q)-Q0 = inf -t = 504.0000, H(p,q)-H0 = 0.0000002047846222, L(p,q)-L0 = -0.0000000000000150, Q(p,q)-Q0 = inf -t = 505.0000, H(p,q)-H0 = 0.0000002049618872, L(p,q)-L0 = -0.0000000000000155, Q(p,q)-Q0 = inf -t = 506.0000, H(p,q)-H0 = 0.0000002049734990, L(p,q)-L0 = -0.0000000000000140, Q(p,q)-Q0 = inf -t = 507.0000, H(p,q)-H0 = 0.0000002049366312, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf -t = 508.0000, H(p,q)-H0 = 0.0000002041660218, L(p,q)-L0 = -0.0000000000000129, Q(p,q)-Q0 = inf -ROOT RETURN: t = 508.8242 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 508.8242, H(p,q)-H0 = 0.0000000602554537, L(p,q)-L0 = 0.0000000004312937, Q(p,q)-Q0 = inf -t = 509.0000, H(p,q)-H0 = 0.0000000212932962, L(p,q)-L0 = -0.0000000000000137, Q(p,q)-Q0 = inf -ROOT RETURN: t = 509.9690 g[0] = -1, y[0] = -0.658687, y[1] = 0.798687 -t = 509.9690, H(p,q)-H0 = 0.0000002044153787, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf -t = 510.0000, H(p,q)-H0 = 0.0000002044801354, L(p,q)-L0 = -0.0000000000000150, Q(p,q)-Q0 = inf -t = 511.0000, H(p,q)-H0 = 0.0000002049469784, L(p,q)-L0 = -0.0000000000000155, Q(p,q)-Q0 = inf -t = 512.0000, H(p,q)-H0 = 0.0000002049740561, L(p,q)-L0 = -0.0000000000000148, Q(p,q)-Q0 = inf -t = 513.0000, H(p,q)-H0 = 0.0000002049565601, L(p,q)-L0 = -0.0000000000000163, Q(p,q)-Q0 = inf -t = 514.0000, H(p,q)-H0 = 0.0000002046933604, L(p,q)-L0 = -0.0000000000000151, Q(p,q)-Q0 = inf -t = 515.0000, H(p,q)-H0 = 0.0000001362713660, L(p,q)-L0 = -0.0000000000000135, Q(p,q)-Q0 = inf -ROOT RETURN: t = 515.1074 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 515.1074, H(p,q)-H0 = 0.0000000646128797, L(p,q)-L0 = 0.0000000001605260, Q(p,q)-Q0 = inf -t = 516.0000, H(p,q)-H0 = 0.0000002032932722, L(p,q)-L0 = -0.0000000000000147, Q(p,q)-Q0 = inf -ROOT RETURN: t = 516.2521 g[0] = -1, y[0] = -0.658687, y[1] = 0.798687 -t = 516.2521, H(p,q)-H0 = 0.0000002044251016, L(p,q)-L0 = 0.0000000000003686, Q(p,q)-Q0 = inf -t = 517.0000, H(p,q)-H0 = 0.0000002049173617, L(p,q)-L0 = -0.0000000000000141, Q(p,q)-Q0 = inf -t = 518.0000, H(p,q)-H0 = 0.0000002049719885, L(p,q)-L0 = -0.0000000000000139, Q(p,q)-Q0 = inf -t = 519.0000, H(p,q)-H0 = 0.0000002049668832, L(p,q)-L0 = -0.0000000000000139, Q(p,q)-Q0 = inf -t = 520.0000, H(p,q)-H0 = 0.0000002048555080, L(p,q)-L0 = -0.0000000000000150, Q(p,q)-Q0 = inf -t = 521.0000, H(p,q)-H0 = 0.0000001967330823, L(p,q)-L0 = -0.0000000000000135, Q(p,q)-Q0 = inf -ROOT RETURN: t = 521.3905 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 521.3905, H(p,q)-H0 = 0.0000000609128965, L(p,q)-L0 = 0.0000000000538399, Q(p,q)-Q0 = inf -t = 522.0000, H(p,q)-H0 = 0.0000001961939631, L(p,q)-L0 = -0.0000000000000138, Q(p,q)-Q0 = inf -ROOT RETURN: t = 522.5353 g[0] = -1, y[0] = -0.658688, y[1] = 0.798688 -t = 522.5353, H(p,q)-H0 = 0.0000002044157992, L(p,q)-L0 = 0.0000000000002897, Q(p,q)-Q0 = inf -t = 523.0000, H(p,q)-H0 = 0.0000002048523252, L(p,q)-L0 = -0.0000000000000132, Q(p,q)-Q0 = inf -t = 524.0000, H(p,q)-H0 = 0.0000002049666393, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf -t = 525.0000, H(p,q)-H0 = 0.0000002049721043, L(p,q)-L0 = -0.0000000000000133, Q(p,q)-Q0 = inf -t = 526.0000, H(p,q)-H0 = 0.0000002049187332, L(p,q)-L0 = -0.0000000000000140, Q(p,q)-Q0 = inf -t = 527.0000, H(p,q)-H0 = 0.0000002033695515, L(p,q)-L0 = -0.0000000000000139, Q(p,q)-Q0 = inf -ROOT RETURN: t = 527.6737 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 527.6737, H(p,q)-H0 = 0.0000000595896104, L(p,q)-L0 = 0.0000000004553944, Q(p,q)-Q0 = inf -t = 528.0000, H(p,q)-H0 = 0.0000001311727855, L(p,q)-L0 = -0.0000000000000149, Q(p,q)-Q0 = inf -ROOT RETURN: t = 528.8185 g[0] = -1, y[0] = -0.658689, y[1] = 0.798689 -t = 528.8185, H(p,q)-H0 = 0.0000002044132445, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -t = 529.0000, H(p,q)-H0 = 0.0000002046844363, L(p,q)-L0 = -0.0000000000000164, Q(p,q)-Q0 = inf -t = 530.0000, H(p,q)-H0 = 0.0000002049560875, L(p,q)-L0 = -0.0000000000000160, Q(p,q)-Q0 = inf -t = 531.0000, H(p,q)-H0 = 0.0000002049740745, L(p,q)-L0 = -0.0000000000000160, Q(p,q)-Q0 = inf -t = 532.0000, H(p,q)-H0 = 0.0000002049476426, L(p,q)-L0 = -0.0000000000000164, Q(p,q)-Q0 = inf -t = 533.0000, H(p,q)-H0 = 0.0000002044972393, L(p,q)-L0 = -0.0000000000000157, Q(p,q)-Q0 = inf -ROOT RETURN: t = 533.9569 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 533.9569, H(p,q)-H0 = 0.0000000646867151, L(p,q)-L0 = 0.0000000001908389, Q(p,q)-Q0 = inf -t = 534.0000, H(p,q)-H0 = 0.0000000275402194, L(p,q)-L0 = -0.0000000000000138, Q(p,q)-Q0 = inf -t = 535.0000, H(p,q)-H0 = 0.0000002041331950, L(p,q)-L0 = -0.0000000000000147, Q(p,q)-Q0 = inf -ROOT RETURN: t = 535.1017 g[0] = -1, y[0] = -0.65869, y[1] = 0.79869 -t = 535.1017, H(p,q)-H0 = 0.0000002044234820, L(p,q)-L0 = 0.0000000000002882, Q(p,q)-Q0 = inf -t = 536.0000, H(p,q)-H0 = 0.0000002049357004, L(p,q)-L0 = -0.0000000000000154, Q(p,q)-Q0 = inf -t = 537.0000, H(p,q)-H0 = 0.0000002049734306, L(p,q)-L0 = -0.0000000000000151, Q(p,q)-Q0 = inf -t = 538.0000, H(p,q)-H0 = 0.0000002049622307, L(p,q)-L0 = -0.0000000000000131, Q(p,q)-Q0 = inf -t = 539.0000, H(p,q)-H0 = 0.0000002047899709, L(p,q)-L0 = -0.0000000000000118, Q(p,q)-Q0 = inf -t = 540.0000, H(p,q)-H0 = 0.0000001805507901, L(p,q)-L0 = -0.0000000000000129, Q(p,q)-Q0 = inf -ROOT RETURN: t = 540.2401 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 540.2401, H(p,q)-H0 = 0.0000000609703235, L(p,q)-L0 = 0.0000000000026714, Q(p,q)-Q0 = inf -t = 541.0000, H(p,q)-H0 = 0.0000002015525499, L(p,q)-L0 = -0.0000000000000109, Q(p,q)-Q0 = inf -ROOT RETURN: t = 541.3849 g[0] = -1, y[0] = -0.65869, y[1] = 0.79869 -t = 541.3849, H(p,q)-H0 = 0.0000002044184342, L(p,q)-L0 = 0.0000000000003493, Q(p,q)-Q0 = inf -t = 542.0000, H(p,q)-H0 = 0.0000002048935653, L(p,q)-L0 = -0.0000000000000111, Q(p,q)-Q0 = inf -t = 543.0000, H(p,q)-H0 = 0.0000002049699729, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf -t = 544.0000, H(p,q)-H0 = 0.0000002049698214, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf -t = 545.0000, H(p,q)-H0 = 0.0000002048917546, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf -t = 546.0000, H(p,q)-H0 = 0.0000002013843847, L(p,q)-L0 = -0.0000000000000100, Q(p,q)-Q0 = inf -ROOT RETURN: t = 546.5233 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 546.5233, H(p,q)-H0 = 0.0000000591383988, L(p,q)-L0 = 0.0000000004638913, Q(p,q)-Q0 = inf -t = 547.0000, H(p,q)-H0 = 0.0000001820513573, L(p,q)-L0 = -0.0000000000000102, Q(p,q)-Q0 = inf -ROOT RETURN: t = 547.6681 g[0] = -1, y[0] = -0.658691, y[1] = 0.798691 -t = 547.6681, H(p,q)-H0 = 0.0000002044113361, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf -t = 548.0000, H(p,q)-H0 = 0.0000002047945559, L(p,q)-L0 = -0.0000000000000110, Q(p,q)-Q0 = inf -t = 549.0000, H(p,q)-H0 = 0.0000002049625367, L(p,q)-L0 = -0.0000000000000108, Q(p,q)-Q0 = inf -t = 550.0000, H(p,q)-H0 = 0.0000002049733779, L(p,q)-L0 = -0.0000000000000122, Q(p,q)-Q0 = inf -t = 551.0000, H(p,q)-H0 = 0.0000002049348715, L(p,q)-L0 = -0.0000000000000120, Q(p,q)-Q0 = inf -t = 552.0000, H(p,q)-H0 = 0.0000002041028155, L(p,q)-L0 = -0.0000000000000101, Q(p,q)-Q0 = inf -ROOT RETURN: t = 552.8065 g[0] = 1, y[0] = 0.361056, y[1] = -0.221056 -t = 552.8065, H(p,q)-H0 = 0.0000000644422617, L(p,q)-L0 = 0.0000000002235332, Q(p,q)-Q0 = inf -t = 553.0000, H(p,q)-H0 = 0.0000000334816286, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf -ROOT RETURN: t = 553.9513 g[0] = -1, y[0] = -0.658692, y[1] = 0.798692 -t = 553.9513, H(p,q)-H0 = 0.0000002044214639, L(p,q)-L0 = 0.0000000000002001, Q(p,q)-Q0 = inf -t = 554.0000, H(p,q)-H0 = 0.0000002045117688, L(p,q)-L0 = -0.0000000000000085, Q(p,q)-Q0 = inf -t = 555.0000, H(p,q)-H0 = 0.0000002049482292, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -t = 556.0000, H(p,q)-H0 = 0.0000002049740997, L(p,q)-L0 = -0.0000000000000099, Q(p,q)-Q0 = inf -t = 557.0000, H(p,q)-H0 = 0.0000002049556715, L(p,q)-L0 = -0.0000000000000100, Q(p,q)-Q0 = inf -t = 558.0000, H(p,q)-H0 = 0.0000002046762713, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -t = 559.0000, H(p,q)-H0 = 0.0000001264007636, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf -ROOT RETURN: t = 559.0897 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 559.0897, H(p,q)-H0 = 0.0000000608870159, L(p,q)-L0 = 0.0000000000065596, Q(p,q)-Q0 = inf -t = 560.0000, H(p,q)-H0 = 0.0000002034335030, L(p,q)-L0 = -0.0000000000000083, Q(p,q)-Q0 = inf -ROOT RETURN: t = 560.2345 g[0] = -1, y[0] = -0.658693, y[1] = 0.798693 -t = 560.2345, H(p,q)-H0 = 0.0000002044210043, L(p,q)-L0 = 0.0000000000004056, Q(p,q)-Q0 = inf -t = 561.0000, H(p,q)-H0 = 0.0000002049199195, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf -t = 562.0000, H(p,q)-H0 = 0.0000002049722061, L(p,q)-L0 = -0.0000000000000095, Q(p,q)-Q0 = inf -t = 563.0000, H(p,q)-H0 = 0.0000002049664226, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf -t = 564.0000, H(p,q)-H0 = 0.0000002048494310, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf -t = 565.0000, H(p,q)-H0 = 0.0000001956833013, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -ROOT RETURN: t = 565.3729 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 565.3729, H(p,q)-H0 = 0.0000000589384175, L(p,q)-L0 = 0.0000000004520913, Q(p,q)-Q0 = inf -t = 566.0000, H(p,q)-H0 = 0.0000001971780329, L(p,q)-L0 = -0.0000000000000077, Q(p,q)-Q0 = inf -ROOT RETURN: t = 566.5177 g[0] = -1, y[0] = -0.658694, y[1] = 0.798694 -t = 566.5177, H(p,q)-H0 = 0.0000002044099797, L(p,q)-L0 = 0.0000000000000364, Q(p,q)-Q0 = inf -t = 567.0000, H(p,q)-H0 = 0.0000002048582463, L(p,q)-L0 = -0.0000000000000093, Q(p,q)-Q0 = inf -t = 568.0000, H(p,q)-H0 = 0.0000002049670993, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf -t = 569.0000, H(p,q)-H0 = 0.0000002049718867, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -t = 570.0000, H(p,q)-H0 = 0.0000002049161238, L(p,q)-L0 = -0.0000000000000079, Q(p,q)-Q0 = inf -t = 571.0000, H(p,q)-H0 = 0.0000002032221458, L(p,q)-L0 = -0.0000000000000078, Q(p,q)-Q0 = inf -ROOT RETURN: t = 571.6561 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 571.6561, H(p,q)-H0 = 0.0000000639199307, L(p,q)-L0 = 0.0000000002595532, Q(p,q)-Q0 = inf -t = 572.0000, H(p,q)-H0 = 0.0000001405183583, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf -ROOT RETURN: t = 572.8009 g[0] = -1, y[0] = -0.658694, y[1] = 0.798694 -t = 572.8009, H(p,q)-H0 = 0.0000002044194414, L(p,q)-L0 = 0.0000000000001057, Q(p,q)-Q0 = inf -t = 573.0000, H(p,q)-H0 = 0.0000002047009724, L(p,q)-L0 = -0.0000000000000071, Q(p,q)-Q0 = inf -t = 574.0000, H(p,q)-H0 = 0.0000002049569708, L(p,q)-L0 = -0.0000000000000081, Q(p,q)-Q0 = inf -t = 575.0000, H(p,q)-H0 = 0.0000002049740374, L(p,q)-L0 = -0.0000000000000077, Q(p,q)-Q0 = inf -t = 576.0000, H(p,q)-H0 = 0.0000002049463794, L(p,q)-L0 = -0.0000000000000082, Q(p,q)-Q0 = inf -t = 577.0000, H(p,q)-H0 = 0.0000002044643826, L(p,q)-L0 = -0.0000000000000087, Q(p,q)-Q0 = inf -ROOT RETURN: t = 577.9392 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 577.9392, H(p,q)-H0 = 0.0000000614311848, L(p,q)-L0 = 0.0000000000291374, Q(p,q)-Q0 = inf -t = 578.0000, H(p,q)-H0 = 0.0000000162782121, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf -t = 579.0000, H(p,q)-H0 = 0.0000002041937378, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf -ROOT RETURN: t = 579.0841 g[0] = -1, y[0] = -0.658695, y[1] = 0.798695 -t = 579.0841, H(p,q)-H0 = 0.0000002044232743, L(p,q)-L0 = 0.0000000000004483, Q(p,q)-Q0 = inf -t = 580.0000, H(p,q)-H0 = 0.0000002049374356, L(p,q)-L0 = -0.0000000000000058, Q(p,q)-Q0 = inf -t = 581.0000, H(p,q)-H0 = 0.0000002049735572, L(p,q)-L0 = -0.0000000000000070, Q(p,q)-Q0 = inf -t = 582.0000, H(p,q)-H0 = 0.0000002049615799, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf -t = 583.0000, H(p,q)-H0 = 0.0000002047797411, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf -t = 584.0000, H(p,q)-H0 = 0.0000001769885321, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf -ROOT RETURN: t = 584.2224 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 584.2224, H(p,q)-H0 = 0.0000000589982228, L(p,q)-L0 = 0.0000000004166476, Q(p,q)-Q0 = inf -t = 585.0000, H(p,q)-H0 = 0.0000002018805720, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf -ROOT RETURN: t = 585.3672 g[0] = -1, y[0] = -0.658696, y[1] = 0.798696 -t = 585.3672, H(p,q)-H0 = 0.0000002044093892, L(p,q)-L0 = 0.0000000000000673, Q(p,q)-Q0 = inf -t = 586.0000, H(p,q)-H0 = 0.0000002048972832, L(p,q)-L0 = -0.0000000000000067, Q(p,q)-Q0 = inf -t = 587.0000, H(p,q)-H0 = 0.0000002049702891, L(p,q)-L0 = -0.0000000000000059, Q(p,q)-Q0 = inf -t = 588.0000, H(p,q)-H0 = 0.0000002049694859, L(p,q)-L0 = -0.0000000000000051, Q(p,q)-Q0 = inf -t = 589.0000, H(p,q)-H0 = 0.0000002048877408, L(p,q)-L0 = -0.0000000000000064, Q(p,q)-Q0 = inf -t = 590.0000, H(p,q)-H0 = 0.0000002009919581, L(p,q)-L0 = -0.0000000000000084, Q(p,q)-Q0 = inf -ROOT RETURN: t = 590.5056 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 590.5056, H(p,q)-H0 = 0.0000000631851624, L(p,q)-L0 = 0.0000000002989198, Q(p,q)-Q0 = inf -t = 591.0000, H(p,q)-H0 = 0.0000001849259144, L(p,q)-L0 = -0.0000000000000079, Q(p,q)-Q0 = inf -ROOT RETURN: t = 591.6504 g[0] = -1, y[0] = -0.658697, y[1] = 0.798697 -t = 591.6504, H(p,q)-H0 = 0.0000002044180130, L(p,q)-L0 = 0.0000000000000282, Q(p,q)-Q0 = inf -t = 592.0000, H(p,q)-H0 = 0.0000002048038804, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf -t = 593.0000, H(p,q)-H0 = 0.0000002049631649, L(p,q)-L0 = -0.0000000000000050, Q(p,q)-Q0 = inf -t = 594.0000, H(p,q)-H0 = 0.0000002049732541, L(p,q)-L0 = -0.0000000000000031, Q(p,q)-Q0 = inf -t = 595.0000, H(p,q)-H0 = 0.0000002049330393, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf -t = 596.0000, H(p,q)-H0 = 0.0000002040334323, L(p,q)-L0 = -0.0000000000000040, Q(p,q)-Q0 = inf -ROOT RETURN: t = 596.7888 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 596.7888, H(p,q)-H0 = 0.0000000622937046, L(p,q)-L0 = 0.0000000000586402, Q(p,q)-Q0 = inf -t = 597.0000, H(p,q)-H0 = 0.0000000470808912, L(p,q)-L0 = -0.0000000000000039, Q(p,q)-Q0 = inf -ROOT RETURN: t = 597.9336 g[0] = -1, y[0] = -0.658697, y[1] = 0.798697 -t = 597.9336, H(p,q)-H0 = 0.0000002044250245, L(p,q)-L0 = 0.0000000000004745, Q(p,q)-Q0 = inf -t = 598.0000, H(p,q)-H0 = 0.0000002045409524, L(p,q)-L0 = -0.0000000000000043, Q(p,q)-Q0 = inf -t = 599.0000, H(p,q)-H0 = 0.0000002049494313, L(p,q)-L0 = -0.0000000000000053, Q(p,q)-Q0 = inf -t = 600.0000, H(p,q)-H0 = 0.0000002049741390, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf -t = 601.0000, H(p,q)-H0 = 0.0000002049547505, L(p,q)-L0 = -0.0000000000000046, Q(p,q)-Q0 = inf -t = 602.0000, H(p,q)-H0 = 0.0000002046578997, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf -t = 603.0000, H(p,q)-H0 = 0.0000001153968732, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf -ROOT RETURN: t = 603.0720 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 603.0720, H(p,q)-H0 = 0.0000000592936455, L(p,q)-L0 = 0.0000000003566358, Q(p,q)-Q0 = inf -t = 604.0000, H(p,q)-H0 = 0.0000002035597395, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf -ROOT RETURN: t = 604.2168 g[0] = -1, y[0] = -0.658698, y[1] = 0.798698 -t = 604.2168, H(p,q)-H0 = 0.0000002044096366, L(p,q)-L0 = 0.0000000000001055, Q(p,q)-Q0 = inf -t = 605.0000, H(p,q)-H0 = 0.0000002049223583, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf -t = 606.0000, H(p,q)-H0 = 0.0000002049724122, L(p,q)-L0 = -0.0000000000000061, Q(p,q)-Q0 = inf -t = 607.0000, H(p,q)-H0 = 0.0000002049659397, L(p,q)-L0 = -0.0000000000000064, Q(p,q)-Q0 = inf -t = 608.0000, H(p,q)-H0 = 0.0000002048429875, L(p,q)-L0 = -0.0000000000000075, Q(p,q)-Q0 = inf -t = 609.0000, H(p,q)-H0 = 0.0000001944769126, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf -ROOT RETURN: t = 609.3552 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 609.3552, H(p,q)-H0 = 0.0000000623193848, L(p,q)-L0 = 0.0000000003404608, Q(p,q)-Q0 = inf -t = 610.0000, H(p,q)-H0 = 0.0000001980365811, L(p,q)-L0 = -0.0000000000000072, Q(p,q)-Q0 = inf -ROOT RETURN: t = 610.5000 g[0] = -1, y[0] = -0.658699, y[1] = 0.798699 -t = 610.5000, H(p,q)-H0 = 0.0000002044179295, L(p,q)-L0 = -0.0000000000000071, Q(p,q)-Q0 = inf -t = 611.0000, H(p,q)-H0 = 0.0000002048638429, L(p,q)-L0 = -0.0000000000000058, Q(p,q)-Q0 = inf -t = 612.0000, H(p,q)-H0 = 0.0000002049675430, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf -t = 613.0000, H(p,q)-H0 = 0.0000002049716615, L(p,q)-L0 = -0.0000000000000046, Q(p,q)-Q0 = inf -t = 614.0000, H(p,q)-H0 = 0.0000002049133883, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -t = 615.0000, H(p,q)-H0 = 0.0000002030579643, L(p,q)-L0 = -0.0000000000000033, Q(p,q)-Q0 = inf -ROOT RETURN: t = 615.6384 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 615.6384, H(p,q)-H0 = 0.0000000632048238, L(p,q)-L0 = 0.0000000000895963, Q(p,q)-Q0 = inf -t = 616.0000, H(p,q)-H0 = 0.0000001487836494, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf -ROOT RETURN: t = 616.7832 g[0] = -1, y[0] = -0.6587, y[1] = 0.7987 -t = 616.7832, H(p,q)-H0 = 0.0000002044260720, L(p,q)-L0 = 0.0000000000004786, Q(p,q)-Q0 = inf -t = 617.0000, H(p,q)-H0 = 0.0000002047163740, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf -t = 618.0000, H(p,q)-H0 = 0.0000002049578210, L(p,q)-L0 = -0.0000000000000013, Q(p,q)-Q0 = inf -t = 619.0000, H(p,q)-H0 = 0.0000002049739905, L(p,q)-L0 = -0.0000000000000021, Q(p,q)-Q0 = inf -t = 620.0000, H(p,q)-H0 = 0.0000002049450619, L(p,q)-L0 = -0.0000000000000030, Q(p,q)-Q0 = inf -t = 621.0000, H(p,q)-H0 = 0.0000002044286982, L(p,q)-L0 = -0.0000000000000026, Q(p,q)-Q0 = inf -ROOT RETURN: t = 621.9216 g[0] = 1, y[0] = 0.361055, y[1] = -0.221055 -t = 621.9216, H(p,q)-H0 = 0.0000000597638055, L(p,q)-L0 = 0.0000000002748647, Q(p,q)-Q0 = inf -t = 622.0000, H(p,q)-H0 = 0.0000000075368993, L(p,q)-L0 = -0.0000000000000043, Q(p,q)-Q0 = inf -t = 623.0000, H(p,q)-H0 = 0.0000002042489998, L(p,q)-L0 = -0.0000000000000051, Q(p,q)-Q0 = inf -ROOT RETURN: t = 623.0664 g[0] = -1, y[0] = -0.6587, y[1] = 0.7987 -t = 623.0664, H(p,q)-H0 = 0.0000002044106915, L(p,q)-L0 = 0.0000000000001541, Q(p,q)-Q0 = inf -t = 624.0000, H(p,q)-H0 = 0.0000002049390829, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf -t = 625.0000, H(p,q)-H0 = 0.0000002049736637, L(p,q)-L0 = -0.0000000000000048, Q(p,q)-Q0 = inf -t = 626.0000, H(p,q)-H0 = 0.0000002049608939, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf -t = 627.0000, H(p,q)-H0 = 0.0000002047688139, L(p,q)-L0 = -0.0000000000000034, Q(p,q)-Q0 = inf -t = 628.0000, H(p,q)-H0 = 0.0000001728689620, L(p,q)-L0 = -0.0000000000000038, Q(p,q)-Q0 = inf -ROOT RETURN: t = 628.2048 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 628.2048, H(p,q)-H0 = 0.0000000614115896, L(p,q)-L0 = 0.0000000003817106, Q(p,q)-Q0 = inf -t = 629.0000, H(p,q)-H0 = 0.0000002021716354, L(p,q)-L0 = -0.0000000000000049, Q(p,q)-Q0 = inf -ROOT RETURN: t = 629.3496 g[0] = -1, y[0] = -0.658701, y[1] = 0.798701 -t = 629.3496, H(p,q)-H0 = 0.0000002044178704, L(p,q)-L0 = -0.0000000000000041, Q(p,q)-Q0 = inf -t = 630.0000, H(p,q)-H0 = 0.0000002049008113, L(p,q)-L0 = -0.0000000000000053, Q(p,q)-Q0 = inf -t = 631.0000, H(p,q)-H0 = 0.0000002049705867, L(p,q)-L0 = -0.0000000000000056, Q(p,q)-Q0 = inf -t = 632.0000, H(p,q)-H0 = 0.0000002049691304, L(p,q)-L0 = -0.0000000000000066, Q(p,q)-Q0 = inf -t = 633.0000, H(p,q)-H0 = 0.0000002048835037, L(p,q)-L0 = -0.0000000000000069, Q(p,q)-Q0 = inf -t = 634.0000, H(p,q)-H0 = 0.0000002005474875, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf -ROOT RETURN: t = 634.4879 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 634.4879, H(p,q)-H0 = 0.0000000639766822, L(p,q)-L0 = 0.0000000001198085, Q(p,q)-Q0 = inf -t = 635.0000, H(p,q)-H0 = 0.0000001874101185, L(p,q)-L0 = -0.0000000000000054, Q(p,q)-Q0 = inf -ROOT RETURN: t = 635.6328 g[0] = -1, y[0] = -0.658702, y[1] = 0.798702 -t = 635.6328, H(p,q)-H0 = 0.0000002044263138, L(p,q)-L0 = 0.0000000000004540, Q(p,q)-Q0 = inf -t = 636.0000, H(p,q)-H0 = 0.0000002048126228, L(p,q)-L0 = -0.0000000000000060, Q(p,q)-Q0 = inf -t = 637.0000, H(p,q)-H0 = 0.0000002049637536, L(p,q)-L0 = -0.0000000000000063, Q(p,q)-Q0 = inf -t = 638.0000, H(p,q)-H0 = 0.0000002049731011, L(p,q)-L0 = -0.0000000000000057, Q(p,q)-Q0 = inf -t = 639.0000, H(p,q)-H0 = 0.0000002049311046, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf -t = 640.0000, H(p,q)-H0 = 0.0000002039571302, L(p,q)-L0 = -0.0000000000000038, Q(p,q)-Q0 = inf -ROOT RETURN: t = 640.7711 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 640.7711, H(p,q)-H0 = 0.0000000603077710, L(p,q)-L0 = 0.0000000001793509, Q(p,q)-Q0 = inf -t = 641.0000, H(p,q)-H0 = 0.0000000613645634, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf -ROOT RETURN: t = 641.9160 g[0] = -1, y[0] = -0.658703, y[1] = 0.798703 -t = 641.9160, H(p,q)-H0 = 0.0000002044124374, L(p,q)-L0 = 0.0000000000002087, Q(p,q)-Q0 = inf -t = 642.0000, H(p,q)-H0 = 0.0000002045678865, L(p,q)-L0 = -0.0000000000000062, Q(p,q)-Q0 = inf -t = 643.0000, H(p,q)-H0 = 0.0000002049505652, L(p,q)-L0 = -0.0000000000000051, Q(p,q)-Q0 = inf -t = 644.0000, H(p,q)-H0 = 0.0000002049741472, L(p,q)-L0 = -0.0000000000000048, Q(p,q)-Q0 = inf -t = 645.0000, H(p,q)-H0 = 0.0000002049537697, L(p,q)-L0 = -0.0000000000000044, Q(p,q)-Q0 = inf -t = 646.0000, H(p,q)-H0 = 0.0000002046381053, L(p,q)-L0 = -0.0000000000000030, Q(p,q)-Q0 = inf -t = 647.0000, H(p,q)-H0 = 0.0000001032880839, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf -ROOT RETURN: t = 647.0543 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 647.0543, H(p,q)-H0 = 0.0000000605504351, L(p,q)-L0 = 0.0000000004190024, Q(p,q)-Q0 = inf -t = 648.0000, H(p,q)-H0 = 0.0000002036735738, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf -ROOT RETURN: t = 648.1992 g[0] = -1, y[0] = -0.658704, y[1] = 0.798704 -t = 648.1992, H(p,q)-H0 = 0.0000002044164115, L(p,q)-L0 = 0.0000000000000024, Q(p,q)-Q0 = inf -t = 649.0000, H(p,q)-H0 = 0.0000002049246778, L(p,q)-L0 = 0.0000000000000000, Q(p,q)-Q0 = inf -t = 650.0000, H(p,q)-H0 = 0.0000002049725999, L(p,q)-L0 = 0.0000000000000001, Q(p,q)-Q0 = inf -t = 651.0000, H(p,q)-H0 = 0.0000002049654323, L(p,q)-L0 = 0.0000000000000008, Q(p,q)-Q0 = inf -t = 652.0000, H(p,q)-H0 = 0.0000002048361477, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf -t = 653.0000, H(p,q)-H0 = 0.0000001930882794, L(p,q)-L0 = 0.0000000000000001, Q(p,q)-Q0 = inf -ROOT RETURN: t = 653.3375 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 653.3375, H(p,q)-H0 = 0.0000000644917213, L(p,q)-L0 = 0.0000000001492417, Q(p,q)-Q0 = inf -t = 654.0000, H(p,q)-H0 = 0.0000001987870161, L(p,q)-L0 = -0.0000000000000018, Q(p,q)-Q0 = inf -ROOT RETURN: t = 654.4823 g[0] = -1, y[0] = -0.658704, y[1] = 0.798704 -t = 654.4823, H(p,q)-H0 = 0.0000002044257358, L(p,q)-L0 = 0.0000000000004119, Q(p,q)-Q0 = inf -t = 655.0000, H(p,q)-H0 = 0.0000002048691213, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf -t = 656.0000, H(p,q)-H0 = 0.0000002049679589, L(p,q)-L0 = -0.0000000000000002, Q(p,q)-Q0 = inf -t = 657.0000, H(p,q)-H0 = 0.0000002049714126, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf -t = 658.0000, H(p,q)-H0 = 0.0000002049105056, L(p,q)-L0 = 0.0000000000000018, Q(p,q)-Q0 = inf -t = 659.0000, H(p,q)-H0 = 0.0000002028747380, L(p,q)-L0 = 0.0000000000000010, Q(p,q)-Q0 = inf -ROOT RETURN: t = 659.6207 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 659.6207, H(p,q)-H0 = 0.0000000607819457, L(p,q)-L0 = 0.0000000000850513, Q(p,q)-Q0 = inf -t = 660.0000, H(p,q)-H0 = 0.0000001560424945, L(p,q)-L0 = 0.0000000000000027, Q(p,q)-Q0 = inf -ROOT RETURN: t = 660.7655 g[0] = -1, y[0] = -0.658705, y[1] = 0.798705 -t = 660.7655, H(p,q)-H0 = 0.0000002044147167, L(p,q)-L0 = 0.0000000000002754, Q(p,q)-Q0 = inf -t = 661.0000, H(p,q)-H0 = 0.0000002047307256, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf -t = 662.0000, H(p,q)-H0 = 0.0000002049586245, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf -t = 663.0000, H(p,q)-H0 = 0.0000002049739213, L(p,q)-L0 = 0.0000000000000006, Q(p,q)-Q0 = inf -t = 664.0000, H(p,q)-H0 = 0.0000002049436753, L(p,q)-L0 = 0.0000000000000010, Q(p,q)-Q0 = inf -t = 665.0000, H(p,q)-H0 = 0.0000002043898775, L(p,q)-L0 = 0.0000000000000012, Q(p,q)-Q0 = inf -ROOT RETURN: t = 665.9039 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 665.9039, H(p,q)-H0 = 0.0000000598169319, L(p,q)-L0 = 0.0000000004477355, Q(p,q)-Q0 = inf -t = 666.0000, H(p,q)-H0 = 0.0000000019636004, L(p,q)-L0 = -0.0000000000000002, Q(p,q)-Q0 = inf -t = 667.0000, H(p,q)-H0 = 0.0000002042995267, L(p,q)-L0 = -0.0000000000000004, Q(p,q)-Q0 = inf -ROOT RETURN: t = 667.0487 g[0] = -1, y[0] = -0.658706, y[1] = 0.798706 -t = 667.0487, H(p,q)-H0 = 0.0000002044143491, L(p,q)-L0 = 0.0000000000000078, Q(p,q)-Q0 = inf -t = 668.0000, H(p,q)-H0 = 0.0000002049406607, L(p,q)-L0 = -0.0000000000000001, Q(p,q)-Q0 = inf -t = 669.0000, H(p,q)-H0 = 0.0000002049737594, L(p,q)-L0 = 0.0000000000000002, Q(p,q)-Q0 = inf -t = 670.0000, H(p,q)-H0 = 0.0000002049601794, L(p,q)-L0 = 0.0000000000000019, Q(p,q)-Q0 = inf -t = 671.0000, H(p,q)-H0 = 0.0000002047571394, L(p,q)-L0 = 0.0000000000000007, Q(p,q)-Q0 = inf -t = 672.0000, H(p,q)-H0 = 0.0000001681106891, L(p,q)-L0 = -0.0000000000000001, Q(p,q)-Q0 = inf -ROOT RETURN: t = 672.1871 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 672.1871, H(p,q)-H0 = 0.0000000646915175, L(p,q)-L0 = 0.0000000001790202, Q(p,q)-Q0 = inf -t = 673.0000, H(p,q)-H0 = 0.0000002024304293, L(p,q)-L0 = -0.0000000000000002, Q(p,q)-Q0 = inf -ROOT RETURN: t = 673.3319 g[0] = -1, y[0] = -0.658707, y[1] = 0.798707 -t = 673.3319, H(p,q)-H0 = 0.0000002044244131, L(p,q)-L0 = 0.0000000000003431, Q(p,q)-Q0 = inf -t = 674.0000, H(p,q)-H0 = 0.0000002049041669, L(p,q)-L0 = 0.0000000000000004, Q(p,q)-Q0 = inf -t = 675.0000, H(p,q)-H0 = 0.0000002049708746, L(p,q)-L0 = 0.0000000000000001, Q(p,q)-Q0 = inf -t = 676.0000, H(p,q)-H0 = 0.0000002049687662, L(p,q)-L0 = 0.0000000000000018, Q(p,q)-Q0 = inf -t = 677.0000, H(p,q)-H0 = 0.0000002048790400, L(p,q)-L0 = 0.0000000000000010, Q(p,q)-Q0 = inf -t = 678.0000, H(p,q)-H0 = 0.0000002000430586, L(p,q)-L0 = 0.0000000000000016, Q(p,q)-Q0 = inf -ROOT RETURN: t = 678.4703 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 678.4703, H(p,q)-H0 = 0.0000000609980682, L(p,q)-L0 = 0.0000000000157312, Q(p,q)-Q0 = inf -t = 679.0000, H(p,q)-H0 = 0.0000001895580650, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf -ROOT RETURN: t = 679.6151 g[0] = -1, y[0] = -0.658707, y[1] = 0.798707 -t = 679.6151, H(p,q)-H0 = 0.0000002044172895, L(p,q)-L0 = 0.0000000000003350, Q(p,q)-Q0 = inf -t = 680.0000, H(p,q)-H0 = 0.0000002048208472, L(p,q)-L0 = 0.0000000000000013, Q(p,q)-Q0 = inf -t = 681.0000, H(p,q)-H0 = 0.0000002049643328, L(p,q)-L0 = 0.0000000000000030, Q(p,q)-Q0 = inf -t = 682.0000, H(p,q)-H0 = 0.0000002049729514, L(p,q)-L0 = 0.0000000000000027, Q(p,q)-Q0 = inf -t = 683.0000, H(p,q)-H0 = 0.0000002049290941, L(p,q)-L0 = 0.0000000000000032, Q(p,q)-Q0 = inf -t = 684.0000, H(p,q)-H0 = 0.0000002038731097, L(p,q)-L0 = 0.0000000000000042, Q(p,q)-Q0 = inf -ROOT RETURN: t = 684.7535 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 684.7535, H(p,q)-H0 = 0.0000000592776419, L(p,q)-L0 = 0.0000000004628220, Q(p,q)-Q0 = inf -t = 685.0000, H(p,q)-H0 = 0.0000000757087750, L(p,q)-L0 = 0.0000000000000068, Q(p,q)-Q0 = inf -ROOT RETURN: t = 685.8983 g[0] = -1, y[0] = -0.658708, y[1] = 0.798708 -t = 685.8983, H(p,q)-H0 = 0.0000002044122857, L(p,q)-L0 = 0.0000000000000245, Q(p,q)-Q0 = inf -t = 686.0000, H(p,q)-H0 = 0.0000002045928184, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf -t = 687.0000, H(p,q)-H0 = 0.0000002049516757, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf -t = 688.0000, H(p,q)-H0 = 0.0000002049741699, L(p,q)-L0 = 0.0000000000000077, Q(p,q)-Q0 = inf -t = 689.0000, H(p,q)-H0 = 0.0000002049527718, L(p,q)-L0 = 0.0000000000000067, Q(p,q)-Q0 = inf -t = 690.0000, H(p,q)-H0 = 0.0000002046167980, L(p,q)-L0 = 0.0000000000000061, Q(p,q)-Q0 = inf -t = 691.0000, H(p,q)-H0 = 0.0000000901820258, L(p,q)-L0 = 0.0000000000000077, Q(p,q)-Q0 = inf -ROOT RETURN: t = 691.0367 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 691.0367, H(p,q)-H0 = 0.0000000645661324, L(p,q)-L0 = 0.0000000002106544, Q(p,q)-Q0 = inf -t = 692.0000, H(p,q)-H0 = 0.0000002037764217, L(p,q)-L0 = 0.0000000000000064, Q(p,q)-Q0 = inf -ROOT RETURN: t = 692.1815 g[0] = -1, y[0] = -0.658709, y[1] = 0.798709 -t = 692.1815, H(p,q)-H0 = 0.0000002044225405, L(p,q)-L0 = 0.0000000000002595, Q(p,q)-Q0 = inf -t = 693.0000, H(p,q)-H0 = 0.0000002049268982, L(p,q)-L0 = 0.0000000000000053, Q(p,q)-Q0 = inf -t = 694.0000, H(p,q)-H0 = 0.0000002049727836, L(p,q)-L0 = 0.0000000000000061, Q(p,q)-Q0 = inf -t = 695.0000, H(p,q)-H0 = 0.0000002049649106, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf -t = 696.0000, H(p,q)-H0 = 0.0000002048288942, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf -t = 697.0000, H(p,q)-H0 = 0.0000001914875067, L(p,q)-L0 = 0.0000000000000073, Q(p,q)-Q0 = inf -ROOT RETURN: t = 697.3198 g[0] = 1, y[0] = 0.361054, y[1] = -0.221054 -t = 697.3198, H(p,q)-H0 = 0.0000000608303887, L(p,q)-L0 = 0.0000000000016873, Q(p,q)-Q0 = inf -t = 698.0000, H(p,q)-H0 = 0.0000001994442443, L(p,q)-L0 = 0.0000000000000082, Q(p,q)-Q0 = inf -ROOT RETURN: t = 698.4647 g[0] = -1, y[0] = -0.65871, y[1] = 0.79871 -t = 698.4647, H(p,q)-H0 = 0.0000002044199270, L(p,q)-L0 = 0.0000000000003977, Q(p,q)-Q0 = inf -t = 699.0000, H(p,q)-H0 = 0.0000002048741288, L(p,q)-L0 = 0.0000000000000078, Q(p,q)-Q0 = inf -t = 700.0000, H(p,q)-H0 = 0.0000002049683710, L(p,q)-L0 = 0.0000000000000081, Q(p,q)-Q0 = inf -t = 701.0000, H(p,q)-H0 = 0.0000002049711649, L(p,q)-L0 = 0.0000000000000093, Q(p,q)-Q0 = inf -t = 702.0000, H(p,q)-H0 = 0.0000002049074895, L(p,q)-L0 = 0.0000000000000098, Q(p,q)-Q0 = inf -t = 703.0000, H(p,q)-H0 = 0.0000002026699014, L(p,q)-L0 = 0.0000000000000112, Q(p,q)-Q0 = inf -ROOT RETURN: t = 703.6030 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 703.6030, H(p,q)-H0 = 0.0000000589785794, L(p,q)-L0 = 0.0000000004593076, Q(p,q)-Q0 = inf -t = 704.0000, H(p,q)-H0 = 0.0000001623834691, L(p,q)-L0 = 0.0000000000000123, Q(p,q)-Q0 = inf -ROOT RETURN: t = 704.7479 g[0] = -1, y[0] = -0.65871, y[1] = 0.79871 -t = 704.7479, H(p,q)-H0 = 0.0000002044106397, L(p,q)-L0 = 0.0000000000000474, Q(p,q)-Q0 = inf -t = 705.0000, H(p,q)-H0 = 0.0000002047441359, L(p,q)-L0 = 0.0000000000000124, Q(p,q)-Q0 = inf -t = 706.0000, H(p,q)-H0 = 0.0000002049594127, L(p,q)-L0 = 0.0000000000000131, Q(p,q)-Q0 = inf -t = 707.0000, H(p,q)-H0 = 0.0000002049738596, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf -t = 708.0000, H(p,q)-H0 = 0.0000002049422434, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf -t = 709.0000, H(p,q)-H0 = 0.0000002043476170, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf -ROOT RETURN: t = 709.8862 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 709.8862, H(p,q)-H0 = 0.0000000641438931, L(p,q)-L0 = 0.0000000002453422, Q(p,q)-Q0 = inf -t = 710.0000, H(p,q)-H0 = 0.0000000000008149, L(p,q)-L0 = 0.0000000000000153, Q(p,q)-Q0 = inf -t = 711.0000, H(p,q)-H0 = 0.0000002043458088, L(p,q)-L0 = 0.0000000000000171, Q(p,q)-Q0 = inf -ROOT RETURN: t = 711.0311 g[0] = -1, y[0] = -0.658711, y[1] = 0.798711 -t = 711.0311, H(p,q)-H0 = 0.0000002044204692, L(p,q)-L0 = 0.0000000000001736, Q(p,q)-Q0 = inf -t = 712.0000, H(p,q)-H0 = 0.0000002049421899, L(p,q)-L0 = 0.0000000000000181, Q(p,q)-Q0 = inf -t = 713.0000, H(p,q)-H0 = 0.0000002049738632, L(p,q)-L0 = 0.0000000000000181, Q(p,q)-Q0 = inf -t = 714.0000, H(p,q)-H0 = 0.0000002049594525, L(p,q)-L0 = 0.0000000000000185, Q(p,q)-Q0 = inf -t = 715.0000, H(p,q)-H0 = 0.0000002047446747, L(p,q)-L0 = 0.0000000000000181, Q(p,q)-Q0 = inf -t = 716.0000, H(p,q)-H0 = 0.0000001626254460, L(p,q)-L0 = 0.0000000000000162, Q(p,q)-Q0 = inf -ROOT RETURN: t = 716.1694 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 716.1694, H(p,q)-H0 = 0.0000000611613047, L(p,q)-L0 = 0.0000000000192453, Q(p,q)-Q0 = inf -t = 717.0000, H(p,q)-H0 = 0.0000002026610000, L(p,q)-L0 = 0.0000000000000169, Q(p,q)-Q0 = inf -ROOT RETURN: t = 717.3143 g[0] = -1, y[0] = -0.658712, y[1] = 0.798712 -t = 717.3143, H(p,q)-H0 = 0.0000002044223758, L(p,q)-L0 = 0.0000000000004543, Q(p,q)-Q0 = inf -t = 718.0000, H(p,q)-H0 = 0.0000002049073725, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf -t = 719.0000, H(p,q)-H0 = 0.0000002049711648, L(p,q)-L0 = 0.0000000000000174, Q(p,q)-Q0 = inf -t = 720.0000, H(p,q)-H0 = 0.0000002049684001, L(p,q)-L0 = 0.0000000000000190, Q(p,q)-Q0 = inf -t = 721.0000, H(p,q)-H0 = 0.0000002048743409, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf -t = 722.0000, H(p,q)-H0 = 0.0000001994694276, L(p,q)-L0 = 0.0000000000000195, Q(p,q)-Q0 = inf -ROOT RETURN: t = 722.4526 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 722.4526, H(p,q)-H0 = 0.0000000589396452, L(p,q)-L0 = 0.0000000004332104, Q(p,q)-Q0 = inf -t = 723.0000, H(p,q)-H0 = 0.0000001914168128, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf -ROOT RETURN: t = 723.5974 g[0] = -1, y[0] = -0.658713, y[1] = 0.798713 -t = 723.5974, H(p,q)-H0 = 0.0000002044096870, L(p,q)-L0 = 0.0000000000000802, Q(p,q)-Q0 = inf -t = 724.0000, H(p,q)-H0 = 0.0000002048286055, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf -t = 725.0000, H(p,q)-H0 = 0.0000002049649063, L(p,q)-L0 = 0.0000000000000188, Q(p,q)-Q0 = inf -t = 726.0000, H(p,q)-H0 = 0.0000002049728088, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf -t = 727.0000, H(p,q)-H0 = 0.0000002049270061, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf -t = 728.0000, H(p,q)-H0 = 0.0000002037804447, L(p,q)-L0 = 0.0000000000000192, Q(p,q)-Q0 = inf -ROOT RETURN: t = 728.7358 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 728.7358, H(p,q)-H0 = 0.0000000634817319, L(p,q)-L0 = 0.0000000002834988, Q(p,q)-Q0 = inf -t = 729.0000, H(p,q)-H0 = 0.0000000896255727, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf -ROOT RETURN: t = 729.8806 g[0] = -1, y[0] = -0.658713, y[1] = 0.798713 -t = 729.8806, H(p,q)-H0 = 0.0000002044186851, L(p,q)-L0 = 0.0000000000000877, Q(p,q)-Q0 = inf -t = 730.0000, H(p,q)-H0 = 0.0000002046159090, L(p,q)-L0 = 0.0000000000000204, Q(p,q)-Q0 = inf -t = 731.0000, H(p,q)-H0 = 0.0000002049527499, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf -t = 732.0000, H(p,q)-H0 = 0.0000002049741893, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf -t = 733.0000, H(p,q)-H0 = 0.0000002049517395, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf -t = 734.0000, H(p,q)-H0 = 0.0000002045938207, L(p,q)-L0 = 0.0000000000000199, Q(p,q)-Q0 = inf -t = 735.0000, H(p,q)-H0 = 0.0000000762911401, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf -ROOT RETURN: t = 735.0190 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 735.0190, H(p,q)-H0 = 0.0000000619383926, L(p,q)-L0 = 0.0000000000469587, Q(p,q)-Q0 = inf -t = 736.0000, H(p,q)-H0 = 0.0000002038695082, L(p,q)-L0 = 0.0000000000000207, Q(p,q)-Q0 = inf -ROOT RETURN: t = 736.1638 g[0] = -1, y[0] = -0.658714, y[1] = 0.798714 -t = 736.1638, H(p,q)-H0 = 0.0000002044243973, L(p,q)-L0 = 0.0000000000004903, Q(p,q)-Q0 = inf -t = 737.0000, H(p,q)-H0 = 0.0000002049290345, L(p,q)-L0 = 0.0000000000000210, Q(p,q)-Q0 = inf -t = 738.0000, H(p,q)-H0 = 0.0000002049729718, L(p,q)-L0 = 0.0000000000000226, Q(p,q)-Q0 = inf -t = 739.0000, H(p,q)-H0 = 0.0000002049643816, L(p,q)-L0 = 0.0000000000000221, Q(p,q)-Q0 = inf -t = 740.0000, H(p,q)-H0 = 0.0000002048212012, L(p,q)-L0 = 0.0000000000000209, Q(p,q)-Q0 = inf -t = 741.0000, H(p,q)-H0 = 0.0000001896397623, L(p,q)-L0 = 0.0000000000000214, Q(p,q)-Q0 = inf -ROOT RETURN: t = 741.3022 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 741.3022, H(p,q)-H0 = 0.0000000591497438, L(p,q)-L0 = 0.0000000003825334, Q(p,q)-Q0 = inf -t = 742.0000, H(p,q)-H0 = 0.0000002000209774, L(p,q)-L0 = 0.0000000000000231, Q(p,q)-Q0 = inf -ROOT RETURN: t = 742.4470 g[0] = -1, y[0] = -0.658715, y[1] = 0.798715 -t = 742.4470, H(p,q)-H0 = 0.0000002044095430, L(p,q)-L0 = 0.0000000000001170, Q(p,q)-Q0 = inf -t = 743.0000, H(p,q)-H0 = 0.0000002048788817, L(p,q)-L0 = 0.0000000000000236, Q(p,q)-Q0 = inf -t = 744.0000, H(p,q)-H0 = 0.0000002049687813, L(p,q)-L0 = 0.0000000000000248, Q(p,q)-Q0 = inf -t = 745.0000, H(p,q)-H0 = 0.0000002049709182, L(p,q)-L0 = 0.0000000000000255, Q(p,q)-Q0 = inf -t = 746.0000, H(p,q)-H0 = 0.0000002049043324, L(p,q)-L0 = 0.0000000000000252, Q(p,q)-Q0 = inf -t = 747.0000, H(p,q)-H0 = 0.0000002024404512, L(p,q)-L0 = 0.0000000000000233, Q(p,q)-Q0 = inf -ROOT RETURN: t = 747.5854 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 747.5854, H(p,q)-H0 = 0.0000000626559493, L(p,q)-L0 = 0.0000000003244277, Q(p,q)-Q0 = inf -t = 748.0000, H(p,q)-H0 = 0.0000001679005459, L(p,q)-L0 = 0.0000000000000229, Q(p,q)-Q0 = inf -ROOT RETURN: t = 748.7302 g[0] = -1, y[0] = -0.658716, y[1] = 0.798716 -t = 748.7302, H(p,q)-H0 = 0.0000002044178616, L(p,q)-L0 = 0.0000000000000294, Q(p,q)-Q0 = inf -t = 749.0000, H(p,q)-H0 = 0.0000002047566684, L(p,q)-L0 = 0.0000000000000213, Q(p,q)-Q0 = inf -t = 750.0000, H(p,q)-H0 = 0.0000002049601727, L(p,q)-L0 = 0.0000000000000204, Q(p,q)-Q0 = inf -t = 751.0000, H(p,q)-H0 = 0.0000002049737878, L(p,q)-L0 = 0.0000000000000205, Q(p,q)-Q0 = inf -t = 752.0000, H(p,q)-H0 = 0.0000002049407492, L(p,q)-L0 = 0.0000000000000207, Q(p,q)-Q0 = inf -t = 753.0000, H(p,q)-H0 = 0.0000002043015297, L(p,q)-L0 = 0.0000000000000192, Q(p,q)-Q0 = inf -ROOT RETURN: t = 753.8685 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 753.8685, H(p,q)-H0 = 0.0000000628572869, L(p,q)-L0 = 0.0000000000777687, Q(p,q)-Q0 = inf -t = 754.0000, H(p,q)-H0 = 0.0000000018099149, L(p,q)-L0 = 0.0000000000000182, Q(p,q)-Q0 = inf -t = 755.0000, H(p,q)-H0 = 0.0000002043882371, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf -ROOT RETURN: t = 755.0134 g[0] = -1, y[0] = -0.658717, y[1] = 0.798717 -t = 755.0134, H(p,q)-H0 = 0.0000002044257884, L(p,q)-L0 = 0.0000000000005013, Q(p,q)-Q0 = inf -t = 756.0000, H(p,q)-H0 = 0.0000002049436428, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf -t = 757.0000, H(p,q)-H0 = 0.0000002049739459, L(p,q)-L0 = 0.0000000000000208, Q(p,q)-Q0 = inf -t = 758.0000, H(p,q)-H0 = 0.0000002049586841, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf -t = 759.0000, H(p,q)-H0 = 0.0000002047313204, L(p,q)-L0 = 0.0000000000000197, Q(p,q)-Q0 = inf -t = 760.0000, H(p,q)-H0 = 0.0000001563201595, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf -ROOT RETURN: t = 760.1517 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 760.1517, H(p,q)-H0 = 0.0000000595625027, L(p,q)-L0 = 0.0000000003084791, Q(p,q)-Q0 = inf -t = 761.0000, H(p,q)-H0 = 0.0000002028668047, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf -ROOT RETURN: t = 761.2966 g[0] = -1, y[0] = -0.658717, y[1] = 0.798717 -t = 761.2966, H(p,q)-H0 = 0.0000002044102232, L(p,q)-L0 = 0.0000000000001554, Q(p,q)-Q0 = inf -t = 762.0000, H(p,q)-H0 = 0.0000002049104124, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf -t = 763.0000, H(p,q)-H0 = 0.0000002049714317, L(p,q)-L0 = 0.0000000000000193, Q(p,q)-Q0 = inf -t = 764.0000, H(p,q)-H0 = 0.0000002049680061, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf -t = 765.0000, H(p,q)-H0 = 0.0000002048693648, L(p,q)-L0 = 0.0000000000000210, Q(p,q)-Q0 = inf -t = 766.0000, H(p,q)-H0 = 0.0000001988157592, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf -ROOT RETURN: t = 766.4349 g[0] = 1, y[0] = 0.361053, y[1] = -0.221053 -t = 766.4349, H(p,q)-H0 = 0.0000000617536058, L(p,q)-L0 = 0.0000000003661546, Q(p,q)-Q0 = inf -t = 767.0000, H(p,q)-H0 = 0.0000001930270090, L(p,q)-L0 = 0.0000000000000192, Q(p,q)-Q0 = inf -ROOT RETURN: t = 767.5798 g[0] = -1, y[0] = -0.658718, y[1] = 0.798718 -t = 767.5798, H(p,q)-H0 = 0.0000002044182482, L(p,q)-L0 = 0.0000000000000188, Q(p,q)-Q0 = inf -t = 768.0000, H(p,q)-H0 = 0.0000002048358831, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf -t = 769.0000, H(p,q)-H0 = 0.0000002049654358, L(p,q)-L0 = 0.0000000000000185, Q(p,q)-Q0 = inf -t = 770.0000, H(p,q)-H0 = 0.0000002049726328, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf -t = 771.0000, H(p,q)-H0 = 0.0000002049247968, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf -t = 772.0000, H(p,q)-H0 = 0.0000002036780286, L(p,q)-L0 = 0.0000000000000197, Q(p,q)-Q0 = inf -ROOT RETURN: t = 772.7181 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 772.7181, H(p,q)-H0 = 0.0000000637000992, L(p,q)-L0 = 0.0000000001083683, Q(p,q)-Q0 = inf -t = 773.0000, H(p,q)-H0 = 0.0000001027688317, L(p,q)-L0 = 0.0000000000000181, Q(p,q)-Q0 = inf -ROOT RETURN: t = 773.8630 g[0] = -1, y[0] = -0.658719, y[1] = 0.798719 -t = 773.8630, H(p,q)-H0 = 0.0000002044264167, L(p,q)-L0 = 0.0000000000004904, Q(p,q)-Q0 = inf -t = 774.0000, H(p,q)-H0 = 0.0000002046372859, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf -t = 775.0000, H(p,q)-H0 = 0.0000002049537534, L(p,q)-L0 = 0.0000000000000169, Q(p,q)-Q0 = inf -t = 776.0000, H(p,q)-H0 = 0.0000002049741713, L(p,q)-L0 = 0.0000000000000161, Q(p,q)-Q0 = inf -t = 777.0000, H(p,q)-H0 = 0.0000002049506336, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf -t = 778.0000, H(p,q)-H0 = 0.0000002045689708, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf -t = 779.0000, H(p,q)-H0 = 0.0000000619558527, L(p,q)-L0 = 0.0000000000000161, Q(p,q)-Q0 = inf -ROOT RETURN: t = 779.0013 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 779.0013, H(p,q)-H0 = 0.0000000600927310, L(p,q)-L0 = 0.0000000002168873, Q(p,q)-Q0 = inf -t = 780.0000, H(p,q)-H0 = 0.0000002039538617, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf -ROOT RETURN: t = 780.1462 g[0] = -1, y[0] = -0.65872, y[1] = 0.79872 -t = 780.1462, H(p,q)-H0 = 0.0000002044116608, L(p,q)-L0 = 0.0000000000002059, Q(p,q)-Q0 = inf -t = 781.0000, H(p,q)-H0 = 0.0000002049310475, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf -t = 782.0000, H(p,q)-H0 = 0.0000002049731183, L(p,q)-L0 = 0.0000000000000174, Q(p,q)-Q0 = inf -t = 783.0000, H(p,q)-H0 = 0.0000002049638017, L(p,q)-L0 = 0.0000000000000179, Q(p,q)-Q0 = inf -t = 784.0000, H(p,q)-H0 = 0.0000002048129933, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf -t = 785.0000, H(p,q)-H0 = 0.0000001875045583, L(p,q)-L0 = 0.0000000000000169, Q(p,q)-Q0 = inf -ROOT RETURN: t = 785.2845 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 785.2845, H(p,q)-H0 = 0.0000000608643962, L(p,q)-L0 = 0.0000000004054622, Q(p,q)-Q0 = inf -t = 786.0000, H(p,q)-H0 = 0.0000002005280486, L(p,q)-L0 = 0.0000000000000162, Q(p,q)-Q0 = inf -ROOT RETURN: t = 786.4294 g[0] = -1, y[0] = -0.65872, y[1] = 0.79872 -t = 786.4294, H(p,q)-H0 = 0.0000002044173282, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf -t = 787.0000, H(p,q)-H0 = 0.0000002048833483, L(p,q)-L0 = 0.0000000000000164, Q(p,q)-Q0 = inf -t = 788.0000, H(p,q)-H0 = 0.0000002049691392, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf -t = 789.0000, H(p,q)-H0 = 0.0000002049706220, L(p,q)-L0 = 0.0000000000000188, Q(p,q)-Q0 = inf -t = 790.0000, H(p,q)-H0 = 0.0000002049009758, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf -t = 791.0000, H(p,q)-H0 = 0.0000002021828842, L(p,q)-L0 = 0.0000000000000183, Q(p,q)-Q0 = inf -ROOT RETURN: t = 791.5677 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 791.5677, H(p,q)-H0 = 0.0000000643236246, L(p,q)-L0 = 0.0000000001380124, Q(p,q)-Q0 = inf -t = 792.0000, H(p,q)-H0 = 0.0000001726868679, L(p,q)-L0 = 0.0000000000000195, Q(p,q)-Q0 = inf -ROOT RETURN: t = 792.7125 g[0] = -1, y[0] = -0.658721, y[1] = 0.798721 -t = 792.7125, H(p,q)-H0 = 0.0000002044262272, L(p,q)-L0 = 0.0000000000004582, Q(p,q)-Q0 = inf -t = 793.0000, H(p,q)-H0 = 0.0000002047683716, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf -t = 794.0000, H(p,q)-H0 = 0.0000002049608866, L(p,q)-L0 = 0.0000000000000202, Q(p,q)-Q0 = inf -t = 795.0000, H(p,q)-H0 = 0.0000002049736905, L(p,q)-L0 = 0.0000000000000205, Q(p,q)-Q0 = inf -t = 796.0000, H(p,q)-H0 = 0.0000002049391727, L(p,q)-L0 = 0.0000000000000209, Q(p,q)-Q0 = inf -t = 797.0000, H(p,q)-H0 = 0.0000002042511867, L(p,q)-L0 = 0.0000000000000213, Q(p,q)-Q0 = inf -ROOT RETURN: t = 797.8509 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 797.8509, H(p,q)-H0 = 0.0000000606134791, L(p,q)-L0 = 0.0000000001198346, Q(p,q)-Q0 = inf -t = 798.0000, H(p,q)-H0 = 0.0000000072420379, L(p,q)-L0 = 0.0000000000000210, Q(p,q)-Q0 = inf -ROOT RETURN: t = 798.9957 g[0] = -1, y[0] = -0.658722, y[1] = 0.798722 -t = 798.9957, H(p,q)-H0 = 0.0000002044137175, L(p,q)-L0 = 0.0000000000002657, Q(p,q)-Q0 = inf -t = 799.0000, H(p,q)-H0 = 0.0000002044271864, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf -t = 800.0000, H(p,q)-H0 = 0.0000002049450246, L(p,q)-L0 = 0.0000000000000200, Q(p,q)-Q0 = inf -t = 801.0000, H(p,q)-H0 = 0.0000002049740057, L(p,q)-L0 = 0.0000000000000195, Q(p,q)-Q0 = inf -t = 802.0000, H(p,q)-H0 = 0.0000002049578719, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf -t = 803.0000, H(p,q)-H0 = 0.0000002047170005, L(p,q)-L0 = 0.0000000000000190, Q(p,q)-Q0 = inf -t = 804.0000, H(p,q)-H0 = 0.0000001491007817, L(p,q)-L0 = 0.0000000000000172, Q(p,q)-Q0 = inf -ROOT RETURN: t = 804.1341 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 804.1341, H(p,q)-H0 = 0.0000000600730945, L(p,q)-L0 = 0.0000000004380675, Q(p,q)-Q0 = inf -t = 805.0000, H(p,q)-H0 = 0.0000002030508510, L(p,q)-L0 = 0.0000000000000167, Q(p,q)-Q0 = inf -ROOT RETURN: t = 805.2789 g[0] = -1, y[0] = -0.658723, y[1] = 0.798723 -t = 805.2789, H(p,q)-H0 = 0.0000002044154607, L(p,q)-L0 = 0.0000000000000229, Q(p,q)-Q0 = inf -t = 806.0000, H(p,q)-H0 = 0.0000002049132888, L(p,q)-L0 = 0.0000000000000182, Q(p,q)-Q0 = inf -t = 807.0000, H(p,q)-H0 = 0.0000002049716682, L(p,q)-L0 = 0.0000000000000192, Q(p,q)-Q0 = inf -t = 808.0000, H(p,q)-H0 = 0.0000002049675771, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf -t = 809.0000, H(p,q)-H0 = 0.0000002048640831, L(p,q)-L0 = 0.0000000000000194, Q(p,q)-Q0 = inf -t = 810.0000, H(p,q)-H0 = 0.0000001980694146, L(p,q)-L0 = 0.0000000000000211, Q(p,q)-Q0 = inf -ROOT RETURN: t = 810.4173 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 810.4173, H(p,q)-H0 = 0.0000000646480145, L(p,q)-L0 = 0.0000000001674836, Q(p,q)-Q0 = inf -t = 811.0000, H(p,q)-H0 = 0.0000001944237198, L(p,q)-L0 = 0.0000000000000203, Q(p,q)-Q0 = inf -ROOT RETURN: t = 811.5621 g[0] = -1, y[0] = -0.658723, y[1] = 0.798723 -t = 811.5621, H(p,q)-H0 = 0.0000002044252258, L(p,q)-L0 = 0.0000000000003966, Q(p,q)-Q0 = inf -t = 812.0000, H(p,q)-H0 = 0.0000002048427287, L(p,q)-L0 = 0.0000000000000171, Q(p,q)-Q0 = inf -t = 813.0000, H(p,q)-H0 = 0.0000002049659328, L(p,q)-L0 = 0.0000000000000167, Q(p,q)-Q0 = inf -t = 814.0000, H(p,q)-H0 = 0.0000002049724331, L(p,q)-L0 = 0.0000000000000165, Q(p,q)-Q0 = inf -t = 815.0000, H(p,q)-H0 = 0.0000002049224689, L(p,q)-L0 = 0.0000000000000162, Q(p,q)-Q0 = inf -t = 816.0000, H(p,q)-H0 = 0.0000002035646574, L(p,q)-L0 = 0.0000000000000172, Q(p,q)-Q0 = inf -ROOT RETURN: t = 816.7004 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 816.7004, H(p,q)-H0 = 0.0000000609537980, L(p,q)-L0 = 0.0000000000374563, Q(p,q)-Q0 = inf -t = 817.0000, H(p,q)-H0 = 0.0000001149212812, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf -ROOT RETURN: t = 817.8453 g[0] = -1, y[0] = -0.658724, y[1] = 0.798724 -t = 817.8453, H(p,q)-H0 = 0.0000002044161722, L(p,q)-L0 = 0.0000000000003235, Q(p,q)-Q0 = inf -t = 818.0000, H(p,q)-H0 = 0.0000002046571251, L(p,q)-L0 = 0.0000000000000183, Q(p,q)-Q0 = inf -t = 819.0000, H(p,q)-H0 = 0.0000002049547203, L(p,q)-L0 = 0.0000000000000193, Q(p,q)-Q0 = inf -t = 820.0000, H(p,q)-H0 = 0.0000002049741476, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf -t = 821.0000, H(p,q)-H0 = 0.0000002049494871, L(p,q)-L0 = 0.0000000000000182, Q(p,q)-Q0 = inf -t = 822.0000, H(p,q)-H0 = 0.0000002045421079, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf -ROOT RETURN: t = 822.9836 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 822.9836, H(p,q)-H0 = 0.0000000594525529, L(p,q)-L0 = 0.0000000004589971, Q(p,q)-Q0 = inf -t = 823.0000, H(p,q)-H0 = 0.0000000476582624, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf -t = 824.0000, H(p,q)-H0 = 0.0000002040304519, L(p,q)-L0 = 0.0000000000000189, Q(p,q)-Q0 = inf -ROOT RETURN: t = 824.1285 g[0] = -1, y[0] = -0.658725, y[1] = 0.798725 -t = 824.1285, H(p,q)-H0 = 0.0000002044133268, L(p,q)-L0 = 0.0000000000000316, Q(p,q)-Q0 = inf -t = 825.0000, H(p,q)-H0 = 0.0000002049329718, L(p,q)-L0 = 0.0000000000000202, Q(p,q)-Q0 = inf -t = 826.0000, H(p,q)-H0 = 0.0000002049732587, L(p,q)-L0 = 0.0000000000000211, Q(p,q)-Q0 = inf -t = 827.0000, H(p,q)-H0 = 0.0000002049632014, L(p,q)-L0 = 0.0000000000000209, Q(p,q)-Q0 = inf -t = 828.0000, H(p,q)-H0 = 0.0000002048042615, L(p,q)-L0 = 0.0000000000000198, Q(p,q)-Q0 = inf -t = 829.0000, H(p,q)-H0 = 0.0000001850351574, L(p,q)-L0 = 0.0000000000000188, Q(p,q)-Q0 = inf -ROOT RETURN: t = 829.2668 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 829.2668, H(p,q)-H0 = 0.0000000646459586, L(p,q)-L0 = 0.0000000001982275, Q(p,q)-Q0 = inf -t = 830.0000, H(p,q)-H0 = 0.0000002009748064, L(p,q)-L0 = 0.0000000000000187, Q(p,q)-Q0 = inf -ROOT RETURN: t = 830.4117 g[0] = -1, y[0] = -0.658726, y[1] = 0.798726 -t = 830.4117, H(p,q)-H0 = 0.0000002044235694, L(p,q)-L0 = 0.0000000000003157, Q(p,q)-Q0 = inf -t = 831.0000, H(p,q)-H0 = 0.0000002048875841, L(p,q)-L0 = 0.0000000000000194, Q(p,q)-Q0 = inf -t = 832.0000, H(p,q)-H0 = 0.0000002049694841, L(p,q)-L0 = 0.0000000000000203, Q(p,q)-Q0 = inf -t = 833.0000, H(p,q)-H0 = 0.0000002049703151, L(p,q)-L0 = 0.0000000000000218, Q(p,q)-Q0 = inf -t = 834.0000, H(p,q)-H0 = 0.0000002048974466, L(p,q)-L0 = 0.0000000000000229, Q(p,q)-Q0 = inf -t = 835.0000, H(p,q)-H0 = 0.0000002018932244, L(p,q)-L0 = 0.0000000000000242, Q(p,q)-Q0 = inf -ROOT RETURN: t = 835.5500 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 835.5500, H(p,q)-H0 = 0.0000000608973183, L(p,q)-L0 = 0.0000000000000431, Q(p,q)-Q0 = inf -t = 836.0000, H(p,q)-H0 = 0.0000001768309819, L(p,q)-L0 = 0.0000000000000229, Q(p,q)-Q0 = inf -ROOT RETURN: t = 836.6949 g[0] = -1, y[0] = -0.658726, y[1] = 0.798726 -t = 836.6949, H(p,q)-H0 = 0.0000002044188021, L(p,q)-L0 = 0.0000000000003870, Q(p,q)-Q0 = inf -t = 837.0000, H(p,q)-H0 = 0.0000002047793164, L(p,q)-L0 = 0.0000000000000236, Q(p,q)-Q0 = inf -t = 838.0000, H(p,q)-H0 = 0.0000002049615638, L(p,q)-L0 = 0.0000000000000246, Q(p,q)-Q0 = inf -t = 839.0000, H(p,q)-H0 = 0.0000002049735743, L(p,q)-L0 = 0.0000000000000256, Q(p,q)-Q0 = inf -t = 840.0000, H(p,q)-H0 = 0.0000002049375165, L(p,q)-L0 = 0.0000000000000258, Q(p,q)-Q0 = inf -t = 841.0000, H(p,q)-H0 = 0.0000002041961175, L(p,q)-L0 = 0.0000000000000259, Q(p,q)-Q0 = inf -ROOT RETURN: t = 841.8332 g[0] = 1, y[0] = 0.361052, y[1] = -0.221052 -t = 841.8332, H(p,q)-H0 = 0.0000000590573825, L(p,q)-L0 = 0.0000000004631682, Q(p,q)-Q0 = inf -t = 842.0000, H(p,q)-H0 = 0.0000000158649975, L(p,q)-L0 = 0.0000000000000259, Q(p,q)-Q0 = inf -ROOT RETURN: t = 842.9781 g[0] = -1, y[0] = -0.658727, y[1] = 0.798727 -t = 842.9781, H(p,q)-H0 = 0.0000002044114383, L(p,q)-L0 = 0.0000000000000515, Q(p,q)-Q0 = inf -t = 843.0000, H(p,q)-H0 = 0.0000002044629943, L(p,q)-L0 = 0.0000000000000256, Q(p,q)-Q0 = inf -t = 844.0000, H(p,q)-H0 = 0.0000002049463437, L(p,q)-L0 = 0.0000000000000245, Q(p,q)-Q0 = inf -t = 845.0000, H(p,q)-H0 = 0.0000002049740521, L(p,q)-L0 = 0.0000000000000243, Q(p,q)-Q0 = inf -t = 846.0000, H(p,q)-H0 = 0.0000002049570241, L(p,q)-L0 = 0.0000000000000251, Q(p,q)-Q0 = inf -t = 847.0000, H(p,q)-H0 = 0.0000002047016419, L(p,q)-L0 = 0.0000000000000231, Q(p,q)-Q0 = inf -t = 848.0000, H(p,q)-H0 = 0.0000001408783836, L(p,q)-L0 = 0.0000000000000218, Q(p,q)-Q0 = inf -ROOT RETURN: t = 848.1164 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 848.1164, H(p,q)-H0 = 0.0000000643322804, L(p,q)-L0 = 0.0000000002316378, Q(p,q)-Q0 = inf -t = 849.0000, H(p,q)-H0 = 0.0000002032157668, L(p,q)-L0 = 0.0000000000000216, Q(p,q)-Q0 = inf -ROOT RETURN: t = 849.2613 g[0] = -1, y[0] = -0.658728, y[1] = 0.798728 -t = 849.2613, H(p,q)-H0 = 0.0000002044215293, L(p,q)-L0 = 0.0000000000002244, Q(p,q)-Q0 = inf -t = 850.0000, H(p,q)-H0 = 0.0000002049160269, L(p,q)-L0 = 0.0000000000000199, Q(p,q)-Q0 = inf -t = 851.0000, H(p,q)-H0 = 0.0000002049718916, L(p,q)-L0 = 0.0000000000000211, Q(p,q)-Q0 = inf -t = 852.0000, H(p,q)-H0 = 0.0000002049671315, L(p,q)-L0 = 0.0000000000000221, Q(p,q)-Q0 = inf -t = 853.0000, H(p,q)-H0 = 0.0000002048584976, L(p,q)-L0 = 0.0000000000000220, Q(p,q)-Q0 = inf -t = 854.0000, H(p,q)-H0 = 0.0000001972156204, L(p,q)-L0 = 0.0000000000000221, Q(p,q)-Q0 = inf -ROOT RETURN: t = 854.3996 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 854.3996, H(p,q)-H0 = 0.0000000609561042, L(p,q)-L0 = 0.0000000000107792, Q(p,q)-Q0 = inf -t = 855.0000, H(p,q)-H0 = 0.0000001956370521, L(p,q)-L0 = 0.0000000000000218, Q(p,q)-Q0 = inf -ROOT RETURN: t = 855.5445 g[0] = -1, y[0] = -0.658729, y[1] = 0.798729 -t = 855.5445, H(p,q)-H0 = 0.0000002044213578, L(p,q)-L0 = 0.0000000000004370, Q(p,q)-Q0 = inf -t = 856.0000, H(p,q)-H0 = 0.0000002048491868, L(p,q)-L0 = 0.0000000000000211, Q(p,q)-Q0 = inf -t = 857.0000, H(p,q)-H0 = 0.0000002049664152, L(p,q)-L0 = 0.0000000000000215, Q(p,q)-Q0 = inf -t = 858.0000, H(p,q)-H0 = 0.0000002049722283, L(p,q)-L0 = 0.0000000000000223, Q(p,q)-Q0 = inf -t = 859.0000, H(p,q)-H0 = 0.0000002049200353, L(p,q)-L0 = 0.0000000000000231, Q(p,q)-Q0 = inf -t = 860.0000, H(p,q)-H0 = 0.0000002034389585, L(p,q)-L0 = 0.0000000000000219, Q(p,q)-Q0 = inf -ROOT RETURN: t = 860.6828 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 860.6828, H(p,q)-H0 = 0.0000000589181035, L(p,q)-L0 = 0.0000000004460974, Q(p,q)-Q0 = inf -t = 861.0000, H(p,q)-H0 = 0.0000001259715270, L(p,q)-L0 = 0.0000000000000210, Q(p,q)-Q0 = inf -ROOT RETURN: t = 861.8276 g[0] = -1, y[0] = -0.65873, y[1] = 0.79873 -t = 861.8276, H(p,q)-H0 = 0.0000002044101188, L(p,q)-L0 = 0.0000000000000667, Q(p,q)-Q0 = inf -t = 862.0000, H(p,q)-H0 = 0.0000002046755507, L(p,q)-L0 = 0.0000000000000191, Q(p,q)-Q0 = inf -t = 863.0000, H(p,q)-H0 = 0.0000002049556420, L(p,q)-L0 = 0.0000000000000178, Q(p,q)-Q0 = inf -t = 864.0000, H(p,q)-H0 = 0.0000002049741079, L(p,q)-L0 = 0.0000000000000162, Q(p,q)-Q0 = inf -t = 865.0000, H(p,q)-H0 = 0.0000002049482853, L(p,q)-L0 = 0.0000000000000165, Q(p,q)-Q0 = inf -t = 866.0000, H(p,q)-H0 = 0.0000002045130170, L(p,q)-L0 = 0.0000000000000152, Q(p,q)-Q0 = inf -ROOT RETURN: t = 866.9660 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 866.9660, H(p,q)-H0 = 0.0000000637540332, L(p,q)-L0 = 0.0000000002684681, Q(p,q)-Q0 = inf -t = 867.0000, H(p,q)-H0 = 0.0000000340171449, L(p,q)-L0 = 0.0000000000000164, Q(p,q)-Q0 = inf -t = 868.0000, H(p,q)-H0 = 0.0000002041000977, L(p,q)-L0 = 0.0000000000000160, Q(p,q)-Q0 = inf -ROOT RETURN: t = 868.1108 g[0] = -1, y[0] = -0.65873, y[1] = 0.79873 -t = 868.1108, H(p,q)-H0 = 0.0000002044195174, L(p,q)-L0 = 0.0000000000001222, Q(p,q)-Q0 = inf -t = 869.0000, H(p,q)-H0 = 0.0000002049348016, L(p,q)-L0 = 0.0000000000000147, Q(p,q)-Q0 = inf -t = 870.0000, H(p,q)-H0 = 0.0000002049733772, L(p,q)-L0 = 0.0000000000000152, Q(p,q)-Q0 = inf -t = 871.0000, H(p,q)-H0 = 0.0000002049625665, L(p,q)-L0 = 0.0000000000000158, Q(p,q)-Q0 = inf -t = 872.0000, H(p,q)-H0 = 0.0000002047949549, L(p,q)-L0 = 0.0000000000000154, Q(p,q)-Q0 = inf -t = 873.0000, H(p,q)-H0 = 0.0000001821777740, L(p,q)-L0 = 0.0000000000000165, Q(p,q)-Q0 = inf -ROOT RETURN: t = 873.2491 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 873.2491, H(p,q)-H0 = 0.0000000616030174, L(p,q)-L0 = 0.0000000000356655, Q(p,q)-Q0 = inf -t = 874.0000, H(p,q)-H0 = 0.0000002013692153, L(p,q)-L0 = 0.0000000000000144, Q(p,q)-Q0 = inf -ROOT RETURN: t = 874.3940 g[0] = -1, y[0] = -0.658731, y[1] = 0.798731 -t = 874.3940, H(p,q)-H0 = 0.0000002044235853, L(p,q)-L0 = 0.0000000000004705, Q(p,q)-Q0 = inf -t = 875.0000, H(p,q)-H0 = 0.0000002048915941, L(p,q)-L0 = 0.0000000000000155, Q(p,q)-Q0 = inf -t = 876.0000, H(p,q)-H0 = 0.0000002049698078, L(p,q)-L0 = 0.0000000000000154, Q(p,q)-Q0 = inf -t = 877.0000, H(p,q)-H0 = 0.0000002049699876, L(p,q)-L0 = 0.0000000000000155, Q(p,q)-Q0 = inf -t = 878.0000, H(p,q)-H0 = 0.0000002048937237, L(p,q)-L0 = 0.0000000000000154, Q(p,q)-Q0 = inf -t = 879.0000, H(p,q)-H0 = 0.0000002015668072, L(p,q)-L0 = 0.0000000000000159, Q(p,q)-Q0 = inf -ROOT RETURN: t = 879.5323 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 879.5323, H(p,q)-H0 = 0.0000000590360629, L(p,q)-L0 = 0.0000000004049061, Q(p,q)-Q0 = inf -t = 880.0000, H(p,q)-H0 = 0.0000001804146041, L(p,q)-L0 = 0.0000000000000154, Q(p,q)-Q0 = inf -ROOT RETURN: t = 880.6772 g[0] = -1, y[0] = -0.658732, y[1] = 0.798732 -t = 880.6772, H(p,q)-H0 = 0.0000002044095700, L(p,q)-L0 = 0.0000000000000914, Q(p,q)-Q0 = inf -t = 881.0000, H(p,q)-H0 = 0.0000002047895690, L(p,q)-L0 = 0.0000000000000158, Q(p,q)-Q0 = inf -t = 882.0000, H(p,q)-H0 = 0.0000002049622105, L(p,q)-L0 = 0.0000000000000161, Q(p,q)-Q0 = inf -t = 883.0000, H(p,q)-H0 = 0.0000002049734437, L(p,q)-L0 = 0.0000000000000170, Q(p,q)-Q0 = inf -t = 884.0000, H(p,q)-H0 = 0.0000002049357810, L(p,q)-L0 = 0.0000000000000168, Q(p,q)-Q0 = inf -t = 885.0000, H(p,q)-H0 = 0.0000002041357986, L(p,q)-L0 = 0.0000000000000173, Q(p,q)-Q0 = inf -ROOT RETURN: t = 885.8155 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 885.8155, H(p,q)-H0 = 0.0000000629811521, L(p,q)-L0 = 0.0000000003084932, Q(p,q)-Q0 = inf -t = 886.0000, H(p,q)-H0 = 0.0000000270379752, L(p,q)-L0 = 0.0000000000000178, Q(p,q)-Q0 = inf -ROOT RETURN: t = 886.9604 g[0] = -1, y[0] = -0.658733, y[1] = 0.798733 -t = 886.9604, H(p,q)-H0 = 0.0000002044181416, L(p,q)-L0 = 0.0000000000000475, Q(p,q)-Q0 = inf -t = 887.0000, H(p,q)-H0 = 0.0000002044959527, L(p,q)-L0 = 0.0000000000000173, Q(p,q)-Q0 = inf -t = 888.0000, H(p,q)-H0 = 0.0000002049476013, L(p,q)-L0 = 0.0000000000000178, Q(p,q)-Q0 = inf -t = 889.0000, H(p,q)-H0 = 0.0000002049740818, L(p,q)-L0 = 0.0000000000000170, Q(p,q)-Q0 = inf -t = 890.0000, H(p,q)-H0 = 0.0000002049561341, L(p,q)-L0 = 0.0000000000000179, Q(p,q)-Q0 = inf -t = 891.0000, H(p,q)-H0 = 0.0000002046851488, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf -t = 892.0000, H(p,q)-H0 = 0.0000001315782827, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf -ROOT RETURN: t = 892.0987 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 892.0987, H(p,q)-H0 = 0.0000000624977063, L(p,q)-L0 = 0.0000000000658597, Q(p,q)-Q0 = inf -t = 893.0000, H(p,q)-H0 = 0.0000002033638135, L(p,q)-L0 = 0.0000000000000184, Q(p,q)-Q0 = inf -ROOT RETURN: t = 893.2436 g[0] = -1, y[0] = -0.658733, y[1] = 0.798733 -t = 893.2436, H(p,q)-H0 = 0.0000002044252925, L(p,q)-L0 = 0.0000000000004973, Q(p,q)-Q0 = inf -t = 894.0000, H(p,q)-H0 = 0.0000002049186359, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf -t = 895.0000, H(p,q)-H0 = 0.0000002049721031, L(p,q)-L0 = 0.0000000000000177, Q(p,q)-Q0 = inf -t = 896.0000, H(p,q)-H0 = 0.0000002049666649, L(p,q)-L0 = 0.0000000000000159, Q(p,q)-Q0 = inf -t = 897.0000, H(p,q)-H0 = 0.0000002048525803, L(p,q)-L0 = 0.0000000000000149, Q(p,q)-Q0 = inf -t = 898.0000, H(p,q)-H0 = 0.0000001962370738, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf -ROOT RETURN: t = 898.3819 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 898.3819, H(p,q)-H0 = 0.0000000593789067, L(p,q)-L0 = 0.0000000003394204, Q(p,q)-Q0 = inf -t = 899.0000, H(p,q)-H0 = 0.0000001966927956, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf -ROOT RETURN: t = 899.5268 g[0] = -1, y[0] = -0.658734, y[1] = 0.798734 -t = 899.5268, H(p,q)-H0 = 0.0000002044098684, L(p,q)-L0 = 0.0000000000001296, Q(p,q)-Q0 = inf -t = 900.0000, H(p,q)-H0 = 0.0000002048552705, L(p,q)-L0 = 0.0000000000000144, Q(p,q)-Q0 = inf -t = 901.0000, H(p,q)-H0 = 0.0000002049668696, L(p,q)-L0 = 0.0000000000000149, Q(p,q)-Q0 = inf -t = 902.0000, H(p,q)-H0 = 0.0000002049720016, L(p,q)-L0 = 0.0000000000000138, Q(p,q)-Q0 = inf -t = 903.0000, H(p,q)-H0 = 0.0000002049174740, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf -t = 904.0000, H(p,q)-H0 = 0.0000002032993300, L(p,q)-L0 = 0.0000000000000138, Q(p,q)-Q0 = inf -ROOT RETURN: t = 904.6651 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 904.6651, H(p,q)-H0 = 0.0000000620975598, L(p,q)-L0 = 0.0000000003502251, Q(p,q)-Q0 = inf -t = 905.0000, H(p,q)-H0 = 0.0000001358884045, L(p,q)-L0 = 0.0000000000000141, Q(p,q)-Q0 = inf -ROOT RETURN: t = 905.8100 g[0] = -1, y[0] = -0.658735, y[1] = 0.798735 -t = 905.8100, H(p,q)-H0 = 0.0000002044181727, L(p,q)-L0 = 0.0000000000000147, Q(p,q)-Q0 = inf -t = 906.0000, H(p,q)-H0 = 0.0000002046926894, L(p,q)-L0 = 0.0000000000000148, Q(p,q)-Q0 = inf -t = 907.0000, H(p,q)-H0 = 0.0000002049565320, L(p,q)-L0 = 0.0000000000000150, Q(p,q)-Q0 = inf -t = 908.0000, H(p,q)-H0 = 0.0000002049740641, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf -t = 909.0000, H(p,q)-H0 = 0.0000002049470378, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf -t = 910.0000, H(p,q)-H0 = 0.0000002044814912, L(p,q)-L0 = 0.0000000000000137, Q(p,q)-Q0 = inf -ROOT RETURN: t = 910.9483 g[0] = 1, y[0] = 0.361051, y[1] = -0.221051 -t = 910.9483, H(p,q)-H0 = 0.0000000633904909, L(p,q)-L0 = 0.0000000000967431, Q(p,q)-Q0 = inf -t = 911.0000, H(p,q)-H0 = 0.0000000217558536, L(p,q)-L0 = 0.0000000000000142, Q(p,q)-Q0 = inf -t = 912.0000, H(p,q)-H0 = 0.0000002041635443, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf -ROOT RETURN: t = 912.0932 g[0] = -1, y[0] = -0.658736, y[1] = 0.798736 -t = 912.0932, H(p,q)-H0 = 0.0000002044262944, L(p,q)-L0 = 0.0000000000004957, Q(p,q)-Q0 = inf -t = 913.0000, H(p,q)-H0 = 0.0000002049365665, L(p,q)-L0 = 0.0000000000000170, Q(p,q)-Q0 = inf -t = 914.0000, H(p,q)-H0 = 0.0000002049735011, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf -t = 915.0000, H(p,q)-H0 = 0.0000002049619215, L(p,q)-L0 = 0.0000000000000175, Q(p,q)-Q0 = inf -t = 916.0000, H(p,q)-H0 = 0.0000002047850496, L(p,q)-L0 = 0.0000000000000182, Q(p,q)-Q0 = inf -t = 917.0000, H(p,q)-H0 = 0.0000001788710320, L(p,q)-L0 = 0.0000000000000173, Q(p,q)-Q0 = inf -ROOT RETURN: t = 917.2315 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 917.2315, H(p,q)-H0 = 0.0000000598767218, L(p,q)-L0 = 0.0000000002535148, Q(p,q)-Q0 = inf -t = 918.0000, H(p,q)-H0 = 0.0000002017181392, L(p,q)-L0 = 0.0000000000000168, Q(p,q)-Q0 = inf -ROOT RETURN: t = 918.3764 g[0] = -1, y[0] = -0.658736, y[1] = 0.798736 -t = 918.3764, H(p,q)-H0 = 0.0000002044109746, L(p,q)-L0 = 0.0000000000001783, Q(p,q)-Q0 = inf -t = 919.0000, H(p,q)-H0 = 0.0000002048954111, L(p,q)-L0 = 0.0000000000000144, Q(p,q)-Q0 = inf -t = 920.0000, H(p,q)-H0 = 0.0000002049701303, L(p,q)-L0 = 0.0000000000000153, Q(p,q)-Q0 = inf -t = 921.0000, H(p,q)-H0 = 0.0000002049696587, L(p,q)-L0 = 0.0000000000000147, Q(p,q)-Q0 = inf -t = 922.0000, H(p,q)-H0 = 0.0000002048898162, L(p,q)-L0 = 0.0000000000000151, Q(p,q)-Q0 = inf -t = 923.0000, H(p,q)-H0 = 0.0000002011982504, L(p,q)-L0 = 0.0000000000000149, Q(p,q)-Q0 = inf -ROOT RETURN: t = 923.5147 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 923.5147, H(p,q)-H0 = 0.0000000611928677, L(p,q)-L0 = 0.0000000003909214, Q(p,q)-Q0 = inf -t = 924.0000, H(p,q)-H0 = 0.0000001835116181, L(p,q)-L0 = 0.0000000000000157, Q(p,q)-Q0 = inf -ROOT RETURN: t = 924.6596 g[0] = -1, y[0] = -0.658737, y[1] = 0.798737 -t = 924.6596, H(p,q)-H0 = 0.0000002044180019, L(p,q)-L0 = 0.0000000000000171, Q(p,q)-Q0 = inf -t = 925.0000, H(p,q)-H0 = 0.0000002047991994, L(p,q)-L0 = 0.0000000000000165, Q(p,q)-Q0 = inf -t = 926.0000, H(p,q)-H0 = 0.0000002049628492, L(p,q)-L0 = 0.0000000000000157, Q(p,q)-Q0 = inf -t = 927.0000, H(p,q)-H0 = 0.0000002049733187, L(p,q)-L0 = 0.0000000000000143, Q(p,q)-Q0 = inf -t = 928.0000, H(p,q)-H0 = 0.0000002049339835, L(p,q)-L0 = 0.0000000000000124, Q(p,q)-Q0 = inf -t = 929.0000, H(p,q)-H0 = 0.0000002040696492, L(p,q)-L0 = 0.0000000000000120, Q(p,q)-Q0 = inf -ROOT RETURN: t = 929.7978 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 929.7978, H(p,q)-H0 = 0.0000000641108504, L(p,q)-L0 = 0.0000000001267221, Q(p,q)-Q0 = inf -t = 930.0000, H(p,q)-H0 = 0.0000000400123161, L(p,q)-L0 = 0.0000000000000121, Q(p,q)-Q0 = inf -ROOT RETURN: t = 930.9427 g[0] = -1, y[0] = -0.658738, y[1] = 0.798738 -t = 930.9427, H(p,q)-H0 = 0.0000002044264902, L(p,q)-L0 = 0.0000000000004714, Q(p,q)-Q0 = inf -t = 931.0000, H(p,q)-H0 = 0.0000002045263514, L(p,q)-L0 = 0.0000000000000135, Q(p,q)-Q0 = inf -t = 932.0000, H(p,q)-H0 = 0.0000002049488224, L(p,q)-L0 = 0.0000000000000133, Q(p,q)-Q0 = inf -t = 933.0000, H(p,q)-H0 = 0.0000002049741180, L(p,q)-L0 = 0.0000000000000125, Q(p,q)-Q0 = inf -t = 934.0000, H(p,q)-H0 = 0.0000002049552229, L(p,q)-L0 = 0.0000000000000124, Q(p,q)-Q0 = inf -t = 935.0000, H(p,q)-H0 = 0.0000002046674394, L(p,q)-L0 = 0.0000000000000133, Q(p,q)-Q0 = inf -t = 936.0000, H(p,q)-H0 = 0.0000001211531095, L(p,q)-L0 = 0.0000000000000125, Q(p,q)-Q0 = inf -ROOT RETURN: t = 936.0810 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 936.0810, H(p,q)-H0 = 0.0000000604188675, L(p,q)-L0 = 0.0000000001566494, Q(p,q)-Q0 = inf -t = 937.0000, H(p,q)-H0 = 0.0000002034969695, L(p,q)-L0 = 0.0000000000000120, Q(p,q)-Q0 = inf -ROOT RETURN: t = 937.2259 g[0] = -1, y[0] = -0.658739, y[1] = 0.798739 -t = 937.2259, H(p,q)-H0 = 0.0000002044127637, L(p,q)-L0 = 0.0000000000002298, Q(p,q)-Q0 = inf -t = 938.0000, H(p,q)-H0 = 0.0000002049211278, L(p,q)-L0 = 0.0000000000000111, Q(p,q)-Q0 = inf -t = 939.0000, H(p,q)-H0 = 0.0000002049723087, L(p,q)-L0 = 0.0000000000000112, Q(p,q)-Q0 = inf -t = 940.0000, H(p,q)-H0 = 0.0000002049661892, L(p,q)-L0 = 0.0000000000000127, Q(p,q)-Q0 = inf -t = 941.0000, H(p,q)-H0 = 0.0000002048463239, L(p,q)-L0 = 0.0000000000000129, Q(p,q)-Q0 = inf -t = 942.0000, H(p,q)-H0 = 0.0000001951135480, L(p,q)-L0 = 0.0000000000000119, Q(p,q)-Q0 = inf -ROOT RETURN: t = 942.3642 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 942.3642, H(p,q)-H0 = 0.0000000603545709, L(p,q)-L0 = 0.0000000004266573, Q(p,q)-Q0 = inf -t = 943.0000, H(p,q)-H0 = 0.0000001976130376, L(p,q)-L0 = 0.0000000000000121, Q(p,q)-Q0 = inf -ROOT RETURN: t = 943.5091 g[0] = -1, y[0] = -0.658739, y[1] = 0.798739 -t = 943.5091, H(p,q)-H0 = 0.0000002044164798, L(p,q)-L0 = 0.0000000000000149, Q(p,q)-Q0 = inf -t = 944.0000, H(p,q)-H0 = 0.0000002048610273, L(p,q)-L0 = 0.0000000000000117, Q(p,q)-Q0 = inf -t = 945.0000, H(p,q)-H0 = 0.0000002049673189, L(p,q)-L0 = 0.0000000000000113, Q(p,q)-Q0 = inf -t = 946.0000, H(p,q)-H0 = 0.0000002049717775, L(p,q)-L0 = 0.0000000000000101, Q(p,q)-Q0 = inf -t = 947.0000, H(p,q)-H0 = 0.0000002049147996, L(p,q)-L0 = 0.0000000000000091, Q(p,q)-Q0 = inf -t = 948.0000, H(p,q)-H0 = 0.0000002031439666, L(p,q)-L0 = 0.0000000000000093, Q(p,q)-Q0 = inf -ROOT RETURN: t = 948.6474 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 948.6474, H(p,q)-H0 = 0.0000000645559284, L(p,q)-L0 = 0.0000000001561030, Q(p,q)-Q0 = inf -t = 949.0000, H(p,q)-H0 = 0.0000001446970832, L(p,q)-L0 = 0.0000000000000090, Q(p,q)-Q0 = inf -ROOT RETURN: t = 949.7923 g[0] = -1, y[0] = -0.65874, y[1] = 0.79874 -t = 949.7923, H(p,q)-H0 = 0.0000002044258608, L(p,q)-L0 = 0.0000000000004192, Q(p,q)-Q0 = inf -t = 950.0000, H(p,q)-H0 = 0.0000002047086510, L(p,q)-L0 = 0.0000000000000102, Q(p,q)-Q0 = inf -t = 951.0000, H(p,q)-H0 = 0.0000002049573921, L(p,q)-L0 = 0.0000000000000095, Q(p,q)-Q0 = inf -t = 952.0000, H(p,q)-H0 = 0.0000002049740153, L(p,q)-L0 = 0.0000000000000085, Q(p,q)-Q0 = inf -t = 953.0000, H(p,q)-H0 = 0.0000002049457423, L(p,q)-L0 = 0.0000000000000097, Q(p,q)-Q0 = inf -t = 954.0000, H(p,q)-H0 = 0.0000002044472789, L(p,q)-L0 = 0.0000000000000100, Q(p,q)-Q0 = inf -ROOT RETURN: t = 954.9306 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 954.9306, H(p,q)-H0 = 0.0000000608515198, L(p,q)-L0 = 0.0000000000656522, Q(p,q)-Q0 = inf -t = 955.0000, H(p,q)-H0 = 0.0000000116384511, L(p,q)-L0 = 0.0000000000000085, Q(p,q)-Q0 = inf -t = 956.0000, H(p,q)-H0 = 0.0000002042214238, L(p,q)-L0 = 0.0000000000000092, Q(p,q)-Q0 = inf -ROOT RETURN: t = 956.0755 g[0] = -1, y[0] = -0.658741, y[1] = 0.798741 -t = 956.0755, H(p,q)-H0 = 0.0000002044150632, L(p,q)-L0 = 0.0000000000002869, Q(p,q)-Q0 = inf -t = 957.0000, H(p,q)-H0 = 0.0000002049382501, L(p,q)-L0 = 0.0000000000000088, Q(p,q)-Q0 = inf -t = 958.0000, H(p,q)-H0 = 0.0000002049736090, L(p,q)-L0 = 0.0000000000000080, Q(p,q)-Q0 = inf -t = 959.0000, H(p,q)-H0 = 0.0000002049612455, L(p,q)-L0 = 0.0000000000000084, Q(p,q)-Q0 = inf -t = 960.0000, H(p,q)-H0 = 0.0000002047744759, L(p,q)-L0 = 0.0000000000000074, Q(p,q)-Q0 = inf -t = 961.0000, H(p,q)-H0 = 0.0000001750455147, L(p,q)-L0 = 0.0000000000000069, Q(p,q)-Q0 = inf -ROOT RETURN: t = 961.2138 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 961.2138, H(p,q)-H0 = 0.0000000596608996, L(p,q)-L0 = 0.0000000004526731, Q(p,q)-Q0 = inf -t = 962.0000, H(p,q)-H0 = 0.0000002020274281, L(p,q)-L0 = 0.0000000000000071, Q(p,q)-Q0 = inf -ROOT RETURN: t = 962.3587 g[0] = -1, y[0] = -0.658742, y[1] = 0.798742 -t = 962.3587, H(p,q)-H0 = 0.0000002044144006, L(p,q)-L0 = 0.0000000000000160, Q(p,q)-Q0 = inf -t = 963.0000, H(p,q)-H0 = 0.0000002048990325, L(p,q)-L0 = 0.0000000000000062, Q(p,q)-Q0 = inf -t = 964.0000, H(p,q)-H0 = 0.0000002049704351, L(p,q)-L0 = 0.0000000000000061, Q(p,q)-Q0 = inf -t = 965.0000, H(p,q)-H0 = 0.0000002049693122, L(p,q)-L0 = 0.0000000000000061, Q(p,q)-Q0 = inf -t = 966.0000, H(p,q)-H0 = 0.0000002048856934, L(p,q)-L0 = 0.0000000000000059, Q(p,q)-Q0 = inf -t = 967.0000, H(p,q)-H0 = 0.0000002007812476, L(p,q)-L0 = 0.0000000000000049, Q(p,q)-Q0 = inf -ROOT RETURN: t = 967.4970 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 967.4970, H(p,q)-H0 = 0.0000000646795120, L(p,q)-L0 = 0.0000000001861755, Q(p,q)-Q0 = inf -t = 968.0000, H(p,q)-H0 = 0.0000001861877723, L(p,q)-L0 = 0.0000000000000052, Q(p,q)-Q0 = inf -ROOT RETURN: t = 968.6419 g[0] = -1, y[0] = -0.658743, y[1] = 0.798743 -t = 968.6419, H(p,q)-H0 = 0.0000002044244880, L(p,q)-L0 = 0.0000000000003418, Q(p,q)-Q0 = inf -t = 969.0000, H(p,q)-H0 = 0.0000002048082257, L(p,q)-L0 = 0.0000000000000033, Q(p,q)-Q0 = inf -t = 970.0000, H(p,q)-H0 = 0.0000002049634518, L(p,q)-L0 = 0.0000000000000034, Q(p,q)-Q0 = inf -t = 971.0000, H(p,q)-H0 = 0.0000002049731755, L(p,q)-L0 = 0.0000000000000033, Q(p,q)-Q0 = inf -t = 972.0000, H(p,q)-H0 = 0.0000002049320982, L(p,q)-L0 = 0.0000000000000041, Q(p,q)-Q0 = inf -t = 973.0000, H(p,q)-H0 = 0.0000002039969692, L(p,q)-L0 = 0.0000000000000036, Q(p,q)-Q0 = inf -ROOT RETURN: t = 973.7802 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 973.7802, H(p,q)-H0 = 0.0000000609758701, L(p,q)-L0 = 0.0000000000066527, Q(p,q)-Q0 = inf -t = 974.0000, H(p,q)-H0 = 0.0000000540323211, L(p,q)-L0 = 0.0000000000000033, Q(p,q)-Q0 = inf -ROOT RETURN: t = 974.9251 g[0] = -1, y[0] = -0.658743, y[1] = 0.798743 -t = 974.9251, H(p,q)-H0 = 0.0000002044176416, L(p,q)-L0 = 0.0000000000003411, Q(p,q)-Q0 = inf -t = 975.0000, H(p,q)-H0 = 0.0000002045544040, L(p,q)-L0 = 0.0000000000000040, Q(p,q)-Q0 = inf -t = 976.0000, H(p,q)-H0 = 0.0000002049499875, L(p,q)-L0 = 0.0000000000000036, Q(p,q)-Q0 = inf -t = 977.0000, H(p,q)-H0 = 0.0000002049741388, L(p,q)-L0 = 0.0000000000000028, Q(p,q)-Q0 = inf -t = 978.0000, H(p,q)-H0 = 0.0000002049542684, L(p,q)-L0 = 0.0000000000000008, Q(p,q)-Q0 = inf -t = 979.0000, H(p,q)-H0 = 0.0000002046483805, L(p,q)-L0 = -0.0000000000000008, Q(p,q)-Q0 = inf -t = 980.0000, H(p,q)-H0 = 0.0000001096002278, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf -ROOT RETURN: t = 980.0634 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 980.0634, H(p,q)-H0 = 0.0000000591741722, L(p,q)-L0 = 0.0000000004638443, Q(p,q)-Q0 = inf -t = 981.0000, H(p,q)-H0 = 0.0000002036169391, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf -ROOT RETURN: t = 981.2083 g[0] = -1, y[0] = -0.658744, y[1] = 0.798744 -t = 981.2083, H(p,q)-H0 = 0.0000002044123416, L(p,q)-L0 = 0.0000000000000180, Q(p,q)-Q0 = inf -t = 982.0000, H(p,q)-H0 = 0.0000002049235003, L(p,q)-L0 = -0.0000000000000004, Q(p,q)-Q0 = inf -t = 983.0000, H(p,q)-H0 = 0.0000002049724979, L(p,q)-L0 = -0.0000000000000003, Q(p,q)-Q0 = inf -t = 984.0000, H(p,q)-H0 = 0.0000002049656862, L(p,q)-L0 = -0.0000000000000004, Q(p,q)-Q0 = inf -t = 985.0000, H(p,q)-H0 = 0.0000002048396803, L(p,q)-L0 = -0.0000000000000011, Q(p,q)-Q0 = inf -t = 986.0000, H(p,q)-H0 = 0.0000001938213499, L(p,q)-L0 = -0.0000000000000036, Q(p,q)-Q0 = inf -ROOT RETURN: t = 986.3466 g[0] = 1, y[0] = 0.36105, y[1] = -0.22105 -t = 986.3466, H(p,q)-H0 = 0.0000000644814311, L(p,q)-L0 = 0.0000000002184182, Q(p,q)-Q0 = inf -t = 987.0000, H(p,q)-H0 = 0.0000001984166235, L(p,q)-L0 = -0.0000000000000031, Q(p,q)-Q0 = inf -ROOT RETURN: t = 987.4915 g[0] = -1, y[0] = -0.658745, y[1] = 0.798745 -t = 987.4915, H(p,q)-H0 = 0.0000002044225862, L(p,q)-L0 = 0.0000000000002461, Q(p,q)-Q0 = inf -t = 988.0000, H(p,q)-H0 = 0.0000002048664609, L(p,q)-L0 = -0.0000000000000020, Q(p,q)-Q0 = inf -t = 989.0000, H(p,q)-H0 = 0.0000002049677437, L(p,q)-L0 = -0.0000000000000012, Q(p,q)-Q0 = inf -t = 990.0000, H(p,q)-H0 = 0.0000002049715348, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf -t = 991.0000, H(p,q)-H0 = 0.0000002049119866, L(p,q)-L0 = -0.0000000000000042, Q(p,q)-Q0 = inf -t = 992.0000, H(p,q)-H0 = 0.0000002029707531, L(p,q)-L0 = -0.0000000000000052, Q(p,q)-Q0 = inf -ROOT RETURN: t = 992.6297 g[0] = 1, y[0] = 0.361049, y[1] = -0.221049 -t = 992.6297, H(p,q)-H0 = 0.0000000608365176, L(p,q)-L0 = 0.0000000000043042, Q(p,q)-Q0 = inf -t = 993.0000, H(p,q)-H0 = 0.0000001524590705, L(p,q)-L0 = -0.0000000000000037, Q(p,q)-Q0 = inf -ROOT RETURN: t = 993.7747 g[0] = -1, y[0] = -0.658746, y[1] = 0.798746 -t = 993.7747, H(p,q)-H0 = 0.0000002044202644, L(p,q)-L0 = 0.0000000000003899, Q(p,q)-Q0 = inf -t = 994.0000, H(p,q)-H0 = 0.0000002047235210, L(p,q)-L0 = -0.0000000000000027, Q(p,q)-Q0 = inf -t = 995.0000, H(p,q)-H0 = 0.0000002049582109, L(p,q)-L0 = -0.0000000000000031, Q(p,q)-Q0 = inf -t = 996.0000, H(p,q)-H0 = 0.0000002049739506, L(p,q)-L0 = -0.0000000000000028, Q(p,q)-Q0 = inf -t = 997.0000, H(p,q)-H0 = 0.0000002049443828, L(p,q)-L0 = -0.0000000000000029, Q(p,q)-Q0 = inf -t = 998.0000, H(p,q)-H0 = 0.0000002044100896, L(p,q)-L0 = -0.0000000000000017, Q(p,q)-Q0 = inf -ROOT RETURN: t = 998.9129 g[0] = 1, y[0] = 0.361049, y[1] = -0.221049 -t = 998.9129, H(p,q)-H0 = 0.0000000589348204, L(p,q)-L0 = 0.0000000004553780, Q(p,q)-Q0 = inf -t = 999.0000, H(p,q)-H0 = 0.0000000043782606, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf -t = 1000.0000, H(p,q)-H0 = 0.0000002042743010, L(p,q)-L0 = -0.0000000000000010, Q(p,q)-Q0 = inf -Current time = 1000 -Steps = 100000 -Step attempts = 100000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.010000000000000000208166817117217 -Last step size = 0.010000000000000000208166817117217 -Current step size = 0.010000000000000000208166817117217 -Root fn evals = 102775 -f1 RHS fn evals = 511109 -f2 RHS fn evals = 511109 diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index a2d7e79f68..d02c3af525 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -57,16 +57,17 @@ struct ARKodeSPRKStorage_s typedef _SUNDIALS_STRUCT_ ARKodeSPRKStorage_s* ARKodeSPRKStorage; /* Utility routines to allocate/free/output SPRK structures */ -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_LoadByName(const char* method); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage B); -SUNDIALS_EXPORT void ARKodeSPRKMem_Space(ARKodeSPRKStorage B, sunindextype* liw, - sunindextype* lrw); -SUNDIALS_EXPORT void ARKodeSPRKMem_Free(ARKodeSPRKStorage B); -SUNDIALS_EXPORT int ARKodeSPRKMem_ToButcher(ARKodeSPRKStorage sprk_storage, - ARKodeButcherTable* a_ptr, - ARKodeButcherTable* b_ptr); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage__Alloc(int stages); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage__Load(ARKODE_SPRKMethodID id); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage__LoadByName(const char* method); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage__Copy(ARKodeSPRKStorage B); +SUNDIALS_EXPORT void ARKodeSPRKStorage__Space(ARKodeSPRKStorage B, + sunindextype* liw, + sunindextype* lrw); +SUNDIALS_EXPORT void ARKodeSPRKStorage__Free(ARKodeSPRKStorage B); +SUNDIALS_EXPORT int ARKodeSPRKStorage__ToButcher(ARKodeSPRKStorage sprk_storage, + ARKodeButcherTable* a_ptr, + ARKodeButcherTable* b_ptr); /* Different methods */ diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index c788cb3747..a286eee974 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -67,12 +67,14 @@ SUNDIALS_EXPORT int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g); SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff); -SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage); +SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, + ARKodeSPRKStorage sprk_storage); SUNDIALS_EXPORT int SPRKStepSetMethodName(void* arkode_mem, const char* method); SUNDIALS_EXPORT int SPRKStepSetOrder(void* arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree); -/* TODO(CJB): should we remove this from the initial release and wait for the OO adaptivity? */ +/* TODO(CJB): should we remove this from the initial release and wait for the OO + * adaptivity? */ SUNDIALS_EXPORT int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data); SUNDIALS_EXPORT int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 60b80dc49f..6ad4b6b466 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -24,7 +24,7 @@ ARKodeSPRKStorage ARKodeSymplecticEuler() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(1); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(1); sprk_storage->q = 1; sprk_storage->stages = 1; sprk_storage->a[0] = SUN_RCONST(1.0); @@ -43,7 +43,7 @@ ARKodeSPRKStorage ARKodeSymplecticEuler() ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(2); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(2); sprk_storage->q = 2; sprk_storage->stages = 2; sprk_storage->a[0] = SUN_RCONST(0.5); @@ -55,7 +55,7 @@ ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(2); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(2); sprk_storage->q = 2; sprk_storage->stages = 2; sprk_storage->a[0] = SUN_RCONST(1.0); @@ -67,7 +67,7 @@ ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(4); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(4); sprk_storage->q = 4; sprk_storage->stages = 4; sprk_storage->a[0] = @@ -105,7 +105,7 @@ ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() ARKodeSPRKStorage ARKodeSymplecticRuth3() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(3); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(3); sprk_storage->q = 3; sprk_storage->stages = 3; sprk_storage->a[0] = SUN_RCONST(2.0) / SUN_RCONST(3.0); @@ -126,7 +126,7 @@ ARKodeSPRKStorage ARKodeSymplecticRuth3() ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(2); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(2); sprk_storage->q = 2; sprk_storage->stages = 2; sprk_storage->a[1] = SUN_RCONST(1.0) - @@ -140,7 +140,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(3); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(3); sprk_storage->q = 3; sprk_storage->stages = 3; sprk_storage->a[0] = SUN_RCONST(0.919661523017399857); @@ -155,7 +155,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(4); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(4); sprk_storage->q = 4; sprk_storage->stages = 4; sprk_storage->a[0] = SUN_RCONST(0.515352837431122936); @@ -171,7 +171,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(6); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(6); sprk_storage->q = 5; sprk_storage->stages = 6; sprk_storage->a[0] = SUN_RCONST(0.339839625839110000); @@ -200,7 +200,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() ARKodeSPRKStorage ARKodeSymplecticYoshida6() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(8); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(8); sprk_storage->q = 6; sprk_storage->stages = 8; sprk_storage->a[0] = SUN_RCONST(0.78451361047755726382); @@ -236,7 +236,7 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(16); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(16); sprk_storage->q = 8; sprk_storage->stages = 16; sprk_storage->a[0] = SUN_RCONST(0.74167036435061295344822780); @@ -292,7 +292,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() ARKodeSPRKStorage ARKodeSymplecticSofroniou10() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKMem_Alloc(36); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(36); sprk_storage->q = 10; sprk_storage->stages = 36; @@ -389,7 +389,7 @@ ARKodeSPRKStorage ARKodeSymplecticSofroniou10() return sprk_storage; } -ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages) +ARKodeSPRKStorage ARKodeSPRKStorage__Alloc(int stages) { ARKodeSPRKStorage sprk_storage; @@ -403,7 +403,7 @@ ARKodeSPRKStorage ARKodeSPRKMem_Alloc(int stages) return sprk_storage; } -ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) +ARKodeSPRKStorage ARKodeSPRKStorage__Load(ARKODE_SPRKMethodID id) { switch (id) { @@ -425,7 +425,7 @@ ARKodeSPRKStorage ARKodeSPRKMem_Load(ARKODE_SPRKMethodID id) } } -ARKodeSPRKStorage ARKodeSPRKMem_LoadByName(const char* method) +ARKodeSPRKStorage ARKodeSPRKStorage__LoadByName(const char* method) { if (!strcmp(method, "ARKODE_SYMPLECTIC_EULER_1_1")) { @@ -478,12 +478,12 @@ ARKodeSPRKStorage ARKodeSPRKMem_LoadByName(const char* method) else { return NULL; } } -ARKodeSPRKStorage ARKodeSPRKMem_Copy(ARKodeSPRKStorage that_sprk_mem) +ARKodeSPRKStorage ARKodeSPRKStorage__Copy(ARKodeSPRKStorage that_sprk_mem) { int i; ARKodeSPRKStorage sprk_storage; - sprk_storage = ARKodeSPRKMem_Alloc(that_sprk_mem->stages); + sprk_storage = ARKodeSPRKStorage__Alloc(that_sprk_mem->stages); sprk_storage->q = that_sprk_mem->q; @@ -504,7 +504,7 @@ void ARKodeSPRKStorage_space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, return; } -void ARKodeSPRKMem_Free(ARKodeSPRKStorage sprk_storage) +void ARKodeSPRKStorage__Free(ARKodeSPRKStorage sprk_storage) { if (sprk_storage) { @@ -515,7 +515,7 @@ void ARKodeSPRKMem_Free(ARKodeSPRKStorage sprk_storage) return; } -int ARKodeSPRKMem_ToButcher(ARKodeSPRKStorage sprk_storage, +int ARKodeSPRKStorage__ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) { int i, j; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index e2d663b5ea..f32bbce813 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -351,7 +351,7 @@ void SPRKStepFree(void** arkode_mem) step_mem->sdata = NULL; } - ARKodeSPRKMem_Free(step_mem->method); + ARKodeSPRKStorage__Free(step_mem->method); free(ark_mem->step_mem); ark_mem->step_mem = NULL; @@ -407,19 +407,35 @@ int sprkStep_Init(void* arkode_mem, int init_type) { switch (step_mem->q) { - case 1: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_1); break; - case 2: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_2); break; - case 3: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_3); break; - case 4: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); break; - case 5: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_5); break; - case 6: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_6); break; + case 1: + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_1); + break; + case 2: + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_2); + break; + case 3: + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_3); + break; + case 4: + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_4); + break; + case 5: + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_5); + break; + case 6: + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_6); + break; case 7: - case 8: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_8); break; + case 8: + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_8); + break; case 9: case 10: - step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_10); + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_10); + break; + default: + step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_4); break; - default: step_mem->method = ARKodeSPRKMem_Load(SPRKSTEP_DEFAULT_4); break; } } } diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 01cd3d975f..002046a43a 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -252,8 +252,8 @@ int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) int retval; /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUseCompensatedSums", &ark_mem, - &step_mem); + retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUseCompensatedSums", + &ark_mem, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } if (onoff) @@ -291,7 +291,7 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) if (step_mem->method) { - ARKodeSPRKMem_Free(step_mem->method); + ARKodeSPRKStorage__Free(step_mem->method); step_mem->method = NULL; } @@ -300,7 +300,6 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) return (ARK_SUCCESS); } - /*--------------------------------------------------------------- SPRKStepSetMethodName: @@ -319,11 +318,11 @@ int SPRKStepSetMethodName(void* arkode_mem, const char* method) if (step_mem->method) { - ARKodeSPRKMem_Free(step_mem->method); + ARKodeSPRKStorage__Free(step_mem->method); step_mem->method = NULL; } - step_mem->method = ARKodeSPRKMem_LoadByName(method); + step_mem->method = ARKodeSPRKStorage__LoadByName(method); return (ARK_SUCCESS); } @@ -353,7 +352,7 @@ int SPRKStepSetOrder(void* arkode_mem, int ord) if (step_mem->method) { - ARKodeSPRKMem_Free(step_mem->method); + ARKodeSPRKStorage__Free(step_mem->method); step_mem->method = NULL; } From 6fa53dc22c0c3632bb2f0be9922c097ee2373c19 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sun, 18 Jun 2023 00:13:04 -0700 Subject: [PATCH 075/177] update tarscript --- scripts/arkode | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/arkode b/scripts/arkode index f87b467d4a..b87fca7ec6 100755 --- a/scripts/arkode +++ b/scripts/arkode @@ -45,6 +45,8 @@ $tar $tarfile $distrobase/include/arkode/arkode_erkstep.h $tar $tarfile $distrobase/include/arkode/arkode_ls.h $tar $tarfile $distrobase/include/arkode/arkode_mristep.h $tar $tarfile $distrobase/include/arkode/arkode_xbraid.h +$tar $tarfile $distrobase/include/arkode/arkode_sprkstep.h +$tar $tarfile $distrobase/include/arkode/arkode_sprk.h $tar $tarfile $distrobase/src/arkode/LICENSE $tar $tarfile $distrobase/src/arkode/NOTICE @@ -70,6 +72,10 @@ $tar $tarfile $distrobase/src/arkode/arkode_butcher_erk.def $tar $tarfile $distrobase/src/arkode/arkode_erkstep.c $tar $tarfile $distrobase/src/arkode/arkode_erkstep_impl.h $tar $tarfile $distrobase/src/arkode/arkode_erkstep_io.c +$tar $tarfile $distrobase/src/arkode/arkode_sprk.c +$tar $tarfile $distrobase/src/arkode/arkode_sprkstep.c +$tar $tarfile $distrobase/src/arkode/arkode_sprkstep_impl.h +$tar $tarfile $distrobase/src/arkode/arkode_sprkstep_io.c $tar $tarfile $distrobase/src/arkode/arkode_impl.h $tar $tarfile $distrobase/src/arkode/arkode_interp.c $tar $tarfile $distrobase/src/arkode/arkode_interp_impl.h @@ -188,6 +194,11 @@ $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D_adapt.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D_adapt.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.c +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_plot.py +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.c +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri_0_0.002.out From b3bc74528b609d6ac6583f34c9d45deb901dc580 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Sun, 18 Jun 2023 00:17:32 -0700 Subject: [PATCH 076/177] update defaults --- examples/arkode/C_serial/ark_harmonic_symplectic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index 9a4154dabe..2ec5fa6bbe 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -118,7 +118,7 @@ int main(int argc, char* argv[]) /* Allocate and fill udata structure */ udata.A = sqrt(alpha * alpha + beta * beta); - udata.phi = atan(beta / omega / alpha); + udata.phi = atan((beta / omega) / alpha); udata.omega = omega; /* Allocate our state vector */ @@ -240,7 +240,7 @@ int Force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int ParseArgs(int argc, char* argv[], ProgramArgs* args) { args->order = 4; - args->num_output_times = 1000; + args->num_output_times = 8; args->use_compsums = 0; args->dt = SUN_RCONST(1e-2); From 49f6e8fa6f751bdc06086b10383e032e7eda878d Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 09:42:26 -0700 Subject: [PATCH 077/177] remove extra script --- .../C_serial/ark_kepler_test_convergence.sh | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100755 examples/arkode/C_serial/ark_kepler_test_convergence.sh diff --git a/examples/arkode/C_serial/ark_kepler_test_convergence.sh b/examples/arkode/C_serial/ark_kepler_test_convergence.sh deleted file mode 100755 index 4aafe2fe51..0000000000 --- a/examples/arkode/C_serial/ark_kepler_test_convergence.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -methods=( - ARKODE_SYMPLECTIC_EULER_1_1 - ARKODE_SYMPLECTIC_LEAPFROG_2_2 - ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 - ARKODE_SYMPLECTIC_MCLACHLAN_2_2 - ARKODE_SYMPLECTIC_RUTH_3_3 - ARKODE_SYMPLECTIC_MCLACHLAN_3_3 - ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 - ARKODE_SYMPLECTIC_MCLACHLAN_4_4 - ARKODE_SYMPLECTIC_MCLACHLAN_5_6 - ARKODE_SYMPLECTIC_YOSHIDA_6_8 - ARKODE_SYMPLECTIC_MCLACHLAN_8_16 - ARKODE_SYMPLECTIC_SOFRONIOU_10_36 -) -for method in ${methods[@]}; -do - ./ark_kepler --stepper SPRK --step-mode fixed --method $method --tf 50 --check-order --nout 1 -done From 6e41fc4565f97760c5c462cf79f182f79380261f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 11:27:48 -0700 Subject: [PATCH 078/177] add baseline output for examples --- examples/arkode/C_serial/CMakeLists.txt | 18 +- .../arkode/C_serial/ark_harmonic_symplectic.c | 63 +- .../C_serial/ark_harmonic_symplectic.out | 26 + examples/arkode/C_serial/ark_kepler.out | 1025 ++++++++++++++++ ...kepler_--stepper_ERK_--step-mode_adapt.out | 1029 ++++++++++++++++ ...per_ERK_--step-mode_fixed_--find-roots.out | 1092 +++++++++++++++++ ...er_SPRK_--step-mode_fixed_--find-roots.out | 1088 ++++++++++++++++ ...ed_--find-roots_--use-compensated-sums.out | 1088 ++++++++++++++++ ...e_fixed_--find-roots_--use-compensated.out | 11 + ...LER_1_1_--tf_50_--check-order_--nout_1.out | 248 ++++ ...ROG_2_2_--tf_50_--check-order_--nout_1.out | 248 ++++ ...LAN_2_2_--tf_50_--check-order_--nout_1.out | 248 ++++ ...LAN_3_3_--tf_50_--check-order_--nout_1.out | 248 ++++ ...LAN_4_4_--tf_50_--check-order_--nout_1.out | 248 ++++ ...LAN_5_6_--tf_50_--check-order_--nout_1.out | 248 ++++ ...ROG_2_2_--tf_50_--check-order_--nout_1.out | 248 ++++ ...UTH_3_3_--tf_50_--check-order_--nout_1.out | 248 ++++ ...IDA_6_8_--tf_50_--check-order_--nout_1.out | 248 ++++ ...LER_1_1_--tf_50_--check-order_--nout_1.out | 0 test/answers | 2 +- 20 files changed, 7637 insertions(+), 37 deletions(-) create mode 100644 examples/arkode/C_serial/ark_harmonic_symplectic.out create mode 100644 examples/arkode/C_serial/ark_kepler.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--find-roots.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated-sums.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out create mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out create mode 100644 scripts/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 9ad7fa69eb..0ac56f4359 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -20,9 +20,12 @@ # Examples using SUNDIALS linear solvers set(ARKODE_examples + # tests that are always run + "ark_analytic\;\;" + "ark_harmonic_symplectic\;\;" + # develop tests "ark_analytic_mels\;\;develop" "ark_analytic_nonlin\;\;develop" - "ark_analytic\;\;" "ark_brusselator_1D_mri\;\;develop" "ark_brusselator_fp\;\;exclude-single" "ark_brusselator_mri\;\;develop" @@ -35,22 +38,21 @@ set(ARKODE_examples "ark_brusselator1D_imexmri\;6 0.001\;exclude-single" "ark_brusselator1D_imexmri\;7 0.001\;exclude-single" "ark_brusselator1D\;\;exclude-single" - "ark_harmonic_symplectic\;\;" "ark_heat1D_adapt\;\;develop" "ark_heat1D\;\;develop" "ark_kepler\;\;develop" "ark_kepler\;--stepper ERK --step-mode adapt\;develop" "ark_kepler\;--stepper ERK --step-mode fixed --find-roots\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --find-roots\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --find-roots --use-compensated-sums\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_EULER_1_1 --tf 50 --check-order --nout 1\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_2_2 --tf 50 --check-order --nout 1\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_RUTH_3_3 --tf 50 --check-order --nout 1\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_3_3 --tf 50 --check-order --nout 1\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_4_4 --tf 50 --check-order --nout 1\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_5_6 --tf 50 --check-order --nout 1\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_YOSHIDA_6_8 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_RUTH_3_3 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_3_3 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_4_4 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_5_6 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_YOSHIDA_6_8 --tf 50 --check-order --nout 1\;exclude-single" "ark_kpr_mri\;\;develop" "ark_kpr_mri\;0 0.002\;develop" "ark_kpr_mri\;1 0.002\;develop" diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index 2ec5fa6bbe..5009a1cda7 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -17,14 +17,14 @@ * We rewrite the second order ODE as the first order ODE model * x'(t) = v(t) * v'(t) = -omega^2*x(t). - * With the initial conditions x(0) = alpha and v(0) = beta*omega, + * With the initial conditions x(0) = x0 and v(0) = v0, * the analytical solution is - * x(t) = A*cos(t*omega - phi), - * v(t) = -A*omega*sin(t*omega - phi) - * where A = sqrt(alpha + beta) and tan(phi) = beta/alpha. - * The potential energy in this system is given by - * U = 1/2*k*x^2 - * U is conserved and is the system Hamiltonian. + * x(t) = A*cos(t*omega + phi), + * v(t) = -A*omega*sin(t*omega + phi) + * where A = sqrt(x0^2 + v0^2/omega) and tan(phi) = v0/(omega*x0). + * The total energy (potential + kinetic) in this system is + * E = (v^2 + omega^2*x^2) / 2 + * E is conserved and is the system Hamiltonian. * We simulate the problem on t = [0, 2pi] using the symplectic methods * in SPRKStep. Symplectic methods will approximately conserve U. * @@ -39,7 +39,7 @@ /* clang-format: on */ #include -#include /* prototypes for MRIStep fcts., consts */ +#include /* prototypes for SPRKStep fcts., consts */ #include #include /* serial N_Vector type, fcts., macros */ #include @@ -103,11 +103,11 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(2 * M_PI); - sunrealtype dt = SUN_RCONST(args.dt); - const sunrealtype omega = SUN_RCONST(16.0); - const sunrealtype alpha = SUN_RCONST(0.0); - const sunrealtype beta = SUN_RCONST(0.2); + sunrealtype Tf = SUN_RCONST(2.0) * M_PI; + sunrealtype dt = args.dt; + const sunrealtype A = SUN_RCONST(10.0); + const sunrealtype phi = SUN_RCONST(0.0); + const sunrealtype omega = SUN_RCONST(1.0); const sunrealtype dTout = (Tf - T0) / ((sunrealtype)num_output_times); /* Create the SUNDIALS context object for this simulation */ @@ -117,8 +117,8 @@ int main(int argc, char* argv[]) printf("\n Begin simple harmonic oscillator problem\n\n"); /* Allocate and fill udata structure */ - udata.A = sqrt(alpha * alpha + beta * beta); - udata.phi = atan((beta / omega) / alpha); + udata.A = A; + udata.phi = phi; udata.omega = omega; /* Allocate our state vector */ @@ -127,8 +127,8 @@ int main(int argc, char* argv[]) /* Fill the initial conditions */ ydata = N_VGetArrayPointer(y); - ydata[0] = alpha; - ydata[1] = omega * beta; + ydata[0] = A*cos(phi); + ydata[1] = -A*omega*sin(phi); /* Create SPRKStep integrator */ arkode_mem = SPRKStepCreate(Force, Velocity, T0, y, sunctx); @@ -151,8 +151,8 @@ int main(int argc, char* argv[]) /* Print out starting energy, momentum before integrating */ tret = T0; tout = T0 + dTout; - fprintf(stdout, "t = %.6Lf, sol. err = %.6Lf, energy = %.6Lf\n", tret, - SUN_RCONST(0.0), Energy(y, dt, &udata)); + fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.6Lf\n", tret, + ydata[0], Energy(y, dt, &udata), SUN_RCONST(0.0)); /* Do integration */ for (iout = 0; iout < num_output_times; iout++) @@ -162,13 +162,20 @@ int main(int argc, char* argv[]) /* Compute the anaytical solution */ Solution(tret, y, solution, &udata); - /* Compute error */ + /* Compute L2 error */ N_VLinearSum(SUN_RCONST(1.0), y, -SUN_RCONST(1.0), solution, solution); err = sqrt(N_VDotProd(solution, solution)); /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, sol. err = %.6Lf, energy = %.6Lf\n", tret, err, - Energy(y, dt, &udata)); + fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.6Lf\n", tret, + ydata[0], Energy(y, dt, &udata), err); + + /* Check that solution error is within tolerance */ + if (err > SUNMAX(10*dt, 100*SUN_UNIT_ROUNDOFF)) + { + fprintf(stderr, "FAILURE: solution error is too high\n"); + return 1; + } /* Check if the solve was successful, if so, update the time and continue */ @@ -198,21 +205,21 @@ void Solution(sunrealtype t, N_Vector y, N_Vector solvec, UserData* udata) sunrealtype* sol = N_VGetArrayPointer(solvec); /* compute solution */ - sol[0] = udata->A * cos(udata->omega * t - udata->phi); - sol[1] = -udata->A * udata->omega * sin(udata->omega * t - udata->phi); + sol[0] = udata->A * cos(udata->omega * t + udata->phi); + sol[1] = -udata->A * udata->omega * sin(udata->omega * t + udata->phi); } sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData* udata) { - sunrealtype H = 0.0; + sunrealtype E = 0.0; sunrealtype* y = N_VGetArrayPointer(yvec); const sunrealtype x = y[0]; const sunrealtype v = y[1]; const sunrealtype omega2 = udata->omega * udata->omega; - H = (v * v + omega2 * x * x) / SUN_RCONST(2.0); + E = (v * v + omega2 * x * x) / SUN_RCONST(2.0); - return H; + return E; } int Velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) @@ -242,7 +249,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->order = 4; args->num_output_times = 8; args->use_compsums = 0; - args->dt = SUN_RCONST(1e-2); + args->dt = SUN_RCONST(1e-3); for (int argi = 1; argi < argc; argi++) { diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.out b/examples/arkode/C_serial/ark_harmonic_symplectic.out new file mode 100644 index 0000000000..d6811e2ed7 --- /dev/null +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.out @@ -0,0 +1,26 @@ + + Begin simple harmonic oscillator problem + +t = 0.000000, x(t) = 10.000000, E = 50.000000, sol. err = 0.000000 +t = 0.785398, x(t) = 7.066811, E = 50.000000, sol. err = 0.006018 +t = 1.570796, x(t) = -0.002037, E = 50.000000, sol. err = 0.002037 +t = 2.356194, x(t) = -7.076761, E = 50.000000, sol. err = 0.008055 +t = 3.141593, x(t) = -9.999999, E = 50.000000, sol. err = 0.004073 +t = 3.926991, x(t) = -7.071003, E = 50.000000, sol. err = 0.000092 +t = 4.712389, x(t) = 0.006110, E = 50.000000, sol. err = 0.006110 +t = 5.497787, x(t) = 7.072573, E = 50.000000, sol. err = 0.002129 +t = 6.283185, x(t) = 9.999997, E = 50.000000, sol. err = 0.008147 + +Current time = 6.284000000000433 +Steps = 6284 +Step attempts = 6284 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +f1 RHS fn evals = 25137 +f2 RHS fn evals = 25137 diff --git a/examples/arkode/C_serial/ark_kepler.out b/examples/arkode/C_serial/ark_kepler.out new file mode 100644 index 0000000000..a297fc42dd --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler.out @@ -0,0 +1,1025 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.01 + Tf: 100 + nout: 1000 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 0.1000, H(p,q)-H0 = -0.0000000018824715, L(p,q)-L0 = 0.0000000000000004 +t = 0.2000, H(p,q)-H0 = -0.0000000017446893, L(p,q)-L0 = 0.0000000000000000 +t = 0.3000, H(p,q)-H0 = 0.0000000001300136, L(p,q)-L0 = 0.0000000000000004 +t = 0.4000, H(p,q)-H0 = 0.0000000012995816, L(p,q)-L0 = 0.0000000000000003 +t = 0.5000, H(p,q)-H0 = 0.0000000018083006, L(p,q)-L0 = 0.0000000000000004 +t = 0.6000, H(p,q)-H0 = 0.0000000020168764, L(p,q)-L0 = 0.0000000000000003 +t = 0.7000, H(p,q)-H0 = 0.0000000021055059, L(p,q)-L0 = 0.0000000000000009 +t = 0.8000, H(p,q)-H0 = 0.0000000021456843, L(p,q)-L0 = 0.0000000000000012 +t = 0.9000, H(p,q)-H0 = 0.0000000021652187, L(p,q)-L0 = 0.0000000000000012 +t = 1.0000, H(p,q)-H0 = 0.0000000021753710, L(p,q)-L0 = 0.0000000000000007 +t = 1.1000, H(p,q)-H0 = 0.0000000021809786, L(p,q)-L0 = 0.0000000000000008 +t = 1.2000, H(p,q)-H0 = 0.0000000021842472, L(p,q)-L0 = 0.0000000000000006 +t = 1.3000, H(p,q)-H0 = 0.0000000021862454, L(p,q)-L0 = 0.0000000000000007 +t = 1.4000, H(p,q)-H0 = 0.0000000021875197, L(p,q)-L0 = 0.0000000000000004 +t = 1.5000, H(p,q)-H0 = 0.0000000021883627, L(p,q)-L0 = 0.0000000000000007 +t = 1.6000, H(p,q)-H0 = 0.0000000021889383, L(p,q)-L0 = 0.0000000000000004 +t = 1.7000, H(p,q)-H0 = 0.0000000021893426, L(p,q)-L0 = 0.0000000000000001 +t = 1.8000, H(p,q)-H0 = 0.0000000021896337, L(p,q)-L0 = 0.0000000000000000 +t = 1.9000, H(p,q)-H0 = 0.0000000021898475, L(p,q)-L0 = -0.0000000000000002 +t = 2.0000, H(p,q)-H0 = 0.0000000021900078, L(p,q)-L0 = -0.0000000000000003 +t = 2.1000, H(p,q)-H0 = 0.0000000021901300, L(p,q)-L0 = -0.0000000000000003 +t = 2.2000, H(p,q)-H0 = 0.0000000021902241, L(p,q)-L0 = 0.0000000000000000 +t = 2.3000, H(p,q)-H0 = 0.0000000021902972, L(p,q)-L0 = 0.0000000000000001 +t = 2.4000, H(p,q)-H0 = 0.0000000021903539, L(p,q)-L0 = -0.0000000000000002 +t = 2.5000, H(p,q)-H0 = 0.0000000021903985, L(p,q)-L0 = -0.0000000000000004 +t = 2.6000, H(p,q)-H0 = 0.0000000021904330, L(p,q)-L0 = -0.0000000000000003 +t = 2.7000, H(p,q)-H0 = 0.0000000021904595, L(p,q)-L0 = -0.0000000000000006 +t = 2.8000, H(p,q)-H0 = 0.0000000021904794, L(p,q)-L0 = -0.0000000000000007 +t = 2.9000, H(p,q)-H0 = 0.0000000021904932, L(p,q)-L0 = -0.0000000000000008 +t = 3.0000, H(p,q)-H0 = 0.0000000021905022, L(p,q)-L0 = -0.0000000000000008 +t = 3.1000, H(p,q)-H0 = 0.0000000021905060, L(p,q)-L0 = -0.0000000000000016 +t = 3.2000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = -0.0000000000000019 +t = 3.3000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = -0.0000000000000018 +t = 3.4000, H(p,q)-H0 = 0.0000000021904906, L(p,q)-L0 = -0.0000000000000020 +t = 3.5000, H(p,q)-H0 = 0.0000000021904755, L(p,q)-L0 = -0.0000000000000021 +t = 3.6000, H(p,q)-H0 = 0.0000000021904544, L(p,q)-L0 = -0.0000000000000022 +t = 3.7000, H(p,q)-H0 = 0.0000000021904261, L(p,q)-L0 = -0.0000000000000026 +t = 3.8000, H(p,q)-H0 = 0.0000000021903898, L(p,q)-L0 = -0.0000000000000023 +t = 3.9000, H(p,q)-H0 = 0.0000000021903431, L(p,q)-L0 = -0.0000000000000024 +t = 4.0000, H(p,q)-H0 = 0.0000000021902835, L(p,q)-L0 = -0.0000000000000026 +t = 4.1000, H(p,q)-H0 = 0.0000000021902075, L(p,q)-L0 = -0.0000000000000021 +t = 4.2000, H(p,q)-H0 = 0.0000000021901092, L(p,q)-L0 = -0.0000000000000018 +t = 4.3000, H(p,q)-H0 = 0.0000000021899808, L(p,q)-L0 = -0.0000000000000022 +t = 4.4000, H(p,q)-H0 = 0.0000000021898121, L(p,q)-L0 = -0.0000000000000018 +t = 4.5000, H(p,q)-H0 = 0.0000000021895855, L(p,q)-L0 = -0.0000000000000022 +t = 4.6000, H(p,q)-H0 = 0.0000000021892767, L(p,q)-L0 = -0.0000000000000022 +t = 4.7000, H(p,q)-H0 = 0.0000000021888460, L(p,q)-L0 = -0.0000000000000021 +t = 4.8000, H(p,q)-H0 = 0.0000000021882305, L(p,q)-L0 = -0.0000000000000020 +t = 4.9000, H(p,q)-H0 = 0.0000000021873248, L(p,q)-L0 = -0.0000000000000017 +t = 5.0000, H(p,q)-H0 = 0.0000000021859475, L(p,q)-L0 = -0.0000000000000017 +t = 5.1000, H(p,q)-H0 = 0.0000000021837739, L(p,q)-L0 = -0.0000000000000018 +t = 5.2000, H(p,q)-H0 = 0.0000000021801948, L(p,q)-L0 = -0.0000000000000017 +t = 5.3000, H(p,q)-H0 = 0.0000000021740074, L(p,q)-L0 = -0.0000000000000018 +t = 5.4000, H(p,q)-H0 = 0.0000000021627112, L(p,q)-L0 = -0.0000000000000017 +t = 5.5000, H(p,q)-H0 = 0.0000000021407837, L(p,q)-L0 = -0.0000000000000020 +t = 5.6000, H(p,q)-H0 = 0.0000000020952701, L(p,q)-L0 = -0.0000000000000018 +t = 5.7000, H(p,q)-H0 = 0.0000000019940063, L(p,q)-L0 = -0.0000000000000021 +t = 5.8000, H(p,q)-H0 = 0.0000000017543397, L(p,q)-L0 = -0.0000000000000024 +t = 5.9000, H(p,q)-H0 = 0.0000000011716919, L(p,q)-L0 = -0.0000000000000024 +t = 6.0000, H(p,q)-H0 = -0.0000000001292921, L(p,q)-L0 = -0.0000000000000028 +t = 6.1000, H(p,q)-H0 = -0.0000000019832644, L(p,q)-L0 = -0.0000000000000024 +t = 6.2000, H(p,q)-H0 = -0.0000000015692083, L(p,q)-L0 = -0.0000000000000024 +t = 6.3000, H(p,q)-H0 = -0.0000000000785492, L(p,q)-L0 = -0.0000000000000023 +t = 6.4000, H(p,q)-H0 = -0.0000000021444535, L(p,q)-L0 = -0.0000000000000026 +t = 6.5000, H(p,q)-H0 = -0.0000000014380235, L(p,q)-L0 = -0.0000000000000027 +t = 6.6000, H(p,q)-H0 = 0.0000000003899563, L(p,q)-L0 = -0.0000000000000023 +t = 6.7000, H(p,q)-H0 = 0.0000000014194250, L(p,q)-L0 = -0.0000000000000023 +t = 6.8000, H(p,q)-H0 = 0.0000000018574048, L(p,q)-L0 = -0.0000000000000017 +t = 6.9000, H(p,q)-H0 = 0.0000000020373458, L(p,q)-L0 = -0.0000000000000014 +t = 7.0000, H(p,q)-H0 = 0.0000000021145609, L(p,q)-L0 = -0.0000000000000008 +t = 7.1000, H(p,q)-H0 = 0.0000000021499782, L(p,q)-L0 = -0.0000000000000004 +t = 7.2000, H(p,q)-H0 = 0.0000000021673986, L(p,q)-L0 = -0.0000000000000002 +t = 7.3000, H(p,q)-H0 = 0.0000000021765503, L(p,q)-L0 = -0.0000000000000002 +t = 7.4000, H(p,q)-H0 = 0.0000000021816533, L(p,q)-L0 = 0.0000000000000002 +t = 7.5000, H(p,q)-H0 = 0.0000000021846533, L(p,q)-L0 = 0.0000000000000007 +t = 7.6000, H(p,q)-H0 = 0.0000000021865008, L(p,q)-L0 = 0.0000000000000004 +t = 7.7000, H(p,q)-H0 = 0.0000000021876867, L(p,q)-L0 = 0.0000000000000004 +t = 7.8000, H(p,q)-H0 = 0.0000000021884756, L(p,q)-L0 = 0.0000000000000004 +t = 7.9000, H(p,q)-H0 = 0.0000000021890174, L(p,q)-L0 = 0.0000000000000006 +t = 8.0000, H(p,q)-H0 = 0.0000000021893999, L(p,q)-L0 = 0.0000000000000010 +t = 8.1000, H(p,q)-H0 = 0.0000000021896761, L(p,q)-L0 = 0.0000000000000009 +t = 8.2000, H(p,q)-H0 = 0.0000000021898795, L(p,q)-L0 = 0.0000000000000008 +t = 8.3000, H(p,q)-H0 = 0.0000000021900325, L(p,q)-L0 = 0.0000000000000009 +t = 8.4000, H(p,q)-H0 = 0.0000000021901491, L(p,q)-L0 = 0.0000000000000010 +t = 8.5000, H(p,q)-H0 = 0.0000000021902389, L(p,q)-L0 = 0.0000000000000011 +t = 8.6000, H(p,q)-H0 = 0.0000000021903087, L(p,q)-L0 = 0.0000000000000009 +t = 8.7000, H(p,q)-H0 = 0.0000000021903636, L(p,q)-L0 = 0.0000000000000011 +t = 8.8000, H(p,q)-H0 = 0.0000000021904061, L(p,q)-L0 = 0.0000000000000010 +t = 8.9000, H(p,q)-H0 = 0.0000000021904393, L(p,q)-L0 = 0.0000000000000009 +t = 9.0000, H(p,q)-H0 = 0.0000000021904647, L(p,q)-L0 = 0.0000000000000004 +t = 9.1000, H(p,q)-H0 = 0.0000000021904831, L(p,q)-L0 = 0.0000000000000000 +t = 9.2000, H(p,q)-H0 = 0.0000000021904960, L(p,q)-L0 = -0.0000000000000002 +t = 9.3000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = -0.0000000000000003 +t = 9.4000, H(p,q)-H0 = 0.0000000021905078, L(p,q)-L0 = -0.0000000000000002 +t = 9.5000, H(p,q)-H0 = 0.0000000021905066, L(p,q)-L0 = 0.0000000000000000 +t = 9.6000, H(p,q)-H0 = 0.0000000021905008, L(p,q)-L0 = 0.0000000000000002 +t = 9.7000, H(p,q)-H0 = 0.0000000021904900, L(p,q)-L0 = 0.0000000000000000 +t = 9.8000, H(p,q)-H0 = 0.0000000021904742, L(p,q)-L0 = 0.0000000000000006 +t = 9.9000, H(p,q)-H0 = 0.0000000021904522, L(p,q)-L0 = 0.0000000000000006 +t = 10.0000, H(p,q)-H0 = 0.0000000021904231, L(p,q)-L0 = 0.0000000000000008 +t = 10.1000, H(p,q)-H0 = 0.0000000021903852, L(p,q)-L0 = 0.0000000000000006 +t = 10.2000, H(p,q)-H0 = 0.0000000021903366, L(p,q)-L0 = 0.0000000000000008 +t = 10.3000, H(p,q)-H0 = 0.0000000021902746, L(p,q)-L0 = 0.0000000000000009 +t = 10.4000, H(p,q)-H0 = 0.0000000021901951, L(p,q)-L0 = 0.0000000000000011 +t = 10.5000, H(p,q)-H0 = 0.0000000021900923, L(p,q)-L0 = 0.0000000000000010 +t = 10.6000, H(p,q)-H0 = 0.0000000021899583, L(p,q)-L0 = 0.0000000000000011 +t = 10.7000, H(p,q)-H0 = 0.0000000021897812, L(p,q)-L0 = 0.0000000000000016 +t = 10.8000, H(p,q)-H0 = 0.0000000021895435, L(p,q)-L0 = 0.0000000000000019 +t = 10.9000, H(p,q)-H0 = 0.0000000021892176, L(p,q)-L0 = 0.0000000000000020 +t = 11.0000, H(p,q)-H0 = 0.0000000021887611, L(p,q)-L0 = 0.0000000000000020 +t = 11.1000, H(p,q)-H0 = 0.0000000021881056, L(p,q)-L0 = 0.0000000000000022 +t = 11.2000, H(p,q)-H0 = 0.0000000021871360, L(p,q)-L0 = 0.0000000000000023 +t = 11.3000, H(p,q)-H0 = 0.0000000021856529, L(p,q)-L0 = 0.0000000000000023 +t = 11.4000, H(p,q)-H0 = 0.0000000021832968, L(p,q)-L0 = 0.0000000000000023 +t = 11.5000, H(p,q)-H0 = 0.0000000021793864, L(p,q)-L0 = 0.0000000000000024 +t = 11.6000, H(p,q)-H0 = 0.0000000021725675, L(p,q)-L0 = 0.0000000000000024 +t = 11.7000, H(p,q)-H0 = 0.0000000021599945, L(p,q)-L0 = 0.0000000000000022 +t = 11.8000, H(p,q)-H0 = 0.0000000021353220, L(p,q)-L0 = 0.0000000000000028 +t = 11.9000, H(p,q)-H0 = 0.0000000020835074, L(p,q)-L0 = 0.0000000000000022 +t = 12.0000, H(p,q)-H0 = 0.0000000019669100, L(p,q)-L0 = 0.0000000000000022 +t = 12.1000, H(p,q)-H0 = 0.0000000016886921, L(p,q)-L0 = 0.0000000000000020 +t = 12.2000, H(p,q)-H0 = 0.0000000010143850, L(p,q)-L0 = 0.0000000000000023 +t = 12.3000, H(p,q)-H0 = -0.0000000004357736, L(p,q)-L0 = 0.0000000000000022 +t = 12.4000, H(p,q)-H0 = -0.0000000021842232, L(p,q)-L0 = 0.0000000000000022 +t = 12.5000, H(p,q)-H0 = -0.0000000011492758, L(p,q)-L0 = 0.0000000000000023 +t = 12.6000, H(p,q)-H0 = -0.0000000003225991, L(p,q)-L0 = 0.0000000000000024 +t = 12.7000, H(p,q)-H0 = -0.0000000022824569, L(p,q)-L0 = 0.0000000000000024 +t = 12.8000, H(p,q)-H0 = -0.0000000011085746, L(p,q)-L0 = 0.0000000000000024 +t = 12.9000, H(p,q)-H0 = 0.0000000006228686, L(p,q)-L0 = 0.0000000000000024 +t = 13.0000, H(p,q)-H0 = 0.0000000015228507, L(p,q)-L0 = 0.0000000000000026 +t = 13.1000, H(p,q)-H0 = 0.0000000018996709, L(p,q)-L0 = 0.0000000000000023 +t = 13.2000, H(p,q)-H0 = 0.0000000020551160, L(p,q)-L0 = 0.0000000000000022 +t = 13.3000, H(p,q)-H0 = 0.0000000021225143, L(p,q)-L0 = 0.0000000000000018 +t = 13.4000, H(p,q)-H0 = 0.0000000021537955, L(p,q)-L0 = 0.0000000000000011 +t = 13.5000, H(p,q)-H0 = 0.0000000021693588, L(p,q)-L0 = 0.0000000000000012 +t = 13.6000, H(p,q)-H0 = 0.0000000021776211, L(p,q)-L0 = 0.0000000000000014 +t = 13.7000, H(p,q)-H0 = 0.0000000021822713, L(p,q)-L0 = 0.0000000000000014 +t = 13.8000, H(p,q)-H0 = 0.0000000021850281, L(p,q)-L0 = 0.0000000000000018 +t = 13.9000, H(p,q)-H0 = 0.0000000021867388, L(p,q)-L0 = 0.0000000000000022 +t = 14.0000, H(p,q)-H0 = 0.0000000021878430, L(p,q)-L0 = 0.0000000000000020 +t = 14.1000, H(p,q)-H0 = 0.0000000021885820, L(p,q)-L0 = 0.0000000000000019 +t = 14.2000, H(p,q)-H0 = 0.0000000021890917, L(p,q)-L0 = 0.0000000000000020 +t = 14.3000, H(p,q)-H0 = 0.0000000021894530, L(p,q)-L0 = 0.0000000000000019 +t = 14.4000, H(p,q)-H0 = 0.0000000021897152, L(p,q)-L0 = 0.0000000000000022 +t = 14.5000, H(p,q)-H0 = 0.0000000021899093, L(p,q)-L0 = 0.0000000000000024 +t = 14.6000, H(p,q)-H0 = 0.0000000021900552, L(p,q)-L0 = 0.0000000000000024 +t = 14.7000, H(p,q)-H0 = 0.0000000021901674, L(p,q)-L0 = 0.0000000000000032 +t = 14.8000, H(p,q)-H0 = 0.0000000021902533, L(p,q)-L0 = 0.0000000000000029 +t = 14.9000, H(p,q)-H0 = 0.0000000021903204, L(p,q)-L0 = 0.0000000000000031 +t = 15.0000, H(p,q)-H0 = 0.0000000021903728, L(p,q)-L0 = 0.0000000000000030 +t = 15.1000, H(p,q)-H0 = 0.0000000021904137, L(p,q)-L0 = 0.0000000000000030 +t = 15.2000, H(p,q)-H0 = 0.0000000021904455, L(p,q)-L0 = 0.0000000000000031 +t = 15.3000, H(p,q)-H0 = 0.0000000021904695, L(p,q)-L0 = 0.0000000000000030 +t = 15.4000, H(p,q)-H0 = 0.0000000021904875, L(p,q)-L0 = 0.0000000000000032 +t = 15.5000, H(p,q)-H0 = 0.0000000021904996, L(p,q)-L0 = 0.0000000000000029 +t = 15.6000, H(p,q)-H0 = 0.0000000021905063, L(p,q)-L0 = 0.0000000000000020 +t = 15.7000, H(p,q)-H0 = 0.0000000021905089, L(p,q)-L0 = 0.0000000000000017 +t = 15.8000, H(p,q)-H0 = 0.0000000021905071, L(p,q)-L0 = 0.0000000000000020 +t = 15.9000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = 0.0000000000000020 +t = 16.0000, H(p,q)-H0 = 0.0000000021904886, L(p,q)-L0 = 0.0000000000000017 +t = 16.1000, H(p,q)-H0 = 0.0000000021904715, L(p,q)-L0 = 0.0000000000000016 +t = 16.2000, H(p,q)-H0 = 0.0000000021904482, L(p,q)-L0 = 0.0000000000000016 +t = 16.3000, H(p,q)-H0 = 0.0000000021904181, L(p,q)-L0 = 0.0000000000000019 +t = 16.4000, H(p,q)-H0 = 0.0000000021903783, L(p,q)-L0 = 0.0000000000000014 +t = 16.5000, H(p,q)-H0 = 0.0000000021903276, L(p,q)-L0 = 0.0000000000000012 +t = 16.6000, H(p,q)-H0 = 0.0000000021902630, L(p,q)-L0 = 0.0000000000000013 +t = 16.7000, H(p,q)-H0 = 0.0000000021901800, L(p,q)-L0 = 0.0000000000000016 +t = 16.8000, H(p,q)-H0 = 0.0000000021900730, L(p,q)-L0 = 0.0000000000000020 +t = 16.9000, H(p,q)-H0 = 0.0000000021899325, L(p,q)-L0 = 0.0000000000000020 +t = 17.0000, H(p,q)-H0 = 0.0000000021897464, L(p,q)-L0 = 0.0000000000000018 +t = 17.1000, H(p,q)-H0 = 0.0000000021894955, L(p,q)-L0 = 0.0000000000000018 +t = 17.2000, H(p,q)-H0 = 0.0000000021891514, L(p,q)-L0 = 0.0000000000000021 +t = 17.3000, H(p,q)-H0 = 0.0000000021886670, L(p,q)-L0 = 0.0000000000000020 +t = 17.4000, H(p,q)-H0 = 0.0000000021879680, L(p,q)-L0 = 0.0000000000000017 +t = 17.5000, H(p,q)-H0 = 0.0000000021869294, L(p,q)-L0 = 0.0000000000000020 +t = 17.6000, H(p,q)-H0 = 0.0000000021853308, L(p,q)-L0 = 0.0000000000000020 +t = 17.7000, H(p,q)-H0 = 0.0000000021827730, L(p,q)-L0 = 0.0000000000000020 +t = 17.8000, H(p,q)-H0 = 0.0000000021784950, L(p,q)-L0 = 0.0000000000000021 +t = 17.9000, H(p,q)-H0 = 0.0000000021709682, L(p,q)-L0 = 0.0000000000000022 +t = 18.0000, H(p,q)-H0 = 0.0000000021569497, L(p,q)-L0 = 0.0000000000000022 +t = 18.1000, H(p,q)-H0 = 0.0000000021291338, L(p,q)-L0 = 0.0000000000000024 +t = 18.2000, H(p,q)-H0 = 0.0000000020700305, L(p,q)-L0 = 0.0000000000000020 +t = 18.3000, H(p,q)-H0 = 0.0000000019355451, L(p,q)-L0 = 0.0000000000000018 +t = 18.4000, H(p,q)-H0 = 0.0000000016123738, L(p,q)-L0 = 0.0000000000000019 +t = 18.5000, H(p,q)-H0 = 0.0000000008341943, L(p,q)-L0 = 0.0000000000000017 +t = 18.6000, H(p,q)-H0 = -0.0000000007602392, L(p,q)-L0 = 0.0000000000000018 +t = 18.7000, H(p,q)-H0 = -0.0000000022936391, L(p,q)-L0 = 0.0000000000000017 +t = 18.8000, H(p,q)-H0 = -0.0000000007197518, L(p,q)-L0 = 0.0000000000000013 +t = 18.9000, H(p,q)-H0 = -0.0000000006891667, L(p,q)-L0 = 0.0000000000000012 +t = 19.0000, H(p,q)-H0 = -0.0000000022938584, L(p,q)-L0 = 0.0000000000000012 +t = 19.1000, H(p,q)-H0 = -0.0000000007742569, L(p,q)-L0 = 0.0000000000000013 +t = 19.2000, H(p,q)-H0 = 0.0000000008292620, L(p,q)-L0 = 0.0000000000000008 +t = 19.3000, H(p,q)-H0 = 0.0000000016119190, L(p,q)-L0 = 0.0000000000000008 +t = 19.4000, H(p,q)-H0 = 0.0000000019360704, L(p,q)-L0 = 0.0000000000000010 +t = 19.5000, H(p,q)-H0 = 0.0000000020705563, L(p,q)-L0 = 0.0000000000000016 +t = 19.6000, H(p,q)-H0 = 0.0000000021295040, L(p,q)-L0 = 0.0000000000000018 +t = 19.7000, H(p,q)-H0 = 0.0000000021571889, L(p,q)-L0 = 0.0000000000000014 +t = 19.8000, H(p,q)-H0 = 0.0000000021711196, L(p,q)-L0 = 0.0000000000000019 +t = 19.9000, H(p,q)-H0 = 0.0000000021785913, L(p,q)-L0 = 0.0000000000000020 +t = 20.0000, H(p,q)-H0 = 0.0000000021828354, L(p,q)-L0 = 0.0000000000000023 +t = 20.1000, H(p,q)-H0 = 0.0000000021853712, L(p,q)-L0 = 0.0000000000000021 +t = 20.2000, H(p,q)-H0 = 0.0000000021869562, L(p,q)-L0 = 0.0000000000000021 +t = 20.3000, H(p,q)-H0 = 0.0000000021879860, L(p,q)-L0 = 0.0000000000000018 +t = 20.4000, H(p,q)-H0 = 0.0000000021886788, L(p,q)-L0 = 0.0000000000000018 +t = 20.5000, H(p,q)-H0 = 0.0000000021891593, L(p,q)-L0 = 0.0000000000000020 +t = 20.6000, H(p,q)-H0 = 0.0000000021895015, L(p,q)-L0 = 0.0000000000000026 +t = 20.7000, H(p,q)-H0 = 0.0000000021897504, L(p,q)-L0 = 0.0000000000000026 +t = 20.8000, H(p,q)-H0 = 0.0000000021899352, L(p,q)-L0 = 0.0000000000000023 +t = 20.9000, H(p,q)-H0 = 0.0000000021900748, L(p,q)-L0 = 0.0000000000000029 +t = 21.0000, H(p,q)-H0 = 0.0000000021901817, L(p,q)-L0 = 0.0000000000000031 +t = 21.1000, H(p,q)-H0 = 0.0000000021902642, L(p,q)-L0 = 0.0000000000000031 +t = 21.2000, H(p,q)-H0 = 0.0000000021903285, L(p,q)-L0 = 0.0000000000000031 +t = 21.3000, H(p,q)-H0 = 0.0000000021903787, L(p,q)-L0 = 0.0000000000000028 +t = 21.4000, H(p,q)-H0 = 0.0000000021904180, L(p,q)-L0 = 0.0000000000000030 +t = 21.5000, H(p,q)-H0 = 0.0000000021904483, L(p,q)-L0 = 0.0000000000000029 +t = 21.6000, H(p,q)-H0 = 0.0000000021904710, L(p,q)-L0 = 0.0000000000000024 +t = 21.7000, H(p,q)-H0 = 0.0000000021904880, L(p,q)-L0 = 0.0000000000000026 +t = 21.8000, H(p,q)-H0 = 0.0000000021904994, L(p,q)-L0 = 0.0000000000000027 +t = 21.9000, H(p,q)-H0 = 0.0000000021905060, L(p,q)-L0 = 0.0000000000000027 +t = 22.0000, H(p,q)-H0 = 0.0000000021905077, L(p,q)-L0 = 0.0000000000000024 +t = 22.1000, H(p,q)-H0 = 0.0000000021905051, L(p,q)-L0 = 0.0000000000000027 +t = 22.2000, H(p,q)-H0 = 0.0000000021904976, L(p,q)-L0 = 0.0000000000000028 +t = 22.3000, H(p,q)-H0 = 0.0000000021904854, L(p,q)-L0 = 0.0000000000000028 +t = 22.4000, H(p,q)-H0 = 0.0000000021904675, L(p,q)-L0 = 0.0000000000000029 +t = 22.5000, H(p,q)-H0 = 0.0000000021904432, L(p,q)-L0 = 0.0000000000000028 +t = 22.6000, H(p,q)-H0 = 0.0000000021904113, L(p,q)-L0 = 0.0000000000000032 +t = 22.7000, H(p,q)-H0 = 0.0000000021903700, L(p,q)-L0 = 0.0000000000000031 +t = 22.8000, H(p,q)-H0 = 0.0000000021903174, L(p,q)-L0 = 0.0000000000000029 +t = 22.9000, H(p,q)-H0 = 0.0000000021902499, L(p,q)-L0 = 0.0000000000000030 +t = 23.0000, H(p,q)-H0 = 0.0000000021901633, L(p,q)-L0 = 0.0000000000000031 +t = 23.1000, H(p,q)-H0 = 0.0000000021900513, L(p,q)-L0 = 0.0000000000000034 +t = 23.2000, H(p,q)-H0 = 0.0000000021899044, L(p,q)-L0 = 0.0000000000000036 +t = 23.3000, H(p,q)-H0 = 0.0000000021897089, L(p,q)-L0 = 0.0000000000000031 +t = 23.4000, H(p,q)-H0 = 0.0000000021894446, L(p,q)-L0 = 0.0000000000000031 +t = 23.5000, H(p,q)-H0 = 0.0000000021890804, L(p,q)-L0 = 0.0000000000000030 +t = 23.6000, H(p,q)-H0 = 0.0000000021885663, L(p,q)-L0 = 0.0000000000000030 +t = 23.7000, H(p,q)-H0 = 0.0000000021878209, L(p,q)-L0 = 0.0000000000000026 +t = 23.8000, H(p,q)-H0 = 0.0000000021867065, L(p,q)-L0 = 0.0000000000000024 +t = 23.9000, H(p,q)-H0 = 0.0000000021849813, L(p,q)-L0 = 0.0000000000000023 +t = 24.0000, H(p,q)-H0 = 0.0000000021822015, L(p,q)-L0 = 0.0000000000000022 +t = 24.1000, H(p,q)-H0 = 0.0000000021775146, L(p,q)-L0 = 0.0000000000000024 +t = 24.2000, H(p,q)-H0 = 0.0000000021691927, L(p,q)-L0 = 0.0000000000000024 +t = 24.3000, H(p,q)-H0 = 0.0000000021535347, L(p,q)-L0 = 0.0000000000000026 +t = 24.4000, H(p,q)-H0 = 0.0000000021221145, L(p,q)-L0 = 0.0000000000000027 +t = 24.5000, H(p,q)-H0 = 0.0000000020545646, L(p,q)-L0 = 0.0000000000000027 +t = 24.6000, H(p,q)-H0 = 0.0000000018991955, L(p,q)-L0 = 0.0000000000000024 +t = 24.7000, H(p,q)-H0 = 0.0000000015237049, L(p,q)-L0 = 0.0000000000000018 +t = 24.8000, H(p,q)-H0 = 0.0000000006291418, L(p,q)-L0 = 0.0000000000000020 +t = 24.9000, H(p,q)-H0 = -0.0000000010937447, L(p,q)-L0 = 0.0000000000000016 +t = 25.0000, H(p,q)-H0 = -0.0000000022899942, L(p,q)-L0 = 0.0000000000000017 +t = 25.1000, H(p,q)-H0 = -0.0000000003464102, L(p,q)-L0 = 0.0000000000000018 +t = 25.2000, H(p,q)-H0 = -0.0000000011168177, L(p,q)-L0 = 0.0000000000000011 +t = 25.3000, H(p,q)-H0 = -0.0000000021907172, L(p,q)-L0 = 0.0000000000000013 +t = 25.4000, H(p,q)-H0 = -0.0000000004484475, L(p,q)-L0 = 0.0000000000000016 +t = 25.5000, H(p,q)-H0 = 0.0000000010106107, L(p,q)-L0 = 0.0000000000000021 +t = 25.6000, H(p,q)-H0 = 0.0000000016885500, L(p,q)-L0 = 0.0000000000000023 +t = 25.7000, H(p,q)-H0 = 0.0000000019674671, L(p,q)-L0 = 0.0000000000000024 +t = 25.8000, H(p,q)-H0 = 0.0000000020840091, L(p,q)-L0 = 0.0000000000000028 +t = 25.9000, H(p,q)-H0 = 0.0000000021356669, L(p,q)-L0 = 0.0000000000000030 +t = 26.0000, H(p,q)-H0 = 0.0000000021602167, L(p,q)-L0 = 0.0000000000000033 +t = 26.1000, H(p,q)-H0 = 0.0000000021727081, L(p,q)-L0 = 0.0000000000000034 +t = 26.2000, H(p,q)-H0 = 0.0000000021794757, L(p,q)-L0 = 0.0000000000000031 +t = 26.3000, H(p,q)-H0 = 0.0000000021833548, L(p,q)-L0 = 0.0000000000000031 +t = 26.4000, H(p,q)-H0 = 0.0000000021856916, L(p,q)-L0 = 0.0000000000000034 +t = 26.5000, H(p,q)-H0 = 0.0000000021871618, L(p,q)-L0 = 0.0000000000000036 +t = 26.6000, H(p,q)-H0 = 0.0000000021881231, L(p,q)-L0 = 0.0000000000000033 +t = 26.7000, H(p,q)-H0 = 0.0000000021887731, L(p,q)-L0 = 0.0000000000000033 +t = 26.8000, H(p,q)-H0 = 0.0000000021892259, L(p,q)-L0 = 0.0000000000000032 +t = 26.9000, H(p,q)-H0 = 0.0000000021895493, L(p,q)-L0 = 0.0000000000000032 +t = 27.0000, H(p,q)-H0 = 0.0000000021897855, L(p,q)-L0 = 0.0000000000000033 +t = 27.1000, H(p,q)-H0 = 0.0000000021899614, L(p,q)-L0 = 0.0000000000000030 +t = 27.2000, H(p,q)-H0 = 0.0000000021900946, L(p,q)-L0 = 0.0000000000000028 +t = 27.3000, H(p,q)-H0 = 0.0000000021901967, L(p,q)-L0 = 0.0000000000000028 +t = 27.4000, H(p,q)-H0 = 0.0000000021902758, L(p,q)-L0 = 0.0000000000000030 +t = 27.5000, H(p,q)-H0 = 0.0000000021903375, L(p,q)-L0 = 0.0000000000000029 +t = 27.6000, H(p,q)-H0 = 0.0000000021903857, L(p,q)-L0 = 0.0000000000000028 +t = 27.7000, H(p,q)-H0 = 0.0000000021904235, L(p,q)-L0 = 0.0000000000000031 +t = 27.8000, H(p,q)-H0 = 0.0000000021904527, L(p,q)-L0 = 0.0000000000000032 +t = 27.9000, H(p,q)-H0 = 0.0000000021904745, L(p,q)-L0 = 0.0000000000000033 +t = 28.0000, H(p,q)-H0 = 0.0000000021904908, L(p,q)-L0 = 0.0000000000000036 +t = 28.1000, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = 0.0000000000000034 +t = 28.2000, H(p,q)-H0 = 0.0000000021905070, L(p,q)-L0 = 0.0000000000000036 +t = 28.3000, H(p,q)-H0 = 0.0000000021905081, L(p,q)-L0 = 0.0000000000000036 +t = 28.4000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000031 +t = 28.5000, H(p,q)-H0 = 0.0000000021904960, L(p,q)-L0 = 0.0000000000000031 +t = 28.6000, H(p,q)-H0 = 0.0000000021904830, L(p,q)-L0 = 0.0000000000000033 +t = 28.7000, H(p,q)-H0 = 0.0000000021904643, L(p,q)-L0 = 0.0000000000000039 +t = 28.8000, H(p,q)-H0 = 0.0000000021904385, L(p,q)-L0 = 0.0000000000000037 +t = 28.9000, H(p,q)-H0 = 0.0000000021904052, L(p,q)-L0 = 0.0000000000000039 +t = 29.0000, H(p,q)-H0 = 0.0000000021903620, L(p,q)-L0 = 0.0000000000000037 +t = 29.1000, H(p,q)-H0 = 0.0000000021903072, L(p,q)-L0 = 0.0000000000000037 +t = 29.2000, H(p,q)-H0 = 0.0000000021902369, L(p,q)-L0 = 0.0000000000000038 +t = 29.3000, H(p,q)-H0 = 0.0000000021901463, L(p,q)-L0 = 0.0000000000000036 +t = 29.4000, H(p,q)-H0 = 0.0000000021900293, L(p,q)-L0 = 0.0000000000000042 +t = 29.5000, H(p,q)-H0 = 0.0000000021898753, L(p,q)-L0 = 0.0000000000000041 +t = 29.6000, H(p,q)-H0 = 0.0000000021896700, L(p,q)-L0 = 0.0000000000000042 +t = 29.7000, H(p,q)-H0 = 0.0000000021893919, L(p,q)-L0 = 0.0000000000000040 +t = 29.8000, H(p,q)-H0 = 0.0000000021890065, L(p,q)-L0 = 0.0000000000000040 +t = 29.9000, H(p,q)-H0 = 0.0000000021884604, L(p,q)-L0 = 0.0000000000000038 +t = 30.0000, H(p,q)-H0 = 0.0000000021876657, L(p,q)-L0 = 0.0000000000000044 +t = 30.1000, H(p,q)-H0 = 0.0000000021864693, L(p,q)-L0 = 0.0000000000000042 +t = 30.2000, H(p,q)-H0 = 0.0000000021846054, L(p,q)-L0 = 0.0000000000000042 +t = 30.3000, H(p,q)-H0 = 0.0000000021815807, L(p,q)-L0 = 0.0000000000000040 +t = 30.4000, H(p,q)-H0 = 0.0000000021764376, L(p,q)-L0 = 0.0000000000000038 +t = 30.5000, H(p,q)-H0 = 0.0000000021672218, L(p,q)-L0 = 0.0000000000000038 +t = 30.6000, H(p,q)-H0 = 0.0000000021497005, L(p,q)-L0 = 0.0000000000000039 +t = 30.7000, H(p,q)-H0 = 0.0000000021141389, L(p,q)-L0 = 0.0000000000000040 +t = 30.8000, H(p,q)-H0 = 0.0000000020367849, L(p,q)-L0 = 0.0000000000000039 +t = 30.9000, H(p,q)-H0 = 0.0000000018570208, L(p,q)-L0 = 0.0000000000000031 +t = 31.0000, H(p,q)-H0 = 0.0000000014208090, L(p,q)-L0 = 0.0000000000000032 +t = 31.1000, H(p,q)-H0 = 0.0000000003977567, L(p,q)-L0 = 0.0000000000000036 +t = 31.2000, H(p,q)-H0 = -0.0000000014232162, L(p,q)-L0 = 0.0000000000000033 +t = 31.3000, H(p,q)-H0 = -0.0000000021604556, L(p,q)-L0 = 0.0000000000000033 +t = 31.4000, H(p,q)-H0 = -0.0000000000914391, L(p,q)-L0 = 0.0000000000000037 +t = 31.5000, H(p,q)-H0 = -0.0000000015394426, L(p,q)-L0 = 0.0000000000000033 +t = 31.6000, H(p,q)-H0 = -0.0000000019942215, L(p,q)-L0 = 0.0000000000000033 +t = 31.7000, H(p,q)-H0 = -0.0000000001403380, L(p,q)-L0 = 0.0000000000000033 +t = 31.8000, H(p,q)-H0 = 0.0000000011688988, L(p,q)-L0 = 0.0000000000000033 +t = 31.9000, H(p,q)-H0 = 0.0000000017544384, L(p,q)-L0 = 0.0000000000000033 +t = 32.0000, H(p,q)-H0 = 0.0000000019945824, L(p,q)-L0 = 0.0000000000000034 +t = 32.1000, H(p,q)-H0 = 0.0000000020957509, L(p,q)-L0 = 0.0000000000000039 +t = 32.2000, H(p,q)-H0 = 0.0000000021411103, L(p,q)-L0 = 0.0000000000000037 +t = 32.3000, H(p,q)-H0 = 0.0000000021629221, L(p,q)-L0 = 0.0000000000000041 +t = 32.4000, H(p,q)-H0 = 0.0000000021741428, L(p,q)-L0 = 0.0000000000000041 +t = 32.5000, H(p,q)-H0 = 0.0000000021802830, L(p,q)-L0 = 0.0000000000000041 +t = 32.6000, H(p,q)-H0 = 0.0000000021838333, L(p,q)-L0 = 0.0000000000000044 +t = 32.7000, H(p,q)-H0 = 0.0000000021859882, L(p,q)-L0 = 0.0000000000000042 +t = 32.8000, H(p,q)-H0 = 0.0000000021873530, L(p,q)-L0 = 0.0000000000000039 +t = 32.9000, H(p,q)-H0 = 0.0000000021882515, L(p,q)-L0 = 0.0000000000000041 +t = 33.0000, H(p,q)-H0 = 0.0000000021888621, L(p,q)-L0 = 0.0000000000000042 +t = 33.1000, H(p,q)-H0 = 0.0000000021892892, L(p,q)-L0 = 0.0000000000000043 +t = 33.2000, H(p,q)-H0 = 0.0000000021895956, L(p,q)-L0 = 0.0000000000000044 +t = 33.3000, H(p,q)-H0 = 0.0000000021898200, L(p,q)-L0 = 0.0000000000000042 +t = 33.4000, H(p,q)-H0 = 0.0000000021899879, L(p,q)-L0 = 0.0000000000000044 +t = 33.5000, H(p,q)-H0 = 0.0000000021901150, L(p,q)-L0 = 0.0000000000000044 +t = 33.6000, H(p,q)-H0 = 0.0000000021902128, L(p,q)-L0 = 0.0000000000000046 +t = 33.7000, H(p,q)-H0 = 0.0000000021902886, L(p,q)-L0 = 0.0000000000000044 +t = 33.8000, H(p,q)-H0 = 0.0000000021903477, L(p,q)-L0 = 0.0000000000000044 +t = 33.9000, H(p,q)-H0 = 0.0000000021903943, L(p,q)-L0 = 0.0000000000000048 +t = 34.0000, H(p,q)-H0 = 0.0000000021904303, L(p,q)-L0 = 0.0000000000000047 +t = 34.1000, H(p,q)-H0 = 0.0000000021904579, L(p,q)-L0 = 0.0000000000000044 +t = 34.2000, H(p,q)-H0 = 0.0000000021904785, L(p,q)-L0 = 0.0000000000000042 +t = 34.3000, H(p,q)-H0 = 0.0000000021904935, L(p,q)-L0 = 0.0000000000000042 +t = 34.4000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000040 +t = 34.5000, H(p,q)-H0 = 0.0000000021905079, L(p,q)-L0 = 0.0000000000000039 +t = 34.6000, H(p,q)-H0 = 0.0000000021905082, L(p,q)-L0 = 0.0000000000000038 +t = 34.7000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = 0.0000000000000042 +t = 34.8000, H(p,q)-H0 = 0.0000000021904950, L(p,q)-L0 = 0.0000000000000039 +t = 34.9000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000038 +t = 35.0000, H(p,q)-H0 = 0.0000000021904607, L(p,q)-L0 = 0.0000000000000037 +t = 35.1000, H(p,q)-H0 = 0.0000000021904338, L(p,q)-L0 = 0.0000000000000036 +t = 35.2000, H(p,q)-H0 = 0.0000000021903993, L(p,q)-L0 = 0.0000000000000039 +t = 35.3000, H(p,q)-H0 = 0.0000000021903542, L(p,q)-L0 = 0.0000000000000037 +t = 35.4000, H(p,q)-H0 = 0.0000000021902972, L(p,q)-L0 = 0.0000000000000039 +t = 35.5000, H(p,q)-H0 = 0.0000000021902238, L(p,q)-L0 = 0.0000000000000037 +t = 35.6000, H(p,q)-H0 = 0.0000000021901293, L(p,q)-L0 = 0.0000000000000039 +t = 35.7000, H(p,q)-H0 = 0.0000000021900066, L(p,q)-L0 = 0.0000000000000038 +t = 35.8000, H(p,q)-H0 = 0.0000000021898452, L(p,q)-L0 = 0.0000000000000040 +t = 35.9000, H(p,q)-H0 = 0.0000000021896294, L(p,q)-L0 = 0.0000000000000038 +t = 36.0000, H(p,q)-H0 = 0.0000000021893357, L(p,q)-L0 = 0.0000000000000038 +t = 36.1000, H(p,q)-H0 = 0.0000000021889278, L(p,q)-L0 = 0.0000000000000033 +t = 36.2000, H(p,q)-H0 = 0.0000000021883469, L(p,q)-L0 = 0.0000000000000029 +t = 36.3000, H(p,q)-H0 = 0.0000000021874968, L(p,q)-L0 = 0.0000000000000028 +t = 36.4000, H(p,q)-H0 = 0.0000000021862115, L(p,q)-L0 = 0.0000000000000028 +t = 36.5000, H(p,q)-H0 = 0.0000000021841960, L(p,q)-L0 = 0.0000000000000032 +t = 36.6000, H(p,q)-H0 = 0.0000000021809006, L(p,q)-L0 = 0.0000000000000037 +t = 36.7000, H(p,q)-H0 = 0.0000000021752493, L(p,q)-L0 = 0.0000000000000031 +t = 36.8000, H(p,q)-H0 = 0.0000000021650266, L(p,q)-L0 = 0.0000000000000031 +t = 36.9000, H(p,q)-H0 = 0.0000000021453834, L(p,q)-L0 = 0.0000000000000032 +t = 37.0000, H(p,q)-H0 = 0.0000000021050556, L(p,q)-L0 = 0.0000000000000036 +t = 37.1000, H(p,q)-H0 = 0.0000000020163053, L(p,q)-L0 = 0.0000000000000038 +t = 37.2000, H(p,q)-H0 = 0.0000000018080409, L(p,q)-L0 = 0.0000000000000031 +t = 37.3000, H(p,q)-H0 = 0.0000000013016177, L(p,q)-L0 = 0.0000000000000036 +t = 37.4000, H(p,q)-H0 = 0.0000000001394596, L(p,q)-L0 = 0.0000000000000036 +t = 37.5000, H(p,q)-H0 = -0.0000000017311259, L(p,q)-L0 = 0.0000000000000036 +t = 37.6000, H(p,q)-H0 = -0.0000000019064714, L(p,q)-L0 = 0.0000000000000037 +t = 37.7000, H(p,q)-H0 = 0.0000000000003630, L(p,q)-L0 = 0.0000000000000033 +t = 37.8000, H(p,q)-H0 = -0.0000000018991426, L(p,q)-L0 = 0.0000000000000031 +t = 37.9000, H(p,q)-H0 = -0.0000000017294051, L(p,q)-L0 = 0.0000000000000031 +t = 38.0000, H(p,q)-H0 = 0.0000000001444111, L(p,q)-L0 = 0.0000000000000033 +t = 38.1000, H(p,q)-H0 = 0.0000000013063575, L(p,q)-L0 = 0.0000000000000033 +t = 38.2000, H(p,q)-H0 = 0.0000000018110842, L(p,q)-L0 = 0.0000000000000036 +t = 38.3000, H(p,q)-H0 = 0.0000000020180342, L(p,q)-L0 = 0.0000000000000036 +t = 38.4000, H(p,q)-H0 = 0.0000000021060161, L(p,q)-L0 = 0.0000000000000037 +t = 38.5000, H(p,q)-H0 = 0.0000000021459255, L(p,q)-L0 = 0.0000000000000038 +t = 38.6000, H(p,q)-H0 = 0.0000000021653410, L(p,q)-L0 = 0.0000000000000034 +t = 38.7000, H(p,q)-H0 = 0.0000000021754381, L(p,q)-L0 = 0.0000000000000033 +t = 38.8000, H(p,q)-H0 = 0.0000000021810172, L(p,q)-L0 = 0.0000000000000033 +t = 38.9000, H(p,q)-H0 = 0.0000000021842712, L(p,q)-L0 = 0.0000000000000034 +t = 39.0000, H(p,q)-H0 = 0.0000000021862612, L(p,q)-L0 = 0.0000000000000033 +t = 39.1000, H(p,q)-H0 = 0.0000000021875308, L(p,q)-L0 = 0.0000000000000037 +t = 39.2000, H(p,q)-H0 = 0.0000000021883703, L(p,q)-L0 = 0.0000000000000033 +t = 39.3000, H(p,q)-H0 = 0.0000000021889444, L(p,q)-L0 = 0.0000000000000037 +t = 39.4000, H(p,q)-H0 = 0.0000000021893477, L(p,q)-L0 = 0.0000000000000038 +t = 39.5000, H(p,q)-H0 = 0.0000000021896380, L(p,q)-L0 = 0.0000000000000036 +t = 39.6000, H(p,q)-H0 = 0.0000000021898516, L(p,q)-L0 = 0.0000000000000037 +t = 39.7000, H(p,q)-H0 = 0.0000000021900115, L(p,q)-L0 = 0.0000000000000036 +t = 39.8000, H(p,q)-H0 = 0.0000000021901330, L(p,q)-L0 = 0.0000000000000031 +t = 39.9000, H(p,q)-H0 = 0.0000000021902264, L(p,q)-L0 = 0.0000000000000032 +t = 40.0000, H(p,q)-H0 = 0.0000000021902989, L(p,q)-L0 = 0.0000000000000028 +t = 40.1000, H(p,q)-H0 = 0.0000000021903558, L(p,q)-L0 = 0.0000000000000029 +t = 40.2000, H(p,q)-H0 = 0.0000000021904003, L(p,q)-L0 = 0.0000000000000028 +t = 40.3000, H(p,q)-H0 = 0.0000000021904346, L(p,q)-L0 = 0.0000000000000026 +t = 40.4000, H(p,q)-H0 = 0.0000000021904611, L(p,q)-L0 = 0.0000000000000024 +t = 40.5000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000022 +t = 40.6000, H(p,q)-H0 = 0.0000000021904947, L(p,q)-L0 = 0.0000000000000022 +t = 40.7000, H(p,q)-H0 = 0.0000000021905039, L(p,q)-L0 = 0.0000000000000026 +t = 40.8000, H(p,q)-H0 = 0.0000000021905078, L(p,q)-L0 = 0.0000000000000022 +t = 40.9000, H(p,q)-H0 = 0.0000000021905074, L(p,q)-L0 = 0.0000000000000022 +t = 41.0000, H(p,q)-H0 = 0.0000000021905026, L(p,q)-L0 = 0.0000000000000026 +t = 41.1000, H(p,q)-H0 = 0.0000000021904927, L(p,q)-L0 = 0.0000000000000026 +t = 41.2000, H(p,q)-H0 = 0.0000000021904775, L(p,q)-L0 = 0.0000000000000026 +t = 41.3000, H(p,q)-H0 = 0.0000000021904565, L(p,q)-L0 = 0.0000000000000027 +t = 41.4000, H(p,q)-H0 = 0.0000000021904285, L(p,q)-L0 = 0.0000000000000027 +t = 41.5000, H(p,q)-H0 = 0.0000000021903920, L(p,q)-L0 = 0.0000000000000024 +t = 41.6000, H(p,q)-H0 = 0.0000000021903456, L(p,q)-L0 = 0.0000000000000028 +t = 41.7000, H(p,q)-H0 = 0.0000000021902861, L(p,q)-L0 = 0.0000000000000029 +t = 41.8000, H(p,q)-H0 = 0.0000000021902095, L(p,q)-L0 = 0.0000000000000027 +t = 41.9000, H(p,q)-H0 = 0.0000000021901106, L(p,q)-L0 = 0.0000000000000024 +t = 42.0000, H(p,q)-H0 = 0.0000000021899824, L(p,q)-L0 = 0.0000000000000026 +t = 42.1000, H(p,q)-H0 = 0.0000000021898132, L(p,q)-L0 = 0.0000000000000024 +t = 42.2000, H(p,q)-H0 = 0.0000000021895867, L(p,q)-L0 = 0.0000000000000029 +t = 42.3000, H(p,q)-H0 = 0.0000000021892768, L(p,q)-L0 = 0.0000000000000029 +t = 42.4000, H(p,q)-H0 = 0.0000000021888449, L(p,q)-L0 = 0.0000000000000028 +t = 42.5000, H(p,q)-H0 = 0.0000000021882276, L(p,q)-L0 = 0.0000000000000031 +t = 42.6000, H(p,q)-H0 = 0.0000000021873187, L(p,q)-L0 = 0.0000000000000031 +t = 42.7000, H(p,q)-H0 = 0.0000000021859365, L(p,q)-L0 = 0.0000000000000034 +t = 42.8000, H(p,q)-H0 = 0.0000000021837536, L(p,q)-L0 = 0.0000000000000033 +t = 42.9000, H(p,q)-H0 = 0.0000000021801575, L(p,q)-L0 = 0.0000000000000032 +t = 43.0000, H(p,q)-H0 = 0.0000000021739391, L(p,q)-L0 = 0.0000000000000036 +t = 43.1000, H(p,q)-H0 = 0.0000000021625797, L(p,q)-L0 = 0.0000000000000039 +t = 43.2000, H(p,q)-H0 = 0.0000000021405177, L(p,q)-L0 = 0.0000000000000047 +t = 43.3000, H(p,q)-H0 = 0.0000000020946935, L(p,q)-L0 = 0.0000000000000051 +t = 43.4000, H(p,q)-H0 = 0.0000000019926774, L(p,q)-L0 = 0.0000000000000047 +t = 43.5000, H(p,q)-H0 = 0.0000000017511204, L(p,q)-L0 = 0.0000000000000046 +t = 43.6000, H(p,q)-H0 = 0.0000000011639263, L(p,q)-L0 = 0.0000000000000042 +t = 43.7000, H(p,q)-H0 = -0.0000000001449194, L(p,q)-L0 = 0.0000000000000040 +t = 43.8000, H(p,q)-H0 = -0.0000000019957591, L(p,q)-L0 = 0.0000000000000036 +t = 43.9000, H(p,q)-H0 = -0.0000000015482549, L(p,q)-L0 = 0.0000000000000032 +t = 44.0000, H(p,q)-H0 = -0.0000000000875615, L(p,q)-L0 = 0.0000000000000033 +t = 44.1000, H(p,q)-H0 = -0.0000000021549367, L(p,q)-L0 = 0.0000000000000031 +t = 44.2000, H(p,q)-H0 = -0.0000000014210157, L(p,q)-L0 = 0.0000000000000030 +t = 44.3000, H(p,q)-H0 = 0.0000000004029348, L(p,q)-L0 = 0.0000000000000028 +t = 44.4000, H(p,q)-H0 = 0.0000000014252810, L(p,q)-L0 = 0.0000000000000027 +t = 44.5000, H(p,q)-H0 = 0.0000000018598003, L(p,q)-L0 = 0.0000000000000029 +t = 44.6000, H(p,q)-H0 = 0.0000000020383498, L(p,q)-L0 = 0.0000000000000032 +t = 44.7000, H(p,q)-H0 = 0.0000000021150072, L(p,q)-L0 = 0.0000000000000028 +t = 44.8000, H(p,q)-H0 = 0.0000000021501914, L(p,q)-L0 = 0.0000000000000031 +t = 44.9000, H(p,q)-H0 = 0.0000000021675071, L(p,q)-L0 = 0.0000000000000029 +t = 45.0000, H(p,q)-H0 = 0.0000000021766086, L(p,q)-L0 = 0.0000000000000028 +t = 45.1000, H(p,q)-H0 = 0.0000000021816857, L(p,q)-L0 = 0.0000000000000024 +t = 45.2000, H(p,q)-H0 = 0.0000000021846717, L(p,q)-L0 = 0.0000000000000023 +t = 45.3000, H(p,q)-H0 = 0.0000000021865116, L(p,q)-L0 = 0.0000000000000022 +t = 45.4000, H(p,q)-H0 = 0.0000000021876930, L(p,q)-L0 = 0.0000000000000022 +t = 45.5000, H(p,q)-H0 = 0.0000000021884791, L(p,q)-L0 = 0.0000000000000020 +t = 45.6000, H(p,q)-H0 = 0.0000000021890187, L(p,q)-L0 = 0.0000000000000020 +t = 45.7000, H(p,q)-H0 = 0.0000000021893996, L(p,q)-L0 = 0.0000000000000019 +t = 45.8000, H(p,q)-H0 = 0.0000000021896744, L(p,q)-L0 = 0.0000000000000016 +t = 45.9000, H(p,q)-H0 = 0.0000000021898774, L(p,q)-L0 = 0.0000000000000016 +t = 46.0000, H(p,q)-H0 = 0.0000000021900302, L(p,q)-L0 = 0.0000000000000017 +t = 46.1000, H(p,q)-H0 = 0.0000000021901467, L(p,q)-L0 = 0.0000000000000020 +t = 46.2000, H(p,q)-H0 = 0.0000000021902365, L(p,q)-L0 = 0.0000000000000023 +t = 46.3000, H(p,q)-H0 = 0.0000000021903065, L(p,q)-L0 = 0.0000000000000026 +t = 46.4000, H(p,q)-H0 = 0.0000000021903610, L(p,q)-L0 = 0.0000000000000026 +t = 46.5000, H(p,q)-H0 = 0.0000000021904035, L(p,q)-L0 = 0.0000000000000024 +t = 46.6000, H(p,q)-H0 = 0.0000000021904365, L(p,q)-L0 = 0.0000000000000024 +t = 46.7000, H(p,q)-H0 = 0.0000000021904620, L(p,q)-L0 = 0.0000000000000024 +t = 46.8000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000026 +t = 46.9000, H(p,q)-H0 = 0.0000000021904942, L(p,q)-L0 = 0.0000000000000029 +t = 47.0000, H(p,q)-H0 = 0.0000000021905023, L(p,q)-L0 = 0.0000000000000032 +t = 47.1000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = 0.0000000000000031 +t = 47.2000, H(p,q)-H0 = 0.0000000021905046, L(p,q)-L0 = 0.0000000000000032 +t = 47.3000, H(p,q)-H0 = 0.0000000021904984, L(p,q)-L0 = 0.0000000000000030 +t = 47.4000, H(p,q)-H0 = 0.0000000021904876, L(p,q)-L0 = 0.0000000000000029 +t = 47.5000, H(p,q)-H0 = 0.0000000021904717, L(p,q)-L0 = 0.0000000000000030 +t = 47.6000, H(p,q)-H0 = 0.0000000021904498, L(p,q)-L0 = 0.0000000000000036 +t = 47.7000, H(p,q)-H0 = 0.0000000021904205, L(p,q)-L0 = 0.0000000000000037 +t = 47.8000, H(p,q)-H0 = 0.0000000021903824, L(p,q)-L0 = 0.0000000000000037 +t = 47.9000, H(p,q)-H0 = 0.0000000021903339, L(p,q)-L0 = 0.0000000000000037 +t = 48.0000, H(p,q)-H0 = 0.0000000021902718, L(p,q)-L0 = 0.0000000000000038 +t = 48.1000, H(p,q)-H0 = 0.0000000021901918, L(p,q)-L0 = 0.0000000000000038 +t = 48.2000, H(p,q)-H0 = 0.0000000021900888, L(p,q)-L0 = 0.0000000000000039 +t = 48.3000, H(p,q)-H0 = 0.0000000021899544, L(p,q)-L0 = 0.0000000000000039 +t = 48.4000, H(p,q)-H0 = 0.0000000021897766, L(p,q)-L0 = 0.0000000000000034 +t = 48.5000, H(p,q)-H0 = 0.0000000021895377, L(p,q)-L0 = 0.0000000000000033 +t = 48.6000, H(p,q)-H0 = 0.0000000021892106, L(p,q)-L0 = 0.0000000000000033 +t = 48.7000, H(p,q)-H0 = 0.0000000021887525, L(p,q)-L0 = 0.0000000000000033 +t = 48.8000, H(p,q)-H0 = 0.0000000021880946, L(p,q)-L0 = 0.0000000000000032 +t = 48.9000, H(p,q)-H0 = 0.0000000021871220, L(p,q)-L0 = 0.0000000000000034 +t = 49.0000, H(p,q)-H0 = 0.0000000021856332, L(p,q)-L0 = 0.0000000000000038 +t = 49.1000, H(p,q)-H0 = 0.0000000021832666, L(p,q)-L0 = 0.0000000000000039 +t = 49.2000, H(p,q)-H0 = 0.0000000021793377, L(p,q)-L0 = 0.0000000000000040 +t = 49.3000, H(p,q)-H0 = 0.0000000021724836, L(p,q)-L0 = 0.0000000000000038 +t = 49.4000, H(p,q)-H0 = 0.0000000021598388, L(p,q)-L0 = 0.0000000000000037 +t = 49.5000, H(p,q)-H0 = 0.0000000021350117, L(p,q)-L0 = 0.0000000000000047 +t = 49.6000, H(p,q)-H0 = 0.0000000020828380, L(p,q)-L0 = 0.0000000000000041 +t = 49.7000, H(p,q)-H0 = 0.0000000019653632, L(p,q)-L0 = 0.0000000000000040 +t = 49.8000, H(p,q)-H0 = 0.0000000016849397, L(p,q)-L0 = 0.0000000000000040 +t = 49.9000, H(p,q)-H0 = 0.0000000010054575, L(p,q)-L0 = 0.0000000000000043 +t = 50.0000, H(p,q)-H0 = -0.0000000004525247, L(p,q)-L0 = 0.0000000000000041 +t = 50.1000, H(p,q)-H0 = -0.0000000021925068, L(p,q)-L0 = 0.0000000000000038 +t = 50.2000, H(p,q)-H0 = -0.0000000011262797, L(p,q)-L0 = 0.0000000000000038 +t = 50.3000, H(p,q)-H0 = -0.0000000003393819, L(p,q)-L0 = 0.0000000000000036 +t = 50.4000, H(p,q)-H0 = -0.0000000022861792, L(p,q)-L0 = 0.0000000000000036 +t = 50.5000, H(p,q)-H0 = -0.0000000010909109, L(p,q)-L0 = 0.0000000000000034 +t = 50.6000, H(p,q)-H0 = 0.0000000006344154, L(p,q)-L0 = 0.0000000000000036 +t = 50.7000, H(p,q)-H0 = 0.0000000015278889, L(p,q)-L0 = 0.0000000000000034 +t = 50.8000, H(p,q)-H0 = 0.0000000019017266, L(p,q)-L0 = 0.0000000000000041 +t = 50.9000, H(p,q)-H0 = 0.0000000020559798, L(p,q)-L0 = 0.0000000000000034 +t = 51.0000, H(p,q)-H0 = 0.0000000021228997, L(p,q)-L0 = 0.0000000000000030 +t = 51.1000, H(p,q)-H0 = 0.0000000021539794, L(p,q)-L0 = 0.0000000000000028 +t = 51.2000, H(p,q)-H0 = 0.0000000021694511, L(p,q)-L0 = 0.0000000000000027 +t = 51.3000, H(p,q)-H0 = 0.0000000021776693, L(p,q)-L0 = 0.0000000000000024 +t = 51.4000, H(p,q)-H0 = 0.0000000021822963, L(p,q)-L0 = 0.0000000000000023 +t = 51.5000, H(p,q)-H0 = 0.0000000021850405, L(p,q)-L0 = 0.0000000000000024 +t = 51.6000, H(p,q)-H0 = 0.0000000021867441, L(p,q)-L0 = 0.0000000000000027 +t = 51.7000, H(p,q)-H0 = 0.0000000021878448, L(p,q)-L0 = 0.0000000000000028 +t = 51.8000, H(p,q)-H0 = 0.0000000021885816, L(p,q)-L0 = 0.0000000000000029 +t = 51.9000, H(p,q)-H0 = 0.0000000021890901, L(p,q)-L0 = 0.0000000000000033 +t = 52.0000, H(p,q)-H0 = 0.0000000021894503, L(p,q)-L0 = 0.0000000000000032 +t = 52.1000, H(p,q)-H0 = 0.0000000021897114, L(p,q)-L0 = 0.0000000000000030 +t = 52.2000, H(p,q)-H0 = 0.0000000021899053, L(p,q)-L0 = 0.0000000000000031 +t = 52.3000, H(p,q)-H0 = 0.0000000021900509, L(p,q)-L0 = 0.0000000000000033 +t = 52.4000, H(p,q)-H0 = 0.0000000021901626, L(p,q)-L0 = 0.0000000000000037 +t = 52.5000, H(p,q)-H0 = 0.0000000021902487, L(p,q)-L0 = 0.0000000000000038 +t = 52.6000, H(p,q)-H0 = 0.0000000021903156, L(p,q)-L0 = 0.0000000000000039 +t = 52.7000, H(p,q)-H0 = 0.0000000021903677, L(p,q)-L0 = 0.0000000000000038 +t = 52.8000, H(p,q)-H0 = 0.0000000021904085, L(p,q)-L0 = 0.0000000000000036 +t = 52.9000, H(p,q)-H0 = 0.0000000021904403, L(p,q)-L0 = 0.0000000000000037 +t = 53.0000, H(p,q)-H0 = 0.0000000021904645, L(p,q)-L0 = 0.0000000000000036 +t = 53.1000, H(p,q)-H0 = 0.0000000021904824, L(p,q)-L0 = 0.0000000000000037 +t = 53.2000, H(p,q)-H0 = 0.0000000021904947, L(p,q)-L0 = 0.0000000000000039 +t = 53.3000, H(p,q)-H0 = 0.0000000021905021, L(p,q)-L0 = 0.0000000000000041 +t = 53.4000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = 0.0000000000000046 +t = 53.5000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000046 +t = 53.6000, H(p,q)-H0 = 0.0000000021904966, L(p,q)-L0 = 0.0000000000000049 +t = 53.7000, H(p,q)-H0 = 0.0000000021904851, L(p,q)-L0 = 0.0000000000000048 +t = 53.8000, H(p,q)-H0 = 0.0000000021904681, L(p,q)-L0 = 0.0000000000000050 +t = 53.9000, H(p,q)-H0 = 0.0000000021904447, L(p,q)-L0 = 0.0000000000000048 +t = 54.0000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000046 +t = 54.1000, H(p,q)-H0 = 0.0000000021903745, L(p,q)-L0 = 0.0000000000000044 +t = 54.2000, H(p,q)-H0 = 0.0000000021903241, L(p,q)-L0 = 0.0000000000000048 +t = 54.3000, H(p,q)-H0 = 0.0000000021902591, L(p,q)-L0 = 0.0000000000000047 +t = 54.4000, H(p,q)-H0 = 0.0000000021901758, L(p,q)-L0 = 0.0000000000000047 +t = 54.5000, H(p,q)-H0 = 0.0000000021900680, L(p,q)-L0 = 0.0000000000000043 +t = 54.6000, H(p,q)-H0 = 0.0000000021899273, L(p,q)-L0 = 0.0000000000000047 +t = 54.7000, H(p,q)-H0 = 0.0000000021897409, L(p,q)-L0 = 0.0000000000000047 +t = 54.8000, H(p,q)-H0 = 0.0000000021894895, L(p,q)-L0 = 0.0000000000000044 +t = 54.9000, H(p,q)-H0 = 0.0000000021891444, L(p,q)-L0 = 0.0000000000000047 +t = 55.0000, H(p,q)-H0 = 0.0000000021886584, L(p,q)-L0 = 0.0000000000000046 +t = 55.1000, H(p,q)-H0 = 0.0000000021879574, L(p,q)-L0 = 0.0000000000000044 +t = 55.2000, H(p,q)-H0 = 0.0000000021869148, L(p,q)-L0 = 0.0000000000000049 +t = 55.3000, H(p,q)-H0 = 0.0000000021853098, L(p,q)-L0 = 0.0000000000000047 +t = 55.4000, H(p,q)-H0 = 0.0000000021827406, L(p,q)-L0 = 0.0000000000000046 +t = 55.5000, H(p,q)-H0 = 0.0000000021784419, L(p,q)-L0 = 0.0000000000000049 +t = 55.6000, H(p,q)-H0 = 0.0000000021708755, L(p,q)-L0 = 0.0000000000000050 +t = 55.7000, H(p,q)-H0 = 0.0000000021567761, L(p,q)-L0 = 0.0000000000000053 +t = 55.8000, H(p,q)-H0 = 0.0000000021287814, L(p,q)-L0 = 0.0000000000000049 +t = 55.9000, H(p,q)-H0 = 0.0000000020692630, L(p,q)-L0 = 0.0000000000000052 +t = 56.0000, H(p,q)-H0 = 0.0000000019337545, L(p,q)-L0 = 0.0000000000000053 +t = 56.1000, H(p,q)-H0 = 0.0000000016080133, L(p,q)-L0 = 0.0000000000000050 +t = 56.2000, H(p,q)-H0 = 0.0000000008240018, L(p,q)-L0 = 0.0000000000000054 +t = 56.3000, H(p,q)-H0 = -0.0000000007777232, L(p,q)-L0 = 0.0000000000000053 +t = 56.4000, H(p,q)-H0 = -0.0000000022964355, L(p,q)-L0 = 0.0000000000000052 +t = 56.5000, H(p,q)-H0 = -0.0000000006980465, L(p,q)-L0 = 0.0000000000000052 +t = 56.6000, H(p,q)-H0 = -0.0000000007108090, L(p,q)-L0 = 0.0000000000000051 +t = 56.7000, H(p,q)-H0 = -0.0000000022911208, L(p,q)-L0 = 0.0000000000000050 +t = 56.8000, H(p,q)-H0 = -0.0000000007567429, L(p,q)-L0 = 0.0000000000000050 +t = 56.9000, H(p,q)-H0 = 0.0000000008394492, L(p,q)-L0 = 0.0000000000000053 +t = 57.0000, H(p,q)-H0 = 0.0000000016162609, L(p,q)-L0 = 0.0000000000000052 +t = 57.1000, H(p,q)-H0 = 0.0000000019378454, L(p,q)-L0 = 0.0000000000000050 +t = 57.2000, H(p,q)-H0 = 0.0000000020713116, L(p,q)-L0 = 0.0000000000000049 +t = 57.3000, H(p,q)-H0 = 0.0000000021298465, L(p,q)-L0 = 0.0000000000000049 +t = 57.4000, H(p,q)-H0 = 0.0000000021573541, L(p,q)-L0 = 0.0000000000000040 +t = 57.5000, H(p,q)-H0 = 0.0000000021712041, L(p,q)-L0 = 0.0000000000000041 +t = 57.6000, H(p,q)-H0 = 0.0000000021786368, L(p,q)-L0 = 0.0000000000000044 +t = 57.7000, H(p,q)-H0 = 0.0000000021828603, L(p,q)-L0 = 0.0000000000000044 +t = 57.8000, H(p,q)-H0 = 0.0000000021853853, L(p,q)-L0 = 0.0000000000000042 +t = 57.9000, H(p,q)-H0 = 0.0000000021869638, L(p,q)-L0 = 0.0000000000000044 +t = 58.0000, H(p,q)-H0 = 0.0000000021879897, L(p,q)-L0 = 0.0000000000000040 +t = 58.1000, H(p,q)-H0 = 0.0000000021886802, L(p,q)-L0 = 0.0000000000000041 +t = 58.2000, H(p,q)-H0 = 0.0000000021891585, L(p,q)-L0 = 0.0000000000000038 +t = 58.3000, H(p,q)-H0 = 0.0000000021894993, L(p,q)-L0 = 0.0000000000000039 +t = 58.4000, H(p,q)-H0 = 0.0000000021897474, L(p,q)-L0 = 0.0000000000000038 +t = 58.5000, H(p,q)-H0 = 0.0000000021899316, L(p,q)-L0 = 0.0000000000000038 +t = 58.6000, H(p,q)-H0 = 0.0000000021900710, L(p,q)-L0 = 0.0000000000000042 +t = 58.7000, H(p,q)-H0 = 0.0000000021901776, L(p,q)-L0 = 0.0000000000000042 +t = 58.8000, H(p,q)-H0 = 0.0000000021902602, L(p,q)-L0 = 0.0000000000000047 +t = 58.9000, H(p,q)-H0 = 0.0000000021903247, L(p,q)-L0 = 0.0000000000000050 +t = 59.0000, H(p,q)-H0 = 0.0000000021903750, L(p,q)-L0 = 0.0000000000000052 +t = 59.1000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000052 +t = 59.2000, H(p,q)-H0 = 0.0000000021904442, L(p,q)-L0 = 0.0000000000000047 +t = 59.3000, H(p,q)-H0 = 0.0000000021904675, L(p,q)-L0 = 0.0000000000000052 +t = 59.4000, H(p,q)-H0 = 0.0000000021904839, L(p,q)-L0 = 0.0000000000000048 +t = 59.5000, H(p,q)-H0 = 0.0000000021904950, L(p,q)-L0 = 0.0000000000000044 +t = 59.6000, H(p,q)-H0 = 0.0000000021905014, L(p,q)-L0 = 0.0000000000000043 +t = 59.7000, H(p,q)-H0 = 0.0000000021905032, L(p,q)-L0 = 0.0000000000000042 +t = 59.8000, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = 0.0000000000000043 +t = 59.9000, H(p,q)-H0 = 0.0000000021904931, L(p,q)-L0 = 0.0000000000000044 +t = 60.0000, H(p,q)-H0 = 0.0000000021904805, L(p,q)-L0 = 0.0000000000000043 +t = 60.1000, H(p,q)-H0 = 0.0000000021904624, L(p,q)-L0 = 0.0000000000000042 +t = 60.2000, H(p,q)-H0 = 0.0000000021904379, L(p,q)-L0 = 0.0000000000000040 +t = 60.3000, H(p,q)-H0 = 0.0000000021904059, L(p,q)-L0 = 0.0000000000000042 +t = 60.4000, H(p,q)-H0 = 0.0000000021903648, L(p,q)-L0 = 0.0000000000000044 +t = 60.5000, H(p,q)-H0 = 0.0000000021903120, L(p,q)-L0 = 0.0000000000000044 +t = 60.6000, H(p,q)-H0 = 0.0000000021902444, L(p,q)-L0 = 0.0000000000000043 +t = 60.7000, H(p,q)-H0 = 0.0000000021901574, L(p,q)-L0 = 0.0000000000000043 +t = 60.8000, H(p,q)-H0 = 0.0000000021900446, L(p,q)-L0 = 0.0000000000000041 +t = 60.9000, H(p,q)-H0 = 0.0000000021898974, L(p,q)-L0 = 0.0000000000000042 +t = 61.0000, H(p,q)-H0 = 0.0000000021897019, L(p,q)-L0 = 0.0000000000000047 +t = 61.1000, H(p,q)-H0 = 0.0000000021894369, L(p,q)-L0 = 0.0000000000000044 +t = 61.2000, H(p,q)-H0 = 0.0000000021890715, L(p,q)-L0 = 0.0000000000000044 +t = 61.3000, H(p,q)-H0 = 0.0000000021885554, L(p,q)-L0 = 0.0000000000000040 +t = 61.4000, H(p,q)-H0 = 0.0000000021878070, L(p,q)-L0 = 0.0000000000000038 +t = 61.5000, H(p,q)-H0 = 0.0000000021866884, L(p,q)-L0 = 0.0000000000000034 +t = 61.6000, H(p,q)-H0 = 0.0000000021849565, L(p,q)-L0 = 0.0000000000000037 +t = 61.7000, H(p,q)-H0 = 0.0000000021821646, L(p,q)-L0 = 0.0000000000000040 +t = 61.8000, H(p,q)-H0 = 0.0000000021774544, L(p,q)-L0 = 0.0000000000000036 +t = 61.9000, H(p,q)-H0 = 0.0000000021690871, L(p,q)-L0 = 0.0000000000000032 +t = 62.0000, H(p,q)-H0 = 0.0000000021533373, L(p,q)-L0 = 0.0000000000000038 +t = 62.1000, H(p,q)-H0 = 0.0000000021217116, L(p,q)-L0 = 0.0000000000000032 +t = 62.2000, H(p,q)-H0 = 0.0000000020536803, L(p,q)-L0 = 0.0000000000000034 +t = 62.3000, H(p,q)-H0 = 0.0000000018971157, L(p,q)-L0 = 0.0000000000000032 +t = 62.4000, H(p,q)-H0 = 0.0000000015186385, L(p,q)-L0 = 0.0000000000000027 +t = 62.5000, H(p,q)-H0 = 0.0000000006175833, L(p,q)-L0 = 0.0000000000000024 +t = 62.6000, H(p,q)-H0 = -0.0000000011113854, L(p,q)-L0 = 0.0000000000000024 +t = 62.7000, H(p,q)-H0 = -0.0000000022863662, L(p,q)-L0 = 0.0000000000000024 +t = 62.8000, H(p,q)-H0 = -0.0000000003295020, L(p,q)-L0 = 0.0000000000000021 +t = 62.9000, H(p,q)-H0 = -0.0000000011398287, L(p,q)-L0 = 0.0000000000000023 +t = 63.0000, H(p,q)-H0 = -0.0000000021824698, L(p,q)-L0 = 0.0000000000000022 +t = 63.1000, H(p,q)-H0 = -0.0000000004316751, L(p,q)-L0 = 0.0000000000000030 +t = 63.2000, H(p,q)-H0 = 0.0000000010195209, L(p,q)-L0 = 0.0000000000000029 +t = 63.3000, H(p,q)-H0 = 0.0000000016922781, L(p,q)-L0 = 0.0000000000000033 +t = 63.4000, H(p,q)-H0 = 0.0000000019689945, L(p,q)-L0 = 0.0000000000000034 +t = 63.5000, H(p,q)-H0 = 0.0000000020846639, L(p,q)-L0 = 0.0000000000000037 +t = 63.6000, H(p,q)-H0 = 0.0000000021359661, L(p,q)-L0 = 0.0000000000000042 +t = 63.7000, H(p,q)-H0 = 0.0000000021603613, L(p,q)-L0 = 0.0000000000000042 +t = 63.8000, H(p,q)-H0 = 0.0000000021727820, L(p,q)-L0 = 0.0000000000000043 +t = 63.9000, H(p,q)-H0 = 0.0000000021795151, L(p,q)-L0 = 0.0000000000000044 +t = 64.0000, H(p,q)-H0 = 0.0000000021833759, L(p,q)-L0 = 0.0000000000000047 +t = 64.1000, H(p,q)-H0 = 0.0000000021857027, L(p,q)-L0 = 0.0000000000000051 +t = 64.2000, H(p,q)-H0 = 0.0000000021871673, L(p,q)-L0 = 0.0000000000000051 +t = 64.3000, H(p,q)-H0 = 0.0000000021881255, L(p,q)-L0 = 0.0000000000000053 +t = 64.4000, H(p,q)-H0 = 0.0000000021887733, L(p,q)-L0 = 0.0000000000000052 +t = 64.5000, H(p,q)-H0 = 0.0000000021892246, L(p,q)-L0 = 0.0000000000000051 +t = 64.6000, H(p,q)-H0 = 0.0000000021895474, L(p,q)-L0 = 0.0000000000000053 +t = 64.7000, H(p,q)-H0 = 0.0000000021897830, L(p,q)-L0 = 0.0000000000000052 +t = 64.8000, H(p,q)-H0 = 0.0000000021899583, L(p,q)-L0 = 0.0000000000000048 +t = 64.9000, H(p,q)-H0 = 0.0000000021900913, L(p,q)-L0 = 0.0000000000000050 +t = 65.0000, H(p,q)-H0 = 0.0000000021901936, L(p,q)-L0 = 0.0000000000000056 +t = 65.1000, H(p,q)-H0 = 0.0000000021902724, L(p,q)-L0 = 0.0000000000000054 +t = 65.2000, H(p,q)-H0 = 0.0000000021903344, L(p,q)-L0 = 0.0000000000000060 +t = 65.3000, H(p,q)-H0 = 0.0000000021903822, L(p,q)-L0 = 0.0000000000000057 +t = 65.4000, H(p,q)-H0 = 0.0000000021904196, L(p,q)-L0 = 0.0000000000000056 +t = 65.5000, H(p,q)-H0 = 0.0000000021904488, L(p,q)-L0 = 0.0000000000000059 +t = 65.6000, H(p,q)-H0 = 0.0000000021904707, L(p,q)-L0 = 0.0000000000000059 +t = 65.7000, H(p,q)-H0 = 0.0000000021904865, L(p,q)-L0 = 0.0000000000000061 +t = 65.8000, H(p,q)-H0 = 0.0000000021904972, L(p,q)-L0 = 0.0000000000000064 +t = 65.9000, H(p,q)-H0 = 0.0000000021905028, L(p,q)-L0 = 0.0000000000000063 +t = 66.0000, H(p,q)-H0 = 0.0000000021905041, L(p,q)-L0 = 0.0000000000000064 +t = 66.1000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = 0.0000000000000062 +t = 66.2000, H(p,q)-H0 = 0.0000000021904920, L(p,q)-L0 = 0.0000000000000060 +t = 66.3000, H(p,q)-H0 = 0.0000000021904784, L(p,q)-L0 = 0.0000000000000058 +t = 66.4000, H(p,q)-H0 = 0.0000000021904595, L(p,q)-L0 = 0.0000000000000058 +t = 66.5000, H(p,q)-H0 = 0.0000000021904338, L(p,q)-L0 = 0.0000000000000058 +t = 66.6000, H(p,q)-H0 = 0.0000000021904004, L(p,q)-L0 = 0.0000000000000057 +t = 66.7000, H(p,q)-H0 = 0.0000000021903573, L(p,q)-L0 = 0.0000000000000058 +t = 66.8000, H(p,q)-H0 = 0.0000000021903023, L(p,q)-L0 = 0.0000000000000060 +t = 66.9000, H(p,q)-H0 = 0.0000000021902322, L(p,q)-L0 = 0.0000000000000064 +t = 67.0000, H(p,q)-H0 = 0.0000000021901418, L(p,q)-L0 = 0.0000000000000070 +t = 67.1000, H(p,q)-H0 = 0.0000000021900243, L(p,q)-L0 = 0.0000000000000071 +t = 67.2000, H(p,q)-H0 = 0.0000000021898695, L(p,q)-L0 = 0.0000000000000067 +t = 67.3000, H(p,q)-H0 = 0.0000000021896638, L(p,q)-L0 = 0.0000000000000067 +t = 67.4000, H(p,q)-H0 = 0.0000000021893843, L(p,q)-L0 = 0.0000000000000064 +t = 67.5000, H(p,q)-H0 = 0.0000000021889982, L(p,q)-L0 = 0.0000000000000064 +t = 67.6000, H(p,q)-H0 = 0.0000000021884506, L(p,q)-L0 = 0.0000000000000067 +t = 67.7000, H(p,q)-H0 = 0.0000000021876523, L(p,q)-L0 = 0.0000000000000068 +t = 67.8000, H(p,q)-H0 = 0.0000000021864515, L(p,q)-L0 = 0.0000000000000066 +t = 67.9000, H(p,q)-H0 = 0.0000000021845806, L(p,q)-L0 = 0.0000000000000071 +t = 68.0000, H(p,q)-H0 = 0.0000000021815426, L(p,q)-L0 = 0.0000000000000074 +t = 68.1000, H(p,q)-H0 = 0.0000000021763747, L(p,q)-L0 = 0.0000000000000079 +t = 68.2000, H(p,q)-H0 = 0.0000000021671083, L(p,q)-L0 = 0.0000000000000078 +t = 68.3000, H(p,q)-H0 = 0.0000000021494821, L(p,q)-L0 = 0.0000000000000081 +t = 68.4000, H(p,q)-H0 = 0.0000000021136843, L(p,q)-L0 = 0.0000000000000075 +t = 68.5000, H(p,q)-H0 = 0.0000000020357698, L(p,q)-L0 = 0.0000000000000072 +t = 68.6000, H(p,q)-H0 = 0.0000000018546116, L(p,q)-L0 = 0.0000000000000074 +t = 68.7000, H(p,q)-H0 = 0.0000000014149373, L(p,q)-L0 = 0.0000000000000071 +t = 68.8000, H(p,q)-H0 = 0.0000000003847842, L(p,q)-L0 = 0.0000000000000068 +t = 68.9000, H(p,q)-H0 = -0.0000000014401935, L(p,q)-L0 = 0.0000000000000071 +t = 69.0000, H(p,q)-H0 = -0.0000000021500677, L(p,q)-L0 = 0.0000000000000071 +t = 69.1000, H(p,q)-H0 = -0.0000000000822351, L(p,q)-L0 = 0.0000000000000073 +t = 69.2000, H(p,q)-H0 = -0.0000000015604593, L(p,q)-L0 = 0.0000000000000069 +t = 69.3000, H(p,q)-H0 = -0.0000000019817259, L(p,q)-L0 = 0.0000000000000071 +t = 69.4000, H(p,q)-H0 = -0.0000000001246847, L(p,q)-L0 = 0.0000000000000073 +t = 69.5000, H(p,q)-H0 = 0.0000000011766541, L(p,q)-L0 = 0.0000000000000074 +t = 69.6000, H(p,q)-H0 = 0.0000000017576444, L(p,q)-L0 = 0.0000000000000072 +t = 69.7000, H(p,q)-H0 = 0.0000000019959023, L(p,q)-L0 = 0.0000000000000069 +t = 69.8000, H(p,q)-H0 = 0.0000000020963230, L(p,q)-L0 = 0.0000000000000075 +t = 69.9000, H(p,q)-H0 = 0.0000000021413751, L(p,q)-L0 = 0.0000000000000075 +t = 70.0000, H(p,q)-H0 = 0.0000000021630508, L(p,q)-L0 = 0.0000000000000071 +t = 70.1000, H(p,q)-H0 = 0.0000000021742094, L(p,q)-L0 = 0.0000000000000073 +t = 70.2000, H(p,q)-H0 = 0.0000000021803188, L(p,q)-L0 = 0.0000000000000078 +t = 70.3000, H(p,q)-H0 = 0.0000000021838529, L(p,q)-L0 = 0.0000000000000080 +t = 70.4000, H(p,q)-H0 = 0.0000000021859990, L(p,q)-L0 = 0.0000000000000081 +t = 70.5000, H(p,q)-H0 = 0.0000000021873595, L(p,q)-L0 = 0.0000000000000084 +t = 70.6000, H(p,q)-H0 = 0.0000000021882546, L(p,q)-L0 = 0.0000000000000087 +t = 70.7000, H(p,q)-H0 = 0.0000000021888631, L(p,q)-L0 = 0.0000000000000087 +t = 70.8000, H(p,q)-H0 = 0.0000000021892885, L(p,q)-L0 = 0.0000000000000082 +t = 70.9000, H(p,q)-H0 = 0.0000000021895940, L(p,q)-L0 = 0.0000000000000082 +t = 71.0000, H(p,q)-H0 = 0.0000000021898182, L(p,q)-L0 = 0.0000000000000080 +t = 71.1000, H(p,q)-H0 = 0.0000000021899852, L(p,q)-L0 = 0.0000000000000078 +t = 71.2000, H(p,q)-H0 = 0.0000000021901124, L(p,q)-L0 = 0.0000000000000080 +t = 71.3000, H(p,q)-H0 = 0.0000000021902100, L(p,q)-L0 = 0.0000000000000082 +t = 71.4000, H(p,q)-H0 = 0.0000000021902857, L(p,q)-L0 = 0.0000000000000081 +t = 71.5000, H(p,q)-H0 = 0.0000000021903450, L(p,q)-L0 = 0.0000000000000083 +t = 71.6000, H(p,q)-H0 = 0.0000000021903911, L(p,q)-L0 = 0.0000000000000082 +t = 71.7000, H(p,q)-H0 = 0.0000000021904273, L(p,q)-L0 = 0.0000000000000083 +t = 71.8000, H(p,q)-H0 = 0.0000000021904549, L(p,q)-L0 = 0.0000000000000084 +t = 71.9000, H(p,q)-H0 = 0.0000000021904759, L(p,q)-L0 = 0.0000000000000085 +t = 72.0000, H(p,q)-H0 = 0.0000000021904909, L(p,q)-L0 = 0.0000000000000088 +t = 72.1000, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = 0.0000000000000091 +t = 72.2000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = 0.0000000000000089 +t = 72.3000, H(p,q)-H0 = 0.0000000021905058, L(p,q)-L0 = 0.0000000000000088 +t = 72.4000, H(p,q)-H0 = 0.0000000021905017, L(p,q)-L0 = 0.0000000000000085 +t = 72.5000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = 0.0000000000000084 +t = 72.6000, H(p,q)-H0 = 0.0000000021904779, L(p,q)-L0 = 0.0000000000000083 +t = 72.7000, H(p,q)-H0 = 0.0000000021904577, L(p,q)-L0 = 0.0000000000000079 +t = 72.8000, H(p,q)-H0 = 0.0000000021904308, L(p,q)-L0 = 0.0000000000000079 +t = 72.9000, H(p,q)-H0 = 0.0000000021903962, L(p,q)-L0 = 0.0000000000000083 +t = 73.0000, H(p,q)-H0 = 0.0000000021903512, L(p,q)-L0 = 0.0000000000000082 +t = 73.1000, H(p,q)-H0 = 0.0000000021902937, L(p,q)-L0 = 0.0000000000000082 +t = 73.2000, H(p,q)-H0 = 0.0000000021902204, L(p,q)-L0 = 0.0000000000000087 +t = 73.3000, H(p,q)-H0 = 0.0000000021901255, L(p,q)-L0 = 0.0000000000000084 +t = 73.4000, H(p,q)-H0 = 0.0000000021900025, L(p,q)-L0 = 0.0000000000000082 +t = 73.5000, H(p,q)-H0 = 0.0000000021898401, L(p,q)-L0 = 0.0000000000000078 +t = 73.6000, H(p,q)-H0 = 0.0000000021896239, L(p,q)-L0 = 0.0000000000000075 +t = 73.7000, H(p,q)-H0 = 0.0000000021893298, L(p,q)-L0 = 0.0000000000000079 +t = 73.8000, H(p,q)-H0 = 0.0000000021889204, L(p,q)-L0 = 0.0000000000000075 +t = 73.9000, H(p,q)-H0 = 0.0000000021883377, L(p,q)-L0 = 0.0000000000000073 +t = 74.0000, H(p,q)-H0 = 0.0000000021874844, L(p,q)-L0 = 0.0000000000000071 +t = 74.1000, H(p,q)-H0 = 0.0000000021861942, L(p,q)-L0 = 0.0000000000000072 +t = 74.2000, H(p,q)-H0 = 0.0000000021841700, L(p,q)-L0 = 0.0000000000000071 +t = 74.3000, H(p,q)-H0 = 0.0000000021808589, L(p,q)-L0 = 0.0000000000000070 +t = 74.4000, H(p,q)-H0 = 0.0000000021751795, L(p,q)-L0 = 0.0000000000000072 +t = 74.5000, H(p,q)-H0 = 0.0000000021648997, L(p,q)-L0 = 0.0000000000000071 +t = 74.6000, H(p,q)-H0 = 0.0000000021451367, L(p,q)-L0 = 0.0000000000000073 +t = 74.7000, H(p,q)-H0 = 0.0000000021045369, L(p,q)-L0 = 0.0000000000000068 +t = 74.8000, H(p,q)-H0 = 0.0000000020151361, L(p,q)-L0 = 0.0000000000000073 +t = 74.9000, H(p,q)-H0 = 0.0000000018052410, L(p,q)-L0 = 0.0000000000000073 +t = 75.0000, H(p,q)-H0 = 0.0000000012948249, L(p,q)-L0 = 0.0000000000000078 +t = 75.1000, H(p,q)-H0 = 0.0000000001250748, L(p,q)-L0 = 0.0000000000000075 +t = 75.2000, H(p,q)-H0 = -0.0000000017463939, L(p,q)-L0 = 0.0000000000000077 +t = 75.3000, H(p,q)-H0 = -0.0000000018898960, L(p,q)-L0 = 0.0000000000000077 +t = 75.4000, H(p,q)-H0 = 0.0000000000002101, L(p,q)-L0 = 0.0000000000000074 +t = 75.5000, H(p,q)-H0 = -0.0000000019155226, L(p,q)-L0 = 0.0000000000000070 +t = 75.6000, H(p,q)-H0 = -0.0000000017140065, L(p,q)-L0 = 0.0000000000000071 +t = 75.7000, H(p,q)-H0 = 0.0000000001587277, L(p,q)-L0 = 0.0000000000000069 +t = 75.8000, H(p,q)-H0 = 0.0000000013130752, L(p,q)-L0 = 0.0000000000000067 +t = 75.9000, H(p,q)-H0 = 0.0000000018138380, L(p,q)-L0 = 0.0000000000000069 +t = 76.0000, H(p,q)-H0 = 0.0000000020191733, L(p,q)-L0 = 0.0000000000000061 +t = 76.1000, H(p,q)-H0 = 0.0000000021065129, L(p,q)-L0 = 0.0000000000000062 +t = 76.2000, H(p,q)-H0 = 0.0000000021461557, L(p,q)-L0 = 0.0000000000000064 +t = 76.3000, H(p,q)-H0 = 0.0000000021654534, L(p,q)-L0 = 0.0000000000000063 +t = 76.4000, H(p,q)-H0 = 0.0000000021754943, L(p,q)-L0 = 0.0000000000000060 +t = 76.5000, H(p,q)-H0 = 0.0000000021810461, L(p,q)-L0 = 0.0000000000000062 +t = 76.6000, H(p,q)-H0 = 0.0000000021842850, L(p,q)-L0 = 0.0000000000000062 +t = 76.7000, H(p,q)-H0 = 0.0000000021862672, L(p,q)-L0 = 0.0000000000000063 +t = 76.8000, H(p,q)-H0 = 0.0000000021875317, L(p,q)-L0 = 0.0000000000000063 +t = 76.9000, H(p,q)-H0 = 0.0000000021883689, L(p,q)-L0 = 0.0000000000000066 +t = 77.0000, H(p,q)-H0 = 0.0000000021889408, L(p,q)-L0 = 0.0000000000000064 +t = 77.1000, H(p,q)-H0 = 0.0000000021893423, L(p,q)-L0 = 0.0000000000000061 +t = 77.2000, H(p,q)-H0 = 0.0000000021896316, L(p,q)-L0 = 0.0000000000000056 +t = 77.3000, H(p,q)-H0 = 0.0000000021898447, L(p,q)-L0 = 0.0000000000000056 +t = 77.4000, H(p,q)-H0 = 0.0000000021900042, L(p,q)-L0 = 0.0000000000000053 +t = 77.5000, H(p,q)-H0 = 0.0000000021901256, L(p,q)-L0 = 0.0000000000000053 +t = 77.6000, H(p,q)-H0 = 0.0000000021902189, L(p,q)-L0 = 0.0000000000000052 +t = 77.7000, H(p,q)-H0 = 0.0000000021902914, L(p,q)-L0 = 0.0000000000000053 +t = 77.8000, H(p,q)-H0 = 0.0000000021903478, L(p,q)-L0 = 0.0000000000000050 +t = 77.9000, H(p,q)-H0 = 0.0000000021903923, L(p,q)-L0 = 0.0000000000000053 +t = 78.0000, H(p,q)-H0 = 0.0000000021904266, L(p,q)-L0 = 0.0000000000000052 +t = 78.1000, H(p,q)-H0 = 0.0000000021904533, L(p,q)-L0 = 0.0000000000000053 +t = 78.2000, H(p,q)-H0 = 0.0000000021904728, L(p,q)-L0 = 0.0000000000000051 +t = 78.3000, H(p,q)-H0 = 0.0000000021904870, L(p,q)-L0 = 0.0000000000000053 +t = 78.4000, H(p,q)-H0 = 0.0000000021904957, L(p,q)-L0 = 0.0000000000000054 +t = 78.5000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000052 +t = 78.6000, H(p,q)-H0 = 0.0000000021904992, L(p,q)-L0 = 0.0000000000000050 +t = 78.7000, H(p,q)-H0 = 0.0000000021904938, L(p,q)-L0 = 0.0000000000000047 +t = 78.8000, H(p,q)-H0 = 0.0000000021904840, L(p,q)-L0 = 0.0000000000000047 +t = 78.9000, H(p,q)-H0 = 0.0000000021904688, L(p,q)-L0 = 0.0000000000000047 +t = 79.0000, H(p,q)-H0 = 0.0000000021904476, L(p,q)-L0 = 0.0000000000000046 +t = 79.1000, H(p,q)-H0 = 0.0000000021904196, L(p,q)-L0 = 0.0000000000000048 +t = 79.2000, H(p,q)-H0 = 0.0000000021903832, L(p,q)-L0 = 0.0000000000000050 +t = 79.3000, H(p,q)-H0 = 0.0000000021903367, L(p,q)-L0 = 0.0000000000000051 +t = 79.4000, H(p,q)-H0 = 0.0000000021902768, L(p,q)-L0 = 0.0000000000000053 +t = 79.5000, H(p,q)-H0 = 0.0000000021902007, L(p,q)-L0 = 0.0000000000000060 +t = 79.6000, H(p,q)-H0 = 0.0000000021901020, L(p,q)-L0 = 0.0000000000000063 +t = 79.7000, H(p,q)-H0 = 0.0000000021899730, L(p,q)-L0 = 0.0000000000000061 +t = 79.8000, H(p,q)-H0 = 0.0000000021898033, L(p,q)-L0 = 0.0000000000000062 +t = 79.9000, H(p,q)-H0 = 0.0000000021895758, L(p,q)-L0 = 0.0000000000000064 +t = 80.0000, H(p,q)-H0 = 0.0000000021892653, L(p,q)-L0 = 0.0000000000000067 +t = 80.1000, H(p,q)-H0 = 0.0000000021888316, L(p,q)-L0 = 0.0000000000000064 +t = 80.2000, H(p,q)-H0 = 0.0000000021882118, L(p,q)-L0 = 0.0000000000000067 +t = 80.3000, H(p,q)-H0 = 0.0000000021872997, L(p,q)-L0 = 0.0000000000000069 +t = 80.4000, H(p,q)-H0 = 0.0000000021859120, L(p,q)-L0 = 0.0000000000000072 +t = 80.5000, H(p,q)-H0 = 0.0000000021837197, L(p,q)-L0 = 0.0000000000000070 +t = 80.6000, H(p,q)-H0 = 0.0000000021801069, L(p,q)-L0 = 0.0000000000000070 +t = 80.7000, H(p,q)-H0 = 0.0000000021738561, L(p,q)-L0 = 0.0000000000000070 +t = 80.8000, H(p,q)-H0 = 0.0000000021624325, L(p,q)-L0 = 0.0000000000000070 +t = 80.9000, H(p,q)-H0 = 0.0000000021402319, L(p,q)-L0 = 0.0000000000000067 +t = 81.0000, H(p,q)-H0 = 0.0000000020940939, L(p,q)-L0 = 0.0000000000000060 +t = 81.1000, H(p,q)-H0 = 0.0000000019913217, L(p,q)-L0 = 0.0000000000000072 +t = 81.2000, H(p,q)-H0 = 0.0000000017478594, L(p,q)-L0 = 0.0000000000000074 +t = 81.3000, H(p,q)-H0 = 0.0000000011560892, L(p,q)-L0 = 0.0000000000000074 +t = 81.4000, H(p,q)-H0 = -0.0000000001606268, L(p,q)-L0 = 0.0000000000000075 +t = 81.5000, H(p,q)-H0 = -0.0000000020080768, L(p,q)-L0 = 0.0000000000000075 +t = 81.6000, H(p,q)-H0 = -0.0000000015271278, L(p,q)-L0 = 0.0000000000000080 +t = 81.7000, H(p,q)-H0 = -0.0000000000970459, L(p,q)-L0 = 0.0000000000000083 +t = 81.8000, H(p,q)-H0 = -0.0000000021650761, L(p,q)-L0 = 0.0000000000000082 +t = 81.9000, H(p,q)-H0 = -0.0000000014039563, L(p,q)-L0 = 0.0000000000000080 +t = 82.0000, H(p,q)-H0 = 0.0000000004158305, L(p,q)-L0 = 0.0000000000000075 +t = 82.1000, H(p,q)-H0 = 0.0000000014310835, L(p,q)-L0 = 0.0000000000000073 +t = 82.2000, H(p,q)-H0 = 0.0000000018621674, L(p,q)-L0 = 0.0000000000000064 +t = 82.3000, H(p,q)-H0 = 0.0000000020393375, L(p,q)-L0 = 0.0000000000000067 +t = 82.4000, H(p,q)-H0 = 0.0000000021154430, L(p,q)-L0 = 0.0000000000000060 +t = 82.5000, H(p,q)-H0 = 0.0000000021503953, L(p,q)-L0 = 0.0000000000000060 +t = 82.6000, H(p,q)-H0 = 0.0000000021676080, L(p,q)-L0 = 0.0000000000000062 +t = 82.7000, H(p,q)-H0 = 0.0000000021766609, L(p,q)-L0 = 0.0000000000000068 +t = 82.8000, H(p,q)-H0 = 0.0000000021817133, L(p,q)-L0 = 0.0000000000000069 +t = 82.9000, H(p,q)-H0 = 0.0000000021846863, L(p,q)-L0 = 0.0000000000000073 +t = 83.0000, H(p,q)-H0 = 0.0000000021865191, L(p,q)-L0 = 0.0000000000000074 +t = 83.1000, H(p,q)-H0 = 0.0000000021876961, L(p,q)-L0 = 0.0000000000000075 +t = 83.2000, H(p,q)-H0 = 0.0000000021884796, L(p,q)-L0 = 0.0000000000000075 +t = 83.3000, H(p,q)-H0 = 0.0000000021890175, L(p,q)-L0 = 0.0000000000000075 +t = 83.4000, H(p,q)-H0 = 0.0000000021893970, L(p,q)-L0 = 0.0000000000000073 +t = 83.5000, H(p,q)-H0 = 0.0000000021896718, L(p,q)-L0 = 0.0000000000000075 +t = 83.6000, H(p,q)-H0 = 0.0000000021898741, L(p,q)-L0 = 0.0000000000000071 +t = 83.7000, H(p,q)-H0 = 0.0000000021900265, L(p,q)-L0 = 0.0000000000000073 +t = 83.8000, H(p,q)-H0 = 0.0000000021901427, L(p,q)-L0 = 0.0000000000000075 +t = 83.9000, H(p,q)-H0 = 0.0000000021902319, L(p,q)-L0 = 0.0000000000000072 +t = 84.0000, H(p,q)-H0 = 0.0000000021903018, L(p,q)-L0 = 0.0000000000000073 +t = 84.1000, H(p,q)-H0 = 0.0000000021903560, L(p,q)-L0 = 0.0000000000000073 +t = 84.2000, H(p,q)-H0 = 0.0000000021903984, L(p,q)-L0 = 0.0000000000000074 +t = 84.3000, H(p,q)-H0 = 0.0000000021904314, L(p,q)-L0 = 0.0000000000000074 +t = 84.4000, H(p,q)-H0 = 0.0000000021904564, L(p,q)-L0 = 0.0000000000000071 +t = 84.5000, H(p,q)-H0 = 0.0000000021904751, L(p,q)-L0 = 0.0000000000000071 +t = 84.6000, H(p,q)-H0 = 0.0000000021904882, L(p,q)-L0 = 0.0000000000000070 +t = 84.7000, H(p,q)-H0 = 0.0000000021904961, L(p,q)-L0 = 0.0000000000000067 +t = 84.8000, H(p,q)-H0 = 0.0000000021904993, L(p,q)-L0 = 0.0000000000000064 +t = 84.9000, H(p,q)-H0 = 0.0000000021904980, L(p,q)-L0 = 0.0000000000000063 +t = 85.0000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = 0.0000000000000067 +t = 85.1000, H(p,q)-H0 = 0.0000000021904816, L(p,q)-L0 = 0.0000000000000070 +t = 85.2000, H(p,q)-H0 = 0.0000000021904655, L(p,q)-L0 = 0.0000000000000068 +t = 85.3000, H(p,q)-H0 = 0.0000000021904430, L(p,q)-L0 = 0.0000000000000066 +t = 85.4000, H(p,q)-H0 = 0.0000000021904135, L(p,q)-L0 = 0.0000000000000064 +t = 85.5000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000063 +t = 85.6000, H(p,q)-H0 = 0.0000000021903267, L(p,q)-L0 = 0.0000000000000066 +t = 85.7000, H(p,q)-H0 = 0.0000000021902641, L(p,q)-L0 = 0.0000000000000064 +t = 85.8000, H(p,q)-H0 = 0.0000000021901839, L(p,q)-L0 = 0.0000000000000062 +t = 85.9000, H(p,q)-H0 = 0.0000000021900807, L(p,q)-L0 = 0.0000000000000062 +t = 86.0000, H(p,q)-H0 = 0.0000000021899460, L(p,q)-L0 = 0.0000000000000062 +t = 86.1000, H(p,q)-H0 = 0.0000000021897676, L(p,q)-L0 = 0.0000000000000062 +t = 86.2000, H(p,q)-H0 = 0.0000000021895281, L(p,q)-L0 = 0.0000000000000057 +t = 86.3000, H(p,q)-H0 = 0.0000000021892003, L(p,q)-L0 = 0.0000000000000058 +t = 86.4000, H(p,q)-H0 = 0.0000000021887415, L(p,q)-L0 = 0.0000000000000062 +t = 86.5000, H(p,q)-H0 = 0.0000000021880811, L(p,q)-L0 = 0.0000000000000058 +t = 86.6000, H(p,q)-H0 = 0.0000000021871047, L(p,q)-L0 = 0.0000000000000060 +t = 86.7000, H(p,q)-H0 = 0.0000000021856101, L(p,q)-L0 = 0.0000000000000060 +t = 86.8000, H(p,q)-H0 = 0.0000000021832333, L(p,q)-L0 = 0.0000000000000060 +t = 86.9000, H(p,q)-H0 = 0.0000000021792859, L(p,q)-L0 = 0.0000000000000061 +t = 87.0000, H(p,q)-H0 = 0.0000000021723967, L(p,q)-L0 = 0.0000000000000066 +t = 87.1000, H(p,q)-H0 = 0.0000000021596795, L(p,q)-L0 = 0.0000000000000066 +t = 87.2000, H(p,q)-H0 = 0.0000000021346939, L(p,q)-L0 = 0.0000000000000062 +t = 87.3000, H(p,q)-H0 = 0.0000000020821591, L(p,q)-L0 = 0.0000000000000060 +t = 87.4000, H(p,q)-H0 = 0.0000000019638011, L(p,q)-L0 = 0.0000000000000066 +t = 87.5000, H(p,q)-H0 = 0.0000000016811532, L(p,q)-L0 = 0.0000000000000062 +t = 87.6000, H(p,q)-H0 = 0.0000000009964631, L(p,q)-L0 = 0.0000000000000069 +t = 87.7000, H(p,q)-H0 = -0.0000000004693257, L(p,q)-L0 = 0.0000000000000071 +t = 87.8000, H(p,q)-H0 = -0.0000000022005300, L(p,q)-L0 = 0.0000000000000074 +t = 87.9000, H(p,q)-H0 = -0.0000000011032628, L(p,q)-L0 = 0.0000000000000073 +t = 88.0000, H(p,q)-H0 = -0.0000000003564984, L(p,q)-L0 = 0.0000000000000075 +t = 88.1000, H(p,q)-H0 = -0.0000000022895406, L(p,q)-L0 = 0.0000000000000075 +t = 88.2000, H(p,q)-H0 = -0.0000000010732333, L(p,q)-L0 = 0.0000000000000073 +t = 88.3000, H(p,q)-H0 = 0.0000000006458933, L(p,q)-L0 = 0.0000000000000073 +t = 88.4000, H(p,q)-H0 = 0.0000000015328927, L(p,q)-L0 = 0.0000000000000071 +t = 88.5000, H(p,q)-H0 = 0.0000000019037667, L(p,q)-L0 = 0.0000000000000063 +t = 88.6000, H(p,q)-H0 = 0.0000000020568408, L(p,q)-L0 = 0.0000000000000066 +t = 88.7000, H(p,q)-H0 = 0.0000000021232862, L(p,q)-L0 = 0.0000000000000062 +t = 88.8000, H(p,q)-H0 = 0.0000000021541653, L(p,q)-L0 = 0.0000000000000067 +t = 88.9000, H(p,q)-H0 = 0.0000000021695464, L(p,q)-L0 = 0.0000000000000066 +t = 89.0000, H(p,q)-H0 = 0.0000000021777204, L(p,q)-L0 = 0.0000000000000061 +t = 89.1000, H(p,q)-H0 = 0.0000000021823255, L(p,q)-L0 = 0.0000000000000061 +t = 89.2000, H(p,q)-H0 = 0.0000000021850579, L(p,q)-L0 = 0.0000000000000062 +t = 89.3000, H(p,q)-H0 = 0.0000000021867548, L(p,q)-L0 = 0.0000000000000067 +t = 89.4000, H(p,q)-H0 = 0.0000000021878511, L(p,q)-L0 = 0.0000000000000064 +t = 89.5000, H(p,q)-H0 = 0.0000000021885854, L(p,q)-L0 = 0.0000000000000066 +t = 89.6000, H(p,q)-H0 = 0.0000000021890915, L(p,q)-L0 = 0.0000000000000062 +t = 89.7000, H(p,q)-H0 = 0.0000000021894508, L(p,q)-L0 = 0.0000000000000064 +t = 89.8000, H(p,q)-H0 = 0.0000000021897113, L(p,q)-L0 = 0.0000000000000064 +t = 89.9000, H(p,q)-H0 = 0.0000000021899041, L(p,q)-L0 = 0.0000000000000064 +t = 90.0000, H(p,q)-H0 = 0.0000000021900493, L(p,q)-L0 = 0.0000000000000062 +t = 90.1000, H(p,q)-H0 = 0.0000000021901603, L(p,q)-L0 = 0.0000000000000066 +t = 90.2000, H(p,q)-H0 = 0.0000000021902459, L(p,q)-L0 = 0.0000000000000063 +t = 90.3000, H(p,q)-H0 = 0.0000000021903125, L(p,q)-L0 = 0.0000000000000061 +t = 90.4000, H(p,q)-H0 = 0.0000000021903648, L(p,q)-L0 = 0.0000000000000061 +t = 90.5000, H(p,q)-H0 = 0.0000000021904051, L(p,q)-L0 = 0.0000000000000057 +t = 90.6000, H(p,q)-H0 = 0.0000000021904369, L(p,q)-L0 = 0.0000000000000060 +t = 90.7000, H(p,q)-H0 = 0.0000000021904610, L(p,q)-L0 = 0.0000000000000059 +t = 90.8000, H(p,q)-H0 = 0.0000000021904785, L(p,q)-L0 = 0.0000000000000057 +t = 90.9000, H(p,q)-H0 = 0.0000000021904907, L(p,q)-L0 = 0.0000000000000058 +t = 91.0000, H(p,q)-H0 = 0.0000000021904982, L(p,q)-L0 = 0.0000000000000062 +t = 91.1000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = 0.0000000000000064 +t = 91.2000, H(p,q)-H0 = 0.0000000021904987, L(p,q)-L0 = 0.0000000000000062 +t = 91.3000, H(p,q)-H0 = 0.0000000021904919, L(p,q)-L0 = 0.0000000000000062 +t = 91.4000, H(p,q)-H0 = 0.0000000021904804, L(p,q)-L0 = 0.0000000000000062 +t = 91.5000, H(p,q)-H0 = 0.0000000021904631, L(p,q)-L0 = 0.0000000000000060 +t = 91.6000, H(p,q)-H0 = 0.0000000021904401, L(p,q)-L0 = 0.0000000000000066 +t = 91.7000, H(p,q)-H0 = 0.0000000021904093, L(p,q)-L0 = 0.0000000000000064 +t = 91.8000, H(p,q)-H0 = 0.0000000021903700, L(p,q)-L0 = 0.0000000000000070 +t = 91.9000, H(p,q)-H0 = 0.0000000021903192, L(p,q)-L0 = 0.0000000000000070 +t = 92.0000, H(p,q)-H0 = 0.0000000021902540, L(p,q)-L0 = 0.0000000000000068 +t = 92.1000, H(p,q)-H0 = 0.0000000021901703, L(p,q)-L0 = 0.0000000000000064 +t = 92.2000, H(p,q)-H0 = 0.0000000021900621, L(p,q)-L0 = 0.0000000000000060 +t = 92.3000, H(p,q)-H0 = 0.0000000021899208, L(p,q)-L0 = 0.0000000000000058 +t = 92.4000, H(p,q)-H0 = 0.0000000021897337, L(p,q)-L0 = 0.0000000000000056 +t = 92.5000, H(p,q)-H0 = 0.0000000021894817, L(p,q)-L0 = 0.0000000000000056 +t = 92.6000, H(p,q)-H0 = 0.0000000021891347, L(p,q)-L0 = 0.0000000000000049 +t = 92.7000, H(p,q)-H0 = 0.0000000021886470, L(p,q)-L0 = 0.0000000000000047 +t = 92.8000, H(p,q)-H0 = 0.0000000021879436, L(p,q)-L0 = 0.0000000000000051 +t = 92.9000, H(p,q)-H0 = 0.0000000021868976, L(p,q)-L0 = 0.0000000000000054 +t = 93.0000, H(p,q)-H0 = 0.0000000021852867, L(p,q)-L0 = 0.0000000000000056 +t = 93.1000, H(p,q)-H0 = 0.0000000021827063, L(p,q)-L0 = 0.0000000000000053 +t = 93.2000, H(p,q)-H0 = 0.0000000021783869, L(p,q)-L0 = 0.0000000000000056 +t = 93.3000, H(p,q)-H0 = 0.0000000021707803, L(p,q)-L0 = 0.0000000000000056 +t = 93.4000, H(p,q)-H0 = 0.0000000021565990, L(p,q)-L0 = 0.0000000000000059 +t = 93.5000, H(p,q)-H0 = 0.0000000021284249, L(p,q)-L0 = 0.0000000000000057 +t = 93.6000, H(p,q)-H0 = 0.0000000020684887, L(p,q)-L0 = 0.0000000000000062 +t = 93.7000, H(p,q)-H0 = 0.0000000019319482, L(p,q)-L0 = 0.0000000000000066 +t = 93.8000, H(p,q)-H0 = 0.0000000016036170, L(p,q)-L0 = 0.0000000000000066 +t = 93.9000, H(p,q)-H0 = 0.0000000008137360, L(p,q)-L0 = 0.0000000000000066 +t = 94.0000, H(p,q)-H0 = -0.0000000007952332, L(p,q)-L0 = 0.0000000000000069 +t = 94.1000, H(p,q)-H0 = -0.0000000022989144, L(p,q)-L0 = 0.0000000000000069 +t = 94.2000, H(p,q)-H0 = -0.0000000006765102, L(p,q)-L0 = 0.0000000000000072 +t = 94.3000, H(p,q)-H0 = -0.0000000007326133, L(p,q)-L0 = 0.0000000000000073 +t = 94.4000, H(p,q)-H0 = -0.0000000022880635, L(p,q)-L0 = 0.0000000000000074 +t = 94.5000, H(p,q)-H0 = -0.0000000007392544, L(p,q)-L0 = 0.0000000000000073 +t = 94.6000, H(p,q)-H0 = 0.0000000008495653, L(p,q)-L0 = 0.0000000000000071 +t = 94.7000, H(p,q)-H0 = 0.0000000016205666, L(p,q)-L0 = 0.0000000000000070 +t = 94.8000, H(p,q)-H0 = 0.0000000019396070, L(p,q)-L0 = 0.0000000000000075 +t = 94.9000, H(p,q)-H0 = 0.0000000020720623, L(p,q)-L0 = 0.0000000000000071 +t = 95.0000, H(p,q)-H0 = 0.0000000021301885, L(p,q)-L0 = 0.0000000000000073 +t = 95.1000, H(p,q)-H0 = 0.0000000021575211, L(p,q)-L0 = 0.0000000000000068 +t = 95.2000, H(p,q)-H0 = 0.0000000021712909, L(p,q)-L0 = 0.0000000000000067 +t = 95.3000, H(p,q)-H0 = 0.0000000021786840, L(p,q)-L0 = 0.0000000000000063 +t = 95.4000, H(p,q)-H0 = 0.0000000021828877, L(p,q)-L0 = 0.0000000000000064 +t = 95.5000, H(p,q)-H0 = 0.0000000021854019, L(p,q)-L0 = 0.0000000000000068 +t = 95.6000, H(p,q)-H0 = 0.0000000021869742, L(p,q)-L0 = 0.0000000000000069 +t = 95.7000, H(p,q)-H0 = 0.0000000021879971, L(p,q)-L0 = 0.0000000000000070 +t = 95.8000, H(p,q)-H0 = 0.0000000021886853, L(p,q)-L0 = 0.0000000000000073 +t = 95.9000, H(p,q)-H0 = 0.0000000021891625, L(p,q)-L0 = 0.0000000000000073 +t = 96.0000, H(p,q)-H0 = 0.0000000021895025, L(p,q)-L0 = 0.0000000000000073 +t = 96.1000, H(p,q)-H0 = 0.0000000021897497, L(p,q)-L0 = 0.0000000000000072 +t = 96.2000, H(p,q)-H0 = 0.0000000021899338, L(p,q)-L0 = 0.0000000000000071 +t = 96.3000, H(p,q)-H0 = 0.0000000021900726, L(p,q)-L0 = 0.0000000000000072 +t = 96.4000, H(p,q)-H0 = 0.0000000021901789, L(p,q)-L0 = 0.0000000000000075 +t = 96.5000, H(p,q)-H0 = 0.0000000021902609, L(p,q)-L0 = 0.0000000000000072 +t = 96.6000, H(p,q)-H0 = 0.0000000021903250, L(p,q)-L0 = 0.0000000000000072 +t = 96.7000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000070 +t = 96.8000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000068 +t = 96.9000, H(p,q)-H0 = 0.0000000021904440, L(p,q)-L0 = 0.0000000000000064 +t = 97.0000, H(p,q)-H0 = 0.0000000021904670, L(p,q)-L0 = 0.0000000000000064 +t = 97.1000, H(p,q)-H0 = 0.0000000021904837, L(p,q)-L0 = 0.0000000000000063 +t = 97.2000, H(p,q)-H0 = 0.0000000021904951, L(p,q)-L0 = 0.0000000000000066 +t = 97.3000, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = 0.0000000000000062 +t = 97.4000, H(p,q)-H0 = 0.0000000021905035, L(p,q)-L0 = 0.0000000000000069 +t = 97.5000, H(p,q)-H0 = 0.0000000021905008, L(p,q)-L0 = 0.0000000000000071 +t = 97.6000, H(p,q)-H0 = 0.0000000021904931, L(p,q)-L0 = 0.0000000000000069 +t = 97.7000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000071 +t = 97.8000, H(p,q)-H0 = 0.0000000021904627, L(p,q)-L0 = 0.0000000000000070 +t = 97.9000, H(p,q)-H0 = 0.0000000021904382, L(p,q)-L0 = 0.0000000000000070 +t = 98.0000, H(p,q)-H0 = 0.0000000021904062, L(p,q)-L0 = 0.0000000000000070 +t = 98.1000, H(p,q)-H0 = 0.0000000021903646, L(p,q)-L0 = 0.0000000000000066 +t = 98.2000, H(p,q)-H0 = 0.0000000021903119, L(p,q)-L0 = 0.0000000000000068 +t = 98.3000, H(p,q)-H0 = 0.0000000021902442, L(p,q)-L0 = 0.0000000000000070 +t = 98.4000, H(p,q)-H0 = 0.0000000021901572, L(p,q)-L0 = 0.0000000000000069 +t = 98.5000, H(p,q)-H0 = 0.0000000021900445, L(p,q)-L0 = 0.0000000000000070 +t = 98.6000, H(p,q)-H0 = 0.0000000021898964, L(p,q)-L0 = 0.0000000000000068 +t = 98.7000, H(p,q)-H0 = 0.0000000021897003, L(p,q)-L0 = 0.0000000000000070 +t = 98.8000, H(p,q)-H0 = 0.0000000021894348, L(p,q)-L0 = 0.0000000000000071 +t = 98.9000, H(p,q)-H0 = 0.0000000021890686, L(p,q)-L0 = 0.0000000000000071 +t = 99.0000, H(p,q)-H0 = 0.0000000021885515, L(p,q)-L0 = 0.0000000000000070 +t = 99.1000, H(p,q)-H0 = 0.0000000021878013, L(p,q)-L0 = 0.0000000000000070 +t = 99.2000, H(p,q)-H0 = 0.0000000021866788, L(p,q)-L0 = 0.0000000000000071 +t = 99.3000, H(p,q)-H0 = 0.0000000021849398, L(p,q)-L0 = 0.0000000000000071 +t = 99.4000, H(p,q)-H0 = 0.0000000021821350, L(p,q)-L0 = 0.0000000000000070 +t = 99.5000, H(p,q)-H0 = 0.0000000021774016, L(p,q)-L0 = 0.0000000000000068 +t = 99.6000, H(p,q)-H0 = 0.0000000021689899, L(p,q)-L0 = 0.0000000000000067 +t = 99.7000, H(p,q)-H0 = 0.0000000021531459, L(p,q)-L0 = 0.0000000000000064 +t = 99.8000, H(p,q)-H0 = 0.0000000021213139, L(p,q)-L0 = 0.0000000000000060 +t = 99.9000, H(p,q)-H0 = 0.0000000020527962, L(p,q)-L0 = 0.0000000000000059 +t = 100.0000, H(p,q)-H0 = 0.0000000018950277, L(p,q)-L0 = 0.0000000000000062 +Current time = 99.99999999999859 +Steps = 10000 +Step attempts = 10000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.01 +Last step size = 0.009999999999948264 +Current step size = 0.009999999999948264 +f1 RHS fn evals = 40001 +f2 RHS fn evals = 40001 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out new file mode 100644 index 0000000000..6e0afcf2e3 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out @@ -0,0 +1,1029 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 1 + use compensated sums: 0 + dt: 0.01 + Tf: 100 + nout: 1000 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 0.1000, H(p,q)-H0 = -0.0000062696796468, L(p,q)-L0 = -0.0000005429998904 +t = 0.2000, H(p,q)-H0 = -0.0001135927952709, L(p,q)-L0 = -0.0000114072371575 +t = 0.3000, H(p,q)-H0 = -0.0001759285155116, L(p,q)-L0 = -0.0000192792884657 +t = 0.4000, H(p,q)-H0 = -0.0002002869125659, L(p,q)-L0 = -0.0000226250387698 +t = 0.5000, H(p,q)-H0 = -0.0002010782201837, L(p,q)-L0 = -0.0000226897917929 +t = 0.6000, H(p,q)-H0 = -0.0002056527160148, L(p,q)-L0 = -0.0000231381327631 +t = 0.7000, H(p,q)-H0 = -0.0002078783396466, L(p,q)-L0 = -0.0000233154338760 +t = 0.8000, H(p,q)-H0 = -0.0002090364664149, L(p,q)-L0 = -0.0000233933147147 +t = 0.9000, H(p,q)-H0 = -0.0002096714693198, L(p,q)-L0 = -0.0000234308138786 +t = 1.0000, H(p,q)-H0 = -0.0002100355398247, L(p,q)-L0 = -0.0000234503491130 +t = 1.1000, H(p,q)-H0 = -0.0002102526487975, L(p,q)-L0 = -0.0000234612354948 +t = 1.2000, H(p,q)-H0 = -0.0002103867255953, L(p,q)-L0 = -0.0000234676638518 +t = 1.3000, H(p,q)-H0 = -0.0002104721456131, L(p,q)-L0 = -0.0000234716549572 +t = 1.4000, H(p,q)-H0 = -0.0002105281006790, L(p,q)-L0 = -0.0000234742438319 +t = 1.5000, H(p,q)-H0 = -0.0002105656766314, L(p,q)-L0 = -0.0000234759892890 +t = 1.6000, H(p,q)-H0 = -0.0002105914779699, L(p,q)-L0 = -0.0000234772073124 +t = 1.7000, H(p,q)-H0 = -0.0002106095513844, L(p,q)-L0 = -0.0000234780840148 +t = 1.8000, H(p,q)-H0 = -0.0002106224404057, L(p,q)-L0 = -0.0000234787330590 +t = 1.9000, H(p,q)-H0 = -0.0002106317812685, L(p,q)-L0 = -0.0000234792261447 +t = 2.0000, H(p,q)-H0 = -0.0002106386489813, L(p,q)-L0 = -0.0000234796098375 +t = 2.1000, H(p,q)-H0 = -0.0002106437634820, L(p,q)-L0 = -0.0000234799151920 +t = 2.2000, H(p,q)-H0 = -0.0002106476153432, L(p,q)-L0 = -0.0000234801634272 +t = 2.3000, H(p,q)-H0 = -0.0002106505440783, L(p,q)-L0 = -0.0000234803693731 +t = 2.4000, H(p,q)-H0 = -0.0002106527878885, L(p,q)-L0 = -0.0000234805436206 +t = 2.5000, H(p,q)-H0 = -0.0002106545158288, L(p,q)-L0 = -0.0000234806938915 +t = 2.6000, H(p,q)-H0 = -0.0002106558489441, L(p,q)-L0 = -0.0000234808259383 +t = 2.7000, H(p,q)-H0 = -0.0002106568743364, L(p,q)-L0 = -0.0000234809441408 +t = 2.8000, H(p,q)-H0 = -0.0002106576546294, L(p,q)-L0 = -0.0000234810519173 +t = 2.9000, H(p,q)-H0 = -0.0002106582343624, L(p,q)-L0 = -0.0000234811520122 +t = 3.0000, H(p,q)-H0 = -0.0002106586442909, L(p,q)-L0 = -0.0000234812467022 +t = 3.1000, H(p,q)-H0 = -0.0002106589042116, L(p,q)-L0 = -0.0000234813379530 +t = 3.2000, H(p,q)-H0 = -0.0002106590246974, L(p,q)-L0 = -0.0000234814275419 +t = 3.3000, H(p,q)-H0 = -0.0002106590079697, L(p,q)-L0 = -0.0000234815171618 +t = 3.4000, H(p,q)-H0 = -0.0002106588480201, L(p,q)-L0 = -0.0000234816085181 +t = 3.5000, H(p,q)-H0 = -0.0002106585299889, L(p,q)-L0 = -0.0000234817034248 +t = 3.6000, H(p,q)-H0 = -0.0002106580287222, L(p,q)-L0 = -0.0000234818039164 +t = 3.7000, H(p,q)-H0 = -0.0002106573063074, L(p,q)-L0 = -0.0000234819123797 +t = 3.8000, H(p,q)-H0 = -0.0002106563082501, L(p,q)-L0 = -0.0000234820317282 +t = 3.9000, H(p,q)-H0 = -0.0002106549577361, L(p,q)-L0 = -0.0000234821656365 +t = 4.0000, H(p,q)-H0 = -0.0002106531471080, L(p,q)-L0 = -0.0000234823188732 +t = 4.1000, H(p,q)-H0 = -0.0002106507251770, L(p,q)-L0 = -0.0000234824977813 +t = 4.2000, H(p,q)-H0 = -0.0002106474781862, L(p,q)-L0 = -0.0000234827109934 +t = 4.3000, H(p,q)-H0 = -0.0002106431009092, L(p,q)-L0 = -0.0000234829705201 +t = 4.4000, H(p,q)-H0 = -0.0002106371521462, L(p,q)-L0 = -0.0000234832934438 +t = 4.5000, H(p,q)-H0 = -0.0002106289850994, L(p,q)-L0 = -0.0000234837046210 +t = 4.6000, H(p,q)-H0 = -0.0002106176365483, L(p,q)-L0 = -0.0000234842411053 +t = 4.7000, H(p,q)-H0 = -0.0002106016471730, L(p,q)-L0 = -0.0000234849595961 +t = 4.8000, H(p,q)-H0 = -0.0002105787645791, L(p,q)-L0 = -0.0000234859493718 +t = 4.9000, H(p,q)-H0 = -0.0002105454426794, L(p,q)-L0 = -0.0000234873555242 +t = 5.0000, H(p,q)-H0 = -0.0002104959812197, L(p,q)-L0 = -0.0000234894223092 +t = 5.1000, H(p,q)-H0 = -0.0002104210202308, L(p,q)-L0 = -0.0000234925775160 +t = 5.2000, H(p,q)-H0 = -0.0002103048702212, L(p,q)-L0 = -0.0000234976045969 +t = 5.3000, H(p,q)-H0 = -0.0002101207619831, L(p,q)-L0 = -0.0000235060130325 +t = 5.4000, H(p,q)-H0 = -0.0002098225630768, L(p,q)-L0 = -0.0000235208843751 +t = 5.5000, H(p,q)-H0 = -0.0002093314638612, L(p,q)-L0 = -0.0000235489396382 +t = 5.6000, H(p,q)-H0 = -0.0002085202913832, L(p,q)-L0 = -0.0000236059866302 +t = 5.7000, H(p,q)-H0 = -0.0002072234833019, L(p,q)-L0 = -0.0000237325104756 +t = 5.8000, H(p,q)-H0 = -0.0002054116656489, L(p,q)-L0 = -0.0000240423246145 +t = 5.9000, H(p,q)-H0 = -0.0002040036888862, L(p,q)-L0 = -0.0000248869028331 +t = 6.0000, H(p,q)-H0 = -0.0002066492483566, L(p,q)-L0 = -0.0000274341568969 +t = 6.1000, H(p,q)-H0 = -0.0002146405945813, L(p,q)-L0 = -0.0000355555994543 +t = 6.2000, H(p,q)-H0 = -0.0002169176332283, L(p,q)-L0 = -0.0000596238468652 +t = 6.3000, H(p,q)-H0 = -0.0004117452639090, L(p,q)-L0 = -0.0001107536901481 +t = 6.4000, H(p,q)-H0 = -0.0008766427360893, L(p,q)-L0 = -0.0001668008722370 +t = 6.5000, H(p,q)-H0 = -0.0010430569247366, L(p,q)-L0 = -0.0001854585430967 +t = 6.6000, H(p,q)-H0 = -0.0010546535311935, L(p,q)-L0 = -0.0001867028107823 +t = 6.7000, H(p,q)-H0 = -0.0010774137233291, L(p,q)-L0 = -0.0001898389637827 +t = 6.8000, H(p,q)-H0 = -0.0010861348047309, L(p,q)-L0 = -0.0001908581053202 +t = 6.9000, H(p,q)-H0 = -0.0010900605315678, L(p,q)-L0 = -0.0001912266174271 +t = 7.0000, H(p,q)-H0 = -0.0010920005408979, L(p,q)-L0 = -0.0001913757210377 +t = 7.1000, H(p,q)-H0 = -0.0010930217358297, L(p,q)-L0 = -0.0001914425565277 +t = 7.2000, H(p,q)-H0 = -0.0010935870793521, L(p,q)-L0 = -0.0001914753045394 +t = 7.3000, H(p,q)-H0 = -0.0010939139594537, L(p,q)-L0 = -0.0001914926220660 +t = 7.4000, H(p,q)-H0 = -0.0010941103567657, L(p,q)-L0 = -0.0001915023977180 +t = 7.5000, H(p,q)-H0 = -0.0010942324552590, L(p,q)-L0 = -0.0001915082350198 +t = 7.6000, H(p,q)-H0 = -0.0010943107083297, L(p,q)-L0 = -0.0001915118947599 +t = 7.7000, H(p,q)-H0 = -0.0010943622417681, L(p,q)-L0 = -0.0001915142893028 +t = 7.8000, H(p,q)-H0 = -0.0010943970132706, L(p,q)-L0 = -0.0001915159162691 +t = 7.9000, H(p,q)-H0 = -0.0010944209907731, L(p,q)-L0 = -0.0001915170595739 +t = 8.0000, H(p,q)-H0 = -0.0010944378508272, L(p,q)-L0 = -0.0001915178877776 +t = 8.1000, H(p,q)-H0 = -0.0010944499157366, L(p,q)-L0 = -0.0001915185045589 +t = 8.2000, H(p,q)-H0 = -0.0010944586861276, L(p,q)-L0 = -0.0001915189757391 +t = 8.3000, H(p,q)-H0 = -0.0010944651519293, L(p,q)-L0 = -0.0001915193443178 +t = 8.4000, H(p,q)-H0 = -0.0010944699785398, L(p,q)-L0 = -0.0001915196391242 +t = 8.5000, H(p,q)-H0 = -0.0010944736208596, L(p,q)-L0 = -0.0001915198799560 +t = 8.6000, H(p,q)-H0 = -0.0010944763946228, L(p,q)-L0 = -0.0001915200807163 +t = 8.7000, H(p,q)-H0 = -0.0010944785218818, L(p,q)-L0 = -0.0001915202513803 +t = 8.8000, H(p,q)-H0 = -0.0010944801605186, L(p,q)-L0 = -0.0001915203992561 +t = 8.9000, H(p,q)-H0 = -0.0010944814236866, L(p,q)-L0 = -0.0001915205298145 +t = 9.0000, H(p,q)-H0 = -0.0010944823927834, L(p,q)-L0 = -0.0001915206472463 +t = 9.1000, H(p,q)-H0 = -0.0010944831261832, L(p,q)-L0 = -0.0001915207548424 +t = 9.2000, H(p,q)-H0 = -0.0010944836651313, L(p,q)-L0 = -0.0001915208552671 +t = 9.3000, H(p,q)-H0 = -0.0010944840376905, L(p,q)-L0 = -0.0001915209507526 +t = 9.4000, H(p,q)-H0 = -0.0010944842612949, L(p,q)-L0 = -0.0001915210432497 +t = 9.5000, H(p,q)-H0 = -0.0010944843442663, L(p,q)-L0 = -0.0001915211345465 +t = 9.6000, H(p,q)-H0 = -0.0010944842864822, L(p,q)-L0 = -0.0001915212263734 +t = 9.7000, H(p,q)-H0 = -0.0010944840792847, L(p,q)-L0 = -0.0001915213205018 +t = 9.8000, H(p,q)-H0 = -0.0010944837046116, L(p,q)-L0 = -0.0001915214188469 +t = 9.9000, H(p,q)-H0 = -0.0010944831332337, L(p,q)-L0 = -0.0001915215235870 +t = 10.0000, H(p,q)-H0 = -0.0010944823218577, L(p,q)-L0 = -0.0001915216373113 +t = 10.1000, H(p,q)-H0 = -0.0010944812086856, L(p,q)-L0 = -0.0001915217632142 +t = 10.2000, H(p,q)-H0 = -0.0010944797067785, L(p,q)-L0 = -0.0001915219053650 +t = 10.3000, H(p,q)-H0 = -0.0010944776941881, L(p,q)-L0 = -0.0001915220690886 +t = 10.4000, H(p,q)-H0 = -0.0010944749992298, L(p,q)-L0 = -0.0001915222615247 +t = 10.5000, H(p,q)-H0 = -0.0010944713782886, L(p,q)-L0 = -0.0001915224924662 +t = 10.6000, H(p,q)-H0 = -0.0010944664819517, L(p,q)-L0 = -0.0001915227756430 +t = 10.7000, H(p,q)-H0 = -0.0010944598025584, L(p,q)-L0 = -0.0001915231307398 +t = 10.8000, H(p,q)-H0 = -0.0010944505916284, L(p,q)-L0 = -0.0001915235866442 +t = 10.9000, H(p,q)-H0 = -0.0010944377275457, L(p,q)-L0 = -0.0001915241868180 +t = 11.0000, H(p,q)-H0 = -0.0010944194995262, L(p,q)-L0 = -0.0001915249984384 +t = 11.1000, H(p,q)-H0 = -0.0010943932479631, L(p,q)-L0 = -0.0001915261284662 +t = 11.2000, H(p,q)-H0 = -0.0010943547537499, L(p,q)-L0 = -0.0001915277529010 +t = 11.3000, H(p,q)-H0 = -0.0010942971814794, L(p,q)-L0 = -0.0001915301721849 +t = 11.4000, H(p,q)-H0 = -0.0010942092200645, L(p,q)-L0 = -0.0001915339208459 +t = 11.5000, H(p,q)-H0 = -0.0010940717765956, L(p,q)-L0 = -0.0001915399954439 +t = 11.6000, H(p,q)-H0 = -0.0010938521164288, L(p,q)-L0 = -0.0001915503555203 +t = 11.7000, H(p,q)-H0 = -0.0010934938446772, L(p,q)-L0 = -0.0001915690955830 +t = 11.8000, H(p,q)-H0 = -0.0010929018695994, L(p,q)-L0 = -0.0001916053866893 +t = 11.9000, H(p,q)-H0 = -0.0010919301339142, L(p,q)-L0 = -0.0001916814602209 +t = 12.0000, H(p,q)-H0 = -0.0010904250859533, L(p,q)-L0 = -0.0001918561922067 +t = 12.1000, H(p,q)-H0 = -0.0010885553641629, L(p,q)-L0 = -0.0001923010000755 +t = 12.2000, H(p,q)-H0 = -0.0010880452291475, L(p,q)-L0 = -0.0001935618958890 +t = 12.3000, H(p,q)-H0 = -0.0010933477301296, L(p,q)-L0 = -0.0001974749970777 +t = 12.4000, H(p,q)-H0 = -0.0010988839970971, L(p,q)-L0 = -0.0002098677980509 +t = 12.5000, H(p,q)-H0 = -0.0011269529114526, L(p,q)-L0 = -0.0002435572977308 +t = 12.6000, H(p,q)-H0 = -0.0014674817932647, L(p,q)-L0 = -0.0003014305068376 +t = 12.7000, H(p,q)-H0 = -0.0018211687157268, L(p,q)-L0 = -0.0003411270398648 +t = 12.8000, H(p,q)-H0 = -0.0018291083670114, L(p,q)-L0 = -0.0003417679657713 +t = 12.9000, H(p,q)-H0 = -0.0018329503623904, L(p,q)-L0 = -0.0003421547651702 +t = 13.0000, H(p,q)-H0 = -0.0018485323457278, L(p,q)-L0 = -0.0003442038229382 +t = 13.1000, H(p,q)-H0 = -0.0018549362001028, L(p,q)-L0 = -0.0003448950974303 +t = 13.2000, H(p,q)-H0 = -0.0018579364174628, L(p,q)-L0 = -0.0003451559459211 +t = 13.3000, H(p,q)-H0 = -0.0018594573893078, L(p,q)-L0 = -0.0003452657716745 +t = 13.4000, H(p,q)-H0 = -0.0018602739306338, L(p,q)-L0 = -0.0003453167475367 +t = 13.5000, H(p,q)-H0 = -0.0018607336182570, L(p,q)-L0 = -0.0003453424840643 +t = 13.6000, H(p,q)-H0 = -0.0018610033607634, L(p,q)-L0 = -0.0003453564475209 +t = 13.7000, H(p,q)-H0 = -0.0018611675684923, L(p,q)-L0 = -0.0003453645057516 +t = 13.8000, H(p,q)-H0 = -0.0018612708551833, L(p,q)-L0 = -0.0003453694105353 +t = 13.9000, H(p,q)-H0 = -0.0018613377455846, L(p,q)-L0 = -0.0003453725375925 +t = 14.0000, H(p,q)-H0 = -0.0018613822084146, L(p,q)-L0 = -0.0003453746141515 +t = 14.1000, H(p,q)-H0 = -0.0018614124602533, L(p,q)-L0 = -0.0003453760438756 +t = 14.2000, H(p,q)-H0 = -0.0018614334775717, L(p,q)-L0 = -0.0003453770606663 +t = 14.3000, H(p,q)-H0 = -0.0018614483555500, L(p,q)-L0 = -0.0003453778053157 +t = 14.4000, H(p,q)-H0 = -0.0018614590663113, L(p,q)-L0 = -0.0003453783654941 +t = 14.5000, H(p,q)-H0 = -0.0018614668942953, L(p,q)-L0 = -0.0003453787974823 +t = 14.6000, H(p,q)-H0 = -0.0018614726929026, L(p,q)-L0 = -0.0003453791384194 +t = 14.7000, H(p,q)-H0 = -0.0018614770394814, L(p,q)-L0 = -0.0003453794134385 +t = 14.8000, H(p,q)-H0 = -0.0018614803310230, L(p,q)-L0 = -0.0003453796399498 +t = 14.9000, H(p,q)-H0 = -0.0018614828444614, L(p,q)-L0 = -0.0003453798302816 +t = 15.0000, H(p,q)-H0 = -0.0018614847753803, L(p,q)-L0 = -0.0003453799933509 +t = 15.1000, H(p,q)-H0 = -0.0018614862632728, L(p,q)-L0 = -0.0003453801357464 +t = 15.2000, H(p,q)-H0 = -0.0018614874082644, L(p,q)-L0 = -0.0003453802624437 +t = 15.3000, H(p,q)-H0 = -0.0018614882823109, L(p,q)-L0 = -0.0003453803772917 +t = 15.4000, H(p,q)-H0 = -0.0018614889367469, L(p,q)-L0 = -0.0003453804833496 +t = 15.5000, H(p,q)-H0 = -0.0018614894073659, L(p,q)-L0 = -0.0003453805831282 +t = 15.6000, H(p,q)-H0 = -0.0018614897177854, L(p,q)-L0 = -0.0003453806787665 +t = 15.7000, H(p,q)-H0 = -0.0018614898815636, L(p,q)-L0 = -0.0003453807721731 +t = 15.8000, H(p,q)-H0 = -0.0018614899033522, L(p,q)-L0 = -0.0003453808651371 +t = 15.9000, H(p,q)-H0 = -0.0018614897792327, L(p,q)-L0 = -0.0003453809594340 +t = 16.0000, H(p,q)-H0 = -0.0018614894962796, L(p,q)-L0 = -0.0003453810569265 +t = 16.1000, H(p,q)-H0 = -0.0018614890312849, L(p,q)-L0 = -0.0003453811596765 +t = 16.2000, H(p,q)-H0 = -0.0018614883484740, L(p,q)-L0 = -0.0003453812700795 +t = 16.3000, H(p,q)-H0 = -0.0018614873958954, L(p,q)-L0 = -0.0003453813910341 +t = 16.4000, H(p,q)-H0 = -0.0018614860999633, L(p,q)-L0 = -0.0003453815261732 +t = 16.5000, H(p,q)-H0 = -0.0018614843573266, L(p,q)-L0 = -0.0003453816801865 +t = 16.6000, H(p,q)-H0 = -0.0018614820227592, L(p,q)-L0 = -0.0003453818592847 +t = 16.7000, H(p,q)-H0 = -0.0018614788909996, L(p,q)-L0 = -0.0003453820718907 +t = 16.8000, H(p,q)-H0 = -0.0018614746692118, L(p,q)-L0 = -0.0003453823296833 +t = 16.9000, H(p,q)-H0 = -0.0018614689346489, L(p,q)-L0 = -0.0003453826492192 +t = 17.0000, H(p,q)-H0 = -0.0018614610685390, L(p,q)-L0 = -0.0003453830545128 +t = 17.1000, H(p,q)-H0 = -0.0018614501510690, L(p,q)-L0 = -0.0003453835812437 +t = 17.2000, H(p,q)-H0 = -0.0018614347914931, L(p,q)-L0 = -0.0003453842838139 +t = 17.3000, H(p,q)-H0 = -0.0018614128479901, L(p,q)-L0 = -0.0003453852475582 +t = 17.4000, H(p,q)-H0 = -0.0018613809565386, L(p,q)-L0 = -0.0003453866105798 +t = 17.5000, H(p,q)-H0 = -0.0018613337230237, L(p,q)-L0 = -0.0003453886042962 +t = 17.6000, H(p,q)-H0 = -0.0018612623126402, L(p,q)-L0 = -0.0003453916319220 +t = 17.7000, H(p,q)-H0 = -0.0018611519521051, L(p,q)-L0 = -0.0003453964276342 +t = 17.8000, H(p,q)-H0 = -0.0018609774852931, L(p,q)-L0 = -0.0003454043967241 +t = 17.9000, H(p,q)-H0 = -0.0018606955942646, L(p,q)-L0 = -0.0003454183867333 +t = 18.0000, H(p,q)-H0 = -0.0018602321179333, L(p,q)-L0 = -0.0003454445557470 +t = 18.1000, H(p,q)-H0 = -0.0018594661508811, L(p,q)-L0 = -0.0003454972484257 +t = 18.2000, H(p,q)-H0 = -0.0018582336849553, L(p,q)-L0 = -0.0003456128075078 +t = 18.3000, H(p,q)-H0 = -0.0018564683218352, L(p,q)-L0 = -0.0003458922196216 +t = 18.4000, H(p,q)-H0 = -0.0018548998635801, L(p,q)-L0 = -0.0003466438794800 +t = 18.5000, H(p,q)-H0 = -0.0018568018450045, L(p,q)-L0 = -0.0003488852532501 +t = 18.6000, H(p,q)-H0 = -0.0018647475749838, L(p,q)-L0 = -0.0003560090162371 +t = 18.7000, H(p,q)-H0 = -0.0018656959644174, L(p,q)-L0 = -0.0003774915058423 +t = 18.8000, H(p,q)-H0 = -0.0020182282358414, L(p,q)-L0 = -0.0004256800568112 +t = 18.9000, H(p,q)-H0 = -0.0024790485475783, L(p,q)-L0 = -0.0004833354961167 +t = 19.0000, H(p,q)-H0 = -0.0026441750612420, L(p,q)-L0 = -0.0005013384015580 +t = 19.1000, H(p,q)-H0 = -0.0026602892625991, L(p,q)-L0 = -0.0005030841819079 +t = 19.2000, H(p,q)-H0 = -0.0026861432928482, L(p,q)-L0 = -0.0005066833196889 +t = 19.3000, H(p,q)-H0 = -0.0026958120873084, L(p,q)-L0 = -0.0005078422742242 +t = 19.4000, H(p,q)-H0 = -0.0027001015531652, L(p,q)-L0 = -0.0005082562701093 +t = 19.5000, H(p,q)-H0 = -0.0027022025689444, L(p,q)-L0 = -0.0005084218084530 +t = 19.6000, H(p,q)-H0 = -0.0027033013086656, L(p,q)-L0 = -0.0005084952385246 +t = 19.7000, H(p,q)-H0 = -0.0027039062867852, L(p,q)-L0 = -0.0005085308966847 +t = 19.8000, H(p,q)-H0 = -0.0027042544314777, L(p,q)-L0 = -0.0005085496103345 +t = 19.9000, H(p,q)-H0 = -0.0027044627302788, L(p,q)-L0 = -0.0005085601062749 +t = 20.0000, H(p,q)-H0 = -0.0027045917457975, L(p,q)-L0 = -0.0005085663394765 +t = 20.1000, H(p,q)-H0 = -0.0027046741573683, L(p,q)-L0 = -0.0005085702292218 +t = 20.2000, H(p,q)-H0 = -0.0027047282681847, L(p,q)-L0 = -0.0005085727640877 +t = 20.3000, H(p,q)-H0 = -0.0027047646815265, L(p,q)-L0 = -0.0005085744804718 +t = 20.4000, H(p,q)-H0 = -0.0027047897311039, L(p,q)-L0 = -0.0005085756830288 +t = 20.5000, H(p,q)-H0 = -0.0027048073070048, L(p,q)-L0 = -0.0005085765519144 +t = 20.6000, H(p,q)-H0 = -0.0027048198596485, L(p,q)-L0 = -0.0005085771975512 +t = 20.7000, H(p,q)-H0 = -0.0027048289684720, L(p,q)-L0 = -0.0005085776898252 +t = 20.8000, H(p,q)-H0 = -0.0027048356730022, L(p,q)-L0 = -0.0005085780742647 +t = 20.9000, H(p,q)-H0 = -0.0027048406705076, L(p,q)-L0 = -0.0005085783813203 +t = 21.0000, H(p,q)-H0 = -0.0027048444367570, L(p,q)-L0 = -0.0005085786318568 +t = 21.1000, H(p,q)-H0 = -0.0027048473013811, L(p,q)-L0 = -0.0005085788404975 +t = 21.2000, H(p,q)-H0 = -0.0027048494958251, L(p,q)-L0 = -0.0005085790177164 +t = 21.3000, H(p,q)-H0 = -0.0027048511843949, L(p,q)-L0 = -0.0005085791711745 +t = 21.4000, H(p,q)-H0 = -0.0027048524846762, L(p,q)-L0 = -0.0005085793065996 +t = 21.5000, H(p,q)-H0 = -0.0027048534811320, L(p,q)-L0 = -0.0005085794283737 +t = 21.6000, H(p,q)-H0 = -0.0027048542342416, L(p,q)-L0 = -0.0005085795399357 +t = 21.7000, H(p,q)-H0 = -0.0027048547866578, L(p,q)-L0 = -0.0005085796440673 +t = 21.8000, H(p,q)-H0 = -0.0027048551673203, L(p,q)-L0 = -0.0005085797430993 +t = 21.9000, H(p,q)-H0 = -0.0027048553941125, L(p,q)-L0 = -0.0005085798390698 +t = 22.0000, H(p,q)-H0 = -0.0027048554754254, L(p,q)-L0 = -0.0005085799338481 +t = 22.1000, H(p,q)-H0 = -0.0027048554108372, L(p,q)-L0 = -0.0005085800292474 +t = 22.2000, H(p,q)-H0 = -0.0027048551909873, L(p,q)-L0 = -0.0005085801271273 +t = 22.3000, H(p,q)-H0 = -0.0027048547966326, L(p,q)-L0 = -0.0005085802295034 +t = 22.4000, H(p,q)-H0 = -0.0027048541967503, L(p,q)-L0 = -0.0005085803386752 +t = 22.5000, H(p,q)-H0 = -0.0027048533454305, L(p,q)-L0 = -0.0005085804573840 +t = 22.6000, H(p,q)-H0 = -0.0027048521771140, L(p,q)-L0 = -0.0005085805890219 +t = 22.7000, H(p,q)-H0 = -0.0027048505994641, L(p,q)-L0 = -0.0005085807379221 +t = 22.8000, H(p,q)-H0 = -0.0027048484827537, L(p,q)-L0 = -0.0005085809097725 +t = 22.9000, H(p,q)-H0 = -0.0027048456439869, L(p,q)-L0 = -0.0005085811122224 +t = 23.0000, H(p,q)-H0 = -0.0027048418229105, L(p,q)-L0 = -0.0005085813557973 +t = 23.1000, H(p,q)-H0 = -0.0027048366453082, L(p,q)-L0 = -0.0005085816553043 +t = 23.2000, H(p,q)-H0 = -0.0027048295659814, L(p,q)-L0 = -0.0005085820320510 +t = 23.3000, H(p,q)-H0 = -0.0027048197786954, L(p,q)-L0 = -0.0005085825174312 +t = 23.4000, H(p,q)-H0 = -0.0027048060713872, L(p,q)-L0 = -0.0005085831588867 +t = 23.5000, H(p,q)-H0 = -0.0027047865889311, L(p,q)-L0 = -0.0005085840301058 +t = 23.6000, H(p,q)-H0 = -0.0027047584367719, L(p,q)-L0 = -0.0005085852490599 +t = 23.7000, H(p,q)-H0 = -0.0027047170055611, L(p,q)-L0 = -0.0005085870110634 +t = 23.8000, H(p,q)-H0 = -0.0027046547987080, L(p,q)-L0 = -0.0005085896518540 +t = 23.9000, H(p,q)-H0 = -0.0027045593647116, L(p,q)-L0 = -0.0005085937734841 +t = 24.0000, H(p,q)-H0 = -0.0027044096189748, L(p,q)-L0 = -0.0005086005085452 +t = 24.1000, H(p,q)-H0 = -0.0027041693491044, L(p,q)-L0 = -0.0005086121071035 +t = 24.2000, H(p,q)-H0 = -0.0027037762713912, L(p,q)-L0 = -0.0005086333265301 +t = 24.3000, H(p,q)-H0 = -0.0027031264217569, L(p,q)-L0 = -0.0005086749673004 +t = 24.4000, H(p,q)-H0 = -0.0027020657653758, L(p,q)-L0 = -0.0005087636128355 +t = 24.5000, H(p,q)-H0 = -0.0027004604009702, L(p,q)-L0 = -0.0005089708504893 +t = 24.6000, H(p,q)-H0 = -0.0026986357719079, L(p,q)-L0 = -0.0005095086527398 +t = 24.7000, H(p,q)-H0 = -0.0026988278673472, L(p,q)-L0 = -0.0005110612230143 +t = 24.8000, H(p,q)-H0 = -0.0027053786719118, L(p,q)-L0 = -0.0005159293073538 +t = 24.9000, H(p,q)-H0 = -0.0027085983972137, L(p,q)-L0 = -0.0005311524612439 +t = 25.0000, H(p,q)-H0 = -0.0027683766088034, L(p,q)-L0 = -0.0005701238068577 +t = 25.1000, H(p,q)-H0 = -0.0031695148176025, L(p,q)-L0 = -0.0006292818027249 +t = 25.2000, H(p,q)-H0 = -0.0034110271414587, L(p,q)-L0 = -0.0006555137140452 +t = 25.3000, H(p,q)-H0 = -0.0034282711991802, L(p,q)-L0 = -0.0006571965274131 +t = 25.4000, H(p,q)-H0 = -0.0034658864457926, L(p,q)-L0 = -0.0006625039103769 +t = 25.5000, H(p,q)-H0 = -0.0034789533079216, L(p,q)-L0 = -0.0006641721068398 +t = 25.6000, H(p,q)-H0 = -0.0034844871738191, L(p,q)-L0 = -0.0006647468289152 +t = 25.7000, H(p,q)-H0 = -0.0034871244965118, L(p,q)-L0 = -0.0006649684770003 +t = 25.8000, H(p,q)-H0 = -0.0034884771046654, L(p,q)-L0 = -0.0006650636647787 +t = 25.9000, H(p,q)-H0 = -0.0034892100680847, L(p,q)-L0 = -0.0006651086143324 +t = 26.0000, H(p,q)-H0 = -0.0034896260506707, L(p,q)-L0 = -0.0006651316471397 +t = 26.1000, H(p,q)-H0 = -0.0034898718989165, L(p,q)-L0 = -0.0006651443041876 +t = 26.2000, H(p,q)-H0 = -0.0034900225163956, L(p,q)-L0 = -0.0006651516898012 +t = 26.3000, H(p,q)-H0 = -0.0034901177937515, L(p,q)-L0 = -0.0006651562289874 +t = 26.4000, H(p,q)-H0 = -0.0034901798101881, L(p,q)-L0 = -0.0006651591479252 +t = 26.5000, H(p,q)-H0 = -0.0034902212199680, L(p,q)-L0 = -0.0006651611012674 +t = 26.6000, H(p,q)-H0 = -0.0034902495086671, L(p,q)-L0 = -0.0006651624555913 +t = 26.7000, H(p,q)-H0 = -0.0034902692333419, L(p,q)-L0 = -0.0006651634249686 +t = 26.8000, H(p,q)-H0 = -0.0034902832415543, L(p,q)-L0 = -0.0006651641391544 +t = 26.9000, H(p,q)-H0 = -0.0034902933553485, L(p,q)-L0 = -0.0006651646794552 +t = 27.0000, H(p,q)-H0 = -0.0034903007659777, L(p,q)-L0 = -0.0006651650983650 +t = 27.1000, H(p,q)-H0 = -0.0034903062676729, L(p,q)-L0 = -0.0006651654307063 +t = 27.2000, H(p,q)-H0 = -0.0034903103994157, L(p,q)-L0 = -0.0006651657001612 +t = 27.3000, H(p,q)-H0 = -0.0034903135328193, L(p,q)-L0 = -0.0006651659232111 +t = 27.4000, H(p,q)-H0 = -0.0034903159277001, L(p,q)-L0 = -0.0006651661115814 +t = 27.5000, H(p,q)-H0 = -0.0034903177678589, L(p,q)-L0 = -0.0006651662737929 +t = 27.6000, H(p,q)-H0 = -0.0034903191844959, L(p,q)-L0 = -0.0006651664161734 +t = 27.7000, H(p,q)-H0 = -0.0034903202717431, L(p,q)-L0 = -0.0006651665435291 +t = 27.8000, H(p,q)-H0 = -0.0034903210970733, L(p,q)-L0 = -0.0006651666596035 +t = 27.9000, H(p,q)-H0 = -0.0034903217083071, L(p,q)-L0 = -0.0006651667673970 +t = 28.0000, H(p,q)-H0 = -0.0034903221383109, L(p,q)-L0 = -0.0006651668693980 +t = 28.1000, H(p,q)-H0 = -0.0034903224080635, L(p,q)-L0 = -0.0006651669677552 +t = 28.2000, H(p,q)-H0 = -0.0034903225285250, L(p,q)-L0 = -0.0006651670644148 +t = 28.3000, H(p,q)-H0 = -0.0034903225015527, L(p,q)-L0 = -0.0006651671612359 +t = 28.4000, H(p,q)-H0 = -0.0034903223199827, L(p,q)-L0 = -0.0006651672600979 +t = 28.5000, H(p,q)-H0 = -0.0034903219668829, L(p,q)-L0 = -0.0006651673630116 +t = 28.6000, H(p,q)-H0 = -0.0034903214138777, L(p,q)-L0 = -0.0006651674722431 +t = 28.7000, H(p,q)-H0 = -0.0034903206183087, L(p,q)-L0 = -0.0006651675904671 +t = 28.8000, H(p,q)-H0 = -0.0034903195188336, L(p,q)-L0 = -0.0006651677209669 +t = 28.9000, H(p,q)-H0 = -0.0034903180288115, L(p,q)-L0 = -0.0006651678679087 +t = 29.0000, H(p,q)-H0 = -0.0034903160264397, L(p,q)-L0 = -0.0006651680367299 +t = 29.1000, H(p,q)-H0 = -0.0034903133400144, L(p,q)-L0 = -0.0006651682347079 +t = 29.2000, H(p,q)-H0 = -0.0034903097257010, L(p,q)-L0 = -0.0006651684718093 +t = 29.3000, H(p,q)-H0 = -0.0034903048336041, L(p,q)-L0 = -0.0006651687619943 +t = 29.4000, H(p,q)-H0 = -0.0034902981552060, L(p,q)-L0 = -0.0006651691252606 +t = 29.5000, H(p,q)-H0 = -0.0034902889406130, L(p,q)-L0 = -0.0006651695909365 +t = 29.6000, H(p,q)-H0 = -0.0034902760659488, L(p,q)-L0 = -0.0006651702031204 +t = 29.7000, H(p,q)-H0 = -0.0034902578168481, L(p,q)-L0 = -0.0006651710299391 +t = 29.8000, H(p,q)-H0 = -0.0034902315280380, L(p,q)-L0 = -0.0006651721798137 +t = 29.9000, H(p,q)-H0 = -0.0034901929714395, L(p,q)-L0 = -0.0006651738310672 +t = 30.0000, H(p,q)-H0 = -0.0034901352974456, L(p,q)-L0 = -0.0006651762879805 +t = 30.1000, H(p,q)-H0 = -0.0034900471726931, L(p,q)-L0 = -0.0006651800916873 +t = 30.2000, H(p,q)-H0 = -0.0034899094703147, L(p,q)-L0 = -0.0006651862506569 +t = 30.3000, H(p,q)-H0 = -0.0034896894078449, L(p,q)-L0 = -0.0006651967470516 +t = 30.4000, H(p,q)-H0 = -0.0034893305378918, L(p,q)-L0 = -0.0006652157209478 +t = 30.5000, H(p,q)-H0 = -0.0034887377690769, L(p,q)-L0 = -0.0006652524414416 +t = 30.6000, H(p,q)-H0 = -0.0034877653246912, L(p,q)-L0 = -0.0006653293666734 +t = 30.7000, H(p,q)-H0 = -0.0034862609301248, L(p,q)-L0 = -0.0006655059385221 +t = 30.8000, H(p,q)-H0 = -0.0034843969369103, L(p,q)-L0 = -0.0006659550892802 +t = 30.9000, H(p,q)-H0 = -0.0034839010341134, L(p,q)-L0 = -0.0006672270494776 +t = 31.0000, H(p,q)-H0 = -0.0034891924866152, L(p,q)-L0 = -0.0006711689749941 +t = 31.1000, H(p,q)-H0 = -0.0034946734077965, L(p,q)-L0 = -0.0006836272495381 +t = 31.2000, H(p,q)-H0 = -0.0035236336543538, L(p,q)-L0 = -0.0007173963005592 +t = 31.3000, H(p,q)-H0 = -0.0038642490594232, L(p,q)-L0 = -0.0007752182037646 +t = 31.4000, H(p,q)-H0 = -0.0042118998503460, L(p,q)-L0 = -0.0008142676205763 +t = 31.5000, H(p,q)-H0 = -0.0042204953302023, L(p,q)-L0 = -0.0008149708602982 +t = 31.6000, H(p,q)-H0 = -0.0042235685676935, L(p,q)-L0 = -0.0008152678672543 +t = 31.7000, H(p,q)-H0 = -0.0042391721128923, L(p,q)-L0 = -0.0008173215809774 +t = 31.8000, H(p,q)-H0 = -0.0042455855932363, L(p,q)-L0 = -0.0008180156834426 +t = 31.9000, H(p,q)-H0 = -0.0042485899377882, L(p,q)-L0 = -0.0008182780009178 +t = 32.0000, H(p,q)-H0 = -0.0042501129375417, L(p,q)-L0 = -0.0008183885914257 +t = 32.1000, H(p,q)-H0 = -0.0042509306029648, L(p,q)-L0 = -0.0008184399829928 +t = 32.2000, H(p,q)-H0 = -0.0042513909630921, L(p,q)-L0 = -0.0008184659578230 +t = 32.3000, H(p,q)-H0 = -0.0042516611271731, L(p,q)-L0 = -0.0008184800653182 +t = 32.4000, H(p,q)-H0 = -0.0042518256076409, L(p,q)-L0 = -0.0008184882150274 +t = 32.5000, H(p,q)-H0 = -0.0042519290750632, L(p,q)-L0 = -0.0008184931805912 +t = 32.6000, H(p,q)-H0 = -0.0042519960876275, L(p,q)-L0 = -0.0008184963497181 +t = 32.7000, H(p,q)-H0 = -0.0042520406344556, L(p,q)-L0 = -0.0008184984564961 +t = 32.8000, H(p,q)-H0 = -0.0042520709449108, L(p,q)-L0 = -0.0008184999086722 +t = 32.9000, H(p,q)-H0 = -0.0042520920036411, L(p,q)-L0 = -0.0008185009426691 +t = 33.0000, H(p,q)-H0 = -0.0042521069111490, L(p,q)-L0 = -0.0008185017008866 +t = 33.1000, H(p,q)-H0 = -0.0042521176430697, L(p,q)-L0 = -0.0008185022720542 +t = 33.2000, H(p,q)-H0 = -0.0042521254861825, L(p,q)-L0 = -0.0008185027131675 +t = 33.3000, H(p,q)-H0 = -0.0042521312954527, L(p,q)-L0 = -0.0008185030618642 +t = 33.4000, H(p,q)-H0 = -0.0042521356492664, L(p,q)-L0 = -0.0008185033436325 +t = 33.5000, H(p,q)-H0 = -0.0042521389452854, L(p,q)-L0 = -0.0008185035761433 +t = 33.6000, H(p,q)-H0 = -0.0042521414608466, L(p,q)-L0 = -0.0008185037719213 +t = 33.7000, H(p,q)-H0 = -0.0042521433917296, L(p,q)-L0 = -0.0008185039400369 +t = 33.8000, H(p,q)-H0 = -0.0042521448774507, L(p,q)-L0 = -0.0008185040872023 +t = 33.9000, H(p,q)-H0 = -0.0042521460180021, L(p,q)-L0 = -0.0008185042184971 +t = 34.0000, H(p,q)-H0 = -0.0042521468850472, L(p,q)-L0 = -0.0008185043378623 +t = 34.1000, H(p,q)-H0 = -0.0042521475294530, L(p,q)-L0 = -0.0008185044484437 +t = 34.2000, H(p,q)-H0 = -0.0042521479863378, L(p,q)-L0 = -0.0008185045528371 +t = 34.3000, H(p,q)-H0 = -0.0042521482783826, L(p,q)-L0 = -0.0008185046532719 +t = 34.4000, H(p,q)-H0 = -0.0042521484178717, L(p,q)-L0 = -0.0008185047517550 +t = 34.5000, H(p,q)-H0 = -0.0042521484077327, L(p,q)-L0 = -0.0008185048501910 +t = 34.6000, H(p,q)-H0 = -0.0042521482417159, L(p,q)-L0 = -0.0008185049504934 +t = 34.7000, H(p,q)-H0 = -0.0042521479037272, L(p,q)-L0 = -0.0008185050546974 +t = 34.8000, H(p,q)-H0 = -0.0042521473662255, L(p,q)-L0 = -0.0008185051650842 +t = 34.9000, H(p,q)-H0 = -0.0042521465874625, L(p,q)-L0 = -0.0008185052843360 +t = 35.0000, H(p,q)-H0 = -0.0042521455071741, L(p,q)-L0 = -0.0008185054157341 +t = 35.1000, H(p,q)-H0 = -0.0042521440400842, L(p,q)-L0 = -0.0008185055634314 +t = 35.2000, H(p,q)-H0 = -0.0042521420662149, L(p,q)-L0 = -0.0008185057328369 +t = 35.3000, H(p,q)-H0 = -0.0042521394163949, L(p,q)-L0 = -0.0008185059311780 +t = 35.4000, H(p,q)-H0 = -0.0042521358504150, L(p,q)-L0 = -0.0008185061683392 +t = 35.5000, H(p,q)-H0 = -0.0042521310236963, L(p,q)-L0 = -0.0008185064581467 +t = 35.6000, H(p,q)-H0 = -0.0042521244356883, L(p,q)-L0 = -0.0008185068203828 +t = 35.7000, H(p,q)-H0 = -0.0042521153486834, L(p,q)-L0 = -0.0008185072840223 +t = 35.8000, H(p,q)-H0 = -0.0042521026578213, L(p,q)-L0 = -0.0008185078925762 +t = 35.9000, H(p,q)-H0 = -0.0042520846790199, L(p,q)-L0 = -0.0008185087131721 +t = 36.0000, H(p,q)-H0 = -0.0042520587962509, L(p,q)-L0 = -0.0008185098524811 +t = 36.1000, H(p,q)-H0 = -0.0042520208632216, L(p,q)-L0 = -0.0008185114856636 +t = 36.2000, H(p,q)-H0 = -0.0042519641690127, L(p,q)-L0 = -0.0008185139110645 +t = 36.3000, H(p,q)-H0 = -0.0042518776199740, L(p,q)-L0 = -0.0008185176581977 +t = 36.4000, H(p,q)-H0 = -0.0042517425095954, L(p,q)-L0 = -0.0008185237116487 +t = 36.5000, H(p,q)-H0 = -0.0042515267951109, L(p,q)-L0 = -0.0008185340016967 +t = 36.6000, H(p,q)-H0 = -0.0042511753015657, L(p,q)-L0 = -0.0008185525483562 +t = 36.7000, H(p,q)-H0 = -0.0042505949309153, L(p,q)-L0 = -0.0008185883222189 +t = 36.8000, H(p,q)-H0 = -0.0042496420434726, L(p,q)-L0 = -0.0008186629770863 +t = 36.9000, H(p,q)-H0 = -0.0042481617817196, L(p,q)-L0 = -0.0008188335893515 +t = 37.0000, H(p,q)-H0 = -0.0042462976208397, L(p,q)-L0 = -0.0008192654952978 +t = 37.1000, H(p,q)-H0 = -0.0042456698559565, L(p,q)-L0 = -0.0008204827798054 +t = 37.2000, H(p,q)-H0 = -0.0042506485311904, L(p,q)-L0 = -0.0008242425437404 +t = 37.3000, H(p,q)-H0 = -0.0042565727808794, L(p,q)-L0 = -0.0008361389085031 +t = 37.4000, H(p,q)-H0 = -0.0042805258754357, L(p,q)-L0 = -0.0008687451789684 +t = 37.5000, H(p,q)-H0 = -0.0046052824962284, L(p,q)-L0 = -0.0009260380642024 +t = 37.6000, H(p,q)-H0 = -0.0049837341938264, L(p,q)-L0 = -0.0009689774758115 +t = 37.7000, H(p,q)-H0 = -0.0049861058668461, L(p,q)-L0 = -0.0009691323909832 +t = 37.8000, H(p,q)-H0 = -0.0049992788599926, L(p,q)-L0 = -0.0009707016339562 +t = 37.9000, H(p,q)-H0 = -0.0050155649298023, L(p,q)-L0 = -0.0009728595799862 +t = 38.0000, H(p,q)-H0 = -0.0050222097343599, L(p,q)-L0 = -0.0009735860679964 +t = 38.1000, H(p,q)-H0 = -0.0050253091228053, L(p,q)-L0 = -0.0009738594282986 +t = 38.2000, H(p,q)-H0 = -0.0050268758669775, L(p,q)-L0 = -0.0009739742094643 +t = 38.3000, H(p,q)-H0 = -0.0050277151648982, L(p,q)-L0 = -0.0009740273613330 +t = 38.4000, H(p,q)-H0 = -0.0050281868194839, L(p,q)-L0 = -0.0009740541457517 +t = 38.5000, H(p,q)-H0 = -0.0050284631568361, L(p,q)-L0 = -0.0009740686563200 +t = 38.6000, H(p,q)-H0 = -0.0050286311504677, L(p,q)-L0 = -0.0009740770210646 +t = 38.7000, H(p,q)-H0 = -0.0050287366906917, L(p,q)-L0 = -0.0009740821084884 +t = 38.8000, H(p,q)-H0 = -0.0050288049665206, L(p,q)-L0 = -0.0009740853504421 +t = 38.9000, H(p,q)-H0 = -0.0050288503060190, L(p,q)-L0 = -0.0009740875028450 +t = 39.0000, H(p,q)-H0 = -0.0050288811270882, L(p,q)-L0 = -0.0009740889848376 +t = 39.1000, H(p,q)-H0 = -0.0050289025226183, L(p,q)-L0 = -0.0009740900390791 +t = 39.2000, H(p,q)-H0 = -0.0050289176570719, L(p,q)-L0 = -0.0009740908115313 +t = 39.3000, H(p,q)-H0 = -0.0050289285448868, L(p,q)-L0 = -0.0009740913930358 +t = 39.4000, H(p,q)-H0 = -0.0050289364969542, L(p,q)-L0 = -0.0009740918418861 +t = 39.5000, H(p,q)-H0 = -0.0050289423835528, L(p,q)-L0 = -0.0009740921965404 +t = 39.6000, H(p,q)-H0 = -0.0050289467929883, L(p,q)-L0 = -0.0009740924830222 +t = 39.7000, H(p,q)-H0 = -0.0050289501294627, L(p,q)-L0 = -0.0009740927193606 +t = 39.8000, H(p,q)-H0 = -0.0050289526746908, L(p,q)-L0 = -0.0009740929183270 +t = 39.9000, H(p,q)-H0 = -0.0050289546274184, L(p,q)-L0 = -0.0009740930891646 +t = 40.0000, H(p,q)-H0 = -0.0050289561291880, L(p,q)-L0 = -0.0009740932387113 +t = 40.1000, H(p,q)-H0 = -0.0050289572813773, L(p,q)-L0 = -0.0009740933721403 +t = 40.2000, H(p,q)-H0 = -0.0050289581565872, L(p,q)-L0 = -0.0009740934934646 +t = 40.3000, H(p,q)-H0 = -0.0050289588062963, L(p,q)-L0 = -0.0009740936058875 +t = 40.4000, H(p,q)-H0 = -0.0050289592659851, L(p,q)-L0 = -0.0009740937120533 +t = 40.5000, H(p,q)-H0 = -0.0050289595584951, L(p,q)-L0 = -0.0009740938142346 +t = 40.6000, H(p,q)-H0 = -0.0050289596960870, L(p,q)-L0 = -0.0009740939144793 +t = 40.7000, H(p,q)-H0 = -0.0050289596814824, L(p,q)-L0 = -0.0009740940147337 +t = 40.8000, H(p,q)-H0 = -0.0050289595080223, L(p,q)-L0 = -0.0009740941169565 +t = 40.9000, H(p,q)-H0 = -0.0050289591589571, L(p,q)-L0 = -0.0009740942232347 +t = 41.0000, H(p,q)-H0 = -0.0050289586057721, L(p,q)-L0 = -0.0009740943359134 +t = 41.1000, H(p,q)-H0 = -0.0050289578053148, L(p,q)-L0 = -0.0009740944577541 +t = 41.2000, H(p,q)-H0 = -0.0050289566953134, L(p,q)-L0 = -0.0009740945921420 +t = 41.3000, H(p,q)-H0 = -0.0050289551876253, L(p,q)-L0 = -0.0009740947433694 +t = 41.4000, H(p,q)-H0 = -0.0050289531581493, L(p,q)-L0 = -0.0009740949170368 +t = 41.5000, H(p,q)-H0 = -0.0050289504317323, L(p,q)-L0 = -0.0009740951206405 +t = 41.6000, H(p,q)-H0 = -0.0050289467593814, L(p,q)-L0 = -0.0009740953644510 +t = 41.7000, H(p,q)-H0 = -0.0050289417834415, L(p,q)-L0 = -0.0009740956628630 +t = 41.8000, H(p,q)-H0 = -0.0050289349836028, L(p,q)-L0 = -0.0009740960365126 +t = 41.9000, H(p,q)-H0 = -0.0050289255918023, L(p,q)-L0 = -0.0009740965156926 +t = 42.0000, H(p,q)-H0 = -0.0050289124557135, L(p,q)-L0 = -0.0009740971460033 +t = 42.1000, H(p,q)-H0 = -0.0050288938156277, L(p,q)-L0 = -0.0009740979979824 +t = 42.2000, H(p,q)-H0 = -0.0050288669326233, L(p,q)-L0 = -0.0009740991840553 +t = 42.3000, H(p,q)-H0 = -0.0050288274566321, L(p,q)-L0 = -0.0009741008894487 +t = 42.4000, H(p,q)-H0 = -0.0050287683320491, L(p,q)-L0 = -0.0009741034308430 +t = 42.5000, H(p,q)-H0 = -0.0050286778715601, L(p,q)-L0 = -0.0009741073727012 +t = 42.6000, H(p,q)-H0 = -0.0050285363327320, L(p,q)-L0 = -0.0009741137697146 +t = 42.7000, H(p,q)-H0 = -0.0050283098629591, L(p,q)-L0 = -0.0009741247011466 +t = 42.8000, H(p,q)-H0 = -0.0050279402100668, L(p,q)-L0 = -0.0009741445249911 +t = 42.9000, H(p,q)-H0 = -0.0050273295676402, L(p,q)-L0 = -0.0009741830372008 +t = 43.0000, H(p,q)-H0 = -0.0050263296719493, L(p,q)-L0 = -0.0009742640797716 +t = 43.1000, H(p,q)-H0 = -0.0050247938430936, L(p,q)-L0 = -0.0009744510695272 +t = 43.2000, H(p,q)-H0 = -0.0050229403669362, L(p,q)-L0 = -0.0009749294178648 +t = 43.3000, H(p,q)-H0 = -0.0050226502207049, L(p,q)-L0 = -0.0009762912971842 +t = 43.4000, H(p,q)-H0 = -0.0050283403460893, L(p,q)-L0 = -0.0009805239645397 +t = 43.5000, H(p,q)-H0 = -0.0050331284324954, L(p,q)-L0 = -0.0009938449411351 +t = 43.6000, H(p,q)-H0 = -0.0050709025206879, L(p,q)-L0 = -0.0010292794028619 +t = 43.7000, H(p,q)-H0 = -0.0054318832955049, L(p,q)-L0 = -0.0010876409457482 +t = 43.8000, H(p,q)-H0 = -0.0057371204589447, L(p,q)-L0 = -0.0011215317621289 +t = 43.9000, H(p,q)-H0 = -0.0057497089987111, L(p,q)-L0 = -0.0011226480931769 +t = 44.0000, H(p,q)-H0 = -0.0057934322107638, L(p,q)-L0 = -0.0011288131162329 +t = 44.1000, H(p,q)-H0 = -0.0058082004992484, L(p,q)-L0 = -0.0011307407430252 +t = 44.2000, H(p,q)-H0 = -0.0058143299279987, L(p,q)-L0 = -0.0011313969680044 +t = 44.3000, H(p,q)-H0 = -0.0058172168871219, L(p,q)-L0 = -0.0011316468330285 +t = 44.4000, H(p,q)-H0 = -0.0058186857628013, L(p,q)-L0 = -0.0011317528925029 +t = 44.5000, H(p,q)-H0 = -0.0058194767097800, L(p,q)-L0 = -0.0011318024722731 +t = 44.6000, H(p,q)-H0 = -0.0058199231760993, L(p,q)-L0 = -0.0011318276607565 +t = 44.7000, H(p,q)-H0 = -0.0058201857870415, L(p,q)-L0 = -0.0011318414026297 +t = 44.8000, H(p,q)-H0 = -0.0058203459956877, L(p,q)-L0 = -0.0011318493724733 +t = 44.9000, H(p,q)-H0 = -0.0058204469594461, L(p,q)-L0 = -0.0011318542455230 +t = 45.0000, H(p,q)-H0 = -0.0058205124566160, L(p,q)-L0 = -0.0011318573654847 +t = 45.1000, H(p,q)-H0 = -0.0058205560590923, L(p,q)-L0 = -0.0011318594456199 +t = 45.2000, H(p,q)-H0 = -0.0058205857652835, L(p,q)-L0 = -0.0011318608833193 +t = 45.3000, H(p,q)-H0 = -0.0058206064279326, L(p,q)-L0 = -0.0011318619096317 +t = 45.4000, H(p,q)-H0 = -0.0058206210700082, L(p,q)-L0 = -0.0011318626640651 +t = 45.5000, H(p,q)-H0 = -0.0058206316203492, L(p,q)-L0 = -0.0011318632337425 +t = 45.6000, H(p,q)-H0 = -0.0058206393367858, L(p,q)-L0 = -0.0011318636747448 +t = 45.7000, H(p,q)-H0 = -0.0058206450559579, L(p,q)-L0 = -0.0011318640241778 +t = 45.8000, H(p,q)-H0 = -0.0058206493443911, L(p,q)-L0 = -0.0011318643072169 +t = 45.9000, H(p,q)-H0 = -0.0058206525918998, L(p,q)-L0 = -0.0011318645413481 +t = 46.0000, H(p,q)-H0 = -0.0058206550705058, L(p,q)-L0 = -0.0011318647389886 +t = 46.1000, H(p,q)-H0 = -0.0058206569722915, L(p,q)-L0 = -0.0011318649091501 +t = 46.2000, H(p,q)-H0 = -0.0058206584341152, L(p,q)-L0 = -0.0011318650585159 +t = 46.3000, H(p,q)-H0 = -0.0058206595539725, L(p,q)-L0 = -0.0011318651921591 +t = 46.4000, H(p,q)-H0 = -0.0058206604019360, L(p,q)-L0 = -0.0011318653140299 +t = 46.5000, H(p,q)-H0 = -0.0058206610275047, L(p,q)-L0 = -0.0011318654272955 +t = 46.6000, H(p,q)-H0 = -0.0058206614645095, L(p,q)-L0 = -0.0011318655345860 +t = 46.7000, H(p,q)-H0 = -0.0058206617343021, L(p,q)-L0 = -0.0011318656381772 +t = 46.8000, H(p,q)-H0 = -0.0058206618476738, L(p,q)-L0 = -0.0011318657401382 +t = 46.9000, H(p,q)-H0 = -0.0058206618057600, L(p,q)-L0 = -0.0011318658424541 +t = 47.0000, H(p,q)-H0 = -0.0058206616000502, L(p,q)-L0 = -0.0011318659471427 +t = 47.1000, H(p,q)-H0 = -0.0058206612115000, L(p,q)-L0 = -0.0011318660563755 +t = 47.2000, H(p,q)-H0 = -0.0058206606086190, L(p,q)-L0 = -0.0011318661726155 +t = 47.3000, H(p,q)-H0 = -0.0058206597442708, L(p,q)-L0 = -0.0011318662987865 +t = 47.4000, H(p,q)-H0 = -0.0058206585507228, L(p,q)-L0 = -0.0011318664384982 +t = 47.5000, H(p,q)-H0 = -0.0058206569321985, L(p,q)-L0 = -0.0011318665963569 +t = 47.6000, H(p,q)-H0 = -0.0058206547537494, L(p,q)-L0 = -0.0011318667784058 +t = 47.7000, H(p,q)-H0 = -0.0058206518245656, L(p,q)-L0 = -0.0011318669927772 +t = 47.8000, H(p,q)-H0 = -0.0058206478727060, L(p,q)-L0 = -0.0011318672506705 +t = 47.9000, H(p,q)-H0 = -0.0058206425063481, L(p,q)-L0 = -0.0011318675678629 +t = 48.0000, H(p,q)-H0 = -0.0058206351534674, L(p,q)-L0 = -0.0011318679670966 +t = 48.1000, H(p,q)-H0 = -0.0058206249663622, L(p,q)-L0 = -0.0011318684819501 +t = 48.2000, H(p,q)-H0 = -0.0058206106678044, L(p,q)-L0 = -0.0011318691632873 +t = 48.3000, H(p,q)-H0 = -0.0058205902983943, L(p,q)-L0 = -0.0011318700903342 +t = 48.4000, H(p,q)-H0 = -0.0058205607934987, L(p,q)-L0 = -0.0011318713903341 +t = 48.5000, H(p,q)-H0 = -0.0058205172608594, L(p,q)-L0 = -0.0011318732747279 +t = 48.6000, H(p,q)-H0 = -0.0058204517242235, L(p,q)-L0 = -0.0011318761085131 +t = 48.7000, H(p,q)-H0 = -0.0058203509052255, L(p,q)-L0 = -0.0011318805493998 +t = 48.8000, H(p,q)-H0 = -0.0058201922792199, L(p,q)-L0 = -0.0011318878416345 +t = 48.9000, H(p,q)-H0 = -0.0058199371377256, L(p,q)-L0 = -0.0011319004731334 +t = 49.0000, H(p,q)-H0 = -0.0058195190461326, L(p,q)-L0 = -0.0011319237434934 +t = 49.1000, H(p,q)-H0 = -0.0058188281028627, L(p,q)-L0 = -0.0011319697872911 +t = 49.2000, H(p,q)-H0 = -0.0058177064216066, L(p,q)-L0 = -0.0011320687600078 +t = 49.3000, H(p,q)-H0 = -0.0058160411841781, L(p,q)-L0 = -0.0011323027158024 +t = 49.4000, H(p,q)-H0 = -0.0058142893002238, L(p,q)-L0 = -0.0011329170786468 +t = 49.5000, H(p,q)-H0 = -0.0058150481164643, L(p,q)-L0 = -0.0011347093960148 +t = 49.6000, H(p,q)-H0 = -0.0058222285575142, L(p,q)-L0 = -0.0011403508220538 +t = 49.7000, H(p,q)-H0 = -0.0058241325175381, L(p,q)-L0 = -0.0011577519966036 +t = 49.8000, H(p,q)-H0 = -0.0059136994106861, L(p,q)-L0 = -0.0012002219445524 +t = 49.9000, H(p,q)-H0 = -0.0063434150870048, L(p,q)-L0 = -0.0012592860373102 +t = 50.0000, H(p,q)-H0 = -0.0065347885794942, L(p,q)-L0 = -0.0012798403538276 +t = 50.1000, H(p,q)-H0 = -0.0065546750922132, L(p,q)-L0 = -0.0012819120894538 +t = 50.2000, H(p,q)-H0 = -0.0065874578915532, L(p,q)-L0 = -0.0012865287483356 +t = 50.3000, H(p,q)-H0 = -0.0065991756921480, L(p,q)-L0 = -0.0012879954078655 +t = 50.4000, H(p,q)-H0 = -0.0066042271391532, L(p,q)-L0 = -0.0012885085153759 +t = 50.5000, H(p,q)-H0 = -0.0066066592227889, L(p,q)-L0 = -0.0012887094378090 +t = 50.6000, H(p,q)-H0 = -0.0066079155842371, L(p,q)-L0 = -0.0012887969125107 +t = 50.7000, H(p,q)-H0 = -0.0066086004525748, L(p,q)-L0 = -0.0012888387144001 +t = 50.8000, H(p,q)-H0 = -0.0066089911690477, L(p,q)-L0 = -0.0012888603563264 +t = 50.9000, H(p,q)-H0 = -0.0066092231569694, L(p,q)-L0 = -0.0012888723564067 +t = 51.0000, H(p,q)-H0 = -0.0066093658711800, L(p,q)-L0 = -0.0012888794143149 +t = 51.1000, H(p,q)-H0 = -0.0066094564820851, L(p,q)-L0 = -0.0012888837828469 +t = 51.2000, H(p,q)-H0 = -0.0066095156549980, L(p,q)-L0 = -0.0012888866100695 +t = 51.3000, H(p,q)-H0 = -0.0066095552819064, L(p,q)-L0 = -0.0012888885131881 +t = 51.4000, H(p,q)-H0 = -0.0066095824234229, L(p,q)-L0 = -0.0012888898399438 +t = 51.5000, H(p,q)-H0 = -0.0066096013922989, L(p,q)-L0 = -0.0012888907945314 +t = 51.6000, H(p,q)-H0 = -0.0066096148916256, L(p,q)-L0 = -0.0012888915013389 +t = 51.7000, H(p,q)-H0 = -0.0066096246557593, L(p,q)-L0 = -0.0012888920386659 +t = 51.8000, H(p,q)-H0 = -0.0066096318214277, L(p,q)-L0 = -0.0012888924572783 +t = 51.9000, H(p,q)-H0 = -0.0066096371481736, L(p,q)-L0 = -0.0012888927909871 +t = 52.0000, H(p,q)-H0 = -0.0066096411524224, L(p,q)-L0 = -0.0012888930628742 +t = 52.1000, H(p,q)-H0 = -0.0066096441907917, L(p,q)-L0 = -0.0012888932890647 +t = 52.2000, H(p,q)-H0 = -0.0066096465128904, L(p,q)-L0 = -0.0012888934810753 +t = 52.3000, H(p,q)-H0 = -0.0066096482953797, L(p,q)-L0 = -0.0012888936473121 +t = 52.4000, H(p,q)-H0 = -0.0066096496642913, L(p,q)-L0 = -0.0012888937940477 +t = 52.5000, H(p,q)-H0 = -0.0066096507098400, L(p,q)-L0 = -0.0012888939260762 +t = 52.6000, H(p,q)-H0 = -0.0066096514963420, L(p,q)-L0 = -0.0012888940471600 +t = 52.7000, H(p,q)-H0 = -0.0066096520688672, L(p,q)-L0 = -0.0012888941603451 +t = 52.8000, H(p,q)-H0 = -0.0066096524576551, L(p,q)-L0 = -0.0012888942681910 +t = 52.9000, H(p,q)-H0 = -0.0066096526809337, L(p,q)-L0 = -0.0012888943729444 +t = 53.0000, H(p,q)-H0 = -0.0066096527465372, L(p,q)-L0 = -0.0012888944766810 +t = 53.1000, H(p,q)-H0 = -0.0066096526525365, L(p,q)-L0 = -0.0012888945814292 +t = 53.2000, H(p,q)-H0 = -0.0066096523869617, L(p,q)-L0 = -0.0012888946892897 +t = 53.3000, H(p,q)-H0 = -0.0066096519265759, L(p,q)-L0 = -0.0012888948025636 +t = 53.4000, H(p,q)-H0 = -0.0066096512345324, L(p,q)-L0 = -0.0012888949239023 +t = 53.5000, H(p,q)-H0 = -0.0066096502565770, L(p,q)-L0 = -0.0012888950564980 +t = 53.6000, H(p,q)-H0 = -0.0066096489152456, L(p,q)-L0 = -0.0012888952043394 +t = 53.7000, H(p,q)-H0 = -0.0066096471011606, L(p,q)-L0 = -0.0012888953725680 +t = 53.8000, H(p,q)-H0 = -0.0066096446600086, L(p,q)-L0 = -0.0012888955679944 +t = 53.9000, H(p,q)-H0 = -0.0066096413729405, L(p,q)-L0 = -0.0012888957998609 +t = 54.0000, H(p,q)-H0 = -0.0066096369267550, L(p,q)-L0 = -0.0012888960810047 +t = 54.1000, H(p,q)-H0 = -0.0066096308679107, L(p,q)-L0 = -0.0012888964296658 +t = 54.2000, H(p,q)-H0 = -0.0066096225304835, L(p,q)-L0 = -0.0012888968723725 +t = 54.3000, H(p,q)-H0 = -0.0066096109213525, L(p,q)-L0 = -0.0012888974486692 +t = 54.4000, H(p,q)-H0 = -0.0066095945338401, L(p,q)-L0 = -0.0012888982190820 +t = 54.5000, H(p,q)-H0 = -0.0066095710393603, L(p,q)-L0 = -0.0012888992789692 +t = 54.6000, H(p,q)-H0 = -0.0066095367671244, L(p,q)-L0 = -0.0012889007834390 +t = 54.7000, H(p,q)-H0 = -0.0066094858091885, L(p,q)-L0 = -0.0012889029939144 +t = 54.8000, H(p,q)-H0 = -0.0066094084540587, L(p,q)-L0 = -0.0012889063689402 +t = 54.9000, H(p,q)-H0 = -0.0066092884102232, L(p,q)-L0 = -0.0012889117498753 +t = 55.0000, H(p,q)-H0 = -0.0066090978760566, L(p,q)-L0 = -0.0012889207615009 +t = 55.1000, H(p,q)-H0 = -0.0066087889894710, L(p,q)-L0 = -0.0012889367299387 +t = 55.2000, H(p,q)-H0 = -0.0066082802902981, L(p,q)-L0 = -0.0012889669333794 +t = 55.3000, H(p,q)-H0 = -0.0066074417231171, L(p,q)-L0 = -0.0012890285546462 +t = 55.4000, H(p,q)-H0 = -0.0066061101611179, L(p,q)-L0 = -0.0012891657824488 +t = 55.5000, H(p,q)-H0 = -0.0066042882735218, L(p,q)-L0 = -0.0012895033485001 +t = 55.6000, H(p,q)-H0 = -0.0066030216685655, L(p,q)-L0 = -0.0012904275549047 +t = 55.7000, H(p,q)-H0 = -0.0066061065799383, L(p,q)-L0 = -0.0012932206797746 +t = 55.8000, H(p,q)-H0 = -0.0066137694509310, L(p,q)-L0 = -0.0013020854862585 +t = 55.9000, H(p,q)-H0 = -0.0066189882307113, L(p,q)-L0 = -0.0013278697338168 +t = 56.0000, H(p,q)-H0 = -0.0068405685873001, L(p,q)-L0 = -0.0013804497570724 +t = 56.1000, H(p,q)-H0 = -0.0072982122989294, L(p,q)-L0 = -0.0014350382747530 +t = 56.2000, H(p,q)-H0 = -0.0074722115913586, L(p,q)-L0 = -0.0014551205293620 +t = 56.3000, H(p,q)-H0 = -0.0074800499267142, L(p,q)-L0 = -0.0014559315594759 +t = 56.4000, H(p,q)-H0 = -0.0075014222617891, L(p,q)-L0 = -0.0014588619879621 +t = 56.5000, H(p,q)-H0 = -0.0075097244031698, L(p,q)-L0 = -0.0014598247751505 +t = 56.6000, H(p,q)-H0 = -0.0075134878050911, L(p,q)-L0 = -0.0014601769113199 +t = 56.7000, H(p,q)-H0 = -0.0075153556673117, L(p,q)-L0 = -0.0014603208846896 +t = 56.8000, H(p,q)-H0 = -0.0075163423029451, L(p,q)-L0 = -0.0014603860176833 +t = 56.9000, H(p,q)-H0 = -0.0075168902000945, L(p,q)-L0 = -0.0014604181911663 +t = 57.0000, H(p,q)-H0 = -0.0075172078765056, L(p,q)-L0 = -0.0014604353279253 +t = 57.1000, H(p,q)-H0 = -0.0075173992232433, L(p,q)-L0 = -0.0014604450647453 +t = 57.2000, H(p,q)-H0 = -0.0075175184489205, L(p,q)-L0 = -0.0014604509138185 +t = 57.3000, H(p,q)-H0 = -0.0075175950134688, L(p,q)-L0 = -0.0014604546016129 +t = 57.4000, H(p,q)-H0 = -0.0075176455242807, L(p,q)-L0 = -0.0014604570275039 +t = 57.5000, H(p,q)-H0 = -0.0075176796591728, L(p,q)-L0 = -0.0014604586843965 +t = 57.6000, H(p,q)-H0 = -0.0075177032301303, L(p,q)-L0 = -0.0014604598547530 +t = 57.7000, H(p,q)-H0 = -0.0075177198242240, L(p,q)-L0 = -0.0014604607069530 +t = 57.8000, H(p,q)-H0 = -0.0075177317109864, L(p,q)-L0 = -0.0014604613449558 +t = 57.9000, H(p,q)-H0 = -0.0075177403591021, L(p,q)-L0 = -0.0014604618349991 +t = 58.0000, H(p,q)-H0 = -0.0075177467386638, L(p,q)-L0 = -0.0014604622205047 +t = 58.1000, H(p,q)-H0 = -0.0075177515024203, L(p,q)-L0 = -0.0014604625306857 +t = 58.2000, H(p,q)-H0 = -0.0075177550969621, L(p,q)-L0 = -0.0014604627856751 +t = 58.3000, H(p,q)-H0 = -0.0075177578323614, L(p,q)-L0 = -0.0014604629996662 +t = 58.4000, H(p,q)-H0 = -0.0075177599266217, L(p,q)-L0 = -0.0014604631828864 +t = 58.5000, H(p,q)-H0 = -0.0075177615345337, L(p,q)-L0 = -0.0014604633428685 +t = 58.6000, H(p,q)-H0 = -0.0075177627666821, L(p,q)-L0 = -0.0014604634852903 +t = 58.7000, H(p,q)-H0 = -0.0075177637021057, L(p,q)-L0 = -0.0014604636145387 +t = 58.8000, H(p,q)-H0 = -0.0075177643967819, L(p,q)-L0 = -0.0014604637341017 +t = 58.9000, H(p,q)-H0 = -0.0075177648892975, L(p,q)-L0 = -0.0014604638468488 +t = 59.0000, H(p,q)-H0 = -0.0075177652045599, L(p,q)-L0 = -0.0014604639552379 +t = 59.1000, H(p,q)-H0 = -0.0075177653560790, L(p,q)-L0 = -0.0014604640614755 +t = 59.2000, H(p,q)-H0 = -0.0075177653471343, L(p,q)-L0 = -0.0014604641676541 +t = 59.3000, H(p,q)-H0 = -0.0075177651709807, L(p,q)-L0 = -0.0014604642758754 +t = 59.4000, H(p,q)-H0 = -0.0075177648101135, L(p,q)-L0 = -0.0014604643883762 +t = 59.5000, H(p,q)-H0 = -0.0075177642344932, L(p,q)-L0 = -0.0014604645076705 +t = 59.6000, H(p,q)-H0 = -0.0075177633984745, L(p,q)-L0 = -0.0014604646367194 +t = 59.7000, H(p,q)-H0 = -0.0075177622360031, L(p,q)-L0 = -0.0014604647791587 +t = 59.8000, H(p,q)-H0 = -0.0075177606533507, L(p,q)-L0 = -0.0014604649396059 +t = 59.9000, H(p,q)-H0 = -0.0075177585182388, L(p,q)-L0 = -0.0014604651241005 +t = 60.0000, H(p,q)-H0 = -0.0075177556435133, L(p,q)-L0 = -0.0014604653407451 +t = 60.1000, H(p,q)-H0 = -0.0075177517624332, L(p,q)-L0 = -0.0014604656006749 +t = 60.2000, H(p,q)-H0 = -0.0075177464907911, L(p,q)-L0 = -0.0014604659195445 +t = 60.3000, H(p,q)-H0 = -0.0075177392679974, L(p,q)-L0 = -0.0014604663198776 +t = 60.4000, H(p,q)-H0 = -0.0075177292639086, L(p,q)-L0 = -0.0014604668348677 +t = 60.5000, H(p,q)-H0 = -0.0075177152288441, L(p,q)-L0 = -0.0014604675147014 +t = 60.6000, H(p,q)-H0 = -0.0075176952475605, L(p,q)-L0 = -0.0014604684373947 +t = 60.7000, H(p,q)-H0 = -0.0075176663277495, L(p,q)-L0 = -0.0014604697279813 +t = 60.8000, H(p,q)-H0 = -0.0075176236982062, L(p,q)-L0 = -0.0014604715937520 +t = 60.9000, H(p,q)-H0 = -0.0075175595895836, L(p,q)-L0 = -0.0014604743916310 +t = 61.0000, H(p,q)-H0 = -0.0075174610838133, L(p,q)-L0 = -0.0014604787629693 +t = 61.1000, H(p,q)-H0 = -0.0075173062916998, L(p,q)-L0 = -0.0014604859172346 +t = 61.2000, H(p,q)-H0 = -0.0075170576243150, L(p,q)-L0 = -0.0014604982641889 +t = 61.3000, H(p,q)-H0 = -0.0075166505525075, L(p,q)-L0 = -0.0014605209162322 +t = 61.4000, H(p,q)-H0 = -0.0075159780181615, L(p,q)-L0 = -0.0014605655256930 +t = 61.5000, H(p,q)-H0 = -0.0075148843946853, L(p,q)-L0 = -0.0014606609002255 +t = 61.6000, H(p,q)-H0 = -0.0075132485527077, L(p,q)-L0 = -0.0014608849826797 +t = 61.7000, H(p,q)-H0 = -0.0075114690714533, L(p,q)-L0 = -0.0014614695540665 +t = 61.8000, H(p,q)-H0 = -0.0075119725718271, L(p,q)-L0 = -0.0014631643004741 +t = 61.9000, H(p,q)-H0 = -0.0075188381686173, L(p,q)-L0 = -0.0014684790213803 +t = 62.0000, H(p,q)-H0 = -0.0075213408711894, L(p,q)-L0 = -0.0014849340726064 +t = 62.1000, H(p,q)-H0 = -0.0075977182778122, L(p,q)-L0 = -0.0015258568087962 +t = 62.2000, H(p,q)-H0 = -0.0080142071314444, L(p,q)-L0 = -0.0015849260346221 +t = 62.3000, H(p,q)-H0 = -0.0082223851637226, L(p,q)-L0 = -0.0016074040036949 +t = 62.4000, H(p,q)-H0 = -0.0082417724052919, L(p,q)-L0 = -0.0016093800624443 +t = 62.5000, H(p,q)-H0 = -0.0082767313007306, L(p,q)-L0 = -0.0016143110446043 +t = 62.6000, H(p,q)-H0 = -0.0082890796719279, L(p,q)-L0 = -0.0016158737930068 +t = 62.7000, H(p,q)-H0 = -0.0082943599259726, L(p,q)-L0 = -0.0016164178632248 +t = 62.8000, H(p,q)-H0 = -0.0082968899278144, L(p,q)-L0 = -0.0016166298212301 +t = 62.9000, H(p,q)-H0 = -0.0082981925024845, L(p,q)-L0 = -0.0016167216729231 +t = 63.0000, H(p,q)-H0 = -0.0082989006627422, L(p,q)-L0 = -0.0016167653917382 +t = 63.1000, H(p,q)-H0 = -0.0082993037412200, L(p,q)-L0 = -0.0016167879503431 +t = 63.2000, H(p,q)-H0 = -0.0082995425869782, L(p,q)-L0 = -0.0016168004238233 +t = 63.3000, H(p,q)-H0 = -0.0082996892573692, L(p,q)-L0 = -0.0016168077432006 +t = 63.4000, H(p,q)-H0 = -0.0082997822317507, L(p,q)-L0 = -0.0016168122649221 +t = 63.5000, H(p,q)-H0 = -0.0082998428616258, L(p,q)-L0 = -0.0016168151867020 +t = 63.6000, H(p,q)-H0 = -0.0082998834123414, L(p,q)-L0 = -0.0016168171509681 +t = 63.7000, H(p,q)-H0 = -0.0082999111546376, L(p,q)-L0 = -0.0016168185189600 +t = 63.8000, H(p,q)-H0 = -0.0082999305232168, L(p,q)-L0 = -0.0016168195024386 +t = 63.9000, H(p,q)-H0 = -0.0082999442939573, L(p,q)-L0 = -0.0016168202302111 +t = 64.0000, H(p,q)-H0 = -0.0082999542457802, L(p,q)-L0 = -0.0016168207832555 +t = 64.1000, H(p,q)-H0 = -0.0082999615433328, L(p,q)-L0 = -0.0016168212140173 +t = 64.2000, H(p,q)-H0 = -0.0082999669640187, L(p,q)-L0 = -0.0016168215573935 +t = 64.3000, H(p,q)-H0 = -0.0082999710358979, L(p,q)-L0 = -0.0016168218371879 +t = 64.4000, H(p,q)-H0 = -0.0082999741232850, L(p,q)-L0 = -0.0016168220700212 +t = 64.5000, H(p,q)-H0 = -0.0082999764809404, L(p,q)-L0 = -0.0016168222677582 +t = 64.6000, H(p,q)-H0 = -0.0082999782889923, L(p,q)-L0 = -0.0016168224390563 +t = 64.7000, H(p,q)-H0 = -0.0082999796757974, L(p,q)-L0 = -0.0016168225903772 +t = 64.8000, H(p,q)-H0 = -0.0082999807330948, L(p,q)-L0 = -0.0016168227266612 +t = 64.9000, H(p,q)-H0 = -0.0082999815261381, L(p,q)-L0 = -0.0016168228517890 +t = 65.0000, H(p,q)-H0 = -0.0082999821004788, L(p,q)-L0 = -0.0016168229689082 +t = 65.1000, H(p,q)-H0 = -0.0082999824864498, L(p,q)-L0 = -0.0016168230806700 +t = 65.2000, H(p,q)-H0 = -0.0082999827020094, L(p,q)-L0 = -0.0016168231894107 +t = 65.3000, H(p,q)-H0 = -0.0082999827543395, L(p,q)-L0 = -0.0016168232972990 +t = 65.4000, H(p,q)-H0 = -0.0082999826404160, L(p,q)-L0 = -0.0016168234064659 +t = 65.5000, H(p,q)-H0 = -0.0082999823466205, L(p,q)-L0 = -0.0016168235191315 +t = 65.6000, H(p,q)-H0 = -0.0082999818473403, L(p,q)-L0 = -0.0016168236377444 +t = 65.7000, H(p,q)-H0 = -0.0082999811023532, L(p,q)-L0 = -0.0016168237651417 +t = 65.8000, H(p,q)-H0 = -0.0082999800526313, L(p,q)-L0 = -0.0016168239047598 +t = 65.9000, H(p,q)-H0 = -0.0082999786139314, L(p,q)-L0 = -0.0016168240609143 +t = 66.0000, H(p,q)-H0 = -0.0082999766671743, L(p,q)-L0 = -0.0016168242391964 +t = 66.1000, H(p,q)-H0 = -0.0082999740440215, L(p,q)-L0 = -0.0016168244470466 +t = 66.2000, H(p,q)-H0 = -0.0082999705050973, L(p,q)-L0 = -0.0016168246946116 +t = 66.3000, H(p,q)-H0 = -0.0082999657067434, L(p,q)-L0 = -0.0016168249960538 +t = 66.4000, H(p,q)-H0 = -0.0082999591495398, L(p,q)-L0 = -0.0016168253715996 +t = 66.5000, H(p,q)-H0 = -0.0082999500973145, L(p,q)-L0 = -0.0016168258508293 +t = 66.6000, H(p,q)-H0 = -0.0082999374474856, L(p,q)-L0 = -0.0016168264781042 +t = 66.7000, H(p,q)-H0 = -0.0082999195196036, L(p,q)-L0 = -0.0016168273217750 +t = 66.8000, H(p,q)-H0 = -0.0082998937037715, L(p,q)-L0 = -0.0016168284903244 +t = 66.9000, H(p,q)-H0 = -0.0082998558645395, L(p,q)-L0 = -0.0016168301616697 +t = 67.0000, H(p,q)-H0 = -0.0082997993109404, L(p,q)-L0 = -0.0016168326384758 +t = 67.1000, H(p,q)-H0 = -0.0082997129873277, L(p,q)-L0 = -0.0016168364572351 +t = 67.2000, H(p,q)-H0 = -0.0082995782617741, L(p,q)-L0 = -0.0016168426141706 +t = 67.3000, H(p,q)-H0 = -0.0082993632413220, L(p,q)-L0 = -0.0016168530595803 +t = 67.4000, H(p,q)-H0 = -0.0082990130550606, L(p,q)-L0 = -0.0016168718488706 +t = 67.5000, H(p,q)-H0 = -0.0082984352102494, L(p,q)-L0 = -0.0016169080161300 +t = 67.6000, H(p,q)-H0 = -0.0082974871562463, L(p,q)-L0 = -0.0016169833264885 +t = 67.7000, H(p,q)-H0 = -0.0082960152745801, L(p,q)-L0 = -0.0016171550235442 +t = 67.8000, H(p,q)-H0 = -0.0082941602839841, L(p,q)-L0 = -0.0016175885060412 +t = 67.9000, H(p,q)-H0 = -0.0082935162579298, L(p,q)-L0 = -0.0016188065301203 +t = 68.0000, H(p,q)-H0 = -0.0082983862376713, L(p,q)-L0 = -0.0016225562750811 +t = 68.1000, H(p,q)-H0 = -0.0083043411138335, L(p,q)-L0 = -0.0016343856629001 +t = 68.2000, H(p,q)-H0 = -0.0083281920270246, L(p,q)-L0 = -0.0016667656650784 +t = 68.3000, H(p,q)-H0 = -0.0086483570042810, L(p,q)-L0 = -0.0017238083029936 +t = 68.4000, H(p,q)-H0 = -0.0090262911034760, L(p,q)-L0 = -0.0017668830933191 +t = 68.5000, H(p,q)-H0 = -0.0090286388487173, L(p,q)-L0 = -0.0017670361077707 +t = 68.6000, H(p,q)-H0 = -0.0090420561804545, L(p,q)-L0 = -0.0017686346052104 +t = 68.7000, H(p,q)-H0 = -0.0090585942390076, L(p,q)-L0 = -0.0017708332562726 +t = 68.8000, H(p,q)-H0 = -0.0090653282746891, L(p,q)-L0 = -0.0017715747477229 +t = 68.9000, H(p,q)-H0 = -0.0090684645123734, L(p,q)-L0 = -0.0017718540734429 +t = 69.0000, H(p,q)-H0 = -0.0090700483913224, L(p,q)-L0 = -0.0017719714649240 +t = 69.1000, H(p,q)-H0 = -0.0090708963505156, L(p,q)-L0 = -0.0017720258706756 +t = 69.2000, H(p,q)-H0 = -0.0090713726640493, L(p,q)-L0 = -0.0017720533102098 +t = 69.3000, H(p,q)-H0 = -0.0090716516352027, L(p,q)-L0 = -0.0017720681892406 +t = 69.4000, H(p,q)-H0 = -0.0090718211811023, L(p,q)-L0 = -0.0017720767749683 +t = 69.5000, H(p,q)-H0 = -0.0090719276695290, L(p,q)-L0 = -0.0017720820025667 +t = 69.6000, H(p,q)-H0 = -0.0090719965429189, L(p,q)-L0 = -0.0017720853379229 +t = 69.7000, H(p,q)-H0 = -0.0090720422694386, L(p,q)-L0 = -0.0017720875553366 +t = 69.8000, H(p,q)-H0 = -0.0090720733472431, L(p,q)-L0 = -0.0017720890843776 +t = 69.9000, H(p,q)-H0 = -0.0090720949166577, L(p,q)-L0 = -0.0017720901738885 +t = 70.0000, H(p,q)-H0 = -0.0090721101709692, L(p,q)-L0 = -0.0017720909736432 +t = 70.1000, H(p,q)-H0 = -0.0090721211425577, L(p,q)-L0 = -0.0017720915769186 +t = 70.2000, H(p,q)-H0 = -0.0090721291537154, L(p,q)-L0 = -0.0017720920436137 +t = 70.3000, H(p,q)-H0 = -0.0090721350820813, L(p,q)-L0 = -0.0017720924132787 +t = 70.4000, H(p,q)-H0 = -0.0090721395207606, L(p,q)-L0 = -0.0017720927127016 +t = 70.5000, H(p,q)-H0 = -0.0090721428770837, L(p,q)-L0 = -0.0017720929604614 +t = 70.6000, H(p,q)-H0 = -0.0090721454347672, L(p,q)-L0 = -0.0017720931697378 +t = 70.7000, H(p,q)-H0 = -0.0090721473937664, L(p,q)-L0 = -0.0017720933500884 +t = 70.8000, H(p,q)-H0 = -0.0090721488962415, L(p,q)-L0 = -0.0017720935086003 +t = 70.9000, H(p,q)-H0 = -0.0090721500437103, L(p,q)-L0 = -0.0017720936506560 +t = 71.0000, H(p,q)-H0 = -0.0090721509084859, L(p,q)-L0 = -0.0017720937804515 +t = 71.1000, H(p,q)-H0 = -0.0090721515413342, L(p,q)-L0 = -0.0017720939013606 +t = 71.2000, H(p,q)-H0 = -0.0090721519765558, L(p,q)-L0 = -0.0017720940161962 +t = 71.3000, H(p,q)-H0 = -0.0090721522352515, L(p,q)-L0 = -0.0017720941274088 +t = 71.4000, H(p,q)-H0 = -0.0090721523272342, L(p,q)-L0 = -0.0017720942372426 +t = 71.5000, H(p,q)-H0 = -0.0090721522518485, L(p,q)-L0 = -0.0017720943478735 +t = 71.6000, H(p,q)-H0 = -0.0090721519978030, L(p,q)-L0 = -0.0017720944615396 +t = 71.7000, H(p,q)-H0 = -0.0090721515419860, L(p,q)-L0 = -0.0017720945806758 +t = 71.8000, H(p,q)-H0 = -0.0090721508471047, L(p,q)-L0 = -0.0017720947080773 +t = 71.9000, H(p,q)-H0 = -0.0090721498577995, L(p,q)-L0 = -0.0017720948470973 +t = 72.0000, H(p,q)-H0 = -0.0090721484946692, L(p,q)-L0 = -0.0017720950019193 +t = 72.1000, H(p,q)-H0 = -0.0090721466452724, L(p,q)-L0 = -0.0017720951779303 +t = 72.2000, H(p,q)-H0 = -0.0090721441506338, L(p,q)-L0 = -0.0017720953822646 +t = 72.3000, H(p,q)-H0 = -0.0090721407848957, L(p,q)-L0 = -0.0017720956246077 +t = 72.4000, H(p,q)-H0 = -0.0090721362243098, L(p,q)-L0 = -0.0017720959184213 +t = 72.5000, H(p,q)-H0 = -0.0090721299993369, L(p,q)-L0 = -0.0017720962828538 +t = 72.6000, H(p,q)-H0 = -0.0090721214194909, L(p,q)-L0 = -0.0017720967457904 +t = 72.7000, H(p,q)-H0 = -0.0090721094533683, L(p,q)-L0 = -0.0017720973488647 +t = 72.8000, H(p,q)-H0 = -0.0090720925335971, L(p,q)-L0 = -0.0017720981559204 +t = 72.9000, H(p,q)-H0 = -0.0090720682335765, L(p,q)-L0 = -0.0017720992677591 +t = 73.0000, H(p,q)-H0 = -0.0090720327211511, L(p,q)-L0 = -0.0017721008487499 +t = 73.1000, H(p,q)-H0 = -0.0090719798175243, L(p,q)-L0 = -0.0017721031767188 +t = 73.2000, H(p,q)-H0 = -0.0090718993483431, L(p,q)-L0 = -0.0017721067405880 +t = 73.3000, H(p,q)-H0 = -0.0090717742201148, L(p,q)-L0 = -0.0017721124408663 +t = 73.4000, H(p,q)-H0 = -0.0090715752362395, L(p,q)-L0 = -0.0017721220242014 +t = 73.5000, H(p,q)-H0 = -0.0090712521552103, L(p,q)-L0 = -0.0017721390843276 +t = 73.6000, H(p,q)-H0 = -0.0090707197756448, L(p,q)-L0 = -0.0017721715309078 +t = 73.7000, H(p,q)-H0 = -0.0090698437332671, L(p,q)-L0 = -0.0017722381615727 +t = 73.8000, H(p,q)-H0 = -0.0090684635047171, L(p,q)-L0 = -0.0017723876730750 +t = 73.9000, H(p,q)-H0 = -0.0090666254832028, L(p,q)-L0 = -0.0017727585666919 +t = 74.0000, H(p,q)-H0 = -0.0090655542761282, L(p,q)-L0 = -0.0017737825675123 +t = 74.1000, H(p,q)-H0 = -0.0090692520387496, L(p,q)-L0 = -0.0017768953177677 +t = 74.2000, H(p,q)-H0 = -0.0090764543133928, L(p,q)-L0 = -0.0017867494225026 +t = 74.3000, H(p,q)-H0 = -0.0090865015519208, L(p,q)-L0 = -0.0018148093284425 +t = 74.4000, H(p,q)-H0 = -0.0093433200957809, L(p,q)-L0 = -0.0018691803156745 +t = 74.5000, H(p,q)-H0 = -0.0097912958856576, L(p,q)-L0 = -0.0019218273923377 +t = 74.6000, H(p,q)-H0 = -0.0099717590176849, L(p,q)-L0 = -0.0019433419459464 +t = 74.7000, H(p,q)-H0 = -0.0099756891620331, L(p,q)-L0 = -0.0019437146060501 +t = 74.8000, H(p,q)-H0 = -0.0099777035535575, L(p,q)-L0 = -0.0019439170434462 +t = 74.9000, H(p,q)-H0 = -0.0099854238147500, L(p,q)-L0 = -0.0019447980945843 +t = 75.0000, H(p,q)-H0 = -0.0099889577454678, L(p,q)-L0 = -0.0019451240981223 +t = 75.1000, H(p,q)-H0 = -0.0099907225868604, L(p,q)-L0 = -0.0019452588339414 +t = 75.2000, H(p,q)-H0 = -0.0099916592800522, L(p,q)-L0 = -0.0019453203700721 +t = 75.3000, H(p,q)-H0 = -0.0099921815833290, L(p,q)-L0 = -0.0019453510186034 +t = 75.4000, H(p,q)-H0 = -0.0099924855222087, L(p,q)-L0 = -0.0019453674606181 +t = 75.5000, H(p,q)-H0 = -0.0099926691877048, L(p,q)-L0 = -0.0019453768616721 +t = 75.6000, H(p,q)-H0 = -0.0099927839578055, L(p,q)-L0 = -0.0019453825407121 +t = 75.7000, H(p,q)-H0 = -0.0099928578507223, L(p,q)-L0 = -0.0019453861393932 +t = 75.8000, H(p,q)-H0 = -0.0099929067108120, L(p,q)-L0 = -0.0019453885176047 +t = 75.9000, H(p,q)-H0 = -0.0099929397976624, L(p,q)-L0 = -0.0019453901489064 +t = 76.0000, H(p,q)-H0 = -0.0099929626865476, L(p,q)-L0 = -0.0019453913058545 +t = 76.1000, H(p,q)-H0 = -0.0099929788265547, L(p,q)-L0 = -0.0019453921515604 +t = 76.2000, H(p,q)-H0 = -0.0099929904045709, L(p,q)-L0 = -0.0019453927870905 +t = 76.3000, H(p,q)-H0 = -0.0099929988385175, L(p,q)-L0 = -0.0019453932770516 +t = 76.4000, H(p,q)-H0 = -0.0099930050665622, L(p,q)-L0 = -0.0019453936639264 +t = 76.5000, H(p,q)-H0 = -0.0099930097209175, L(p,q)-L0 = -0.0019453939763810 +t = 76.6000, H(p,q)-H0 = -0.0099930132346632, L(p,q)-L0 = -0.0019453942342287 +t = 76.7000, H(p,q)-H0 = -0.0099930159087687, L(p,q)-L0 = -0.0019453944514792 +t = 76.8000, H(p,q)-H0 = -0.0099930179549358, L(p,q)-L0 = -0.0019453946382598 +t = 76.9000, H(p,q)-H0 = -0.0099930195234442, L(p,q)-L0 = -0.0019453948020579 +t = 77.0000, H(p,q)-H0 = -0.0099930207215003, L(p,q)-L0 = -0.0019453949485412 +t = 77.1000, H(p,q)-H0 = -0.0099930216254550, L(p,q)-L0 = -0.0019453950821140 +t = 77.2000, H(p,q)-H0 = -0.0099930222889737, L(p,q)-L0 = -0.0019453952063045 +t = 77.3000, H(p,q)-H0 = -0.0099930227484619, L(p,q)-L0 = -0.0019453953240427 +t = 77.4000, H(p,q)-H0 = -0.0099930230265628, L(p,q)-L0 = -0.0019453954378694 +t = 77.5000, H(p,q)-H0 = -0.0099930231342297, L(p,q)-L0 = -0.0019453955501012 +t = 77.6000, H(p,q)-H0 = -0.0099930230716538, L(p,q)-L0 = -0.0019453956629731 +t = 77.7000, H(p,q)-H0 = -0.0099930228281742, L(p,q)-L0 = -0.0019453957787718 +t = 77.8000, H(p,q)-H0 = -0.0099930223811472, L(p,q)-L0 = -0.0019453958999783 +t = 77.9000, H(p,q)-H0 = -0.0099930216936193, L(p,q)-L0 = -0.0019453960294287 +t = 78.0000, H(p,q)-H0 = -0.0099930207104675, L(p,q)-L0 = -0.0019453961705185 +t = 78.1000, H(p,q)-H0 = -0.0099930193524340, L(p,q)-L0 = -0.0019453963274751 +t = 78.2000, H(p,q)-H0 = -0.0099930175071323, L(p,q)-L0 = -0.0019453965057353 +t = 78.3000, H(p,q)-H0 = -0.0099930150155447, L(p,q)-L0 = -0.0019453967124932 +t = 78.4000, H(p,q)-H0 = -0.0099930116516529, L(p,q)-L0 = -0.0019453969575093 +t = 78.5000, H(p,q)-H0 = -0.0099930070913876, L(p,q)-L0 = -0.0019453972543433 +t = 78.6000, H(p,q)-H0 = -0.0099930008646626, L(p,q)-L0 = -0.0019453976222752 +t = 78.7000, H(p,q)-H0 = -0.0099929922801030, L(p,q)-L0 = -0.0019453980893771 +t = 78.8000, H(p,q)-H0 = -0.0099929803048895, L(p,q)-L0 = -0.0019453986975518 +t = 78.9000, H(p,q)-H0 = -0.0099929633694020, L(p,q)-L0 = -0.0019453995110439 +t = 79.0000, H(p,q)-H0 = -0.0099929390434504, L(p,q)-L0 = -0.0019454006312738 +t = 79.1000, H(p,q)-H0 = -0.0099929034891034, L(p,q)-L0 = -0.0019454022235986 +t = 79.2000, H(p,q)-H0 = -0.0099928505181908, L(p,q)-L0 = -0.0019454045674818 +t = 79.3000, H(p,q)-H0 = -0.0099927699410771, L(p,q)-L0 = -0.0019454081546778 +t = 79.4000, H(p,q)-H0 = -0.0099926446394676, L(p,q)-L0 = -0.0019454138908312 +t = 79.5000, H(p,q)-H0 = -0.0099924453775971, L(p,q)-L0 = -0.0019454235324121 +t = 79.6000, H(p,q)-H0 = -0.0099921218572024, L(p,q)-L0 = -0.0019454406931061 +t = 79.7000, H(p,q)-H0 = -0.0099915888158008, L(p,q)-L0 = -0.0019454733259514 +t = 79.8000, H(p,q)-H0 = -0.0099907119132548, L(p,q)-L0 = -0.0019455403302662 +t = 79.9000, H(p,q)-H0 = -0.0099893311045773, L(p,q)-L0 = -0.0019456906613882 +t = 80.0000, H(p,q)-H0 = -0.0099874948349223, L(p,q)-L0 = -0.0019460635333235 +t = 80.1000, H(p,q)-H0 = -0.0099864325318035, L(p,q)-L0 = -0.0019470927598084 +t = 80.2000, H(p,q)-H0 = -0.0099901407162957, L(p,q)-L0 = -0.0019502200530284 +t = 80.3000, H(p,q)-H0 = -0.0099973031746305, L(p,q)-L0 = -0.0019601120156503 +t = 80.4000, H(p,q)-H0 = -0.0100076678096364, L(p,q)-L0 = -0.0019882381312694 +t = 80.5000, H(p,q)-H0 = -0.0102652773603542, L(p,q)-L0 = -0.0020426185319661 +t = 80.6000, H(p,q)-H0 = -0.0107122095982610, L(p,q)-L0 = -0.0020951695459250 +t = 80.7000, H(p,q)-H0 = -0.0108935265306584, L(p,q)-L0 = -0.0021168275531895 +t = 80.8000, H(p,q)-H0 = -0.0108966652558362, L(p,q)-L0 = -0.0021171156794441 +t = 80.9000, H(p,q)-H0 = -0.0108980018669784, L(p,q)-L0 = -0.0021172397894572 +t = 81.0000, H(p,q)-H0 = -0.0109057163954509, L(p,q)-L0 = -0.0021181207208465 +t = 81.1000, H(p,q)-H0 = -0.0109092481893738, L(p,q)-L0 = -0.0021184469465749 +t = 81.2000, H(p,q)-H0 = -0.0109110121363254, L(p,q)-L0 = -0.0021185818700191 +t = 81.3000, H(p,q)-H0 = -0.0109119484544988, L(p,q)-L0 = -0.0021186435303976 +t = 81.4000, H(p,q)-H0 = -0.0109124706068250, L(p,q)-L0 = -0.0021186742581565 +t = 81.5000, H(p,q)-H0 = -0.0109127744907085, L(p,q)-L0 = -0.0021186907513099 +t = 81.6000, H(p,q)-H0 = -0.0109129581413182, L(p,q)-L0 = -0.0021187001863054 +t = 81.7000, H(p,q)-H0 = -0.0109130729124098, L(p,q)-L0 = -0.0021187058886171 +t = 81.8000, H(p,q)-H0 = -0.0109131468118039, L(p,q)-L0 = -0.0021187095037902 +t = 81.9000, H(p,q)-H0 = -0.0109131956795278, L(p,q)-L0 = -0.0021187118940683 +t = 82.0000, H(p,q)-H0 = -0.0109132287734842, L(p,q)-L0 = -0.0021187135344699 +t = 82.1000, H(p,q)-H0 = -0.0109132516683955, L(p,q)-L0 = -0.0021187146984795 +t = 82.2000, H(p,q)-H0 = -0.0109132678132625, L(p,q)-L0 = -0.0021187155498146 +t = 82.3000, H(p,q)-H0 = -0.0109132793950569, L(p,q)-L0 = -0.0021187161899480 +t = 82.4000, H(p,q)-H0 = -0.0109132878318280, L(p,q)-L0 = -0.0021187166837658 +t = 82.5000, H(p,q)-H0 = -0.0109132940618613, L(p,q)-L0 = -0.0021187170739476 +t = 82.6000, H(p,q)-H0 = -0.0109132987174561, L(p,q)-L0 = -0.0021187173893020 +t = 82.7000, H(p,q)-H0 = -0.0109133022317410, L(p,q)-L0 = -0.0021187176497479 +t = 82.8000, H(p,q)-H0 = -0.0109133049056946, L(p,q)-L0 = -0.0021187178693753 +t = 82.9000, H(p,q)-H0 = -0.0109133069509852, L(p,q)-L0 = -0.0021187180583759 +t = 83.0000, H(p,q)-H0 = -0.0109133085178130, L(p,q)-L0 = -0.0021187182242896 +t = 83.1000, H(p,q)-H0 = -0.0109133097132526, L(p,q)-L0 = -0.0021187183728291 +t = 83.2000, H(p,q)-H0 = -0.0109133106134618, L(p,q)-L0 = -0.0021187185084398 +t = 83.3000, H(p,q)-H0 = -0.0109133112718355, L(p,q)-L0 = -0.0021187186346895 +t = 83.4000, H(p,q)-H0 = -0.0109133117244098, L(p,q)-L0 = -0.0021187187545486 +t = 83.5000, H(p,q)-H0 = -0.0109133119933285, L(p,q)-L0 = -0.0021187188706012 +t = 83.6000, H(p,q)-H0 = -0.0109133120888704, L(p,q)-L0 = -0.0021187189852138 +t = 83.7000, H(p,q)-H0 = -0.0109133120103146, L(p,q)-L0 = -0.0021187191006796 +t = 83.8000, H(p,q)-H0 = -0.0109133117457603, L(p,q)-L0 = -0.0021187192193588 +t = 83.9000, H(p,q)-H0 = -0.0109133112708661, L(p,q)-L0 = -0.0021187193438232 +t = 84.0000, H(p,q)-H0 = -0.0109133105463348, L(p,q)-L0 = -0.0021187194770287 +t = 84.1000, H(p,q)-H0 = -0.0109133095137762, L(p,q)-L0 = -0.0021187196225296 +t = 84.2000, H(p,q)-H0 = -0.0109133080893308, L(p,q)-L0 = -0.0021187197847686 +t = 84.3000, H(p,q)-H0 = -0.0109133061540541, L(p,q)-L0 = -0.0021187199694810 +t = 84.4000, H(p,q)-H0 = -0.0109133035394668, L(p,q)-L0 = -0.0021187201842813 +t = 84.5000, H(p,q)-H0 = -0.0109133000057140, L(p,q)-L0 = -0.0021187204395356 +t = 84.6000, H(p,q)-H0 = -0.0109132952081982, L(p,q)-L0 = -0.0021187207496935 +t = 84.7000, H(p,q)-H0 = -0.0109132886459009, L(p,q)-L0 = -0.0021187211353736 +t = 84.8000, H(p,q)-H0 = -0.0109132795800588, L(p,q)-L0 = -0.0021187216267085 +t = 84.9000, H(p,q)-H0 = -0.0109132669039578, L(p,q)-L0 = -0.0021187222688603 +t = 85.0000, H(p,q)-H0 = -0.0109132489305745, L(p,q)-L0 = -0.0021187231313811 +t = 85.1000, H(p,q)-H0 = -0.0109132230394979, L(p,q)-L0 = -0.0021187243246132 +t = 85.2000, H(p,q)-H0 = -0.0109131850783282, L(p,q)-L0 = -0.0021187260294560 +t = 85.3000, H(p,q)-H0 = -0.0109131283285595, L(p,q)-L0 = -0.0021187285535456 +t = 85.4000, H(p,q)-H0 = -0.0109130416896392, L(p,q)-L0 = -0.0021187324420242 +t = 85.5000, H(p,q)-H0 = -0.0109129064569512, L(p,q)-L0 = -0.0021187387069049 +t = 85.6000, H(p,q)-H0 = -0.0109126906237351, L(p,q)-L0 = -0.0021187493289231 +t = 85.7000, H(p,q)-H0 = -0.0109123391583420, L(p,q)-L0 = -0.0021187684258649 +t = 85.8000, H(p,q)-H0 = -0.0109117594129803, L(p,q)-L0 = -0.0021188051687964 +t = 85.9000, H(p,q)-H0 = -0.0109108089979079, L(p,q)-L0 = -0.0021188816475575 +t = 86.0000, H(p,q)-H0 = -0.0109093359888048, L(p,q)-L0 = -0.0021190559410214 +t = 86.1000, H(p,q)-H0 = -0.0109074877484749, L(p,q)-L0 = -0.0021194957735100 +t = 86.2000, H(p,q)-H0 = -0.0109068714091538, L(p,q)-L0 = -0.0021207307407236 +t = 86.3000, H(p,q)-H0 = -0.0109117577875528, L(p,q)-L0 = -0.0021245275668438 +t = 86.4000, H(p,q)-H0 = -0.0109176053620308, L(p,q)-L0 = -0.0021364754662838 +t = 86.5000, H(p,q)-H0 = -0.0109427930922656, L(p,q)-L0 = -0.0021690381103824 +t = 86.6000, H(p,q)-H0 = -0.0112644651000506, L(p,q)-L0 = -0.0022260572940562 +t = 86.7000, H(p,q)-H0 = -0.0116323667023930, L(p,q)-L0 = -0.0022679916296054 +t = 86.8000, H(p,q)-H0 = -0.0116372347037963, L(p,q)-L0 = -0.0022683538164008 +t = 86.9000, H(p,q)-H0 = -0.0116454975036508, L(p,q)-L0 = -0.0022692781225820 +t = 87.0000, H(p,q)-H0 = -0.0116619947467989, L(p,q)-L0 = -0.0022714723389374 +t = 87.1000, H(p,q)-H0 = -0.0116687181480568, L(p,q)-L0 = -0.0022722141677665 +t = 87.2000, H(p,q)-H0 = -0.0116718503324800, L(p,q)-L0 = -0.0022724942307270 +t = 87.3000, H(p,q)-H0 = -0.0116734325350082, L(p,q)-L0 = -0.0022726121559400 +t = 87.4000, H(p,q)-H0 = -0.0116742798242482, L(p,q)-L0 = -0.0022726669011819 +t = 87.5000, H(p,q)-H0 = -0.0116747558965855, L(p,q)-L0 = -0.0022726945542673 +t = 87.6000, H(p,q)-H0 = -0.0116750348034620, L(p,q)-L0 = -0.0022727095705783 +t = 87.7000, H(p,q)-H0 = -0.0116752043535724, L(p,q)-L0 = -0.0022727182474204 +t = 87.8000, H(p,q)-H0 = -0.0116753108690369, L(p,q)-L0 = -0.0022727235376084 +t = 87.9000, H(p,q)-H0 = -0.0116753797737961, L(p,q)-L0 = -0.0022727269174422 +t = 88.0000, H(p,q)-H0 = -0.0116754255291172, L(p,q)-L0 = -0.0022727291675011 +t = 88.1000, H(p,q)-H0 = -0.0116754566310913, L(p,q)-L0 = -0.0022727307212435 +t = 88.2000, H(p,q)-H0 = -0.0116754782198893, L(p,q)-L0 = -0.0022727318299871 +t = 88.3000, H(p,q)-H0 = -0.0116754934893036, L(p,q)-L0 = -0.0022727326451254 +t = 88.4000, H(p,q)-H0 = -0.0116755044723642, L(p,q)-L0 = -0.0022727332610225 +t = 88.5000, H(p,q)-H0 = -0.0116755124919519, L(p,q)-L0 = -0.0022727337383271 +t = 88.6000, H(p,q)-H0 = -0.0116755184261677, L(p,q)-L0 = -0.0022727341171190 +t = 88.7000, H(p,q)-H0 = -0.0116755228684349, L(p,q)-L0 = -0.0022727344245699 +t = 88.8000, H(p,q)-H0 = -0.0116755262262619, L(p,q)-L0 = -0.0022727346795451 +t = 88.9000, H(p,q)-H0 = -0.0116755287834091, L(p,q)-L0 = -0.0022727348954440 +t = 89.0000, H(p,q)-H0 = -0.0116755307397417, L(p,q)-L0 = -0.0022727350819987 +t = 89.1000, H(p,q)-H0 = -0.0116755322371913, L(p,q)-L0 = -0.0022727352464408 +t = 89.2000, H(p,q)-H0 = -0.0116755333768903, L(p,q)-L0 = -0.0022727353942779 +t = 89.3000, H(p,q)-H0 = -0.0116755342305835, L(p,q)-L0 = -0.0022727355298210 +t = 89.4000, H(p,q)-H0 = -0.0116755348482395, L(p,q)-L0 = -0.0022727356565552 +t = 89.5000, H(p,q)-H0 = -0.0116755352630685, L(p,q)-L0 = -0.0022727357774082 +t = 89.6000, H(p,q)-H0 = -0.0116755354946961, L(p,q)-L0 = -0.0022727358949552 +t = 89.7000, H(p,q)-H0 = -0.0116755355509413, L(p,q)-L0 = -0.0022727360115843 +t = 89.8000, H(p,q)-H0 = -0.0116755354284488, L(p,q)-L0 = -0.0022727361296420 +t = 89.9000, H(p,q)-H0 = -0.0116755351122514, L(p,q)-L0 = -0.0022727362515771 +t = 90.0000, H(p,q)-H0 = -0.0116755345742000, L(p,q)-L0 = -0.0022727363800956 +t = 90.1000, H(p,q)-H0 = -0.0116755337700345, L(p,q)-L0 = -0.0022727365183433 +t = 90.2000, H(p,q)-H0 = -0.0116755326346694, L(p,q)-L0 = -0.0022727366701436 +t = 90.3000, H(p,q)-H0 = -0.0116755310749777, L(p,q)-L0 = -0.0022727368403186 +t = 90.4000, H(p,q)-H0 = -0.0116755289589217, L(p,q)-L0 = -0.0022727370351420 +t = 90.5000, H(p,q)-H0 = -0.0116755260991936, L(p,q)-L0 = -0.0022727372630031 +t = 90.6000, H(p,q)-H0 = -0.0116755222284115, L(p,q)-L0 = -0.0022727375353997 +t = 90.7000, H(p,q)-H0 = -0.0116755169610728, L(p,q)-L0 = -0.0022727378684673 +t = 90.8000, H(p,q)-H0 = -0.0116755097343482, L(p,q)-L0 = -0.0022727382853873 +t = 90.9000, H(p,q)-H0 = -0.0116754997144365, L(p,q)-L0 = -0.0022727388202846 +t = 91.0000, H(p,q)-H0 = -0.0116754856458056, L(p,q)-L0 = -0.0022727395247037 +t = 91.1000, H(p,q)-H0 = -0.0116754656038935, L(p,q)-L0 = -0.0022727404787057 +t = 91.2000, H(p,q)-H0 = -0.0116754365815127, L(p,q)-L0 = -0.0022727418105053 +t = 91.3000, H(p,q)-H0 = -0.0116753937835889, L(p,q)-L0 = -0.0022727437325208 +t = 91.4000, H(p,q)-H0 = -0.0116753294023650, L(p,q)-L0 = -0.0022727466102721 +t = 91.5000, H(p,q)-H0 = -0.0116752304582204, L(p,q)-L0 = -0.0022727511001586 +t = 91.6000, H(p,q)-H0 = -0.0116750749654719, L(p,q)-L0 = -0.0022727584393155 +t = 91.7000, H(p,q)-H0 = -0.0116748251936716, L(p,q)-L0 = -0.0022727710912600 +t = 91.8000, H(p,q)-H0 = -0.0116744164450329, L(p,q)-L0 = -0.0022727942795326 +t = 91.9000, H(p,q)-H0 = -0.0116737416172368, L(p,q)-L0 = -0.0022728399028177 +t = 92.0000, H(p,q)-H0 = -0.0116726458137774, L(p,q)-L0 = -0.0022729373581436 +t = 92.1000, H(p,q)-H0 = -0.0116710115452102, L(p,q)-L0 = -0.0022731661146591 +t = 92.2000, H(p,q)-H0 = -0.0116692481593472, L(p,q)-L0 = -0.0022737621967697 +t = 92.3000, H(p,q)-H0 = -0.0116697896420428, L(p,q)-L0 = -0.0022754874715050 +t = 92.4000, H(p,q)-H0 = -0.0116766108467816, L(p,q)-L0 = -0.0022808835902508 +t = 92.5000, H(p,q)-H0 = -0.0116791563101679, L(p,q)-L0 = -0.0022975180778501 +t = 92.6000, H(p,q)-H0 = -0.0117582336754383, L(p,q)-L0 = -0.0023386163845479 +t = 92.7000, H(p,q)-H0 = -0.0121738144424437, L(p,q)-L0 = -0.0023975048360171 +t = 92.8000, H(p,q)-H0 = -0.0123755807079817, L(p,q)-L0 = -0.0024193198001374 +t = 92.9000, H(p,q)-H0 = -0.0123955007862977, L(p,q)-L0 = -0.0024213660042965 +t = 93.0000, H(p,q)-H0 = -0.0124303709461078, L(p,q)-L0 = -0.0024262866412741 +t = 93.1000, H(p,q)-H0 = -0.0124427179370294, L(p,q)-L0 = -0.0024278520627135 +t = 93.2000, H(p,q)-H0 = -0.0124479999929756, L(p,q)-L0 = -0.0024283989214057 +t = 93.3000, H(p,q)-H0 = -0.0124505310686296, L(p,q)-L0 = -0.0024286125916958 +t = 93.4000, H(p,q)-H0 = -0.0124518344154581, L(p,q)-L0 = -0.0024287054229380 +t = 93.5000, H(p,q)-H0 = -0.0124525431794179, L(p,q)-L0 = -0.0024287497097740 +t = 93.6000, H(p,q)-H0 = -0.0124529467210605, L(p,q)-L0 = -0.0024287726102160 +t = 93.7000, H(p,q)-H0 = -0.0124531859118437, L(p,q)-L0 = -0.0024287852984457 +t = 93.8000, H(p,q)-H0 = -0.0124533328344218, L(p,q)-L0 = -0.0024287927586206 +t = 93.9000, H(p,q)-H0 = -0.0124534259915194, L(p,q)-L0 = -0.0024287973764554 +t = 94.0000, H(p,q)-H0 = -0.0124534867535154, L(p,q)-L0 = -0.0024288003663469 +t = 94.1000, H(p,q)-H0 = -0.0124535273999505, L(p,q)-L0 = -0.0024288023805756 +t = 94.2000, H(p,q)-H0 = -0.0124535552118401, L(p,q)-L0 = -0.0024288037864038 +t = 94.3000, H(p,q)-H0 = -0.0124535746311821, L(p,q)-L0 = -0.0024288047993952 +t = 94.4000, H(p,q)-H0 = -0.0124535884389774, L(p,q)-L0 = -0.0024288055508315 +t = 94.5000, H(p,q)-H0 = -0.0124535984177182, L(p,q)-L0 = -0.0024288061233486 +t = 94.6000, H(p,q)-H0 = -0.0124536057345193, L(p,q)-L0 = -0.0024288065705326 +t = 94.7000, H(p,q)-H0 = -0.0124536111684569, L(p,q)-L0 = -0.0024288069280863 +t = 94.8000, H(p,q)-H0 = -0.0124536152486828, L(p,q)-L0 = -0.0024288072204000 +t = 94.9000, H(p,q)-H0 = -0.0124536183401623, L(p,q)-L0 = -0.0024288074645308 +t = 95.0000, H(p,q)-H0 = -0.0124536206979511, L(p,q)-L0 = -0.0024288076726805 +t = 95.1000, H(p,q)-H0 = -0.0124536225021683, L(p,q)-L0 = -0.0024288078537766 +t = 95.2000, H(p,q)-H0 = -0.0124536238808726, L(p,q)-L0 = -0.0024288080145057 +t = 95.3000, H(p,q)-H0 = -0.0124536249252047, L(p,q)-L0 = -0.0024288081600046 +t = 95.4000, H(p,q)-H0 = -0.0124536256994822, L(p,q)-L0 = -0.0024288082943376 +t = 95.5000, H(p,q)-H0 = -0.0124536262479096, L(p,q)-L0 = -0.0024288084208313 +t = 95.6000, H(p,q)-H0 = -0.0124536265989559, L(p,q)-L0 = -0.0024288085423254 +t = 95.7000, H(p,q)-H0 = -0.0124536267680351, L(p,q)-L0 = -0.0024288086613631 +t = 95.8000, H(p,q)-H0 = -0.0124536267588753, L(p,q)-L0 = -0.0024288087803535 +t = 95.9000, H(p,q)-H0 = -0.0124536265637566, L(p,q)-L0 = -0.0024288089017174 +t = 96.0000, H(p,q)-H0 = -0.0124536261626464, L(p,q)-L0 = -0.0024288090280378 +t = 96.1000, H(p,q)-H0 = -0.0124536255211083, L(p,q)-L0 = -0.0024288091622261 +t = 96.2000, H(p,q)-H0 = -0.0124536245866796, L(p,q)-L0 = -0.0024288093077297 +t = 96.3000, H(p,q)-H0 = -0.0124536232831824, L(p,q)-L0 = -0.0024288094688035 +t = 96.4000, H(p,q)-H0 = -0.0124536215020822, L(p,q)-L0 = -0.0024288096508844 +t = 96.5000, H(p,q)-H0 = -0.0124536190894825, L(p,q)-L0 = -0.0024288098611279 +t = 96.6000, H(p,q)-H0 = -0.0124536158264926, L(p,q)-L0 = -0.0024288101092036 +t = 96.7000, H(p,q)-H0 = -0.0124536113993123, L(p,q)-L0 = -0.0024288104084977 +t = 96.8000, H(p,q)-H0 = -0.0124536053530625, L(p,q)-L0 = -0.0024288107779832 +t = 96.9000, H(p,q)-H0 = -0.0124535970194308, L(p,q)-L0 = -0.0024288112452016 +t = 97.0000, H(p,q)-H0 = -0.0124535854013511, L(p,q)-L0 = -0.0024288118511404 +t = 97.1000, H(p,q)-H0 = -0.0124535689858291, L(p,q)-L0 = -0.0024288126584459 +t = 97.2000, H(p,q)-H0 = -0.0124535454342959, L(p,q)-L0 = -0.0024288137656887 +t = 97.3000, H(p,q)-H0 = -0.0124535110602939, L(p,q)-L0 = -0.0024288153330081 +t = 97.4000, H(p,q)-H0 = -0.0124534599314556, L(p,q)-L0 = -0.0024288176299959 +t = 97.5000, H(p,q)-H0 = -0.0124533822988214, L(p,q)-L0 = -0.0024288211289933 +t = 97.6000, H(p,q)-H0 = -0.0124532618155920, L(p,q)-L0 = -0.0024288266957104 +t = 97.7000, H(p,q)-H0 = -0.0124530706063499, L(p,q)-L0 = -0.0024288360000898 +t = 97.8000, H(p,q)-H0 = -0.0124527607382662, L(p,q)-L0 = -0.0024288524567904 +t = 97.9000, H(p,q)-H0 = -0.0124522507900346, L(p,q)-L0 = -0.0024288835286854 +t = 98.0000, H(p,q)-H0 = -0.0124514112422069, L(p,q)-L0 = -0.0024289468110305 +t = 98.1000, H(p,q)-H0 = -0.0124500811734186, L(p,q)-L0 = -0.0024290874823376 +t = 98.2000, H(p,q)-H0 = -0.0124482695694264, L(p,q)-L0 = -0.0024294328175133 +t = 98.3000, H(p,q)-H0 = -0.0124470299590245, L(p,q)-L0 = -0.0024303759449791 +t = 98.4000, H(p,q)-H0 = -0.0124501139070228, L(p,q)-L0 = -0.0024332167691324 +t = 98.5000, H(p,q)-H0 = -0.0124576094149678, L(p,q)-L0 = -0.0024421909866428 +t = 98.6000, H(p,q)-H0 = -0.0124638902954999, L(p,q)-L0 = -0.0024681290658568 +t = 98.7000, H(p,q)-H0 = -0.0126868310443740, L(p,q)-L0 = -0.0025206442098520 +t = 98.8000, H(p,q)-H0 = -0.0131398083461249, L(p,q)-L0 = -0.0025749301252771 +t = 98.9000, H(p,q)-H0 = -0.0133186544649435, L(p,q)-L0 = -0.0025957518242055 +t = 99.0000, H(p,q)-H0 = -0.0133255524005569, L(p,q)-L0 = -0.0025964523002127 +t = 99.1000, H(p,q)-H0 = -0.0133470245619602, L(p,q)-L0 = -0.0025994011442716 +t = 99.2000, H(p,q)-H0 = -0.0133553709752087, L(p,q)-L0 = -0.0026003744569378 +t = 99.3000, H(p,q)-H0 = -0.0133591527969216, L(p,q)-L0 = -0.0026007318076002 +t = 99.4000, H(p,q)-H0 = -0.0133610292872759, L(p,q)-L0 = -0.0026008783885043 +t = 99.5000, H(p,q)-H0 = -0.0133620204630073, L(p,q)-L0 = -0.0026009448917919 +t = 99.6000, H(p,q)-H0 = -0.0133625709511405, L(p,q)-L0 = -0.0026009778290205 +t = 99.7000, H(p,q)-H0 = -0.0133628901886764, L(p,q)-L0 = -0.0026009954167799 +t = 99.8000, H(p,q)-H0 = -0.0133630825131530, L(p,q)-L0 = -0.0026010054345476 +t = 99.9000, H(p,q)-H0 = -0.0133632023698425, L(p,q)-L0 = -0.0026010114673212 +t = 100.0000, H(p,q)-H0 = -0.0133632793518368, L(p,q)-L0 = -0.0026010152805880 +Current time = 99.99999999999859 +Steps = 1056 +Step attempts = 1056 +Stability limited steps = 0 +Accuracy limited steps = 1056 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 8.68300493183068e-07 +Last step size = 0.09999999999999423 +Current step size = 0.2846790776698955 +Explicit RHS fn evals = 6339 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--find-roots.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--find-roots.out new file mode 100644 index 0000000000..9307d57e8d --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--find-roots.out @@ -0,0 +1,1092 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.01 + Tf: 100 + nout: 1000 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 0.1000, H(p,q)-H0 = -0.0000000160027134, L(p,q)-L0 = -0.0000000005493835 +t = 0.2000, H(p,q)-H0 = -0.0000000305302281, L(p,q)-L0 = -0.0000000008375776 +t = 0.3000, H(p,q)-H0 = -0.0000000349311686, L(p,q)-L0 = -0.0000000009378226 +t = 0.4000, H(p,q)-H0 = -0.0000000362841635, L(p,q)-L0 = -0.0000000009687934 +t = 0.5000, H(p,q)-H0 = -0.0000000368925305, L(p,q)-L0 = -0.0000000009788188 +t = 0.6000, H(p,q)-H0 = -0.0000000372114828, L(p,q)-L0 = -0.0000000009824211 +t = 0.7000, H(p,q)-H0 = -0.0000000373845837, L(p,q)-L0 = -0.0000000009838701 +t = 0.8000, H(p,q)-H0 = -0.0000000374806094, L(p,q)-L0 = -0.0000000009845156 +t = 0.9000, H(p,q)-H0 = -0.0000000375353342, L(p,q)-L0 = -0.0000000009848300 +t = 1.0000, H(p,q)-H0 = -0.0000000375674831, L(p,q)-L0 = -0.0000000009849955 +ROOT RETURN: t = 1.0305 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 1.0305, H(p,q)-H0 = -0.0000000375684264, L(p,q)-L0 = -0.0000000009740738 +t = 1.1000, H(p,q)-H0 = -0.0000000375869624, L(p,q)-L0 = -0.0000000009850890 +t = 1.2000, H(p,q)-H0 = -0.0000000375991196, L(p,q)-L0 = -0.0000000009851442 +t = 1.3000, H(p,q)-H0 = -0.0000000376069209, L(p,q)-L0 = -0.0000000009851789 +t = 1.4000, H(p,q)-H0 = -0.0000000376120546, L(p,q)-L0 = -0.0000000009852015 +t = 1.5000, H(p,q)-H0 = -0.0000000376155123, L(p,q)-L0 = -0.0000000009852162 +t = 1.6000, H(p,q)-H0 = -0.0000000376178898, L(p,q)-L0 = -0.0000000009852270 +t = 1.7000, H(p,q)-H0 = -0.0000000376195555, L(p,q)-L0 = -0.0000000009852346 +t = 1.8000, H(p,q)-H0 = -0.0000000376207424, L(p,q)-L0 = -0.0000000009852404 +t = 1.9000, H(p,q)-H0 = -0.0000000376216013, L(p,q)-L0 = -0.0000000009852450 +t = 2.0000, H(p,q)-H0 = -0.0000000376222309, L(p,q)-L0 = -0.0000000009852485 +t = 2.1000, H(p,q)-H0 = -0.0000000376226977, L(p,q)-L0 = -0.0000000009852511 +t = 2.2000, H(p,q)-H0 = -0.0000000376230473, L(p,q)-L0 = -0.0000000009852534 +t = 2.3000, H(p,q)-H0 = -0.0000000376233115, L(p,q)-L0 = -0.0000000009852554 +t = 2.4000, H(p,q)-H0 = -0.0000000376235114, L(p,q)-L0 = -0.0000000009852563 +t = 2.5000, H(p,q)-H0 = -0.0000000376236637, L(p,q)-L0 = -0.0000000009852577 +t = 2.6000, H(p,q)-H0 = -0.0000000376237794, L(p,q)-L0 = -0.0000000009852589 +t = 2.7000, H(p,q)-H0 = -0.0000000376238660, L(p,q)-L0 = -0.0000000009852595 +t = 2.8000, H(p,q)-H0 = -0.0000000376239300, L(p,q)-L0 = -0.0000000009852608 +t = 2.9000, H(p,q)-H0 = -0.0000000376239746, L(p,q)-L0 = -0.0000000009852614 +t = 3.0000, H(p,q)-H0 = -0.0000000376240032, L(p,q)-L0 = -0.0000000009852625 +t = 3.1000, H(p,q)-H0 = -0.0000000376240172, L(p,q)-L0 = -0.0000000009852634 +t = 3.2000, H(p,q)-H0 = -0.0000000376240173, L(p,q)-L0 = -0.0000000009852644 +t = 3.3000, H(p,q)-H0 = -0.0000000376240037, L(p,q)-L0 = -0.0000000009852654 +t = 3.4000, H(p,q)-H0 = -0.0000000376239754, L(p,q)-L0 = -0.0000000009852664 +t = 3.5000, H(p,q)-H0 = -0.0000000376239306, L(p,q)-L0 = -0.0000000009852675 +t = 3.6000, H(p,q)-H0 = -0.0000000376238667, L(p,q)-L0 = -0.0000000009852685 +t = 3.7000, H(p,q)-H0 = -0.0000000376237788, L(p,q)-L0 = -0.0000000009852693 +t = 3.8000, H(p,q)-H0 = -0.0000000376236617, L(p,q)-L0 = -0.0000000009852704 +t = 3.9000, H(p,q)-H0 = -0.0000000376235065, L(p,q)-L0 = -0.0000000009852718 +t = 4.0000, H(p,q)-H0 = -0.0000000376233024, L(p,q)-L0 = -0.0000000009852736 +t = 4.1000, H(p,q)-H0 = -0.0000000376230324, L(p,q)-L0 = -0.0000000009852752 +t = 4.2000, H(p,q)-H0 = -0.0000000376226734, L(p,q)-L0 = -0.0000000009852775 +t = 4.3000, H(p,q)-H0 = -0.0000000376221935, L(p,q)-L0 = -0.0000000009852809 +t = 4.4000, H(p,q)-H0 = -0.0000000376215443, L(p,q)-L0 = -0.0000000009852843 +t = 4.5000, H(p,q)-H0 = -0.0000000376206565, L(p,q)-L0 = -0.0000000009852892 +t = 4.6000, H(p,q)-H0 = -0.0000000376194254, L(p,q)-L0 = -0.0000000009852956 +t = 4.7000, H(p,q)-H0 = -0.0000000376176930, L(p,q)-L0 = -0.0000000009853038 +t = 4.8000, H(p,q)-H0 = -0.0000000376152129, L(p,q)-L0 = -0.0000000009853149 +t = 4.9000, H(p,q)-H0 = -0.0000000376115963, L(p,q)-L0 = -0.0000000009853304 +t = 5.0000, H(p,q)-H0 = -0.0000000376062106, L(p,q)-L0 = -0.0000000009853541 +t = 5.1000, H(p,q)-H0 = -0.0000000375980049, L(p,q)-L0 = -0.0000000009853905 +t = 5.2000, H(p,q)-H0 = -0.0000000375851829, L(p,q)-L0 = -0.0000000009854489 +t = 5.3000, H(p,q)-H0 = -0.0000000375645972, L(p,q)-L0 = -0.0000000009855475 +t = 5.4000, H(p,q)-H0 = -0.0000000375305920, L(p,q)-L0 = -0.0000000009857243 +t = 5.5000, H(p,q)-H0 = -0.0000000374727896, L(p,q)-L0 = -0.0000000009860630 +t = 5.6000, H(p,q)-H0 = -0.0000000373719746, L(p,q)-L0 = -0.0000000009867646 +t = 5.7000, H(p,q)-H0 = -0.0000000371929997, L(p,q)-L0 = -0.0000000009883538 +t = 5.8000, H(p,q)-H0 = -0.0000000368740779, L(p,q)-L0 = -0.0000000009923597 +t = 5.9000, H(p,q)-H0 = -0.0000000363018533, L(p,q)-L0 = -0.0000000010036497 +t = 6.0000, H(p,q)-H0 = -0.0000000350889811, L(p,q)-L0 = -0.0000000010388295 +t = 6.1000, H(p,q)-H0 = -0.0000000309316439, L(p,q)-L0 = -0.0000000011521937 +ROOT RETURN: t = 6.1690 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 6.1690, H(p,q)-H0 = -0.0000000290360871, L(p,q)-L0 = -0.0000000034672842 +t = 6.2000, H(p,q)-H0 = -0.0000000181206687, L(p,q)-L0 = -0.0000000014682437 +t = 6.3000, H(p,q)-H0 = -0.0000000119458055, L(p,q)-L0 = -0.0000000020348256 +t = 6.4000, H(p,q)-H0 = -0.0000000302352290, L(p,q)-L0 = -0.0000000025489727 +t = 6.5000, H(p,q)-H0 = -0.0000000426121982, L(p,q)-L0 = -0.0000000027950873 +t = 6.6000, H(p,q)-H0 = -0.0000000461368410, L(p,q)-L0 = -0.0000000028775315 +t = 6.7000, H(p,q)-H0 = -0.0000000472937363, L(p,q)-L0 = -0.0000000029030033 +t = 6.8000, H(p,q)-H0 = -0.0000000478367490, L(p,q)-L0 = -0.0000000029113768 +t = 6.9000, H(p,q)-H0 = -0.0000000481241171, L(p,q)-L0 = -0.0000000029144436 +t = 7.0000, H(p,q)-H0 = -0.0000000482806308, L(p,q)-L0 = -0.0000000029156998 +t = 7.1000, H(p,q)-H0 = -0.0000000483678173, L(p,q)-L0 = -0.0000000029162688 +t = 7.2000, H(p,q)-H0 = -0.0000000484177519, L(p,q)-L0 = -0.0000000029165501 +t = 7.3000, H(p,q)-H0 = -0.0000000484472411, L(p,q)-L0 = -0.0000000029167009 +ROOT RETURN: t = 7.3137 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 7.3137, H(p,q)-H0 = -0.0000000482981759, L(p,q)-L0 = -0.0000000026370134 +t = 7.4000, H(p,q)-H0 = -0.0000000484651992, L(p,q)-L0 = -0.0000000029167861 +t = 7.5000, H(p,q)-H0 = -0.0000000484764615, L(p,q)-L0 = -0.0000000029168371 +t = 7.6000, H(p,q)-H0 = -0.0000000484837200, L(p,q)-L0 = -0.0000000029168692 +t = 7.7000, H(p,q)-H0 = -0.0000000484885161, L(p,q)-L0 = -0.0000000029168896 +t = 7.8000, H(p,q)-H0 = -0.0000000484917583, L(p,q)-L0 = -0.0000000029169037 +t = 7.9000, H(p,q)-H0 = -0.0000000484939955, L(p,q)-L0 = -0.0000000029169139 +t = 8.0000, H(p,q)-H0 = -0.0000000484955676, L(p,q)-L0 = -0.0000000029169216 +t = 8.1000, H(p,q)-H0 = -0.0000000484966906, L(p,q)-L0 = -0.0000000029169268 +t = 8.2000, H(p,q)-H0 = -0.0000000484975049, L(p,q)-L0 = -0.0000000029169313 +t = 8.3000, H(p,q)-H0 = -0.0000000484981032, L(p,q)-L0 = -0.0000000029169348 +t = 8.4000, H(p,q)-H0 = -0.0000000484985476, L(p,q)-L0 = -0.0000000029169376 +t = 8.5000, H(p,q)-H0 = -0.0000000484988811, L(p,q)-L0 = -0.0000000029169398 +t = 8.6000, H(p,q)-H0 = -0.0000000484991330, L(p,q)-L0 = -0.0000000029169418 +t = 8.7000, H(p,q)-H0 = -0.0000000484993246, L(p,q)-L0 = -0.0000000029169435 +t = 8.8000, H(p,q)-H0 = -0.0000000484994699, L(p,q)-L0 = -0.0000000029169444 +t = 8.9000, H(p,q)-H0 = -0.0000000484995802, L(p,q)-L0 = -0.0000000029169457 +t = 9.0000, H(p,q)-H0 = -0.0000000484996628, L(p,q)-L0 = -0.0000000029169466 +t = 9.1000, H(p,q)-H0 = -0.0000000484997233, L(p,q)-L0 = -0.0000000029169479 +t = 9.2000, H(p,q)-H0 = -0.0000000484997655, L(p,q)-L0 = -0.0000000029169489 +t = 9.3000, H(p,q)-H0 = -0.0000000484997914, L(p,q)-L0 = -0.0000000029169498 +t = 9.4000, H(p,q)-H0 = -0.0000000484998032, L(p,q)-L0 = -0.0000000029169505 +t = 9.5000, H(p,q)-H0 = -0.0000000484998012, L(p,q)-L0 = -0.0000000029169516 +t = 9.6000, H(p,q)-H0 = -0.0000000484997852, L(p,q)-L0 = -0.0000000029169526 +t = 9.7000, H(p,q)-H0 = -0.0000000484997542, L(p,q)-L0 = -0.0000000029169535 +t = 9.8000, H(p,q)-H0 = -0.0000000484997066, L(p,q)-L0 = -0.0000000029169545 +t = 9.9000, H(p,q)-H0 = -0.0000000484996391, L(p,q)-L0 = -0.0000000029169560 +t = 10.0000, H(p,q)-H0 = -0.0000000484995469, L(p,q)-L0 = -0.0000000029169570 +t = 10.1000, H(p,q)-H0 = -0.0000000484994243, L(p,q)-L0 = -0.0000000029169585 +t = 10.2000, H(p,q)-H0 = -0.0000000484992622, L(p,q)-L0 = -0.0000000029169602 +t = 10.3000, H(p,q)-H0 = -0.0000000484990481, L(p,q)-L0 = -0.0000000029169618 +t = 10.4000, H(p,q)-H0 = -0.0000000484987651, L(p,q)-L0 = -0.0000000029169638 +t = 10.5000, H(p,q)-H0 = -0.0000000484983886, L(p,q)-L0 = -0.0000000029169663 +t = 10.6000, H(p,q)-H0 = -0.0000000484978840, L(p,q)-L0 = -0.0000000029169693 +t = 10.7000, H(p,q)-H0 = -0.0000000484972005, L(p,q)-L0 = -0.0000000029169730 +t = 10.8000, H(p,q)-H0 = -0.0000000484962628, L(p,q)-L0 = -0.0000000029169777 +t = 10.9000, H(p,q)-H0 = -0.0000000484949603, L(p,q)-L0 = -0.0000000029169837 +t = 11.0000, H(p,q)-H0 = -0.0000000484931224, L(p,q)-L0 = -0.0000000029169920 +t = 11.1000, H(p,q)-H0 = -0.0000000484904837, L(p,q)-L0 = -0.0000000029170040 +t = 11.2000, H(p,q)-H0 = -0.0000000484866225, L(p,q)-L0 = -0.0000000029170210 +t = 11.3000, H(p,q)-H0 = -0.0000000484808514, L(p,q)-L0 = -0.0000000029170464 +t = 11.4000, H(p,q)-H0 = -0.0000000484720216, L(p,q)-L0 = -0.0000000029170855 +t = 11.5000, H(p,q)-H0 = -0.0000000484581644, L(p,q)-L0 = -0.0000000029171492 +t = 11.6000, H(p,q)-H0 = -0.0000000484358113, L(p,q)-L0 = -0.0000000029172574 +t = 11.7000, H(p,q)-H0 = -0.0000000483987055, L(p,q)-L0 = -0.0000000029174534 +t = 11.8000, H(p,q)-H0 = -0.0000000483353410, L(p,q)-L0 = -0.0000000029178340 +t = 11.9000, H(p,q)-H0 = -0.0000000482244114, L(p,q)-L0 = -0.0000000029186326 +t = 12.0000, H(p,q)-H0 = -0.0000000480271497, L(p,q)-L0 = -0.0000000029204761 +t = 12.1000, H(p,q)-H0 = -0.0000000476758215, L(p,q)-L0 = -0.0000000029252073 +t = 12.2000, H(p,q)-H0 = -0.0000000470399959, L(p,q)-L0 = -0.0000000029387919 +t = 12.3000, H(p,q)-H0 = -0.0000000455998068, L(p,q)-L0 = -0.0000000029816551 +t = 12.4000, H(p,q)-H0 = -0.0000000403673206, L(p,q)-L0 = -0.0000000031186767 +ROOT RETURN: t = 12.4522 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 12.4522, H(p,q)-H0 = -0.0000000615611286, L(p,q)-L0 = -0.0000000122994397 +t = 12.5000, H(p,q)-H0 = -0.0000000264097049, L(p,q)-L0 = -0.0000000034814185 +t = 12.6000, H(p,q)-H0 = -0.0000000248257395, L(p,q)-L0 = -0.0000000040677957 +t = 12.7000, H(p,q)-H0 = -0.0000000441475145, L(p,q)-L0 = -0.0000000045400393 +t = 12.8000, H(p,q)-H0 = -0.0000000544472503, L(p,q)-L0 = -0.0000000047481248 +t = 12.9000, H(p,q)-H0 = -0.0000000572878029, L(p,q)-L0 = -0.0000000048157982 +t = 13.0000, H(p,q)-H0 = -0.0000000582880573, L(p,q)-L0 = -0.0000000048367885 +t = 13.1000, H(p,q)-H0 = -0.0000000587741035, L(p,q)-L0 = -0.0000000048438051 +t = 13.2000, H(p,q)-H0 = -0.0000000590331863, L(p,q)-L0 = -0.0000000048464244 +t = 13.3000, H(p,q)-H0 = -0.0000000591747902, L(p,q)-L0 = -0.0000000048475159 +t = 13.4000, H(p,q)-H0 = -0.0000000592540124, L(p,q)-L0 = -0.0000000048480178 +t = 13.5000, H(p,q)-H0 = -0.0000000592996148, L(p,q)-L0 = -0.0000000048482691 +ROOT RETURN: t = 13.5969 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 13.5969, H(p,q)-H0 = -0.0000000591936562, L(p,q)-L0 = -0.0000000046048778 +t = 13.6000, H(p,q)-H0 = -0.0000000593266857, L(p,q)-L0 = -0.0000000048484048 +t = 13.7000, H(p,q)-H0 = -0.0000000593432556, L(p,q)-L0 = -0.0000000048484827 +t = 13.8000, H(p,q)-H0 = -0.0000000593536968, L(p,q)-L0 = -0.0000000048485300 +t = 13.9000, H(p,q)-H0 = -0.0000000593604556, L(p,q)-L0 = -0.0000000048485598 +t = 14.0000, H(p,q)-H0 = -0.0000000593649396, L(p,q)-L0 = -0.0000000048485798 +t = 14.1000, H(p,q)-H0 = -0.0000000593679819, L(p,q)-L0 = -0.0000000048485937 +t = 14.2000, H(p,q)-H0 = -0.0000000593700872, L(p,q)-L0 = -0.0000000048486032 +t = 14.3000, H(p,q)-H0 = -0.0000000593715705, L(p,q)-L0 = -0.0000000048486097 +t = 14.4000, H(p,q)-H0 = -0.0000000593726339, L(p,q)-L0 = -0.0000000048486152 +t = 14.5000, H(p,q)-H0 = -0.0000000593734059, L(p,q)-L0 = -0.0000000048486188 +t = 14.6000, H(p,q)-H0 = -0.0000000593739744, L(p,q)-L0 = -0.0000000048486219 +t = 14.7000, H(p,q)-H0 = -0.0000000593743977, L(p,q)-L0 = -0.0000000048486245 +t = 14.8000, H(p,q)-H0 = -0.0000000593747158, L(p,q)-L0 = -0.0000000048486268 +t = 14.9000, H(p,q)-H0 = -0.0000000593749566, L(p,q)-L0 = -0.0000000048486291 +t = 15.0000, H(p,q)-H0 = -0.0000000593751394, L(p,q)-L0 = -0.0000000048486303 +t = 15.1000, H(p,q)-H0 = -0.0000000593752784, L(p,q)-L0 = -0.0000000048486318 +t = 15.2000, H(p,q)-H0 = -0.0000000593753837, L(p,q)-L0 = -0.0000000048486331 +t = 15.3000, H(p,q)-H0 = -0.0000000593754625, L(p,q)-L0 = -0.0000000048486346 +t = 15.4000, H(p,q)-H0 = -0.0000000593755194, L(p,q)-L0 = -0.0000000048486355 +t = 15.5000, H(p,q)-H0 = -0.0000000593755587, L(p,q)-L0 = -0.0000000048486369 +t = 15.6000, H(p,q)-H0 = -0.0000000593755822, L(p,q)-L0 = -0.0000000048486377 +t = 15.7000, H(p,q)-H0 = -0.0000000593755920, L(p,q)-L0 = -0.0000000048486393 +t = 15.8000, H(p,q)-H0 = -0.0000000593755872, L(p,q)-L0 = -0.0000000048486396 +t = 15.9000, H(p,q)-H0 = -0.0000000593755689, L(p,q)-L0 = -0.0000000048486408 +t = 16.0000, H(p,q)-H0 = -0.0000000593755352, L(p,q)-L0 = -0.0000000048486415 +t = 16.1000, H(p,q)-H0 = -0.0000000593754842, L(p,q)-L0 = -0.0000000048486424 +t = 16.2000, H(p,q)-H0 = -0.0000000593754125, L(p,q)-L0 = -0.0000000048486432 +t = 16.3000, H(p,q)-H0 = -0.0000000593753153, L(p,q)-L0 = -0.0000000048486436 +t = 16.4000, H(p,q)-H0 = -0.0000000593751868, L(p,q)-L0 = -0.0000000048486454 +t = 16.5000, H(p,q)-H0 = -0.0000000593750168, L(p,q)-L0 = -0.0000000048486469 +t = 16.6000, H(p,q)-H0 = -0.0000000593747926, L(p,q)-L0 = -0.0000000048486486 +t = 16.7000, H(p,q)-H0 = -0.0000000593744955, L(p,q)-L0 = -0.0000000048486504 +t = 16.8000, H(p,q)-H0 = -0.0000000593741000, L(p,q)-L0 = -0.0000000048486527 +t = 16.9000, H(p,q)-H0 = -0.0000000593735690, L(p,q)-L0 = -0.0000000048486554 +t = 17.0000, H(p,q)-H0 = -0.0000000593728482, L(p,q)-L0 = -0.0000000048486588 +t = 17.1000, H(p,q)-H0 = -0.0000000593718588, L(p,q)-L0 = -0.0000000048486637 +t = 17.2000, H(p,q)-H0 = -0.0000000593704803, L(p,q)-L0 = -0.0000000048486704 +t = 17.3000, H(p,q)-H0 = -0.0000000593685294, L(p,q)-L0 = -0.0000000048486791 +t = 17.4000, H(p,q)-H0 = -0.0000000593657208, L(p,q)-L0 = -0.0000000048486918 +t = 17.5000, H(p,q)-H0 = -0.0000000593615960, L(p,q)-L0 = -0.0000000048487099 +t = 17.6000, H(p,q)-H0 = -0.0000000593554075, L(p,q)-L0 = -0.0000000048487371 +t = 17.7000, H(p,q)-H0 = -0.0000000593459000, L(p,q)-L0 = -0.0000000048487790 +t = 17.8000, H(p,q)-H0 = -0.0000000593309115, L(p,q)-L0 = -0.0000000048488482 +t = 17.9000, H(p,q)-H0 = -0.0000000593066188, L(p,q)-L0 = -0.0000000048489672 +t = 18.0000, H(p,q)-H0 = -0.0000000592660978, L(p,q)-L0 = -0.0000000048491851 +t = 18.1000, H(p,q)-H0 = -0.0000000591965846, L(p,q)-L0 = -0.0000000048496129 +t = 18.2000, H(p,q)-H0 = -0.0000000590744705, L(p,q)-L0 = -0.0000000048505251 +t = 18.3000, H(p,q)-H0 = -0.0000000588570473, L(p,q)-L0 = -0.0000000048526683 +t = 18.4000, H(p,q)-H0 = -0.0000000584699920, L(p,q)-L0 = -0.0000000048582733 +t = 18.5000, H(p,q)-H0 = -0.0000000577596622, L(p,q)-L0 = -0.0000000048746636 +t = 18.6000, H(p,q)-H0 = -0.0000000560199105, L(p,q)-L0 = -0.0000000049269229 +t = 18.7000, H(p,q)-H0 = -0.0000000494869183, L(p,q)-L0 = -0.0000000050917097 +ROOT RETURN: t = 18.7354 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 18.7354, H(p,q)-H0 = -0.0000000978326402, L(p,q)-L0 = -0.0000000230376245 +t = 18.8000, H(p,q)-H0 = -0.0000000350383482, L(p,q)-L0 = -0.0000000055021806 +t = 18.9000, H(p,q)-H0 = -0.0000000384657535, L(p,q)-L0 = -0.0000000060967349 +t = 19.0000, H(p,q)-H0 = -0.0000000576671775, L(p,q)-L0 = -0.0000000065229255 +t = 19.1000, H(p,q)-H0 = -0.0000000660850508, L(p,q)-L0 = -0.0000000066973844 +t = 19.2000, H(p,q)-H0 = -0.0000000683962778, L(p,q)-L0 = -0.0000000067528785 +t = 19.3000, H(p,q)-H0 = -0.0000000692693363, L(p,q)-L0 = -0.0000000067702148 +t = 19.4000, H(p,q)-H0 = -0.0000000697053074, L(p,q)-L0 = -0.0000000067761124 +t = 19.5000, H(p,q)-H0 = -0.0000000699390287, L(p,q)-L0 = -0.0000000067783563 +t = 19.6000, H(p,q)-H0 = -0.0000000700672274, L(p,q)-L0 = -0.0000000067793084 +t = 19.7000, H(p,q)-H0 = -0.0000000701392731, L(p,q)-L0 = -0.0000000067797532 +t = 19.8000, H(p,q)-H0 = -0.0000000701809573, L(p,q)-L0 = -0.0000000067799798 +ROOT RETURN: t = 19.8800 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 19.8800, H(p,q)-H0 = -0.0000000702017527, L(p,q)-L0 = -0.0000000067800091 +t = 19.9000, H(p,q)-H0 = -0.0000000702058314, L(p,q)-L0 = -0.0000000067801036 +t = 20.0000, H(p,q)-H0 = -0.0000000702211327, L(p,q)-L0 = -0.0000000067801749 +t = 20.1000, H(p,q)-H0 = -0.0000000702308205, L(p,q)-L0 = -0.0000000067802189 +t = 20.2000, H(p,q)-H0 = -0.0000000702371183, L(p,q)-L0 = -0.0000000067802470 +t = 20.3000, H(p,q)-H0 = -0.0000000702413129, L(p,q)-L0 = -0.0000000067802653 +t = 20.4000, H(p,q)-H0 = -0.0000000702441684, L(p,q)-L0 = -0.0000000067802781 +t = 20.5000, H(p,q)-H0 = -0.0000000702461509, L(p,q)-L0 = -0.0000000067802873 +t = 20.6000, H(p,q)-H0 = -0.0000000702475522, L(p,q)-L0 = -0.0000000067802939 +t = 20.7000, H(p,q)-H0 = -0.0000000702485590, L(p,q)-L0 = -0.0000000067802990 +t = 20.8000, H(p,q)-H0 = -0.0000000702492926, L(p,q)-L0 = -0.0000000067803034 +t = 20.9000, H(p,q)-H0 = -0.0000000702498333, L(p,q)-L0 = -0.0000000067803063 +t = 21.0000, H(p,q)-H0 = -0.0000000702502367, L(p,q)-L0 = -0.0000000067803091 +t = 21.1000, H(p,q)-H0 = -0.0000000702505401, L(p,q)-L0 = -0.0000000067803113 +t = 21.2000, H(p,q)-H0 = -0.0000000702507700, L(p,q)-L0 = -0.0000000067803136 +t = 21.3000, H(p,q)-H0 = -0.0000000702509446, L(p,q)-L0 = -0.0000000067803151 +t = 21.4000, H(p,q)-H0 = -0.0000000702510772, L(p,q)-L0 = -0.0000000067803160 +t = 21.5000, H(p,q)-H0 = -0.0000000702511773, L(p,q)-L0 = -0.0000000067803172 +t = 21.6000, H(p,q)-H0 = -0.0000000702512519, L(p,q)-L0 = -0.0000000067803183 +t = 21.7000, H(p,q)-H0 = -0.0000000702513059, L(p,q)-L0 = -0.0000000067803194 +t = 21.8000, H(p,q)-H0 = -0.0000000702513424, L(p,q)-L0 = -0.0000000067803205 +t = 21.9000, H(p,q)-H0 = -0.0000000702513636, L(p,q)-L0 = -0.0000000067803220 +t = 22.0000, H(p,q)-H0 = -0.0000000702513707, L(p,q)-L0 = -0.0000000067803231 +t = 22.1000, H(p,q)-H0 = -0.0000000702513645, L(p,q)-L0 = -0.0000000067803247 +t = 22.2000, H(p,q)-H0 = -0.0000000702513435, L(p,q)-L0 = -0.0000000067803255 +t = 22.3000, H(p,q)-H0 = -0.0000000702513069, L(p,q)-L0 = -0.0000000067803260 +t = 22.4000, H(p,q)-H0 = -0.0000000702512530, L(p,q)-L0 = -0.0000000067803273 +t = 22.5000, H(p,q)-H0 = -0.0000000702511778, L(p,q)-L0 = -0.0000000067803285 +t = 22.6000, H(p,q)-H0 = -0.0000000702510757, L(p,q)-L0 = -0.0000000067803292 +t = 22.7000, H(p,q)-H0 = -0.0000000702509411, L(p,q)-L0 = -0.0000000067803307 +t = 22.8000, H(p,q)-H0 = -0.0000000702507630, L(p,q)-L0 = -0.0000000067803323 +t = 22.9000, H(p,q)-H0 = -0.0000000702505277, L(p,q)-L0 = -0.0000000067803340 +t = 23.0000, H(p,q)-H0 = -0.0000000702502163, L(p,q)-L0 = -0.0000000067803360 +t = 23.1000, H(p,q)-H0 = -0.0000000702498012, L(p,q)-L0 = -0.0000000067803385 +t = 23.2000, H(p,q)-H0 = -0.0000000702492429, L(p,q)-L0 = -0.0000000067803414 +t = 23.3000, H(p,q)-H0 = -0.0000000702484836, L(p,q)-L0 = -0.0000000067803453 +t = 23.4000, H(p,q)-H0 = -0.0000000702474385, L(p,q)-L0 = -0.0000000067803507 +t = 23.5000, H(p,q)-H0 = -0.0000000702459789, L(p,q)-L0 = -0.0000000067803581 +t = 23.6000, H(p,q)-H0 = -0.0000000702439071, L(p,q)-L0 = -0.0000000067803672 +t = 23.7000, H(p,q)-H0 = -0.0000000702409146, L(p,q)-L0 = -0.0000000067803806 +t = 23.8000, H(p,q)-H0 = -0.0000000702365057, L(p,q)-L0 = -0.0000000067804000 +t = 23.9000, H(p,q)-H0 = -0.0000000702298657, L(p,q)-L0 = -0.0000000067804297 +t = 24.0000, H(p,q)-H0 = -0.0000000702196210, L(p,q)-L0 = -0.0000000067804752 +t = 24.1000, H(p,q)-H0 = -0.0000000702033971, L(p,q)-L0 = -0.0000000067805509 +t = 24.2000, H(p,q)-H0 = -0.0000000701769752, L(p,q)-L0 = -0.0000000067806820 +t = 24.3000, H(p,q)-H0 = -0.0000000701326901, L(p,q)-L0 = -0.0000000067809255 +t = 24.4000, H(p,q)-H0 = -0.0000000700563808, L(p,q)-L0 = -0.0000000067814084 +t = 24.5000, H(p,q)-H0 = -0.0000000699219017, L(p,q)-L0 = -0.0000000067824543 +t = 24.6000, H(p,q)-H0 = -0.0000000696822704, L(p,q)-L0 = -0.0000000067849544 +t = 24.7000, H(p,q)-H0 = -0.0000000692557109, L(p,q)-L0 = -0.0000000067916174 +t = 24.8000, H(p,q)-H0 = -0.0000000684561350, L(p,q)-L0 = -0.0000000068114442 +t = 24.9000, H(p,q)-H0 = -0.0000000663202426, L(p,q)-L0 = -0.0000000068751607 +t = 25.0000, H(p,q)-H0 = -0.0000000582801603, L(p,q)-L0 = -0.0000000070720761 +ROOT RETURN: t = 25.0186 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 25.0186, H(p,q)-H0 = -0.0000000673477174, L(p,q)-L0 = -0.0000000112233260 +t = 25.1000, H(p,q)-H0 = -0.0000000442582238, L(p,q)-L0 = -0.0000000075293279 +t = 25.2000, H(p,q)-H0 = -0.0000000526228769, L(p,q)-L0 = -0.0000000081198200 +t = 25.3000, H(p,q)-H0 = -0.0000000707752226, L(p,q)-L0 = -0.0000000084982439 +t = 25.4000, H(p,q)-H0 = -0.0000000775684346, L(p,q)-L0 = -0.0000000086435084 +t = 25.5000, H(p,q)-H0 = -0.0000000794713557, L(p,q)-L0 = -0.0000000086890063 +t = 25.6000, H(p,q)-H0 = -0.0000000802393612, L(p,q)-L0 = -0.0000000087033629 +t = 25.7000, H(p,q)-H0 = -0.0000000806310355, L(p,q)-L0 = -0.0000000087083367 +t = 25.8000, H(p,q)-H0 = -0.0000000808419982, L(p,q)-L0 = -0.0000000087102652 +t = 25.9000, H(p,q)-H0 = -0.0000000809581407, L(p,q)-L0 = -0.0000000087110980 +t = 26.0000, H(p,q)-H0 = -0.0000000810237136, L(p,q)-L0 = -0.0000000087114930 +t = 26.1000, H(p,q)-H0 = -0.0000000810618471, L(p,q)-L0 = -0.0000000087116955 +ROOT RETURN: t = 26.1632 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 26.1632, H(p,q)-H0 = -0.0000000809433990, L(p,q)-L0 = -0.0000000084649708 +t = 26.2000, H(p,q)-H0 = -0.0000000810847210, L(p,q)-L0 = -0.0000000087118069 +t = 26.3000, H(p,q)-H0 = -0.0000000810988622, L(p,q)-L0 = -0.0000000087118719 +t = 26.4000, H(p,q)-H0 = -0.0000000811078569, L(p,q)-L0 = -0.0000000087119124 +t = 26.5000, H(p,q)-H0 = -0.0000000811137293, L(p,q)-L0 = -0.0000000087119387 +t = 26.6000, H(p,q)-H0 = -0.0000000811176550, L(p,q)-L0 = -0.0000000087119558 +t = 26.7000, H(p,q)-H0 = -0.0000000811203367, L(p,q)-L0 = -0.0000000087119680 +t = 26.8000, H(p,q)-H0 = -0.0000000811222050, L(p,q)-L0 = -0.0000000087119767 +t = 26.9000, H(p,q)-H0 = -0.0000000811235288, L(p,q)-L0 = -0.0000000087119825 +t = 27.0000, H(p,q)-H0 = -0.0000000811244821, L(p,q)-L0 = -0.0000000087119875 +t = 27.1000, H(p,q)-H0 = -0.0000000811251781, L(p,q)-L0 = -0.0000000087119911 +t = 27.2000, H(p,q)-H0 = -0.0000000811256926, L(p,q)-L0 = -0.0000000087119941 +t = 27.3000, H(p,q)-H0 = -0.0000000811260765, L(p,q)-L0 = -0.0000000087119965 +t = 27.4000, H(p,q)-H0 = -0.0000000811263661, L(p,q)-L0 = -0.0000000087119989 +t = 27.5000, H(p,q)-H0 = -0.0000000811265854, L(p,q)-L0 = -0.0000000087120005 +t = 27.6000, H(p,q)-H0 = -0.0000000811267514, L(p,q)-L0 = -0.0000000087120012 +t = 27.7000, H(p,q)-H0 = -0.0000000811268779, L(p,q)-L0 = -0.0000000087120021 +t = 27.8000, H(p,q)-H0 = -0.0000000811269734, L(p,q)-L0 = -0.0000000087120035 +t = 27.9000, H(p,q)-H0 = -0.0000000811270443, L(p,q)-L0 = -0.0000000087120050 +t = 28.0000, H(p,q)-H0 = -0.0000000811270948, L(p,q)-L0 = -0.0000000087120056 +t = 28.1000, H(p,q)-H0 = -0.0000000811271282, L(p,q)-L0 = -0.0000000087120061 +t = 28.2000, H(p,q)-H0 = -0.0000000811271469, L(p,q)-L0 = -0.0000000087120071 +t = 28.3000, H(p,q)-H0 = -0.0000000811271516, L(p,q)-L0 = -0.0000000087120080 +t = 28.4000, H(p,q)-H0 = -0.0000000811271426, L(p,q)-L0 = -0.0000000087120091 +t = 28.5000, H(p,q)-H0 = -0.0000000811271192, L(p,q)-L0 = -0.0000000087120101 +t = 28.6000, H(p,q)-H0 = -0.0000000811270799, L(p,q)-L0 = -0.0000000087120108 +t = 28.7000, H(p,q)-H0 = -0.0000000811270225, L(p,q)-L0 = -0.0000000087120117 +t = 28.8000, H(p,q)-H0 = -0.0000000811269429, L(p,q)-L0 = -0.0000000087120126 +t = 28.9000, H(p,q)-H0 = -0.0000000811268361, L(p,q)-L0 = -0.0000000087120136 +t = 29.0000, H(p,q)-H0 = -0.0000000811266948, L(p,q)-L0 = -0.0000000087120149 +t = 29.1000, H(p,q)-H0 = -0.0000000811265081, L(p,q)-L0 = -0.0000000087120162 +t = 29.2000, H(p,q)-H0 = -0.0000000811262618, L(p,q)-L0 = -0.0000000087120184 +t = 29.3000, H(p,q)-H0 = -0.0000000811259354, L(p,q)-L0 = -0.0000000087120207 +t = 29.4000, H(p,q)-H0 = -0.0000000811254993, L(p,q)-L0 = -0.0000000087120232 +t = 29.5000, H(p,q)-H0 = -0.0000000811249120, L(p,q)-L0 = -0.0000000087120268 +t = 29.6000, H(p,q)-H0 = -0.0000000811241112, L(p,q)-L0 = -0.0000000087120304 +t = 29.7000, H(p,q)-H0 = -0.0000000811230065, L(p,q)-L0 = -0.0000000087120356 +t = 29.8000, H(p,q)-H0 = -0.0000000811214600, L(p,q)-L0 = -0.0000000087120429 +t = 29.9000, H(p,q)-H0 = -0.0000000811192591, L(p,q)-L0 = -0.0000000087120523 +t = 30.0000, H(p,q)-H0 = -0.0000000811160698, L(p,q)-L0 = -0.0000000087120662 +t = 30.1000, H(p,q)-H0 = -0.0000000811113540, L(p,q)-L0 = -0.0000000087120869 +t = 30.2000, H(p,q)-H0 = -0.0000000811042242, L(p,q)-L0 = -0.0000000087121187 +t = 30.3000, H(p,q)-H0 = -0.0000000810931766, L(p,q)-L0 = -0.0000000087121682 +t = 30.4000, H(p,q)-H0 = -0.0000000810756006, L(p,q)-L0 = -0.0000000087122506 +t = 30.5000, H(p,q)-H0 = -0.0000000810468392, L(p,q)-L0 = -0.0000000087123952 +t = 30.6000, H(p,q)-H0 = -0.0000000809983994, L(p,q)-L0 = -0.0000000087126659 +t = 30.7000, H(p,q)-H0 = -0.0000000809145750, L(p,q)-L0 = -0.0000000087132126 +t = 30.8000, H(p,q)-H0 = -0.0000000807664309, L(p,q)-L0 = -0.0000000087144150 +t = 30.9000, H(p,q)-H0 = -0.0000000805023523, L(p,q)-L0 = -0.0000000087173400 +t = 31.0000, H(p,q)-H0 = -0.0000000800318825, L(p,q)-L0 = -0.0000000087252835 +t = 31.1000, H(p,q)-H0 = -0.0000000791227814, L(p,q)-L0 = -0.0000000087493244 +t = 31.2000, H(p,q)-H0 = -0.0000000764649557, L(p,q)-L0 = -0.0000000088269498 +t = 31.3000, H(p,q)-H0 = -0.0000000667737108, L(p,q)-L0 = -0.0000000090604118 +ROOT RETURN: t = 31.3017 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 31.3017, H(p,q)-H0 = -0.0000000863809189, L(p,q)-L0 = -0.0000000155146035 +t = 31.4000, H(p,q)-H0 = -0.0000000542914591, L(p,q)-L0 = -0.0000000095611543 +t = 31.5000, H(p,q)-H0 = -0.0000000670306719, L(p,q)-L0 = -0.0000000101356428 +t = 31.6000, H(p,q)-H0 = -0.0000000834908505, L(p,q)-L0 = -0.0000000104667233 +t = 31.7000, H(p,q)-H0 = -0.0000000889325074, L(p,q)-L0 = -0.0000000105870224 +t = 31.8000, H(p,q)-H0 = -0.0000000905197366, L(p,q)-L0 = -0.0000000106243445 +t = 31.9000, H(p,q)-H0 = -0.0000000911995413, L(p,q)-L0 = -0.0000000106362668 +t = 32.0000, H(p,q)-H0 = -0.0000000915518402, L(p,q)-L0 = -0.0000000106404743 +t = 32.1000, H(p,q)-H0 = -0.0000000917423686, L(p,q)-L0 = -0.0000000106421368 +t = 32.2000, H(p,q)-H0 = -0.0000000918476626, L(p,q)-L0 = -0.0000000106428659 +t = 32.3000, H(p,q)-H0 = -0.0000000919073938, L(p,q)-L0 = -0.0000000106432165 +t = 32.4000, H(p,q)-H0 = -0.0000000919423115, L(p,q)-L0 = -0.0000000106433993 +ROOT RETURN: t = 32.4464 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 32.4464, H(p,q)-H0 = -0.0000000918026397, L(p,q)-L0 = -0.0000000103661820 +t = 32.5000, H(p,q)-H0 = -0.0000000919633653, L(p,q)-L0 = -0.0000000106435013 +t = 32.6000, H(p,q)-H0 = -0.0000000919764453, L(p,q)-L0 = -0.0000000106435613 +t = 32.7000, H(p,q)-H0 = -0.0000000919848028, L(p,q)-L0 = -0.0000000106435986 +t = 32.8000, H(p,q)-H0 = -0.0000000919902816, L(p,q)-L0 = -0.0000000106436229 +t = 32.9000, H(p,q)-H0 = -0.0000000919939582, L(p,q)-L0 = -0.0000000106436391 +t = 33.0000, H(p,q)-H0 = -0.0000000919964785, L(p,q)-L0 = -0.0000000106436504 +t = 33.1000, H(p,q)-H0 = -0.0000000919982395, L(p,q)-L0 = -0.0000000106436585 +t = 33.2000, H(p,q)-H0 = -0.0000000919994916, L(p,q)-L0 = -0.0000000106436651 +t = 33.3000, H(p,q)-H0 = -0.0000000920003955, L(p,q)-L0 = -0.0000000106436697 +t = 33.4000, H(p,q)-H0 = -0.0000000920010561, L(p,q)-L0 = -0.0000000106436733 +t = 33.5000, H(p,q)-H0 = -0.0000000920015450, L(p,q)-L0 = -0.0000000106436756 +t = 33.6000, H(p,q)-H0 = -0.0000000920019114, L(p,q)-L0 = -0.0000000106436783 +t = 33.7000, H(p,q)-H0 = -0.0000000920021879, L(p,q)-L0 = -0.0000000106436806 +t = 33.8000, H(p,q)-H0 = -0.0000000920023973, L(p,q)-L0 = -0.0000000106436824 +t = 33.9000, H(p,q)-H0 = -0.0000000920025567, L(p,q)-L0 = -0.0000000106436839 +t = 34.0000, H(p,q)-H0 = -0.0000000920026775, L(p,q)-L0 = -0.0000000106436852 +t = 34.1000, H(p,q)-H0 = -0.0000000920027685, L(p,q)-L0 = -0.0000000106436867 +t = 34.2000, H(p,q)-H0 = -0.0000000920028356, L(p,q)-L0 = -0.0000000106436875 +t = 34.3000, H(p,q)-H0 = -0.0000000920028832, L(p,q)-L0 = -0.0000000106436883 +t = 34.4000, H(p,q)-H0 = -0.0000000920029144, L(p,q)-L0 = -0.0000000106436893 +t = 34.5000, H(p,q)-H0 = -0.0000000920029305, L(p,q)-L0 = -0.0000000106436898 +t = 34.6000, H(p,q)-H0 = -0.0000000920029328, L(p,q)-L0 = -0.0000000106436905 +t = 34.7000, H(p,q)-H0 = -0.0000000920029215, L(p,q)-L0 = -0.0000000106436917 +t = 34.8000, H(p,q)-H0 = -0.0000000920028955, L(p,q)-L0 = -0.0000000106436923 +t = 34.9000, H(p,q)-H0 = -0.0000000920028534, L(p,q)-L0 = -0.0000000106436931 +t = 35.0000, H(p,q)-H0 = -0.0000000920027924, L(p,q)-L0 = -0.0000000106436939 +t = 35.1000, H(p,q)-H0 = -0.0000000920027089, L(p,q)-L0 = -0.0000000106436953 +t = 35.2000, H(p,q)-H0 = -0.0000000920025971, L(p,q)-L0 = -0.0000000106436966 +t = 35.3000, H(p,q)-H0 = -0.0000000920024491, L(p,q)-L0 = -0.0000000106436981 +t = 35.4000, H(p,q)-H0 = -0.0000000920022534, L(p,q)-L0 = -0.0000000106436995 +t = 35.5000, H(p,q)-H0 = -0.0000000920019956, L(p,q)-L0 = -0.0000000106437017 +t = 35.6000, H(p,q)-H0 = -0.0000000920016526, L(p,q)-L0 = -0.0000000106437037 +t = 35.7000, H(p,q)-H0 = -0.0000000920011944, L(p,q)-L0 = -0.0000000106437062 +t = 35.8000, H(p,q)-H0 = -0.0000000920005760, L(p,q)-L0 = -0.0000000106437097 +t = 35.9000, H(p,q)-H0 = -0.0000000919997319, L(p,q)-L0 = -0.0000000106437141 +t = 36.0000, H(p,q)-H0 = -0.0000000919985645, L(p,q)-L0 = -0.0000000106437201 +t = 36.1000, H(p,q)-H0 = -0.0000000919969256, L(p,q)-L0 = -0.0000000106437277 +t = 36.2000, H(p,q)-H0 = -0.0000000919945865, L(p,q)-L0 = -0.0000000106437386 +t = 36.3000, H(p,q)-H0 = -0.0000000919911850, L(p,q)-L0 = -0.0000000106437532 +t = 36.4000, H(p,q)-H0 = -0.0000000919861378, L(p,q)-L0 = -0.0000000106437751 +t = 36.5000, H(p,q)-H0 = -0.0000000919784759, L(p,q)-L0 = -0.0000000106438088 +t = 36.6000, H(p,q)-H0 = -0.0000000919665543, L(p,q)-L0 = -0.0000000106438626 +t = 36.7000, H(p,q)-H0 = -0.0000000919474991, L(p,q)-L0 = -0.0000000106439528 +t = 36.8000, H(p,q)-H0 = -0.0000000919161655, L(p,q)-L0 = -0.0000000106441127 +t = 36.9000, H(p,q)-H0 = -0.0000000918631425, L(p,q)-L0 = -0.0000000106444168 +t = 37.0000, H(p,q)-H0 = -0.0000000917710068, L(p,q)-L0 = -0.0000000106450374 +t = 37.1000, H(p,q)-H0 = -0.0000000916077678, L(p,q)-L0 = -0.0000000106464240 +t = 37.2000, H(p,q)-H0 = -0.0000000913167905, L(p,q)-L0 = -0.0000000106498567 +t = 37.3000, H(p,q)-H0 = -0.0000000907971338, L(p,q)-L0 = -0.0000000106593594 +t = 37.4000, H(p,q)-H0 = -0.0000000897503700, L(p,q)-L0 = -0.0000000106885705 +t = 37.5000, H(p,q)-H0 = -0.0000000864122607, L(p,q)-L0 = -0.0000000107829846 +ROOT RETURN: t = 37.5849 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 37.5849, H(p,q)-H0 = -0.0000001317774294, L(p,q)-L0 = -0.0000000291994051 +t = 37.6000, H(p,q)-H0 = -0.0000000750453213, L(p,q)-L0 = -0.0000000110571754 +t = 37.7000, H(p,q)-H0 = -0.0000000652864798, L(p,q)-L0 = -0.0000000115956111 +t = 37.8000, H(p,q)-H0 = -0.0000000814422616, L(p,q)-L0 = -0.0000000121433266 +t = 37.9000, H(p,q)-H0 = -0.0000000958562416, L(p,q)-L0 = -0.0000000124291885 +t = 38.0000, H(p,q)-H0 = -0.0000001002050563, L(p,q)-L0 = -0.0000000125284016 +t = 38.1000, H(p,q)-H0 = -0.0000001015464115, L(p,q)-L0 = -0.0000000125590501 +t = 38.2000, H(p,q)-H0 = -0.0000001021510567, L(p,q)-L0 = -0.0000000125689790 +t = 38.3000, H(p,q)-H0 = -0.0000001024682371, L(p,q)-L0 = -0.0000000125725501 +t = 38.4000, H(p,q)-H0 = -0.0000001026404101, L(p,q)-L0 = -0.0000000125739883 +t = 38.5000, H(p,q)-H0 = -0.0000001027359420, L(p,q)-L0 = -0.0000000125746296 +t = 38.6000, H(p,q)-H0 = -0.0000001027904003, L(p,q)-L0 = -0.0000000125749428 +t = 38.7000, H(p,q)-H0 = -0.0000001028224009, L(p,q)-L0 = -0.0000000125751077 +ROOT RETURN: t = 38.7296 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 38.7296, H(p,q)-H0 = -0.0000001028247512, L(p,q)-L0 = -0.0000000125669291 +t = 38.8000, H(p,q)-H0 = -0.0000001028417953, L(p,q)-L0 = -0.0000000125752007 +t = 38.9000, H(p,q)-H0 = -0.0000001028539034, L(p,q)-L0 = -0.0000000125752562 +t = 39.0000, H(p,q)-H0 = -0.0000001028616745, L(p,q)-L0 = -0.0000000125752908 +t = 39.1000, H(p,q)-H0 = -0.0000001028667902, L(p,q)-L0 = -0.0000000125753136 +t = 39.2000, H(p,q)-H0 = -0.0000001028702363, L(p,q)-L0 = -0.0000000125753292 +t = 39.3000, H(p,q)-H0 = -0.0000001028726058, L(p,q)-L0 = -0.0000000125753397 +t = 39.4000, H(p,q)-H0 = -0.0000001028742664, L(p,q)-L0 = -0.0000000125753472 +t = 39.5000, H(p,q)-H0 = -0.0000001028754503, L(p,q)-L0 = -0.0000000125753531 +t = 39.6000, H(p,q)-H0 = -0.0000001028763066, L(p,q)-L0 = -0.0000000125753573 +t = 39.7000, H(p,q)-H0 = -0.0000001028769347, L(p,q)-L0 = -0.0000000125753611 +t = 39.8000, H(p,q)-H0 = -0.0000001028774008, L(p,q)-L0 = -0.0000000125753643 +t = 39.9000, H(p,q)-H0 = -0.0000001028777498, L(p,q)-L0 = -0.0000000125753665 +t = 40.0000, H(p,q)-H0 = -0.0000001028780130, L(p,q)-L0 = -0.0000000125753685 +t = 40.1000, H(p,q)-H0 = -0.0000001028782125, L(p,q)-L0 = -0.0000000125753696 +t = 40.2000, H(p,q)-H0 = -0.0000001028783645, L(p,q)-L0 = -0.0000000125753710 +t = 40.3000, H(p,q)-H0 = -0.0000001028784796, L(p,q)-L0 = -0.0000000125753720 +t = 40.4000, H(p,q)-H0 = -0.0000001028785666, L(p,q)-L0 = -0.0000000125753734 +t = 40.5000, H(p,q)-H0 = -0.0000001028786304, L(p,q)-L0 = -0.0000000125753749 +t = 40.6000, H(p,q)-H0 = -0.0000001028786749, L(p,q)-L0 = -0.0000000125753756 +t = 40.7000, H(p,q)-H0 = -0.0000001028787032, L(p,q)-L0 = -0.0000000125753764 +t = 40.8000, H(p,q)-H0 = -0.0000001028787173, L(p,q)-L0 = -0.0000000125753777 +t = 40.9000, H(p,q)-H0 = -0.0000001028787177, L(p,q)-L0 = -0.0000000125753791 +t = 41.0000, H(p,q)-H0 = -0.0000001028787039, L(p,q)-L0 = -0.0000000125753797 +t = 41.1000, H(p,q)-H0 = -0.0000001028786754, L(p,q)-L0 = -0.0000000125753807 +t = 41.2000, H(p,q)-H0 = -0.0000001028786304, L(p,q)-L0 = -0.0000000125753817 +t = 41.3000, H(p,q)-H0 = -0.0000001028785666, L(p,q)-L0 = -0.0000000125753835 +t = 41.4000, H(p,q)-H0 = -0.0000001028784788, L(p,q)-L0 = -0.0000000125753847 +t = 41.5000, H(p,q)-H0 = -0.0000001028783613, L(p,q)-L0 = -0.0000000125753861 +t = 41.6000, H(p,q)-H0 = -0.0000001028782058, L(p,q)-L0 = -0.0000000125753872 +t = 41.7000, H(p,q)-H0 = -0.0000001028780011, L(p,q)-L0 = -0.0000000125753888 +t = 41.8000, H(p,q)-H0 = -0.0000001028777306, L(p,q)-L0 = -0.0000000125753910 +t = 41.9000, H(p,q)-H0 = -0.0000001028773712, L(p,q)-L0 = -0.0000000125753933 +t = 42.0000, H(p,q)-H0 = -0.0000001028768900, L(p,q)-L0 = -0.0000000125753967 +t = 42.1000, H(p,q)-H0 = -0.0000001028762389, L(p,q)-L0 = -0.0000000125754003 +t = 42.2000, H(p,q)-H0 = -0.0000001028753481, L(p,q)-L0 = -0.0000000125754045 +t = 42.3000, H(p,q)-H0 = -0.0000001028741135, L(p,q)-L0 = -0.0000000125754107 +t = 42.4000, H(p,q)-H0 = -0.0000001028723753, L(p,q)-L0 = -0.0000000125754185 +t = 42.5000, H(p,q)-H0 = -0.0000001028698873, L(p,q)-L0 = -0.0000000125754293 +t = 42.6000, H(p,q)-H0 = -0.0000001028662577, L(p,q)-L0 = -0.0000000125754451 +t = 42.7000, H(p,q)-H0 = -0.0000001028608523, L(p,q)-L0 = -0.0000000125754686 +t = 42.8000, H(p,q)-H0 = -0.0000001028526140, L(p,q)-L0 = -0.0000000125755047 +t = 42.9000, H(p,q)-H0 = -0.0000001028397386, L(p,q)-L0 = -0.0000000125755633 +t = 43.0000, H(p,q)-H0 = -0.0000001028190630, L(p,q)-L0 = -0.0000000125756622 +t = 43.1000, H(p,q)-H0 = -0.0000001027848990, L(p,q)-L0 = -0.0000000125758393 +t = 43.2000, H(p,q)-H0 = -0.0000001027268128, L(p,q)-L0 = -0.0000000125761791 +t = 43.3000, H(p,q)-H0 = -0.0000001026254827, L(p,q)-L0 = -0.0000000125768842 +t = 43.4000, H(p,q)-H0 = -0.0000001024455776, L(p,q)-L0 = -0.0000000125784863 +t = 43.5000, H(p,q)-H0 = -0.0000001021250062, L(p,q)-L0 = -0.0000000125825277 +t = 43.6000, H(p,q)-H0 = -0.0000001015496205, L(p,q)-L0 = -0.0000000125939299 +t = 43.7000, H(p,q)-H0 = -0.0000001003261163, L(p,q)-L0 = -0.0000000126294811 +t = 43.8000, H(p,q)-H0 = -0.0000000961170694, L(p,q)-L0 = -0.0000000127440090 +ROOT RETURN: t = 43.8681 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 43.8681, H(p,q)-H0 = -0.0000001066932902, L(p,q)-L0 = -0.0000000193143932 +t = 43.9000, H(p,q)-H0 = -0.0000000832329459, L(p,q)-L0 = -0.0000000130624954 +t = 44.0000, H(p,q)-H0 = -0.0000000772849236, L(p,q)-L0 = -0.0000000136304049 +t = 44.1000, H(p,q)-H0 = -0.0000000956608024, L(p,q)-L0 = -0.0000000141424648 +t = 44.2000, H(p,q)-H0 = -0.0000001079238068, L(p,q)-L0 = -0.0000000143864448 +t = 44.3000, H(p,q)-H0 = -0.0000001114074679, L(p,q)-L0 = -0.0000000144680287 +t = 44.4000, H(p,q)-H0 = -0.0000001125551181, L(p,q)-L0 = -0.0000000144932376 +t = 44.5000, H(p,q)-H0 = -0.0000001130948968, L(p,q)-L0 = -0.0000000145015316 +t = 44.6000, H(p,q)-H0 = -0.0000001133806781, L(p,q)-L0 = -0.0000000145045729 +t = 44.7000, H(p,q)-H0 = -0.0000001135363544, L(p,q)-L0 = -0.0000000145058183 +t = 44.8000, H(p,q)-H0 = -0.0000001136230946, L(p,q)-L0 = -0.0000000145063828 +t = 44.9000, H(p,q)-H0 = -0.0000001136727873, L(p,q)-L0 = -0.0000000145066626 +t = 45.0000, H(p,q)-H0 = -0.0000001137021408, L(p,q)-L0 = -0.0000000145068115 +ROOT RETURN: t = 45.0128 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 45.0128, H(p,q)-H0 = -0.0000001135921330, L(p,q)-L0 = -0.0000000142993943 +t = 45.1000, H(p,q)-H0 = -0.0000001137200214, L(p,q)-L0 = -0.0000000145068958 +t = 45.2000, H(p,q)-H0 = -0.0000001137312385, L(p,q)-L0 = -0.0000000145069469 +t = 45.3000, H(p,q)-H0 = -0.0000001137384691, L(p,q)-L0 = -0.0000000145069785 +t = 45.4000, H(p,q)-H0 = -0.0000001137432486, L(p,q)-L0 = -0.0000000145070000 +t = 45.5000, H(p,q)-H0 = -0.0000001137464800, L(p,q)-L0 = -0.0000000145070147 +t = 45.6000, H(p,q)-H0 = -0.0000001137487096, L(p,q)-L0 = -0.0000000145070247 +t = 45.7000, H(p,q)-H0 = -0.0000001137502768, L(p,q)-L0 = -0.0000000145070322 +t = 45.8000, H(p,q)-H0 = -0.0000001137513964, L(p,q)-L0 = -0.0000000145070376 +t = 45.9000, H(p,q)-H0 = -0.0000001137522087, L(p,q)-L0 = -0.0000000145070420 +t = 46.0000, H(p,q)-H0 = -0.0000001137528052, L(p,q)-L0 = -0.0000000145070452 +t = 46.1000, H(p,q)-H0 = -0.0000001137532486, L(p,q)-L0 = -0.0000000145070479 +t = 46.2000, H(p,q)-H0 = -0.0000001137535812, L(p,q)-L0 = -0.0000000145070502 +t = 46.3000, H(p,q)-H0 = -0.0000001137538326, L(p,q)-L0 = -0.0000000145070516 +t = 46.4000, H(p,q)-H0 = -0.0000001137540235, L(p,q)-L0 = -0.0000000145070534 +t = 46.5000, H(p,q)-H0 = -0.0000001137541685, L(p,q)-L0 = -0.0000000145070548 +t = 46.6000, H(p,q)-H0 = -0.0000001137542787, L(p,q)-L0 = -0.0000000145070562 +t = 46.7000, H(p,q)-H0 = -0.0000001137543613, L(p,q)-L0 = -0.0000000145070576 +t = 46.8000, H(p,q)-H0 = -0.0000001137544215, L(p,q)-L0 = -0.0000000145070588 +t = 46.9000, H(p,q)-H0 = -0.0000001137544632, L(p,q)-L0 = -0.0000000145070593 +t = 47.0000, H(p,q)-H0 = -0.0000001137544889, L(p,q)-L0 = -0.0000000145070601 +t = 47.1000, H(p,q)-H0 = -0.0000001137545003, L(p,q)-L0 = -0.0000000145070608 +t = 47.2000, H(p,q)-H0 = -0.0000001137544982, L(p,q)-L0 = -0.0000000145070616 +t = 47.3000, H(p,q)-H0 = -0.0000001137544818, L(p,q)-L0 = -0.0000000145070622 +t = 47.4000, H(p,q)-H0 = -0.0000001137544509, L(p,q)-L0 = -0.0000000145070634 +t = 47.5000, H(p,q)-H0 = -0.0000001137544030, L(p,q)-L0 = -0.0000000145070648 +t = 47.6000, H(p,q)-H0 = -0.0000001137543351, L(p,q)-L0 = -0.0000000145070658 +t = 47.7000, H(p,q)-H0 = -0.0000001137542425, L(p,q)-L0 = -0.0000000145070665 +t = 47.8000, H(p,q)-H0 = -0.0000001137541192, L(p,q)-L0 = -0.0000000145070677 +t = 47.9000, H(p,q)-H0 = -0.0000001137539565, L(p,q)-L0 = -0.0000000145070689 +t = 48.0000, H(p,q)-H0 = -0.0000001137537420, L(p,q)-L0 = -0.0000000145070709 +t = 48.1000, H(p,q)-H0 = -0.0000001137534582, L(p,q)-L0 = -0.0000000145070729 +t = 48.2000, H(p,q)-H0 = -0.0000001137530808, L(p,q)-L0 = -0.0000000145070752 +t = 48.3000, H(p,q)-H0 = -0.0000001137525747, L(p,q)-L0 = -0.0000000145070784 +t = 48.4000, H(p,q)-H0 = -0.0000001137518892, L(p,q)-L0 = -0.0000000145070820 +t = 48.5000, H(p,q)-H0 = -0.0000001137509492, L(p,q)-L0 = -0.0000000145070868 +t = 48.6000, H(p,q)-H0 = -0.0000001137496433, L(p,q)-L0 = -0.0000000145070935 +t = 48.7000, H(p,q)-H0 = -0.0000001137477996, L(p,q)-L0 = -0.0000000145071022 +t = 48.8000, H(p,q)-H0 = -0.0000001137451520, L(p,q)-L0 = -0.0000000145071137 +t = 48.9000, H(p,q)-H0 = -0.0000001137412777, L(p,q)-L0 = -0.0000000145071311 +t = 49.0000, H(p,q)-H0 = -0.0000001137354850, L(p,q)-L0 = -0.0000000145071561 +t = 49.1000, H(p,q)-H0 = -0.0000001137266208, L(p,q)-L0 = -0.0000000145071957 +t = 49.2000, H(p,q)-H0 = -0.0000001137127050, L(p,q)-L0 = -0.0000000145072595 +t = 49.3000, H(p,q)-H0 = -0.0000001136902524, L(p,q)-L0 = -0.0000000145073681 +t = 49.4000, H(p,q)-H0 = -0.0000001136529726, L(p,q)-L0 = -0.0000000145075650 +t = 49.5000, H(p,q)-H0 = -0.0000001135892934, L(p,q)-L0 = -0.0000000145079468 +t = 49.6000, H(p,q)-H0 = -0.0000001134777949, L(p,q)-L0 = -0.0000000145087511 +t = 49.7000, H(p,q)-H0 = -0.0000001132795046, L(p,q)-L0 = -0.0000000145106088 +t = 49.8000, H(p,q)-H0 = -0.0000001129263574, L(p,q)-L0 = -0.0000000145153829 +t = 49.9000, H(p,q)-H0 = -0.0000001122868578, L(p,q)-L0 = -0.0000000145291035 +t = 50.0000, H(p,q)-H0 = -0.0000001108326948, L(p,q)-L0 = -0.0000000145724222 +t = 50.1000, H(p,q)-H0 = -0.0000001055364578, L(p,q)-L0 = -0.0000000147108190 +ROOT RETURN: t = 50.1513 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 50.1513, H(p,q)-H0 = -0.0000001114974815, L(p,q)-L0 = -0.0000000188467024 +t = 50.2000, H(p,q)-H0 = -0.0000000915336087, L(p,q)-L0 = -0.0000000150760981 +t = 50.3000, H(p,q)-H0 = -0.0000000902107362, L(p,q)-L0 = -0.0000000156632152 +t = 50.4000, H(p,q)-H0 = -0.0000001095536482, L(p,q)-L0 = -0.0000000161330825 +t = 50.5000, H(p,q)-H0 = -0.0000001197471942, L(p,q)-L0 = -0.0000000163392598 +t = 50.6000, H(p,q)-H0 = -0.0000001225558985, L(p,q)-L0 = -0.0000000164062217 +t = 50.7000, H(p,q)-H0 = -0.0000001235486917, L(p,q)-L0 = -0.0000000164269965 +t = 50.8000, H(p,q)-H0 = -0.0000001240319016, L(p,q)-L0 = -0.0000000164339478 +t = 50.9000, H(p,q)-H0 = -0.0000001242895604, L(p,q)-L0 = -0.0000000164365455 +t = 51.0000, H(p,q)-H0 = -0.0000001244304126, L(p,q)-L0 = -0.0000000164376296 +t = 51.1000, H(p,q)-H0 = -0.0000001245092338, L(p,q)-L0 = -0.0000000164381290 +t = 51.2000, H(p,q)-H0 = -0.0000001245546178, L(p,q)-L0 = -0.0000000164383799 +ROOT RETURN: t = 51.2960 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 51.2960, H(p,q)-H0 = -0.0000001244159860, L(p,q)-L0 = -0.0000000161354881 +t = 51.3000, H(p,q)-H0 = -0.0000001245815663, L(p,q)-L0 = -0.0000000164385151 +t = 51.4000, H(p,q)-H0 = -0.0000001245980652, L(p,q)-L0 = -0.0000000164385927 +t = 51.5000, H(p,q)-H0 = -0.0000001246084648, L(p,q)-L0 = -0.0000000164386396 +t = 51.6000, H(p,q)-H0 = -0.0000001246151977, L(p,q)-L0 = -0.0000000164386690 +t = 51.7000, H(p,q)-H0 = -0.0000001246196659, L(p,q)-L0 = -0.0000000164386891 +t = 51.8000, H(p,q)-H0 = -0.0000001246226981, L(p,q)-L0 = -0.0000000164387031 +t = 51.9000, H(p,q)-H0 = -0.0000001246247963, L(p,q)-L0 = -0.0000000164387125 +t = 52.0000, H(p,q)-H0 = -0.0000001246262762, L(p,q)-L0 = -0.0000000164387198 +t = 52.1000, H(p,q)-H0 = -0.0000001246273358, L(p,q)-L0 = -0.0000000164387248 +t = 52.2000, H(p,q)-H0 = -0.0000001246281061, L(p,q)-L0 = -0.0000000164387290 +t = 52.3000, H(p,q)-H0 = -0.0000001246286729, L(p,q)-L0 = -0.0000000164387320 +t = 52.4000, H(p,q)-H0 = -0.0000001246290950, L(p,q)-L0 = -0.0000000164387345 +t = 52.5000, H(p,q)-H0 = -0.0000001246294123, L(p,q)-L0 = -0.0000000164387365 +t = 52.6000, H(p,q)-H0 = -0.0000001246296523, L(p,q)-L0 = -0.0000000164387381 +t = 52.7000, H(p,q)-H0 = -0.0000001246298343, L(p,q)-L0 = -0.0000000164387396 +t = 52.8000, H(p,q)-H0 = -0.0000001246299730, L(p,q)-L0 = -0.0000000164387409 +t = 52.9000, H(p,q)-H0 = -0.0000001246300778, L(p,q)-L0 = -0.0000000164387421 +t = 53.0000, H(p,q)-H0 = -0.0000001246301560, L(p,q)-L0 = -0.0000000164387427 +t = 53.1000, H(p,q)-H0 = -0.0000001246302127, L(p,q)-L0 = -0.0000000164387436 +t = 53.2000, H(p,q)-H0 = -0.0000001246302517, L(p,q)-L0 = -0.0000000164387445 +t = 53.3000, H(p,q)-H0 = -0.0000001246302751, L(p,q)-L0 = -0.0000000164387456 +t = 53.4000, H(p,q)-H0 = -0.0000001246302840, L(p,q)-L0 = -0.0000000164387460 +t = 53.5000, H(p,q)-H0 = -0.0000001246302794, L(p,q)-L0 = -0.0000000164387469 +t = 53.6000, H(p,q)-H0 = -0.0000001246302612, L(p,q)-L0 = -0.0000000164387480 +t = 53.7000, H(p,q)-H0 = -0.0000001246302275, L(p,q)-L0 = -0.0000000164387494 +t = 53.8000, H(p,q)-H0 = -0.0000001246301762, L(p,q)-L0 = -0.0000000164387498 +t = 53.9000, H(p,q)-H0 = -0.0000001246301045, L(p,q)-L0 = -0.0000000164387508 +t = 54.0000, H(p,q)-H0 = -0.0000001246300072, L(p,q)-L0 = -0.0000000164387517 +t = 54.1000, H(p,q)-H0 = -0.0000001246298780, L(p,q)-L0 = -0.0000000164387530 +t = 54.2000, H(p,q)-H0 = -0.0000001246297072, L(p,q)-L0 = -0.0000000164387541 +t = 54.3000, H(p,q)-H0 = -0.0000001246294825, L(p,q)-L0 = -0.0000000164387559 +t = 54.4000, H(p,q)-H0 = -0.0000001246291850, L(p,q)-L0 = -0.0000000164387581 +t = 54.5000, H(p,q)-H0 = -0.0000001246287883, L(p,q)-L0 = -0.0000000164387602 +t = 54.6000, H(p,q)-H0 = -0.0000001246282557, L(p,q)-L0 = -0.0000000164387628 +t = 54.7000, H(p,q)-H0 = -0.0000001246275333, L(p,q)-L0 = -0.0000000164387668 +t = 54.8000, H(p,q)-H0 = -0.0000001246265408, L(p,q)-L0 = -0.0000000164387717 +t = 54.9000, H(p,q)-H0 = -0.0000001246251576, L(p,q)-L0 = -0.0000000164387783 +t = 55.0000, H(p,q)-H0 = -0.0000001246232004, L(p,q)-L0 = -0.0000000164387872 +t = 55.1000, H(p,q)-H0 = -0.0000001246203816, L(p,q)-L0 = -0.0000000164387994 +t = 55.2000, H(p,q)-H0 = -0.0000001246162420, L(p,q)-L0 = -0.0000000164388176 +t = 55.3000, H(p,q)-H0 = -0.0000001246100303, L(p,q)-L0 = -0.0000000164388450 +t = 55.4000, H(p,q)-H0 = -0.0000001246004853, L(p,q)-L0 = -0.0000000164388876 +t = 55.5000, H(p,q)-H0 = -0.0000001245854334, L(p,q)-L0 = -0.0000000164389568 +t = 55.6000, H(p,q)-H0 = -0.0000001245610323, L(p,q)-L0 = -0.0000000164390765 +t = 55.7000, H(p,q)-H0 = -0.0000001245203185, L(p,q)-L0 = -0.0000000164392951 +t = 55.8000, H(p,q)-H0 = -0.0000001244504588, L(p,q)-L0 = -0.0000000164397256 +t = 55.9000, H(p,q)-H0 = -0.0000001243277169, L(p,q)-L0 = -0.0000000164406457 +t = 56.0000, H(p,q)-H0 = -0.0000001241091595, L(p,q)-L0 = -0.0000000164428063 +t = 56.1000, H(p,q)-H0 = -0.0000001237200922, L(p,q)-L0 = -0.0000000164484628 +t = 56.2000, H(p,q)-H0 = -0.0000001230054045, L(p,q)-L0 = -0.0000000164650191 +t = 56.3000, H(p,q)-H0 = -0.0000001212471616, L(p,q)-L0 = -0.0000000165178364 +t = 56.4000, H(p,q)-H0 = -0.0000001146384911, L(p,q)-L0 = -0.0000000166842291 +ROOT RETURN: t = 56.4345 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 56.4345, H(p,q)-H0 = -0.0000001639668279, L(p,q)-L0 = -0.0000000347738256 +t = 56.5000, H(p,q)-H0 = -0.0000001001873835, L(p,q)-L0 = -0.0000000170972445 +t = 56.6000, H(p,q)-H0 = -0.0000001038851334, L(p,q)-L0 = -0.0000000176918925 +t = 56.7000, H(p,q)-H0 = -0.0000001230515878, L(p,q)-L0 = -0.0000000181155525 +t = 56.8000, H(p,q)-H0 = -0.0000001313757902, L(p,q)-L0 = -0.0000000182883400 +t = 56.9000, H(p,q)-H0 = -0.0000001336624054, L(p,q)-L0 = -0.0000000183432476 +t = 57.0000, H(p,q)-H0 = -0.0000001345293443, L(p,q)-L0 = -0.0000000183604097 +t = 57.1000, H(p,q)-H0 = -0.0000001349628097, L(p,q)-L0 = -0.0000000183662532 +t = 57.2000, H(p,q)-H0 = -0.0000001351952506, L(p,q)-L0 = -0.0000000183684786 +t = 57.3000, H(p,q)-H0 = -0.0000001353227711, L(p,q)-L0 = -0.0000000183694233 +t = 57.4000, H(p,q)-H0 = -0.0000001353944539, L(p,q)-L0 = -0.0000000183698653 +t = 57.5000, H(p,q)-H0 = -0.0000001354359381, L(p,q)-L0 = -0.0000000183700896 +ROOT RETURN: t = 57.5791 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 57.5791, H(p,q)-H0 = -0.0000001354387766, L(p,q)-L0 = -0.0000000183374248 +t = 57.6000, H(p,q)-H0 = -0.0000001354607000, L(p,q)-L0 = -0.0000000183702118 +t = 57.7000, H(p,q)-H0 = -0.0000001354759361, L(p,q)-L0 = -0.0000000183702825 +t = 57.8000, H(p,q)-H0 = -0.0000001354855848, L(p,q)-L0 = -0.0000000183703258 +t = 57.9000, H(p,q)-H0 = -0.0000001354918588, L(p,q)-L0 = -0.0000000183703537 +t = 58.0000, H(p,q)-H0 = -0.0000001354960383, L(p,q)-L0 = -0.0000000183703719 +t = 58.1000, H(p,q)-H0 = -0.0000001354988843, L(p,q)-L0 = -0.0000000183703848 +t = 58.2000, H(p,q)-H0 = -0.0000001355008611, L(p,q)-L0 = -0.0000000183703943 +t = 58.3000, H(p,q)-H0 = -0.0000001355022581, L(p,q)-L0 = -0.0000000183704008 +t = 58.4000, H(p,q)-H0 = -0.0000001355032616, L(p,q)-L0 = -0.0000000183704058 +t = 58.5000, H(p,q)-H0 = -0.0000001355039930, L(p,q)-L0 = -0.0000000183704101 +t = 58.6000, H(p,q)-H0 = -0.0000001355045323, L(p,q)-L0 = -0.0000000183704132 +t = 58.7000, H(p,q)-H0 = -0.0000001355049342, L(p,q)-L0 = -0.0000000183704155 +t = 58.8000, H(p,q)-H0 = -0.0000001355052367, L(p,q)-L0 = -0.0000000183704176 +t = 58.9000, H(p,q)-H0 = -0.0000001355054661, L(p,q)-L0 = -0.0000000183704197 +t = 59.0000, H(p,q)-H0 = -0.0000001355056402, L(p,q)-L0 = -0.0000000183704213 +t = 59.1000, H(p,q)-H0 = -0.0000001355057724, L(p,q)-L0 = -0.0000000183704223 +t = 59.2000, H(p,q)-H0 = -0.0000001355058724, L(p,q)-L0 = -0.0000000183704235 +t = 59.3000, H(p,q)-H0 = -0.0000001355059469, L(p,q)-L0 = -0.0000000183704245 +t = 59.4000, H(p,q)-H0 = -0.0000001355060005, L(p,q)-L0 = -0.0000000183704255 +t = 59.5000, H(p,q)-H0 = -0.0000001355060368, L(p,q)-L0 = -0.0000000183704266 +t = 59.6000, H(p,q)-H0 = -0.0000001355060580, L(p,q)-L0 = -0.0000000183704280 +t = 59.7000, H(p,q)-H0 = -0.0000001355060648, L(p,q)-L0 = -0.0000000183704284 +t = 59.8000, H(p,q)-H0 = -0.0000001355060578, L(p,q)-L0 = -0.0000000183704294 +t = 59.9000, H(p,q)-H0 = -0.0000001355060362, L(p,q)-L0 = -0.0000000183704296 +t = 60.0000, H(p,q)-H0 = -0.0000001355059995, L(p,q)-L0 = -0.0000000183704301 +t = 60.1000, H(p,q)-H0 = -0.0000001355059450, L(p,q)-L0 = -0.0000000183704308 +t = 60.2000, H(p,q)-H0 = -0.0000001355058696, L(p,q)-L0 = -0.0000000183704323 +t = 60.3000, H(p,q)-H0 = -0.0000001355057675, L(p,q)-L0 = -0.0000000183704332 +t = 60.4000, H(p,q)-H0 = -0.0000001355056324, L(p,q)-L0 = -0.0000000183704350 +t = 60.5000, H(p,q)-H0 = -0.0000001355054539, L(p,q)-L0 = -0.0000000183704363 +t = 60.6000, H(p,q)-H0 = -0.0000001355052183, L(p,q)-L0 = -0.0000000183704378 +t = 60.7000, H(p,q)-H0 = -0.0000001355049060, L(p,q)-L0 = -0.0000000183704398 +t = 60.8000, H(p,q)-H0 = -0.0000001355044899, L(p,q)-L0 = -0.0000000183704427 +t = 60.9000, H(p,q)-H0 = -0.0000001355039301, L(p,q)-L0 = -0.0000000183704458 +t = 61.0000, H(p,q)-H0 = -0.0000001355031688, L(p,q)-L0 = -0.0000000183704498 +t = 61.1000, H(p,q)-H0 = -0.0000001355021206, L(p,q)-L0 = -0.0000000183704553 +t = 61.2000, H(p,q)-H0 = -0.0000001355006560, L(p,q)-L0 = -0.0000000183704619 +t = 61.3000, H(p,q)-H0 = -0.0000001354985779, L(p,q)-L0 = -0.0000000183704714 +t = 61.4000, H(p,q)-H0 = -0.0000001354955748, L(p,q)-L0 = -0.0000000183704845 +t = 61.5000, H(p,q)-H0 = -0.0000001354911499, L(p,q)-L0 = -0.0000000183705037 +t = 61.6000, H(p,q)-H0 = -0.0000001354844839, L(p,q)-L0 = -0.0000000183705325 +t = 61.7000, H(p,q)-H0 = -0.0000001354741976, L(p,q)-L0 = -0.0000000183705787 +t = 61.8000, H(p,q)-H0 = -0.0000001354579040, L(p,q)-L0 = -0.0000000183706546 +t = 61.9000, H(p,q)-H0 = -0.0000001354313633, L(p,q)-L0 = -0.0000000183707869 +t = 62.0000, H(p,q)-H0 = -0.0000001353868654, L(p,q)-L0 = -0.0000000183710315 +t = 62.1000, H(p,q)-H0 = -0.0000001353101723, L(p,q)-L0 = -0.0000000183715174 +t = 62.2000, H(p,q)-H0 = -0.0000001351749971, L(p,q)-L0 = -0.0000000183725717 +t = 62.3000, H(p,q)-H0 = -0.0000001349341148, L(p,q)-L0 = -0.0000000183750920 +t = 62.4000, H(p,q)-H0 = -0.0000001345053224, L(p,q)-L0 = -0.0000000183818172 +t = 62.5000, H(p,q)-H0 = -0.0000001337004563, L(p,q)-L0 = -0.0000000184018487 +t = 62.6000, H(p,q)-H0 = -0.0000001315400913, L(p,q)-L0 = -0.0000000184662441 +t = 62.7000, H(p,q)-H0 = -0.0000001234144738, L(p,q)-L0 = -0.0000000186650045 +ROOT RETURN: t = 62.7177 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 62.7177, H(p,q)-H0 = -0.0000001465321100, L(p,q)-L0 = -0.0000000275523243 +t = 62.8000, H(p,q)-H0 = -0.0000001094454982, L(p,q)-L0 = -0.0000000191246895 +t = 62.9000, H(p,q)-H0 = -0.0000001180626392, L(p,q)-L0 = -0.0000000197146204 +t = 63.0000, H(p,q)-H0 = -0.0000001361380413, L(p,q)-L0 = -0.0000000200904822 +t = 63.1000, H(p,q)-H0 = -0.0000001428520109, L(p,q)-L0 = -0.0000000202343062 +t = 63.2000, H(p,q)-H0 = -0.0000001447359146, L(p,q)-L0 = -0.0000000202793241 +t = 63.3000, H(p,q)-H0 = -0.0000001454988130, L(p,q)-L0 = -0.0000000202935382 +t = 63.4000, H(p,q)-H0 = -0.0000001458882617, L(p,q)-L0 = -0.0000000202984675 +t = 63.5000, H(p,q)-H0 = -0.0000001460980743, L(p,q)-L0 = -0.0000000203003808 +t = 63.6000, H(p,q)-H0 = -0.0000001462136063, L(p,q)-L0 = -0.0000000203012070 +t = 63.7000, H(p,q)-H0 = -0.0000001462788516, L(p,q)-L0 = -0.0000000203015996 +t = 63.8000, H(p,q)-H0 = -0.0000001463168047, L(p,q)-L0 = -0.0000000203018010 +ROOT RETURN: t = 63.8623 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 63.8623, H(p,q)-H0 = -0.0000001462431727, L(p,q)-L0 = -0.0000000201380640 +t = 63.9000, H(p,q)-H0 = -0.0000001463395776, L(p,q)-L0 = -0.0000000203019122 +t = 64.0000, H(p,q)-H0 = -0.0000001463536597, L(p,q)-L0 = -0.0000000203019773 +t = 64.1000, H(p,q)-H0 = -0.0000001463626185, L(p,q)-L0 = -0.0000000203020173 +t = 64.2000, H(p,q)-H0 = -0.0000001463684690, L(p,q)-L0 = -0.0000000203020434 +t = 64.3000, H(p,q)-H0 = -0.0000001463723812, L(p,q)-L0 = -0.0000000203020607 +t = 64.4000, H(p,q)-H0 = -0.0000001463750543, L(p,q)-L0 = -0.0000000203020727 +t = 64.5000, H(p,q)-H0 = -0.0000001463769170, L(p,q)-L0 = -0.0000000203020820 +t = 64.6000, H(p,q)-H0 = -0.0000001463782371, L(p,q)-L0 = -0.0000000203020885 +t = 64.7000, H(p,q)-H0 = -0.0000001463791879, L(p,q)-L0 = -0.0000000203020933 +t = 64.8000, H(p,q)-H0 = -0.0000001463798819, L(p,q)-L0 = -0.0000000203020969 +t = 64.9000, H(p,q)-H0 = -0.0000001463803947, L(p,q)-L0 = -0.0000000203020999 +t = 65.0000, H(p,q)-H0 = -0.0000001463807781, L(p,q)-L0 = -0.0000000203021024 +t = 65.1000, H(p,q)-H0 = -0.0000001463810666, L(p,q)-L0 = -0.0000000203021044 +t = 65.2000, H(p,q)-H0 = -0.0000001463812851, L(p,q)-L0 = -0.0000000203021061 +t = 65.3000, H(p,q)-H0 = -0.0000001463814514, L(p,q)-L0 = -0.0000000203021076 +t = 65.4000, H(p,q)-H0 = -0.0000001463815779, L(p,q)-L0 = -0.0000000203021089 +t = 65.5000, H(p,q)-H0 = -0.0000001463816726, L(p,q)-L0 = -0.0000000203021095 +t = 65.6000, H(p,q)-H0 = -0.0000001463817435, L(p,q)-L0 = -0.0000000203021112 +t = 65.7000, H(p,q)-H0 = -0.0000001463817941, L(p,q)-L0 = -0.0000000203021122 +t = 65.8000, H(p,q)-H0 = -0.0000001463818275, L(p,q)-L0 = -0.0000000203021131 +t = 65.9000, H(p,q)-H0 = -0.0000001463818458, L(p,q)-L0 = -0.0000000203021135 +t = 66.0000, H(p,q)-H0 = -0.0000001463818502, L(p,q)-L0 = -0.0000000203021142 +t = 66.1000, H(p,q)-H0 = -0.0000001463818412, L(p,q)-L0 = -0.0000000203021153 +t = 66.2000, H(p,q)-H0 = -0.0000001463818174, L(p,q)-L0 = -0.0000000203021159 +t = 66.3000, H(p,q)-H0 = -0.0000001463817784, L(p,q)-L0 = -0.0000000203021169 +t = 66.4000, H(p,q)-H0 = -0.0000001463817207, L(p,q)-L0 = -0.0000000203021181 +t = 66.5000, H(p,q)-H0 = -0.0000001463816411, L(p,q)-L0 = -0.0000000203021189 +t = 66.6000, H(p,q)-H0 = -0.0000001463815341, L(p,q)-L0 = -0.0000000203021201 +t = 66.7000, H(p,q)-H0 = -0.0000001463813922, L(p,q)-L0 = -0.0000000203021215 +t = 66.8000, H(p,q)-H0 = -0.0000001463812054, L(p,q)-L0 = -0.0000000203021234 +t = 66.9000, H(p,q)-H0 = -0.0000001463809585, L(p,q)-L0 = -0.0000000203021252 +t = 67.0000, H(p,q)-H0 = -0.0000001463806313, L(p,q)-L0 = -0.0000000203021276 +t = 67.1000, H(p,q)-H0 = -0.0000001463801940, L(p,q)-L0 = -0.0000000203021303 +t = 67.2000, H(p,q)-H0 = -0.0000001463796050, L(p,q)-L0 = -0.0000000203021340 +t = 67.3000, H(p,q)-H0 = -0.0000001463788020, L(p,q)-L0 = -0.0000000203021379 +t = 67.4000, H(p,q)-H0 = -0.0000001463776947, L(p,q)-L0 = -0.0000000203021440 +t = 67.5000, H(p,q)-H0 = -0.0000001463761437, L(p,q)-L0 = -0.0000000203021515 +t = 67.6000, H(p,q)-H0 = -0.0000001463739359, L(p,q)-L0 = -0.0000000203021617 +t = 67.7000, H(p,q)-H0 = -0.0000001463707360, L(p,q)-L0 = -0.0000000203021764 +t = 67.8000, H(p,q)-H0 = -0.0000001463660031, L(p,q)-L0 = -0.0000000203021971 +t = 67.9000, H(p,q)-H0 = -0.0000001463588457, L(p,q)-L0 = -0.0000000203022288 +t = 68.0000, H(p,q)-H0 = -0.0000001463477532, L(p,q)-L0 = -0.0000000203022782 +t = 68.1000, H(p,q)-H0 = -0.0000001463301014, L(p,q)-L0 = -0.0000000203023612 +t = 68.2000, H(p,q)-H0 = -0.0000001463012093, L(p,q)-L0 = -0.0000000203025072 +t = 68.3000, H(p,q)-H0 = -0.0000001462525354, L(p,q)-L0 = -0.0000000203027803 +t = 68.4000, H(p,q)-H0 = -0.0000001461682867, L(p,q)-L0 = -0.0000000203033309 +t = 68.5000, H(p,q)-H0 = -0.0000001460193725, L(p,q)-L0 = -0.0000000203045434 +t = 68.6000, H(p,q)-H0 = -0.0000001457539152, L(p,q)-L0 = -0.0000000203074929 +t = 68.7000, H(p,q)-H0 = -0.0000001452809537, L(p,q)-L0 = -0.0000000203155135 +t = 68.8000, H(p,q)-H0 = -0.0000001443652686, L(p,q)-L0 = -0.0000000203398052 +t = 68.9000, H(p,q)-H0 = -0.0000001416752902, L(p,q)-L0 = -0.0000000204182535 +t = 69.0000, H(p,q)-H0 = -0.0000001318934946, L(p,q)-L0 = -0.0000000206537967 +ROOT RETURN: t = 69.0008 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 69.0008, H(p,q)-H0 = -0.0000001376758079, L(p,q)-L0 = -0.0000000225437481 +t = 69.1000, H(p,q)-H0 = -0.0000001195272865, L(p,q)-L0 = -0.0000000211567287 +t = 69.2000, H(p,q)-H0 = -0.0000001324768200, L(p,q)-L0 = -0.0000000217300407 +t = 69.3000, H(p,q)-H0 = -0.0000001488338410, L(p,q)-L0 = -0.0000000220586303 +t = 69.4000, H(p,q)-H0 = -0.0000001542105799, L(p,q)-L0 = -0.0000000221777037 +t = 69.5000, H(p,q)-H0 = -0.0000001557830367, L(p,q)-L0 = -0.0000000222146328 +t = 69.6000, H(p,q)-H0 = -0.0000001564585105, L(p,q)-L0 = -0.0000000222264377 +t = 69.7000, H(p,q)-H0 = -0.0000001568088248, L(p,q)-L0 = -0.0000000222306084 +t = 69.8000, H(p,q)-H0 = -0.0000001569983185, L(p,q)-L0 = -0.0000000222322579 +t = 69.9000, H(p,q)-H0 = -0.0000001571030630, L(p,q)-L0 = -0.0000000222329820 +t = 70.0000, H(p,q)-H0 = -0.0000001571624983, L(p,q)-L0 = -0.0000000222333307 +t = 70.1000, H(p,q)-H0 = -0.0000001571972524, L(p,q)-L0 = -0.0000000222335126 +ROOT RETURN: t = 70.1455 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 70.1455, H(p,q)-H0 = -0.0000001570344533, L(p,q)-L0 = -0.0000000219142088 +t = 70.2000, H(p,q)-H0 = -0.0000001572182133, L(p,q)-L0 = -0.0000000222336138 +t = 70.3000, H(p,q)-H0 = -0.0000001572312394, L(p,q)-L0 = -0.0000000222336739 +t = 70.4000, H(p,q)-H0 = -0.0000001572395643, L(p,q)-L0 = -0.0000000222337111 +t = 70.5000, H(p,q)-H0 = -0.0000001572450226, L(p,q)-L0 = -0.0000000222337351 +t = 70.6000, H(p,q)-H0 = -0.0000001572486870, L(p,q)-L0 = -0.0000000222337513 +t = 70.7000, H(p,q)-H0 = -0.0000001572511991, L(p,q)-L0 = -0.0000000222337628 +t = 70.8000, H(p,q)-H0 = -0.0000001572529542, L(p,q)-L0 = -0.0000000222337706 +t = 70.9000, H(p,q)-H0 = -0.0000001572542022, L(p,q)-L0 = -0.0000000222337768 +t = 71.0000, H(p,q)-H0 = -0.0000001572551029, L(p,q)-L0 = -0.0000000222337813 +t = 71.1000, H(p,q)-H0 = -0.0000001572557622, L(p,q)-L0 = -0.0000000222337849 +t = 71.2000, H(p,q)-H0 = -0.0000001572562501, L(p,q)-L0 = -0.0000000222337878 +t = 71.3000, H(p,q)-H0 = -0.0000001572566154, L(p,q)-L0 = -0.0000000222337901 +t = 71.4000, H(p,q)-H0 = -0.0000001572568906, L(p,q)-L0 = -0.0000000222337920 +t = 71.5000, H(p,q)-H0 = -0.0000001572570995, L(p,q)-L0 = -0.0000000222337938 +t = 71.6000, H(p,q)-H0 = -0.0000001572572583, L(p,q)-L0 = -0.0000000222337950 +t = 71.7000, H(p,q)-H0 = -0.0000001572573783, L(p,q)-L0 = -0.0000000222337958 +t = 71.8000, H(p,q)-H0 = -0.0000001572574692, L(p,q)-L0 = -0.0000000222337970 +t = 71.9000, H(p,q)-H0 = -0.0000001572575363, L(p,q)-L0 = -0.0000000222337982 +t = 72.0000, H(p,q)-H0 = -0.0000001572575836, L(p,q)-L0 = -0.0000000222337992 +t = 72.1000, H(p,q)-H0 = -0.0000001572576145, L(p,q)-L0 = -0.0000000222338001 +t = 72.2000, H(p,q)-H0 = -0.0000001572576307, L(p,q)-L0 = -0.0000000222338011 +t = 72.3000, H(p,q)-H0 = -0.0000001572576328, L(p,q)-L0 = -0.0000000222338018 +t = 72.4000, H(p,q)-H0 = -0.0000001572576213, L(p,q)-L0 = -0.0000000222338027 +t = 72.5000, H(p,q)-H0 = -0.0000001572575952, L(p,q)-L0 = -0.0000000222338037 +t = 72.6000, H(p,q)-H0 = -0.0000001572575530, L(p,q)-L0 = -0.0000000222338042 +t = 72.7000, H(p,q)-H0 = -0.0000001572574919, L(p,q)-L0 = -0.0000000222338056 +t = 72.8000, H(p,q)-H0 = -0.0000001572574082, L(p,q)-L0 = -0.0000000222338067 +t = 72.9000, H(p,q)-H0 = -0.0000001572572962, L(p,q)-L0 = -0.0000000222338080 +t = 73.0000, H(p,q)-H0 = -0.0000001572571477, L(p,q)-L0 = -0.0000000222338096 +t = 73.1000, H(p,q)-H0 = -0.0000001572569518, L(p,q)-L0 = -0.0000000222338112 +t = 73.2000, H(p,q)-H0 = -0.0000001572566929, L(p,q)-L0 = -0.0000000222338131 +t = 73.3000, H(p,q)-H0 = -0.0000001572563492, L(p,q)-L0 = -0.0000000222338151 +t = 73.4000, H(p,q)-H0 = -0.0000001572558899, L(p,q)-L0 = -0.0000000222338180 +t = 73.5000, H(p,q)-H0 = -0.0000001572552698, L(p,q)-L0 = -0.0000000222338215 +t = 73.6000, H(p,q)-H0 = -0.0000001572544235, L(p,q)-L0 = -0.0000000222338259 +t = 73.7000, H(p,q)-H0 = -0.0000001572532525, L(p,q)-L0 = -0.0000000222338319 +t = 73.8000, H(p,q)-H0 = -0.0000001572516086, L(p,q)-L0 = -0.0000000222338397 +t = 73.9000, H(p,q)-H0 = -0.0000001572492617, L(p,q)-L0 = -0.0000000222338505 +t = 74.0000, H(p,q)-H0 = -0.0000001572458490, L(p,q)-L0 = -0.0000000222338656 +t = 74.1000, H(p,q)-H0 = -0.0000001572407829, L(p,q)-L0 = -0.0000000222338877 +t = 74.2000, H(p,q)-H0 = -0.0000001572330914, L(p,q)-L0 = -0.0000000222339216 +t = 74.3000, H(p,q)-H0 = -0.0000001572211208, L(p,q)-L0 = -0.0000000222339759 +t = 74.4000, H(p,q)-H0 = -0.0000001572019823, L(p,q)-L0 = -0.0000000222340664 +t = 74.5000, H(p,q)-H0 = -0.0000001571705042, L(p,q)-L0 = -0.0000000222342278 +t = 74.6000, H(p,q)-H0 = -0.0000001571172206, L(p,q)-L0 = -0.0000000222345322 +t = 74.7000, H(p,q)-H0 = -0.0000001570246138, L(p,q)-L0 = -0.0000000222351564 +t = 74.8000, H(p,q)-H0 = -0.0000001568605209, L(p,q)-L0 = -0.0000000222365533 +t = 74.9000, H(p,q)-H0 = -0.0000001565680252, L(p,q)-L0 = -0.0000000222400157 +t = 75.0000, H(p,q)-H0 = -0.0000001560455560, L(p,q)-L0 = -0.0000000222496106 +t = 75.1000, H(p,q)-H0 = -0.0000001549904116, L(p,q)-L0 = -0.0000000222791301 +t = 75.2000, H(p,q)-H0 = -0.0000001516106689, L(p,q)-L0 = -0.0000000223745359 +ROOT RETURN: t = 75.2840 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 75.2840, H(p,q)-H0 = -0.0000001943678731, L(p,q)-L0 = -0.0000000397565374 +t = 75.3000, H(p,q)-H0 = -0.0000001401563476, L(p,q)-L0 = -0.0000000226510208 +t = 75.4000, H(p,q)-H0 = -0.0000001305761277, L(p,q)-L0 = -0.0000000231912675 +t = 75.5000, H(p,q)-H0 = -0.0000001468827575, L(p,q)-L0 = -0.0000000237372749 +t = 75.6000, H(p,q)-H0 = -0.0000001611819829, L(p,q)-L0 = -0.0000000240207949 +t = 75.7000, H(p,q)-H0 = -0.0000001654789004, L(p,q)-L0 = -0.0000000241189786 +t = 75.8000, H(p,q)-H0 = -0.0000001668086709, L(p,q)-L0 = -0.0000000241493067 +t = 75.9000, H(p,q)-H0 = -0.0000001674095932, L(p,q)-L0 = -0.0000000241591390 +t = 76.0000, H(p,q)-H0 = -0.0000001677249977, L(p,q)-L0 = -0.0000000241626790 +t = 76.1000, H(p,q)-H0 = -0.0000001678962392, L(p,q)-L0 = -0.0000000241641057 +t = 76.2000, H(p,q)-H0 = -0.0000001679912754, L(p,q)-L0 = -0.0000000241647425 +t = 76.3000, H(p,q)-H0 = -0.0000001680454652, L(p,q)-L0 = -0.0000000241650536 +t = 76.4000, H(p,q)-H0 = -0.0000001680773167, L(p,q)-L0 = -0.0000000241652169 +ROOT RETURN: t = 76.4287 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 76.4287, H(p,q)-H0 = -0.0000001680465531, L(p,q)-L0 = -0.0000000240964780 +t = 76.5000, H(p,q)-H0 = -0.0000001680966264, L(p,q)-L0 = -0.0000000241653098 +t = 76.6000, H(p,q)-H0 = -0.0000001681086845, L(p,q)-L0 = -0.0000000241653648 +t = 76.7000, H(p,q)-H0 = -0.0000001681164253, L(p,q)-L0 = -0.0000000241653996 +t = 76.8000, H(p,q)-H0 = -0.0000001681215225, L(p,q)-L0 = -0.0000000241654224 +t = 76.9000, H(p,q)-H0 = -0.0000001681249564, L(p,q)-L0 = -0.0000000241654377 +t = 77.0000, H(p,q)-H0 = -0.0000001681273185, L(p,q)-L0 = -0.0000000241654485 +t = 77.1000, H(p,q)-H0 = -0.0000001681289743, L(p,q)-L0 = -0.0000000241654563 +t = 77.2000, H(p,q)-H0 = -0.0000001681301544, L(p,q)-L0 = -0.0000000241654623 +t = 77.3000, H(p,q)-H0 = -0.0000001681310087, L(p,q)-L0 = -0.0000000241654667 +t = 77.4000, H(p,q)-H0 = -0.0000001681316347, L(p,q)-L0 = -0.0000000241654700 +t = 77.5000, H(p,q)-H0 = -0.0000001681320988, L(p,q)-L0 = -0.0000000241654724 +t = 77.6000, H(p,q)-H0 = -0.0000001681324466, L(p,q)-L0 = -0.0000000241654746 +t = 77.7000, H(p,q)-H0 = -0.0000001681327092, L(p,q)-L0 = -0.0000000241654763 +t = 77.8000, H(p,q)-H0 = -0.0000001681329086, L(p,q)-L0 = -0.0000000241654781 +t = 77.9000, H(p,q)-H0 = -0.0000001681330604, L(p,q)-L0 = -0.0000000241654796 +t = 78.0000, H(p,q)-H0 = -0.0000001681331755, L(p,q)-L0 = -0.0000000241654809 +t = 78.1000, H(p,q)-H0 = -0.0000001681332619, L(p,q)-L0 = -0.0000000241654818 +t = 78.2000, H(p,q)-H0 = -0.0000001681333252, L(p,q)-L0 = -0.0000000241654828 +t = 78.3000, H(p,q)-H0 = -0.0000001681333696, L(p,q)-L0 = -0.0000000241654836 +t = 78.4000, H(p,q)-H0 = -0.0000001681333981, L(p,q)-L0 = -0.0000000241654848 +t = 78.5000, H(p,q)-H0 = -0.0000001681334119, L(p,q)-L0 = -0.0000000241654858 +t = 78.6000, H(p,q)-H0 = -0.0000001681334119, L(p,q)-L0 = -0.0000000241654868 +t = 78.7000, H(p,q)-H0 = -0.0000001681333978, L(p,q)-L0 = -0.0000000241654875 +t = 78.8000, H(p,q)-H0 = -0.0000001681333688, L(p,q)-L0 = -0.0000000241654881 +t = 78.9000, H(p,q)-H0 = -0.0000001681333235, L(p,q)-L0 = -0.0000000241654887 +t = 79.0000, H(p,q)-H0 = -0.0000001681332590, L(p,q)-L0 = -0.0000000241654898 +t = 79.1000, H(p,q)-H0 = -0.0000001681331712, L(p,q)-L0 = -0.0000000241654911 +t = 79.2000, H(p,q)-H0 = -0.0000001681330533, L(p,q)-L0 = -0.0000000241654921 +t = 79.3000, H(p,q)-H0 = -0.0000001681328975, L(p,q)-L0 = -0.0000000241654935 +t = 79.4000, H(p,q)-H0 = -0.0000001681326920, L(p,q)-L0 = -0.0000000241654949 +t = 79.5000, H(p,q)-H0 = -0.0000001681324205, L(p,q)-L0 = -0.0000000241654969 +t = 79.6000, H(p,q)-H0 = -0.0000001681320601, L(p,q)-L0 = -0.0000000241654989 +t = 79.7000, H(p,q)-H0 = -0.0000001681315771, L(p,q)-L0 = -0.0000000241655017 +t = 79.8000, H(p,q)-H0 = -0.0000001681309246, L(p,q)-L0 = -0.0000000241655054 +t = 79.9000, H(p,q)-H0 = -0.0000001681300309, L(p,q)-L0 = -0.0000000241655096 +t = 80.0000, H(p,q)-H0 = -0.0000001681287924, L(p,q)-L0 = -0.0000000241655159 +t = 80.1000, H(p,q)-H0 = -0.0000001681270487, L(p,q)-L0 = -0.0000000241655238 +t = 80.2000, H(p,q)-H0 = -0.0000001681245527, L(p,q)-L0 = -0.0000000241655355 +t = 80.3000, H(p,q)-H0 = -0.0000001681209107, L(p,q)-L0 = -0.0000000241655516 +t = 80.4000, H(p,q)-H0 = -0.0000001681154851, L(p,q)-L0 = -0.0000000241655751 +t = 80.5000, H(p,q)-H0 = -0.0000001681072143, L(p,q)-L0 = -0.0000000241656115 +t = 80.6000, H(p,q)-H0 = -0.0000001680942853, L(p,q)-L0 = -0.0000000241656704 +t = 80.7000, H(p,q)-H0 = -0.0000001680735181, L(p,q)-L0 = -0.0000000241657697 +t = 80.8000, H(p,q)-H0 = -0.0000001680391947, L(p,q)-L0 = -0.0000000241659480 +t = 80.9000, H(p,q)-H0 = -0.0000001679808227, L(p,q)-L0 = -0.0000000241662905 +t = 81.0000, H(p,q)-H0 = -0.0000001678789726, L(p,q)-L0 = -0.0000000241670015 +t = 81.1000, H(p,q)-H0 = -0.0000001676981247, L(p,q)-L0 = -0.0000000241686167 +t = 81.2000, H(p,q)-H0 = -0.0000001673758805, L(p,q)-L0 = -0.0000000241726936 +t = 81.3000, H(p,q)-H0 = -0.0000001667972822, L(p,q)-L0 = -0.0000000241842093 +t = 81.4000, H(p,q)-H0 = -0.0000001655629038, L(p,q)-L0 = -0.0000000242201389 +t = 81.5000, H(p,q)-H0 = -0.0000001613010943, L(p,q)-L0 = -0.0000000243358504 +ROOT RETURN: t = 81.5672 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 81.5672, H(p,q)-H0 = -0.0000001863589114, L(p,q)-L0 = -0.0000000357640320 +t = 81.6000, H(p,q)-H0 = -0.0000001483443561, L(p,q)-L0 = -0.0000000246567998 +t = 81.7000, H(p,q)-H0 = -0.0000001426274230, L(p,q)-L0 = -0.0000000252260186 +t = 81.8000, H(p,q)-H0 = -0.0000001610868208, L(p,q)-L0 = -0.0000000257359545 +t = 81.9000, H(p,q)-H0 = -0.0000001732351738, L(p,q)-L0 = -0.0000000259777944 +t = 82.0000, H(p,q)-H0 = -0.0000001766780642, L(p,q)-L0 = -0.0000000260585202 +t = 82.1000, H(p,q)-H0 = -0.0000001778165029, L(p,q)-L0 = -0.0000000260834663 +t = 82.2000, H(p,q)-H0 = -0.0000001783530470, L(p,q)-L0 = -0.0000000260916821 +t = 82.3000, H(p,q)-H0 = -0.0000001786372370, L(p,q)-L0 = -0.0000000260946976 +t = 82.4000, H(p,q)-H0 = -0.0000001787920763, L(p,q)-L0 = -0.0000000260959342 +t = 82.5000, H(p,q)-H0 = -0.0000001788783702, L(p,q)-L0 = -0.0000000260964957 +t = 82.6000, H(p,q)-H0 = -0.0000001789278192, L(p,q)-L0 = -0.0000000260967732 +t = 82.7000, H(p,q)-H0 = -0.0000001789570379, L(p,q)-L0 = -0.0000000260969215 +ROOT RETURN: t = 82.7119 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 +t = 82.7119, H(p,q)-H0 = -0.0000001788950017, L(p,q)-L0 = -0.0000000259781998 +t = 82.8000, H(p,q)-H0 = -0.0000001789748414, L(p,q)-L0 = -0.0000000260970061 +t = 82.9000, H(p,q)-H0 = -0.0000001789860123, L(p,q)-L0 = -0.0000000260970566 +t = 83.0000, H(p,q)-H0 = -0.0000001789932158, L(p,q)-L0 = -0.0000000260970889 +t = 83.1000, H(p,q)-H0 = -0.0000001789979778, L(p,q)-L0 = -0.0000000260971100 +t = 83.2000, H(p,q)-H0 = -0.0000001790011978, L(p,q)-L0 = -0.0000000260971242 +t = 83.3000, H(p,q)-H0 = -0.0000001790034201, L(p,q)-L0 = -0.0000000260971345 +t = 83.4000, H(p,q)-H0 = -0.0000001790049824, L(p,q)-L0 = -0.0000000260971418 +t = 83.5000, H(p,q)-H0 = -0.0000001790060986, L(p,q)-L0 = -0.0000000260971470 +t = 83.6000, H(p,q)-H0 = -0.0000001790069083, L(p,q)-L0 = -0.0000000260971514 +t = 83.7000, H(p,q)-H0 = -0.0000001790075033, L(p,q)-L0 = -0.0000000260971545 +t = 83.8000, H(p,q)-H0 = -0.0000001790079456, L(p,q)-L0 = -0.0000000260971571 +t = 83.9000, H(p,q)-H0 = -0.0000001790082774, L(p,q)-L0 = -0.0000000260971594 +t = 84.0000, H(p,q)-H0 = -0.0000001790085283, L(p,q)-L0 = -0.0000000260971613 +t = 84.1000, H(p,q)-H0 = -0.0000001790087186, L(p,q)-L0 = -0.0000000260971625 +t = 84.2000, H(p,q)-H0 = -0.0000001790088631, L(p,q)-L0 = -0.0000000260971635 +t = 84.3000, H(p,q)-H0 = -0.0000001790089728, L(p,q)-L0 = -0.0000000260971648 +t = 84.4000, H(p,q)-H0 = -0.0000001790090546, L(p,q)-L0 = -0.0000000260971655 +t = 84.5000, H(p,q)-H0 = -0.0000001790091151, L(p,q)-L0 = -0.0000000260971671 +t = 84.6000, H(p,q)-H0 = -0.0000001790091567, L(p,q)-L0 = -0.0000000260971683 +t = 84.7000, H(p,q)-H0 = -0.0000001790091825, L(p,q)-L0 = -0.0000000260971693 +t = 84.8000, H(p,q)-H0 = -0.0000001790091940, L(p,q)-L0 = -0.0000000260971703 +t = 84.9000, H(p,q)-H0 = -0.0000001790091918, L(p,q)-L0 = -0.0000000260971715 +t = 85.0000, H(p,q)-H0 = -0.0000001790091755, L(p,q)-L0 = -0.0000000260971723 +t = 85.1000, H(p,q)-H0 = -0.0000001790091444, L(p,q)-L0 = -0.0000000260971735 +t = 85.2000, H(p,q)-H0 = -0.0000001790090962, L(p,q)-L0 = -0.0000000260971745 +t = 85.3000, H(p,q)-H0 = -0.0000001790090286, L(p,q)-L0 = -0.0000000260971762 +t = 85.4000, H(p,q)-H0 = -0.0000001790089362, L(p,q)-L0 = -0.0000000260971775 +t = 85.5000, H(p,q)-H0 = -0.0000001790088130, L(p,q)-L0 = -0.0000000260971792 +t = 85.6000, H(p,q)-H0 = -0.0000001790086495, L(p,q)-L0 = -0.0000000260971802 +t = 85.7000, H(p,q)-H0 = -0.0000001790084347, L(p,q)-L0 = -0.0000000260971823 +t = 85.8000, H(p,q)-H0 = -0.0000001790081501, L(p,q)-L0 = -0.0000000260971842 +t = 85.9000, H(p,q)-H0 = -0.0000001790077715, L(p,q)-L0 = -0.0000000260971862 +t = 86.0000, H(p,q)-H0 = -0.0000001790072637, L(p,q)-L0 = -0.0000000260971891 +t = 86.1000, H(p,q)-H0 = -0.0000001790065763, L(p,q)-L0 = -0.0000000260971931 +t = 86.2000, H(p,q)-H0 = -0.0000001790056330, L(p,q)-L0 = -0.0000000260971973 +t = 86.3000, H(p,q)-H0 = -0.0000001790043225, L(p,q)-L0 = -0.0000000260972035 +t = 86.4000, H(p,q)-H0 = -0.0000001790024727, L(p,q)-L0 = -0.0000000260972119 +t = 86.5000, H(p,q)-H0 = -0.0000001789998165, L(p,q)-L0 = -0.0000000260972239 +t = 86.6000, H(p,q)-H0 = -0.0000001789959280, L(p,q)-L0 = -0.0000000260972410 +t = 86.7000, H(p,q)-H0 = -0.0000001789901138, L(p,q)-L0 = -0.0000000260972668 +t = 86.8000, H(p,q)-H0 = -0.0000001789812143, L(p,q)-L0 = -0.0000000260973063 +t = 86.9000, H(p,q)-H0 = -0.0000001789672398, L(p,q)-L0 = -0.0000000260973703 +t = 87.0000, H(p,q)-H0 = -0.0000001789446868, L(p,q)-L0 = -0.0000000260974793 +t = 87.1000, H(p,q)-H0 = -0.0000001789072314, L(p,q)-L0 = -0.0000000260976779 +t = 87.2000, H(p,q)-H0 = -0.0000001788432364, L(p,q)-L0 = -0.0000000260980633 +t = 87.3000, H(p,q)-H0 = -0.0000001787311613, L(p,q)-L0 = -0.0000000260988734 +t = 87.4000, H(p,q)-H0 = -0.0000001785318307, L(p,q)-L0 = -0.0000000261007465 +t = 87.5000, H(p,q)-H0 = -0.0000001781768377, L(p,q)-L0 = -0.0000000261055634 +t = 87.6000, H(p,q)-H0 = -0.0000001775336020, L(p,q)-L0 = -0.0000000261194221 +t = 87.7000, H(p,q)-H0 = -0.0000001760651396, L(p,q)-L0 = -0.0000000261632049 +t = 87.8000, H(p,q)-H0 = -0.0000001707039721, L(p,q)-L0 = -0.0000000263030010 +ROOT RETURN: t = 87.8504 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 87.8504, H(p,q)-H0 = -0.0000001658336990, L(p,q)-L0 = -0.0000000269003468 +t = 87.9000, H(p,q)-H0 = -0.0000001566574559, L(p,q)-L0 = -0.0000000266708413 +t = 88.0000, H(p,q)-H0 = -0.0000001555989786, L(p,q)-L0 = -0.0000000272586693 +t = 88.1000, H(p,q)-H0 = -0.0000001749598755, L(p,q)-L0 = -0.0000000277261296 +t = 88.2000, H(p,q)-H0 = -0.0000001850469524, L(p,q)-L0 = -0.0000000279303964 +t = 88.3000, H(p,q)-H0 = -0.0000001878239839, L(p,q)-L0 = -0.0000000279966472 +t = 88.4000, H(p,q)-H0 = -0.0000001888093408, L(p,q)-L0 = -0.0000000280172091 +t = 88.5000, H(p,q)-H0 = -0.0000001892897106, L(p,q)-L0 = -0.0000000280240952 +t = 88.6000, H(p,q)-H0 = -0.0000001895459414, L(p,q)-L0 = -0.0000000280266713 +t = 88.7000, H(p,q)-H0 = -0.0000001896860389, L(p,q)-L0 = -0.0000000280277472 +t = 88.8000, H(p,q)-H0 = -0.0000001897644556, L(p,q)-L0 = -0.0000000280282425 +t = 88.9000, H(p,q)-H0 = -0.0000001898096190, L(p,q)-L0 = -0.0000000280284912 +ROOT RETURN: t = 88.9950 g[0] = -1, y[0] = -0.658622, y[1] = 0.798622 +t = 88.9950, H(p,q)-H0 = -0.0000001896585367, L(p,q)-L0 = -0.0000000277032686 +t = 89.0000, H(p,q)-H0 = -0.0000001898364448, L(p,q)-L0 = -0.0000000280286255 +t = 89.1000, H(p,q)-H0 = -0.0000001898528728, L(p,q)-L0 = -0.0000000280287027 +t = 89.2000, H(p,q)-H0 = -0.0000001898632301, L(p,q)-L0 = -0.0000000280287495 +t = 89.3000, H(p,q)-H0 = -0.0000001898699378, L(p,q)-L0 = -0.0000000280287791 +t = 89.4000, H(p,q)-H0 = -0.0000001898743898, L(p,q)-L0 = -0.0000000280287989 +t = 89.5000, H(p,q)-H0 = -0.0000001898774109, L(p,q)-L0 = -0.0000000280288124 +t = 89.6000, H(p,q)-H0 = -0.0000001898795028, L(p,q)-L0 = -0.0000000280288219 +t = 89.7000, H(p,q)-H0 = -0.0000001898809773, L(p,q)-L0 = -0.0000000280288288 +t = 89.8000, H(p,q)-H0 = -0.0000001898820338, L(p,q)-L0 = -0.0000000280288337 +t = 89.9000, H(p,q)-H0 = -0.0000001898828024, L(p,q)-L0 = -0.0000000280288380 +t = 90.0000, H(p,q)-H0 = -0.0000001898833679, L(p,q)-L0 = -0.0000000280288410 +t = 90.1000, H(p,q)-H0 = -0.0000001898837888, L(p,q)-L0 = -0.0000000280288436 +t = 90.2000, H(p,q)-H0 = -0.0000001898841049, L(p,q)-L0 = -0.0000000280288452 +t = 90.3000, H(p,q)-H0 = -0.0000001898843445, L(p,q)-L0 = -0.0000000280288475 +t = 90.4000, H(p,q)-H0 = -0.0000001898845265, L(p,q)-L0 = -0.0000000280288495 +t = 90.5000, H(p,q)-H0 = -0.0000001898846649, L(p,q)-L0 = -0.0000000280288510 +t = 90.6000, H(p,q)-H0 = -0.0000001898847695, L(p,q)-L0 = -0.0000000280288522 +t = 90.7000, H(p,q)-H0 = -0.0000001898848473, L(p,q)-L0 = -0.0000000280288526 +t = 90.8000, H(p,q)-H0 = -0.0000001898849037, L(p,q)-L0 = -0.0000000280288535 +t = 90.9000, H(p,q)-H0 = -0.0000001898849425, L(p,q)-L0 = -0.0000000280288543 +t = 91.0000, H(p,q)-H0 = -0.0000001898849659, L(p,q)-L0 = -0.0000000280288553 +t = 91.1000, H(p,q)-H0 = -0.0000001898849750, L(p,q)-L0 = -0.0000000280288560 +t = 91.2000, H(p,q)-H0 = -0.0000001898849701, L(p,q)-L0 = -0.0000000280288562 +t = 91.3000, H(p,q)-H0 = -0.0000001898849512, L(p,q)-L0 = -0.0000000280288572 +t = 91.4000, H(p,q)-H0 = -0.0000001898849171, L(p,q)-L0 = -0.0000000280288579 +t = 91.5000, H(p,q)-H0 = -0.0000001898848656, L(p,q)-L0 = -0.0000000280288587 +t = 91.6000, H(p,q)-H0 = -0.0000001898847939, L(p,q)-L0 = -0.0000000280288600 +t = 91.7000, H(p,q)-H0 = -0.0000001898846966, L(p,q)-L0 = -0.0000000280288610 +t = 91.8000, H(p,q)-H0 = -0.0000001898845672, L(p,q)-L0 = -0.0000000280288620 +t = 91.9000, H(p,q)-H0 = -0.0000001898843962, L(p,q)-L0 = -0.0000000280288636 +t = 92.0000, H(p,q)-H0 = -0.0000001898841708, L(p,q)-L0 = -0.0000000280288655 +t = 92.1000, H(p,q)-H0 = -0.0000001898838726, L(p,q)-L0 = -0.0000000280288676 +t = 92.2000, H(p,q)-H0 = -0.0000001898834751, L(p,q)-L0 = -0.0000000280288697 +t = 92.3000, H(p,q)-H0 = -0.0000001898829416, L(p,q)-L0 = -0.0000000280288729 +t = 92.4000, H(p,q)-H0 = -0.0000001898822171, L(p,q)-L0 = -0.0000000280288767 +t = 92.5000, H(p,q)-H0 = -0.0000001898812216, L(p,q)-L0 = -0.0000000280288815 +t = 92.6000, H(p,q)-H0 = -0.0000001898798343, L(p,q)-L0 = -0.0000000280288880 +t = 92.7000, H(p,q)-H0 = -0.0000001898778716, L(p,q)-L0 = -0.0000000280288976 +t = 92.8000, H(p,q)-H0 = -0.0000001898750435, L(p,q)-L0 = -0.0000000280289101 +t = 92.9000, H(p,q)-H0 = -0.0000001898708895, L(p,q)-L0 = -0.0000000280289284 +t = 93.0000, H(p,q)-H0 = -0.0000001898646541, L(p,q)-L0 = -0.0000000280289556 +t = 93.1000, H(p,q)-H0 = -0.0000001898550709, L(p,q)-L0 = -0.0000000280289987 +t = 93.2000, H(p,q)-H0 = -0.0000001898399551, L(p,q)-L0 = -0.0000000280290684 +t = 93.3000, H(p,q)-H0 = -0.0000001898154431, L(p,q)-L0 = -0.0000000280291886 +t = 93.4000, H(p,q)-H0 = -0.0000001897745362, L(p,q)-L0 = -0.0000000280294098 +t = 93.5000, H(p,q)-H0 = -0.0000001897043268, L(p,q)-L0 = -0.0000000280298439 +t = 93.6000, H(p,q)-H0 = -0.0000001895809442, L(p,q)-L0 = -0.0000000280307697 +t = 93.7000, H(p,q)-H0 = -0.0000001893612376, L(p,q)-L0 = -0.0000000280329480 +t = 93.8000, H(p,q)-H0 = -0.0000001889701315, L(p,q)-L0 = -0.0000000280386572 +t = 93.9000, H(p,q)-H0 = -0.0000001882510074, L(p,q)-L0 = -0.0000000280553829 +t = 94.0000, H(p,q)-H0 = -0.0000001864738355, L(p,q)-L0 = -0.0000000281087675 +t = 94.1000, H(p,q)-H0 = -0.0000001797882589, L(p,q)-L0 = -0.0000000282767912 +ROOT RETURN: t = 94.1336 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 94.1336, H(p,q)-H0 = -0.0000002230411393, L(p,q)-L0 = -0.0000000441741270 +t = 94.2000, H(p,q)-H0 = -0.0000001653372996, L(p,q)-L0 = -0.0000000286923685 +t = 94.3000, H(p,q)-H0 = -0.0000001693073164, L(p,q)-L0 = -0.0000000292870754 +t = 94.4000, H(p,q)-H0 = -0.0000001884358527, L(p,q)-L0 = -0.0000000297081790 +t = 94.5000, H(p,q)-H0 = -0.0000001966663752, L(p,q)-L0 = -0.0000000298792937 +t = 94.6000, H(p,q)-H0 = -0.0000001989285208, L(p,q)-L0 = -0.0000000299336169 +t = 94.7000, H(p,q)-H0 = -0.0000001997893495, L(p,q)-L0 = -0.0000000299506040 +t = 94.8000, H(p,q)-H0 = -0.0000002002203056, L(p,q)-L0 = -0.0000000299563938 +t = 94.9000, H(p,q)-H0 = -0.0000002004514631, L(p,q)-L0 = -0.0000000299586003 +t = 95.0000, H(p,q)-H0 = -0.0000002005783051, L(p,q)-L0 = -0.0000000299595384 +t = 95.1000, H(p,q)-H0 = -0.0000002006496229, L(p,q)-L0 = -0.0000000299599773 +t = 95.2000, H(p,q)-H0 = -0.0000002006909088, L(p,q)-L0 = -0.0000000299602008 +ROOT RETURN: t = 95.2782 g[0] = -1, y[0] = -0.658622, y[1] = 0.798622 +t = 95.2782, H(p,q)-H0 = -0.0000002006505437, L(p,q)-L0 = -0.0000000298486129 +t = 95.3000, H(p,q)-H0 = -0.0000002007155586, L(p,q)-L0 = -0.0000000299603227 +t = 95.4000, H(p,q)-H0 = -0.0000002007307307, L(p,q)-L0 = -0.0000000299603936 +t = 95.5000, H(p,q)-H0 = -0.0000002007403406, L(p,q)-L0 = -0.0000000299604366 +t = 95.6000, H(p,q)-H0 = -0.0000002007465910, L(p,q)-L0 = -0.0000000299604641 +t = 95.7000, H(p,q)-H0 = -0.0000002007507558, L(p,q)-L0 = -0.0000000299604828 +t = 95.8000, H(p,q)-H0 = -0.0000002007535922, L(p,q)-L0 = -0.0000000299604959 +t = 95.9000, H(p,q)-H0 = -0.0000002007555624, L(p,q)-L0 = -0.0000000299605052 +t = 96.0000, H(p,q)-H0 = -0.0000002007569556, L(p,q)-L0 = -0.0000000299605120 +t = 96.1000, H(p,q)-H0 = -0.0000002007579564, L(p,q)-L0 = -0.0000000299605171 +t = 96.2000, H(p,q)-H0 = -0.0000002007586850, L(p,q)-L0 = -0.0000000299605203 +t = 96.3000, H(p,q)-H0 = -0.0000002007592228, L(p,q)-L0 = -0.0000000299605234 +t = 96.4000, H(p,q)-H0 = -0.0000002007596239, L(p,q)-L0 = -0.0000000299605261 +t = 96.5000, H(p,q)-H0 = -0.0000002007599259, L(p,q)-L0 = -0.0000000299605285 +t = 96.6000, H(p,q)-H0 = -0.0000002007601543, L(p,q)-L0 = -0.0000000299605303 +t = 96.7000, H(p,q)-H0 = -0.0000002007603281, L(p,q)-L0 = -0.0000000299605317 +t = 96.8000, H(p,q)-H0 = -0.0000002007604597, L(p,q)-L0 = -0.0000000299605325 +t = 96.9000, H(p,q)-H0 = -0.0000002007605596, L(p,q)-L0 = -0.0000000299605338 +t = 97.0000, H(p,q)-H0 = -0.0000002007606337, L(p,q)-L0 = -0.0000000299605348 +t = 97.1000, H(p,q)-H0 = -0.0000002007606874, L(p,q)-L0 = -0.0000000299605361 +t = 97.2000, H(p,q)-H0 = -0.0000002007607235, L(p,q)-L0 = -0.0000000299605371 +t = 97.3000, H(p,q)-H0 = -0.0000002007607446, L(p,q)-L0 = -0.0000000299605381 +t = 97.4000, H(p,q)-H0 = -0.0000002007607512, L(p,q)-L0 = -0.0000000299605389 +t = 97.5000, H(p,q)-H0 = -0.0000002007607444, L(p,q)-L0 = -0.0000000299605398 +t = 97.6000, H(p,q)-H0 = -0.0000002007607232, L(p,q)-L0 = -0.0000000299605412 +t = 97.7000, H(p,q)-H0 = -0.0000002007606865, L(p,q)-L0 = -0.0000000299605422 +t = 97.8000, H(p,q)-H0 = -0.0000002007606321, L(p,q)-L0 = -0.0000000299605432 +t = 97.9000, H(p,q)-H0 = -0.0000002007605565, L(p,q)-L0 = -0.0000000299605444 +t = 98.0000, H(p,q)-H0 = -0.0000002007604543, L(p,q)-L0 = -0.0000000299605456 +t = 98.1000, H(p,q)-H0 = -0.0000002007603186, L(p,q)-L0 = -0.0000000299605468 +t = 98.2000, H(p,q)-H0 = -0.0000002007601395, L(p,q)-L0 = -0.0000000299605485 +t = 98.3000, H(p,q)-H0 = -0.0000002007599033, L(p,q)-L0 = -0.0000000299605500 +t = 98.4000, H(p,q)-H0 = -0.0000002007595903, L(p,q)-L0 = -0.0000000299605520 +t = 98.5000, H(p,q)-H0 = -0.0000002007591734, L(p,q)-L0 = -0.0000000299605554 +t = 98.6000, H(p,q)-H0 = -0.0000002007586117, L(p,q)-L0 = -0.0000000299605583 +t = 98.7000, H(p,q)-H0 = -0.0000002007578481, L(p,q)-L0 = -0.0000000299605619 +t = 98.8000, H(p,q)-H0 = -0.0000002007567965, L(p,q)-L0 = -0.0000000299605668 +t = 98.9000, H(p,q)-H0 = -0.0000002007553273, L(p,q)-L0 = -0.0000000299605734 +t = 99.0000, H(p,q)-H0 = -0.0000002007532420, L(p,q)-L0 = -0.0000000299605827 +t = 99.1000, H(p,q)-H0 = -0.0000002007502293, L(p,q)-L0 = -0.0000000299605961 +t = 99.2000, H(p,q)-H0 = -0.0000002007457882, L(p,q)-L0 = -0.0000000299606155 +t = 99.3000, H(p,q)-H0 = -0.0000002007390968, L(p,q)-L0 = -0.0000000299606446 +t = 99.4000, H(p,q)-H0 = -0.0000002007287694, L(p,q)-L0 = -0.0000000299606912 +t = 99.5000, H(p,q)-H0 = -0.0000002007124057, L(p,q)-L0 = -0.0000000299607671 +t = 99.6000, H(p,q)-H0 = -0.0000002006857424, L(p,q)-L0 = -0.0000000299608993 +t = 99.7000, H(p,q)-H0 = -0.0000002006410295, L(p,q)-L0 = -0.0000000299611451 +t = 99.8000, H(p,q)-H0 = -0.0000002005639476, L(p,q)-L0 = -0.0000000299616341 +t = 99.9000, H(p,q)-H0 = -0.0000002004280650, L(p,q)-L0 = -0.0000000299626961 +t = 100.0000, H(p,q)-H0 = -0.0000002001859164, L(p,q)-L0 = -0.0000000299652380 +Current time = 99.99999999999859 +Steps = 10000 +Step attempts = 10000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.01 +Last step size = 0.009999999999948264 +Current step size = 0.009999999999948264 +Root fn evals = 10293 +Explicit RHS fn evals = 60001 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots.out new file mode 100644 index 0000000000..46eadf4bf8 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots.out @@ -0,0 +1,1088 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.01 + Tf: 100 + nout: 1000 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 0.1000, H(p,q)-H0 = -0.0000000018824715, L(p,q)-L0 = 0.0000000000000004 +t = 0.2000, H(p,q)-H0 = -0.0000000017446893, L(p,q)-L0 = 0.0000000000000000 +t = 0.3000, H(p,q)-H0 = 0.0000000001300136, L(p,q)-L0 = 0.0000000000000004 +t = 0.4000, H(p,q)-H0 = 0.0000000012995816, L(p,q)-L0 = 0.0000000000000003 +t = 0.5000, H(p,q)-H0 = 0.0000000018083006, L(p,q)-L0 = 0.0000000000000004 +t = 0.6000, H(p,q)-H0 = 0.0000000020168764, L(p,q)-L0 = 0.0000000000000003 +t = 0.7000, H(p,q)-H0 = 0.0000000021055059, L(p,q)-L0 = 0.0000000000000009 +t = 0.8000, H(p,q)-H0 = 0.0000000021456843, L(p,q)-L0 = 0.0000000000000012 +t = 0.9000, H(p,q)-H0 = 0.0000000021652187, L(p,q)-L0 = 0.0000000000000012 +t = 1.0000, H(p,q)-H0 = 0.0000000021753710, L(p,q)-L0 = 0.0000000000000007 +ROOT RETURN: t = 1.0305 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 1.0305, H(p,q)-H0 = 0.0000000021770694, L(p,q)-L0 = -0.0000000000004660 +t = 1.1000, H(p,q)-H0 = 0.0000000021809786, L(p,q)-L0 = 0.0000000000000008 +t = 1.2000, H(p,q)-H0 = 0.0000000021842472, L(p,q)-L0 = 0.0000000000000006 +t = 1.3000, H(p,q)-H0 = 0.0000000021862454, L(p,q)-L0 = 0.0000000000000007 +t = 1.4000, H(p,q)-H0 = 0.0000000021875197, L(p,q)-L0 = 0.0000000000000004 +t = 1.5000, H(p,q)-H0 = 0.0000000021883627, L(p,q)-L0 = 0.0000000000000007 +t = 1.6000, H(p,q)-H0 = 0.0000000021889383, L(p,q)-L0 = 0.0000000000000004 +t = 1.7000, H(p,q)-H0 = 0.0000000021893426, L(p,q)-L0 = 0.0000000000000001 +t = 1.8000, H(p,q)-H0 = 0.0000000021896337, L(p,q)-L0 = 0.0000000000000000 +t = 1.9000, H(p,q)-H0 = 0.0000000021898475, L(p,q)-L0 = -0.0000000000000002 +t = 2.0000, H(p,q)-H0 = 0.0000000021900078, L(p,q)-L0 = -0.0000000000000003 +t = 2.1000, H(p,q)-H0 = 0.0000000021901300, L(p,q)-L0 = -0.0000000000000003 +t = 2.2000, H(p,q)-H0 = 0.0000000021902241, L(p,q)-L0 = 0.0000000000000000 +t = 2.3000, H(p,q)-H0 = 0.0000000021902972, L(p,q)-L0 = 0.0000000000000001 +t = 2.4000, H(p,q)-H0 = 0.0000000021903539, L(p,q)-L0 = -0.0000000000000002 +t = 2.5000, H(p,q)-H0 = 0.0000000021903985, L(p,q)-L0 = -0.0000000000000004 +t = 2.6000, H(p,q)-H0 = 0.0000000021904330, L(p,q)-L0 = -0.0000000000000003 +t = 2.7000, H(p,q)-H0 = 0.0000000021904595, L(p,q)-L0 = -0.0000000000000006 +t = 2.8000, H(p,q)-H0 = 0.0000000021904794, L(p,q)-L0 = -0.0000000000000007 +t = 2.9000, H(p,q)-H0 = 0.0000000021904932, L(p,q)-L0 = -0.0000000000000008 +t = 3.0000, H(p,q)-H0 = 0.0000000021905022, L(p,q)-L0 = -0.0000000000000008 +t = 3.1000, H(p,q)-H0 = 0.0000000021905060, L(p,q)-L0 = -0.0000000000000016 +t = 3.2000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = -0.0000000000000019 +t = 3.3000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = -0.0000000000000018 +t = 3.4000, H(p,q)-H0 = 0.0000000021904906, L(p,q)-L0 = -0.0000000000000020 +t = 3.5000, H(p,q)-H0 = 0.0000000021904755, L(p,q)-L0 = -0.0000000000000021 +t = 3.6000, H(p,q)-H0 = 0.0000000021904544, L(p,q)-L0 = -0.0000000000000022 +t = 3.7000, H(p,q)-H0 = 0.0000000021904261, L(p,q)-L0 = -0.0000000000000026 +t = 3.8000, H(p,q)-H0 = 0.0000000021903898, L(p,q)-L0 = -0.0000000000000023 +t = 3.9000, H(p,q)-H0 = 0.0000000021903431, L(p,q)-L0 = -0.0000000000000024 +t = 4.0000, H(p,q)-H0 = 0.0000000021902835, L(p,q)-L0 = -0.0000000000000026 +t = 4.1000, H(p,q)-H0 = 0.0000000021902075, L(p,q)-L0 = -0.0000000000000021 +t = 4.2000, H(p,q)-H0 = 0.0000000021901092, L(p,q)-L0 = -0.0000000000000018 +t = 4.3000, H(p,q)-H0 = 0.0000000021899808, L(p,q)-L0 = -0.0000000000000022 +t = 4.4000, H(p,q)-H0 = 0.0000000021898121, L(p,q)-L0 = -0.0000000000000018 +t = 4.5000, H(p,q)-H0 = 0.0000000021895855, L(p,q)-L0 = -0.0000000000000022 +t = 4.6000, H(p,q)-H0 = 0.0000000021892767, L(p,q)-L0 = -0.0000000000000022 +t = 4.7000, H(p,q)-H0 = 0.0000000021888460, L(p,q)-L0 = -0.0000000000000021 +t = 4.8000, H(p,q)-H0 = 0.0000000021882305, L(p,q)-L0 = -0.0000000000000020 +t = 4.9000, H(p,q)-H0 = 0.0000000021873248, L(p,q)-L0 = -0.0000000000000017 +t = 5.0000, H(p,q)-H0 = 0.0000000021859475, L(p,q)-L0 = -0.0000000000000017 +t = 5.1000, H(p,q)-H0 = 0.0000000021837739, L(p,q)-L0 = -0.0000000000000018 +t = 5.2000, H(p,q)-H0 = 0.0000000021801948, L(p,q)-L0 = -0.0000000000000017 +t = 5.3000, H(p,q)-H0 = 0.0000000021740074, L(p,q)-L0 = -0.0000000000000018 +t = 5.4000, H(p,q)-H0 = 0.0000000021627112, L(p,q)-L0 = -0.0000000000000017 +t = 5.5000, H(p,q)-H0 = 0.0000000021407837, L(p,q)-L0 = -0.0000000000000020 +t = 5.6000, H(p,q)-H0 = 0.0000000020952701, L(p,q)-L0 = -0.0000000000000018 +t = 5.7000, H(p,q)-H0 = 0.0000000019940063, L(p,q)-L0 = -0.0000000000000021 +t = 5.8000, H(p,q)-H0 = 0.0000000017543397, L(p,q)-L0 = -0.0000000000000024 +t = 5.9000, H(p,q)-H0 = 0.0000000011716919, L(p,q)-L0 = -0.0000000000000024 +t = 6.0000, H(p,q)-H0 = -0.0000000001292921, L(p,q)-L0 = -0.0000000000000028 +t = 6.1000, H(p,q)-H0 = -0.0000000019832644, L(p,q)-L0 = -0.0000000000000024 +ROOT RETURN: t = 6.1690 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 6.1690, H(p,q)-H0 = 0.0000000071529027, L(p,q)-L0 = 0.0000000018309203 +t = 6.2000, H(p,q)-H0 = -0.0000000015692083, L(p,q)-L0 = -0.0000000000000024 +t = 6.3000, H(p,q)-H0 = -0.0000000000785492, L(p,q)-L0 = -0.0000000000000023 +t = 6.4000, H(p,q)-H0 = -0.0000000021444535, L(p,q)-L0 = -0.0000000000000026 +t = 6.5000, H(p,q)-H0 = -0.0000000014380235, L(p,q)-L0 = -0.0000000000000027 +t = 6.6000, H(p,q)-H0 = 0.0000000003899563, L(p,q)-L0 = -0.0000000000000023 +t = 6.7000, H(p,q)-H0 = 0.0000000014194250, L(p,q)-L0 = -0.0000000000000023 +t = 6.8000, H(p,q)-H0 = 0.0000000018574048, L(p,q)-L0 = -0.0000000000000017 +t = 6.9000, H(p,q)-H0 = 0.0000000020373458, L(p,q)-L0 = -0.0000000000000014 +t = 7.0000, H(p,q)-H0 = 0.0000000021145609, L(p,q)-L0 = -0.0000000000000008 +t = 7.1000, H(p,q)-H0 = 0.0000000021499782, L(p,q)-L0 = -0.0000000000000004 +t = 7.2000, H(p,q)-H0 = 0.0000000021673986, L(p,q)-L0 = -0.0000000000000002 +t = 7.3000, H(p,q)-H0 = 0.0000000021765503, L(p,q)-L0 = -0.0000000000000002 +ROOT RETURN: t = 7.3137 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 7.3137, H(p,q)-H0 = 0.0000000021741309, L(p,q)-L0 = -0.0000000000042731 +t = 7.4000, H(p,q)-H0 = 0.0000000021816533, L(p,q)-L0 = 0.0000000000000002 +t = 7.5000, H(p,q)-H0 = 0.0000000021846533, L(p,q)-L0 = 0.0000000000000007 +t = 7.6000, H(p,q)-H0 = 0.0000000021865008, L(p,q)-L0 = 0.0000000000000004 +t = 7.7000, H(p,q)-H0 = 0.0000000021876867, L(p,q)-L0 = 0.0000000000000004 +t = 7.8000, H(p,q)-H0 = 0.0000000021884756, L(p,q)-L0 = 0.0000000000000004 +t = 7.9000, H(p,q)-H0 = 0.0000000021890174, L(p,q)-L0 = 0.0000000000000006 +t = 8.0000, H(p,q)-H0 = 0.0000000021893999, L(p,q)-L0 = 0.0000000000000010 +t = 8.1000, H(p,q)-H0 = 0.0000000021896761, L(p,q)-L0 = 0.0000000000000009 +t = 8.2000, H(p,q)-H0 = 0.0000000021898795, L(p,q)-L0 = 0.0000000000000008 +t = 8.3000, H(p,q)-H0 = 0.0000000021900325, L(p,q)-L0 = 0.0000000000000009 +t = 8.4000, H(p,q)-H0 = 0.0000000021901491, L(p,q)-L0 = 0.0000000000000010 +t = 8.5000, H(p,q)-H0 = 0.0000000021902389, L(p,q)-L0 = 0.0000000000000011 +t = 8.6000, H(p,q)-H0 = 0.0000000021903087, L(p,q)-L0 = 0.0000000000000009 +t = 8.7000, H(p,q)-H0 = 0.0000000021903636, L(p,q)-L0 = 0.0000000000000011 +t = 8.8000, H(p,q)-H0 = 0.0000000021904061, L(p,q)-L0 = 0.0000000000000010 +t = 8.9000, H(p,q)-H0 = 0.0000000021904393, L(p,q)-L0 = 0.0000000000000009 +t = 9.0000, H(p,q)-H0 = 0.0000000021904647, L(p,q)-L0 = 0.0000000000000004 +t = 9.1000, H(p,q)-H0 = 0.0000000021904831, L(p,q)-L0 = 0.0000000000000000 +t = 9.2000, H(p,q)-H0 = 0.0000000021904960, L(p,q)-L0 = -0.0000000000000002 +t = 9.3000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = -0.0000000000000003 +t = 9.4000, H(p,q)-H0 = 0.0000000021905078, L(p,q)-L0 = -0.0000000000000002 +t = 9.5000, H(p,q)-H0 = 0.0000000021905066, L(p,q)-L0 = 0.0000000000000000 +t = 9.6000, H(p,q)-H0 = 0.0000000021905008, L(p,q)-L0 = 0.0000000000000002 +t = 9.7000, H(p,q)-H0 = 0.0000000021904900, L(p,q)-L0 = 0.0000000000000000 +t = 9.8000, H(p,q)-H0 = 0.0000000021904742, L(p,q)-L0 = 0.0000000000000006 +t = 9.9000, H(p,q)-H0 = 0.0000000021904522, L(p,q)-L0 = 0.0000000000000006 +t = 10.0000, H(p,q)-H0 = 0.0000000021904231, L(p,q)-L0 = 0.0000000000000008 +t = 10.1000, H(p,q)-H0 = 0.0000000021903852, L(p,q)-L0 = 0.0000000000000006 +t = 10.2000, H(p,q)-H0 = 0.0000000021903366, L(p,q)-L0 = 0.0000000000000008 +t = 10.3000, H(p,q)-H0 = 0.0000000021902746, L(p,q)-L0 = 0.0000000000000009 +t = 10.4000, H(p,q)-H0 = 0.0000000021901951, L(p,q)-L0 = 0.0000000000000011 +t = 10.5000, H(p,q)-H0 = 0.0000000021900923, L(p,q)-L0 = 0.0000000000000010 +t = 10.6000, H(p,q)-H0 = 0.0000000021899583, L(p,q)-L0 = 0.0000000000000011 +t = 10.7000, H(p,q)-H0 = 0.0000000021897812, L(p,q)-L0 = 0.0000000000000016 +t = 10.8000, H(p,q)-H0 = 0.0000000021895435, L(p,q)-L0 = 0.0000000000000019 +t = 10.9000, H(p,q)-H0 = 0.0000000021892176, L(p,q)-L0 = 0.0000000000000020 +t = 11.0000, H(p,q)-H0 = 0.0000000021887611, L(p,q)-L0 = 0.0000000000000020 +t = 11.1000, H(p,q)-H0 = 0.0000000021881056, L(p,q)-L0 = 0.0000000000000022 +t = 11.2000, H(p,q)-H0 = 0.0000000021871360, L(p,q)-L0 = 0.0000000000000023 +t = 11.3000, H(p,q)-H0 = 0.0000000021856529, L(p,q)-L0 = 0.0000000000000023 +t = 11.4000, H(p,q)-H0 = 0.0000000021832968, L(p,q)-L0 = 0.0000000000000023 +t = 11.5000, H(p,q)-H0 = 0.0000000021793864, L(p,q)-L0 = 0.0000000000000024 +t = 11.6000, H(p,q)-H0 = 0.0000000021725675, L(p,q)-L0 = 0.0000000000000024 +t = 11.7000, H(p,q)-H0 = 0.0000000021599945, L(p,q)-L0 = 0.0000000000000022 +t = 11.8000, H(p,q)-H0 = 0.0000000021353220, L(p,q)-L0 = 0.0000000000000028 +t = 11.9000, H(p,q)-H0 = 0.0000000020835074, L(p,q)-L0 = 0.0000000000000022 +t = 12.0000, H(p,q)-H0 = 0.0000000019669100, L(p,q)-L0 = 0.0000000000000022 +t = 12.1000, H(p,q)-H0 = 0.0000000016886921, L(p,q)-L0 = 0.0000000000000020 +t = 12.2000, H(p,q)-H0 = 0.0000000010143850, L(p,q)-L0 = 0.0000000000000023 +t = 12.3000, H(p,q)-H0 = -0.0000000004357736, L(p,q)-L0 = 0.0000000000000022 +t = 12.4000, H(p,q)-H0 = -0.0000000021842232, L(p,q)-L0 = 0.0000000000000022 +ROOT RETURN: t = 12.4522 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 12.4522, H(p,q)-H0 = 0.0000000036282710, L(p,q)-L0 = 0.0000000010789374 +t = 12.5000, H(p,q)-H0 = -0.0000000011492758, L(p,q)-L0 = 0.0000000000000023 +t = 12.6000, H(p,q)-H0 = -0.0000000003225991, L(p,q)-L0 = 0.0000000000000024 +t = 12.7000, H(p,q)-H0 = -0.0000000022824569, L(p,q)-L0 = 0.0000000000000024 +t = 12.8000, H(p,q)-H0 = -0.0000000011085746, L(p,q)-L0 = 0.0000000000000024 +t = 12.9000, H(p,q)-H0 = 0.0000000006228686, L(p,q)-L0 = 0.0000000000000024 +t = 13.0000, H(p,q)-H0 = 0.0000000015228507, L(p,q)-L0 = 0.0000000000000026 +t = 13.1000, H(p,q)-H0 = 0.0000000018996709, L(p,q)-L0 = 0.0000000000000023 +t = 13.2000, H(p,q)-H0 = 0.0000000020551160, L(p,q)-L0 = 0.0000000000000022 +t = 13.3000, H(p,q)-H0 = 0.0000000021225143, L(p,q)-L0 = 0.0000000000000018 +t = 13.4000, H(p,q)-H0 = 0.0000000021537955, L(p,q)-L0 = 0.0000000000000011 +t = 13.5000, H(p,q)-H0 = 0.0000000021693588, L(p,q)-L0 = 0.0000000000000012 +ROOT RETURN: t = 13.5969 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 13.5969, H(p,q)-H0 = 0.0000000021723162, L(p,q)-L0 = -0.0000000000066065 +t = 13.6000, H(p,q)-H0 = 0.0000000021776211, L(p,q)-L0 = 0.0000000000000014 +t = 13.7000, H(p,q)-H0 = 0.0000000021822713, L(p,q)-L0 = 0.0000000000000014 +t = 13.8000, H(p,q)-H0 = 0.0000000021850281, L(p,q)-L0 = 0.0000000000000018 +t = 13.9000, H(p,q)-H0 = 0.0000000021867388, L(p,q)-L0 = 0.0000000000000022 +t = 14.0000, H(p,q)-H0 = 0.0000000021878430, L(p,q)-L0 = 0.0000000000000020 +t = 14.1000, H(p,q)-H0 = 0.0000000021885820, L(p,q)-L0 = 0.0000000000000019 +t = 14.2000, H(p,q)-H0 = 0.0000000021890917, L(p,q)-L0 = 0.0000000000000020 +t = 14.3000, H(p,q)-H0 = 0.0000000021894530, L(p,q)-L0 = 0.0000000000000019 +t = 14.4000, H(p,q)-H0 = 0.0000000021897152, L(p,q)-L0 = 0.0000000000000022 +t = 14.5000, H(p,q)-H0 = 0.0000000021899093, L(p,q)-L0 = 0.0000000000000024 +t = 14.6000, H(p,q)-H0 = 0.0000000021900552, L(p,q)-L0 = 0.0000000000000024 +t = 14.7000, H(p,q)-H0 = 0.0000000021901674, L(p,q)-L0 = 0.0000000000000032 +t = 14.8000, H(p,q)-H0 = 0.0000000021902533, L(p,q)-L0 = 0.0000000000000029 +t = 14.9000, H(p,q)-H0 = 0.0000000021903204, L(p,q)-L0 = 0.0000000000000031 +t = 15.0000, H(p,q)-H0 = 0.0000000021903728, L(p,q)-L0 = 0.0000000000000030 +t = 15.1000, H(p,q)-H0 = 0.0000000021904137, L(p,q)-L0 = 0.0000000000000030 +t = 15.2000, H(p,q)-H0 = 0.0000000021904455, L(p,q)-L0 = 0.0000000000000031 +t = 15.3000, H(p,q)-H0 = 0.0000000021904695, L(p,q)-L0 = 0.0000000000000030 +t = 15.4000, H(p,q)-H0 = 0.0000000021904875, L(p,q)-L0 = 0.0000000000000032 +t = 15.5000, H(p,q)-H0 = 0.0000000021904996, L(p,q)-L0 = 0.0000000000000029 +t = 15.6000, H(p,q)-H0 = 0.0000000021905063, L(p,q)-L0 = 0.0000000000000020 +t = 15.7000, H(p,q)-H0 = 0.0000000021905089, L(p,q)-L0 = 0.0000000000000017 +t = 15.8000, H(p,q)-H0 = 0.0000000021905071, L(p,q)-L0 = 0.0000000000000020 +t = 15.9000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = 0.0000000000000020 +t = 16.0000, H(p,q)-H0 = 0.0000000021904886, L(p,q)-L0 = 0.0000000000000017 +t = 16.1000, H(p,q)-H0 = 0.0000000021904715, L(p,q)-L0 = 0.0000000000000016 +t = 16.2000, H(p,q)-H0 = 0.0000000021904482, L(p,q)-L0 = 0.0000000000000016 +t = 16.3000, H(p,q)-H0 = 0.0000000021904181, L(p,q)-L0 = 0.0000000000000019 +t = 16.4000, H(p,q)-H0 = 0.0000000021903783, L(p,q)-L0 = 0.0000000000000014 +t = 16.5000, H(p,q)-H0 = 0.0000000021903276, L(p,q)-L0 = 0.0000000000000012 +t = 16.6000, H(p,q)-H0 = 0.0000000021902630, L(p,q)-L0 = 0.0000000000000013 +t = 16.7000, H(p,q)-H0 = 0.0000000021901800, L(p,q)-L0 = 0.0000000000000016 +t = 16.8000, H(p,q)-H0 = 0.0000000021900730, L(p,q)-L0 = 0.0000000000000020 +t = 16.9000, H(p,q)-H0 = 0.0000000021899325, L(p,q)-L0 = 0.0000000000000020 +t = 17.0000, H(p,q)-H0 = 0.0000000021897464, L(p,q)-L0 = 0.0000000000000018 +t = 17.1000, H(p,q)-H0 = 0.0000000021894955, L(p,q)-L0 = 0.0000000000000018 +t = 17.2000, H(p,q)-H0 = 0.0000000021891514, L(p,q)-L0 = 0.0000000000000021 +t = 17.3000, H(p,q)-H0 = 0.0000000021886670, L(p,q)-L0 = 0.0000000000000020 +t = 17.4000, H(p,q)-H0 = 0.0000000021879680, L(p,q)-L0 = 0.0000000000000017 +t = 17.5000, H(p,q)-H0 = 0.0000000021869294, L(p,q)-L0 = 0.0000000000000020 +t = 17.6000, H(p,q)-H0 = 0.0000000021853308, L(p,q)-L0 = 0.0000000000000020 +t = 17.7000, H(p,q)-H0 = 0.0000000021827730, L(p,q)-L0 = 0.0000000000000020 +t = 17.8000, H(p,q)-H0 = 0.0000000021784950, L(p,q)-L0 = 0.0000000000000021 +t = 17.9000, H(p,q)-H0 = 0.0000000021709682, L(p,q)-L0 = 0.0000000000000022 +t = 18.0000, H(p,q)-H0 = 0.0000000021569497, L(p,q)-L0 = 0.0000000000000022 +t = 18.1000, H(p,q)-H0 = 0.0000000021291338, L(p,q)-L0 = 0.0000000000000024 +t = 18.2000, H(p,q)-H0 = 0.0000000020700305, L(p,q)-L0 = 0.0000000000000020 +t = 18.3000, H(p,q)-H0 = 0.0000000019355451, L(p,q)-L0 = 0.0000000000000018 +t = 18.4000, H(p,q)-H0 = 0.0000000016123738, L(p,q)-L0 = 0.0000000000000019 +t = 18.5000, H(p,q)-H0 = 0.0000000008341943, L(p,q)-L0 = 0.0000000000000017 +t = 18.6000, H(p,q)-H0 = -0.0000000007602392, L(p,q)-L0 = 0.0000000000000018 +t = 18.7000, H(p,q)-H0 = -0.0000000022936391, L(p,q)-L0 = 0.0000000000000017 +ROOT RETURN: t = 18.7354 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 18.7354, H(p,q)-H0 = 0.0000000126969431, L(p,q)-L0 = 0.0000000028491541 +t = 18.8000, H(p,q)-H0 = -0.0000000007197518, L(p,q)-L0 = 0.0000000000000013 +t = 18.9000, H(p,q)-H0 = -0.0000000006891667, L(p,q)-L0 = 0.0000000000000012 +t = 19.0000, H(p,q)-H0 = -0.0000000022938584, L(p,q)-L0 = 0.0000000000000012 +t = 19.1000, H(p,q)-H0 = -0.0000000007742569, L(p,q)-L0 = 0.0000000000000013 +t = 19.2000, H(p,q)-H0 = 0.0000000008292620, L(p,q)-L0 = 0.0000000000000008 +t = 19.3000, H(p,q)-H0 = 0.0000000016119190, L(p,q)-L0 = 0.0000000000000008 +t = 19.4000, H(p,q)-H0 = 0.0000000019360704, L(p,q)-L0 = 0.0000000000000010 +t = 19.5000, H(p,q)-H0 = 0.0000000020705563, L(p,q)-L0 = 0.0000000000000016 +t = 19.6000, H(p,q)-H0 = 0.0000000021295040, L(p,q)-L0 = 0.0000000000000018 +t = 19.7000, H(p,q)-H0 = 0.0000000021571889, L(p,q)-L0 = 0.0000000000000014 +t = 19.8000, H(p,q)-H0 = 0.0000000021711196, L(p,q)-L0 = 0.0000000000000019 +ROOT RETURN: t = 19.8800 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 19.8800, H(p,q)-H0 = 0.0000000021773984, L(p,q)-L0 = -0.0000000000000364 +t = 19.9000, H(p,q)-H0 = 0.0000000021785913, L(p,q)-L0 = 0.0000000000000020 +t = 20.0000, H(p,q)-H0 = 0.0000000021828354, L(p,q)-L0 = 0.0000000000000023 +t = 20.1000, H(p,q)-H0 = 0.0000000021853712, L(p,q)-L0 = 0.0000000000000021 +t = 20.2000, H(p,q)-H0 = 0.0000000021869562, L(p,q)-L0 = 0.0000000000000021 +t = 20.3000, H(p,q)-H0 = 0.0000000021879860, L(p,q)-L0 = 0.0000000000000018 +t = 20.4000, H(p,q)-H0 = 0.0000000021886788, L(p,q)-L0 = 0.0000000000000018 +t = 20.5000, H(p,q)-H0 = 0.0000000021891593, L(p,q)-L0 = 0.0000000000000020 +t = 20.6000, H(p,q)-H0 = 0.0000000021895015, L(p,q)-L0 = 0.0000000000000026 +t = 20.7000, H(p,q)-H0 = 0.0000000021897504, L(p,q)-L0 = 0.0000000000000026 +t = 20.8000, H(p,q)-H0 = 0.0000000021899352, L(p,q)-L0 = 0.0000000000000023 +t = 20.9000, H(p,q)-H0 = 0.0000000021900748, L(p,q)-L0 = 0.0000000000000029 +t = 21.0000, H(p,q)-H0 = 0.0000000021901817, L(p,q)-L0 = 0.0000000000000031 +t = 21.1000, H(p,q)-H0 = 0.0000000021902642, L(p,q)-L0 = 0.0000000000000031 +t = 21.2000, H(p,q)-H0 = 0.0000000021903285, L(p,q)-L0 = 0.0000000000000031 +t = 21.3000, H(p,q)-H0 = 0.0000000021903787, L(p,q)-L0 = 0.0000000000000028 +t = 21.4000, H(p,q)-H0 = 0.0000000021904180, L(p,q)-L0 = 0.0000000000000030 +t = 21.5000, H(p,q)-H0 = 0.0000000021904483, L(p,q)-L0 = 0.0000000000000029 +t = 21.6000, H(p,q)-H0 = 0.0000000021904710, L(p,q)-L0 = 0.0000000000000024 +t = 21.7000, H(p,q)-H0 = 0.0000000021904880, L(p,q)-L0 = 0.0000000000000026 +t = 21.8000, H(p,q)-H0 = 0.0000000021904994, L(p,q)-L0 = 0.0000000000000027 +t = 21.9000, H(p,q)-H0 = 0.0000000021905060, L(p,q)-L0 = 0.0000000000000027 +t = 22.0000, H(p,q)-H0 = 0.0000000021905077, L(p,q)-L0 = 0.0000000000000024 +t = 22.1000, H(p,q)-H0 = 0.0000000021905051, L(p,q)-L0 = 0.0000000000000027 +t = 22.2000, H(p,q)-H0 = 0.0000000021904976, L(p,q)-L0 = 0.0000000000000028 +t = 22.3000, H(p,q)-H0 = 0.0000000021904854, L(p,q)-L0 = 0.0000000000000028 +t = 22.4000, H(p,q)-H0 = 0.0000000021904675, L(p,q)-L0 = 0.0000000000000029 +t = 22.5000, H(p,q)-H0 = 0.0000000021904432, L(p,q)-L0 = 0.0000000000000028 +t = 22.6000, H(p,q)-H0 = 0.0000000021904113, L(p,q)-L0 = 0.0000000000000032 +t = 22.7000, H(p,q)-H0 = 0.0000000021903700, L(p,q)-L0 = 0.0000000000000031 +t = 22.8000, H(p,q)-H0 = 0.0000000021903174, L(p,q)-L0 = 0.0000000000000029 +t = 22.9000, H(p,q)-H0 = 0.0000000021902499, L(p,q)-L0 = 0.0000000000000030 +t = 23.0000, H(p,q)-H0 = 0.0000000021901633, L(p,q)-L0 = 0.0000000000000031 +t = 23.1000, H(p,q)-H0 = 0.0000000021900513, L(p,q)-L0 = 0.0000000000000034 +t = 23.2000, H(p,q)-H0 = 0.0000000021899044, L(p,q)-L0 = 0.0000000000000036 +t = 23.3000, H(p,q)-H0 = 0.0000000021897089, L(p,q)-L0 = 0.0000000000000031 +t = 23.4000, H(p,q)-H0 = 0.0000000021894446, L(p,q)-L0 = 0.0000000000000031 +t = 23.5000, H(p,q)-H0 = 0.0000000021890804, L(p,q)-L0 = 0.0000000000000030 +t = 23.6000, H(p,q)-H0 = 0.0000000021885663, L(p,q)-L0 = 0.0000000000000030 +t = 23.7000, H(p,q)-H0 = 0.0000000021878209, L(p,q)-L0 = 0.0000000000000026 +t = 23.8000, H(p,q)-H0 = 0.0000000021867065, L(p,q)-L0 = 0.0000000000000024 +t = 23.9000, H(p,q)-H0 = 0.0000000021849813, L(p,q)-L0 = 0.0000000000000023 +t = 24.0000, H(p,q)-H0 = 0.0000000021822015, L(p,q)-L0 = 0.0000000000000022 +t = 24.1000, H(p,q)-H0 = 0.0000000021775146, L(p,q)-L0 = 0.0000000000000024 +t = 24.2000, H(p,q)-H0 = 0.0000000021691927, L(p,q)-L0 = 0.0000000000000024 +t = 24.3000, H(p,q)-H0 = 0.0000000021535347, L(p,q)-L0 = 0.0000000000000026 +t = 24.4000, H(p,q)-H0 = 0.0000000021221145, L(p,q)-L0 = 0.0000000000000027 +t = 24.5000, H(p,q)-H0 = 0.0000000020545646, L(p,q)-L0 = 0.0000000000000027 +t = 24.6000, H(p,q)-H0 = 0.0000000018991955, L(p,q)-L0 = 0.0000000000000024 +t = 24.7000, H(p,q)-H0 = 0.0000000015237049, L(p,q)-L0 = 0.0000000000000018 +t = 24.8000, H(p,q)-H0 = 0.0000000006291418, L(p,q)-L0 = 0.0000000000000020 +t = 24.9000, H(p,q)-H0 = -0.0000000010937447, L(p,q)-L0 = 0.0000000000000016 +t = 25.0000, H(p,q)-H0 = -0.0000000022899942, L(p,q)-L0 = 0.0000000000000017 +ROOT RETURN: t = 25.0186 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 25.0186, H(p,q)-H0 = 0.0000000098686308, L(p,q)-L0 = 0.0000000023590684 +t = 25.1000, H(p,q)-H0 = -0.0000000003464102, L(p,q)-L0 = 0.0000000000000018 +t = 25.2000, H(p,q)-H0 = -0.0000000011168177, L(p,q)-L0 = 0.0000000000000011 +t = 25.3000, H(p,q)-H0 = -0.0000000021907172, L(p,q)-L0 = 0.0000000000000013 +t = 25.4000, H(p,q)-H0 = -0.0000000004484475, L(p,q)-L0 = 0.0000000000000016 +t = 25.5000, H(p,q)-H0 = 0.0000000010106107, L(p,q)-L0 = 0.0000000000000021 +t = 25.6000, H(p,q)-H0 = 0.0000000016885500, L(p,q)-L0 = 0.0000000000000023 +t = 25.7000, H(p,q)-H0 = 0.0000000019674671, L(p,q)-L0 = 0.0000000000000024 +t = 25.8000, H(p,q)-H0 = 0.0000000020840091, L(p,q)-L0 = 0.0000000000000028 +t = 25.9000, H(p,q)-H0 = 0.0000000021356669, L(p,q)-L0 = 0.0000000000000030 +t = 26.0000, H(p,q)-H0 = 0.0000000021602167, L(p,q)-L0 = 0.0000000000000033 +t = 26.1000, H(p,q)-H0 = 0.0000000021727081, L(p,q)-L0 = 0.0000000000000034 +ROOT RETURN: t = 26.1632 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 26.1632, H(p,q)-H0 = 0.0000000021745590, L(p,q)-L0 = -0.0000000000037175 +t = 26.2000, H(p,q)-H0 = 0.0000000021794757, L(p,q)-L0 = 0.0000000000000031 +t = 26.3000, H(p,q)-H0 = 0.0000000021833548, L(p,q)-L0 = 0.0000000000000031 +t = 26.4000, H(p,q)-H0 = 0.0000000021856916, L(p,q)-L0 = 0.0000000000000034 +t = 26.5000, H(p,q)-H0 = 0.0000000021871618, L(p,q)-L0 = 0.0000000000000036 +t = 26.6000, H(p,q)-H0 = 0.0000000021881231, L(p,q)-L0 = 0.0000000000000033 +t = 26.7000, H(p,q)-H0 = 0.0000000021887731, L(p,q)-L0 = 0.0000000000000033 +t = 26.8000, H(p,q)-H0 = 0.0000000021892259, L(p,q)-L0 = 0.0000000000000032 +t = 26.9000, H(p,q)-H0 = 0.0000000021895493, L(p,q)-L0 = 0.0000000000000032 +t = 27.0000, H(p,q)-H0 = 0.0000000021897855, L(p,q)-L0 = 0.0000000000000033 +t = 27.1000, H(p,q)-H0 = 0.0000000021899614, L(p,q)-L0 = 0.0000000000000030 +t = 27.2000, H(p,q)-H0 = 0.0000000021900946, L(p,q)-L0 = 0.0000000000000028 +t = 27.3000, H(p,q)-H0 = 0.0000000021901967, L(p,q)-L0 = 0.0000000000000028 +t = 27.4000, H(p,q)-H0 = 0.0000000021902758, L(p,q)-L0 = 0.0000000000000030 +t = 27.5000, H(p,q)-H0 = 0.0000000021903375, L(p,q)-L0 = 0.0000000000000029 +t = 27.6000, H(p,q)-H0 = 0.0000000021903857, L(p,q)-L0 = 0.0000000000000028 +t = 27.7000, H(p,q)-H0 = 0.0000000021904235, L(p,q)-L0 = 0.0000000000000031 +t = 27.8000, H(p,q)-H0 = 0.0000000021904527, L(p,q)-L0 = 0.0000000000000032 +t = 27.9000, H(p,q)-H0 = 0.0000000021904745, L(p,q)-L0 = 0.0000000000000033 +t = 28.0000, H(p,q)-H0 = 0.0000000021904908, L(p,q)-L0 = 0.0000000000000036 +t = 28.1000, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = 0.0000000000000034 +t = 28.2000, H(p,q)-H0 = 0.0000000021905070, L(p,q)-L0 = 0.0000000000000036 +t = 28.3000, H(p,q)-H0 = 0.0000000021905081, L(p,q)-L0 = 0.0000000000000036 +t = 28.4000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000031 +t = 28.5000, H(p,q)-H0 = 0.0000000021904960, L(p,q)-L0 = 0.0000000000000031 +t = 28.6000, H(p,q)-H0 = 0.0000000021904830, L(p,q)-L0 = 0.0000000000000033 +t = 28.7000, H(p,q)-H0 = 0.0000000021904643, L(p,q)-L0 = 0.0000000000000039 +t = 28.8000, H(p,q)-H0 = 0.0000000021904385, L(p,q)-L0 = 0.0000000000000037 +t = 28.9000, H(p,q)-H0 = 0.0000000021904052, L(p,q)-L0 = 0.0000000000000039 +t = 29.0000, H(p,q)-H0 = 0.0000000021903620, L(p,q)-L0 = 0.0000000000000037 +t = 29.1000, H(p,q)-H0 = 0.0000000021903072, L(p,q)-L0 = 0.0000000000000037 +t = 29.2000, H(p,q)-H0 = 0.0000000021902369, L(p,q)-L0 = 0.0000000000000038 +t = 29.3000, H(p,q)-H0 = 0.0000000021901463, L(p,q)-L0 = 0.0000000000000036 +t = 29.4000, H(p,q)-H0 = 0.0000000021900293, L(p,q)-L0 = 0.0000000000000042 +t = 29.5000, H(p,q)-H0 = 0.0000000021898753, L(p,q)-L0 = 0.0000000000000041 +t = 29.6000, H(p,q)-H0 = 0.0000000021896700, L(p,q)-L0 = 0.0000000000000042 +t = 29.7000, H(p,q)-H0 = 0.0000000021893919, L(p,q)-L0 = 0.0000000000000040 +t = 29.8000, H(p,q)-H0 = 0.0000000021890065, L(p,q)-L0 = 0.0000000000000040 +t = 29.9000, H(p,q)-H0 = 0.0000000021884604, L(p,q)-L0 = 0.0000000000000038 +t = 30.0000, H(p,q)-H0 = 0.0000000021876657, L(p,q)-L0 = 0.0000000000000044 +t = 30.1000, H(p,q)-H0 = 0.0000000021864693, L(p,q)-L0 = 0.0000000000000042 +t = 30.2000, H(p,q)-H0 = 0.0000000021846054, L(p,q)-L0 = 0.0000000000000042 +t = 30.3000, H(p,q)-H0 = 0.0000000021815807, L(p,q)-L0 = 0.0000000000000040 +t = 30.4000, H(p,q)-H0 = 0.0000000021764376, L(p,q)-L0 = 0.0000000000000038 +t = 30.5000, H(p,q)-H0 = 0.0000000021672218, L(p,q)-L0 = 0.0000000000000038 +t = 30.6000, H(p,q)-H0 = 0.0000000021497005, L(p,q)-L0 = 0.0000000000000039 +t = 30.7000, H(p,q)-H0 = 0.0000000021141389, L(p,q)-L0 = 0.0000000000000040 +t = 30.8000, H(p,q)-H0 = 0.0000000020367849, L(p,q)-L0 = 0.0000000000000039 +t = 30.9000, H(p,q)-H0 = 0.0000000018570208, L(p,q)-L0 = 0.0000000000000031 +t = 31.0000, H(p,q)-H0 = 0.0000000014208090, L(p,q)-L0 = 0.0000000000000032 +t = 31.1000, H(p,q)-H0 = 0.0000000003977567, L(p,q)-L0 = 0.0000000000000036 +t = 31.2000, H(p,q)-H0 = -0.0000000014232162, L(p,q)-L0 = 0.0000000000000033 +t = 31.3000, H(p,q)-H0 = -0.0000000021604556, L(p,q)-L0 = 0.0000000000000033 +ROOT RETURN: t = 31.3018 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 31.3018, H(p,q)-H0 = 0.0000000023148965, L(p,q)-L0 = 0.0000000008299378 +t = 31.4000, H(p,q)-H0 = -0.0000000000914391, L(p,q)-L0 = 0.0000000000000037 +t = 31.5000, H(p,q)-H0 = -0.0000000015394426, L(p,q)-L0 = 0.0000000000000033 +t = 31.6000, H(p,q)-H0 = -0.0000000019942215, L(p,q)-L0 = 0.0000000000000033 +t = 31.7000, H(p,q)-H0 = -0.0000000001403380, L(p,q)-L0 = 0.0000000000000033 +t = 31.8000, H(p,q)-H0 = 0.0000000011688988, L(p,q)-L0 = 0.0000000000000033 +t = 31.9000, H(p,q)-H0 = 0.0000000017544384, L(p,q)-L0 = 0.0000000000000033 +t = 32.0000, H(p,q)-H0 = 0.0000000019945824, L(p,q)-L0 = 0.0000000000000034 +t = 32.1000, H(p,q)-H0 = 0.0000000020957509, L(p,q)-L0 = 0.0000000000000039 +t = 32.2000, H(p,q)-H0 = 0.0000000021411103, L(p,q)-L0 = 0.0000000000000037 +t = 32.3000, H(p,q)-H0 = 0.0000000021629221, L(p,q)-L0 = 0.0000000000000041 +t = 32.4000, H(p,q)-H0 = 0.0000000021741428, L(p,q)-L0 = 0.0000000000000041 +ROOT RETURN: t = 32.4464 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 32.4464, H(p,q)-H0 = 0.0000000021723297, L(p,q)-L0 = -0.0000000000065910 +t = 32.5000, H(p,q)-H0 = 0.0000000021802830, L(p,q)-L0 = 0.0000000000000041 +t = 32.6000, H(p,q)-H0 = 0.0000000021838333, L(p,q)-L0 = 0.0000000000000044 +t = 32.7000, H(p,q)-H0 = 0.0000000021859882, L(p,q)-L0 = 0.0000000000000042 +t = 32.8000, H(p,q)-H0 = 0.0000000021873530, L(p,q)-L0 = 0.0000000000000039 +t = 32.9000, H(p,q)-H0 = 0.0000000021882515, L(p,q)-L0 = 0.0000000000000041 +t = 33.0000, H(p,q)-H0 = 0.0000000021888621, L(p,q)-L0 = 0.0000000000000042 +t = 33.1000, H(p,q)-H0 = 0.0000000021892892, L(p,q)-L0 = 0.0000000000000043 +t = 33.2000, H(p,q)-H0 = 0.0000000021895956, L(p,q)-L0 = 0.0000000000000044 +t = 33.3000, H(p,q)-H0 = 0.0000000021898200, L(p,q)-L0 = 0.0000000000000042 +t = 33.4000, H(p,q)-H0 = 0.0000000021899879, L(p,q)-L0 = 0.0000000000000044 +t = 33.5000, H(p,q)-H0 = 0.0000000021901150, L(p,q)-L0 = 0.0000000000000044 +t = 33.6000, H(p,q)-H0 = 0.0000000021902128, L(p,q)-L0 = 0.0000000000000046 +t = 33.7000, H(p,q)-H0 = 0.0000000021902886, L(p,q)-L0 = 0.0000000000000044 +t = 33.8000, H(p,q)-H0 = 0.0000000021903477, L(p,q)-L0 = 0.0000000000000044 +t = 33.9000, H(p,q)-H0 = 0.0000000021903943, L(p,q)-L0 = 0.0000000000000048 +t = 34.0000, H(p,q)-H0 = 0.0000000021904303, L(p,q)-L0 = 0.0000000000000047 +t = 34.1000, H(p,q)-H0 = 0.0000000021904579, L(p,q)-L0 = 0.0000000000000044 +t = 34.2000, H(p,q)-H0 = 0.0000000021904785, L(p,q)-L0 = 0.0000000000000042 +t = 34.3000, H(p,q)-H0 = 0.0000000021904935, L(p,q)-L0 = 0.0000000000000042 +t = 34.4000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000040 +t = 34.5000, H(p,q)-H0 = 0.0000000021905079, L(p,q)-L0 = 0.0000000000000039 +t = 34.6000, H(p,q)-H0 = 0.0000000021905082, L(p,q)-L0 = 0.0000000000000038 +t = 34.7000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = 0.0000000000000042 +t = 34.8000, H(p,q)-H0 = 0.0000000021904950, L(p,q)-L0 = 0.0000000000000039 +t = 34.9000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000038 +t = 35.0000, H(p,q)-H0 = 0.0000000021904607, L(p,q)-L0 = 0.0000000000000037 +t = 35.1000, H(p,q)-H0 = 0.0000000021904338, L(p,q)-L0 = 0.0000000000000036 +t = 35.2000, H(p,q)-H0 = 0.0000000021903993, L(p,q)-L0 = 0.0000000000000039 +t = 35.3000, H(p,q)-H0 = 0.0000000021903542, L(p,q)-L0 = 0.0000000000000037 +t = 35.4000, H(p,q)-H0 = 0.0000000021902972, L(p,q)-L0 = 0.0000000000000039 +t = 35.5000, H(p,q)-H0 = 0.0000000021902238, L(p,q)-L0 = 0.0000000000000037 +t = 35.6000, H(p,q)-H0 = 0.0000000021901293, L(p,q)-L0 = 0.0000000000000039 +t = 35.7000, H(p,q)-H0 = 0.0000000021900066, L(p,q)-L0 = 0.0000000000000038 +t = 35.8000, H(p,q)-H0 = 0.0000000021898452, L(p,q)-L0 = 0.0000000000000040 +t = 35.9000, H(p,q)-H0 = 0.0000000021896294, L(p,q)-L0 = 0.0000000000000038 +t = 36.0000, H(p,q)-H0 = 0.0000000021893357, L(p,q)-L0 = 0.0000000000000038 +t = 36.1000, H(p,q)-H0 = 0.0000000021889278, L(p,q)-L0 = 0.0000000000000033 +t = 36.2000, H(p,q)-H0 = 0.0000000021883469, L(p,q)-L0 = 0.0000000000000029 +t = 36.3000, H(p,q)-H0 = 0.0000000021874968, L(p,q)-L0 = 0.0000000000000028 +t = 36.4000, H(p,q)-H0 = 0.0000000021862115, L(p,q)-L0 = 0.0000000000000028 +t = 36.5000, H(p,q)-H0 = 0.0000000021841960, L(p,q)-L0 = 0.0000000000000032 +t = 36.6000, H(p,q)-H0 = 0.0000000021809006, L(p,q)-L0 = 0.0000000000000037 +t = 36.7000, H(p,q)-H0 = 0.0000000021752493, L(p,q)-L0 = 0.0000000000000031 +t = 36.8000, H(p,q)-H0 = 0.0000000021650266, L(p,q)-L0 = 0.0000000000000031 +t = 36.9000, H(p,q)-H0 = 0.0000000021453834, L(p,q)-L0 = 0.0000000000000032 +t = 37.0000, H(p,q)-H0 = 0.0000000021050556, L(p,q)-L0 = 0.0000000000000036 +t = 37.1000, H(p,q)-H0 = 0.0000000020163053, L(p,q)-L0 = 0.0000000000000038 +t = 37.2000, H(p,q)-H0 = 0.0000000018080409, L(p,q)-L0 = 0.0000000000000031 +t = 37.3000, H(p,q)-H0 = 0.0000000013016177, L(p,q)-L0 = 0.0000000000000036 +t = 37.4000, H(p,q)-H0 = 0.0000000001394596, L(p,q)-L0 = 0.0000000000000036 +t = 37.5000, H(p,q)-H0 = -0.0000000017311259, L(p,q)-L0 = 0.0000000000000036 +ROOT RETURN: t = 37.5849 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 37.5849, H(p,q)-H0 = 0.0000000117099748, L(p,q)-L0 = 0.0000000026505196 +t = 37.6000, H(p,q)-H0 = -0.0000000019064714, L(p,q)-L0 = 0.0000000000000037 +t = 37.7000, H(p,q)-H0 = 0.0000000000003630, L(p,q)-L0 = 0.0000000000000033 +t = 37.8000, H(p,q)-H0 = -0.0000000018991426, L(p,q)-L0 = 0.0000000000000031 +t = 37.9000, H(p,q)-H0 = -0.0000000017294051, L(p,q)-L0 = 0.0000000000000031 +t = 38.0000, H(p,q)-H0 = 0.0000000001444111, L(p,q)-L0 = 0.0000000000000033 +t = 38.1000, H(p,q)-H0 = 0.0000000013063575, L(p,q)-L0 = 0.0000000000000033 +t = 38.2000, H(p,q)-H0 = 0.0000000018110842, L(p,q)-L0 = 0.0000000000000036 +t = 38.3000, H(p,q)-H0 = 0.0000000020180342, L(p,q)-L0 = 0.0000000000000036 +t = 38.4000, H(p,q)-H0 = 0.0000000021060161, L(p,q)-L0 = 0.0000000000000037 +t = 38.5000, H(p,q)-H0 = 0.0000000021459255, L(p,q)-L0 = 0.0000000000000038 +t = 38.6000, H(p,q)-H0 = 0.0000000021653410, L(p,q)-L0 = 0.0000000000000034 +t = 38.7000, H(p,q)-H0 = 0.0000000021754381, L(p,q)-L0 = 0.0000000000000033 +ROOT RETURN: t = 38.7296 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 38.7296, H(p,q)-H0 = 0.0000000021760773, L(p,q)-L0 = -0.0000000000017404 +t = 38.8000, H(p,q)-H0 = 0.0000000021810172, L(p,q)-L0 = 0.0000000000000033 +t = 38.9000, H(p,q)-H0 = 0.0000000021842712, L(p,q)-L0 = 0.0000000000000034 +t = 39.0000, H(p,q)-H0 = 0.0000000021862612, L(p,q)-L0 = 0.0000000000000033 +t = 39.1000, H(p,q)-H0 = 0.0000000021875308, L(p,q)-L0 = 0.0000000000000037 +t = 39.2000, H(p,q)-H0 = 0.0000000021883703, L(p,q)-L0 = 0.0000000000000033 +t = 39.3000, H(p,q)-H0 = 0.0000000021889444, L(p,q)-L0 = 0.0000000000000037 +t = 39.4000, H(p,q)-H0 = 0.0000000021893477, L(p,q)-L0 = 0.0000000000000038 +t = 39.5000, H(p,q)-H0 = 0.0000000021896380, L(p,q)-L0 = 0.0000000000000036 +t = 39.6000, H(p,q)-H0 = 0.0000000021898516, L(p,q)-L0 = 0.0000000000000037 +t = 39.7000, H(p,q)-H0 = 0.0000000021900115, L(p,q)-L0 = 0.0000000000000036 +t = 39.8000, H(p,q)-H0 = 0.0000000021901330, L(p,q)-L0 = 0.0000000000000031 +t = 39.9000, H(p,q)-H0 = 0.0000000021902264, L(p,q)-L0 = 0.0000000000000032 +t = 40.0000, H(p,q)-H0 = 0.0000000021902989, L(p,q)-L0 = 0.0000000000000028 +t = 40.1000, H(p,q)-H0 = 0.0000000021903558, L(p,q)-L0 = 0.0000000000000029 +t = 40.2000, H(p,q)-H0 = 0.0000000021904003, L(p,q)-L0 = 0.0000000000000028 +t = 40.3000, H(p,q)-H0 = 0.0000000021904346, L(p,q)-L0 = 0.0000000000000026 +t = 40.4000, H(p,q)-H0 = 0.0000000021904611, L(p,q)-L0 = 0.0000000000000024 +t = 40.5000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000022 +t = 40.6000, H(p,q)-H0 = 0.0000000021904947, L(p,q)-L0 = 0.0000000000000022 +t = 40.7000, H(p,q)-H0 = 0.0000000021905039, L(p,q)-L0 = 0.0000000000000026 +t = 40.8000, H(p,q)-H0 = 0.0000000021905078, L(p,q)-L0 = 0.0000000000000022 +t = 40.9000, H(p,q)-H0 = 0.0000000021905074, L(p,q)-L0 = 0.0000000000000022 +t = 41.0000, H(p,q)-H0 = 0.0000000021905026, L(p,q)-L0 = 0.0000000000000026 +t = 41.1000, H(p,q)-H0 = 0.0000000021904927, L(p,q)-L0 = 0.0000000000000026 +t = 41.2000, H(p,q)-H0 = 0.0000000021904775, L(p,q)-L0 = 0.0000000000000026 +t = 41.3000, H(p,q)-H0 = 0.0000000021904565, L(p,q)-L0 = 0.0000000000000027 +t = 41.4000, H(p,q)-H0 = 0.0000000021904285, L(p,q)-L0 = 0.0000000000000027 +t = 41.5000, H(p,q)-H0 = 0.0000000021903920, L(p,q)-L0 = 0.0000000000000024 +t = 41.6000, H(p,q)-H0 = 0.0000000021903456, L(p,q)-L0 = 0.0000000000000028 +t = 41.7000, H(p,q)-H0 = 0.0000000021902861, L(p,q)-L0 = 0.0000000000000029 +t = 41.8000, H(p,q)-H0 = 0.0000000021902095, L(p,q)-L0 = 0.0000000000000027 +t = 41.9000, H(p,q)-H0 = 0.0000000021901106, L(p,q)-L0 = 0.0000000000000024 +t = 42.0000, H(p,q)-H0 = 0.0000000021899824, L(p,q)-L0 = 0.0000000000000026 +t = 42.1000, H(p,q)-H0 = 0.0000000021898132, L(p,q)-L0 = 0.0000000000000024 +t = 42.2000, H(p,q)-H0 = 0.0000000021895867, L(p,q)-L0 = 0.0000000000000029 +t = 42.3000, H(p,q)-H0 = 0.0000000021892768, L(p,q)-L0 = 0.0000000000000029 +t = 42.4000, H(p,q)-H0 = 0.0000000021888449, L(p,q)-L0 = 0.0000000000000028 +t = 42.5000, H(p,q)-H0 = 0.0000000021882276, L(p,q)-L0 = 0.0000000000000031 +t = 42.6000, H(p,q)-H0 = 0.0000000021873187, L(p,q)-L0 = 0.0000000000000031 +t = 42.7000, H(p,q)-H0 = 0.0000000021859365, L(p,q)-L0 = 0.0000000000000034 +t = 42.8000, H(p,q)-H0 = 0.0000000021837536, L(p,q)-L0 = 0.0000000000000033 +t = 42.9000, H(p,q)-H0 = 0.0000000021801575, L(p,q)-L0 = 0.0000000000000032 +t = 43.0000, H(p,q)-H0 = 0.0000000021739391, L(p,q)-L0 = 0.0000000000000036 +t = 43.1000, H(p,q)-H0 = 0.0000000021625797, L(p,q)-L0 = 0.0000000000000039 +t = 43.2000, H(p,q)-H0 = 0.0000000021405177, L(p,q)-L0 = 0.0000000000000047 +t = 43.3000, H(p,q)-H0 = 0.0000000020946935, L(p,q)-L0 = 0.0000000000000051 +t = 43.4000, H(p,q)-H0 = 0.0000000019926774, L(p,q)-L0 = 0.0000000000000047 +t = 43.5000, H(p,q)-H0 = 0.0000000017511204, L(p,q)-L0 = 0.0000000000000046 +t = 43.6000, H(p,q)-H0 = 0.0000000011639263, L(p,q)-L0 = 0.0000000000000042 +t = 43.7000, H(p,q)-H0 = -0.0000000001449194, L(p,q)-L0 = 0.0000000000000040 +t = 43.8000, H(p,q)-H0 = -0.0000000019957591, L(p,q)-L0 = 0.0000000000000036 +ROOT RETURN: t = 43.8681 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 43.8681, H(p,q)-H0 = 0.0000000118359211, L(p,q)-L0 = 0.0000000027373523 +t = 43.9000, H(p,q)-H0 = -0.0000000015482549, L(p,q)-L0 = 0.0000000000000032 +t = 44.0000, H(p,q)-H0 = -0.0000000000875615, L(p,q)-L0 = 0.0000000000000033 +t = 44.1000, H(p,q)-H0 = -0.0000000021549367, L(p,q)-L0 = 0.0000000000000031 +t = 44.2000, H(p,q)-H0 = -0.0000000014210157, L(p,q)-L0 = 0.0000000000000030 +t = 44.3000, H(p,q)-H0 = 0.0000000004029348, L(p,q)-L0 = 0.0000000000000028 +t = 44.4000, H(p,q)-H0 = 0.0000000014252810, L(p,q)-L0 = 0.0000000000000027 +t = 44.5000, H(p,q)-H0 = 0.0000000018598003, L(p,q)-L0 = 0.0000000000000029 +t = 44.6000, H(p,q)-H0 = 0.0000000020383498, L(p,q)-L0 = 0.0000000000000032 +t = 44.7000, H(p,q)-H0 = 0.0000000021150072, L(p,q)-L0 = 0.0000000000000028 +t = 44.8000, H(p,q)-H0 = 0.0000000021501914, L(p,q)-L0 = 0.0000000000000031 +t = 44.9000, H(p,q)-H0 = 0.0000000021675071, L(p,q)-L0 = 0.0000000000000029 +t = 45.0000, H(p,q)-H0 = 0.0000000021766086, L(p,q)-L0 = 0.0000000000000028 +ROOT RETURN: t = 45.0128 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 45.0128, H(p,q)-H0 = 0.0000000021749924, L(p,q)-L0 = -0.0000000000031553 +t = 45.1000, H(p,q)-H0 = 0.0000000021816857, L(p,q)-L0 = 0.0000000000000024 +t = 45.2000, H(p,q)-H0 = 0.0000000021846717, L(p,q)-L0 = 0.0000000000000023 +t = 45.3000, H(p,q)-H0 = 0.0000000021865116, L(p,q)-L0 = 0.0000000000000022 +t = 45.4000, H(p,q)-H0 = 0.0000000021876930, L(p,q)-L0 = 0.0000000000000022 +t = 45.5000, H(p,q)-H0 = 0.0000000021884791, L(p,q)-L0 = 0.0000000000000020 +t = 45.6000, H(p,q)-H0 = 0.0000000021890187, L(p,q)-L0 = 0.0000000000000020 +t = 45.7000, H(p,q)-H0 = 0.0000000021893996, L(p,q)-L0 = 0.0000000000000019 +t = 45.8000, H(p,q)-H0 = 0.0000000021896744, L(p,q)-L0 = 0.0000000000000016 +t = 45.9000, H(p,q)-H0 = 0.0000000021898774, L(p,q)-L0 = 0.0000000000000016 +t = 46.0000, H(p,q)-H0 = 0.0000000021900302, L(p,q)-L0 = 0.0000000000000017 +t = 46.1000, H(p,q)-H0 = 0.0000000021901467, L(p,q)-L0 = 0.0000000000000020 +t = 46.2000, H(p,q)-H0 = 0.0000000021902365, L(p,q)-L0 = 0.0000000000000023 +t = 46.3000, H(p,q)-H0 = 0.0000000021903065, L(p,q)-L0 = 0.0000000000000026 +t = 46.4000, H(p,q)-H0 = 0.0000000021903610, L(p,q)-L0 = 0.0000000000000026 +t = 46.5000, H(p,q)-H0 = 0.0000000021904035, L(p,q)-L0 = 0.0000000000000024 +t = 46.6000, H(p,q)-H0 = 0.0000000021904365, L(p,q)-L0 = 0.0000000000000024 +t = 46.7000, H(p,q)-H0 = 0.0000000021904620, L(p,q)-L0 = 0.0000000000000024 +t = 46.8000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000026 +t = 46.9000, H(p,q)-H0 = 0.0000000021904942, L(p,q)-L0 = 0.0000000000000029 +t = 47.0000, H(p,q)-H0 = 0.0000000021905023, L(p,q)-L0 = 0.0000000000000032 +t = 47.1000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = 0.0000000000000031 +t = 47.2000, H(p,q)-H0 = 0.0000000021905046, L(p,q)-L0 = 0.0000000000000032 +t = 47.3000, H(p,q)-H0 = 0.0000000021904984, L(p,q)-L0 = 0.0000000000000030 +t = 47.4000, H(p,q)-H0 = 0.0000000021904876, L(p,q)-L0 = 0.0000000000000029 +t = 47.5000, H(p,q)-H0 = 0.0000000021904717, L(p,q)-L0 = 0.0000000000000030 +t = 47.6000, H(p,q)-H0 = 0.0000000021904498, L(p,q)-L0 = 0.0000000000000036 +t = 47.7000, H(p,q)-H0 = 0.0000000021904205, L(p,q)-L0 = 0.0000000000000037 +t = 47.8000, H(p,q)-H0 = 0.0000000021903824, L(p,q)-L0 = 0.0000000000000037 +t = 47.9000, H(p,q)-H0 = 0.0000000021903339, L(p,q)-L0 = 0.0000000000000037 +t = 48.0000, H(p,q)-H0 = 0.0000000021902718, L(p,q)-L0 = 0.0000000000000038 +t = 48.1000, H(p,q)-H0 = 0.0000000021901918, L(p,q)-L0 = 0.0000000000000038 +t = 48.2000, H(p,q)-H0 = 0.0000000021900888, L(p,q)-L0 = 0.0000000000000039 +t = 48.3000, H(p,q)-H0 = 0.0000000021899544, L(p,q)-L0 = 0.0000000000000039 +t = 48.4000, H(p,q)-H0 = 0.0000000021897766, L(p,q)-L0 = 0.0000000000000034 +t = 48.5000, H(p,q)-H0 = 0.0000000021895377, L(p,q)-L0 = 0.0000000000000033 +t = 48.6000, H(p,q)-H0 = 0.0000000021892106, L(p,q)-L0 = 0.0000000000000033 +t = 48.7000, H(p,q)-H0 = 0.0000000021887525, L(p,q)-L0 = 0.0000000000000033 +t = 48.8000, H(p,q)-H0 = 0.0000000021880946, L(p,q)-L0 = 0.0000000000000032 +t = 48.9000, H(p,q)-H0 = 0.0000000021871220, L(p,q)-L0 = 0.0000000000000034 +t = 49.0000, H(p,q)-H0 = 0.0000000021856332, L(p,q)-L0 = 0.0000000000000038 +t = 49.1000, H(p,q)-H0 = 0.0000000021832666, L(p,q)-L0 = 0.0000000000000039 +t = 49.2000, H(p,q)-H0 = 0.0000000021793377, L(p,q)-L0 = 0.0000000000000040 +t = 49.3000, H(p,q)-H0 = 0.0000000021724836, L(p,q)-L0 = 0.0000000000000038 +t = 49.4000, H(p,q)-H0 = 0.0000000021598388, L(p,q)-L0 = 0.0000000000000037 +t = 49.5000, H(p,q)-H0 = 0.0000000021350117, L(p,q)-L0 = 0.0000000000000047 +t = 49.6000, H(p,q)-H0 = 0.0000000020828380, L(p,q)-L0 = 0.0000000000000041 +t = 49.7000, H(p,q)-H0 = 0.0000000019653632, L(p,q)-L0 = 0.0000000000000040 +t = 49.8000, H(p,q)-H0 = 0.0000000016849397, L(p,q)-L0 = 0.0000000000000040 +t = 49.9000, H(p,q)-H0 = 0.0000000010054575, L(p,q)-L0 = 0.0000000000000043 +t = 50.0000, H(p,q)-H0 = -0.0000000004525247, L(p,q)-L0 = 0.0000000000000041 +t = 50.1000, H(p,q)-H0 = -0.0000000021925068, L(p,q)-L0 = 0.0000000000000038 +ROOT RETURN: t = 50.1513 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 50.1513, H(p,q)-H0 = 0.0000000010629626, L(p,q)-L0 = 0.0000000005942530 +t = 50.2000, H(p,q)-H0 = -0.0000000011262797, L(p,q)-L0 = 0.0000000000000038 +t = 50.3000, H(p,q)-H0 = -0.0000000003393819, L(p,q)-L0 = 0.0000000000000036 +t = 50.4000, H(p,q)-H0 = -0.0000000022861792, L(p,q)-L0 = 0.0000000000000036 +t = 50.5000, H(p,q)-H0 = -0.0000000010909109, L(p,q)-L0 = 0.0000000000000034 +t = 50.6000, H(p,q)-H0 = 0.0000000006344154, L(p,q)-L0 = 0.0000000000000036 +t = 50.7000, H(p,q)-H0 = 0.0000000015278889, L(p,q)-L0 = 0.0000000000000034 +t = 50.8000, H(p,q)-H0 = 0.0000000019017266, L(p,q)-L0 = 0.0000000000000041 +t = 50.9000, H(p,q)-H0 = 0.0000000020559798, L(p,q)-L0 = 0.0000000000000034 +t = 51.0000, H(p,q)-H0 = 0.0000000021228997, L(p,q)-L0 = 0.0000000000000030 +t = 51.1000, H(p,q)-H0 = 0.0000000021539794, L(p,q)-L0 = 0.0000000000000028 +t = 51.2000, H(p,q)-H0 = 0.0000000021694511, L(p,q)-L0 = 0.0000000000000027 +ROOT RETURN: t = 51.2960 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 51.2960, H(p,q)-H0 = 0.0000000021724436, L(p,q)-L0 = -0.0000000000064396 +t = 51.3000, H(p,q)-H0 = 0.0000000021776693, L(p,q)-L0 = 0.0000000000000024 +t = 51.4000, H(p,q)-H0 = 0.0000000021822963, L(p,q)-L0 = 0.0000000000000023 +t = 51.5000, H(p,q)-H0 = 0.0000000021850405, L(p,q)-L0 = 0.0000000000000024 +t = 51.6000, H(p,q)-H0 = 0.0000000021867441, L(p,q)-L0 = 0.0000000000000027 +t = 51.7000, H(p,q)-H0 = 0.0000000021878448, L(p,q)-L0 = 0.0000000000000028 +t = 51.8000, H(p,q)-H0 = 0.0000000021885816, L(p,q)-L0 = 0.0000000000000029 +t = 51.9000, H(p,q)-H0 = 0.0000000021890901, L(p,q)-L0 = 0.0000000000000033 +t = 52.0000, H(p,q)-H0 = 0.0000000021894503, L(p,q)-L0 = 0.0000000000000032 +t = 52.1000, H(p,q)-H0 = 0.0000000021897114, L(p,q)-L0 = 0.0000000000000030 +t = 52.2000, H(p,q)-H0 = 0.0000000021899053, L(p,q)-L0 = 0.0000000000000031 +t = 52.3000, H(p,q)-H0 = 0.0000000021900509, L(p,q)-L0 = 0.0000000000000033 +t = 52.4000, H(p,q)-H0 = 0.0000000021901626, L(p,q)-L0 = 0.0000000000000037 +t = 52.5000, H(p,q)-H0 = 0.0000000021902487, L(p,q)-L0 = 0.0000000000000038 +t = 52.6000, H(p,q)-H0 = 0.0000000021903156, L(p,q)-L0 = 0.0000000000000039 +t = 52.7000, H(p,q)-H0 = 0.0000000021903677, L(p,q)-L0 = 0.0000000000000038 +t = 52.8000, H(p,q)-H0 = 0.0000000021904085, L(p,q)-L0 = 0.0000000000000036 +t = 52.9000, H(p,q)-H0 = 0.0000000021904403, L(p,q)-L0 = 0.0000000000000037 +t = 53.0000, H(p,q)-H0 = 0.0000000021904645, L(p,q)-L0 = 0.0000000000000036 +t = 53.1000, H(p,q)-H0 = 0.0000000021904824, L(p,q)-L0 = 0.0000000000000037 +t = 53.2000, H(p,q)-H0 = 0.0000000021904947, L(p,q)-L0 = 0.0000000000000039 +t = 53.3000, H(p,q)-H0 = 0.0000000021905021, L(p,q)-L0 = 0.0000000000000041 +t = 53.4000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = 0.0000000000000046 +t = 53.5000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000046 +t = 53.6000, H(p,q)-H0 = 0.0000000021904966, L(p,q)-L0 = 0.0000000000000049 +t = 53.7000, H(p,q)-H0 = 0.0000000021904851, L(p,q)-L0 = 0.0000000000000048 +t = 53.8000, H(p,q)-H0 = 0.0000000021904681, L(p,q)-L0 = 0.0000000000000050 +t = 53.9000, H(p,q)-H0 = 0.0000000021904447, L(p,q)-L0 = 0.0000000000000048 +t = 54.0000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000046 +t = 54.1000, H(p,q)-H0 = 0.0000000021903745, L(p,q)-L0 = 0.0000000000000044 +t = 54.2000, H(p,q)-H0 = 0.0000000021903241, L(p,q)-L0 = 0.0000000000000048 +t = 54.3000, H(p,q)-H0 = 0.0000000021902591, L(p,q)-L0 = 0.0000000000000047 +t = 54.4000, H(p,q)-H0 = 0.0000000021901758, L(p,q)-L0 = 0.0000000000000047 +t = 54.5000, H(p,q)-H0 = 0.0000000021900680, L(p,q)-L0 = 0.0000000000000043 +t = 54.6000, H(p,q)-H0 = 0.0000000021899273, L(p,q)-L0 = 0.0000000000000047 +t = 54.7000, H(p,q)-H0 = 0.0000000021897409, L(p,q)-L0 = 0.0000000000000047 +t = 54.8000, H(p,q)-H0 = 0.0000000021894895, L(p,q)-L0 = 0.0000000000000044 +t = 54.9000, H(p,q)-H0 = 0.0000000021891444, L(p,q)-L0 = 0.0000000000000047 +t = 55.0000, H(p,q)-H0 = 0.0000000021886584, L(p,q)-L0 = 0.0000000000000046 +t = 55.1000, H(p,q)-H0 = 0.0000000021879574, L(p,q)-L0 = 0.0000000000000044 +t = 55.2000, H(p,q)-H0 = 0.0000000021869148, L(p,q)-L0 = 0.0000000000000049 +t = 55.3000, H(p,q)-H0 = 0.0000000021853098, L(p,q)-L0 = 0.0000000000000047 +t = 55.4000, H(p,q)-H0 = 0.0000000021827406, L(p,q)-L0 = 0.0000000000000046 +t = 55.5000, H(p,q)-H0 = 0.0000000021784419, L(p,q)-L0 = 0.0000000000000049 +t = 55.6000, H(p,q)-H0 = 0.0000000021708755, L(p,q)-L0 = 0.0000000000000050 +t = 55.7000, H(p,q)-H0 = 0.0000000021567761, L(p,q)-L0 = 0.0000000000000053 +t = 55.8000, H(p,q)-H0 = 0.0000000021287814, L(p,q)-L0 = 0.0000000000000049 +t = 55.9000, H(p,q)-H0 = 0.0000000020692630, L(p,q)-L0 = 0.0000000000000052 +t = 56.0000, H(p,q)-H0 = 0.0000000019337545, L(p,q)-L0 = 0.0000000000000053 +t = 56.1000, H(p,q)-H0 = 0.0000000016080133, L(p,q)-L0 = 0.0000000000000050 +t = 56.2000, H(p,q)-H0 = 0.0000000008240018, L(p,q)-L0 = 0.0000000000000054 +t = 56.3000, H(p,q)-H0 = -0.0000000007777232, L(p,q)-L0 = 0.0000000000000053 +t = 56.4000, H(p,q)-H0 = -0.0000000022964355, L(p,q)-L0 = 0.0000000000000052 +ROOT RETURN: t = 56.4345 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 56.4345, H(p,q)-H0 = 0.0000000105653171, L(p,q)-L0 = 0.0000000024229669 +t = 56.5000, H(p,q)-H0 = -0.0000000006980465, L(p,q)-L0 = 0.0000000000000052 +t = 56.6000, H(p,q)-H0 = -0.0000000007108090, L(p,q)-L0 = 0.0000000000000051 +t = 56.7000, H(p,q)-H0 = -0.0000000022911208, L(p,q)-L0 = 0.0000000000000050 +t = 56.8000, H(p,q)-H0 = -0.0000000007567429, L(p,q)-L0 = 0.0000000000000050 +t = 56.9000, H(p,q)-H0 = 0.0000000008394492, L(p,q)-L0 = 0.0000000000000053 +t = 57.0000, H(p,q)-H0 = 0.0000000016162609, L(p,q)-L0 = 0.0000000000000052 +t = 57.1000, H(p,q)-H0 = 0.0000000019378454, L(p,q)-L0 = 0.0000000000000050 +t = 57.2000, H(p,q)-H0 = 0.0000000020713116, L(p,q)-L0 = 0.0000000000000049 +t = 57.3000, H(p,q)-H0 = 0.0000000021298465, L(p,q)-L0 = 0.0000000000000049 +t = 57.4000, H(p,q)-H0 = 0.0000000021573541, L(p,q)-L0 = 0.0000000000000040 +t = 57.5000, H(p,q)-H0 = 0.0000000021712041, L(p,q)-L0 = 0.0000000000000041 +ROOT RETURN: t = 57.5792 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 57.5792, H(p,q)-H0 = 0.0000000021748691, L(p,q)-L0 = -0.0000000000032916 +t = 57.6000, H(p,q)-H0 = 0.0000000021786368, L(p,q)-L0 = 0.0000000000000044 +t = 57.7000, H(p,q)-H0 = 0.0000000021828603, L(p,q)-L0 = 0.0000000000000044 +t = 57.8000, H(p,q)-H0 = 0.0000000021853853, L(p,q)-L0 = 0.0000000000000042 +t = 57.9000, H(p,q)-H0 = 0.0000000021869638, L(p,q)-L0 = 0.0000000000000044 +t = 58.0000, H(p,q)-H0 = 0.0000000021879897, L(p,q)-L0 = 0.0000000000000040 +t = 58.1000, H(p,q)-H0 = 0.0000000021886802, L(p,q)-L0 = 0.0000000000000041 +t = 58.2000, H(p,q)-H0 = 0.0000000021891585, L(p,q)-L0 = 0.0000000000000038 +t = 58.3000, H(p,q)-H0 = 0.0000000021894993, L(p,q)-L0 = 0.0000000000000039 +t = 58.4000, H(p,q)-H0 = 0.0000000021897474, L(p,q)-L0 = 0.0000000000000038 +t = 58.5000, H(p,q)-H0 = 0.0000000021899316, L(p,q)-L0 = 0.0000000000000038 +t = 58.6000, H(p,q)-H0 = 0.0000000021900710, L(p,q)-L0 = 0.0000000000000042 +t = 58.7000, H(p,q)-H0 = 0.0000000021901776, L(p,q)-L0 = 0.0000000000000042 +t = 58.8000, H(p,q)-H0 = 0.0000000021902602, L(p,q)-L0 = 0.0000000000000047 +t = 58.9000, H(p,q)-H0 = 0.0000000021903247, L(p,q)-L0 = 0.0000000000000050 +t = 59.0000, H(p,q)-H0 = 0.0000000021903750, L(p,q)-L0 = 0.0000000000000052 +t = 59.1000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000052 +t = 59.2000, H(p,q)-H0 = 0.0000000021904442, L(p,q)-L0 = 0.0000000000000047 +t = 59.3000, H(p,q)-H0 = 0.0000000021904675, L(p,q)-L0 = 0.0000000000000052 +t = 59.4000, H(p,q)-H0 = 0.0000000021904839, L(p,q)-L0 = 0.0000000000000048 +t = 59.5000, H(p,q)-H0 = 0.0000000021904950, L(p,q)-L0 = 0.0000000000000044 +t = 59.6000, H(p,q)-H0 = 0.0000000021905014, L(p,q)-L0 = 0.0000000000000043 +t = 59.7000, H(p,q)-H0 = 0.0000000021905032, L(p,q)-L0 = 0.0000000000000042 +t = 59.8000, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = 0.0000000000000043 +t = 59.9000, H(p,q)-H0 = 0.0000000021904931, L(p,q)-L0 = 0.0000000000000044 +t = 60.0000, H(p,q)-H0 = 0.0000000021904805, L(p,q)-L0 = 0.0000000000000043 +t = 60.1000, H(p,q)-H0 = 0.0000000021904624, L(p,q)-L0 = 0.0000000000000042 +t = 60.2000, H(p,q)-H0 = 0.0000000021904379, L(p,q)-L0 = 0.0000000000000040 +t = 60.3000, H(p,q)-H0 = 0.0000000021904059, L(p,q)-L0 = 0.0000000000000042 +t = 60.4000, H(p,q)-H0 = 0.0000000021903648, L(p,q)-L0 = 0.0000000000000044 +t = 60.5000, H(p,q)-H0 = 0.0000000021903120, L(p,q)-L0 = 0.0000000000000044 +t = 60.6000, H(p,q)-H0 = 0.0000000021902444, L(p,q)-L0 = 0.0000000000000043 +t = 60.7000, H(p,q)-H0 = 0.0000000021901574, L(p,q)-L0 = 0.0000000000000043 +t = 60.8000, H(p,q)-H0 = 0.0000000021900446, L(p,q)-L0 = 0.0000000000000041 +t = 60.9000, H(p,q)-H0 = 0.0000000021898974, L(p,q)-L0 = 0.0000000000000042 +t = 61.0000, H(p,q)-H0 = 0.0000000021897019, L(p,q)-L0 = 0.0000000000000047 +t = 61.1000, H(p,q)-H0 = 0.0000000021894369, L(p,q)-L0 = 0.0000000000000044 +t = 61.2000, H(p,q)-H0 = 0.0000000021890715, L(p,q)-L0 = 0.0000000000000044 +t = 61.3000, H(p,q)-H0 = 0.0000000021885554, L(p,q)-L0 = 0.0000000000000040 +t = 61.4000, H(p,q)-H0 = 0.0000000021878070, L(p,q)-L0 = 0.0000000000000038 +t = 61.5000, H(p,q)-H0 = 0.0000000021866884, L(p,q)-L0 = 0.0000000000000034 +t = 61.6000, H(p,q)-H0 = 0.0000000021849565, L(p,q)-L0 = 0.0000000000000037 +t = 61.7000, H(p,q)-H0 = 0.0000000021821646, L(p,q)-L0 = 0.0000000000000040 +t = 61.8000, H(p,q)-H0 = 0.0000000021774544, L(p,q)-L0 = 0.0000000000000036 +t = 61.9000, H(p,q)-H0 = 0.0000000021690871, L(p,q)-L0 = 0.0000000000000032 +t = 62.0000, H(p,q)-H0 = 0.0000000021533373, L(p,q)-L0 = 0.0000000000000038 +t = 62.1000, H(p,q)-H0 = 0.0000000021217116, L(p,q)-L0 = 0.0000000000000032 +t = 62.2000, H(p,q)-H0 = 0.0000000020536803, L(p,q)-L0 = 0.0000000000000034 +t = 62.3000, H(p,q)-H0 = 0.0000000018971157, L(p,q)-L0 = 0.0000000000000032 +t = 62.4000, H(p,q)-H0 = 0.0000000015186385, L(p,q)-L0 = 0.0000000000000027 +t = 62.5000, H(p,q)-H0 = 0.0000000006175833, L(p,q)-L0 = 0.0000000000000024 +t = 62.6000, H(p,q)-H0 = -0.0000000011113854, L(p,q)-L0 = 0.0000000000000024 +t = 62.7000, H(p,q)-H0 = -0.0000000022863662, L(p,q)-L0 = 0.0000000000000024 +ROOT RETURN: t = 62.7177 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 62.7177, H(p,q)-H0 = 0.0000000131519715, L(p,q)-L0 = 0.0000000029860174 +t = 62.8000, H(p,q)-H0 = -0.0000000003295020, L(p,q)-L0 = 0.0000000000000021 +t = 62.9000, H(p,q)-H0 = -0.0000000011398287, L(p,q)-L0 = 0.0000000000000023 +t = 63.0000, H(p,q)-H0 = -0.0000000021824698, L(p,q)-L0 = 0.0000000000000022 +t = 63.1000, H(p,q)-H0 = -0.0000000004316751, L(p,q)-L0 = 0.0000000000000030 +t = 63.2000, H(p,q)-H0 = 0.0000000010195209, L(p,q)-L0 = 0.0000000000000029 +t = 63.3000, H(p,q)-H0 = 0.0000000016922781, L(p,q)-L0 = 0.0000000000000033 +t = 63.4000, H(p,q)-H0 = 0.0000000019689945, L(p,q)-L0 = 0.0000000000000034 +t = 63.5000, H(p,q)-H0 = 0.0000000020846639, L(p,q)-L0 = 0.0000000000000037 +t = 63.6000, H(p,q)-H0 = 0.0000000021359661, L(p,q)-L0 = 0.0000000000000042 +t = 63.7000, H(p,q)-H0 = 0.0000000021603613, L(p,q)-L0 = 0.0000000000000042 +t = 63.8000, H(p,q)-H0 = 0.0000000021727820, L(p,q)-L0 = 0.0000000000000043 +ROOT RETURN: t = 63.8623 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 63.8623, H(p,q)-H0 = 0.0000000021754208, L(p,q)-L0 = -0.0000000000025943 +t = 63.9000, H(p,q)-H0 = 0.0000000021795151, L(p,q)-L0 = 0.0000000000000044 +t = 64.0000, H(p,q)-H0 = 0.0000000021833759, L(p,q)-L0 = 0.0000000000000047 +t = 64.1000, H(p,q)-H0 = 0.0000000021857027, L(p,q)-L0 = 0.0000000000000051 +t = 64.2000, H(p,q)-H0 = 0.0000000021871673, L(p,q)-L0 = 0.0000000000000051 +t = 64.3000, H(p,q)-H0 = 0.0000000021881255, L(p,q)-L0 = 0.0000000000000053 +t = 64.4000, H(p,q)-H0 = 0.0000000021887733, L(p,q)-L0 = 0.0000000000000052 +t = 64.5000, H(p,q)-H0 = 0.0000000021892246, L(p,q)-L0 = 0.0000000000000051 +t = 64.6000, H(p,q)-H0 = 0.0000000021895474, L(p,q)-L0 = 0.0000000000000053 +t = 64.7000, H(p,q)-H0 = 0.0000000021897830, L(p,q)-L0 = 0.0000000000000052 +t = 64.8000, H(p,q)-H0 = 0.0000000021899583, L(p,q)-L0 = 0.0000000000000048 +t = 64.9000, H(p,q)-H0 = 0.0000000021900913, L(p,q)-L0 = 0.0000000000000050 +t = 65.0000, H(p,q)-H0 = 0.0000000021901936, L(p,q)-L0 = 0.0000000000000056 +t = 65.1000, H(p,q)-H0 = 0.0000000021902724, L(p,q)-L0 = 0.0000000000000054 +t = 65.2000, H(p,q)-H0 = 0.0000000021903344, L(p,q)-L0 = 0.0000000000000060 +t = 65.3000, H(p,q)-H0 = 0.0000000021903822, L(p,q)-L0 = 0.0000000000000057 +t = 65.4000, H(p,q)-H0 = 0.0000000021904196, L(p,q)-L0 = 0.0000000000000056 +t = 65.5000, H(p,q)-H0 = 0.0000000021904488, L(p,q)-L0 = 0.0000000000000059 +t = 65.6000, H(p,q)-H0 = 0.0000000021904707, L(p,q)-L0 = 0.0000000000000059 +t = 65.7000, H(p,q)-H0 = 0.0000000021904865, L(p,q)-L0 = 0.0000000000000061 +t = 65.8000, H(p,q)-H0 = 0.0000000021904972, L(p,q)-L0 = 0.0000000000000064 +t = 65.9000, H(p,q)-H0 = 0.0000000021905028, L(p,q)-L0 = 0.0000000000000063 +t = 66.0000, H(p,q)-H0 = 0.0000000021905041, L(p,q)-L0 = 0.0000000000000064 +t = 66.1000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = 0.0000000000000062 +t = 66.2000, H(p,q)-H0 = 0.0000000021904920, L(p,q)-L0 = 0.0000000000000060 +t = 66.3000, H(p,q)-H0 = 0.0000000021904784, L(p,q)-L0 = 0.0000000000000058 +t = 66.4000, H(p,q)-H0 = 0.0000000021904595, L(p,q)-L0 = 0.0000000000000058 +t = 66.5000, H(p,q)-H0 = 0.0000000021904338, L(p,q)-L0 = 0.0000000000000058 +t = 66.6000, H(p,q)-H0 = 0.0000000021904004, L(p,q)-L0 = 0.0000000000000057 +t = 66.7000, H(p,q)-H0 = 0.0000000021903573, L(p,q)-L0 = 0.0000000000000058 +t = 66.8000, H(p,q)-H0 = 0.0000000021903023, L(p,q)-L0 = 0.0000000000000060 +t = 66.9000, H(p,q)-H0 = 0.0000000021902322, L(p,q)-L0 = 0.0000000000000064 +t = 67.0000, H(p,q)-H0 = 0.0000000021901418, L(p,q)-L0 = 0.0000000000000070 +t = 67.1000, H(p,q)-H0 = 0.0000000021900243, L(p,q)-L0 = 0.0000000000000071 +t = 67.2000, H(p,q)-H0 = 0.0000000021898695, L(p,q)-L0 = 0.0000000000000067 +t = 67.3000, H(p,q)-H0 = 0.0000000021896638, L(p,q)-L0 = 0.0000000000000067 +t = 67.4000, H(p,q)-H0 = 0.0000000021893843, L(p,q)-L0 = 0.0000000000000064 +t = 67.5000, H(p,q)-H0 = 0.0000000021889982, L(p,q)-L0 = 0.0000000000000064 +t = 67.6000, H(p,q)-H0 = 0.0000000021884506, L(p,q)-L0 = 0.0000000000000067 +t = 67.7000, H(p,q)-H0 = 0.0000000021876523, L(p,q)-L0 = 0.0000000000000068 +t = 67.8000, H(p,q)-H0 = 0.0000000021864515, L(p,q)-L0 = 0.0000000000000066 +t = 67.9000, H(p,q)-H0 = 0.0000000021845806, L(p,q)-L0 = 0.0000000000000071 +t = 68.0000, H(p,q)-H0 = 0.0000000021815426, L(p,q)-L0 = 0.0000000000000074 +t = 68.1000, H(p,q)-H0 = 0.0000000021763747, L(p,q)-L0 = 0.0000000000000079 +t = 68.2000, H(p,q)-H0 = 0.0000000021671083, L(p,q)-L0 = 0.0000000000000078 +t = 68.3000, H(p,q)-H0 = 0.0000000021494821, L(p,q)-L0 = 0.0000000000000081 +t = 68.4000, H(p,q)-H0 = 0.0000000021136843, L(p,q)-L0 = 0.0000000000000075 +t = 68.5000, H(p,q)-H0 = 0.0000000020357698, L(p,q)-L0 = 0.0000000000000072 +t = 68.6000, H(p,q)-H0 = 0.0000000018546116, L(p,q)-L0 = 0.0000000000000074 +t = 68.7000, H(p,q)-H0 = 0.0000000014149373, L(p,q)-L0 = 0.0000000000000071 +t = 68.8000, H(p,q)-H0 = 0.0000000003847842, L(p,q)-L0 = 0.0000000000000068 +t = 68.9000, H(p,q)-H0 = -0.0000000014401935, L(p,q)-L0 = 0.0000000000000071 +t = 69.0000, H(p,q)-H0 = -0.0000000021500677, L(p,q)-L0 = 0.0000000000000071 +ROOT RETURN: t = 69.0009 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 69.0009, H(p,q)-H0 = -0.0000000001126452, L(p,q)-L0 = 0.0000000003745485 +t = 69.1000, H(p,q)-H0 = -0.0000000000822351, L(p,q)-L0 = 0.0000000000000073 +t = 69.2000, H(p,q)-H0 = -0.0000000015604593, L(p,q)-L0 = 0.0000000000000069 +t = 69.3000, H(p,q)-H0 = -0.0000000019817259, L(p,q)-L0 = 0.0000000000000071 +t = 69.4000, H(p,q)-H0 = -0.0000000001246847, L(p,q)-L0 = 0.0000000000000073 +t = 69.5000, H(p,q)-H0 = 0.0000000011766541, L(p,q)-L0 = 0.0000000000000074 +t = 69.6000, H(p,q)-H0 = 0.0000000017576444, L(p,q)-L0 = 0.0000000000000072 +t = 69.7000, H(p,q)-H0 = 0.0000000019959023, L(p,q)-L0 = 0.0000000000000069 +t = 69.8000, H(p,q)-H0 = 0.0000000020963230, L(p,q)-L0 = 0.0000000000000075 +t = 69.9000, H(p,q)-H0 = 0.0000000021413751, L(p,q)-L0 = 0.0000000000000075 +t = 70.0000, H(p,q)-H0 = 0.0000000021630508, L(p,q)-L0 = 0.0000000000000071 +t = 70.1000, H(p,q)-H0 = 0.0000000021742094, L(p,q)-L0 = 0.0000000000000073 +ROOT RETURN: t = 70.1455 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 70.1455, H(p,q)-H0 = 0.0000000021726531, L(p,q)-L0 = -0.0000000000061678 +t = 70.2000, H(p,q)-H0 = 0.0000000021803188, L(p,q)-L0 = 0.0000000000000078 +t = 70.3000, H(p,q)-H0 = 0.0000000021838529, L(p,q)-L0 = 0.0000000000000080 +t = 70.4000, H(p,q)-H0 = 0.0000000021859990, L(p,q)-L0 = 0.0000000000000081 +t = 70.5000, H(p,q)-H0 = 0.0000000021873595, L(p,q)-L0 = 0.0000000000000084 +t = 70.6000, H(p,q)-H0 = 0.0000000021882546, L(p,q)-L0 = 0.0000000000000087 +t = 70.7000, H(p,q)-H0 = 0.0000000021888631, L(p,q)-L0 = 0.0000000000000087 +t = 70.8000, H(p,q)-H0 = 0.0000000021892885, L(p,q)-L0 = 0.0000000000000082 +t = 70.9000, H(p,q)-H0 = 0.0000000021895940, L(p,q)-L0 = 0.0000000000000082 +t = 71.0000, H(p,q)-H0 = 0.0000000021898182, L(p,q)-L0 = 0.0000000000000080 +t = 71.1000, H(p,q)-H0 = 0.0000000021899852, L(p,q)-L0 = 0.0000000000000078 +t = 71.2000, H(p,q)-H0 = 0.0000000021901124, L(p,q)-L0 = 0.0000000000000080 +t = 71.3000, H(p,q)-H0 = 0.0000000021902100, L(p,q)-L0 = 0.0000000000000082 +t = 71.4000, H(p,q)-H0 = 0.0000000021902857, L(p,q)-L0 = 0.0000000000000081 +t = 71.5000, H(p,q)-H0 = 0.0000000021903450, L(p,q)-L0 = 0.0000000000000083 +t = 71.6000, H(p,q)-H0 = 0.0000000021903911, L(p,q)-L0 = 0.0000000000000082 +t = 71.7000, H(p,q)-H0 = 0.0000000021904273, L(p,q)-L0 = 0.0000000000000083 +t = 71.8000, H(p,q)-H0 = 0.0000000021904549, L(p,q)-L0 = 0.0000000000000084 +t = 71.9000, H(p,q)-H0 = 0.0000000021904759, L(p,q)-L0 = 0.0000000000000085 +t = 72.0000, H(p,q)-H0 = 0.0000000021904909, L(p,q)-L0 = 0.0000000000000088 +t = 72.1000, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = 0.0000000000000091 +t = 72.2000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = 0.0000000000000089 +t = 72.3000, H(p,q)-H0 = 0.0000000021905058, L(p,q)-L0 = 0.0000000000000088 +t = 72.4000, H(p,q)-H0 = 0.0000000021905017, L(p,q)-L0 = 0.0000000000000085 +t = 72.5000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = 0.0000000000000084 +t = 72.6000, H(p,q)-H0 = 0.0000000021904779, L(p,q)-L0 = 0.0000000000000083 +t = 72.7000, H(p,q)-H0 = 0.0000000021904577, L(p,q)-L0 = 0.0000000000000079 +t = 72.8000, H(p,q)-H0 = 0.0000000021904308, L(p,q)-L0 = 0.0000000000000079 +t = 72.9000, H(p,q)-H0 = 0.0000000021903962, L(p,q)-L0 = 0.0000000000000083 +t = 73.0000, H(p,q)-H0 = 0.0000000021903512, L(p,q)-L0 = 0.0000000000000082 +t = 73.1000, H(p,q)-H0 = 0.0000000021902937, L(p,q)-L0 = 0.0000000000000082 +t = 73.2000, H(p,q)-H0 = 0.0000000021902204, L(p,q)-L0 = 0.0000000000000087 +t = 73.3000, H(p,q)-H0 = 0.0000000021901255, L(p,q)-L0 = 0.0000000000000084 +t = 73.4000, H(p,q)-H0 = 0.0000000021900025, L(p,q)-L0 = 0.0000000000000082 +t = 73.5000, H(p,q)-H0 = 0.0000000021898401, L(p,q)-L0 = 0.0000000000000078 +t = 73.6000, H(p,q)-H0 = 0.0000000021896239, L(p,q)-L0 = 0.0000000000000075 +t = 73.7000, H(p,q)-H0 = 0.0000000021893298, L(p,q)-L0 = 0.0000000000000079 +t = 73.8000, H(p,q)-H0 = 0.0000000021889204, L(p,q)-L0 = 0.0000000000000075 +t = 73.9000, H(p,q)-H0 = 0.0000000021883377, L(p,q)-L0 = 0.0000000000000073 +t = 74.0000, H(p,q)-H0 = 0.0000000021874844, L(p,q)-L0 = 0.0000000000000071 +t = 74.1000, H(p,q)-H0 = 0.0000000021861942, L(p,q)-L0 = 0.0000000000000072 +t = 74.2000, H(p,q)-H0 = 0.0000000021841700, L(p,q)-L0 = 0.0000000000000071 +t = 74.3000, H(p,q)-H0 = 0.0000000021808589, L(p,q)-L0 = 0.0000000000000070 +t = 74.4000, H(p,q)-H0 = 0.0000000021751795, L(p,q)-L0 = 0.0000000000000072 +t = 74.5000, H(p,q)-H0 = 0.0000000021648997, L(p,q)-L0 = 0.0000000000000071 +t = 74.6000, H(p,q)-H0 = 0.0000000021451367, L(p,q)-L0 = 0.0000000000000073 +t = 74.7000, H(p,q)-H0 = 0.0000000021045369, L(p,q)-L0 = 0.0000000000000068 +t = 74.8000, H(p,q)-H0 = 0.0000000020151361, L(p,q)-L0 = 0.0000000000000073 +t = 74.9000, H(p,q)-H0 = 0.0000000018052410, L(p,q)-L0 = 0.0000000000000073 +t = 75.0000, H(p,q)-H0 = 0.0000000012948249, L(p,q)-L0 = 0.0000000000000078 +t = 75.1000, H(p,q)-H0 = 0.0000000001250748, L(p,q)-L0 = 0.0000000000000075 +t = 75.2000, H(p,q)-H0 = -0.0000000017463939, L(p,q)-L0 = 0.0000000000000077 +ROOT RETURN: t = 75.2840 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 75.2840, H(p,q)-H0 = 0.0000000093074095, L(p,q)-L0 = 0.0000000021752905 +t = 75.3000, H(p,q)-H0 = -0.0000000018898960, L(p,q)-L0 = 0.0000000000000077 +t = 75.4000, H(p,q)-H0 = 0.0000000000002101, L(p,q)-L0 = 0.0000000000000074 +t = 75.5000, H(p,q)-H0 = -0.0000000019155226, L(p,q)-L0 = 0.0000000000000070 +t = 75.6000, H(p,q)-H0 = -0.0000000017140065, L(p,q)-L0 = 0.0000000000000071 +t = 75.7000, H(p,q)-H0 = 0.0000000001587277, L(p,q)-L0 = 0.0000000000000069 +t = 75.8000, H(p,q)-H0 = 0.0000000013130752, L(p,q)-L0 = 0.0000000000000067 +t = 75.9000, H(p,q)-H0 = 0.0000000018138380, L(p,q)-L0 = 0.0000000000000069 +t = 76.0000, H(p,q)-H0 = 0.0000000020191733, L(p,q)-L0 = 0.0000000000000061 +t = 76.1000, H(p,q)-H0 = 0.0000000021065129, L(p,q)-L0 = 0.0000000000000062 +t = 76.2000, H(p,q)-H0 = 0.0000000021461557, L(p,q)-L0 = 0.0000000000000064 +t = 76.3000, H(p,q)-H0 = 0.0000000021654534, L(p,q)-L0 = 0.0000000000000063 +t = 76.4000, H(p,q)-H0 = 0.0000000021754943, L(p,q)-L0 = 0.0000000000000060 +ROOT RETURN: t = 76.4287 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 76.4287, H(p,q)-H0 = 0.0000000021739354, L(p,q)-L0 = -0.0000000000044922 +t = 76.5000, H(p,q)-H0 = 0.0000000021810461, L(p,q)-L0 = 0.0000000000000062 +t = 76.6000, H(p,q)-H0 = 0.0000000021842850, L(p,q)-L0 = 0.0000000000000062 +t = 76.7000, H(p,q)-H0 = 0.0000000021862672, L(p,q)-L0 = 0.0000000000000063 +t = 76.8000, H(p,q)-H0 = 0.0000000021875317, L(p,q)-L0 = 0.0000000000000063 +t = 76.9000, H(p,q)-H0 = 0.0000000021883689, L(p,q)-L0 = 0.0000000000000066 +t = 77.0000, H(p,q)-H0 = 0.0000000021889408, L(p,q)-L0 = 0.0000000000000064 +t = 77.1000, H(p,q)-H0 = 0.0000000021893423, L(p,q)-L0 = 0.0000000000000061 +t = 77.2000, H(p,q)-H0 = 0.0000000021896316, L(p,q)-L0 = 0.0000000000000056 +t = 77.3000, H(p,q)-H0 = 0.0000000021898447, L(p,q)-L0 = 0.0000000000000056 +t = 77.4000, H(p,q)-H0 = 0.0000000021900042, L(p,q)-L0 = 0.0000000000000053 +t = 77.5000, H(p,q)-H0 = 0.0000000021901256, L(p,q)-L0 = 0.0000000000000053 +t = 77.6000, H(p,q)-H0 = 0.0000000021902189, L(p,q)-L0 = 0.0000000000000052 +t = 77.7000, H(p,q)-H0 = 0.0000000021902914, L(p,q)-L0 = 0.0000000000000053 +t = 77.8000, H(p,q)-H0 = 0.0000000021903478, L(p,q)-L0 = 0.0000000000000050 +t = 77.9000, H(p,q)-H0 = 0.0000000021903923, L(p,q)-L0 = 0.0000000000000053 +t = 78.0000, H(p,q)-H0 = 0.0000000021904266, L(p,q)-L0 = 0.0000000000000052 +t = 78.1000, H(p,q)-H0 = 0.0000000021904533, L(p,q)-L0 = 0.0000000000000053 +t = 78.2000, H(p,q)-H0 = 0.0000000021904728, L(p,q)-L0 = 0.0000000000000051 +t = 78.3000, H(p,q)-H0 = 0.0000000021904870, L(p,q)-L0 = 0.0000000000000053 +t = 78.4000, H(p,q)-H0 = 0.0000000021904957, L(p,q)-L0 = 0.0000000000000054 +t = 78.5000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000052 +t = 78.6000, H(p,q)-H0 = 0.0000000021904992, L(p,q)-L0 = 0.0000000000000050 +t = 78.7000, H(p,q)-H0 = 0.0000000021904938, L(p,q)-L0 = 0.0000000000000047 +t = 78.8000, H(p,q)-H0 = 0.0000000021904840, L(p,q)-L0 = 0.0000000000000047 +t = 78.9000, H(p,q)-H0 = 0.0000000021904688, L(p,q)-L0 = 0.0000000000000047 +t = 79.0000, H(p,q)-H0 = 0.0000000021904476, L(p,q)-L0 = 0.0000000000000046 +t = 79.1000, H(p,q)-H0 = 0.0000000021904196, L(p,q)-L0 = 0.0000000000000048 +t = 79.2000, H(p,q)-H0 = 0.0000000021903832, L(p,q)-L0 = 0.0000000000000050 +t = 79.3000, H(p,q)-H0 = 0.0000000021903367, L(p,q)-L0 = 0.0000000000000051 +t = 79.4000, H(p,q)-H0 = 0.0000000021902768, L(p,q)-L0 = 0.0000000000000053 +t = 79.5000, H(p,q)-H0 = 0.0000000021902007, L(p,q)-L0 = 0.0000000000000060 +t = 79.6000, H(p,q)-H0 = 0.0000000021901020, L(p,q)-L0 = 0.0000000000000063 +t = 79.7000, H(p,q)-H0 = 0.0000000021899730, L(p,q)-L0 = 0.0000000000000061 +t = 79.8000, H(p,q)-H0 = 0.0000000021898033, L(p,q)-L0 = 0.0000000000000062 +t = 79.9000, H(p,q)-H0 = 0.0000000021895758, L(p,q)-L0 = 0.0000000000000064 +t = 80.0000, H(p,q)-H0 = 0.0000000021892653, L(p,q)-L0 = 0.0000000000000067 +t = 80.1000, H(p,q)-H0 = 0.0000000021888316, L(p,q)-L0 = 0.0000000000000064 +t = 80.2000, H(p,q)-H0 = 0.0000000021882118, L(p,q)-L0 = 0.0000000000000067 +t = 80.3000, H(p,q)-H0 = 0.0000000021872997, L(p,q)-L0 = 0.0000000000000069 +t = 80.4000, H(p,q)-H0 = 0.0000000021859120, L(p,q)-L0 = 0.0000000000000072 +t = 80.5000, H(p,q)-H0 = 0.0000000021837197, L(p,q)-L0 = 0.0000000000000070 +t = 80.6000, H(p,q)-H0 = 0.0000000021801069, L(p,q)-L0 = 0.0000000000000070 +t = 80.7000, H(p,q)-H0 = 0.0000000021738561, L(p,q)-L0 = 0.0000000000000070 +t = 80.8000, H(p,q)-H0 = 0.0000000021624325, L(p,q)-L0 = 0.0000000000000070 +t = 80.9000, H(p,q)-H0 = 0.0000000021402319, L(p,q)-L0 = 0.0000000000000067 +t = 81.0000, H(p,q)-H0 = 0.0000000020940939, L(p,q)-L0 = 0.0000000000000060 +t = 81.1000, H(p,q)-H0 = 0.0000000019913217, L(p,q)-L0 = 0.0000000000000072 +t = 81.2000, H(p,q)-H0 = 0.0000000017478594, L(p,q)-L0 = 0.0000000000000074 +t = 81.3000, H(p,q)-H0 = 0.0000000011560892, L(p,q)-L0 = 0.0000000000000074 +t = 81.4000, H(p,q)-H0 = -0.0000000001606268, L(p,q)-L0 = 0.0000000000000075 +t = 81.5000, H(p,q)-H0 = -0.0000000020080768, L(p,q)-L0 = 0.0000000000000075 +ROOT RETURN: t = 81.5672 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 81.5672, H(p,q)-H0 = 0.0000000139063379, L(p,q)-L0 = 0.0000000031236222 +t = 81.6000, H(p,q)-H0 = -0.0000000015271278, L(p,q)-L0 = 0.0000000000000080 +t = 81.7000, H(p,q)-H0 = -0.0000000000970459, L(p,q)-L0 = 0.0000000000000083 +t = 81.8000, H(p,q)-H0 = -0.0000000021650761, L(p,q)-L0 = 0.0000000000000082 +t = 81.9000, H(p,q)-H0 = -0.0000000014039563, L(p,q)-L0 = 0.0000000000000080 +t = 82.0000, H(p,q)-H0 = 0.0000000004158305, L(p,q)-L0 = 0.0000000000000075 +t = 82.1000, H(p,q)-H0 = 0.0000000014310835, L(p,q)-L0 = 0.0000000000000073 +t = 82.2000, H(p,q)-H0 = 0.0000000018621674, L(p,q)-L0 = 0.0000000000000064 +t = 82.3000, H(p,q)-H0 = 0.0000000020393375, L(p,q)-L0 = 0.0000000000000067 +t = 82.4000, H(p,q)-H0 = 0.0000000021154430, L(p,q)-L0 = 0.0000000000000060 +t = 82.5000, H(p,q)-H0 = 0.0000000021503953, L(p,q)-L0 = 0.0000000000000060 +t = 82.6000, H(p,q)-H0 = 0.0000000021676080, L(p,q)-L0 = 0.0000000000000062 +t = 82.7000, H(p,q)-H0 = 0.0000000021766609, L(p,q)-L0 = 0.0000000000000068 +ROOT RETURN: t = 82.7119 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 82.7119, H(p,q)-H0 = 0.0000000021758406, L(p,q)-L0 = -0.0000000000020440 +t = 82.8000, H(p,q)-H0 = 0.0000000021817133, L(p,q)-L0 = 0.0000000000000069 +t = 82.9000, H(p,q)-H0 = 0.0000000021846863, L(p,q)-L0 = 0.0000000000000073 +t = 83.0000, H(p,q)-H0 = 0.0000000021865191, L(p,q)-L0 = 0.0000000000000074 +t = 83.1000, H(p,q)-H0 = 0.0000000021876961, L(p,q)-L0 = 0.0000000000000075 +t = 83.2000, H(p,q)-H0 = 0.0000000021884796, L(p,q)-L0 = 0.0000000000000075 +t = 83.3000, H(p,q)-H0 = 0.0000000021890175, L(p,q)-L0 = 0.0000000000000075 +t = 83.4000, H(p,q)-H0 = 0.0000000021893970, L(p,q)-L0 = 0.0000000000000073 +t = 83.5000, H(p,q)-H0 = 0.0000000021896718, L(p,q)-L0 = 0.0000000000000075 +t = 83.6000, H(p,q)-H0 = 0.0000000021898741, L(p,q)-L0 = 0.0000000000000071 +t = 83.7000, H(p,q)-H0 = 0.0000000021900265, L(p,q)-L0 = 0.0000000000000073 +t = 83.8000, H(p,q)-H0 = 0.0000000021901427, L(p,q)-L0 = 0.0000000000000075 +t = 83.9000, H(p,q)-H0 = 0.0000000021902319, L(p,q)-L0 = 0.0000000000000072 +t = 84.0000, H(p,q)-H0 = 0.0000000021903018, L(p,q)-L0 = 0.0000000000000073 +t = 84.1000, H(p,q)-H0 = 0.0000000021903560, L(p,q)-L0 = 0.0000000000000073 +t = 84.2000, H(p,q)-H0 = 0.0000000021903984, L(p,q)-L0 = 0.0000000000000074 +t = 84.3000, H(p,q)-H0 = 0.0000000021904314, L(p,q)-L0 = 0.0000000000000074 +t = 84.4000, H(p,q)-H0 = 0.0000000021904564, L(p,q)-L0 = 0.0000000000000071 +t = 84.5000, H(p,q)-H0 = 0.0000000021904751, L(p,q)-L0 = 0.0000000000000071 +t = 84.6000, H(p,q)-H0 = 0.0000000021904882, L(p,q)-L0 = 0.0000000000000070 +t = 84.7000, H(p,q)-H0 = 0.0000000021904961, L(p,q)-L0 = 0.0000000000000067 +t = 84.8000, H(p,q)-H0 = 0.0000000021904993, L(p,q)-L0 = 0.0000000000000064 +t = 84.9000, H(p,q)-H0 = 0.0000000021904980, L(p,q)-L0 = 0.0000000000000063 +t = 85.0000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = 0.0000000000000067 +t = 85.1000, H(p,q)-H0 = 0.0000000021904816, L(p,q)-L0 = 0.0000000000000070 +t = 85.2000, H(p,q)-H0 = 0.0000000021904655, L(p,q)-L0 = 0.0000000000000068 +t = 85.3000, H(p,q)-H0 = 0.0000000021904430, L(p,q)-L0 = 0.0000000000000066 +t = 85.4000, H(p,q)-H0 = 0.0000000021904135, L(p,q)-L0 = 0.0000000000000064 +t = 85.5000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000063 +t = 85.6000, H(p,q)-H0 = 0.0000000021903267, L(p,q)-L0 = 0.0000000000000066 +t = 85.7000, H(p,q)-H0 = 0.0000000021902641, L(p,q)-L0 = 0.0000000000000064 +t = 85.8000, H(p,q)-H0 = 0.0000000021901839, L(p,q)-L0 = 0.0000000000000062 +t = 85.9000, H(p,q)-H0 = 0.0000000021900807, L(p,q)-L0 = 0.0000000000000062 +t = 86.0000, H(p,q)-H0 = 0.0000000021899460, L(p,q)-L0 = 0.0000000000000062 +t = 86.1000, H(p,q)-H0 = 0.0000000021897676, L(p,q)-L0 = 0.0000000000000062 +t = 86.2000, H(p,q)-H0 = 0.0000000021895281, L(p,q)-L0 = 0.0000000000000057 +t = 86.3000, H(p,q)-H0 = 0.0000000021892003, L(p,q)-L0 = 0.0000000000000058 +t = 86.4000, H(p,q)-H0 = 0.0000000021887415, L(p,q)-L0 = 0.0000000000000062 +t = 86.5000, H(p,q)-H0 = 0.0000000021880811, L(p,q)-L0 = 0.0000000000000058 +t = 86.6000, H(p,q)-H0 = 0.0000000021871047, L(p,q)-L0 = 0.0000000000000060 +t = 86.7000, H(p,q)-H0 = 0.0000000021856101, L(p,q)-L0 = 0.0000000000000060 +t = 86.8000, H(p,q)-H0 = 0.0000000021832333, L(p,q)-L0 = 0.0000000000000060 +t = 86.9000, H(p,q)-H0 = 0.0000000021792859, L(p,q)-L0 = 0.0000000000000061 +t = 87.0000, H(p,q)-H0 = 0.0000000021723967, L(p,q)-L0 = 0.0000000000000066 +t = 87.1000, H(p,q)-H0 = 0.0000000021596795, L(p,q)-L0 = 0.0000000000000066 +t = 87.2000, H(p,q)-H0 = 0.0000000021346939, L(p,q)-L0 = 0.0000000000000062 +t = 87.3000, H(p,q)-H0 = 0.0000000020821591, L(p,q)-L0 = 0.0000000000000060 +t = 87.4000, H(p,q)-H0 = 0.0000000019638011, L(p,q)-L0 = 0.0000000000000066 +t = 87.5000, H(p,q)-H0 = 0.0000000016811532, L(p,q)-L0 = 0.0000000000000062 +t = 87.6000, H(p,q)-H0 = 0.0000000009964631, L(p,q)-L0 = 0.0000000000000069 +t = 87.7000, H(p,q)-H0 = -0.0000000004693257, L(p,q)-L0 = 0.0000000000000071 +t = 87.8000, H(p,q)-H0 = -0.0000000022005300, L(p,q)-L0 = 0.0000000000000074 +ROOT RETURN: t = 87.8504 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 87.8504, H(p,q)-H0 = -0.0000000012000745, L(p,q)-L0 = 0.0000000001728737 +t = 87.9000, H(p,q)-H0 = -0.0000000011032628, L(p,q)-L0 = 0.0000000000000073 +t = 88.0000, H(p,q)-H0 = -0.0000000003564984, L(p,q)-L0 = 0.0000000000000075 +t = 88.1000, H(p,q)-H0 = -0.0000000022895406, L(p,q)-L0 = 0.0000000000000075 +t = 88.2000, H(p,q)-H0 = -0.0000000010732333, L(p,q)-L0 = 0.0000000000000073 +t = 88.3000, H(p,q)-H0 = 0.0000000006458933, L(p,q)-L0 = 0.0000000000000073 +t = 88.4000, H(p,q)-H0 = 0.0000000015328927, L(p,q)-L0 = 0.0000000000000071 +t = 88.5000, H(p,q)-H0 = 0.0000000019037667, L(p,q)-L0 = 0.0000000000000063 +t = 88.6000, H(p,q)-H0 = 0.0000000020568408, L(p,q)-L0 = 0.0000000000000066 +t = 88.7000, H(p,q)-H0 = 0.0000000021232862, L(p,q)-L0 = 0.0000000000000062 +t = 88.8000, H(p,q)-H0 = 0.0000000021541653, L(p,q)-L0 = 0.0000000000000067 +t = 88.9000, H(p,q)-H0 = 0.0000000021695464, L(p,q)-L0 = 0.0000000000000066 +ROOT RETURN: t = 88.9951 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 88.9951, H(p,q)-H0 = 0.0000000021729292, L(p,q)-L0 = -0.0000000000058091 +t = 89.0000, H(p,q)-H0 = 0.0000000021777204, L(p,q)-L0 = 0.0000000000000061 +t = 89.1000, H(p,q)-H0 = 0.0000000021823255, L(p,q)-L0 = 0.0000000000000061 +t = 89.2000, H(p,q)-H0 = 0.0000000021850579, L(p,q)-L0 = 0.0000000000000062 +t = 89.3000, H(p,q)-H0 = 0.0000000021867548, L(p,q)-L0 = 0.0000000000000067 +t = 89.4000, H(p,q)-H0 = 0.0000000021878511, L(p,q)-L0 = 0.0000000000000064 +t = 89.5000, H(p,q)-H0 = 0.0000000021885854, L(p,q)-L0 = 0.0000000000000066 +t = 89.6000, H(p,q)-H0 = 0.0000000021890915, L(p,q)-L0 = 0.0000000000000062 +t = 89.7000, H(p,q)-H0 = 0.0000000021894508, L(p,q)-L0 = 0.0000000000000064 +t = 89.8000, H(p,q)-H0 = 0.0000000021897113, L(p,q)-L0 = 0.0000000000000064 +t = 89.9000, H(p,q)-H0 = 0.0000000021899041, L(p,q)-L0 = 0.0000000000000064 +t = 90.0000, H(p,q)-H0 = 0.0000000021900493, L(p,q)-L0 = 0.0000000000000062 +t = 90.1000, H(p,q)-H0 = 0.0000000021901603, L(p,q)-L0 = 0.0000000000000066 +t = 90.2000, H(p,q)-H0 = 0.0000000021902459, L(p,q)-L0 = 0.0000000000000063 +t = 90.3000, H(p,q)-H0 = 0.0000000021903125, L(p,q)-L0 = 0.0000000000000061 +t = 90.4000, H(p,q)-H0 = 0.0000000021903648, L(p,q)-L0 = 0.0000000000000061 +t = 90.5000, H(p,q)-H0 = 0.0000000021904051, L(p,q)-L0 = 0.0000000000000057 +t = 90.6000, H(p,q)-H0 = 0.0000000021904369, L(p,q)-L0 = 0.0000000000000060 +t = 90.7000, H(p,q)-H0 = 0.0000000021904610, L(p,q)-L0 = 0.0000000000000059 +t = 90.8000, H(p,q)-H0 = 0.0000000021904785, L(p,q)-L0 = 0.0000000000000057 +t = 90.9000, H(p,q)-H0 = 0.0000000021904907, L(p,q)-L0 = 0.0000000000000058 +t = 91.0000, H(p,q)-H0 = 0.0000000021904982, L(p,q)-L0 = 0.0000000000000062 +t = 91.1000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = 0.0000000000000064 +t = 91.2000, H(p,q)-H0 = 0.0000000021904987, L(p,q)-L0 = 0.0000000000000062 +t = 91.3000, H(p,q)-H0 = 0.0000000021904919, L(p,q)-L0 = 0.0000000000000062 +t = 91.4000, H(p,q)-H0 = 0.0000000021904804, L(p,q)-L0 = 0.0000000000000062 +t = 91.5000, H(p,q)-H0 = 0.0000000021904631, L(p,q)-L0 = 0.0000000000000060 +t = 91.6000, H(p,q)-H0 = 0.0000000021904401, L(p,q)-L0 = 0.0000000000000066 +t = 91.7000, H(p,q)-H0 = 0.0000000021904093, L(p,q)-L0 = 0.0000000000000064 +t = 91.8000, H(p,q)-H0 = 0.0000000021903700, L(p,q)-L0 = 0.0000000000000070 +t = 91.9000, H(p,q)-H0 = 0.0000000021903192, L(p,q)-L0 = 0.0000000000000070 +t = 92.0000, H(p,q)-H0 = 0.0000000021902540, L(p,q)-L0 = 0.0000000000000068 +t = 92.1000, H(p,q)-H0 = 0.0000000021901703, L(p,q)-L0 = 0.0000000000000064 +t = 92.2000, H(p,q)-H0 = 0.0000000021900621, L(p,q)-L0 = 0.0000000000000060 +t = 92.3000, H(p,q)-H0 = 0.0000000021899208, L(p,q)-L0 = 0.0000000000000058 +t = 92.4000, H(p,q)-H0 = 0.0000000021897337, L(p,q)-L0 = 0.0000000000000056 +t = 92.5000, H(p,q)-H0 = 0.0000000021894817, L(p,q)-L0 = 0.0000000000000056 +t = 92.6000, H(p,q)-H0 = 0.0000000021891347, L(p,q)-L0 = 0.0000000000000049 +t = 92.7000, H(p,q)-H0 = 0.0000000021886470, L(p,q)-L0 = 0.0000000000000047 +t = 92.8000, H(p,q)-H0 = 0.0000000021879436, L(p,q)-L0 = 0.0000000000000051 +t = 92.9000, H(p,q)-H0 = 0.0000000021868976, L(p,q)-L0 = 0.0000000000000054 +t = 93.0000, H(p,q)-H0 = 0.0000000021852867, L(p,q)-L0 = 0.0000000000000056 +t = 93.1000, H(p,q)-H0 = 0.0000000021827063, L(p,q)-L0 = 0.0000000000000053 +t = 93.2000, H(p,q)-H0 = 0.0000000021783869, L(p,q)-L0 = 0.0000000000000056 +t = 93.3000, H(p,q)-H0 = 0.0000000021707803, L(p,q)-L0 = 0.0000000000000056 +t = 93.4000, H(p,q)-H0 = 0.0000000021565990, L(p,q)-L0 = 0.0000000000000059 +t = 93.5000, H(p,q)-H0 = 0.0000000021284249, L(p,q)-L0 = 0.0000000000000057 +t = 93.6000, H(p,q)-H0 = 0.0000000020684887, L(p,q)-L0 = 0.0000000000000062 +t = 93.7000, H(p,q)-H0 = 0.0000000019319482, L(p,q)-L0 = 0.0000000000000066 +t = 93.8000, H(p,q)-H0 = 0.0000000016036170, L(p,q)-L0 = 0.0000000000000066 +t = 93.9000, H(p,q)-H0 = 0.0000000008137360, L(p,q)-L0 = 0.0000000000000066 +t = 94.0000, H(p,q)-H0 = -0.0000000007952332, L(p,q)-L0 = 0.0000000000000069 +t = 94.1000, H(p,q)-H0 = -0.0000000022989144, L(p,q)-L0 = 0.0000000000000069 +ROOT RETURN: t = 94.1336 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 94.1336, H(p,q)-H0 = 0.0000000079756892, L(p,q)-L0 = 0.0000000019152251 +t = 94.2000, H(p,q)-H0 = -0.0000000006765102, L(p,q)-L0 = 0.0000000000000072 +t = 94.3000, H(p,q)-H0 = -0.0000000007326133, L(p,q)-L0 = 0.0000000000000073 +t = 94.4000, H(p,q)-H0 = -0.0000000022880635, L(p,q)-L0 = 0.0000000000000074 +t = 94.5000, H(p,q)-H0 = -0.0000000007392544, L(p,q)-L0 = 0.0000000000000073 +t = 94.6000, H(p,q)-H0 = 0.0000000008495653, L(p,q)-L0 = 0.0000000000000071 +t = 94.7000, H(p,q)-H0 = 0.0000000016205666, L(p,q)-L0 = 0.0000000000000070 +t = 94.8000, H(p,q)-H0 = 0.0000000019396070, L(p,q)-L0 = 0.0000000000000075 +t = 94.9000, H(p,q)-H0 = 0.0000000020720623, L(p,q)-L0 = 0.0000000000000071 +t = 95.0000, H(p,q)-H0 = 0.0000000021301885, L(p,q)-L0 = 0.0000000000000073 +t = 95.1000, H(p,q)-H0 = 0.0000000021575211, L(p,q)-L0 = 0.0000000000000068 +t = 95.2000, H(p,q)-H0 = 0.0000000021712909, L(p,q)-L0 = 0.0000000000000067 +ROOT RETURN: t = 95.2783 g[0] = -1, y[0] = -0.658625, y[1] = 0.798625 +t = 95.2783, H(p,q)-H0 = 0.0000000021732466, L(p,q)-L0 = -0.0000000000053852 +t = 95.3000, H(p,q)-H0 = 0.0000000021786840, L(p,q)-L0 = 0.0000000000000063 +t = 95.4000, H(p,q)-H0 = 0.0000000021828877, L(p,q)-L0 = 0.0000000000000064 +t = 95.5000, H(p,q)-H0 = 0.0000000021854019, L(p,q)-L0 = 0.0000000000000068 +t = 95.6000, H(p,q)-H0 = 0.0000000021869742, L(p,q)-L0 = 0.0000000000000069 +t = 95.7000, H(p,q)-H0 = 0.0000000021879971, L(p,q)-L0 = 0.0000000000000070 +t = 95.8000, H(p,q)-H0 = 0.0000000021886853, L(p,q)-L0 = 0.0000000000000073 +t = 95.9000, H(p,q)-H0 = 0.0000000021891625, L(p,q)-L0 = 0.0000000000000073 +t = 96.0000, H(p,q)-H0 = 0.0000000021895025, L(p,q)-L0 = 0.0000000000000073 +t = 96.1000, H(p,q)-H0 = 0.0000000021897497, L(p,q)-L0 = 0.0000000000000072 +t = 96.2000, H(p,q)-H0 = 0.0000000021899338, L(p,q)-L0 = 0.0000000000000071 +t = 96.3000, H(p,q)-H0 = 0.0000000021900726, L(p,q)-L0 = 0.0000000000000072 +t = 96.4000, H(p,q)-H0 = 0.0000000021901789, L(p,q)-L0 = 0.0000000000000075 +t = 96.5000, H(p,q)-H0 = 0.0000000021902609, L(p,q)-L0 = 0.0000000000000072 +t = 96.6000, H(p,q)-H0 = 0.0000000021903250, L(p,q)-L0 = 0.0000000000000072 +t = 96.7000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000070 +t = 96.8000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000068 +t = 96.9000, H(p,q)-H0 = 0.0000000021904440, L(p,q)-L0 = 0.0000000000000064 +t = 97.0000, H(p,q)-H0 = 0.0000000021904670, L(p,q)-L0 = 0.0000000000000064 +t = 97.1000, H(p,q)-H0 = 0.0000000021904837, L(p,q)-L0 = 0.0000000000000063 +t = 97.2000, H(p,q)-H0 = 0.0000000021904951, L(p,q)-L0 = 0.0000000000000066 +t = 97.3000, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = 0.0000000000000062 +t = 97.4000, H(p,q)-H0 = 0.0000000021905035, L(p,q)-L0 = 0.0000000000000069 +t = 97.5000, H(p,q)-H0 = 0.0000000021905008, L(p,q)-L0 = 0.0000000000000071 +t = 97.6000, H(p,q)-H0 = 0.0000000021904931, L(p,q)-L0 = 0.0000000000000069 +t = 97.7000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000071 +t = 97.8000, H(p,q)-H0 = 0.0000000021904627, L(p,q)-L0 = 0.0000000000000070 +t = 97.9000, H(p,q)-H0 = 0.0000000021904382, L(p,q)-L0 = 0.0000000000000070 +t = 98.0000, H(p,q)-H0 = 0.0000000021904062, L(p,q)-L0 = 0.0000000000000070 +t = 98.1000, H(p,q)-H0 = 0.0000000021903646, L(p,q)-L0 = 0.0000000000000066 +t = 98.2000, H(p,q)-H0 = 0.0000000021903119, L(p,q)-L0 = 0.0000000000000068 +t = 98.3000, H(p,q)-H0 = 0.0000000021902442, L(p,q)-L0 = 0.0000000000000070 +t = 98.4000, H(p,q)-H0 = 0.0000000021901572, L(p,q)-L0 = 0.0000000000000069 +t = 98.5000, H(p,q)-H0 = 0.0000000021900445, L(p,q)-L0 = 0.0000000000000070 +t = 98.6000, H(p,q)-H0 = 0.0000000021898964, L(p,q)-L0 = 0.0000000000000068 +t = 98.7000, H(p,q)-H0 = 0.0000000021897003, L(p,q)-L0 = 0.0000000000000070 +t = 98.8000, H(p,q)-H0 = 0.0000000021894348, L(p,q)-L0 = 0.0000000000000071 +t = 98.9000, H(p,q)-H0 = 0.0000000021890686, L(p,q)-L0 = 0.0000000000000071 +t = 99.0000, H(p,q)-H0 = 0.0000000021885515, L(p,q)-L0 = 0.0000000000000070 +t = 99.1000, H(p,q)-H0 = 0.0000000021878013, L(p,q)-L0 = 0.0000000000000070 +t = 99.2000, H(p,q)-H0 = 0.0000000021866788, L(p,q)-L0 = 0.0000000000000071 +t = 99.3000, H(p,q)-H0 = 0.0000000021849398, L(p,q)-L0 = 0.0000000000000071 +t = 99.4000, H(p,q)-H0 = 0.0000000021821350, L(p,q)-L0 = 0.0000000000000070 +t = 99.5000, H(p,q)-H0 = 0.0000000021774016, L(p,q)-L0 = 0.0000000000000068 +t = 99.6000, H(p,q)-H0 = 0.0000000021689899, L(p,q)-L0 = 0.0000000000000067 +t = 99.7000, H(p,q)-H0 = 0.0000000021531459, L(p,q)-L0 = 0.0000000000000064 +t = 99.8000, H(p,q)-H0 = 0.0000000021213139, L(p,q)-L0 = 0.0000000000000060 +t = 99.9000, H(p,q)-H0 = 0.0000000020527962, L(p,q)-L0 = 0.0000000000000059 +t = 100.0000, H(p,q)-H0 = 0.0000000018950277, L(p,q)-L0 = 0.0000000000000062 +Current time = 99.999999999998593125383195001632 +Steps = 10000 +Step attempts = 10000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.010000000000000000208166817117217 +Last step size = 0.0099999999999482638152192848224331 +Current step size = 0.0099999999999482638152192848224331 +Root fn evals = 10296 +f1 RHS fn evals = 40032 +f2 RHS fn evals = 40032 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated-sums.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated-sums.out new file mode 100644 index 0000000000..cbc0030700 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated-sums.out @@ -0,0 +1,1088 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 1 + dt: 0.01 + Tf: 100 + nout: 1000 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 0.1000, H(p,q)-H0 = -0.0000000018824737, L(p,q)-L0 = 0.0000000000000000 +t = 0.2000, H(p,q)-H0 = -0.0000000017446897, L(p,q)-L0 = 0.0000000000000000 +t = 0.3000, H(p,q)-H0 = 0.0000000001300120, L(p,q)-L0 = -0.0000000000000001 +t = 0.4000, H(p,q)-H0 = 0.0000000012995796, L(p,q)-L0 = 0.0000000000000000 +t = 0.5000, H(p,q)-H0 = 0.0000000018082987, L(p,q)-L0 = -0.0000000000000001 +t = 0.6000, H(p,q)-H0 = 0.0000000020168753, L(p,q)-L0 = 0.0000000000000001 +t = 0.7000, H(p,q)-H0 = 0.0000000021055039, L(p,q)-L0 = 0.0000000000000000 +t = 0.8000, H(p,q)-H0 = 0.0000000021456816, L(p,q)-L0 = 0.0000000000000000 +t = 0.9000, H(p,q)-H0 = 0.0000000021652163, L(p,q)-L0 = 0.0000000000000001 +t = 1.0000, H(p,q)-H0 = 0.0000000021753693, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 1.0305 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 1.0305, H(p,q)-H0 = 0.0000000021770669, L(p,q)-L0 = -0.0000000000004670 +t = 1.1000, H(p,q)-H0 = 0.0000000021809765, L(p,q)-L0 = -0.0000000000000001 +t = 1.2000, H(p,q)-H0 = 0.0000000021842454, L(p,q)-L0 = 0.0000000000000000 +t = 1.3000, H(p,q)-H0 = 0.0000000021862439, L(p,q)-L0 = 0.0000000000000001 +t = 1.4000, H(p,q)-H0 = 0.0000000021875181, L(p,q)-L0 = 0.0000000000000000 +t = 1.5000, H(p,q)-H0 = 0.0000000021883610, L(p,q)-L0 = 0.0000000000000000 +t = 1.6000, H(p,q)-H0 = 0.0000000021889367, L(p,q)-L0 = 0.0000000000000000 +t = 1.7000, H(p,q)-H0 = 0.0000000021893412, L(p,q)-L0 = 0.0000000000000000 +t = 1.8000, H(p,q)-H0 = 0.0000000021896323, L(p,q)-L0 = 0.0000000000000000 +t = 1.9000, H(p,q)-H0 = 0.0000000021898465, L(p,q)-L0 = 0.0000000000000000 +t = 2.0000, H(p,q)-H0 = 0.0000000021900070, L(p,q)-L0 = 0.0000000000000000 +t = 2.1000, H(p,q)-H0 = 0.0000000021901287, L(p,q)-L0 = 0.0000000000000000 +t = 2.2000, H(p,q)-H0 = 0.0000000021902227, L(p,q)-L0 = 0.0000000000000000 +t = 2.3000, H(p,q)-H0 = 0.0000000021902956, L(p,q)-L0 = 0.0000000000000000 +t = 2.4000, H(p,q)-H0 = 0.0000000021903526, L(p,q)-L0 = 0.0000000000000000 +t = 2.5000, H(p,q)-H0 = 0.0000000021903970, L(p,q)-L0 = 0.0000000000000000 +t = 2.6000, H(p,q)-H0 = 0.0000000021904316, L(p,q)-L0 = 0.0000000000000000 +t = 2.7000, H(p,q)-H0 = 0.0000000021904581, L(p,q)-L0 = 0.0000000000000000 +t = 2.8000, H(p,q)-H0 = 0.0000000021904781, L(p,q)-L0 = 0.0000000000000000 +t = 2.9000, H(p,q)-H0 = 0.0000000021904921, L(p,q)-L0 = 0.0000000000000000 +t = 3.0000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 +t = 3.1000, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = 0.0000000000000001 +t = 3.2000, H(p,q)-H0 = 0.0000000021905047, L(p,q)-L0 = 0.0000000000000000 +t = 3.3000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000001 +t = 3.4000, H(p,q)-H0 = 0.0000000021904899, L(p,q)-L0 = 0.0000000000000000 +t = 3.5000, H(p,q)-H0 = 0.0000000021904749, L(p,q)-L0 = 0.0000000000000000 +t = 3.6000, H(p,q)-H0 = 0.0000000021904538, L(p,q)-L0 = 0.0000000000000000 +t = 3.7000, H(p,q)-H0 = 0.0000000021904260, L(p,q)-L0 = 0.0000000000000000 +t = 3.8000, H(p,q)-H0 = 0.0000000021903896, L(p,q)-L0 = 0.0000000000000000 +t = 3.9000, H(p,q)-H0 = 0.0000000021903431, L(p,q)-L0 = 0.0000000000000001 +t = 4.0000, H(p,q)-H0 = 0.0000000021902835, L(p,q)-L0 = 0.0000000000000000 +t = 4.1000, H(p,q)-H0 = 0.0000000021902072, L(p,q)-L0 = 0.0000000000000000 +t = 4.2000, H(p,q)-H0 = 0.0000000021901089, L(p,q)-L0 = 0.0000000000000000 +t = 4.3000, H(p,q)-H0 = 0.0000000021899808, L(p,q)-L0 = 0.0000000000000001 +t = 4.4000, H(p,q)-H0 = 0.0000000021898117, L(p,q)-L0 = 0.0000000000000000 +t = 4.5000, H(p,q)-H0 = 0.0000000021895855, L(p,q)-L0 = 0.0000000000000000 +t = 4.6000, H(p,q)-H0 = 0.0000000021892765, L(p,q)-L0 = 0.0000000000000000 +t = 4.7000, H(p,q)-H0 = 0.0000000021888458, L(p,q)-L0 = 0.0000000000000000 +t = 4.8000, H(p,q)-H0 = 0.0000000021882303, L(p,q)-L0 = 0.0000000000000000 +t = 4.9000, H(p,q)-H0 = 0.0000000021873244, L(p,q)-L0 = 0.0000000000000000 +t = 5.0000, H(p,q)-H0 = 0.0000000021859471, L(p,q)-L0 = 0.0000000000000000 +t = 5.1000, H(p,q)-H0 = 0.0000000021837736, L(p,q)-L0 = 0.0000000000000000 +t = 5.2000, H(p,q)-H0 = 0.0000000021801940, L(p,q)-L0 = 0.0000000000000000 +t = 5.3000, H(p,q)-H0 = 0.0000000021740070, L(p,q)-L0 = 0.0000000000000000 +t = 5.4000, H(p,q)-H0 = 0.0000000021627109, L(p,q)-L0 = 0.0000000000000000 +t = 5.5000, H(p,q)-H0 = 0.0000000021407837, L(p,q)-L0 = 0.0000000000000001 +t = 5.6000, H(p,q)-H0 = 0.0000000020952696, L(p,q)-L0 = 0.0000000000000001 +t = 5.7000, H(p,q)-H0 = 0.0000000019940064, L(p,q)-L0 = 0.0000000000000001 +t = 5.8000, H(p,q)-H0 = 0.0000000017543399, L(p,q)-L0 = -0.0000000000000001 +t = 5.9000, H(p,q)-H0 = 0.0000000011716927, L(p,q)-L0 = 0.0000000000000000 +t = 6.0000, H(p,q)-H0 = -0.0000000001292899, L(p,q)-L0 = 0.0000000000000000 +t = 6.1000, H(p,q)-H0 = -0.0000000019832624, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 6.1690 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 6.1690, H(p,q)-H0 = 0.0000000071529043, L(p,q)-L0 = 0.0000000018309229 +t = 6.2000, H(p,q)-H0 = -0.0000000015692070, L(p,q)-L0 = 0.0000000000000000 +t = 6.3000, H(p,q)-H0 = -0.0000000000785478, L(p,q)-L0 = 0.0000000000000000 +t = 6.4000, H(p,q)-H0 = -0.0000000021444517, L(p,q)-L0 = 0.0000000000000000 +t = 6.5000, H(p,q)-H0 = -0.0000000014380208, L(p,q)-L0 = 0.0000000000000000 +t = 6.6000, H(p,q)-H0 = 0.0000000003899581, L(p,q)-L0 = 0.0000000000000001 +t = 6.7000, H(p,q)-H0 = 0.0000000014194270, L(p,q)-L0 = 0.0000000000000001 +t = 6.8000, H(p,q)-H0 = 0.0000000018574055, L(p,q)-L0 = 0.0000000000000000 +t = 6.9000, H(p,q)-H0 = 0.0000000020373460, L(p,q)-L0 = -0.0000000000000001 +t = 7.0000, H(p,q)-H0 = 0.0000000021145606, L(p,q)-L0 = 0.0000000000000001 +t = 7.1000, H(p,q)-H0 = 0.0000000021499772, L(p,q)-L0 = 0.0000000000000000 +t = 7.2000, H(p,q)-H0 = 0.0000000021673975, L(p,q)-L0 = 0.0000000000000000 +t = 7.3000, H(p,q)-H0 = 0.0000000021765487, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 7.3137 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 7.3137, H(p,q)-H0 = 0.0000000021741299, L(p,q)-L0 = -0.0000000000042727 +t = 7.4000, H(p,q)-H0 = 0.0000000021816513, L(p,q)-L0 = 0.0000000000000000 +t = 7.5000, H(p,q)-H0 = 0.0000000021846508, L(p,q)-L0 = 0.0000000000000000 +t = 7.6000, H(p,q)-H0 = 0.0000000021864986, L(p,q)-L0 = 0.0000000000000000 +t = 7.7000, H(p,q)-H0 = 0.0000000021876844, L(p,q)-L0 = 0.0000000000000000 +t = 7.8000, H(p,q)-H0 = 0.0000000021884732, L(p,q)-L0 = 0.0000000000000000 +t = 7.9000, H(p,q)-H0 = 0.0000000021890147, L(p,q)-L0 = 0.0000000000000000 +t = 8.0000, H(p,q)-H0 = 0.0000000021893968, L(p,q)-L0 = 0.0000000000000000 +t = 8.1000, H(p,q)-H0 = 0.0000000021896730, L(p,q)-L0 = 0.0000000000000000 +t = 8.2000, H(p,q)-H0 = 0.0000000021898767, L(p,q)-L0 = 0.0000000000000000 +t = 8.3000, H(p,q)-H0 = 0.0000000021900298, L(p,q)-L0 = 0.0000000000000000 +t = 8.4000, H(p,q)-H0 = 0.0000000021901463, L(p,q)-L0 = 0.0000000000000000 +t = 8.5000, H(p,q)-H0 = 0.0000000021902362, L(p,q)-L0 = 0.0000000000000000 +t = 8.6000, H(p,q)-H0 = 0.0000000021903061, L(p,q)-L0 = 0.0000000000000001 +t = 8.7000, H(p,q)-H0 = 0.0000000021903608, L(p,q)-L0 = 0.0000000000000000 +t = 8.8000, H(p,q)-H0 = 0.0000000021904033, L(p,q)-L0 = 0.0000000000000000 +t = 8.9000, H(p,q)-H0 = 0.0000000021904367, L(p,q)-L0 = 0.0000000000000000 +t = 9.0000, H(p,q)-H0 = 0.0000000021904620, L(p,q)-L0 = -0.0000000000000001 +t = 9.1000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000001 +t = 9.2000, H(p,q)-H0 = 0.0000000021904940, L(p,q)-L0 = 0.0000000000000000 +t = 9.3000, H(p,q)-H0 = 0.0000000021905020, L(p,q)-L0 = 0.0000000000000000 +t = 9.4000, H(p,q)-H0 = 0.0000000021905055, L(p,q)-L0 = 0.0000000000000000 +t = 9.5000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000001 +t = 9.6000, H(p,q)-H0 = 0.0000000021904984, L(p,q)-L0 = 0.0000000000000000 +t = 9.7000, H(p,q)-H0 = 0.0000000021904878, L(p,q)-L0 = 0.0000000000000000 +t = 9.8000, H(p,q)-H0 = 0.0000000021904717, L(p,q)-L0 = 0.0000000000000000 +t = 9.9000, H(p,q)-H0 = 0.0000000021904497, L(p,q)-L0 = 0.0000000000000000 +t = 10.0000, H(p,q)-H0 = 0.0000000021904205, L(p,q)-L0 = 0.0000000000000000 +t = 10.1000, H(p,q)-H0 = 0.0000000021903827, L(p,q)-L0 = 0.0000000000000000 +t = 10.2000, H(p,q)-H0 = 0.0000000021903341, L(p,q)-L0 = 0.0000000000000000 +t = 10.3000, H(p,q)-H0 = 0.0000000021902720, L(p,q)-L0 = 0.0000000000000000 +t = 10.4000, H(p,q)-H0 = 0.0000000021901924, L(p,q)-L0 = 0.0000000000000000 +t = 10.5000, H(p,q)-H0 = 0.0000000021900896, L(p,q)-L0 = 0.0000000000000000 +t = 10.6000, H(p,q)-H0 = 0.0000000021899554, L(p,q)-L0 = 0.0000000000000000 +t = 10.7000, H(p,q)-H0 = 0.0000000021897782, L(p,q)-L0 = 0.0000000000000000 +t = 10.8000, H(p,q)-H0 = 0.0000000021895400, L(p,q)-L0 = 0.0000000000000000 +t = 10.9000, H(p,q)-H0 = 0.0000000021892140, L(p,q)-L0 = 0.0000000000000000 +t = 11.0000, H(p,q)-H0 = 0.0000000021887575, L(p,q)-L0 = 0.0000000000000000 +t = 11.1000, H(p,q)-H0 = 0.0000000021881021, L(p,q)-L0 = 0.0000000000000000 +t = 11.2000, H(p,q)-H0 = 0.0000000021871323, L(p,q)-L0 = 0.0000000000000000 +t = 11.3000, H(p,q)-H0 = 0.0000000021856494, L(p,q)-L0 = 0.0000000000000000 +t = 11.4000, H(p,q)-H0 = 0.0000000021832930, L(p,q)-L0 = 0.0000000000000000 +t = 11.5000, H(p,q)-H0 = 0.0000000021793823, L(p,q)-L0 = 0.0000000000000000 +t = 11.6000, H(p,q)-H0 = 0.0000000021725635, L(p,q)-L0 = 0.0000000000000000 +t = 11.7000, H(p,q)-H0 = 0.0000000021599907, L(p,q)-L0 = -0.0000000000000001 +t = 11.8000, H(p,q)-H0 = 0.0000000021353180, L(p,q)-L0 = 0.0000000000000000 +t = 11.9000, H(p,q)-H0 = 0.0000000020835041, L(p,q)-L0 = 0.0000000000000001 +t = 12.0000, H(p,q)-H0 = 0.0000000019669062, L(p,q)-L0 = 0.0000000000000000 +t = 12.1000, H(p,q)-H0 = 0.0000000016886883, L(p,q)-L0 = -0.0000000000000001 +t = 12.2000, H(p,q)-H0 = 0.0000000010143810, L(p,q)-L0 = 0.0000000000000001 +t = 12.3000, H(p,q)-H0 = -0.0000000004357776, L(p,q)-L0 = 0.0000000000000000 +t = 12.4000, H(p,q)-H0 = -0.0000000021842266, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 12.4522 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 12.4522, H(p,q)-H0 = 0.0000000036282661, L(p,q)-L0 = 0.0000000010789349 +t = 12.5000, H(p,q)-H0 = -0.0000000011492796, L(p,q)-L0 = 0.0000000000000000 +t = 12.6000, H(p,q)-H0 = -0.0000000003226033, L(p,q)-L0 = 0.0000000000000000 +t = 12.7000, H(p,q)-H0 = -0.0000000022824618, L(p,q)-L0 = 0.0000000000000000 +t = 12.8000, H(p,q)-H0 = -0.0000000011085795, L(p,q)-L0 = 0.0000000000000000 +t = 12.9000, H(p,q)-H0 = 0.0000000006228640, L(p,q)-L0 = 0.0000000000000000 +t = 13.0000, H(p,q)-H0 = 0.0000000015228456, L(p,q)-L0 = 0.0000000000000000 +t = 13.1000, H(p,q)-H0 = 0.0000000018996662, L(p,q)-L0 = -0.0000000000000001 +t = 13.2000, H(p,q)-H0 = 0.0000000020551111, L(p,q)-L0 = 0.0000000000000000 +t = 13.3000, H(p,q)-H0 = 0.0000000021225102, L(p,q)-L0 = 0.0000000000000000 +t = 13.4000, H(p,q)-H0 = 0.0000000021537927, L(p,q)-L0 = 0.0000000000000001 +t = 13.5000, H(p,q)-H0 = 0.0000000021693561, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 13.5969 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 13.5969, H(p,q)-H0 = 0.0000000021723138, L(p,q)-L0 = -0.0000000000066076 +t = 13.6000, H(p,q)-H0 = 0.0000000021776183, L(p,q)-L0 = 0.0000000000000000 +t = 13.7000, H(p,q)-H0 = 0.0000000021822684, L(p,q)-L0 = 0.0000000000000000 +t = 13.8000, H(p,q)-H0 = 0.0000000021850247, L(p,q)-L0 = -0.0000000000000001 +t = 13.9000, H(p,q)-H0 = 0.0000000021867351, L(p,q)-L0 = 0.0000000000000000 +t = 14.0000, H(p,q)-H0 = 0.0000000021878396, L(p,q)-L0 = 0.0000000000000000 +t = 14.1000, H(p,q)-H0 = 0.0000000021885787, L(p,q)-L0 = 0.0000000000000000 +t = 14.2000, H(p,q)-H0 = 0.0000000021890884, L(p,q)-L0 = 0.0000000000000000 +t = 14.3000, H(p,q)-H0 = 0.0000000021894495, L(p,q)-L0 = 0.0000000000000000 +t = 14.4000, H(p,q)-H0 = 0.0000000021897117, L(p,q)-L0 = 0.0000000000000000 +t = 14.5000, H(p,q)-H0 = 0.0000000021899056, L(p,q)-L0 = 0.0000000000000000 +t = 14.6000, H(p,q)-H0 = 0.0000000021900515, L(p,q)-L0 = 0.0000000000000000 +t = 14.7000, H(p,q)-H0 = 0.0000000021901632, L(p,q)-L0 = 0.0000000000000000 +t = 14.8000, H(p,q)-H0 = 0.0000000021902492, L(p,q)-L0 = -0.0000000000000001 +t = 14.9000, H(p,q)-H0 = 0.0000000021903163, L(p,q)-L0 = 0.0000000000000000 +t = 15.0000, H(p,q)-H0 = 0.0000000021903688, L(p,q)-L0 = 0.0000000000000000 +t = 15.1000, H(p,q)-H0 = 0.0000000021904096, L(p,q)-L0 = 0.0000000000000000 +t = 15.2000, H(p,q)-H0 = 0.0000000021904414, L(p,q)-L0 = 0.0000000000000001 +t = 15.3000, H(p,q)-H0 = 0.0000000021904656, L(p,q)-L0 = 0.0000000000000000 +t = 15.4000, H(p,q)-H0 = 0.0000000021904834, L(p,q)-L0 = 0.0000000000000000 +t = 15.5000, H(p,q)-H0 = 0.0000000021904957, L(p,q)-L0 = 0.0000000000000000 +t = 15.6000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000000 +t = 15.7000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 +t = 15.8000, H(p,q)-H0 = 0.0000000021905038, L(p,q)-L0 = 0.0000000000000001 +t = 15.9000, H(p,q)-H0 = 0.0000000021904970, L(p,q)-L0 = 0.0000000000000000 +t = 16.0000, H(p,q)-H0 = 0.0000000021904856, L(p,q)-L0 = 0.0000000000000001 +t = 16.1000, H(p,q)-H0 = 0.0000000021904686, L(p,q)-L0 = -0.0000000000000001 +t = 16.2000, H(p,q)-H0 = 0.0000000021904453, L(p,q)-L0 = 0.0000000000000000 +t = 16.3000, H(p,q)-H0 = 0.0000000021904149, L(p,q)-L0 = 0.0000000000000001 +t = 16.4000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000000 +t = 16.5000, H(p,q)-H0 = 0.0000000021903246, L(p,q)-L0 = 0.0000000000000000 +t = 16.6000, H(p,q)-H0 = 0.0000000021902601, L(p,q)-L0 = 0.0000000000000000 +t = 16.7000, H(p,q)-H0 = 0.0000000021901770, L(p,q)-L0 = 0.0000000000000000 +t = 16.8000, H(p,q)-H0 = 0.0000000021900695, L(p,q)-L0 = 0.0000000000000000 +t = 16.9000, H(p,q)-H0 = 0.0000000021899291, L(p,q)-L0 = 0.0000000000000000 +t = 17.0000, H(p,q)-H0 = 0.0000000021897431, L(p,q)-L0 = 0.0000000000000000 +t = 17.1000, H(p,q)-H0 = 0.0000000021894925, L(p,q)-L0 = 0.0000000000000000 +t = 17.2000, H(p,q)-H0 = 0.0000000021891479, L(p,q)-L0 = 0.0000000000000000 +t = 17.3000, H(p,q)-H0 = 0.0000000021886638, L(p,q)-L0 = 0.0000000000000000 +t = 17.4000, H(p,q)-H0 = 0.0000000021879651, L(p,q)-L0 = 0.0000000000000000 +t = 17.5000, H(p,q)-H0 = 0.0000000021869262, L(p,q)-L0 = 0.0000000000000000 +t = 17.6000, H(p,q)-H0 = 0.0000000021853275, L(p,q)-L0 = 0.0000000000000000 +t = 17.7000, H(p,q)-H0 = 0.0000000021827699, L(p,q)-L0 = -0.0000000000000001 +t = 17.8000, H(p,q)-H0 = 0.0000000021784917, L(p,q)-L0 = 0.0000000000000001 +t = 17.9000, H(p,q)-H0 = 0.0000000021709649, L(p,q)-L0 = 0.0000000000000001 +t = 18.0000, H(p,q)-H0 = 0.0000000021569465, L(p,q)-L0 = 0.0000000000000001 +t = 18.1000, H(p,q)-H0 = 0.0000000021291303, L(p,q)-L0 = -0.0000000000000001 +t = 18.2000, H(p,q)-H0 = 0.0000000020700275, L(p,q)-L0 = -0.0000000000000001 +t = 18.3000, H(p,q)-H0 = 0.0000000019355423, L(p,q)-L0 = 0.0000000000000000 +t = 18.4000, H(p,q)-H0 = 0.0000000016123713, L(p,q)-L0 = 0.0000000000000000 +t = 18.5000, H(p,q)-H0 = 0.0000000008341923, L(p,q)-L0 = 0.0000000000000000 +t = 18.6000, H(p,q)-H0 = -0.0000000007602408, L(p,q)-L0 = 0.0000000000000000 +t = 18.7000, H(p,q)-H0 = -0.0000000022936408, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 18.7354 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 18.7354, H(p,q)-H0 = 0.0000000126969424, L(p,q)-L0 = 0.0000000028491529 +t = 18.8000, H(p,q)-H0 = -0.0000000007197527, L(p,q)-L0 = 0.0000000000000000 +t = 18.9000, H(p,q)-H0 = -0.0000000006891674, L(p,q)-L0 = -0.0000000000000001 +t = 19.0000, H(p,q)-H0 = -0.0000000022938584, L(p,q)-L0 = 0.0000000000000001 +t = 19.1000, H(p,q)-H0 = -0.0000000007742575, L(p,q)-L0 = 0.0000000000000000 +t = 19.2000, H(p,q)-H0 = 0.0000000008292624, L(p,q)-L0 = 0.0000000000000001 +t = 19.3000, H(p,q)-H0 = 0.0000000016119193, L(p,q)-L0 = 0.0000000000000000 +t = 19.4000, H(p,q)-H0 = 0.0000000019360702, L(p,q)-L0 = 0.0000000000000001 +t = 19.5000, H(p,q)-H0 = 0.0000000020705553, L(p,q)-L0 = 0.0000000000000000 +t = 19.6000, H(p,q)-H0 = 0.0000000021295025, L(p,q)-L0 = -0.0000000000000001 +t = 19.7000, H(p,q)-H0 = 0.0000000021571878, L(p,q)-L0 = 0.0000000000000000 +t = 19.8000, H(p,q)-H0 = 0.0000000021711180, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 19.8800 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 19.8800, H(p,q)-H0 = 0.0000000021773960, L(p,q)-L0 = -0.0000000000000390 +t = 19.9000, H(p,q)-H0 = 0.0000000021785899, L(p,q)-L0 = 0.0000000000000000 +t = 20.0000, H(p,q)-H0 = 0.0000000021828339, L(p,q)-L0 = 0.0000000000000000 +t = 20.1000, H(p,q)-H0 = 0.0000000021853701, L(p,q)-L0 = 0.0000000000000000 +t = 20.2000, H(p,q)-H0 = 0.0000000021869550, L(p,q)-L0 = 0.0000000000000000 +t = 20.3000, H(p,q)-H0 = 0.0000000021879849, L(p,q)-L0 = 0.0000000000000000 +t = 20.4000, H(p,q)-H0 = 0.0000000021886777, L(p,q)-L0 = 0.0000000000000000 +t = 20.5000, H(p,q)-H0 = 0.0000000021891579, L(p,q)-L0 = 0.0000000000000000 +t = 20.6000, H(p,q)-H0 = 0.0000000021894995, L(p,q)-L0 = -0.0000000000000001 +t = 20.7000, H(p,q)-H0 = 0.0000000021897483, L(p,q)-L0 = 0.0000000000000000 +t = 20.8000, H(p,q)-H0 = 0.0000000021899330, L(p,q)-L0 = 0.0000000000000000 +t = 20.9000, H(p,q)-H0 = 0.0000000021900724, L(p,q)-L0 = 0.0000000000000000 +t = 21.0000, H(p,q)-H0 = 0.0000000021901791, L(p,q)-L0 = 0.0000000000000000 +t = 21.1000, H(p,q)-H0 = 0.0000000021902617, L(p,q)-L0 = 0.0000000000000000 +t = 21.2000, H(p,q)-H0 = 0.0000000021903260, L(p,q)-L0 = 0.0000000000000000 +t = 21.3000, H(p,q)-H0 = 0.0000000021903764, L(p,q)-L0 = 0.0000000000000000 +t = 21.4000, H(p,q)-H0 = 0.0000000021904156, L(p,q)-L0 = 0.0000000000000000 +t = 21.5000, H(p,q)-H0 = 0.0000000021904460, L(p,q)-L0 = 0.0000000000000000 +t = 21.6000, H(p,q)-H0 = 0.0000000021904690, L(p,q)-L0 = 0.0000000000000000 +t = 21.7000, H(p,q)-H0 = 0.0000000021904859, L(p,q)-L0 = 0.0000000000000000 +t = 21.8000, H(p,q)-H0 = 0.0000000021904972, L(p,q)-L0 = -0.0000000000000001 +t = 21.9000, H(p,q)-H0 = 0.0000000021905038, L(p,q)-L0 = -0.0000000000000001 +t = 22.0000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000000 +t = 22.1000, H(p,q)-H0 = 0.0000000021905029, L(p,q)-L0 = -0.0000000000000001 +t = 22.2000, H(p,q)-H0 = 0.0000000021904955, L(p,q)-L0 = 0.0000000000000001 +t = 22.3000, H(p,q)-H0 = 0.0000000021904830, L(p,q)-L0 = 0.0000000000000000 +t = 22.4000, H(p,q)-H0 = 0.0000000021904652, L(p,q)-L0 = 0.0000000000000000 +t = 22.5000, H(p,q)-H0 = 0.0000000021904408, L(p,q)-L0 = 0.0000000000000000 +t = 22.6000, H(p,q)-H0 = 0.0000000021904089, L(p,q)-L0 = 0.0000000000000000 +t = 22.7000, H(p,q)-H0 = 0.0000000021903677, L(p,q)-L0 = 0.0000000000000001 +t = 22.8000, H(p,q)-H0 = 0.0000000021903149, L(p,q)-L0 = 0.0000000000000000 +t = 22.9000, H(p,q)-H0 = 0.0000000021902474, L(p,q)-L0 = 0.0000000000000000 +t = 23.0000, H(p,q)-H0 = 0.0000000021901607, L(p,q)-L0 = -0.0000000000000001 +t = 23.1000, H(p,q)-H0 = 0.0000000021900485, L(p,q)-L0 = 0.0000000000000000 +t = 23.2000, H(p,q)-H0 = 0.0000000021899015, L(p,q)-L0 = 0.0000000000000000 +t = 23.3000, H(p,q)-H0 = 0.0000000021897061, L(p,q)-L0 = 0.0000000000000000 +t = 23.4000, H(p,q)-H0 = 0.0000000021894420, L(p,q)-L0 = -0.0000000000000001 +t = 23.5000, H(p,q)-H0 = 0.0000000021890779, L(p,q)-L0 = 0.0000000000000000 +t = 23.6000, H(p,q)-H0 = 0.0000000021885638, L(p,q)-L0 = 0.0000000000000000 +t = 23.7000, H(p,q)-H0 = 0.0000000021878186, L(p,q)-L0 = 0.0000000000000000 +t = 23.8000, H(p,q)-H0 = 0.0000000021867045, L(p,q)-L0 = 0.0000000000000000 +t = 23.9000, H(p,q)-H0 = 0.0000000021849794, L(p,q)-L0 = 0.0000000000000000 +t = 24.0000, H(p,q)-H0 = 0.0000000021821998, L(p,q)-L0 = 0.0000000000000000 +t = 24.1000, H(p,q)-H0 = 0.0000000021775125, L(p,q)-L0 = 0.0000000000000000 +t = 24.2000, H(p,q)-H0 = 0.0000000021691906, L(p,q)-L0 = 0.0000000000000000 +t = 24.3000, H(p,q)-H0 = 0.0000000021535328, L(p,q)-L0 = 0.0000000000000000 +t = 24.4000, H(p,q)-H0 = 0.0000000021221120, L(p,q)-L0 = -0.0000000000000001 +t = 24.5000, H(p,q)-H0 = 0.0000000020545623, L(p,q)-L0 = -0.0000000000000001 +t = 24.6000, H(p,q)-H0 = 0.0000000018991935, L(p,q)-L0 = -0.0000000000000002 +t = 24.7000, H(p,q)-H0 = 0.0000000015237045, L(p,q)-L0 = -0.0000000000000001 +t = 24.8000, H(p,q)-H0 = 0.0000000006291403, L(p,q)-L0 = 0.0000000000000000 +t = 24.9000, H(p,q)-H0 = -0.0000000010937444, L(p,q)-L0 = 0.0000000000000000 +t = 25.0000, H(p,q)-H0 = -0.0000000022899942, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 25.0186 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 25.0186, H(p,q)-H0 = 0.0000000098686312, L(p,q)-L0 = 0.0000000023590667 +t = 25.1000, H(p,q)-H0 = -0.0000000003464105, L(p,q)-L0 = -0.0000000000000001 +t = 25.2000, H(p,q)-H0 = -0.0000000011168149, L(p,q)-L0 = 0.0000000000000000 +t = 25.3000, H(p,q)-H0 = -0.0000000021907156, L(p,q)-L0 = 0.0000000000000000 +t = 25.4000, H(p,q)-H0 = -0.0000000004484462, L(p,q)-L0 = 0.0000000000000001 +t = 25.5000, H(p,q)-H0 = 0.0000000010106103, L(p,q)-L0 = 0.0000000000000000 +t = 25.6000, H(p,q)-H0 = 0.0000000016885486, L(p,q)-L0 = -0.0000000000000002 +t = 25.7000, H(p,q)-H0 = 0.0000000019674660, L(p,q)-L0 = 0.0000000000000000 +t = 25.8000, H(p,q)-H0 = 0.0000000020840075, L(p,q)-L0 = 0.0000000000000000 +t = 25.9000, H(p,q)-H0 = 0.0000000021356651, L(p,q)-L0 = 0.0000000000000000 +t = 26.0000, H(p,q)-H0 = 0.0000000021602146, L(p,q)-L0 = 0.0000000000000000 +t = 26.1000, H(p,q)-H0 = 0.0000000021727057, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 26.1632 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 26.1632, H(p,q)-H0 = 0.0000000021745573, L(p,q)-L0 = -0.0000000000037201 +t = 26.2000, H(p,q)-H0 = 0.0000000021794737, L(p,q)-L0 = 0.0000000000000001 +t = 26.3000, H(p,q)-H0 = 0.0000000021833528, L(p,q)-L0 = 0.0000000000000001 +t = 26.4000, H(p,q)-H0 = 0.0000000021856892, L(p,q)-L0 = 0.0000000000000000 +t = 26.5000, H(p,q)-H0 = 0.0000000021871594, L(p,q)-L0 = 0.0000000000000000 +t = 26.6000, H(p,q)-H0 = 0.0000000021881206, L(p,q)-L0 = 0.0000000000000000 +t = 26.7000, H(p,q)-H0 = 0.0000000021887707, L(p,q)-L0 = 0.0000000000000000 +t = 26.8000, H(p,q)-H0 = 0.0000000021892236, L(p,q)-L0 = 0.0000000000000000 +t = 26.9000, H(p,q)-H0 = 0.0000000021895470, L(p,q)-L0 = 0.0000000000000000 +t = 27.0000, H(p,q)-H0 = 0.0000000021897834, L(p,q)-L0 = 0.0000000000000000 +t = 27.1000, H(p,q)-H0 = 0.0000000021899593, L(p,q)-L0 = 0.0000000000000000 +t = 27.2000, H(p,q)-H0 = 0.0000000021900926, L(p,q)-L0 = 0.0000000000000000 +t = 27.3000, H(p,q)-H0 = 0.0000000021901946, L(p,q)-L0 = 0.0000000000000000 +t = 27.4000, H(p,q)-H0 = 0.0000000021902737, L(p,q)-L0 = 0.0000000000000000 +t = 27.5000, H(p,q)-H0 = 0.0000000021903354, L(p,q)-L0 = 0.0000000000000000 +t = 27.6000, H(p,q)-H0 = 0.0000000021903837, L(p,q)-L0 = 0.0000000000000000 +t = 27.7000, H(p,q)-H0 = 0.0000000021904212, L(p,q)-L0 = 0.0000000000000000 +t = 27.8000, H(p,q)-H0 = 0.0000000021904504, L(p,q)-L0 = 0.0000000000000000 +t = 27.9000, H(p,q)-H0 = 0.0000000021904722, L(p,q)-L0 = -0.0000000000000001 +t = 28.0000, H(p,q)-H0 = 0.0000000021904881, L(p,q)-L0 = 0.0000000000000000 +t = 28.1000, H(p,q)-H0 = 0.0000000021904987, L(p,q)-L0 = 0.0000000000000000 +t = 28.2000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000000 +t = 28.3000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = 0.0000000000000000 +t = 28.4000, H(p,q)-H0 = 0.0000000021905020, L(p,q)-L0 = 0.0000000000000000 +t = 28.5000, H(p,q)-H0 = 0.0000000021904937, L(p,q)-L0 = 0.0000000000000000 +t = 28.6000, H(p,q)-H0 = 0.0000000021904805, L(p,q)-L0 = 0.0000000000000000 +t = 28.7000, H(p,q)-H0 = 0.0000000021904614, L(p,q)-L0 = -0.0000000000000001 +t = 28.8000, H(p,q)-H0 = 0.0000000021904360, L(p,q)-L0 = 0.0000000000000000 +t = 28.9000, H(p,q)-H0 = 0.0000000021904026, L(p,q)-L0 = 0.0000000000000000 +t = 29.0000, H(p,q)-H0 = 0.0000000021903596, L(p,q)-L0 = 0.0000000000000000 +t = 29.1000, H(p,q)-H0 = 0.0000000021903047, L(p,q)-L0 = 0.0000000000000000 +t = 29.2000, H(p,q)-H0 = 0.0000000021902343, L(p,q)-L0 = 0.0000000000000000 +t = 29.3000, H(p,q)-H0 = 0.0000000021901440, L(p,q)-L0 = 0.0000000000000000 +t = 29.4000, H(p,q)-H0 = 0.0000000021900266, L(p,q)-L0 = 0.0000000000000001 +t = 29.5000, H(p,q)-H0 = 0.0000000021898724, L(p,q)-L0 = 0.0000000000000000 +t = 29.6000, H(p,q)-H0 = 0.0000000021896673, L(p,q)-L0 = 0.0000000000000001 +t = 29.7000, H(p,q)-H0 = 0.0000000021893888, L(p,q)-L0 = 0.0000000000000000 +t = 29.8000, H(p,q)-H0 = 0.0000000021890036, L(p,q)-L0 = 0.0000000000000000 +t = 29.9000, H(p,q)-H0 = 0.0000000021884576, L(p,q)-L0 = 0.0000000000000000 +t = 30.0000, H(p,q)-H0 = 0.0000000021876621, L(p,q)-L0 = 0.0000000000000000 +t = 30.1000, H(p,q)-H0 = 0.0000000021864660, L(p,q)-L0 = 0.0000000000000000 +t = 30.2000, H(p,q)-H0 = 0.0000000021846024, L(p,q)-L0 = 0.0000000000000000 +t = 30.3000, H(p,q)-H0 = 0.0000000021815775, L(p,q)-L0 = 0.0000000000000000 +t = 30.4000, H(p,q)-H0 = 0.0000000021764345, L(p,q)-L0 = 0.0000000000000000 +t = 30.5000, H(p,q)-H0 = 0.0000000021672188, L(p,q)-L0 = 0.0000000000000000 +t = 30.6000, H(p,q)-H0 = 0.0000000021496971, L(p,q)-L0 = 0.0000000000000000 +t = 30.7000, H(p,q)-H0 = 0.0000000021141355, L(p,q)-L0 = 0.0000000000000000 +t = 30.8000, H(p,q)-H0 = 0.0000000020367816, L(p,q)-L0 = 0.0000000000000001 +t = 30.9000, H(p,q)-H0 = 0.0000000018570192, L(p,q)-L0 = 0.0000000000000000 +t = 31.0000, H(p,q)-H0 = 0.0000000014208066, L(p,q)-L0 = 0.0000000000000000 +t = 31.1000, H(p,q)-H0 = 0.0000000003977536, L(p,q)-L0 = 0.0000000000000000 +t = 31.2000, H(p,q)-H0 = -0.0000000014232189, L(p,q)-L0 = 0.0000000000000000 +t = 31.3000, H(p,q)-H0 = -0.0000000021604580, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 31.3018 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 31.3018, H(p,q)-H0 = 0.0000000023148925, L(p,q)-L0 = 0.0000000008299341 +t = 31.4000, H(p,q)-H0 = -0.0000000000914424, L(p,q)-L0 = 0.0000000000000000 +t = 31.5000, H(p,q)-H0 = -0.0000000015394452, L(p,q)-L0 = 0.0000000000000000 +t = 31.6000, H(p,q)-H0 = -0.0000000019942239, L(p,q)-L0 = 0.0000000000000000 +t = 31.7000, H(p,q)-H0 = -0.0000000001403404, L(p,q)-L0 = 0.0000000000000000 +t = 31.8000, H(p,q)-H0 = 0.0000000011688956, L(p,q)-L0 = 0.0000000000000000 +t = 31.9000, H(p,q)-H0 = 0.0000000017544357, L(p,q)-L0 = 0.0000000000000001 +t = 32.0000, H(p,q)-H0 = 0.0000000019945796, L(p,q)-L0 = 0.0000000000000000 +t = 32.1000, H(p,q)-H0 = 0.0000000020957474, L(p,q)-L0 = 0.0000000000000001 +t = 32.2000, H(p,q)-H0 = 0.0000000021411067, L(p,q)-L0 = 0.0000000000000000 +t = 32.3000, H(p,q)-H0 = 0.0000000021629182, L(p,q)-L0 = 0.0000000000000000 +t = 32.4000, H(p,q)-H0 = 0.0000000021741389, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 32.4464 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 32.4464, H(p,q)-H0 = 0.0000000021723262, L(p,q)-L0 = -0.0000000000065946 +t = 32.5000, H(p,q)-H0 = 0.0000000021802790, L(p,q)-L0 = 0.0000000000000000 +t = 32.6000, H(p,q)-H0 = 0.0000000021838293, L(p,q)-L0 = 0.0000000000000000 +t = 32.7000, H(p,q)-H0 = 0.0000000021859843, L(p,q)-L0 = 0.0000000000000000 +t = 32.8000, H(p,q)-H0 = 0.0000000021873497, L(p,q)-L0 = 0.0000000000000000 +t = 32.9000, H(p,q)-H0 = 0.0000000021882478, L(p,q)-L0 = 0.0000000000000000 +t = 33.0000, H(p,q)-H0 = 0.0000000021888584, L(p,q)-L0 = 0.0000000000000001 +t = 33.1000, H(p,q)-H0 = 0.0000000021892856, L(p,q)-L0 = 0.0000000000000000 +t = 33.2000, H(p,q)-H0 = 0.0000000021895919, L(p,q)-L0 = 0.0000000000000000 +t = 33.3000, H(p,q)-H0 = 0.0000000021898166, L(p,q)-L0 = 0.0000000000000000 +t = 33.4000, H(p,q)-H0 = 0.0000000021899843, L(p,q)-L0 = 0.0000000000000000 +t = 33.5000, H(p,q)-H0 = 0.0000000021901115, L(p,q)-L0 = 0.0000000000000000 +t = 33.6000, H(p,q)-H0 = 0.0000000021902093, L(p,q)-L0 = 0.0000000000000000 +t = 33.7000, H(p,q)-H0 = 0.0000000021902852, L(p,q)-L0 = 0.0000000000000000 +t = 33.8000, H(p,q)-H0 = 0.0000000021903444, L(p,q)-L0 = -0.0000000000000001 +t = 33.9000, H(p,q)-H0 = 0.0000000021903905, L(p,q)-L0 = 0.0000000000000000 +t = 34.0000, H(p,q)-H0 = 0.0000000021904268, L(p,q)-L0 = 0.0000000000000001 +t = 34.1000, H(p,q)-H0 = 0.0000000021904544, L(p,q)-L0 = -0.0000000000000001 +t = 34.2000, H(p,q)-H0 = 0.0000000021904754, L(p,q)-L0 = 0.0000000000000000 +t = 34.3000, H(p,q)-H0 = 0.0000000021904903, L(p,q)-L0 = -0.0000000000000001 +t = 34.4000, H(p,q)-H0 = 0.0000000021905000, L(p,q)-L0 = 0.0000000000000000 +t = 34.5000, H(p,q)-H0 = 0.0000000021905050, L(p,q)-L0 = 0.0000000000000000 +t = 34.6000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = -0.0000000000000001 +t = 34.7000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = 0.0000000000000000 +t = 34.8000, H(p,q)-H0 = 0.0000000021904919, L(p,q)-L0 = -0.0000000000000001 +t = 34.9000, H(p,q)-H0 = 0.0000000021904777, L(p,q)-L0 = 0.0000000000000000 +t = 35.0000, H(p,q)-H0 = 0.0000000021904577, L(p,q)-L0 = 0.0000000000000000 +t = 35.1000, H(p,q)-H0 = 0.0000000021904310, L(p,q)-L0 = 0.0000000000000000 +t = 35.2000, H(p,q)-H0 = 0.0000000021903960, L(p,q)-L0 = -0.0000000000000001 +t = 35.3000, H(p,q)-H0 = 0.0000000021903513, L(p,q)-L0 = 0.0000000000000001 +t = 35.4000, H(p,q)-H0 = 0.0000000021902941, L(p,q)-L0 = 0.0000000000000000 +t = 35.5000, H(p,q)-H0 = 0.0000000021902208, L(p,q)-L0 = 0.0000000000000000 +t = 35.6000, H(p,q)-H0 = 0.0000000021901262, L(p,q)-L0 = 0.0000000000000000 +t = 35.7000, H(p,q)-H0 = 0.0000000021900036, L(p,q)-L0 = 0.0000000000000001 +t = 35.8000, H(p,q)-H0 = 0.0000000021898420, L(p,q)-L0 = 0.0000000000000000 +t = 35.9000, H(p,q)-H0 = 0.0000000021896263, L(p,q)-L0 = 0.0000000000000000 +t = 36.0000, H(p,q)-H0 = 0.0000000021893328, L(p,q)-L0 = 0.0000000000000000 +t = 36.1000, H(p,q)-H0 = 0.0000000021889250, L(p,q)-L0 = 0.0000000000000000 +t = 36.2000, H(p,q)-H0 = 0.0000000021883444, L(p,q)-L0 = 0.0000000000000000 +t = 36.3000, H(p,q)-H0 = 0.0000000021874944, L(p,q)-L0 = 0.0000000000000001 +t = 36.4000, H(p,q)-H0 = 0.0000000021862090, L(p,q)-L0 = -0.0000000000000001 +t = 36.5000, H(p,q)-H0 = 0.0000000021841934, L(p,q)-L0 = -0.0000000000000001 +t = 36.6000, H(p,q)-H0 = 0.0000000021808974, L(p,q)-L0 = 0.0000000000000000 +t = 36.7000, H(p,q)-H0 = 0.0000000021752466, L(p,q)-L0 = 0.0000000000000000 +t = 36.8000, H(p,q)-H0 = 0.0000000021650234, L(p,q)-L0 = 0.0000000000000000 +t = 36.9000, H(p,q)-H0 = 0.0000000021453802, L(p,q)-L0 = 0.0000000000000000 +t = 37.0000, H(p,q)-H0 = 0.0000000021050518, L(p,q)-L0 = 0.0000000000000000 +t = 37.1000, H(p,q)-H0 = 0.0000000020163013, L(p,q)-L0 = 0.0000000000000000 +t = 37.2000, H(p,q)-H0 = 0.0000000018080382, L(p,q)-L0 = -0.0000000000000001 +t = 37.3000, H(p,q)-H0 = 0.0000000013016144, L(p,q)-L0 = 0.0000000000000000 +t = 37.4000, H(p,q)-H0 = 0.0000000001394564, L(p,q)-L0 = 0.0000000000000000 +t = 37.5000, H(p,q)-H0 = -0.0000000017311286, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 37.5849 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 37.5849, H(p,q)-H0 = 0.0000000117099681, L(p,q)-L0 = 0.0000000026505150 +t = 37.6000, H(p,q)-H0 = -0.0000000019064752, L(p,q)-L0 = -0.0000000000000001 +t = 37.7000, H(p,q)-H0 = 0.0000000000003602, L(p,q)-L0 = 0.0000000000000000 +t = 37.8000, H(p,q)-H0 = -0.0000000018991442, L(p,q)-L0 = 0.0000000000000000 +t = 37.9000, H(p,q)-H0 = -0.0000000017294071, L(p,q)-L0 = -0.0000000000000001 +t = 38.0000, H(p,q)-H0 = 0.0000000001444085, L(p,q)-L0 = 0.0000000000000000 +t = 38.1000, H(p,q)-H0 = 0.0000000013063550, L(p,q)-L0 = 0.0000000000000000 +t = 38.2000, H(p,q)-H0 = 0.0000000018110816, L(p,q)-L0 = 0.0000000000000000 +t = 38.3000, H(p,q)-H0 = 0.0000000020180311, L(p,q)-L0 = 0.0000000000000000 +t = 38.4000, H(p,q)-H0 = 0.0000000021060125, L(p,q)-L0 = -0.0000000000000001 +t = 38.5000, H(p,q)-H0 = 0.0000000021459217, L(p,q)-L0 = 0.0000000000000000 +t = 38.6000, H(p,q)-H0 = 0.0000000021653375, L(p,q)-L0 = 0.0000000000000000 +t = 38.7000, H(p,q)-H0 = 0.0000000021754346, L(p,q)-L0 = 0.0000000000000001 +ROOT RETURN: t = 38.7296 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 38.7296, H(p,q)-H0 = 0.0000000021760736, L(p,q)-L0 = -0.0000000000017438 +t = 38.8000, H(p,q)-H0 = 0.0000000021810138, L(p,q)-L0 = 0.0000000000000000 +t = 38.9000, H(p,q)-H0 = 0.0000000021842676, L(p,q)-L0 = 0.0000000000000000 +t = 39.0000, H(p,q)-H0 = 0.0000000021862580, L(p,q)-L0 = 0.0000000000000000 +t = 39.1000, H(p,q)-H0 = 0.0000000021875272, L(p,q)-L0 = 0.0000000000000000 +t = 39.2000, H(p,q)-H0 = 0.0000000021883670, L(p,q)-L0 = 0.0000000000000000 +t = 39.3000, H(p,q)-H0 = 0.0000000021889408, L(p,q)-L0 = 0.0000000000000000 +t = 39.4000, H(p,q)-H0 = 0.0000000021893442, L(p,q)-L0 = 0.0000000000000000 +t = 39.5000, H(p,q)-H0 = 0.0000000021896347, L(p,q)-L0 = 0.0000000000000000 +t = 39.6000, H(p,q)-H0 = 0.0000000021898482, L(p,q)-L0 = 0.0000000000000000 +t = 39.7000, H(p,q)-H0 = 0.0000000021900082, L(p,q)-L0 = 0.0000000000000000 +t = 39.8000, H(p,q)-H0 = 0.0000000021901297, L(p,q)-L0 = 0.0000000000000000 +t = 39.9000, H(p,q)-H0 = 0.0000000021902234, L(p,q)-L0 = 0.0000000000000000 +t = 40.0000, H(p,q)-H0 = 0.0000000021902962, L(p,q)-L0 = 0.0000000000000000 +t = 40.1000, H(p,q)-H0 = 0.0000000021903529, L(p,q)-L0 = -0.0000000000000001 +t = 40.2000, H(p,q)-H0 = 0.0000000021903975, L(p,q)-L0 = -0.0000000000000001 +t = 40.3000, H(p,q)-H0 = 0.0000000021904319, L(p,q)-L0 = 0.0000000000000001 +t = 40.4000, H(p,q)-H0 = 0.0000000021904584, L(p,q)-L0 = 0.0000000000000000 +t = 40.5000, H(p,q)-H0 = 0.0000000021904782, L(p,q)-L0 = 0.0000000000000000 +t = 40.6000, H(p,q)-H0 = 0.0000000021904922, L(p,q)-L0 = 0.0000000000000001 +t = 40.7000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 +t = 40.8000, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = 0.0000000000000000 +t = 40.9000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = -0.0000000000000001 +t = 41.0000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000000 +t = 41.1000, H(p,q)-H0 = 0.0000000021904899, L(p,q)-L0 = 0.0000000000000001 +t = 41.2000, H(p,q)-H0 = 0.0000000021904748, L(p,q)-L0 = -0.0000000000000001 +t = 41.3000, H(p,q)-H0 = 0.0000000021904537, L(p,q)-L0 = -0.0000000000000001 +t = 41.4000, H(p,q)-H0 = 0.0000000021904257, L(p,q)-L0 = 0.0000000000000000 +t = 41.5000, H(p,q)-H0 = 0.0000000021903894, L(p,q)-L0 = 0.0000000000000000 +t = 41.6000, H(p,q)-H0 = 0.0000000021903427, L(p,q)-L0 = 0.0000000000000000 +t = 41.7000, H(p,q)-H0 = 0.0000000021902831, L(p,q)-L0 = 0.0000000000000000 +t = 41.8000, H(p,q)-H0 = 0.0000000021902065, L(p,q)-L0 = 0.0000000000000000 +t = 41.9000, H(p,q)-H0 = 0.0000000021901079, L(p,q)-L0 = 0.0000000000000000 +t = 42.0000, H(p,q)-H0 = 0.0000000021899793, L(p,q)-L0 = 0.0000000000000000 +t = 42.1000, H(p,q)-H0 = 0.0000000021898100, L(p,q)-L0 = 0.0000000000000000 +t = 42.2000, H(p,q)-H0 = 0.0000000021895832, L(p,q)-L0 = 0.0000000000000000 +t = 42.3000, H(p,q)-H0 = 0.0000000021892734, L(p,q)-L0 = 0.0000000000000000 +t = 42.4000, H(p,q)-H0 = 0.0000000021888414, L(p,q)-L0 = 0.0000000000000000 +t = 42.5000, H(p,q)-H0 = 0.0000000021882238, L(p,q)-L0 = 0.0000000000000000 +t = 42.6000, H(p,q)-H0 = 0.0000000021873147, L(p,q)-L0 = 0.0000000000000000 +t = 42.7000, H(p,q)-H0 = 0.0000000021859321, L(p,q)-L0 = -0.0000000000000001 +t = 42.8000, H(p,q)-H0 = 0.0000000021837492, L(p,q)-L0 = -0.0000000000000001 +t = 42.9000, H(p,q)-H0 = 0.0000000021801531, L(p,q)-L0 = 0.0000000000000000 +t = 43.0000, H(p,q)-H0 = 0.0000000021739344, L(p,q)-L0 = 0.0000000000000000 +t = 43.1000, H(p,q)-H0 = 0.0000000021625748, L(p,q)-L0 = 0.0000000000000001 +t = 43.2000, H(p,q)-H0 = 0.0000000021405115, L(p,q)-L0 = 0.0000000000000001 +t = 43.3000, H(p,q)-H0 = 0.0000000020946870, L(p,q)-L0 = 0.0000000000000000 +t = 43.4000, H(p,q)-H0 = 0.0000000019926717, L(p,q)-L0 = 0.0000000000000000 +t = 43.5000, H(p,q)-H0 = 0.0000000017511153, L(p,q)-L0 = 0.0000000000000000 +t = 43.6000, H(p,q)-H0 = 0.0000000011639223, L(p,q)-L0 = 0.0000000000000001 +t = 43.7000, H(p,q)-H0 = -0.0000000001449241, L(p,q)-L0 = -0.0000000000000001 +t = 43.8000, H(p,q)-H0 = -0.0000000019957629, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 43.8681 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 43.8681, H(p,q)-H0 = 0.0000000118359216, L(p,q)-L0 = 0.0000000027373497 +t = 43.9000, H(p,q)-H0 = -0.0000000015482571, L(p,q)-L0 = -0.0000000000000001 +t = 44.0000, H(p,q)-H0 = -0.0000000000875642, L(p,q)-L0 = 0.0000000000000000 +t = 44.1000, H(p,q)-H0 = -0.0000000021549387, L(p,q)-L0 = 0.0000000000000000 +t = 44.2000, H(p,q)-H0 = -0.0000000014210171, L(p,q)-L0 = 0.0000000000000000 +t = 44.3000, H(p,q)-H0 = 0.0000000004029339, L(p,q)-L0 = 0.0000000000000000 +t = 44.4000, H(p,q)-H0 = 0.0000000014252806, L(p,q)-L0 = 0.0000000000000001 +t = 44.5000, H(p,q)-H0 = 0.0000000018597992, L(p,q)-L0 = 0.0000000000000000 +t = 44.6000, H(p,q)-H0 = 0.0000000020383484, L(p,q)-L0 = -0.0000000000000001 +t = 44.7000, H(p,q)-H0 = 0.0000000021150063, L(p,q)-L0 = -0.0000000000000002 +t = 44.8000, H(p,q)-H0 = 0.0000000021501902, L(p,q)-L0 = -0.0000000000000001 +t = 44.9000, H(p,q)-H0 = 0.0000000021675061, L(p,q)-L0 = 0.0000000000000000 +t = 45.0000, H(p,q)-H0 = 0.0000000021766077, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 45.0128 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 45.0128, H(p,q)-H0 = 0.0000000021749912, L(p,q)-L0 = -0.0000000000031586 +t = 45.1000, H(p,q)-H0 = 0.0000000021816851, L(p,q)-L0 = 0.0000000000000000 +t = 45.2000, H(p,q)-H0 = 0.0000000021846714, L(p,q)-L0 = 0.0000000000000000 +t = 45.3000, H(p,q)-H0 = 0.0000000021865115, L(p,q)-L0 = -0.0000000000000001 +t = 45.4000, H(p,q)-H0 = 0.0000000021876930, L(p,q)-L0 = 0.0000000000000000 +t = 45.5000, H(p,q)-H0 = 0.0000000021884788, L(p,q)-L0 = 0.0000000000000000 +t = 45.6000, H(p,q)-H0 = 0.0000000021890186, L(p,q)-L0 = -0.0000000000000001 +t = 45.7000, H(p,q)-H0 = 0.0000000021893997, L(p,q)-L0 = 0.0000000000000000 +t = 45.8000, H(p,q)-H0 = 0.0000000021896751, L(p,q)-L0 = 0.0000000000000000 +t = 45.9000, H(p,q)-H0 = 0.0000000021898783, L(p,q)-L0 = 0.0000000000000000 +t = 46.0000, H(p,q)-H0 = 0.0000000021900309, L(p,q)-L0 = -0.0000000000000001 +t = 46.1000, H(p,q)-H0 = 0.0000000021901472, L(p,q)-L0 = 0.0000000000000000 +t = 46.2000, H(p,q)-H0 = 0.0000000021902369, L(p,q)-L0 = -0.0000000000000001 +t = 46.3000, H(p,q)-H0 = 0.0000000021903067, L(p,q)-L0 = -0.0000000000000001 +t = 46.4000, H(p,q)-H0 = 0.0000000021903611, L(p,q)-L0 = -0.0000000000000001 +t = 46.5000, H(p,q)-H0 = 0.0000000021904037, L(p,q)-L0 = 0.0000000000000000 +t = 46.6000, H(p,q)-H0 = 0.0000000021904369, L(p,q)-L0 = 0.0000000000000000 +t = 46.7000, H(p,q)-H0 = 0.0000000021904621, L(p,q)-L0 = 0.0000000000000000 +t = 46.8000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000000 +t = 46.9000, H(p,q)-H0 = 0.0000000021904941, L(p,q)-L0 = -0.0000000000000001 +t = 47.0000, H(p,q)-H0 = 0.0000000021905021, L(p,q)-L0 = 0.0000000000000000 +t = 47.1000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 +t = 47.2000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = 0.0000000000000000 +t = 47.3000, H(p,q)-H0 = 0.0000000021904983, L(p,q)-L0 = 0.0000000000000000 +t = 47.4000, H(p,q)-H0 = 0.0000000021904877, L(p,q)-L0 = -0.0000000000000001 +t = 47.5000, H(p,q)-H0 = 0.0000000021904717, L(p,q)-L0 = 0.0000000000000000 +t = 47.6000, H(p,q)-H0 = 0.0000000021904494, L(p,q)-L0 = 0.0000000000000000 +t = 47.7000, H(p,q)-H0 = 0.0000000021904202, L(p,q)-L0 = 0.0000000000000000 +t = 47.8000, H(p,q)-H0 = 0.0000000021903822, L(p,q)-L0 = -0.0000000000000001 +t = 47.9000, H(p,q)-H0 = 0.0000000021903336, L(p,q)-L0 = -0.0000000000000001 +t = 48.0000, H(p,q)-H0 = 0.0000000021902714, L(p,q)-L0 = 0.0000000000000000 +t = 48.1000, H(p,q)-H0 = 0.0000000021901916, L(p,q)-L0 = -0.0000000000000001 +t = 48.2000, H(p,q)-H0 = 0.0000000021900884, L(p,q)-L0 = -0.0000000000000001 +t = 48.3000, H(p,q)-H0 = 0.0000000021899541, L(p,q)-L0 = -0.0000000000000001 +t = 48.4000, H(p,q)-H0 = 0.0000000021897765, L(p,q)-L0 = 0.0000000000000000 +t = 48.5000, H(p,q)-H0 = 0.0000000021895376, L(p,q)-L0 = -0.0000000000000001 +t = 48.6000, H(p,q)-H0 = 0.0000000021892106, L(p,q)-L0 = 0.0000000000000000 +t = 48.7000, H(p,q)-H0 = 0.0000000021887528, L(p,q)-L0 = 0.0000000000000000 +t = 48.8000, H(p,q)-H0 = 0.0000000021880950, L(p,q)-L0 = -0.0000000000000001 +t = 48.9000, H(p,q)-H0 = 0.0000000021871218, L(p,q)-L0 = -0.0000000000000001 +t = 49.0000, H(p,q)-H0 = 0.0000000021856331, L(p,q)-L0 = 0.0000000000000000 +t = 49.1000, H(p,q)-H0 = 0.0000000021832664, L(p,q)-L0 = -0.0000000000000001 +t = 49.2000, H(p,q)-H0 = 0.0000000021793375, L(p,q)-L0 = -0.0000000000000001 +t = 49.3000, H(p,q)-H0 = 0.0000000021724830, L(p,q)-L0 = -0.0000000000000002 +t = 49.4000, H(p,q)-H0 = 0.0000000021598386, L(p,q)-L0 = -0.0000000000000001 +t = 49.5000, H(p,q)-H0 = 0.0000000021350104, L(p,q)-L0 = 0.0000000000000000 +t = 49.6000, H(p,q)-H0 = 0.0000000020828375, L(p,q)-L0 = 0.0000000000000000 +t = 49.7000, H(p,q)-H0 = 0.0000000019653625, L(p,q)-L0 = -0.0000000000000002 +t = 49.8000, H(p,q)-H0 = 0.0000000016849391, L(p,q)-L0 = 0.0000000000000000 +t = 49.9000, H(p,q)-H0 = 0.0000000010054564, L(p,q)-L0 = -0.0000000000000001 +t = 50.0000, H(p,q)-H0 = -0.0000000004525242, L(p,q)-L0 = 0.0000000000000000 +t = 50.1000, H(p,q)-H0 = -0.0000000021925064, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 50.1513 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 50.1513, H(p,q)-H0 = 0.0000000010629635, L(p,q)-L0 = 0.0000000005942491 +t = 50.2000, H(p,q)-H0 = -0.0000000011262788, L(p,q)-L0 = 0.0000000000000000 +t = 50.3000, H(p,q)-H0 = -0.0000000003393799, L(p,q)-L0 = 0.0000000000000000 +t = 50.4000, H(p,q)-H0 = -0.0000000022861775, L(p,q)-L0 = 0.0000000000000000 +t = 50.5000, H(p,q)-H0 = -0.0000000010909100, L(p,q)-L0 = 0.0000000000000000 +t = 50.6000, H(p,q)-H0 = 0.0000000006344165, L(p,q)-L0 = 0.0000000000000000 +t = 50.7000, H(p,q)-H0 = 0.0000000015278907, L(p,q)-L0 = 0.0000000000000000 +t = 50.8000, H(p,q)-H0 = 0.0000000019017270, L(p,q)-L0 = -0.0000000000000001 +t = 50.9000, H(p,q)-H0 = 0.0000000020559815, L(p,q)-L0 = 0.0000000000000000 +t = 51.0000, H(p,q)-H0 = 0.0000000021229023, L(p,q)-L0 = 0.0000000000000000 +t = 51.1000, H(p,q)-H0 = 0.0000000021539818, L(p,q)-L0 = 0.0000000000000000 +t = 51.2000, H(p,q)-H0 = 0.0000000021694539, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 51.2960 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 51.2960, H(p,q)-H0 = 0.0000000021724449, L(p,q)-L0 = -0.0000000000064433 +t = 51.3000, H(p,q)-H0 = 0.0000000021776719, L(p,q)-L0 = -0.0000000000000001 +t = 51.4000, H(p,q)-H0 = 0.0000000021822995, L(p,q)-L0 = -0.0000000000000002 +t = 51.5000, H(p,q)-H0 = 0.0000000021850437, L(p,q)-L0 = 0.0000000000000000 +t = 51.6000, H(p,q)-H0 = 0.0000000021867472, L(p,q)-L0 = 0.0000000000000000 +t = 51.7000, H(p,q)-H0 = 0.0000000021878475, L(p,q)-L0 = -0.0000000000000001 +t = 51.8000, H(p,q)-H0 = 0.0000000021885839, L(p,q)-L0 = 0.0000000000000000 +t = 51.9000, H(p,q)-H0 = 0.0000000021890922, L(p,q)-L0 = -0.0000000000000001 +t = 52.0000, H(p,q)-H0 = 0.0000000021894524, L(p,q)-L0 = 0.0000000000000000 +t = 52.1000, H(p,q)-H0 = 0.0000000021897135, L(p,q)-L0 = -0.0000000000000002 +t = 52.2000, H(p,q)-H0 = 0.0000000021899072, L(p,q)-L0 = 0.0000000000000000 +t = 52.3000, H(p,q)-H0 = 0.0000000021900528, L(p,q)-L0 = 0.0000000000000000 +t = 52.4000, H(p,q)-H0 = 0.0000000021901641, L(p,q)-L0 = 0.0000000000000000 +t = 52.5000, H(p,q)-H0 = 0.0000000021902500, L(p,q)-L0 = 0.0000000000000000 +t = 52.6000, H(p,q)-H0 = 0.0000000021903168, L(p,q)-L0 = 0.0000000000000000 +t = 52.7000, H(p,q)-H0 = 0.0000000021903691, L(p,q)-L0 = -0.0000000000000001 +t = 52.8000, H(p,q)-H0 = 0.0000000021904100, L(p,q)-L0 = -0.0000000000000001 +t = 52.9000, H(p,q)-H0 = 0.0000000021904417, L(p,q)-L0 = 0.0000000000000000 +t = 53.0000, H(p,q)-H0 = 0.0000000021904659, L(p,q)-L0 = 0.0000000000000000 +t = 53.1000, H(p,q)-H0 = 0.0000000021904835, L(p,q)-L0 = -0.0000000000000001 +t = 53.2000, H(p,q)-H0 = 0.0000000021904958, L(p,q)-L0 = 0.0000000000000000 +t = 53.3000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = -0.0000000000000001 +t = 53.4000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000000 +t = 53.5000, H(p,q)-H0 = 0.0000000021905037, L(p,q)-L0 = -0.0000000000000001 +t = 53.6000, H(p,q)-H0 = 0.0000000021904970, L(p,q)-L0 = -0.0000000000000001 +t = 53.7000, H(p,q)-H0 = 0.0000000021904855, L(p,q)-L0 = -0.0000000000000001 +t = 53.8000, H(p,q)-H0 = 0.0000000021904685, L(p,q)-L0 = 0.0000000000000000 +t = 53.9000, H(p,q)-H0 = 0.0000000021904452, L(p,q)-L0 = -0.0000000000000001 +t = 54.0000, H(p,q)-H0 = 0.0000000021904146, L(p,q)-L0 = 0.0000000000000000 +t = 54.1000, H(p,q)-H0 = 0.0000000021903750, L(p,q)-L0 = 0.0000000000000000 +t = 54.2000, H(p,q)-H0 = 0.0000000021903242, L(p,q)-L0 = 0.0000000000000000 +t = 54.3000, H(p,q)-H0 = 0.0000000021902593, L(p,q)-L0 = -0.0000000000000001 +t = 54.4000, H(p,q)-H0 = 0.0000000021901762, L(p,q)-L0 = 0.0000000000000000 +t = 54.5000, H(p,q)-H0 = 0.0000000021900683, L(p,q)-L0 = 0.0000000000000000 +t = 54.6000, H(p,q)-H0 = 0.0000000021899276, L(p,q)-L0 = 0.0000000000000000 +t = 54.7000, H(p,q)-H0 = 0.0000000021897411, L(p,q)-L0 = 0.0000000000000000 +t = 54.8000, H(p,q)-H0 = 0.0000000021894898, L(p,q)-L0 = 0.0000000000000000 +t = 54.9000, H(p,q)-H0 = 0.0000000021891442, L(p,q)-L0 = 0.0000000000000000 +t = 55.0000, H(p,q)-H0 = 0.0000000021886586, L(p,q)-L0 = 0.0000000000000000 +t = 55.1000, H(p,q)-H0 = 0.0000000021879576, L(p,q)-L0 = -0.0000000000000002 +t = 55.2000, H(p,q)-H0 = 0.0000000021869148, L(p,q)-L0 = 0.0000000000000000 +t = 55.3000, H(p,q)-H0 = 0.0000000021853099, L(p,q)-L0 = -0.0000000000000001 +t = 55.4000, H(p,q)-H0 = 0.0000000021827410, L(p,q)-L0 = 0.0000000000000000 +t = 55.5000, H(p,q)-H0 = 0.0000000021784423, L(p,q)-L0 = 0.0000000000000000 +t = 55.6000, H(p,q)-H0 = 0.0000000021708756, L(p,q)-L0 = -0.0000000000000001 +t = 55.7000, H(p,q)-H0 = 0.0000000021567756, L(p,q)-L0 = -0.0000000000000002 +t = 55.8000, H(p,q)-H0 = 0.0000000021287816, L(p,q)-L0 = -0.0000000000000001 +t = 55.9000, H(p,q)-H0 = 0.0000000020692632, L(p,q)-L0 = 0.0000000000000000 +t = 56.0000, H(p,q)-H0 = 0.0000000019337543, L(p,q)-L0 = 0.0000000000000000 +t = 56.1000, H(p,q)-H0 = 0.0000000016080137, L(p,q)-L0 = -0.0000000000000001 +t = 56.2000, H(p,q)-H0 = 0.0000000008240018, L(p,q)-L0 = 0.0000000000000000 +t = 56.3000, H(p,q)-H0 = -0.0000000007777228, L(p,q)-L0 = 0.0000000000000000 +t = 56.4000, H(p,q)-H0 = -0.0000000022964359, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 56.4345 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 56.4345, H(p,q)-H0 = 0.0000000105653191, L(p,q)-L0 = 0.0000000024229621 +t = 56.5000, H(p,q)-H0 = -0.0000000006980467, L(p,q)-L0 = -0.0000000000000001 +t = 56.6000, H(p,q)-H0 = -0.0000000007108081, L(p,q)-L0 = 0.0000000000000000 +t = 56.7000, H(p,q)-H0 = -0.0000000022911197, L(p,q)-L0 = 0.0000000000000000 +t = 56.8000, H(p,q)-H0 = -0.0000000007567420, L(p,q)-L0 = -0.0000000000000001 +t = 56.9000, H(p,q)-H0 = 0.0000000008394496, L(p,q)-L0 = -0.0000000000000001 +t = 57.0000, H(p,q)-H0 = 0.0000000016162618, L(p,q)-L0 = 0.0000000000000000 +t = 57.1000, H(p,q)-H0 = 0.0000000019378465, L(p,q)-L0 = 0.0000000000000000 +t = 57.2000, H(p,q)-H0 = 0.0000000020713128, L(p,q)-L0 = 0.0000000000000000 +t = 57.3000, H(p,q)-H0 = 0.0000000021298476, L(p,q)-L0 = 0.0000000000000000 +t = 57.4000, H(p,q)-H0 = 0.0000000021573562, L(p,q)-L0 = -0.0000000000000001 +t = 57.5000, H(p,q)-H0 = 0.0000000021712063, L(p,q)-L0 = 0.0000000000000001 +ROOT RETURN: t = 57.5792 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 57.5792, H(p,q)-H0 = 0.0000000021748710, L(p,q)-L0 = -0.0000000000032959 +t = 57.6000, H(p,q)-H0 = 0.0000000021786388, L(p,q)-L0 = 0.0000000000000000 +t = 57.7000, H(p,q)-H0 = 0.0000000021828624, L(p,q)-L0 = 0.0000000000000000 +t = 57.8000, H(p,q)-H0 = 0.0000000021853875, L(p,q)-L0 = 0.0000000000000000 +t = 57.9000, H(p,q)-H0 = 0.0000000021869661, L(p,q)-L0 = -0.0000000000000001 +t = 58.0000, H(p,q)-H0 = 0.0000000021879923, L(p,q)-L0 = -0.0000000000000001 +t = 58.1000, H(p,q)-H0 = 0.0000000021886828, L(p,q)-L0 = -0.0000000000000001 +t = 58.2000, H(p,q)-H0 = 0.0000000021891614, L(p,q)-L0 = 0.0000000000000000 +t = 58.3000, H(p,q)-H0 = 0.0000000021895021, L(p,q)-L0 = 0.0000000000000000 +t = 58.4000, H(p,q)-H0 = 0.0000000021897503, L(p,q)-L0 = 0.0000000000000000 +t = 58.5000, H(p,q)-H0 = 0.0000000021899346, L(p,q)-L0 = 0.0000000000000000 +t = 58.6000, H(p,q)-H0 = 0.0000000021900737, L(p,q)-L0 = 0.0000000000000000 +t = 58.7000, H(p,q)-H0 = 0.0000000021901799, L(p,q)-L0 = 0.0000000000000000 +t = 58.8000, H(p,q)-H0 = 0.0000000021902624, L(p,q)-L0 = -0.0000000000000001 +t = 58.9000, H(p,q)-H0 = 0.0000000021903266, L(p,q)-L0 = 0.0000000000000000 +t = 59.0000, H(p,q)-H0 = 0.0000000021903768, L(p,q)-L0 = 0.0000000000000000 +t = 59.1000, H(p,q)-H0 = 0.0000000021904160, L(p,q)-L0 = 0.0000000000000000 +t = 59.2000, H(p,q)-H0 = 0.0000000021904463, L(p,q)-L0 = 0.0000000000000000 +t = 59.3000, H(p,q)-H0 = 0.0000000021904691, L(p,q)-L0 = -0.0000000000000001 +t = 59.4000, H(p,q)-H0 = 0.0000000021904860, L(p,q)-L0 = -0.0000000000000001 +t = 59.5000, H(p,q)-H0 = 0.0000000021904973, L(p,q)-L0 = -0.0000000000000001 +t = 59.6000, H(p,q)-H0 = 0.0000000021905039, L(p,q)-L0 = 0.0000000000000000 +t = 59.7000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = -0.0000000000000001 +t = 59.8000, H(p,q)-H0 = 0.0000000021905028, L(p,q)-L0 = -0.0000000000000001 +t = 59.9000, H(p,q)-H0 = 0.0000000021904953, L(p,q)-L0 = -0.0000000000000001 +t = 60.0000, H(p,q)-H0 = 0.0000000021904830, L(p,q)-L0 = 0.0000000000000001 +t = 60.1000, H(p,q)-H0 = 0.0000000021904649, L(p,q)-L0 = 0.0000000000000000 +t = 60.2000, H(p,q)-H0 = 0.0000000021904406, L(p,q)-L0 = 0.0000000000000000 +t = 60.3000, H(p,q)-H0 = 0.0000000021904085, L(p,q)-L0 = 0.0000000000000000 +t = 60.4000, H(p,q)-H0 = 0.0000000021903672, L(p,q)-L0 = 0.0000000000000000 +t = 60.5000, H(p,q)-H0 = 0.0000000021903144, L(p,q)-L0 = 0.0000000000000000 +t = 60.6000, H(p,q)-H0 = 0.0000000021902469, L(p,q)-L0 = 0.0000000000000000 +t = 60.7000, H(p,q)-H0 = 0.0000000021901599, L(p,q)-L0 = 0.0000000000000000 +t = 60.8000, H(p,q)-H0 = 0.0000000021900474, L(p,q)-L0 = -0.0000000000000001 +t = 60.9000, H(p,q)-H0 = 0.0000000021899000, L(p,q)-L0 = 0.0000000000000000 +t = 61.0000, H(p,q)-H0 = 0.0000000021897042, L(p,q)-L0 = 0.0000000000000000 +t = 61.1000, H(p,q)-H0 = 0.0000000021894392, L(p,q)-L0 = -0.0000000000000001 +t = 61.2000, H(p,q)-H0 = 0.0000000021890743, L(p,q)-L0 = 0.0000000000000000 +t = 61.3000, H(p,q)-H0 = 0.0000000021885584, L(p,q)-L0 = 0.0000000000000000 +t = 61.4000, H(p,q)-H0 = 0.0000000021878106, L(p,q)-L0 = 0.0000000000000000 +t = 61.5000, H(p,q)-H0 = 0.0000000021866923, L(p,q)-L0 = 0.0000000000000000 +t = 61.6000, H(p,q)-H0 = 0.0000000021849602, L(p,q)-L0 = 0.0000000000000000 +t = 61.7000, H(p,q)-H0 = 0.0000000021821681, L(p,q)-L0 = 0.0000000000000000 +t = 61.8000, H(p,q)-H0 = 0.0000000021774582, L(p,q)-L0 = 0.0000000000000000 +t = 61.9000, H(p,q)-H0 = 0.0000000021690918, L(p,q)-L0 = 0.0000000000000000 +t = 62.0000, H(p,q)-H0 = 0.0000000021533414, L(p,q)-L0 = 0.0000000000000001 +t = 62.1000, H(p,q)-H0 = 0.0000000021217160, L(p,q)-L0 = 0.0000000000000000 +t = 62.2000, H(p,q)-H0 = 0.0000000020536846, L(p,q)-L0 = 0.0000000000000000 +t = 62.3000, H(p,q)-H0 = 0.0000000018971202, L(p,q)-L0 = -0.0000000000000001 +t = 62.4000, H(p,q)-H0 = 0.0000000015186441, L(p,q)-L0 = 0.0000000000000000 +t = 62.5000, H(p,q)-H0 = 0.0000000006175898, L(p,q)-L0 = 0.0000000000000000 +t = 62.6000, H(p,q)-H0 = -0.0000000011113788, L(p,q)-L0 = 0.0000000000000000 +t = 62.7000, H(p,q)-H0 = -0.0000000022863598, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 62.7177 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 62.7177, H(p,q)-H0 = 0.0000000131519695, L(p,q)-L0 = 0.0000000029860125 +t = 62.8000, H(p,q)-H0 = -0.0000000003294947, L(p,q)-L0 = -0.0000000000000001 +t = 62.9000, H(p,q)-H0 = -0.0000000011398216, L(p,q)-L0 = 0.0000000000000000 +t = 63.0000, H(p,q)-H0 = -0.0000000021824618, L(p,q)-L0 = 0.0000000000000000 +t = 63.1000, H(p,q)-H0 = -0.0000000004316694, L(p,q)-L0 = 0.0000000000000000 +t = 63.2000, H(p,q)-H0 = 0.0000000010195265, L(p,q)-L0 = -0.0000000000000001 +t = 63.3000, H(p,q)-H0 = 0.0000000016922828, L(p,q)-L0 = 0.0000000000000000 +t = 63.4000, H(p,q)-H0 = 0.0000000019689991, L(p,q)-L0 = 0.0000000000000000 +t = 63.5000, H(p,q)-H0 = 0.0000000020846681, L(p,q)-L0 = -0.0000000000000001 +t = 63.6000, H(p,q)-H0 = 0.0000000021359695, L(p,q)-L0 = 0.0000000000000000 +t = 63.7000, H(p,q)-H0 = 0.0000000021603651, L(p,q)-L0 = -0.0000000000000001 +t = 63.8000, H(p,q)-H0 = 0.0000000021727854, L(p,q)-L0 = 0.0000000000000001 +ROOT RETURN: t = 63.8623 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 63.8623, H(p,q)-H0 = 0.0000000021754245, L(p,q)-L0 = -0.0000000000025983 +t = 63.9000, H(p,q)-H0 = 0.0000000021795182, L(p,q)-L0 = 0.0000000000000000 +t = 64.0000, H(p,q)-H0 = 0.0000000021833789, L(p,q)-L0 = 0.0000000000000000 +t = 64.1000, H(p,q)-H0 = 0.0000000021857053, L(p,q)-L0 = 0.0000000000000000 +t = 64.2000, H(p,q)-H0 = 0.0000000021871699, L(p,q)-L0 = 0.0000000000000000 +t = 64.3000, H(p,q)-H0 = 0.0000000021881276, L(p,q)-L0 = 0.0000000000000000 +t = 64.4000, H(p,q)-H0 = 0.0000000021887756, L(p,q)-L0 = 0.0000000000000000 +t = 64.5000, H(p,q)-H0 = 0.0000000021892269, L(p,q)-L0 = 0.0000000000000000 +t = 64.6000, H(p,q)-H0 = 0.0000000021895494, L(p,q)-L0 = 0.0000000000000000 +t = 64.7000, H(p,q)-H0 = 0.0000000021897852, L(p,q)-L0 = 0.0000000000000000 +t = 64.8000, H(p,q)-H0 = 0.0000000021899607, L(p,q)-L0 = 0.0000000000000000 +t = 64.9000, H(p,q)-H0 = 0.0000000021900936, L(p,q)-L0 = 0.0000000000000000 +t = 65.0000, H(p,q)-H0 = 0.0000000021901955, L(p,q)-L0 = 0.0000000000000000 +t = 65.1000, H(p,q)-H0 = 0.0000000021902744, L(p,q)-L0 = -0.0000000000000001 +t = 65.2000, H(p,q)-H0 = 0.0000000021903360, L(p,q)-L0 = 0.0000000000000000 +t = 65.3000, H(p,q)-H0 = 0.0000000021903842, L(p,q)-L0 = 0.0000000000000001 +t = 65.4000, H(p,q)-H0 = 0.0000000021904217, L(p,q)-L0 = 0.0000000000000000 +t = 65.5000, H(p,q)-H0 = 0.0000000021904507, L(p,q)-L0 = 0.0000000000000000 +t = 65.6000, H(p,q)-H0 = 0.0000000021904725, L(p,q)-L0 = 0.0000000000000000 +t = 65.7000, H(p,q)-H0 = 0.0000000021904882, L(p,q)-L0 = 0.0000000000000000 +t = 65.8000, H(p,q)-H0 = 0.0000000021904988, L(p,q)-L0 = 0.0000000000000000 +t = 65.9000, H(p,q)-H0 = 0.0000000021905046, L(p,q)-L0 = 0.0000000000000000 +t = 66.0000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000001 +t = 66.1000, H(p,q)-H0 = 0.0000000021905019, L(p,q)-L0 = 0.0000000000000000 +t = 66.2000, H(p,q)-H0 = 0.0000000021904938, L(p,q)-L0 = 0.0000000000000000 +t = 66.3000, H(p,q)-H0 = 0.0000000021904804, L(p,q)-L0 = -0.0000000000000001 +t = 66.4000, H(p,q)-H0 = 0.0000000021904614, L(p,q)-L0 = 0.0000000000000000 +t = 66.5000, H(p,q)-H0 = 0.0000000021904359, L(p,q)-L0 = 0.0000000000000001 +t = 66.6000, H(p,q)-H0 = 0.0000000021904024, L(p,q)-L0 = 0.0000000000000001 +t = 66.7000, H(p,q)-H0 = 0.0000000021903593, L(p,q)-L0 = 0.0000000000000000 +t = 66.8000, H(p,q)-H0 = 0.0000000021903044, L(p,q)-L0 = 0.0000000000000000 +t = 66.9000, H(p,q)-H0 = 0.0000000021902337, L(p,q)-L0 = 0.0000000000000000 +t = 67.0000, H(p,q)-H0 = 0.0000000021901431, L(p,q)-L0 = 0.0000000000000000 +t = 67.1000, H(p,q)-H0 = 0.0000000021900254, L(p,q)-L0 = 0.0000000000000001 +t = 67.2000, H(p,q)-H0 = 0.0000000021898710, L(p,q)-L0 = 0.0000000000000001 +t = 67.3000, H(p,q)-H0 = 0.0000000021896651, L(p,q)-L0 = 0.0000000000000000 +t = 67.4000, H(p,q)-H0 = 0.0000000021893860, L(p,q)-L0 = 0.0000000000000000 +t = 67.5000, H(p,q)-H0 = 0.0000000021889997, L(p,q)-L0 = 0.0000000000000000 +t = 67.6000, H(p,q)-H0 = 0.0000000021884519, L(p,q)-L0 = 0.0000000000000000 +t = 67.7000, H(p,q)-H0 = 0.0000000021876536, L(p,q)-L0 = 0.0000000000000000 +t = 67.8000, H(p,q)-H0 = 0.0000000021864530, L(p,q)-L0 = 0.0000000000000000 +t = 67.9000, H(p,q)-H0 = 0.0000000021845817, L(p,q)-L0 = 0.0000000000000000 +t = 68.0000, H(p,q)-H0 = 0.0000000021815430, L(p,q)-L0 = 0.0000000000000000 +t = 68.1000, H(p,q)-H0 = 0.0000000021763750, L(p,q)-L0 = 0.0000000000000000 +t = 68.2000, H(p,q)-H0 = 0.0000000021671088, L(p,q)-L0 = 0.0000000000000001 +t = 68.3000, H(p,q)-H0 = 0.0000000021494820, L(p,q)-L0 = 0.0000000000000001 +t = 68.4000, H(p,q)-H0 = 0.0000000021136849, L(p,q)-L0 = 0.0000000000000000 +t = 68.5000, H(p,q)-H0 = 0.0000000020357712, L(p,q)-L0 = 0.0000000000000000 +t = 68.6000, H(p,q)-H0 = 0.0000000018546125, L(p,q)-L0 = 0.0000000000000001 +t = 68.7000, H(p,q)-H0 = 0.0000000014149386, L(p,q)-L0 = 0.0000000000000000 +t = 68.8000, H(p,q)-H0 = 0.0000000003847866, L(p,q)-L0 = 0.0000000000000001 +t = 68.9000, H(p,q)-H0 = -0.0000000014401922, L(p,q)-L0 = 0.0000000000000000 +t = 69.0000, H(p,q)-H0 = -0.0000000021500666, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 69.0009 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 69.0009, H(p,q)-H0 = -0.0000000001126423, L(p,q)-L0 = 0.0000000003745416 +t = 69.1000, H(p,q)-H0 = -0.0000000000822340, L(p,q)-L0 = 0.0000000000000000 +t = 69.2000, H(p,q)-H0 = -0.0000000015604567, L(p,q)-L0 = 0.0000000000000000 +t = 69.3000, H(p,q)-H0 = -0.0000000019817241, L(p,q)-L0 = 0.0000000000000000 +t = 69.4000, H(p,q)-H0 = -0.0000000001246836, L(p,q)-L0 = 0.0000000000000000 +t = 69.5000, H(p,q)-H0 = 0.0000000011766554, L(p,q)-L0 = 0.0000000000000000 +t = 69.6000, H(p,q)-H0 = 0.0000000017576454, L(p,q)-L0 = -0.0000000000000001 +t = 69.7000, H(p,q)-H0 = 0.0000000019959046, L(p,q)-L0 = -0.0000000000000001 +t = 69.8000, H(p,q)-H0 = 0.0000000020963244, L(p,q)-L0 = 0.0000000000000001 +t = 69.9000, H(p,q)-H0 = 0.0000000021413759, L(p,q)-L0 = -0.0000000000000001 +t = 70.0000, H(p,q)-H0 = 0.0000000021630525, L(p,q)-L0 = -0.0000000000000001 +t = 70.1000, H(p,q)-H0 = 0.0000000021742105, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 70.1455 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 70.1455, H(p,q)-H0 = 0.0000000021726537, L(p,q)-L0 = -0.0000000000061761 +t = 70.2000, H(p,q)-H0 = 0.0000000021803195, L(p,q)-L0 = -0.0000000000000001 +t = 70.3000, H(p,q)-H0 = 0.0000000021838533, L(p,q)-L0 = 0.0000000000000000 +t = 70.4000, H(p,q)-H0 = 0.0000000021859993, L(p,q)-L0 = 0.0000000000000000 +t = 70.5000, H(p,q)-H0 = 0.0000000021873592, L(p,q)-L0 = -0.0000000000000001 +t = 70.6000, H(p,q)-H0 = 0.0000000021882544, L(p,q)-L0 = 0.0000000000000000 +t = 70.7000, H(p,q)-H0 = 0.0000000021888629, L(p,q)-L0 = 0.0000000000000000 +t = 70.8000, H(p,q)-H0 = 0.0000000021892886, L(p,q)-L0 = 0.0000000000000000 +t = 70.9000, H(p,q)-H0 = 0.0000000021895942, L(p,q)-L0 = -0.0000000000000001 +t = 71.0000, H(p,q)-H0 = 0.0000000021898182, L(p,q)-L0 = 0.0000000000000000 +t = 71.1000, H(p,q)-H0 = 0.0000000021899855, L(p,q)-L0 = 0.0000000000000000 +t = 71.2000, H(p,q)-H0 = 0.0000000021901125, L(p,q)-L0 = -0.0000000000000001 +t = 71.3000, H(p,q)-H0 = 0.0000000021902100, L(p,q)-L0 = 0.0000000000000000 +t = 71.4000, H(p,q)-H0 = 0.0000000021902858, L(p,q)-L0 = 0.0000000000000000 +t = 71.5000, H(p,q)-H0 = 0.0000000021903448, L(p,q)-L0 = 0.0000000000000000 +t = 71.6000, H(p,q)-H0 = 0.0000000021903911, L(p,q)-L0 = 0.0000000000000000 +t = 71.7000, H(p,q)-H0 = 0.0000000021904270, L(p,q)-L0 = 0.0000000000000000 +t = 71.8000, H(p,q)-H0 = 0.0000000021904547, L(p,q)-L0 = 0.0000000000000000 +t = 71.9000, H(p,q)-H0 = 0.0000000021904755, L(p,q)-L0 = 0.0000000000000000 +t = 72.0000, H(p,q)-H0 = 0.0000000021904903, L(p,q)-L0 = -0.0000000000000001 +t = 72.1000, H(p,q)-H0 = 0.0000000021905000, L(p,q)-L0 = -0.0000000000000001 +t = 72.2000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = -0.0000000000000001 +t = 72.3000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = 0.0000000000000000 +t = 72.4000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = -0.0000000000000001 +t = 72.5000, H(p,q)-H0 = 0.0000000021904918, L(p,q)-L0 = 0.0000000000000000 +t = 72.6000, H(p,q)-H0 = 0.0000000021904775, L(p,q)-L0 = 0.0000000000000000 +t = 72.7000, H(p,q)-H0 = 0.0000000021904575, L(p,q)-L0 = 0.0000000000000000 +t = 72.8000, H(p,q)-H0 = 0.0000000021904306, L(p,q)-L0 = 0.0000000000000000 +t = 72.9000, H(p,q)-H0 = 0.0000000021903958, L(p,q)-L0 = 0.0000000000000000 +t = 73.0000, H(p,q)-H0 = 0.0000000021903509, L(p,q)-L0 = 0.0000000000000000 +t = 73.1000, H(p,q)-H0 = 0.0000000021902936, L(p,q)-L0 = 0.0000000000000000 +t = 73.2000, H(p,q)-H0 = 0.0000000021902199, L(p,q)-L0 = -0.0000000000000001 +t = 73.3000, H(p,q)-H0 = 0.0000000021901253, L(p,q)-L0 = 0.0000000000000000 +t = 73.4000, H(p,q)-H0 = 0.0000000021900022, L(p,q)-L0 = 0.0000000000000000 +t = 73.5000, H(p,q)-H0 = 0.0000000021898404, L(p,q)-L0 = 0.0000000000000000 +t = 73.6000, H(p,q)-H0 = 0.0000000021896238, L(p,q)-L0 = -0.0000000000000001 +t = 73.7000, H(p,q)-H0 = 0.0000000021893297, L(p,q)-L0 = 0.0000000000000000 +t = 73.8000, H(p,q)-H0 = 0.0000000021889207, L(p,q)-L0 = 0.0000000000000000 +t = 73.9000, H(p,q)-H0 = 0.0000000021883382, L(p,q)-L0 = 0.0000000000000000 +t = 74.0000, H(p,q)-H0 = 0.0000000021874852, L(p,q)-L0 = 0.0000000000000000 +t = 74.1000, H(p,q)-H0 = 0.0000000021861951, L(p,q)-L0 = 0.0000000000000000 +t = 74.2000, H(p,q)-H0 = 0.0000000021841708, L(p,q)-L0 = 0.0000000000000000 +t = 74.3000, H(p,q)-H0 = 0.0000000021808598, L(p,q)-L0 = 0.0000000000000000 +t = 74.4000, H(p,q)-H0 = 0.0000000021751803, L(p,q)-L0 = 0.0000000000000000 +t = 74.5000, H(p,q)-H0 = 0.0000000021649006, L(p,q)-L0 = -0.0000000000000001 +t = 74.6000, H(p,q)-H0 = 0.0000000021451375, L(p,q)-L0 = 0.0000000000000000 +t = 74.7000, H(p,q)-H0 = 0.0000000021045381, L(p,q)-L0 = -0.0000000000000002 +t = 74.8000, H(p,q)-H0 = 0.0000000020151367, L(p,q)-L0 = 0.0000000000000000 +t = 74.9000, H(p,q)-H0 = 0.0000000018052415, L(p,q)-L0 = 0.0000000000000000 +t = 75.0000, H(p,q)-H0 = 0.0000000012948249, L(p,q)-L0 = 0.0000000000000000 +t = 75.1000, H(p,q)-H0 = 0.0000000001250755, L(p,q)-L0 = 0.0000000000000000 +t = 75.2000, H(p,q)-H0 = -0.0000000017463930, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 75.2840 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 75.2840, H(p,q)-H0 = 0.0000000093074046, L(p,q)-L0 = 0.0000000021752810 +t = 75.3000, H(p,q)-H0 = -0.0000000018898954, L(p,q)-L0 = 0.0000000000000000 +t = 75.4000, H(p,q)-H0 = 0.0000000000002118, L(p,q)-L0 = 0.0000000000000000 +t = 75.5000, H(p,q)-H0 = -0.0000000019155202, L(p,q)-L0 = -0.0000000000000001 +t = 75.6000, H(p,q)-H0 = -0.0000000017140038, L(p,q)-L0 = 0.0000000000000000 +t = 75.7000, H(p,q)-H0 = 0.0000000001587313, L(p,q)-L0 = -0.0000000000000001 +t = 75.8000, H(p,q)-H0 = 0.0000000013130790, L(p,q)-L0 = -0.0000000000000001 +t = 75.9000, H(p,q)-H0 = 0.0000000018138416, L(p,q)-L0 = 0.0000000000000000 +t = 76.0000, H(p,q)-H0 = 0.0000000020191782, L(p,q)-L0 = -0.0000000000000001 +t = 76.1000, H(p,q)-H0 = 0.0000000021065175, L(p,q)-L0 = -0.0000000000000001 +t = 76.2000, H(p,q)-H0 = 0.0000000021461600, L(p,q)-L0 = 0.0000000000000000 +t = 76.3000, H(p,q)-H0 = 0.0000000021654578, L(p,q)-L0 = -0.0000000000000001 +t = 76.4000, H(p,q)-H0 = 0.0000000021754993, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 76.4287 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 76.4287, H(p,q)-H0 = 0.0000000021739400, L(p,q)-L0 = -0.0000000000044986 +t = 76.5000, H(p,q)-H0 = 0.0000000021810508, L(p,q)-L0 = 0.0000000000000000 +t = 76.6000, H(p,q)-H0 = 0.0000000021842897, L(p,q)-L0 = 0.0000000000000000 +t = 76.7000, H(p,q)-H0 = 0.0000000021862717, L(p,q)-L0 = -0.0000000000000001 +t = 76.8000, H(p,q)-H0 = 0.0000000021875363, L(p,q)-L0 = 0.0000000000000000 +t = 76.9000, H(p,q)-H0 = 0.0000000021883731, L(p,q)-L0 = -0.0000000000000001 +t = 77.0000, H(p,q)-H0 = 0.0000000021889451, L(p,q)-L0 = -0.0000000000000001 +t = 77.1000, H(p,q)-H0 = 0.0000000021893470, L(p,q)-L0 = 0.0000000000000000 +t = 77.2000, H(p,q)-H0 = 0.0000000021896367, L(p,q)-L0 = 0.0000000000000000 +t = 77.3000, H(p,q)-H0 = 0.0000000021898499, L(p,q)-L0 = 0.0000000000000000 +t = 77.4000, H(p,q)-H0 = 0.0000000021900093, L(p,q)-L0 = -0.0000000000000001 +t = 77.5000, H(p,q)-H0 = 0.0000000021901307, L(p,q)-L0 = 0.0000000000000000 +t = 77.6000, H(p,q)-H0 = 0.0000000021902241, L(p,q)-L0 = 0.0000000000000000 +t = 77.7000, H(p,q)-H0 = 0.0000000021902967, L(p,q)-L0 = -0.0000000000000001 +t = 77.8000, H(p,q)-H0 = 0.0000000021903532, L(p,q)-L0 = 0.0000000000000000 +t = 77.9000, H(p,q)-H0 = 0.0000000021903976, L(p,q)-L0 = -0.0000000000000001 +t = 78.0000, H(p,q)-H0 = 0.0000000021904321, L(p,q)-L0 = -0.0000000000000001 +t = 78.1000, H(p,q)-H0 = 0.0000000021904585, L(p,q)-L0 = 0.0000000000000000 +t = 78.2000, H(p,q)-H0 = 0.0000000021904784, L(p,q)-L0 = -0.0000000000000001 +t = 78.3000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = -0.0000000000000001 +t = 78.4000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 +t = 78.5000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = -0.0000000000000001 +t = 78.6000, H(p,q)-H0 = 0.0000000021905047, L(p,q)-L0 = -0.0000000000000001 +t = 78.7000, H(p,q)-H0 = 0.0000000021904996, L(p,q)-L0 = -0.0000000000000001 +t = 78.8000, H(p,q)-H0 = 0.0000000021904897, L(p,q)-L0 = -0.0000000000000001 +t = 78.9000, H(p,q)-H0 = 0.0000000021904745, L(p,q)-L0 = 0.0000000000000000 +t = 79.0000, H(p,q)-H0 = 0.0000000021904533, L(p,q)-L0 = -0.0000000000000001 +t = 79.1000, H(p,q)-H0 = 0.0000000021904253, L(p,q)-L0 = -0.0000000000000001 +t = 79.2000, H(p,q)-H0 = 0.0000000021903890, L(p,q)-L0 = -0.0000000000000001 +t = 79.3000, H(p,q)-H0 = 0.0000000021903421, L(p,q)-L0 = -0.0000000000000001 +t = 79.4000, H(p,q)-H0 = 0.0000000021902823, L(p,q)-L0 = -0.0000000000000001 +t = 79.5000, H(p,q)-H0 = 0.0000000021902056, L(p,q)-L0 = 0.0000000000000000 +t = 79.6000, H(p,q)-H0 = 0.0000000021901067, L(p,q)-L0 = -0.0000000000000002 +t = 79.7000, H(p,q)-H0 = 0.0000000021899780, L(p,q)-L0 = -0.0000000000000002 +t = 79.8000, H(p,q)-H0 = 0.0000000021898082, L(p,q)-L0 = -0.0000000000000001 +t = 79.9000, H(p,q)-H0 = 0.0000000021895807, L(p,q)-L0 = 0.0000000000000000 +t = 80.0000, H(p,q)-H0 = 0.0000000021892700, L(p,q)-L0 = -0.0000000000000001 +t = 80.1000, H(p,q)-H0 = 0.0000000021888369, L(p,q)-L0 = 0.0000000000000000 +t = 80.2000, H(p,q)-H0 = 0.0000000021882171, L(p,q)-L0 = -0.0000000000000001 +t = 80.3000, H(p,q)-H0 = 0.0000000021873048, L(p,q)-L0 = -0.0000000000000001 +t = 80.4000, H(p,q)-H0 = 0.0000000021859168, L(p,q)-L0 = 0.0000000000000000 +t = 80.5000, H(p,q)-H0 = 0.0000000021837248, L(p,q)-L0 = 0.0000000000000000 +t = 80.6000, H(p,q)-H0 = 0.0000000021801118, L(p,q)-L0 = -0.0000000000000001 +t = 80.7000, H(p,q)-H0 = 0.0000000021738613, L(p,q)-L0 = 0.0000000000000000 +t = 80.8000, H(p,q)-H0 = 0.0000000021624377, L(p,q)-L0 = 0.0000000000000000 +t = 80.9000, H(p,q)-H0 = 0.0000000021402374, L(p,q)-L0 = 0.0000000000000000 +t = 81.0000, H(p,q)-H0 = 0.0000000020941002, L(p,q)-L0 = -0.0000000000000001 +t = 81.1000, H(p,q)-H0 = 0.0000000019913261, L(p,q)-L0 = -0.0000000000000002 +t = 81.2000, H(p,q)-H0 = 0.0000000017478636, L(p,q)-L0 = 0.0000000000000000 +t = 81.3000, H(p,q)-H0 = 0.0000000011560930, L(p,q)-L0 = -0.0000000000000001 +t = 81.4000, H(p,q)-H0 = -0.0000000001606235, L(p,q)-L0 = -0.0000000000000002 +t = 81.5000, H(p,q)-H0 = -0.0000000020080737, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 81.5672 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 81.5672, H(p,q)-H0 = 0.0000000139063441, L(p,q)-L0 = 0.0000000031236155 +t = 81.6000, H(p,q)-H0 = -0.0000000015271253, L(p,q)-L0 = -0.0000000000000001 +t = 81.7000, H(p,q)-H0 = -0.0000000000970446, L(p,q)-L0 = -0.0000000000000001 +t = 81.8000, H(p,q)-H0 = -0.0000000021650746, L(p,q)-L0 = -0.0000000000000001 +t = 81.9000, H(p,q)-H0 = -0.0000000014039538, L(p,q)-L0 = -0.0000000000000001 +t = 82.0000, H(p,q)-H0 = 0.0000000004158340, L(p,q)-L0 = -0.0000000000000001 +t = 82.1000, H(p,q)-H0 = 0.0000000014310879, L(p,q)-L0 = -0.0000000000000001 +t = 82.2000, H(p,q)-H0 = 0.0000000018621736, L(p,q)-L0 = -0.0000000000000001 +t = 82.3000, H(p,q)-H0 = 0.0000000020393431, L(p,q)-L0 = -0.0000000000000001 +t = 82.4000, H(p,q)-H0 = 0.0000000021154496, L(p,q)-L0 = -0.0000000000000001 +t = 82.5000, H(p,q)-H0 = 0.0000000021504017, L(p,q)-L0 = 0.0000000000000000 +t = 82.6000, H(p,q)-H0 = 0.0000000021676144, L(p,q)-L0 = 0.0000000000000000 +t = 82.7000, H(p,q)-H0 = 0.0000000021766666, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 82.7119 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 82.7119, H(p,q)-H0 = 0.0000000021758467, L(p,q)-L0 = -0.0000000000020506 +t = 82.8000, H(p,q)-H0 = 0.0000000021817191, L(p,q)-L0 = 0.0000000000000000 +t = 82.9000, H(p,q)-H0 = 0.0000000021846919, L(p,q)-L0 = 0.0000000000000000 +t = 83.0000, H(p,q)-H0 = 0.0000000021865242, L(p,q)-L0 = -0.0000000000000002 +t = 83.1000, H(p,q)-H0 = 0.0000000021877013, L(p,q)-L0 = 0.0000000000000000 +t = 83.2000, H(p,q)-H0 = 0.0000000021884847, L(p,q)-L0 = 0.0000000000000000 +t = 83.3000, H(p,q)-H0 = 0.0000000021890226, L(p,q)-L0 = -0.0000000000000001 +t = 83.4000, H(p,q)-H0 = 0.0000000021894024, L(p,q)-L0 = -0.0000000000000001 +t = 83.5000, H(p,q)-H0 = 0.0000000021896770, L(p,q)-L0 = -0.0000000000000001 +t = 83.6000, H(p,q)-H0 = 0.0000000021898798, L(p,q)-L0 = -0.0000000000000001 +t = 83.7000, H(p,q)-H0 = 0.0000000021900322, L(p,q)-L0 = 0.0000000000000000 +t = 83.8000, H(p,q)-H0 = 0.0000000021901481, L(p,q)-L0 = 0.0000000000000000 +t = 83.9000, H(p,q)-H0 = 0.0000000021902377, L(p,q)-L0 = 0.0000000000000000 +t = 84.0000, H(p,q)-H0 = 0.0000000021903072, L(p,q)-L0 = 0.0000000000000000 +t = 84.1000, H(p,q)-H0 = 0.0000000021903615, L(p,q)-L0 = -0.0000000000000001 +t = 84.2000, H(p,q)-H0 = 0.0000000021904041, L(p,q)-L0 = 0.0000000000000000 +t = 84.3000, H(p,q)-H0 = 0.0000000021904372, L(p,q)-L0 = 0.0000000000000000 +t = 84.4000, H(p,q)-H0 = 0.0000000021904625, L(p,q)-L0 = 0.0000000000000000 +t = 84.5000, H(p,q)-H0 = 0.0000000021904810, L(p,q)-L0 = 0.0000000000000000 +t = 84.6000, H(p,q)-H0 = 0.0000000021904942, L(p,q)-L0 = -0.0000000000000001 +t = 84.7000, H(p,q)-H0 = 0.0000000021905022, L(p,q)-L0 = -0.0000000000000001 +t = 84.8000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 +t = 84.9000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = -0.0000000000000001 +t = 85.0000, H(p,q)-H0 = 0.0000000021904983, L(p,q)-L0 = 0.0000000000000000 +t = 85.1000, H(p,q)-H0 = 0.0000000021904875, L(p,q)-L0 = -0.0000000000000002 +t = 85.2000, H(p,q)-H0 = 0.0000000021904715, L(p,q)-L0 = 0.0000000000000000 +t = 85.3000, H(p,q)-H0 = 0.0000000021904492, L(p,q)-L0 = -0.0000000000000001 +t = 85.4000, H(p,q)-H0 = 0.0000000021904198, L(p,q)-L0 = 0.0000000000000000 +t = 85.5000, H(p,q)-H0 = 0.0000000021903818, L(p,q)-L0 = -0.0000000000000001 +t = 85.6000, H(p,q)-H0 = 0.0000000021903331, L(p,q)-L0 = 0.0000000000000000 +t = 85.7000, H(p,q)-H0 = 0.0000000021902707, L(p,q)-L0 = -0.0000000000000002 +t = 85.8000, H(p,q)-H0 = 0.0000000021901908, L(p,q)-L0 = 0.0000000000000000 +t = 85.9000, H(p,q)-H0 = 0.0000000021900876, L(p,q)-L0 = 0.0000000000000001 +t = 86.0000, H(p,q)-H0 = 0.0000000021899528, L(p,q)-L0 = -0.0000000000000001 +t = 86.1000, H(p,q)-H0 = 0.0000000021897746, L(p,q)-L0 = 0.0000000000000000 +t = 86.2000, H(p,q)-H0 = 0.0000000021895351, L(p,q)-L0 = 0.0000000000000000 +t = 86.3000, H(p,q)-H0 = 0.0000000021892071, L(p,q)-L0 = 0.0000000000000000 +t = 86.4000, H(p,q)-H0 = 0.0000000021887479, L(p,q)-L0 = -0.0000000000000001 +t = 86.5000, H(p,q)-H0 = 0.0000000021880882, L(p,q)-L0 = 0.0000000000000000 +t = 86.6000, H(p,q)-H0 = 0.0000000021871112, L(p,q)-L0 = 0.0000000000000000 +t = 86.7000, H(p,q)-H0 = 0.0000000021856167, L(p,q)-L0 = 0.0000000000000000 +t = 86.8000, H(p,q)-H0 = 0.0000000021832398, L(p,q)-L0 = 0.0000000000000000 +t = 86.9000, H(p,q)-H0 = 0.0000000021792922, L(p,q)-L0 = -0.0000000000000001 +t = 87.0000, H(p,q)-H0 = 0.0000000021724023, L(p,q)-L0 = -0.0000000000000001 +t = 87.1000, H(p,q)-H0 = 0.0000000021596853, L(p,q)-L0 = -0.0000000000000002 +t = 87.2000, H(p,q)-H0 = 0.0000000021347003, L(p,q)-L0 = -0.0000000000000001 +t = 87.3000, H(p,q)-H0 = 0.0000000020821659, L(p,q)-L0 = 0.0000000000000000 +t = 87.4000, H(p,q)-H0 = 0.0000000019638068, L(p,q)-L0 = 0.0000000000000000 +t = 87.5000, H(p,q)-H0 = 0.0000000016811599, L(p,q)-L0 = 0.0000000000000000 +t = 87.6000, H(p,q)-H0 = 0.0000000009964676, L(p,q)-L0 = -0.0000000000000002 +t = 87.7000, H(p,q)-H0 = -0.0000000004693219, L(p,q)-L0 = -0.0000000000000001 +t = 87.8000, H(p,q)-H0 = -0.0000000022005262, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: t = 87.8504 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 87.8504, H(p,q)-H0 = -0.0000000012000709, L(p,q)-L0 = 0.0000000001728662 +t = 87.9000, H(p,q)-H0 = -0.0000000011032588, L(p,q)-L0 = -0.0000000000000001 +t = 88.0000, H(p,q)-H0 = -0.0000000003564948, L(p,q)-L0 = 0.0000000000000000 +t = 88.1000, H(p,q)-H0 = -0.0000000022895377, L(p,q)-L0 = 0.0000000000000000 +t = 88.2000, H(p,q)-H0 = -0.0000000010732304, L(p,q)-L0 = -0.0000000000000001 +t = 88.3000, H(p,q)-H0 = 0.0000000006458953, L(p,q)-L0 = -0.0000000000000001 +t = 88.4000, H(p,q)-H0 = 0.0000000015328960, L(p,q)-L0 = 0.0000000000000000 +t = 88.5000, H(p,q)-H0 = 0.0000000019037720, L(p,q)-L0 = 0.0000000000000001 +t = 88.6000, H(p,q)-H0 = 0.0000000020568457, L(p,q)-L0 = 0.0000000000000001 +t = 88.7000, H(p,q)-H0 = 0.0000000021232918, L(p,q)-L0 = 0.0000000000000000 +t = 88.8000, H(p,q)-H0 = 0.0000000021541700, L(p,q)-L0 = 0.0000000000000000 +t = 88.9000, H(p,q)-H0 = 0.0000000021695511, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 88.9951 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 +t = 88.9951, H(p,q)-H0 = 0.0000000021729337, L(p,q)-L0 = -0.0000000000058159 +t = 89.0000, H(p,q)-H0 = 0.0000000021777253, L(p,q)-L0 = 0.0000000000000000 +t = 89.1000, H(p,q)-H0 = 0.0000000021823305, L(p,q)-L0 = 0.0000000000000000 +t = 89.2000, H(p,q)-H0 = 0.0000000021850627, L(p,q)-L0 = -0.0000000000000001 +t = 89.3000, H(p,q)-H0 = 0.0000000021867591, L(p,q)-L0 = -0.0000000000000001 +t = 89.4000, H(p,q)-H0 = 0.0000000021878555, L(p,q)-L0 = -0.0000000000000001 +t = 89.5000, H(p,q)-H0 = 0.0000000021885893, L(p,q)-L0 = 0.0000000000000000 +t = 89.6000, H(p,q)-H0 = 0.0000000021890958, L(p,q)-L0 = 0.0000000000000000 +t = 89.7000, H(p,q)-H0 = 0.0000000021894550, L(p,q)-L0 = 0.0000000000000000 +t = 89.8000, H(p,q)-H0 = 0.0000000021897156, L(p,q)-L0 = 0.0000000000000000 +t = 89.9000, H(p,q)-H0 = 0.0000000021899086, L(p,q)-L0 = 0.0000000000000000 +t = 90.0000, H(p,q)-H0 = 0.0000000021900538, L(p,q)-L0 = -0.0000000000000001 +t = 90.1000, H(p,q)-H0 = 0.0000000021901648, L(p,q)-L0 = 0.0000000000000000 +t = 90.2000, H(p,q)-H0 = 0.0000000021902505, L(p,q)-L0 = 0.0000000000000000 +t = 90.3000, H(p,q)-H0 = 0.0000000021903174, L(p,q)-L0 = 0.0000000000000000 +t = 90.4000, H(p,q)-H0 = 0.0000000021903695, L(p,q)-L0 = -0.0000000000000001 +t = 90.5000, H(p,q)-H0 = 0.0000000021904104, L(p,q)-L0 = 0.0000000000000000 +t = 90.6000, H(p,q)-H0 = 0.0000000021904418, L(p,q)-L0 = 0.0000000000000000 +t = 90.7000, H(p,q)-H0 = 0.0000000021904659, L(p,q)-L0 = 0.0000000000000000 +t = 90.8000, H(p,q)-H0 = 0.0000000021904836, L(p,q)-L0 = -0.0000000000000001 +t = 90.9000, H(p,q)-H0 = 0.0000000021904958, L(p,q)-L0 = -0.0000000000000001 +t = 91.0000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000001 +t = 91.1000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = 0.0000000000000000 +t = 91.2000, H(p,q)-H0 = 0.0000000021905036, L(p,q)-L0 = -0.0000000000000001 +t = 91.3000, H(p,q)-H0 = 0.0000000021904969, L(p,q)-L0 = 0.0000000000000000 +t = 91.4000, H(p,q)-H0 = 0.0000000021904853, L(p,q)-L0 = -0.0000000000000001 +t = 91.5000, H(p,q)-H0 = 0.0000000021904681, L(p,q)-L0 = -0.0000000000000001 +t = 91.6000, H(p,q)-H0 = 0.0000000021904449, L(p,q)-L0 = 0.0000000000000000 +t = 91.7000, H(p,q)-H0 = 0.0000000021904142, L(p,q)-L0 = -0.0000000000000001 +t = 91.8000, H(p,q)-H0 = 0.0000000021903745, L(p,q)-L0 = 0.0000000000000000 +t = 91.9000, H(p,q)-H0 = 0.0000000021903237, L(p,q)-L0 = 0.0000000000000000 +t = 92.0000, H(p,q)-H0 = 0.0000000021902586, L(p,q)-L0 = 0.0000000000000000 +t = 92.1000, H(p,q)-H0 = 0.0000000021901752, L(p,q)-L0 = 0.0000000000000000 +t = 92.2000, H(p,q)-H0 = 0.0000000021900673, L(p,q)-L0 = 0.0000000000000000 +t = 92.3000, H(p,q)-H0 = 0.0000000021899261, L(p,q)-L0 = 0.0000000000000000 +t = 92.4000, H(p,q)-H0 = 0.0000000021897392, L(p,q)-L0 = -0.0000000000000001 +t = 92.5000, H(p,q)-H0 = 0.0000000021894872, L(p,q)-L0 = 0.0000000000000000 +t = 92.6000, H(p,q)-H0 = 0.0000000021891406, L(p,q)-L0 = -0.0000000000000001 +t = 92.7000, H(p,q)-H0 = 0.0000000021886534, L(p,q)-L0 = -0.0000000000000001 +t = 92.8000, H(p,q)-H0 = 0.0000000021879500, L(p,q)-L0 = 0.0000000000000000 +t = 92.9000, H(p,q)-H0 = 0.0000000021869037, L(p,q)-L0 = 0.0000000000000000 +t = 93.0000, H(p,q)-H0 = 0.0000000021852921, L(p,q)-L0 = 0.0000000000000000 +t = 93.1000, H(p,q)-H0 = 0.0000000021827118, L(p,q)-L0 = -0.0000000000000001 +t = 93.2000, H(p,q)-H0 = 0.0000000021783927, L(p,q)-L0 = 0.0000000000000000 +t = 93.3000, H(p,q)-H0 = 0.0000000021707859, L(p,q)-L0 = 0.0000000000000000 +t = 93.4000, H(p,q)-H0 = 0.0000000021566040, L(p,q)-L0 = -0.0000000000000001 +t = 93.5000, H(p,q)-H0 = 0.0000000021284303, L(p,q)-L0 = -0.0000000000000001 +t = 93.6000, H(p,q)-H0 = 0.0000000020684934, L(p,q)-L0 = -0.0000000000000001 +t = 93.7000, H(p,q)-H0 = 0.0000000019319524, L(p,q)-L0 = 0.0000000000000000 +t = 93.8000, H(p,q)-H0 = 0.0000000016036215, L(p,q)-L0 = -0.0000000000000001 +t = 93.9000, H(p,q)-H0 = 0.0000000008137404, L(p,q)-L0 = -0.0000000000000001 +t = 94.0000, H(p,q)-H0 = -0.0000000007952294, L(p,q)-L0 = 0.0000000000000000 +t = 94.1000, H(p,q)-H0 = -0.0000000022989104, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 94.1336 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 +t = 94.1336, H(p,q)-H0 = 0.0000000079756906, L(p,q)-L0 = 0.0000000019152172 +t = 94.2000, H(p,q)-H0 = -0.0000000006765071, L(p,q)-L0 = -0.0000000000000001 +t = 94.3000, H(p,q)-H0 = -0.0000000007326104, L(p,q)-L0 = -0.0000000000000002 +t = 94.4000, H(p,q)-H0 = -0.0000000022880617, L(p,q)-L0 = -0.0000000000000001 +t = 94.5000, H(p,q)-H0 = -0.0000000007392522, L(p,q)-L0 = -0.0000000000000002 +t = 94.6000, H(p,q)-H0 = 0.0000000008495675, L(p,q)-L0 = -0.0000000000000002 +t = 94.7000, H(p,q)-H0 = 0.0000000016205692, L(p,q)-L0 = -0.0000000000000001 +t = 94.8000, H(p,q)-H0 = 0.0000000019396089, L(p,q)-L0 = 0.0000000000000000 +t = 94.9000, H(p,q)-H0 = 0.0000000020720647, L(p,q)-L0 = -0.0000000000000001 +t = 95.0000, H(p,q)-H0 = 0.0000000021301907, L(p,q)-L0 = 0.0000000000000000 +t = 95.1000, H(p,q)-H0 = 0.0000000021575237, L(p,q)-L0 = 0.0000000000000000 +t = 95.2000, H(p,q)-H0 = 0.0000000021712937, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: t = 95.2783 g[0] = -1, y[0] = -0.658625, y[1] = 0.798625 +t = 95.2783, H(p,q)-H0 = 0.0000000021732485, L(p,q)-L0 = -0.0000000000053928 +t = 95.3000, H(p,q)-H0 = 0.0000000021786871, L(p,q)-L0 = -0.0000000000000001 +t = 95.4000, H(p,q)-H0 = 0.0000000021828907, L(p,q)-L0 = 0.0000000000000000 +t = 95.5000, H(p,q)-H0 = 0.0000000021854049, L(p,q)-L0 = -0.0000000000000001 +t = 95.6000, H(p,q)-H0 = 0.0000000021869770, L(p,q)-L0 = -0.0000000000000001 +t = 95.7000, H(p,q)-H0 = 0.0000000021879995, L(p,q)-L0 = -0.0000000000000001 +t = 95.8000, H(p,q)-H0 = 0.0000000021886876, L(p,q)-L0 = -0.0000000000000001 +t = 95.9000, H(p,q)-H0 = 0.0000000021891650, L(p,q)-L0 = 0.0000000000000000 +t = 96.0000, H(p,q)-H0 = 0.0000000021895045, L(p,q)-L0 = -0.0000000000000001 +t = 96.1000, H(p,q)-H0 = 0.0000000021897521, L(p,q)-L0 = 0.0000000000000000 +t = 96.2000, H(p,q)-H0 = 0.0000000021899358, L(p,q)-L0 = 0.0000000000000000 +t = 96.3000, H(p,q)-H0 = 0.0000000021900747, L(p,q)-L0 = 0.0000000000000000 +t = 96.4000, H(p,q)-H0 = 0.0000000021901808, L(p,q)-L0 = 0.0000000000000000 +t = 96.5000, H(p,q)-H0 = 0.0000000021902628, L(p,q)-L0 = -0.0000000000000001 +t = 96.6000, H(p,q)-H0 = 0.0000000021903269, L(p,q)-L0 = 0.0000000000000000 +t = 96.7000, H(p,q)-H0 = 0.0000000021903769, L(p,q)-L0 = -0.0000000000000001 +t = 96.8000, H(p,q)-H0 = 0.0000000021904161, L(p,q)-L0 = -0.0000000000000001 +t = 96.9000, H(p,q)-H0 = 0.0000000021904463, L(p,q)-L0 = 0.0000000000000000 +t = 97.0000, H(p,q)-H0 = 0.0000000021904694, L(p,q)-L0 = 0.0000000000000000 +t = 97.1000, H(p,q)-H0 = 0.0000000021904860, L(p,q)-L0 = -0.0000000000000001 +t = 97.2000, H(p,q)-H0 = 0.0000000021904973, L(p,q)-L0 = -0.0000000000000001 +t = 97.3000, H(p,q)-H0 = 0.0000000021905037, L(p,q)-L0 = -0.0000000000000001 +t = 97.4000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 +t = 97.5000, H(p,q)-H0 = 0.0000000021905026, L(p,q)-L0 = -0.0000000000000001 +t = 97.6000, H(p,q)-H0 = 0.0000000021904953, L(p,q)-L0 = -0.0000000000000001 +t = 97.7000, H(p,q)-H0 = 0.0000000021904827, L(p,q)-L0 = -0.0000000000000001 +t = 97.8000, H(p,q)-H0 = 0.0000000021904646, L(p,q)-L0 = -0.0000000000000001 +t = 97.9000, H(p,q)-H0 = 0.0000000021904402, L(p,q)-L0 = -0.0000000000000001 +t = 98.0000, H(p,q)-H0 = 0.0000000021904081, L(p,q)-L0 = 0.0000000000000000 +t = 98.1000, H(p,q)-H0 = 0.0000000021903667, L(p,q)-L0 = -0.0000000000000001 +t = 98.2000, H(p,q)-H0 = 0.0000000021903138, L(p,q)-L0 = 0.0000000000000000 +t = 98.3000, H(p,q)-H0 = 0.0000000021902460, L(p,q)-L0 = 0.0000000000000000 +t = 98.4000, H(p,q)-H0 = 0.0000000021901588, L(p,q)-L0 = -0.0000000000000001 +t = 98.5000, H(p,q)-H0 = 0.0000000021900461, L(p,q)-L0 = 0.0000000000000000 +t = 98.6000, H(p,q)-H0 = 0.0000000021898983, L(p,q)-L0 = -0.0000000000000002 +t = 98.7000, H(p,q)-H0 = 0.0000000021897019, L(p,q)-L0 = -0.0000000000000001 +t = 98.8000, H(p,q)-H0 = 0.0000000021894364, L(p,q)-L0 = -0.0000000000000002 +t = 98.9000, H(p,q)-H0 = 0.0000000021890702, L(p,q)-L0 = 0.0000000000000000 +t = 99.0000, H(p,q)-H0 = 0.0000000021885528, L(p,q)-L0 = -0.0000000000000001 +t = 99.1000, H(p,q)-H0 = 0.0000000021878026, L(p,q)-L0 = -0.0000000000000001 +t = 99.2000, H(p,q)-H0 = 0.0000000021866799, L(p,q)-L0 = -0.0000000000000001 +t = 99.3000, H(p,q)-H0 = 0.0000000021849408, L(p,q)-L0 = 0.0000000000000000 +t = 99.4000, H(p,q)-H0 = 0.0000000021821366, L(p,q)-L0 = -0.0000000000000001 +t = 99.5000, H(p,q)-H0 = 0.0000000021774034, L(p,q)-L0 = -0.0000000000000002 +t = 99.6000, H(p,q)-H0 = 0.0000000021689920, L(p,q)-L0 = -0.0000000000000002 +t = 99.7000, H(p,q)-H0 = 0.0000000021531483, L(p,q)-L0 = 0.0000000000000000 +t = 99.8000, H(p,q)-H0 = 0.0000000021213169, L(p,q)-L0 = -0.0000000000000001 +t = 99.9000, H(p,q)-H0 = 0.0000000020527999, L(p,q)-L0 = -0.0000000000000001 +t = 100.0000, H(p,q)-H0 = 0.0000000018950302, L(p,q)-L0 = -0.0000000000000001 +Current time = 99.99999999999859 +Steps = 10000 +Step attempts = 10000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.01 +Last step size = 0.009999999999990896 +Current step size = 0.009999999999990896 +Root fn evals = 10298 +f1 RHS fn evals = 40032 +f2 RHS fn evals = 40032 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated.out new file mode 100644 index 0000000000..8e12aeac48 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated.out @@ -0,0 +1,11 @@ +ERROR: unrecognized argument --use-compensated +ark_kepler: an ARKODE example demonstrating the SPRKStep time-stepping module solving the Kepler problem + --step-mode should we use a fixed time-step or adaptive time-step (default fixed) + --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK) + --method which method to use (default ARKODE_SYMPLECTIC_MCLACHLAN_4_4) + --use-compensated-sums turns on compensated summation in ARKODE where applicable + --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) + --tf the final time for the simulation (default 100) + --nout the number of output times (default 100) + --find-roots turns on rootfinding + --check-order compute the order of the method used and check if it is within range of the expected diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..7732f92e38 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0012973337429578, L(p,q)-L0 = 0.0000000000000004 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +f1 RHS fn evals = 50002 +f2 RHS fn evals = 50002 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0005 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0006522136203477, L(p,q)-L0 = -0.0000000000000224 +Current time = 50 +Steps = 100000 +Step attempts = 100000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0005 +Last step size = 0.0004999999432868658 +Current step size = 0.0004999999432868658 +f1 RHS fn evals = 100001 +f2 RHS fn evals = 100001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0003269003906117, L(p,q)-L0 = 0.0000000000000115 +Current time = 50 +Steps = 200000 +Step attempts = 200000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00025 +Last step size = 0.0002499998522722533 +Current step size = 0.0002499998522722533 +f1 RHS fn evals = 200001 +f2 RHS fn evals = 200001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.000125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0001636371851703, L(p,q)-L0 = -0.0000000000000148 +Current time = 50 +Steps = 400001 +Step attempts = 400001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000125 +Last step size = 3.183586727573126e-10 +Current step size = 3.183586727573126e-10 +f1 RHS fn evals = 400002 +f2 RHS fn evals = 400002 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 6.25e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000818639245175, L(p,q)-L0 = -0.0000000000001292 +Current time = 50 +Steps = 800001 +Step attempts = 800001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.25e-05 +Last step size = 7.503473398173804e-10 +Current step size = 7.503473398173804e-10 +f1 RHS fn evals = 800002 +f2 RHS fn evals = 800002 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 3.125e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000409431186841, L(p,q)-L0 = -0.0000000000000142 +Current time = 50 +Steps = 1600001 +Step attempts = 1600001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 3.125e-05 +Last step size = 9.66345226061093e-10 +Current step size = 9.66345226061093e-10 +f1 RHS fn evals = 1600002 +f2 RHS fn evals = 1600002 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 1.5625e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000204743261560, L(p,q)-L0 = 0.0000000000000230 +Current time = 50 +Steps = 3200000 +Step attempts = 3200000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 1.5625e-05 +Last step size = 1.562198162474714e-05 +Current step size = 1.562198162474714e-05 +f1 RHS fn evals = 3200001 +f2 RHS fn evals = 3200001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 7.8125e-06 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000102378522768, L(p,q)-L0 = -0.0000000000001756 +Current time = 50 +Steps = 6400000 +Step attempts = 6400000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 7.8125e-06 +Last step size = 7.805897645596353e-06 +Current step size = 7.805897645596353e-06 +f1 RHS fn evals = 6400001 +f2 RHS fn evals = 6400001 + +Order of accuracy wrt solution: expected = 1, max = 1.6317, avg = 1.0843, overall = 1.0418 +Order of accuracy wrt Hamiltonian: expected = 1, max = 0.9999, avg = 0.9979, overall = 0.9983 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..1d409aa604 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000001032118342, L(p,q)-L0 = 0.0000000000000104 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +f1 RHS fn evals = 100003 +f2 RHS fn evals = 100003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0005 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000258323680, L(p,q)-L0 = 0.0000000000000211 +Current time = 50 +Steps = 100000 +Step attempts = 100000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0005 +Last step size = 0.0004999999432868658 +Current step size = 0.0004999999432868658 +f1 RHS fn evals = 200001 +f2 RHS fn evals = 200001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000064599039, L(p,q)-L0 = 0.0000000000000443 +Current time = 50 +Steps = 200000 +Step attempts = 200000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00025 +Last step size = 0.0002499998522722533 +Current step size = 0.0002499998522722533 +f1 RHS fn evals = 400001 +f2 RHS fn evals = 400001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.000125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000016151294, L(p,q)-L0 = -0.0000000000000340 +Current time = 50 +Steps = 400001 +Step attempts = 400001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000125 +Last step size = 3.183586727573126e-10 +Current step size = 3.183586727573126e-10 +f1 RHS fn evals = 800003 +f2 RHS fn evals = 800003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 6.25e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000004036786, L(p,q)-L0 = 0.0000000000000238 +Current time = 50 +Steps = 800001 +Step attempts = 800001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.25e-05 +Last step size = 7.503473398173804e-10 +Current step size = 7.503473398173804e-10 +f1 RHS fn evals = 1600003 +f2 RHS fn evals = 1600003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 3.125e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000001008020, L(p,q)-L0 = 0.0000000000000557 +Current time = 50 +Steps = 1600001 +Step attempts = 1600001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 3.125e-05 +Last step size = 9.66345226061093e-10 +Current step size = 9.66345226061093e-10 +f1 RHS fn evals = 3200003 +f2 RHS fn evals = 3200003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 1.5625e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000252491, L(p,q)-L0 = 0.0000000000000155 +Current time = 50 +Steps = 3200000 +Step attempts = 3200000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 1.5625e-05 +Last step size = 1.562198162474714e-05 +Current step size = 1.562198162474714e-05 +f1 RHS fn evals = 6400001 +f2 RHS fn evals = 6400001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 7.8125e-06 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000060401, L(p,q)-L0 = 0.0000000000002092 +Current time = 50 +Steps = 6400000 +Step attempts = 6400000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 7.8125e-06 +Last step size = 7.805897645596353e-06 +Current step size = 7.805897645596353e-06 +f1 RHS fn evals = 12800001 +f2 RHS fn evals = 12800001 + +Order of accuracy wrt solution: expected = 2, max = 2.0097, avg = 1.8616, overall = 1.9108 +Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0636, avg = 2.0087, overall = 2.0051 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..188d434b47 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000007537055449, L(p,q)-L0 = -0.0000000000000051 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +f1 RHS fn evals = 100003 +f2 RHS fn evals = 100003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0005 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000001883497172, L(p,q)-L0 = -0.0000000000000051 +Current time = 50 +Steps = 100000 +Step attempts = 100000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0005 +Last step size = 0.0004999999432868658 +Current step size = 0.0004999999432868658 +f1 RHS fn evals = 200001 +f2 RHS fn evals = 200001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000470814610, L(p,q)-L0 = -0.0000000000000091 +Current time = 50 +Steps = 200000 +Step attempts = 200000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00025 +Last step size = 0.0002499998522722533 +Current step size = 0.0002499998522722533 +f1 RHS fn evals = 400001 +f2 RHS fn evals = 400001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.000125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000117697354, L(p,q)-L0 = -0.0000000000000354 +Current time = 50 +Steps = 400001 +Step attempts = 400001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000125 +Last step size = 3.183586727573126e-10 +Current step size = 3.183586727573126e-10 +f1 RHS fn evals = 800003 +f2 RHS fn evals = 800003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 6.25e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000029423715, L(p,q)-L0 = -0.0000000000000328 +Current time = 50 +Steps = 800001 +Step attempts = 800001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.25e-05 +Last step size = 7.503473398173804e-10 +Current step size = 7.503473398173804e-10 +f1 RHS fn evals = 1600003 +f2 RHS fn evals = 1600003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 3.125e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000007355181, L(p,q)-L0 = -0.0000000000000266 +Current time = 50 +Steps = 1600001 +Step attempts = 1600001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 3.125e-05 +Last step size = 9.66345226061093e-10 +Current step size = 9.66345226061093e-10 +f1 RHS fn evals = 3200003 +f2 RHS fn evals = 3200003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 1.5625e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000001839353, L(p,q)-L0 = 0.0000000000000517 +Current time = 50 +Steps = 3200000 +Step attempts = 3200000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 1.5625e-05 +Last step size = 1.562198162474714e-05 +Current step size = 1.562198162474714e-05 +f1 RHS fn evals = 6400001 +f2 RHS fn evals = 6400001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 7.8125e-06 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000000460576, L(p,q)-L0 = 0.0000000000000979 +Current time = 50 +Steps = 6400000 +Step attempts = 6400000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 7.8125e-06 +Last step size = 7.805897645596353e-06 +Current step size = 7.805897645596353e-06 +f1 RHS fn evals = 12800001 +f2 RHS fn evals = 12800001 + +Order of accuracy wrt solution: expected = 2, max = 2.0069, avg = 1.8941, overall = 1.9322 +Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0006, avg = 1.9998, overall = 1.9999 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..f436abc375 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0008988103468988, L(p,q)-L0 = 0.0000000000000000 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 1501 +f2 RHS fn evals = 1501 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0001201209616173, L(p,q)-L0 = 0.0000000000000011 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 3001 +f2 RHS fn evals = 3001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000134060753418, L(p,q)-L0 = 0.0000000000000016 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 6004 +f2 RHS fn evals = 6004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000015483046323, L(p,q)-L0 = -0.0000000000000001 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 12001 +f2 RHS fn evals = 12001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000001852911622, L(p,q)-L0 = -0.0000000000000074 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 24001 +f2 RHS fn evals = 24001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000226418211, L(p,q)-L0 = 0.0000000000000095 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 48004 +f2 RHS fn evals = 48004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000027976583, L(p,q)-L0 = 0.0000000000000058 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 96004 +f2 RHS fn evals = 96004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000003476901, L(p,q)-L0 = 0.0000000000000044 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 192001 +f2 RHS fn evals = 192001 + +Order of accuracy wrt solution: expected = 3, max = 3.9687, avg = 3.7856, overall = 3.8203 +Order of accuracy wrt Hamiltonian: expected = 3, max = 3.1635, avg = 3.0431, overall = 3.0566 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..c75150efa9 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000053723049984, L(p,q)-L0 = 0.0000000000000000 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 2001 +f2 RHS fn evals = 2001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000002776461714, L(p,q)-L0 = -0.0000000000000049 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 4001 +f2 RHS fn evals = 4001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000172503238, L(p,q)-L0 = 0.0000000000000007 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 8005 +f2 RHS fn evals = 8005 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000010987309, L(p,q)-L0 = -0.0000000000000046 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 16001 +f2 RHS fn evals = 16001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000697067, L(p,q)-L0 = -0.0000000000000075 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 32001 +f2 RHS fn evals = 32001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000044091, L(p,q)-L0 = -0.0000000000000122 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 64005 +f2 RHS fn evals = 64005 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002849, L(p,q)-L0 = 0.0000000000000119 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 128005 +f2 RHS fn evals = 128005 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000000451, L(p,q)-L0 = -0.0000000000000351 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 256001 +f2 RHS fn evals = 256001 + +Order of accuracy wrt solution: expected = 4, max = 3.9974, avg = 3.5943, overall = 3.7564 +Order of accuracy wrt Hamiltonian: expected = 4, max = 4.2742, avg = 3.8327, overall = 3.8935 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..362ed410b2 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000075734793938, L(p,q)-L0 = 0.0000000000000011 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 3001 +f2 RHS fn evals = 3001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000001316623315, L(p,q)-L0 = -0.0000000000000020 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 6001 +f2 RHS fn evals = 6001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000022657438, L(p,q)-L0 = -0.0000000000000084 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 12007 +f2 RHS fn evals = 12007 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000000410620, L(p,q)-L0 = 0.0000000000000149 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 24001 +f2 RHS fn evals = 24001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000000008025, L(p,q)-L0 = -0.0000000000000031 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 48001 +f2 RHS fn evals = 48001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000000000415, L(p,q)-L0 = 0.0000000000000064 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 96007 +f2 RHS fn evals = 96007 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000000000040, L(p,q)-L0 = 0.0000000000000299 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 192007 +f2 RHS fn evals = 192007 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000000322, L(p,q)-L0 = 0.0000000000000026 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 384001 +f2 RHS fn evals = 384001 + +Order of accuracy wrt solution: expected = 5, max = 5.9898, avg = 3.4143, overall = 3.7897 +Order of accuracy wrt Hamiltonian: expected = 5, max = 5.8607, avg = 3.9728, overall = 4.4335 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..911ed979ef --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000032112992008, L(p,q)-L0 = -0.0000000000000158 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +f1 RHS fn evals = 100003 +f2 RHS fn evals = 100003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0005 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000008021580005, L(p,q)-L0 = -0.0000000000000071 +Current time = 50 +Steps = 100000 +Step attempts = 100000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0005 +Last step size = 0.0004999999432868658 +Current step size = 0.0004999999432868658 +f1 RHS fn evals = 200001 +f2 RHS fn evals = 200001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000002004977220, L(p,q)-L0 = -0.0000000000000198 +Current time = 50 +Steps = 200000 +Step attempts = 200000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00025 +Last step size = 0.0002499998522722533 +Current step size = 0.0002499998522722533 +f1 RHS fn evals = 400001 +f2 RHS fn evals = 400001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.000125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000501218240, L(p,q)-L0 = -0.0000000000000068 +Current time = 50 +Steps = 400001 +Step attempts = 400001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000125 +Last step size = 3.183586727573126e-10 +Current step size = 3.183586727573126e-10 +f1 RHS fn evals = 800003 +f2 RHS fn evals = 800003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 6.25e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000125303290, L(p,q)-L0 = -0.0000000000000203 +Current time = 50 +Steps = 800001 +Step attempts = 800001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.25e-05 +Last step size = 7.503473398173804e-10 +Current step size = 7.503473398173804e-10 +f1 RHS fn evals = 1600003 +f2 RHS fn evals = 1600003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 3.125e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000031327123, L(p,q)-L0 = 0.0000000000001195 +Current time = 50 +Steps = 1600001 +Step attempts = 1600001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 3.125e-05 +Last step size = 9.66345226061093e-10 +Current step size = 9.66345226061093e-10 +f1 RHS fn evals = 3200003 +f2 RHS fn evals = 3200003 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 1.5625e-05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000007827197, L(p,q)-L0 = -0.0000000000001815 +Current time = 50 +Steps = 3200000 +Step attempts = 3200000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 1.5625e-05 +Last step size = 1.562198162474714e-05 +Current step size = 1.562198162474714e-05 +f1 RHS fn evals = 6400001 +f2 RHS fn evals = 6400001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 7.8125e-06 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000001959848, L(p,q)-L0 = 0.0000000000000366 +Current time = 50 +Steps = 6400000 +Step attempts = 6400000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 7.8125e-06 +Last step size = 7.805897645596353e-06 +Current step size = 7.805897645596353e-06 +f1 RHS fn evals = 12800001 +f2 RHS fn evals = 12800001 + +Order of accuracy wrt solution: expected = 2, max = 2.0019, avg = 1.9630, overall = 1.9766 +Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0012, avg = 2.0000, overall = 2.0001 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..1c09b65d2b --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0008915080580247, L(p,q)-L0 = 0.0000000000000026 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 1501 +f2 RHS fn evals = 1501 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000402415167515, L(p,q)-L0 = -0.0000000000000002 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 3001 +f2 RHS fn evals = 3001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000011101319375, L(p,q)-L0 = 0.0000000000000000 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 6004 +f2 RHS fn evals = 6004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000001144882387, L(p,q)-L0 = -0.0000000000000033 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 12001 +f2 RHS fn evals = 12001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000302907841, L(p,q)-L0 = -0.0000000000000036 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 24001 +f2 RHS fn evals = 24001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000047862143, L(p,q)-L0 = -0.0000000000000104 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 48004 +f2 RHS fn evals = 48004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000006607368, L(p,q)-L0 = -0.0000000000000004 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 96004 +f2 RHS fn evals = 96004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000864309, L(p,q)-L0 = 0.0000000000000455 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 192001 +f2 RHS fn evals = 192001 + +Order of accuracy wrt solution: expected = 3, max = 4.0232, avg = 3.9269, overall = 3.9563 +Order of accuracy wrt Hamiltonian: expected = 3, max = 5.1799, avg = 3.3283, overall = 3.1911 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..a9354de318 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out @@ -0,0 +1,248 @@ + + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400009 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0001268118227700, L(p,q)-L0 = 0.0000000000000011 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 4001 +f2 RHS fn evals = 4001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000020266123610, L(p,q)-L0 = -0.0000000000000016 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 8001 +f2 RHS fn evals = 8001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000319247493, L(p,q)-L0 = 0.0000000000000007 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 16009 +f2 RHS fn evals = 16009 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000004998491, L(p,q)-L0 = 0.0000000000000067 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 32001 +f2 RHS fn evals = 32001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000000078000, L(p,q)-L0 = 0.0000000000000017 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 64001 +f2 RHS fn evals = 64001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000000001414, L(p,q)-L0 = 0.0000000000000111 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 128009 +f2 RHS fn evals = 128009 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 0.0000000000000688, L(p,q)-L0 = 0.0000000000000301 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 256009 +f2 RHS fn evals = 256009 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -0.0000000000000788, L(p,q)-L0 = -0.0000000000000033 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 512001 +f2 RHS fn evals = 512001 + +Order of accuracy wrt solution: expected = 6, max = 5.9958, avg = 3.9922, overall = 4.4514 +Order of accuracy wrt Hamiltonian: expected = 6, max = 6.0019, avg = 4.3690, overall = 4.7321 diff --git a/scripts/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out b/scripts/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/answers b/test/answers index de7bce4c8f..76d845537d 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit de7bce4c8fd3e6247a5bb7b89186e45d37bfe163 +Subproject commit 76d845537df793b645867568021419751ff735cd From 4a8e1ec3819685ad489649b30817c88b19344764 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 11:34:50 -0700 Subject: [PATCH 079/177] doc and tarscript updates --- CHANGELOG.md | 3 +++ doc/arkode/guide/source/Introduction.rst | 4 ++++ .../guide/source/Usage/SPRKStep_c_interface/User_callable.rst | 4 ++-- ...DE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out | 0 scripts/arkode | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) delete mode 100644 scripts/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a06f737a..9eebc5c2b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ Updated the F2003 utility routines `SUNDIALSFileOpen` and `SUNDIALSFileClose` to support user specification of `stdout` and `stderr` strings for the output file names. +A new time-stepping module, `SPRKStep`, was added to ARKODE. This time-stepper +provides symplectic partitioned Runge-Kutta methods for Hamiltonian systems. + ## Changes to SUNDIALS in release 6.5.1 Added the functions `ARKStepClearStopTime`, `ERKStepClearStopTime`, diff --git a/doc/arkode/guide/source/Introduction.rst b/doc/arkode/guide/source/Introduction.rst index f21db6ceee..18825e8de9 100644 --- a/doc/arkode/guide/source/Introduction.rst +++ b/doc/arkode/guide/source/Introduction.rst @@ -142,6 +142,10 @@ Updated the F2003 utility routines :c:func:`SUNDIALSFileOpen` and :c:func:`SUNDI to support user specification of ``stdout`` and ``stderr`` strings for the output file names. +A new time-stepping module, :ref:`SPRKStep `, was +added to ARKODE. This time-stepper provides symplectic partitioned Runge-Kutta +methods for Hamiltonian systems. + Changes in v5.5.1 ----------------- diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index d574d5ccea..beca1bfdd1 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -45,8 +45,8 @@ SPRKStep initialization and deallocation functions This function allocates and initializes memory for a problem to be solved using the SPRKStep time-stepping module in ARKODE. - :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f1(q,t) = \frac{\partial V(q,t)}{\partial q}` - :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f2(p) = \frac{\partial T(p)}{\partial p}` + :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_1(q,t) = \frac{\partial V(q,t)}{\partial q}` + :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_2(p) = \frac{\partial T(p)}{\partial p}` :param t0: the initial value of :math:`t` :param y0: the initial condition vector :math:`y(t_0)` :param sunctx: the :c:type:`SUNContext` object (see :numref:`SUNDIALS.SUNContext`) diff --git a/scripts/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out b/scripts/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/scripts/arkode b/scripts/arkode index b87fca7ec6..9b304cf914 100755 --- a/scripts/arkode +++ b/scripts/arkode @@ -195,7 +195,7 @@ $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D_adapt.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D_adapt.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.c -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.out +$tar $tarfile '$distrobase/examples/arkode/C_serial/ark_kepler*.out' $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_plot.py $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.out From 60d88d947dc1b0dca63cd997a47c38b988d971c9 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 14:29:42 -0700 Subject: [PATCH 080/177] update docs --- doc/arkode/guide/source/Usage/User_supplied.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 21ed62475e..2b561e179f 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -186,8 +186,7 @@ in :numref:`ARKODE.Mathematics.Error.Norm`. weight vector is to be computed. * *ewt* -- the output vector containing the error weights. * *user_data* -- a pointer to user data, the same as the - *user_data* parameter that was passed to :c:func:`ARKStepSetUserData`, - :c:func:`ERKStepSetUserData`, or :c:func:`MRIStepSetUserData`. + *user_data* parameter that was passed to the ``SetUserData`` function **Return value:** An *ARKEwtFn* function must return 0 if it @@ -397,8 +396,7 @@ ODE system, the user must supply a function of type :c:type:`ARKRootFn`. * *y* -- the current value of the dependent variable vector. * *gout* -- the output array, of length *nrtfn*, with components :math:`g_i(t,y)`. * *user_data* -- a pointer to user data, the same as the - *user_data* parameter that was passed to :c:func:`ARKStepSetUserData`, - :c:func:`ERKStepSetUserData`, or :c:func:`MRIStepSetUserData`. + *user_data* parameter that was passed to the ``SetUserData`` function **Return value:** An *ARKRootFn* function should return 0 if successful From b1158f55be4b93c0442bb359300f40f04bdd0bb7 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 14:29:49 -0700 Subject: [PATCH 081/177] update examples --- examples/arkode/C_serial/CMakeLists.txt | 6 +- .../arkode/C_serial/ark_harmonic_symplectic.c | 5 +- examples/arkode/C_serial/ark_kepler.c | 114 +- ..._ERK_--step-mode_fixed_--count-orbits.out} | 126 +- ...--count-orbits_--use-compensated-sums.out} | 126 +- ...er_SPRK_--step-mode_fixed_--find-roots.out | 1088 ----------------- ...e_fixed_--find-roots_--use-compensated.out | 11 - test/answers | 2 +- 8 files changed, 195 insertions(+), 1283 deletions(-) rename examples/arkode/C_serial/{ark_kepler_--stepper_ERK_--step-mode_fixed_--find-roots.out => ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out} (93%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated-sums.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out} (93%) delete mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots.out delete mode 100644 examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated.out diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 0ac56f4359..8dce5d09ba 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -22,7 +22,6 @@ set(ARKODE_examples # tests that are always run "ark_analytic\;\;" - "ark_harmonic_symplectic\;\;" # develop tests "ark_analytic_mels\;\;develop" "ark_analytic_nonlin\;\;develop" @@ -38,12 +37,13 @@ set(ARKODE_examples "ark_brusselator1D_imexmri\;6 0.001\;exclude-single" "ark_brusselator1D_imexmri\;7 0.001\;exclude-single" "ark_brusselator1D\;\;exclude-single" + "ark_harmonic_symplectic\;\;exclude-single" "ark_heat1D_adapt\;\;develop" "ark_heat1D\;\;develop" "ark_kepler\;\;develop" "ark_kepler\;--stepper ERK --step-mode adapt\;develop" - "ark_kepler\;--stepper ERK --step-mode fixed --find-roots\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --find-roots --use-compensated-sums\;develop" + "ark_kepler\;--stepper ERK --step-mode fixed --count-orbits\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --count-orbits --use-compensated-sums\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_EULER_1_1 --tf 50 --check-order --nout 1\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;develop" diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index 5009a1cda7..5abba5d1f5 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -157,6 +157,7 @@ int main(int argc, char* argv[]) /* Do integration */ for (iout = 0; iout < num_output_times; iout++) { + SPRKStepSetStopTime(arkode_mem, tout); retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Compute the anaytical solution */ @@ -167,11 +168,11 @@ int main(int argc, char* argv[]) err = sqrt(N_VDotProd(solution, solution)); /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.6Lf\n", tret, + fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.16Lf\n", tret, ydata[0], Energy(y, dt, &udata), err); /* Check that solution error is within tolerance */ - if (err > SUNMAX(10*dt, 100*SUN_UNIT_ROUNDOFF)) + if (err > SUNMAX(dt / pow(10, order-2), 1000*SUN_UNIT_ROUNDOFF)) { fprintf(stderr, "FAILURE: solution error is too high\n"); return 1; diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 6f9f4a4bf9..022c64f407 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -30,10 +30,15 @@ * is conserved as well as the angular momentum, * L(p,q) = q1*p2 - q2*p1. * - * By default We solve the problem by letting y = [ q, p ]^T then using a 4th + * By default we solve the problem by letting y = [ q, p ]^T then using a 4th * order symplectic integrator via the SPRKStep time-stepper of ARKODE with a * fixed time-step size. * + * The rootfinding feature of SPRKStep is used to count the number of complete orbits. + * This is done by defining the function, + * g(q) = q2 + * and prodivding it to SPRKStep as the function to find the roots for. + * * The program also accepts command line arguments to change the method * used and time-stepping strategy. The program has the following CLI arguments: * @@ -44,7 +49,7 @@ * --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) * --tf the final time for the simulation (default 100) * --nout number of output times - * --find-roots turn on rootfinding + * --count-orbits use rootfinding to count the number of completed orbits * --check-order compute the order of the method used and check if it is within range of the expected * * References: @@ -90,7 +95,7 @@ typedef struct int stepper; int num_output_times; int use_compsums; - int find_roots; + int count_orbits; int check_order; sunrealtype dt; sunrealtype tf; @@ -276,10 +281,12 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) N_Vector y = NULL; SUNNonlinearSolver NLS = NULL; UserData udata = NULL; + sunrealtype* ydata = NULL; sunrealtype tout = NAN; sunrealtype tret = NAN; sunrealtype H0 = NAN; sunrealtype L0 = NAN; + sunrealtype num_orbits = 0; FILE* conserved_fp = NULL; FILE* solution_fp = NULL; FILE* times_fp = NULL; @@ -288,7 +295,7 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) int iout = 0; int retval = 0; - const int find_roots = args->find_roots; + const int count_orbits = args->count_orbits; const int step_mode = args->step_mode; const int stepper = args->stepper; const int use_compsums = args->use_compsums; @@ -310,7 +317,8 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) udata->ecc = ecc; /* Allocate our state vector */ - y = N_VNew_Serial(4, sunctx); + y = N_VNew_Serial(4, sunctx); + ydata = N_VGetArrayPointer(y); /* Fill the initial conditions */ InitialConditions(y, ecc); @@ -321,7 +329,7 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) arkode_mem = SPRKStepCreate(force, velocity, T0, y, sunctx); /* Optional: enable temporal root-finding */ - if (find_roots) + if (count_orbits) { SPRKStepRootInit(arkode_mem, 1, rootfn); if (check_retval(&retval, "SPRKStepRootInit", 1)) return 1; @@ -358,7 +366,7 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) retval = ARKStepSetTableName(arkode_mem, "ARKODE_DIRK_NONE", method_name); if (check_retval(&retval, "ARKStepSetTableName", 1)) return 1; - if (find_roots) + if (count_orbits) { ARKStepRootInit(arkode_mem, 1, rootfn); if (check_retval(&retval, "ARKStepRootInit", 1)) return 1; @@ -419,7 +427,7 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) /* Do integration */ if (stepper == 0) { - for (iout = 0; iout < num_output_times; iout++) + while (iout < num_output_times) { sunrealtype hlast = SUN_RCONST(0.0); @@ -432,32 +440,32 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) if (retval == ARK_ROOT_RETURN) { + num_orbits += SUN_RCONST(0.5); + fprintf(stdout, "ROOT RETURN:\t"); SPRKStepGetRootInfo(arkode_mem, &rootsfound); - fprintf(stdout, "t = %.4Lf g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg\n", tret, - rootsfound, N_VGetArrayPointer(y)[0], N_VGetArrayPointer(y)[1]); + fprintf(stdout, " g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg, num. orbits is now %.2Lf\n", + rootsfound, (long double)ydata[0], (long double)ydata[1], + (long double)num_orbits); fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0); - - /* Continue to tout */ - retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + (long double)tret, (long double)(Hamiltonian(y) - H0), + (long double)(AngularMomentum(y) - L0)); } + else if (retval >= 0) + { + /* Output current integration status */ + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + (long double)tret, (long double)(Hamiltonian(y) - H0), + (long double)(AngularMomentum(y) - L0)); + fprintf(times_fp, "%.16Lf\n", (long double)tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", (long double)Hamiltonian(y), + (long double)AngularMomentum(y)); - /* Output current integration status */ - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), - AngularMomentum(y)); - - N_VPrintFile(y, solution_fp); + N_VPrintFile(y, solution_fp); - /* Check if the solve was successful, if so, update the time and continue - */ - if (retval >= 0) - { tout += dTout; tout = (tout > Tf) ? Tf : tout; + iout++; } else { @@ -468,8 +476,10 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) } else { - for (iout = 0; iout < num_output_times; iout++) + while (iout < num_output_times) { + sunrealtype hlast = SUN_RCONST(0.0); + /* Optional: if the stop time is not set, then its possible that the the exact requested output time will not be hit (even with a fixed time-step due to roundoff error accumulation) and interpolation will be @@ -479,35 +489,36 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) if (retval == ARK_ROOT_RETURN) { + num_orbits += SUN_RCONST(0.5); + fprintf(stdout, "ROOT RETURN:\t"); ARKStepGetRootInfo(arkode_mem, &rootsfound); - fprintf(stdout, "t = %.4Lf g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg\n", tret, - rootsfound, N_VGetArrayPointer(y)[0], N_VGetArrayPointer(y)[1]); + fprintf(stdout, " g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg, num. orbits is now %.2Lf\n", + rootsfound, (long double)ydata[0], (long double)ydata[1], + (long double)num_orbits); fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0); - - /* Continue to tout */ - retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + (long double)tret, (long double)(Hamiltonian(y) - H0), + (long double)(AngularMomentum(y) - L0)); } - - /* Output current integration status */ - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", - tret, Hamiltonian(y) - H0, AngularMomentum(y) - L0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", Hamiltonian(y), - AngularMomentum(y)); - N_VPrintFile(y, solution_fp); - - /* Check if the solve was successful, if so, update the time and continue - */ - if (retval >= 0) + else if (retval >= 0) { + /* Output current integration status */ + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + (long double)tret, (long double)(Hamiltonian(y) - H0), + (long double)(AngularMomentum(y) - L0)); + fprintf(times_fp, "%.16Lf\n", (long double)tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", (long double)Hamiltonian(y), + (long double)AngularMomentum(y)); + + N_VPrintFile(y, solution_fp); + tout += dTout; tout = (tout > Tf) ? Tf : tout; + iout++; } else { - fprintf(stderr, "ERROR: Solver failure, stopping integration\n"); + fprintf(stderr, "Solver failure, stopping integration\n"); break; } } @@ -619,11 +630,9 @@ int rootfn(sunrealtype t, N_Vector yvec, sunrealtype* gout, void* user_data) { UserData udata = (UserData)user_data; sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype q1 = y[0]; const sunrealtype q2 = y[1]; - /* We want to know when the body crosses the position (0.36, -0.22) */ - gout[0] = (q1 - SUN_RCONST(0.36)) + (q2 + SUN_RCONST(0.22)); + gout[0] = q2; return 0; } @@ -653,7 +662,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->step_mode = 0; args->stepper = 0; args->method_name = NULL; - args->find_roots = 0; + args->count_orbits = 0; args->use_compsums = 0; args->dt = SUN_RCONST(1e-2); args->tf = SUN_RCONST(100.); @@ -704,7 +713,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) argi++; args->num_output_times = atoi(argv[argi]); } - else if (!strcmp(argv[argi], "--find-roots")) { args->find_roots = 1; } + else if (!strcmp(argv[argi], "--count-orbits")) { args->count_orbits = 1; } else if (!strcmp(argv[argi], "--use-compensated-sums")) { args->use_compsums = 1; @@ -770,7 +779,8 @@ void PrintHelp() "simulation (default 100)\n"); fprintf(stderr, " --nout the number of output times " "(default 100)\n"); - fprintf(stderr, " --find-roots turns on rootfinding\n"); + fprintf(stderr, " --count-orbits use rootfinding to count the " + "number of completed orbits\n"); fprintf(stderr, " --check-order compute the order of the method used " "and check if it is within range of the expected\n"); diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--find-roots.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out similarity index 93% rename from examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--find-roots.out rename to examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out index 9307d57e8d..3c3dff90de 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--find-roots.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out @@ -20,8 +20,6 @@ t = 0.7000, H(p,q)-H0 = -0.0000000373845837, L(p,q)-L0 = -0.0000000009838701 t = 0.8000, H(p,q)-H0 = -0.0000000374806094, L(p,q)-L0 = -0.0000000009845156 t = 0.9000, H(p,q)-H0 = -0.0000000375353342, L(p,q)-L0 = -0.0000000009848300 t = 1.0000, H(p,q)-H0 = -0.0000000375674831, L(p,q)-L0 = -0.0000000009849955 -ROOT RETURN: t = 1.0305 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 1.0305, H(p,q)-H0 = -0.0000000375684264, L(p,q)-L0 = -0.0000000009740738 t = 1.1000, H(p,q)-H0 = -0.0000000375869624, L(p,q)-L0 = -0.0000000009850890 t = 1.2000, H(p,q)-H0 = -0.0000000375991196, L(p,q)-L0 = -0.0000000009851442 t = 1.3000, H(p,q)-H0 = -0.0000000376069209, L(p,q)-L0 = -0.0000000009851789 @@ -43,6 +41,8 @@ t = 2.8000, H(p,q)-H0 = -0.0000000376239300, L(p,q)-L0 = -0.0000000009852608 t = 2.9000, H(p,q)-H0 = -0.0000000376239746, L(p,q)-L0 = -0.0000000009852614 t = 3.0000, H(p,q)-H0 = -0.0000000376240032, L(p,q)-L0 = -0.0000000009852625 t = 3.1000, H(p,q)-H0 = -0.0000000376240172, L(p,q)-L0 = -0.0000000009852634 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.84367e-14, num. orbits is now 0.50 +t = 3.1416, H(p,q)-H0 = -0.0000000376233068, L(p,q)-L0 = -0.0000000009834125 t = 3.2000, H(p,q)-H0 = -0.0000000376240173, L(p,q)-L0 = -0.0000000009852644 t = 3.3000, H(p,q)-H0 = -0.0000000376240037, L(p,q)-L0 = -0.0000000009852654 t = 3.4000, H(p,q)-H0 = -0.0000000376239754, L(p,q)-L0 = -0.0000000009852664 @@ -73,9 +73,9 @@ t = 5.8000, H(p,q)-H0 = -0.0000000368740779, L(p,q)-L0 = -0.0000000009923597 t = 5.9000, H(p,q)-H0 = -0.0000000363018533, L(p,q)-L0 = -0.0000000010036497 t = 6.0000, H(p,q)-H0 = -0.0000000350889811, L(p,q)-L0 = -0.0000000010388295 t = 6.1000, H(p,q)-H0 = -0.0000000309316439, L(p,q)-L0 = -0.0000000011521937 -ROOT RETURN: t = 6.1690 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 6.1690, H(p,q)-H0 = -0.0000000290360871, L(p,q)-L0 = -0.0000000034672842 t = 6.2000, H(p,q)-H0 = -0.0000000181206687, L(p,q)-L0 = -0.0000000014682437 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.39906e-13, num. orbits is now 1.00 +t = 6.2832, H(p,q)-H0 = -0.0000001669914971, L(p,q)-L0 = -0.0000000371745501 t = 6.3000, H(p,q)-H0 = -0.0000000119458055, L(p,q)-L0 = -0.0000000020348256 t = 6.4000, H(p,q)-H0 = -0.0000000302352290, L(p,q)-L0 = -0.0000000025489727 t = 6.5000, H(p,q)-H0 = -0.0000000426121982, L(p,q)-L0 = -0.0000000027950873 @@ -87,8 +87,6 @@ t = 7.0000, H(p,q)-H0 = -0.0000000482806308, L(p,q)-L0 = -0.0000000029156998 t = 7.1000, H(p,q)-H0 = -0.0000000483678173, L(p,q)-L0 = -0.0000000029162688 t = 7.2000, H(p,q)-H0 = -0.0000000484177519, L(p,q)-L0 = -0.0000000029165501 t = 7.3000, H(p,q)-H0 = -0.0000000484472411, L(p,q)-L0 = -0.0000000029167009 -ROOT RETURN: t = 7.3137 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 7.3137, H(p,q)-H0 = -0.0000000482981759, L(p,q)-L0 = -0.0000000026370134 t = 7.4000, H(p,q)-H0 = -0.0000000484651992, L(p,q)-L0 = -0.0000000029167861 t = 7.5000, H(p,q)-H0 = -0.0000000484764615, L(p,q)-L0 = -0.0000000029168371 t = 7.6000, H(p,q)-H0 = -0.0000000484837200, L(p,q)-L0 = -0.0000000029168692 @@ -110,6 +108,8 @@ t = 9.1000, H(p,q)-H0 = -0.0000000484997233, L(p,q)-L0 = -0.0000000029169479 t = 9.2000, H(p,q)-H0 = -0.0000000484997655, L(p,q)-L0 = -0.0000000029169489 t = 9.3000, H(p,q)-H0 = -0.0000000484997914, L(p,q)-L0 = -0.0000000029169498 t = 9.4000, H(p,q)-H0 = -0.0000000484998032, L(p,q)-L0 = -0.0000000029169505 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.19862e-14, num. orbits is now 1.50 +t = 9.4248, H(p,q)-H0 = -0.0000000484973304, L(p,q)-L0 = -0.0000000029105197 t = 9.5000, H(p,q)-H0 = -0.0000000484998012, L(p,q)-L0 = -0.0000000029169516 t = 9.6000, H(p,q)-H0 = -0.0000000484997852, L(p,q)-L0 = -0.0000000029169526 t = 9.7000, H(p,q)-H0 = -0.0000000484997542, L(p,q)-L0 = -0.0000000029169535 @@ -140,9 +140,9 @@ t = 12.1000, H(p,q)-H0 = -0.0000000476758215, L(p,q)-L0 = -0.0000000029252073 t = 12.2000, H(p,q)-H0 = -0.0000000470399959, L(p,q)-L0 = -0.0000000029387919 t = 12.3000, H(p,q)-H0 = -0.0000000455998068, L(p,q)-L0 = -0.0000000029816551 t = 12.4000, H(p,q)-H0 = -0.0000000403673206, L(p,q)-L0 = -0.0000000031186767 -ROOT RETURN: t = 12.4522 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 12.4522, H(p,q)-H0 = -0.0000000615611286, L(p,q)-L0 = -0.0000000122994397 t = 12.5000, H(p,q)-H0 = -0.0000000264097049, L(p,q)-L0 = -0.0000000034814185 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.79189e-13, num. orbits is now 2.00 +t = 12.5664, H(p,q)-H0 = -0.0000001990599761, L(p,q)-L0 = -0.0000000438879749 t = 12.6000, H(p,q)-H0 = -0.0000000248257395, L(p,q)-L0 = -0.0000000040677957 t = 12.7000, H(p,q)-H0 = -0.0000000441475145, L(p,q)-L0 = -0.0000000045400393 t = 12.8000, H(p,q)-H0 = -0.0000000544472503, L(p,q)-L0 = -0.0000000047481248 @@ -153,8 +153,6 @@ t = 13.2000, H(p,q)-H0 = -0.0000000590331863, L(p,q)-L0 = -0.0000000048464244 t = 13.3000, H(p,q)-H0 = -0.0000000591747902, L(p,q)-L0 = -0.0000000048475159 t = 13.4000, H(p,q)-H0 = -0.0000000592540124, L(p,q)-L0 = -0.0000000048480178 t = 13.5000, H(p,q)-H0 = -0.0000000592996148, L(p,q)-L0 = -0.0000000048482691 -ROOT RETURN: t = 13.5969 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 13.5969, H(p,q)-H0 = -0.0000000591936562, L(p,q)-L0 = -0.0000000046048778 t = 13.6000, H(p,q)-H0 = -0.0000000593266857, L(p,q)-L0 = -0.0000000048484048 t = 13.7000, H(p,q)-H0 = -0.0000000593432556, L(p,q)-L0 = -0.0000000048484827 t = 13.8000, H(p,q)-H0 = -0.0000000593536968, L(p,q)-L0 = -0.0000000048485300 @@ -177,6 +175,8 @@ t = 15.4000, H(p,q)-H0 = -0.0000000593755194, L(p,q)-L0 = -0.0000000048486355 t = 15.5000, H(p,q)-H0 = -0.0000000593755587, L(p,q)-L0 = -0.0000000048486369 t = 15.6000, H(p,q)-H0 = -0.0000000593755822, L(p,q)-L0 = -0.0000000048486377 t = 15.7000, H(p,q)-H0 = -0.0000000593755920, L(p,q)-L0 = -0.0000000048486393 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.76977e-16, num. orbits is now 2.50 +t = 15.7080, H(p,q)-H0 = -0.0000000593745442, L(p,q)-L0 = -0.0000000048459146 t = 15.8000, H(p,q)-H0 = -0.0000000593755872, L(p,q)-L0 = -0.0000000048486396 t = 15.9000, H(p,q)-H0 = -0.0000000593755689, L(p,q)-L0 = -0.0000000048486408 t = 16.0000, H(p,q)-H0 = -0.0000000593755352, L(p,q)-L0 = -0.0000000048486415 @@ -207,9 +207,9 @@ t = 18.4000, H(p,q)-H0 = -0.0000000584699920, L(p,q)-L0 = -0.0000000048582733 t = 18.5000, H(p,q)-H0 = -0.0000000577596622, L(p,q)-L0 = -0.0000000048746636 t = 18.6000, H(p,q)-H0 = -0.0000000560199105, L(p,q)-L0 = -0.0000000049269229 t = 18.7000, H(p,q)-H0 = -0.0000000494869183, L(p,q)-L0 = -0.0000000050917097 -ROOT RETURN: t = 18.7354 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 18.7354, H(p,q)-H0 = -0.0000000978326402, L(p,q)-L0 = -0.0000000230376245 t = 18.8000, H(p,q)-H0 = -0.0000000350383482, L(p,q)-L0 = -0.0000000055021806 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.05664e-13, num. orbits is now 3.00 +t = 18.8496, H(p,q)-H0 = -0.0000000386706860, L(p,q)-L0 = -0.0000000071587682 t = 18.9000, H(p,q)-H0 = -0.0000000384657535, L(p,q)-L0 = -0.0000000060967349 t = 19.0000, H(p,q)-H0 = -0.0000000576671775, L(p,q)-L0 = -0.0000000065229255 t = 19.1000, H(p,q)-H0 = -0.0000000660850508, L(p,q)-L0 = -0.0000000066973844 @@ -220,8 +220,6 @@ t = 19.5000, H(p,q)-H0 = -0.0000000699390287, L(p,q)-L0 = -0.0000000067783563 t = 19.6000, H(p,q)-H0 = -0.0000000700672274, L(p,q)-L0 = -0.0000000067793084 t = 19.7000, H(p,q)-H0 = -0.0000000701392731, L(p,q)-L0 = -0.0000000067797532 t = 19.8000, H(p,q)-H0 = -0.0000000701809573, L(p,q)-L0 = -0.0000000067799798 -ROOT RETURN: t = 19.8800 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 19.8800, H(p,q)-H0 = -0.0000000702017527, L(p,q)-L0 = -0.0000000067800091 t = 19.9000, H(p,q)-H0 = -0.0000000702058314, L(p,q)-L0 = -0.0000000067801036 t = 20.0000, H(p,q)-H0 = -0.0000000702211327, L(p,q)-L0 = -0.0000000067801749 t = 20.1000, H(p,q)-H0 = -0.0000000702308205, L(p,q)-L0 = -0.0000000067802189 @@ -243,6 +241,8 @@ t = 21.6000, H(p,q)-H0 = -0.0000000702512519, L(p,q)-L0 = -0.0000000067803183 t = 21.7000, H(p,q)-H0 = -0.0000000702513059, L(p,q)-L0 = -0.0000000067803194 t = 21.8000, H(p,q)-H0 = -0.0000000702513424, L(p,q)-L0 = -0.0000000067803205 t = 21.9000, H(p,q)-H0 = -0.0000000702513636, L(p,q)-L0 = -0.0000000067803220 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.25419e-16, num. orbits is now 3.50 +t = 21.9911, H(p,q)-H0 = -0.0000000702509633, L(p,q)-L0 = -0.0000000067792636 t = 22.0000, H(p,q)-H0 = -0.0000000702513707, L(p,q)-L0 = -0.0000000067803231 t = 22.1000, H(p,q)-H0 = -0.0000000702513645, L(p,q)-L0 = -0.0000000067803247 t = 22.2000, H(p,q)-H0 = -0.0000000702513435, L(p,q)-L0 = -0.0000000067803255 @@ -274,9 +274,9 @@ t = 24.7000, H(p,q)-H0 = -0.0000000692557109, L(p,q)-L0 = -0.0000000067916174 t = 24.8000, H(p,q)-H0 = -0.0000000684561350, L(p,q)-L0 = -0.0000000068114442 t = 24.9000, H(p,q)-H0 = -0.0000000663202426, L(p,q)-L0 = -0.0000000068751607 t = 25.0000, H(p,q)-H0 = -0.0000000582801603, L(p,q)-L0 = -0.0000000070720761 -ROOT RETURN: t = 25.0186 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 25.0186, H(p,q)-H0 = -0.0000000673477174, L(p,q)-L0 = -0.0000000112233260 t = 25.1000, H(p,q)-H0 = -0.0000000442582238, L(p,q)-L0 = -0.0000000075293279 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.58359e-13, num. orbits is now 4.00 +t = 25.1327, H(p,q)-H0 = -0.0000001744439233, L(p,q)-L0 = -0.0000000372869364 t = 25.2000, H(p,q)-H0 = -0.0000000526228769, L(p,q)-L0 = -0.0000000081198200 t = 25.3000, H(p,q)-H0 = -0.0000000707752226, L(p,q)-L0 = -0.0000000084982439 t = 25.4000, H(p,q)-H0 = -0.0000000775684346, L(p,q)-L0 = -0.0000000086435084 @@ -287,8 +287,6 @@ t = 25.8000, H(p,q)-H0 = -0.0000000808419982, L(p,q)-L0 = -0.0000000087102652 t = 25.9000, H(p,q)-H0 = -0.0000000809581407, L(p,q)-L0 = -0.0000000087110980 t = 26.0000, H(p,q)-H0 = -0.0000000810237136, L(p,q)-L0 = -0.0000000087114930 t = 26.1000, H(p,q)-H0 = -0.0000000810618471, L(p,q)-L0 = -0.0000000087116955 -ROOT RETURN: t = 26.1632 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 26.1632, H(p,q)-H0 = -0.0000000809433990, L(p,q)-L0 = -0.0000000084649708 t = 26.2000, H(p,q)-H0 = -0.0000000810847210, L(p,q)-L0 = -0.0000000087118069 t = 26.3000, H(p,q)-H0 = -0.0000000810988622, L(p,q)-L0 = -0.0000000087118719 t = 26.4000, H(p,q)-H0 = -0.0000000811078569, L(p,q)-L0 = -0.0000000087119124 @@ -310,6 +308,8 @@ t = 27.9000, H(p,q)-H0 = -0.0000000811270443, L(p,q)-L0 = -0.0000000087120050 t = 28.0000, H(p,q)-H0 = -0.0000000811270948, L(p,q)-L0 = -0.0000000087120056 t = 28.1000, H(p,q)-H0 = -0.0000000811271282, L(p,q)-L0 = -0.0000000087120061 t = 28.2000, H(p,q)-H0 = -0.0000000811271469, L(p,q)-L0 = -0.0000000087120071 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.5626e-13, num. orbits is now 4.50 +t = 28.2743, H(p,q)-H0 = -0.0000000811247572, L(p,q)-L0 = -0.0000000087057825 t = 28.3000, H(p,q)-H0 = -0.0000000811271516, L(p,q)-L0 = -0.0000000087120080 t = 28.4000, H(p,q)-H0 = -0.0000000811271426, L(p,q)-L0 = -0.0000000087120091 t = 28.5000, H(p,q)-H0 = -0.0000000811271192, L(p,q)-L0 = -0.0000000087120101 @@ -341,9 +341,9 @@ t = 31.0000, H(p,q)-H0 = -0.0000000800318825, L(p,q)-L0 = -0.0000000087252835 t = 31.1000, H(p,q)-H0 = -0.0000000791227814, L(p,q)-L0 = -0.0000000087493244 t = 31.2000, H(p,q)-H0 = -0.0000000764649557, L(p,q)-L0 = -0.0000000088269498 t = 31.3000, H(p,q)-H0 = -0.0000000667737108, L(p,q)-L0 = -0.0000000090604118 -ROOT RETURN: t = 31.3017 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 31.3017, H(p,q)-H0 = -0.0000000863809189, L(p,q)-L0 = -0.0000000155146035 t = 31.4000, H(p,q)-H0 = -0.0000000542914591, L(p,q)-L0 = -0.0000000095611543 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 7.93636e-16, num. orbits is now 5.00 +t = 31.4159, H(p,q)-H0 = -0.0000002477778185, L(p,q)-L0 = -0.0000000533154386 t = 31.5000, H(p,q)-H0 = -0.0000000670306719, L(p,q)-L0 = -0.0000000101356428 t = 31.6000, H(p,q)-H0 = -0.0000000834908505, L(p,q)-L0 = -0.0000000104667233 t = 31.7000, H(p,q)-H0 = -0.0000000889325074, L(p,q)-L0 = -0.0000000105870224 @@ -354,8 +354,6 @@ t = 32.1000, H(p,q)-H0 = -0.0000000917423686, L(p,q)-L0 = -0.0000000106421368 t = 32.2000, H(p,q)-H0 = -0.0000000918476626, L(p,q)-L0 = -0.0000000106428659 t = 32.3000, H(p,q)-H0 = -0.0000000919073938, L(p,q)-L0 = -0.0000000106432165 t = 32.4000, H(p,q)-H0 = -0.0000000919423115, L(p,q)-L0 = -0.0000000106433993 -ROOT RETURN: t = 32.4464 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 32.4464, H(p,q)-H0 = -0.0000000918026397, L(p,q)-L0 = -0.0000000103661820 t = 32.5000, H(p,q)-H0 = -0.0000000919633653, L(p,q)-L0 = -0.0000000106435013 t = 32.6000, H(p,q)-H0 = -0.0000000919764453, L(p,q)-L0 = -0.0000000106435613 t = 32.7000, H(p,q)-H0 = -0.0000000919848028, L(p,q)-L0 = -0.0000000106435986 @@ -377,6 +375,8 @@ t = 34.2000, H(p,q)-H0 = -0.0000000920028356, L(p,q)-L0 = -0.0000000106436875 t = 34.3000, H(p,q)-H0 = -0.0000000920028832, L(p,q)-L0 = -0.0000000106436883 t = 34.4000, H(p,q)-H0 = -0.0000000920029144, L(p,q)-L0 = -0.0000000106436893 t = 34.5000, H(p,q)-H0 = -0.0000000920029305, L(p,q)-L0 = -0.0000000106436898 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.90995e-13, num. orbits is now 5.50 +t = 34.5575, H(p,q)-H0 = -0.0000000920015440, L(p,q)-L0 = -0.0000000106400774 t = 34.6000, H(p,q)-H0 = -0.0000000920029328, L(p,q)-L0 = -0.0000000106436905 t = 34.7000, H(p,q)-H0 = -0.0000000920029215, L(p,q)-L0 = -0.0000000106436917 t = 34.8000, H(p,q)-H0 = -0.0000000920028955, L(p,q)-L0 = -0.0000000106436923 @@ -407,9 +407,9 @@ t = 37.2000, H(p,q)-H0 = -0.0000000913167905, L(p,q)-L0 = -0.0000000106498567 t = 37.3000, H(p,q)-H0 = -0.0000000907971338, L(p,q)-L0 = -0.0000000106593594 t = 37.4000, H(p,q)-H0 = -0.0000000897503700, L(p,q)-L0 = -0.0000000106885705 t = 37.5000, H(p,q)-H0 = -0.0000000864122607, L(p,q)-L0 = -0.0000000107829846 -ROOT RETURN: t = 37.5849 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 37.5849, H(p,q)-H0 = -0.0000001317774294, L(p,q)-L0 = -0.0000000291994051 t = 37.6000, H(p,q)-H0 = -0.0000000750453213, L(p,q)-L0 = -0.0000000110571754 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 7.20874e-13, num. orbits is now 6.00 +t = 37.6991, H(p,q)-H0 = -0.0000000872834929, L(p,q)-L0 = -0.0000000165621049 t = 37.7000, H(p,q)-H0 = -0.0000000652864798, L(p,q)-L0 = -0.0000000115956111 t = 37.8000, H(p,q)-H0 = -0.0000000814422616, L(p,q)-L0 = -0.0000000121433266 t = 37.9000, H(p,q)-H0 = -0.0000000958562416, L(p,q)-L0 = -0.0000000124291885 @@ -421,8 +421,6 @@ t = 38.4000, H(p,q)-H0 = -0.0000001026404101, L(p,q)-L0 = -0.0000000125739883 t = 38.5000, H(p,q)-H0 = -0.0000001027359420, L(p,q)-L0 = -0.0000000125746296 t = 38.6000, H(p,q)-H0 = -0.0000001027904003, L(p,q)-L0 = -0.0000000125749428 t = 38.7000, H(p,q)-H0 = -0.0000001028224009, L(p,q)-L0 = -0.0000000125751077 -ROOT RETURN: t = 38.7296 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 38.7296, H(p,q)-H0 = -0.0000001028247512, L(p,q)-L0 = -0.0000000125669291 t = 38.8000, H(p,q)-H0 = -0.0000001028417953, L(p,q)-L0 = -0.0000000125752007 t = 38.9000, H(p,q)-H0 = -0.0000001028539034, L(p,q)-L0 = -0.0000000125752562 t = 39.0000, H(p,q)-H0 = -0.0000001028616745, L(p,q)-L0 = -0.0000000125752908 @@ -444,6 +442,8 @@ t = 40.5000, H(p,q)-H0 = -0.0000001028786304, L(p,q)-L0 = -0.0000000125753749 t = 40.6000, H(p,q)-H0 = -0.0000001028786749, L(p,q)-L0 = -0.0000000125753756 t = 40.7000, H(p,q)-H0 = -0.0000001028787032, L(p,q)-L0 = -0.0000000125753764 t = 40.8000, H(p,q)-H0 = -0.0000001028787173, L(p,q)-L0 = -0.0000000125753777 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.26242e-13, num. orbits is now 6.50 +t = 40.8407, H(p,q)-H0 = -0.0000001028785540, L(p,q)-L0 = -0.0000000125749489 t = 40.9000, H(p,q)-H0 = -0.0000001028787177, L(p,q)-L0 = -0.0000000125753791 t = 41.0000, H(p,q)-H0 = -0.0000001028787039, L(p,q)-L0 = -0.0000000125753797 t = 41.1000, H(p,q)-H0 = -0.0000001028786754, L(p,q)-L0 = -0.0000000125753807 @@ -474,9 +474,9 @@ t = 43.5000, H(p,q)-H0 = -0.0000001021250062, L(p,q)-L0 = -0.0000000125825277 t = 43.6000, H(p,q)-H0 = -0.0000001015496205, L(p,q)-L0 = -0.0000000125939299 t = 43.7000, H(p,q)-H0 = -0.0000001003261163, L(p,q)-L0 = -0.0000000126294811 t = 43.8000, H(p,q)-H0 = -0.0000000961170694, L(p,q)-L0 = -0.0000000127440090 -ROOT RETURN: t = 43.8681 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 43.8681, H(p,q)-H0 = -0.0000001066932902, L(p,q)-L0 = -0.0000000193143932 t = 43.9000, H(p,q)-H0 = -0.0000000832329459, L(p,q)-L0 = -0.0000000130624954 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 9.76298e-13, num. orbits is now 7.00 +t = 43.9823, H(p,q)-H0 = -0.0000001792544178, L(p,q)-L0 = -0.0000000368028036 t = 44.0000, H(p,q)-H0 = -0.0000000772849236, L(p,q)-L0 = -0.0000000136304049 t = 44.1000, H(p,q)-H0 = -0.0000000956608024, L(p,q)-L0 = -0.0000000141424648 t = 44.2000, H(p,q)-H0 = -0.0000001079238068, L(p,q)-L0 = -0.0000000143864448 @@ -488,8 +488,6 @@ t = 44.7000, H(p,q)-H0 = -0.0000001135363544, L(p,q)-L0 = -0.0000000145058183 t = 44.8000, H(p,q)-H0 = -0.0000001136230946, L(p,q)-L0 = -0.0000000145063828 t = 44.9000, H(p,q)-H0 = -0.0000001136727873, L(p,q)-L0 = -0.0000000145066626 t = 45.0000, H(p,q)-H0 = -0.0000001137021408, L(p,q)-L0 = -0.0000000145068115 -ROOT RETURN: t = 45.0128 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 45.0128, H(p,q)-H0 = -0.0000001135921330, L(p,q)-L0 = -0.0000000142993943 t = 45.1000, H(p,q)-H0 = -0.0000001137200214, L(p,q)-L0 = -0.0000000145068958 t = 45.2000, H(p,q)-H0 = -0.0000001137312385, L(p,q)-L0 = -0.0000000145069469 t = 45.3000, H(p,q)-H0 = -0.0000001137384691, L(p,q)-L0 = -0.0000000145069785 @@ -511,6 +509,8 @@ t = 46.8000, H(p,q)-H0 = -0.0000001137544215, L(p,q)-L0 = -0.0000000145070588 t = 46.9000, H(p,q)-H0 = -0.0000001137544632, L(p,q)-L0 = -0.0000000145070593 t = 47.0000, H(p,q)-H0 = -0.0000001137544889, L(p,q)-L0 = -0.0000000145070601 t = 47.1000, H(p,q)-H0 = -0.0000001137545003, L(p,q)-L0 = -0.0000000145070608 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.6284e-13, num. orbits is now 7.50 +t = 47.1239, H(p,q)-H0 = -0.0000001137522623, L(p,q)-L0 = -0.0000000145012401 t = 47.2000, H(p,q)-H0 = -0.0000001137544982, L(p,q)-L0 = -0.0000000145070616 t = 47.3000, H(p,q)-H0 = -0.0000001137544818, L(p,q)-L0 = -0.0000000145070622 t = 47.4000, H(p,q)-H0 = -0.0000001137544509, L(p,q)-L0 = -0.0000000145070634 @@ -541,9 +541,9 @@ t = 49.8000, H(p,q)-H0 = -0.0000001129263574, L(p,q)-L0 = -0.0000000145153829 t = 49.9000, H(p,q)-H0 = -0.0000001122868578, L(p,q)-L0 = -0.0000000145291035 t = 50.0000, H(p,q)-H0 = -0.0000001108326948, L(p,q)-L0 = -0.0000000145724222 t = 50.1000, H(p,q)-H0 = -0.0000001055364578, L(p,q)-L0 = -0.0000000147108190 -ROOT RETURN: t = 50.1513 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 50.1513, H(p,q)-H0 = -0.0000001114974815, L(p,q)-L0 = -0.0000000188467024 t = 50.2000, H(p,q)-H0 = -0.0000000915336087, L(p,q)-L0 = -0.0000000150760981 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 4.25441e-15, num. orbits is now 8.00 +t = 50.2655, H(p,q)-H0 = -0.0000002905677339, L(p,q)-L0 = -0.0000000614048129 t = 50.3000, H(p,q)-H0 = -0.0000000902107362, L(p,q)-L0 = -0.0000000156632152 t = 50.4000, H(p,q)-H0 = -0.0000001095536482, L(p,q)-L0 = -0.0000000161330825 t = 50.5000, H(p,q)-H0 = -0.0000001197471942, L(p,q)-L0 = -0.0000000163392598 @@ -554,8 +554,6 @@ t = 50.9000, H(p,q)-H0 = -0.0000001242895604, L(p,q)-L0 = -0.0000000164365455 t = 51.0000, H(p,q)-H0 = -0.0000001244304126, L(p,q)-L0 = -0.0000000164376296 t = 51.1000, H(p,q)-H0 = -0.0000001245092338, L(p,q)-L0 = -0.0000000164381290 t = 51.2000, H(p,q)-H0 = -0.0000001245546178, L(p,q)-L0 = -0.0000000164383799 -ROOT RETURN: t = 51.2960 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 51.2960, H(p,q)-H0 = -0.0000001244159860, L(p,q)-L0 = -0.0000000161354881 t = 51.3000, H(p,q)-H0 = -0.0000001245815663, L(p,q)-L0 = -0.0000000164385151 t = 51.4000, H(p,q)-H0 = -0.0000001245980652, L(p,q)-L0 = -0.0000000164385927 t = 51.5000, H(p,q)-H0 = -0.0000001246084648, L(p,q)-L0 = -0.0000000164386396 @@ -578,6 +576,8 @@ t = 53.1000, H(p,q)-H0 = -0.0000001246302127, L(p,q)-L0 = -0.0000000164387436 t = 53.2000, H(p,q)-H0 = -0.0000001246302517, L(p,q)-L0 = -0.0000000164387445 t = 53.3000, H(p,q)-H0 = -0.0000001246302751, L(p,q)-L0 = -0.0000000164387456 t = 53.4000, H(p,q)-H0 = -0.0000001246302840, L(p,q)-L0 = -0.0000000164387460 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.15573e-18, num. orbits is now 8.50 +t = 53.4071, H(p,q)-H0 = -0.0000001246285708, L(p,q)-L0 = -0.0000000164342915 t = 53.5000, H(p,q)-H0 = -0.0000001246302794, L(p,q)-L0 = -0.0000000164387469 t = 53.6000, H(p,q)-H0 = -0.0000001246302612, L(p,q)-L0 = -0.0000000164387480 t = 53.7000, H(p,q)-H0 = -0.0000001246302275, L(p,q)-L0 = -0.0000000164387494 @@ -608,9 +608,9 @@ t = 56.1000, H(p,q)-H0 = -0.0000001237200922, L(p,q)-L0 = -0.0000000164484628 t = 56.2000, H(p,q)-H0 = -0.0000001230054045, L(p,q)-L0 = -0.0000000164650191 t = 56.3000, H(p,q)-H0 = -0.0000001212471616, L(p,q)-L0 = -0.0000000165178364 t = 56.4000, H(p,q)-H0 = -0.0000001146384911, L(p,q)-L0 = -0.0000000166842291 -ROOT RETURN: t = 56.4345 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 56.4345, H(p,q)-H0 = -0.0000001639668279, L(p,q)-L0 = -0.0000000347738256 t = 56.5000, H(p,q)-H0 = -0.0000001001873835, L(p,q)-L0 = -0.0000000170972445 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.08511e-12, num. orbits is now 9.00 +t = 56.5487, H(p,q)-H0 = -0.0000001428438574, L(p,q)-L0 = -0.0000000275339065 t = 56.6000, H(p,q)-H0 = -0.0000001038851334, L(p,q)-L0 = -0.0000000176918925 t = 56.7000, H(p,q)-H0 = -0.0000001230515878, L(p,q)-L0 = -0.0000000181155525 t = 56.8000, H(p,q)-H0 = -0.0000001313757902, L(p,q)-L0 = -0.0000000182883400 @@ -621,8 +621,6 @@ t = 57.2000, H(p,q)-H0 = -0.0000001351952506, L(p,q)-L0 = -0.0000000183684786 t = 57.3000, H(p,q)-H0 = -0.0000001353227711, L(p,q)-L0 = -0.0000000183694233 t = 57.4000, H(p,q)-H0 = -0.0000001353944539, L(p,q)-L0 = -0.0000000183698653 t = 57.5000, H(p,q)-H0 = -0.0000001354359381, L(p,q)-L0 = -0.0000000183700896 -ROOT RETURN: t = 57.5791 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 57.5791, H(p,q)-H0 = -0.0000001354387766, L(p,q)-L0 = -0.0000000183374248 t = 57.6000, H(p,q)-H0 = -0.0000001354607000, L(p,q)-L0 = -0.0000000183702118 t = 57.7000, H(p,q)-H0 = -0.0000001354759361, L(p,q)-L0 = -0.0000000183702825 t = 57.8000, H(p,q)-H0 = -0.0000001354855848, L(p,q)-L0 = -0.0000000183703258 @@ -644,6 +642,8 @@ t = 59.3000, H(p,q)-H0 = -0.0000001355059469, L(p,q)-L0 = -0.0000000183704245 t = 59.4000, H(p,q)-H0 = -0.0000001355060005, L(p,q)-L0 = -0.0000000183704255 t = 59.5000, H(p,q)-H0 = -0.0000001355060368, L(p,q)-L0 = -0.0000000183704266 t = 59.6000, H(p,q)-H0 = -0.0000001355060580, L(p,q)-L0 = -0.0000000183704280 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.53192e-13, num. orbits is now 9.50 +t = 59.6902, H(p,q)-H0 = -0.0000001355060429, L(p,q)-L0 = -0.0000000183703716 t = 59.7000, H(p,q)-H0 = -0.0000001355060648, L(p,q)-L0 = -0.0000000183704284 t = 59.8000, H(p,q)-H0 = -0.0000001355060578, L(p,q)-L0 = -0.0000000183704294 t = 59.9000, H(p,q)-H0 = -0.0000001355060362, L(p,q)-L0 = -0.0000000183704296 @@ -675,9 +675,9 @@ t = 62.4000, H(p,q)-H0 = -0.0000001345053224, L(p,q)-L0 = -0.0000000183818172 t = 62.5000, H(p,q)-H0 = -0.0000001337004563, L(p,q)-L0 = -0.0000000184018487 t = 62.6000, H(p,q)-H0 = -0.0000001315400913, L(p,q)-L0 = -0.0000000184662441 t = 62.7000, H(p,q)-H0 = -0.0000001234144738, L(p,q)-L0 = -0.0000000186650045 -ROOT RETURN: t = 62.7177 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 62.7177, H(p,q)-H0 = -0.0000001465321100, L(p,q)-L0 = -0.0000000275523243 t = 62.8000, H(p,q)-H0 = -0.0000001094454982, L(p,q)-L0 = -0.0000000191246895 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.39067e-12, num. orbits is now 10.00 +t = 62.8318, H(p,q)-H0 = -0.0000001832015384, L(p,q)-L0 = -0.0000000361236007 t = 62.9000, H(p,q)-H0 = -0.0000001180626392, L(p,q)-L0 = -0.0000000197146204 t = 63.0000, H(p,q)-H0 = -0.0000001361380413, L(p,q)-L0 = -0.0000000200904822 t = 63.1000, H(p,q)-H0 = -0.0000001428520109, L(p,q)-L0 = -0.0000000202343062 @@ -688,8 +688,6 @@ t = 63.5000, H(p,q)-H0 = -0.0000001460980743, L(p,q)-L0 = -0.0000000203003808 t = 63.6000, H(p,q)-H0 = -0.0000001462136063, L(p,q)-L0 = -0.0000000203012070 t = 63.7000, H(p,q)-H0 = -0.0000001462788516, L(p,q)-L0 = -0.0000000203015996 t = 63.8000, H(p,q)-H0 = -0.0000001463168047, L(p,q)-L0 = -0.0000000203018010 -ROOT RETURN: t = 63.8623 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 63.8623, H(p,q)-H0 = -0.0000001462431727, L(p,q)-L0 = -0.0000000201380640 t = 63.9000, H(p,q)-H0 = -0.0000001463395776, L(p,q)-L0 = -0.0000000203019122 t = 64.0000, H(p,q)-H0 = -0.0000001463536597, L(p,q)-L0 = -0.0000000203019773 t = 64.1000, H(p,q)-H0 = -0.0000001463626185, L(p,q)-L0 = -0.0000000203020173 @@ -711,6 +709,8 @@ t = 65.6000, H(p,q)-H0 = -0.0000001463817435, L(p,q)-L0 = -0.0000000203021112 t = 65.7000, H(p,q)-H0 = -0.0000001463817941, L(p,q)-L0 = -0.0000000203021122 t = 65.8000, H(p,q)-H0 = -0.0000001463818275, L(p,q)-L0 = -0.0000000203021131 t = 65.9000, H(p,q)-H0 = -0.0000001463818458, L(p,q)-L0 = -0.0000000203021135 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -9.67217e-16, num. orbits is now 10.50 +t = 65.9734, H(p,q)-H0 = -0.0000001463798367, L(p,q)-L0 = -0.0000000202968783 t = 66.0000, H(p,q)-H0 = -0.0000001463818502, L(p,q)-L0 = -0.0000000203021142 t = 66.1000, H(p,q)-H0 = -0.0000001463818412, L(p,q)-L0 = -0.0000000203021153 t = 66.2000, H(p,q)-H0 = -0.0000001463818174, L(p,q)-L0 = -0.0000000203021159 @@ -742,9 +742,9 @@ t = 68.7000, H(p,q)-H0 = -0.0000001452809537, L(p,q)-L0 = -0.0000000203155135 t = 68.8000, H(p,q)-H0 = -0.0000001443652686, L(p,q)-L0 = -0.0000000203398052 t = 68.9000, H(p,q)-H0 = -0.0000001416752902, L(p,q)-L0 = -0.0000000204182535 t = 69.0000, H(p,q)-H0 = -0.0000001318934946, L(p,q)-L0 = -0.0000000206537967 -ROOT RETURN: t = 69.0008 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 69.0008, H(p,q)-H0 = -0.0000001376758079, L(p,q)-L0 = -0.0000000225437481 t = 69.1000, H(p,q)-H0 = -0.0000001195272865, L(p,q)-L0 = -0.0000000211567287 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 3.1196e-13, num. orbits is now 11.00 +t = 69.1150, H(p,q)-H0 = -0.0000003268473989, L(p,q)-L0 = -0.0000000680246428 t = 69.2000, H(p,q)-H0 = -0.0000001324768200, L(p,q)-L0 = -0.0000000217300407 t = 69.3000, H(p,q)-H0 = -0.0000001488338410, L(p,q)-L0 = -0.0000000220586303 t = 69.4000, H(p,q)-H0 = -0.0000001542105799, L(p,q)-L0 = -0.0000000221777037 @@ -755,8 +755,6 @@ t = 69.8000, H(p,q)-H0 = -0.0000001569983185, L(p,q)-L0 = -0.0000000222322579 t = 69.9000, H(p,q)-H0 = -0.0000001571030630, L(p,q)-L0 = -0.0000000222329820 t = 70.0000, H(p,q)-H0 = -0.0000001571624983, L(p,q)-L0 = -0.0000000222333307 t = 70.1000, H(p,q)-H0 = -0.0000001571972524, L(p,q)-L0 = -0.0000000222335126 -ROOT RETURN: t = 70.1455 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 70.1455, H(p,q)-H0 = -0.0000001570344533, L(p,q)-L0 = -0.0000000219142088 t = 70.2000, H(p,q)-H0 = -0.0000001572182133, L(p,q)-L0 = -0.0000000222336138 t = 70.3000, H(p,q)-H0 = -0.0000001572312394, L(p,q)-L0 = -0.0000000222336739 t = 70.4000, H(p,q)-H0 = -0.0000001572395643, L(p,q)-L0 = -0.0000000222337111 @@ -778,6 +776,8 @@ t = 71.9000, H(p,q)-H0 = -0.0000001572575363, L(p,q)-L0 = -0.0000000222337982 t = 72.0000, H(p,q)-H0 = -0.0000001572575836, L(p,q)-L0 = -0.0000000222337992 t = 72.1000, H(p,q)-H0 = -0.0000001572576145, L(p,q)-L0 = -0.0000000222338001 t = 72.2000, H(p,q)-H0 = -0.0000001572576307, L(p,q)-L0 = -0.0000000222338011 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.95956e-13, num. orbits is now 11.50 +t = 72.2566, H(p,q)-H0 = -0.0000001572556351, L(p,q)-L0 = -0.0000000222286056 t = 72.3000, H(p,q)-H0 = -0.0000001572576328, L(p,q)-L0 = -0.0000000222338018 t = 72.4000, H(p,q)-H0 = -0.0000001572576213, L(p,q)-L0 = -0.0000000222338027 t = 72.5000, H(p,q)-H0 = -0.0000001572575952, L(p,q)-L0 = -0.0000000222338037 @@ -808,9 +808,9 @@ t = 74.9000, H(p,q)-H0 = -0.0000001565680252, L(p,q)-L0 = -0.0000000222400157 t = 75.0000, H(p,q)-H0 = -0.0000001560455560, L(p,q)-L0 = -0.0000000222496106 t = 75.1000, H(p,q)-H0 = -0.0000001549904116, L(p,q)-L0 = -0.0000000222791301 t = 75.2000, H(p,q)-H0 = -0.0000001516106689, L(p,q)-L0 = -0.0000000223745359 -ROOT RETURN: t = 75.2840 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 75.2840, H(p,q)-H0 = -0.0000001943678731, L(p,q)-L0 = -0.0000000397565374 t = 75.3000, H(p,q)-H0 = -0.0000001401563476, L(p,q)-L0 = -0.0000000226510208 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.67145e-12, num. orbits is now 12.00 +t = 75.3982, H(p,q)-H0 = -0.0000002026041726, L(p,q)-L0 = -0.0000000394538732 t = 75.4000, H(p,q)-H0 = -0.0000001305761277, L(p,q)-L0 = -0.0000000231912675 t = 75.5000, H(p,q)-H0 = -0.0000001468827575, L(p,q)-L0 = -0.0000000237372749 t = 75.6000, H(p,q)-H0 = -0.0000001611819829, L(p,q)-L0 = -0.0000000240207949 @@ -822,8 +822,6 @@ t = 76.1000, H(p,q)-H0 = -0.0000001678962392, L(p,q)-L0 = -0.0000000241641057 t = 76.2000, H(p,q)-H0 = -0.0000001679912754, L(p,q)-L0 = -0.0000000241647425 t = 76.3000, H(p,q)-H0 = -0.0000001680454652, L(p,q)-L0 = -0.0000000241650536 t = 76.4000, H(p,q)-H0 = -0.0000001680773167, L(p,q)-L0 = -0.0000000241652169 -ROOT RETURN: t = 76.4287 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 76.4287, H(p,q)-H0 = -0.0000001680465531, L(p,q)-L0 = -0.0000000240964780 t = 76.5000, H(p,q)-H0 = -0.0000001680966264, L(p,q)-L0 = -0.0000000241653098 t = 76.6000, H(p,q)-H0 = -0.0000001681086845, L(p,q)-L0 = -0.0000000241653648 t = 76.7000, H(p,q)-H0 = -0.0000001681164253, L(p,q)-L0 = -0.0000000241653996 @@ -845,6 +843,8 @@ t = 78.2000, H(p,q)-H0 = -0.0000001681333252, L(p,q)-L0 = -0.0000000241654828 t = 78.3000, H(p,q)-H0 = -0.0000001681333696, L(p,q)-L0 = -0.0000000241654836 t = 78.4000, H(p,q)-H0 = -0.0000001681333981, L(p,q)-L0 = -0.0000000241654848 t = 78.5000, H(p,q)-H0 = -0.0000001681334119, L(p,q)-L0 = -0.0000000241654858 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.30891e-13, num. orbits is now 12.50 +t = 78.5398, H(p,q)-H0 = -0.0000001681333961, L(p,q)-L0 = -0.0000000241654411 t = 78.6000, H(p,q)-H0 = -0.0000001681334119, L(p,q)-L0 = -0.0000000241654868 t = 78.7000, H(p,q)-H0 = -0.0000001681333978, L(p,q)-L0 = -0.0000000241654875 t = 78.8000, H(p,q)-H0 = -0.0000001681333688, L(p,q)-L0 = -0.0000000241654881 @@ -875,9 +875,9 @@ t = 81.2000, H(p,q)-H0 = -0.0000001673758805, L(p,q)-L0 = -0.0000000241726936 t = 81.3000, H(p,q)-H0 = -0.0000001667972822, L(p,q)-L0 = -0.0000000241842093 t = 81.4000, H(p,q)-H0 = -0.0000001655629038, L(p,q)-L0 = -0.0000000242201389 t = 81.5000, H(p,q)-H0 = -0.0000001613010943, L(p,q)-L0 = -0.0000000243358504 -ROOT RETURN: t = 81.5672 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 81.5672, H(p,q)-H0 = -0.0000001863589114, L(p,q)-L0 = -0.0000000357640320 t = 81.6000, H(p,q)-H0 = -0.0000001483443561, L(p,q)-L0 = -0.0000000246567998 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 6.46835e-16, num. orbits is now 13.00 +t = 81.6814, H(p,q)-H0 = -0.0000001884374701, L(p,q)-L0 = -0.0000000357351426 t = 81.7000, H(p,q)-H0 = -0.0000001426274230, L(p,q)-L0 = -0.0000000252260186 t = 81.8000, H(p,q)-H0 = -0.0000001610868208, L(p,q)-L0 = -0.0000000257359545 t = 81.9000, H(p,q)-H0 = -0.0000001732351738, L(p,q)-L0 = -0.0000000259777944 @@ -889,8 +889,6 @@ t = 82.4000, H(p,q)-H0 = -0.0000001787920763, L(p,q)-L0 = -0.0000000260959342 t = 82.5000, H(p,q)-H0 = -0.0000001788783702, L(p,q)-L0 = -0.0000000260964957 t = 82.6000, H(p,q)-H0 = -0.0000001789278192, L(p,q)-L0 = -0.0000000260967732 t = 82.7000, H(p,q)-H0 = -0.0000001789570379, L(p,q)-L0 = -0.0000000260969215 -ROOT RETURN: t = 82.7119 g[0] = -1, y[0] = -0.658623, y[1] = 0.798623 -t = 82.7119, H(p,q)-H0 = -0.0000001788950017, L(p,q)-L0 = -0.0000000259781998 t = 82.8000, H(p,q)-H0 = -0.0000001789748414, L(p,q)-L0 = -0.0000000260970061 t = 82.9000, H(p,q)-H0 = -0.0000001789860123, L(p,q)-L0 = -0.0000000260970566 t = 83.0000, H(p,q)-H0 = -0.0000001789932158, L(p,q)-L0 = -0.0000000260970889 @@ -912,6 +910,8 @@ t = 84.5000, H(p,q)-H0 = -0.0000001790091151, L(p,q)-L0 = -0.0000000260971671 t = 84.6000, H(p,q)-H0 = -0.0000001790091567, L(p,q)-L0 = -0.0000000260971683 t = 84.7000, H(p,q)-H0 = -0.0000001790091825, L(p,q)-L0 = -0.0000000260971693 t = 84.8000, H(p,q)-H0 = -0.0000001790091940, L(p,q)-L0 = -0.0000000260971703 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.68346e-13, num. orbits is now 13.50 +t = 84.8230, H(p,q)-H0 = -0.0000001790074640, L(p,q)-L0 = -0.0000000260926708 t = 84.9000, H(p,q)-H0 = -0.0000001790091918, L(p,q)-L0 = -0.0000000260971715 t = 85.0000, H(p,q)-H0 = -0.0000001790091755, L(p,q)-L0 = -0.0000000260971723 t = 85.1000, H(p,q)-H0 = -0.0000001790091444, L(p,q)-L0 = -0.0000000260971735 @@ -942,9 +942,9 @@ t = 87.5000, H(p,q)-H0 = -0.0000001781768377, L(p,q)-L0 = -0.0000000261055634 t = 87.6000, H(p,q)-H0 = -0.0000001775336020, L(p,q)-L0 = -0.0000000261194221 t = 87.7000, H(p,q)-H0 = -0.0000001760651396, L(p,q)-L0 = -0.0000000261632049 t = 87.8000, H(p,q)-H0 = -0.0000001707039721, L(p,q)-L0 = -0.0000000263030010 -ROOT RETURN: t = 87.8504 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 87.8504, H(p,q)-H0 = -0.0000001658336990, L(p,q)-L0 = -0.0000000269003468 t = 87.9000, H(p,q)-H0 = -0.0000001566574559, L(p,q)-L0 = -0.0000000266708413 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.23226e-14, num. orbits is now 14.00 +t = 87.9646, H(p,q)-H0 = -0.0000003563557172, L(p,q)-L0 = -0.0000000731159798 t = 88.0000, H(p,q)-H0 = -0.0000001555989786, L(p,q)-L0 = -0.0000000272586693 t = 88.1000, H(p,q)-H0 = -0.0000001749598755, L(p,q)-L0 = -0.0000000277261296 t = 88.2000, H(p,q)-H0 = -0.0000001850469524, L(p,q)-L0 = -0.0000000279303964 @@ -955,8 +955,6 @@ t = 88.6000, H(p,q)-H0 = -0.0000001895459414, L(p,q)-L0 = -0.0000000280266713 t = 88.7000, H(p,q)-H0 = -0.0000001896860389, L(p,q)-L0 = -0.0000000280277472 t = 88.8000, H(p,q)-H0 = -0.0000001897644556, L(p,q)-L0 = -0.0000000280282425 t = 88.9000, H(p,q)-H0 = -0.0000001898096190, L(p,q)-L0 = -0.0000000280284912 -ROOT RETURN: t = 88.9950 g[0] = -1, y[0] = -0.658622, y[1] = 0.798622 -t = 88.9950, H(p,q)-H0 = -0.0000001896585367, L(p,q)-L0 = -0.0000000277032686 t = 89.0000, H(p,q)-H0 = -0.0000001898364448, L(p,q)-L0 = -0.0000000280286255 t = 89.1000, H(p,q)-H0 = -0.0000001898528728, L(p,q)-L0 = -0.0000000280287027 t = 89.2000, H(p,q)-H0 = -0.0000001898632301, L(p,q)-L0 = -0.0000000280287495 @@ -979,6 +977,8 @@ t = 90.8000, H(p,q)-H0 = -0.0000001898849037, L(p,q)-L0 = -0.0000000280288535 t = 90.9000, H(p,q)-H0 = -0.0000001898849425, L(p,q)-L0 = -0.0000000280288543 t = 91.0000, H(p,q)-H0 = -0.0000001898849659, L(p,q)-L0 = -0.0000000280288553 t = 91.1000, H(p,q)-H0 = -0.0000001898849750, L(p,q)-L0 = -0.0000000280288560 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -8.63242e-16, num. orbits is now 14.50 +t = 91.1061, H(p,q)-H0 = -0.0000001898827469, L(p,q)-L0 = -0.0000000280230625 t = 91.2000, H(p,q)-H0 = -0.0000001898849701, L(p,q)-L0 = -0.0000000280288562 t = 91.3000, H(p,q)-H0 = -0.0000001898849512, L(p,q)-L0 = -0.0000000280288572 t = 91.4000, H(p,q)-H0 = -0.0000001898849171, L(p,q)-L0 = -0.0000000280288579 @@ -1009,9 +1009,9 @@ t = 93.8000, H(p,q)-H0 = -0.0000001889701315, L(p,q)-L0 = -0.0000000280386572 t = 93.9000, H(p,q)-H0 = -0.0000001882510074, L(p,q)-L0 = -0.0000000280553829 t = 94.0000, H(p,q)-H0 = -0.0000001864738355, L(p,q)-L0 = -0.0000000281087675 t = 94.1000, H(p,q)-H0 = -0.0000001797882589, L(p,q)-L0 = -0.0000000282767912 -ROOT RETURN: t = 94.1336 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 94.1336, H(p,q)-H0 = -0.0000002230411393, L(p,q)-L0 = -0.0000000441741270 t = 94.2000, H(p,q)-H0 = -0.0000001653372996, L(p,q)-L0 = -0.0000000286923685 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.05948e-15, num. orbits is now 15.00 +t = 94.2477, H(p,q)-H0 = -0.0000002640777677, L(p,q)-L0 = -0.0000000517606307 t = 94.3000, H(p,q)-H0 = -0.0000001693073164, L(p,q)-L0 = -0.0000000292870754 t = 94.4000, H(p,q)-H0 = -0.0000001884358527, L(p,q)-L0 = -0.0000000297081790 t = 94.5000, H(p,q)-H0 = -0.0000001966663752, L(p,q)-L0 = -0.0000000298792937 @@ -1022,8 +1022,6 @@ t = 94.9000, H(p,q)-H0 = -0.0000002004514631, L(p,q)-L0 = -0.0000000299586003 t = 95.0000, H(p,q)-H0 = -0.0000002005783051, L(p,q)-L0 = -0.0000000299595384 t = 95.1000, H(p,q)-H0 = -0.0000002006496229, L(p,q)-L0 = -0.0000000299599773 t = 95.2000, H(p,q)-H0 = -0.0000002006909088, L(p,q)-L0 = -0.0000000299602008 -ROOT RETURN: t = 95.2782 g[0] = -1, y[0] = -0.658622, y[1] = 0.798622 -t = 95.2782, H(p,q)-H0 = -0.0000002006505437, L(p,q)-L0 = -0.0000000298486129 t = 95.3000, H(p,q)-H0 = -0.0000002007155586, L(p,q)-L0 = -0.0000000299603227 t = 95.4000, H(p,q)-H0 = -0.0000002007307307, L(p,q)-L0 = -0.0000000299603936 t = 95.5000, H(p,q)-H0 = -0.0000002007403406, L(p,q)-L0 = -0.0000000299604366 @@ -1045,6 +1043,8 @@ t = 97.0000, H(p,q)-H0 = -0.0000002007606337, L(p,q)-L0 = -0.0000000299605348 t = 97.1000, H(p,q)-H0 = -0.0000002007606874, L(p,q)-L0 = -0.0000000299605361 t = 97.2000, H(p,q)-H0 = -0.0000002007607235, L(p,q)-L0 = -0.0000000299605371 t = 97.3000, H(p,q)-H0 = -0.0000002007607446, L(p,q)-L0 = -0.0000000299605381 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.57281e-15, num. orbits is now 15.50 +t = 97.3893, H(p,q)-H0 = -0.0000002007605959, L(p,q)-L0 = -0.0000000299601349 t = 97.4000, H(p,q)-H0 = -0.0000002007607512, L(p,q)-L0 = -0.0000000299605389 t = 97.5000, H(p,q)-H0 = -0.0000002007607444, L(p,q)-L0 = -0.0000000299605398 t = 97.6000, H(p,q)-H0 = -0.0000002007607232, L(p,q)-L0 = -0.0000000299605412 @@ -1083,7 +1083,7 @@ Inequality constraint fails = 0 Initial step size = 0.01 Last step size = 0.009999999999948264 Current step size = 0.009999999999948264 -Root fn evals = 10293 +Root fn evals = 10294 Explicit RHS fn evals = 60001 Implicit RHS fn evals = 0 NLS iters = 0 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated-sums.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out similarity index 93% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated-sums.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out index cbc0030700..83e71e53dc 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated-sums.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out @@ -20,8 +20,6 @@ t = 0.7000, H(p,q)-H0 = 0.0000000021055039, L(p,q)-L0 = 0.0000000000000000 t = 0.8000, H(p,q)-H0 = 0.0000000021456816, L(p,q)-L0 = 0.0000000000000000 t = 0.9000, H(p,q)-H0 = 0.0000000021652163, L(p,q)-L0 = 0.0000000000000001 t = 1.0000, H(p,q)-H0 = 0.0000000021753693, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 1.0305 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 1.0305, H(p,q)-H0 = 0.0000000021770669, L(p,q)-L0 = -0.0000000000004670 t = 1.1000, H(p,q)-H0 = 0.0000000021809765, L(p,q)-L0 = -0.0000000000000001 t = 1.2000, H(p,q)-H0 = 0.0000000021842454, L(p,q)-L0 = 0.0000000000000000 t = 1.3000, H(p,q)-H0 = 0.0000000021862439, L(p,q)-L0 = 0.0000000000000001 @@ -43,6 +41,8 @@ t = 2.8000, H(p,q)-H0 = 0.0000000021904781, L(p,q)-L0 = 0.0000000000000000 t = 2.9000, H(p,q)-H0 = 0.0000000021904921, L(p,q)-L0 = 0.0000000000000000 t = 3.0000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 t = 3.1000, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = 0.0000000000000001 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.84095e-14, num. orbits is now 0.50 +t = 3.1416, H(p,q)-H0 = 0.0000000021905044, L(p,q)-L0 = -0.0000000000000036 t = 3.2000, H(p,q)-H0 = 0.0000000021905047, L(p,q)-L0 = 0.0000000000000000 t = 3.3000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000001 t = 3.4000, H(p,q)-H0 = 0.0000000021904899, L(p,q)-L0 = 0.0000000000000000 @@ -73,9 +73,9 @@ t = 5.8000, H(p,q)-H0 = 0.0000000017543399, L(p,q)-L0 = -0.0000000000000001 t = 5.9000, H(p,q)-H0 = 0.0000000011716927, L(p,q)-L0 = 0.0000000000000000 t = 6.0000, H(p,q)-H0 = -0.0000000001292899, L(p,q)-L0 = 0.0000000000000000 t = 6.1000, H(p,q)-H0 = -0.0000000019832624, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 6.1690 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 6.1690, H(p,q)-H0 = 0.0000000071529043, L(p,q)-L0 = 0.0000000018309229 t = 6.2000, H(p,q)-H0 = -0.0000000015692070, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 8.34619e-16, num. orbits is now 1.00 +t = 6.2832, H(p,q)-H0 = -0.0000000251097632, L(p,q)-L0 = -0.0000000054735654 t = 6.3000, H(p,q)-H0 = -0.0000000000785478, L(p,q)-L0 = 0.0000000000000000 t = 6.4000, H(p,q)-H0 = -0.0000000021444517, L(p,q)-L0 = 0.0000000000000000 t = 6.5000, H(p,q)-H0 = -0.0000000014380208, L(p,q)-L0 = 0.0000000000000000 @@ -87,8 +87,6 @@ t = 7.0000, H(p,q)-H0 = 0.0000000021145606, L(p,q)-L0 = 0.0000000000000001 t = 7.1000, H(p,q)-H0 = 0.0000000021499772, L(p,q)-L0 = 0.0000000000000000 t = 7.2000, H(p,q)-H0 = 0.0000000021673975, L(p,q)-L0 = 0.0000000000000000 t = 7.3000, H(p,q)-H0 = 0.0000000021765487, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 7.3137 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 7.3137, H(p,q)-H0 = 0.0000000021741299, L(p,q)-L0 = -0.0000000000042727 t = 7.4000, H(p,q)-H0 = 0.0000000021816513, L(p,q)-L0 = 0.0000000000000000 t = 7.5000, H(p,q)-H0 = 0.0000000021846508, L(p,q)-L0 = 0.0000000000000000 t = 7.6000, H(p,q)-H0 = 0.0000000021864986, L(p,q)-L0 = 0.0000000000000000 @@ -110,6 +108,8 @@ t = 9.1000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000001 t = 9.2000, H(p,q)-H0 = 0.0000000021904940, L(p,q)-L0 = 0.0000000000000000 t = 9.3000, H(p,q)-H0 = 0.0000000021905020, L(p,q)-L0 = 0.0000000000000000 t = 9.4000, H(p,q)-H0 = 0.0000000021905055, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.22192e-14, num. orbits is now 1.50 +t = 9.4248, H(p,q)-H0 = 0.0000000021905012, L(p,q)-L0 = -0.0000000000000127 t = 9.5000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000001 t = 9.6000, H(p,q)-H0 = 0.0000000021904984, L(p,q)-L0 = 0.0000000000000000 t = 9.7000, H(p,q)-H0 = 0.0000000021904878, L(p,q)-L0 = 0.0000000000000000 @@ -140,9 +140,9 @@ t = 12.1000, H(p,q)-H0 = 0.0000000016886883, L(p,q)-L0 = -0.0000000000000001 t = 12.2000, H(p,q)-H0 = 0.0000000010143810, L(p,q)-L0 = 0.0000000000000001 t = 12.3000, H(p,q)-H0 = -0.0000000004357776, L(p,q)-L0 = 0.0000000000000000 t = 12.4000, H(p,q)-H0 = -0.0000000021842266, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 12.4522 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 12.4522, H(p,q)-H0 = 0.0000000036282661, L(p,q)-L0 = 0.0000000010789349 t = 12.5000, H(p,q)-H0 = -0.0000000011492796, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.9848e-17, num. orbits is now 2.00 +t = 12.5664, H(p,q)-H0 = -0.0000000433269738, L(p,q)-L0 = -0.0000000094495762 t = 12.6000, H(p,q)-H0 = -0.0000000003226033, L(p,q)-L0 = 0.0000000000000000 t = 12.7000, H(p,q)-H0 = -0.0000000022824618, L(p,q)-L0 = 0.0000000000000000 t = 12.8000, H(p,q)-H0 = -0.0000000011085795, L(p,q)-L0 = 0.0000000000000000 @@ -153,8 +153,6 @@ t = 13.2000, H(p,q)-H0 = 0.0000000020551111, L(p,q)-L0 = 0.0000000000000000 t = 13.3000, H(p,q)-H0 = 0.0000000021225102, L(p,q)-L0 = 0.0000000000000000 t = 13.4000, H(p,q)-H0 = 0.0000000021537927, L(p,q)-L0 = 0.0000000000000001 t = 13.5000, H(p,q)-H0 = 0.0000000021693561, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 13.5969 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 13.5969, H(p,q)-H0 = 0.0000000021723138, L(p,q)-L0 = -0.0000000000066076 t = 13.6000, H(p,q)-H0 = 0.0000000021776183, L(p,q)-L0 = 0.0000000000000000 t = 13.7000, H(p,q)-H0 = 0.0000000021822684, L(p,q)-L0 = 0.0000000000000000 t = 13.8000, H(p,q)-H0 = 0.0000000021850247, L(p,q)-L0 = -0.0000000000000001 @@ -177,6 +175,8 @@ t = 15.4000, H(p,q)-H0 = 0.0000000021904834, L(p,q)-L0 = 0.0000000000000000 t = 15.5000, H(p,q)-H0 = 0.0000000021904957, L(p,q)-L0 = 0.0000000000000000 t = 15.6000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000000 t = 15.7000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.32597e-16, num. orbits is now 2.50 +t = 15.7080, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = -0.0000000000000129 t = 15.8000, H(p,q)-H0 = 0.0000000021905038, L(p,q)-L0 = 0.0000000000000001 t = 15.9000, H(p,q)-H0 = 0.0000000021904970, L(p,q)-L0 = 0.0000000000000000 t = 16.0000, H(p,q)-H0 = 0.0000000021904856, L(p,q)-L0 = 0.0000000000000001 @@ -207,9 +207,9 @@ t = 18.4000, H(p,q)-H0 = 0.0000000016123713, L(p,q)-L0 = 0.0000000000000000 t = 18.5000, H(p,q)-H0 = 0.0000000008341923, L(p,q)-L0 = 0.0000000000000000 t = 18.6000, H(p,q)-H0 = -0.0000000007602408, L(p,q)-L0 = 0.0000000000000000 t = 18.7000, H(p,q)-H0 = -0.0000000022936408, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 18.7354 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 18.7354, H(p,q)-H0 = 0.0000000126969424, L(p,q)-L0 = 0.0000000028491529 t = 18.8000, H(p,q)-H0 = -0.0000000007197527, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.02481e-13, num. orbits is now 3.00 +t = 18.8496, H(p,q)-H0 = -0.0000000120056711, L(p,q)-L0 = -0.0000000026200585 t = 18.9000, H(p,q)-H0 = -0.0000000006891674, L(p,q)-L0 = -0.0000000000000001 t = 19.0000, H(p,q)-H0 = -0.0000000022938584, L(p,q)-L0 = 0.0000000000000001 t = 19.1000, H(p,q)-H0 = -0.0000000007742575, L(p,q)-L0 = 0.0000000000000000 @@ -220,8 +220,6 @@ t = 19.5000, H(p,q)-H0 = 0.0000000020705553, L(p,q)-L0 = 0.0000000000000000 t = 19.6000, H(p,q)-H0 = 0.0000000021295025, L(p,q)-L0 = -0.0000000000000001 t = 19.7000, H(p,q)-H0 = 0.0000000021571878, L(p,q)-L0 = 0.0000000000000000 t = 19.8000, H(p,q)-H0 = 0.0000000021711180, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 19.8800 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 19.8800, H(p,q)-H0 = 0.0000000021773960, L(p,q)-L0 = -0.0000000000000390 t = 19.9000, H(p,q)-H0 = 0.0000000021785899, L(p,q)-L0 = 0.0000000000000000 t = 20.0000, H(p,q)-H0 = 0.0000000021828339, L(p,q)-L0 = 0.0000000000000000 t = 20.1000, H(p,q)-H0 = 0.0000000021853701, L(p,q)-L0 = 0.0000000000000000 @@ -243,6 +241,8 @@ t = 21.6000, H(p,q)-H0 = 0.0000000021904690, L(p,q)-L0 = 0.0000000000000000 t = 21.7000, H(p,q)-H0 = 0.0000000021904859, L(p,q)-L0 = 0.0000000000000000 t = 21.8000, H(p,q)-H0 = 0.0000000021904972, L(p,q)-L0 = -0.0000000000000001 t = 21.9000, H(p,q)-H0 = 0.0000000021905038, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.06467e-16, num. orbits is now 3.50 +t = 21.9911, H(p,q)-H0 = 0.0000000021905048, L(p,q)-L0 = -0.0000000000000026 t = 22.0000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000000 t = 22.1000, H(p,q)-H0 = 0.0000000021905029, L(p,q)-L0 = -0.0000000000000001 t = 22.2000, H(p,q)-H0 = 0.0000000021904955, L(p,q)-L0 = 0.0000000000000001 @@ -274,9 +274,9 @@ t = 24.7000, H(p,q)-H0 = 0.0000000015237045, L(p,q)-L0 = -0.0000000000000001 t = 24.8000, H(p,q)-H0 = 0.0000000006291403, L(p,q)-L0 = 0.0000000000000000 t = 24.9000, H(p,q)-H0 = -0.0000000010937444, L(p,q)-L0 = 0.0000000000000000 t = 25.0000, H(p,q)-H0 = -0.0000000022899942, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 25.0186 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 25.0186, H(p,q)-H0 = 0.0000000098686312, L(p,q)-L0 = 0.0000000023590667 t = 25.1000, H(p,q)-H0 = -0.0000000003464105, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.65651e-15, num. orbits is now 4.00 +t = 25.1327, H(p,q)-H0 = -0.0000000213724662, L(p,q)-L0 = -0.0000000046585861 t = 25.2000, H(p,q)-H0 = -0.0000000011168149, L(p,q)-L0 = 0.0000000000000000 t = 25.3000, H(p,q)-H0 = -0.0000000021907156, L(p,q)-L0 = 0.0000000000000000 t = 25.4000, H(p,q)-H0 = -0.0000000004484462, L(p,q)-L0 = 0.0000000000000001 @@ -287,8 +287,6 @@ t = 25.8000, H(p,q)-H0 = 0.0000000020840075, L(p,q)-L0 = 0.0000000000000000 t = 25.9000, H(p,q)-H0 = 0.0000000021356651, L(p,q)-L0 = 0.0000000000000000 t = 26.0000, H(p,q)-H0 = 0.0000000021602146, L(p,q)-L0 = 0.0000000000000000 t = 26.1000, H(p,q)-H0 = 0.0000000021727057, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 26.1632 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 26.1632, H(p,q)-H0 = 0.0000000021745573, L(p,q)-L0 = -0.0000000000037201 t = 26.2000, H(p,q)-H0 = 0.0000000021794737, L(p,q)-L0 = 0.0000000000000001 t = 26.3000, H(p,q)-H0 = 0.0000000021833528, L(p,q)-L0 = 0.0000000000000001 t = 26.4000, H(p,q)-H0 = 0.0000000021856892, L(p,q)-L0 = 0.0000000000000000 @@ -310,6 +308,8 @@ t = 27.9000, H(p,q)-H0 = 0.0000000021904722, L(p,q)-L0 = -0.0000000000000001 t = 28.0000, H(p,q)-H0 = 0.0000000021904881, L(p,q)-L0 = 0.0000000000000000 t = 28.1000, H(p,q)-H0 = 0.0000000021904987, L(p,q)-L0 = 0.0000000000000000 t = 28.2000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.55373e-13, num. orbits is now 4.50 +t = 28.2743, H(p,q)-H0 = 0.0000000021905014, L(p,q)-L0 = -0.0000000000000118 t = 28.3000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = 0.0000000000000000 t = 28.4000, H(p,q)-H0 = 0.0000000021905020, L(p,q)-L0 = 0.0000000000000000 t = 28.5000, H(p,q)-H0 = 0.0000000021904937, L(p,q)-L0 = 0.0000000000000000 @@ -341,9 +341,9 @@ t = 31.0000, H(p,q)-H0 = 0.0000000014208066, L(p,q)-L0 = 0.0000000000000000 t = 31.1000, H(p,q)-H0 = 0.0000000003977536, L(p,q)-L0 = 0.0000000000000000 t = 31.2000, H(p,q)-H0 = -0.0000000014232189, L(p,q)-L0 = 0.0000000000000000 t = 31.3000, H(p,q)-H0 = -0.0000000021604580, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 31.3018 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 31.3018, H(p,q)-H0 = 0.0000000023148925, L(p,q)-L0 = 0.0000000008299341 t = 31.4000, H(p,q)-H0 = -0.0000000000914424, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.00569e-12, num. orbits is now 5.00 +t = 31.4159, H(p,q)-H0 = -0.0000000424953108, L(p,q)-L0 = -0.0000000092674631 t = 31.5000, H(p,q)-H0 = -0.0000000015394452, L(p,q)-L0 = 0.0000000000000000 t = 31.6000, H(p,q)-H0 = -0.0000000019942239, L(p,q)-L0 = 0.0000000000000000 t = 31.7000, H(p,q)-H0 = -0.0000000001403404, L(p,q)-L0 = 0.0000000000000000 @@ -354,8 +354,6 @@ t = 32.1000, H(p,q)-H0 = 0.0000000020957474, L(p,q)-L0 = 0.0000000000000001 t = 32.2000, H(p,q)-H0 = 0.0000000021411067, L(p,q)-L0 = 0.0000000000000000 t = 32.3000, H(p,q)-H0 = 0.0000000021629182, L(p,q)-L0 = 0.0000000000000000 t = 32.4000, H(p,q)-H0 = 0.0000000021741389, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 32.4464 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 32.4464, H(p,q)-H0 = 0.0000000021723262, L(p,q)-L0 = -0.0000000000065946 t = 32.5000, H(p,q)-H0 = 0.0000000021802790, L(p,q)-L0 = 0.0000000000000000 t = 32.6000, H(p,q)-H0 = 0.0000000021838293, L(p,q)-L0 = 0.0000000000000000 t = 32.7000, H(p,q)-H0 = 0.0000000021859843, L(p,q)-L0 = 0.0000000000000000 @@ -377,6 +375,8 @@ t = 34.2000, H(p,q)-H0 = 0.0000000021904754, L(p,q)-L0 = 0.0000000000000000 t = 34.3000, H(p,q)-H0 = 0.0000000021904903, L(p,q)-L0 = -0.0000000000000001 t = 34.4000, H(p,q)-H0 = 0.0000000021905000, L(p,q)-L0 = 0.0000000000000000 t = 34.5000, H(p,q)-H0 = 0.0000000021905050, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.84312e-16, num. orbits is now 5.50 +t = 34.5575, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = -0.0000000000000135 t = 34.6000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = -0.0000000000000001 t = 34.7000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = 0.0000000000000000 t = 34.8000, H(p,q)-H0 = 0.0000000021904919, L(p,q)-L0 = -0.0000000000000001 @@ -407,9 +407,9 @@ t = 37.2000, H(p,q)-H0 = 0.0000000018080382, L(p,q)-L0 = -0.0000000000000001 t = 37.3000, H(p,q)-H0 = 0.0000000013016144, L(p,q)-L0 = 0.0000000000000000 t = 37.4000, H(p,q)-H0 = 0.0000000001394564, L(p,q)-L0 = 0.0000000000000000 t = 37.5000, H(p,q)-H0 = -0.0000000017311286, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 37.5849 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 37.5849, H(p,q)-H0 = 0.0000000117099681, L(p,q)-L0 = 0.0000000026505150 t = 37.6000, H(p,q)-H0 = -0.0000000019064752, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 7.23216e-13, num. orbits is now 6.00 +t = 37.6991, H(p,q)-H0 = -0.0000000216938074, L(p,q)-L0 = -0.0000000047339080 t = 37.7000, H(p,q)-H0 = 0.0000000000003602, L(p,q)-L0 = 0.0000000000000000 t = 37.8000, H(p,q)-H0 = -0.0000000018991442, L(p,q)-L0 = 0.0000000000000000 t = 37.9000, H(p,q)-H0 = -0.0000000017294071, L(p,q)-L0 = -0.0000000000000001 @@ -421,8 +421,6 @@ t = 38.4000, H(p,q)-H0 = 0.0000000021060125, L(p,q)-L0 = -0.0000000000000001 t = 38.5000, H(p,q)-H0 = 0.0000000021459217, L(p,q)-L0 = 0.0000000000000000 t = 38.6000, H(p,q)-H0 = 0.0000000021653375, L(p,q)-L0 = 0.0000000000000000 t = 38.7000, H(p,q)-H0 = 0.0000000021754346, L(p,q)-L0 = 0.0000000000000001 -ROOT RETURN: t = 38.7296 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 38.7296, H(p,q)-H0 = 0.0000000021760736, L(p,q)-L0 = -0.0000000000017438 t = 38.8000, H(p,q)-H0 = 0.0000000021810138, L(p,q)-L0 = 0.0000000000000000 t = 38.9000, H(p,q)-H0 = 0.0000000021842676, L(p,q)-L0 = 0.0000000000000000 t = 39.0000, H(p,q)-H0 = 0.0000000021862580, L(p,q)-L0 = 0.0000000000000000 @@ -444,6 +442,8 @@ t = 40.5000, H(p,q)-H0 = 0.0000000021904782, L(p,q)-L0 = 0.0000000000000000 t = 40.6000, H(p,q)-H0 = 0.0000000021904922, L(p,q)-L0 = 0.0000000000000001 t = 40.7000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 t = 40.8000, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.34063e-15, num. orbits is now 6.50 +t = 40.8407, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = -0.0000000000000012 t = 40.9000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = -0.0000000000000001 t = 41.0000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000000 t = 41.1000, H(p,q)-H0 = 0.0000000021904899, L(p,q)-L0 = 0.0000000000000001 @@ -474,9 +474,9 @@ t = 43.5000, H(p,q)-H0 = 0.0000000017511153, L(p,q)-L0 = 0.0000000000000000 t = 43.6000, H(p,q)-H0 = 0.0000000011639223, L(p,q)-L0 = 0.0000000000000001 t = 43.7000, H(p,q)-H0 = -0.0000000001449241, L(p,q)-L0 = -0.0000000000000001 t = 43.8000, H(p,q)-H0 = -0.0000000019957629, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 43.8681 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 43.8681, H(p,q)-H0 = 0.0000000118359216, L(p,q)-L0 = 0.0000000027373497 t = 43.9000, H(p,q)-H0 = -0.0000000015482571, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.36008e-15, num. orbits is now 7.00 +t = 43.9823, H(p,q)-H0 = -0.0000000176133172, L(p,q)-L0 = -0.0000000038389568 t = 44.0000, H(p,q)-H0 = -0.0000000000875642, L(p,q)-L0 = 0.0000000000000000 t = 44.1000, H(p,q)-H0 = -0.0000000021549387, L(p,q)-L0 = 0.0000000000000000 t = 44.2000, H(p,q)-H0 = -0.0000000014210171, L(p,q)-L0 = 0.0000000000000000 @@ -488,8 +488,6 @@ t = 44.7000, H(p,q)-H0 = 0.0000000021150063, L(p,q)-L0 = -0.0000000000000002 t = 44.8000, H(p,q)-H0 = 0.0000000021501902, L(p,q)-L0 = -0.0000000000000001 t = 44.9000, H(p,q)-H0 = 0.0000000021675061, L(p,q)-L0 = 0.0000000000000000 t = 45.0000, H(p,q)-H0 = 0.0000000021766077, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 45.0128 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 45.0128, H(p,q)-H0 = 0.0000000021749912, L(p,q)-L0 = -0.0000000000031586 t = 45.1000, H(p,q)-H0 = 0.0000000021816851, L(p,q)-L0 = 0.0000000000000000 t = 45.2000, H(p,q)-H0 = 0.0000000021846714, L(p,q)-L0 = 0.0000000000000000 t = 45.3000, H(p,q)-H0 = 0.0000000021865115, L(p,q)-L0 = -0.0000000000000001 @@ -511,6 +509,8 @@ t = 46.8000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000000 t = 46.9000, H(p,q)-H0 = 0.0000000021904941, L(p,q)-L0 = -0.0000000000000001 t = 47.0000, H(p,q)-H0 = 0.0000000021905021, L(p,q)-L0 = 0.0000000000000000 t = 47.1000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.6177e-13, num. orbits is now 7.50 +t = 47.1239, H(p,q)-H0 = 0.0000000021905023, L(p,q)-L0 = -0.0000000000000100 t = 47.2000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = 0.0000000000000000 t = 47.3000, H(p,q)-H0 = 0.0000000021904983, L(p,q)-L0 = 0.0000000000000000 t = 47.4000, H(p,q)-H0 = 0.0000000021904877, L(p,q)-L0 = -0.0000000000000001 @@ -541,9 +541,9 @@ t = 49.8000, H(p,q)-H0 = 0.0000000016849391, L(p,q)-L0 = 0.0000000000000000 t = 49.9000, H(p,q)-H0 = 0.0000000010054564, L(p,q)-L0 = -0.0000000000000001 t = 50.0000, H(p,q)-H0 = -0.0000000004525242, L(p,q)-L0 = 0.0000000000000000 t = 50.1000, H(p,q)-H0 = -0.0000000021925064, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 50.1513 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 50.1513, H(p,q)-H0 = 0.0000000010629635, L(p,q)-L0 = 0.0000000005942491 t = 50.2000, H(p,q)-H0 = -0.0000000011262788, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 3.49026e-15, num. orbits is now 8.00 +t = 50.2655, H(p,q)-H0 = -0.0000000408960004, L(p,q)-L0 = -0.0000000089179991 t = 50.3000, H(p,q)-H0 = -0.0000000003393799, L(p,q)-L0 = 0.0000000000000000 t = 50.4000, H(p,q)-H0 = -0.0000000022861775, L(p,q)-L0 = 0.0000000000000000 t = 50.5000, H(p,q)-H0 = -0.0000000010909100, L(p,q)-L0 = 0.0000000000000000 @@ -554,8 +554,6 @@ t = 50.9000, H(p,q)-H0 = 0.0000000020559815, L(p,q)-L0 = 0.0000000000000000 t = 51.0000, H(p,q)-H0 = 0.0000000021229023, L(p,q)-L0 = 0.0000000000000000 t = 51.1000, H(p,q)-H0 = 0.0000000021539818, L(p,q)-L0 = 0.0000000000000000 t = 51.2000, H(p,q)-H0 = 0.0000000021694539, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 51.2960 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 51.2960, H(p,q)-H0 = 0.0000000021724449, L(p,q)-L0 = -0.0000000000064433 t = 51.3000, H(p,q)-H0 = 0.0000000021776719, L(p,q)-L0 = -0.0000000000000001 t = 51.4000, H(p,q)-H0 = 0.0000000021822995, L(p,q)-L0 = -0.0000000000000002 t = 51.5000, H(p,q)-H0 = 0.0000000021850437, L(p,q)-L0 = 0.0000000000000000 @@ -578,6 +576,8 @@ t = 53.1000, H(p,q)-H0 = 0.0000000021904835, L(p,q)-L0 = -0.0000000000000001 t = 53.2000, H(p,q)-H0 = 0.0000000021904958, L(p,q)-L0 = 0.0000000000000000 t = 53.3000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = -0.0000000000000001 t = 53.4000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.27654e-15, num. orbits is now 8.50 +t = 53.4071, H(p,q)-H0 = 0.0000000021905007, L(p,q)-L0 = -0.0000000000000143 t = 53.5000, H(p,q)-H0 = 0.0000000021905037, L(p,q)-L0 = -0.0000000000000001 t = 53.6000, H(p,q)-H0 = 0.0000000021904970, L(p,q)-L0 = -0.0000000000000001 t = 53.7000, H(p,q)-H0 = 0.0000000021904855, L(p,q)-L0 = -0.0000000000000001 @@ -608,9 +608,9 @@ t = 56.1000, H(p,q)-H0 = 0.0000000016080137, L(p,q)-L0 = -0.0000000000000001 t = 56.2000, H(p,q)-H0 = 0.0000000008240018, L(p,q)-L0 = 0.0000000000000000 t = 56.3000, H(p,q)-H0 = -0.0000000007777228, L(p,q)-L0 = 0.0000000000000000 t = 56.4000, H(p,q)-H0 = -0.0000000022964359, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 56.4345 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 56.4345, H(p,q)-H0 = 0.0000000105653191, L(p,q)-L0 = 0.0000000024229621 t = 56.5000, H(p,q)-H0 = -0.0000000006980467, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.04465e-12, num. orbits is now 9.00 +t = 56.5487, H(p,q)-H0 = -0.0000000292986948, L(p,q)-L0 = -0.0000000063928232 t = 56.6000, H(p,q)-H0 = -0.0000000007108081, L(p,q)-L0 = 0.0000000000000000 t = 56.7000, H(p,q)-H0 = -0.0000000022911197, L(p,q)-L0 = 0.0000000000000000 t = 56.8000, H(p,q)-H0 = -0.0000000007567420, L(p,q)-L0 = -0.0000000000000001 @@ -621,8 +621,6 @@ t = 57.2000, H(p,q)-H0 = 0.0000000020713128, L(p,q)-L0 = 0.0000000000000000 t = 57.3000, H(p,q)-H0 = 0.0000000021298476, L(p,q)-L0 = 0.0000000000000000 t = 57.4000, H(p,q)-H0 = 0.0000000021573562, L(p,q)-L0 = -0.0000000000000001 t = 57.5000, H(p,q)-H0 = 0.0000000021712063, L(p,q)-L0 = 0.0000000000000001 -ROOT RETURN: t = 57.5792 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 57.5792, H(p,q)-H0 = 0.0000000021748710, L(p,q)-L0 = -0.0000000000032959 t = 57.6000, H(p,q)-H0 = 0.0000000021786388, L(p,q)-L0 = 0.0000000000000000 t = 57.7000, H(p,q)-H0 = 0.0000000021828624, L(p,q)-L0 = 0.0000000000000000 t = 57.8000, H(p,q)-H0 = 0.0000000021853875, L(p,q)-L0 = 0.0000000000000000 @@ -644,6 +642,8 @@ t = 59.3000, H(p,q)-H0 = 0.0000000021904691, L(p,q)-L0 = -0.0000000000000001 t = 59.4000, H(p,q)-H0 = 0.0000000021904860, L(p,q)-L0 = -0.0000000000000001 t = 59.5000, H(p,q)-H0 = 0.0000000021904973, L(p,q)-L0 = -0.0000000000000001 t = 59.6000, H(p,q)-H0 = 0.0000000021905039, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.93725e-13, num. orbits is now 9.50 +t = 59.6903, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = -0.0000000000000008 t = 59.7000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = -0.0000000000000001 t = 59.8000, H(p,q)-H0 = 0.0000000021905028, L(p,q)-L0 = -0.0000000000000001 t = 59.9000, H(p,q)-H0 = 0.0000000021904953, L(p,q)-L0 = -0.0000000000000001 @@ -675,9 +675,9 @@ t = 62.4000, H(p,q)-H0 = 0.0000000015186441, L(p,q)-L0 = 0.0000000000000000 t = 62.5000, H(p,q)-H0 = 0.0000000006175898, L(p,q)-L0 = 0.0000000000000000 t = 62.6000, H(p,q)-H0 = -0.0000000011113788, L(p,q)-L0 = 0.0000000000000000 t = 62.7000, H(p,q)-H0 = -0.0000000022863598, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 62.7177 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 62.7177, H(p,q)-H0 = 0.0000000131519695, L(p,q)-L0 = 0.0000000029860125 t = 62.8000, H(p,q)-H0 = -0.0000000003294947, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.38874e-12, num. orbits is now 10.00 +t = 62.8319, H(p,q)-H0 = -0.0000000138979517, L(p,q)-L0 = -0.0000000030289787 t = 62.9000, H(p,q)-H0 = -0.0000000011398216, L(p,q)-L0 = 0.0000000000000000 t = 63.0000, H(p,q)-H0 = -0.0000000021824618, L(p,q)-L0 = 0.0000000000000000 t = 63.1000, H(p,q)-H0 = -0.0000000004316694, L(p,q)-L0 = 0.0000000000000000 @@ -688,8 +688,6 @@ t = 63.5000, H(p,q)-H0 = 0.0000000020846681, L(p,q)-L0 = -0.0000000000000001 t = 63.6000, H(p,q)-H0 = 0.0000000021359695, L(p,q)-L0 = 0.0000000000000000 t = 63.7000, H(p,q)-H0 = 0.0000000021603651, L(p,q)-L0 = -0.0000000000000001 t = 63.8000, H(p,q)-H0 = 0.0000000021727854, L(p,q)-L0 = 0.0000000000000001 -ROOT RETURN: t = 63.8623 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 63.8623, H(p,q)-H0 = 0.0000000021754245, L(p,q)-L0 = -0.0000000000025983 t = 63.9000, H(p,q)-H0 = 0.0000000021795182, L(p,q)-L0 = 0.0000000000000000 t = 64.0000, H(p,q)-H0 = 0.0000000021833789, L(p,q)-L0 = 0.0000000000000000 t = 64.1000, H(p,q)-H0 = 0.0000000021857053, L(p,q)-L0 = 0.0000000000000000 @@ -711,6 +709,8 @@ t = 65.6000, H(p,q)-H0 = 0.0000000021904725, L(p,q)-L0 = 0.0000000000000000 t = 65.7000, H(p,q)-H0 = 0.0000000021904882, L(p,q)-L0 = 0.0000000000000000 t = 65.8000, H(p,q)-H0 = 0.0000000021904988, L(p,q)-L0 = 0.0000000000000000 t = 65.9000, H(p,q)-H0 = 0.0000000021905046, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.67199e-13, num. orbits is now 10.50 +t = 65.9734, H(p,q)-H0 = 0.0000000021905027, L(p,q)-L0 = -0.0000000000000089 t = 66.0000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000001 t = 66.1000, H(p,q)-H0 = 0.0000000021905019, L(p,q)-L0 = 0.0000000000000000 t = 66.2000, H(p,q)-H0 = 0.0000000021904938, L(p,q)-L0 = 0.0000000000000000 @@ -742,9 +742,9 @@ t = 68.7000, H(p,q)-H0 = 0.0000000014149386, L(p,q)-L0 = 0.0000000000000000 t = 68.8000, H(p,q)-H0 = 0.0000000003847866, L(p,q)-L0 = 0.0000000000000001 t = 68.9000, H(p,q)-H0 = -0.0000000014401922, L(p,q)-L0 = 0.0000000000000000 t = 69.0000, H(p,q)-H0 = -0.0000000021500666, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 69.0009 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 69.0009, H(p,q)-H0 = -0.0000000001126423, L(p,q)-L0 = 0.0000000003745416 t = 69.1000, H(p,q)-H0 = -0.0000000000822340, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 6.19673e-13, num. orbits is now 11.00 +t = 69.1150, H(p,q)-H0 = -0.0000000386645453, L(p,q)-L0 = -0.0000000084307669 t = 69.2000, H(p,q)-H0 = -0.0000000015604567, L(p,q)-L0 = 0.0000000000000000 t = 69.3000, H(p,q)-H0 = -0.0000000019817241, L(p,q)-L0 = 0.0000000000000000 t = 69.4000, H(p,q)-H0 = -0.0000000001246836, L(p,q)-L0 = 0.0000000000000000 @@ -755,8 +755,6 @@ t = 69.8000, H(p,q)-H0 = 0.0000000020963244, L(p,q)-L0 = 0.0000000000000001 t = 69.9000, H(p,q)-H0 = 0.0000000021413759, L(p,q)-L0 = -0.0000000000000001 t = 70.0000, H(p,q)-H0 = 0.0000000021630525, L(p,q)-L0 = -0.0000000000000001 t = 70.1000, H(p,q)-H0 = 0.0000000021742105, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 70.1455 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 70.1455, H(p,q)-H0 = 0.0000000021726537, L(p,q)-L0 = -0.0000000000061761 t = 70.2000, H(p,q)-H0 = 0.0000000021803195, L(p,q)-L0 = -0.0000000000000001 t = 70.3000, H(p,q)-H0 = 0.0000000021838533, L(p,q)-L0 = 0.0000000000000000 t = 70.4000, H(p,q)-H0 = 0.0000000021859993, L(p,q)-L0 = 0.0000000000000000 @@ -778,6 +776,8 @@ t = 71.9000, H(p,q)-H0 = 0.0000000021904755, L(p,q)-L0 = 0.0000000000000000 t = 72.0000, H(p,q)-H0 = 0.0000000021904903, L(p,q)-L0 = -0.0000000000000001 t = 72.1000, H(p,q)-H0 = 0.0000000021905000, L(p,q)-L0 = -0.0000000000000001 t = 72.2000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.4954e-15, num. orbits is now 11.50 +t = 72.2566, H(p,q)-H0 = 0.0000000021905010, L(p,q)-L0 = -0.0000000000000140 t = 72.3000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = 0.0000000000000000 t = 72.4000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = -0.0000000000000001 t = 72.5000, H(p,q)-H0 = 0.0000000021904918, L(p,q)-L0 = 0.0000000000000000 @@ -808,9 +808,9 @@ t = 74.9000, H(p,q)-H0 = 0.0000000018052415, L(p,q)-L0 = 0.0000000000000000 t = 75.0000, H(p,q)-H0 = 0.0000000012948249, L(p,q)-L0 = 0.0000000000000000 t = 75.1000, H(p,q)-H0 = 0.0000000001250755, L(p,q)-L0 = 0.0000000000000000 t = 75.2000, H(p,q)-H0 = -0.0000000017463930, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 75.2840 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 75.2840, H(p,q)-H0 = 0.0000000093074046, L(p,q)-L0 = 0.0000000021752810 t = 75.3000, H(p,q)-H0 = -0.0000000018898954, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.06794e-14, num. orbits is now 12.00 +t = 75.3982, H(p,q)-H0 = -0.0000000350417400, L(p,q)-L0 = -0.0000000076452448 t = 75.4000, H(p,q)-H0 = 0.0000000000002118, L(p,q)-L0 = 0.0000000000000000 t = 75.5000, H(p,q)-H0 = -0.0000000019155202, L(p,q)-L0 = -0.0000000000000001 t = 75.6000, H(p,q)-H0 = -0.0000000017140038, L(p,q)-L0 = 0.0000000000000000 @@ -822,8 +822,6 @@ t = 76.1000, H(p,q)-H0 = 0.0000000021065175, L(p,q)-L0 = -0.0000000000000001 t = 76.2000, H(p,q)-H0 = 0.0000000021461600, L(p,q)-L0 = 0.0000000000000000 t = 76.3000, H(p,q)-H0 = 0.0000000021654578, L(p,q)-L0 = -0.0000000000000001 t = 76.4000, H(p,q)-H0 = 0.0000000021754993, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 76.4287 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 76.4287, H(p,q)-H0 = 0.0000000021739400, L(p,q)-L0 = -0.0000000000044986 t = 76.5000, H(p,q)-H0 = 0.0000000021810508, L(p,q)-L0 = 0.0000000000000000 t = 76.6000, H(p,q)-H0 = 0.0000000021842897, L(p,q)-L0 = 0.0000000000000000 t = 76.7000, H(p,q)-H0 = 0.0000000021862717, L(p,q)-L0 = -0.0000000000000001 @@ -845,6 +843,8 @@ t = 78.2000, H(p,q)-H0 = 0.0000000021904784, L(p,q)-L0 = -0.0000000000000001 t = 78.3000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = -0.0000000000000001 t = 78.4000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 t = 78.5000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.32759e-13, num. orbits is now 12.50 +t = 78.5398, H(p,q)-H0 = 0.0000000021905051, L(p,q)-L0 = -0.0000000000000017 t = 78.6000, H(p,q)-H0 = 0.0000000021905047, L(p,q)-L0 = -0.0000000000000001 t = 78.7000, H(p,q)-H0 = 0.0000000021904996, L(p,q)-L0 = -0.0000000000000001 t = 78.8000, H(p,q)-H0 = 0.0000000021904897, L(p,q)-L0 = -0.0000000000000001 @@ -875,9 +875,9 @@ t = 81.2000, H(p,q)-H0 = 0.0000000017478636, L(p,q)-L0 = 0.0000000000000000 t = 81.3000, H(p,q)-H0 = 0.0000000011560930, L(p,q)-L0 = -0.0000000000000001 t = 81.4000, H(p,q)-H0 = -0.0000000001606235, L(p,q)-L0 = -0.0000000000000002 t = 81.5000, H(p,q)-H0 = -0.0000000020080737, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 81.5672 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 81.5672, H(p,q)-H0 = 0.0000000139063441, L(p,q)-L0 = 0.0000000031236155 t = 81.6000, H(p,q)-H0 = -0.0000000015271253, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.1633e-15, num. orbits is now 13.00 +t = 81.6814, H(p,q)-H0 = -0.0000000102837558, L(p,q)-L0 = -0.0000000022411522 t = 81.7000, H(p,q)-H0 = -0.0000000000970446, L(p,q)-L0 = -0.0000000000000001 t = 81.8000, H(p,q)-H0 = -0.0000000021650746, L(p,q)-L0 = -0.0000000000000001 t = 81.9000, H(p,q)-H0 = -0.0000000014039538, L(p,q)-L0 = -0.0000000000000001 @@ -889,8 +889,6 @@ t = 82.4000, H(p,q)-H0 = 0.0000000021154496, L(p,q)-L0 = -0.0000000000000001 t = 82.5000, H(p,q)-H0 = 0.0000000021504017, L(p,q)-L0 = 0.0000000000000000 t = 82.6000, H(p,q)-H0 = 0.0000000021676144, L(p,q)-L0 = 0.0000000000000000 t = 82.7000, H(p,q)-H0 = 0.0000000021766666, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 82.7119 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 82.7119, H(p,q)-H0 = 0.0000000021758467, L(p,q)-L0 = -0.0000000000020506 t = 82.8000, H(p,q)-H0 = 0.0000000021817191, L(p,q)-L0 = 0.0000000000000000 t = 82.9000, H(p,q)-H0 = 0.0000000021846919, L(p,q)-L0 = 0.0000000000000000 t = 83.0000, H(p,q)-H0 = 0.0000000021865242, L(p,q)-L0 = -0.0000000000000002 @@ -912,6 +910,8 @@ t = 84.5000, H(p,q)-H0 = 0.0000000021904810, L(p,q)-L0 = 0.0000000000000000 t = 84.6000, H(p,q)-H0 = 0.0000000021904942, L(p,q)-L0 = -0.0000000000000001 t = 84.7000, H(p,q)-H0 = 0.0000000021905022, L(p,q)-L0 = -0.0000000000000001 t = 84.8000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.68405e-13, num. orbits is now 13.50 +t = 84.8230, H(p,q)-H0 = 0.0000000021905030, L(p,q)-L0 = -0.0000000000000079 t = 84.9000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = -0.0000000000000001 t = 85.0000, H(p,q)-H0 = 0.0000000021904983, L(p,q)-L0 = 0.0000000000000000 t = 85.1000, H(p,q)-H0 = 0.0000000021904875, L(p,q)-L0 = -0.0000000000000002 @@ -942,9 +942,9 @@ t = 87.5000, H(p,q)-H0 = 0.0000000016811599, L(p,q)-L0 = 0.0000000000000000 t = 87.6000, H(p,q)-H0 = 0.0000000009964676, L(p,q)-L0 = -0.0000000000000002 t = 87.7000, H(p,q)-H0 = -0.0000000004693219, L(p,q)-L0 = -0.0000000000000001 t = 87.8000, H(p,q)-H0 = -0.0000000022005262, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: t = 87.8504 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 87.8504, H(p,q)-H0 = -0.0000000012000709, L(p,q)-L0 = 0.0000000001728662 t = 87.9000, H(p,q)-H0 = -0.0000000011032588, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.95627e-12, num. orbits is now 14.00 +t = 87.9646, H(p,q)-H0 = -0.0000000359256414, L(p,q)-L0 = -0.0000000078329813 t = 88.0000, H(p,q)-H0 = -0.0000000003564948, L(p,q)-L0 = 0.0000000000000000 t = 88.1000, H(p,q)-H0 = -0.0000000022895377, L(p,q)-L0 = 0.0000000000000000 t = 88.2000, H(p,q)-H0 = -0.0000000010732304, L(p,q)-L0 = -0.0000000000000001 @@ -955,8 +955,6 @@ t = 88.6000, H(p,q)-H0 = 0.0000000020568457, L(p,q)-L0 = 0.0000000000000001 t = 88.7000, H(p,q)-H0 = 0.0000000021232918, L(p,q)-L0 = 0.0000000000000000 t = 88.8000, H(p,q)-H0 = 0.0000000021541700, L(p,q)-L0 = 0.0000000000000000 t = 88.9000, H(p,q)-H0 = 0.0000000021695511, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 88.9951 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 88.9951, H(p,q)-H0 = 0.0000000021729337, L(p,q)-L0 = -0.0000000000058159 t = 89.0000, H(p,q)-H0 = 0.0000000021777253, L(p,q)-L0 = 0.0000000000000000 t = 89.1000, H(p,q)-H0 = 0.0000000021823305, L(p,q)-L0 = 0.0000000000000000 t = 89.2000, H(p,q)-H0 = 0.0000000021850627, L(p,q)-L0 = -0.0000000000000001 @@ -979,6 +977,8 @@ t = 90.8000, H(p,q)-H0 = 0.0000000021904836, L(p,q)-L0 = -0.0000000000000001 t = 90.9000, H(p,q)-H0 = 0.0000000021904958, L(p,q)-L0 = -0.0000000000000001 t = 91.0000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000001 t = 91.1000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = 0.0000000000000000 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -8.73325e-16, num. orbits is now 14.50 +t = 91.1062, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = -0.0000000000000145 t = 91.2000, H(p,q)-H0 = 0.0000000021905036, L(p,q)-L0 = -0.0000000000000001 t = 91.3000, H(p,q)-H0 = 0.0000000021904969, L(p,q)-L0 = 0.0000000000000000 t = 91.4000, H(p,q)-H0 = 0.0000000021904853, L(p,q)-L0 = -0.0000000000000001 @@ -1009,9 +1009,9 @@ t = 93.8000, H(p,q)-H0 = 0.0000000016036215, L(p,q)-L0 = -0.0000000000000001 t = 93.9000, H(p,q)-H0 = 0.0000000008137404, L(p,q)-L0 = -0.0000000000000001 t = 94.0000, H(p,q)-H0 = -0.0000000007952294, L(p,q)-L0 = 0.0000000000000000 t = 94.1000, H(p,q)-H0 = -0.0000000022989104, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 94.1336 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 94.1336, H(p,q)-H0 = 0.0000000079756906, L(p,q)-L0 = 0.0000000019152172 t = 94.2000, H(p,q)-H0 = -0.0000000006765071, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.09707e-12, num. orbits is now 15.00 +t = 94.2478, H(p,q)-H0 = -0.0000000391316370, L(p,q)-L0 = -0.0000000085368175 t = 94.3000, H(p,q)-H0 = -0.0000000007326104, L(p,q)-L0 = -0.0000000000000002 t = 94.4000, H(p,q)-H0 = -0.0000000022880617, L(p,q)-L0 = -0.0000000000000001 t = 94.5000, H(p,q)-H0 = -0.0000000007392522, L(p,q)-L0 = -0.0000000000000002 @@ -1022,8 +1022,6 @@ t = 94.9000, H(p,q)-H0 = 0.0000000020720647, L(p,q)-L0 = -0.0000000000000001 t = 95.0000, H(p,q)-H0 = 0.0000000021301907, L(p,q)-L0 = 0.0000000000000000 t = 95.1000, H(p,q)-H0 = 0.0000000021575237, L(p,q)-L0 = 0.0000000000000000 t = 95.2000, H(p,q)-H0 = 0.0000000021712937, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: t = 95.2783 g[0] = -1, y[0] = -0.658625, y[1] = 0.798625 -t = 95.2783, H(p,q)-H0 = 0.0000000021732485, L(p,q)-L0 = -0.0000000000053928 t = 95.3000, H(p,q)-H0 = 0.0000000021786871, L(p,q)-L0 = -0.0000000000000001 t = 95.4000, H(p,q)-H0 = 0.0000000021828907, L(p,q)-L0 = 0.0000000000000000 t = 95.5000, H(p,q)-H0 = 0.0000000021854049, L(p,q)-L0 = -0.0000000000000001 @@ -1045,6 +1043,8 @@ t = 97.0000, H(p,q)-H0 = 0.0000000021904694, L(p,q)-L0 = 0.0000000000000000 t = 97.1000, H(p,q)-H0 = 0.0000000021904860, L(p,q)-L0 = -0.0000000000000001 t = 97.2000, H(p,q)-H0 = 0.0000000021904973, L(p,q)-L0 = -0.0000000000000001 t = 97.3000, H(p,q)-H0 = 0.0000000021905037, L(p,q)-L0 = -0.0000000000000001 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.39091e-13, num. orbits is now 15.50 +t = 97.3894, H(p,q)-H0 = 0.0000000021905037, L(p,q)-L0 = -0.0000000000000056 t = 97.4000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 t = 97.5000, H(p,q)-H0 = 0.0000000021905026, L(p,q)-L0 = -0.0000000000000001 t = 97.6000, H(p,q)-H0 = 0.0000000021904953, L(p,q)-L0 = -0.0000000000000001 @@ -1083,6 +1083,6 @@ Inequality constraint fails = 0 Initial step size = 0.01 Last step size = 0.009999999999990896 Current step size = 0.009999999999990896 -Root fn evals = 10298 +Root fn evals = 10274 f1 RHS fn evals = 40032 f2 RHS fn evals = 40032 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots.out deleted file mode 100644 index 46eadf4bf8..0000000000 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots.out +++ /dev/null @@ -1,1088 +0,0 @@ - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.01 - Tf: 100 - nout: 1000 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 0.1000, H(p,q)-H0 = -0.0000000018824715, L(p,q)-L0 = 0.0000000000000004 -t = 0.2000, H(p,q)-H0 = -0.0000000017446893, L(p,q)-L0 = 0.0000000000000000 -t = 0.3000, H(p,q)-H0 = 0.0000000001300136, L(p,q)-L0 = 0.0000000000000004 -t = 0.4000, H(p,q)-H0 = 0.0000000012995816, L(p,q)-L0 = 0.0000000000000003 -t = 0.5000, H(p,q)-H0 = 0.0000000018083006, L(p,q)-L0 = 0.0000000000000004 -t = 0.6000, H(p,q)-H0 = 0.0000000020168764, L(p,q)-L0 = 0.0000000000000003 -t = 0.7000, H(p,q)-H0 = 0.0000000021055059, L(p,q)-L0 = 0.0000000000000009 -t = 0.8000, H(p,q)-H0 = 0.0000000021456843, L(p,q)-L0 = 0.0000000000000012 -t = 0.9000, H(p,q)-H0 = 0.0000000021652187, L(p,q)-L0 = 0.0000000000000012 -t = 1.0000, H(p,q)-H0 = 0.0000000021753710, L(p,q)-L0 = 0.0000000000000007 -ROOT RETURN: t = 1.0305 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 1.0305, H(p,q)-H0 = 0.0000000021770694, L(p,q)-L0 = -0.0000000000004660 -t = 1.1000, H(p,q)-H0 = 0.0000000021809786, L(p,q)-L0 = 0.0000000000000008 -t = 1.2000, H(p,q)-H0 = 0.0000000021842472, L(p,q)-L0 = 0.0000000000000006 -t = 1.3000, H(p,q)-H0 = 0.0000000021862454, L(p,q)-L0 = 0.0000000000000007 -t = 1.4000, H(p,q)-H0 = 0.0000000021875197, L(p,q)-L0 = 0.0000000000000004 -t = 1.5000, H(p,q)-H0 = 0.0000000021883627, L(p,q)-L0 = 0.0000000000000007 -t = 1.6000, H(p,q)-H0 = 0.0000000021889383, L(p,q)-L0 = 0.0000000000000004 -t = 1.7000, H(p,q)-H0 = 0.0000000021893426, L(p,q)-L0 = 0.0000000000000001 -t = 1.8000, H(p,q)-H0 = 0.0000000021896337, L(p,q)-L0 = 0.0000000000000000 -t = 1.9000, H(p,q)-H0 = 0.0000000021898475, L(p,q)-L0 = -0.0000000000000002 -t = 2.0000, H(p,q)-H0 = 0.0000000021900078, L(p,q)-L0 = -0.0000000000000003 -t = 2.1000, H(p,q)-H0 = 0.0000000021901300, L(p,q)-L0 = -0.0000000000000003 -t = 2.2000, H(p,q)-H0 = 0.0000000021902241, L(p,q)-L0 = 0.0000000000000000 -t = 2.3000, H(p,q)-H0 = 0.0000000021902972, L(p,q)-L0 = 0.0000000000000001 -t = 2.4000, H(p,q)-H0 = 0.0000000021903539, L(p,q)-L0 = -0.0000000000000002 -t = 2.5000, H(p,q)-H0 = 0.0000000021903985, L(p,q)-L0 = -0.0000000000000004 -t = 2.6000, H(p,q)-H0 = 0.0000000021904330, L(p,q)-L0 = -0.0000000000000003 -t = 2.7000, H(p,q)-H0 = 0.0000000021904595, L(p,q)-L0 = -0.0000000000000006 -t = 2.8000, H(p,q)-H0 = 0.0000000021904794, L(p,q)-L0 = -0.0000000000000007 -t = 2.9000, H(p,q)-H0 = 0.0000000021904932, L(p,q)-L0 = -0.0000000000000008 -t = 3.0000, H(p,q)-H0 = 0.0000000021905022, L(p,q)-L0 = -0.0000000000000008 -t = 3.1000, H(p,q)-H0 = 0.0000000021905060, L(p,q)-L0 = -0.0000000000000016 -t = 3.2000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = -0.0000000000000019 -t = 3.3000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = -0.0000000000000018 -t = 3.4000, H(p,q)-H0 = 0.0000000021904906, L(p,q)-L0 = -0.0000000000000020 -t = 3.5000, H(p,q)-H0 = 0.0000000021904755, L(p,q)-L0 = -0.0000000000000021 -t = 3.6000, H(p,q)-H0 = 0.0000000021904544, L(p,q)-L0 = -0.0000000000000022 -t = 3.7000, H(p,q)-H0 = 0.0000000021904261, L(p,q)-L0 = -0.0000000000000026 -t = 3.8000, H(p,q)-H0 = 0.0000000021903898, L(p,q)-L0 = -0.0000000000000023 -t = 3.9000, H(p,q)-H0 = 0.0000000021903431, L(p,q)-L0 = -0.0000000000000024 -t = 4.0000, H(p,q)-H0 = 0.0000000021902835, L(p,q)-L0 = -0.0000000000000026 -t = 4.1000, H(p,q)-H0 = 0.0000000021902075, L(p,q)-L0 = -0.0000000000000021 -t = 4.2000, H(p,q)-H0 = 0.0000000021901092, L(p,q)-L0 = -0.0000000000000018 -t = 4.3000, H(p,q)-H0 = 0.0000000021899808, L(p,q)-L0 = -0.0000000000000022 -t = 4.4000, H(p,q)-H0 = 0.0000000021898121, L(p,q)-L0 = -0.0000000000000018 -t = 4.5000, H(p,q)-H0 = 0.0000000021895855, L(p,q)-L0 = -0.0000000000000022 -t = 4.6000, H(p,q)-H0 = 0.0000000021892767, L(p,q)-L0 = -0.0000000000000022 -t = 4.7000, H(p,q)-H0 = 0.0000000021888460, L(p,q)-L0 = -0.0000000000000021 -t = 4.8000, H(p,q)-H0 = 0.0000000021882305, L(p,q)-L0 = -0.0000000000000020 -t = 4.9000, H(p,q)-H0 = 0.0000000021873248, L(p,q)-L0 = -0.0000000000000017 -t = 5.0000, H(p,q)-H0 = 0.0000000021859475, L(p,q)-L0 = -0.0000000000000017 -t = 5.1000, H(p,q)-H0 = 0.0000000021837739, L(p,q)-L0 = -0.0000000000000018 -t = 5.2000, H(p,q)-H0 = 0.0000000021801948, L(p,q)-L0 = -0.0000000000000017 -t = 5.3000, H(p,q)-H0 = 0.0000000021740074, L(p,q)-L0 = -0.0000000000000018 -t = 5.4000, H(p,q)-H0 = 0.0000000021627112, L(p,q)-L0 = -0.0000000000000017 -t = 5.5000, H(p,q)-H0 = 0.0000000021407837, L(p,q)-L0 = -0.0000000000000020 -t = 5.6000, H(p,q)-H0 = 0.0000000020952701, L(p,q)-L0 = -0.0000000000000018 -t = 5.7000, H(p,q)-H0 = 0.0000000019940063, L(p,q)-L0 = -0.0000000000000021 -t = 5.8000, H(p,q)-H0 = 0.0000000017543397, L(p,q)-L0 = -0.0000000000000024 -t = 5.9000, H(p,q)-H0 = 0.0000000011716919, L(p,q)-L0 = -0.0000000000000024 -t = 6.0000, H(p,q)-H0 = -0.0000000001292921, L(p,q)-L0 = -0.0000000000000028 -t = 6.1000, H(p,q)-H0 = -0.0000000019832644, L(p,q)-L0 = -0.0000000000000024 -ROOT RETURN: t = 6.1690 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 6.1690, H(p,q)-H0 = 0.0000000071529027, L(p,q)-L0 = 0.0000000018309203 -t = 6.2000, H(p,q)-H0 = -0.0000000015692083, L(p,q)-L0 = -0.0000000000000024 -t = 6.3000, H(p,q)-H0 = -0.0000000000785492, L(p,q)-L0 = -0.0000000000000023 -t = 6.4000, H(p,q)-H0 = -0.0000000021444535, L(p,q)-L0 = -0.0000000000000026 -t = 6.5000, H(p,q)-H0 = -0.0000000014380235, L(p,q)-L0 = -0.0000000000000027 -t = 6.6000, H(p,q)-H0 = 0.0000000003899563, L(p,q)-L0 = -0.0000000000000023 -t = 6.7000, H(p,q)-H0 = 0.0000000014194250, L(p,q)-L0 = -0.0000000000000023 -t = 6.8000, H(p,q)-H0 = 0.0000000018574048, L(p,q)-L0 = -0.0000000000000017 -t = 6.9000, H(p,q)-H0 = 0.0000000020373458, L(p,q)-L0 = -0.0000000000000014 -t = 7.0000, H(p,q)-H0 = 0.0000000021145609, L(p,q)-L0 = -0.0000000000000008 -t = 7.1000, H(p,q)-H0 = 0.0000000021499782, L(p,q)-L0 = -0.0000000000000004 -t = 7.2000, H(p,q)-H0 = 0.0000000021673986, L(p,q)-L0 = -0.0000000000000002 -t = 7.3000, H(p,q)-H0 = 0.0000000021765503, L(p,q)-L0 = -0.0000000000000002 -ROOT RETURN: t = 7.3137 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 7.3137, H(p,q)-H0 = 0.0000000021741309, L(p,q)-L0 = -0.0000000000042731 -t = 7.4000, H(p,q)-H0 = 0.0000000021816533, L(p,q)-L0 = 0.0000000000000002 -t = 7.5000, H(p,q)-H0 = 0.0000000021846533, L(p,q)-L0 = 0.0000000000000007 -t = 7.6000, H(p,q)-H0 = 0.0000000021865008, L(p,q)-L0 = 0.0000000000000004 -t = 7.7000, H(p,q)-H0 = 0.0000000021876867, L(p,q)-L0 = 0.0000000000000004 -t = 7.8000, H(p,q)-H0 = 0.0000000021884756, L(p,q)-L0 = 0.0000000000000004 -t = 7.9000, H(p,q)-H0 = 0.0000000021890174, L(p,q)-L0 = 0.0000000000000006 -t = 8.0000, H(p,q)-H0 = 0.0000000021893999, L(p,q)-L0 = 0.0000000000000010 -t = 8.1000, H(p,q)-H0 = 0.0000000021896761, L(p,q)-L0 = 0.0000000000000009 -t = 8.2000, H(p,q)-H0 = 0.0000000021898795, L(p,q)-L0 = 0.0000000000000008 -t = 8.3000, H(p,q)-H0 = 0.0000000021900325, L(p,q)-L0 = 0.0000000000000009 -t = 8.4000, H(p,q)-H0 = 0.0000000021901491, L(p,q)-L0 = 0.0000000000000010 -t = 8.5000, H(p,q)-H0 = 0.0000000021902389, L(p,q)-L0 = 0.0000000000000011 -t = 8.6000, H(p,q)-H0 = 0.0000000021903087, L(p,q)-L0 = 0.0000000000000009 -t = 8.7000, H(p,q)-H0 = 0.0000000021903636, L(p,q)-L0 = 0.0000000000000011 -t = 8.8000, H(p,q)-H0 = 0.0000000021904061, L(p,q)-L0 = 0.0000000000000010 -t = 8.9000, H(p,q)-H0 = 0.0000000021904393, L(p,q)-L0 = 0.0000000000000009 -t = 9.0000, H(p,q)-H0 = 0.0000000021904647, L(p,q)-L0 = 0.0000000000000004 -t = 9.1000, H(p,q)-H0 = 0.0000000021904831, L(p,q)-L0 = 0.0000000000000000 -t = 9.2000, H(p,q)-H0 = 0.0000000021904960, L(p,q)-L0 = -0.0000000000000002 -t = 9.3000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = -0.0000000000000003 -t = 9.4000, H(p,q)-H0 = 0.0000000021905078, L(p,q)-L0 = -0.0000000000000002 -t = 9.5000, H(p,q)-H0 = 0.0000000021905066, L(p,q)-L0 = 0.0000000000000000 -t = 9.6000, H(p,q)-H0 = 0.0000000021905008, L(p,q)-L0 = 0.0000000000000002 -t = 9.7000, H(p,q)-H0 = 0.0000000021904900, L(p,q)-L0 = 0.0000000000000000 -t = 9.8000, H(p,q)-H0 = 0.0000000021904742, L(p,q)-L0 = 0.0000000000000006 -t = 9.9000, H(p,q)-H0 = 0.0000000021904522, L(p,q)-L0 = 0.0000000000000006 -t = 10.0000, H(p,q)-H0 = 0.0000000021904231, L(p,q)-L0 = 0.0000000000000008 -t = 10.1000, H(p,q)-H0 = 0.0000000021903852, L(p,q)-L0 = 0.0000000000000006 -t = 10.2000, H(p,q)-H0 = 0.0000000021903366, L(p,q)-L0 = 0.0000000000000008 -t = 10.3000, H(p,q)-H0 = 0.0000000021902746, L(p,q)-L0 = 0.0000000000000009 -t = 10.4000, H(p,q)-H0 = 0.0000000021901951, L(p,q)-L0 = 0.0000000000000011 -t = 10.5000, H(p,q)-H0 = 0.0000000021900923, L(p,q)-L0 = 0.0000000000000010 -t = 10.6000, H(p,q)-H0 = 0.0000000021899583, L(p,q)-L0 = 0.0000000000000011 -t = 10.7000, H(p,q)-H0 = 0.0000000021897812, L(p,q)-L0 = 0.0000000000000016 -t = 10.8000, H(p,q)-H0 = 0.0000000021895435, L(p,q)-L0 = 0.0000000000000019 -t = 10.9000, H(p,q)-H0 = 0.0000000021892176, L(p,q)-L0 = 0.0000000000000020 -t = 11.0000, H(p,q)-H0 = 0.0000000021887611, L(p,q)-L0 = 0.0000000000000020 -t = 11.1000, H(p,q)-H0 = 0.0000000021881056, L(p,q)-L0 = 0.0000000000000022 -t = 11.2000, H(p,q)-H0 = 0.0000000021871360, L(p,q)-L0 = 0.0000000000000023 -t = 11.3000, H(p,q)-H0 = 0.0000000021856529, L(p,q)-L0 = 0.0000000000000023 -t = 11.4000, H(p,q)-H0 = 0.0000000021832968, L(p,q)-L0 = 0.0000000000000023 -t = 11.5000, H(p,q)-H0 = 0.0000000021793864, L(p,q)-L0 = 0.0000000000000024 -t = 11.6000, H(p,q)-H0 = 0.0000000021725675, L(p,q)-L0 = 0.0000000000000024 -t = 11.7000, H(p,q)-H0 = 0.0000000021599945, L(p,q)-L0 = 0.0000000000000022 -t = 11.8000, H(p,q)-H0 = 0.0000000021353220, L(p,q)-L0 = 0.0000000000000028 -t = 11.9000, H(p,q)-H0 = 0.0000000020835074, L(p,q)-L0 = 0.0000000000000022 -t = 12.0000, H(p,q)-H0 = 0.0000000019669100, L(p,q)-L0 = 0.0000000000000022 -t = 12.1000, H(p,q)-H0 = 0.0000000016886921, L(p,q)-L0 = 0.0000000000000020 -t = 12.2000, H(p,q)-H0 = 0.0000000010143850, L(p,q)-L0 = 0.0000000000000023 -t = 12.3000, H(p,q)-H0 = -0.0000000004357736, L(p,q)-L0 = 0.0000000000000022 -t = 12.4000, H(p,q)-H0 = -0.0000000021842232, L(p,q)-L0 = 0.0000000000000022 -ROOT RETURN: t = 12.4522 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 12.4522, H(p,q)-H0 = 0.0000000036282710, L(p,q)-L0 = 0.0000000010789374 -t = 12.5000, H(p,q)-H0 = -0.0000000011492758, L(p,q)-L0 = 0.0000000000000023 -t = 12.6000, H(p,q)-H0 = -0.0000000003225991, L(p,q)-L0 = 0.0000000000000024 -t = 12.7000, H(p,q)-H0 = -0.0000000022824569, L(p,q)-L0 = 0.0000000000000024 -t = 12.8000, H(p,q)-H0 = -0.0000000011085746, L(p,q)-L0 = 0.0000000000000024 -t = 12.9000, H(p,q)-H0 = 0.0000000006228686, L(p,q)-L0 = 0.0000000000000024 -t = 13.0000, H(p,q)-H0 = 0.0000000015228507, L(p,q)-L0 = 0.0000000000000026 -t = 13.1000, H(p,q)-H0 = 0.0000000018996709, L(p,q)-L0 = 0.0000000000000023 -t = 13.2000, H(p,q)-H0 = 0.0000000020551160, L(p,q)-L0 = 0.0000000000000022 -t = 13.3000, H(p,q)-H0 = 0.0000000021225143, L(p,q)-L0 = 0.0000000000000018 -t = 13.4000, H(p,q)-H0 = 0.0000000021537955, L(p,q)-L0 = 0.0000000000000011 -t = 13.5000, H(p,q)-H0 = 0.0000000021693588, L(p,q)-L0 = 0.0000000000000012 -ROOT RETURN: t = 13.5969 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 13.5969, H(p,q)-H0 = 0.0000000021723162, L(p,q)-L0 = -0.0000000000066065 -t = 13.6000, H(p,q)-H0 = 0.0000000021776211, L(p,q)-L0 = 0.0000000000000014 -t = 13.7000, H(p,q)-H0 = 0.0000000021822713, L(p,q)-L0 = 0.0000000000000014 -t = 13.8000, H(p,q)-H0 = 0.0000000021850281, L(p,q)-L0 = 0.0000000000000018 -t = 13.9000, H(p,q)-H0 = 0.0000000021867388, L(p,q)-L0 = 0.0000000000000022 -t = 14.0000, H(p,q)-H0 = 0.0000000021878430, L(p,q)-L0 = 0.0000000000000020 -t = 14.1000, H(p,q)-H0 = 0.0000000021885820, L(p,q)-L0 = 0.0000000000000019 -t = 14.2000, H(p,q)-H0 = 0.0000000021890917, L(p,q)-L0 = 0.0000000000000020 -t = 14.3000, H(p,q)-H0 = 0.0000000021894530, L(p,q)-L0 = 0.0000000000000019 -t = 14.4000, H(p,q)-H0 = 0.0000000021897152, L(p,q)-L0 = 0.0000000000000022 -t = 14.5000, H(p,q)-H0 = 0.0000000021899093, L(p,q)-L0 = 0.0000000000000024 -t = 14.6000, H(p,q)-H0 = 0.0000000021900552, L(p,q)-L0 = 0.0000000000000024 -t = 14.7000, H(p,q)-H0 = 0.0000000021901674, L(p,q)-L0 = 0.0000000000000032 -t = 14.8000, H(p,q)-H0 = 0.0000000021902533, L(p,q)-L0 = 0.0000000000000029 -t = 14.9000, H(p,q)-H0 = 0.0000000021903204, L(p,q)-L0 = 0.0000000000000031 -t = 15.0000, H(p,q)-H0 = 0.0000000021903728, L(p,q)-L0 = 0.0000000000000030 -t = 15.1000, H(p,q)-H0 = 0.0000000021904137, L(p,q)-L0 = 0.0000000000000030 -t = 15.2000, H(p,q)-H0 = 0.0000000021904455, L(p,q)-L0 = 0.0000000000000031 -t = 15.3000, H(p,q)-H0 = 0.0000000021904695, L(p,q)-L0 = 0.0000000000000030 -t = 15.4000, H(p,q)-H0 = 0.0000000021904875, L(p,q)-L0 = 0.0000000000000032 -t = 15.5000, H(p,q)-H0 = 0.0000000021904996, L(p,q)-L0 = 0.0000000000000029 -t = 15.6000, H(p,q)-H0 = 0.0000000021905063, L(p,q)-L0 = 0.0000000000000020 -t = 15.7000, H(p,q)-H0 = 0.0000000021905089, L(p,q)-L0 = 0.0000000000000017 -t = 15.8000, H(p,q)-H0 = 0.0000000021905071, L(p,q)-L0 = 0.0000000000000020 -t = 15.9000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = 0.0000000000000020 -t = 16.0000, H(p,q)-H0 = 0.0000000021904886, L(p,q)-L0 = 0.0000000000000017 -t = 16.1000, H(p,q)-H0 = 0.0000000021904715, L(p,q)-L0 = 0.0000000000000016 -t = 16.2000, H(p,q)-H0 = 0.0000000021904482, L(p,q)-L0 = 0.0000000000000016 -t = 16.3000, H(p,q)-H0 = 0.0000000021904181, L(p,q)-L0 = 0.0000000000000019 -t = 16.4000, H(p,q)-H0 = 0.0000000021903783, L(p,q)-L0 = 0.0000000000000014 -t = 16.5000, H(p,q)-H0 = 0.0000000021903276, L(p,q)-L0 = 0.0000000000000012 -t = 16.6000, H(p,q)-H0 = 0.0000000021902630, L(p,q)-L0 = 0.0000000000000013 -t = 16.7000, H(p,q)-H0 = 0.0000000021901800, L(p,q)-L0 = 0.0000000000000016 -t = 16.8000, H(p,q)-H0 = 0.0000000021900730, L(p,q)-L0 = 0.0000000000000020 -t = 16.9000, H(p,q)-H0 = 0.0000000021899325, L(p,q)-L0 = 0.0000000000000020 -t = 17.0000, H(p,q)-H0 = 0.0000000021897464, L(p,q)-L0 = 0.0000000000000018 -t = 17.1000, H(p,q)-H0 = 0.0000000021894955, L(p,q)-L0 = 0.0000000000000018 -t = 17.2000, H(p,q)-H0 = 0.0000000021891514, L(p,q)-L0 = 0.0000000000000021 -t = 17.3000, H(p,q)-H0 = 0.0000000021886670, L(p,q)-L0 = 0.0000000000000020 -t = 17.4000, H(p,q)-H0 = 0.0000000021879680, L(p,q)-L0 = 0.0000000000000017 -t = 17.5000, H(p,q)-H0 = 0.0000000021869294, L(p,q)-L0 = 0.0000000000000020 -t = 17.6000, H(p,q)-H0 = 0.0000000021853308, L(p,q)-L0 = 0.0000000000000020 -t = 17.7000, H(p,q)-H0 = 0.0000000021827730, L(p,q)-L0 = 0.0000000000000020 -t = 17.8000, H(p,q)-H0 = 0.0000000021784950, L(p,q)-L0 = 0.0000000000000021 -t = 17.9000, H(p,q)-H0 = 0.0000000021709682, L(p,q)-L0 = 0.0000000000000022 -t = 18.0000, H(p,q)-H0 = 0.0000000021569497, L(p,q)-L0 = 0.0000000000000022 -t = 18.1000, H(p,q)-H0 = 0.0000000021291338, L(p,q)-L0 = 0.0000000000000024 -t = 18.2000, H(p,q)-H0 = 0.0000000020700305, L(p,q)-L0 = 0.0000000000000020 -t = 18.3000, H(p,q)-H0 = 0.0000000019355451, L(p,q)-L0 = 0.0000000000000018 -t = 18.4000, H(p,q)-H0 = 0.0000000016123738, L(p,q)-L0 = 0.0000000000000019 -t = 18.5000, H(p,q)-H0 = 0.0000000008341943, L(p,q)-L0 = 0.0000000000000017 -t = 18.6000, H(p,q)-H0 = -0.0000000007602392, L(p,q)-L0 = 0.0000000000000018 -t = 18.7000, H(p,q)-H0 = -0.0000000022936391, L(p,q)-L0 = 0.0000000000000017 -ROOT RETURN: t = 18.7354 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 18.7354, H(p,q)-H0 = 0.0000000126969431, L(p,q)-L0 = 0.0000000028491541 -t = 18.8000, H(p,q)-H0 = -0.0000000007197518, L(p,q)-L0 = 0.0000000000000013 -t = 18.9000, H(p,q)-H0 = -0.0000000006891667, L(p,q)-L0 = 0.0000000000000012 -t = 19.0000, H(p,q)-H0 = -0.0000000022938584, L(p,q)-L0 = 0.0000000000000012 -t = 19.1000, H(p,q)-H0 = -0.0000000007742569, L(p,q)-L0 = 0.0000000000000013 -t = 19.2000, H(p,q)-H0 = 0.0000000008292620, L(p,q)-L0 = 0.0000000000000008 -t = 19.3000, H(p,q)-H0 = 0.0000000016119190, L(p,q)-L0 = 0.0000000000000008 -t = 19.4000, H(p,q)-H0 = 0.0000000019360704, L(p,q)-L0 = 0.0000000000000010 -t = 19.5000, H(p,q)-H0 = 0.0000000020705563, L(p,q)-L0 = 0.0000000000000016 -t = 19.6000, H(p,q)-H0 = 0.0000000021295040, L(p,q)-L0 = 0.0000000000000018 -t = 19.7000, H(p,q)-H0 = 0.0000000021571889, L(p,q)-L0 = 0.0000000000000014 -t = 19.8000, H(p,q)-H0 = 0.0000000021711196, L(p,q)-L0 = 0.0000000000000019 -ROOT RETURN: t = 19.8800 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 19.8800, H(p,q)-H0 = 0.0000000021773984, L(p,q)-L0 = -0.0000000000000364 -t = 19.9000, H(p,q)-H0 = 0.0000000021785913, L(p,q)-L0 = 0.0000000000000020 -t = 20.0000, H(p,q)-H0 = 0.0000000021828354, L(p,q)-L0 = 0.0000000000000023 -t = 20.1000, H(p,q)-H0 = 0.0000000021853712, L(p,q)-L0 = 0.0000000000000021 -t = 20.2000, H(p,q)-H0 = 0.0000000021869562, L(p,q)-L0 = 0.0000000000000021 -t = 20.3000, H(p,q)-H0 = 0.0000000021879860, L(p,q)-L0 = 0.0000000000000018 -t = 20.4000, H(p,q)-H0 = 0.0000000021886788, L(p,q)-L0 = 0.0000000000000018 -t = 20.5000, H(p,q)-H0 = 0.0000000021891593, L(p,q)-L0 = 0.0000000000000020 -t = 20.6000, H(p,q)-H0 = 0.0000000021895015, L(p,q)-L0 = 0.0000000000000026 -t = 20.7000, H(p,q)-H0 = 0.0000000021897504, L(p,q)-L0 = 0.0000000000000026 -t = 20.8000, H(p,q)-H0 = 0.0000000021899352, L(p,q)-L0 = 0.0000000000000023 -t = 20.9000, H(p,q)-H0 = 0.0000000021900748, L(p,q)-L0 = 0.0000000000000029 -t = 21.0000, H(p,q)-H0 = 0.0000000021901817, L(p,q)-L0 = 0.0000000000000031 -t = 21.1000, H(p,q)-H0 = 0.0000000021902642, L(p,q)-L0 = 0.0000000000000031 -t = 21.2000, H(p,q)-H0 = 0.0000000021903285, L(p,q)-L0 = 0.0000000000000031 -t = 21.3000, H(p,q)-H0 = 0.0000000021903787, L(p,q)-L0 = 0.0000000000000028 -t = 21.4000, H(p,q)-H0 = 0.0000000021904180, L(p,q)-L0 = 0.0000000000000030 -t = 21.5000, H(p,q)-H0 = 0.0000000021904483, L(p,q)-L0 = 0.0000000000000029 -t = 21.6000, H(p,q)-H0 = 0.0000000021904710, L(p,q)-L0 = 0.0000000000000024 -t = 21.7000, H(p,q)-H0 = 0.0000000021904880, L(p,q)-L0 = 0.0000000000000026 -t = 21.8000, H(p,q)-H0 = 0.0000000021904994, L(p,q)-L0 = 0.0000000000000027 -t = 21.9000, H(p,q)-H0 = 0.0000000021905060, L(p,q)-L0 = 0.0000000000000027 -t = 22.0000, H(p,q)-H0 = 0.0000000021905077, L(p,q)-L0 = 0.0000000000000024 -t = 22.1000, H(p,q)-H0 = 0.0000000021905051, L(p,q)-L0 = 0.0000000000000027 -t = 22.2000, H(p,q)-H0 = 0.0000000021904976, L(p,q)-L0 = 0.0000000000000028 -t = 22.3000, H(p,q)-H0 = 0.0000000021904854, L(p,q)-L0 = 0.0000000000000028 -t = 22.4000, H(p,q)-H0 = 0.0000000021904675, L(p,q)-L0 = 0.0000000000000029 -t = 22.5000, H(p,q)-H0 = 0.0000000021904432, L(p,q)-L0 = 0.0000000000000028 -t = 22.6000, H(p,q)-H0 = 0.0000000021904113, L(p,q)-L0 = 0.0000000000000032 -t = 22.7000, H(p,q)-H0 = 0.0000000021903700, L(p,q)-L0 = 0.0000000000000031 -t = 22.8000, H(p,q)-H0 = 0.0000000021903174, L(p,q)-L0 = 0.0000000000000029 -t = 22.9000, H(p,q)-H0 = 0.0000000021902499, L(p,q)-L0 = 0.0000000000000030 -t = 23.0000, H(p,q)-H0 = 0.0000000021901633, L(p,q)-L0 = 0.0000000000000031 -t = 23.1000, H(p,q)-H0 = 0.0000000021900513, L(p,q)-L0 = 0.0000000000000034 -t = 23.2000, H(p,q)-H0 = 0.0000000021899044, L(p,q)-L0 = 0.0000000000000036 -t = 23.3000, H(p,q)-H0 = 0.0000000021897089, L(p,q)-L0 = 0.0000000000000031 -t = 23.4000, H(p,q)-H0 = 0.0000000021894446, L(p,q)-L0 = 0.0000000000000031 -t = 23.5000, H(p,q)-H0 = 0.0000000021890804, L(p,q)-L0 = 0.0000000000000030 -t = 23.6000, H(p,q)-H0 = 0.0000000021885663, L(p,q)-L0 = 0.0000000000000030 -t = 23.7000, H(p,q)-H0 = 0.0000000021878209, L(p,q)-L0 = 0.0000000000000026 -t = 23.8000, H(p,q)-H0 = 0.0000000021867065, L(p,q)-L0 = 0.0000000000000024 -t = 23.9000, H(p,q)-H0 = 0.0000000021849813, L(p,q)-L0 = 0.0000000000000023 -t = 24.0000, H(p,q)-H0 = 0.0000000021822015, L(p,q)-L0 = 0.0000000000000022 -t = 24.1000, H(p,q)-H0 = 0.0000000021775146, L(p,q)-L0 = 0.0000000000000024 -t = 24.2000, H(p,q)-H0 = 0.0000000021691927, L(p,q)-L0 = 0.0000000000000024 -t = 24.3000, H(p,q)-H0 = 0.0000000021535347, L(p,q)-L0 = 0.0000000000000026 -t = 24.4000, H(p,q)-H0 = 0.0000000021221145, L(p,q)-L0 = 0.0000000000000027 -t = 24.5000, H(p,q)-H0 = 0.0000000020545646, L(p,q)-L0 = 0.0000000000000027 -t = 24.6000, H(p,q)-H0 = 0.0000000018991955, L(p,q)-L0 = 0.0000000000000024 -t = 24.7000, H(p,q)-H0 = 0.0000000015237049, L(p,q)-L0 = 0.0000000000000018 -t = 24.8000, H(p,q)-H0 = 0.0000000006291418, L(p,q)-L0 = 0.0000000000000020 -t = 24.9000, H(p,q)-H0 = -0.0000000010937447, L(p,q)-L0 = 0.0000000000000016 -t = 25.0000, H(p,q)-H0 = -0.0000000022899942, L(p,q)-L0 = 0.0000000000000017 -ROOT RETURN: t = 25.0186 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 25.0186, H(p,q)-H0 = 0.0000000098686308, L(p,q)-L0 = 0.0000000023590684 -t = 25.1000, H(p,q)-H0 = -0.0000000003464102, L(p,q)-L0 = 0.0000000000000018 -t = 25.2000, H(p,q)-H0 = -0.0000000011168177, L(p,q)-L0 = 0.0000000000000011 -t = 25.3000, H(p,q)-H0 = -0.0000000021907172, L(p,q)-L0 = 0.0000000000000013 -t = 25.4000, H(p,q)-H0 = -0.0000000004484475, L(p,q)-L0 = 0.0000000000000016 -t = 25.5000, H(p,q)-H0 = 0.0000000010106107, L(p,q)-L0 = 0.0000000000000021 -t = 25.6000, H(p,q)-H0 = 0.0000000016885500, L(p,q)-L0 = 0.0000000000000023 -t = 25.7000, H(p,q)-H0 = 0.0000000019674671, L(p,q)-L0 = 0.0000000000000024 -t = 25.8000, H(p,q)-H0 = 0.0000000020840091, L(p,q)-L0 = 0.0000000000000028 -t = 25.9000, H(p,q)-H0 = 0.0000000021356669, L(p,q)-L0 = 0.0000000000000030 -t = 26.0000, H(p,q)-H0 = 0.0000000021602167, L(p,q)-L0 = 0.0000000000000033 -t = 26.1000, H(p,q)-H0 = 0.0000000021727081, L(p,q)-L0 = 0.0000000000000034 -ROOT RETURN: t = 26.1632 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 26.1632, H(p,q)-H0 = 0.0000000021745590, L(p,q)-L0 = -0.0000000000037175 -t = 26.2000, H(p,q)-H0 = 0.0000000021794757, L(p,q)-L0 = 0.0000000000000031 -t = 26.3000, H(p,q)-H0 = 0.0000000021833548, L(p,q)-L0 = 0.0000000000000031 -t = 26.4000, H(p,q)-H0 = 0.0000000021856916, L(p,q)-L0 = 0.0000000000000034 -t = 26.5000, H(p,q)-H0 = 0.0000000021871618, L(p,q)-L0 = 0.0000000000000036 -t = 26.6000, H(p,q)-H0 = 0.0000000021881231, L(p,q)-L0 = 0.0000000000000033 -t = 26.7000, H(p,q)-H0 = 0.0000000021887731, L(p,q)-L0 = 0.0000000000000033 -t = 26.8000, H(p,q)-H0 = 0.0000000021892259, L(p,q)-L0 = 0.0000000000000032 -t = 26.9000, H(p,q)-H0 = 0.0000000021895493, L(p,q)-L0 = 0.0000000000000032 -t = 27.0000, H(p,q)-H0 = 0.0000000021897855, L(p,q)-L0 = 0.0000000000000033 -t = 27.1000, H(p,q)-H0 = 0.0000000021899614, L(p,q)-L0 = 0.0000000000000030 -t = 27.2000, H(p,q)-H0 = 0.0000000021900946, L(p,q)-L0 = 0.0000000000000028 -t = 27.3000, H(p,q)-H0 = 0.0000000021901967, L(p,q)-L0 = 0.0000000000000028 -t = 27.4000, H(p,q)-H0 = 0.0000000021902758, L(p,q)-L0 = 0.0000000000000030 -t = 27.5000, H(p,q)-H0 = 0.0000000021903375, L(p,q)-L0 = 0.0000000000000029 -t = 27.6000, H(p,q)-H0 = 0.0000000021903857, L(p,q)-L0 = 0.0000000000000028 -t = 27.7000, H(p,q)-H0 = 0.0000000021904235, L(p,q)-L0 = 0.0000000000000031 -t = 27.8000, H(p,q)-H0 = 0.0000000021904527, L(p,q)-L0 = 0.0000000000000032 -t = 27.9000, H(p,q)-H0 = 0.0000000021904745, L(p,q)-L0 = 0.0000000000000033 -t = 28.0000, H(p,q)-H0 = 0.0000000021904908, L(p,q)-L0 = 0.0000000000000036 -t = 28.1000, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = 0.0000000000000034 -t = 28.2000, H(p,q)-H0 = 0.0000000021905070, L(p,q)-L0 = 0.0000000000000036 -t = 28.3000, H(p,q)-H0 = 0.0000000021905081, L(p,q)-L0 = 0.0000000000000036 -t = 28.4000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000031 -t = 28.5000, H(p,q)-H0 = 0.0000000021904960, L(p,q)-L0 = 0.0000000000000031 -t = 28.6000, H(p,q)-H0 = 0.0000000021904830, L(p,q)-L0 = 0.0000000000000033 -t = 28.7000, H(p,q)-H0 = 0.0000000021904643, L(p,q)-L0 = 0.0000000000000039 -t = 28.8000, H(p,q)-H0 = 0.0000000021904385, L(p,q)-L0 = 0.0000000000000037 -t = 28.9000, H(p,q)-H0 = 0.0000000021904052, L(p,q)-L0 = 0.0000000000000039 -t = 29.0000, H(p,q)-H0 = 0.0000000021903620, L(p,q)-L0 = 0.0000000000000037 -t = 29.1000, H(p,q)-H0 = 0.0000000021903072, L(p,q)-L0 = 0.0000000000000037 -t = 29.2000, H(p,q)-H0 = 0.0000000021902369, L(p,q)-L0 = 0.0000000000000038 -t = 29.3000, H(p,q)-H0 = 0.0000000021901463, L(p,q)-L0 = 0.0000000000000036 -t = 29.4000, H(p,q)-H0 = 0.0000000021900293, L(p,q)-L0 = 0.0000000000000042 -t = 29.5000, H(p,q)-H0 = 0.0000000021898753, L(p,q)-L0 = 0.0000000000000041 -t = 29.6000, H(p,q)-H0 = 0.0000000021896700, L(p,q)-L0 = 0.0000000000000042 -t = 29.7000, H(p,q)-H0 = 0.0000000021893919, L(p,q)-L0 = 0.0000000000000040 -t = 29.8000, H(p,q)-H0 = 0.0000000021890065, L(p,q)-L0 = 0.0000000000000040 -t = 29.9000, H(p,q)-H0 = 0.0000000021884604, L(p,q)-L0 = 0.0000000000000038 -t = 30.0000, H(p,q)-H0 = 0.0000000021876657, L(p,q)-L0 = 0.0000000000000044 -t = 30.1000, H(p,q)-H0 = 0.0000000021864693, L(p,q)-L0 = 0.0000000000000042 -t = 30.2000, H(p,q)-H0 = 0.0000000021846054, L(p,q)-L0 = 0.0000000000000042 -t = 30.3000, H(p,q)-H0 = 0.0000000021815807, L(p,q)-L0 = 0.0000000000000040 -t = 30.4000, H(p,q)-H0 = 0.0000000021764376, L(p,q)-L0 = 0.0000000000000038 -t = 30.5000, H(p,q)-H0 = 0.0000000021672218, L(p,q)-L0 = 0.0000000000000038 -t = 30.6000, H(p,q)-H0 = 0.0000000021497005, L(p,q)-L0 = 0.0000000000000039 -t = 30.7000, H(p,q)-H0 = 0.0000000021141389, L(p,q)-L0 = 0.0000000000000040 -t = 30.8000, H(p,q)-H0 = 0.0000000020367849, L(p,q)-L0 = 0.0000000000000039 -t = 30.9000, H(p,q)-H0 = 0.0000000018570208, L(p,q)-L0 = 0.0000000000000031 -t = 31.0000, H(p,q)-H0 = 0.0000000014208090, L(p,q)-L0 = 0.0000000000000032 -t = 31.1000, H(p,q)-H0 = 0.0000000003977567, L(p,q)-L0 = 0.0000000000000036 -t = 31.2000, H(p,q)-H0 = -0.0000000014232162, L(p,q)-L0 = 0.0000000000000033 -t = 31.3000, H(p,q)-H0 = -0.0000000021604556, L(p,q)-L0 = 0.0000000000000033 -ROOT RETURN: t = 31.3018 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 31.3018, H(p,q)-H0 = 0.0000000023148965, L(p,q)-L0 = 0.0000000008299378 -t = 31.4000, H(p,q)-H0 = -0.0000000000914391, L(p,q)-L0 = 0.0000000000000037 -t = 31.5000, H(p,q)-H0 = -0.0000000015394426, L(p,q)-L0 = 0.0000000000000033 -t = 31.6000, H(p,q)-H0 = -0.0000000019942215, L(p,q)-L0 = 0.0000000000000033 -t = 31.7000, H(p,q)-H0 = -0.0000000001403380, L(p,q)-L0 = 0.0000000000000033 -t = 31.8000, H(p,q)-H0 = 0.0000000011688988, L(p,q)-L0 = 0.0000000000000033 -t = 31.9000, H(p,q)-H0 = 0.0000000017544384, L(p,q)-L0 = 0.0000000000000033 -t = 32.0000, H(p,q)-H0 = 0.0000000019945824, L(p,q)-L0 = 0.0000000000000034 -t = 32.1000, H(p,q)-H0 = 0.0000000020957509, L(p,q)-L0 = 0.0000000000000039 -t = 32.2000, H(p,q)-H0 = 0.0000000021411103, L(p,q)-L0 = 0.0000000000000037 -t = 32.3000, H(p,q)-H0 = 0.0000000021629221, L(p,q)-L0 = 0.0000000000000041 -t = 32.4000, H(p,q)-H0 = 0.0000000021741428, L(p,q)-L0 = 0.0000000000000041 -ROOT RETURN: t = 32.4464 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 32.4464, H(p,q)-H0 = 0.0000000021723297, L(p,q)-L0 = -0.0000000000065910 -t = 32.5000, H(p,q)-H0 = 0.0000000021802830, L(p,q)-L0 = 0.0000000000000041 -t = 32.6000, H(p,q)-H0 = 0.0000000021838333, L(p,q)-L0 = 0.0000000000000044 -t = 32.7000, H(p,q)-H0 = 0.0000000021859882, L(p,q)-L0 = 0.0000000000000042 -t = 32.8000, H(p,q)-H0 = 0.0000000021873530, L(p,q)-L0 = 0.0000000000000039 -t = 32.9000, H(p,q)-H0 = 0.0000000021882515, L(p,q)-L0 = 0.0000000000000041 -t = 33.0000, H(p,q)-H0 = 0.0000000021888621, L(p,q)-L0 = 0.0000000000000042 -t = 33.1000, H(p,q)-H0 = 0.0000000021892892, L(p,q)-L0 = 0.0000000000000043 -t = 33.2000, H(p,q)-H0 = 0.0000000021895956, L(p,q)-L0 = 0.0000000000000044 -t = 33.3000, H(p,q)-H0 = 0.0000000021898200, L(p,q)-L0 = 0.0000000000000042 -t = 33.4000, H(p,q)-H0 = 0.0000000021899879, L(p,q)-L0 = 0.0000000000000044 -t = 33.5000, H(p,q)-H0 = 0.0000000021901150, L(p,q)-L0 = 0.0000000000000044 -t = 33.6000, H(p,q)-H0 = 0.0000000021902128, L(p,q)-L0 = 0.0000000000000046 -t = 33.7000, H(p,q)-H0 = 0.0000000021902886, L(p,q)-L0 = 0.0000000000000044 -t = 33.8000, H(p,q)-H0 = 0.0000000021903477, L(p,q)-L0 = 0.0000000000000044 -t = 33.9000, H(p,q)-H0 = 0.0000000021903943, L(p,q)-L0 = 0.0000000000000048 -t = 34.0000, H(p,q)-H0 = 0.0000000021904303, L(p,q)-L0 = 0.0000000000000047 -t = 34.1000, H(p,q)-H0 = 0.0000000021904579, L(p,q)-L0 = 0.0000000000000044 -t = 34.2000, H(p,q)-H0 = 0.0000000021904785, L(p,q)-L0 = 0.0000000000000042 -t = 34.3000, H(p,q)-H0 = 0.0000000021904935, L(p,q)-L0 = 0.0000000000000042 -t = 34.4000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000040 -t = 34.5000, H(p,q)-H0 = 0.0000000021905079, L(p,q)-L0 = 0.0000000000000039 -t = 34.6000, H(p,q)-H0 = 0.0000000021905082, L(p,q)-L0 = 0.0000000000000038 -t = 34.7000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = 0.0000000000000042 -t = 34.8000, H(p,q)-H0 = 0.0000000021904950, L(p,q)-L0 = 0.0000000000000039 -t = 34.9000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000038 -t = 35.0000, H(p,q)-H0 = 0.0000000021904607, L(p,q)-L0 = 0.0000000000000037 -t = 35.1000, H(p,q)-H0 = 0.0000000021904338, L(p,q)-L0 = 0.0000000000000036 -t = 35.2000, H(p,q)-H0 = 0.0000000021903993, L(p,q)-L0 = 0.0000000000000039 -t = 35.3000, H(p,q)-H0 = 0.0000000021903542, L(p,q)-L0 = 0.0000000000000037 -t = 35.4000, H(p,q)-H0 = 0.0000000021902972, L(p,q)-L0 = 0.0000000000000039 -t = 35.5000, H(p,q)-H0 = 0.0000000021902238, L(p,q)-L0 = 0.0000000000000037 -t = 35.6000, H(p,q)-H0 = 0.0000000021901293, L(p,q)-L0 = 0.0000000000000039 -t = 35.7000, H(p,q)-H0 = 0.0000000021900066, L(p,q)-L0 = 0.0000000000000038 -t = 35.8000, H(p,q)-H0 = 0.0000000021898452, L(p,q)-L0 = 0.0000000000000040 -t = 35.9000, H(p,q)-H0 = 0.0000000021896294, L(p,q)-L0 = 0.0000000000000038 -t = 36.0000, H(p,q)-H0 = 0.0000000021893357, L(p,q)-L0 = 0.0000000000000038 -t = 36.1000, H(p,q)-H0 = 0.0000000021889278, L(p,q)-L0 = 0.0000000000000033 -t = 36.2000, H(p,q)-H0 = 0.0000000021883469, L(p,q)-L0 = 0.0000000000000029 -t = 36.3000, H(p,q)-H0 = 0.0000000021874968, L(p,q)-L0 = 0.0000000000000028 -t = 36.4000, H(p,q)-H0 = 0.0000000021862115, L(p,q)-L0 = 0.0000000000000028 -t = 36.5000, H(p,q)-H0 = 0.0000000021841960, L(p,q)-L0 = 0.0000000000000032 -t = 36.6000, H(p,q)-H0 = 0.0000000021809006, L(p,q)-L0 = 0.0000000000000037 -t = 36.7000, H(p,q)-H0 = 0.0000000021752493, L(p,q)-L0 = 0.0000000000000031 -t = 36.8000, H(p,q)-H0 = 0.0000000021650266, L(p,q)-L0 = 0.0000000000000031 -t = 36.9000, H(p,q)-H0 = 0.0000000021453834, L(p,q)-L0 = 0.0000000000000032 -t = 37.0000, H(p,q)-H0 = 0.0000000021050556, L(p,q)-L0 = 0.0000000000000036 -t = 37.1000, H(p,q)-H0 = 0.0000000020163053, L(p,q)-L0 = 0.0000000000000038 -t = 37.2000, H(p,q)-H0 = 0.0000000018080409, L(p,q)-L0 = 0.0000000000000031 -t = 37.3000, H(p,q)-H0 = 0.0000000013016177, L(p,q)-L0 = 0.0000000000000036 -t = 37.4000, H(p,q)-H0 = 0.0000000001394596, L(p,q)-L0 = 0.0000000000000036 -t = 37.5000, H(p,q)-H0 = -0.0000000017311259, L(p,q)-L0 = 0.0000000000000036 -ROOT RETURN: t = 37.5849 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 37.5849, H(p,q)-H0 = 0.0000000117099748, L(p,q)-L0 = 0.0000000026505196 -t = 37.6000, H(p,q)-H0 = -0.0000000019064714, L(p,q)-L0 = 0.0000000000000037 -t = 37.7000, H(p,q)-H0 = 0.0000000000003630, L(p,q)-L0 = 0.0000000000000033 -t = 37.8000, H(p,q)-H0 = -0.0000000018991426, L(p,q)-L0 = 0.0000000000000031 -t = 37.9000, H(p,q)-H0 = -0.0000000017294051, L(p,q)-L0 = 0.0000000000000031 -t = 38.0000, H(p,q)-H0 = 0.0000000001444111, L(p,q)-L0 = 0.0000000000000033 -t = 38.1000, H(p,q)-H0 = 0.0000000013063575, L(p,q)-L0 = 0.0000000000000033 -t = 38.2000, H(p,q)-H0 = 0.0000000018110842, L(p,q)-L0 = 0.0000000000000036 -t = 38.3000, H(p,q)-H0 = 0.0000000020180342, L(p,q)-L0 = 0.0000000000000036 -t = 38.4000, H(p,q)-H0 = 0.0000000021060161, L(p,q)-L0 = 0.0000000000000037 -t = 38.5000, H(p,q)-H0 = 0.0000000021459255, L(p,q)-L0 = 0.0000000000000038 -t = 38.6000, H(p,q)-H0 = 0.0000000021653410, L(p,q)-L0 = 0.0000000000000034 -t = 38.7000, H(p,q)-H0 = 0.0000000021754381, L(p,q)-L0 = 0.0000000000000033 -ROOT RETURN: t = 38.7296 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 38.7296, H(p,q)-H0 = 0.0000000021760773, L(p,q)-L0 = -0.0000000000017404 -t = 38.8000, H(p,q)-H0 = 0.0000000021810172, L(p,q)-L0 = 0.0000000000000033 -t = 38.9000, H(p,q)-H0 = 0.0000000021842712, L(p,q)-L0 = 0.0000000000000034 -t = 39.0000, H(p,q)-H0 = 0.0000000021862612, L(p,q)-L0 = 0.0000000000000033 -t = 39.1000, H(p,q)-H0 = 0.0000000021875308, L(p,q)-L0 = 0.0000000000000037 -t = 39.2000, H(p,q)-H0 = 0.0000000021883703, L(p,q)-L0 = 0.0000000000000033 -t = 39.3000, H(p,q)-H0 = 0.0000000021889444, L(p,q)-L0 = 0.0000000000000037 -t = 39.4000, H(p,q)-H0 = 0.0000000021893477, L(p,q)-L0 = 0.0000000000000038 -t = 39.5000, H(p,q)-H0 = 0.0000000021896380, L(p,q)-L0 = 0.0000000000000036 -t = 39.6000, H(p,q)-H0 = 0.0000000021898516, L(p,q)-L0 = 0.0000000000000037 -t = 39.7000, H(p,q)-H0 = 0.0000000021900115, L(p,q)-L0 = 0.0000000000000036 -t = 39.8000, H(p,q)-H0 = 0.0000000021901330, L(p,q)-L0 = 0.0000000000000031 -t = 39.9000, H(p,q)-H0 = 0.0000000021902264, L(p,q)-L0 = 0.0000000000000032 -t = 40.0000, H(p,q)-H0 = 0.0000000021902989, L(p,q)-L0 = 0.0000000000000028 -t = 40.1000, H(p,q)-H0 = 0.0000000021903558, L(p,q)-L0 = 0.0000000000000029 -t = 40.2000, H(p,q)-H0 = 0.0000000021904003, L(p,q)-L0 = 0.0000000000000028 -t = 40.3000, H(p,q)-H0 = 0.0000000021904346, L(p,q)-L0 = 0.0000000000000026 -t = 40.4000, H(p,q)-H0 = 0.0000000021904611, L(p,q)-L0 = 0.0000000000000024 -t = 40.5000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000022 -t = 40.6000, H(p,q)-H0 = 0.0000000021904947, L(p,q)-L0 = 0.0000000000000022 -t = 40.7000, H(p,q)-H0 = 0.0000000021905039, L(p,q)-L0 = 0.0000000000000026 -t = 40.8000, H(p,q)-H0 = 0.0000000021905078, L(p,q)-L0 = 0.0000000000000022 -t = 40.9000, H(p,q)-H0 = 0.0000000021905074, L(p,q)-L0 = 0.0000000000000022 -t = 41.0000, H(p,q)-H0 = 0.0000000021905026, L(p,q)-L0 = 0.0000000000000026 -t = 41.1000, H(p,q)-H0 = 0.0000000021904927, L(p,q)-L0 = 0.0000000000000026 -t = 41.2000, H(p,q)-H0 = 0.0000000021904775, L(p,q)-L0 = 0.0000000000000026 -t = 41.3000, H(p,q)-H0 = 0.0000000021904565, L(p,q)-L0 = 0.0000000000000027 -t = 41.4000, H(p,q)-H0 = 0.0000000021904285, L(p,q)-L0 = 0.0000000000000027 -t = 41.5000, H(p,q)-H0 = 0.0000000021903920, L(p,q)-L0 = 0.0000000000000024 -t = 41.6000, H(p,q)-H0 = 0.0000000021903456, L(p,q)-L0 = 0.0000000000000028 -t = 41.7000, H(p,q)-H0 = 0.0000000021902861, L(p,q)-L0 = 0.0000000000000029 -t = 41.8000, H(p,q)-H0 = 0.0000000021902095, L(p,q)-L0 = 0.0000000000000027 -t = 41.9000, H(p,q)-H0 = 0.0000000021901106, L(p,q)-L0 = 0.0000000000000024 -t = 42.0000, H(p,q)-H0 = 0.0000000021899824, L(p,q)-L0 = 0.0000000000000026 -t = 42.1000, H(p,q)-H0 = 0.0000000021898132, L(p,q)-L0 = 0.0000000000000024 -t = 42.2000, H(p,q)-H0 = 0.0000000021895867, L(p,q)-L0 = 0.0000000000000029 -t = 42.3000, H(p,q)-H0 = 0.0000000021892768, L(p,q)-L0 = 0.0000000000000029 -t = 42.4000, H(p,q)-H0 = 0.0000000021888449, L(p,q)-L0 = 0.0000000000000028 -t = 42.5000, H(p,q)-H0 = 0.0000000021882276, L(p,q)-L0 = 0.0000000000000031 -t = 42.6000, H(p,q)-H0 = 0.0000000021873187, L(p,q)-L0 = 0.0000000000000031 -t = 42.7000, H(p,q)-H0 = 0.0000000021859365, L(p,q)-L0 = 0.0000000000000034 -t = 42.8000, H(p,q)-H0 = 0.0000000021837536, L(p,q)-L0 = 0.0000000000000033 -t = 42.9000, H(p,q)-H0 = 0.0000000021801575, L(p,q)-L0 = 0.0000000000000032 -t = 43.0000, H(p,q)-H0 = 0.0000000021739391, L(p,q)-L0 = 0.0000000000000036 -t = 43.1000, H(p,q)-H0 = 0.0000000021625797, L(p,q)-L0 = 0.0000000000000039 -t = 43.2000, H(p,q)-H0 = 0.0000000021405177, L(p,q)-L0 = 0.0000000000000047 -t = 43.3000, H(p,q)-H0 = 0.0000000020946935, L(p,q)-L0 = 0.0000000000000051 -t = 43.4000, H(p,q)-H0 = 0.0000000019926774, L(p,q)-L0 = 0.0000000000000047 -t = 43.5000, H(p,q)-H0 = 0.0000000017511204, L(p,q)-L0 = 0.0000000000000046 -t = 43.6000, H(p,q)-H0 = 0.0000000011639263, L(p,q)-L0 = 0.0000000000000042 -t = 43.7000, H(p,q)-H0 = -0.0000000001449194, L(p,q)-L0 = 0.0000000000000040 -t = 43.8000, H(p,q)-H0 = -0.0000000019957591, L(p,q)-L0 = 0.0000000000000036 -ROOT RETURN: t = 43.8681 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 43.8681, H(p,q)-H0 = 0.0000000118359211, L(p,q)-L0 = 0.0000000027373523 -t = 43.9000, H(p,q)-H0 = -0.0000000015482549, L(p,q)-L0 = 0.0000000000000032 -t = 44.0000, H(p,q)-H0 = -0.0000000000875615, L(p,q)-L0 = 0.0000000000000033 -t = 44.1000, H(p,q)-H0 = -0.0000000021549367, L(p,q)-L0 = 0.0000000000000031 -t = 44.2000, H(p,q)-H0 = -0.0000000014210157, L(p,q)-L0 = 0.0000000000000030 -t = 44.3000, H(p,q)-H0 = 0.0000000004029348, L(p,q)-L0 = 0.0000000000000028 -t = 44.4000, H(p,q)-H0 = 0.0000000014252810, L(p,q)-L0 = 0.0000000000000027 -t = 44.5000, H(p,q)-H0 = 0.0000000018598003, L(p,q)-L0 = 0.0000000000000029 -t = 44.6000, H(p,q)-H0 = 0.0000000020383498, L(p,q)-L0 = 0.0000000000000032 -t = 44.7000, H(p,q)-H0 = 0.0000000021150072, L(p,q)-L0 = 0.0000000000000028 -t = 44.8000, H(p,q)-H0 = 0.0000000021501914, L(p,q)-L0 = 0.0000000000000031 -t = 44.9000, H(p,q)-H0 = 0.0000000021675071, L(p,q)-L0 = 0.0000000000000029 -t = 45.0000, H(p,q)-H0 = 0.0000000021766086, L(p,q)-L0 = 0.0000000000000028 -ROOT RETURN: t = 45.0128 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 45.0128, H(p,q)-H0 = 0.0000000021749924, L(p,q)-L0 = -0.0000000000031553 -t = 45.1000, H(p,q)-H0 = 0.0000000021816857, L(p,q)-L0 = 0.0000000000000024 -t = 45.2000, H(p,q)-H0 = 0.0000000021846717, L(p,q)-L0 = 0.0000000000000023 -t = 45.3000, H(p,q)-H0 = 0.0000000021865116, L(p,q)-L0 = 0.0000000000000022 -t = 45.4000, H(p,q)-H0 = 0.0000000021876930, L(p,q)-L0 = 0.0000000000000022 -t = 45.5000, H(p,q)-H0 = 0.0000000021884791, L(p,q)-L0 = 0.0000000000000020 -t = 45.6000, H(p,q)-H0 = 0.0000000021890187, L(p,q)-L0 = 0.0000000000000020 -t = 45.7000, H(p,q)-H0 = 0.0000000021893996, L(p,q)-L0 = 0.0000000000000019 -t = 45.8000, H(p,q)-H0 = 0.0000000021896744, L(p,q)-L0 = 0.0000000000000016 -t = 45.9000, H(p,q)-H0 = 0.0000000021898774, L(p,q)-L0 = 0.0000000000000016 -t = 46.0000, H(p,q)-H0 = 0.0000000021900302, L(p,q)-L0 = 0.0000000000000017 -t = 46.1000, H(p,q)-H0 = 0.0000000021901467, L(p,q)-L0 = 0.0000000000000020 -t = 46.2000, H(p,q)-H0 = 0.0000000021902365, L(p,q)-L0 = 0.0000000000000023 -t = 46.3000, H(p,q)-H0 = 0.0000000021903065, L(p,q)-L0 = 0.0000000000000026 -t = 46.4000, H(p,q)-H0 = 0.0000000021903610, L(p,q)-L0 = 0.0000000000000026 -t = 46.5000, H(p,q)-H0 = 0.0000000021904035, L(p,q)-L0 = 0.0000000000000024 -t = 46.6000, H(p,q)-H0 = 0.0000000021904365, L(p,q)-L0 = 0.0000000000000024 -t = 46.7000, H(p,q)-H0 = 0.0000000021904620, L(p,q)-L0 = 0.0000000000000024 -t = 46.8000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000026 -t = 46.9000, H(p,q)-H0 = 0.0000000021904942, L(p,q)-L0 = 0.0000000000000029 -t = 47.0000, H(p,q)-H0 = 0.0000000021905023, L(p,q)-L0 = 0.0000000000000032 -t = 47.1000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = 0.0000000000000031 -t = 47.2000, H(p,q)-H0 = 0.0000000021905046, L(p,q)-L0 = 0.0000000000000032 -t = 47.3000, H(p,q)-H0 = 0.0000000021904984, L(p,q)-L0 = 0.0000000000000030 -t = 47.4000, H(p,q)-H0 = 0.0000000021904876, L(p,q)-L0 = 0.0000000000000029 -t = 47.5000, H(p,q)-H0 = 0.0000000021904717, L(p,q)-L0 = 0.0000000000000030 -t = 47.6000, H(p,q)-H0 = 0.0000000021904498, L(p,q)-L0 = 0.0000000000000036 -t = 47.7000, H(p,q)-H0 = 0.0000000021904205, L(p,q)-L0 = 0.0000000000000037 -t = 47.8000, H(p,q)-H0 = 0.0000000021903824, L(p,q)-L0 = 0.0000000000000037 -t = 47.9000, H(p,q)-H0 = 0.0000000021903339, L(p,q)-L0 = 0.0000000000000037 -t = 48.0000, H(p,q)-H0 = 0.0000000021902718, L(p,q)-L0 = 0.0000000000000038 -t = 48.1000, H(p,q)-H0 = 0.0000000021901918, L(p,q)-L0 = 0.0000000000000038 -t = 48.2000, H(p,q)-H0 = 0.0000000021900888, L(p,q)-L0 = 0.0000000000000039 -t = 48.3000, H(p,q)-H0 = 0.0000000021899544, L(p,q)-L0 = 0.0000000000000039 -t = 48.4000, H(p,q)-H0 = 0.0000000021897766, L(p,q)-L0 = 0.0000000000000034 -t = 48.5000, H(p,q)-H0 = 0.0000000021895377, L(p,q)-L0 = 0.0000000000000033 -t = 48.6000, H(p,q)-H0 = 0.0000000021892106, L(p,q)-L0 = 0.0000000000000033 -t = 48.7000, H(p,q)-H0 = 0.0000000021887525, L(p,q)-L0 = 0.0000000000000033 -t = 48.8000, H(p,q)-H0 = 0.0000000021880946, L(p,q)-L0 = 0.0000000000000032 -t = 48.9000, H(p,q)-H0 = 0.0000000021871220, L(p,q)-L0 = 0.0000000000000034 -t = 49.0000, H(p,q)-H0 = 0.0000000021856332, L(p,q)-L0 = 0.0000000000000038 -t = 49.1000, H(p,q)-H0 = 0.0000000021832666, L(p,q)-L0 = 0.0000000000000039 -t = 49.2000, H(p,q)-H0 = 0.0000000021793377, L(p,q)-L0 = 0.0000000000000040 -t = 49.3000, H(p,q)-H0 = 0.0000000021724836, L(p,q)-L0 = 0.0000000000000038 -t = 49.4000, H(p,q)-H0 = 0.0000000021598388, L(p,q)-L0 = 0.0000000000000037 -t = 49.5000, H(p,q)-H0 = 0.0000000021350117, L(p,q)-L0 = 0.0000000000000047 -t = 49.6000, H(p,q)-H0 = 0.0000000020828380, L(p,q)-L0 = 0.0000000000000041 -t = 49.7000, H(p,q)-H0 = 0.0000000019653632, L(p,q)-L0 = 0.0000000000000040 -t = 49.8000, H(p,q)-H0 = 0.0000000016849397, L(p,q)-L0 = 0.0000000000000040 -t = 49.9000, H(p,q)-H0 = 0.0000000010054575, L(p,q)-L0 = 0.0000000000000043 -t = 50.0000, H(p,q)-H0 = -0.0000000004525247, L(p,q)-L0 = 0.0000000000000041 -t = 50.1000, H(p,q)-H0 = -0.0000000021925068, L(p,q)-L0 = 0.0000000000000038 -ROOT RETURN: t = 50.1513 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 50.1513, H(p,q)-H0 = 0.0000000010629626, L(p,q)-L0 = 0.0000000005942530 -t = 50.2000, H(p,q)-H0 = -0.0000000011262797, L(p,q)-L0 = 0.0000000000000038 -t = 50.3000, H(p,q)-H0 = -0.0000000003393819, L(p,q)-L0 = 0.0000000000000036 -t = 50.4000, H(p,q)-H0 = -0.0000000022861792, L(p,q)-L0 = 0.0000000000000036 -t = 50.5000, H(p,q)-H0 = -0.0000000010909109, L(p,q)-L0 = 0.0000000000000034 -t = 50.6000, H(p,q)-H0 = 0.0000000006344154, L(p,q)-L0 = 0.0000000000000036 -t = 50.7000, H(p,q)-H0 = 0.0000000015278889, L(p,q)-L0 = 0.0000000000000034 -t = 50.8000, H(p,q)-H0 = 0.0000000019017266, L(p,q)-L0 = 0.0000000000000041 -t = 50.9000, H(p,q)-H0 = 0.0000000020559798, L(p,q)-L0 = 0.0000000000000034 -t = 51.0000, H(p,q)-H0 = 0.0000000021228997, L(p,q)-L0 = 0.0000000000000030 -t = 51.1000, H(p,q)-H0 = 0.0000000021539794, L(p,q)-L0 = 0.0000000000000028 -t = 51.2000, H(p,q)-H0 = 0.0000000021694511, L(p,q)-L0 = 0.0000000000000027 -ROOT RETURN: t = 51.2960 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 51.2960, H(p,q)-H0 = 0.0000000021724436, L(p,q)-L0 = -0.0000000000064396 -t = 51.3000, H(p,q)-H0 = 0.0000000021776693, L(p,q)-L0 = 0.0000000000000024 -t = 51.4000, H(p,q)-H0 = 0.0000000021822963, L(p,q)-L0 = 0.0000000000000023 -t = 51.5000, H(p,q)-H0 = 0.0000000021850405, L(p,q)-L0 = 0.0000000000000024 -t = 51.6000, H(p,q)-H0 = 0.0000000021867441, L(p,q)-L0 = 0.0000000000000027 -t = 51.7000, H(p,q)-H0 = 0.0000000021878448, L(p,q)-L0 = 0.0000000000000028 -t = 51.8000, H(p,q)-H0 = 0.0000000021885816, L(p,q)-L0 = 0.0000000000000029 -t = 51.9000, H(p,q)-H0 = 0.0000000021890901, L(p,q)-L0 = 0.0000000000000033 -t = 52.0000, H(p,q)-H0 = 0.0000000021894503, L(p,q)-L0 = 0.0000000000000032 -t = 52.1000, H(p,q)-H0 = 0.0000000021897114, L(p,q)-L0 = 0.0000000000000030 -t = 52.2000, H(p,q)-H0 = 0.0000000021899053, L(p,q)-L0 = 0.0000000000000031 -t = 52.3000, H(p,q)-H0 = 0.0000000021900509, L(p,q)-L0 = 0.0000000000000033 -t = 52.4000, H(p,q)-H0 = 0.0000000021901626, L(p,q)-L0 = 0.0000000000000037 -t = 52.5000, H(p,q)-H0 = 0.0000000021902487, L(p,q)-L0 = 0.0000000000000038 -t = 52.6000, H(p,q)-H0 = 0.0000000021903156, L(p,q)-L0 = 0.0000000000000039 -t = 52.7000, H(p,q)-H0 = 0.0000000021903677, L(p,q)-L0 = 0.0000000000000038 -t = 52.8000, H(p,q)-H0 = 0.0000000021904085, L(p,q)-L0 = 0.0000000000000036 -t = 52.9000, H(p,q)-H0 = 0.0000000021904403, L(p,q)-L0 = 0.0000000000000037 -t = 53.0000, H(p,q)-H0 = 0.0000000021904645, L(p,q)-L0 = 0.0000000000000036 -t = 53.1000, H(p,q)-H0 = 0.0000000021904824, L(p,q)-L0 = 0.0000000000000037 -t = 53.2000, H(p,q)-H0 = 0.0000000021904947, L(p,q)-L0 = 0.0000000000000039 -t = 53.3000, H(p,q)-H0 = 0.0000000021905021, L(p,q)-L0 = 0.0000000000000041 -t = 53.4000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = 0.0000000000000046 -t = 53.5000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000046 -t = 53.6000, H(p,q)-H0 = 0.0000000021904966, L(p,q)-L0 = 0.0000000000000049 -t = 53.7000, H(p,q)-H0 = 0.0000000021904851, L(p,q)-L0 = 0.0000000000000048 -t = 53.8000, H(p,q)-H0 = 0.0000000021904681, L(p,q)-L0 = 0.0000000000000050 -t = 53.9000, H(p,q)-H0 = 0.0000000021904447, L(p,q)-L0 = 0.0000000000000048 -t = 54.0000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000046 -t = 54.1000, H(p,q)-H0 = 0.0000000021903745, L(p,q)-L0 = 0.0000000000000044 -t = 54.2000, H(p,q)-H0 = 0.0000000021903241, L(p,q)-L0 = 0.0000000000000048 -t = 54.3000, H(p,q)-H0 = 0.0000000021902591, L(p,q)-L0 = 0.0000000000000047 -t = 54.4000, H(p,q)-H0 = 0.0000000021901758, L(p,q)-L0 = 0.0000000000000047 -t = 54.5000, H(p,q)-H0 = 0.0000000021900680, L(p,q)-L0 = 0.0000000000000043 -t = 54.6000, H(p,q)-H0 = 0.0000000021899273, L(p,q)-L0 = 0.0000000000000047 -t = 54.7000, H(p,q)-H0 = 0.0000000021897409, L(p,q)-L0 = 0.0000000000000047 -t = 54.8000, H(p,q)-H0 = 0.0000000021894895, L(p,q)-L0 = 0.0000000000000044 -t = 54.9000, H(p,q)-H0 = 0.0000000021891444, L(p,q)-L0 = 0.0000000000000047 -t = 55.0000, H(p,q)-H0 = 0.0000000021886584, L(p,q)-L0 = 0.0000000000000046 -t = 55.1000, H(p,q)-H0 = 0.0000000021879574, L(p,q)-L0 = 0.0000000000000044 -t = 55.2000, H(p,q)-H0 = 0.0000000021869148, L(p,q)-L0 = 0.0000000000000049 -t = 55.3000, H(p,q)-H0 = 0.0000000021853098, L(p,q)-L0 = 0.0000000000000047 -t = 55.4000, H(p,q)-H0 = 0.0000000021827406, L(p,q)-L0 = 0.0000000000000046 -t = 55.5000, H(p,q)-H0 = 0.0000000021784419, L(p,q)-L0 = 0.0000000000000049 -t = 55.6000, H(p,q)-H0 = 0.0000000021708755, L(p,q)-L0 = 0.0000000000000050 -t = 55.7000, H(p,q)-H0 = 0.0000000021567761, L(p,q)-L0 = 0.0000000000000053 -t = 55.8000, H(p,q)-H0 = 0.0000000021287814, L(p,q)-L0 = 0.0000000000000049 -t = 55.9000, H(p,q)-H0 = 0.0000000020692630, L(p,q)-L0 = 0.0000000000000052 -t = 56.0000, H(p,q)-H0 = 0.0000000019337545, L(p,q)-L0 = 0.0000000000000053 -t = 56.1000, H(p,q)-H0 = 0.0000000016080133, L(p,q)-L0 = 0.0000000000000050 -t = 56.2000, H(p,q)-H0 = 0.0000000008240018, L(p,q)-L0 = 0.0000000000000054 -t = 56.3000, H(p,q)-H0 = -0.0000000007777232, L(p,q)-L0 = 0.0000000000000053 -t = 56.4000, H(p,q)-H0 = -0.0000000022964355, L(p,q)-L0 = 0.0000000000000052 -ROOT RETURN: t = 56.4345 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 56.4345, H(p,q)-H0 = 0.0000000105653171, L(p,q)-L0 = 0.0000000024229669 -t = 56.5000, H(p,q)-H0 = -0.0000000006980465, L(p,q)-L0 = 0.0000000000000052 -t = 56.6000, H(p,q)-H0 = -0.0000000007108090, L(p,q)-L0 = 0.0000000000000051 -t = 56.7000, H(p,q)-H0 = -0.0000000022911208, L(p,q)-L0 = 0.0000000000000050 -t = 56.8000, H(p,q)-H0 = -0.0000000007567429, L(p,q)-L0 = 0.0000000000000050 -t = 56.9000, H(p,q)-H0 = 0.0000000008394492, L(p,q)-L0 = 0.0000000000000053 -t = 57.0000, H(p,q)-H0 = 0.0000000016162609, L(p,q)-L0 = 0.0000000000000052 -t = 57.1000, H(p,q)-H0 = 0.0000000019378454, L(p,q)-L0 = 0.0000000000000050 -t = 57.2000, H(p,q)-H0 = 0.0000000020713116, L(p,q)-L0 = 0.0000000000000049 -t = 57.3000, H(p,q)-H0 = 0.0000000021298465, L(p,q)-L0 = 0.0000000000000049 -t = 57.4000, H(p,q)-H0 = 0.0000000021573541, L(p,q)-L0 = 0.0000000000000040 -t = 57.5000, H(p,q)-H0 = 0.0000000021712041, L(p,q)-L0 = 0.0000000000000041 -ROOT RETURN: t = 57.5792 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 57.5792, H(p,q)-H0 = 0.0000000021748691, L(p,q)-L0 = -0.0000000000032916 -t = 57.6000, H(p,q)-H0 = 0.0000000021786368, L(p,q)-L0 = 0.0000000000000044 -t = 57.7000, H(p,q)-H0 = 0.0000000021828603, L(p,q)-L0 = 0.0000000000000044 -t = 57.8000, H(p,q)-H0 = 0.0000000021853853, L(p,q)-L0 = 0.0000000000000042 -t = 57.9000, H(p,q)-H0 = 0.0000000021869638, L(p,q)-L0 = 0.0000000000000044 -t = 58.0000, H(p,q)-H0 = 0.0000000021879897, L(p,q)-L0 = 0.0000000000000040 -t = 58.1000, H(p,q)-H0 = 0.0000000021886802, L(p,q)-L0 = 0.0000000000000041 -t = 58.2000, H(p,q)-H0 = 0.0000000021891585, L(p,q)-L0 = 0.0000000000000038 -t = 58.3000, H(p,q)-H0 = 0.0000000021894993, L(p,q)-L0 = 0.0000000000000039 -t = 58.4000, H(p,q)-H0 = 0.0000000021897474, L(p,q)-L0 = 0.0000000000000038 -t = 58.5000, H(p,q)-H0 = 0.0000000021899316, L(p,q)-L0 = 0.0000000000000038 -t = 58.6000, H(p,q)-H0 = 0.0000000021900710, L(p,q)-L0 = 0.0000000000000042 -t = 58.7000, H(p,q)-H0 = 0.0000000021901776, L(p,q)-L0 = 0.0000000000000042 -t = 58.8000, H(p,q)-H0 = 0.0000000021902602, L(p,q)-L0 = 0.0000000000000047 -t = 58.9000, H(p,q)-H0 = 0.0000000021903247, L(p,q)-L0 = 0.0000000000000050 -t = 59.0000, H(p,q)-H0 = 0.0000000021903750, L(p,q)-L0 = 0.0000000000000052 -t = 59.1000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000052 -t = 59.2000, H(p,q)-H0 = 0.0000000021904442, L(p,q)-L0 = 0.0000000000000047 -t = 59.3000, H(p,q)-H0 = 0.0000000021904675, L(p,q)-L0 = 0.0000000000000052 -t = 59.4000, H(p,q)-H0 = 0.0000000021904839, L(p,q)-L0 = 0.0000000000000048 -t = 59.5000, H(p,q)-H0 = 0.0000000021904950, L(p,q)-L0 = 0.0000000000000044 -t = 59.6000, H(p,q)-H0 = 0.0000000021905014, L(p,q)-L0 = 0.0000000000000043 -t = 59.7000, H(p,q)-H0 = 0.0000000021905032, L(p,q)-L0 = 0.0000000000000042 -t = 59.8000, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = 0.0000000000000043 -t = 59.9000, H(p,q)-H0 = 0.0000000021904931, L(p,q)-L0 = 0.0000000000000044 -t = 60.0000, H(p,q)-H0 = 0.0000000021904805, L(p,q)-L0 = 0.0000000000000043 -t = 60.1000, H(p,q)-H0 = 0.0000000021904624, L(p,q)-L0 = 0.0000000000000042 -t = 60.2000, H(p,q)-H0 = 0.0000000021904379, L(p,q)-L0 = 0.0000000000000040 -t = 60.3000, H(p,q)-H0 = 0.0000000021904059, L(p,q)-L0 = 0.0000000000000042 -t = 60.4000, H(p,q)-H0 = 0.0000000021903648, L(p,q)-L0 = 0.0000000000000044 -t = 60.5000, H(p,q)-H0 = 0.0000000021903120, L(p,q)-L0 = 0.0000000000000044 -t = 60.6000, H(p,q)-H0 = 0.0000000021902444, L(p,q)-L0 = 0.0000000000000043 -t = 60.7000, H(p,q)-H0 = 0.0000000021901574, L(p,q)-L0 = 0.0000000000000043 -t = 60.8000, H(p,q)-H0 = 0.0000000021900446, L(p,q)-L0 = 0.0000000000000041 -t = 60.9000, H(p,q)-H0 = 0.0000000021898974, L(p,q)-L0 = 0.0000000000000042 -t = 61.0000, H(p,q)-H0 = 0.0000000021897019, L(p,q)-L0 = 0.0000000000000047 -t = 61.1000, H(p,q)-H0 = 0.0000000021894369, L(p,q)-L0 = 0.0000000000000044 -t = 61.2000, H(p,q)-H0 = 0.0000000021890715, L(p,q)-L0 = 0.0000000000000044 -t = 61.3000, H(p,q)-H0 = 0.0000000021885554, L(p,q)-L0 = 0.0000000000000040 -t = 61.4000, H(p,q)-H0 = 0.0000000021878070, L(p,q)-L0 = 0.0000000000000038 -t = 61.5000, H(p,q)-H0 = 0.0000000021866884, L(p,q)-L0 = 0.0000000000000034 -t = 61.6000, H(p,q)-H0 = 0.0000000021849565, L(p,q)-L0 = 0.0000000000000037 -t = 61.7000, H(p,q)-H0 = 0.0000000021821646, L(p,q)-L0 = 0.0000000000000040 -t = 61.8000, H(p,q)-H0 = 0.0000000021774544, L(p,q)-L0 = 0.0000000000000036 -t = 61.9000, H(p,q)-H0 = 0.0000000021690871, L(p,q)-L0 = 0.0000000000000032 -t = 62.0000, H(p,q)-H0 = 0.0000000021533373, L(p,q)-L0 = 0.0000000000000038 -t = 62.1000, H(p,q)-H0 = 0.0000000021217116, L(p,q)-L0 = 0.0000000000000032 -t = 62.2000, H(p,q)-H0 = 0.0000000020536803, L(p,q)-L0 = 0.0000000000000034 -t = 62.3000, H(p,q)-H0 = 0.0000000018971157, L(p,q)-L0 = 0.0000000000000032 -t = 62.4000, H(p,q)-H0 = 0.0000000015186385, L(p,q)-L0 = 0.0000000000000027 -t = 62.5000, H(p,q)-H0 = 0.0000000006175833, L(p,q)-L0 = 0.0000000000000024 -t = 62.6000, H(p,q)-H0 = -0.0000000011113854, L(p,q)-L0 = 0.0000000000000024 -t = 62.7000, H(p,q)-H0 = -0.0000000022863662, L(p,q)-L0 = 0.0000000000000024 -ROOT RETURN: t = 62.7177 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 62.7177, H(p,q)-H0 = 0.0000000131519715, L(p,q)-L0 = 0.0000000029860174 -t = 62.8000, H(p,q)-H0 = -0.0000000003295020, L(p,q)-L0 = 0.0000000000000021 -t = 62.9000, H(p,q)-H0 = -0.0000000011398287, L(p,q)-L0 = 0.0000000000000023 -t = 63.0000, H(p,q)-H0 = -0.0000000021824698, L(p,q)-L0 = 0.0000000000000022 -t = 63.1000, H(p,q)-H0 = -0.0000000004316751, L(p,q)-L0 = 0.0000000000000030 -t = 63.2000, H(p,q)-H0 = 0.0000000010195209, L(p,q)-L0 = 0.0000000000000029 -t = 63.3000, H(p,q)-H0 = 0.0000000016922781, L(p,q)-L0 = 0.0000000000000033 -t = 63.4000, H(p,q)-H0 = 0.0000000019689945, L(p,q)-L0 = 0.0000000000000034 -t = 63.5000, H(p,q)-H0 = 0.0000000020846639, L(p,q)-L0 = 0.0000000000000037 -t = 63.6000, H(p,q)-H0 = 0.0000000021359661, L(p,q)-L0 = 0.0000000000000042 -t = 63.7000, H(p,q)-H0 = 0.0000000021603613, L(p,q)-L0 = 0.0000000000000042 -t = 63.8000, H(p,q)-H0 = 0.0000000021727820, L(p,q)-L0 = 0.0000000000000043 -ROOT RETURN: t = 63.8623 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 63.8623, H(p,q)-H0 = 0.0000000021754208, L(p,q)-L0 = -0.0000000000025943 -t = 63.9000, H(p,q)-H0 = 0.0000000021795151, L(p,q)-L0 = 0.0000000000000044 -t = 64.0000, H(p,q)-H0 = 0.0000000021833759, L(p,q)-L0 = 0.0000000000000047 -t = 64.1000, H(p,q)-H0 = 0.0000000021857027, L(p,q)-L0 = 0.0000000000000051 -t = 64.2000, H(p,q)-H0 = 0.0000000021871673, L(p,q)-L0 = 0.0000000000000051 -t = 64.3000, H(p,q)-H0 = 0.0000000021881255, L(p,q)-L0 = 0.0000000000000053 -t = 64.4000, H(p,q)-H0 = 0.0000000021887733, L(p,q)-L0 = 0.0000000000000052 -t = 64.5000, H(p,q)-H0 = 0.0000000021892246, L(p,q)-L0 = 0.0000000000000051 -t = 64.6000, H(p,q)-H0 = 0.0000000021895474, L(p,q)-L0 = 0.0000000000000053 -t = 64.7000, H(p,q)-H0 = 0.0000000021897830, L(p,q)-L0 = 0.0000000000000052 -t = 64.8000, H(p,q)-H0 = 0.0000000021899583, L(p,q)-L0 = 0.0000000000000048 -t = 64.9000, H(p,q)-H0 = 0.0000000021900913, L(p,q)-L0 = 0.0000000000000050 -t = 65.0000, H(p,q)-H0 = 0.0000000021901936, L(p,q)-L0 = 0.0000000000000056 -t = 65.1000, H(p,q)-H0 = 0.0000000021902724, L(p,q)-L0 = 0.0000000000000054 -t = 65.2000, H(p,q)-H0 = 0.0000000021903344, L(p,q)-L0 = 0.0000000000000060 -t = 65.3000, H(p,q)-H0 = 0.0000000021903822, L(p,q)-L0 = 0.0000000000000057 -t = 65.4000, H(p,q)-H0 = 0.0000000021904196, L(p,q)-L0 = 0.0000000000000056 -t = 65.5000, H(p,q)-H0 = 0.0000000021904488, L(p,q)-L0 = 0.0000000000000059 -t = 65.6000, H(p,q)-H0 = 0.0000000021904707, L(p,q)-L0 = 0.0000000000000059 -t = 65.7000, H(p,q)-H0 = 0.0000000021904865, L(p,q)-L0 = 0.0000000000000061 -t = 65.8000, H(p,q)-H0 = 0.0000000021904972, L(p,q)-L0 = 0.0000000000000064 -t = 65.9000, H(p,q)-H0 = 0.0000000021905028, L(p,q)-L0 = 0.0000000000000063 -t = 66.0000, H(p,q)-H0 = 0.0000000021905041, L(p,q)-L0 = 0.0000000000000064 -t = 66.1000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = 0.0000000000000062 -t = 66.2000, H(p,q)-H0 = 0.0000000021904920, L(p,q)-L0 = 0.0000000000000060 -t = 66.3000, H(p,q)-H0 = 0.0000000021904784, L(p,q)-L0 = 0.0000000000000058 -t = 66.4000, H(p,q)-H0 = 0.0000000021904595, L(p,q)-L0 = 0.0000000000000058 -t = 66.5000, H(p,q)-H0 = 0.0000000021904338, L(p,q)-L0 = 0.0000000000000058 -t = 66.6000, H(p,q)-H0 = 0.0000000021904004, L(p,q)-L0 = 0.0000000000000057 -t = 66.7000, H(p,q)-H0 = 0.0000000021903573, L(p,q)-L0 = 0.0000000000000058 -t = 66.8000, H(p,q)-H0 = 0.0000000021903023, L(p,q)-L0 = 0.0000000000000060 -t = 66.9000, H(p,q)-H0 = 0.0000000021902322, L(p,q)-L0 = 0.0000000000000064 -t = 67.0000, H(p,q)-H0 = 0.0000000021901418, L(p,q)-L0 = 0.0000000000000070 -t = 67.1000, H(p,q)-H0 = 0.0000000021900243, L(p,q)-L0 = 0.0000000000000071 -t = 67.2000, H(p,q)-H0 = 0.0000000021898695, L(p,q)-L0 = 0.0000000000000067 -t = 67.3000, H(p,q)-H0 = 0.0000000021896638, L(p,q)-L0 = 0.0000000000000067 -t = 67.4000, H(p,q)-H0 = 0.0000000021893843, L(p,q)-L0 = 0.0000000000000064 -t = 67.5000, H(p,q)-H0 = 0.0000000021889982, L(p,q)-L0 = 0.0000000000000064 -t = 67.6000, H(p,q)-H0 = 0.0000000021884506, L(p,q)-L0 = 0.0000000000000067 -t = 67.7000, H(p,q)-H0 = 0.0000000021876523, L(p,q)-L0 = 0.0000000000000068 -t = 67.8000, H(p,q)-H0 = 0.0000000021864515, L(p,q)-L0 = 0.0000000000000066 -t = 67.9000, H(p,q)-H0 = 0.0000000021845806, L(p,q)-L0 = 0.0000000000000071 -t = 68.0000, H(p,q)-H0 = 0.0000000021815426, L(p,q)-L0 = 0.0000000000000074 -t = 68.1000, H(p,q)-H0 = 0.0000000021763747, L(p,q)-L0 = 0.0000000000000079 -t = 68.2000, H(p,q)-H0 = 0.0000000021671083, L(p,q)-L0 = 0.0000000000000078 -t = 68.3000, H(p,q)-H0 = 0.0000000021494821, L(p,q)-L0 = 0.0000000000000081 -t = 68.4000, H(p,q)-H0 = 0.0000000021136843, L(p,q)-L0 = 0.0000000000000075 -t = 68.5000, H(p,q)-H0 = 0.0000000020357698, L(p,q)-L0 = 0.0000000000000072 -t = 68.6000, H(p,q)-H0 = 0.0000000018546116, L(p,q)-L0 = 0.0000000000000074 -t = 68.7000, H(p,q)-H0 = 0.0000000014149373, L(p,q)-L0 = 0.0000000000000071 -t = 68.8000, H(p,q)-H0 = 0.0000000003847842, L(p,q)-L0 = 0.0000000000000068 -t = 68.9000, H(p,q)-H0 = -0.0000000014401935, L(p,q)-L0 = 0.0000000000000071 -t = 69.0000, H(p,q)-H0 = -0.0000000021500677, L(p,q)-L0 = 0.0000000000000071 -ROOT RETURN: t = 69.0009 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 69.0009, H(p,q)-H0 = -0.0000000001126452, L(p,q)-L0 = 0.0000000003745485 -t = 69.1000, H(p,q)-H0 = -0.0000000000822351, L(p,q)-L0 = 0.0000000000000073 -t = 69.2000, H(p,q)-H0 = -0.0000000015604593, L(p,q)-L0 = 0.0000000000000069 -t = 69.3000, H(p,q)-H0 = -0.0000000019817259, L(p,q)-L0 = 0.0000000000000071 -t = 69.4000, H(p,q)-H0 = -0.0000000001246847, L(p,q)-L0 = 0.0000000000000073 -t = 69.5000, H(p,q)-H0 = 0.0000000011766541, L(p,q)-L0 = 0.0000000000000074 -t = 69.6000, H(p,q)-H0 = 0.0000000017576444, L(p,q)-L0 = 0.0000000000000072 -t = 69.7000, H(p,q)-H0 = 0.0000000019959023, L(p,q)-L0 = 0.0000000000000069 -t = 69.8000, H(p,q)-H0 = 0.0000000020963230, L(p,q)-L0 = 0.0000000000000075 -t = 69.9000, H(p,q)-H0 = 0.0000000021413751, L(p,q)-L0 = 0.0000000000000075 -t = 70.0000, H(p,q)-H0 = 0.0000000021630508, L(p,q)-L0 = 0.0000000000000071 -t = 70.1000, H(p,q)-H0 = 0.0000000021742094, L(p,q)-L0 = 0.0000000000000073 -ROOT RETURN: t = 70.1455 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 70.1455, H(p,q)-H0 = 0.0000000021726531, L(p,q)-L0 = -0.0000000000061678 -t = 70.2000, H(p,q)-H0 = 0.0000000021803188, L(p,q)-L0 = 0.0000000000000078 -t = 70.3000, H(p,q)-H0 = 0.0000000021838529, L(p,q)-L0 = 0.0000000000000080 -t = 70.4000, H(p,q)-H0 = 0.0000000021859990, L(p,q)-L0 = 0.0000000000000081 -t = 70.5000, H(p,q)-H0 = 0.0000000021873595, L(p,q)-L0 = 0.0000000000000084 -t = 70.6000, H(p,q)-H0 = 0.0000000021882546, L(p,q)-L0 = 0.0000000000000087 -t = 70.7000, H(p,q)-H0 = 0.0000000021888631, L(p,q)-L0 = 0.0000000000000087 -t = 70.8000, H(p,q)-H0 = 0.0000000021892885, L(p,q)-L0 = 0.0000000000000082 -t = 70.9000, H(p,q)-H0 = 0.0000000021895940, L(p,q)-L0 = 0.0000000000000082 -t = 71.0000, H(p,q)-H0 = 0.0000000021898182, L(p,q)-L0 = 0.0000000000000080 -t = 71.1000, H(p,q)-H0 = 0.0000000021899852, L(p,q)-L0 = 0.0000000000000078 -t = 71.2000, H(p,q)-H0 = 0.0000000021901124, L(p,q)-L0 = 0.0000000000000080 -t = 71.3000, H(p,q)-H0 = 0.0000000021902100, L(p,q)-L0 = 0.0000000000000082 -t = 71.4000, H(p,q)-H0 = 0.0000000021902857, L(p,q)-L0 = 0.0000000000000081 -t = 71.5000, H(p,q)-H0 = 0.0000000021903450, L(p,q)-L0 = 0.0000000000000083 -t = 71.6000, H(p,q)-H0 = 0.0000000021903911, L(p,q)-L0 = 0.0000000000000082 -t = 71.7000, H(p,q)-H0 = 0.0000000021904273, L(p,q)-L0 = 0.0000000000000083 -t = 71.8000, H(p,q)-H0 = 0.0000000021904549, L(p,q)-L0 = 0.0000000000000084 -t = 71.9000, H(p,q)-H0 = 0.0000000021904759, L(p,q)-L0 = 0.0000000000000085 -t = 72.0000, H(p,q)-H0 = 0.0000000021904909, L(p,q)-L0 = 0.0000000000000088 -t = 72.1000, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = 0.0000000000000091 -t = 72.2000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = 0.0000000000000089 -t = 72.3000, H(p,q)-H0 = 0.0000000021905058, L(p,q)-L0 = 0.0000000000000088 -t = 72.4000, H(p,q)-H0 = 0.0000000021905017, L(p,q)-L0 = 0.0000000000000085 -t = 72.5000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = 0.0000000000000084 -t = 72.6000, H(p,q)-H0 = 0.0000000021904779, L(p,q)-L0 = 0.0000000000000083 -t = 72.7000, H(p,q)-H0 = 0.0000000021904577, L(p,q)-L0 = 0.0000000000000079 -t = 72.8000, H(p,q)-H0 = 0.0000000021904308, L(p,q)-L0 = 0.0000000000000079 -t = 72.9000, H(p,q)-H0 = 0.0000000021903962, L(p,q)-L0 = 0.0000000000000083 -t = 73.0000, H(p,q)-H0 = 0.0000000021903512, L(p,q)-L0 = 0.0000000000000082 -t = 73.1000, H(p,q)-H0 = 0.0000000021902937, L(p,q)-L0 = 0.0000000000000082 -t = 73.2000, H(p,q)-H0 = 0.0000000021902204, L(p,q)-L0 = 0.0000000000000087 -t = 73.3000, H(p,q)-H0 = 0.0000000021901255, L(p,q)-L0 = 0.0000000000000084 -t = 73.4000, H(p,q)-H0 = 0.0000000021900025, L(p,q)-L0 = 0.0000000000000082 -t = 73.5000, H(p,q)-H0 = 0.0000000021898401, L(p,q)-L0 = 0.0000000000000078 -t = 73.6000, H(p,q)-H0 = 0.0000000021896239, L(p,q)-L0 = 0.0000000000000075 -t = 73.7000, H(p,q)-H0 = 0.0000000021893298, L(p,q)-L0 = 0.0000000000000079 -t = 73.8000, H(p,q)-H0 = 0.0000000021889204, L(p,q)-L0 = 0.0000000000000075 -t = 73.9000, H(p,q)-H0 = 0.0000000021883377, L(p,q)-L0 = 0.0000000000000073 -t = 74.0000, H(p,q)-H0 = 0.0000000021874844, L(p,q)-L0 = 0.0000000000000071 -t = 74.1000, H(p,q)-H0 = 0.0000000021861942, L(p,q)-L0 = 0.0000000000000072 -t = 74.2000, H(p,q)-H0 = 0.0000000021841700, L(p,q)-L0 = 0.0000000000000071 -t = 74.3000, H(p,q)-H0 = 0.0000000021808589, L(p,q)-L0 = 0.0000000000000070 -t = 74.4000, H(p,q)-H0 = 0.0000000021751795, L(p,q)-L0 = 0.0000000000000072 -t = 74.5000, H(p,q)-H0 = 0.0000000021648997, L(p,q)-L0 = 0.0000000000000071 -t = 74.6000, H(p,q)-H0 = 0.0000000021451367, L(p,q)-L0 = 0.0000000000000073 -t = 74.7000, H(p,q)-H0 = 0.0000000021045369, L(p,q)-L0 = 0.0000000000000068 -t = 74.8000, H(p,q)-H0 = 0.0000000020151361, L(p,q)-L0 = 0.0000000000000073 -t = 74.9000, H(p,q)-H0 = 0.0000000018052410, L(p,q)-L0 = 0.0000000000000073 -t = 75.0000, H(p,q)-H0 = 0.0000000012948249, L(p,q)-L0 = 0.0000000000000078 -t = 75.1000, H(p,q)-H0 = 0.0000000001250748, L(p,q)-L0 = 0.0000000000000075 -t = 75.2000, H(p,q)-H0 = -0.0000000017463939, L(p,q)-L0 = 0.0000000000000077 -ROOT RETURN: t = 75.2840 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 75.2840, H(p,q)-H0 = 0.0000000093074095, L(p,q)-L0 = 0.0000000021752905 -t = 75.3000, H(p,q)-H0 = -0.0000000018898960, L(p,q)-L0 = 0.0000000000000077 -t = 75.4000, H(p,q)-H0 = 0.0000000000002101, L(p,q)-L0 = 0.0000000000000074 -t = 75.5000, H(p,q)-H0 = -0.0000000019155226, L(p,q)-L0 = 0.0000000000000070 -t = 75.6000, H(p,q)-H0 = -0.0000000017140065, L(p,q)-L0 = 0.0000000000000071 -t = 75.7000, H(p,q)-H0 = 0.0000000001587277, L(p,q)-L0 = 0.0000000000000069 -t = 75.8000, H(p,q)-H0 = 0.0000000013130752, L(p,q)-L0 = 0.0000000000000067 -t = 75.9000, H(p,q)-H0 = 0.0000000018138380, L(p,q)-L0 = 0.0000000000000069 -t = 76.0000, H(p,q)-H0 = 0.0000000020191733, L(p,q)-L0 = 0.0000000000000061 -t = 76.1000, H(p,q)-H0 = 0.0000000021065129, L(p,q)-L0 = 0.0000000000000062 -t = 76.2000, H(p,q)-H0 = 0.0000000021461557, L(p,q)-L0 = 0.0000000000000064 -t = 76.3000, H(p,q)-H0 = 0.0000000021654534, L(p,q)-L0 = 0.0000000000000063 -t = 76.4000, H(p,q)-H0 = 0.0000000021754943, L(p,q)-L0 = 0.0000000000000060 -ROOT RETURN: t = 76.4287 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 76.4287, H(p,q)-H0 = 0.0000000021739354, L(p,q)-L0 = -0.0000000000044922 -t = 76.5000, H(p,q)-H0 = 0.0000000021810461, L(p,q)-L0 = 0.0000000000000062 -t = 76.6000, H(p,q)-H0 = 0.0000000021842850, L(p,q)-L0 = 0.0000000000000062 -t = 76.7000, H(p,q)-H0 = 0.0000000021862672, L(p,q)-L0 = 0.0000000000000063 -t = 76.8000, H(p,q)-H0 = 0.0000000021875317, L(p,q)-L0 = 0.0000000000000063 -t = 76.9000, H(p,q)-H0 = 0.0000000021883689, L(p,q)-L0 = 0.0000000000000066 -t = 77.0000, H(p,q)-H0 = 0.0000000021889408, L(p,q)-L0 = 0.0000000000000064 -t = 77.1000, H(p,q)-H0 = 0.0000000021893423, L(p,q)-L0 = 0.0000000000000061 -t = 77.2000, H(p,q)-H0 = 0.0000000021896316, L(p,q)-L0 = 0.0000000000000056 -t = 77.3000, H(p,q)-H0 = 0.0000000021898447, L(p,q)-L0 = 0.0000000000000056 -t = 77.4000, H(p,q)-H0 = 0.0000000021900042, L(p,q)-L0 = 0.0000000000000053 -t = 77.5000, H(p,q)-H0 = 0.0000000021901256, L(p,q)-L0 = 0.0000000000000053 -t = 77.6000, H(p,q)-H0 = 0.0000000021902189, L(p,q)-L0 = 0.0000000000000052 -t = 77.7000, H(p,q)-H0 = 0.0000000021902914, L(p,q)-L0 = 0.0000000000000053 -t = 77.8000, H(p,q)-H0 = 0.0000000021903478, L(p,q)-L0 = 0.0000000000000050 -t = 77.9000, H(p,q)-H0 = 0.0000000021903923, L(p,q)-L0 = 0.0000000000000053 -t = 78.0000, H(p,q)-H0 = 0.0000000021904266, L(p,q)-L0 = 0.0000000000000052 -t = 78.1000, H(p,q)-H0 = 0.0000000021904533, L(p,q)-L0 = 0.0000000000000053 -t = 78.2000, H(p,q)-H0 = 0.0000000021904728, L(p,q)-L0 = 0.0000000000000051 -t = 78.3000, H(p,q)-H0 = 0.0000000021904870, L(p,q)-L0 = 0.0000000000000053 -t = 78.4000, H(p,q)-H0 = 0.0000000021904957, L(p,q)-L0 = 0.0000000000000054 -t = 78.5000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000052 -t = 78.6000, H(p,q)-H0 = 0.0000000021904992, L(p,q)-L0 = 0.0000000000000050 -t = 78.7000, H(p,q)-H0 = 0.0000000021904938, L(p,q)-L0 = 0.0000000000000047 -t = 78.8000, H(p,q)-H0 = 0.0000000021904840, L(p,q)-L0 = 0.0000000000000047 -t = 78.9000, H(p,q)-H0 = 0.0000000021904688, L(p,q)-L0 = 0.0000000000000047 -t = 79.0000, H(p,q)-H0 = 0.0000000021904476, L(p,q)-L0 = 0.0000000000000046 -t = 79.1000, H(p,q)-H0 = 0.0000000021904196, L(p,q)-L0 = 0.0000000000000048 -t = 79.2000, H(p,q)-H0 = 0.0000000021903832, L(p,q)-L0 = 0.0000000000000050 -t = 79.3000, H(p,q)-H0 = 0.0000000021903367, L(p,q)-L0 = 0.0000000000000051 -t = 79.4000, H(p,q)-H0 = 0.0000000021902768, L(p,q)-L0 = 0.0000000000000053 -t = 79.5000, H(p,q)-H0 = 0.0000000021902007, L(p,q)-L0 = 0.0000000000000060 -t = 79.6000, H(p,q)-H0 = 0.0000000021901020, L(p,q)-L0 = 0.0000000000000063 -t = 79.7000, H(p,q)-H0 = 0.0000000021899730, L(p,q)-L0 = 0.0000000000000061 -t = 79.8000, H(p,q)-H0 = 0.0000000021898033, L(p,q)-L0 = 0.0000000000000062 -t = 79.9000, H(p,q)-H0 = 0.0000000021895758, L(p,q)-L0 = 0.0000000000000064 -t = 80.0000, H(p,q)-H0 = 0.0000000021892653, L(p,q)-L0 = 0.0000000000000067 -t = 80.1000, H(p,q)-H0 = 0.0000000021888316, L(p,q)-L0 = 0.0000000000000064 -t = 80.2000, H(p,q)-H0 = 0.0000000021882118, L(p,q)-L0 = 0.0000000000000067 -t = 80.3000, H(p,q)-H0 = 0.0000000021872997, L(p,q)-L0 = 0.0000000000000069 -t = 80.4000, H(p,q)-H0 = 0.0000000021859120, L(p,q)-L0 = 0.0000000000000072 -t = 80.5000, H(p,q)-H0 = 0.0000000021837197, L(p,q)-L0 = 0.0000000000000070 -t = 80.6000, H(p,q)-H0 = 0.0000000021801069, L(p,q)-L0 = 0.0000000000000070 -t = 80.7000, H(p,q)-H0 = 0.0000000021738561, L(p,q)-L0 = 0.0000000000000070 -t = 80.8000, H(p,q)-H0 = 0.0000000021624325, L(p,q)-L0 = 0.0000000000000070 -t = 80.9000, H(p,q)-H0 = 0.0000000021402319, L(p,q)-L0 = 0.0000000000000067 -t = 81.0000, H(p,q)-H0 = 0.0000000020940939, L(p,q)-L0 = 0.0000000000000060 -t = 81.1000, H(p,q)-H0 = 0.0000000019913217, L(p,q)-L0 = 0.0000000000000072 -t = 81.2000, H(p,q)-H0 = 0.0000000017478594, L(p,q)-L0 = 0.0000000000000074 -t = 81.3000, H(p,q)-H0 = 0.0000000011560892, L(p,q)-L0 = 0.0000000000000074 -t = 81.4000, H(p,q)-H0 = -0.0000000001606268, L(p,q)-L0 = 0.0000000000000075 -t = 81.5000, H(p,q)-H0 = -0.0000000020080768, L(p,q)-L0 = 0.0000000000000075 -ROOT RETURN: t = 81.5672 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 81.5672, H(p,q)-H0 = 0.0000000139063379, L(p,q)-L0 = 0.0000000031236222 -t = 81.6000, H(p,q)-H0 = -0.0000000015271278, L(p,q)-L0 = 0.0000000000000080 -t = 81.7000, H(p,q)-H0 = -0.0000000000970459, L(p,q)-L0 = 0.0000000000000083 -t = 81.8000, H(p,q)-H0 = -0.0000000021650761, L(p,q)-L0 = 0.0000000000000082 -t = 81.9000, H(p,q)-H0 = -0.0000000014039563, L(p,q)-L0 = 0.0000000000000080 -t = 82.0000, H(p,q)-H0 = 0.0000000004158305, L(p,q)-L0 = 0.0000000000000075 -t = 82.1000, H(p,q)-H0 = 0.0000000014310835, L(p,q)-L0 = 0.0000000000000073 -t = 82.2000, H(p,q)-H0 = 0.0000000018621674, L(p,q)-L0 = 0.0000000000000064 -t = 82.3000, H(p,q)-H0 = 0.0000000020393375, L(p,q)-L0 = 0.0000000000000067 -t = 82.4000, H(p,q)-H0 = 0.0000000021154430, L(p,q)-L0 = 0.0000000000000060 -t = 82.5000, H(p,q)-H0 = 0.0000000021503953, L(p,q)-L0 = 0.0000000000000060 -t = 82.6000, H(p,q)-H0 = 0.0000000021676080, L(p,q)-L0 = 0.0000000000000062 -t = 82.7000, H(p,q)-H0 = 0.0000000021766609, L(p,q)-L0 = 0.0000000000000068 -ROOT RETURN: t = 82.7119 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 82.7119, H(p,q)-H0 = 0.0000000021758406, L(p,q)-L0 = -0.0000000000020440 -t = 82.8000, H(p,q)-H0 = 0.0000000021817133, L(p,q)-L0 = 0.0000000000000069 -t = 82.9000, H(p,q)-H0 = 0.0000000021846863, L(p,q)-L0 = 0.0000000000000073 -t = 83.0000, H(p,q)-H0 = 0.0000000021865191, L(p,q)-L0 = 0.0000000000000074 -t = 83.1000, H(p,q)-H0 = 0.0000000021876961, L(p,q)-L0 = 0.0000000000000075 -t = 83.2000, H(p,q)-H0 = 0.0000000021884796, L(p,q)-L0 = 0.0000000000000075 -t = 83.3000, H(p,q)-H0 = 0.0000000021890175, L(p,q)-L0 = 0.0000000000000075 -t = 83.4000, H(p,q)-H0 = 0.0000000021893970, L(p,q)-L0 = 0.0000000000000073 -t = 83.5000, H(p,q)-H0 = 0.0000000021896718, L(p,q)-L0 = 0.0000000000000075 -t = 83.6000, H(p,q)-H0 = 0.0000000021898741, L(p,q)-L0 = 0.0000000000000071 -t = 83.7000, H(p,q)-H0 = 0.0000000021900265, L(p,q)-L0 = 0.0000000000000073 -t = 83.8000, H(p,q)-H0 = 0.0000000021901427, L(p,q)-L0 = 0.0000000000000075 -t = 83.9000, H(p,q)-H0 = 0.0000000021902319, L(p,q)-L0 = 0.0000000000000072 -t = 84.0000, H(p,q)-H0 = 0.0000000021903018, L(p,q)-L0 = 0.0000000000000073 -t = 84.1000, H(p,q)-H0 = 0.0000000021903560, L(p,q)-L0 = 0.0000000000000073 -t = 84.2000, H(p,q)-H0 = 0.0000000021903984, L(p,q)-L0 = 0.0000000000000074 -t = 84.3000, H(p,q)-H0 = 0.0000000021904314, L(p,q)-L0 = 0.0000000000000074 -t = 84.4000, H(p,q)-H0 = 0.0000000021904564, L(p,q)-L0 = 0.0000000000000071 -t = 84.5000, H(p,q)-H0 = 0.0000000021904751, L(p,q)-L0 = 0.0000000000000071 -t = 84.6000, H(p,q)-H0 = 0.0000000021904882, L(p,q)-L0 = 0.0000000000000070 -t = 84.7000, H(p,q)-H0 = 0.0000000021904961, L(p,q)-L0 = 0.0000000000000067 -t = 84.8000, H(p,q)-H0 = 0.0000000021904993, L(p,q)-L0 = 0.0000000000000064 -t = 84.9000, H(p,q)-H0 = 0.0000000021904980, L(p,q)-L0 = 0.0000000000000063 -t = 85.0000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = 0.0000000000000067 -t = 85.1000, H(p,q)-H0 = 0.0000000021904816, L(p,q)-L0 = 0.0000000000000070 -t = 85.2000, H(p,q)-H0 = 0.0000000021904655, L(p,q)-L0 = 0.0000000000000068 -t = 85.3000, H(p,q)-H0 = 0.0000000021904430, L(p,q)-L0 = 0.0000000000000066 -t = 85.4000, H(p,q)-H0 = 0.0000000021904135, L(p,q)-L0 = 0.0000000000000064 -t = 85.5000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000063 -t = 85.6000, H(p,q)-H0 = 0.0000000021903267, L(p,q)-L0 = 0.0000000000000066 -t = 85.7000, H(p,q)-H0 = 0.0000000021902641, L(p,q)-L0 = 0.0000000000000064 -t = 85.8000, H(p,q)-H0 = 0.0000000021901839, L(p,q)-L0 = 0.0000000000000062 -t = 85.9000, H(p,q)-H0 = 0.0000000021900807, L(p,q)-L0 = 0.0000000000000062 -t = 86.0000, H(p,q)-H0 = 0.0000000021899460, L(p,q)-L0 = 0.0000000000000062 -t = 86.1000, H(p,q)-H0 = 0.0000000021897676, L(p,q)-L0 = 0.0000000000000062 -t = 86.2000, H(p,q)-H0 = 0.0000000021895281, L(p,q)-L0 = 0.0000000000000057 -t = 86.3000, H(p,q)-H0 = 0.0000000021892003, L(p,q)-L0 = 0.0000000000000058 -t = 86.4000, H(p,q)-H0 = 0.0000000021887415, L(p,q)-L0 = 0.0000000000000062 -t = 86.5000, H(p,q)-H0 = 0.0000000021880811, L(p,q)-L0 = 0.0000000000000058 -t = 86.6000, H(p,q)-H0 = 0.0000000021871047, L(p,q)-L0 = 0.0000000000000060 -t = 86.7000, H(p,q)-H0 = 0.0000000021856101, L(p,q)-L0 = 0.0000000000000060 -t = 86.8000, H(p,q)-H0 = 0.0000000021832333, L(p,q)-L0 = 0.0000000000000060 -t = 86.9000, H(p,q)-H0 = 0.0000000021792859, L(p,q)-L0 = 0.0000000000000061 -t = 87.0000, H(p,q)-H0 = 0.0000000021723967, L(p,q)-L0 = 0.0000000000000066 -t = 87.1000, H(p,q)-H0 = 0.0000000021596795, L(p,q)-L0 = 0.0000000000000066 -t = 87.2000, H(p,q)-H0 = 0.0000000021346939, L(p,q)-L0 = 0.0000000000000062 -t = 87.3000, H(p,q)-H0 = 0.0000000020821591, L(p,q)-L0 = 0.0000000000000060 -t = 87.4000, H(p,q)-H0 = 0.0000000019638011, L(p,q)-L0 = 0.0000000000000066 -t = 87.5000, H(p,q)-H0 = 0.0000000016811532, L(p,q)-L0 = 0.0000000000000062 -t = 87.6000, H(p,q)-H0 = 0.0000000009964631, L(p,q)-L0 = 0.0000000000000069 -t = 87.7000, H(p,q)-H0 = -0.0000000004693257, L(p,q)-L0 = 0.0000000000000071 -t = 87.8000, H(p,q)-H0 = -0.0000000022005300, L(p,q)-L0 = 0.0000000000000074 -ROOT RETURN: t = 87.8504 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 87.8504, H(p,q)-H0 = -0.0000000012000745, L(p,q)-L0 = 0.0000000001728737 -t = 87.9000, H(p,q)-H0 = -0.0000000011032628, L(p,q)-L0 = 0.0000000000000073 -t = 88.0000, H(p,q)-H0 = -0.0000000003564984, L(p,q)-L0 = 0.0000000000000075 -t = 88.1000, H(p,q)-H0 = -0.0000000022895406, L(p,q)-L0 = 0.0000000000000075 -t = 88.2000, H(p,q)-H0 = -0.0000000010732333, L(p,q)-L0 = 0.0000000000000073 -t = 88.3000, H(p,q)-H0 = 0.0000000006458933, L(p,q)-L0 = 0.0000000000000073 -t = 88.4000, H(p,q)-H0 = 0.0000000015328927, L(p,q)-L0 = 0.0000000000000071 -t = 88.5000, H(p,q)-H0 = 0.0000000019037667, L(p,q)-L0 = 0.0000000000000063 -t = 88.6000, H(p,q)-H0 = 0.0000000020568408, L(p,q)-L0 = 0.0000000000000066 -t = 88.7000, H(p,q)-H0 = 0.0000000021232862, L(p,q)-L0 = 0.0000000000000062 -t = 88.8000, H(p,q)-H0 = 0.0000000021541653, L(p,q)-L0 = 0.0000000000000067 -t = 88.9000, H(p,q)-H0 = 0.0000000021695464, L(p,q)-L0 = 0.0000000000000066 -ROOT RETURN: t = 88.9951 g[0] = -1, y[0] = -0.658624, y[1] = 0.798624 -t = 88.9951, H(p,q)-H0 = 0.0000000021729292, L(p,q)-L0 = -0.0000000000058091 -t = 89.0000, H(p,q)-H0 = 0.0000000021777204, L(p,q)-L0 = 0.0000000000000061 -t = 89.1000, H(p,q)-H0 = 0.0000000021823255, L(p,q)-L0 = 0.0000000000000061 -t = 89.2000, H(p,q)-H0 = 0.0000000021850579, L(p,q)-L0 = 0.0000000000000062 -t = 89.3000, H(p,q)-H0 = 0.0000000021867548, L(p,q)-L0 = 0.0000000000000067 -t = 89.4000, H(p,q)-H0 = 0.0000000021878511, L(p,q)-L0 = 0.0000000000000064 -t = 89.5000, H(p,q)-H0 = 0.0000000021885854, L(p,q)-L0 = 0.0000000000000066 -t = 89.6000, H(p,q)-H0 = 0.0000000021890915, L(p,q)-L0 = 0.0000000000000062 -t = 89.7000, H(p,q)-H0 = 0.0000000021894508, L(p,q)-L0 = 0.0000000000000064 -t = 89.8000, H(p,q)-H0 = 0.0000000021897113, L(p,q)-L0 = 0.0000000000000064 -t = 89.9000, H(p,q)-H0 = 0.0000000021899041, L(p,q)-L0 = 0.0000000000000064 -t = 90.0000, H(p,q)-H0 = 0.0000000021900493, L(p,q)-L0 = 0.0000000000000062 -t = 90.1000, H(p,q)-H0 = 0.0000000021901603, L(p,q)-L0 = 0.0000000000000066 -t = 90.2000, H(p,q)-H0 = 0.0000000021902459, L(p,q)-L0 = 0.0000000000000063 -t = 90.3000, H(p,q)-H0 = 0.0000000021903125, L(p,q)-L0 = 0.0000000000000061 -t = 90.4000, H(p,q)-H0 = 0.0000000021903648, L(p,q)-L0 = 0.0000000000000061 -t = 90.5000, H(p,q)-H0 = 0.0000000021904051, L(p,q)-L0 = 0.0000000000000057 -t = 90.6000, H(p,q)-H0 = 0.0000000021904369, L(p,q)-L0 = 0.0000000000000060 -t = 90.7000, H(p,q)-H0 = 0.0000000021904610, L(p,q)-L0 = 0.0000000000000059 -t = 90.8000, H(p,q)-H0 = 0.0000000021904785, L(p,q)-L0 = 0.0000000000000057 -t = 90.9000, H(p,q)-H0 = 0.0000000021904907, L(p,q)-L0 = 0.0000000000000058 -t = 91.0000, H(p,q)-H0 = 0.0000000021904982, L(p,q)-L0 = 0.0000000000000062 -t = 91.1000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = 0.0000000000000064 -t = 91.2000, H(p,q)-H0 = 0.0000000021904987, L(p,q)-L0 = 0.0000000000000062 -t = 91.3000, H(p,q)-H0 = 0.0000000021904919, L(p,q)-L0 = 0.0000000000000062 -t = 91.4000, H(p,q)-H0 = 0.0000000021904804, L(p,q)-L0 = 0.0000000000000062 -t = 91.5000, H(p,q)-H0 = 0.0000000021904631, L(p,q)-L0 = 0.0000000000000060 -t = 91.6000, H(p,q)-H0 = 0.0000000021904401, L(p,q)-L0 = 0.0000000000000066 -t = 91.7000, H(p,q)-H0 = 0.0000000021904093, L(p,q)-L0 = 0.0000000000000064 -t = 91.8000, H(p,q)-H0 = 0.0000000021903700, L(p,q)-L0 = 0.0000000000000070 -t = 91.9000, H(p,q)-H0 = 0.0000000021903192, L(p,q)-L0 = 0.0000000000000070 -t = 92.0000, H(p,q)-H0 = 0.0000000021902540, L(p,q)-L0 = 0.0000000000000068 -t = 92.1000, H(p,q)-H0 = 0.0000000021901703, L(p,q)-L0 = 0.0000000000000064 -t = 92.2000, H(p,q)-H0 = 0.0000000021900621, L(p,q)-L0 = 0.0000000000000060 -t = 92.3000, H(p,q)-H0 = 0.0000000021899208, L(p,q)-L0 = 0.0000000000000058 -t = 92.4000, H(p,q)-H0 = 0.0000000021897337, L(p,q)-L0 = 0.0000000000000056 -t = 92.5000, H(p,q)-H0 = 0.0000000021894817, L(p,q)-L0 = 0.0000000000000056 -t = 92.6000, H(p,q)-H0 = 0.0000000021891347, L(p,q)-L0 = 0.0000000000000049 -t = 92.7000, H(p,q)-H0 = 0.0000000021886470, L(p,q)-L0 = 0.0000000000000047 -t = 92.8000, H(p,q)-H0 = 0.0000000021879436, L(p,q)-L0 = 0.0000000000000051 -t = 92.9000, H(p,q)-H0 = 0.0000000021868976, L(p,q)-L0 = 0.0000000000000054 -t = 93.0000, H(p,q)-H0 = 0.0000000021852867, L(p,q)-L0 = 0.0000000000000056 -t = 93.1000, H(p,q)-H0 = 0.0000000021827063, L(p,q)-L0 = 0.0000000000000053 -t = 93.2000, H(p,q)-H0 = 0.0000000021783869, L(p,q)-L0 = 0.0000000000000056 -t = 93.3000, H(p,q)-H0 = 0.0000000021707803, L(p,q)-L0 = 0.0000000000000056 -t = 93.4000, H(p,q)-H0 = 0.0000000021565990, L(p,q)-L0 = 0.0000000000000059 -t = 93.5000, H(p,q)-H0 = 0.0000000021284249, L(p,q)-L0 = 0.0000000000000057 -t = 93.6000, H(p,q)-H0 = 0.0000000020684887, L(p,q)-L0 = 0.0000000000000062 -t = 93.7000, H(p,q)-H0 = 0.0000000019319482, L(p,q)-L0 = 0.0000000000000066 -t = 93.8000, H(p,q)-H0 = 0.0000000016036170, L(p,q)-L0 = 0.0000000000000066 -t = 93.9000, H(p,q)-H0 = 0.0000000008137360, L(p,q)-L0 = 0.0000000000000066 -t = 94.0000, H(p,q)-H0 = -0.0000000007952332, L(p,q)-L0 = 0.0000000000000069 -t = 94.1000, H(p,q)-H0 = -0.0000000022989144, L(p,q)-L0 = 0.0000000000000069 -ROOT RETURN: t = 94.1336 g[0] = 1, y[0] = 0.361063, y[1] = -0.221063 -t = 94.1336, H(p,q)-H0 = 0.0000000079756892, L(p,q)-L0 = 0.0000000019152251 -t = 94.2000, H(p,q)-H0 = -0.0000000006765102, L(p,q)-L0 = 0.0000000000000072 -t = 94.3000, H(p,q)-H0 = -0.0000000007326133, L(p,q)-L0 = 0.0000000000000073 -t = 94.4000, H(p,q)-H0 = -0.0000000022880635, L(p,q)-L0 = 0.0000000000000074 -t = 94.5000, H(p,q)-H0 = -0.0000000007392544, L(p,q)-L0 = 0.0000000000000073 -t = 94.6000, H(p,q)-H0 = 0.0000000008495653, L(p,q)-L0 = 0.0000000000000071 -t = 94.7000, H(p,q)-H0 = 0.0000000016205666, L(p,q)-L0 = 0.0000000000000070 -t = 94.8000, H(p,q)-H0 = 0.0000000019396070, L(p,q)-L0 = 0.0000000000000075 -t = 94.9000, H(p,q)-H0 = 0.0000000020720623, L(p,q)-L0 = 0.0000000000000071 -t = 95.0000, H(p,q)-H0 = 0.0000000021301885, L(p,q)-L0 = 0.0000000000000073 -t = 95.1000, H(p,q)-H0 = 0.0000000021575211, L(p,q)-L0 = 0.0000000000000068 -t = 95.2000, H(p,q)-H0 = 0.0000000021712909, L(p,q)-L0 = 0.0000000000000067 -ROOT RETURN: t = 95.2783 g[0] = -1, y[0] = -0.658625, y[1] = 0.798625 -t = 95.2783, H(p,q)-H0 = 0.0000000021732466, L(p,q)-L0 = -0.0000000000053852 -t = 95.3000, H(p,q)-H0 = 0.0000000021786840, L(p,q)-L0 = 0.0000000000000063 -t = 95.4000, H(p,q)-H0 = 0.0000000021828877, L(p,q)-L0 = 0.0000000000000064 -t = 95.5000, H(p,q)-H0 = 0.0000000021854019, L(p,q)-L0 = 0.0000000000000068 -t = 95.6000, H(p,q)-H0 = 0.0000000021869742, L(p,q)-L0 = 0.0000000000000069 -t = 95.7000, H(p,q)-H0 = 0.0000000021879971, L(p,q)-L0 = 0.0000000000000070 -t = 95.8000, H(p,q)-H0 = 0.0000000021886853, L(p,q)-L0 = 0.0000000000000073 -t = 95.9000, H(p,q)-H0 = 0.0000000021891625, L(p,q)-L0 = 0.0000000000000073 -t = 96.0000, H(p,q)-H0 = 0.0000000021895025, L(p,q)-L0 = 0.0000000000000073 -t = 96.1000, H(p,q)-H0 = 0.0000000021897497, L(p,q)-L0 = 0.0000000000000072 -t = 96.2000, H(p,q)-H0 = 0.0000000021899338, L(p,q)-L0 = 0.0000000000000071 -t = 96.3000, H(p,q)-H0 = 0.0000000021900726, L(p,q)-L0 = 0.0000000000000072 -t = 96.4000, H(p,q)-H0 = 0.0000000021901789, L(p,q)-L0 = 0.0000000000000075 -t = 96.5000, H(p,q)-H0 = 0.0000000021902609, L(p,q)-L0 = 0.0000000000000072 -t = 96.6000, H(p,q)-H0 = 0.0000000021903250, L(p,q)-L0 = 0.0000000000000072 -t = 96.7000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000070 -t = 96.8000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000068 -t = 96.9000, H(p,q)-H0 = 0.0000000021904440, L(p,q)-L0 = 0.0000000000000064 -t = 97.0000, H(p,q)-H0 = 0.0000000021904670, L(p,q)-L0 = 0.0000000000000064 -t = 97.1000, H(p,q)-H0 = 0.0000000021904837, L(p,q)-L0 = 0.0000000000000063 -t = 97.2000, H(p,q)-H0 = 0.0000000021904951, L(p,q)-L0 = 0.0000000000000066 -t = 97.3000, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = 0.0000000000000062 -t = 97.4000, H(p,q)-H0 = 0.0000000021905035, L(p,q)-L0 = 0.0000000000000069 -t = 97.5000, H(p,q)-H0 = 0.0000000021905008, L(p,q)-L0 = 0.0000000000000071 -t = 97.6000, H(p,q)-H0 = 0.0000000021904931, L(p,q)-L0 = 0.0000000000000069 -t = 97.7000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000071 -t = 97.8000, H(p,q)-H0 = 0.0000000021904627, L(p,q)-L0 = 0.0000000000000070 -t = 97.9000, H(p,q)-H0 = 0.0000000021904382, L(p,q)-L0 = 0.0000000000000070 -t = 98.0000, H(p,q)-H0 = 0.0000000021904062, L(p,q)-L0 = 0.0000000000000070 -t = 98.1000, H(p,q)-H0 = 0.0000000021903646, L(p,q)-L0 = 0.0000000000000066 -t = 98.2000, H(p,q)-H0 = 0.0000000021903119, L(p,q)-L0 = 0.0000000000000068 -t = 98.3000, H(p,q)-H0 = 0.0000000021902442, L(p,q)-L0 = 0.0000000000000070 -t = 98.4000, H(p,q)-H0 = 0.0000000021901572, L(p,q)-L0 = 0.0000000000000069 -t = 98.5000, H(p,q)-H0 = 0.0000000021900445, L(p,q)-L0 = 0.0000000000000070 -t = 98.6000, H(p,q)-H0 = 0.0000000021898964, L(p,q)-L0 = 0.0000000000000068 -t = 98.7000, H(p,q)-H0 = 0.0000000021897003, L(p,q)-L0 = 0.0000000000000070 -t = 98.8000, H(p,q)-H0 = 0.0000000021894348, L(p,q)-L0 = 0.0000000000000071 -t = 98.9000, H(p,q)-H0 = 0.0000000021890686, L(p,q)-L0 = 0.0000000000000071 -t = 99.0000, H(p,q)-H0 = 0.0000000021885515, L(p,q)-L0 = 0.0000000000000070 -t = 99.1000, H(p,q)-H0 = 0.0000000021878013, L(p,q)-L0 = 0.0000000000000070 -t = 99.2000, H(p,q)-H0 = 0.0000000021866788, L(p,q)-L0 = 0.0000000000000071 -t = 99.3000, H(p,q)-H0 = 0.0000000021849398, L(p,q)-L0 = 0.0000000000000071 -t = 99.4000, H(p,q)-H0 = 0.0000000021821350, L(p,q)-L0 = 0.0000000000000070 -t = 99.5000, H(p,q)-H0 = 0.0000000021774016, L(p,q)-L0 = 0.0000000000000068 -t = 99.6000, H(p,q)-H0 = 0.0000000021689899, L(p,q)-L0 = 0.0000000000000067 -t = 99.7000, H(p,q)-H0 = 0.0000000021531459, L(p,q)-L0 = 0.0000000000000064 -t = 99.8000, H(p,q)-H0 = 0.0000000021213139, L(p,q)-L0 = 0.0000000000000060 -t = 99.9000, H(p,q)-H0 = 0.0000000020527962, L(p,q)-L0 = 0.0000000000000059 -t = 100.0000, H(p,q)-H0 = 0.0000000018950277, L(p,q)-L0 = 0.0000000000000062 -Current time = 99.999999999998593125383195001632 -Steps = 10000 -Step attempts = 10000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.010000000000000000208166817117217 -Last step size = 0.0099999999999482638152192848224331 -Current step size = 0.0099999999999482638152192848224331 -Root fn evals = 10296 -f1 RHS fn evals = 40032 -f2 RHS fn evals = 40032 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated.out deleted file mode 100644 index 8e12aeac48..0000000000 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--find-roots_--use-compensated.out +++ /dev/null @@ -1,11 +0,0 @@ -ERROR: unrecognized argument --use-compensated -ark_kepler: an ARKODE example demonstrating the SPRKStep time-stepping module solving the Kepler problem - --step-mode should we use a fixed time-step or adaptive time-step (default fixed) - --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK) - --method which method to use (default ARKODE_SYMPLECTIC_MCLACHLAN_4_4) - --use-compensated-sums turns on compensated summation in ARKODE where applicable - --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) - --tf the final time for the simulation (default 100) - --nout the number of output times (default 100) - --find-roots turns on rootfinding - --check-order compute the order of the method used and check if it is within range of the expected diff --git a/test/answers b/test/answers index 76d845537d..c8c64912e3 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 76d845537df793b645867568021419751ff735cd +Subproject commit c8c64912e384ec47a0722be7a8d0dc5fca2c0cd9 From 51ef530e3c04cfcf6f7922b76f7a1bd166809c48 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 14:31:28 -0700 Subject: [PATCH 082/177] remove extra underscore --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 12 +++--- doc/arkode/guide/source/Butcher.rst | 24 ++++++------ examples/arkode/C_serial/ark_kepler.c | 2 +- include/arkode/arkode_sprk.h | 14 +++---- src/arkode/arkode_sprk.c | 38 +++++++++---------- src/arkode/arkode_sprkstep.c | 20 +++++----- src/arkode/arkode_sprkstep_io.c | 8 ++-- 7 files changed, 59 insertions(+), 59 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index c130bf93b9..70f16b7605 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -123,21 +123,21 @@ ARKodeSPRKStorage functions +----------------------------------------------+------------------------------------------------------------+ -.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage__Alloc(int stages) +.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) Allocate memory for the ARKodeSPRKStorage structure. :param stages: The number of stages. :return: Pointer to the allocated ARKodeSPRKStorage structure. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage__Load(ARKODE_SPRKMethodID id) +.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) Load the ARKodeSPRKStorage structure for the specified method ID. :param id: The ID of the SPRK method. One of :ref:`SPRKStorage.id`. :return: Pointer to the loaded ARKodeSPRKStorage structure. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage__LoadByName(const char* method) +.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) Load the ARKodeSPRKStorage structure for the specified method name. @@ -145,7 +145,7 @@ ARKodeSPRKStorage functions :return: Pointer to the loaded ARKodeSPRKStorage structure. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage__Copy(ARKodeSPRKStorage B) +.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage B) Create a copy of the ARKodeSPRKStorage structure. @@ -160,13 +160,13 @@ ARKodeSPRKStorage functions :param liw: Pointer to store the integer workspace size. :param lrw: Pointer to store the real workspace size. -.. c:function:: void ARKodeSPRKStorage__Free(ARKodeSPRKStorage B) +.. c:function:: void ARKodeSPRKStorage_Free(ARKodeSPRKStorage B) Free the memory allocated for the ARKodeSPRKStorage structure. :param B: The ARKodeSPRKStorage structure to free. -.. c:function:: int ARKodeSPRKStorage__ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) +.. c:function:: int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) Convert the ARKodeSPRKStorage structure to the Butcher table representation. diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index f378eb8f42..8f487eb55a 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1717,7 +1717,7 @@ ARKODE_SYMPLECTIC_EULER_1_1 .. index:: 1st-order symplectic Euler method Accessible via the constant ``ARKODE_SYMPLECTIC_EULER_1_1`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticEuler`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticEuler`. This is the classic Symplectic Euler method. @@ -1727,7 +1727,7 @@ ARKODE_SYMPLECTIC_LEAPFROG_2_2 .. index:: 2nd-order Leapfrog method Accessible via the constant ``ARKODE_SYMPLECTIC_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticLeapfrog2`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticLeapfrog2`. This is the classic Leapfrog/Verlet method. @@ -1737,7 +1737,7 @@ ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 .. index:: 2nd-order Pseudo Leapfrog method Accessible via the constant ``ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. This is the classic Pseudo Leapfrog/Verlet method. @@ -1747,7 +1747,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_2_2 .. index:: 2nd-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_2_2`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan2`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan2`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1757,7 +1757,7 @@ ARKODE_SYMPLECTIC_RUTH_3_3 .. index:: 3rd-order Ruth method Accessible via the constant ``ARKODE_SYMPLECTIC_RUTH_3_3`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticRuth3`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticRuth3`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. @@ -1767,7 +1767,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_3_3 .. index:: 3rd-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_3_3`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan3`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan3`. This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1777,7 +1777,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_4_4 .. index:: 4th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_4_4`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan4`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan4`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1787,7 +1787,7 @@ ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 .. index:: 4th-order Candy-Rozmus method Accessible via the constant ``ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. @@ -1797,7 +1797,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_5_6 .. index:: 5th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_5_6`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan5`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan5`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1807,7 +1807,7 @@ ARKODE_SYMPLECTIC_YOSHIDA_6_8 .. index:: 6th-order Yoshida method Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6_8`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticYoshida6`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticYoshida6`. This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. @@ -1817,7 +1817,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_8_16 .. index:: 8th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_8_16`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan8`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan8`. This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1827,5 +1827,5 @@ ARKODE_SYMPLECTIC_SOFRONIOU_10_36 .. index:: 10th-order Sofroniou method Accessible via the constant ``ARKODE_SYMPLECTIC_SOFRONIOU_10_36`` to -:c:func:`ARKodeSPRKStorage__Load()` or by calling :c:func:`ARKodeSymplecticSofroniou10`. +:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticSofroniou10`. This is the 10th order method given by Sofroniou in :cite:p:`Sofroniou:05`. diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 022c64f407..735ba8e18e 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -158,7 +158,7 @@ int main(int argc, char* argv[]) sunrealtype con_orders[NUM_DT]; sunrealtype acc_errors[NUM_DT]; sunrealtype con_errors[NUM_DT]; - int expected_order = ARKodeSPRKStorage__LoadByName(args.method_name)->q; + int expected_order = ARKodeSPRKStorage_LoadByName(args.method_name)->q; N_Vector ref_sol = N_VClone(result.sol); N_Vector error = N_VClone(result.sol); sunrealtype a11 = 0, a12 = 0, a21 = 0, a22 = 0; diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index d02c3af525..5dcf3f1970 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -57,15 +57,15 @@ struct ARKodeSPRKStorage_s typedef _SUNDIALS_STRUCT_ ARKodeSPRKStorage_s* ARKodeSPRKStorage; /* Utility routines to allocate/free/output SPRK structures */ -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage__Alloc(int stages); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage__Load(ARKODE_SPRKMethodID id); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage__LoadByName(const char* method); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage__Copy(ARKodeSPRKStorage B); -SUNDIALS_EXPORT void ARKodeSPRKStorage__Space(ARKodeSPRKStorage B, +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method); +SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage B); +SUNDIALS_EXPORT void ARKodeSPRKStorage_Space(ARKodeSPRKStorage B, sunindextype* liw, sunindextype* lrw); -SUNDIALS_EXPORT void ARKodeSPRKStorage__Free(ARKodeSPRKStorage B); -SUNDIALS_EXPORT int ARKodeSPRKStorage__ToButcher(ARKodeSPRKStorage sprk_storage, +SUNDIALS_EXPORT void ARKodeSPRKStorage_Free(ARKodeSPRKStorage B); +SUNDIALS_EXPORT int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 6ad4b6b466..947efd1dd1 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -24,7 +24,7 @@ ARKodeSPRKStorage ARKodeSymplecticEuler() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(1); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(1); sprk_storage->q = 1; sprk_storage->stages = 1; sprk_storage->a[0] = SUN_RCONST(1.0); @@ -43,7 +43,7 @@ ARKodeSPRKStorage ARKodeSymplecticEuler() ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(2); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); sprk_storage->q = 2; sprk_storage->stages = 2; sprk_storage->a[0] = SUN_RCONST(0.5); @@ -55,7 +55,7 @@ ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(2); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); sprk_storage->q = 2; sprk_storage->stages = 2; sprk_storage->a[0] = SUN_RCONST(1.0); @@ -67,7 +67,7 @@ ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(4); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(4); sprk_storage->q = 4; sprk_storage->stages = 4; sprk_storage->a[0] = @@ -105,7 +105,7 @@ ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() ARKodeSPRKStorage ARKodeSymplecticRuth3() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(3); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(3); sprk_storage->q = 3; sprk_storage->stages = 3; sprk_storage->a[0] = SUN_RCONST(2.0) / SUN_RCONST(3.0); @@ -126,7 +126,7 @@ ARKodeSPRKStorage ARKodeSymplecticRuth3() ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(2); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); sprk_storage->q = 2; sprk_storage->stages = 2; sprk_storage->a[1] = SUN_RCONST(1.0) - @@ -140,7 +140,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(3); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(3); sprk_storage->q = 3; sprk_storage->stages = 3; sprk_storage->a[0] = SUN_RCONST(0.919661523017399857); @@ -155,7 +155,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(4); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(4); sprk_storage->q = 4; sprk_storage->stages = 4; sprk_storage->a[0] = SUN_RCONST(0.515352837431122936); @@ -171,7 +171,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(6); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(6); sprk_storage->q = 5; sprk_storage->stages = 6; sprk_storage->a[0] = SUN_RCONST(0.339839625839110000); @@ -200,7 +200,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() ARKodeSPRKStorage ARKodeSymplecticYoshida6() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(8); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(8); sprk_storage->q = 6; sprk_storage->stages = 8; sprk_storage->a[0] = SUN_RCONST(0.78451361047755726382); @@ -236,7 +236,7 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(16); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(16); sprk_storage->q = 8; sprk_storage->stages = 16; sprk_storage->a[0] = SUN_RCONST(0.74167036435061295344822780); @@ -292,7 +292,7 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() ARKodeSPRKStorage ARKodeSymplecticSofroniou10() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage__Alloc(36); + ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(36); sprk_storage->q = 10; sprk_storage->stages = 36; @@ -389,7 +389,7 @@ ARKodeSPRKStorage ARKodeSymplecticSofroniou10() return sprk_storage; } -ARKodeSPRKStorage ARKodeSPRKStorage__Alloc(int stages) +ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) { ARKodeSPRKStorage sprk_storage; @@ -403,7 +403,7 @@ ARKodeSPRKStorage ARKodeSPRKStorage__Alloc(int stages) return sprk_storage; } -ARKodeSPRKStorage ARKodeSPRKStorage__Load(ARKODE_SPRKMethodID id) +ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) { switch (id) { @@ -425,7 +425,7 @@ ARKodeSPRKStorage ARKodeSPRKStorage__Load(ARKODE_SPRKMethodID id) } } -ARKodeSPRKStorage ARKodeSPRKStorage__LoadByName(const char* method) +ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) { if (!strcmp(method, "ARKODE_SYMPLECTIC_EULER_1_1")) { @@ -478,12 +478,12 @@ ARKodeSPRKStorage ARKodeSPRKStorage__LoadByName(const char* method) else { return NULL; } } -ARKodeSPRKStorage ARKodeSPRKStorage__Copy(ARKodeSPRKStorage that_sprk_mem) +ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_mem) { int i; ARKodeSPRKStorage sprk_storage; - sprk_storage = ARKodeSPRKStorage__Alloc(that_sprk_mem->stages); + sprk_storage = ARKodeSPRKStorage_Alloc(that_sprk_mem->stages); sprk_storage->q = that_sprk_mem->q; @@ -504,7 +504,7 @@ void ARKodeSPRKStorage_space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, return; } -void ARKodeSPRKStorage__Free(ARKodeSPRKStorage sprk_storage) +void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage) { if (sprk_storage) { @@ -515,7 +515,7 @@ void ARKodeSPRKStorage__Free(ARKodeSPRKStorage sprk_storage) return; } -int ARKodeSPRKStorage__ToButcher(ARKodeSPRKStorage sprk_storage, +int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) { int i, j; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index f32bbce813..4a391c88d0 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -351,7 +351,7 @@ void SPRKStepFree(void** arkode_mem) step_mem->sdata = NULL; } - ARKodeSPRKStorage__Free(step_mem->method); + ARKodeSPRKStorage_Free(step_mem->method); free(ark_mem->step_mem); ark_mem->step_mem = NULL; @@ -408,33 +408,33 @@ int sprkStep_Init(void* arkode_mem, int init_type) switch (step_mem->q) { case 1: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_1); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_1); break; case 2: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_2); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_2); break; case 3: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_3); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_3); break; case 4: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_4); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_4); break; case 5: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_5); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_5); break; case 6: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_6); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_6); break; case 7: case 8: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_8); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_8); break; case 9: case 10: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_10); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_10); break; default: - step_mem->method = ARKodeSPRKStorage__Load(SPRKSTEP_DEFAULT_4); + step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_4); break; } } diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 002046a43a..970cd5a36d 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -291,7 +291,7 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) if (step_mem->method) { - ARKodeSPRKStorage__Free(step_mem->method); + ARKodeSPRKStorage_Free(step_mem->method); step_mem->method = NULL; } @@ -318,11 +318,11 @@ int SPRKStepSetMethodName(void* arkode_mem, const char* method) if (step_mem->method) { - ARKodeSPRKStorage__Free(step_mem->method); + ARKodeSPRKStorage_Free(step_mem->method); step_mem->method = NULL; } - step_mem->method = ARKodeSPRKStorage__LoadByName(method); + step_mem->method = ARKodeSPRKStorage_LoadByName(method); return (ARK_SUCCESS); } @@ -352,7 +352,7 @@ int SPRKStepSetOrder(void* arkode_mem, int ord) if (step_mem->method) { - ARKodeSPRKStorage__Free(step_mem->method); + ARKodeSPRKStorage_Free(step_mem->method); step_mem->method = NULL; } From 3b282c88f4a821c8f462038d809863d0162fc012 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 14:35:04 -0700 Subject: [PATCH 083/177] update example header --- examples/arkode/C_serial/ark_harmonic_symplectic.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index 5abba5d1f5..22201f2547 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -28,13 +28,12 @@ * We simulate the problem on t = [0, 2pi] using the symplectic methods * in SPRKStep. Symplectic methods will approximately conserve U. * - * The problem can be run like so: - * ./ark_harmonic_symplectic [order] [dt] [use_compsums] - * - * Order sets the order of the method to use, dt is the time step size, and - * use_compsums turns on (1) or off (0) compensated summation inside SPRKStep. - * Compensated summation increases accuracy but at increased computational - * and memory cost. + * The example has the following command line arguments: + * --order the order of the method to use (default 4) + * --dt the fixed-time step size to use (default 0.01) + * --nout the number of output times (default 100) + * --use-compensated-sums turns on compensated summation in ARKODE where + * applicable * --------------------------------------------------------------------------*/ /* clang-format: on */ From 9c605e3fc7f9bac93df863024a59552845e82c46 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 14:43:40 -0700 Subject: [PATCH 084/177] clean up --- include/arkode/arkode.h | 1 - include/arkode/arkode_arkstep.h | 2 -- src/arkode/arkode.c | 1 - src/arkode/arkode_adapt.c | 7 ------- src/arkode/arkode_io.c | 3 +-- src/arkode/arkode_sprk.c | 2 -- src/arkode/arkode_sprkstep.c | 6 +----- src/arkode/arkode_sprkstep_impl.h | 2 +- 8 files changed, 3 insertions(+), 21 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 6f54177e7f..be8bd7a543 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -67,7 +67,6 @@ extern "C" { /* interpolation module types */ #define ARK_INTERP_HERMITE 0 #define ARK_INTERP_LAGRANGE 1 -#define ARK_INTERP_NONE 2 /* return values */ diff --git a/include/arkode/arkode_arkstep.h b/include/arkode/arkode_arkstep.h index 55cb8e75bb..2b1ec96962 100644 --- a/include/arkode/arkode_arkstep.h +++ b/include/arkode/arkode_arkstep.h @@ -299,8 +299,6 @@ SUNDIALS_EXPORT int ARKStepSetMassTimes(void *arkode_mem, ARKLsMassTimesVecFn mtimes, void *mtimes_data); SUNDIALS_EXPORT int ARKStepSetLinSysFn(void *arkode_mem, ARKLsLinSysFn linsys); -SUNDIALS_EXPORT int ARKStepSetSeparableRhs(void *arkode_mem, sunbooleantype isseparable); - /* Integrate the ODE over an interval in t */ SUNDIALS_EXPORT int ARKStepEvolve(void *arkode_mem, realtype tout, diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 7bd3362249..f35b4f703b 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -726,7 +726,6 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, for(;;) { ark_mem->next_h = ark_mem->h; - // fprintf(stderr, ">>> next_h=%g\n", (double) ark_mem->next_h); /* Reset and check ewt and rwt */ if (!ark_mem->initsetup) { diff --git a/src/arkode/arkode_adapt.c b/src/arkode/arkode_adapt.c index 8155ceae66..149bbd4490 100644 --- a/src/arkode/arkode_adapt.c +++ b/src/arkode/arkode_adapt.c @@ -166,13 +166,6 @@ int arkAdapt(void* arkode_mem, ARKodeHAdaptMem hadapt_mem, return (ARK_ILL_INPUT); } - /* TODO(CJB): with the Symplectic controller, I want ARKODE to take exactly the step my adaptivity function says to take. */ - if (hadapt_mem->imethod == ARK_ADAPT_CUSTOM) { - ark_mem->eta = ONE; - ark_mem->h = h_acc; - return ARK_SUCCESS; - } - /* determine direction of integration */ int_dir = hcur / SUNRabs(hcur); diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 8727987590..ea3aa3c38f 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -135,8 +135,7 @@ int arkSetInterpolantType(void *arkode_mem, int itype) ark_mem = (ARKodeMem) arkode_mem; /* check for legal itype input */ - if ((itype != ARK_INTERP_HERMITE) && (itype != ARK_INTERP_LAGRANGE) - && (itype != ARK_INTERP_NONE)) { + if ((itype != ARK_INTERP_HERMITE) && (itype != ARK_INTERP_LAGRANGE)) { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE", "arkSetInterpolantType", "Illegal interpolation type input."); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 947efd1dd1..b8e9ffa16d 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -10,8 +10,6 @@ * * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End - *--------------------------------------------------------------- - * *--------------------------------------------------------------*/ #include diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 4a391c88d0..29267df6ab 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -11,7 +11,7 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End *--------------------------------------------------------------- - * This is the implementation file for ARKODE's ARK time stepper + * This is the implementation file for ARKODE's SPRK time stepper * module. *--------------------------------------------------------------*/ @@ -444,10 +444,6 @@ int sprkStep_Init(void* arkode_mem, int init_type) */ ark_mem->call_fullrhs = SUNFALSE; - // TODO(CJB): setting this to NULL is not supported in arkode right now. - // Should this really exist in fixed step mode? - // ark_mem->hadapt_mem = NULL; - return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 14a965a938..0e24a38887 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -11,7 +11,7 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End *--------------------------------------------------------------- - * Implementation header file for ARKODE's ARK time stepper + * Implementation header file for ARKODE's SPRK time stepper * module. *--------------------------------------------------------------*/ From ce6a40b21be504766463a689df641bc0ccb44afd Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 15:23:37 -0700 Subject: [PATCH 085/177] remove guard on arkGetDky --- src/arkode/arkode.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index f35b4f703b..14aa02c256 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -952,9 +952,7 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, (ark_mem->tcur-tout)*ark_mem->h >= ZERO ) { istate = ARK_SUCCESS; ark_mem->tretlast = *tret = tout; - if (!SUNRCompare(SUNRabs(ark_mem->tcur - tout), FUZZ_FACTOR*ark_mem->uround)) { - (void) arkGetDky(ark_mem, tout, 0, yout); - } + (void) arkGetDky(ark_mem, tout, 0, yout); ark_mem->next_h = ark_mem->hprime; break; } @@ -963,10 +961,8 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, if ( ark_mem->tstopset ) { troundoff = FUZZ_FACTOR*ark_mem->uround * (SUNRabs(ark_mem->tcur) + SUNRabs(ark_mem->h)); - if (SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { - if (!SUNRCompare(SUNRabs(ark_mem->tcur - ark_mem->tstop), FUZZ_FACTOR*ark_mem->uround)) { - (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); - } + if ( SUNRabs(ark_mem->tcur - ark_mem->tstop) <= troundoff) { + (void) arkGetDky(ark_mem, ark_mem->tstop, 0, yout); ark_mem->tretlast = *tret = ark_mem->tstop; ark_mem->tstopset = SUNFALSE; istate = ARK_TSTOP_RETURN; From ea04dd40fbe55058ca96181dbe03dc0b613d815f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 15:27:08 -0700 Subject: [PATCH 086/177] bump answers --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index c8c64912e3..55563fd75e 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit c8c64912e384ec47a0722be7a8d0dc5fca2c0cd9 +Subproject commit 55563fd75e0da4dd5c41f2a946bdc78373de817e From c9f6cae272c08ab25f8a4987686455d43393c580 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 19 Jun 2023 15:46:33 -0700 Subject: [PATCH 087/177] update answers --- examples/arkode/C_serial/CMakeLists.txt | 8 ++++---- test/answers | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 8dce5d09ba..085a2e3e29 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -44,10 +44,10 @@ set(ARKODE_examples "ark_kepler\;--stepper ERK --step-mode adapt\;develop" "ark_kepler\;--stepper ERK --step-mode fixed --count-orbits\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --count-orbits --use-compensated-sums\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_EULER_1_1 --tf 50 --check-order --nout 1\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_2_2 --tf 50 --check-order --nout 1\;develop" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_EULER_1_1 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_2_2 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_RUTH_3_3 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_3_3 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_4_4 --tf 50 --check-order --nout 1\;exclude-single" diff --git a/test/answers b/test/answers index 55563fd75e..0674d67895 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 55563fd75e0da4dd5c41f2a946bdc78373de817e +Subproject commit 0674d67895d8aa9eefd163d1c514986c32c771a6 From cb05f49a2d049d3d2951474debe6e63f2fafb501 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 20 Jun 2023 10:42:12 -0700 Subject: [PATCH 088/177] fix ark profiler reference and tidy --- .clang-tidy | 2 +- include/arkode/arkode_sprk.h | 13 +- src/arkode/arkode_erkstep.c | 672 ++++++++++++++++---------------- src/arkode/arkode_sprk.c | 53 +-- src/arkode/arkode_sprkstep.c | 140 ++++--- src/arkode/arkode_sprkstep_io.c | 81 ++-- 6 files changed, 494 insertions(+), 467 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index afa03026e7..d77a4d60b2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -13,7 +13,7 @@ # This should be applied to all new code. See the developer documentation. # ------------------------------------------------------------------------------ --- -Checks: '-*,clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,-cppcoreguidelines-explicit-virtual-functions,-cppcoreguidelines-pro-bounds-pointer-arithmetic,google-*,-google-explicit-constructor,modernize-*,-modernize-use-trailing-return-type,mpi-*' +Checks: '-*,clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,-cppcoreguidelines-explicit-virtual-functions,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-avoid-magic-numbers,google-*,-google-explicit-constructor,modernize-*,-modernize-use-trailing-return-type,mpi-*,readability-*,-readability-magic-numbers,-readability-identifier-length' WarningsAsErrors: '' HeaderFilterRegex: '' AnalyzeTemporaryDtors: false diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 5dcf3f1970..2ed4829a51 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -60,14 +60,15 @@ typedef _SUNDIALS_STRUCT_ ARKodeSPRKStorage_s* ARKodeSPRKStorage; SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages); SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id); SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage B); +SUNDIALS_EXPORT ARKodeSPRKStorage +ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage); SUNDIALS_EXPORT void ARKodeSPRKStorage_Space(ARKodeSPRKStorage B, - sunindextype* liw, - sunindextype* lrw); -SUNDIALS_EXPORT void ARKodeSPRKStorage_Free(ARKodeSPRKStorage B); + sunindextype* liw, + sunindextype* lrw); +SUNDIALS_EXPORT void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage); SUNDIALS_EXPORT int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, - ARKodeButcherTable* a_ptr, - ARKodeButcherTable* b_ptr); + ARKodeButcherTable* a_ptr, + ARKodeButcherTable* b_ptr); /* Different methods */ diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 0d9e699e0d..c76017fcb1 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -18,13 +18,12 @@ #include #include #include - -#include "arkode_impl.h" -#include "arkode_erkstep_impl.h" -#include "arkode_interp_impl.h" #include #include +#include "arkode_erkstep_impl.h" +#include "arkode_impl.h" +#include "arkode_interp_impl.h" /*=============================================================== ERKStep Exported functions -- Required @@ -38,48 +37,54 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) int retval; /* Check that f is supplied */ - if (f == NULL) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", - "ERKStepCreate", MSG_ARK_NULL_F); - return(NULL); + if (f == NULL) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepCreate", + MSG_ARK_NULL_F); + return (NULL); } /* Check for legal input parameters */ - if (y0 == NULL) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", - "ERKStepCreate", MSG_ARK_NULL_Y0); - return(NULL); + if (y0 == NULL) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepCreate", + MSG_ARK_NULL_Y0); + return (NULL); } - if (!sunctx) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", - "ERKStepCreate", MSG_ARK_NULL_SUNCTX); - return(NULL); + if (!sunctx) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepCreate", + MSG_ARK_NULL_SUNCTX); + return (NULL); } /* Test if all required vector operations are implemented */ nvectorOK = erkStep_CheckNVector(y0); - if (!nvectorOK) { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", - "ERKStepCreate", MSG_ARK_BAD_NVECTOR); - return(NULL); + if (!nvectorOK) + { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepCreate", + MSG_ARK_BAD_NVECTOR); + return (NULL); } /* Create ark_mem structure and set default values */ ark_mem = arkCreate(sunctx); - if (ark_mem==NULL) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", - "ERKStepCreate", MSG_ARK_NO_MEM); - return(NULL); + if (ark_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepCreate", + MSG_ARK_NO_MEM); + return (NULL); } /* Allocate ARKodeERKStepMem structure, and initialize to zero */ step_mem = NULL; - step_mem = (ARKodeERKStepMem) malloc(sizeof(struct ARKodeERKStepMemRec)); - if (step_mem == NULL) { - arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::ERKStep", - "ERKStepCreate", MSG_ARK_ARKMEM_FAIL); - return(NULL); + step_mem = (ARKodeERKStepMem)malloc(sizeof(struct ARKodeERKStepMemRec)); + if (step_mem == NULL) + { + arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::ERKStep", "ERKStepCreate", + MSG_ARK_ARKMEM_FAIL); + return (NULL); } memset(step_mem, 0, sizeof(struct ARKodeERKStepMemRec)); @@ -87,14 +92,15 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) ark_mem->step_init = erkStep_Init; ark_mem->step_fullrhs = erkStep_FullRHS; ark_mem->step = erkStep_TakeStep; - ark_mem->step_mem = (void*) step_mem; + ark_mem->step_mem = (void*)step_mem; /* Set default values for ERKStep optional inputs */ - retval = ERKStepSetDefaults((void *) ark_mem); - if (retval != ARK_SUCCESS) { + retval = ERKStepSetDefaults((void*)ark_mem); + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepCreate", "Error setting default solver options"); - return(NULL); + return (NULL); } /* Allocate the general ERK stepper vectors using y0 as a template */ @@ -105,7 +111,8 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) step_mem->f = f; /* Update the ARKODE workspace requirements -- UPDATE */ - ark_mem->liw += 41; /* fcn/data ptr, int, long int, sunindextype, booleantype */ + ark_mem->liw += 41; /* fcn/data ptr, int, long int, sunindextype, booleantype + */ ark_mem->lrw += 10; /* Initialize all the counters */ @@ -113,16 +120,16 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepCreate", "Unable to initialize main ARKODE infrastructure"); - return(NULL); + return (NULL); } - return((void *)ark_mem); + return ((void*)ark_mem); } - /*--------------------------------------------------------------- ERKStepResize: @@ -130,8 +137,8 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) It first resizes the main ARKODE infrastructure memory, and then resizes its own data. ---------------------------------------------------------------*/ -int ERKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, - realtype t0, ARKVecResizeFn resize, void *resize_data) +int ERKStepResize(void* arkode_mem, N_Vector y0, realtype hscale, realtype t0, + ARKVecResizeFn resize, void* resize_data) { ARKodeMem ark_mem; ARKodeERKStepMem step_mem; @@ -139,41 +146,42 @@ int ERKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, int i, retval; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReSize", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReSize", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* Determing change in vector sizes */ lrw1 = liw1 = 0; - if (y0->ops->nvspace != NULL) - N_VSpace(y0, &lrw1, &liw1); - lrw_diff = lrw1 - ark_mem->lrw1; - liw_diff = liw1 - ark_mem->liw1; + if (y0->ops->nvspace != NULL) N_VSpace(y0, &lrw1, &liw1); + lrw_diff = lrw1 - ark_mem->lrw1; + liw_diff = liw1 - ark_mem->liw1; ark_mem->lrw1 = lrw1; ark_mem->liw1 = liw1; /* resize ARKODE infrastructure memory */ retval = arkResize(ark_mem, y0, hscale, t0, resize, resize_data); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepResize", "Unable to resize main ARKODE infrastructure"); - return(retval); + return (retval); } /* Resize the RHS vectors */ - for (i=0; istages; i++) { - if (!arkResizeVec(ark_mem, resize, resize_data, lrw_diff, - liw_diff, y0, &step_mem->F[i])) { + for (i = 0; i < step_mem->stages; i++) + { + if (!arkResizeVec(ark_mem, resize, resize_data, lrw_diff, liw_diff, y0, + &step_mem->F[i])) + { arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::ERKStep", "ERKStepResize", "Unable to resize vector"); - return(ARK_MEM_FAIL); + return (ARK_MEM_FAIL); } } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- ERKStepReInit: @@ -192,29 +200,32 @@ int ERKStepReInit(void* arkode_mem, ARKRhsFn f, realtype t0, N_Vector y0) int retval; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReInit", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReInit", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* Check if ark_mem was allocated */ - if (ark_mem->MallocDone == SUNFALSE) { - arkProcessError(ark_mem, ARK_NO_MALLOC, "ARKODE::ERKStep", - "ERKStepReInit", MSG_ARK_NO_MALLOC); - return(ARK_NO_MALLOC); + if (ark_mem->MallocDone == SUNFALSE) + { + arkProcessError(ark_mem, ARK_NO_MALLOC, "ARKODE::ERKStep", "ERKStepReInit", + MSG_ARK_NO_MALLOC); + return (ARK_NO_MALLOC); } /* Check that f is supplied */ - if (f == NULL) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", - "ERKStepReInit", MSG_ARK_NULL_F); - return(ARK_ILL_INPUT); + if (f == NULL) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepReInit", + MSG_ARK_NULL_F); + return (ARK_ILL_INPUT); } /* Check for legal input parameters */ - if (y0 == NULL) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", - "ERKStepReInit", MSG_ARK_NULL_Y0); - return(ARK_ILL_INPUT); + if (y0 == NULL) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepReInit", + MSG_ARK_NULL_Y0); + return (ARK_ILL_INPUT); } /* Copy the input parameters into ARKODE state */ @@ -222,19 +233,19 @@ int ERKStepReInit(void* arkode_mem, ARKRhsFn f, realtype t0, N_Vector y0) /* Initialize main ARKODE infrastructure */ retval = arkInit(arkode_mem, t0, y0, FIRST_INIT); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepReInit", "Unable to initialize main ARKODE infrastructure"); - return(retval); + return (retval); } /* Initialize all the counters */ step_mem->nfe = 0; - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- ERKStepReset: @@ -249,127 +260,126 @@ int ERKStepReset(void* arkode_mem, realtype tR, N_Vector yR) int retval; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReset", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReset", &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, tR, yR, RESET_INIT); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepReset", "Unable to initialize main ARKODE infrastructure"); - return(retval); + return (retval); } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- ERKStepSStolerances, ERKStepSVtolerances, ERKStepWFtolerances: These routines set integration tolerances (wrappers for general ARKODE utility routines) ---------------------------------------------------------------*/ -int ERKStepSStolerances(void *arkode_mem, realtype reltol, realtype abstol) +int ERKStepSStolerances(void* arkode_mem, realtype reltol, realtype abstol) { /* unpack ark_mem, call arkSStolerances, and return */ ARKodeMem ark_mem; - if (arkode_mem==NULL) { + if (arkode_mem == NULL) + { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepSStolerances", MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); + return (ARK_MEM_NULL); } - ark_mem = (ARKodeMem) arkode_mem; - return(arkSStolerances(ark_mem, reltol, abstol)); + ark_mem = (ARKodeMem)arkode_mem; + return (arkSStolerances(ark_mem, reltol, abstol)); } - -int ERKStepSVtolerances(void *arkode_mem, realtype reltol, N_Vector abstol) +int ERKStepSVtolerances(void* arkode_mem, realtype reltol, N_Vector abstol) { /* unpack ark_mem, call arkSVtolerances, and return */ ARKodeMem ark_mem; - if (arkode_mem==NULL) { + if (arkode_mem == NULL) + { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepSVtolerances", MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); + return (ARK_MEM_NULL); } - ark_mem = (ARKodeMem) arkode_mem; - return(arkSVtolerances(ark_mem, reltol, abstol)); + ark_mem = (ARKodeMem)arkode_mem; + return (arkSVtolerances(ark_mem, reltol, abstol)); } - -int ERKStepWFtolerances(void *arkode_mem, ARKEwtFn efun) +int ERKStepWFtolerances(void* arkode_mem, ARKEwtFn efun) { /* unpack ark_mem, call arkWFtolerances, and return */ ARKodeMem ark_mem; - if (arkode_mem==NULL) { + if (arkode_mem == NULL) + { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepWFtolerances", MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); + return (ARK_MEM_NULL); } - ark_mem = (ARKodeMem) arkode_mem; - return(arkWFtolerances(ark_mem, efun)); + ark_mem = (ARKodeMem)arkode_mem; + return (arkWFtolerances(ark_mem, efun)); } - -int ERKStepRootInit(void *arkode_mem, int nrtfn, ARKRootFn g) +int ERKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g) { /* unpack ark_mem, call arkRootInit, and return */ ARKodeMem ark_mem; - if (arkode_mem==NULL) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", - "ERKStepRootInit", MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepRootInit", + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); } - ark_mem = (ARKodeMem) arkode_mem; - return(arkRootInit(ark_mem, nrtfn, g)); + ark_mem = (ARKodeMem)arkode_mem; + return (arkRootInit(ark_mem, nrtfn, g)); } - -int ERKStepEvolve(void *arkode_mem, realtype tout, N_Vector yout, - realtype *tret, int itask) +int ERKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, + realtype* tret, int itask) { /* unpack ark_mem, call arkEvolve, and return */ int retval; ARKodeMem ark_mem; - if (arkode_mem==NULL) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", - "ERKStepEvolve", MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepEvolve", + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); } - ark_mem = (ARKodeMem) arkode_mem; + ark_mem = (ARKodeMem)arkode_mem; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); retval = arkEvolve(ark_mem, tout, yout, tret, itask); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); - return(retval); + return (retval); } - -int ERKStepGetDky(void *arkode_mem, realtype t, int k, N_Vector dky) +int ERKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) { /* unpack ark_mem, call arkGetDky, and return */ int retval; ARKodeMem ark_mem; - if (arkode_mem==NULL) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", - "ERKStepGetDky", MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepGetDky", + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); } - ark_mem = (ARKodeMem) arkode_mem; + ark_mem = (ARKodeMem)arkode_mem; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); retval = arkGetDky(ark_mem, t, k, dky); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); - return(retval); + return (retval); } - /*--------------------------------------------------------------- ERKStepFree frees all ERKStep memory, and then calls an ARKODE utility routine to free the ARKODE infrastructure memory. ---------------------------------------------------------------*/ -void ERKStepFree(void **arkode_mem) +void ERKStepFree(void** arkode_mem) { int j; sunindextype Bliw, Blrw; @@ -377,16 +387,17 @@ void ERKStepFree(void **arkode_mem) ARKodeERKStepMem step_mem; /* nothing to do if arkode_mem is already NULL */ - if (*arkode_mem == NULL) return; + if (*arkode_mem == NULL) return; /* conditional frees on non-NULL ERKStep module */ - ark_mem = (ARKodeMem) (*arkode_mem); - if (ark_mem->step_mem != NULL) { - - step_mem = (ARKodeERKStepMem) ark_mem->step_mem; + ark_mem = (ARKodeMem)(*arkode_mem); + if (ark_mem->step_mem != NULL) + { + step_mem = (ARKodeERKStepMem)ark_mem->step_mem; /* free the Butcher table */ - if (step_mem->B != NULL) { + if (step_mem->B != NULL) + { ARKodeButcherTable_Space(step_mem->B, &Bliw, &Blrw); ARKodeButcherTable_Free(step_mem->B); step_mem->B = NULL; @@ -395,8 +406,9 @@ void ERKStepFree(void **arkode_mem) } /* free the RHS vectors */ - if (step_mem->F != NULL) { - for(j=0; jstages; j++) + if (step_mem->F != NULL) + { + for (j = 0; j < step_mem->stages; j++) arkFreeVec(ark_mem, &step_mem->F[j]); free(step_mem->F); step_mem->F = NULL; @@ -404,12 +416,14 @@ void ERKStepFree(void **arkode_mem) } /* free the reusable arrays for fused vector interface */ - if (step_mem->cvals != NULL) { + if (step_mem->cvals != NULL) + { free(step_mem->cvals); step_mem->cvals = NULL; ark_mem->lrw -= (step_mem->stages + 1); } - if (step_mem->Xvecs != NULL) { + if (step_mem->Xvecs != NULL) + { free(step_mem->Xvecs); step_mem->Xvecs = NULL; ark_mem->liw -= (step_mem->stages + 1); @@ -418,14 +432,12 @@ void ERKStepFree(void **arkode_mem) /* free the time stepper module itself */ free(ark_mem->step_mem); ark_mem->step_mem = NULL; - } /* free memory for overall ARKODE infrastructure */ arkFree(arkode_mem); } - /*--------------------------------------------------------------- ERKStepPrintMem: @@ -444,36 +456,35 @@ void ERKStepPrintMem(void* arkode_mem, FILE* outfile) #endif /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "ERKStepPrintMem", - &ark_mem, &step_mem); + retval = erkStep_AccessStepMem(arkode_mem, "ERKStepPrintMem", &ark_mem, + &step_mem); if (retval != ARK_SUCCESS) return; /* output data from main ARKODE infrastructure */ arkPrintMem(ark_mem, outfile); /* output integer quantities */ - fprintf(outfile,"ERKStep: q = %i\n", step_mem->q); - fprintf(outfile,"ERKStep: p = %i\n", step_mem->p); - fprintf(outfile,"ERKStep: stages = %i\n", step_mem->stages); + fprintf(outfile, "ERKStep: q = %i\n", step_mem->q); + fprintf(outfile, "ERKStep: p = %i\n", step_mem->p); + fprintf(outfile, "ERKStep: stages = %i\n", step_mem->stages); /* output long integer quantities */ - fprintf(outfile,"ERKStep: nfe = %li\n", step_mem->nfe); + fprintf(outfile, "ERKStep: nfe = %li\n", step_mem->nfe); /* output realtype quantities */ - fprintf(outfile,"ERKStep: Butcher table:\n"); + fprintf(outfile, "ERKStep: Butcher table:\n"); ARKodeButcherTable_Write(step_mem->B, outfile); #ifdef SUNDIALS_DEBUG_PRINTVEC /* output vector quantities */ - for (i=0; istages; i++) { - fprintf(outfile,"ERKStep: F[%i]:\n", i); + for (i = 0; i < step_mem->stages; i++) + { + fprintf(outfile, "ERKStep: F[%i]:\n", i); N_VPrintFile(step_mem->F[i], outfile); } #endif } - - /*=============================================================== ERKStep Private functions ===============================================================*/ @@ -504,17 +515,16 @@ int erkStep_Init(void* arkode_mem, int init_type) int retval, j; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "erkStep_Init", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = erkStep_AccessStepMem(arkode_mem, "erkStep_Init", &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* immediately return if resize or reset */ - if (init_type == RESIZE_INIT || init_type == RESET_INIT) - return(ARK_SUCCESS); + if (init_type == RESIZE_INIT || init_type == RESET_INIT) return (ARK_SUCCESS); /* enforce use of arkEwtSmallReal if using a fixed step size and an internal error weight function */ - if ( ark_mem->fixedstep && !ark_mem->user_efun ) { + if (ark_mem->fixedstep && !ark_mem->user_efun) + { ark_mem->user_efun = SUNFALSE; ark_mem->efun = arkEwtSetSmallReal; ark_mem->e_data = ark_mem; @@ -522,51 +532,58 @@ int erkStep_Init(void* arkode_mem, int init_type) /* Create Butcher table (if not already set) */ retval = erkStep_SetButcherTable(ark_mem); - if (retval != ARK_SUCCESS) { + if (retval != ARK_SUCCESS) + { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "erkStep_Init", "Could not create Butcher table"); - return(ARK_ILL_INPUT); + return (ARK_ILL_INPUT); } /* Check that Butcher table are OK */ retval = erkStep_CheckButcherTable(ark_mem); - if (retval != ARK_SUCCESS) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", - "erkStep_Init", "Error in Butcher table"); - return(ARK_ILL_INPUT); + if (retval != ARK_SUCCESS) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "erkStep_Init", + "Error in Butcher table"); + return (ARK_ILL_INPUT); } /* Retrieve/store method and embedding orders now that table is finalized */ step_mem->q = ark_mem->hadapt_mem->q = step_mem->B->q; step_mem->p = ark_mem->hadapt_mem->p = step_mem->B->p; - /* Ensure that if adaptivity is enabled, then method includes embedding coefficients */ - if (!ark_mem->fixedstep && (step_mem->p == 0)) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "erkStep_Init", - "Adaptive timestepping cannot be performed without embedding coefficients"); - return(ARK_ILL_INPUT); + /* Ensure that if adaptivity is enabled, then method includes embedding + * coefficients */ + if (!ark_mem->fixedstep && (step_mem->p == 0)) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", + "erkStep_Init", "Adaptive timestepping cannot be performed without embedding coefficients"); + return (ARK_ILL_INPUT); } /* Allocate ARK RHS vector memory, update storage requirements */ /* Allocate F[0] ... F[stages-1] if needed */ if (step_mem->F == NULL) - step_mem->F = (N_Vector *) calloc(step_mem->stages, sizeof(N_Vector)); - for (j=0; jstages; j++) { + step_mem->F = (N_Vector*)calloc(step_mem->stages, sizeof(N_Vector)); + for (j = 0; j < step_mem->stages; j++) + { if (!arkAllocVec(ark_mem, ark_mem->ewt, &(step_mem->F[j]))) - return(ARK_MEM_FAIL); + return (ARK_MEM_FAIL); } - ark_mem->liw += step_mem->stages; /* pointers */ + ark_mem->liw += step_mem->stages; /* pointers */ /* Allocate reusable arrays for fused vector interface */ - if (step_mem->cvals == NULL) { - step_mem->cvals = (realtype *) calloc(step_mem->stages+1, sizeof(realtype)); - if (step_mem->cvals == NULL) return(ARK_MEM_FAIL); + if (step_mem->cvals == NULL) + { + step_mem->cvals = (realtype*)calloc(step_mem->stages + 1, sizeof(realtype)); + if (step_mem->cvals == NULL) return (ARK_MEM_FAIL); ark_mem->lrw += (step_mem->stages + 1); } - if (step_mem->Xvecs == NULL) { - step_mem->Xvecs = (N_Vector *) calloc(step_mem->stages+1, sizeof(N_Vector)); - if (step_mem->Xvecs == NULL) return(ARK_MEM_FAIL); - ark_mem->liw += (step_mem->stages + 1); /* pointers */ + if (step_mem->Xvecs == NULL) + { + step_mem->Xvecs = (N_Vector*)calloc(step_mem->stages + 1, sizeof(N_Vector)); + if (step_mem->Xvecs == NULL) return (ARK_MEM_FAIL); + ark_mem->liw += (step_mem->stages + 1); /* pointers */ } /* Limit max interpolant degree (negative input only overwrites the current @@ -596,10 +613,9 @@ int erkStep_Init(void* arkode_mem, int init_type) /* Signal to shared arkode module that fullrhs is required after each step */ ark_mem->call_fullrhs = SUNTRUE; - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- erkStep_FullRHS: @@ -624,8 +640,7 @@ int erkStep_Init(void* arkode_mem, int init_type) steps, 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 mode) +int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode) { int retval; ARKodeMem ark_mem; @@ -633,13 +648,13 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, booleantype recomputeRHS; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "erkStep_FullRHS", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = erkStep_AccessStepMem(arkode_mem, "erkStep_FullRHS", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* perform RHS functions contingent on 'mode' argument */ - switch(mode) { - + switch (mode) + { /* ARK_FULLRHS_START: called at the beginning of a simulation Store the vectors f(t,y) in F[0] for possible reuse in the first stage of the subsequent time step */ @@ -648,10 +663,11 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call f */ retval = step_mem->f(t, y, step_mem->F[0], ark_mem->user_data); step_mem->nfe++; - if (retval != 0) { + if (retval != 0) + { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ERKStep", "erkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } /* copy RHS vector into output */ @@ -659,7 +675,6 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, break; - /* ARK_FULLRHS_END: called at the end of a successful step If the method coefficients support it, we just copy the last stage RHS vectors to fill f instead of calling f(t,y). @@ -672,20 +687,19 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, recomputeRHS = SUNTRUE; /* base RHS calls on recomputeRHS argument */ - if (recomputeRHS) { - + if (recomputeRHS) + { /* call f */ retval = step_mem->f(t, y, step_mem->F[0], ark_mem->user_data); step_mem->nfe++; - if (retval != 0) { + if (retval != 0) + { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ERKStep", "erkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } - - } else { - N_VScale(ONE, step_mem->F[step_mem->stages-1], step_mem->F[0]); } + else { N_VScale(ONE, step_mem->F[step_mem->stages - 1], step_mem->F[0]); } /* copy RHS vector into output */ N_VScale(ONE, step_mem->F[0], f); @@ -700,10 +714,11 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* call f */ retval = step_mem->f(t, y, f, ark_mem->user_data); step_mem->nfe++; - if (retval != 0) { + if (retval != 0) + { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ERKStep", "erkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } break; @@ -712,13 +727,12 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* return with RHS failure if unknown mode is passed */ arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ERKStep", "erkStep_FullRHS", "Unknown full RHS mode"); - return(ARK_RHSFUNC_FAIL); + return (ARK_RHSFUNC_FAIL); } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- erkStep_TakeStep: @@ -739,7 +753,7 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, reduce step and retry (if possible) <0 => step encountered unrecoverable failure ---------------------------------------------------------------*/ -int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) +int erkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) { int retval, is, js, nvec; realtype* cvals; @@ -751,54 +765,53 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) *nflagPtr = ARK_SUCCESS; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "erkStep_TakeStep", - &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return(retval); + retval = erkStep_AccessStepMem(arkode_mem, "erkStep_TakeStep", &ark_mem, + &step_mem); + if (retval != ARK_SUCCESS) return (retval); /* local shortcuts for fused vector operations */ cvals = step_mem->cvals; Xvecs = step_mem->Xvecs; #if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, - "ARKODE::erkStep_TakeStep", "start-stage", - "step = %li, stage = 0, h = %"RSYM", tcur = %"RSYM, + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::erkStep_TakeStep", + "start-stage", + "step = %li, stage = 0, h = %" RSYM ", tcur = %" RSYM, ark_mem->nst, ark_mem->h, ark_mem->tcur); #endif #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, - "ARKODE::erkStep_TakeStep", "stage", - "z[0] =", ""); + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", + "stage", "z[0] =", ""); N_VPrintFile(ark_mem->ycur, ARK_LOGGER->debug_fp); - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, - "ARKODE::erkStep_TakeStep", "stage RHS", - "F[0] =", ""); + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", + "stage RHS", "F[0] =", ""); N_VPrintFile(step_mem->F[0], ARK_LOGGER->debug_fp); #endif /* Loop over internal stages to the step; since the method is explicit the first stage RHS is just the full RHS from the start of the step */ - for (is=1; isstages; is++) { - + for (is = 1; is < step_mem->stages; is++) + { /* Set current stage time(s) */ - ark_mem->tcur = ark_mem->tn + step_mem->B->c[is]*ark_mem->h; + 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", + 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_INFO SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::erkStep_TakeStep", "start-stage", - "step = %li, stage = %i, h = %"RSYM", tcur = %"RSYM, + "step = %li, stage = %i, h = %" RSYM ", tcur = %" RSYM, ark_mem->nst, is, ark_mem->h, ark_mem->tcur); #endif /* Set ycur to current stage solution */ nvec = 0; - for (js=0; jsh * step_mem->B->A[is][js]; Xvecs[nvec] = step_mem->F[js]; nvec += 1; @@ -809,27 +822,26 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* call fused vector operation to do the work */ retval = N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->ycur); - if (retval != 0) return(ARK_VECTOROP_ERR); + if (retval != 0) return (ARK_VECTOROP_ERR); /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur, - ark_mem->ycur, + if (ark_mem->ProcessStage != NULL) + { + retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) return(ARK_POSTPROCESS_STAGE_FAIL); + if (retval != 0) return (ARK_POSTPROCESS_STAGE_FAIL); } /* compute updated RHS */ - retval = step_mem->f(ark_mem->tcur, ark_mem->ycur, - step_mem->F[is], ark_mem->user_data); + retval = step_mem->f(ark_mem->tcur, ark_mem->ycur, step_mem->F[is], + ark_mem->user_data); step_mem->nfe++; - if (retval < 0) return(ARK_RHSFUNC_FAIL); - if (retval > 0) return(ARK_UNREC_RHSFUNC_ERR); + if (retval < 0) return (ARK_RHSFUNC_FAIL); + if (retval > 0) return (ARK_UNREC_RHSFUNC_ERR); #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, - "ARKODE::erkStep_TakeStep", "stage RHS", - "F[%i] =", is); + "ARKODE::erkStep_TakeStep", "stage RHS", "F[%i] =", is); N_VPrintFile(step_mem->F[is], ARK_LOGGER->debug_fp); #endif @@ -837,31 +849,28 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* compute time-evolved solution (in ark_ycur), error estimate (in dsm) */ retval = erkStep_ComputeSolutions(ark_mem, dsmPtr); - if (retval < 0) return(retval); + if (retval < 0) return (retval); #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, - "ARKODE::erkStep_TakeStep", "updated solution", - "ycur =", ""); + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", + "updated solution", "ycur =", ""); 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", + fprintf(ark_mem->diagfp, "ERKStep 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::erkStep_TakeStep", "error-test", - "step = %li, h = %"RSYM", dsm = %"RSYM, + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::erkStep_TakeStep", + "error-test", "step = %li, h = %" RSYM ", dsm = %" RSYM, ark_mem->nst, ark_mem->h, *dsmPtr); #endif - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- Internal utility routines ---------------------------------------------------------------*/ @@ -872,27 +881,26 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) Shortcut routine to unpack ark_mem and step_mem structures from void* pointer. If either is missing it returns ARK_MEM_NULL. ---------------------------------------------------------------*/ -int erkStep_AccessStepMem(void* arkode_mem, const char *fname, - ARKodeMem *ark_mem, ARKodeERKStepMem *step_mem) +int erkStep_AccessStepMem(void* arkode_mem, const char* fname, + ARKodeMem* ark_mem, ARKodeERKStepMem* step_mem) { - /* access ARKodeMem structure */ - if (arkode_mem==NULL) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", - fname, MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", fname, MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); } - *ark_mem = (ARKodeMem) arkode_mem; - if ((*ark_mem)->step_mem==NULL) { - arkProcessError(*ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", - fname, MSG_ERKSTEP_NO_MEM); - return(ARK_MEM_NULL); + *ark_mem = (ARKodeMem)arkode_mem; + if ((*ark_mem)->step_mem == NULL) + { + arkProcessError(*ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", fname, + MSG_ERKSTEP_NO_MEM); + return (ARK_MEM_NULL); } - *step_mem = (ARKodeERKStepMem) (*ark_mem)->step_mem; - return(ARK_SUCCESS); + *step_mem = (ARKodeERKStepMem)(*ark_mem)->step_mem; + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- erkStep_CheckNVector: @@ -901,17 +909,13 @@ int erkStep_AccessStepMem(void* arkode_mem, const char *fname, ---------------------------------------------------------------*/ booleantype erkStep_CheckNVector(N_Vector tmpl) { - if ( (tmpl->ops->nvclone == NULL) || - (tmpl->ops->nvdestroy == NULL) || - (tmpl->ops->nvlinearsum == NULL) || - (tmpl->ops->nvconst == NULL) || - (tmpl->ops->nvscale == NULL) || - (tmpl->ops->nvwrmsnorm == NULL) ) - return(SUNFALSE); - return(SUNTRUE); + if ((tmpl->ops->nvclone == NULL) || (tmpl->ops->nvdestroy == NULL) || + (tmpl->ops->nvlinearsum == NULL) || (tmpl->ops->nvconst == NULL) || + (tmpl->ops->nvscale == NULL) || (tmpl->ops->nvwrmsnorm == NULL)) + return (SUNFALSE); + return (SUNTRUE); } - /*--------------------------------------------------------------- erkStep_SetButcherTable @@ -925,42 +929,31 @@ int erkStep_SetButcherTable(ARKodeMem ark_mem) sunindextype Bliw, Blrw; /* access ARKodeERKStepMem structure */ - if (ark_mem->step_mem==NULL) { + if (ark_mem->step_mem == NULL) + { arkProcessError(ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", "erkStep_SetButcherTable", MSG_ERKSTEP_NO_MEM); - return(ARK_MEM_NULL); + return (ARK_MEM_NULL); } - step_mem = (ARKodeERKStepMem) ark_mem->step_mem; + step_mem = (ARKodeERKStepMem)ark_mem->step_mem; /* if table has already been specified, just return */ - if (step_mem->B != NULL) - return(ARK_SUCCESS); + if (step_mem->B != NULL) return (ARK_SUCCESS); /* initialize table number to illegal values */ etable = -1; /* select method based on order */ - switch (step_mem->q) { - case(2): - etable = ERKSTEP_DEFAULT_2; - break; - case(3): - etable = ERKSTEP_DEFAULT_3; - break; - case(4): - etable = ERKSTEP_DEFAULT_4; - break; - case(5): - etable = ERKSTEP_DEFAULT_5; - break; - case(6): - etable = ERKSTEP_DEFAULT_6; - break; - case(7): - case(8): - etable = ERKSTEP_DEFAULT_8; - break; - default: /* no available method, set default */ + switch (step_mem->q) + { + case (2): etable = ERKSTEP_DEFAULT_2; break; + case (3): etable = ERKSTEP_DEFAULT_3; break; + case (4): etable = ERKSTEP_DEFAULT_4; break; + case (5): etable = ERKSTEP_DEFAULT_5; break; + case (6): etable = ERKSTEP_DEFAULT_6; break; + case (7): + case (8): etable = ERKSTEP_DEFAULT_8; break; + default: /* no available method, set default */ arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "erkStep_SetButcherTable", "No explicit method at requested order, using q=6."); @@ -968,8 +961,7 @@ int erkStep_SetButcherTable(ARKodeMem ark_mem) break; } - if (etable > -1) - step_mem->B = ARKodeButcherTable_LoadERK(etable); + if (etable > -1) step_mem->B = ARKodeButcherTable_LoadERK(etable); /* note Butcher table space requirements */ ARKodeButcherTable_Space(step_mem->B, &Bliw, &Blrw); @@ -977,16 +969,16 @@ int erkStep_SetButcherTable(ARKodeMem ark_mem) ark_mem->lrw += Blrw; /* set [redundant] stored values for stage numbers and method orders */ - if (step_mem->B != NULL) { + if (step_mem->B != NULL) + { step_mem->stages = step_mem->B->stages; - step_mem->q = step_mem->B->q; - step_mem->p = step_mem->B->p; + step_mem->q = step_mem->B->q; + step_mem->p = step_mem->B->p; } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- erkStep_CheckButcherTable @@ -1007,64 +999,64 @@ int erkStep_CheckButcherTable(ARKodeMem ark_mem) realtype tol = RCONST(1.0e-12); /* access ARKodeERKStepMem structure */ - if (ark_mem->step_mem==NULL) { + if (ark_mem->step_mem == NULL) + { arkProcessError(ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", "erkStep_CheckButcherTable", MSG_ERKSTEP_NO_MEM); - return(ARK_MEM_NULL); + return (ARK_MEM_NULL); } - step_mem = (ARKodeERKStepMem) ark_mem->step_mem; + step_mem = (ARKodeERKStepMem)ark_mem->step_mem; /* check that stages > 0 */ - if (step_mem->stages < 1) { + if (step_mem->stages < 1) + { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", - "stages < 1!"); - return(ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", "stages < 1!"); + return (ARK_INVALID_TABLE); } /* check that method order q > 0 */ - if (step_mem->q < 1) { + if (step_mem->q < 1) + { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", - "method order < 1!"); - return(ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", "method order < 1!"); + return (ARK_INVALID_TABLE); } /* check that embedding order p > 0 */ - if ((step_mem->p < 1) && (!ark_mem->fixedstep)) { + if ((step_mem->p < 1) && (!ark_mem->fixedstep)) + { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", - "embedding order < 1!"); - return(ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", "embedding order < 1!"); + return (ARK_INVALID_TABLE); } /* check that embedding exists */ - if ((step_mem->p > 0) && (!ark_mem->fixedstep)) { - if (step_mem->B->d == NULL) { + if ((step_mem->p > 0) && (!ark_mem->fixedstep)) + { + if (step_mem->B->d == NULL) + { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", - "no embedding!"); - return(ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", "no embedding!"); + return (ARK_INVALID_TABLE); } } /* check that ERK table is strictly lower triangular */ okay = SUNTRUE; - for (i=0; istages; i++) - for (j=i; jstages; j++) - if (SUNRabs(step_mem->B->A[i][j]) > tol) - okay = SUNFALSE; - if (!okay) { + for (i = 0; i < step_mem->stages; i++) + for (j = i; j < step_mem->stages; j++) + if (SUNRabs(step_mem->B->A[i][j]) > tol) okay = SUNFALSE; + if (!okay) + { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", - "Ae Butcher table is implicit!"); - return(ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", "Ae Butcher table is implicit!"); + return (ARK_INVALID_TABLE); } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } - /*--------------------------------------------------------------- erkStep_ComputeSolutions @@ -1079,7 +1071,7 @@ int erkStep_CheckButcherTable(ARKodeMem ark_mem) Note: at this point in the step, the vector ark_tempv1 may be used as a temporary vector. ---------------------------------------------------------------*/ -int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype *dsmPtr) +int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype* dsmPtr) { /* local data */ int retval, j, nvec; @@ -1089,12 +1081,13 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype *dsmPtr) ARKodeERKStepMem step_mem; /* access ARKodeERKStepMem structure */ - if (ark_mem->step_mem==NULL) { + if (ark_mem->step_mem == NULL) + { arkProcessError(ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", "erkStep_ComputeSolutions", MSG_ERKSTEP_NO_MEM); - return(ARK_MEM_NULL); + return (ARK_MEM_NULL); } - step_mem = (ARKodeERKStepMem) ark_mem->step_mem; + step_mem = (ARKodeERKStepMem)ark_mem->step_mem; /* set N_Vector shortcuts */ y = ark_mem->ycur; @@ -1107,11 +1100,11 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype *dsmPtr) /* initialize output */ *dsmPtr = ZERO; - /* Compute time step solution */ /* set arrays for fused vector operation */ nvec = 0; - for (j=0; jstages; j++) { + for (j = 0; j < step_mem->stages; j++) + { cvals[nvec] = ark_mem->h * step_mem->B->b[j]; Xvecs[nvec] = step_mem->F[j]; nvec += 1; @@ -1122,14 +1115,15 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype *dsmPtr) /* call fused vector operation to do the work */ retval = N_VLinearCombination(nvec, cvals, Xvecs, y); - if (retval != 0) return(ARK_VECTOROP_ERR); + if (retval != 0) return (ARK_VECTOROP_ERR); /* Compute yerr (if step adaptivity enabled) */ - if (!ark_mem->fixedstep) { - + if (!ark_mem->fixedstep) + { /* set arrays for fused vector operation */ nvec = 0; - for (j=0; jstages; j++) { + for (j = 0; j < step_mem->stages; j++) + { cvals[nvec] = ark_mem->h * (step_mem->B->b[j] - step_mem->B->d[j]); Xvecs[nvec] = step_mem->F[j]; nvec += 1; @@ -1137,13 +1131,13 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype *dsmPtr) /* call fused vector operation to do the work */ retval = N_VLinearCombination(nvec, cvals, Xvecs, yerr); - if (retval != 0) return(ARK_VECTOROP_ERR); + if (retval != 0) return (ARK_VECTOROP_ERR); /* fill error norm */ *dsmPtr = N_VWrmsNorm(yerr, ark_mem->ewt); } - return(ARK_SUCCESS); + return (ARK_SUCCESS); } /*=============================================================== diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index b8e9ffa16d..b79303d3e7 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -389,7 +389,7 @@ ARKodeSPRKStorage ARKodeSymplecticSofroniou10() ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) { - ARKodeSPRKStorage sprk_storage; + ARKodeSPRKStorage sprk_storage = NULL; sprk_storage = (ARKodeSPRKStorage)malloc(sizeof(struct ARKodeSPRKStorage_s)); @@ -429,77 +429,76 @@ ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) { return ARKodeSymplecticEuler(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_LEAPFROG_2_2")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_LEAPFROG_2_2")) { return ARKodeSymplecticLeapfrog2(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2")) { return ARKodeSymplecticPseudoLeapfrog2(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_RUTH_3_3")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_RUTH_3_3")) { return ARKodeSymplecticRuth3(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_2_2")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_2_2")) { return ARKodeSymplecticMcLachlan2(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_3_3")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_3_3")) { return ARKodeSymplecticMcLachlan3(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_4_4")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_4_4")) { return ARKodeSymplecticMcLachlan4(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4")) { return ARKodeSymplecticCandyRozmus4(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_5_6")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_5_6")) { return ARKodeSymplecticMcLachlan5(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_YOSHIDA_6_8")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_YOSHIDA_6_8")) { return ARKodeSymplecticYoshida6(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_8_16")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_8_16")) { return ARKodeSymplecticMcLachlan8(); } - else if (!strcmp(method, "ARKODE_SYMPLECTIC_SOFRONIOU_10_36")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_SOFRONIOU_10_36")) { return ARKodeSymplecticSofroniou10(); } - else { return NULL; } + return NULL; } -ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_mem) +ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage) { - int i; - ARKodeSPRKStorage sprk_storage; + int i = 0; + ARKodeSPRKStorage sprk_storage = NULL; - sprk_storage = ARKodeSPRKStorage_Alloc(that_sprk_mem->stages); + sprk_storage = ARKodeSPRKStorage_Alloc(that_sprk_storage->stages); - sprk_storage->q = that_sprk_mem->q; + sprk_storage->q = that_sprk_storage->q; for (i = 0; i < sprk_storage->stages; ++i) { - sprk_storage->b[i] = that_sprk_mem->b[i]; - sprk_storage->a[i] = that_sprk_mem->a[i]; + sprk_storage->b[i] = that_sprk_storage->b[i]; + sprk_storage->a[i] = that_sprk_storage->a[i]; } return sprk_storage; } void ARKodeSPRKStorage_space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, - sunindextype* lrw) + sunindextype* lrw) { *liw = 2; *lrw = sprk_storage->stages * 2; - return; } void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage) @@ -510,14 +509,16 @@ void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage) free(sprk_storage->a); free(sprk_storage); } - return; } int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, - ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) + ARKodeButcherTable* a_ptr, + ARKodeButcherTable* b_ptr) { - int i, j; - ARKodeButcherTable a, b; + int i = 0; + int j = 0; + ARKodeButcherTable a = NULL; + ARKodeButcherTable b = NULL; a = ARKodeButcherTable_Alloc(sprk_storage->stages, SUNFALSE); b = ARKodeButcherTable_Alloc(sprk_storage->stages, SUNFALSE); diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 29267df6ab..37919fe262 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -37,10 +37,10 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNContext sunctx) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - booleantype nvectorOK; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + booleantype nvectorOK = 0; + int retval = 0; /* Check that f1 and f2 are supplied */ if (f1 == NULL) @@ -168,22 +168,26 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, It first resizes the main ARKODE infrastructure memory, and then resizes its own data. ---------------------------------------------------------------*/ -int SPRKStepResize(void* arkode_mem, N_Vector y0, realtype hscale, realtype t0, - ARKVecResizeFn resize, void* resize_data) +int SPRKStepResize(void* arkode_mem, N_Vector ynew, realtype hscale, + realtype t0, ARKVecResizeFn resize, void* resize_data) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - SUNNonlinearSolver NLS; - sunindextype lrw1, liw1, lrw_diff, liw_diff; - int i, retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + SUNNonlinearSolver NLS = NULL; + sunindextype lrw1 = 0; + sunindextype liw1 = 0; + sunindextype lrw_diff = 0; + sunindextype liw_diff = 0; + int i = 0; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepResize", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* resize ARKODE infrastructure memory */ - retval = arkResize(ark_mem, y0, hscale, t0, resize, resize_data); + retval = arkResize(ark_mem, ynew, hscale, t0, resize, resize_data); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepResize", @@ -208,14 +212,14 @@ int SPRKStepResize(void* arkode_mem, N_Vector y0, realtype hscale, realtype t0, int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepReInit", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* Check if ark_mem was allocated */ if (ark_mem->MallocDone == SUNFALSE) @@ -271,14 +275,14 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, ---------------------------------------------------------------*/ int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepReset", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, tR, yR, RESET_INIT); @@ -302,7 +306,16 @@ int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, realtype* tret, int itask) { - int retval; + /* unpack ark_mem, call arkGetDky, and return */ + int retval = 0; + ARKodeMem ark_mem = NULL; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKKStepGetDky", + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); retval = arkEvolve((ARKodeMem)arkode_mem, tout, yout, tret, itask); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); @@ -318,7 +331,16 @@ int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, ---------------------------------------------------------------*/ int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) { - int retval; + /* unpack ark_mem, call arkGetDky, and return */ + int retval = 0; + ARKodeMem ark_mem = NULL; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKKStepGetDky", + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); retval = arkGetDky((ARKodeMem)arkode_mem, t, k, dky); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); @@ -331,13 +353,14 @@ int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) ---------------------------------------------------------------*/ void SPRKStepFree(void** arkode_mem) { - int j; - sunindextype Bliw, Blrw; - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; + int j = 0; + sunindextype Bliw = 0; + sunindextype Blrw = 0; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; /* nothing to do if arkode_mem is already NULL */ - if (*arkode_mem == NULL) return; + if (*arkode_mem == NULL) { return; } /* conditional frees on non-NULL SPRKStep module */ ark_mem = (ARKodeMem)(*arkode_mem); @@ -387,15 +410,16 @@ void SPRKStepFree(void** arkode_mem) ---------------------------------------------------------------*/ int sprkStep_Init(void* arkode_mem, int init_type) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int j, retval; - booleantype reset_efun; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int j = 0; + int retval = 0; + booleantype reset_efun = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_Init", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* immediately return if reset */ if (init_type == RESET_INIT) { return (ARK_SUCCESS); } @@ -450,7 +474,7 @@ int sprkStep_Init(void* arkode_mem, int init_type) int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g) { /* unpack ark_mem, call arkRootInit, and return */ - ARKodeMem ark_mem; + ARKodeMem ark_mem = NULL; if (arkode_mem == NULL) { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKStepRootInit", @@ -506,15 +530,14 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mode) { - int retval; - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - booleantype recomputeRHS; + int retval = 0; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStep_FullRHS", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* perform RHS functions contingent on 'mode' argument */ switch (mode) @@ -557,15 +580,17 @@ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, belongs to SPRKStep, the rest are reused from ARKODE. */ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - N_Vector prev_stage, curr_stage; - int retval, is; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + N_Vector prev_stage = NULL; + N_Vector curr_stage = NULL; + int retval = 0; + int is = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } prev_stage = ark_mem->yn; curr_stage = ark_mem->ycur; @@ -582,7 +607,7 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) set other outputs to zero */ retval = sprkStep_f1(step_mem, ark_mem->tcur, prev_stage, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return ARK_RHSFUNC_FAIL; + if (retval != 0) { return ARK_RHSFUNC_FAIL; } /* Position update */ N_VLinearSum(ONE, prev_stage, ark_mem->h * bi, step_mem->sdata, curr_stage); @@ -592,7 +617,7 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) set other outputs to zero */ retval = sprkStep_f2(step_mem, ark_mem->tcur, curr_stage, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return ARK_RHSFUNC_FAIL; + if (retval != 0) { return ARK_RHSFUNC_FAIL; } /* Velocity update */ N_VLinearSum(ONE, curr_stage, ark_mem->h * ai, step_mem->sdata, curr_stage); @@ -602,7 +627,7 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) { retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) return (ARK_POSTPROCESS_STAGE_FAIL); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* keep track of the stage number */ @@ -623,16 +648,19 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - ARKodeSPRKStorage method; - int retval, is; - N_Vector delta_Yi, yn_plus_delta_Yi, diff; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + ARKodeSPRKStorage method = NULL; + int retval = 0; + int is = 0; + N_Vector delta_Yi = NULL; + N_Vector yn_plus_delta_Yi = NULL; + N_Vector diff = NULL; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } method = step_mem->method; @@ -663,7 +691,7 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, set other outputs to zero */ retval = sprkStep_f1(step_mem, ark_mem->tcur, yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return (ARK_RHSFUNC_FAIL); + if (retval != 0) { return (ARK_RHSFUNC_FAIL); } /* Incremental position update: [ ] = [ ] + [ ] @@ -680,7 +708,7 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, set other outputs to zero */ retval = sprkStep_f2(step_mem, ark_mem->tn + method->a[is] * ark_mem->h, yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); - if (retval != 0) return (ARK_RHSFUNC_FAIL); + if (retval != 0) { return (ARK_RHSFUNC_FAIL); } /* Incremental velocity update: [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] @@ -757,6 +785,8 @@ booleantype sprkStep_CheckNVector(N_Vector tmpl) if ((tmpl->ops->nvclone == NULL) || (tmpl->ops->nvdestroy == NULL) || (tmpl->ops->nvlinearsum == NULL) || (tmpl->ops->nvconst == NULL) || (tmpl->ops->nvscale == NULL) || (tmpl->ops->nvwrmsnorm == NULL)) + { return (SUNFALSE); + } return (SUNTRUE); } diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 970cd5a36d..1393723806 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -38,7 +38,7 @@ int SPRKStepSetDenseOrder(void* arkode_mem, int dord) int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree) { - if (degree < 0) degree = ARK_INTERP_MAX_DEGREE; + if (degree < 0) { degree = ARK_INTERP_MAX_DEGREE; } return (arkSetInterpolantDegree(arkode_mem, degree)); } @@ -189,18 +189,18 @@ char* SPRKStepGetReturnFlagName(long int flag) ---------------------------------------------------------------*/ int SPRKStepSetUserData(void* arkode_mem, void* user_data) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUserData", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* set user_data in ARKODE mem */ retval = arkSetUserData(arkode_mem, user_data); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } return (ARK_SUCCESS); } @@ -216,14 +216,14 @@ int SPRKStepSetUserData(void* arkode_mem, void* user_data) ---------------------------------------------------------------*/ int SPRKStepSetDefaults(void* arkode_mem) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetDefaults", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* Set default ARKODE infrastructure parameters */ retval = arkSetDefaults(ark_mem); @@ -247,9 +247,9 @@ int SPRKStepSetDefaults(void* arkode_mem) ---------------------------------------------------------------*/ int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUseCompensatedSums", @@ -280,9 +280,9 @@ int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) ---------------------------------------------------------------*/ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetMethod", &ark_mem, @@ -307,9 +307,9 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) ---------------------------------------------------------------*/ int SPRKStepSetMethodName(void* arkode_mem, const char* method) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetMethodName", &ark_mem, @@ -337,14 +337,14 @@ int SPRKStepSetMethodName(void* arkode_mem, const char* method) ---------------------------------------------------------------*/ int SPRKStepSetOrder(void* arkode_mem, int ord) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetOrder", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* set user-provided value, or default, depending on argument */ if (ord <= 0) { step_mem->q = 4; } @@ -370,14 +370,14 @@ int SPRKStepSetOrder(void* arkode_mem, int ord) ---------------------------------------------------------------*/ int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepGetNumRhsEvals", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } *nf1 = step_mem->nf1; *nf2 = step_mem->nf2; @@ -392,14 +392,14 @@ int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) ---------------------------------------------------------------*/ int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKStorage* sprk_storage) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepGetNumRhsEvals", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } *sprk_storage = step_mem->method; @@ -413,18 +413,18 @@ int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKStorage* sprk_storage) ---------------------------------------------------------------*/ int SPRKStepPrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepPrintAllStats", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* step and rootfinding stats */ retval = arkPrintAllStats(arkode_mem, outfile, fmt); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } switch (fmt) { @@ -458,14 +458,15 @@ int SPRKStepPrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt) ---------------------------------------------------------------*/ int SPRKStepWriteParameters(void* arkode_mem, FILE* fp) { - ARKodeMem ark_mem; - ARKodeSPRKStepMem step_mem; - int flag, retval; + ARKodeMem ark_mem = NULL; + ARKodeSPRKStepMem step_mem = NULL; + int flag = 0; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepWriteParameters", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + if (retval != ARK_SUCCESS) { return (retval); } /* output ARKODE infrastructure parameters first */ flag = arkWriteParameters(ark_mem, fp); From afa2d28baccb35579e8272453cd5c1cc9af289b3 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 20 Jun 2023 10:43:22 -0700 Subject: [PATCH 089/177] revert accidental change --- src/arkode/arkode_erkstep.c | 672 ++++++++++++++++++------------------ 1 file changed, 339 insertions(+), 333 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index c76017fcb1..0d9e699e0d 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -18,12 +18,13 @@ #include #include #include -#include -#include -#include "arkode_erkstep_impl.h" #include "arkode_impl.h" +#include "arkode_erkstep_impl.h" #include "arkode_interp_impl.h" +#include +#include + /*=============================================================== ERKStep Exported functions -- Required @@ -37,54 +38,48 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) int retval; /* Check that f is supplied */ - if (f == NULL) - { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepCreate", - MSG_ARK_NULL_F); - return (NULL); + if (f == NULL) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", + "ERKStepCreate", MSG_ARK_NULL_F); + return(NULL); } /* Check for legal input parameters */ - if (y0 == NULL) - { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepCreate", - MSG_ARK_NULL_Y0); - return (NULL); + if (y0 == NULL) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", + "ERKStepCreate", MSG_ARK_NULL_Y0); + return(NULL); } - if (!sunctx) - { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepCreate", - MSG_ARK_NULL_SUNCTX); - return (NULL); + if (!sunctx) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", + "ERKStepCreate", MSG_ARK_NULL_SUNCTX); + return(NULL); } /* Test if all required vector operations are implemented */ nvectorOK = erkStep_CheckNVector(y0); - if (!nvectorOK) - { - arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepCreate", - MSG_ARK_BAD_NVECTOR); - return (NULL); + if (!nvectorOK) { + arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::ERKStep", + "ERKStepCreate", MSG_ARK_BAD_NVECTOR); + return(NULL); } /* Create ark_mem structure and set default values */ ark_mem = arkCreate(sunctx); - if (ark_mem == NULL) - { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepCreate", - MSG_ARK_NO_MEM); - return (NULL); + if (ark_mem==NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", + "ERKStepCreate", MSG_ARK_NO_MEM); + return(NULL); } /* Allocate ARKodeERKStepMem structure, and initialize to zero */ step_mem = NULL; - step_mem = (ARKodeERKStepMem)malloc(sizeof(struct ARKodeERKStepMemRec)); - if (step_mem == NULL) - { - arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::ERKStep", "ERKStepCreate", - MSG_ARK_ARKMEM_FAIL); - return (NULL); + step_mem = (ARKodeERKStepMem) malloc(sizeof(struct ARKodeERKStepMemRec)); + if (step_mem == NULL) { + arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::ERKStep", + "ERKStepCreate", MSG_ARK_ARKMEM_FAIL); + return(NULL); } memset(step_mem, 0, sizeof(struct ARKodeERKStepMemRec)); @@ -92,15 +87,14 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) ark_mem->step_init = erkStep_Init; ark_mem->step_fullrhs = erkStep_FullRHS; ark_mem->step = erkStep_TakeStep; - ark_mem->step_mem = (void*)step_mem; + ark_mem->step_mem = (void*) step_mem; /* Set default values for ERKStep optional inputs */ - retval = ERKStepSetDefaults((void*)ark_mem); - if (retval != ARK_SUCCESS) - { + retval = ERKStepSetDefaults((void *) ark_mem); + if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepCreate", "Error setting default solver options"); - return (NULL); + return(NULL); } /* Allocate the general ERK stepper vectors using y0 as a template */ @@ -111,8 +105,7 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) step_mem->f = f; /* Update the ARKODE workspace requirements -- UPDATE */ - ark_mem->liw += 41; /* fcn/data ptr, int, long int, sunindextype, booleantype - */ + ark_mem->liw += 41; /* fcn/data ptr, int, long int, sunindextype, booleantype */ ark_mem->lrw += 10; /* Initialize all the counters */ @@ -120,16 +113,16 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT); - if (retval != ARK_SUCCESS) - { + if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepCreate", "Unable to initialize main ARKODE infrastructure"); - return (NULL); + return(NULL); } - return ((void*)ark_mem); + return((void *)ark_mem); } + /*--------------------------------------------------------------- ERKStepResize: @@ -137,8 +130,8 @@ void* ERKStepCreate(ARKRhsFn f, realtype t0, N_Vector y0, SUNContext sunctx) It first resizes the main ARKODE infrastructure memory, and then resizes its own data. ---------------------------------------------------------------*/ -int ERKStepResize(void* arkode_mem, N_Vector y0, realtype hscale, realtype t0, - ARKVecResizeFn resize, void* resize_data) +int ERKStepResize(void *arkode_mem, N_Vector y0, realtype hscale, + realtype t0, ARKVecResizeFn resize, void *resize_data) { ARKodeMem ark_mem; ARKodeERKStepMem step_mem; @@ -146,42 +139,41 @@ int ERKStepResize(void* arkode_mem, N_Vector y0, realtype hscale, realtype t0, int i, retval; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReSize", &ark_mem, - &step_mem); - if (retval != ARK_SUCCESS) return (retval); + retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReSize", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); /* Determing change in vector sizes */ lrw1 = liw1 = 0; - if (y0->ops->nvspace != NULL) N_VSpace(y0, &lrw1, &liw1); - lrw_diff = lrw1 - ark_mem->lrw1; - liw_diff = liw1 - ark_mem->liw1; + if (y0->ops->nvspace != NULL) + N_VSpace(y0, &lrw1, &liw1); + lrw_diff = lrw1 - ark_mem->lrw1; + liw_diff = liw1 - ark_mem->liw1; ark_mem->lrw1 = lrw1; ark_mem->liw1 = liw1; /* resize ARKODE infrastructure memory */ retval = arkResize(ark_mem, y0, hscale, t0, resize, resize_data); - if (retval != ARK_SUCCESS) - { + if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepResize", "Unable to resize main ARKODE infrastructure"); - return (retval); + return(retval); } /* Resize the RHS vectors */ - for (i = 0; i < step_mem->stages; i++) - { - if (!arkResizeVec(ark_mem, resize, resize_data, lrw_diff, liw_diff, y0, - &step_mem->F[i])) - { + for (i=0; istages; i++) { + if (!arkResizeVec(ark_mem, resize, resize_data, lrw_diff, + liw_diff, y0, &step_mem->F[i])) { arkProcessError(ark_mem, ARK_MEM_FAIL, "ARKODE::ERKStep", "ERKStepResize", "Unable to resize vector"); - return (ARK_MEM_FAIL); + return(ARK_MEM_FAIL); } } - return (ARK_SUCCESS); + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- ERKStepReInit: @@ -200,32 +192,29 @@ int ERKStepReInit(void* arkode_mem, ARKRhsFn f, realtype t0, N_Vector y0) int retval; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReInit", &ark_mem, - &step_mem); - if (retval != ARK_SUCCESS) return (retval); + retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReInit", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); /* Check if ark_mem was allocated */ - if (ark_mem->MallocDone == SUNFALSE) - { - arkProcessError(ark_mem, ARK_NO_MALLOC, "ARKODE::ERKStep", "ERKStepReInit", - MSG_ARK_NO_MALLOC); - return (ARK_NO_MALLOC); + if (ark_mem->MallocDone == SUNFALSE) { + arkProcessError(ark_mem, ARK_NO_MALLOC, "ARKODE::ERKStep", + "ERKStepReInit", MSG_ARK_NO_MALLOC); + return(ARK_NO_MALLOC); } /* Check that f is supplied */ - if (f == NULL) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepReInit", - MSG_ARK_NULL_F); - return (ARK_ILL_INPUT); + if (f == NULL) { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", + "ERKStepReInit", MSG_ARK_NULL_F); + return(ARK_ILL_INPUT); } /* Check for legal input parameters */ - if (y0 == NULL) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "ERKStepReInit", - MSG_ARK_NULL_Y0); - return (ARK_ILL_INPUT); + if (y0 == NULL) { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", + "ERKStepReInit", MSG_ARK_NULL_Y0); + return(ARK_ILL_INPUT); } /* Copy the input parameters into ARKODE state */ @@ -233,19 +222,19 @@ int ERKStepReInit(void* arkode_mem, ARKRhsFn f, realtype t0, N_Vector y0) /* Initialize main ARKODE infrastructure */ retval = arkInit(arkode_mem, t0, y0, FIRST_INIT); - if (retval != ARK_SUCCESS) - { + if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepReInit", "Unable to initialize main ARKODE infrastructure"); - return (retval); + return(retval); } /* Initialize all the counters */ step_mem->nfe = 0; - return (ARK_SUCCESS); + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- ERKStepReset: @@ -260,126 +249,127 @@ int ERKStepReset(void* arkode_mem, realtype tR, N_Vector yR) int retval; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReset", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + retval = erkStep_AccessStepMem(arkode_mem, "ERKStepReset", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, tR, yR, RESET_INIT); - if (retval != ARK_SUCCESS) - { + if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, "ARKODE::ERKStep", "ERKStepReset", "Unable to initialize main ARKODE infrastructure"); - return (retval); + return(retval); } - return (ARK_SUCCESS); + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- ERKStepSStolerances, ERKStepSVtolerances, ERKStepWFtolerances: These routines set integration tolerances (wrappers for general ARKODE utility routines) ---------------------------------------------------------------*/ -int ERKStepSStolerances(void* arkode_mem, realtype reltol, realtype abstol) +int ERKStepSStolerances(void *arkode_mem, realtype reltol, realtype abstol) { /* unpack ark_mem, call arkSStolerances, and return */ ARKodeMem ark_mem; - if (arkode_mem == NULL) - { + if (arkode_mem==NULL) { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepSStolerances", MSG_ARK_NO_MEM); - return (ARK_MEM_NULL); + return(ARK_MEM_NULL); } - ark_mem = (ARKodeMem)arkode_mem; - return (arkSStolerances(ark_mem, reltol, abstol)); + ark_mem = (ARKodeMem) arkode_mem; + return(arkSStolerances(ark_mem, reltol, abstol)); } -int ERKStepSVtolerances(void* arkode_mem, realtype reltol, N_Vector abstol) + +int ERKStepSVtolerances(void *arkode_mem, realtype reltol, N_Vector abstol) { /* unpack ark_mem, call arkSVtolerances, and return */ ARKodeMem ark_mem; - if (arkode_mem == NULL) - { + if (arkode_mem==NULL) { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepSVtolerances", MSG_ARK_NO_MEM); - return (ARK_MEM_NULL); + return(ARK_MEM_NULL); } - ark_mem = (ARKodeMem)arkode_mem; - return (arkSVtolerances(ark_mem, reltol, abstol)); + ark_mem = (ARKodeMem) arkode_mem; + return(arkSVtolerances(ark_mem, reltol, abstol)); } -int ERKStepWFtolerances(void* arkode_mem, ARKEwtFn efun) + +int ERKStepWFtolerances(void *arkode_mem, ARKEwtFn efun) { /* unpack ark_mem, call arkWFtolerances, and return */ ARKodeMem ark_mem; - if (arkode_mem == NULL) - { + if (arkode_mem==NULL) { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepWFtolerances", MSG_ARK_NO_MEM); - return (ARK_MEM_NULL); + return(ARK_MEM_NULL); } - ark_mem = (ARKodeMem)arkode_mem; - return (arkWFtolerances(ark_mem, efun)); + ark_mem = (ARKodeMem) arkode_mem; + return(arkWFtolerances(ark_mem, efun)); } -int ERKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g) + +int ERKStepRootInit(void *arkode_mem, int nrtfn, ARKRootFn g) { /* unpack ark_mem, call arkRootInit, and return */ ARKodeMem ark_mem; - if (arkode_mem == NULL) - { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepRootInit", - MSG_ARK_NO_MEM); - return (ARK_MEM_NULL); + if (arkode_mem==NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", + "ERKStepRootInit", MSG_ARK_NO_MEM); + return(ARK_MEM_NULL); } - ark_mem = (ARKodeMem)arkode_mem; - return (arkRootInit(ark_mem, nrtfn, g)); + ark_mem = (ARKodeMem) arkode_mem; + return(arkRootInit(ark_mem, nrtfn, g)); } -int ERKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, - realtype* tret, int itask) + +int ERKStepEvolve(void *arkode_mem, realtype tout, N_Vector yout, + realtype *tret, int itask) { /* unpack ark_mem, call arkEvolve, and return */ int retval; ARKodeMem ark_mem; - if (arkode_mem == NULL) - { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepEvolve", - MSG_ARK_NO_MEM); - return (ARK_MEM_NULL); + if (arkode_mem==NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", + "ERKStepEvolve", MSG_ARK_NO_MEM); + return(ARK_MEM_NULL); } - ark_mem = (ARKodeMem)arkode_mem; + ark_mem = (ARKodeMem) arkode_mem; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); retval = arkEvolve(ark_mem, tout, yout, tret, itask); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); - return (retval); + return(retval); } -int ERKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) + +int ERKStepGetDky(void *arkode_mem, realtype t, int k, N_Vector dky) { /* unpack ark_mem, call arkGetDky, and return */ int retval; ARKodeMem ark_mem; - if (arkode_mem == NULL) - { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", "ERKStepGetDky", - MSG_ARK_NO_MEM); - return (ARK_MEM_NULL); + if (arkode_mem==NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", + "ERKStepGetDky", MSG_ARK_NO_MEM); + return(ARK_MEM_NULL); } - ark_mem = (ARKodeMem)arkode_mem; + ark_mem = (ARKodeMem) arkode_mem; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); retval = arkGetDky(ark_mem, t, k, dky); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); - return (retval); + return(retval); } + /*--------------------------------------------------------------- ERKStepFree frees all ERKStep memory, and then calls an ARKODE utility routine to free the ARKODE infrastructure memory. ---------------------------------------------------------------*/ -void ERKStepFree(void** arkode_mem) +void ERKStepFree(void **arkode_mem) { int j; sunindextype Bliw, Blrw; @@ -387,17 +377,16 @@ void ERKStepFree(void** arkode_mem) ARKodeERKStepMem step_mem; /* nothing to do if arkode_mem is already NULL */ - if (*arkode_mem == NULL) return; + if (*arkode_mem == NULL) return; /* conditional frees on non-NULL ERKStep module */ - ark_mem = (ARKodeMem)(*arkode_mem); - if (ark_mem->step_mem != NULL) - { - step_mem = (ARKodeERKStepMem)ark_mem->step_mem; + ark_mem = (ARKodeMem) (*arkode_mem); + if (ark_mem->step_mem != NULL) { + + step_mem = (ARKodeERKStepMem) ark_mem->step_mem; /* free the Butcher table */ - if (step_mem->B != NULL) - { + if (step_mem->B != NULL) { ARKodeButcherTable_Space(step_mem->B, &Bliw, &Blrw); ARKodeButcherTable_Free(step_mem->B); step_mem->B = NULL; @@ -406,9 +395,8 @@ void ERKStepFree(void** arkode_mem) } /* free the RHS vectors */ - if (step_mem->F != NULL) - { - for (j = 0; j < step_mem->stages; j++) + if (step_mem->F != NULL) { + for(j=0; jstages; j++) arkFreeVec(ark_mem, &step_mem->F[j]); free(step_mem->F); step_mem->F = NULL; @@ -416,14 +404,12 @@ void ERKStepFree(void** arkode_mem) } /* free the reusable arrays for fused vector interface */ - if (step_mem->cvals != NULL) - { + if (step_mem->cvals != NULL) { free(step_mem->cvals); step_mem->cvals = NULL; ark_mem->lrw -= (step_mem->stages + 1); } - if (step_mem->Xvecs != NULL) - { + if (step_mem->Xvecs != NULL) { free(step_mem->Xvecs); step_mem->Xvecs = NULL; ark_mem->liw -= (step_mem->stages + 1); @@ -432,12 +418,14 @@ void ERKStepFree(void** arkode_mem) /* free the time stepper module itself */ free(ark_mem->step_mem); ark_mem->step_mem = NULL; + } /* free memory for overall ARKODE infrastructure */ arkFree(arkode_mem); } + /*--------------------------------------------------------------- ERKStepPrintMem: @@ -456,35 +444,36 @@ void ERKStepPrintMem(void* arkode_mem, FILE* outfile) #endif /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "ERKStepPrintMem", &ark_mem, - &step_mem); + retval = erkStep_AccessStepMem(arkode_mem, "ERKStepPrintMem", + &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return; /* output data from main ARKODE infrastructure */ arkPrintMem(ark_mem, outfile); /* output integer quantities */ - fprintf(outfile, "ERKStep: q = %i\n", step_mem->q); - fprintf(outfile, "ERKStep: p = %i\n", step_mem->p); - fprintf(outfile, "ERKStep: stages = %i\n", step_mem->stages); + fprintf(outfile,"ERKStep: q = %i\n", step_mem->q); + fprintf(outfile,"ERKStep: p = %i\n", step_mem->p); + fprintf(outfile,"ERKStep: stages = %i\n", step_mem->stages); /* output long integer quantities */ - fprintf(outfile, "ERKStep: nfe = %li\n", step_mem->nfe); + fprintf(outfile,"ERKStep: nfe = %li\n", step_mem->nfe); /* output realtype quantities */ - fprintf(outfile, "ERKStep: Butcher table:\n"); + fprintf(outfile,"ERKStep: Butcher table:\n"); ARKodeButcherTable_Write(step_mem->B, outfile); #ifdef SUNDIALS_DEBUG_PRINTVEC /* output vector quantities */ - for (i = 0; i < step_mem->stages; i++) - { - fprintf(outfile, "ERKStep: F[%i]:\n", i); + for (i=0; istages; i++) { + fprintf(outfile,"ERKStep: F[%i]:\n", i); N_VPrintFile(step_mem->F[i], outfile); } #endif } + + /*=============================================================== ERKStep Private functions ===============================================================*/ @@ -515,16 +504,17 @@ int erkStep_Init(void* arkode_mem, int init_type) int retval, j; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "erkStep_Init", &ark_mem, &step_mem); - if (retval != ARK_SUCCESS) return (retval); + retval = erkStep_AccessStepMem(arkode_mem, "erkStep_Init", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); /* immediately return if resize or reset */ - if (init_type == RESIZE_INIT || init_type == RESET_INIT) return (ARK_SUCCESS); + if (init_type == RESIZE_INIT || init_type == RESET_INIT) + return(ARK_SUCCESS); /* enforce use of arkEwtSmallReal if using a fixed step size and an internal error weight function */ - if (ark_mem->fixedstep && !ark_mem->user_efun) - { + if ( ark_mem->fixedstep && !ark_mem->user_efun ) { ark_mem->user_efun = SUNFALSE; ark_mem->efun = arkEwtSetSmallReal; ark_mem->e_data = ark_mem; @@ -532,58 +522,51 @@ int erkStep_Init(void* arkode_mem, int init_type) /* Create Butcher table (if not already set) */ retval = erkStep_SetButcherTable(ark_mem); - if (retval != ARK_SUCCESS) - { + if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "erkStep_Init", "Could not create Butcher table"); - return (ARK_ILL_INPUT); + return(ARK_ILL_INPUT); } /* Check that Butcher table are OK */ retval = erkStep_CheckButcherTable(ark_mem); - if (retval != ARK_SUCCESS) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "erkStep_Init", - "Error in Butcher table"); - return (ARK_ILL_INPUT); + if (retval != ARK_SUCCESS) { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", + "erkStep_Init", "Error in Butcher table"); + return(ARK_ILL_INPUT); } /* Retrieve/store method and embedding orders now that table is finalized */ step_mem->q = ark_mem->hadapt_mem->q = step_mem->B->q; step_mem->p = ark_mem->hadapt_mem->p = step_mem->B->p; - /* Ensure that if adaptivity is enabled, then method includes embedding - * coefficients */ - if (!ark_mem->fixedstep && (step_mem->p == 0)) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", - "erkStep_Init", "Adaptive timestepping cannot be performed without embedding coefficients"); - return (ARK_ILL_INPUT); + /* Ensure that if adaptivity is enabled, then method includes embedding coefficients */ + if (!ark_mem->fixedstep && (step_mem->p == 0)) { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "erkStep_Init", + "Adaptive timestepping cannot be performed without embedding coefficients"); + return(ARK_ILL_INPUT); } /* Allocate ARK RHS vector memory, update storage requirements */ /* Allocate F[0] ... F[stages-1] if needed */ if (step_mem->F == NULL) - step_mem->F = (N_Vector*)calloc(step_mem->stages, sizeof(N_Vector)); - for (j = 0; j < step_mem->stages; j++) - { + step_mem->F = (N_Vector *) calloc(step_mem->stages, sizeof(N_Vector)); + for (j=0; jstages; j++) { if (!arkAllocVec(ark_mem, ark_mem->ewt, &(step_mem->F[j]))) - return (ARK_MEM_FAIL); + return(ARK_MEM_FAIL); } - ark_mem->liw += step_mem->stages; /* pointers */ + ark_mem->liw += step_mem->stages; /* pointers */ /* Allocate reusable arrays for fused vector interface */ - if (step_mem->cvals == NULL) - { - step_mem->cvals = (realtype*)calloc(step_mem->stages + 1, sizeof(realtype)); - if (step_mem->cvals == NULL) return (ARK_MEM_FAIL); + if (step_mem->cvals == NULL) { + step_mem->cvals = (realtype *) calloc(step_mem->stages+1, sizeof(realtype)); + if (step_mem->cvals == NULL) return(ARK_MEM_FAIL); ark_mem->lrw += (step_mem->stages + 1); } - if (step_mem->Xvecs == NULL) - { - step_mem->Xvecs = (N_Vector*)calloc(step_mem->stages + 1, sizeof(N_Vector)); - if (step_mem->Xvecs == NULL) return (ARK_MEM_FAIL); - ark_mem->liw += (step_mem->stages + 1); /* pointers */ + if (step_mem->Xvecs == NULL) { + step_mem->Xvecs = (N_Vector *) calloc(step_mem->stages+1, sizeof(N_Vector)); + if (step_mem->Xvecs == NULL) return(ARK_MEM_FAIL); + ark_mem->liw += (step_mem->stages + 1); /* pointers */ } /* Limit max interpolant degree (negative input only overwrites the current @@ -613,9 +596,10 @@ int erkStep_Init(void* arkode_mem, int init_type) /* Signal to shared arkode module that fullrhs is required after each step */ ark_mem->call_fullrhs = SUNTRUE; - return (ARK_SUCCESS); + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- erkStep_FullRHS: @@ -640,7 +624,8 @@ int erkStep_Init(void* arkode_mem, int init_type) steps, 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 mode) +int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, + int mode) { int retval; ARKodeMem ark_mem; @@ -648,13 +633,13 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mo booleantype recomputeRHS; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "erkStep_FullRHS", &ark_mem, - &step_mem); - if (retval != ARK_SUCCESS) return (retval); + retval = erkStep_AccessStepMem(arkode_mem, "erkStep_FullRHS", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); /* perform RHS functions contingent on 'mode' argument */ - switch (mode) - { + switch(mode) { + /* ARK_FULLRHS_START: called at the beginning of a simulation Store the vectors f(t,y) in F[0] for possible reuse in the first stage of the subsequent time step */ @@ -663,11 +648,10 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mo /* call f */ retval = step_mem->f(t, y, step_mem->F[0], ark_mem->user_data); step_mem->nfe++; - if (retval != 0) - { + if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ERKStep", "erkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + return(ARK_RHSFUNC_FAIL); } /* copy RHS vector into output */ @@ -675,6 +659,7 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mo break; + /* ARK_FULLRHS_END: called at the end of a successful step If the method coefficients support it, we just copy the last stage RHS vectors to fill f instead of calling f(t,y). @@ -687,19 +672,20 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mo recomputeRHS = SUNTRUE; /* base RHS calls on recomputeRHS argument */ - if (recomputeRHS) - { + if (recomputeRHS) { + /* call f */ retval = step_mem->f(t, y, step_mem->F[0], ark_mem->user_data); step_mem->nfe++; - if (retval != 0) - { + if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ERKStep", "erkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + return(ARK_RHSFUNC_FAIL); } + + } else { + N_VScale(ONE, step_mem->F[step_mem->stages-1], step_mem->F[0]); } - else { N_VScale(ONE, step_mem->F[step_mem->stages - 1], step_mem->F[0]); } /* copy RHS vector into output */ N_VScale(ONE, step_mem->F[0], f); @@ -714,11 +700,10 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mo /* call f */ retval = step_mem->f(t, y, f, ark_mem->user_data); step_mem->nfe++; - if (retval != 0) - { + if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ERKStep", "erkStep_FullRHS", MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + return(ARK_RHSFUNC_FAIL); } break; @@ -727,12 +712,13 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mo /* return with RHS failure if unknown mode is passed */ arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, "ARKODE::ERKStep", "erkStep_FullRHS", "Unknown full RHS mode"); - return (ARK_RHSFUNC_FAIL); + return(ARK_RHSFUNC_FAIL); } - return (ARK_SUCCESS); + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- erkStep_TakeStep: @@ -753,7 +739,7 @@ int erkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, int mo reduce step and retry (if possible) <0 => step encountered unrecoverable failure ---------------------------------------------------------------*/ -int erkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) +int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) { int retval, is, js, nvec; realtype* cvals; @@ -765,53 +751,54 @@ int erkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) *nflagPtr = ARK_SUCCESS; /* access ARKodeERKStepMem structure */ - retval = erkStep_AccessStepMem(arkode_mem, "erkStep_TakeStep", &ark_mem, - &step_mem); - if (retval != ARK_SUCCESS) return (retval); + retval = erkStep_AccessStepMem(arkode_mem, "erkStep_TakeStep", + &ark_mem, &step_mem); + if (retval != ARK_SUCCESS) return(retval); /* local shortcuts for fused vector operations */ cvals = step_mem->cvals; Xvecs = step_mem->Xvecs; #if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::erkStep_TakeStep", - "start-stage", - "step = %li, stage = 0, h = %" RSYM ", tcur = %" RSYM, + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, + "ARKODE::erkStep_TakeStep", "start-stage", + "step = %li, stage = 0, h = %"RSYM", tcur = %"RSYM, ark_mem->nst, ark_mem->h, ark_mem->tcur); #endif #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", - "stage", "z[0] =", ""); + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, + "ARKODE::erkStep_TakeStep", "stage", + "z[0] =", ""); N_VPrintFile(ark_mem->ycur, ARK_LOGGER->debug_fp); - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", - "stage RHS", "F[0] =", ""); + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, + "ARKODE::erkStep_TakeStep", "stage RHS", + "F[0] =", ""); N_VPrintFile(step_mem->F[0], ARK_LOGGER->debug_fp); #endif /* Loop over internal stages to the step; since the method is explicit the first stage RHS is just the full RHS from the start of the step */ - for (is = 1; is < step_mem->stages; is++) - { + for (is=1; isstages; is++) { + /* Set current stage time(s) */ - ark_mem->tcur = ark_mem->tn + step_mem->B->c[is] * ark_mem->h; + 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", + 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_INFO SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::erkStep_TakeStep", "start-stage", - "step = %li, stage = %i, h = %" RSYM ", tcur = %" RSYM, + "step = %li, stage = %i, h = %"RSYM", tcur = %"RSYM, ark_mem->nst, is, ark_mem->h, ark_mem->tcur); #endif /* Set ycur to current stage solution */ nvec = 0; - for (js = 0; js < is; js++) - { + for (js=0; jsh * step_mem->B->A[is][js]; Xvecs[nvec] = step_mem->F[js]; nvec += 1; @@ -822,26 +809,27 @@ int erkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) /* call fused vector operation to do the work */ retval = N_VLinearCombination(nvec, cvals, Xvecs, ark_mem->ycur); - if (retval != 0) return (ARK_VECTOROP_ERR); + if (retval != 0) return(ARK_VECTOROP_ERR); /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) - { - retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, + if (ark_mem->ProcessStage != NULL) { + retval = ark_mem->ProcessStage(ark_mem->tcur, + ark_mem->ycur, ark_mem->user_data); - if (retval != 0) return (ARK_POSTPROCESS_STAGE_FAIL); + if (retval != 0) return(ARK_POSTPROCESS_STAGE_FAIL); } /* compute updated RHS */ - retval = step_mem->f(ark_mem->tcur, ark_mem->ycur, step_mem->F[is], - ark_mem->user_data); + retval = step_mem->f(ark_mem->tcur, ark_mem->ycur, + step_mem->F[is], ark_mem->user_data); step_mem->nfe++; - if (retval < 0) return (ARK_RHSFUNC_FAIL); - if (retval > 0) return (ARK_UNREC_RHSFUNC_ERR); + if (retval < 0) return(ARK_RHSFUNC_FAIL); + if (retval > 0) return(ARK_UNREC_RHSFUNC_ERR); #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, - "ARKODE::erkStep_TakeStep", "stage RHS", "F[%i] =", is); + "ARKODE::erkStep_TakeStep", "stage RHS", + "F[%i] =", is); N_VPrintFile(step_mem->F[is], ARK_LOGGER->debug_fp); #endif @@ -849,28 +837,31 @@ int erkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) /* compute time-evolved solution (in ark_ycur), error estimate (in dsm) */ retval = erkStep_ComputeSolutions(ark_mem, dsmPtr); - if (retval < 0) return (retval); + if (retval < 0) return(retval); #ifdef SUNDIALS_LOGGING_EXTRA_DEBUG - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", - "updated solution", "ycur =", ""); + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, + "ARKODE::erkStep_TakeStep", "updated solution", + "ycur =", ""); 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", + fprintf(ark_mem->diagfp, "ERKStep 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::erkStep_TakeStep", - "error-test", "step = %li, h = %" RSYM ", dsm = %" RSYM, + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, + "ARKODE::erkStep_TakeStep", "error-test", + "step = %li, h = %"RSYM", dsm = %"RSYM, ark_mem->nst, ark_mem->h, *dsmPtr); #endif - return (ARK_SUCCESS); + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- Internal utility routines ---------------------------------------------------------------*/ @@ -881,26 +872,27 @@ int erkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) Shortcut routine to unpack ark_mem and step_mem structures from void* pointer. If either is missing it returns ARK_MEM_NULL. ---------------------------------------------------------------*/ -int erkStep_AccessStepMem(void* arkode_mem, const char* fname, - ARKodeMem* ark_mem, ARKodeERKStepMem* step_mem) +int erkStep_AccessStepMem(void* arkode_mem, const char *fname, + ARKodeMem *ark_mem, ARKodeERKStepMem *step_mem) { + /* access ARKodeMem structure */ - if (arkode_mem == NULL) - { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", fname, MSG_ARK_NO_MEM); - return (ARK_MEM_NULL); + if (arkode_mem==NULL) { + arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::ERKStep", + fname, MSG_ARK_NO_MEM); + return(ARK_MEM_NULL); } - *ark_mem = (ARKodeMem)arkode_mem; - if ((*ark_mem)->step_mem == NULL) - { - arkProcessError(*ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", fname, - MSG_ERKSTEP_NO_MEM); - return (ARK_MEM_NULL); + *ark_mem = (ARKodeMem) arkode_mem; + if ((*ark_mem)->step_mem==NULL) { + arkProcessError(*ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", + fname, MSG_ERKSTEP_NO_MEM); + return(ARK_MEM_NULL); } - *step_mem = (ARKodeERKStepMem)(*ark_mem)->step_mem; - return (ARK_SUCCESS); + *step_mem = (ARKodeERKStepMem) (*ark_mem)->step_mem; + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- erkStep_CheckNVector: @@ -909,13 +901,17 @@ int erkStep_AccessStepMem(void* arkode_mem, const char* fname, ---------------------------------------------------------------*/ booleantype erkStep_CheckNVector(N_Vector tmpl) { - if ((tmpl->ops->nvclone == NULL) || (tmpl->ops->nvdestroy == NULL) || - (tmpl->ops->nvlinearsum == NULL) || (tmpl->ops->nvconst == NULL) || - (tmpl->ops->nvscale == NULL) || (tmpl->ops->nvwrmsnorm == NULL)) - return (SUNFALSE); - return (SUNTRUE); + if ( (tmpl->ops->nvclone == NULL) || + (tmpl->ops->nvdestroy == NULL) || + (tmpl->ops->nvlinearsum == NULL) || + (tmpl->ops->nvconst == NULL) || + (tmpl->ops->nvscale == NULL) || + (tmpl->ops->nvwrmsnorm == NULL) ) + return(SUNFALSE); + return(SUNTRUE); } + /*--------------------------------------------------------------- erkStep_SetButcherTable @@ -929,31 +925,42 @@ int erkStep_SetButcherTable(ARKodeMem ark_mem) sunindextype Bliw, Blrw; /* access ARKodeERKStepMem structure */ - if (ark_mem->step_mem == NULL) - { + if (ark_mem->step_mem==NULL) { arkProcessError(ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", "erkStep_SetButcherTable", MSG_ERKSTEP_NO_MEM); - return (ARK_MEM_NULL); + return(ARK_MEM_NULL); } - step_mem = (ARKodeERKStepMem)ark_mem->step_mem; + step_mem = (ARKodeERKStepMem) ark_mem->step_mem; /* if table has already been specified, just return */ - if (step_mem->B != NULL) return (ARK_SUCCESS); + if (step_mem->B != NULL) + return(ARK_SUCCESS); /* initialize table number to illegal values */ etable = -1; /* select method based on order */ - switch (step_mem->q) - { - case (2): etable = ERKSTEP_DEFAULT_2; break; - case (3): etable = ERKSTEP_DEFAULT_3; break; - case (4): etable = ERKSTEP_DEFAULT_4; break; - case (5): etable = ERKSTEP_DEFAULT_5; break; - case (6): etable = ERKSTEP_DEFAULT_6; break; - case (7): - case (8): etable = ERKSTEP_DEFAULT_8; break; - default: /* no available method, set default */ + switch (step_mem->q) { + case(2): + etable = ERKSTEP_DEFAULT_2; + break; + case(3): + etable = ERKSTEP_DEFAULT_3; + break; + case(4): + etable = ERKSTEP_DEFAULT_4; + break; + case(5): + etable = ERKSTEP_DEFAULT_5; + break; + case(6): + etable = ERKSTEP_DEFAULT_6; + break; + case(7): + case(8): + etable = ERKSTEP_DEFAULT_8; + break; + default: /* no available method, set default */ arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ERKStep", "erkStep_SetButcherTable", "No explicit method at requested order, using q=6."); @@ -961,7 +968,8 @@ int erkStep_SetButcherTable(ARKodeMem ark_mem) break; } - if (etable > -1) step_mem->B = ARKodeButcherTable_LoadERK(etable); + if (etable > -1) + step_mem->B = ARKodeButcherTable_LoadERK(etable); /* note Butcher table space requirements */ ARKodeButcherTable_Space(step_mem->B, &Bliw, &Blrw); @@ -969,16 +977,16 @@ int erkStep_SetButcherTable(ARKodeMem ark_mem) ark_mem->lrw += Blrw; /* set [redundant] stored values for stage numbers and method orders */ - if (step_mem->B != NULL) - { + if (step_mem->B != NULL) { step_mem->stages = step_mem->B->stages; - step_mem->q = step_mem->B->q; - step_mem->p = step_mem->B->p; + step_mem->q = step_mem->B->q; + step_mem->p = step_mem->B->p; } - return (ARK_SUCCESS); + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- erkStep_CheckButcherTable @@ -999,64 +1007,64 @@ int erkStep_CheckButcherTable(ARKodeMem ark_mem) realtype tol = RCONST(1.0e-12); /* access ARKodeERKStepMem structure */ - if (ark_mem->step_mem == NULL) - { + if (ark_mem->step_mem==NULL) { arkProcessError(ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", "erkStep_CheckButcherTable", MSG_ERKSTEP_NO_MEM); - return (ARK_MEM_NULL); + return(ARK_MEM_NULL); } - step_mem = (ARKodeERKStepMem)ark_mem->step_mem; + step_mem = (ARKodeERKStepMem) ark_mem->step_mem; /* check that stages > 0 */ - if (step_mem->stages < 1) - { + if (step_mem->stages < 1) { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", "stages < 1!"); - return (ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", + "stages < 1!"); + return(ARK_INVALID_TABLE); } /* check that method order q > 0 */ - if (step_mem->q < 1) - { + if (step_mem->q < 1) { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", "method order < 1!"); - return (ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", + "method order < 1!"); + return(ARK_INVALID_TABLE); } /* check that embedding order p > 0 */ - if ((step_mem->p < 1) && (!ark_mem->fixedstep)) - { + if ((step_mem->p < 1) && (!ark_mem->fixedstep)) { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", "embedding order < 1!"); - return (ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", + "embedding order < 1!"); + return(ARK_INVALID_TABLE); } /* check that embedding exists */ - if ((step_mem->p > 0) && (!ark_mem->fixedstep)) - { - if (step_mem->B->d == NULL) - { + if ((step_mem->p > 0) && (!ark_mem->fixedstep)) { + if (step_mem->B->d == NULL) { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", "no embedding!"); - return (ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", + "no embedding!"); + return(ARK_INVALID_TABLE); } } /* check that ERK table is strictly lower triangular */ okay = SUNTRUE; - for (i = 0; i < step_mem->stages; i++) - for (j = i; j < step_mem->stages; j++) - if (SUNRabs(step_mem->B->A[i][j]) > tol) okay = SUNFALSE; - if (!okay) - { + for (i=0; istages; i++) + for (j=i; jstages; j++) + if (SUNRabs(step_mem->B->A[i][j]) > tol) + okay = SUNFALSE; + if (!okay) { arkProcessError(ark_mem, ARK_INVALID_TABLE, "ARKODE::ERKStep", - "erkStep_CheckButcherTable", "Ae Butcher table is implicit!"); - return (ARK_INVALID_TABLE); + "erkStep_CheckButcherTable", + "Ae Butcher table is implicit!"); + return(ARK_INVALID_TABLE); } - return (ARK_SUCCESS); + return(ARK_SUCCESS); } + /*--------------------------------------------------------------- erkStep_ComputeSolutions @@ -1071,7 +1079,7 @@ int erkStep_CheckButcherTable(ARKodeMem ark_mem) Note: at this point in the step, the vector ark_tempv1 may be used as a temporary vector. ---------------------------------------------------------------*/ -int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype* dsmPtr) +int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype *dsmPtr) { /* local data */ int retval, j, nvec; @@ -1081,13 +1089,12 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype* dsmPtr) ARKodeERKStepMem step_mem; /* access ARKodeERKStepMem structure */ - if (ark_mem->step_mem == NULL) - { + if (ark_mem->step_mem==NULL) { arkProcessError(ark_mem, ARK_MEM_NULL, "ARKODE::ERKStep", "erkStep_ComputeSolutions", MSG_ERKSTEP_NO_MEM); - return (ARK_MEM_NULL); + return(ARK_MEM_NULL); } - step_mem = (ARKodeERKStepMem)ark_mem->step_mem; + step_mem = (ARKodeERKStepMem) ark_mem->step_mem; /* set N_Vector shortcuts */ y = ark_mem->ycur; @@ -1100,11 +1107,11 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype* dsmPtr) /* initialize output */ *dsmPtr = ZERO; + /* Compute time step solution */ /* set arrays for fused vector operation */ nvec = 0; - for (j = 0; j < step_mem->stages; j++) - { + for (j=0; jstages; j++) { cvals[nvec] = ark_mem->h * step_mem->B->b[j]; Xvecs[nvec] = step_mem->F[j]; nvec += 1; @@ -1115,15 +1122,14 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype* dsmPtr) /* call fused vector operation to do the work */ retval = N_VLinearCombination(nvec, cvals, Xvecs, y); - if (retval != 0) return (ARK_VECTOROP_ERR); + if (retval != 0) return(ARK_VECTOROP_ERR); /* Compute yerr (if step adaptivity enabled) */ - if (!ark_mem->fixedstep) - { + if (!ark_mem->fixedstep) { + /* set arrays for fused vector operation */ nvec = 0; - for (j = 0; j < step_mem->stages; j++) - { + for (j=0; jstages; j++) { cvals[nvec] = ark_mem->h * (step_mem->B->b[j] - step_mem->B->d[j]); Xvecs[nvec] = step_mem->F[j]; nvec += 1; @@ -1131,13 +1137,13 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, realtype* dsmPtr) /* call fused vector operation to do the work */ retval = N_VLinearCombination(nvec, cvals, Xvecs, yerr); - if (retval != 0) return (ARK_VECTOROP_ERR); + if (retval != 0) return(ARK_VECTOROP_ERR); /* fill error norm */ *dsmPtr = N_VWrmsNorm(yerr, ark_mem->ewt); } - return (ARK_SUCCESS); + return(ARK_SUCCESS); } /*=============================================================== From 3e5d80f0ca5f606714c93651d79c075d0a8dd5e9 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 20 Jun 2023 12:38:59 -0700 Subject: [PATCH 090/177] fix warnings --- examples/arkode/C_serial/ark_harmonic_symplectic.c | 1 - examples/arkode/C_serial/ark_kepler.c | 10 ++-------- src/arkode/arkode_sprkstep.c | 11 ----------- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index 22201f2547..98cee0556f 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -83,7 +83,6 @@ int main(int argc, char* argv[]) SUNContext sunctx = NULL; N_Vector y = NULL; N_Vector solution = NULL; - SUNNonlinearSolver NLS = NULL; sunrealtype* ydata = NULL; sunrealtype tout = NAN; sunrealtype tret = NAN; diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 735ba8e18e..fe2a01a862 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -77,6 +77,8 @@ #include "arkode/arkode.h" #include "sundials/sundials_context.h" +#define NUM_DT 8 + typedef struct { sunrealtype ecc; @@ -153,7 +155,6 @@ int main(int argc, char* argv[]) { /* Compute the order of accuracy of the method by testing it with different step sizes. */ - const int NUM_DT = 8; sunrealtype acc_orders[NUM_DT]; sunrealtype con_orders[NUM_DT]; sunrealtype acc_errors[NUM_DT]; @@ -291,7 +292,6 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) FILE* solution_fp = NULL; FILE* times_fp = NULL; int rootsfound = 0; - int argi = 0; int iout = 0; int retval = 0; @@ -429,8 +429,6 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) { while (iout < num_output_times) { - sunrealtype hlast = SUN_RCONST(0.0); - /* Optional: if the stop time is not set, then its possible that the the exact requested output time will not be hit (even with a fixed time-step due to roundoff error accumulation) and interpolation will be @@ -478,8 +476,6 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) { while (iout < num_output_times) { - sunrealtype hlast = SUN_RCONST(0.0); - /* Optional: if the stop time is not set, then its possible that the the exact requested output time will not be hit (even with a fixed time-step due to roundoff error accumulation) and interpolation will be @@ -612,7 +608,6 @@ int velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - UserData udata = (UserData)user_data; sunrealtype* y = N_VGetArrayPointer(yvec); sunrealtype* ydot = N_VGetArrayPointer(ydotvec); const sunrealtype q1 = y[0]; @@ -628,7 +623,6 @@ int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int rootfn(sunrealtype t, N_Vector yvec, sunrealtype* gout, void* user_data) { - UserData udata = (UserData)user_data; sunrealtype* y = N_VGetArrayPointer(yvec); const sunrealtype q2 = y[1]; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 37919fe262..16bf44f590 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -173,12 +173,6 @@ int SPRKStepResize(void* arkode_mem, N_Vector ynew, realtype hscale, { ARKodeMem ark_mem = NULL; ARKodeSPRKStepMem step_mem = NULL; - SUNNonlinearSolver NLS = NULL; - sunindextype lrw1 = 0; - sunindextype liw1 = 0; - sunindextype lrw_diff = 0; - sunindextype liw_diff = 0; - int i = 0; int retval = 0; /* access ARKodeSPRKStepMem structure */ @@ -353,9 +347,6 @@ int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) ---------------------------------------------------------------*/ void SPRKStepFree(void** arkode_mem) { - int j = 0; - sunindextype Bliw = 0; - sunindextype Blrw = 0; ARKodeMem ark_mem = NULL; ARKodeSPRKStepMem step_mem = NULL; @@ -412,9 +403,7 @@ int sprkStep_Init(void* arkode_mem, int init_type) { ARKodeMem ark_mem = NULL; ARKodeSPRKStepMem step_mem = NULL; - int j = 0; int retval = 0; - booleantype reset_efun = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_Init", &ark_mem, From ca75d16aa9184938ed661cde54e7b401b059f16c Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 20 Jun 2023 13:45:55 -0700 Subject: [PATCH 091/177] bump answers --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 0674d67895..b4b11efa87 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 0674d67895d8aa9eefd163d1c514986c32c771a6 +Subproject commit b4b11efa87ee36eca35099657b9964b7c732f1e7 From 6afd9070213fba7257d48653ceedd30951441992 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Thu, 22 Jun 2023 09:33:01 -0700 Subject: [PATCH 092/177] Apply suggestions from code review Co-authored-by: Daniel R. Reynolds --- doc/arkode/guide/source/Butcher.rst | 26 +++--- doc/arkode/guide/source/Mathematics.rst | 14 ++-- .../SPRKStep_c_interface/User_callable.rst | 83 +++++-------------- doc/arkode/guide/source/Usage/index.rst | 2 +- .../arkode/C_serial/ark_harmonic_symplectic.c | 7 +- examples/arkode/C_serial/ark_kepler.c | 10 +-- include/arkode/arkode_sprk.h | 12 --- include/arkode/arkode_sprkstep.h | 3 - src/arkode/arkode_adapt.c | 1 - src/arkode/arkode_io.c | 1 - src/arkode/arkode_sprkstep_impl.h | 11 --- src/arkode/arkode_sprkstep_io.c | 19 +---- 12 files changed, 46 insertions(+), 143 deletions(-) diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 8f487eb55a..d6af1f7f36 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -19,7 +19,7 @@ Appendix: Butcher tables ========================= Here we catalog the full set of Butcher tables included in ARKODE. We group -these into four categories: *explicit*, *implicit*, *additive* and symplectic. +these into four categories: *explicit*, *implicit*, *additive* and *symplectic*. However, since the methods that comprise an additive Runge--Kutta method are themselves explicit and implicit, their component Butcher tables are listed within their separate sections, but are referenced together in the additive @@ -1717,7 +1717,7 @@ ARKODE_SYMPLECTIC_EULER_1_1 .. index:: 1st-order symplectic Euler method Accessible via the constant ``ARKODE_SYMPLECTIC_EULER_1_1`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticEuler`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticEuler`. This is the classic Symplectic Euler method. @@ -1727,7 +1727,7 @@ ARKODE_SYMPLECTIC_LEAPFROG_2_2 .. index:: 2nd-order Leapfrog method Accessible via the constant ``ARKODE_SYMPLECTIC_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticLeapfrog2`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticLeapfrog2`. This is the classic Leapfrog/Verlet method. @@ -1737,7 +1737,7 @@ ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 .. index:: 2nd-order Pseudo Leapfrog method Accessible via the constant ``ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. This is the classic Pseudo Leapfrog/Verlet method. @@ -1747,7 +1747,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_2_2 .. index:: 2nd-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan2`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan2`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1757,7 +1757,7 @@ ARKODE_SYMPLECTIC_RUTH_3_3 .. index:: 3rd-order Ruth method Accessible via the constant ``ARKODE_SYMPLECTIC_RUTH_3_3`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticRuth3`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticRuth3`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. @@ -1767,7 +1767,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_3_3 .. index:: 3rd-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_3_3`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan3`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan3`. This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1777,7 +1777,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_4_4 .. index:: 4th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_4_4`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan4`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan4`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1787,7 +1787,7 @@ ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 .. index:: 4th-order Candy-Rozmus method Accessible via the constant ``ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. @@ -1797,7 +1797,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_5_6 .. index:: 5th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_5_6`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan5`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan5`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1807,7 +1807,7 @@ ARKODE_SYMPLECTIC_YOSHIDA_6_8 .. index:: 6th-order Yoshida method Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6_8`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticYoshida6`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticYoshida6`. This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. @@ -1817,7 +1817,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_8_16 .. index:: 8th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_8_16`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticMcLachlan8`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan8`. This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1827,5 +1827,5 @@ ARKODE_SYMPLECTIC_SOFRONIOU_10_36 .. index:: 10th-order Sofroniou method Accessible via the constant ``ARKODE_SYMPLECTIC_SOFRONIOU_10_36`` to -:c:func:`ARKodeSPRKStorage_Load()` or by calling :c:func:`ARKodeSymplecticSofroniou10`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticSofroniou10`. This is the 10th order method given by Sofroniou in :cite:p:`Sofroniou:05`. diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index f2212abdd0..a8d5c2245c 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -478,7 +478,7 @@ where .. math:: H(p, q, t) = T(p) + V(q, t) -is the system Hamiltonian. When :math:`dH/dt = 0`, i.e. when *H* is autonomous, then H is a conserved quantity. +is the system Hamiltonian. When :math:`\mathrm{d}H/\mathrm{d}t = 0`, i.e. when *H* is autonomous, then *H* is a conserved quantity. Often this correponds to the conservation of energy (for example, in *n*-body problems). In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form @@ -493,7 +493,7 @@ In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the \begin{bmatrix} p_0\\ q_0 - \end{bmatrix} + \end{bmatrix}. SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair of Butcher tableau, @@ -514,14 +514,14 @@ SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented C_s & b_1 & b_2 & \cdots & b_{s-1} \\ \hline & b_1 & b_2 & \cdots & b_{s-1} - \end{array} + \end{array}. We use a compact storage of these coefficients in terms of two arrays, one for *a* and one for *b*. The time weights are computed on the fly. These methods approximately conserve a nearby Hamiltonian for exponentially long times :cite:p:`HaWa:06`. SPRKStep makes the assumption that the Hamiltonian is separable, in which case the schemes are explicit. SPRKStep provides methods with order of accuracy and conservation -of :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these methods, and the default methods used, -are given in the section ???. +equal to :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these methods, and the default methods used, +are given in the section :numref:`SPRKStorage`. In the default case, the algorithm for a single time-step is as follows @@ -1121,8 +1121,8 @@ information. In this mode, all internal time step adaptivity is disabled: Additional information on this mode is provided in the sections :ref:`ARKStep Optional Inputs `, -:ref:`SPRKStep Optional Inputs `, -:ref:`MRIStep Optional Inputs `, and +:ref:`ERKStep Optional Inputs `, +:ref:`SPRKStep Optional Inputs `, and :ref:`MRIStep Optional Inputs `. diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index beca1bfdd1..547bc7e706 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -259,7 +259,7 @@ Optional inputs for SPRKStep +-----------------------------------------------------+------------------------------------------+------------------------+ | Optional input | Function name | Default | - +-----------------------------------------------------+------------------------------------------+------------------------+ ++=====================================================+==========================================+========================+ | Return SPRKStep solver parameters to their defaults | :c:func:`SPRKStepSetDefaults()` | internal | +-----------------------------------------------------+------------------------------------------+------------------------+ | Set dense output interpolation type | :c:func:`SPRKStepSetInterpolantType()` | ``ARK_INTERP_LAGRANGE``| @@ -272,7 +272,7 @@ Optional inputs for SPRKStep +-----------------------------------------------------+------------------------------------------+------------------------+ | Supply a custom error handler function | :c:func:`SPRKStepSetErrHandlerFn()` | internal fn | +-----------------------------------------------------+------------------------------------------+------------------------+ - | Disable time step adaptivity (fixed-step mode) | :c:func:`SPRKStepSetFixedStep()` | disabled | + | Set fixed step size (disables time step adaptivity) | :c:func:`SPRKStepSetFixedStep()` | disabled | +-----------------------------------------------------+------------------------------------------+------------------------+ | Supply an initial step size to attempt | :c:func:`SPRKStepSetInitStep()` | estimated | +-----------------------------------------------------+------------------------------------------+------------------------+ @@ -375,39 +375,7 @@ Optional inputs for SPRKStep :math:`q-1` and the input *degree*, for :math:`q > 1` where :math:`q` is the order of accuracy for the time integration method. - .. versionchanged:: 5.5.1 - - When :math:`q=1`, a linear interpolant is the default to ensure values - obtained by the integrator are returned at the ends of the time - interval. - - -.. c:function:: int SPRKStepSetDiagnostics(void* arkode_mem, FILE* diagfp) - - Specifies the file pointer for a diagnostics file where - all SPRKStep step adaptivity and solver information is written. - - :param arkode_mem: pointer to the SPRKStep memory block. - :param diagfp: pointer to the diagnostics output file. - - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value - - **Notes:** - This parameter can be ``stdout`` or ``stderr``, although the - suggested approach is to specify a pointer to a unique file opened - by the user and returned by ``fopen``. If not called, or if called - with a ``NULL`` file pointer, all diagnostics output is disabled. - - When run in parallel, only one process should set a non-NULL value - for this pointer, since statistics from all processes would be - identical. - - .. deprecated:: 5.2.0 - Use :c:func:`SUNLogger_SetInfoFilename` instead. .. c:function:: int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp) @@ -458,7 +426,7 @@ Optional inputs for SPRKStep .. c:function:: int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed) - Disabled time step adaptivity within SPRKStep, and specifies the + Disables time step adaptivity within SPRKStep, and specifies the fixed time step size to use for the following internal step(s). :param arkode_mem: pointer to the SPRKStep memory block. @@ -472,7 +440,7 @@ Optional inputs for SPRKStep **Notes:** Pass 0.0 to return SPRKStep to the default (adaptive-step) mode. - Use of this function is not generally recommended, since we it gives no + Use of this function is not generally recommended, since it gives no assurance of the validity of the computed solutions. It is primarily provided for code-to-code verification testing purposes. @@ -505,7 +473,6 @@ Optional inputs for SPRKStep :math:`\ddot{y}` is an estimate of the second derivative of the solution at :math:`t_0`. - This routine will also reset the step size and error history. .. c:function:: int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps) @@ -533,15 +500,15 @@ Optional inputs for SPRKStep Specifies the maximum number of messages issued by the solver to warn that :math:`t+h=t` on the next internal step, before - ERKStep will instead return with an error. + SPRKStep will instead return with an error. **Arguments:** - * *arkode_mem* -- pointer to the ERKStep memory block. + * *arkode_mem* -- pointer to the SPRKStep memory block. * *mxhnil* -- maximum allowed number of warning messages :math:`(>0)`. **Return value:** * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the ERKStep memory is ``NULL`` + * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` * *ARK_ILL_INPUT* if an argument has an illegal value **Notes:** @@ -590,8 +557,6 @@ Optional inputs for SPRKStep The stop time can be reenabled though a new call to :c:func:`SPRKStepSetStopTime`. - .. versionadded:: 5.5.1 - .. c:function:: int SPRKStepSetUserData(void* arkode_mem, void* user_data) @@ -664,7 +629,7 @@ Optional inputs for IVP method selection Specifies the SPRK method. :param arkode_mem: pointer to the SPRKStep memory block. - :param sprk_storage: the SPRK method memory. + :param sprk_storage: the SPRK method coefficient structure. :return: * *ARK_SUCCESS* if successful @@ -672,14 +637,13 @@ Optional inputs for IVP method selection * *ARK_ILL_INPUT* if an argument has an illegal value **Notes:** - No error checking is performed to ensure that either the method order *p* or - specified in the method structure correctly describe the coefficients. + No error checking is performed on the coefficients contained in the structure to ensure its declared order of accuracy. .. c:function:: int SPRKStepSetMethodName(void* arkode_mem, const char* method) - Specifies the SPRK method by its name + Specifies the SPRK method by its name. :param arkode_mem: pointer to the SPRKStep memory block. :param method: the SPRK method name. @@ -950,7 +914,7 @@ Main solver optional output functions +-----------------------------------------------------+--------------------------------------------+ | No. of attempted steps | :c:func:`SPRKStepGetNumStepAttempts()` | +-----------------------------------------------------+--------------------------------------------+ - | No. of calls to *f* function | :c:func:`SPRKStepGetNumRhsEvals()` | + | No. of calls to right-hand side functions | :c:func:`SPRKStepGetNumRhsEvals()` | +-----------------------------------------------------+--------------------------------------------+ | Current method memory | :c:func:`SPRKStepGetCurrentMethod()` | +-----------------------------------------------------+--------------------------------------------+ @@ -1045,7 +1009,7 @@ Main solver optional output functions .. c:function:: int SPRKStepPrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt) - Outputs all of the integrator and other statistics. + Outputs all of the integrator statistics. * *arkode_mem* -- pointer to the SPRKStep memory block. * *outfile* -- pointer to output file. @@ -1066,8 +1030,6 @@ Main solver optional output functions read and output the data from a SUNDIALS CSV output file using the key and value pair format. - .. versionadded:: 5.2.0 - .. c:function:: char *SPRKStepGetReturnFlagName(long int flag) @@ -1123,10 +1085,10 @@ Main solver optional output functions .. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKStorage *sprk_storage) - Returns the SPRK method structure currently in use by the solver. + Returns the SPRK method coefficient structure currently in use by the solver. :param arkode_mem: pointer to the SPRKStep memory block. - :param sprk_storage: pointer to the SPRK method structure. + :param sprk_storage: pointer to the SPRK method coefficient structure. :return: * *ARK_SUCCESS* if successful @@ -1145,8 +1107,6 @@ Main solver optional output functions * *ARK_SUCCESS* if successful * *ARK_MEM_NULL* if the ARKStep memory was ``NULL`` - .. versionadded:: 5.3.0 - .. _ARKODE.Usage.SPRKStep.SPRKStepRootOutputs: @@ -1215,13 +1175,10 @@ Rootfinding optional output functions General usability functions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The following optional routines may be called by a user to inquire -about existing solver parameters, to retrieve stored Butcher tables, -write the current Butcher table, or even to test a provided Butcher -table to determine its analytical order of accuracy. While none of -these would typically be called during the course of solving an -initial value problem, these may be useful for users wishing to better -understand SPRKStep and/or specific Runge--Kutta methods. +The following optional routine may be called by a user to inquire +about existing solver parameters. While it would not typically be called +during the course of solving an initial value problem, it may be useful +for users wishing to better understand SPRKStep. .. _ARKODE.Usage.SPRKStep.SPRKStepExtraOutputsTable: @@ -1339,7 +1296,7 @@ the current settings for all SPRKStep module options and performs no memory allocations but, unlike :c:func:`SPRKStepReInit()`, this routine performs only a *subset* of the input checking and initializations that are done in :c:func:`SPRKStepCreate`. In particular this routine retains all internal -counter values and the step size/error history. Like :c:func:`SPRKStepReInit()`, a call to +counter values. Like :c:func:`SPRKStepReInit()`, a call to :c:func:`SPRKStepReset()` will delete any previously-set *tstop* value specified via a call to :c:func:`SPRKStepSetStopTime()`. Following a successful call to :c:func:`SPRKStepReset()`, call :c:func:`SPRKStepEvolve()` again to continue @@ -1458,5 +1415,3 @@ rescale the upcoming time step by the specified factor. If a value If an error occurred, :c:func:`SPRKStepResize()` also sends an error message to the error handler function. - If inequality constraint checking is enabled a call to - :c:func:`SPRKStepResize()` will disable constraint checking. diff --git a/doc/arkode/guide/source/Usage/index.rst b/doc/arkode/guide/source/Usage/index.rst index 9fffdaa5ee..f702a5932b 100644 --- a/doc/arkode/guide/source/Usage/index.rst +++ b/doc/arkode/guide/source/Usage/index.rst @@ -23,7 +23,7 @@ conventions for the library and header files, and discussion of data types in SUNDIALS. We then separately discuss the C and C++ interfaces to each of ARKODE's time stepping modules: :ref:`ARKStep `, :ref:`ERKStep `, :ref:`SPRKStep ` -and :ref:`MRIStep `. Following these, we describe set of +and :ref:`MRIStep `. Following these, we describe the set of :ref:`user-supplied routines ` (both required and optional) that can be supplied to ARKODE. diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index 98cee0556f..c5bffc5cc3 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -26,7 +26,7 @@ * E = (v^2 + omega^2*x^2) / 2 * E is conserved and is the system Hamiltonian. * We simulate the problem on t = [0, 2pi] using the symplectic methods - * in SPRKStep. Symplectic methods will approximately conserve U. + * in SPRKStep. Symplectic methods will approximately conserve E. * * The example has the following command line arguments: * --order the order of the method to use (default 4) @@ -44,10 +44,8 @@ #include #include #include /* def. math fcns, 'sunrealtype' */ -#include #include #include -#include #include "arkode/arkode.h" @@ -176,8 +174,7 @@ int main(int argc, char* argv[]) return 1; } - /* Check if the solve was successful, if so, update the time and continue - */ + /* Check if the solve was successful, if so, update the time and continue */ if (retval >= 0) { tout += dTout; diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index fe2a01a862..82e770b8a2 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -37,7 +37,7 @@ * The rootfinding feature of SPRKStep is used to count the number of complete orbits. * This is done by defining the function, * g(q) = q2 - * and prodivding it to SPRKStep as the function to find the roots for. + * and providing it to SPRKStep as the function to find the roots for. * * The program also accepts command line arguments to change the method * used and time-stepping strategy. The program has the following CLI arguments: @@ -69,10 +69,8 @@ #include #include #include /* def. math fcns, 'sunrealtype' */ -#include #include #include -#include #include "arkode/arkode.h" #include "sundials/sundials_context.h" @@ -243,7 +241,7 @@ int main(int argc, char* argv[]) expected_order, (long double)ord_max_acc, (long double)ord_avg, (long double)ord_est); - /* Comptue the order of accuracy with respect to conserving */ + /* Compute the order of accuracy with respect to conservation */ retval = ComputeConvergence(NUM_DT, con_orders, expected_order, a11, a12, a21, a22, b1e, b2e, &ord_avg, &ord_max_conv, &ord_est); @@ -429,7 +427,7 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) { while (iout < num_output_times) { - /* Optional: if the stop time is not set, then its possible that the the + /* Optional: if the stop time is not set, then its possible that the exact requested output time will not be hit (even with a fixed time-step due to roundoff error accumulation) and interpolation will be used to get the solution at the output time. */ @@ -601,7 +599,6 @@ int velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) ydot[0] = p1; ydot[1] = p2; - // ydot[2] = ydot[3] = SUN_RCONST(0.0); return 0; } @@ -614,7 +611,6 @@ int force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) const sunrealtype q2 = y[1]; const sunrealtype sqrt_qTq = SUNRsqrt(q1 * q1 + q2 * q2); - // ydot[0] = ydot[1] = SUN_RCONST(0.0); ydot[2] = -q1 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)); ydot[3] = -q2 / SUNRpowerR(sqrt_qTq, SUN_RCONST(3.0)); diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 2ed4829a51..801499c501 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -72,18 +72,6 @@ SUNDIALS_EXPORT int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, /* Different methods */ -ARKodeSPRKStorage ARKodeSymplecticEuler(); -ARKodeSPRKStorage ARKodeSymplecticLeapfrog2(); -ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2(); -ARKodeSPRKStorage ARKodeSymplecticRuth3(); -ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4(); -ARKodeSPRKStorage ARKodeSymplecticMcLachlan2(); -ARKodeSPRKStorage ARKodeSymplecticMcLachlan3(); -ARKodeSPRKStorage ARKodeSymplecticMcLachlan4(); -ARKodeSPRKStorage ARKodeSymplecticMcLachlan5(); -ARKodeSPRKStorage ARKodeSymplecticYoshida6(); -ARKodeSPRKStorage ARKodeSymplecticMcLachlan8(); -ARKodeSPRKStorage ARKodeSymplecticSofroniou10(); #ifdef __cplusplus } diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index a286eee974..3b9cbc5a06 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -18,10 +18,7 @@ #define _SPRKSTEP_H #include -#include #include -#include -#include #include #ifdef __cplusplus /* wrapper to enable C++ usage */ diff --git a/src/arkode/arkode_adapt.c b/src/arkode/arkode_adapt.c index 149bbd4490..617681e9f5 100644 --- a/src/arkode/arkode_adapt.c +++ b/src/arkode/arkode_adapt.c @@ -20,7 +20,6 @@ #include #include -#include "arkode/arkode.h" #include "arkode_impl.h" #include #include diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index ea3aa3c38f..2a73d465f1 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -21,7 +21,6 @@ #include #include -#include "arkode/arkode.h" #include "arkode_impl.h" #include "arkode_interp_impl.h" #include diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 0e24a38887..ba43b35ed7 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -83,17 +83,6 @@ int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f2, void* user_data); -// /* private functions for interfacing with MRIStep */ -// int sprkStep_SetInnerForcing(void* arkode_mem, realtype tshift, realtype -// tscale, -// N_Vector *f, int nvecs); -// int sprkStep_MRIStepInnerEvolve(MRIStepInnerStepper stepper, -// realtype t0, realtype tout, N_Vector y); -// int sprkStep_MRIStepInnerFullRhs(MRIStepInnerStepper stepper, realtype t, -// N_Vector y, N_Vector f, int mode); -// int sprkStep_MRIStepInnerReset(MRIStepInnerStepper stepper, realtype tR, -// N_Vector yR); - /*=============================================================== Reusable SPRKStep Error Messages ===============================================================*/ diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 1393723806..d90366d9c9 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -57,10 +57,6 @@ int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp) return (arkSetErrFile(arkode_mem, errfp)); } -int SPRKStepSetDiagnostics(void* arkode_mem, FILE* diagfp) -{ - return (arkSetDiagnostics(arkode_mem, diagfp)); -} int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps) { @@ -189,20 +185,7 @@ char* SPRKStepGetReturnFlagName(long int flag) ---------------------------------------------------------------*/ int SPRKStepSetUserData(void* arkode_mem, void* user_data) { - ARKodeMem ark_mem = NULL; - ARKodeSPRKStepMem step_mem = NULL; - int retval = 0; - - /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepSetUserData", &ark_mem, - &step_mem); - if (retval != ARK_SUCCESS) { return (retval); } - - /* set user_data in ARKODE mem */ - retval = arkSetUserData(arkode_mem, user_data); - if (retval != ARK_SUCCESS) { return (retval); } - - return (ARK_SUCCESS); + return (arkSetUserData(arkode_mem, user_data)); } /*--------------------------------------------------------------- From b94ea113820a1dd55df3e2f6414e94f78fc14271 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 12:50:36 -0700 Subject: [PATCH 093/177] reduce number of output times in ark_kepler --- examples/arkode/C_serial/ark_kepler.c | 2 +- src/arkode/arkode_sprkstep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 82e770b8a2..8ee7434e5b 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -657,7 +657,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->dt = SUN_RCONST(1e-2); args->tf = SUN_RCONST(100.); args->check_order = 0; - args->num_output_times = 1000; + args->num_output_times = 50; for (int argi = 1; argi < argc; argi++) { diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 16bf44f590..dbde63d91e 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -566,7 +566,7 @@ int sprkStep_FullRHS(void* arkode_mem, realtype t, N_Vector y, N_Vector f, /* Standard formulation of SPRK. This requires only 2 vectors in principle, but we use three since we persist the stage data. Only the stage data vector - belongs to SPRKStep, the rest are reused from ARKODE. */ + belongs to SPRKStep, the other two are reused from the ARKODE core. */ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) { ARKodeMem ark_mem = NULL; From 159908da2042c5d3cd0d7fa4c8fdbd644a4c3e06 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 12:53:29 -0700 Subject: [PATCH 094/177] add more details to changelog --- CHANGELOG.md | 4 +++- doc/arkode/guide/source/Introduction.rst | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eebc5c2b9..610ef3d270 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,9 @@ to support user specification of `stdout` and `stderr` strings for the output file names. A new time-stepping module, `SPRKStep`, was added to ARKODE. This time-stepper -provides symplectic partitioned Runge-Kutta methods for Hamiltonian systems. +provides explicit symplectic partitioned Runge-Kutta methods up to order 10 +for separable Hamiltonian systems. + ## Changes to SUNDIALS in release 6.5.1 diff --git a/doc/arkode/guide/source/Introduction.rst b/doc/arkode/guide/source/Introduction.rst index 18825e8de9..adcb04d32d 100644 --- a/doc/arkode/guide/source/Introduction.rst +++ b/doc/arkode/guide/source/Introduction.rst @@ -143,8 +143,8 @@ to support user specification of ``stdout`` and ``stderr`` strings for the outpu file names. A new time-stepping module, :ref:`SPRKStep `, was -added to ARKODE. This time-stepper provides symplectic partitioned Runge-Kutta -methods for Hamiltonian systems. +added to ARKODE. This time-stepper provides explicit symplectic partitioned +Runge-Kutta methods up to order 10 for separable Hamiltonian systems. Changes in v5.5.1 ----------------- From fcea98e67ec0c267810499fa409f70d6485d5e0f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 13:52:22 -0700 Subject: [PATCH 095/177] fix function names --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 76 ++++--------------- 1 file changed, 14 insertions(+), 62 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 70f16b7605..be11fec053 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -102,54 +102,54 @@ ARKodeSPRKStorage functions --------------------------- .. _ARKodeSPRKStorage.FunctionsTable: -.. table:: ARKodeButcherTable functions +.. table:: ARKodeSPRKStorage functions +----------------------------------------------+------------------------------------------------------------+ | **Function name** | **Description** | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Alloc()` | Allocate an empty storage structure | + | :c:func:`ARKodeSPRKStorage_Alloc()` | Allocate an empty storage structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Load()` | Load SPRK method using an identifier | + | :c:func:`ARKodeSPRKStorage_Load()` | Load SPRK method using an identifier | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_LoadByName()` | Load SPRK method using a string version of the identifier | + | :c:func:`ARKodeSPRKStorage_LoadByName()` | Load SPRK method using a string version of the identifier | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Create()` | Create a new storage structure | + | :c:func:`ARKodeSPRKStorage_Create()` | Create a new storage structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Copy()` | Create a copy of a storage structure | + | :c:func:`ARKodeSPRKStorage_Copy()` | Create a copy of a storage structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Space()` | Get the storage structure real and integer workspace size | + | :c:func:`ARKodeSPRKStorage_Space()` | Get the storage structure real and integer workspace size | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Free()` | Deallocate a storage structure | + | :c:func:`ARKodeSPRKStorage_Free()` | Deallocate a storage structure | +----------------------------------------------+------------------------------------------------------------+ .. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) - Allocate memory for the ARKodeSPRKStorage structure. + Allocate memory for an ARKodeSPRKStorage structure with the specified number of stages. :param stages: The number of stages. - :return: Pointer to the allocated ARKodeSPRKStorage structure. + :return: ARKodeSPRKStorage structure for the loaded method. .. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) Load the ARKodeSPRKStorage structure for the specified method ID. :param id: The ID of the SPRK method. One of :ref:`SPRKStorage.id`. - :return: Pointer to the loaded ARKodeSPRKStorage structure. + :return: ARKodeSPRKStorage structure for the loaded method. .. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) Load the ARKodeSPRKStorage structure for the specified method name. :param method: The name of the SPRK method. Must be one of :ref:`SPRKStorage.id` but as a string. - :return: Pointer to the loaded ARKodeSPRKStorage structure. + :return: ARKodeSPRKStorage structure for the loaded method. .. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage B) Create a copy of the ARKodeSPRKStorage structure. - :param B: The original ARKodeSPRKStorage structure. + :param B: The ARKodeSPRKStorage structure to copy. :return: Pointer to the copied ARKodeSPRKStorage structure. .. c:function:: void ARKodeSPRKStorage_Space(ARKodeSPRKStorage B, sunindextype* liw, sunindextype* lrw) @@ -166,58 +166,10 @@ ARKodeSPRKStorage functions :param B: The ARKodeSPRKStorage structure to free. -.. c:function:: int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) +.. c:function:: int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeSPRKStorage* a_ptr, ARKodeSPRKStorage* b_ptr) Convert the ARKodeSPRKStorage structure to the Butcher table representation. :param sprk_storage: The ARKodeSPRKStorage structure. :param a_ptr: Pointer to store the explicit Butcher table. :param b_ptr: Pointer to store the diagonally-implicit Butcher table. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticEuler() - - Create the ARKodeSPRKStorage structure for the Symplectic Euler method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() - - Create the ARKodeSPRKStorage structure for the Symplectic Leapfrog 2-2 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() - - Create the ARKodeSPRKStorage structure for the Symplectic Pseudo Leapfrog 2-2 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticRuth3() - - Create the ARKodeSPRKStorage structure for the Symplectic Ruth 3-3 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() - - Create the ARKodeSPRKStorage structure for the Symplectic Candy Rozmus 4-4 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() - - Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 2-2 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() - - Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 3-3 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() - - Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 4-4 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() - - Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 5-6 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticYoshida6() - - Create the ARKodeSPRKStorage structure for the Symplectic Yoshida 6-8 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() - - Create the ARKodeSPRKStorage structure for the Symplectic McLachlan 8-16 method. - -.. c:function:: ARKodeSPRKStorage ARKodeSymplecticSofroniou10() - - Create the ARKodeSPRKStorage structure for the Symplectic Sofroniou 10-36 method. From c72c814ae534b0f475e3a260cf02658ee36e194f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 14:03:32 -0700 Subject: [PATCH 096/177] fix notation --- doc/arkode/guide/source/Mathematics.rst | 22 +- include/arkode/arkode_sprk.h | 21 +- src/arkode/arkode_sprk.c | 330 ++++++++++++------------ src/arkode/arkode_sprkstep.c | 55 ++-- 4 files changed, 219 insertions(+), 209 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index a8d5c2245c..c26f195ec4 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -508,17 +508,19 @@ SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented \end{array} \qquad \qquad \begin{array}{c|cccc} - C_1 & b_1 & \cdots & 0 & 0 \\ - C_2 & b_1 & b_2 & \cdots & \vdots \\ + \hat{c}_1 & \hat{a}_1 & \cdots & 0 & 0 \\ + \hat{c}_2 & \hat{a}_1 & \hat{a}_2 & \cdots & \vdots \\ \vdots & \vdots & \ddots & \ddots & \vdots \\ - C_s & b_1 & b_2 & \cdots & b_{s-1} \\ + \hat{c}_s & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} \\ \hline - & b_1 & b_2 & \cdots & b_{s-1} + & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} \end{array}. We use a compact storage of these coefficients in terms of two arrays, one for *a* and one for *b*. -The time weights are computed on the fly. These methods approximately conserve a nearby Hamiltonian -for exponentially long times :cite:p:`HaWa:06`. SPRKStep makes the assumption that the Hamiltonian is separable, +The time weights are computed dynamically as :math:`c_j = \sum_{i=1}^s a_i` and +:math:`\hat{c}_j = \sum_{i=1}^s \hat{a}_i` respectively. These methods approximately conserve a nearby +Hamiltonian for exponentially long times :cite:p:`HaWa:06`. +SPRKStep makes the assumption that the Hamiltonian is separable, in which case the schemes are explicit. SPRKStep provides methods with order of accuracy and conservation equal to :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these methods, and the default methods used, are given in the section :numref:`SPRKStorage`. @@ -529,8 +531,8 @@ In the default case, the algorithm for a single time-step is as follows #. For :math:`i = 1,\ldots,s` do: - #. :math:`P_i = P_{i-1} + h_{n+1} a_i f_1(Q_i, t_n + C_i h_{n+1})` - #. :math:`Q_{i+1} = Q_i + h_{n+1} b_i f_2(P_i)` + #. :math:`P_i = P_{i-1} + h_{n+1} \hat{a}_i f_1(Q_i, t_n + \hat{c}_i h_{n+1})` + #. :math:`Q_{i+1} = Q_i + h_{n+1} a_i f_2(P_i)` #. Set :math:`p_{n+1} = P_s, q_{n+1} = Q_{s+1}` @@ -541,8 +543,8 @@ additional storage and vector operations :cite:p:`Sof:03`. #. For :math:`i = 1,\ldots,s` do: - #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} a_i f_1(q_n + \Delta Q_i, t_n + C_i h_{n+1})` - #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} b_i f_2(p_n + \Delta P_i)` + #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} \hat{a}_i f_1(q_n + \Delta Q_i, t_n + \hat{c}_i h_{n+1})` + #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} a_i f_2(p_n + \Delta P_i)` #. Set :math:`\Delta p_{n+1} = \Delta P_s, \Delta q_{n+1} = \Delta Q_{s+1}` diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 801499c501..cdb4e5d39a 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -44,14 +44,14 @@ typedef enum struct ARKodeSPRKStorage_s { - int q; /* method order of accuracy */ - int stages; /* number of stages */ - sunrealtype* a; /* coefficients that generate the explicit Butcher table */ - sunrealtype* b; /* coefficients that generate the diagonally-implicit Butcher - table */ - + /* method order of accuracy */ + int q; + /* number of stages */ + int stages; /* the a_i coefficients generate the explicit Butcher table */ - /* the b_i coefficients generate the diagonally-implicit Butcher table */ + sunrealtype* a; + /* the ahat_i coefficients generate the diagonally-implicit Butcher table */ + sunrealtype* ahat; }; typedef _SUNDIALS_STRUCT_ ARKodeSPRKStorage_s* ARKodeSPRKStorage; @@ -62,17 +62,16 @@ SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method); SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage); -SUNDIALS_EXPORT void ARKodeSPRKStorage_Space(ARKodeSPRKStorage B, +SUNDIALS_EXPORT void ARKodeSPRKStorage_Space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, sunindextype* lrw); SUNDIALS_EXPORT void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage); SUNDIALS_EXPORT int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, - ARKodeButcherTable* a_ptr, - ARKodeButcherTable* b_ptr); + ARKodeButcherTable* erk_ptr, + ARKodeButcherTable* dirk_ptr); /* Different methods */ - #ifdef __cplusplus } #endif diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index b79303d3e7..b10aaef805 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -26,7 +26,7 @@ ARKodeSPRKStorage ARKodeSymplecticEuler() sprk_storage->q = 1; sprk_storage->stages = 1; sprk_storage->a[0] = SUN_RCONST(1.0); - sprk_storage->b[0] = SUN_RCONST(1.0); + sprk_storage->ahat[0] = SUN_RCONST(1.0); return sprk_storage; } @@ -46,8 +46,8 @@ ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() sprk_storage->stages = 2; sprk_storage->a[0] = SUN_RCONST(0.5); sprk_storage->a[1] = SUN_RCONST(0.5); - sprk_storage->b[0] = SUN_RCONST(0.0); - sprk_storage->b[1] = SUN_RCONST(1.0); + sprk_storage->ahat[0] = SUN_RCONST(0.0); + sprk_storage->ahat[1] = SUN_RCONST(1.0); return sprk_storage; } @@ -58,8 +58,8 @@ ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() sprk_storage->stages = 2; sprk_storage->a[0] = SUN_RCONST(1.0); sprk_storage->a[1] = SUN_RCONST(0.0); - sprk_storage->b[0] = SUN_RCONST(0.5); - sprk_storage->b[1] = SUN_RCONST(0.5); + sprk_storage->ahat[0] = SUN_RCONST(0.5); + sprk_storage->ahat[1] = SUN_RCONST(0.5); return sprk_storage; } @@ -78,18 +78,18 @@ ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0)) - SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0) / SUN_RCONST(3.0))) / SUN_RCONST(6.0); - sprk_storage->a[2] = sprk_storage->a[1]; - sprk_storage->a[3] = sprk_storage->a[0]; - sprk_storage->b[0] = SUN_RCONST(0.0); - sprk_storage->b[1] = + sprk_storage->a[2] = sprk_storage->a[1]; + sprk_storage->a[3] = sprk_storage->a[0]; + sprk_storage->ahat[0] = SUN_RCONST(0.0); + sprk_storage->ahat[1] = SUN_RCONST(1.0) / (SUN_RCONST(2.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0))); - sprk_storage->b[2] = + sprk_storage->ahat[2] = SUN_RCONST(1.0) / (SUN_RCONST(1.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(2.0) / SUN_RCONST(3.0))); - sprk_storage->b[3] = sprk_storage->b[1]; + sprk_storage->ahat[3] = sprk_storage->ahat[1]; return sprk_storage; } @@ -109,9 +109,9 @@ ARKodeSPRKStorage ARKodeSymplecticRuth3() sprk_storage->a[0] = SUN_RCONST(2.0) / SUN_RCONST(3.0); sprk_storage->a[1] = -SUN_RCONST(2.0) / SUN_RCONST(3.0); sprk_storage->a[2] = SUN_RCONST(1.0); - sprk_storage->b[0] = SUN_RCONST(7.0) / SUN_RCONST(24.0); - sprk_storage->b[1] = SUN_RCONST(3.0) / SUN_RCONST(4.0); - sprk_storage->b[2] = -SUN_RCONST(1.0) / SUN_RCONST(24.0); + sprk_storage->ahat[0] = SUN_RCONST(7.0) / SUN_RCONST(24.0); + sprk_storage->ahat[1] = SUN_RCONST(3.0) / SUN_RCONST(4.0); + sprk_storage->ahat[2] = -SUN_RCONST(1.0) / SUN_RCONST(24.0); return sprk_storage; } @@ -130,9 +130,9 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() sprk_storage->a[1] = SUN_RCONST(1.0) - (SUN_RCONST(1.0) / SUN_RCONST(2.0)) * SUNRsqrt(2.0); sprk_storage->a[0] = SUN_RCONST(1.0) - sprk_storage->a[1]; - sprk_storage->b[1] = + sprk_storage->ahat[1] = SUN_RCONST(1.0) / (SUN_RCONST(2.0) * (SUN_RCONST(1.0) - sprk_storage->a[1])); - sprk_storage->b[0] = SUN_RCONST(1.0) - sprk_storage->b[1]; + sprk_storage->ahat[0] = SUN_RCONST(1.0) - sprk_storage->ahat[1]; return sprk_storage; } @@ -145,9 +145,9 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() sprk_storage->a[1] = SUN_RCONST(0.25) / sprk_storage->a[0] - sprk_storage->a[0] / SUN_RCONST(2.0); sprk_storage->a[2] = SUN_RCONST(1.0) - sprk_storage->a[0] - sprk_storage->a[1]; - sprk_storage->b[0] = sprk_storage->a[2]; - sprk_storage->b[1] = sprk_storage->a[1]; - sprk_storage->b[2] = sprk_storage->a[0]; + sprk_storage->ahat[0] = sprk_storage->a[2]; + sprk_storage->ahat[1] = sprk_storage->a[1]; + sprk_storage->ahat[2] = sprk_storage->a[0]; return sprk_storage; } @@ -160,10 +160,10 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() sprk_storage->a[1] = -SUN_RCONST(0.085782019412973646); sprk_storage->a[2] = SUN_RCONST(0.441583023616466524); sprk_storage->a[3] = SUN_RCONST(0.128846158365384185); - sprk_storage->b[0] = SUN_RCONST(0.134496199277431089); - sprk_storage->b[1] = -SUN_RCONST(0.224819803079420806); - sprk_storage->b[2] = SUN_RCONST(0.756320000515668291); - sprk_storage->b[3] = SUN_RCONST(0.33400360328632142); + sprk_storage->ahat[0] = SUN_RCONST(0.134496199277431089); + sprk_storage->ahat[1] = -SUN_RCONST(0.224819803079420806); + sprk_storage->ahat[2] = SUN_RCONST(0.756320000515668291); + sprk_storage->ahat[3] = SUN_RCONST(0.33400360328632142); return sprk_storage; } @@ -178,12 +178,12 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() sprk_storage->a[3] = -SUN_RCONST(0.603039356536491888); sprk_storage->a[4] = SUN_RCONST(0.3235807965546976394); sprk_storage->a[5] = SUN_RCONST(0.4423637942197494587); - sprk_storage->b[0] = SUN_RCONST(0.1193900292875672758); - sprk_storage->b[1] = SUN_RCONST(0.6989273703824752308); - sprk_storage->b[2] = -SUN_RCONST(0.1713123582716007754); - sprk_storage->b[3] = SUN_RCONST(0.4012695022513534480); - sprk_storage->b[4] = SUN_RCONST(0.0107050818482359840); - sprk_storage->b[5] = -SUN_RCONST(0.0589796254980311632); + sprk_storage->ahat[0] = SUN_RCONST(0.1193900292875672758); + sprk_storage->ahat[1] = SUN_RCONST(0.6989273703824752308); + sprk_storage->ahat[2] = -SUN_RCONST(0.1713123582716007754); + sprk_storage->ahat[3] = SUN_RCONST(0.4012695022513534480); + sprk_storage->ahat[4] = SUN_RCONST(0.0107050818482359840); + sprk_storage->ahat[5] = -SUN_RCONST(0.0589796254980311632); return sprk_storage; } @@ -209,17 +209,17 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() sprk_storage->a[5] = sprk_storage->a[1]; sprk_storage->a[6] = sprk_storage->a[0]; sprk_storage->a[7] = SUN_RCONST(0.0); - sprk_storage->b[0] = sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->b[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / - SUN_RCONST(2.0); - sprk_storage->b[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / - SUN_RCONST(2.0); - sprk_storage->b[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / - SUN_RCONST(2.0); - sprk_storage->b[4] = sprk_storage->b[3]; - sprk_storage->b[5] = sprk_storage->b[2]; - sprk_storage->b[6] = sprk_storage->b[1]; - sprk_storage->b[7] = sprk_storage->b[0]; + sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / + SUN_RCONST(2.0); + sprk_storage->ahat[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / + SUN_RCONST(2.0); + sprk_storage->ahat[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / + SUN_RCONST(2.0); + sprk_storage->ahat[4] = sprk_storage->ahat[3]; + sprk_storage->ahat[5] = sprk_storage->ahat[2]; + sprk_storage->ahat[6] = sprk_storage->ahat[1]; + sprk_storage->ahat[7] = sprk_storage->ahat[0]; return sprk_storage; } @@ -253,29 +253,29 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() sprk_storage->a[13] = sprk_storage->a[1]; sprk_storage->a[14] = sprk_storage->a[0]; sprk_storage->a[15] = SUN_RCONST(0.0); - sprk_storage->b[0] = sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->b[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / - SUN_RCONST(2.0); - sprk_storage->b[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / - SUN_RCONST(2.0); - sprk_storage->b[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / - SUN_RCONST(2.0); - sprk_storage->b[4] = (sprk_storage->a[3] + sprk_storage->a[4]) / - SUN_RCONST(2.0); - sprk_storage->b[5] = (sprk_storage->a[4] + sprk_storage->a[5]) / - SUN_RCONST(2.0); - sprk_storage->b[6] = (sprk_storage->a[5] + sprk_storage->a[6]) / - SUN_RCONST(2.0); - sprk_storage->b[7] = (sprk_storage->a[6] + sprk_storage->a[7]) / - SUN_RCONST(2.0); - sprk_storage->b[8] = sprk_storage->b[7]; - sprk_storage->b[9] = sprk_storage->b[6]; - sprk_storage->b[10] = sprk_storage->b[5]; - sprk_storage->b[11] = sprk_storage->b[4]; - sprk_storage->b[12] = sprk_storage->b[3]; - sprk_storage->b[13] = sprk_storage->b[2]; - sprk_storage->b[14] = sprk_storage->b[1]; - sprk_storage->b[15] = sprk_storage->b[0]; + sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / + SUN_RCONST(2.0); + sprk_storage->ahat[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / + SUN_RCONST(2.0); + sprk_storage->ahat[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / + SUN_RCONST(2.0); + sprk_storage->ahat[4] = (sprk_storage->a[3] + sprk_storage->a[4]) / + SUN_RCONST(2.0); + sprk_storage->ahat[5] = (sprk_storage->a[4] + sprk_storage->a[5]) / + SUN_RCONST(2.0); + sprk_storage->ahat[6] = (sprk_storage->a[5] + sprk_storage->a[6]) / + SUN_RCONST(2.0); + sprk_storage->ahat[7] = (sprk_storage->a[6] + sprk_storage->a[7]) / + SUN_RCONST(2.0); + sprk_storage->ahat[8] = sprk_storage->ahat[7]; + sprk_storage->ahat[9] = sprk_storage->ahat[6]; + sprk_storage->ahat[10] = sprk_storage->ahat[5]; + sprk_storage->ahat[11] = sprk_storage->ahat[4]; + sprk_storage->ahat[12] = sprk_storage->ahat[3]; + sprk_storage->ahat[13] = sprk_storage->ahat[2]; + sprk_storage->ahat[14] = sprk_storage->ahat[1]; + sprk_storage->ahat[15] = sprk_storage->ahat[0]; return sprk_storage; } @@ -294,95 +294,95 @@ ARKodeSPRKStorage ARKodeSymplecticSofroniou10() sprk_storage->q = 10; sprk_storage->stages = 36; - sprk_storage->a[0] = SUN_RCONST(0.078795722521686419263907679337684); - sprk_storage->a[1] = SUN_RCONST(0.31309610341510852776481247192647); - sprk_storage->a[2] = SUN_RCONST(0.027918383235078066109520273275299); - sprk_storage->a[3] = -SUN_RCONST(0.22959284159390709415121339679655); - sprk_storage->a[4] = SUN_RCONST(0.13096206107716486317465685927961); - sprk_storage->a[5] = -SUN_RCONST(0.26973340565451071434460973222411); - sprk_storage->a[6] = SUN_RCONST(0.074973343155891435666137105641410); - sprk_storage->a[7] = SUN_RCONST(0.11199342399981020488957508073640); - sprk_storage->a[8] = SUN_RCONST(0.36613344954622675119314812353150); - sprk_storage->a[9] = -SUN_RCONST(0.39910563013603589787862981058340); - sprk_storage->a[10] = SUN_RCONST(0.10308739852747107731580277001372); - sprk_storage->a[11] = SUN_RCONST(0.41143087395589023782070411897608); - sprk_storage->a[12] = -SUN_RCONST(0.0048663605831352617621956593099771); - sprk_storage->a[13] = -SUN_RCONST(0.39203335370863990644808193642610); - sprk_storage->a[14] = SUN_RCONST(0.051942502962449647037182904015976); - sprk_storage->a[15] = SUN_RCONST(0.050665090759924496335874344156866); - sprk_storage->a[16] = SUN_RCONST(0.049674370639729879054568800279461); - sprk_storage->a[17] = SUN_RCONST(0.049317735759594537917680008339338); - sprk_storage->a[18] = sprk_storage->a[16]; - sprk_storage->a[19] = sprk_storage->a[15]; - sprk_storage->a[20] = sprk_storage->a[14]; - sprk_storage->a[21] = sprk_storage->a[13]; - sprk_storage->a[22] = sprk_storage->a[12]; - sprk_storage->a[23] = sprk_storage->a[11]; - sprk_storage->a[24] = sprk_storage->a[10]; - sprk_storage->a[25] = sprk_storage->a[9]; - sprk_storage->a[26] = sprk_storage->a[8]; - sprk_storage->a[27] = sprk_storage->a[7]; - sprk_storage->a[28] = sprk_storage->a[6]; - sprk_storage->a[29] = sprk_storage->a[5]; - sprk_storage->a[30] = sprk_storage->a[4]; - sprk_storage->a[31] = sprk_storage->a[3]; - sprk_storage->a[32] = sprk_storage->a[2]; - sprk_storage->a[33] = sprk_storage->a[1]; - sprk_storage->a[34] = sprk_storage->a[0]; - sprk_storage->a[35] = SUN_RCONST(0.0); - sprk_storage->b[0] = sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->b[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / - SUN_RCONST(2.0); - sprk_storage->b[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / - SUN_RCONST(2.0); - sprk_storage->b[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / - SUN_RCONST(2.0); - sprk_storage->b[4] = (sprk_storage->a[3] + sprk_storage->a[4]) / - SUN_RCONST(2.0); - sprk_storage->b[5] = (sprk_storage->a[4] + sprk_storage->a[5]) / - SUN_RCONST(2.0); - sprk_storage->b[6] = (sprk_storage->a[5] + sprk_storage->a[6]) / - SUN_RCONST(2.0); - sprk_storage->b[7] = (sprk_storage->a[6] + sprk_storage->a[7]) / - SUN_RCONST(2.0); - sprk_storage->b[8] = (sprk_storage->a[7] + sprk_storage->a[8]) / - SUN_RCONST(2.0); - sprk_storage->b[9] = (sprk_storage->a[8] + sprk_storage->a[9]) / - SUN_RCONST(2.0); - sprk_storage->b[10] = (sprk_storage->a[9] + sprk_storage->a[10]) / - SUN_RCONST(2.0); - sprk_storage->b[11] = (sprk_storage->a[10] + sprk_storage->a[11]) / - SUN_RCONST(2.0); - sprk_storage->b[12] = (sprk_storage->a[11] + sprk_storage->a[12]) / - SUN_RCONST(2.0); - sprk_storage->b[13] = (sprk_storage->a[12] + sprk_storage->a[13]) / - SUN_RCONST(2.0); - sprk_storage->b[14] = (sprk_storage->a[13] + sprk_storage->a[14]) / - SUN_RCONST(2.0); - sprk_storage->b[15] = (sprk_storage->a[14] + sprk_storage->a[15]) / - SUN_RCONST(2.0); - sprk_storage->b[16] = (sprk_storage->a[15] + sprk_storage->a[16]) / - SUN_RCONST(2.0); - sprk_storage->b[17] = (sprk_storage->a[16] + sprk_storage->a[17]) / - SUN_RCONST(2.0); - sprk_storage->b[18] = sprk_storage->b[17]; - sprk_storage->b[19] = sprk_storage->b[16]; - sprk_storage->b[20] = sprk_storage->b[15]; - sprk_storage->b[21] = sprk_storage->b[14]; - sprk_storage->b[22] = sprk_storage->b[13]; - sprk_storage->b[23] = sprk_storage->b[12]; - sprk_storage->b[24] = sprk_storage->b[11]; - sprk_storage->b[25] = sprk_storage->b[10]; - sprk_storage->b[26] = sprk_storage->b[9]; - sprk_storage->b[27] = sprk_storage->b[8]; - sprk_storage->b[28] = sprk_storage->b[7]; - sprk_storage->b[29] = sprk_storage->b[6]; - sprk_storage->b[30] = sprk_storage->b[5]; - sprk_storage->b[31] = sprk_storage->b[4]; - sprk_storage->b[32] = sprk_storage->b[3]; - sprk_storage->b[33] = sprk_storage->b[2]; - sprk_storage->b[34] = sprk_storage->b[1]; - sprk_storage->b[35] = sprk_storage->b[0]; + sprk_storage->a[0] = SUN_RCONST(0.078795722521686419263907679337684); + sprk_storage->a[1] = SUN_RCONST(0.31309610341510852776481247192647); + sprk_storage->a[2] = SUN_RCONST(0.027918383235078066109520273275299); + sprk_storage->a[3] = -SUN_RCONST(0.22959284159390709415121339679655); + sprk_storage->a[4] = SUN_RCONST(0.13096206107716486317465685927961); + sprk_storage->a[5] = -SUN_RCONST(0.26973340565451071434460973222411); + sprk_storage->a[6] = SUN_RCONST(0.074973343155891435666137105641410); + sprk_storage->a[7] = SUN_RCONST(0.11199342399981020488957508073640); + sprk_storage->a[8] = SUN_RCONST(0.36613344954622675119314812353150); + sprk_storage->a[9] = -SUN_RCONST(0.39910563013603589787862981058340); + sprk_storage->a[10] = SUN_RCONST(0.10308739852747107731580277001372); + sprk_storage->a[11] = SUN_RCONST(0.41143087395589023782070411897608); + sprk_storage->a[12] = -SUN_RCONST(0.0048663605831352617621956593099771); + sprk_storage->a[13] = -SUN_RCONST(0.39203335370863990644808193642610); + sprk_storage->a[14] = SUN_RCONST(0.051942502962449647037182904015976); + sprk_storage->a[15] = SUN_RCONST(0.050665090759924496335874344156866); + sprk_storage->a[16] = SUN_RCONST(0.049674370639729879054568800279461); + sprk_storage->a[17] = SUN_RCONST(0.049317735759594537917680008339338); + sprk_storage->a[18] = sprk_storage->a[16]; + sprk_storage->a[19] = sprk_storage->a[15]; + sprk_storage->a[20] = sprk_storage->a[14]; + sprk_storage->a[21] = sprk_storage->a[13]; + sprk_storage->a[22] = sprk_storage->a[12]; + sprk_storage->a[23] = sprk_storage->a[11]; + sprk_storage->a[24] = sprk_storage->a[10]; + sprk_storage->a[25] = sprk_storage->a[9]; + sprk_storage->a[26] = sprk_storage->a[8]; + sprk_storage->a[27] = sprk_storage->a[7]; + sprk_storage->a[28] = sprk_storage->a[6]; + sprk_storage->a[29] = sprk_storage->a[5]; + sprk_storage->a[30] = sprk_storage->a[4]; + sprk_storage->a[31] = sprk_storage->a[3]; + sprk_storage->a[32] = sprk_storage->a[2]; + sprk_storage->a[33] = sprk_storage->a[1]; + sprk_storage->a[34] = sprk_storage->a[0]; + sprk_storage->a[35] = SUN_RCONST(0.0); + sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / + SUN_RCONST(2.0); + sprk_storage->ahat[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / + SUN_RCONST(2.0); + sprk_storage->ahat[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / + SUN_RCONST(2.0); + sprk_storage->ahat[4] = (sprk_storage->a[3] + sprk_storage->a[4]) / + SUN_RCONST(2.0); + sprk_storage->ahat[5] = (sprk_storage->a[4] + sprk_storage->a[5]) / + SUN_RCONST(2.0); + sprk_storage->ahat[6] = (sprk_storage->a[5] + sprk_storage->a[6]) / + SUN_RCONST(2.0); + sprk_storage->ahat[7] = (sprk_storage->a[6] + sprk_storage->a[7]) / + SUN_RCONST(2.0); + sprk_storage->ahat[8] = (sprk_storage->a[7] + sprk_storage->a[8]) / + SUN_RCONST(2.0); + sprk_storage->ahat[9] = (sprk_storage->a[8] + sprk_storage->a[9]) / + SUN_RCONST(2.0); + sprk_storage->ahat[10] = (sprk_storage->a[9] + sprk_storage->a[10]) / + SUN_RCONST(2.0); + sprk_storage->ahat[11] = (sprk_storage->a[10] + sprk_storage->a[11]) / + SUN_RCONST(2.0); + sprk_storage->ahat[12] = (sprk_storage->a[11] + sprk_storage->a[12]) / + SUN_RCONST(2.0); + sprk_storage->ahat[13] = (sprk_storage->a[12] + sprk_storage->a[13]) / + SUN_RCONST(2.0); + sprk_storage->ahat[14] = (sprk_storage->a[13] + sprk_storage->a[14]) / + SUN_RCONST(2.0); + sprk_storage->ahat[15] = (sprk_storage->a[14] + sprk_storage->a[15]) / + SUN_RCONST(2.0); + sprk_storage->ahat[16] = (sprk_storage->a[15] + sprk_storage->a[16]) / + SUN_RCONST(2.0); + sprk_storage->ahat[17] = (sprk_storage->a[16] + sprk_storage->a[17]) / + SUN_RCONST(2.0); + sprk_storage->ahat[18] = sprk_storage->ahat[17]; + sprk_storage->ahat[19] = sprk_storage->ahat[16]; + sprk_storage->ahat[20] = sprk_storage->ahat[15]; + sprk_storage->ahat[21] = sprk_storage->ahat[14]; + sprk_storage->ahat[22] = sprk_storage->ahat[13]; + sprk_storage->ahat[23] = sprk_storage->ahat[12]; + sprk_storage->ahat[24] = sprk_storage->ahat[11]; + sprk_storage->ahat[25] = sprk_storage->ahat[10]; + sprk_storage->ahat[26] = sprk_storage->ahat[9]; + sprk_storage->ahat[27] = sprk_storage->ahat[8]; + sprk_storage->ahat[28] = sprk_storage->ahat[7]; + sprk_storage->ahat[29] = sprk_storage->ahat[6]; + sprk_storage->ahat[30] = sprk_storage->ahat[5]; + sprk_storage->ahat[31] = sprk_storage->ahat[4]; + sprk_storage->ahat[32] = sprk_storage->ahat[3]; + sprk_storage->ahat[33] = sprk_storage->ahat[2]; + sprk_storage->ahat[34] = sprk_storage->ahat[1]; + sprk_storage->ahat[35] = sprk_storage->ahat[0]; return sprk_storage; } @@ -395,7 +395,7 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) sprk_storage->q = 0; sprk_storage->stages = stages; - sprk_storage->b = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); + sprk_storage->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); sprk_storage->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); return sprk_storage; @@ -487,8 +487,8 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage) for (i = 0; i < sprk_storage->stages; ++i) { - sprk_storage->b[i] = that_sprk_storage->b[i]; - sprk_storage->a[i] = that_sprk_storage->a[i]; + sprk_storage->ahat[i] = that_sprk_storage->ahat[i]; + sprk_storage->a[i] = that_sprk_storage->a[i]; } return sprk_storage; @@ -505,15 +505,15 @@ void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage) { if (sprk_storage) { - free(sprk_storage->b); + free(sprk_storage->ahat); free(sprk_storage->a); free(sprk_storage); } } int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, - ARKodeButcherTable* a_ptr, - ARKodeButcherTable* b_ptr) + ARKodeButcherTable* erk_ptr, + ARKodeButcherTable* dirk_ptr) { int i = 0; int j = 0; @@ -526,14 +526,14 @@ int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, /* DIRK table */ for (i = 0; i < sprk_storage->stages; ++i) { - b->b[i] = sprk_storage->b[i]; - for (j = 0; j <= i; ++j) { b->A[i][j] = sprk_storage->b[j]; } + b->b[i] = sprk_storage->ahat[i]; + for (j = 0; j <= i; ++j) { b->A[i][j] = sprk_storage->ahat[j]; } } - /* Time weights: C_j = sum_{i=0}^{j-1} B_i */ + /* Time weights: C_j = sum_{i=0}^{j-1} b_i */ for (j = 0; j < sprk_storage->stages; ++j) { - for (i = 0; i < j; ++i) { b->c[j] += sprk_storage->b[i]; } + for (i = 0; i < j; ++i) { b->c[j] += sprk_storage->ahat[i]; } } /* Explicit table */ @@ -543,7 +543,7 @@ int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, for (j = 0; j < i; ++j) { a->A[i][j] = sprk_storage->a[j]; } } - /* Time weights: C_j = sum_{i=0}^{j-1} B_i */ + /* Time weights: c_j = sum_{i=0}^{j-1} a_i */ for (j = 0; j < sprk_storage->stages; ++j) { for (i = 0; i < j; ++i) { a->c[j] += sprk_storage->a[i]; } @@ -557,8 +557,8 @@ int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, a->p = 0; b->p = 0; - *a_ptr = a; - *b_ptr = b; + *erk_ptr = a; + *dirk_ptr = b; return ARK_SUCCESS; } diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index dbde63d91e..fa5193868a 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -573,42 +573,48 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) ARKodeSPRKStepMem step_mem = NULL; N_Vector prev_stage = NULL; N_Vector curr_stage = NULL; - int retval = 0; int is = 0; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep", &ark_mem, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - prev_stage = ark_mem->yn; - curr_stage = ark_mem->ycur; + prev_stage = ark_mem->yn; + curr_stage = ark_mem->ycur; + ark_mem->tcur = ark_mem->tn; for (is = 0; is < step_mem->method->stages; is++) { - sunrealtype ai = step_mem->method->a[is]; - sunrealtype bi = step_mem->method->b[is]; + /* load/compute coefficients */ + sunrealtype ai = step_mem->method->a[is]; + sunrealtype ahati = step_mem->method->ahat[is]; - /* Set current stage time(s) */ - ark_mem->tcur = ark_mem->tn + ai * ark_mem->h; + /* store current stage index */ + step_mem->istage = is; - /* Evaluate p' with the previous velocity */ + /* evaluate p' with the previous velocity */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ retval = sprkStep_f1(step_mem, ark_mem->tcur, prev_stage, step_mem->sdata, ark_mem->user_data); if (retval != 0) { return ARK_RHSFUNC_FAIL; } - /* Position update */ - N_VLinearSum(ONE, prev_stage, ark_mem->h * bi, step_mem->sdata, curr_stage); + /* position update */ + N_VLinearSum(ONE, prev_stage, ark_mem->h * ahati, step_mem->sdata, + curr_stage); - /* Evaluate q' with the current positions */ + /* set current stage time(s) */ + ark_mem->tcur = ark_mem->tcur + ai * ark_mem->h; + + /* evaluate q' with the current positions */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ retval = sprkStep_f2(step_mem, ark_mem->tcur, curr_stage, step_mem->sdata, ark_mem->user_data); if (retval != 0) { return ARK_RHSFUNC_FAIL; } - /* Velocity update */ + /* velocity update */ N_VLinearSum(ONE, curr_stage, ark_mem->h * ai, step_mem->sdata, curr_stage); /* apply user-supplied stage postprocessing function (if supplied) */ @@ -640,11 +646,11 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, ARKodeMem ark_mem = NULL; ARKodeSPRKStepMem step_mem = NULL; ARKodeSPRKStorage method = NULL; - int retval = 0; - int is = 0; N_Vector delta_Yi = NULL; N_Vector yn_plus_delta_Yi = NULL; N_Vector diff = NULL; + int is = 0; + int retval = 0; /* access ARKodeSPRKStepMem structure */ retval = sprkStep_AccessStepMem(arkode_mem, "sprkStep_TakeStep_SPRK", @@ -663,14 +669,16 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, N_VConst(ZERO, delta_Yi); /* loop over internal stages to the step */ + ark_mem->tcur = ark_mem->tn; for (is = 0; is < method->stages; is++) { + /* load/compute coefficients */ + sunrealtype ai = step_mem->method->a[is]; + sunrealtype ahati = step_mem->method->ahat[is]; + /* store current stage index */ step_mem->istage = is; - /* set current stage time(s) */ - ark_mem->tcur = ark_mem->tn + method->b[is] * ark_mem->h; - /* [ q_n ] + [ \Delta Q_i ] [ ] + [ ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); @@ -685,25 +693,26 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, /* Incremental position update: [ ] = [ ] + [ ] [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ - N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->b[is], step_mem->sdata, - delta_Yi); + N_VLinearSum(ONE, delta_Yi, ark_mem->h * ahati, step_mem->sdata, delta_Yi); /* [ ] + [ ] [ p_n ] + [ \Delta P_i ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); + /* set current stage time(s) */ + ark_mem->tcur = ark_mem->tcur + ai * ark_mem->h; + /* Evaluate q' with the current positions */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tn + method->a[is] * ark_mem->h, - yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); + retval = sprkStep_f2(step_mem, ark_mem->tcur, yn_plus_delta_Yi, + step_mem->sdata, ark_mem->user_data); if (retval != 0) { return (ARK_RHSFUNC_FAIL); } /* Incremental velocity update: [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] [ ] = [ ] + [ ] */ - N_VLinearSum(ONE, delta_Yi, ark_mem->h * method->a[is], step_mem->sdata, - delta_Yi); + N_VLinearSum(ONE, delta_Yi, ark_mem->h * ai, step_mem->sdata, delta_Yi); /* if user-supplied stage postprocessing function, we error out since it * wont work with the increment form */ From 22bdbb0f6c9fdc7f3b9d679949911bdbf50b22e9 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 14:49:42 -0700 Subject: [PATCH 097/177] a bunch of fixes for PR comments --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 4 +- doc/arkode/guide/source/Butcher.rst | 24 +++--- doc/arkode/guide/source/Mathematics.rst | 19 +++-- .../Usage/SPRKStep_c_interface/Skeleton.rst | 10 +-- .../SPRKStep_c_interface/User_callable.rst | 78 ++++--------------- examples/arkode/C_serial/ark_kepler.c | 2 +- src/arkode/arkode_sprkstep.c | 6 +- src/arkode/arkode_sprkstep_io.c | 5 -- 8 files changed, 52 insertions(+), 96 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index be11fec053..d79357a86f 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -90,10 +90,12 @@ The following enum values are used to identify different SPRK methods: .. c:member:: sunrealtype* a Array of coefficients that generate the explicit Butcher table. + ``a[i]`` is the coefficient appearing in column i+1. - .. c:member:: sunrealtype* b + .. c:member:: sunrealtype* ahat Array of coefficients that generate the diagonally-implicit Butcher table. + ``ahat[i]`` is the coefficient appearing in column i. .. c:type:: ARKodeSPRKStorage_s* ARKodeSPRKStorage diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index d6af1f7f36..19a027c081 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1717,7 +1717,7 @@ ARKODE_SYMPLECTIC_EULER_1_1 .. index:: 1st-order symplectic Euler method Accessible via the constant ``ARKODE_SYMPLECTIC_EULER_1_1`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticEuler`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Symplectic Euler method. @@ -1727,7 +1727,7 @@ ARKODE_SYMPLECTIC_LEAPFROG_2_2 .. index:: 2nd-order Leapfrog method Accessible via the constant ``ARKODE_SYMPLECTIC_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticLeapfrog2`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Leapfrog/Verlet method. @@ -1737,7 +1737,7 @@ ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 .. index:: 2nd-order Pseudo Leapfrog method Accessible via the constant ``ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticPseudoLeapfrog2`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Pseudo Leapfrog/Verlet method. @@ -1747,7 +1747,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_2_2 .. index:: 2nd-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan2`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1757,7 +1757,7 @@ ARKODE_SYMPLECTIC_RUTH_3_3 .. index:: 3rd-order Ruth method Accessible via the constant ``ARKODE_SYMPLECTIC_RUTH_3_3`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticRuth3`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. @@ -1767,7 +1767,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_3_3 .. index:: 3rd-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_3_3`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan3`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1777,7 +1777,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_4_4 .. index:: 4th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_4_4`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan4`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1787,7 +1787,7 @@ ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 .. index:: 4th-order Candy-Rozmus method Accessible via the constant ``ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticCandyRozmus4`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. @@ -1797,7 +1797,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_5_6 .. index:: 5th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_5_6`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan5`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1807,7 +1807,7 @@ ARKODE_SYMPLECTIC_YOSHIDA_6_8 .. index:: 6th-order Yoshida method Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6_8`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticYoshida6`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. @@ -1817,7 +1817,7 @@ ARKODE_SYMPLECTIC_MCLACHLAN_8_16 .. index:: 8th-order McLachlan method Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_8_16`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticMcLachlan8`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1827,5 +1827,5 @@ ARKODE_SYMPLECTIC_SOFRONIOU_10_36 .. index:: 10th-order Sofroniou method Accessible via the constant ``ARKODE_SYMPLECTIC_SOFRONIOU_10_36`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`, or by calling :c:func:`ARKodeSymplecticSofroniou10`. +:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 10th order method given by Sofroniou in :cite:p:`Sofroniou:05`. diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index c26f195ec4..93af53c9ef 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -536,8 +536,13 @@ In the default case, the algorithm for a single time-step is as follows #. Set :math:`p_{n+1} = P_s, q_{n+1} = Q_{s+1}` -Optionally, a different algorithm can be used that is more robust to roundoff error at the expense of -additional storage and vector operations :cite:p:`Sof:03`. +.. _ARKODE.Mathematics.SPRKStep.Compensated: + +Optionally, a different algorithm leveraging compensated summation can be used +that is more robust to roundoff error at the expense of 2 extra vector operations +per stage and an additional 5 per time step, however, it signficantly more robust +to roundoff error accumulation. There is not increased memory usage as we reuse vectors +already allocated in the ARKODE core. #. Set :math:`\Delta P_0 = 0, \Delta Q_1 = 0` @@ -550,10 +555,12 @@ additional storage and vector operations :cite:p:`Sof:03`. #. Using compensated summation, set :math:`p_{n+1} = p_n + \Delta p_{n+1}, q_{n+1} = q_n + \Delta Q_{s+1}` -Since temporal error based adaptive time-stepping is known to ruin the conservation property :cite:p:`HaWa:06`, -SPRKStep employs a fixed time-step size by default. However, it is possible for a user to provide a -problem-specific adaptivity controller such as the one described in :cite:p:`HaSo:05`. -The `ark_kepler.c` example demonstrates an implementation of such controller. +Since temporal error based adaptive time-stepping is known to ruin the +conservation property :cite:p:`HaWa:06`, SPRKStep employs a fixed time-step size. + +.. However, it is possible for a user to provide a +.. problem-specific adaptivity controller such as the one described in :cite:p:`HaSo:05`. +.. The `ark_kepler.c` example demonstrates an implementation of such controller. .. _ARKODE.Mathematics.MRIStep: diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst index faa480aac0..d73afbe975 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst @@ -72,11 +72,11 @@ referenced. #. Specify time step size or adaptivity module - Call :c:func:`SPRKStepSetFixedStep()` or - :c:func:`SPRKStepAdaptivityFn()` to specify either a fixed time-step - size or a callback function that adapts the time-step size. SPRKStep - does not support error-based adaptivity like other ARKODE time-stepper - modules due to the incompatibility with symplectic methods. + Call :c:func:`SPRKStepSetFixedStep()` to set the fixed time step size. + .. or :c:func:`SPRKStepAdaptivityFn()` to specify either a fixed time-step + .. size or a callback function that adapts the time-step size. SPRKStep + .. does not support error-based adaptivity like other ARKODE time-stepper + .. modules due to the incompatibility with symplectic methods. #. Set optional inputs diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 547bc7e706..3b8b863bce 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -202,7 +202,9 @@ has requested rootfinding. :math:`y_{n}` will be returned in the vector *yout*. Once the integrator returns at a *tstop* time, any future testing for *tstop* is disabled (and can be re-enabled only though a new call - to :c:func:`SPRKStepSetStopTime()`). + to :c:func:`SPRKStepSetStopTime()`). SPRKStep uses the ARKODE + Lagrange interpolation module by default because testing showed that + it does a better job of maintaining conservation than Hermite interpolation. On any error return in which one or more internal steps were taken by :c:func:`SPRKStepEvolve()`, the returned values of *tret* and @@ -259,7 +261,7 @@ Optional inputs for SPRKStep +-----------------------------------------------------+------------------------------------------+------------------------+ | Optional input | Function name | Default | -+=====================================================+==========================================+========================+ + +=====================================================+==========================================+========================+ | Return SPRKStep solver parameters to their defaults | :c:func:`SPRKStepSetDefaults()` | internal | +-----------------------------------------------------+------------------------------------------+------------------------+ | Set dense output interpolation type | :c:func:`SPRKStepSetInterpolantType()` | ``ARK_INTERP_LAGRANGE``| @@ -339,6 +341,8 @@ Optional inputs for SPRKStep not be changed without first calling :c:func:`SPRKStepReInit()`. If this routine is not called, the Lagrange interpolation module will be used. + Our testing indicates that Lagrange interpolation does a better job of conserving + quantites than Hermite interpolation. @@ -438,12 +442,6 @@ Optional inputs for SPRKStep * *ARK_ILL_INPUT* if an argument has an illegal value **Notes:** - Pass 0.0 to return SPRKStep to the default (adaptive-step) mode. - - Use of this function is not generally recommended, since it gives no - assurance of the validity of the computed solutions. It is - primarily provided for code-to-code verification testing purposes. - If both :c:func:`SPRKStepSetFixedStep()` and :c:func:`SPRKStepSetStopTime()` are used, then the fixed step size will be used for all steps until the final step preceding the provided stop time @@ -653,15 +651,11 @@ Optional inputs for IVP method selection * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` * *ARK_ILL_INPUT* if an argument has an illegal value - **Notes:** - No error checking is performed to ensure that either the method order *p* or - specified in the method structure correctly describe the coefficients. - - .. c:function:: int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) - Specifies if compensated summation should be used where applicable. + Specifies if :ref:`compensated summation (and the incremental form) ` + should be used where applicable. :param arkode_mem: pointer to the SPRKStep memory block. :param onoff: should compensated summation be used (1) or not (0) @@ -672,48 +666,10 @@ Optional inputs for IVP method selection * *ARK_ILL_INPUT* if an argument has an illegal value **Notes:** - This increases the computational cost and memory usage of the SPRK methods - per stage, however, it signficantly more robust to roundoff error - accumulation. - - -.. _ARKODE.Usage.SPRKStep.SPRKStepAdaptivityInput: - -Optional inputs for time step adaptivity -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -SPRKStep only supports a custom time step adaptivity function. The adaptivity methods -described in :numref:`ARKODE.Mathematics.Adaptivity` are not compatible. - - -.. _ARKODE.Usage.SPRKStep.SPRKStepAdaptivityInputTable: -.. table:: Optional inputs for time step adaptivity - - +----------------------------------------------------------+-----------------------------------------+----------+ - | Optional input | Function name | Default | - +----------------------------------------------------------+-----------------------------------------+----------+ - | Set a custom time step adaptivity function | :c:func:`SPRKStepSetAdaptivityFn()` | internal | - +----------------------------------------------------------+-----------------------------------------+----------+ - - -.. c:function:: int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data) - - Sets a user-supplied time-step adaptivity function. - - :param arkode_mem: pointer to the SPRKStep memory block. - :param hfun: name of user-supplied adaptivity function. - :param h_data: pointer to user data passed to *hfun* every time it is called. - - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value - - **Notes:** - This function should focus on accuracy-based time step - estimation; for stability based time steps the function - :c:func:`SPRKStepSetStabilityFn()` should be used instead. - + This increases the computational cost by 2 extra vector operations per stage and + an additional 5 per time step, however, it signficantly more robust to roundoff + error accumulation. There is not increased memory usage as we reuse vectors + already allocated in the ARKODE core. .. _ARKODE.Usage.SPRKStep.SPRKStepRootfindingInput: @@ -798,11 +754,7 @@ should only be called after a successful return from :c:func:`SPRKStepEvolve()`, as it provides interpolated values either of :math:`y` or of its derivatives (up to the 5th derivative) interpolated to any value of :math:`t` in the last internal step taken -by :c:func:`SPRKStepEvolve()`. Internally, this "dense output" or -"continuous extension" algorithm is identical to the algorithm used for -the maximum order implicit predictors, described in -:numref:`ARKODE.Mathematics.Predictors.Max`, except that -derivatives of the polynomial model may be evaluated upon request. +by :c:func:`SPRKStepEvolve()`. @@ -842,7 +794,9 @@ derivatives of the polynomial model may be evaluated upon request. functions :c:func:`SPRKStepGetCurrentTime()` and :c:func:`SPRKStepGetLastStep()`, respectively. - + Dense outputs may or may not conserve the Hamiltonian. Our testing has + shown that Lagrange interpolation typically performs well in this regard, + while Hermite interpolation does not. .. _ARKODE.Usage.SPRKStep.OptionalOutputs: diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 8ee7434e5b..e2282b5620 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -178,7 +178,7 @@ int main(int argc, char* argv[]) const int old_step_mode = args.step_mode; const int old_stepper = args.stepper; const char* old_method_name = args.method_name; - args.dt = SUN_RCONST(1e-3); + args.dt = SUN_RCONST(1e-2); args.step_mode = 0; args.stepper = 1; args.method_name = "ARKODE_ARK548L2SAb_ERK_8_4_5"; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index fa5193868a..0efa12c966 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -152,10 +152,8 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, return (NULL); } - /* We use Lagrange interpolation by default otherwise extra RHS calls are - needed. This is because we cannot reuse the f2 RHS in TakeStep since it is - a staggered time step. Additionally, it seems Lagrange interpolation does - a better job of conservation. */ + /* SPRKStep uses Lagrange interpolation by default, since Hermite is + less compatible with these methods. */ arkSetInterpolantType(ark_mem, ARK_INTERP_LAGRANGE); return ((void*)ark_mem); diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index d90366d9c9..29787c8879 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -31,11 +31,6 @@ SPRKStep Optional input functions (wrappers for generic ARKODE utility routines). All are documented in arkode_io.c. ===============================================================*/ -int SPRKStepSetDenseOrder(void* arkode_mem, int dord) -{ - return (SPRKStepSetInterpolantDegree(arkode_mem, dord)); -} - int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree) { if (degree < 0) { degree = ARK_INTERP_MAX_DEGREE; } From 9d480a82275617db101a374204bcd3181681e89f Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Tue, 27 Jun 2023 14:52:12 -0700 Subject: [PATCH 098/177] Update src/arkode/arkode_sprkstep.c Co-authored-by: Daniel R. Reynolds --- src/arkode/arkode_sprkstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 0efa12c966..04446076c9 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -298,7 +298,7 @@ int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, realtype* tret, int itask) { - /* unpack ark_mem, call arkGetDky, and return */ + /* unpack ark_mem, call arkEvolve, and return */ int retval = 0; ARKodeMem ark_mem = NULL; if (arkode_mem == NULL) From a92e7d31ac8885466da3852551029ec3d7f2dc6e Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 14:54:42 -0700 Subject: [PATCH 099/177] remove controller reference --- .../guide/source/Usage/SPRKStep_c_interface/User_callable.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 3b8b863bce..75b102f9e6 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -233,8 +233,6 @@ The optional inputs are grouped into the following categories: * IVP method solver options (:numref:`ARKODE.Usage.SPRKStep.SPRKStepMethodInputTable`), -* Step adaptivity solver options (:numref:`ARKODE.Usage.SPRKStep.SPRKStepAdaptivityInputTable`), and - * Rootfinding options (:numref:`ARKODE.Usage.SPRKStep.SPRKStepRootfindingInputTable`). For the most casual use of SPRKStep, relying on the default set of From 2f2a8d4680884e16d68b9beddd4be36c2e4fe47a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 15:12:57 -0700 Subject: [PATCH 100/177] check that order is within bounds --- src/arkode/arkode_sprkstep_io.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 29787c8879..e338eeb6a4 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -24,6 +24,7 @@ #include #include +#include "arkode/arkode.h" #include "arkode/arkode_sprk.h" #include "arkode_sprkstep_impl.h" @@ -52,7 +53,6 @@ int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp) return (arkSetErrFile(arkode_mem, errfp)); } - int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps) { return (arkSetMaxNumSteps(arkode_mem, mxsteps)); @@ -302,7 +302,7 @@ int SPRKStepSetMethodName(void* arkode_mem, const char* method) step_mem->method = ARKodeSPRKStorage_LoadByName(method); - return (ARK_SUCCESS); + return step_mem->method ? ARK_SUCCESS : ARK_ILL_INPUT; } /*--------------------------------------------------------------- @@ -324,6 +324,8 @@ int SPRKStepSetOrder(void* arkode_mem, int ord) &step_mem); if (retval != ARK_SUCCESS) { return (retval); } + if (ord == 7 || ord == 9 || ord > 10) { return ARK_ILL_INPUT; } + /* set user-provided value, or default, depending on argument */ if (ord <= 0) { step_mem->q = 4; } else { step_mem->q = ord; } @@ -459,7 +461,7 @@ int SPRKStepWriteParameters(void* arkode_mem, FILE* fp) /* print integrator parameters to file */ fprintf(fp, "SPRKStep time step module parameters:\n"); fprintf(fp, " Method order %i\n", step_mem->method->q); - fprintf(fp, "\n"); + fprintf(fp, " Method stages %i\n", step_mem->method->stages); return (ARK_SUCCESS); } From c8072ac1f731744cf4afb85e8c857112e917a527 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 15:59:36 -0700 Subject: [PATCH 101/177] doc updates --- doc/arkode/guide/source/Butcher.rst | 4 +- .../Usage/SPRKStep_c_interface/Skeleton.rst | 4 +- .../SPRKStep_c_interface/User_callable.rst | 73 ++----------------- 3 files changed, 12 insertions(+), 69 deletions(-) diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 19a027c081..6c1638316b 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -63,11 +63,11 @@ where here For methods without an embedding (e.g., fixed-step methods) ``P`` is omitted so that methods follow the naming convention ``NAME-S-Q``. -For symplectic methods, +For symplectic methods, the naming convention is ``NAME-SYMPLECTIC-S-Q``. In the code, unique integer IDs are defined inside ``arkode_butcher_erk.h`` and ``arkode_butcher_dirk.h`` for each method, which may be used by calling routines -to specify the desired method. Symplectic methods are +to specify the desired method. Symplectic methods are defined inside ``arkode_sprk.h``. These names are specified in ``fixed width font`` at the start of each method's section below. diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst index d73afbe975..120a703c39 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst @@ -26,7 +26,8 @@ referenced. #. Set problem dimensions, etc. This generally includes the problem size, ``N``, and may include - the local vector length ``Nlocal``. + the local vector length ``Nlocal``. The problem size ``N`` is the + size including both the ``q`` and ``p`` variables. .. note:: @@ -37,6 +38,7 @@ referenced. To set the vector ``y0`` of initial values, use the appropriate functions defined by the particular NVECTOR implementation. + The vector should include both the ``q`` and ``p`` variables. For native SUNDIALS vector implementations (except the CUDA and RAJA based ones), use a call of the form diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 75b102f9e6..ab584ba94d 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -53,6 +53,13 @@ SPRKStep initialization and deallocation functions :returns: If successful, a pointer to initialized problem memory of type ``void*``, to be passed to all user-facing SPRKStep routines listed below. If unsuccessful, a ``NULL`` pointer will be returned, and an error message will be printed to ``stderr``. + .. warning:: + + SPRKStep requires a partitioned problem where ``f1`` should only modify the q variables + and ``f2`` should only modify the p variables (or vice versa). However, the vector + passed to these functions is the full vector with both p and q. The ordering of the + variables is up to the user. + .. c:function:: void SPRKStepFree(void** arkode_mem) @@ -1301,69 +1308,3 @@ vector. If an error occurred, :c:func:`SPRKStepReset()` also sends an error message to the error handler function. - - - - -.. _ARKODE.Usage.SPRKStep.Resizing: - -SPRKStep system resize function -------------------------------------- - -For simulations involving changes to the number of equations and -unknowns in the ODE system (e.g. when using spatially-adaptive -PDE simulations under a method-of-lines approach), the SPRKStep -integrator may be "resized" between integration steps, through calls -to the :c:func:`SPRKStepResize()` function. This function modifies -SPRKStep's internal memory structures to use the new problem size, -without destruction of the temporal adaptivity heuristics. It is -assumed that the dynamical time scales before and after the vector -resize will be comparable, so that all time-stepping heuristics prior -to calling :c:func:`SPRKStepResize()` remain valid after the call. If -instead the dynamics should be recomputed from scratch, the SPRKStep -memory structure should be deleted with a call to -:c:func:`SPRKStepFree()`, and recreated with a call to -:c:func:`SPRKStepCreate`. - -To aid in the vector resize operation, the user can supply a vector -resize function that will take as input a vector with the previous -size, and transform it in-place to return a corresponding vector of -the new size. If this function (of type :c:func:`ARKVecResizeFn()`) -is not supplied (i.e., is set to ``NULL``), then all existing vectors -internal to SPRKStep will be destroyed and re-cloned from the new input -vector. - -In the case that the dynamical time scale should be modified slightly -from the previous time scale, an input *hscale* is allowed, that will -rescale the upcoming time step by the specified factor. If a value -*hscale* :math:`\le 0` is specified, the default of 1.0 will be used. - - - -.. c:function:: int SPRKStepResize(void* arkode_mem, N_Vector yR, realtype hscale, realtype tR, ARKVecResizeFn resize, void* resize_data) - - Re-sizes SPRKStep with a different state vector but with comparable - dynamical time scale. - - :param arkode_mem: pointer to the SPRKStep memory block. - :param yR: the newly-sized solution vector, holding the current - dependent variable values :math:`y(t_R)`. - :param hscale: the desired time step scaling factor (i.e. the next - step will be of size *h\*hscale*). - :param tR: the current value of the independent variable - :math:`t_R` (this must be consistent with *yR*). - :param resize: the user-supplied vector resize function (of type - :c:func:`ARKVecResizeFn()`. - :param resize_data: the user-supplied data structure to be passed - to *resize* when modifying internal SPRKStep vectors. - - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` - * *ARK_NO_MALLOC* if *arkode_mem* was not allocated. - * *ARK_ILL_INPUT* if an argument has an illegal value. - - **Notes:** - If an error occurred, :c:func:`SPRKStepResize()` also sends an error - message to the error handler function. - From 99d1fa4600896ce722505dac9a3680af6c072303 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 16:04:29 -0700 Subject: [PATCH 102/177] move yerr to SPRKStep --- doc/arkode/guide/source/Mathematics.rst | 5 +- .../SPRKStep_c_interface/User_callable.rst | 5 +- include/arkode/arkode_sprkstep.h | 4 -- src/arkode/arkode.c | 7 --- src/arkode/arkode_impl.h | 1 - src/arkode/arkode_sprkstep.c | 59 ++++++++----------- src/arkode/arkode_sprkstep_impl.h | 3 +- src/arkode/arkode_sprkstep_io.c | 7 +++ 8 files changed, 39 insertions(+), 52 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 93af53c9ef..66c95cc211 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -540,9 +540,8 @@ In the default case, the algorithm for a single time-step is as follows Optionally, a different algorithm leveraging compensated summation can be used that is more robust to roundoff error at the expense of 2 extra vector operations -per stage and an additional 5 per time step, however, it signficantly more robust -to roundoff error accumulation. There is not increased memory usage as we reuse vectors -already allocated in the ARKODE core. +per stage and an additional 5 per time step. It also requires one extra vector to +be stored. However, it signficantly more robust to roundoff error accumulation. #. Set :math:`\Delta P_0 = 0, \Delta Q_1 = 0` diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index ab584ba94d..97604e51b9 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -672,9 +672,8 @@ Optional inputs for IVP method selection **Notes:** This increases the computational cost by 2 extra vector operations per stage and - an additional 5 per time step, however, it signficantly more robust to roundoff - error accumulation. There is not increased memory usage as we reuse vectors - already allocated in the ARKODE core. + an additional 5 per time step. It also requires one extra vector to be stored. + However, it signficantly more robust to roundoff error accumulation. .. _ARKODE.Usage.SPRKStep.SPRKStepRootfindingInput: diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 3b9cbc5a06..f9e496c8a7 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -46,10 +46,6 @@ static const int SPRKSTEP_DEFAULT_10 = ARKODE_SYMPLECTIC_SOFRONIOU_10_36; SUNDIALS_EXPORT void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, SUNContext sunctx); -SUNDIALS_EXPORT int SPRKStepResize(void* arkode_mem, N_Vector ynew, - realtype hscale, realtype t0, - ARKVecResizeFn resize, void* resize_data); - SUNDIALS_EXPORT int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 14aa02c256..e0964ba0f0 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1657,10 +1657,6 @@ booleantype arkAllocVectors(ARKodeMem ark_mem, N_Vector tmpl) if (!arkAllocVec(ark_mem, tmpl, &ark_mem->yn)) return(SUNFALSE); - /* Allocate yerr if needed */ - if (!arkAllocVec(ark_mem, tmpl, &ark_mem->yerr)) - return(SUNFALSE); - /* Allocate fn if needed */ if (!arkAllocVec(ark_mem, tmpl, &ark_mem->fn)) return(SUNFALSE); @@ -1885,9 +1881,6 @@ int arkInitialSetup(ARKodeMem ark_mem, realtype tout) } } - /* Zero yerr for compensated summation */ - N_VConst(ZERO, ark_mem->yerr); - /* If necessary, temporarily set h as it is used to compute the tolerance in a potential mass matrix solve when computing the full rhs */ if (ark_mem->h == ZERO) ark_mem->h = ONE; diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index c64df86e8f..859ff1c6c1 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -324,7 +324,6 @@ typedef struct ARKodeMemRec { as evolving solution by the timestepper modules */ N_Vector yn; /* solution from the last successful step */ N_Vector fn; /* full IVP right-hand side from last step */ - N_Vector yerr; /* error vector for compensated summation */ N_Vector tempv1; /* temporary storage vectors (for local use and by */ N_Vector tempv2; /* time-stepping modules) */ N_Vector tempv3; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 04446076c9..d08bc6eda5 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -108,6 +108,16 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, return (NULL); } + if (ark_mem->use_compensated_sums) + { + if (!arkAllocVec(ark_mem, y0, &(step_mem->yerr))) + { + SPRKStepFree((void**)&ark_mem); + return (NULL); + } + } + else { step_mem->yerr = NULL; } + /* Attach step_mem structure and function pointers to ark_mem */ ark_mem->step_attachlinsol = NULL; ark_mem->step_attachmasssol = NULL; @@ -142,6 +152,11 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, step_mem->nf2 = 0; step_mem->istage = 0; + /* Zero yerr for compensated summation */ + if (ark_mem->use_compensated_sums) { + N_VConst(ZERO, step_mem->yerr); + } + /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT); if (retval != ARK_SUCCESS) @@ -159,37 +174,6 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, return ((void*)ark_mem); } -/*--------------------------------------------------------------- - SPRKStepResize: - - This routine resizes the memory within the SPRKStep module. - It first resizes the main ARKODE infrastructure memory, and - then resizes its own data. - ---------------------------------------------------------------*/ -int SPRKStepResize(void* arkode_mem, N_Vector ynew, realtype hscale, - realtype t0, ARKVecResizeFn resize, void* resize_data) -{ - ARKodeMem ark_mem = NULL; - ARKodeSPRKStepMem step_mem = NULL; - int retval = 0; - - /* access ARKodeSPRKStepMem structure */ - retval = sprkStep_AccessStepMem(arkode_mem, "SPRKStepResize", &ark_mem, - &step_mem); - if (retval != ARK_SUCCESS) { return (retval); } - - /* resize ARKODE infrastructure memory */ - retval = arkResize(ark_mem, ynew, hscale, t0, resize, resize_data); - if (retval != ARK_SUCCESS) - { - arkProcessError(ark_mem, retval, "ARKODE::SPRKStep", "SPRKStepResize", - "Unable to resize main ARKODE infrastructure"); - return (retval); - } - - return (ARK_SUCCESS); -} - /*--------------------------------------------------------------- SPRKStepReInit: @@ -255,6 +239,9 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, step_mem->nf2 = 0; step_mem->istage = 0; + /* Zero yerr for compensated summation */ + N_VConst(ZERO, step_mem->yerr); + return (ARK_SUCCESS); } @@ -363,6 +350,12 @@ void SPRKStepFree(void** arkode_mem) step_mem->sdata = NULL; } + if (step_mem->yerr != NULL) + { + arkFreeVec(ark_mem, &step_mem->yerr); + step_mem->yerr = NULL; + } + ARKodeSPRKStorage_Free(step_mem->method); free(ark_mem->step_mem); @@ -728,10 +721,10 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, Now we compute the step solution via compensated summation. [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ - N_VLinearSum(ONE, delta_Yi, -ONE, ark_mem->yerr, delta_Yi); + N_VLinearSum(ONE, delta_Yi, -ONE, step_mem->yerr, delta_Yi); N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, diff); - N_VLinearSum(ONE, diff, -ONE, delta_Yi, ark_mem->yerr); + N_VLinearSum(ONE, diff, -ONE, delta_Yi, step_mem->yerr); *nflagPtr = 0; *dsmPtr = 0; diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index ba43b35ed7..06c22a34a8 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -48,7 +48,8 @@ typedef struct ARKodeSPRKStepMemRec /* SPRK method and storage */ ARKodeSPRKStorage method; /* method spec */ int q; /* method order */ - N_Vector sdata; /* persisted stage data */ + N_Vector sdata; /* persisted stage data */ + N_Vector yerr; /* error vector for compensated summation */ /* SPRK problem specification */ ARKRhsFn f1; /* p' = f1(t,q) = - dV(t,q)/dq */ diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index e338eeb6a4..1f41f1796f 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -238,6 +238,13 @@ int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) { arkSetUseCompensatedSums(arkode_mem, SUNTRUE); ark_mem->step = sprkStep_TakeStep_Compensated; + if (!step_mem->yerr) + { + if (!arkAllocVec(ark_mem, ark_mem->yn, &(step_mem->yerr))) + { + return ARK_MEM_FAIL; + } + } } else { From 50dbd3fc334f1e0f48b431b0369df4008637eb1e Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 16:11:00 -0700 Subject: [PATCH 103/177] revert bad change --- examples/arkode/C_serial/ark_kepler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index e2282b5620..8ee7434e5b 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -178,7 +178,7 @@ int main(int argc, char* argv[]) const int old_step_mode = args.step_mode; const int old_stepper = args.stepper; const char* old_method_name = args.method_name; - args.dt = SUN_RCONST(1e-2); + args.dt = SUN_RCONST(1e-3); args.step_mode = 0; args.stepper = 1; args.method_name = "ARKODE_ARK548L2SAb_ERK_8_4_5"; From 957ce978643be2bada235e96e85edec12d401ab2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 27 Jun 2023 16:35:02 -0700 Subject: [PATCH 104/177] compute coefficients directly for 3rd order MacLachlan --- src/arkode/arkode_sprk.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index b10aaef805..6a87b3df0f 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -141,8 +141,18 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(3); sprk_storage->q = 3; sprk_storage->stages = 3; - sprk_storage->a[0] = SUN_RCONST(0.919661523017399857); - sprk_storage->a[1] = SUN_RCONST(0.25) / sprk_storage->a[0] - + + sunrealtype z = + -SUNRpowerR((SUN_RCONST(2.0) / SUN_RCONST(27.0)) - + SUN_RCONST(1.0) / (SUN_RCONST(9.0) * SUNRsqrt(3.0)), + SUN_RCONST(1.0) / SUN_RCONST(3.0)); + sunrealtype w = -SUN_RCONST(2.0) / SUN_RCONST(3.0) + + SUN_RCONST(1.0) / (SUN_RCONST(9.0) * z) + z; + sunrealtype y = (SUN_RCONST(1.0) + w * w) / SUN_RCONST(4.0); + sprk_storage->a[0] = SUNRsqrt(SUN_RCONST(1.0) / (SUN_RCONST(9.0) * y) - + w / SUN_RCONST(2.0) + SUNRsqrt(y)) - + SUN_RCONST(1.0) / (SUN_RCONST(3.0) * SUNRsqrt(y)); + sprk_storage->a[1] = SUN_RCONST(0.25) / sprk_storage->a[0] - sprk_storage->a[0] / SUN_RCONST(2.0); sprk_storage->a[2] = SUN_RCONST(1.0) - sprk_storage->a[0] - sprk_storage->a[1]; sprk_storage->ahat[0] = sprk_storage->a[2]; From 8733615e5283641ae5675b90a906458970d33726 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 28 Jun 2023 09:11:23 -0700 Subject: [PATCH 105/177] add 6th order Yoshida coefficients for extended precision --- src/arkode/arkode_sprk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 6a87b3df0f..59bba52959 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -211,10 +211,10 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(8); sprk_storage->q = 6; sprk_storage->stages = 8; - sprk_storage->a[0] = SUN_RCONST(0.78451361047755726382); - sprk_storage->a[1] = SUN_RCONST(0.23557321335935813368); - sprk_storage->a[2] = -SUN_RCONST(1.17767998417887100695); - sprk_storage->a[3] = SUN_RCONST(1.3151863206839); + sprk_storage->a[0] = SUN_RCONST(0.7845136104775572638194976338663498757768); + sprk_storage->a[1] = SUN_RCONST(0.2355732133593581336847931829785346016865); + sprk_storage->a[2] = -SUN_RCONST(1.177679984178871006946415680964315734639); + sprk_storage->a[3] = SUN_RCONST(1.315186320683911218884249728238862514352); sprk_storage->a[4] = sprk_storage->a[2]; sprk_storage->a[5] = sprk_storage->a[1]; sprk_storage->a[6] = sprk_storage->a[0]; From a1f639b1a19e065c648fa31bb7c8db5f8de66be7 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 28 Jun 2023 09:54:15 -0700 Subject: [PATCH 106/177] add 8th order McLachlan extended precision coefficients --- src/arkode/arkode_sprk.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 59bba52959..eb496bbb8e 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -247,14 +247,14 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(16); sprk_storage->q = 8; sprk_storage->stages = 16; - sprk_storage->a[0] = SUN_RCONST(0.74167036435061295344822780); - sprk_storage->a[1] = -SUN_RCONST(0.40910082580003159399730010); - sprk_storage->a[2] = SUN_RCONST(0.19075471029623837995387626); - sprk_storage->a[3] = -SUN_RCONST(0.57386247111608226665638773); - sprk_storage->a[4] = SUN_RCONST(0.29906418130365592384446354); - sprk_storage->a[5] = SUN_RCONST(0.33462491824529818378495798); - sprk_storage->a[6] = SUN_RCONST(0.31529309239676659663205666); - sprk_storage->a[7] = -SUN_RCONST(0.79688793935291635401978884); + sprk_storage->a[0] = SUN_RCONST(0.7416703643506129534482278017838063156035); + sprk_storage->a[1] = -SUN_RCONST(0.4091008258000315939973000958935634173099); + sprk_storage->a[2] = SUN_RCONST(0.1907547102962383799538762564503716627355); + sprk_storage->a[3] = -SUN_RCONST(0.5738624711160822666563877266355357421595); + sprk_storage->a[4] = SUN_RCONST(0.2990641813036559238444635406886029882258); + sprk_storage->a[5] = SUN_RCONST(0.3346249182452981837849579798821822886337); + sprk_storage->a[6] = SUN_RCONST(0.3152930923967665966320566638110024309941); + sprk_storage->a[7] = -SUN_RCONST(0.7968879393529163540197888401737330534463); sprk_storage->a[8] = sprk_storage->a[6]; sprk_storage->a[9] = sprk_storage->a[5]; sprk_storage->a[10] = sprk_storage->a[4]; From c4d2fae6f5b171ff6331a888f4c67738f5954454 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Wed, 28 Jun 2023 10:36:01 -0700 Subject: [PATCH 107/177] Update doc/arkode/guide/source/Mathematics.rst Co-authored-by: Daniel R. Reynolds --- doc/arkode/guide/source/Mathematics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 66c95cc211..774e9c82c1 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -517,8 +517,8 @@ SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented \end{array}. We use a compact storage of these coefficients in terms of two arrays, one for *a* and one for *b*. -The time weights are computed dynamically as :math:`c_j = \sum_{i=1}^s a_i` and -:math:`\hat{c}_j = \sum_{i=1}^s \hat{a}_i` respectively. These methods approximately conserve a nearby +The time weights are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and +:math:`\hat{c}_j = \sum_{i=1}^j \hat{a}_i` respectively. These methods approximately conserve a nearby Hamiltonian for exponentially long times :cite:p:`HaWa:06`. SPRKStep makes the assumption that the Hamiltonian is separable, in which case the schemes are explicit. SPRKStep provides methods with order of accuracy and conservation From 32d56e22d812ab65fa94039fd5e7cbd2f5ce1221 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 28 Jun 2023 10:37:20 -0700 Subject: [PATCH 108/177] remove unused header --- src/arkode/arkode_sprkstep.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index d08bc6eda5..d9d8f761ba 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "arkode_impl.h" #include "arkode_interp_impl.h" @@ -153,9 +152,7 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, step_mem->istage = 0; /* Zero yerr for compensated summation */ - if (ark_mem->use_compensated_sums) { - N_VConst(ZERO, step_mem->yerr); - } + if (ark_mem->use_compensated_sums) { N_VConst(ZERO, step_mem->yerr); } /* Initialize main ARKODE infrastructure */ retval = arkInit(ark_mem, t0, y0, FIRST_INIT); From 0da5fefbd2b923ca3f1ade92b49235ab01d16b13 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 28 Jun 2023 12:23:50 -0700 Subject: [PATCH 109/177] update McLachlan 8 name --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 2 +- doc/arkode/guide/source/Butcher.rst | 4 ++-- doc/arkode/guide/source/Constants.rst | 2 +- include/arkode/arkode_sprk.h | 2 +- include/arkode/arkode_sprkstep.h | 2 +- src/arkode/arkode_sprk.c | 13 +++++++++---- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index d79357a86f..1861654e8d 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -67,7 +67,7 @@ The following enum values are used to identify different SPRK methods: Identifier for the Symplectic Yoshida 6th order method with 8 stages. -.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_8_16 +.. c:macro:: ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16 Identifier for the Symplectic McLachlan 8th order method with 16 stages. diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 6c1638316b..49a4e1639f 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1811,12 +1811,12 @@ Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6_8`` to This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. -ARKODE_SYMPLECTIC_MCLACHLAN_8_16 +ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 8th-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_8_16`` to +Accessible via the constant ``ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index 092c09b8e9..d4a9fb5be9 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -280,7 +280,7 @@ contains the ARKODE output constants. +--------------------------------------------------+------------------------------------------------------------+ | :c:macro:`ARKODE_SYMPLECTIC_YOSHIDA_6_8` | Symplectic Yoshida 6th order method with 8 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_8_16` | Symplectic McLachlan 8th order method with 16 stages. | + | :c:macro:`ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16` | Symplectic McLachlan 8th order method with 16 stages. | +--------------------------------------------------+------------------------------------------------------------+ | :c:macro:`ARKODE_SYMPLECTIC_SOFRONIOU_10_36` | Symplectic Sofroniou 10th order method with 36 stages. | +--------------------------------------------------+------------------------------------------------------------+ diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index cdb4e5d39a..5d4c8f6cbe 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -37,7 +37,7 @@ typedef enum ARKODE_SYMPLECTIC_MCLACHLAN_4_4, ARKODE_SYMPLECTIC_MCLACHLAN_5_6, ARKODE_SYMPLECTIC_YOSHIDA_6_8, - ARKODE_SYMPLECTIC_MCLACHLAN_8_16, + ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16, ARKODE_SYMPLECTIC_SOFRONIOU_10_36, ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_SOFRONIOU_10_36 } ARKODE_SPRKMethodID; diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index f9e496c8a7..55b0c9e3b5 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -35,7 +35,7 @@ static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_MCLACHLAN_3_3; static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLACHLAN_4_4; static const int SPRKSTEP_DEFAULT_5 = ARKODE_SYMPLECTIC_MCLACHLAN_5_6; static const int SPRKSTEP_DEFAULT_6 = ARKODE_SYMPLECTIC_YOSHIDA_6_8; -static const int SPRKSTEP_DEFAULT_8 = ARKODE_SYMPLECTIC_MCLACHLAN_8_16; +static const int SPRKSTEP_DEFAULT_8 = ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16; static const int SPRKSTEP_DEFAULT_10 = ARKODE_SYMPLECTIC_SOFRONIOU_10_36; /* ------------------- diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index eb496bbb8e..f8f284f7c0 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -236,13 +236,18 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() /* The following methods are from: + (Original) Suzuki, M., & Umeno, K. (1993). Higher-order decomposition theory + of exponential operators and its applications to QMC and nonlinear dynamics. + Computer simulation studies in condensed-matter physics VI, 74-86. + https://doi.org/10.1007/978-3-642-78448-4_7 + McLachlan, R.I.: On the Numerical Integration of Ordinary Differential Equations by Symmetric Composition Methods. Siam J Sci Comput. 16, 151–168 (1995). https://doi.org/10.1137/0916010 */ -ARKodeSPRKStorage ARKodeSymplecticMcLachlan8() +ARKodeSPRKStorage ARKodeSymplecticSuzukiUmeno816() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(16); sprk_storage->q = 8; @@ -427,7 +432,7 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) return ARKodeSymplecticCandyRozmus4(); case ARKODE_SYMPLECTIC_MCLACHLAN_5_6: return ARKodeSymplecticMcLachlan5(); case ARKODE_SYMPLECTIC_YOSHIDA_6_8: return ARKodeSymplecticYoshida6(); - case ARKODE_SYMPLECTIC_MCLACHLAN_8_16: return ARKodeSymplecticMcLachlan8(); + case ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16: return ARKodeSymplecticSuzukiUmeno816(); case ARKODE_SYMPLECTIC_SOFRONIOU_10_36: return ARKodeSymplecticSofroniou10(); default: return NULL; } @@ -475,9 +480,9 @@ ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) { return ARKodeSymplecticYoshida6(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_8_16")) + if (!strcmp(method, "ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16")) { - return ARKodeSymplecticMcLachlan8(); + return ARKodeSymplecticSuzukiUmeno816(); } if (!strcmp(method, "ARKODE_SYMPLECTIC_SOFRONIOU_10_36")) { From c010d8b53aebccb0c879cfca7b358f39c5036d27 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 29 Jun 2023 11:27:17 -0700 Subject: [PATCH 110/177] change ARKODE_SYMPLECTIC to ARKODE_SPRK --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 24 +++++----- doc/arkode/guide/source/Butcher.rst | 48 +++++++++---------- doc/arkode/guide/source/Constants.rst | 24 +++++----- examples/arkode/C_serial/CMakeLists.txt | 18 +++---- examples/arkode/C_serial/ark_kepler.c | 6 +-- include/arkode/arkode_sprk.h | 26 +++++----- include/arkode/arkode_sprkstep.h | 16 +++---- src/arkode/arkode_sprk.c | 48 +++++++++---------- 8 files changed, 105 insertions(+), 105 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 1861654e8d..6ae4192da7 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -27,51 +27,51 @@ The following enum values are used to identify different SPRK methods: Identifier representing no SPRK method, this is solely used to mark the beginning of the enum. -.. c:macro:: ARKODE_SYMPLECTIC_EULER_1_1 +.. c:macro:: ARKODE_SPRK_EULER_1_1 Identifier for the Symplectic Euler 1st order method with 1 stage. -.. c:macro:: ARKODE_SYMPLECTIC_LEAPFROG_2_2 +.. c:macro:: ARKODE_SPRK_LEAPFROG_2_2 Identifier for the Symplectic Leapfrog 2nd order method with 2 stages. -.. c:macro:: ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 +.. c:macro:: ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 Identifier for the Symplectic Pseudo Leapfrog 2nd order method with 2 stages. -.. c:macro:: ARKODE_SYMPLECTIC_RUTH_3_3 +.. c:macro:: ARKODE_SPRK_RUTH_3_3 Identifier for the Symplectic Ruth 3rd order method with 3 stages. -.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_2_2 +.. c:macro:: ARKODE_SPRK_MCLACHLAN_2_2 Identifier for the Symplectic McLachlan 2nd order method with 2 stages. -.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_3_3 +.. c:macro:: ARKODE_SPRK_MCLACHLAN_3_3 Identifier for the Symplectic McLachlan 3rd order method with 3 stages. -.. c:macro:: ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 +.. c:macro:: ARKODE_SPRK_CANDY_ROZMUS_4_4 Identifier for the Symplectic Candy Rozmus 4th order method with 4 stages. -.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_4_4 +.. c:macro:: ARKODE_SPRK_MCLACHLAN_4_4 Identifier for the Symplectic McLachlan 4th order method with 4 stages. -.. c:macro:: ARKODE_SYMPLECTIC_MCLACHLAN_5_6 +.. c:macro:: ARKODE_SPRK_MCLACHLAN_5_6 Identifier for the Symplectic McLachlan 5th order method with 6 stages. -.. c:macro:: ARKODE_SYMPLECTIC_YOSHIDA_6_8 +.. c:macro:: ARKODE_SPRK_YOSHIDA_6_8 Identifier for the Symplectic Yoshida 6th order method with 8 stages. -.. c:macro:: ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16 +.. c:macro:: ARKODE_SPRK_SUZUKI_UMENO_8_16 Identifier for the Symplectic McLachlan 8th order method with 16 stages. -.. c:macro:: ARKODE_SYMPLECTIC_SOFRONIOU_10_36 +.. c:macro:: ARKODE_SPRK_SOFRONIOU_10_36 Identifier for the Symplectic Sofroniou 10th order method with 36 stages. diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 49a4e1639f..31d3f3c47c 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1711,121 +1711,121 @@ Butcher table pairs are as follows: Symplectic Butcher tables --------------------------- -ARKODE_SYMPLECTIC_EULER_1_1 +ARKODE_SPRK_EULER_1_1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 1st-order symplectic Euler method -Accessible via the constant ``ARKODE_SYMPLECTIC_EULER_1_1`` to +Accessible via the constant ``ARKODE_SPRK_EULER_1_1`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Symplectic Euler method. -ARKODE_SYMPLECTIC_LEAPFROG_2_2 +ARKODE_SPRK_LEAPFROG_2_2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 2nd-order Leapfrog method -Accessible via the constant ``ARKODE_SYMPLECTIC_LEAPFROG_2_2`` to +Accessible via the constant ``ARKODE_SPRK_LEAPFROG_2_2`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Leapfrog/Verlet method. -ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 +ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 2nd-order Pseudo Leapfrog method -Accessible via the constant ``ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2`` to +Accessible via the constant ``ARKODE_SPRK_PSEUDO_LEAPFROG_2_2`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Pseudo Leapfrog/Verlet method. -ARKODE_SYMPLECTIC_MCLACHLAN_2_2 +ARKODE_SPRK_MCLACHLAN_2_2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 2nd-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_2_2`` to +Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_2_2`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_RUTH_3_3 +ARKODE_SPRK_RUTH_3_3 ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 3rd-order Ruth method -Accessible via the constant ``ARKODE_SYMPLECTIC_RUTH_3_3`` to +Accessible via the constant ``ARKODE_SPRK_RUTH_3_3`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. -ARKODE_SYMPLECTIC_MCLACHLAN_3_3 +ARKODE_SPRK_MCLACHLAN_3_3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 3rd-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_3_3`` to +Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_3_3`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_MCLACHLAN_4_4 +ARKODE_SPRK_MCLACHLAN_4_4 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 4th-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_4_4`` to +Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_4_4`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4 +ARKODE_SPRK_CANDY_ROZMUS_4_4 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 4th-order Candy-Rozmus method -Accessible via the constant ``ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4`` to +Accessible via the constant ``ARKODE_SPRK_CANDY_ROZMUS_4_4`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. -ARKODE_SYMPLECTIC_MCLACHLAN_5_6 +ARKODE_SPRK_MCLACHLAN_5_6 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 5th-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_MCLACHLAN_5_6`` to +Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_5_6`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_YOSHIDA_6_8 +ARKODE_SPRK_YOSHIDA_6_8 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 6th-order Yoshida method -Accessible via the constant ``ARKODE_SYMPLECTIC_YOSHIDA_6_8`` to +Accessible via the constant ``ARKODE_SPRK_YOSHIDA_6_8`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. -ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16 +ARKODE_SPRK_SUZUKI_UMENO_8_16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 8th-order McLachlan method -Accessible via the constant ``ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16`` to +Accessible via the constant ``ARKODE_SPRK_SUZUKI_UMENO_8_16`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. -ARKODE_SYMPLECTIC_SOFRONIOU_10_36 +ARKODE_SPRK_SOFRONIOU_10_36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: 10th-order Sofroniou method -Accessible via the constant ``ARKODE_SYMPLECTIC_SOFRONIOU_10_36`` to +Accessible via the constant ``ARKODE_SPRK_SOFRONIOU_10_36`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 10th order method given by Sofroniou in :cite:p:`Sofroniou:05`. diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index d4a9fb5be9..f6cec4ef97 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -260,29 +260,29 @@ contains the ARKODE output constants. +--------------------------------------------------+------------------------------------------------------------+ | **Symplectic Method storage specification** | | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_EULER_1_1` | Symplectic Euler 1st order method with 1 stage. | + | :c:macro:`ARKODE_SPRK_EULER_1_1` | Symplectic Euler 1st order method with 1 stage. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_LEAPFROG_2_2` | Symplectic Leapfrog 2nd order method with 2 stages. | + | :c:macro:`ARKODE_SPRK_LEAPFROG_2_2` | Symplectic Leapfrog 2nd order method with 2 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2` | Symplectic Pseudo Leapfrog 2nd order method with 2 stages. | + | :c:macro:`ARKODE_SPRK_PSEUDO_LEAPFROG_2_2` | Symplectic Pseudo Leapfrog 2nd order method with 2 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_RUTH_3_3` | Symplectic Ruth 3rd order method with 3 stages. | + | :c:macro:`ARKODE_SPRK_RUTH_3_3` | Symplectic Ruth 3rd order method with 3 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_2_2` | Symplectic McLachlan 2nd order method with 2 stages. | + | :c:macro:`ARKODE_SPRK_MCLACHLAN_2_2` | Symplectic McLachlan 2nd order method with 2 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_3_3` | Symplectic McLachlan 3rd order method with 3 stages. | + | :c:macro:`ARKODE_SPRK_MCLACHLAN_3_3` | Symplectic McLachlan 3rd order method with 3 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4` | Symplectic Candy-Rozmus 4th order method with 4 stages. | + | :c:macro:`ARKODE_SPRK_CANDY_ROZMUS_4_4` | Symplectic Candy-Rozmus 4th order method with 4 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_4_4` | Symplectic McLachlan 4th order method with 4 stages. | + | :c:macro:`ARKODE_SPRK_MCLACHLAN_4_4` | Symplectic McLachlan 4th order method with 4 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_MCLACHLAN_5_6` | Symplectic McLachlan 5th order method with 6 stages. | + | :c:macro:`ARKODE_SPRK_MCLACHLAN_5_6` | Symplectic McLachlan 5th order method with 6 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_YOSHIDA_6_8` | Symplectic Yoshida 6th order method with 8 stages. | + | :c:macro:`ARKODE_SPRK_YOSHIDA_6_8` | Symplectic Yoshida 6th order method with 8 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16` | Symplectic McLachlan 8th order method with 16 stages. | + | :c:macro:`ARKODE_SPRK_SUZUKI_UMENO_8_16` | Symplectic McLachlan 8th order method with 16 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SYMPLECTIC_SOFRONIOU_10_36` | Symplectic Sofroniou 10th order method with 36 stages. | + | :c:macro:`ARKODE_SPRK_SOFRONIOU_10_36` | Symplectic Sofroniou 10th order method with 36 stages. | +--------------------------------------------------+------------------------------------------------------------+ diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 085a2e3e29..de3b99bdf5 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -44,15 +44,15 @@ set(ARKODE_examples "ark_kepler\;--stepper ERK --step-mode adapt\;develop" "ark_kepler\;--stepper ERK --step-mode fixed --count-orbits\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --count-orbits --use-compensated-sums\;develop" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_EULER_1_1 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_2_2 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_RUTH_3_3 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_3_3 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_4_4 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_MCLACHLAN_5_6 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SYMPLECTIC_YOSHIDA_6_8 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_EULER_1_1 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_MCLACHLAN_2_2 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_RUTH_3_3 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_MCLACHLAN_3_3 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_MCLACHLAN_4_4 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_MCLACHLAN_5_6 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_YOSHIDA_6_8 --tf 50 --check-order --nout 1\;exclude-single" "ark_kpr_mri\;\;develop" "ark_kpr_mri\;0 0.002\;develop" "ark_kpr_mri\;1 0.002\;develop" diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 8ee7434e5b..5861c74978 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -44,7 +44,7 @@ * * --step-mode should we use a fixed time-step or adaptive time-step (default fixed) * --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK) - * --method which method to use (default ARKODE_SYMPLECTIC_MCLACHLAN_4_4) + * --method which method to use (default ARKODE_SPRK_MCLACHLAN_4_4) * --use-compensated-sums turns on compensated summation in ARKODE where applicable * --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) * --tf the final time for the simulation (default 100) @@ -726,7 +726,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) { if (args->stepper == 0) { - args->method_name = "ARKODE_SYMPLECTIC_MCLACHLAN_4_4"; + args->method_name = "ARKODE_SPRK_MCLACHLAN_4_4"; } else if (args->stepper == 1) { @@ -758,7 +758,7 @@ void PrintHelp() " --stepper should we use SPRKStep or ARKStep " "with an ERK method (default SPRK)\n"); fprintf(stderr, " --method which method to use (default " - "ARKODE_SYMPLECTIC_MCLACHLAN_4_4)\n"); + "ARKODE_SPRK_MCLACHLAN_4_4)\n"); fprintf(stderr, " --use-compensated-sums turns on compensated summation in " "ARKODE where applicable\n"); diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 5d4c8f6cbe..bd2944594e 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -27,19 +27,19 @@ typedef enum { ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ ARKODE_MIN_SPRK_NUM = 0, - ARKODE_SYMPLECTIC_EULER_1_1 = ARKODE_MIN_SPRK_NUM, - ARKODE_SYMPLECTIC_LEAPFROG_2_2, - ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2, - ARKODE_SYMPLECTIC_RUTH_3_3, - ARKODE_SYMPLECTIC_MCLACHLAN_2_2, - ARKODE_SYMPLECTIC_MCLACHLAN_3_3, - ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4, - ARKODE_SYMPLECTIC_MCLACHLAN_4_4, - ARKODE_SYMPLECTIC_MCLACHLAN_5_6, - ARKODE_SYMPLECTIC_YOSHIDA_6_8, - ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16, - ARKODE_SYMPLECTIC_SOFRONIOU_10_36, - ARKODE_MAX_SPRK_NUM = ARKODE_SYMPLECTIC_SOFRONIOU_10_36 + ARKODE_SPRK_EULER_1_1 = ARKODE_MIN_SPRK_NUM, + ARKODE_SPRK_LEAPFROG_2_2, + ARKODE_SPRK_PSEUDO_LEAPFROG_2_2, + ARKODE_SPRK_RUTH_3_3, + ARKODE_SPRK_MCLACHLAN_2_2, + ARKODE_SPRK_MCLACHLAN_3_3, + ARKODE_SPRK_CANDY_ROZMUS_4_4, + ARKODE_SPRK_MCLACHLAN_4_4, + ARKODE_SPRK_MCLACHLAN_5_6, + ARKODE_SPRK_YOSHIDA_6_8, + ARKODE_SPRK_SUZUKI_UMENO_8_16, + ARKODE_SPRK_SOFRONIOU_10_36, + ARKODE_MAX_SPRK_NUM = ARKODE_SPRK_SOFRONIOU_10_36 } ARKODE_SPRKMethodID; struct ARKodeSPRKStorage_s diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 55b0c9e3b5..ef68bd54c0 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -29,14 +29,14 @@ extern "C" { * SPRKStep Constants * ----------------- */ -static const int SPRKSTEP_DEFAULT_1 = ARKODE_SYMPLECTIC_EULER_1_1; -static const int SPRKSTEP_DEFAULT_2 = ARKODE_SYMPLECTIC_LEAPFROG_2_2; -static const int SPRKSTEP_DEFAULT_3 = ARKODE_SYMPLECTIC_MCLACHLAN_3_3; -static const int SPRKSTEP_DEFAULT_4 = ARKODE_SYMPLECTIC_MCLACHLAN_4_4; -static const int SPRKSTEP_DEFAULT_5 = ARKODE_SYMPLECTIC_MCLACHLAN_5_6; -static const int SPRKSTEP_DEFAULT_6 = ARKODE_SYMPLECTIC_YOSHIDA_6_8; -static const int SPRKSTEP_DEFAULT_8 = ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16; -static const int SPRKSTEP_DEFAULT_10 = ARKODE_SYMPLECTIC_SOFRONIOU_10_36; +static const int SPRKSTEP_DEFAULT_1 = ARKODE_SPRK_EULER_1_1; +static const int SPRKSTEP_DEFAULT_2 = ARKODE_SPRK_LEAPFROG_2_2; +static const int SPRKSTEP_DEFAULT_3 = ARKODE_SPRK_MCLACHLAN_3_3; +static const int SPRKSTEP_DEFAULT_4 = ARKODE_SPRK_MCLACHLAN_4_4; +static const int SPRKSTEP_DEFAULT_5 = ARKODE_SPRK_MCLACHLAN_5_6; +static const int SPRKSTEP_DEFAULT_6 = ARKODE_SPRK_YOSHIDA_6_8; +static const int SPRKSTEP_DEFAULT_8 = ARKODE_SPRK_SUZUKI_UMENO_8_16; +static const int SPRKSTEP_DEFAULT_10 = ARKODE_SPRK_SOFRONIOU_10_36; /* ------------------- * Exported Functions diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index f8f284f7c0..e161699f2d 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -420,71 +420,71 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) { switch (id) { - case ARKODE_SYMPLECTIC_EULER_1_1: return ARKodeSymplecticEuler(); - case ARKODE_SYMPLECTIC_LEAPFROG_2_2: return ARKodeSymplecticLeapfrog2(); - case ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2: + case ARKODE_SPRK_EULER_1_1: return ARKodeSymplecticEuler(); + case ARKODE_SPRK_LEAPFROG_2_2: return ARKodeSymplecticLeapfrog2(); + case ARKODE_SPRK_PSEUDO_LEAPFROG_2_2: return ARKodeSymplecticPseudoLeapfrog2(); - case ARKODE_SYMPLECTIC_RUTH_3_3: return ARKodeSymplecticRuth3(); - case ARKODE_SYMPLECTIC_MCLACHLAN_2_2: return ARKodeSymplecticMcLachlan2(); - case ARKODE_SYMPLECTIC_MCLACHLAN_3_3: return ARKodeSymplecticMcLachlan3(); - case ARKODE_SYMPLECTIC_MCLACHLAN_4_4: return ARKodeSymplecticMcLachlan4(); - case ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4: + case ARKODE_SPRK_RUTH_3_3: return ARKodeSymplecticRuth3(); + case ARKODE_SPRK_MCLACHLAN_2_2: return ARKodeSymplecticMcLachlan2(); + case ARKODE_SPRK_MCLACHLAN_3_3: return ARKodeSymplecticMcLachlan3(); + case ARKODE_SPRK_MCLACHLAN_4_4: return ARKodeSymplecticMcLachlan4(); + case ARKODE_SPRK_CANDY_ROZMUS_4_4: return ARKodeSymplecticCandyRozmus4(); - case ARKODE_SYMPLECTIC_MCLACHLAN_5_6: return ARKodeSymplecticMcLachlan5(); - case ARKODE_SYMPLECTIC_YOSHIDA_6_8: return ARKodeSymplecticYoshida6(); - case ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16: return ARKodeSymplecticSuzukiUmeno816(); - case ARKODE_SYMPLECTIC_SOFRONIOU_10_36: return ARKodeSymplecticSofroniou10(); + case ARKODE_SPRK_MCLACHLAN_5_6: return ARKodeSymplecticMcLachlan5(); + case ARKODE_SPRK_YOSHIDA_6_8: return ARKodeSymplecticYoshida6(); + case ARKODE_SPRK_SUZUKI_UMENO_8_16: return ARKodeSymplecticSuzukiUmeno816(); + case ARKODE_SPRK_SOFRONIOU_10_36: return ARKodeSymplecticSofroniou10(); default: return NULL; } } ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) { - if (!strcmp(method, "ARKODE_SYMPLECTIC_EULER_1_1")) + if (!strcmp(method, "ARKODE_SPRK_EULER_1_1")) { return ARKodeSymplecticEuler(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_LEAPFROG_2_2")) + if (!strcmp(method, "ARKODE_SPRK_LEAPFROG_2_2")) { return ARKodeSymplecticLeapfrog2(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2")) + if (!strcmp(method, "ARKODE_SPRK_PSEUDO_LEAPFROG_2_2")) { return ARKodeSymplecticPseudoLeapfrog2(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_RUTH_3_3")) + if (!strcmp(method, "ARKODE_SPRK_RUTH_3_3")) { return ARKodeSymplecticRuth3(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_2_2")) + if (!strcmp(method, "ARKODE_SPRK_MCLACHLAN_2_2")) { return ARKodeSymplecticMcLachlan2(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_3_3")) + if (!strcmp(method, "ARKODE_SPRK_MCLACHLAN_3_3")) { return ARKodeSymplecticMcLachlan3(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_4_4")) + if (!strcmp(method, "ARKODE_SPRK_MCLACHLAN_4_4")) { return ARKodeSymplecticMcLachlan4(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_CANDY_ROZMUS_4_4")) + if (!strcmp(method, "ARKODE_SPRK_CANDY_ROZMUS_4_4")) { return ARKodeSymplecticCandyRozmus4(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_MCLACHLAN_5_6")) + if (!strcmp(method, "ARKODE_SPRK_MCLACHLAN_5_6")) { return ARKodeSymplecticMcLachlan5(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_YOSHIDA_6_8")) + if (!strcmp(method, "ARKODE_SPRK_YOSHIDA_6_8")) { return ARKodeSymplecticYoshida6(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_SUZUKI_UMENO_8_16")) + if (!strcmp(method, "ARKODE_SPRK_SUZUKI_UMENO_8_16")) { return ARKodeSymplecticSuzukiUmeno816(); } - if (!strcmp(method, "ARKODE_SYMPLECTIC_SOFRONIOU_10_36")) + if (!strcmp(method, "ARKODE_SPRK_SOFRONIOU_10_36")) { return ARKodeSymplecticSofroniou10(); } From 74383d7860554c2fdc4fcb5a0f7a8a2a1d2bd3a0 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 29 Jun 2023 11:42:23 -0700 Subject: [PATCH 111/177] address more PR comments --- .../SPRKStep_c_interface/User_callable.rst | 108 +++--------------- doc/shared/sundials.bib | 43 ++++--- examples/arkode/C_serial/ark_kepler.c | 2 +- include/arkode/arkode_sprkstep.h | 4 - src/arkode/arkode_sprkstep_io.c | 15 --- 5 files changed, 43 insertions(+), 129 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 97604e51b9..c177f00285 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -281,10 +281,6 @@ Optional inputs for SPRKStep +-----------------------------------------------------+------------------------------------------+------------------------+ | Set fixed step size (disables time step adaptivity) | :c:func:`SPRKStepSetFixedStep()` | disabled | +-----------------------------------------------------+------------------------------------------+------------------------+ - | Supply an initial step size to attempt | :c:func:`SPRKStepSetInitStep()` | estimated | - +-----------------------------------------------------+------------------------------------------+------------------------+ - | Maximum no. of warnings for :math:`t_n+h = t_n` | :c:func:`SPRKStepSetMaxHnilWarns()` | 10 | - +-----------------------------------------------------+------------------------------------------+------------------------+ | Maximum no. of internal steps before *tout* | :c:func:`SPRKStepSetMaxNumSteps()` | 500 | +-----------------------------------------------------+------------------------------------------+------------------------+ | Set a value for :math:`t_{stop}` | :c:func:`SPRKStepSetStopTime()` | undefined | @@ -455,29 +451,6 @@ Optional inputs for SPRKStep calling :c:func:`SPRKStepEvolve()` to resume integration. -.. c:function:: int SPRKStepSetInitStep(void* arkode_mem, realtype hin) - - Specifies the initial time step size SPRKStep should use after - initialization, re-initialization, or resetting. - - :param arkode_mem: pointer to the SPRKStep memory block. - :param hin: value of the initial step to be attempted :math:`(\ne 0)`. - - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value - - **Notes:** - Pass 0.0 to use the default value. - - By default, SPRKStep estimates the initial step size to be - :math:`h = \sqrt{\dfrac{2}{\left\| \ddot{y} \right\|}}`, where - :math:`\ddot{y}` is an estimate of the second derivative of the - solution at :math:`t_0`. - - - .. c:function:: int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps) Specifies the maximum number of steps to be taken by the @@ -498,29 +471,6 @@ Optional inputs for SPRKStep Passing *mxsteps* < 0 disables the test (not recommended). - -.. c:function:: int SPRKStepSetMaxHnilWarns(void* arkode_mem, int mxhnil) - - Specifies the maximum number of messages issued by the - solver to warn that :math:`t+h=t` on the next internal step, before - SPRKStep will instead return with an error. - - **Arguments:** - * *arkode_mem* -- pointer to the SPRKStep memory block. - * *mxhnil* -- maximum allowed number of warning messages :math:`(>0)`. - - **Return value:** - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value - - **Notes:** - The default value is 10; set *mxhnil* to zero to specify - this default. - - A negative value indicates that no warning messages should be issued. - - .. c:function:: int SPRKStepSetStopTime(void* arkode_mem, realtype tstop) Specifies the value of the independent variable @@ -590,7 +540,7 @@ Optional inputs for IVP method selection +-----------------------------+-------------------------------------------+----------+ | Optional input | Function name | Default | - +-----------------------------+-------------------------------------------+----------+ + +=============================+===========================================+==========+ | Set integrator method order | :c:func:`SPRKStepSetOrder()` | 4 | +-----------------------------+-------------------------------------------+----------+ | Set SPRK method | :c:func:`SPRKStepSetMethod()` | internal | @@ -692,7 +642,7 @@ described in :numref:`ARKODE.Mathematics.Rootfinding`. +-----------------------------------------+-------------------------------------------+----------+ | Optional input | Function name | Default | - +-----------------------------------------+-------------------------------------------+----------+ + +=========================================+===========================================+==========+ | Direction of zero-crossings to monitor | :c:func:`SPRKStepSetRootDirection()` | both | +-----------------------------------------+-------------------------------------------+----------+ | Disable inactive root warnings | :c:func:`SPRKStepSetNoInactiveRootWarn()` | enabled | @@ -853,7 +803,7 @@ Main solver optional output functions +-----------------------------------------------------+--------------------------------------------+ | Optional output | Function name | - +-----------------------------------------------------+--------------------------------------------+ + +=====================================================+============================================+ | Cumulative number of internal steps | :c:func:`SPRKStepGetNumSteps()` | +-----------------------------------------------------+--------------------------------------------+ | Step size used for the last successful step | :c:func:`SPRKStepGetLastStep()` | @@ -1077,7 +1027,7 @@ Rootfinding optional output functions +--------------------------------------------------+---------------------------------+ | Optional output | Function name | - +--------------------------------------------------+---------------------------------+ + +==================================================+=================================+ | Array showing roots found | :c:func:`SPRKStepGetRootInfo()` | +--------------------------------------------------+---------------------------------+ | No. of calls to user root function | :c:func:`SPRKStepGetNumGEvals()`| @@ -1195,23 +1145,14 @@ Runge--Kutta stages, denoted by *s*, be no larger for the new problem than for the previous problem. This condition is automatically fulfilled if the method order *q* is left unchanged. -One important use of the :c:func:`SPRKStepReInit()` function is in the -treating of jump discontinuities in the RHS function. Except in cases -of fairly small jumps, it is usually more efficient to stop at each -point of discontinuity and restart the integrator with a readjusted -ODE model, using a call to this routine. To stop when the location -of the discontinuity is known, simply make that location a value of -``tout``. To stop when the location of the discontinuity is -determined by the solution, use the rootfinding feature. In either -case, it is critical that the RHS function *not* incorporate the -discontinuity, but rather have a smooth extension over the -discontinuity, so that the step across it (and subsequent rootfinding, -if used) can be done efficiently. Then use a switch within the RHS -function (communicated through ``user_data``) that can be flipped -between the stopping of the integration and the restart, so that the -restarted problem uses the new values (which have jumped). Similar -comments apply if there is to be a jump in the dependent variable -vector. +One potential use of the :c:func:`SPRKStepReInit()` function is in the +treating of jump discontinuities in the RHS function :cite:p:`Tao:22`. +In lieu of including if statements within the RHS function to handle +discontinuities, it may be more computationally efficient to stop at each +point of discontinuity (e.g., through use of tout or the rootfinding feature) +and restart the integrator with a readjusted ODE model, using a call to +this routine. We note that for the solution to retain temporal accuracy, +the RHS function should not incorporate the discontinuity. .. c:function:: int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0) @@ -1260,26 +1201,7 @@ via a call to :c:func:`SPRKStepSetStopTime()`. Following a successful call to :c:func:`SPRKStepReset()`, call :c:func:`SPRKStepEvolve()` again to continue solving the problem. By default the next call to :c:func:`SPRKStepEvolve()` will use the step size computed by SPRKStep prior to calling :c:func:`SPRKStepReset()`. -To set a different step size or have SPRKStep estimate a new step size use -:c:func:`SPRKStepSetInitStep()`. - -One important use of the :c:func:`SPRKStepReset()` function is in the -treating of jump discontinuities in the RHS functions. Except in cases -of fairly small jumps, it is usually more efficient to stop at each -point of discontinuity and restart the integrator with a readjusted -ODE model, using a call to :c:func:`SPRKStepReset()`. To stop when -the location of the discontinuity is known, simply make that location -a value of ``tout``. To stop when the location of the discontinuity -is determined by the solution, use the rootfinding feature. In either -case, it is critical that the RHS functions *not* incorporate the -discontinuity, but rather have a smooth extension over the -discontinuity, so that the step across it (and subsequent rootfinding, -if used) can be done efficiently. Then use a switch within the RHS -functions (communicated through ``user_data``) that can be flipped -between the stopping of the integration and the restart, so that the -restarted problem uses the new values (which have jumped). Similar -comments apply if there is to be a jump in the dependent variable -vector. + .. c:function:: int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) @@ -1298,9 +1220,7 @@ vector. **Notes:** By default the next call to :c:func:`SPRKStepEvolve()` will use the step size - computed by SPRKStep prior to calling :c:func:`SPRKStepReset()`. To set a - different step size or have SPRKStep estimate a new step size use - :c:func:`SPRKStepSetInitStep()`. + computed by SPRKStep prior to calling :c:func:`SPRKStepReset()`. All previously set options are retained but may be updated by calling the appropriate "Set" functions. diff --git a/doc/shared/sundials.bib b/doc/shared/sundials.bib index 6613f3fb16..ae6f79a081 100644 --- a/doc/shared/sundials.bib +++ b/doc/shared/sundials.bib @@ -2032,24 +2032,37 @@ @article{Ver:78 } @article{Ruth:93, - title={A canonical integration technique}, - author={Ruth, Ronald D}, - journal={IEEE Trans. Nucl. Sci.}, - volume={30}, - number={CERN-LEP-TH-83-14}, - pages={2669--2671}, - year={1983} + title = {A canonical integration technique}, + author = {Ruth, Ronald D}, + journal = {IEEE Trans. Nucl. Sci.}, + volume = {30}, + number = {CERN-LEP-TH-83-14}, + pages = {2669--2671}, + year = {1983} } @article{Sofroniou:05, - title={Derivation of symmetric composition constants for symmetric integrators}, - author={Sofroniou, Mark and Spaletta, Giulia}, - journal={Optimization Methods and Software}, - volume={20}, - number={4-5}, - pages={597--613}, - year={2005}, - publisher={Taylor \& Francis} + title = {Derivation of symmetric composition constants for symmetric integrators}, + author = {Sofroniou, Mark and Spaletta, Giulia}, + journal = {Optimization Methods and Software}, + volume = {20}, + number = {4-5}, + pages = {597--613}, + year = {2005}, + publisher = {Taylor \& Francis} +} + +@article{Tao:22, + title = {Accurate and efficient simulations of Hamiltonian mechanical systems with discontinuous potentials}, + journal = {Journal of Computational Physics}, + volume = {450}, + pages = {110846}, + year = {2022}, + issn = {0021-9991}, + doi = {https://doi.org/10.1016/j.jcp.2021.110846}, + url = {https://www.sciencedirect.com/science/article/pii/S0021999121007415}, + author = {Molei Tao and Shi Jin}, + keywords = {Symplectic integrator, Time-reversible / symmetric integrator, Hamiltonian with discontinuous potential, Contact and impact at interface, Reflection and refraction, Sauteed mushroom} } @article{KnWo:98, diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 5861c74978..eaedc10dd1 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -63,7 +63,7 @@ #include /* prototypes for ARKStep fcts., consts */ #include -#include /* prototypes for MRIStep fcts., consts */ +#include /* prototypes for SPRKStep fcts., consts */ #include #include /* serial N_Vector type, fcts., macros */ #include diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index ef68bd54c0..9fe9646a17 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -68,11 +68,7 @@ SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree); /* TODO(CJB): should we remove this from the initial release and wait for the OO * adaptivity? */ -SUNDIALS_EXPORT int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, - void* h_data); SUNDIALS_EXPORT int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps); -SUNDIALS_EXPORT int SPRKStepSetMaxHnilWarns(void* arkode_mem, int mxhnil); -SUNDIALS_EXPORT int SPRKStepSetInitStep(void* arkode_mem, realtype hin); SUNDIALS_EXPORT int SPRKStepSetStopTime(void* arkode_mem, realtype tstop); SUNDIALS_EXPORT int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed); SUNDIALS_EXPORT int SPRKStepSetErrHandlerFn(void* arkode_mem, diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 1f41f1796f..c1eec9e781 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -58,16 +58,6 @@ int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps) return (arkSetMaxNumSteps(arkode_mem, mxsteps)); } -int SPRKStepSetMaxHnilWarns(void* arkode_mem, int mxhnil) -{ - return (arkSetMaxHnilWarns(arkode_mem, mxhnil)); -} - -int SPRKStepSetInitStep(void* arkode_mem, realtype hin) -{ - return (arkSetInitStep(arkode_mem, hin)); -} - int SPRKStepSetStopTime(void* arkode_mem, realtype tstop) { return (arkSetStopTime(arkode_mem, tstop)); @@ -98,11 +88,6 @@ int SPRKStepSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStag return (arkSetPostprocessStageFn(arkode_mem, ProcessStage)); } -int SPRKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data) -{ - return (arkSetAdaptivityFn(arkode_mem, hfun, h_data)); -} - int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed) { return (arkSetFixedStep(arkode_mem, hfixed)); From 904f17b51747d02e574dd5122d692568b59f2c57 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 29 Jun 2023 12:16:11 -0700 Subject: [PATCH 112/177] update references --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 2 +- doc/arkode/guide/source/Butcher.rst | 8 ++++---- doc/shared/sundials.bib | 8 ++++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 6ae4192da7..27cb262495 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -69,7 +69,7 @@ The following enum values are used to identify different SPRK methods: .. c:macro:: ARKODE_SPRK_SUZUKI_UMENO_8_16 - Identifier for the Symplectic McLachlan 8th order method with 16 stages. + Identifier for the Symplectic Suzuki-Umeno 8th order method with 16 stages. .. c:macro:: ARKODE_SPRK_SOFRONIOU_10_36 diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 31d3f3c47c..1af5f72f58 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1814,18 +1814,18 @@ This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. ARKODE_SPRK_SUZUKI_UMENO_8_16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. index:: 8th-order McLachlan method +.. index:: 8th-order Suzuki-Umeno method Accessible via the constant ``ARKODE_SPRK_SUZUKI_UMENO_8_16`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. -This is the 8th order method given by McLachlan in :cite:p:`Mclachlan:92`. +This is the 8th order method given by Suzuki and Umeno in :cite:p:`Suzuki:93`. ARKODE_SPRK_SOFRONIOU_10_36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. index:: 10th-order Sofroniou method +.. index:: 10th-order Sofroniou-Spaletta method Accessible via the constant ``ARKODE_SPRK_SOFRONIOU_10_36`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. -This is the 10th order method given by Sofroniou in :cite:p:`Sofroniou:05`. +This is the 10th order method given by Sofroniou and Spaletta in :cite:p:`Sofroniou:05`. diff --git a/doc/shared/sundials.bib b/doc/shared/sundials.bib index ae6f79a081..fe2904f1ee 100644 --- a/doc/shared/sundials.bib +++ b/doc/shared/sundials.bib @@ -2052,6 +2052,14 @@ @article{Sofroniou:05 publisher = {Taylor \& Francis} } +@article{Suzuki:93, + title = {Higher-order decomposition theory of exponential operators and its applications to QMC and nonlinear dynamics}, + author = {Suzuki, M and Umeno, K}, + journal = {Computer simulation studies in condensed-matter physics VI}, + pages = {74--86}, + year = {1993} +} + @article{Tao:22, title = {Accurate and efficient simulations of Hamiltonian mechanical systems with discontinuous potentials}, journal = {Journal of Computational Physics}, From c00d71e9b2208b8647773a15a512514e324755ce Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 29 Jun 2023 17:07:03 -0700 Subject: [PATCH 113/177] add time-dependent example and discuss it in math section --- doc/arkode/guide/source/Mathematics.rst | 100 +++++- .../Usage/SPRKStep_c_interface/Skeleton.rst | 4 +- .../SPRKStep_c_interface/User_callable.rst | 4 +- doc/shared/sundials.bib | 11 + examples/arkode/C_serial/CMakeLists.txt | 1 + .../C_serial/ark_anharmonic_symplectic.c | 307 ++++++++++++++++++ .../arkode/C_serial/ark_harmonic_symplectic.c | 64 ++-- scripts/arkode | 2 + src/arkode/arkode_sprkstep.c | 24 +- 9 files changed, 457 insertions(+), 60 deletions(-) create mode 100644 examples/arkode/C_serial/ark_anharmonic_symplectic.c diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 774e9c82c1..7e3c097cd2 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -468,7 +468,7 @@ SPRKStep -- Symplectic Partitioned Runge--Kutta methods The SPRKStep time-stepping module in ARKODE is designed for IVPs of the form .. math:: - \dot{p} = f_1(q,t) = \frac{\partial V(q,t)}{\partial q}, \quad + \dot{p} = f_1(q) = \frac{\partial V(q)}{\partial q}, \quad \dot{q} = f_2(p) = \frac{\partial T(p)}{\partial p}, \qquad p(t_0) = p_0,\quad q(t_0) = q_0, :label: ARKODE_IVP_Hamiltonian @@ -476,26 +476,29 @@ The SPRKStep time-stepping module in ARKODE is designed for IVPs of the form where .. math:: - H(p, q, t) = T(p) + V(q, t) + H(p, q) = T(p) + V(q) -is the system Hamiltonian. When :math:`\mathrm{d}H/\mathrm{d}t = 0`, i.e. when *H* is autonomous, then *H* is a conserved quantity. -Often this correponds to the conservation of energy (for example, in *n*-body problems). +is the system Hamiltonian that is separable. When *H* is autonomous, then *H* is +a conserved quantity. Often this correponds to the conservation of energy (for +example, in *n*-body problems). In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form .. math:: \dot{y} = \begin{bmatrix} - f_1(q,t) \\ + f_1(q) \\ f_2(p) - \end{bmatrix} \qquad + \end{bmatrix}, \qquad y(t_0) = \begin{bmatrix} p_0\\ q_0 \end{bmatrix}. -SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair of Butcher tableau, +In practice, the ordering of the variables does not matter and is determined by the user. +SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair +of Butcher tableau, .. math:: \begin{array}{c|cccc} @@ -516,23 +519,27 @@ SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} \end{array}. -We use a compact storage of these coefficients in terms of two arrays, one for *a* and one for *b*. -The time weights are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and -:math:`\hat{c}_j = \sum_{i=1}^j \hat{a}_i` respectively. These methods approximately conserve a nearby -Hamiltonian for exponentially long times :cite:p:`HaWa:06`. -SPRKStep makes the assumption that the Hamiltonian is separable, -in which case the schemes are explicit. SPRKStep provides methods with order of accuracy and conservation -equal to :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these methods, and the default methods used, -are given in the section :numref:`SPRKStorage`. +We use a compact storage of these coefficients in terms of two arrays, one for +*a* and one for *b*. The time weights (which matter for non-autonomous systems) +are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and :math:`\hat{c}_j += \sum_{i=1}^j \hat{a}_i` respectively. These methods approximately conserve a +nearby Hamiltonian for exponentially long times :cite:p:`HaWa:06`. SPRKStep +makes the assumption that the Hamiltonian is separable, in which case the +schemes are explicit. SPRKStep provides methods with order of accuracy and +conservation equal to :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these +methods, and the default methods used, are given in the section +:numref:`SPRKStorage`. In the default case, the algorithm for a single time-step is as follows +(for autonomous Hamiltonian systems the times provided to :math:`f1` and :math:`f2` +can be ignored). #. Set :math:`P_0 = p_n, Q_1 = q_n` #. For :math:`i = 1,\ldots,s` do: - #. :math:`P_i = P_{i-1} + h_{n+1} \hat{a}_i f_1(Q_i, t_n + \hat{c}_i h_{n+1})` - #. :math:`Q_{i+1} = Q_i + h_{n+1} a_i f_2(P_i)` + #. :math:`P_i = P_{i-1} + h_{n+1} \hat{a}_i f_1(Q_i, t_n + c_i h)` + #. :math:`Q_{i+1} = Q_i + h_{n+1} a_i f_2(P_i, t_n + \hat{c}_i h)` #. Set :math:`p_{n+1} = P_s, q_{n+1} = Q_{s+1}` @@ -547,7 +554,7 @@ be stored. However, it signficantly more robust to roundoff error accumulation. #. For :math:`i = 1,\ldots,s` do: - #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} \hat{a}_i f_1(q_n + \Delta Q_i, t_n + \hat{c}_i h_{n+1})` + #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} \hat{a}_i f_1(q_n + \Delta Q_i)` #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} a_i f_2(p_n + \Delta P_i)` #. Set :math:`\Delta p_{n+1} = \Delta P_s, \Delta q_{n+1} = \Delta Q_{s+1}` @@ -562,6 +569,63 @@ conservation property :cite:p:`HaWa:06`, SPRKStep employs a fixed time-step siz .. The `ark_kepler.c` example demonstrates an implementation of such controller. +.. _ARKODE.Mathematics.SPRKStep.Nonautonomous: + +Non-autonomous systems +---------------------- + +SPRKStep also supports non-autonomous separable Hamiltonian systems of the form + +.. math:: + \dot{p} = f_1(q, t) = \frac{\partial V(q, t)}{\partial q}, \quad + \dot{q} = f_2(p, t) = \frac{\partial T(p, t)}{\partial p}, + \qquad p(t_0) = p_0,\quad q(t_0) = q_0, + :label: ARKODE_IVP_Hamiltonian_Time_Dependent + +where + +.. math:: + H(p, q, t) = T(p, t) + V(q, t) + +In this non-autonomous case, the Hamiltonian no longer yields a conserved quantity (such as energy) +although other invariants may exist :cite:p:`Struckmeier:02`. +However, symplectic methods still are benefical to use for the long-time integration of these systems. +For example, they may accurately capture the bounded energy of the system :cite:p:``. + +To handle non-autonomous systems SPRKStep considers the extended system (like the autonomous case, +the ordering of the variables is notational only and is determined by the user): + +.. math:: + + \begin{cases} + \dot{q_\tau} = 1 \\ + \dot{q} = f_1(p_0, p) + \end{cases}, + \qquad + \begin{cases} + \dot{p_\tau} = 1 \\ + \dot{p} = f_2(q_0, q) + \end{cases} + \quad + \rightarrow + \quad + \dot{y} = + \begin{bmatrix} + q_\tau \\ + f_1(q,t) \\ + p_\tau \\ + f_2(p,t) + \end{bmatrix}, \qquad + y(t_0) = + \begin{bmatrix} + 0 \\ + p_0\\ + 0 \\ + q_0 + \end{bmatrix}. + + + .. _ARKODE.Mathematics.MRIStep: MRIStep -- Multirate infinitesimal step methods diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst index 120a703c39..23ee4ae39f 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst @@ -27,7 +27,9 @@ referenced. This generally includes the problem size, ``N``, and may include the local vector length ``Nlocal``. The problem size ``N`` is the - size including both the ``q`` and ``p`` variables. + size including both the ``q`` and ``p`` variables. If the problem + is non-autonomous, then the size is ``N+2`` as two additional variables + must be stored for ``t`` (see :ref:`ARKODE.Mathematics.SPRKStep.Nonautonomous`) .. note:: diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index c177f00285..b396ac9eca 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -46,7 +46,7 @@ SPRKStep initialization and deallocation functions be solved using the SPRKStep time-stepping module in ARKODE. :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_1(q,t) = \frac{\partial V(q,t)}{\partial q}` - :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_2(p) = \frac{\partial T(p)}{\partial p}` + :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_2(p,t) = \frac{\partial T(p,t)}{\partial p}` :param t0: the initial value of :math:`t` :param y0: the initial condition vector :math:`y(t_0)` :param sunctx: the :c:type:`SUNContext` object (see :numref:`SUNDIALS.SUNContext`) @@ -58,7 +58,7 @@ SPRKStep initialization and deallocation functions SPRKStep requires a partitioned problem where ``f1`` should only modify the q variables and ``f2`` should only modify the p variables (or vice versa). However, the vector passed to these functions is the full vector with both p and q. The ordering of the - variables is up to the user. + variables is determined implicitly by the user when they set the initial conditions. .. c:function:: void SPRKStepFree(void** arkode_mem) diff --git a/doc/shared/sundials.bib b/doc/shared/sundials.bib index fe2904f1ee..e9ed8c14c3 100644 --- a/doc/shared/sundials.bib +++ b/doc/shared/sundials.bib @@ -2052,6 +2052,17 @@ @article{Sofroniou:05 publisher = {Taylor \& Francis} } +@article{Struckmeier:02, + title = {Canonical transformations and exact invariants for time-dependent Hamiltonian systems}, + author = {Struckmeier, J{\"u}rgen and Riedel, Claus}, + journal = {Annalen der Physik}, + volume = {11}, + number = {1}, + pages = {15--38}, + year = {2002}, + publisher = {Wiley Online Library} +} + @article{Suzuki:93, title = {Higher-order decomposition theory of exponential operators and its applications to QMC and nonlinear dynamics}, author = {Suzuki, M and Umeno, K}, diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index de3b99bdf5..5a45e4b644 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -38,6 +38,7 @@ set(ARKODE_examples "ark_brusselator1D_imexmri\;7 0.001\;exclude-single" "ark_brusselator1D\;\;exclude-single" "ark_harmonic_symplectic\;\;exclude-single" + "ark_anharmonic_symplectic\;\;exclude-single" "ark_heat1D_adapt\;\;develop" "ark_heat1D\;\;develop" "ark_kepler\;\;develop" diff --git a/examples/arkode/C_serial/ark_anharmonic_symplectic.c b/examples/arkode/C_serial/ark_anharmonic_symplectic.c new file mode 100644 index 0000000000..cc1391e332 --- /dev/null +++ b/examples/arkode/C_serial/ark_anharmonic_symplectic.c @@ -0,0 +1,307 @@ +/* clang-format: off */ +/* ---------------------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ---------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2023, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ---------------------------------------------------------------------------- + * In this example we consider the anharmonic oscillator + * q'(t) = p(t) + * p'(t) = -( omega^2(t)*q^2 + 3*a(t)*q^2 + 4*b(t)*q^3 ) + * With the initial conditions q(0) = 1, p(0) = 0. + * The Hamiltonian for the system is + * H(p,q,t) = 1/2*p^2 + 1/2*omega^2(t)*q^2 + a(t)*q^3 + b(t)*q^4 + * where omega(t) = cos(t/2), a(t) = 0.05*sin(t/3), b(t) = 0.08*cos^2(t/3). + * We simulate the problem on t = [0, 30] using the symplectic methods in + * SPRKStep. + * + * This is example 7.2 from: + * Struckmeier, J., & Riedel, C. (2002). Canonical transformations and exact + * invariants for time‐dependent Hamiltonian systems. Annalen der Physik, 11(1), + * 15-38. + * + * The example has the following command line arguments: + * --order the order of the method to use (default 4) + * --dt the fixed-time step size to use (default 0.01) + * --nout the number of output times (default 100) + * --use-compensated-sums turns on compensated summation in ARKODE where + * applicable + * --------------------------------------------------------------------------*/ +/* clang-format: on */ + +#include +#include /* prototypes for SPRKStep fcts., consts */ +#include +#include /* serial N_Vector type, fcts., macros */ +#include +#include +#include /* def. math fcns, 'sunrealtype' */ +#include +#include + +#include "arkode/arkode.h" + +typedef struct +{ + int order; + int num_output_times; + int use_compsums; + sunrealtype dt; +} ProgramArgs; + +/* RHS functions */ +static int pdot(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int qdot(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); + +/* Helper functions */ +static sunrealtype Hamiltonian(N_Vector yvec, sunrealtype t); +static int ParseArgs(int argc, char* argv[], ProgramArgs* args); +static void PrintHelp(); +static int check_retval(void* returnvalue, const char* funcname, int opt); + +int main(int argc, char* argv[]) +{ + ProgramArgs args; + SUNContext sunctx = NULL; + N_Vector y = NULL; + sunrealtype* ydata = NULL; + sunrealtype tout = NAN; + sunrealtype tret = NAN; + void* arkode_mem = NULL; + int iout = 0; + int retval = 0; + + /* Parse the command line arguments */ + if (ParseArgs(argc, argv, &args)) { return 1; }; + + /* Default integrator options */ + int order = args.order; + int use_compsums = args.use_compsums; + const int num_output_times = args.num_output_times; + + /* Default problem parameters */ + const sunrealtype T0 = SUN_RCONST(0.0); + sunrealtype Tf = SUN_RCONST(30.0); + sunrealtype dt = args.dt; + const sunrealtype dTout = (Tf - T0) / ((sunrealtype)num_output_times); + + /* Create the SUNDIALS context object for this simulation */ + retval = SUNContext_Create(NULL, &sunctx); + if (check_retval(&retval, "SUNContext_Create", 1)) return 1; + + printf("\n Begin time-dependent anharmonic oscillator problem\n\n"); + + /* Allocate our state vector */ + y = N_VNew_Serial(4, sunctx); + + /* Fill the initial conditions */ + ydata = N_VGetArrayPointer(y); + ydata[0] = 0; /* ptau */ + ydata[1] = 0; /* \dot{q} = p */ + ydata[2] = 0; /* qtau */ + ydata[3] = 1; /* \ddot{q} = \dot{p} */ + + /* Create SPRKStep integrator */ + arkode_mem = SPRKStepCreate(qdot, pdot, T0, y, sunctx); + + retval = SPRKStepSetOrder(arkode_mem, order); + if (check_retval(&retval, "SPRKStepSetOrder", 1)) { return 1; } + + retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); + if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) { return 1; } + + retval = SPRKStepSetFixedStep(arkode_mem, dt); + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) { return 1; } + + retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt)) + 2); + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) { return 1; } + + /* Print out starting Hamiltonian before integrating */ + tret = T0; + tout = T0 + dTout; + /* Output current integration status */ + fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", tret, + ydata[1], Hamiltonian(y, tret)); + + /* Do integration */ + for (iout = 0; iout < num_output_times; iout++) + { + SPRKStepSetStopTime(arkode_mem, tout); + retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); + + /* Output current integration status */ + fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", tret, + ydata[1], Hamiltonian(y, tret)); + + /* Check if the solve was successful, if so, update the time and continue */ + if (retval >= 0) + { + tout += dTout; + tout = (tout > Tf) ? Tf : tout; + } + else + { + fprintf(stderr, "Solver failure, stopping integration\n"); + break; + } + } + + fprintf(stdout, "\n"); + SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + N_VDestroy(y); + SPRKStepFree(&arkode_mem); + SUNContext_Free(&sunctx); + + return 0; +} + +sunrealtype omega(sunrealtype t) { return cos(t / 2.0); } + +sunrealtype a(sunrealtype t) { return 0.05 * sin(t / 3.0); } + +sunrealtype b(sunrealtype t) { return 0.08 * cos(t / 3.0) * cos(t / 3.0); } + +sunrealtype Hamiltonian(N_Vector yvec, sunrealtype t) +{ + sunrealtype E = 0.0; + sunrealtype* y = N_VGetArrayPointer(yvec); + const sunrealtype p = y[1]; + const sunrealtype q = y[3]; + + E = p * p / 2 + omega(t) * omega(t) * q * q / 2 + a(t) * q * q * q + + b(t) * q * q * q * q; + + return E; +} + +int qdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype p = y[1]; + + ydot[3] = p; + + return 0; +} + +int pdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +{ + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype q = y[3]; + + ydot[1] = -omega(t) * omega(t) * q - 3 * a(t) * q * q - 4 * b(t) * q * q * q; + + return 0; +} + +int ParseArgs(int argc, char* argv[], ProgramArgs* args) +{ + args->order = 4; + args->num_output_times = 8; + args->use_compsums = 0; + args->dt = SUN_RCONST(1e-3); + + for (int argi = 1; argi < argc; argi++) + { + if (!strcmp(argv[argi], "--order")) + { + argi++; + args->order = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--dt")) + { + argi++; + args->dt = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--nout")) + { + argi++; + args->num_output_times = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--use-compensated-sums")) + { + args->use_compsums = 1; + } + else if (!strcmp(argv[argi], "--help")) + { + PrintHelp(); + return 1; + } + else + { + fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); + PrintHelp(); + return 1; + } + } + + return 0; +} + +void PrintHelp() +{ + fprintf(stderr, "ark_anharmonic_symplectic: an ARKODE example demonstrating " + "the SPRKStep time-stepping module solving a time-dependent " + "anharmonic oscillator\n"); + fprintf(stderr, " --order the order of the method to " + "use (default 4)\n"); + fprintf(stderr, + " --dt the fixed-time step size to use " + "(default 0.01)\n"); + fprintf(stderr, " --nout the number of output times " + "(default 100)\n"); + fprintf(stderr, + " --use-compensated-sums turns on compensated summation in " + "ARKODE where applicable\n"); +} + +/* Check function return value... + opt == 0 means SUNDIALS function allocates memory so check if + returned NULL pointer + opt == 1 means SUNDIALS function returns a retval so check if + retval < 0 + opt == 2 means function allocates memory so check if returned + NULL pointer +*/ +int check_retval(void* returnvalue, const char* funcname, int opt) +{ + int* retval; + + /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ + if (opt == 0 && returnvalue == NULL) + { + fprintf(stderr, "\nERROR: %s() failed - returned NULL pointer\n\n", funcname); + return 1; + } + + /* Check if retval < 0 */ + else if (opt == 1) + { + retval = (int*)returnvalue; + if (*retval < 0) + { + fprintf(stderr, "\nERROR: %s() failed with retval = %d\n\n", funcname, + *retval); + return 1; + } + } + + /* Check if function returned NULL pointer - no memory allocated */ + else if (opt == 2 && returnvalue == NULL) + { + fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; + } + + return 0; +} diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index c5bffc5cc3..ef26064b3f 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -32,7 +32,7 @@ * --order the order of the method to use (default 4) * --dt the fixed-time step size to use (default 0.01) * --nout the number of output times (default 100) - * --use-compensated-sums turns on compensated summation in ARKODE where + * --use-compensated-sums turns on compensated summation in ARKODE where * applicable * --------------------------------------------------------------------------*/ /* clang-format: on */ @@ -63,11 +63,10 @@ typedef struct } ProgramArgs; /* RHS functions */ -static int Velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); -static int Force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int xdot(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); +static int vdot(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); /* Helper functions */ -static void InitialConditions(N_Vector y0); static void Solution(sunrealtype t, N_Vector y, N_Vector solvec, UserData* udata); static sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData* udata); static int ParseArgs(int argc, char* argv[], ProgramArgs* args); @@ -78,16 +77,16 @@ int main(int argc, char* argv[]) { ProgramArgs args; UserData udata; - SUNContext sunctx = NULL; - N_Vector y = NULL; - N_Vector solution = NULL; - sunrealtype* ydata = NULL; - sunrealtype tout = NAN; - sunrealtype tret = NAN; - sunrealtype err = NAN; - void* arkode_mem = NULL; - int iout = 0; - int retval = 0; + SUNContext sunctx = NULL; + N_Vector y = NULL; + N_Vector solution = NULL; + sunrealtype* ydata = NULL; + sunrealtype tout = NAN; + sunrealtype tret = NAN; + sunrealtype err = NAN; + void* arkode_mem = NULL; + int iout = 0; + int retval = 0; /* Parse the command line arguments */ if (ParseArgs(argc, argv, &args)) { return 1; }; @@ -117,17 +116,17 @@ int main(int argc, char* argv[]) udata.phi = phi; udata.omega = omega; - /* Allocate our state vector */ + /* Allocate our state vector [x, v]^T */ y = N_VNew_Serial(2, sunctx); solution = N_VClone(y); - /* Fill the initial conditions */ + /* Fill the initial conditions (x0 then v0) */ ydata = N_VGetArrayPointer(y); - ydata[0] = A*cos(phi); - ydata[1] = -A*omega*sin(phi); + ydata[0] = A * cos(phi); + ydata[1] = -A * omega * sin(phi); /* Create SPRKStep integrator */ - arkode_mem = SPRKStepCreate(Force, Velocity, T0, y, sunctx); + arkode_mem = SPRKStepCreate(xdot, vdot, T0, y, sunctx); retval = SPRKStepSetOrder(arkode_mem, order); if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; @@ -147,8 +146,8 @@ int main(int argc, char* argv[]) /* Print out starting energy, momentum before integrating */ tret = T0; tout = T0 + dTout; - fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.6Lf\n", tret, - ydata[0], Energy(y, dt, &udata), SUN_RCONST(0.0)); + fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.6Lf\n", + tret, ydata[0], Energy(y, dt, &udata), SUN_RCONST(0.0)); /* Do integration */ for (iout = 0; iout < num_output_times; iout++) @@ -164,11 +163,11 @@ int main(int argc, char* argv[]) err = sqrt(N_VDotProd(solution, solution)); /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.16Lf\n", tret, - ydata[0], Energy(y, dt, &udata), err); + fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.16Lf\n", + tret, ydata[0], Energy(y, dt, &udata), err); /* Check that solution error is within tolerance */ - if (err > SUNMAX(dt / pow(10, order-2), 1000*SUN_UNIT_ROUNDOFF)) + if (err > SUNMAX(dt / pow(10, order - 2), 1000 * SUN_UNIT_ROUNDOFF)) { fprintf(stderr, "FAILURE: solution error is too high\n"); return 1; @@ -187,8 +186,9 @@ int main(int argc, char* argv[]) } } - N_VDestroy(y); fprintf(stdout, "\n"); + N_VDestroy(y); + N_VDestroy(solution); SPRKStepPrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); SPRKStepFree(&arkode_mem); SUNContext_Free(&sunctx); @@ -218,24 +218,26 @@ sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData* udata) return E; } -int Velocity(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int xdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype v = y[1]; - ydot[0] = y[1]; + ydot[0] = v; return 0; } -int Force(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) +int vdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { UserData* udata = (UserData*)user_data; sunrealtype* y = N_VGetArrayPointer(yvec); sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype x = y[0]; const sunrealtype omega2 = udata->omega * udata->omega; - ydot[1] = -omega2 * y[0]; + ydot[1] = -omega2 * x; return 0; } diff --git a/scripts/arkode b/scripts/arkode index 9b304cf914..bff59e07ff 100755 --- a/scripts/arkode +++ b/scripts/arkode @@ -199,6 +199,8 @@ $tar $tarfile '$distrobase/examples/arkode/C_serial/ark_kepler*.out' $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_plot.py $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_anharmonic_symplectic.c +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_anharmonic_symplectic.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri_0_0.002.out diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index d9d8f761ba..46c404a471 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -561,6 +561,8 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) ARKodeSPRKStepMem step_mem = NULL; N_Vector prev_stage = NULL; N_Vector curr_stage = NULL; + sunrealtype ci = 0.0; + sunrealtype chati = 0.0; int is = 0; int retval = 0; @@ -571,20 +573,22 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) prev_stage = ark_mem->yn; curr_stage = ark_mem->ycur; - ark_mem->tcur = ark_mem->tn; for (is = 0; is < step_mem->method->stages; is++) { /* load/compute coefficients */ sunrealtype ai = step_mem->method->a[is]; sunrealtype ahati = step_mem->method->ahat[is]; + ci += ai; + chati += ahati; + /* store current stage index */ step_mem->istage = is; /* evaluate p' with the previous velocity */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f1(step_mem, ark_mem->tcur, prev_stage, step_mem->sdata, + retval = sprkStep_f1(step_mem, ark_mem->tn + chati*ark_mem->h, prev_stage, step_mem->sdata, ark_mem->user_data); if (retval != 0) { return ARK_RHSFUNC_FAIL; } @@ -593,12 +597,12 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) curr_stage); /* set current stage time(s) */ - ark_mem->tcur = ark_mem->tcur + ai * ark_mem->h; + ark_mem->tcur = ark_mem->tn + chati * ark_mem->h; /* evaluate q' with the current positions */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tcur, curr_stage, step_mem->sdata, + retval = sprkStep_f2(step_mem, ark_mem->tn + ci*ark_mem->h, curr_stage, step_mem->sdata, ark_mem->user_data); if (retval != 0) { return ARK_RHSFUNC_FAIL; } @@ -637,6 +641,8 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, N_Vector delta_Yi = NULL; N_Vector yn_plus_delta_Yi = NULL; N_Vector diff = NULL; + sunrealtype ci = 0.0; + sunrealtype chati = 0.0; int is = 0; int retval = 0; @@ -657,13 +663,15 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, N_VConst(ZERO, delta_Yi); /* loop over internal stages to the step */ - ark_mem->tcur = ark_mem->tn; for (is = 0; is < method->stages; is++) { /* load/compute coefficients */ sunrealtype ai = step_mem->method->a[is]; sunrealtype ahati = step_mem->method->ahat[is]; + ci += ai; + chati += ahati; + /* store current stage index */ step_mem->istage = is; @@ -674,7 +682,7 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, /* Evaluate p' with the previous velocity */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f1(step_mem, ark_mem->tcur, yn_plus_delta_Yi, + retval = sprkStep_f1(step_mem, ark_mem->tn + chati*ark_mem->h, yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); if (retval != 0) { return (ARK_RHSFUNC_FAIL); } @@ -688,12 +696,12 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); /* set current stage time(s) */ - ark_mem->tcur = ark_mem->tcur + ai * ark_mem->h; + ark_mem->tcur = ark_mem->tn + chati * ark_mem->h; /* Evaluate q' with the current positions */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tcur, yn_plus_delta_Yi, + retval = sprkStep_f2(step_mem, ark_mem->tn + ci*ark_mem->h, yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); if (retval != 0) { return (ARK_RHSFUNC_FAIL); } From df18fa41b2e43a9db3f3aa3fd046e42f44351fb6 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Thu, 29 Jun 2023 17:07:53 -0700 Subject: [PATCH 114/177] Update doc/arkode/guide/source/ARKodeSPRKStorage.rst Co-authored-by: Daniel R. Reynolds --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 27cb262495..41f93167ad 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -108,7 +108,7 @@ ARKodeSPRKStorage functions +----------------------------------------------+------------------------------------------------------------+ | **Function name** | **Description** | - +----------------------------------------------+------------------------------------------------------------+ + +===============================================+============================================================+ | :c:func:`ARKodeSPRKStorage_Alloc()` | Allocate an empty storage structure | +----------------------------------------------+------------------------------------------------------------+ | :c:func:`ARKodeSPRKStorage_Load()` | Load SPRK method using an identifier | From f2861e54527f1ce3eb72019a3cb4b8cff0ceaf26 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 29 Jun 2023 22:35:32 -0700 Subject: [PATCH 115/177] fix example --- .../C_serial/ark_anharmonic_symplectic.c | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/examples/arkode/C_serial/ark_anharmonic_symplectic.c b/examples/arkode/C_serial/ark_anharmonic_symplectic.c index cc1391e332..201cd50247 100644 --- a/examples/arkode/C_serial/ark_anharmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_anharmonic_symplectic.c @@ -127,8 +127,8 @@ int main(int argc, char* argv[]) tret = T0; tout = T0 + dTout; /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", tret, - ydata[1], Hamiltonian(y, tret)); + fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", tret, ydata[1], + Hamiltonian(y, tret)); /* Do integration */ for (iout = 0; iout < num_output_times; iout++) @@ -137,8 +137,8 @@ int main(int argc, char* argv[]) retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", tret, - ydata[1], Hamiltonian(y, tret)); + fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", tret, ydata[1], + Hamiltonian(y, tret)); /* Check if the solve was successful, if so, update the time and continue */ if (retval >= 0) @@ -183,10 +183,11 @@ sunrealtype Hamiltonian(N_Vector yvec, sunrealtype t) int qdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - const sunrealtype p = y[1]; + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype p = y[1]; + ydot[2] = 1; ydot[3] = p; return 0; @@ -194,11 +195,14 @@ int qdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int pdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - const sunrealtype q = y[3]; - - ydot[1] = -omega(t) * omega(t) * q - 3 * a(t) * q * q - 4 * b(t) * q * q * q; + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype qtau = y[2]; + const sunrealtype q = y[3]; + + ydot[0] = 1; + ydot[1] = -omega(qtau) * omega(qtau) * q - 3 * a(qtau) * q * q - + 4 * b(qtau) * q * q * q; return 0; } From 7d9b84519db797ee78126caf7a6249ac0805af29 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 30 Jun 2023 13:52:05 -0700 Subject: [PATCH 116/177] change to time-dependent example --- doc/arkode/guide/source/Mathematics.rst | 101 ++++-------------- .../Usage/SPRKStep_c_interface/Skeleton.rst | 4 +- .../SPRKStep_c_interface/User_callable.rst | 4 +- doc/shared/sundials.bib | 33 ++++++ examples/arkode/C_serial/CMakeLists.txt | 2 +- ...tic.c => ark_damped_harmonic_symplectic.c} | 95 ++++++++-------- .../ark_damped_harmonic_symplectic.out | 26 +++++ .../arkode/C_serial/ark_harmonic_symplectic.c | 42 +++++--- examples/arkode/C_serial/ark_kepler.c | 48 ++++----- scripts/arkode | 4 +- 10 files changed, 181 insertions(+), 178 deletions(-) rename examples/arkode/C_serial/{ark_anharmonic_symplectic.c => ark_damped_harmonic_symplectic.c} (78%) create mode 100644 examples/arkode/C_serial/ark_damped_harmonic_symplectic.out diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 7e3c097cd2..d4c3787ad7 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -468,27 +468,28 @@ SPRKStep -- Symplectic Partitioned Runge--Kutta methods The SPRKStep time-stepping module in ARKODE is designed for IVPs of the form .. math:: - \dot{p} = f_1(q) = \frac{\partial V(q)}{\partial q}, \quad - \dot{q} = f_2(p) = \frac{\partial T(p)}{\partial p}, + \dot{p} = f_1(t, q) = \frac{\partial V(t, q)}{\partial q}, \quad + \dot{q} = f_2(t, p) = \frac{\partial T(t, p)}{\partial p}, \qquad p(t_0) = p_0,\quad q(t_0) = q_0, :label: ARKODE_IVP_Hamiltonian -where +where the system Hamiltonian .. math:: - H(p, q) = T(p) + V(q) + H(t, p, q) = T(t, p) + V(t, q) -is the system Hamiltonian that is separable. When *H* is autonomous, then *H* is -a conserved quantity. Often this correponds to the conservation of energy (for -example, in *n*-body problems). +**is separable**. When *H* is autonomous, then *H* is a conserved quantity. +Often this correponds to the conservation of energy (for example, in *n*-body +problems). For non-autonomous *H*, the invariants are no longer directly +obtainable from the Hamiltonian :cite:p:`Struckheimer:02`. In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form .. math:: \dot{y} = \begin{bmatrix} - f_1(q) \\ - f_2(p) + f_1(t, q) \\ + f_2(t, p) \end{bmatrix}, \qquad y(t_0) = \begin{bmatrix} @@ -520,15 +521,15 @@ of Butcher tableau, \end{array}. We use a compact storage of these coefficients in terms of two arrays, one for -*a* and one for *b*. The time weights (which matter for non-autonomous systems) -are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and :math:`\hat{c}_j -= \sum_{i=1}^j \hat{a}_i` respectively. These methods approximately conserve a -nearby Hamiltonian for exponentially long times :cite:p:`HaWa:06`. SPRKStep -makes the assumption that the Hamiltonian is separable, in which case the -schemes are explicit. SPRKStep provides methods with order of accuracy and -conservation equal to :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these -methods, and the default methods used, are given in the section -:numref:`SPRKStorage`. +*a* and one for *b*. The time weights (which matter only for non-autonomous +systems) are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and +:math:`\hat{c}_j = \sum_{i=1}^j \hat{a}_i` respectively +:cite:p:`Jay:21,Diele:11`. These methods approximately conserve a nearby +Hamiltonian for exponentially long times :cite:p:`HaWa:06`. SPRKStep makes the +assumption that the Hamiltonian is separable, in which case the schemes are +explicit. SPRKStep provides methods with order of accuracy and conservation +equal to :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these methods, and the +default methods used, are given in the section :numref:`SPRKStorage`. In the default case, the algorithm for a single time-step is as follows (for autonomous Hamiltonian systems the times provided to :math:`f1` and :math:`f2` @@ -548,14 +549,15 @@ can be ignored). Optionally, a different algorithm leveraging compensated summation can be used that is more robust to roundoff error at the expense of 2 extra vector operations per stage and an additional 5 per time step. It also requires one extra vector to -be stored. However, it signficantly more robust to roundoff error accumulation. +be stored. However, it signficantly more robust to roundoff error accumulation +:cite:p:`Sof:02`. #. Set :math:`\Delta P_0 = 0, \Delta Q_1 = 0` #. For :math:`i = 1,\ldots,s` do: - #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} \hat{a}_i f_1(q_n + \Delta Q_i)` - #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} a_i f_2(p_n + \Delta P_i)` + #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} \hat{a}_i f_1(q_n + \Delta Q_i, t_n + c_i h)` + #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} a_i f_2(p_n + \Delta P_i, t_n + \hat{c}_i h)` #. Set :math:`\Delta p_{n+1} = \Delta P_s, \Delta q_{n+1} = \Delta Q_{s+1}` @@ -569,63 +571,6 @@ conservation property :cite:p:`HaWa:06`, SPRKStep employs a fixed time-step siz .. The `ark_kepler.c` example demonstrates an implementation of such controller. -.. _ARKODE.Mathematics.SPRKStep.Nonautonomous: - -Non-autonomous systems ----------------------- - -SPRKStep also supports non-autonomous separable Hamiltonian systems of the form - -.. math:: - \dot{p} = f_1(q, t) = \frac{\partial V(q, t)}{\partial q}, \quad - \dot{q} = f_2(p, t) = \frac{\partial T(p, t)}{\partial p}, - \qquad p(t_0) = p_0,\quad q(t_0) = q_0, - :label: ARKODE_IVP_Hamiltonian_Time_Dependent - -where - -.. math:: - H(p, q, t) = T(p, t) + V(q, t) - -In this non-autonomous case, the Hamiltonian no longer yields a conserved quantity (such as energy) -although other invariants may exist :cite:p:`Struckmeier:02`. -However, symplectic methods still are benefical to use for the long-time integration of these systems. -For example, they may accurately capture the bounded energy of the system :cite:p:``. - -To handle non-autonomous systems SPRKStep considers the extended system (like the autonomous case, -the ordering of the variables is notational only and is determined by the user): - -.. math:: - - \begin{cases} - \dot{q_\tau} = 1 \\ - \dot{q} = f_1(p_0, p) - \end{cases}, - \qquad - \begin{cases} - \dot{p_\tau} = 1 \\ - \dot{p} = f_2(q_0, q) - \end{cases} - \quad - \rightarrow - \quad - \dot{y} = - \begin{bmatrix} - q_\tau \\ - f_1(q,t) \\ - p_\tau \\ - f_2(p,t) - \end{bmatrix}, \qquad - y(t_0) = - \begin{bmatrix} - 0 \\ - p_0\\ - 0 \\ - q_0 - \end{bmatrix}. - - - .. _ARKODE.Mathematics.MRIStep: MRIStep -- Multirate infinitesimal step methods diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst index 23ee4ae39f..ef58600299 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst @@ -27,9 +27,7 @@ referenced. This generally includes the problem size, ``N``, and may include the local vector length ``Nlocal``. The problem size ``N`` is the - size including both the ``q`` and ``p`` variables. If the problem - is non-autonomous, then the size is ``N+2`` as two additional variables - must be stored for ``t`` (see :ref:`ARKODE.Mathematics.SPRKStep.Nonautonomous`) + size including both the ``q`` and ``p`` variables. .. note:: diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index b396ac9eca..3087251d27 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -45,8 +45,8 @@ SPRKStep initialization and deallocation functions This function allocates and initializes memory for a problem to be solved using the SPRKStep time-stepping module in ARKODE. - :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_1(q,t) = \frac{\partial V(q,t)}{\partial q}` - :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_2(p,t) = \frac{\partial T(p,t)}{\partial p}` + :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_1(t,q) = \frac{\partial V(t,q)}{\partial q}` + :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_2(t,p) = \frac{\partial T(t,p)}{\partial p}` :param t0: the initial value of :math:`t` :param y0: the initial condition vector :math:`y(t_0)` :param sunctx: the :c:type:`SUNContext` object (see :numref:`SUNDIALS.SUNContext`) diff --git a/doc/shared/sundials.bib b/doc/shared/sundials.bib index e9ed8c14c3..f76c5c5356 100644 --- a/doc/shared/sundials.bib +++ b/doc/shared/sundials.bib @@ -1772,6 +1772,18 @@ @article{ChiRen:21 doi = {10.1137/20M1354349} } +@article{Diele:11, + year = {2011}, + title = {{Explicit symplectic partitioned Runge–Kutta–Nyström methods for non-autonomous dynamics}}, + author = {Diele, Fasma and Marangi, Carmela}, + journal = {Applied Numerical Mathematics}, + issn = {0168-9274}, + doi = {10.1016/j.apnum.2011.02.003}, + pages = {832--843}, + number = {7}, + volume = {61} +} + @article{DorPri:80, author = {Dormand, J.R. and Prince, P.J.}, title = {A family of embedded Runge-Kutta formulae}, @@ -1848,6 +1860,17 @@ @article{Gust:94 doi = {10.1145/198429.198437} } +@article{Jay:21, + title = {Symplecticness conditions of some low order partitioned methods for non-autonomous Hamiltonian systems}, + author = {Jay, Laurent O}, + journal = {Numerical Algorithms}, + volume = {86}, + number = {2}, + pages = {495--514}, + year = {2021}, + publisher = {Springer} +} + @article{KenCarp:03, author = {Kennedy, C.A. and Carpenter, M.H.}, title = {Additive Runge-Kutta schemes for convection-diffusion-reaction equations}, @@ -2020,6 +2043,16 @@ @article{Sof:03 author = {Mark Sofroniou and Giulia Spaletta} } +@article{Sof:02, + year = {2002}, + title = {{Symplectic Methods for Separable Hamiltonian Systems}}, + author = {Sofroniou, Mark and Spaletta, Giulia}, + journal = {Lecture Notes in Computer Science}, + issn = {0302-9743}, + doi = {10.1007/3-540-47789-6\_53}, + pages = {506--515} +} + @article{Ver:78, author = {Verner, J.H}, title = {Explicit Runge-Kutta methods with estimates of the local truncation error}, diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 5a45e4b644..a5f98b17f2 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -38,7 +38,7 @@ set(ARKODE_examples "ark_brusselator1D_imexmri\;7 0.001\;exclude-single" "ark_brusselator1D\;\;exclude-single" "ark_harmonic_symplectic\;\;exclude-single" - "ark_anharmonic_symplectic\;\;exclude-single" + "ark_damped_harmonic_symplectic\;\;exclude-single" "ark_heat1D_adapt\;\;develop" "ark_heat1D\;\;develop" "ark_kepler\;\;develop" diff --git a/examples/arkode/C_serial/ark_anharmonic_symplectic.c b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c similarity index 78% rename from examples/arkode/C_serial/ark_anharmonic_symplectic.c rename to examples/arkode/C_serial/ark_damped_harmonic_symplectic.c index 201cd50247..83ad7cb74e 100644 --- a/examples/arkode/C_serial/ark_anharmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c @@ -1,4 +1,4 @@ -/* clang-format: off */ +/* clang-format off */ /* ---------------------------------------------------------------------------- * Programmer(s): Cody J. Balos @ LLNL * ---------------------------------------------------------------------------- @@ -12,13 +12,13 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End * ---------------------------------------------------------------------------- - * In this example we consider the anharmonic oscillator - * q'(t) = p(t) - * p'(t) = -( omega^2(t)*q^2 + 3*a(t)*q^2 + 4*b(t)*q^3 ) + * In this example we consider the time-dependent damped harmonic oscillator + * q'(t) = p(t) exp(-F(t)) + * p'(t) = -(F(t) * p + omega^2(t) * q) * With the initial conditions q(0) = 1, p(0) = 0. * The Hamiltonian for the system is - * H(p,q,t) = 1/2*p^2 + 1/2*omega^2(t)*q^2 + a(t)*q^3 + b(t)*q^4 - * where omega(t) = cos(t/2), a(t) = 0.05*sin(t/3), b(t) = 0.08*cos^2(t/3). + * H(p,q,t) = (p^2 * exp(-F(t)))/2 + (omega^2(t) * q^2 * exp(F(t)))/2 + * where omega(t) = cos(t/2), F(t) = 0.018*sin(t/pi). * We simulate the problem on t = [0, 30] using the symplectic methods in * SPRKStep. * @@ -31,10 +31,11 @@ * --order the order of the method to use (default 4) * --dt the fixed-time step size to use (default 0.01) * --nout the number of output times (default 100) + * --disable-tstop turns off tstop mode * --use-compensated-sums turns on compensated summation in ARKODE where * applicable * --------------------------------------------------------------------------*/ -/* clang-format: on */ +/* clang-format on */ #include #include /* prototypes for SPRKStep fcts., consts */ @@ -53,6 +54,8 @@ typedef struct int order; int num_output_times; int use_compsums; + int use_tstop; + sunrealtype Tf; sunrealtype dt; } ProgramArgs; @@ -88,25 +91,23 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(30.0); + sunrealtype Tf = args.Tf; sunrealtype dt = args.dt; const sunrealtype dTout = (Tf - T0) / ((sunrealtype)num_output_times); /* Create the SUNDIALS context object for this simulation */ retval = SUNContext_Create(NULL, &sunctx); - if (check_retval(&retval, "SUNContext_Create", 1)) return 1; + if (check_retval(&retval, "SUNContext_Create", 1)) { return 1; } - printf("\n Begin time-dependent anharmonic oscillator problem\n\n"); + printf("\n Begin time-dependent damped harmonic oscillator problem\n\n"); /* Allocate our state vector */ - y = N_VNew_Serial(4, sunctx); + y = N_VNew_Serial(2, sunctx); /* Fill the initial conditions */ ydata = N_VGetArrayPointer(y); - ydata[0] = 0; /* ptau */ - ydata[1] = 0; /* \dot{q} = p */ - ydata[2] = 0; /* qtau */ - ydata[3] = 1; /* \ddot{q} = \dot{p} */ + ydata[0] = 0; /* \dot{q} = p */ + ydata[1] = 1; /* \ddot{q} = \dot{p} */ /* Create SPRKStep integrator */ arkode_mem = SPRKStepCreate(qdot, pdot, T0, y, sunctx); @@ -133,7 +134,7 @@ int main(int argc, char* argv[]) /* Do integration */ for (iout = 0; iout < num_output_times; iout++) { - SPRKStepSetStopTime(arkode_mem, tout); + if (args.use_tstop) { SPRKStepSetStopTime(arkode_mem, tout); } retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ @@ -164,45 +165,39 @@ int main(int argc, char* argv[]) sunrealtype omega(sunrealtype t) { return cos(t / 2.0); } -sunrealtype a(sunrealtype t) { return 0.05 * sin(t / 3.0); } - -sunrealtype b(sunrealtype t) { return 0.08 * cos(t / 3.0) * cos(t / 3.0); } +sunrealtype F(sunrealtype t) { return 0.018 * sin(t / M_PI); } sunrealtype Hamiltonian(N_Vector yvec, sunrealtype t) { - sunrealtype E = 0.0; + sunrealtype H = 0.0; sunrealtype* y = N_VGetArrayPointer(yvec); - const sunrealtype p = y[1]; - const sunrealtype q = y[3]; + const sunrealtype p = y[0]; + const sunrealtype q = y[1]; - E = p * p / 2 + omega(t) * omega(t) * q * q / 2 + a(t) * q * q * q + - b(t) * q * q * q * q; + H = (p * p * exp(-F(t))) / 2. + (omega(t) * omega(t) * q * q * exp(F(t))) / 2; - return E; + return H; } int qdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { sunrealtype* y = N_VGetArrayPointer(yvec); sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - const sunrealtype p = y[1]; + const sunrealtype p = y[0]; - ydot[2] = 1; - ydot[3] = p; + ydot[1] = p * exp(-F(t)); return 0; } int pdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) { - sunrealtype* y = N_VGetArrayPointer(yvec); - sunrealtype* ydot = N_VGetArrayPointer(ydotvec); - const sunrealtype qtau = y[2]; - const sunrealtype q = y[3]; + sunrealtype* y = N_VGetArrayPointer(yvec); + sunrealtype* ydot = N_VGetArrayPointer(ydotvec); + const sunrealtype p = y[0]; + const sunrealtype q = y[1]; - ydot[0] = 1; - ydot[1] = -omega(qtau) * omega(qtau) * q - 3 * a(qtau) * q * q - - 4 * b(qtau) * q * q * q; + ydot[0] = -(F(t) * p + omega(t) * omega(t) * q); return 0; } @@ -212,6 +207,8 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->order = 4; args->num_output_times = 8; args->use_compsums = 0; + args->use_tstop = 1; + args->Tf = SUN_RCONST(10.0) * M_PI; args->dt = SUN_RCONST(1e-3); for (int argi = 1; argi < argc; argi++) @@ -221,6 +218,11 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) argi++; args->order = atoi(argv[argi]); } + else if (!strcmp(argv[argi], "--tf")) + { + argi++; + args->Tf = atof(argv[argi]); + } else if (!strcmp(argv[argi], "--dt")) { argi++; @@ -235,6 +237,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) { args->use_compsums = 1; } + else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } else if (!strcmp(argv[argi], "--help")) { PrintHelp(); @@ -253,19 +256,17 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) void PrintHelp() { - fprintf(stderr, "ark_anharmonic_symplectic: an ARKODE example demonstrating " - "the SPRKStep time-stepping module solving a time-dependent " - "anharmonic oscillator\n"); - fprintf(stderr, " --order the order of the method to " - "use (default 4)\n"); - fprintf(stderr, - " --dt the fixed-time step size to use " - "(default 0.01)\n"); - fprintf(stderr, " --nout the number of output times " - "(default 100)\n"); fprintf(stderr, - " --use-compensated-sums turns on compensated summation in " - "ARKODE where applicable\n"); + "ark_damped_harmonic_symplectic: an ARKODE example demonstrating " + "the SPRKStep time-stepping module solving a time-dependent " + "damped harmonic oscillator\n"); + /* clang-format off */ + fprintf(stderr, " --order the order of the method to use (default 4)\n"); + fprintf(stderr, " --dt the fixed-time step size to use (default 0.01)\n"); + fprintf(stderr, " --nout the number of output times (default 100)\n"); + fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); + fprintf(stderr, " --disable-tstop turns off tstop mode\n"); + /* clang-format on */ } /* Check function return value... diff --git a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out new file mode 100644 index 0000000000..159f367132 --- /dev/null +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out @@ -0,0 +1,26 @@ + + Begin time-dependent damped harmonic oscillator problem + +t = 0.000000, q(t) = 1.000000, H = 0.500000 +t = 3.926991, q(t) = -1.858671, H = 0.518239 +t = 7.853982, q(t) = 2.097078, H = 1.797232 +t = 11.780972, q(t) = 2.412988, H = 4.821524 +t = 15.707963, q(t) = -3.767992, H = 0.009034 +t = 19.634954, q(t) = 2.451177, H = 4.130995 +t = 23.561945, q(t) = 1.242002, H = 1.013408 +t = 27.488936, q(t) = -0.806768, H = 0.352368 +t = 31.415927, q(t) = 0.878500, H = 0.773974 + +Current time = 31.415926535897931159979634685442 +Steps = 31416 +Step attempts = 31416 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0010000000000000000208166817117217 +Last step size = 0.00099081698244063345221155358899523 +Current step size = 0.00099081698244063345221155358899523 +f1 RHS fn evals = 125665 +f2 RHS fn evals = 125665 diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index ef26064b3f..afc74502cd 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -34,6 +34,7 @@ * --nout the number of output times (default 100) * --use-compensated-sums turns on compensated summation in ARKODE where * applicable + * --disable-tstop turns off tstop mode * --------------------------------------------------------------------------*/ /* clang-format: on */ @@ -59,6 +60,8 @@ typedef struct int order; int num_output_times; int use_compsums; + int use_tstop; + sunrealtype Tf; sunrealtype dt; } ProgramArgs; @@ -98,7 +101,7 @@ int main(int argc, char* argv[]) /* Default problem parameters */ const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = SUN_RCONST(2.0) * M_PI; + sunrealtype Tf = args.Tf; sunrealtype dt = args.dt; const sunrealtype A = SUN_RCONST(10.0); const sunrealtype phi = SUN_RCONST(0.0); @@ -129,19 +132,19 @@ int main(int argc, char* argv[]) arkode_mem = SPRKStepCreate(xdot, vdot, T0, y, sunctx); retval = SPRKStepSetOrder(arkode_mem, order); - if (check_retval(&retval, "SPRKStepSetOrder", 1)) return 1; + if (check_retval(&retval, "SPRKStepSetOrder", 1)) { return 1; } retval = SPRKStepSetUserData(arkode_mem, &udata); - if (check_retval(&retval, "SPRKStepSetUserData", 1)) return 1; + if (check_retval(&retval, "SPRKStepSetUserData", 1)) { return 1; } retval = SPRKStepSetUseCompensatedSums(arkode_mem, use_compsums); - if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) return 1; + if (check_retval(&retval, "SPRKStepSetUseCompensatedSums", 1)) { return 1; } retval = SPRKStepSetFixedStep(arkode_mem, dt); - if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) return 1; + if (check_retval(&retval, "SPRKStepSetFixedStep", 1)) { return 1; } retval = SPRKStepSetMaxNumSteps(arkode_mem, ((long int)ceil(Tf / dt)) + 2); - if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) return 1; + if (check_retval(&retval, "SPRKStepSetMaxNumSteps", 1)) { return 1; } /* Print out starting energy, momentum before integrating */ tret = T0; @@ -152,7 +155,7 @@ int main(int argc, char* argv[]) /* Do integration */ for (iout = 0; iout < num_output_times; iout++) { - SPRKStepSetStopTime(arkode_mem, tout); + if (args.use_tstop) { SPRKStepSetStopTime(arkode_mem, tout); } retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Compute the anaytical solution */ @@ -247,7 +250,9 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->order = 4; args->num_output_times = 8; args->use_compsums = 0; + args->use_tstop = 1; args->dt = SUN_RCONST(1e-3); + args->Tf = SUN_RCONST(2.0) * M_PI; for (int argi = 1; argi < argc; argi++) { @@ -256,6 +261,11 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) argi++; args->order = atoi(argv[argi]); } + else if (!strcmp(argv[argi], "--tf")) + { + argi++; + args->Tf = atof(argv[argi]); + } else if (!strcmp(argv[argi], "--dt")) { argi++; @@ -270,6 +280,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) { args->use_compsums = 1; } + else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } else if (!strcmp(argv[argi], "--help")) { PrintHelp(); @@ -291,16 +302,13 @@ void PrintHelp() fprintf(stderr, "ark_harmonic_symplectic: an ARKODE example demonstrating " "the SPRKStep time-stepping module solving a simple harmonic " "oscillator\n"); - fprintf(stderr, " --order the order of the method to " - "use (default 4)\n"); - fprintf(stderr, - " --dt the fixed-time step size to use " - "(default 0.01)\n"); - fprintf(stderr, " --nout the number of output times " - "(default 100)\n"); - fprintf(stderr, - " --use-compensated-sums turns on compensated summation in " - "ARKODE where applicable\n"); + /* clang-format off */ + fprintf(stderr, " --order the order of the method to use (default 4)\n"); + fprintf(stderr, " --dt the fixed-time step size to use (default 0.01)\n"); + fprintf(stderr, " --nout the number of output times (default 100)\n"); + fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); + fprintf(stderr, " --disable-tstop turns off tstop mode\n"); + /* clang-format on */ } /* Check function return value... diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index eaedc10dd1..3a1c09614a 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -46,6 +46,7 @@ * --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK) * --method which method to use (default ARKODE_SPRK_MCLACHLAN_4_4) * --use-compensated-sums turns on compensated summation in ARKODE where applicable + * --disable-tstop turns off tstop mode * --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01) * --tf the final time for the simulation (default 100) * --nout number of output times @@ -95,6 +96,7 @@ typedef struct int stepper; int num_output_times; int use_compsums; + int use_tstop; int count_orbits; int check_order; sunrealtype dt; @@ -431,7 +433,7 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) exact requested output time will not be hit (even with a fixed time-step due to roundoff error accumulation) and interpolation will be used to get the solution at the output time. */ - SPRKStepSetStopTime(arkode_mem, tout); + if (args->use_tstop) { SPRKStepSetStopTime(arkode_mem, tout); } retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); if (retval == ARK_ROOT_RETURN) @@ -478,7 +480,7 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) exact requested output time will not be hit (even with a fixed time-step due to roundoff error accumulation) and interpolation will be used to get the solution at the output time. */ - ARKStepSetStopTime(arkode_mem, tout); + if (args->use_tstop) { ARKStepSetStopTime(arkode_mem, tout); } retval = ARKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); if (retval == ARK_ROOT_RETURN) @@ -654,6 +656,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->method_name = NULL; args->count_orbits = 0; args->use_compsums = 0; + args->use_tstop = 1; args->dt = SUN_RCONST(1e-2); args->tf = SUN_RCONST(100.); args->check_order = 0; @@ -704,6 +707,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->num_output_times = atoi(argv[argi]); } else if (!strcmp(argv[argi], "--count-orbits")) { args->count_orbits = 1; } + else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } else if (!strcmp(argv[argi], "--use-compensated-sums")) { args->use_compsums = 1; @@ -724,10 +728,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) if (!args->method_name) { - if (args->stepper == 0) - { - args->method_name = "ARKODE_SPRK_MCLACHLAN_4_4"; - } + if (args->stepper == 0) { args->method_name = "ARKODE_SPRK_MCLACHLAN_4_4"; } else if (args->stepper == 1) { args->method_name = "ARKODE_ZONNEVELD_5_3_4"; @@ -742,6 +743,7 @@ void PrintArgs(ProgramArgs* args) fprintf(stdout, "Problem Arguments:\n"); fprintf(stdout, " stepper: %d\n", args->stepper); fprintf(stdout, " step mode: %d\n", args->step_mode); + fprintf(stdout, " use tstop: %d\n", args->use_tstop); fprintf(stdout, " use compensated sums: %d\n", args->use_compsums); fprintf(stdout, " dt: %Lg\n", (long double)args->dt); fprintf(stdout, " Tf: %Lg\n", (long double)args->tf); @@ -752,28 +754,18 @@ void PrintHelp() { fprintf(stderr, "ark_kepler: an ARKODE example demonstrating the SPRKStep " "time-stepping module solving the Kepler problem\n"); - fprintf(stderr, " --step-mode should we use a fixed " - "time-step or adaptive time-step (default fixed)\n"); - fprintf(stderr, - " --stepper should we use SPRKStep or ARKStep " - "with an ERK method (default SPRK)\n"); - fprintf(stderr, " --method which method to use (default " - "ARKODE_SPRK_MCLACHLAN_4_4)\n"); - fprintf(stderr, - " --use-compensated-sums turns on compensated summation in " - "ARKODE where applicable\n"); - fprintf(stderr, " --dt the fixed-time step size to " - "use if fixed " - "time stepping is turned on (default 0.01)\n"); - fprintf(stderr, " --tf the final time for the " - "simulation (default 100)\n"); - fprintf(stderr, " --nout the number of output times " - "(default 100)\n"); - fprintf(stderr, " --count-orbits use rootfinding to count the " - "number of completed orbits\n"); - fprintf(stderr, - " --check-order compute the order of the method used " - "and check if it is within range of the expected\n"); + /* clang-format off */ + fprintf(stderr, " --step-mode should we use a fixed time-step or adaptive time-step (default fixed)\n"); + fprintf(stderr, " --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK)\n"); + fprintf(stderr, " --method which method to use (default ARKODE_SPRK_MCLACHLAN_4_4)\n"); + fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); + fprintf(stderr, " --disable-tstop turns off tstop mode\n"); + fprintf(stderr, " --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01)\n"); + fprintf(stderr, " --tf the final time for the simulation (default 100)\n"); + fprintf(stderr, " --nout the number of output times (default 100)\n"); + fprintf(stderr, " --count-orbits use rootfinding to count the number of completed orbits\n"); + fprintf(stderr, " --check-order compute the order of the method used and check if it is within range of the expected\n"); + /* clang-format on */ } /* Check function return value... diff --git a/scripts/arkode b/scripts/arkode index bff59e07ff..1e231408b3 100755 --- a/scripts/arkode +++ b/scripts/arkode @@ -199,8 +199,8 @@ $tar $tarfile '$distrobase/examples/arkode/C_serial/ark_kepler*.out' $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_plot.py $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_anharmonic_symplectic.c -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_anharmonic_symplectic.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri_0_0.002.out From c7ce1e5128d60911613f92ad821a512fc002e3ad Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 30 Jun 2023 13:56:34 -0700 Subject: [PATCH 117/177] remove unused macros --- src/arkode/arkode_sprkstep_impl.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 06c22a34a8..f4433e6c99 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -90,18 +90,7 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, /* Initialization and I/O error messages */ #define MSG_SPRKSTEP_NO_MEM "Time step module memory is NULL." -#define MSG_NLS_INIT_FAIL "The nonlinear solver's init routine failed." - -/* Other error messages */ -#define MSG_ARK_MISSING_FE \ - "Cannot specify that method is explicit without providing a function " \ - "pointer to fe(t,y)." -#define MSG_ARK_MISSING_FI \ - "Cannot specify that method is implicit without providing a function " \ - "pointer to fi(t,y)." -#define MSG_ARK_MISSING_F \ - "Cannot specify that method is ImEx without providing function pointers to " \ - "fi(t,y) and fe(t,y)." + #ifdef __cplusplus } From aeaf39ee3d15547b5c247f041a98d4c79f443cc6 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 30 Jun 2023 14:01:15 -0700 Subject: [PATCH 118/177] get rid of M_PI --- examples/arkode/C_serial/ark_damped_harmonic_symplectic.c | 6 ++++-- examples/arkode/C_serial/ark_harmonic_symplectic.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c index 83ad7cb74e..940e5be81d 100644 --- a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c @@ -49,6 +49,8 @@ #include "arkode/arkode.h" +#define PI SUN_RCONST(3.14159265358979323846264338327950) + typedef struct { int order; @@ -165,7 +167,7 @@ int main(int argc, char* argv[]) sunrealtype omega(sunrealtype t) { return cos(t / 2.0); } -sunrealtype F(sunrealtype t) { return 0.018 * sin(t / M_PI); } +sunrealtype F(sunrealtype t) { return 0.018 * sin(t / PI); } sunrealtype Hamiltonian(N_Vector yvec, sunrealtype t) { @@ -208,7 +210,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->num_output_times = 8; args->use_compsums = 0; args->use_tstop = 1; - args->Tf = SUN_RCONST(10.0) * M_PI; + args->Tf = SUN_RCONST(10.0) * PI; args->dt = SUN_RCONST(1e-3); for (int argi = 1; argi < argc; argi++) diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index afc74502cd..b9d5966db8 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -50,6 +50,8 @@ #include "arkode/arkode.h" +#define PI SUN_RCONST(3.14159265358979323846264338327950) + typedef struct { sunrealtype A, phi, omega; @@ -252,7 +254,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->use_compsums = 0; args->use_tstop = 1; args->dt = SUN_RCONST(1e-3); - args->Tf = SUN_RCONST(2.0) * M_PI; + args->Tf = SUN_RCONST(2.0) * PI; for (int argi = 1; argi < argc; argi++) { From 187c80fe95f5ed813d4f0c4781264c4647da98b2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 30 Jun 2023 14:03:27 -0700 Subject: [PATCH 119/177] fix malformed tables --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 2 +- doc/arkode/guide/source/Constants.rst | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 41f93167ad..37dccea09c 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -108,7 +108,7 @@ ARKodeSPRKStorage functions +----------------------------------------------+------------------------------------------------------------+ | **Function name** | **Description** | - +===============================================+============================================================+ + +==============================================+============================================================+ | :c:func:`ARKodeSPRKStorage_Alloc()` | Allocate an empty storage structure | +----------------------------------------------+------------------------------------------------------------+ | :c:func:`ARKodeSPRKStorage_Load()` | Load SPRK method using an identifier | diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index f6cec4ef97..7d61943806 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -260,29 +260,29 @@ contains the ARKODE output constants. +--------------------------------------------------+------------------------------------------------------------+ | **Symplectic Method storage specification** | | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_EULER_1_1` | Symplectic Euler 1st order method with 1 stage. | + | :c:macro:`ARKODE_SPRK_EULER_1_1` | Symplectic Euler 1st order method with 1 stage. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_LEAPFROG_2_2` | Symplectic Leapfrog 2nd order method with 2 stages. | + | :c:macro:`ARKODE_SPRK_LEAPFROG_2_2` | Symplectic Leapfrog 2nd order method with 2 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_PSEUDO_LEAPFROG_2_2` | Symplectic Pseudo Leapfrog 2nd order method with 2 stages. | + | :c:macro:`ARKODE_SPRK_PSEUDO_LEAPFROG_2_2` | Symplectic Pseudo Leapfrog 2nd order method with 2 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_RUTH_3_3` | Symplectic Ruth 3rd order method with 3 stages. | + | :c:macro:`ARKODE_SPRK_RUTH_3_3` | Symplectic Ruth 3rd order method with 3 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_MCLACHLAN_2_2` | Symplectic McLachlan 2nd order method with 2 stages. | + | :c:macro:`ARKODE_SPRK_MCLACHLAN_2_2` | Symplectic McLachlan 2nd order method with 2 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_MCLACHLAN_3_3` | Symplectic McLachlan 3rd order method with 3 stages. | + | :c:macro:`ARKODE_SPRK_MCLACHLAN_3_3` | Symplectic McLachlan 3rd order method with 3 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_CANDY_ROZMUS_4_4` | Symplectic Candy-Rozmus 4th order method with 4 stages. | + | :c:macro:`ARKODE_SPRK_CANDY_ROZMUS_4_4` | Symplectic Candy-Rozmus 4th order method with 4 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_MCLACHLAN_4_4` | Symplectic McLachlan 4th order method with 4 stages. | + | :c:macro:`ARKODE_SPRK_MCLACHLAN_4_4` | Symplectic McLachlan 4th order method with 4 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_MCLACHLAN_5_6` | Symplectic McLachlan 5th order method with 6 stages. | + | :c:macro:`ARKODE_SPRK_MCLACHLAN_5_6` | Symplectic McLachlan 5th order method with 6 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_YOSHIDA_6_8` | Symplectic Yoshida 6th order method with 8 stages. | + | :c:macro:`ARKODE_SPRK_YOSHIDA_6_8` | Symplectic Yoshida 6th order method with 8 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_SUZUKI_UMENO_8_16` | Symplectic McLachlan 8th order method with 16 stages. | + | :c:macro:`ARKODE_SPRK_SUZUKI_UMENO_8_16` | Symplectic McLachlan 8th order method with 16 stages. | +--------------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_SOFRONIOU_10_36` | Symplectic Sofroniou 10th order method with 36 stages. | + | :c:macro:`ARKODE_SPRK_SOFRONIOU_10_36` | Symplectic Sofroniou 10th order method with 36 stages. | +--------------------------------------------------+------------------------------------------------------------+ From 648fa878d27c9b5ef95e9f69fb66732782df64c0 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 30 Jun 2023 14:14:00 -0700 Subject: [PATCH 120/177] fix reference --- doc/arkode/guide/source/Mathematics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index d4c3787ad7..b185bee67e 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -481,7 +481,7 @@ where the system Hamiltonian **is separable**. When *H* is autonomous, then *H* is a conserved quantity. Often this correponds to the conservation of energy (for example, in *n*-body problems). For non-autonomous *H*, the invariants are no longer directly -obtainable from the Hamiltonian :cite:p:`Struckheimer:02`. +obtainable from the Hamiltonian :cite:p:`Struckmeier:02`. In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form From 8458c79684fb95bebda4adf6baf8b1126d21002a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 30 Jun 2023 14:40:02 -0700 Subject: [PATCH 121/177] give full filenames for out files in tarscript --- scripts/arkode | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/arkode b/scripts/arkode index 1e231408b3..cf76cbf5f3 100755 --- a/scripts/arkode +++ b/scripts/arkode @@ -195,7 +195,19 @@ $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D_adapt.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D_adapt.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.c -$tar $tarfile '$distrobase/examples/arkode/C_serial/ark_kepler*.out' +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_plot.py $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.out From e4cce85a962389640e411f2f7daee01aec7c829f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 30 Jun 2023 15:02:38 -0700 Subject: [PATCH 122/177] fix all warnings --- .../C_serial/ark_damped_harmonic_symplectic.c | 40 ++++++---- .../arkode/C_serial/ark_harmonic_symplectic.c | 52 +++++++------ examples/arkode/C_serial/ark_kepler.c | 21 +++-- src/arkode/arkode.c | 3 +- src/arkode/arkode_sprk.c | 77 ++++++++++--------- 5 files changed, 105 insertions(+), 88 deletions(-) diff --git a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c index 940e5be81d..7acbf5543b 100644 --- a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c @@ -74,28 +74,34 @@ static int check_retval(void* returnvalue, const char* funcname, int opt); int main(int argc, char* argv[]) { ProgramArgs args; - SUNContext sunctx = NULL; - N_Vector y = NULL; - sunrealtype* ydata = NULL; - sunrealtype tout = NAN; - sunrealtype tret = NAN; - void* arkode_mem = NULL; - int iout = 0; - int retval = 0; + SUNContext sunctx = NULL; + N_Vector y = NULL; + sunrealtype* ydata = NULL; + sunrealtype tout = NAN; + sunrealtype tret = NAN; + void* arkode_mem = NULL; + int iout = 0; + int retval = 0; + int order = 0; + int use_compsums = 0; + int num_output_times = 0; + sunrealtype Tf = SUN_RCONST(0.0); + sunrealtype dt = SUN_RCONST(0.0); + sunrealtype dTout = SUN_RCONST(0.0); + const sunrealtype T0 = SUN_RCONST(0.0); /* Parse the command line arguments */ if (ParseArgs(argc, argv, &args)) { return 1; }; /* Default integrator options */ - int order = args.order; - int use_compsums = args.use_compsums; - const int num_output_times = args.num_output_times; + order = args.order; + use_compsums = args.use_compsums; + num_output_times = args.num_output_times; /* Default problem parameters */ - const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = args.Tf; - sunrealtype dt = args.dt; - const sunrealtype dTout = (Tf - T0) / ((sunrealtype)num_output_times); + Tf = args.Tf; + dt = args.dt; + dTout = (Tf - T0) / ((sunrealtype)num_output_times); /* Create the SUNDIALS context object for this simulation */ retval = SUNContext_Create(NULL, &sunctx); @@ -206,6 +212,8 @@ int pdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int ParseArgs(int argc, char* argv[], ProgramArgs* args) { + int argi = 0; + args->order = 4; args->num_output_times = 8; args->use_compsums = 0; @@ -213,7 +221,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->Tf = SUN_RCONST(10.0) * PI; args->dt = SUN_RCONST(1e-3); - for (int argi = 1; argi < argc; argi++) + for (argi = 1; argi < argc; argi++) { if (!strcmp(argv[argi], "--order")) { diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index b9d5966db8..400fb73527 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -82,33 +82,39 @@ int main(int argc, char* argv[]) { ProgramArgs args; UserData udata; - SUNContext sunctx = NULL; - N_Vector y = NULL; - N_Vector solution = NULL; - sunrealtype* ydata = NULL; - sunrealtype tout = NAN; - sunrealtype tret = NAN; - sunrealtype err = NAN; - void* arkode_mem = NULL; - int iout = 0; - int retval = 0; + SUNContext sunctx = NULL; + N_Vector y = NULL; + N_Vector solution = NULL; + sunrealtype* ydata = NULL; + sunrealtype tout = NAN; + sunrealtype tret = NAN; + sunrealtype err = NAN; + void* arkode_mem = NULL; + int iout = 0; + int retval = 0; + int order = 0; + int use_compsums = 0; + int num_output_times = 0; + sunrealtype Tf = SUN_RCONST(0.0); + sunrealtype dt = SUN_RCONST(0.0); + sunrealtype dTout = SUN_RCONST(0.0); + const sunrealtype T0 = SUN_RCONST(0.0); + const sunrealtype A = SUN_RCONST(10.0); + const sunrealtype phi = SUN_RCONST(0.0); + const sunrealtype omega = SUN_RCONST(1.0); /* Parse the command line arguments */ if (ParseArgs(argc, argv, &args)) { return 1; }; - /* Default integrator options */ - int order = args.order; - int use_compsums = args.use_compsums; - const int num_output_times = args.num_output_times; + /* Default integrator options and problem parameters */ + order = args.order; + use_compsums = args.use_compsums; + num_output_times = args.num_output_times; + Tf = args.Tf; + dt = args.dt; + dTout = (Tf - T0) / ((sunrealtype)num_output_times); /* Default problem parameters */ - const sunrealtype T0 = SUN_RCONST(0.0); - sunrealtype Tf = args.Tf; - sunrealtype dt = args.dt; - const sunrealtype A = SUN_RCONST(10.0); - const sunrealtype phi = SUN_RCONST(0.0); - const sunrealtype omega = SUN_RCONST(1.0); - const sunrealtype dTout = (Tf - T0) / ((sunrealtype)num_output_times); /* Create the SUNDIALS context object for this simulation */ retval = SUNContext_Create(NULL, &sunctx); @@ -249,6 +255,8 @@ int vdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) int ParseArgs(int argc, char* argv[], ProgramArgs* args) { + int argi = 0; + args->order = 4; args->num_output_times = 8; args->use_compsums = 0; @@ -256,7 +264,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->dt = SUN_RCONST(1e-3); args->Tf = SUN_RCONST(2.0) * PI; - for (int argi = 1; argi < argc; argi++) + for (argi = 1; argi < argc; argi++) { if (!strcmp(argv[argi], "--order")) { diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 3a1c09614a..ae4346d455 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -153,6 +153,7 @@ int main(int argc, char* argv[]) } else { + int i = 0; /* Compute the order of accuracy of the method by testing it with different step sizes. */ sunrealtype acc_orders[NUM_DT]; @@ -167,14 +168,7 @@ int main(int argc, char* argv[]) sunrealtype ord_max_acc = 0, ord_max_conv = 0, ord_avg = 0, ord_est = 0; sunrealtype refine = SUN_RCONST(.5); sunrealtype dt = (expected_order >= 3) ? SUN_RCONST(1e-1) : SUN_RCONST(1e-3); - sunrealtype dts[NUM_DT] = {dt, - dt * refine, - dt * refine * refine, - dt * pow(refine, 3), - dt * pow(refine, 4), - dt * pow(refine, 5), - dt * pow(refine, 6), - dt * pow(refine, 7)}; + sunrealtype dts[NUM_DT]; /* Create a reference solution using 8th order ERK with a small time step */ const int old_step_mode = args.step_mode; @@ -197,8 +191,10 @@ int main(int argc, char* argv[]) args.stepper = old_stepper; args.method_name = old_method_name; + for (i = 0; i < NUM_DT; i++) { dts[i] = dt * pow(refine, i); } + /* Compute the error with various step sizes */ - for (int i = 0; i < NUM_DT; i++) + for (i = 0; i < NUM_DT; i++) { /* Set the dt to use for this solve */ args.dt = dts[i]; @@ -636,9 +632,10 @@ int ComputeConvergence(int num_dt, sunrealtype* orders, sunrealtype* ord_max, sunrealtype* ord_est) { /* Compute/print overall estimated convergence rate */ + int i = 0; sunrealtype det = 0; *ord_avg = 0, *ord_max = 0, *ord_est = 0; - for (int i = 1; i < num_dt; i++) + for (i = 1; i < num_dt; i++) { *ord_avg += orders[i - 1]; *ord_max = SUNMAX(*ord_max, orders[i - 1]); @@ -651,6 +648,8 @@ int ComputeConvergence(int num_dt, sunrealtype* orders, int ParseArgs(int argc, char* argv[], ProgramArgs* args) { + int argi = 0; + args->step_mode = 0; args->stepper = 0; args->method_name = NULL; @@ -662,7 +661,7 @@ int ParseArgs(int argc, char* argv[], ProgramArgs* args) args->check_order = 0; args->num_output_times = 50; - for (int argi = 1; argi < argc; argi++) + for (argi = 1; argi < argc; argi++) { if (!strcmp(argv[argi], "--step-mode")) { diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index e0964ba0f0..fb5142b78c 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -27,6 +27,7 @@ #include "arkode_impl.h" #include "arkode_interp_impl.h" +#include "sundials/sundials_config.h" #include #include @@ -2333,7 +2334,7 @@ int arkYddNorm(ARKodeMem ark_mem, realtype hg, realtype *yddnrm) return(ARK_SUCCESS); } -inline static +SUNDIALS_STATIC_INLINE void compensatedSum(sunrealtype base, sunrealtype inc, sunrealtype *sum, sunrealtype *error) { sunrealtype err = *error; diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index e161699f2d..f4e54c2531 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -138,17 +138,19 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() { + sunrealtype w = 0.0; + sunrealtype y = 0.0; + sunrealtype z = 0.0; ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(3); sprk_storage->q = 3; sprk_storage->stages = 3; - sunrealtype z = - -SUNRpowerR((SUN_RCONST(2.0) / SUN_RCONST(27.0)) - - SUN_RCONST(1.0) / (SUN_RCONST(9.0) * SUNRsqrt(3.0)), - SUN_RCONST(1.0) / SUN_RCONST(3.0)); - sunrealtype w = -SUN_RCONST(2.0) / SUN_RCONST(3.0) + - SUN_RCONST(1.0) / (SUN_RCONST(9.0) * z) + z; - sunrealtype y = (SUN_RCONST(1.0) + w * w) / SUN_RCONST(4.0); + z = -SUNRpowerR((SUN_RCONST(2.0) / SUN_RCONST(27.0)) - + SUN_RCONST(1.0) / (SUN_RCONST(9.0) * SUNRsqrt(3.0)), + SUN_RCONST(1.0) / SUN_RCONST(3.0)); + w = -SUN_RCONST(2.0) / SUN_RCONST(3.0) + + SUN_RCONST(1.0) / (SUN_RCONST(9.0) * z) + z; + y = (SUN_RCONST(1.0) + w * w) / SUN_RCONST(4.0); sprk_storage->a[0] = SUNRsqrt(SUN_RCONST(1.0) / (SUN_RCONST(9.0) * y) - w / SUN_RCONST(2.0) + SUNRsqrt(y)) - SUN_RCONST(1.0) / (SUN_RCONST(3.0) * SUNRsqrt(y)); @@ -211,16 +213,16 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(8); sprk_storage->q = 6; sprk_storage->stages = 8; - sprk_storage->a[0] = SUN_RCONST(0.7845136104775572638194976338663498757768); - sprk_storage->a[1] = SUN_RCONST(0.2355732133593581336847931829785346016865); - sprk_storage->a[2] = -SUN_RCONST(1.177679984178871006946415680964315734639); - sprk_storage->a[3] = SUN_RCONST(1.315186320683911218884249728238862514352); - sprk_storage->a[4] = sprk_storage->a[2]; - sprk_storage->a[5] = sprk_storage->a[1]; - sprk_storage->a[6] = sprk_storage->a[0]; - sprk_storage->a[7] = SUN_RCONST(0.0); - sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / + sprk_storage->a[0] = SUN_RCONST(0.7845136104775572638194976338663498757768); + sprk_storage->a[1] = SUN_RCONST(0.2355732133593581336847931829785346016865); + sprk_storage->a[2] = -SUN_RCONST(1.177679984178871006946415680964315734639); + sprk_storage->a[3] = SUN_RCONST(1.315186320683911218884249728238862514352); + sprk_storage->a[4] = sprk_storage->a[2]; + sprk_storage->a[5] = sprk_storage->a[1]; + sprk_storage->a[6] = sprk_storage->a[0]; + sprk_storage->a[7] = SUN_RCONST(0.0); + sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / SUN_RCONST(2.0); sprk_storage->ahat[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / SUN_RCONST(2.0); @@ -238,7 +240,7 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() (Original) Suzuki, M., & Umeno, K. (1993). Higher-order decomposition theory of exponential operators and its applications to QMC and nonlinear dynamics. - Computer simulation studies in condensed-matter physics VI, 74-86. + Computer simulation studies in condensed-matter physics VI, 74-86. https://doi.org/10.1007/978-3-642-78448-4_7 McLachlan, R.I.: On the Numerical Integration of Ordinary Differential @@ -252,24 +254,24 @@ ARKodeSPRKStorage ARKodeSymplecticSuzukiUmeno816() ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(16); sprk_storage->q = 8; sprk_storage->stages = 16; - sprk_storage->a[0] = SUN_RCONST(0.7416703643506129534482278017838063156035); - sprk_storage->a[1] = -SUN_RCONST(0.4091008258000315939973000958935634173099); - sprk_storage->a[2] = SUN_RCONST(0.1907547102962383799538762564503716627355); - sprk_storage->a[3] = -SUN_RCONST(0.5738624711160822666563877266355357421595); - sprk_storage->a[4] = SUN_RCONST(0.2990641813036559238444635406886029882258); - sprk_storage->a[5] = SUN_RCONST(0.3346249182452981837849579798821822886337); - sprk_storage->a[6] = SUN_RCONST(0.3152930923967665966320566638110024309941); - sprk_storage->a[7] = -SUN_RCONST(0.7968879393529163540197888401737330534463); - sprk_storage->a[8] = sprk_storage->a[6]; - sprk_storage->a[9] = sprk_storage->a[5]; - sprk_storage->a[10] = sprk_storage->a[4]; - sprk_storage->a[11] = sprk_storage->a[3]; - sprk_storage->a[12] = sprk_storage->a[2]; - sprk_storage->a[13] = sprk_storage->a[1]; - sprk_storage->a[14] = sprk_storage->a[0]; - sprk_storage->a[15] = SUN_RCONST(0.0); - sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / + sprk_storage->a[0] = SUN_RCONST(0.7416703643506129534482278017838063156035); + sprk_storage->a[1] = -SUN_RCONST(0.4091008258000315939973000958935634173099); + sprk_storage->a[2] = SUN_RCONST(0.1907547102962383799538762564503716627355); + sprk_storage->a[3] = -SUN_RCONST(0.5738624711160822666563877266355357421595); + sprk_storage->a[4] = SUN_RCONST(0.2990641813036559238444635406886029882258); + sprk_storage->a[5] = SUN_RCONST(0.3346249182452981837849579798821822886337); + sprk_storage->a[6] = SUN_RCONST(0.3152930923967665966320566638110024309941); + sprk_storage->a[7] = -SUN_RCONST(0.7968879393529163540197888401737330534463); + sprk_storage->a[8] = sprk_storage->a[6]; + sprk_storage->a[9] = sprk_storage->a[5]; + sprk_storage->a[10] = sprk_storage->a[4]; + sprk_storage->a[11] = sprk_storage->a[3]; + sprk_storage->a[12] = sprk_storage->a[2]; + sprk_storage->a[13] = sprk_storage->a[1]; + sprk_storage->a[14] = sprk_storage->a[0]; + sprk_storage->a[15] = SUN_RCONST(0.0); + sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); + sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / SUN_RCONST(2.0); sprk_storage->ahat[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / SUN_RCONST(2.0); @@ -428,8 +430,7 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) case ARKODE_SPRK_MCLACHLAN_2_2: return ARKodeSymplecticMcLachlan2(); case ARKODE_SPRK_MCLACHLAN_3_3: return ARKodeSymplecticMcLachlan3(); case ARKODE_SPRK_MCLACHLAN_4_4: return ARKodeSymplecticMcLachlan4(); - case ARKODE_SPRK_CANDY_ROZMUS_4_4: - return ARKodeSymplecticCandyRozmus4(); + case ARKODE_SPRK_CANDY_ROZMUS_4_4: return ARKodeSymplecticCandyRozmus4(); case ARKODE_SPRK_MCLACHLAN_5_6: return ARKodeSymplecticMcLachlan5(); case ARKODE_SPRK_YOSHIDA_6_8: return ARKodeSymplecticYoshida6(); case ARKODE_SPRK_SUZUKI_UMENO_8_16: return ARKodeSymplecticSuzukiUmeno816(); From 4bc3ecc3b368ab208380a0b6a1cb287a69ae8f30 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 30 Jun 2023 15:19:23 -0700 Subject: [PATCH 123/177] fix set but unused warning --- src/arkode/arkode_sprkstep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 46c404a471..4faeeebc7c 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -283,8 +283,8 @@ int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, realtype* tret, int itask) { /* unpack ark_mem, call arkEvolve, and return */ + ARKodeMem ark_mem; int retval = 0; - ARKodeMem ark_mem = NULL; if (arkode_mem == NULL) { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKKStepGetDky", @@ -308,8 +308,8 @@ int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) { /* unpack ark_mem, call arkGetDky, and return */ + ARKodeMem ark_mem; int retval = 0; - ARKodeMem ark_mem = NULL; if (arkode_mem == NULL) { arkProcessError(NULL, ARK_MEM_NULL, "ARKODE::SPRKStep", "SPRKKStepGetDky", From 171d5bd53bcdac0e5a65b0d864ea5310e6bf7a3b Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 6 Jul 2023 08:38:42 -0700 Subject: [PATCH 124/177] fix output precisions --- examples/arkode/C_serial/ark_damped_harmonic_symplectic.c | 8 ++++---- examples/arkode/C_serial/ark_harmonic_symplectic.c | 6 ++++-- examples/arkode/C_serial/ark_kepler.c | 7 ++++--- test/answers | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c index 7acbf5543b..8e4c832ea1 100644 --- a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c @@ -136,8 +136,8 @@ int main(int argc, char* argv[]) tret = T0; tout = T0 + dTout; /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", tret, ydata[1], - Hamiltonian(y, tret)); + fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", (long double)tret, + (long double)ydata[1], (long double)Hamiltonian(y, tret)); /* Do integration */ for (iout = 0; iout < num_output_times; iout++) @@ -146,8 +146,8 @@ int main(int argc, char* argv[]) retval = SPRKStepEvolve(arkode_mem, tout, y, &tret, ARK_NORMAL); /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", tret, ydata[1], - Hamiltonian(y, tret)); + fprintf(stdout, "t = %.6Lf, q(t) = %.6Lf, H = %.6Lf\n", (long double)tret, + (long double)ydata[1], (long double)Hamiltonian(y, tret)); /* Check if the solve was successful, if so, update the time and continue */ if (retval >= 0) diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index 400fb73527..96fab1e76f 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -158,7 +158,8 @@ int main(int argc, char* argv[]) tret = T0; tout = T0 + dTout; fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.6Lf\n", - tret, ydata[0], Energy(y, dt, &udata), SUN_RCONST(0.0)); + (long double)tret, (long double)ydata[0], + (long double)Energy(y, dt, &udata), (long double)SUN_RCONST(0.0)); /* Do integration */ for (iout = 0; iout < num_output_times; iout++) @@ -175,7 +176,8 @@ int main(int argc, char* argv[]) /* Output current integration status */ fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.16Lf\n", - tret, ydata[0], Energy(y, dt, &udata), err); + (long double)tret, (long double)ydata[0], + (long double)Energy(y, dt, &udata), (long double)err); /* Check that solution error is within tolerance */ if (err > SUNMAX(dt / pow(10, order - 2), 1000 * SUN_UNIT_ROUNDOFF)) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index ae4346d455..896896a0bd 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -415,9 +415,10 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) tout = T0 + dTout; H0 = Hamiltonian(y); L0 = AngularMomentum(y); - fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf\n", tret, H0, L0); - fprintf(times_fp, "%.16Lf\n", tret); - fprintf(conserved_fp, "%.16Lf, %.16Lf\n", H0, L0); + fprintf(stdout, "t = %.4Lf, H(p,q) = %.16Lf, L(p,q) = %.16Lf\n", + (long double)tret, (long double)H0, (long double)L0); + fprintf(times_fp, "%.16Lf\n", (long double)tret); + fprintf(conserved_fp, "%.16Lf, %.16Lf\n", (long double)H0, (long double)L0); N_VPrintFile(y, solution_fp); /* Do integration */ diff --git a/test/answers b/test/answers index b4b11efa87..66b1a8897b 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit b4b11efa87ee36eca35099657b9964b7c732f1e7 +Subproject commit 66b1a8897b3d3c1870001c03d1bc4f40effbe86d From b5613d3660688f7adc7a2643a59a3edc4f32fe7f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 6 Jul 2023 08:40:30 -0700 Subject: [PATCH 125/177] add warning about precision for McLachlan 4 and 5 --- doc/arkode/guide/source/Butcher.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 1af5f72f58..9b67064bf8 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1780,6 +1780,10 @@ Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_4_4`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. +.. warning:: + + This method only has coefficients sufficient for single or double precision. + ARKODE_SPRK_CANDY_ROZMUS_4_4 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1800,6 +1804,10 @@ Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_5_6`` to :c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. +.. warning:: + + This method only has coefficients sufficient for single or double precision. + ARKODE_SPRK_YOSHIDA_6_8 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From d20dfd27737e0aaf1b0ae0989e81dcbc8f5f97a1 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 6 Jul 2023 08:57:42 -0700 Subject: [PATCH 126/177] fix unused variable error --- src/arkode/arkode_sprkstep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 4faeeebc7c..69c8acdbeb 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -283,7 +283,7 @@ int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, realtype* tret, int itask) { /* unpack ark_mem, call arkEvolve, and return */ - ARKodeMem ark_mem; + ARKodeMem ark_mem = NULL; int retval = 0; if (arkode_mem == NULL) { @@ -293,7 +293,7 @@ int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, } ark_mem = (ARKodeMem)arkode_mem; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); - retval = arkEvolve((ARKodeMem)arkode_mem, tout, yout, tret, itask); + retval = arkEvolve(ark_mem, tout, yout, tret, itask); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); return (retval); } @@ -308,7 +308,7 @@ int SPRKStepEvolve(void* arkode_mem, realtype tout, N_Vector yout, int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) { /* unpack ark_mem, call arkGetDky, and return */ - ARKodeMem ark_mem; + ARKodeMem ark_mem = NULL; int retval = 0; if (arkode_mem == NULL) { @@ -318,7 +318,7 @@ int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) } ark_mem = (ARKodeMem)arkode_mem; SUNDIALS_MARK_FUNCTION_BEGIN(ARK_PROFILER); - retval = arkGetDky((ARKodeMem)arkode_mem, t, k, dky); + retval = arkGetDky(ark_mem, t, k, dky); SUNDIALS_MARK_FUNCTION_END(ARK_PROFILER); return (retval); } From 6d4e813302db3e55c9208b5b633da1adce4c8c19 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 6 Jul 2023 09:23:58 -0700 Subject: [PATCH 127/177] gen fortran --- include/arkode/arkode_sprk.h | 38 +- src/arkode/arkode_sprk.c | 2 +- src/arkode/fmod/CMakeLists.txt | 2 + src/arkode/fmod/farkode_arkstep_mod.c | 14 + src/arkode/fmod/farkode_arkstep_mod.f90 | 28 + src/arkode/fmod/farkode_erkstep_mod.c | 14 + src/arkode/fmod/farkode_erkstep_mod.f90 | 26 + src/arkode/fmod/farkode_mod.c | 212 +++++ src/arkode/fmod/farkode_mod.f90 | 441 ++++++++- src/arkode/fmod/farkode_mristep_mod.c | 14 + src/arkode/fmod/farkode_mristep_mod.f90 | 26 + src/arkode/fmod/farkode_sprkstep_mod.c | 771 +++++++++++++++ src/arkode/fmod/farkode_sprkstep_mod.f90 | 1102 ++++++++++++++++++++++ src/cvode/fmod/fcvode_mod.c | 14 + src/cvode/fmod/fcvode_mod.f90 | 26 + src/cvodes/fmod/fcvodes_mod.c | 14 + src/cvodes/fmod/fcvodes_mod.f90 | 26 + swig/Makefile | 2 +- swig/arkode/farkode_mod.i | 5 + swig/arkode/farkode_sprkstep_mod.i | 30 + 20 files changed, 2787 insertions(+), 20 deletions(-) create mode 100644 src/arkode/fmod/farkode_sprkstep_mod.c create mode 100644 src/arkode/fmod/farkode_sprkstep_mod.f90 create mode 100644 swig/arkode/farkode_sprkstep_mod.i diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index bd2944594e..ed5da0a9e2 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -25,8 +25,8 @@ extern "C" { typedef enum { - ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ - ARKODE_MIN_SPRK_NUM = 0, + ARKODE_SPRK_NONE = -1, /* ensure enum is signed int */ + ARKODE_MIN_SPRK_NUM = 0, ARKODE_SPRK_EULER_1_1 = ARKODE_MIN_SPRK_NUM, ARKODE_SPRK_LEAPFROG_2_2, ARKODE_SPRK_PSEUDO_LEAPFROG_2_2, @@ -57,18 +57,28 @@ struct ARKodeSPRKStorage_s typedef _SUNDIALS_STRUCT_ ARKodeSPRKStorage_s* ARKodeSPRKStorage; /* Utility routines to allocate/free/output SPRK structures */ -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id); -SUNDIALS_EXPORT ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method); -SUNDIALS_EXPORT ARKodeSPRKStorage -ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage); -SUNDIALS_EXPORT void ARKodeSPRKStorage_Space(ARKodeSPRKStorage sprk_storage, - sunindextype* liw, - sunindextype* lrw); -SUNDIALS_EXPORT void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage); -SUNDIALS_EXPORT int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, - ARKodeButcherTable* erk_ptr, - ARKodeButcherTable* dirk_ptr); +SUNDIALS_EXPORT +ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages); + +SUNDIALS_EXPORT +ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id); + +SUNDIALS_EXPORT +ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method); + +SUNDIALS_EXPORT +ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage); + +SUNDIALS_EXPORT +void ARKodeSPRKStorage_Space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, + sunindextype* lrw); +SUNDIALS_EXPORT +void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage); + +SUNDIALS_EXPORT +int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, + ARKodeButcherTable* erk_ptr, + ARKodeButcherTable* dirk_ptr); /* Different methods */ diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index f4e54c2531..366c1322d6 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -510,7 +510,7 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage) return sprk_storage; } -void ARKodeSPRKStorage_space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, +void ARKodeSPRKStorage_Space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, sunindextype* lrw) { *liw = 2; diff --git a/src/arkode/fmod/CMakeLists.txt b/src/arkode/fmod/CMakeLists.txt index cb90d2ae89..5ac015daf1 100644 --- a/src/arkode/fmod/CMakeLists.txt +++ b/src/arkode/fmod/CMakeLists.txt @@ -21,6 +21,8 @@ set(arkode_SOURCES farkode_arkstep_mod.c farkode_erkstep_mod.f90 farkode_erkstep_mod.c + farkode_sprkstep_mod.f90 + farkode_sprkstep_mod.c farkode_mristep_mod.f90 farkode_mristep_mod.c) diff --git a/src/arkode/fmod/farkode_arkstep_mod.c b/src/arkode/fmod/farkode_arkstep_mod.c index 543f624102..5d6d132200 100644 --- a/src/arkode/fmod/farkode_arkstep_mod.c +++ b/src/arkode/fmod/farkode_arkstep_mod.c @@ -1089,6 +1089,20 @@ SWIGEXPORT int _wrap_FARKStepSetMaxStep(void *farg1, double const *farg2) { } +SWIGEXPORT int _wrap_FARKStepSetInterpolateStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)ARKStepSetInterpolateStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKStepSetStopTime(void *farg1, double const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod/farkode_arkstep_mod.f90 b/src/arkode/fmod/farkode_arkstep_mod.f90 index 5002a7b1c4..aacb56fd22 100644 --- a/src/arkode/fmod/farkode_arkstep_mod.f90 +++ b/src/arkode/fmod/farkode_arkstep_mod.f90 @@ -49,9 +49,11 @@ module farkode_arkstep_mod integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_DIRK_3 = ARKODE_ARK324L2SA_DIRK_4_2_3 integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_DIRK_4 = ARKODE_SDIRK_5_3_4 integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_DIRK_5 = ARKODE_ARK548L2SA_DIRK_8_4_5 + integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_ARK_ETABLE_2 = ARKODE_ARK2_ERK_3_1_2 integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_ARK_ETABLE_3 = ARKODE_ARK324L2SA_ERK_4_2_3 integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_ARK_ETABLE_4 = ARKODE_ARK436L2SA_ERK_6_3_4 integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_ARK_ETABLE_5 = ARKODE_ARK548L2SA_ERK_8_4_5 + integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_ARK_ITABLE_2 = ARKODE_ARK2_DIRK_3_1_2 integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_ARK_ITABLE_3 = ARKODE_ARK324L2SA_DIRK_4_2_3 integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_ARK_ITABLE_4 = ARKODE_ARK436L2SA_DIRK_6_3_4 integer(C_INT), parameter, public :: ARKSTEP_DEFAULT_ARK_ITABLE_5 = ARKODE_ARK548L2SA_DIRK_8_4_5 @@ -117,6 +119,7 @@ module farkode_arkstep_mod public :: FARKStepSetInitStep public :: FARKStepSetMinStep public :: FARKStepSetMaxStep + public :: FARKStepSetInterpolateStopTime public :: FARKStepSetStopTime public :: FARKStepClearStopTime public :: FARKStepSetFixedStep @@ -758,6 +761,15 @@ function swigc_FARKStepSetMaxStep(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKStepSetInterpolateStopTime(farg1, farg2) & +bind(C, name="_wrap_FARKStepSetInterpolateStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKStepSetStopTime(farg1, farg2) & bind(C, name="_wrap_FARKStepSetStopTime") & result(fresult) @@ -2647,6 +2659,22 @@ function FARKStepSetMaxStep(arkode_mem, hmax) & swig_result = fresult end function +function FARKStepSetInterpolateStopTime(arkode_mem, interp) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: interp +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = interp +fresult = swigc_FARKStepSetInterpolateStopTime(farg1, farg2) +swig_result = fresult +end function + function FARKStepSetStopTime(arkode_mem, tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod/farkode_erkstep_mod.c b/src/arkode/fmod/farkode_erkstep_mod.c index d990659fb9..65d598878b 100644 --- a/src/arkode/fmod/farkode_erkstep_mod.c +++ b/src/arkode/fmod/farkode_erkstep_mod.c @@ -757,6 +757,20 @@ SWIGEXPORT int _wrap_FERKStepSetMaxStep(void *farg1, double const *farg2) { } +SWIGEXPORT int _wrap_FERKStepSetInterpolateStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)ERKStepSetInterpolateStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FERKStepSetStopTime(void *farg1, double const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod/farkode_erkstep_mod.f90 b/src/arkode/fmod/farkode_erkstep_mod.f90 index 7e2b05ae23..44832be5b7 100644 --- a/src/arkode/fmod/farkode_erkstep_mod.f90 +++ b/src/arkode/fmod/farkode_erkstep_mod.f90 @@ -84,6 +84,7 @@ module farkode_erkstep_mod public :: FERKStepSetInitStep public :: FERKStepSetMinStep public :: FERKStepSetMaxStep + public :: FERKStepSetInterpolateStopTime public :: FERKStepSetStopTime public :: FERKStepClearStopTime public :: FERKStepSetFixedStep @@ -461,6 +462,15 @@ function swigc_FERKStepSetMaxStep(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FERKStepSetInterpolateStopTime(farg1, farg2) & +bind(C, name="_wrap_FERKStepSetInterpolateStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FERKStepSetStopTime(farg1, farg2) & bind(C, name="_wrap_FERKStepSetStopTime") & result(fresult) @@ -1479,6 +1489,22 @@ function FERKStepSetMaxStep(arkode_mem, hmax) & swig_result = fresult end function +function FERKStepSetInterpolateStopTime(arkode_mem, interp) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: interp +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = interp +fresult = swigc_FERKStepSetInterpolateStopTime(farg1, farg2) +swig_result = fresult +end function + function FERKStepSetStopTime(arkode_mem, tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod/farkode_mod.c b/src/arkode/fmod/farkode_mod.c index 61c3157c6c..2312a9e2ac 100644 --- a/src/arkode/fmod/farkode_mod.c +++ b/src/arkode/fmod/farkode_mod.c @@ -238,6 +238,7 @@ enum { #include "arkode/arkode_butcher.h" #include "arkode/arkode_butcher_dirk.h" #include "arkode/arkode_butcher_erk.h" +#include "arkode/arkode_sprk.h" #include "arkode/arkode_ls.h" @@ -803,4 +804,215 @@ SWIGEXPORT void * _wrap_FARKodeButcherTable_LoadERKByName(SwigArrayWrapper *farg } +SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_q_set(SwigClassWrapper const *farg1, int const *farg2) { + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + int arg2 ; + + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::q", return ); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + arg2 = (int)(*farg2); + if (arg1) (arg1)->q = arg2; +} + + +SWIGEXPORT int _wrap_ARKodeSPRKStorage_s_q_get(SwigClassWrapper const *farg1) { + int fresult ; + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + int result; + + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::q", return 0); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + result = (int) ((arg1)->q); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_stages_set(SwigClassWrapper const *farg1, int const *farg2) { + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + int arg2 ; + + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::stages", return ); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + arg2 = (int)(*farg2); + if (arg1) (arg1)->stages = arg2; +} + + +SWIGEXPORT int _wrap_ARKodeSPRKStorage_s_stages_get(SwigClassWrapper const *farg1) { + int fresult ; + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + int result; + + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::stages", return 0); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + result = (int) ((arg1)->stages); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_a_set(SwigClassWrapper const *farg1, double *farg2) { + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + sunrealtype *arg2 = (sunrealtype *) 0 ; + + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::a", return ); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + arg2 = (sunrealtype *)(farg2); + if (arg1) (arg1)->a = arg2; +} + + +SWIGEXPORT double * _wrap_ARKodeSPRKStorage_s_a_get(SwigClassWrapper const *farg1) { + double * fresult ; + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + sunrealtype *result = 0 ; + + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::a", return 0); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + result = (sunrealtype *) ((arg1)->a); + fresult = result; + return fresult; +} + + +SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_ahat_set(SwigClassWrapper const *farg1, double *farg2) { + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + sunrealtype *arg2 = (sunrealtype *) 0 ; + + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::ahat", return ); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + arg2 = (sunrealtype *)(farg2); + if (arg1) (arg1)->ahat = arg2; +} + + +SWIGEXPORT double * _wrap_ARKodeSPRKStorage_s_ahat_get(SwigClassWrapper const *farg1) { + double * fresult ; + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + sunrealtype *result = 0 ; + + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::ahat", return 0); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + result = (sunrealtype *) ((arg1)->ahat); + fresult = result; + return fresult; +} + + +SWIGEXPORT SwigClassWrapper _wrap_new_ARKodeSPRKStorage_s() { + SwigClassWrapper fresult ; + struct ARKodeSPRKStorage_s *result = 0 ; + + result = (struct ARKodeSPRKStorage_s *)calloc(1, sizeof(struct ARKodeSPRKStorage_s)); + fresult.cptr = result; + fresult.cmemflags = SWIG_MEM_RVALUE | (1 ? SWIG_MEM_OWN : 0); + return fresult; +} + + +SWIGEXPORT void _wrap_delete_ARKodeSPRKStorage_s(SwigClassWrapper *farg1) { + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + + SWIG_check_mutable(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::~ARKodeSPRKStorage_s()", return ); + arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + free((char *) arg1); +} + + +SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_op_assign__(SwigClassWrapper *farg1, SwigClassWrapper const *farg2) { + struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + struct ARKodeSPRKStorage_s *arg2 = 0 ; + + (void)sizeof(arg1); + (void)sizeof(arg2); + SWIG_assign(farg1, *farg2); + +} + + +SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Alloc(int const *farg1) { + void * fresult ; + int arg1 ; + ARKodeSPRKStorage result; + + arg1 = (int)(*farg1); + result = (ARKodeSPRKStorage)ARKodeSPRKStorage_Alloc(arg1); + fresult = result; + return fresult; +} + + +SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Load(int const *farg1) { + void * fresult ; + ARKODE_SPRKMethodID arg1 ; + ARKodeSPRKStorage result; + + arg1 = (ARKODE_SPRKMethodID)(*farg1); + result = (ARKodeSPRKStorage)ARKodeSPRKStorage_Load(arg1); + fresult = result; + return fresult; +} + + +SWIGEXPORT void * _wrap_FARKodeSPRKStorage_LoadByName(SwigArrayWrapper *farg1) { + void * fresult ; + char *arg1 = (char *) 0 ; + ARKodeSPRKStorage result; + + arg1 = (char *)(farg1->data); + result = (ARKodeSPRKStorage)ARKodeSPRKStorage_LoadByName((char const *)arg1); + fresult = result; + return fresult; +} + + +SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Copy(void *farg1) { + void * fresult ; + ARKodeSPRKStorage arg1 = (ARKodeSPRKStorage) 0 ; + ARKodeSPRKStorage result; + + arg1 = (ARKodeSPRKStorage)(farg1); + result = (ARKodeSPRKStorage)ARKodeSPRKStorage_Copy(arg1); + fresult = result; + return fresult; +} + + +SWIGEXPORT void _wrap_FARKodeSPRKStorage_Space(void *farg1, int64_t *farg2, int64_t *farg3) { + ARKodeSPRKStorage arg1 = (ARKodeSPRKStorage) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; + + arg1 = (ARKodeSPRKStorage)(farg1); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); + ARKodeSPRKStorage_Space(arg1,arg2,arg3); +} + + +SWIGEXPORT void _wrap_FARKodeSPRKStorage_Free(void *farg1) { + ARKodeSPRKStorage arg1 = (ARKodeSPRKStorage) 0 ; + + arg1 = (ARKodeSPRKStorage)(farg1); + ARKodeSPRKStorage_Free(arg1); +} + + +SWIGEXPORT int _wrap_FARKodeSPRKStorage_ToButcher(void *farg1, void *farg2, void *farg3) { + int fresult ; + ARKodeSPRKStorage arg1 = (ARKodeSPRKStorage) 0 ; + ARKodeButcherTable *arg2 = (ARKodeButcherTable *) 0 ; + ARKodeButcherTable *arg3 = (ARKodeButcherTable *) 0 ; + int result; + + arg1 = (ARKodeSPRKStorage)(farg1); + arg2 = (ARKodeButcherTable *)(farg2); + arg3 = (ARKodeButcherTable *)(farg3); + result = (int)ARKodeSPRKStorage_ToButcher(arg1,arg2,arg3); + fresult = (int)(result); + return fresult; +} + + diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index dd41dfce77..25d1546053 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -192,7 +192,8 @@ module farkode_mod enumerator :: ARKODE_ESDIRK437L2SA_7_3_4 enumerator :: ARKODE_ESDIRK547L2SA_7_4_5 enumerator :: ARKODE_ESDIRK547L2SA2_7_4_5 - enumerator :: ARKODE_MAX_DIRK_NUM = ARKODE_ESDIRK547L2SA2_7_4_5 + enumerator :: ARKODE_ARK2_DIRK_3_1_2 + enumerator :: ARKODE_MAX_DIRK_NUM = ARKODE_ARK2_DIRK_3_1_2 end enum integer, parameter, public :: ARKODE_DIRKTableID = kind(ARKODE_DIRK_NONE) public :: ARKODE_DIRK_NONE, ARKODE_MIN_DIRK_NUM, ARKODE_SDIRK_2_1_2, ARKODE_BILLINGTON_3_3_2, ARKODE_TRBDF2_3_3_2, & @@ -200,7 +201,8 @@ module farkode_mod ARKODE_KVAERNO_5_3_4, ARKODE_ARK436L2SA_DIRK_6_3_4, ARKODE_KVAERNO_7_4_5, ARKODE_ARK548L2SA_DIRK_8_4_5, & ARKODE_ARK437L2SA_DIRK_7_3_4, ARKODE_ARK548L2SAb_DIRK_8_4_5, ARKODE_ESDIRK324L2SA_4_2_3, ARKODE_ESDIRK325L2SA_5_2_3, & ARKODE_ESDIRK32I5L2SA_5_2_3, ARKODE_ESDIRK436L2SA_6_3_4, ARKODE_ESDIRK43I6L2SA_6_3_4, ARKODE_QESDIRK436L2SA_6_3_4, & - ARKODE_ESDIRK437L2SA_7_3_4, ARKODE_ESDIRK547L2SA_7_4_5, ARKODE_ESDIRK547L2SA2_7_4_5, ARKODE_MAX_DIRK_NUM + ARKODE_ESDIRK437L2SA_7_3_4, ARKODE_ESDIRK547L2SA_7_4_5, ARKODE_ESDIRK547L2SA2_7_4_5, ARKODE_ARK2_DIRK_3_1_2, & + ARKODE_MAX_DIRK_NUM public :: FARKodeButcherTable_LoadDIRK type, bind(C) :: SwigArrayWrapper type(C_PTR), public :: data = C_NULL_PTR @@ -243,16 +245,66 @@ module farkode_mod enumerator :: ARKODE_KNOTH_WOLKE_3_3 enumerator :: ARKODE_ARK437L2SA_ERK_7_3_4 enumerator :: ARKODE_ARK548L2SAb_ERK_8_4_5 - enumerator :: ARKODE_MAX_ERK_NUM = ARKODE_ARK548L2SAb_ERK_8_4_5 + enumerator :: ARKODE_ARK2_ERK_3_1_2 + enumerator :: ARKODE_MAX_ERK_NUM = ARKODE_ARK2_ERK_3_1_2 end enum integer, parameter, public :: ARKODE_ERKTableID = kind(ARKODE_ERK_NONE) public :: ARKODE_ERK_NONE, ARKODE_MIN_ERK_NUM, ARKODE_HEUN_EULER_2_1_2, ARKODE_BOGACKI_SHAMPINE_4_2_3, & ARKODE_ARK324L2SA_ERK_4_2_3, ARKODE_ZONNEVELD_5_3_4, ARKODE_ARK436L2SA_ERK_6_3_4, ARKODE_SAYFY_ABURUB_6_3_4, & ARKODE_CASH_KARP_6_4_5, ARKODE_FEHLBERG_6_4_5, ARKODE_DORMAND_PRINCE_7_4_5, ARKODE_ARK548L2SA_ERK_8_4_5, & ARKODE_VERNER_8_5_6, ARKODE_FEHLBERG_13_7_8, ARKODE_KNOTH_WOLKE_3_3, ARKODE_ARK437L2SA_ERK_7_3_4, & - ARKODE_ARK548L2SAb_ERK_8_4_5, ARKODE_MAX_ERK_NUM + ARKODE_ARK548L2SAb_ERK_8_4_5, ARKODE_ARK2_ERK_3_1_2, ARKODE_MAX_ERK_NUM public :: FARKodeButcherTable_LoadERK public :: FARKodeButcherTable_LoadERKByName + ! typedef enum ARKODE_SPRKMethodID + enum, bind(c) + enumerator :: ARKODE_SPRK_NONE = -1 + enumerator :: ARKODE_MIN_SPRK_NUM = 0 + enumerator :: ARKODE_SPRK_EULER_1_1 = ARKODE_MIN_SPRK_NUM + enumerator :: ARKODE_SPRK_LEAPFROG_2_2 + enumerator :: ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 + enumerator :: ARKODE_SPRK_RUTH_3_3 + enumerator :: ARKODE_SPRK_MCLACHLAN_2_2 + enumerator :: ARKODE_SPRK_MCLACHLAN_3_3 + enumerator :: ARKODE_SPRK_CANDY_ROZMUS_4_4 + enumerator :: ARKODE_SPRK_MCLACHLAN_4_4 + enumerator :: ARKODE_SPRK_MCLACHLAN_5_6 + enumerator :: ARKODE_SPRK_YOSHIDA_6_8 + enumerator :: ARKODE_SPRK_SUZUKI_UMENO_8_16 + enumerator :: ARKODE_SPRK_SOFRONIOU_10_36 + enumerator :: ARKODE_MAX_SPRK_NUM = ARKODE_SPRK_SOFRONIOU_10_36 + end enum + integer, parameter, public :: ARKODE_SPRKMethodID = kind(ARKODE_SPRK_NONE) + public :: ARKODE_SPRK_NONE, ARKODE_MIN_SPRK_NUM, ARKODE_SPRK_EULER_1_1, ARKODE_SPRK_LEAPFROG_2_2, & + ARKODE_SPRK_PSEUDO_LEAPFROG_2_2, ARKODE_SPRK_RUTH_3_3, ARKODE_SPRK_MCLACHLAN_2_2, ARKODE_SPRK_MCLACHLAN_3_3, & + ARKODE_SPRK_CANDY_ROZMUS_4_4, ARKODE_SPRK_MCLACHLAN_4_4, ARKODE_SPRK_MCLACHLAN_5_6, ARKODE_SPRK_YOSHIDA_6_8, & + ARKODE_SPRK_SUZUKI_UMENO_8_16, ARKODE_SPRK_SOFRONIOU_10_36, ARKODE_MAX_SPRK_NUM + ! struct struct ARKodeSPRKStorage_s + type, public :: ARKodeSPRKStorage_s + type(SwigClassWrapper), public :: swigdata + contains + procedure :: set_q => swigf_ARKodeSPRKStorage_s_q_set + procedure :: get_q => swigf_ARKodeSPRKStorage_s_q_get + procedure :: set_stages => swigf_ARKodeSPRKStorage_s_stages_set + procedure :: get_stages => swigf_ARKodeSPRKStorage_s_stages_get + procedure :: set_a => swigf_ARKodeSPRKStorage_s_a_set + procedure :: get_a => swigf_ARKodeSPRKStorage_s_a_get + procedure :: set_ahat => swigf_ARKodeSPRKStorage_s_ahat_set + procedure :: get_ahat => swigf_ARKodeSPRKStorage_s_ahat_get + procedure :: release => swigf_release_ARKodeSPRKStorage_s + procedure, private :: swigf_ARKodeSPRKStorage_s_op_assign__ + generic :: assignment(=) => swigf_ARKodeSPRKStorage_s_op_assign__ + end type ARKodeSPRKStorage_s + interface ARKodeSPRKStorage_s + module procedure swigf_create_ARKodeSPRKStorage_s + end interface + public :: FARKodeSPRKStorage_Alloc + public :: FARKodeSPRKStorage_Load + public :: FARKodeSPRKStorage_LoadByName + public :: FARKodeSPRKStorage_Copy + public :: FARKodeSPRKStorage_Space + public :: FARKodeSPRKStorage_Free + public :: FARKodeSPRKStorage_ToButcher integer(C_INT), parameter, public :: ARKLS_SUCCESS = 0_C_INT integer(C_INT), parameter, public :: ARKLS_MEM_NULL = -1_C_INT integer(C_INT), parameter, public :: ARKLS_LMEM_NULL = -2_C_INT @@ -596,6 +648,154 @@ function swigc_FARKodeButcherTable_LoadERKByName(farg1) & type(C_PTR) :: fresult end function +subroutine swigc_ARKodeSPRKStorage_s_q_set(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_q_set") +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: farg1 +integer(C_INT), intent(in) :: farg2 +end subroutine + +function swigc_ARKodeSPRKStorage_s_q_get(farg1) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_q_get") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: farg1 +integer(C_INT) :: fresult +end function + +subroutine swigc_ARKodeSPRKStorage_s_stages_set(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_stages_set") +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: farg1 +integer(C_INT), intent(in) :: farg2 +end subroutine + +function swigc_ARKodeSPRKStorage_s_stages_get(farg1) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_stages_get") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: farg1 +integer(C_INT) :: fresult +end function + +subroutine swigc_ARKodeSPRKStorage_s_a_set(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_a_set") +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: farg1 +type(C_PTR), value :: farg2 +end subroutine + +function swigc_ARKodeSPRKStorage_s_a_get(farg1) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_a_get") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: farg1 +type(C_PTR) :: fresult +end function + +subroutine swigc_ARKodeSPRKStorage_s_ahat_set(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_ahat_set") +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: farg1 +type(C_PTR), value :: farg2 +end subroutine + +function swigc_ARKodeSPRKStorage_s_ahat_get(farg1) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_ahat_get") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: farg1 +type(C_PTR) :: fresult +end function + +function swigc_new_ARKodeSPRKStorage_s() & +bind(C, name="_wrap_new_ARKodeSPRKStorage_s") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper) :: fresult +end function + +subroutine swigc_delete_ARKodeSPRKStorage_s(farg1) & +bind(C, name="_wrap_delete_ARKodeSPRKStorage_s") +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper), intent(inout) :: farg1 +end subroutine + +subroutine swigc_ARKodeSPRKStorage_s_op_assign__(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKStorage_s_op_assign__") +use, intrinsic :: ISO_C_BINDING +import :: swigclasswrapper +type(SwigClassWrapper), intent(inout) :: farg1 +type(SwigClassWrapper) :: farg2 +end subroutine + +function swigc_FARKodeSPRKStorage_Alloc(farg1) & +bind(C, name="_wrap_FARKodeSPRKStorage_Alloc") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +integer(C_INT), intent(in) :: farg1 +type(C_PTR) :: fresult +end function + +function swigc_FARKodeSPRKStorage_Load(farg1) & +bind(C, name="_wrap_FARKodeSPRKStorage_Load") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +integer(C_INT), intent(in) :: farg1 +type(C_PTR) :: fresult +end function + +function swigc_FARKodeSPRKStorage_LoadByName(farg1) & +bind(C, name="_wrap_FARKodeSPRKStorage_LoadByName") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +import :: swigarraywrapper +type(SwigArrayWrapper) :: farg1 +type(C_PTR) :: fresult +end function + +function swigc_FARKodeSPRKStorage_Copy(farg1) & +bind(C, name="_wrap_FARKodeSPRKStorage_Copy") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR) :: fresult +end function + +subroutine swigc_FARKodeSPRKStorage_Space(farg1, farg2, farg3) & +bind(C, name="_wrap_FARKodeSPRKStorage_Space") +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +type(C_PTR), value :: farg3 +end subroutine + +subroutine swigc_FARKodeSPRKStorage_Free(farg1) & +bind(C, name="_wrap_FARKodeSPRKStorage_Free") +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +end subroutine + +function swigc_FARKodeSPRKStorage_ToButcher(farg1, farg2, farg3) & +bind(C, name="_wrap_FARKodeSPRKStorage_ToButcher") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +type(C_PTR), value :: farg3 +integer(C_INT) :: fresult +end function + end interface @@ -1179,5 +1379,238 @@ function FARKodeButcherTable_LoadERKByName(emethod) & swig_result = fresult end function +subroutine swigf_ARKodeSPRKStorage_s_q_set(self, q) +use, intrinsic :: ISO_C_BINDING +class(ARKodeSPRKStorage_s), intent(in) :: self +integer(C_INT), intent(in) :: q +type(SwigClassWrapper) :: farg1 +integer(C_INT) :: farg2 + +farg1 = self%swigdata +farg2 = q +call swigc_ARKodeSPRKStorage_s_q_set(farg1, farg2) +end subroutine + +function swigf_ARKodeSPRKStorage_s_q_get(self) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +class(ARKodeSPRKStorage_s), intent(in) :: self +integer(C_INT) :: fresult +type(SwigClassWrapper) :: farg1 + +farg1 = self%swigdata +fresult = swigc_ARKodeSPRKStorage_s_q_get(farg1) +swig_result = fresult +end function + +subroutine swigf_ARKodeSPRKStorage_s_stages_set(self, stages) +use, intrinsic :: ISO_C_BINDING +class(ARKodeSPRKStorage_s), intent(in) :: self +integer(C_INT), intent(in) :: stages +type(SwigClassWrapper) :: farg1 +integer(C_INT) :: farg2 + +farg1 = self%swigdata +farg2 = stages +call swigc_ARKodeSPRKStorage_s_stages_set(farg1, farg2) +end subroutine + +function swigf_ARKodeSPRKStorage_s_stages_get(self) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +class(ARKodeSPRKStorage_s), intent(in) :: self +integer(C_INT) :: fresult +type(SwigClassWrapper) :: farg1 + +farg1 = self%swigdata +fresult = swigc_ARKodeSPRKStorage_s_stages_get(farg1) +swig_result = fresult +end function + +subroutine swigf_ARKodeSPRKStorage_s_a_set(self, a) +use, intrinsic :: ISO_C_BINDING +class(ARKodeSPRKStorage_s), intent(in) :: self +real(C_DOUBLE), target, intent(inout) :: a +type(SwigClassWrapper) :: farg1 +type(C_PTR) :: farg2 + +farg1 = self%swigdata +farg2 = c_loc(a) +call swigc_ARKodeSPRKStorage_s_a_set(farg1, farg2) +end subroutine + +function swigf_ARKodeSPRKStorage_s_a_get(self) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +real(C_DOUBLE), pointer :: swig_result +class(ARKodeSPRKStorage_s), intent(in) :: self +type(C_PTR) :: fresult +type(SwigClassWrapper) :: farg1 + +farg1 = self%swigdata +fresult = swigc_ARKodeSPRKStorage_s_a_get(farg1) +call c_f_pointer(fresult, swig_result) +end function + +subroutine swigf_ARKodeSPRKStorage_s_ahat_set(self, ahat) +use, intrinsic :: ISO_C_BINDING +class(ARKodeSPRKStorage_s), intent(in) :: self +real(C_DOUBLE), target, intent(inout) :: ahat +type(SwigClassWrapper) :: farg1 +type(C_PTR) :: farg2 + +farg1 = self%swigdata +farg2 = c_loc(ahat) +call swigc_ARKodeSPRKStorage_s_ahat_set(farg1, farg2) +end subroutine + +function swigf_ARKodeSPRKStorage_s_ahat_get(self) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +real(C_DOUBLE), pointer :: swig_result +class(ARKodeSPRKStorage_s), intent(in) :: self +type(C_PTR) :: fresult +type(SwigClassWrapper) :: farg1 + +farg1 = self%swigdata +fresult = swigc_ARKodeSPRKStorage_s_ahat_get(farg1) +call c_f_pointer(fresult, swig_result) +end function + +function swigf_create_ARKodeSPRKStorage_s() & +result(self) +use, intrinsic :: ISO_C_BINDING +type(ARKodeSPRKStorage_s) :: self +type(SwigClassWrapper) :: fresult + +fresult = swigc_new_ARKodeSPRKStorage_s() +self%swigdata = fresult +end function + +subroutine swigf_release_ARKodeSPRKStorage_s(self) +use, intrinsic :: ISO_C_BINDING +class(ARKodeSPRKStorage_s), intent(inout) :: self +type(SwigClassWrapper) :: farg1 + +farg1 = self%swigdata +if (btest(farg1%cmemflags, swig_cmem_own_bit)) then +call swigc_delete_ARKodeSPRKStorage_s(farg1) +endif +farg1%cptr = C_NULL_PTR +farg1%cmemflags = 0 +self%swigdata = farg1 +end subroutine + +subroutine swigf_ARKodeSPRKStorage_s_op_assign__(self, other) +use, intrinsic :: ISO_C_BINDING +class(ARKodeSPRKStorage_s), intent(inout) :: self +type(ARKodeSPRKStorage_s), intent(in) :: other +type(SwigClassWrapper) :: farg1 +type(SwigClassWrapper) :: farg2 + +farg1 = self%swigdata +farg2 = other%swigdata +call swigc_ARKodeSPRKStorage_s_op_assign__(farg1, farg2) +self%swigdata = farg1 +end subroutine + +function FARKodeSPRKStorage_Alloc(stages) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: swig_result +integer(C_INT), intent(in) :: stages +type(C_PTR) :: fresult +integer(C_INT) :: farg1 + +farg1 = stages +fresult = swigc_FARKodeSPRKStorage_Alloc(farg1) +swig_result = fresult +end function + +function FARKodeSPRKStorage_Load(id) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: swig_result +integer(ARKODE_SPRKMethodID), intent(in) :: id +type(C_PTR) :: fresult +integer(C_INT) :: farg1 + +farg1 = id +fresult = swigc_FARKodeSPRKStorage_Load(farg1) +swig_result = fresult +end function + +function FARKodeSPRKStorage_LoadByName(method) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: swig_result +character(kind=C_CHAR, len=*), target :: method +character(kind=C_CHAR), dimension(:), allocatable, target :: farg1_chars +type(C_PTR) :: fresult +type(SwigArrayWrapper) :: farg1 + +call SWIG_string_to_chararray(method, farg1_chars, farg1) +fresult = swigc_FARKodeSPRKStorage_LoadByName(farg1) +swig_result = fresult +end function + +function FARKodeSPRKStorage_Copy(that_sprk_storage) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: swig_result +type(C_PTR) :: that_sprk_storage +type(C_PTR) :: fresult +type(C_PTR) :: farg1 + +farg1 = that_sprk_storage +fresult = swigc_FARKodeSPRKStorage_Copy(farg1) +swig_result = fresult +end function + +subroutine FARKodeSPRKStorage_Space(sprk_storage, liw, lrw) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: sprk_storage +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 +type(C_PTR) :: farg3 + +farg1 = sprk_storage +farg2 = c_loc(liw(1)) +farg3 = c_loc(lrw(1)) +call swigc_FARKodeSPRKStorage_Space(farg1, farg2, farg3) +end subroutine + +subroutine FARKodeSPRKStorage_Free(sprk_storage) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: sprk_storage +type(C_PTR) :: farg1 + +farg1 = sprk_storage +call swigc_FARKodeSPRKStorage_Free(farg1) +end subroutine + +function FARKodeSPRKStorage_ToButcher(sprk_storage, erk_ptr, dirk_ptr) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: sprk_storage +type(C_PTR), target, intent(inout) :: erk_ptr +type(C_PTR), target, intent(inout) :: dirk_ptr +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 +type(C_PTR) :: farg3 + +farg1 = sprk_storage +farg2 = c_loc(erk_ptr) +farg3 = c_loc(dirk_ptr) +fresult = swigc_FARKodeSPRKStorage_ToButcher(farg1, farg2, farg3) +swig_result = fresult +end function + end module diff --git a/src/arkode/fmod/farkode_mristep_mod.c b/src/arkode/fmod/farkode_mristep_mod.c index fcd9d093b5..8ba7ad5296 100644 --- a/src/arkode/fmod/farkode_mristep_mod.c +++ b/src/arkode/fmod/farkode_mristep_mod.c @@ -1061,6 +1061,20 @@ SWIGEXPORT int _wrap_FMRIStepSetStopTime(void *farg1, double const *farg2) { } +SWIGEXPORT int _wrap_FMRIStepSetInterpolateStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)MRIStepSetInterpolateStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FMRIStepClearStopTime(void *farg1) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod/farkode_mristep_mod.f90 b/src/arkode/fmod/farkode_mristep_mod.f90 index 2c0b32a367..b80ca727f8 100644 --- a/src/arkode/fmod/farkode_mristep_mod.f90 +++ b/src/arkode/fmod/farkode_mristep_mod.f90 @@ -160,6 +160,7 @@ module farkode_mristep_mod public :: FMRIStepSetNonlinConvCoef public :: FMRIStepSetMaxHnilWarns public :: FMRIStepSetStopTime + public :: FMRIStepSetInterpolateStopTime public :: FMRIStepClearStopTime public :: FMRIStepSetFixedStep public :: FMRIStepSetRootDirection @@ -734,6 +735,15 @@ function swigc_FMRIStepSetStopTime(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FMRIStepSetInterpolateStopTime(farg1, farg2) & +bind(C, name="_wrap_FMRIStepSetInterpolateStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FMRIStepClearStopTime(farg1) & bind(C, name="_wrap_FMRIStepClearStopTime") & result(fresult) @@ -2313,6 +2323,22 @@ function FMRIStepSetStopTime(arkode_mem, tstop) & swig_result = fresult end function +function FMRIStepSetInterpolateStopTime(arkode_mem, interp) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: interp +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = interp +fresult = swigc_FMRIStepSetInterpolateStopTime(farg1, farg2) +swig_result = fresult +end function + function FMRIStepClearStopTime(arkode_mem) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod/farkode_sprkstep_mod.c b/src/arkode/fmod/farkode_sprkstep_mod.c new file mode 100644 index 0000000000..b0a538b956 --- /dev/null +++ b/src/arkode/fmod/farkode_sprkstep_mod.c @@ -0,0 +1,771 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.0 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +/* --------------------------------------------------------------- + * Programmer(s): Auto-generated by swig. + * --------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2023, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * -------------------------------------------------------------*/ + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* qualifier for exported *const* global data variables*/ +#ifndef SWIGEXTERN +# ifdef __cplusplus +# define SWIGEXTERN extern +# else +# define SWIGEXTERN +# endif +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + + +#include +#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \ + { printf("In " DECL ": " MSG); assert(0); RETURNNULL; } + + +#include +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# ifndef snprintf +# define snprintf _snprintf +# endif +#endif + + +/* Support for the `contract` feature. + * + * Note that RETURNNULL is first because it's inserted via a 'Replaceall' in + * the fortran.cxx file. + */ +#define SWIG_contract_assert(RETURNNULL, EXPR, MSG) \ + if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); } + + +#define SWIGVERSION 0x040000 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + +#include "arkode/arkode_sprkstep.h" + + +#include +#ifdef _MSC_VER +# ifndef strtoull +# define strtoull _strtoui64 +# endif +# ifndef strtoll +# define strtoll _strtoi64 +# endif +#endif + + +typedef struct { + void* data; + size_t size; +} SwigArrayWrapper; + + +SWIGINTERN SwigArrayWrapper SwigArrayWrapper_uninitialized() { + SwigArrayWrapper result; + result.data = NULL; + result.size = 0; + return result; +} + + +#include + +SWIGEXPORT void * _wrap_FSPRKStepCreate(ARKRhsFn farg1, ARKRhsFn farg2, double const *farg3, N_Vector farg4, void *farg5) { + void * fresult ; + ARKRhsFn arg1 = (ARKRhsFn) 0 ; + ARKRhsFn arg2 = (ARKRhsFn) 0 ; + realtype arg3 ; + N_Vector arg4 = (N_Vector) 0 ; + SUNContext arg5 = (SUNContext) 0 ; + void *result = 0 ; + + arg1 = (ARKRhsFn)(farg1); + arg2 = (ARKRhsFn)(farg2); + arg3 = (realtype)(*farg3); + arg4 = (N_Vector)(farg4); + arg5 = (SUNContext)(farg5); + result = (void *)SPRKStepCreate(arg1,arg2,arg3,arg4,arg5); + fresult = result; + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepReInit(void *farg1, ARKRhsFn farg2, ARKRhsFn farg3, double const *farg4, N_Vector farg5) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKRhsFn arg2 = (ARKRhsFn) 0 ; + ARKRhsFn arg3 = (ARKRhsFn) 0 ; + realtype arg4 ; + N_Vector arg5 = (N_Vector) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKRhsFn)(farg2); + arg3 = (ARKRhsFn)(farg3); + arg4 = (realtype)(*farg4); + arg5 = (N_Vector)(farg5); + result = (int)SPRKStepReInit(arg1,arg2,arg3,arg4,arg5); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepReset(void *farg1, double const *farg2, N_Vector farg3) { + int fresult ; + void *arg1 = (void *) 0 ; + realtype arg2 ; + N_Vector arg3 = (N_Vector) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (realtype)(*farg2); + arg3 = (N_Vector)(farg3); + result = (int)SPRKStepReset(arg1,arg2,arg3); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepRootInit(void *farg1, int const *farg2, ARKRootFn farg3) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + ARKRootFn arg3 = (ARKRootFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + arg3 = (ARKRootFn)(farg3); + result = (int)SPRKStepRootInit(arg1,arg2,arg3); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetDefaults(void *farg1) { + int fresult ; + void *arg1 = (void *) 0 ; + int result; + + arg1 = (void *)(farg1); + result = (int)SPRKStepSetDefaults(arg1); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetUseCompensatedSums(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)SPRKStepSetUseCompensatedSums(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetMethod(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKodeSPRKStorage arg2 = (ARKodeSPRKStorage) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKodeSPRKStorage)(farg2); + result = (int)SPRKStepSetMethod(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetMethodName(void *farg1, SwigArrayWrapper *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (char *)(farg2->data); + result = (int)SPRKStepSetMethodName(arg1,(char const *)arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetOrder(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)SPRKStepSetOrder(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetInterpolantType(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)SPRKStepSetInterpolantType(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetInterpolantDegree(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)SPRKStepSetInterpolantDegree(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetMaxNumSteps(void *farg1, long const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + long arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (long)(*farg2); + result = (int)SPRKStepSetMaxNumSteps(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetStopTime(void *farg1, double const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + realtype arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (realtype)(*farg2); + result = (int)SPRKStepSetStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetFixedStep(void *farg1, double const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + realtype arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (realtype)(*farg2); + result = (int)SPRKStepSetFixedStep(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetErrHandlerFn(void *farg1, ARKErrHandlerFn farg2, void *farg3) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKErrHandlerFn arg2 = (ARKErrHandlerFn) 0 ; + void *arg3 = (void *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKErrHandlerFn)(farg2); + arg3 = (void *)(farg3); + result = (int)SPRKStepSetErrHandlerFn(arg1,arg2,arg3); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetErrFile(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + FILE *arg2 = (FILE *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (FILE *)(farg2); + result = (int)SPRKStepSetErrFile(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetUserData(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + void *arg2 = (void *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (void *)(farg2); + result = (int)SPRKStepSetUserData(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetPostprocessStepFn(void *farg1, ARKPostProcessFn farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKPostProcessFn)(farg2); + result = (int)SPRKStepSetPostprocessStepFn(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepSetPostprocessStageFn(void *farg1, ARKPostProcessFn farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKPostProcessFn)(farg2); + result = (int)SPRKStepSetPostprocessStageFn(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepEvolve(void *farg1, double const *farg2, N_Vector farg3, double *farg4, int const *farg5) { + int fresult ; + void *arg1 = (void *) 0 ; + realtype arg2 ; + N_Vector arg3 = (N_Vector) 0 ; + realtype *arg4 = (realtype *) 0 ; + int arg5 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (realtype)(*farg2); + arg3 = (N_Vector)(farg3); + arg4 = (realtype *)(farg4); + arg5 = (int)(*farg5); + result = (int)SPRKStepEvolve(arg1,arg2,arg3,arg4,arg5); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetDky(void *farg1, double const *farg2, int const *farg3, N_Vector farg4) { + int fresult ; + void *arg1 = (void *) 0 ; + realtype arg2 ; + int arg3 ; + N_Vector arg4 = (N_Vector) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (realtype)(*farg2); + arg3 = (int)(*farg3); + arg4 = (N_Vector)(farg4); + result = (int)SPRKStepGetDky(arg1,arg2,arg3,arg4); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT SwigArrayWrapper _wrap_FSPRKStepGetReturnFlagName(long const *farg1) { + SwigArrayWrapper fresult ; + long arg1 ; + char *result = 0 ; + + arg1 = (long)(*farg1); + result = (char *)SPRKStepGetReturnFlagName(arg1); + fresult.size = strlen((const char*)(result)); + fresult.data = (char *)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetCurrentMethod(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKodeSPRKStorage *arg2 = (ARKodeSPRKStorage *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKodeSPRKStorage *)(farg2); + result = (int)SPRKStepGetCurrentMethod(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetCurrentState(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + N_Vector *arg2 = (N_Vector *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (N_Vector *)(farg2); + result = (int)SPRKStepGetCurrentState(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetCurrentStep(void *farg1, double *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + realtype *arg2 = (realtype *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (realtype *)(farg2); + result = (int)SPRKStepGetCurrentStep(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetCurrentTime(void *farg1, double *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + realtype *arg2 = (realtype *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (realtype *)(farg2); + result = (int)SPRKStepGetCurrentTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetLastStep(void *farg1, double *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + realtype *arg2 = (realtype *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (realtype *)(farg2); + result = (int)SPRKStepGetLastStep(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetNumRhsEvals(void *farg1, long *farg2, long *farg3) { + int fresult ; + void *arg1 = (void *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); + result = (int)SPRKStepGetNumRhsEvals(arg1,arg2,arg3); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetNumStepAttempts(void *farg1, long *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + long *arg2 = (long *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (long *)(farg2); + result = (int)SPRKStepGetNumStepAttempts(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetNumSteps(void *farg1, long *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + long *arg2 = (long *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (long *)(farg2); + result = (int)SPRKStepGetNumSteps(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetRootInfo(void *farg1, int *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int *arg2 = (int *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int *)(farg2); + result = (int)SPRKStepGetRootInfo(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetUserData(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + void **arg2 = (void **) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (void **)(farg2); + result = (int)SPRKStepGetUserData(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepPrintAllStats(void *farg1, void *farg2, int const *farg3) { + int fresult ; + void *arg1 = (void *) 0 ; + FILE *arg2 = (FILE *) 0 ; + SUNOutputFormat arg3 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (FILE *)(farg2); + arg3 = (SUNOutputFormat)(*farg3); + result = (int)SPRKStepPrintAllStats(arg1,arg2,arg3); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepWriteParameters(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + FILE *arg2 = (FILE *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (FILE *)(farg2); + result = (int)SPRKStepWriteParameters(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FSPRKStepGetStepStats(void *farg1, long *farg2, double *farg3, double *farg4, double *farg5, double *farg6) { + int fresult ; + void *arg1 = (void *) 0 ; + long *arg2 = (long *) 0 ; + realtype *arg3 = (realtype *) 0 ; + realtype *arg4 = (realtype *) 0 ; + realtype *arg5 = (realtype *) 0 ; + realtype *arg6 = (realtype *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (long *)(farg2); + arg3 = (realtype *)(farg3); + arg4 = (realtype *)(farg4); + arg5 = (realtype *)(farg5); + arg6 = (realtype *)(farg6); + result = (int)SPRKStepGetStepStats(arg1,arg2,arg3,arg4,arg5,arg6); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT void _wrap_FSPRKStepFree(void *farg1) { + void **arg1 = (void **) 0 ; + + arg1 = (void **)(farg1); + SPRKStepFree(arg1); +} + + + diff --git a/src/arkode/fmod/farkode_sprkstep_mod.f90 b/src/arkode/fmod/farkode_sprkstep_mod.f90 new file mode 100644 index 0000000000..ad9795aba2 --- /dev/null +++ b/src/arkode/fmod/farkode_sprkstep_mod.f90 @@ -0,0 +1,1102 @@ +! This file was automatically generated by SWIG (http://www.swig.org). +! Version 4.0.0 +! +! Do not make changes to this file unless you know what you are doing--modify +! the SWIG interface file instead. + +! --------------------------------------------------------------- +! Programmer(s): Auto-generated by swig. +! --------------------------------------------------------------- +! SUNDIALS Copyright Start +! Copyright (c) 2002-2023, Lawrence Livermore National Security +! and Southern Methodist University. +! All rights reserved. +! +! See the top-level LICENSE and NOTICE files for details. +! +! SPDX-License-Identifier: BSD-3-Clause +! SUNDIALS Copyright End +! --------------------------------------------------------------- + +module farkode_sprkstep_mod + use, intrinsic :: ISO_C_BINDING + use farkode_mod + use fsundials_nvector_mod + use fsundials_context_mod + use fsundials_types_mod + use fsundials_matrix_mod + use fsundials_nvector_mod + use fsundials_context_mod + use fsundials_types_mod + use fsundials_linearsolver_mod + use fsundials_matrix_mod + use fsundials_nvector_mod + use fsundials_context_mod + use fsundials_types_mod + use fsundials_nonlinearsolver_mod + use fsundials_types_mod + implicit none + private + + ! DECLARATION CONSTRUCTS + integer(C_INT), parameter, public :: SPRKSTEP_DEFAULT_1 = ARKODE_SPRK_EULER_1_1 + integer(C_INT), parameter, public :: SPRKSTEP_DEFAULT_2 = ARKODE_SPRK_LEAPFROG_2_2 + integer(C_INT), parameter, public :: SPRKSTEP_DEFAULT_3 = ARKODE_SPRK_MCLACHLAN_3_3 + integer(C_INT), parameter, public :: SPRKSTEP_DEFAULT_4 = ARKODE_SPRK_MCLACHLAN_4_4 + integer(C_INT), parameter, public :: SPRKSTEP_DEFAULT_5 = ARKODE_SPRK_MCLACHLAN_5_6 + integer(C_INT), parameter, public :: SPRKSTEP_DEFAULT_6 = ARKODE_SPRK_YOSHIDA_6_8 + integer(C_INT), parameter, public :: SPRKSTEP_DEFAULT_8 = ARKODE_SPRK_SUZUKI_UMENO_8_16 + integer(C_INT), parameter, public :: SPRKSTEP_DEFAULT_10 = ARKODE_SPRK_SOFRONIOU_10_36 + public :: FSPRKStepCreate + public :: FSPRKStepReInit + public :: FSPRKStepReset + public :: FSPRKStepRootInit + public :: FSPRKStepSetDefaults + public :: FSPRKStepSetUseCompensatedSums + public :: FSPRKStepSetMethod + type, bind(C) :: SwigArrayWrapper + type(C_PTR), public :: data = C_NULL_PTR + integer(C_SIZE_T), public :: size = 0 + end type + public :: FSPRKStepSetMethodName + public :: FSPRKStepSetOrder + public :: FSPRKStepSetInterpolantType + public :: FSPRKStepSetInterpolantDegree + public :: FSPRKStepSetMaxNumSteps + public :: FSPRKStepSetStopTime + public :: FSPRKStepSetFixedStep + public :: FSPRKStepSetErrHandlerFn + public :: FSPRKStepSetErrFile + public :: FSPRKStepSetUserData + public :: FSPRKStepSetPostprocessStepFn + public :: FSPRKStepSetPostprocessStageFn + public :: FSPRKStepEvolve + public :: FSPRKStepGetDky + public :: FSPRKStepGetReturnFlagName + public :: FSPRKStepGetCurrentMethod + public :: FSPRKStepGetCurrentState + public :: FSPRKStepGetCurrentStep + public :: FSPRKStepGetCurrentTime + public :: FSPRKStepGetLastStep + public :: FSPRKStepGetNumRhsEvals + public :: FSPRKStepGetNumStepAttempts + public :: FSPRKStepGetNumSteps + public :: FSPRKStepGetRootInfo + public :: FSPRKStepGetUserData + public :: FSPRKStepPrintAllStats + public :: FSPRKStepWriteParameters + public :: FSPRKStepGetStepStats + public :: FSPRKStepFree + +! WRAPPER DECLARATIONS +interface +function swigc_FSPRKStepCreate(farg1, farg2, farg3, farg4, farg5) & +bind(C, name="_wrap_FSPRKStepCreate") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_FUNPTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +real(C_DOUBLE), intent(in) :: farg3 +type(C_PTR), value :: farg4 +type(C_PTR), value :: farg5 +type(C_PTR) :: fresult +end function + +function swigc_FSPRKStepReInit(farg1, farg2, farg3, farg4, farg5) & +bind(C, name="_wrap_FSPRKStepReInit") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +type(C_FUNPTR), value :: farg3 +real(C_DOUBLE), intent(in) :: farg4 +type(C_PTR), value :: farg5 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepReset(farg1, farg2, farg3) & +bind(C, name="_wrap_FSPRKStepReset") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +real(C_DOUBLE), intent(in) :: farg2 +type(C_PTR), value :: farg3 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepRootInit(farg1, farg2, farg3) & +bind(C, name="_wrap_FSPRKStepRootInit") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +type(C_FUNPTR), value :: farg3 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetDefaults(farg1) & +bind(C, name="_wrap_FSPRKStepSetDefaults") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetUseCompensatedSums(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetUseCompensatedSums") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetMethod(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetMethod") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetMethodName(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetMethodName") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +import :: swigarraywrapper +type(C_PTR), value :: farg1 +type(SwigArrayWrapper) :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetOrder(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetOrder") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetInterpolantType(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetInterpolantType") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetInterpolantDegree(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetInterpolantDegree") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetMaxNumSteps(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetMaxNumSteps") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_LONG), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetStopTime(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +real(C_DOUBLE), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetFixedStep(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetFixedStep") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +real(C_DOUBLE), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetErrHandlerFn(farg1, farg2, farg3) & +bind(C, name="_wrap_FSPRKStepSetErrHandlerFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +type(C_PTR), value :: farg3 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetErrFile(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetErrFile") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetUserData(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetUserData") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetPostprocessStepFn(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetPostprocessStepFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepSetPostprocessStageFn(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepSetPostprocessStageFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepEvolve(farg1, farg2, farg3, farg4, farg5) & +bind(C, name="_wrap_FSPRKStepEvolve") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +real(C_DOUBLE), intent(in) :: farg2 +type(C_PTR), value :: farg3 +type(C_PTR), value :: farg4 +integer(C_INT), intent(in) :: farg5 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetDky(farg1, farg2, farg3, farg4) & +bind(C, name="_wrap_FSPRKStepGetDky") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +real(C_DOUBLE), intent(in) :: farg2 +integer(C_INT), intent(in) :: farg3 +type(C_PTR), value :: farg4 +integer(C_INT) :: fresult +end function + + subroutine SWIG_free(cptr) & + bind(C, name="free") + use, intrinsic :: ISO_C_BINDING + type(C_PTR), value :: cptr +end subroutine +function swigc_FSPRKStepGetReturnFlagName(farg1) & +bind(C, name="_wrap_FSPRKStepGetReturnFlagName") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +import :: swigarraywrapper +integer(C_LONG), intent(in) :: farg1 +type(SwigArrayWrapper) :: fresult +end function + +function swigc_FSPRKStepGetCurrentMethod(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetCurrentMethod") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetCurrentState(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetCurrentState") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetCurrentStep(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetCurrentStep") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetCurrentTime(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetCurrentTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetLastStep(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetLastStep") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetNumRhsEvals(farg1, farg2, farg3) & +bind(C, name="_wrap_FSPRKStepGetNumRhsEvals") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +type(C_PTR), value :: farg3 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetNumStepAttempts(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetNumStepAttempts") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetNumSteps(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetNumSteps") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetRootInfo(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetRootInfo") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetUserData(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepGetUserData") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepPrintAllStats(farg1, farg2, farg3) & +bind(C, name="_wrap_FSPRKStepPrintAllStats") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT), intent(in) :: farg3 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepWriteParameters(farg1, farg2) & +bind(C, name="_wrap_FSPRKStepWriteParameters") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FSPRKStepGetStepStats(farg1, farg2, farg3, farg4, farg5, farg6) & +bind(C, name="_wrap_FSPRKStepGetStepStats") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +type(C_PTR), value :: farg3 +type(C_PTR), value :: farg4 +type(C_PTR), value :: farg5 +type(C_PTR), value :: farg6 +integer(C_INT) :: fresult +end function + +subroutine swigc_FSPRKStepFree(farg1) & +bind(C, name="_wrap_FSPRKStepFree") +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +end subroutine + +end interface + + +contains + ! MODULE SUBPROGRAMS +function FSPRKStepCreate(f1, f2, t0, y0, sunctx) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: swig_result +type(C_FUNPTR), intent(in), value :: f1 +type(C_FUNPTR), intent(in), value :: f2 +real(C_DOUBLE), intent(in) :: t0 +type(N_Vector), target, intent(inout) :: y0 +type(C_PTR) :: sunctx +type(C_PTR) :: fresult +type(C_FUNPTR) :: farg1 +type(C_FUNPTR) :: farg2 +real(C_DOUBLE) :: farg3 +type(C_PTR) :: farg4 +type(C_PTR) :: farg5 + +farg1 = f1 +farg2 = f2 +farg3 = t0 +farg4 = c_loc(y0) +farg5 = sunctx +fresult = swigc_FSPRKStepCreate(farg1, farg2, farg3, farg4, farg5) +swig_result = fresult +end function + +function FSPRKStepReInit(arkode_mem, f1, f2, t0, y0) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: f1 +type(C_FUNPTR), intent(in), value :: f2 +real(C_DOUBLE), intent(in) :: t0 +type(N_Vector), target, intent(inout) :: y0 +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 +type(C_FUNPTR) :: farg3 +real(C_DOUBLE) :: farg4 +type(C_PTR) :: farg5 + +farg1 = arkode_mem +farg2 = f1 +farg3 = f2 +farg4 = t0 +farg5 = c_loc(y0) +fresult = swigc_FSPRKStepReInit(farg1, farg2, farg3, farg4, farg5) +swig_result = fresult +end function + +function FSPRKStepReset(arkode_mem, tr, yr) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), intent(in) :: tr +type(N_Vector), target, intent(inout) :: yr +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +real(C_DOUBLE) :: farg2 +type(C_PTR) :: farg3 + +farg1 = arkode_mem +farg2 = tr +farg3 = c_loc(yr) +fresult = swigc_FSPRKStepReset(farg1, farg2, farg3) +swig_result = fresult +end function + +function FSPRKStepRootInit(arkode_mem, nrtfn, g) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: nrtfn +type(C_FUNPTR), intent(in), value :: g +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 +type(C_FUNPTR) :: farg3 + +farg1 = arkode_mem +farg2 = nrtfn +farg3 = g +fresult = swigc_FSPRKStepRootInit(farg1, farg2, farg3) +swig_result = fresult +end function + +function FSPRKStepSetDefaults(arkode_mem) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT) :: fresult +type(C_PTR) :: farg1 + +farg1 = arkode_mem +fresult = swigc_FSPRKStepSetDefaults(farg1) +swig_result = fresult +end function + +function FSPRKStepSetUseCompensatedSums(arkode_mem, onoff) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: onoff +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = onoff +fresult = swigc_FSPRKStepSetUseCompensatedSums(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetMethod(arkode_mem, sprk_storage) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR) :: sprk_storage +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = sprk_storage +fresult = swigc_FSPRKStepSetMethod(farg1, farg2) +swig_result = fresult +end function + + +subroutine SWIG_string_to_chararray(string, chars, wrap) + use, intrinsic :: ISO_C_BINDING + character(kind=C_CHAR, len=*), intent(IN) :: string + character(kind=C_CHAR), dimension(:), target, allocatable, intent(OUT) :: chars + type(SwigArrayWrapper), intent(OUT) :: wrap + integer :: i + + allocate(character(kind=C_CHAR) :: chars(len(string) + 1)) + do i=1,len(string) + chars(i) = string(i:i) + end do + i = len(string) + 1 + chars(i) = C_NULL_CHAR ! C string compatibility + wrap%data = c_loc(chars) + wrap%size = len(string) +end subroutine + +function FSPRKStepSetMethodName(arkode_mem, method) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +character(kind=C_CHAR, len=*), target :: method +character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_chars +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(SwigArrayWrapper) :: farg2 + +farg1 = arkode_mem +call SWIG_string_to_chararray(method, farg2_chars, farg2) +fresult = swigc_FSPRKStepSetMethodName(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetOrder(arkode_mem, maxord) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: maxord +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = maxord +fresult = swigc_FSPRKStepSetOrder(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetInterpolantType(arkode_mem, itype) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: itype +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = itype +fresult = swigc_FSPRKStepSetInterpolantType(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetInterpolantDegree(arkode_mem, degree) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: degree +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = degree +fresult = swigc_FSPRKStepSetInterpolantDegree(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetMaxNumSteps(arkode_mem, mxsteps) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_LONG), intent(in) :: mxsteps +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_LONG) :: farg2 + +farg1 = arkode_mem +farg2 = mxsteps +fresult = swigc_FSPRKStepSetMaxNumSteps(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetStopTime(arkode_mem, tstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), intent(in) :: tstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +real(C_DOUBLE) :: farg2 + +farg1 = arkode_mem +farg2 = tstop +fresult = swigc_FSPRKStepSetStopTime(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetFixedStep(arkode_mem, hfixed) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), intent(in) :: hfixed +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +real(C_DOUBLE) :: farg2 + +farg1 = arkode_mem +farg2 = hfixed +fresult = swigc_FSPRKStepSetFixedStep(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetErrHandlerFn(arkode_mem, ehfun, eh_data) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: ehfun +type(C_PTR) :: eh_data +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 +type(C_PTR) :: farg3 + +farg1 = arkode_mem +farg2 = ehfun +farg3 = eh_data +fresult = swigc_FSPRKStepSetErrHandlerFn(farg1, farg2, farg3) +swig_result = fresult +end function + +function FSPRKStepSetErrFile(arkode_mem, errfp) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR) :: errfp +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = errfp +fresult = swigc_FSPRKStepSetErrFile(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetUserData(arkode_mem, user_data) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR) :: user_data +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = user_data +fresult = swigc_FSPRKStepSetUserData(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetPostprocessStepFn(arkode_mem, processstep) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: processstep +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 + +farg1 = arkode_mem +farg2 = processstep +fresult = swigc_FSPRKStepSetPostprocessStepFn(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepSetPostprocessStageFn(arkode_mem, processstage) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: processstage +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 + +farg1 = arkode_mem +farg2 = processstage +fresult = swigc_FSPRKStepSetPostprocessStageFn(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepEvolve(arkode_mem, tout, yout, tret, itask) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), intent(in) :: tout +type(N_Vector), target, intent(inout) :: yout +real(C_DOUBLE), dimension(*), target, intent(inout) :: tret +integer(C_INT), intent(in) :: itask +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +real(C_DOUBLE) :: farg2 +type(C_PTR) :: farg3 +type(C_PTR) :: farg4 +integer(C_INT) :: farg5 + +farg1 = arkode_mem +farg2 = tout +farg3 = c_loc(yout) +farg4 = c_loc(tret(1)) +farg5 = itask +fresult = swigc_FSPRKStepEvolve(farg1, farg2, farg3, farg4, farg5) +swig_result = fresult +end function + +function FSPRKStepGetDky(arkode_mem, t, k, dky) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), intent(in) :: t +integer(C_INT), intent(in) :: k +type(N_Vector), target, intent(inout) :: dky +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +real(C_DOUBLE) :: farg2 +integer(C_INT) :: farg3 +type(C_PTR) :: farg4 + +farg1 = arkode_mem +farg2 = t +farg3 = k +farg4 = c_loc(dky) +fresult = swigc_FSPRKStepGetDky(farg1, farg2, farg3, farg4) +swig_result = fresult +end function + + +subroutine SWIG_chararray_to_string(wrap, string) + use, intrinsic :: ISO_C_BINDING + type(SwigArrayWrapper), intent(IN) :: wrap + character(kind=C_CHAR, len=:), allocatable, intent(OUT) :: string + character(kind=C_CHAR), dimension(:), pointer :: chars + integer(kind=C_SIZE_T) :: i + call c_f_pointer(wrap%data, chars, [wrap%size]) + allocate(character(kind=C_CHAR, len=wrap%size) :: string) + do i=1, wrap%size + string(i:i) = chars(i) + end do +end subroutine + +function FSPRKStepGetReturnFlagName(flag) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +character(kind=C_CHAR, len=:), allocatable :: swig_result +integer(C_LONG), intent(in) :: flag +type(SwigArrayWrapper) :: fresult +integer(C_LONG) :: farg1 + +farg1 = flag +fresult = swigc_FSPRKStepGetReturnFlagName(farg1) +call SWIG_chararray_to_string(fresult, swig_result) +if (.false.) call SWIG_free(fresult%data) +end function + +function FSPRKStepGetCurrentMethod(arkode_mem, sprk_storage) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR), target, intent(inout) :: sprk_storage +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(sprk_storage) +fresult = swigc_FSPRKStepGetCurrentMethod(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetCurrentState(arkode_mem, state) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR) :: state +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = state +fresult = swigc_FSPRKStepGetCurrentState(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetCurrentStep(arkode_mem, hcur) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), dimension(*), target, intent(inout) :: hcur +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(hcur(1)) +fresult = swigc_FSPRKStepGetCurrentStep(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetCurrentTime(arkode_mem, tcur) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), dimension(*), target, intent(inout) :: tcur +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(tcur(1)) +fresult = swigc_FSPRKStepGetCurrentTime(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetLastStep(arkode_mem, hlast) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), dimension(*), target, intent(inout) :: hlast +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(hlast(1)) +fresult = swigc_FSPRKStepGetLastStep(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetNumRhsEvals(arkode_mem, nf1, nf2) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_LONG), dimension(*), target, intent(inout) :: nf1 +integer(C_LONG), dimension(*), target, intent(inout) :: nf2 +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 +type(C_PTR) :: farg3 + +farg1 = arkode_mem +farg2 = c_loc(nf1(1)) +farg3 = c_loc(nf2(1)) +fresult = swigc_FSPRKStepGetNumRhsEvals(farg1, farg2, farg3) +swig_result = fresult +end function + +function FSPRKStepGetNumStepAttempts(arkode_mem, step_attempts) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_LONG), dimension(*), target, intent(inout) :: step_attempts +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(step_attempts(1)) +fresult = swigc_FSPRKStepGetNumStepAttempts(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetNumSteps(arkode_mem, nsteps) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_LONG), dimension(*), target, intent(inout) :: nsteps +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(nsteps(1)) +fresult = swigc_FSPRKStepGetNumSteps(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetRootInfo(arkode_mem, rootsfound) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), dimension(*), target, intent(inout) :: rootsfound +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(rootsfound(1)) +fresult = swigc_FSPRKStepGetRootInfo(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetUserData(arkode_mem, user_data) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR), target, intent(inout) :: user_data +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(user_data) +fresult = swigc_FSPRKStepGetUserData(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepPrintAllStats(arkode_mem, outfile, fmt) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR) :: outfile +integer(SUNOutputFormat), intent(in) :: fmt +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 +integer(C_INT) :: farg3 + +farg1 = arkode_mem +farg2 = outfile +farg3 = fmt +fresult = swigc_FSPRKStepPrintAllStats(farg1, farg2, farg3) +swig_result = fresult +end function + +function FSPRKStepWriteParameters(arkode_mem, fp) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR) :: fp +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = fp +fresult = swigc_FSPRKStepWriteParameters(farg1, farg2) +swig_result = fresult +end function + +function FSPRKStepGetStepStats(arkode_mem, nsteps, hinused, hlast, hcur, tcur) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_LONG), dimension(*), target, intent(inout) :: nsteps +real(C_DOUBLE), dimension(*), target, intent(inout) :: hinused +real(C_DOUBLE), dimension(*), target, intent(inout) :: hlast +real(C_DOUBLE), dimension(*), target, intent(inout) :: hcur +real(C_DOUBLE), dimension(*), target, intent(inout) :: tcur +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 +type(C_PTR) :: farg3 +type(C_PTR) :: farg4 +type(C_PTR) :: farg5 +type(C_PTR) :: farg6 + +farg1 = arkode_mem +farg2 = c_loc(nsteps(1)) +farg3 = c_loc(hinused(1)) +farg4 = c_loc(hlast(1)) +farg5 = c_loc(hcur(1)) +farg6 = c_loc(tcur(1)) +fresult = swigc_FSPRKStepGetStepStats(farg1, farg2, farg3, farg4, farg5, farg6) +swig_result = fresult +end function + +subroutine FSPRKStepFree(arkode_mem) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), target, intent(inout) :: arkode_mem +type(C_PTR) :: farg1 + +farg1 = c_loc(arkode_mem) +call swigc_FSPRKStepFree(farg1) +end subroutine + + +end module diff --git a/src/cvode/fmod/fcvode_mod.c b/src/cvode/fmod/fcvode_mod.c index db7e75ce06..5b63d2b605 100644 --- a/src/cvode/fmod/fcvode_mod.c +++ b/src/cvode/fmod/fcvode_mod.c @@ -628,6 +628,20 @@ SWIGEXPORT int _wrap_FCVodeSetStopTime(void *farg1, double const *farg2) { } +SWIGEXPORT int _wrap_FCVodeSetInterpolateStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)CVodeSetInterpolateStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FCVodeClearStopTime(void *farg1) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/cvode/fmod/fcvode_mod.f90 b/src/cvode/fmod/fcvode_mod.f90 index d107e94c9a..738f334a3f 100644 --- a/src/cvode/fmod/fcvode_mod.f90 +++ b/src/cvode/fmod/fcvode_mod.f90 @@ -103,6 +103,7 @@ module fcvode_mod public :: FCVodeSetNonlinearSolver public :: FCVodeSetStabLimDet public :: FCVodeSetStopTime + public :: FCVodeSetInterpolateStopTime public :: FCVodeClearStopTime public :: FCVodeSetUseIntegratorFusedKernels public :: FCVodeSetUserData @@ -471,6 +472,15 @@ function swigc_FCVodeSetStopTime(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FCVodeSetInterpolateStopTime(farg1, farg2) & +bind(C, name="_wrap_FCVodeSetInterpolateStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FCVodeClearStopTime(farg1) & bind(C, name="_wrap_FCVodeClearStopTime") & result(fresult) @@ -1823,6 +1833,22 @@ function FCVodeSetStopTime(cvode_mem, tstop) & swig_result = fresult end function +function FCVodeSetInterpolateStopTime(cvode_mem, interp) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: cvode_mem +integer(C_INT), intent(in) :: interp +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = cvode_mem +farg2 = interp +fresult = swigc_FCVodeSetInterpolateStopTime(farg1, farg2) +swig_result = fresult +end function + function FCVodeClearStopTime(cvode_mem) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/cvodes/fmod/fcvodes_mod.c b/src/cvodes/fmod/fcvodes_mod.c index 1fa4e6bd9f..7c5b85e0af 100644 --- a/src/cvodes/fmod/fcvodes_mod.c +++ b/src/cvodes/fmod/fcvodes_mod.c @@ -702,6 +702,20 @@ SWIGEXPORT int _wrap_FCVodeSetStopTime(void *farg1, double const *farg2) { } +SWIGEXPORT int _wrap_FCVodeSetInterpolateStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)CVodeSetInterpolateStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FCVodeClearStopTime(void *farg1) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/cvodes/fmod/fcvodes_mod.f90 b/src/cvodes/fmod/fcvodes_mod.f90 index 39d8868e2f..505ed54f8a 100644 --- a/src/cvodes/fmod/fcvodes_mod.f90 +++ b/src/cvodes/fmod/fcvodes_mod.f90 @@ -133,6 +133,7 @@ module fcvodes_mod public :: FCVodeSetNonlinearSolver public :: FCVodeSetStabLimDet public :: FCVodeSetStopTime + public :: FCVodeSetInterpolateStopTime public :: FCVodeClearStopTime public :: FCVodeSetUserData public :: FCVodeSetEtaFixedStepBounds @@ -645,6 +646,15 @@ function swigc_FCVodeSetStopTime(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FCVodeSetInterpolateStopTime(farg1, farg2) & +bind(C, name="_wrap_FCVodeSetInterpolateStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FCVodeClearStopTime(farg1) & bind(C, name="_wrap_FCVodeClearStopTime") & result(fresult) @@ -3229,6 +3239,22 @@ function FCVodeSetStopTime(cvode_mem, tstop) & swig_result = fresult end function +function FCVodeSetInterpolateStopTime(cvode_mem, interp) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: cvode_mem +integer(C_INT), intent(in) :: interp +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = cvode_mem +farg2 = interp +fresult = swigc_FCVodeSetInterpolateStopTime(farg1, farg2) +swig_result = fresult +end function + function FCVodeClearStopTime(cvode_mem) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/swig/Makefile b/swig/Makefile index b72e461370..ce4f536a66 100644 --- a/swig/Makefile +++ b/swig/Makefile @@ -14,7 +14,7 @@ # Makefile to generate SUNDIALS fortran interfaces with swig # --------------------------------------------------------------- -ARKODE=farkode_mod farkode_arkstep_mod farkode_erkstep_mod farkode_mristep_mod +ARKODE=farkode_mod farkode_arkstep_mod farkode_erkstep_mod farkode_sprkstep_mod farkode_mristep_mod CVODE=fcvode_mod CVODES=fcvodes_mod IDA=fida_mod diff --git a/swig/arkode/farkode_mod.i b/swig/arkode/farkode_mod.i index d4e2fdc5f5..c1ab09667f 100644 --- a/swig/arkode/farkode_mod.i +++ b/swig/arkode/farkode_mod.i @@ -25,6 +25,7 @@ #include "arkode/arkode_butcher.h" #include "arkode/arkode_butcher_dirk.h" #include "arkode/arkode_butcher_erk.h" +#include "arkode/arkode_sprk.h" #include "arkode/arkode_ls.h" %} @@ -38,6 +39,9 @@ // Treat ARKodeButcherTable as an opaque pointer %apply void* { ARKodeButcherTable }; +// Treat ARKodeSPRKStorage as an opaque pointer +%apply void* { ARKodeSPRKStorage }; + // Process definitions from these files %include "arkode/arkode.h" %include "arkode/arkode_bandpre.h" @@ -45,5 +49,6 @@ %include "arkode/arkode_butcher.h" %include "arkode/arkode_butcher_dirk.h" %include "arkode/arkode_butcher_erk.h" +%include "arkode/arkode_sprk.h" %include "arkode/arkode_ls.h" diff --git a/swig/arkode/farkode_sprkstep_mod.i b/swig/arkode/farkode_sprkstep_mod.i new file mode 100644 index 0000000000..c7f02bbdd5 --- /dev/null +++ b/swig/arkode/farkode_sprkstep_mod.i @@ -0,0 +1,30 @@ +// --------------------------------------------------------------- +// Programmer: Cody J. Balos @ LLNL +// --------------------------------------------------------------- +// SUNDIALS Copyright Start +// Copyright (c) 2002-2023, Lawrence Livermore National Security +// and Southern Methodist University. +// All rights reserved. +// +// See the top-level LICENSE and NOTICE files for details. +// +// SPDX-License-Identifier: BSD-3-Clause +// SUNDIALS Copyright End +// --------------------------------------------------------------- +// Swig interface file +// --------------------------------------------------------------- + +%module farkode_sprkstep_mod + +%include "../sundials/fsundials.i" + +// include the header file(s) in the c wrapper that is generated +%{ +#include "arkode/arkode_sprkstep.h" +%} + +// Load the typedefs and generate a "use" statements in the module +%import "farkode_mod.i" + +// Process definitions from these files +%include "arkode/arkode_sprkstep.h" From 8e72a696ae5368eae27209fb82b5c7130b25506d Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 6 Jul 2023 10:02:01 -0700 Subject: [PATCH 128/177] bump answers --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 66b1a8897b..ccbb19a2ec 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 66b1a8897b3d3c1870001c03d1bc4f40effbe86d +Subproject commit ccbb19a2ece54cef109189854748ea1fbe77bf96 From dcd1eed73a75dff094e5a1d04ac1d56f0e407616 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 6 Jul 2023 10:08:05 -0700 Subject: [PATCH 129/177] fix typo --- doc/arkode/guide/source/Mathematics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index b185bee67e..06b73d65fc 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -539,8 +539,8 @@ can be ignored). #. For :math:`i = 1,\ldots,s` do: - #. :math:`P_i = P_{i-1} + h_{n+1} \hat{a}_i f_1(Q_i, t_n + c_i h)` - #. :math:`Q_{i+1} = Q_i + h_{n+1} a_i f_2(P_i, t_n + \hat{c}_i h)` + #. :math:`P_i = P_{i-1} + h_{n+1} \hat{a}_i f_1(Q_i, t_n + \hat{c}_i h)` + #. :math:`Q_{i+1} = Q_i + h_{n+1} a_i f_2(P_i, t_n + c_i h)` #. Set :math:`p_{n+1} = P_s, q_{n+1} = Q_{s+1}` From e238519867ea41639e505744ebd311a857e34046 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Thu, 6 Jul 2023 14:36:39 -0700 Subject: [PATCH 130/177] fix out file names --- ...thod_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out} | 0 ...d_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out} | 0 ..._ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out} | 0 ..._ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out} | 0 ..._ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out} | 0 ..._ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out} | 0 ...E_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out} | 0 ...ethod_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out} | 0 ...od_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out} | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out} (100%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out} (100%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out} (100%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out} (100%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out} (100%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out} (100%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out} (100%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out} (100%) rename examples/arkode/C_serial/{ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out => ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out} (100%) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out similarity index 100% rename from examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out rename to examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out From 50c04e8e44415e078c05cd90e4ddd393d877902f Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Fri, 7 Jul 2023 22:17:56 -0700 Subject: [PATCH 131/177] update outputs from test machine --- .../ark_damped_harmonic_symplectic.out | 8 +- .../C_serial/ark_harmonic_symplectic.out | 30 +- examples/arkode/C_serial/ark_kepler.out | 1059 +-------------- ...kepler_--stepper_ERK_--step-mode_adapt.out | 1071 +-------------- ...r_ERK_--step-mode_fixed_--count-orbits.out | 1185 ++--------------- ..._--count-orbits_--use-compensated-sums.out | 1185 ++--------------- ...LER_1_1_--tf_50_--check-order_--nout_1.out | 107 +- ...ROG_2_2_--tf_50_--check-order_--nout_1.out | 109 +- ...LAN_2_2_--tf_50_--check-order_--nout_1.out | 109 +- ...LAN_3_3_--tf_50_--check-order_--nout_1.out | 341 ++--- ...LAN_4_4_--tf_50_--check-order_--nout_1.out | 341 ++--- ...LAN_5_6_--tf_50_--check-order_--nout_1.out | 341 ++--- ...ROG_2_2_--tf_50_--check-order_--nout_1.out | 113 +- ...UTH_3_3_--tf_50_--check-order_--nout_1.out | 341 ++--- ...IDA_6_8_--tf_50_--check-order_--nout_1.out | 341 ++--- 15 files changed, 1266 insertions(+), 5415 deletions(-) diff --git a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out index 159f367132..7ba4c709b1 100644 --- a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out @@ -11,7 +11,7 @@ t = 23.561945, q(t) = 1.242002, H = 1.013408 t = 27.488936, q(t) = -0.806768, H = 0.352368 t = 31.415927, q(t) = 0.878500, H = 0.773974 -Current time = 31.415926535897931159979634685442 +Current time = 31.41592653589793 Steps = 31416 Step attempts = 31416 Stability limited steps = 0 @@ -19,8 +19,8 @@ Accuracy limited steps = 0 Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.0010000000000000000208166817117217 -Last step size = 0.00099081698244063345221155358899523 -Current step size = 0.00099081698244063345221155358899523 +Initial step size = 0.001 +Last step size = 0.0009908169824406335 +Current step size = 0.0009908169824406335 f1 RHS fn evals = 125665 f2 RHS fn evals = 125665 diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.out b/examples/arkode/C_serial/ark_harmonic_symplectic.out index d6811e2ed7..3e5dedb5b2 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.out +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.out @@ -2,25 +2,25 @@ Begin simple harmonic oscillator problem t = 0.000000, x(t) = 10.000000, E = 50.000000, sol. err = 0.000000 -t = 0.785398, x(t) = 7.066811, E = 50.000000, sol. err = 0.006018 -t = 1.570796, x(t) = -0.002037, E = 50.000000, sol. err = 0.002037 -t = 2.356194, x(t) = -7.076761, E = 50.000000, sol. err = 0.008055 -t = 3.141593, x(t) = -9.999999, E = 50.000000, sol. err = 0.004073 -t = 3.926991, x(t) = -7.071003, E = 50.000000, sol. err = 0.000092 -t = 4.712389, x(t) = 0.006110, E = 50.000000, sol. err = 0.006110 -t = 5.497787, x(t) = 7.072573, E = 50.000000, sol. err = 0.002129 -t = 6.283185, x(t) = 9.999997, E = 50.000000, sol. err = 0.008147 +t = 0.785398, x(t) = 7.071068, E = 50.000000, sol. err = 0.0000000000000282 +t = 1.570796, x(t) = -0.000000, E = 50.000000, sol. err = 0.0000000000006266 +t = 2.356194, x(t) = -7.071068, E = 50.000000, sol. err = 0.0000000000014916 +t = 3.141593, x(t) = -10.000000, E = 50.000000, sol. err = 0.0000000000023682 +t = 3.926991, x(t) = -7.071068, E = 50.000000, sol. err = 0.0000000000032520 +t = 4.712389, x(t) = 0.000000, E = 50.000000, sol. err = 0.0000000000009537 +t = 5.497787, x(t) = 7.071068, E = 50.000000, sol. err = 0.0000000000016668 +t = 6.283185, x(t) = 10.000000, E = 50.000000, sol. err = 0.0000000000043080 -Current time = 6.284000000000433 -Steps = 6284 -Step attempts = 6284 +Current time = 6.283185307179586 +Steps = 6288 +Step attempts = 6288 Stability limited steps = 0 Accuracy limited steps = 0 Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.001 -Last step size = 0.001 -Current step size = 0.001 -f1 RHS fn evals = 25137 -f2 RHS fn evals = 25137 +Last step size = 0.0003981633971861239 +Current step size = 0.0003981633971861239 +f1 RHS fn evals = 25153 +f2 RHS fn evals = 25153 diff --git a/examples/arkode/C_serial/ark_kepler.out b/examples/arkode/C_serial/ark_kepler.out index a297fc42dd..1df6288300 100644 --- a/examples/arkode/C_serial/ark_kepler.out +++ b/examples/arkode/C_serial/ark_kepler.out @@ -4,1013 +4,64 @@ Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.01 Tf: 100 - nout: 1000 + nout: 50 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 0.1000, H(p,q)-H0 = -0.0000000018824715, L(p,q)-L0 = 0.0000000000000004 -t = 0.2000, H(p,q)-H0 = -0.0000000017446893, L(p,q)-L0 = 0.0000000000000000 -t = 0.3000, H(p,q)-H0 = 0.0000000001300136, L(p,q)-L0 = 0.0000000000000004 -t = 0.4000, H(p,q)-H0 = 0.0000000012995816, L(p,q)-L0 = 0.0000000000000003 -t = 0.5000, H(p,q)-H0 = 0.0000000018083006, L(p,q)-L0 = 0.0000000000000004 -t = 0.6000, H(p,q)-H0 = 0.0000000020168764, L(p,q)-L0 = 0.0000000000000003 -t = 0.7000, H(p,q)-H0 = 0.0000000021055059, L(p,q)-L0 = 0.0000000000000009 -t = 0.8000, H(p,q)-H0 = 0.0000000021456843, L(p,q)-L0 = 0.0000000000000012 -t = 0.9000, H(p,q)-H0 = 0.0000000021652187, L(p,q)-L0 = 0.0000000000000012 -t = 1.0000, H(p,q)-H0 = 0.0000000021753710, L(p,q)-L0 = 0.0000000000000007 -t = 1.1000, H(p,q)-H0 = 0.0000000021809786, L(p,q)-L0 = 0.0000000000000008 -t = 1.2000, H(p,q)-H0 = 0.0000000021842472, L(p,q)-L0 = 0.0000000000000006 -t = 1.3000, H(p,q)-H0 = 0.0000000021862454, L(p,q)-L0 = 0.0000000000000007 -t = 1.4000, H(p,q)-H0 = 0.0000000021875197, L(p,q)-L0 = 0.0000000000000004 -t = 1.5000, H(p,q)-H0 = 0.0000000021883627, L(p,q)-L0 = 0.0000000000000007 -t = 1.6000, H(p,q)-H0 = 0.0000000021889383, L(p,q)-L0 = 0.0000000000000004 -t = 1.7000, H(p,q)-H0 = 0.0000000021893426, L(p,q)-L0 = 0.0000000000000001 -t = 1.8000, H(p,q)-H0 = 0.0000000021896337, L(p,q)-L0 = 0.0000000000000000 -t = 1.9000, H(p,q)-H0 = 0.0000000021898475, L(p,q)-L0 = -0.0000000000000002 -t = 2.0000, H(p,q)-H0 = 0.0000000021900078, L(p,q)-L0 = -0.0000000000000003 -t = 2.1000, H(p,q)-H0 = 0.0000000021901300, L(p,q)-L0 = -0.0000000000000003 -t = 2.2000, H(p,q)-H0 = 0.0000000021902241, L(p,q)-L0 = 0.0000000000000000 -t = 2.3000, H(p,q)-H0 = 0.0000000021902972, L(p,q)-L0 = 0.0000000000000001 -t = 2.4000, H(p,q)-H0 = 0.0000000021903539, L(p,q)-L0 = -0.0000000000000002 -t = 2.5000, H(p,q)-H0 = 0.0000000021903985, L(p,q)-L0 = -0.0000000000000004 -t = 2.6000, H(p,q)-H0 = 0.0000000021904330, L(p,q)-L0 = -0.0000000000000003 -t = 2.7000, H(p,q)-H0 = 0.0000000021904595, L(p,q)-L0 = -0.0000000000000006 -t = 2.8000, H(p,q)-H0 = 0.0000000021904794, L(p,q)-L0 = -0.0000000000000007 -t = 2.9000, H(p,q)-H0 = 0.0000000021904932, L(p,q)-L0 = -0.0000000000000008 -t = 3.0000, H(p,q)-H0 = 0.0000000021905022, L(p,q)-L0 = -0.0000000000000008 -t = 3.1000, H(p,q)-H0 = 0.0000000021905060, L(p,q)-L0 = -0.0000000000000016 -t = 3.2000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = -0.0000000000000019 -t = 3.3000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = -0.0000000000000018 -t = 3.4000, H(p,q)-H0 = 0.0000000021904906, L(p,q)-L0 = -0.0000000000000020 -t = 3.5000, H(p,q)-H0 = 0.0000000021904755, L(p,q)-L0 = -0.0000000000000021 -t = 3.6000, H(p,q)-H0 = 0.0000000021904544, L(p,q)-L0 = -0.0000000000000022 -t = 3.7000, H(p,q)-H0 = 0.0000000021904261, L(p,q)-L0 = -0.0000000000000026 -t = 3.8000, H(p,q)-H0 = 0.0000000021903898, L(p,q)-L0 = -0.0000000000000023 -t = 3.9000, H(p,q)-H0 = 0.0000000021903431, L(p,q)-L0 = -0.0000000000000024 -t = 4.0000, H(p,q)-H0 = 0.0000000021902835, L(p,q)-L0 = -0.0000000000000026 -t = 4.1000, H(p,q)-H0 = 0.0000000021902075, L(p,q)-L0 = -0.0000000000000021 -t = 4.2000, H(p,q)-H0 = 0.0000000021901092, L(p,q)-L0 = -0.0000000000000018 -t = 4.3000, H(p,q)-H0 = 0.0000000021899808, L(p,q)-L0 = -0.0000000000000022 -t = 4.4000, H(p,q)-H0 = 0.0000000021898121, L(p,q)-L0 = -0.0000000000000018 -t = 4.5000, H(p,q)-H0 = 0.0000000021895855, L(p,q)-L0 = -0.0000000000000022 -t = 4.6000, H(p,q)-H0 = 0.0000000021892767, L(p,q)-L0 = -0.0000000000000022 -t = 4.7000, H(p,q)-H0 = 0.0000000021888460, L(p,q)-L0 = -0.0000000000000021 -t = 4.8000, H(p,q)-H0 = 0.0000000021882305, L(p,q)-L0 = -0.0000000000000020 -t = 4.9000, H(p,q)-H0 = 0.0000000021873248, L(p,q)-L0 = -0.0000000000000017 -t = 5.0000, H(p,q)-H0 = 0.0000000021859475, L(p,q)-L0 = -0.0000000000000017 -t = 5.1000, H(p,q)-H0 = 0.0000000021837739, L(p,q)-L0 = -0.0000000000000018 -t = 5.2000, H(p,q)-H0 = 0.0000000021801948, L(p,q)-L0 = -0.0000000000000017 -t = 5.3000, H(p,q)-H0 = 0.0000000021740074, L(p,q)-L0 = -0.0000000000000018 -t = 5.4000, H(p,q)-H0 = 0.0000000021627112, L(p,q)-L0 = -0.0000000000000017 -t = 5.5000, H(p,q)-H0 = 0.0000000021407837, L(p,q)-L0 = -0.0000000000000020 -t = 5.6000, H(p,q)-H0 = 0.0000000020952701, L(p,q)-L0 = -0.0000000000000018 -t = 5.7000, H(p,q)-H0 = 0.0000000019940063, L(p,q)-L0 = -0.0000000000000021 -t = 5.8000, H(p,q)-H0 = 0.0000000017543397, L(p,q)-L0 = -0.0000000000000024 -t = 5.9000, H(p,q)-H0 = 0.0000000011716919, L(p,q)-L0 = -0.0000000000000024 -t = 6.0000, H(p,q)-H0 = -0.0000000001292921, L(p,q)-L0 = -0.0000000000000028 -t = 6.1000, H(p,q)-H0 = -0.0000000019832644, L(p,q)-L0 = -0.0000000000000024 -t = 6.2000, H(p,q)-H0 = -0.0000000015692083, L(p,q)-L0 = -0.0000000000000024 -t = 6.3000, H(p,q)-H0 = -0.0000000000785492, L(p,q)-L0 = -0.0000000000000023 -t = 6.4000, H(p,q)-H0 = -0.0000000021444535, L(p,q)-L0 = -0.0000000000000026 -t = 6.5000, H(p,q)-H0 = -0.0000000014380235, L(p,q)-L0 = -0.0000000000000027 -t = 6.6000, H(p,q)-H0 = 0.0000000003899563, L(p,q)-L0 = -0.0000000000000023 -t = 6.7000, H(p,q)-H0 = 0.0000000014194250, L(p,q)-L0 = -0.0000000000000023 -t = 6.8000, H(p,q)-H0 = 0.0000000018574048, L(p,q)-L0 = -0.0000000000000017 -t = 6.9000, H(p,q)-H0 = 0.0000000020373458, L(p,q)-L0 = -0.0000000000000014 -t = 7.0000, H(p,q)-H0 = 0.0000000021145609, L(p,q)-L0 = -0.0000000000000008 -t = 7.1000, H(p,q)-H0 = 0.0000000021499782, L(p,q)-L0 = -0.0000000000000004 -t = 7.2000, H(p,q)-H0 = 0.0000000021673986, L(p,q)-L0 = -0.0000000000000002 -t = 7.3000, H(p,q)-H0 = 0.0000000021765503, L(p,q)-L0 = -0.0000000000000002 -t = 7.4000, H(p,q)-H0 = 0.0000000021816533, L(p,q)-L0 = 0.0000000000000002 -t = 7.5000, H(p,q)-H0 = 0.0000000021846533, L(p,q)-L0 = 0.0000000000000007 -t = 7.6000, H(p,q)-H0 = 0.0000000021865008, L(p,q)-L0 = 0.0000000000000004 -t = 7.7000, H(p,q)-H0 = 0.0000000021876867, L(p,q)-L0 = 0.0000000000000004 -t = 7.8000, H(p,q)-H0 = 0.0000000021884756, L(p,q)-L0 = 0.0000000000000004 -t = 7.9000, H(p,q)-H0 = 0.0000000021890174, L(p,q)-L0 = 0.0000000000000006 -t = 8.0000, H(p,q)-H0 = 0.0000000021893999, L(p,q)-L0 = 0.0000000000000010 -t = 8.1000, H(p,q)-H0 = 0.0000000021896761, L(p,q)-L0 = 0.0000000000000009 -t = 8.2000, H(p,q)-H0 = 0.0000000021898795, L(p,q)-L0 = 0.0000000000000008 -t = 8.3000, H(p,q)-H0 = 0.0000000021900325, L(p,q)-L0 = 0.0000000000000009 -t = 8.4000, H(p,q)-H0 = 0.0000000021901491, L(p,q)-L0 = 0.0000000000000010 -t = 8.5000, H(p,q)-H0 = 0.0000000021902389, L(p,q)-L0 = 0.0000000000000011 -t = 8.6000, H(p,q)-H0 = 0.0000000021903087, L(p,q)-L0 = 0.0000000000000009 -t = 8.7000, H(p,q)-H0 = 0.0000000021903636, L(p,q)-L0 = 0.0000000000000011 -t = 8.8000, H(p,q)-H0 = 0.0000000021904061, L(p,q)-L0 = 0.0000000000000010 -t = 8.9000, H(p,q)-H0 = 0.0000000021904393, L(p,q)-L0 = 0.0000000000000009 -t = 9.0000, H(p,q)-H0 = 0.0000000021904647, L(p,q)-L0 = 0.0000000000000004 -t = 9.1000, H(p,q)-H0 = 0.0000000021904831, L(p,q)-L0 = 0.0000000000000000 -t = 9.2000, H(p,q)-H0 = 0.0000000021904960, L(p,q)-L0 = -0.0000000000000002 -t = 9.3000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = -0.0000000000000003 -t = 9.4000, H(p,q)-H0 = 0.0000000021905078, L(p,q)-L0 = -0.0000000000000002 -t = 9.5000, H(p,q)-H0 = 0.0000000021905066, L(p,q)-L0 = 0.0000000000000000 -t = 9.6000, H(p,q)-H0 = 0.0000000021905008, L(p,q)-L0 = 0.0000000000000002 -t = 9.7000, H(p,q)-H0 = 0.0000000021904900, L(p,q)-L0 = 0.0000000000000000 -t = 9.8000, H(p,q)-H0 = 0.0000000021904742, L(p,q)-L0 = 0.0000000000000006 -t = 9.9000, H(p,q)-H0 = 0.0000000021904522, L(p,q)-L0 = 0.0000000000000006 -t = 10.0000, H(p,q)-H0 = 0.0000000021904231, L(p,q)-L0 = 0.0000000000000008 -t = 10.1000, H(p,q)-H0 = 0.0000000021903852, L(p,q)-L0 = 0.0000000000000006 -t = 10.2000, H(p,q)-H0 = 0.0000000021903366, L(p,q)-L0 = 0.0000000000000008 -t = 10.3000, H(p,q)-H0 = 0.0000000021902746, L(p,q)-L0 = 0.0000000000000009 -t = 10.4000, H(p,q)-H0 = 0.0000000021901951, L(p,q)-L0 = 0.0000000000000011 -t = 10.5000, H(p,q)-H0 = 0.0000000021900923, L(p,q)-L0 = 0.0000000000000010 -t = 10.6000, H(p,q)-H0 = 0.0000000021899583, L(p,q)-L0 = 0.0000000000000011 -t = 10.7000, H(p,q)-H0 = 0.0000000021897812, L(p,q)-L0 = 0.0000000000000016 -t = 10.8000, H(p,q)-H0 = 0.0000000021895435, L(p,q)-L0 = 0.0000000000000019 -t = 10.9000, H(p,q)-H0 = 0.0000000021892176, L(p,q)-L0 = 0.0000000000000020 -t = 11.0000, H(p,q)-H0 = 0.0000000021887611, L(p,q)-L0 = 0.0000000000000020 -t = 11.1000, H(p,q)-H0 = 0.0000000021881056, L(p,q)-L0 = 0.0000000000000022 -t = 11.2000, H(p,q)-H0 = 0.0000000021871360, L(p,q)-L0 = 0.0000000000000023 -t = 11.3000, H(p,q)-H0 = 0.0000000021856529, L(p,q)-L0 = 0.0000000000000023 -t = 11.4000, H(p,q)-H0 = 0.0000000021832968, L(p,q)-L0 = 0.0000000000000023 -t = 11.5000, H(p,q)-H0 = 0.0000000021793864, L(p,q)-L0 = 0.0000000000000024 -t = 11.6000, H(p,q)-H0 = 0.0000000021725675, L(p,q)-L0 = 0.0000000000000024 -t = 11.7000, H(p,q)-H0 = 0.0000000021599945, L(p,q)-L0 = 0.0000000000000022 -t = 11.8000, H(p,q)-H0 = 0.0000000021353220, L(p,q)-L0 = 0.0000000000000028 -t = 11.9000, H(p,q)-H0 = 0.0000000020835074, L(p,q)-L0 = 0.0000000000000022 -t = 12.0000, H(p,q)-H0 = 0.0000000019669100, L(p,q)-L0 = 0.0000000000000022 -t = 12.1000, H(p,q)-H0 = 0.0000000016886921, L(p,q)-L0 = 0.0000000000000020 -t = 12.2000, H(p,q)-H0 = 0.0000000010143850, L(p,q)-L0 = 0.0000000000000023 -t = 12.3000, H(p,q)-H0 = -0.0000000004357736, L(p,q)-L0 = 0.0000000000000022 -t = 12.4000, H(p,q)-H0 = -0.0000000021842232, L(p,q)-L0 = 0.0000000000000022 -t = 12.5000, H(p,q)-H0 = -0.0000000011492758, L(p,q)-L0 = 0.0000000000000023 -t = 12.6000, H(p,q)-H0 = -0.0000000003225991, L(p,q)-L0 = 0.0000000000000024 -t = 12.7000, H(p,q)-H0 = -0.0000000022824569, L(p,q)-L0 = 0.0000000000000024 -t = 12.8000, H(p,q)-H0 = -0.0000000011085746, L(p,q)-L0 = 0.0000000000000024 -t = 12.9000, H(p,q)-H0 = 0.0000000006228686, L(p,q)-L0 = 0.0000000000000024 -t = 13.0000, H(p,q)-H0 = 0.0000000015228507, L(p,q)-L0 = 0.0000000000000026 -t = 13.1000, H(p,q)-H0 = 0.0000000018996709, L(p,q)-L0 = 0.0000000000000023 -t = 13.2000, H(p,q)-H0 = 0.0000000020551160, L(p,q)-L0 = 0.0000000000000022 -t = 13.3000, H(p,q)-H0 = 0.0000000021225143, L(p,q)-L0 = 0.0000000000000018 -t = 13.4000, H(p,q)-H0 = 0.0000000021537955, L(p,q)-L0 = 0.0000000000000011 -t = 13.5000, H(p,q)-H0 = 0.0000000021693588, L(p,q)-L0 = 0.0000000000000012 -t = 13.6000, H(p,q)-H0 = 0.0000000021776211, L(p,q)-L0 = 0.0000000000000014 -t = 13.7000, H(p,q)-H0 = 0.0000000021822713, L(p,q)-L0 = 0.0000000000000014 -t = 13.8000, H(p,q)-H0 = 0.0000000021850281, L(p,q)-L0 = 0.0000000000000018 -t = 13.9000, H(p,q)-H0 = 0.0000000021867388, L(p,q)-L0 = 0.0000000000000022 -t = 14.0000, H(p,q)-H0 = 0.0000000021878430, L(p,q)-L0 = 0.0000000000000020 -t = 14.1000, H(p,q)-H0 = 0.0000000021885820, L(p,q)-L0 = 0.0000000000000019 -t = 14.2000, H(p,q)-H0 = 0.0000000021890917, L(p,q)-L0 = 0.0000000000000020 -t = 14.3000, H(p,q)-H0 = 0.0000000021894530, L(p,q)-L0 = 0.0000000000000019 -t = 14.4000, H(p,q)-H0 = 0.0000000021897152, L(p,q)-L0 = 0.0000000000000022 -t = 14.5000, H(p,q)-H0 = 0.0000000021899093, L(p,q)-L0 = 0.0000000000000024 -t = 14.6000, H(p,q)-H0 = 0.0000000021900552, L(p,q)-L0 = 0.0000000000000024 -t = 14.7000, H(p,q)-H0 = 0.0000000021901674, L(p,q)-L0 = 0.0000000000000032 -t = 14.8000, H(p,q)-H0 = 0.0000000021902533, L(p,q)-L0 = 0.0000000000000029 -t = 14.9000, H(p,q)-H0 = 0.0000000021903204, L(p,q)-L0 = 0.0000000000000031 -t = 15.0000, H(p,q)-H0 = 0.0000000021903728, L(p,q)-L0 = 0.0000000000000030 -t = 15.1000, H(p,q)-H0 = 0.0000000021904137, L(p,q)-L0 = 0.0000000000000030 -t = 15.2000, H(p,q)-H0 = 0.0000000021904455, L(p,q)-L0 = 0.0000000000000031 -t = 15.3000, H(p,q)-H0 = 0.0000000021904695, L(p,q)-L0 = 0.0000000000000030 -t = 15.4000, H(p,q)-H0 = 0.0000000021904875, L(p,q)-L0 = 0.0000000000000032 -t = 15.5000, H(p,q)-H0 = 0.0000000021904996, L(p,q)-L0 = 0.0000000000000029 -t = 15.6000, H(p,q)-H0 = 0.0000000021905063, L(p,q)-L0 = 0.0000000000000020 -t = 15.7000, H(p,q)-H0 = 0.0000000021905089, L(p,q)-L0 = 0.0000000000000017 -t = 15.8000, H(p,q)-H0 = 0.0000000021905071, L(p,q)-L0 = 0.0000000000000020 -t = 15.9000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = 0.0000000000000020 -t = 16.0000, H(p,q)-H0 = 0.0000000021904886, L(p,q)-L0 = 0.0000000000000017 -t = 16.1000, H(p,q)-H0 = 0.0000000021904715, L(p,q)-L0 = 0.0000000000000016 -t = 16.2000, H(p,q)-H0 = 0.0000000021904482, L(p,q)-L0 = 0.0000000000000016 -t = 16.3000, H(p,q)-H0 = 0.0000000021904181, L(p,q)-L0 = 0.0000000000000019 -t = 16.4000, H(p,q)-H0 = 0.0000000021903783, L(p,q)-L0 = 0.0000000000000014 -t = 16.5000, H(p,q)-H0 = 0.0000000021903276, L(p,q)-L0 = 0.0000000000000012 -t = 16.6000, H(p,q)-H0 = 0.0000000021902630, L(p,q)-L0 = 0.0000000000000013 -t = 16.7000, H(p,q)-H0 = 0.0000000021901800, L(p,q)-L0 = 0.0000000000000016 -t = 16.8000, H(p,q)-H0 = 0.0000000021900730, L(p,q)-L0 = 0.0000000000000020 -t = 16.9000, H(p,q)-H0 = 0.0000000021899325, L(p,q)-L0 = 0.0000000000000020 -t = 17.0000, H(p,q)-H0 = 0.0000000021897464, L(p,q)-L0 = 0.0000000000000018 -t = 17.1000, H(p,q)-H0 = 0.0000000021894955, L(p,q)-L0 = 0.0000000000000018 -t = 17.2000, H(p,q)-H0 = 0.0000000021891514, L(p,q)-L0 = 0.0000000000000021 -t = 17.3000, H(p,q)-H0 = 0.0000000021886670, L(p,q)-L0 = 0.0000000000000020 -t = 17.4000, H(p,q)-H0 = 0.0000000021879680, L(p,q)-L0 = 0.0000000000000017 -t = 17.5000, H(p,q)-H0 = 0.0000000021869294, L(p,q)-L0 = 0.0000000000000020 -t = 17.6000, H(p,q)-H0 = 0.0000000021853308, L(p,q)-L0 = 0.0000000000000020 -t = 17.7000, H(p,q)-H0 = 0.0000000021827730, L(p,q)-L0 = 0.0000000000000020 -t = 17.8000, H(p,q)-H0 = 0.0000000021784950, L(p,q)-L0 = 0.0000000000000021 -t = 17.9000, H(p,q)-H0 = 0.0000000021709682, L(p,q)-L0 = 0.0000000000000022 -t = 18.0000, H(p,q)-H0 = 0.0000000021569497, L(p,q)-L0 = 0.0000000000000022 -t = 18.1000, H(p,q)-H0 = 0.0000000021291338, L(p,q)-L0 = 0.0000000000000024 -t = 18.2000, H(p,q)-H0 = 0.0000000020700305, L(p,q)-L0 = 0.0000000000000020 -t = 18.3000, H(p,q)-H0 = 0.0000000019355451, L(p,q)-L0 = 0.0000000000000018 -t = 18.4000, H(p,q)-H0 = 0.0000000016123738, L(p,q)-L0 = 0.0000000000000019 -t = 18.5000, H(p,q)-H0 = 0.0000000008341943, L(p,q)-L0 = 0.0000000000000017 -t = 18.6000, H(p,q)-H0 = -0.0000000007602392, L(p,q)-L0 = 0.0000000000000018 -t = 18.7000, H(p,q)-H0 = -0.0000000022936391, L(p,q)-L0 = 0.0000000000000017 -t = 18.8000, H(p,q)-H0 = -0.0000000007197518, L(p,q)-L0 = 0.0000000000000013 -t = 18.9000, H(p,q)-H0 = -0.0000000006891667, L(p,q)-L0 = 0.0000000000000012 -t = 19.0000, H(p,q)-H0 = -0.0000000022938584, L(p,q)-L0 = 0.0000000000000012 -t = 19.1000, H(p,q)-H0 = -0.0000000007742569, L(p,q)-L0 = 0.0000000000000013 -t = 19.2000, H(p,q)-H0 = 0.0000000008292620, L(p,q)-L0 = 0.0000000000000008 -t = 19.3000, H(p,q)-H0 = 0.0000000016119190, L(p,q)-L0 = 0.0000000000000008 -t = 19.4000, H(p,q)-H0 = 0.0000000019360704, L(p,q)-L0 = 0.0000000000000010 -t = 19.5000, H(p,q)-H0 = 0.0000000020705563, L(p,q)-L0 = 0.0000000000000016 -t = 19.6000, H(p,q)-H0 = 0.0000000021295040, L(p,q)-L0 = 0.0000000000000018 -t = 19.7000, H(p,q)-H0 = 0.0000000021571889, L(p,q)-L0 = 0.0000000000000014 -t = 19.8000, H(p,q)-H0 = 0.0000000021711196, L(p,q)-L0 = 0.0000000000000019 -t = 19.9000, H(p,q)-H0 = 0.0000000021785913, L(p,q)-L0 = 0.0000000000000020 -t = 20.0000, H(p,q)-H0 = 0.0000000021828354, L(p,q)-L0 = 0.0000000000000023 -t = 20.1000, H(p,q)-H0 = 0.0000000021853712, L(p,q)-L0 = 0.0000000000000021 -t = 20.2000, H(p,q)-H0 = 0.0000000021869562, L(p,q)-L0 = 0.0000000000000021 -t = 20.3000, H(p,q)-H0 = 0.0000000021879860, L(p,q)-L0 = 0.0000000000000018 -t = 20.4000, H(p,q)-H0 = 0.0000000021886788, L(p,q)-L0 = 0.0000000000000018 -t = 20.5000, H(p,q)-H0 = 0.0000000021891593, L(p,q)-L0 = 0.0000000000000020 -t = 20.6000, H(p,q)-H0 = 0.0000000021895015, L(p,q)-L0 = 0.0000000000000026 -t = 20.7000, H(p,q)-H0 = 0.0000000021897504, L(p,q)-L0 = 0.0000000000000026 -t = 20.8000, H(p,q)-H0 = 0.0000000021899352, L(p,q)-L0 = 0.0000000000000023 -t = 20.9000, H(p,q)-H0 = 0.0000000021900748, L(p,q)-L0 = 0.0000000000000029 -t = 21.0000, H(p,q)-H0 = 0.0000000021901817, L(p,q)-L0 = 0.0000000000000031 -t = 21.1000, H(p,q)-H0 = 0.0000000021902642, L(p,q)-L0 = 0.0000000000000031 -t = 21.2000, H(p,q)-H0 = 0.0000000021903285, L(p,q)-L0 = 0.0000000000000031 -t = 21.3000, H(p,q)-H0 = 0.0000000021903787, L(p,q)-L0 = 0.0000000000000028 -t = 21.4000, H(p,q)-H0 = 0.0000000021904180, L(p,q)-L0 = 0.0000000000000030 -t = 21.5000, H(p,q)-H0 = 0.0000000021904483, L(p,q)-L0 = 0.0000000000000029 -t = 21.6000, H(p,q)-H0 = 0.0000000021904710, L(p,q)-L0 = 0.0000000000000024 -t = 21.7000, H(p,q)-H0 = 0.0000000021904880, L(p,q)-L0 = 0.0000000000000026 -t = 21.8000, H(p,q)-H0 = 0.0000000021904994, L(p,q)-L0 = 0.0000000000000027 -t = 21.9000, H(p,q)-H0 = 0.0000000021905060, L(p,q)-L0 = 0.0000000000000027 -t = 22.0000, H(p,q)-H0 = 0.0000000021905077, L(p,q)-L0 = 0.0000000000000024 -t = 22.1000, H(p,q)-H0 = 0.0000000021905051, L(p,q)-L0 = 0.0000000000000027 -t = 22.2000, H(p,q)-H0 = 0.0000000021904976, L(p,q)-L0 = 0.0000000000000028 -t = 22.3000, H(p,q)-H0 = 0.0000000021904854, L(p,q)-L0 = 0.0000000000000028 -t = 22.4000, H(p,q)-H0 = 0.0000000021904675, L(p,q)-L0 = 0.0000000000000029 -t = 22.5000, H(p,q)-H0 = 0.0000000021904432, L(p,q)-L0 = 0.0000000000000028 -t = 22.6000, H(p,q)-H0 = 0.0000000021904113, L(p,q)-L0 = 0.0000000000000032 -t = 22.7000, H(p,q)-H0 = 0.0000000021903700, L(p,q)-L0 = 0.0000000000000031 -t = 22.8000, H(p,q)-H0 = 0.0000000021903174, L(p,q)-L0 = 0.0000000000000029 -t = 22.9000, H(p,q)-H0 = 0.0000000021902499, L(p,q)-L0 = 0.0000000000000030 -t = 23.0000, H(p,q)-H0 = 0.0000000021901633, L(p,q)-L0 = 0.0000000000000031 -t = 23.1000, H(p,q)-H0 = 0.0000000021900513, L(p,q)-L0 = 0.0000000000000034 -t = 23.2000, H(p,q)-H0 = 0.0000000021899044, L(p,q)-L0 = 0.0000000000000036 -t = 23.3000, H(p,q)-H0 = 0.0000000021897089, L(p,q)-L0 = 0.0000000000000031 -t = 23.4000, H(p,q)-H0 = 0.0000000021894446, L(p,q)-L0 = 0.0000000000000031 -t = 23.5000, H(p,q)-H0 = 0.0000000021890804, L(p,q)-L0 = 0.0000000000000030 -t = 23.6000, H(p,q)-H0 = 0.0000000021885663, L(p,q)-L0 = 0.0000000000000030 -t = 23.7000, H(p,q)-H0 = 0.0000000021878209, L(p,q)-L0 = 0.0000000000000026 -t = 23.8000, H(p,q)-H0 = 0.0000000021867065, L(p,q)-L0 = 0.0000000000000024 -t = 23.9000, H(p,q)-H0 = 0.0000000021849813, L(p,q)-L0 = 0.0000000000000023 -t = 24.0000, H(p,q)-H0 = 0.0000000021822015, L(p,q)-L0 = 0.0000000000000022 -t = 24.1000, H(p,q)-H0 = 0.0000000021775146, L(p,q)-L0 = 0.0000000000000024 -t = 24.2000, H(p,q)-H0 = 0.0000000021691927, L(p,q)-L0 = 0.0000000000000024 -t = 24.3000, H(p,q)-H0 = 0.0000000021535347, L(p,q)-L0 = 0.0000000000000026 -t = 24.4000, H(p,q)-H0 = 0.0000000021221145, L(p,q)-L0 = 0.0000000000000027 -t = 24.5000, H(p,q)-H0 = 0.0000000020545646, L(p,q)-L0 = 0.0000000000000027 -t = 24.6000, H(p,q)-H0 = 0.0000000018991955, L(p,q)-L0 = 0.0000000000000024 -t = 24.7000, H(p,q)-H0 = 0.0000000015237049, L(p,q)-L0 = 0.0000000000000018 -t = 24.8000, H(p,q)-H0 = 0.0000000006291418, L(p,q)-L0 = 0.0000000000000020 -t = 24.9000, H(p,q)-H0 = -0.0000000010937447, L(p,q)-L0 = 0.0000000000000016 -t = 25.0000, H(p,q)-H0 = -0.0000000022899942, L(p,q)-L0 = 0.0000000000000017 -t = 25.1000, H(p,q)-H0 = -0.0000000003464102, L(p,q)-L0 = 0.0000000000000018 -t = 25.2000, H(p,q)-H0 = -0.0000000011168177, L(p,q)-L0 = 0.0000000000000011 -t = 25.3000, H(p,q)-H0 = -0.0000000021907172, L(p,q)-L0 = 0.0000000000000013 -t = 25.4000, H(p,q)-H0 = -0.0000000004484475, L(p,q)-L0 = 0.0000000000000016 -t = 25.5000, H(p,q)-H0 = 0.0000000010106107, L(p,q)-L0 = 0.0000000000000021 -t = 25.6000, H(p,q)-H0 = 0.0000000016885500, L(p,q)-L0 = 0.0000000000000023 -t = 25.7000, H(p,q)-H0 = 0.0000000019674671, L(p,q)-L0 = 0.0000000000000024 -t = 25.8000, H(p,q)-H0 = 0.0000000020840091, L(p,q)-L0 = 0.0000000000000028 -t = 25.9000, H(p,q)-H0 = 0.0000000021356669, L(p,q)-L0 = 0.0000000000000030 -t = 26.0000, H(p,q)-H0 = 0.0000000021602167, L(p,q)-L0 = 0.0000000000000033 -t = 26.1000, H(p,q)-H0 = 0.0000000021727081, L(p,q)-L0 = 0.0000000000000034 -t = 26.2000, H(p,q)-H0 = 0.0000000021794757, L(p,q)-L0 = 0.0000000000000031 -t = 26.3000, H(p,q)-H0 = 0.0000000021833548, L(p,q)-L0 = 0.0000000000000031 -t = 26.4000, H(p,q)-H0 = 0.0000000021856916, L(p,q)-L0 = 0.0000000000000034 -t = 26.5000, H(p,q)-H0 = 0.0000000021871618, L(p,q)-L0 = 0.0000000000000036 -t = 26.6000, H(p,q)-H0 = 0.0000000021881231, L(p,q)-L0 = 0.0000000000000033 -t = 26.7000, H(p,q)-H0 = 0.0000000021887731, L(p,q)-L0 = 0.0000000000000033 -t = 26.8000, H(p,q)-H0 = 0.0000000021892259, L(p,q)-L0 = 0.0000000000000032 -t = 26.9000, H(p,q)-H0 = 0.0000000021895493, L(p,q)-L0 = 0.0000000000000032 -t = 27.0000, H(p,q)-H0 = 0.0000000021897855, L(p,q)-L0 = 0.0000000000000033 -t = 27.1000, H(p,q)-H0 = 0.0000000021899614, L(p,q)-L0 = 0.0000000000000030 -t = 27.2000, H(p,q)-H0 = 0.0000000021900946, L(p,q)-L0 = 0.0000000000000028 -t = 27.3000, H(p,q)-H0 = 0.0000000021901967, L(p,q)-L0 = 0.0000000000000028 -t = 27.4000, H(p,q)-H0 = 0.0000000021902758, L(p,q)-L0 = 0.0000000000000030 -t = 27.5000, H(p,q)-H0 = 0.0000000021903375, L(p,q)-L0 = 0.0000000000000029 -t = 27.6000, H(p,q)-H0 = 0.0000000021903857, L(p,q)-L0 = 0.0000000000000028 -t = 27.7000, H(p,q)-H0 = 0.0000000021904235, L(p,q)-L0 = 0.0000000000000031 -t = 27.8000, H(p,q)-H0 = 0.0000000021904527, L(p,q)-L0 = 0.0000000000000032 -t = 27.9000, H(p,q)-H0 = 0.0000000021904745, L(p,q)-L0 = 0.0000000000000033 -t = 28.0000, H(p,q)-H0 = 0.0000000021904908, L(p,q)-L0 = 0.0000000000000036 -t = 28.1000, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = 0.0000000000000034 -t = 28.2000, H(p,q)-H0 = 0.0000000021905070, L(p,q)-L0 = 0.0000000000000036 -t = 28.3000, H(p,q)-H0 = 0.0000000021905081, L(p,q)-L0 = 0.0000000000000036 -t = 28.4000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000031 -t = 28.5000, H(p,q)-H0 = 0.0000000021904960, L(p,q)-L0 = 0.0000000000000031 -t = 28.6000, H(p,q)-H0 = 0.0000000021904830, L(p,q)-L0 = 0.0000000000000033 -t = 28.7000, H(p,q)-H0 = 0.0000000021904643, L(p,q)-L0 = 0.0000000000000039 -t = 28.8000, H(p,q)-H0 = 0.0000000021904385, L(p,q)-L0 = 0.0000000000000037 -t = 28.9000, H(p,q)-H0 = 0.0000000021904052, L(p,q)-L0 = 0.0000000000000039 -t = 29.0000, H(p,q)-H0 = 0.0000000021903620, L(p,q)-L0 = 0.0000000000000037 -t = 29.1000, H(p,q)-H0 = 0.0000000021903072, L(p,q)-L0 = 0.0000000000000037 -t = 29.2000, H(p,q)-H0 = 0.0000000021902369, L(p,q)-L0 = 0.0000000000000038 -t = 29.3000, H(p,q)-H0 = 0.0000000021901463, L(p,q)-L0 = 0.0000000000000036 -t = 29.4000, H(p,q)-H0 = 0.0000000021900293, L(p,q)-L0 = 0.0000000000000042 -t = 29.5000, H(p,q)-H0 = 0.0000000021898753, L(p,q)-L0 = 0.0000000000000041 -t = 29.6000, H(p,q)-H0 = 0.0000000021896700, L(p,q)-L0 = 0.0000000000000042 -t = 29.7000, H(p,q)-H0 = 0.0000000021893919, L(p,q)-L0 = 0.0000000000000040 -t = 29.8000, H(p,q)-H0 = 0.0000000021890065, L(p,q)-L0 = 0.0000000000000040 -t = 29.9000, H(p,q)-H0 = 0.0000000021884604, L(p,q)-L0 = 0.0000000000000038 -t = 30.0000, H(p,q)-H0 = 0.0000000021876657, L(p,q)-L0 = 0.0000000000000044 -t = 30.1000, H(p,q)-H0 = 0.0000000021864693, L(p,q)-L0 = 0.0000000000000042 -t = 30.2000, H(p,q)-H0 = 0.0000000021846054, L(p,q)-L0 = 0.0000000000000042 -t = 30.3000, H(p,q)-H0 = 0.0000000021815807, L(p,q)-L0 = 0.0000000000000040 -t = 30.4000, H(p,q)-H0 = 0.0000000021764376, L(p,q)-L0 = 0.0000000000000038 -t = 30.5000, H(p,q)-H0 = 0.0000000021672218, L(p,q)-L0 = 0.0000000000000038 -t = 30.6000, H(p,q)-H0 = 0.0000000021497005, L(p,q)-L0 = 0.0000000000000039 -t = 30.7000, H(p,q)-H0 = 0.0000000021141389, L(p,q)-L0 = 0.0000000000000040 -t = 30.8000, H(p,q)-H0 = 0.0000000020367849, L(p,q)-L0 = 0.0000000000000039 -t = 30.9000, H(p,q)-H0 = 0.0000000018570208, L(p,q)-L0 = 0.0000000000000031 -t = 31.0000, H(p,q)-H0 = 0.0000000014208090, L(p,q)-L0 = 0.0000000000000032 -t = 31.1000, H(p,q)-H0 = 0.0000000003977567, L(p,q)-L0 = 0.0000000000000036 -t = 31.2000, H(p,q)-H0 = -0.0000000014232162, L(p,q)-L0 = 0.0000000000000033 -t = 31.3000, H(p,q)-H0 = -0.0000000021604556, L(p,q)-L0 = 0.0000000000000033 -t = 31.4000, H(p,q)-H0 = -0.0000000000914391, L(p,q)-L0 = 0.0000000000000037 -t = 31.5000, H(p,q)-H0 = -0.0000000015394426, L(p,q)-L0 = 0.0000000000000033 -t = 31.6000, H(p,q)-H0 = -0.0000000019942215, L(p,q)-L0 = 0.0000000000000033 -t = 31.7000, H(p,q)-H0 = -0.0000000001403380, L(p,q)-L0 = 0.0000000000000033 -t = 31.8000, H(p,q)-H0 = 0.0000000011688988, L(p,q)-L0 = 0.0000000000000033 -t = 31.9000, H(p,q)-H0 = 0.0000000017544384, L(p,q)-L0 = 0.0000000000000033 -t = 32.0000, H(p,q)-H0 = 0.0000000019945824, L(p,q)-L0 = 0.0000000000000034 -t = 32.1000, H(p,q)-H0 = 0.0000000020957509, L(p,q)-L0 = 0.0000000000000039 -t = 32.2000, H(p,q)-H0 = 0.0000000021411103, L(p,q)-L0 = 0.0000000000000037 -t = 32.3000, H(p,q)-H0 = 0.0000000021629221, L(p,q)-L0 = 0.0000000000000041 -t = 32.4000, H(p,q)-H0 = 0.0000000021741428, L(p,q)-L0 = 0.0000000000000041 -t = 32.5000, H(p,q)-H0 = 0.0000000021802830, L(p,q)-L0 = 0.0000000000000041 -t = 32.6000, H(p,q)-H0 = 0.0000000021838333, L(p,q)-L0 = 0.0000000000000044 -t = 32.7000, H(p,q)-H0 = 0.0000000021859882, L(p,q)-L0 = 0.0000000000000042 -t = 32.8000, H(p,q)-H0 = 0.0000000021873530, L(p,q)-L0 = 0.0000000000000039 -t = 32.9000, H(p,q)-H0 = 0.0000000021882515, L(p,q)-L0 = 0.0000000000000041 -t = 33.0000, H(p,q)-H0 = 0.0000000021888621, L(p,q)-L0 = 0.0000000000000042 -t = 33.1000, H(p,q)-H0 = 0.0000000021892892, L(p,q)-L0 = 0.0000000000000043 -t = 33.2000, H(p,q)-H0 = 0.0000000021895956, L(p,q)-L0 = 0.0000000000000044 -t = 33.3000, H(p,q)-H0 = 0.0000000021898200, L(p,q)-L0 = 0.0000000000000042 -t = 33.4000, H(p,q)-H0 = 0.0000000021899879, L(p,q)-L0 = 0.0000000000000044 -t = 33.5000, H(p,q)-H0 = 0.0000000021901150, L(p,q)-L0 = 0.0000000000000044 -t = 33.6000, H(p,q)-H0 = 0.0000000021902128, L(p,q)-L0 = 0.0000000000000046 -t = 33.7000, H(p,q)-H0 = 0.0000000021902886, L(p,q)-L0 = 0.0000000000000044 -t = 33.8000, H(p,q)-H0 = 0.0000000021903477, L(p,q)-L0 = 0.0000000000000044 -t = 33.9000, H(p,q)-H0 = 0.0000000021903943, L(p,q)-L0 = 0.0000000000000048 -t = 34.0000, H(p,q)-H0 = 0.0000000021904303, L(p,q)-L0 = 0.0000000000000047 -t = 34.1000, H(p,q)-H0 = 0.0000000021904579, L(p,q)-L0 = 0.0000000000000044 -t = 34.2000, H(p,q)-H0 = 0.0000000021904785, L(p,q)-L0 = 0.0000000000000042 -t = 34.3000, H(p,q)-H0 = 0.0000000021904935, L(p,q)-L0 = 0.0000000000000042 -t = 34.4000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000040 -t = 34.5000, H(p,q)-H0 = 0.0000000021905079, L(p,q)-L0 = 0.0000000000000039 -t = 34.6000, H(p,q)-H0 = 0.0000000021905082, L(p,q)-L0 = 0.0000000000000038 -t = 34.7000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = 0.0000000000000042 -t = 34.8000, H(p,q)-H0 = 0.0000000021904950, L(p,q)-L0 = 0.0000000000000039 -t = 34.9000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000038 -t = 35.0000, H(p,q)-H0 = 0.0000000021904607, L(p,q)-L0 = 0.0000000000000037 -t = 35.1000, H(p,q)-H0 = 0.0000000021904338, L(p,q)-L0 = 0.0000000000000036 -t = 35.2000, H(p,q)-H0 = 0.0000000021903993, L(p,q)-L0 = 0.0000000000000039 -t = 35.3000, H(p,q)-H0 = 0.0000000021903542, L(p,q)-L0 = 0.0000000000000037 -t = 35.4000, H(p,q)-H0 = 0.0000000021902972, L(p,q)-L0 = 0.0000000000000039 -t = 35.5000, H(p,q)-H0 = 0.0000000021902238, L(p,q)-L0 = 0.0000000000000037 -t = 35.6000, H(p,q)-H0 = 0.0000000021901293, L(p,q)-L0 = 0.0000000000000039 -t = 35.7000, H(p,q)-H0 = 0.0000000021900066, L(p,q)-L0 = 0.0000000000000038 -t = 35.8000, H(p,q)-H0 = 0.0000000021898452, L(p,q)-L0 = 0.0000000000000040 -t = 35.9000, H(p,q)-H0 = 0.0000000021896294, L(p,q)-L0 = 0.0000000000000038 -t = 36.0000, H(p,q)-H0 = 0.0000000021893357, L(p,q)-L0 = 0.0000000000000038 -t = 36.1000, H(p,q)-H0 = 0.0000000021889278, L(p,q)-L0 = 0.0000000000000033 -t = 36.2000, H(p,q)-H0 = 0.0000000021883469, L(p,q)-L0 = 0.0000000000000029 -t = 36.3000, H(p,q)-H0 = 0.0000000021874968, L(p,q)-L0 = 0.0000000000000028 -t = 36.4000, H(p,q)-H0 = 0.0000000021862115, L(p,q)-L0 = 0.0000000000000028 -t = 36.5000, H(p,q)-H0 = 0.0000000021841960, L(p,q)-L0 = 0.0000000000000032 -t = 36.6000, H(p,q)-H0 = 0.0000000021809006, L(p,q)-L0 = 0.0000000000000037 -t = 36.7000, H(p,q)-H0 = 0.0000000021752493, L(p,q)-L0 = 0.0000000000000031 -t = 36.8000, H(p,q)-H0 = 0.0000000021650266, L(p,q)-L0 = 0.0000000000000031 -t = 36.9000, H(p,q)-H0 = 0.0000000021453834, L(p,q)-L0 = 0.0000000000000032 -t = 37.0000, H(p,q)-H0 = 0.0000000021050556, L(p,q)-L0 = 0.0000000000000036 -t = 37.1000, H(p,q)-H0 = 0.0000000020163053, L(p,q)-L0 = 0.0000000000000038 -t = 37.2000, H(p,q)-H0 = 0.0000000018080409, L(p,q)-L0 = 0.0000000000000031 -t = 37.3000, H(p,q)-H0 = 0.0000000013016177, L(p,q)-L0 = 0.0000000000000036 -t = 37.4000, H(p,q)-H0 = 0.0000000001394596, L(p,q)-L0 = 0.0000000000000036 -t = 37.5000, H(p,q)-H0 = -0.0000000017311259, L(p,q)-L0 = 0.0000000000000036 -t = 37.6000, H(p,q)-H0 = -0.0000000019064714, L(p,q)-L0 = 0.0000000000000037 -t = 37.7000, H(p,q)-H0 = 0.0000000000003630, L(p,q)-L0 = 0.0000000000000033 -t = 37.8000, H(p,q)-H0 = -0.0000000018991426, L(p,q)-L0 = 0.0000000000000031 -t = 37.9000, H(p,q)-H0 = -0.0000000017294051, L(p,q)-L0 = 0.0000000000000031 -t = 38.0000, H(p,q)-H0 = 0.0000000001444111, L(p,q)-L0 = 0.0000000000000033 -t = 38.1000, H(p,q)-H0 = 0.0000000013063575, L(p,q)-L0 = 0.0000000000000033 -t = 38.2000, H(p,q)-H0 = 0.0000000018110842, L(p,q)-L0 = 0.0000000000000036 -t = 38.3000, H(p,q)-H0 = 0.0000000020180342, L(p,q)-L0 = 0.0000000000000036 -t = 38.4000, H(p,q)-H0 = 0.0000000021060161, L(p,q)-L0 = 0.0000000000000037 -t = 38.5000, H(p,q)-H0 = 0.0000000021459255, L(p,q)-L0 = 0.0000000000000038 -t = 38.6000, H(p,q)-H0 = 0.0000000021653410, L(p,q)-L0 = 0.0000000000000034 -t = 38.7000, H(p,q)-H0 = 0.0000000021754381, L(p,q)-L0 = 0.0000000000000033 -t = 38.8000, H(p,q)-H0 = 0.0000000021810172, L(p,q)-L0 = 0.0000000000000033 -t = 38.9000, H(p,q)-H0 = 0.0000000021842712, L(p,q)-L0 = 0.0000000000000034 -t = 39.0000, H(p,q)-H0 = 0.0000000021862612, L(p,q)-L0 = 0.0000000000000033 -t = 39.1000, H(p,q)-H0 = 0.0000000021875308, L(p,q)-L0 = 0.0000000000000037 -t = 39.2000, H(p,q)-H0 = 0.0000000021883703, L(p,q)-L0 = 0.0000000000000033 -t = 39.3000, H(p,q)-H0 = 0.0000000021889444, L(p,q)-L0 = 0.0000000000000037 -t = 39.4000, H(p,q)-H0 = 0.0000000021893477, L(p,q)-L0 = 0.0000000000000038 -t = 39.5000, H(p,q)-H0 = 0.0000000021896380, L(p,q)-L0 = 0.0000000000000036 -t = 39.6000, H(p,q)-H0 = 0.0000000021898516, L(p,q)-L0 = 0.0000000000000037 -t = 39.7000, H(p,q)-H0 = 0.0000000021900115, L(p,q)-L0 = 0.0000000000000036 -t = 39.8000, H(p,q)-H0 = 0.0000000021901330, L(p,q)-L0 = 0.0000000000000031 -t = 39.9000, H(p,q)-H0 = 0.0000000021902264, L(p,q)-L0 = 0.0000000000000032 -t = 40.0000, H(p,q)-H0 = 0.0000000021902989, L(p,q)-L0 = 0.0000000000000028 -t = 40.1000, H(p,q)-H0 = 0.0000000021903558, L(p,q)-L0 = 0.0000000000000029 -t = 40.2000, H(p,q)-H0 = 0.0000000021904003, L(p,q)-L0 = 0.0000000000000028 -t = 40.3000, H(p,q)-H0 = 0.0000000021904346, L(p,q)-L0 = 0.0000000000000026 -t = 40.4000, H(p,q)-H0 = 0.0000000021904611, L(p,q)-L0 = 0.0000000000000024 -t = 40.5000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000022 -t = 40.6000, H(p,q)-H0 = 0.0000000021904947, L(p,q)-L0 = 0.0000000000000022 -t = 40.7000, H(p,q)-H0 = 0.0000000021905039, L(p,q)-L0 = 0.0000000000000026 -t = 40.8000, H(p,q)-H0 = 0.0000000021905078, L(p,q)-L0 = 0.0000000000000022 -t = 40.9000, H(p,q)-H0 = 0.0000000021905074, L(p,q)-L0 = 0.0000000000000022 -t = 41.0000, H(p,q)-H0 = 0.0000000021905026, L(p,q)-L0 = 0.0000000000000026 -t = 41.1000, H(p,q)-H0 = 0.0000000021904927, L(p,q)-L0 = 0.0000000000000026 -t = 41.2000, H(p,q)-H0 = 0.0000000021904775, L(p,q)-L0 = 0.0000000000000026 -t = 41.3000, H(p,q)-H0 = 0.0000000021904565, L(p,q)-L0 = 0.0000000000000027 -t = 41.4000, H(p,q)-H0 = 0.0000000021904285, L(p,q)-L0 = 0.0000000000000027 -t = 41.5000, H(p,q)-H0 = 0.0000000021903920, L(p,q)-L0 = 0.0000000000000024 -t = 41.6000, H(p,q)-H0 = 0.0000000021903456, L(p,q)-L0 = 0.0000000000000028 -t = 41.7000, H(p,q)-H0 = 0.0000000021902861, L(p,q)-L0 = 0.0000000000000029 -t = 41.8000, H(p,q)-H0 = 0.0000000021902095, L(p,q)-L0 = 0.0000000000000027 -t = 41.9000, H(p,q)-H0 = 0.0000000021901106, L(p,q)-L0 = 0.0000000000000024 -t = 42.0000, H(p,q)-H0 = 0.0000000021899824, L(p,q)-L0 = 0.0000000000000026 -t = 42.1000, H(p,q)-H0 = 0.0000000021898132, L(p,q)-L0 = 0.0000000000000024 -t = 42.2000, H(p,q)-H0 = 0.0000000021895867, L(p,q)-L0 = 0.0000000000000029 -t = 42.3000, H(p,q)-H0 = 0.0000000021892768, L(p,q)-L0 = 0.0000000000000029 -t = 42.4000, H(p,q)-H0 = 0.0000000021888449, L(p,q)-L0 = 0.0000000000000028 -t = 42.5000, H(p,q)-H0 = 0.0000000021882276, L(p,q)-L0 = 0.0000000000000031 -t = 42.6000, H(p,q)-H0 = 0.0000000021873187, L(p,q)-L0 = 0.0000000000000031 -t = 42.7000, H(p,q)-H0 = 0.0000000021859365, L(p,q)-L0 = 0.0000000000000034 -t = 42.8000, H(p,q)-H0 = 0.0000000021837536, L(p,q)-L0 = 0.0000000000000033 -t = 42.9000, H(p,q)-H0 = 0.0000000021801575, L(p,q)-L0 = 0.0000000000000032 -t = 43.0000, H(p,q)-H0 = 0.0000000021739391, L(p,q)-L0 = 0.0000000000000036 -t = 43.1000, H(p,q)-H0 = 0.0000000021625797, L(p,q)-L0 = 0.0000000000000039 -t = 43.2000, H(p,q)-H0 = 0.0000000021405177, L(p,q)-L0 = 0.0000000000000047 -t = 43.3000, H(p,q)-H0 = 0.0000000020946935, L(p,q)-L0 = 0.0000000000000051 -t = 43.4000, H(p,q)-H0 = 0.0000000019926774, L(p,q)-L0 = 0.0000000000000047 -t = 43.5000, H(p,q)-H0 = 0.0000000017511204, L(p,q)-L0 = 0.0000000000000046 -t = 43.6000, H(p,q)-H0 = 0.0000000011639263, L(p,q)-L0 = 0.0000000000000042 -t = 43.7000, H(p,q)-H0 = -0.0000000001449194, L(p,q)-L0 = 0.0000000000000040 -t = 43.8000, H(p,q)-H0 = -0.0000000019957591, L(p,q)-L0 = 0.0000000000000036 -t = 43.9000, H(p,q)-H0 = -0.0000000015482549, L(p,q)-L0 = 0.0000000000000032 -t = 44.0000, H(p,q)-H0 = -0.0000000000875615, L(p,q)-L0 = 0.0000000000000033 -t = 44.1000, H(p,q)-H0 = -0.0000000021549367, L(p,q)-L0 = 0.0000000000000031 -t = 44.2000, H(p,q)-H0 = -0.0000000014210157, L(p,q)-L0 = 0.0000000000000030 -t = 44.3000, H(p,q)-H0 = 0.0000000004029348, L(p,q)-L0 = 0.0000000000000028 -t = 44.4000, H(p,q)-H0 = 0.0000000014252810, L(p,q)-L0 = 0.0000000000000027 -t = 44.5000, H(p,q)-H0 = 0.0000000018598003, L(p,q)-L0 = 0.0000000000000029 -t = 44.6000, H(p,q)-H0 = 0.0000000020383498, L(p,q)-L0 = 0.0000000000000032 -t = 44.7000, H(p,q)-H0 = 0.0000000021150072, L(p,q)-L0 = 0.0000000000000028 -t = 44.8000, H(p,q)-H0 = 0.0000000021501914, L(p,q)-L0 = 0.0000000000000031 -t = 44.9000, H(p,q)-H0 = 0.0000000021675071, L(p,q)-L0 = 0.0000000000000029 -t = 45.0000, H(p,q)-H0 = 0.0000000021766086, L(p,q)-L0 = 0.0000000000000028 -t = 45.1000, H(p,q)-H0 = 0.0000000021816857, L(p,q)-L0 = 0.0000000000000024 -t = 45.2000, H(p,q)-H0 = 0.0000000021846717, L(p,q)-L0 = 0.0000000000000023 -t = 45.3000, H(p,q)-H0 = 0.0000000021865116, L(p,q)-L0 = 0.0000000000000022 -t = 45.4000, H(p,q)-H0 = 0.0000000021876930, L(p,q)-L0 = 0.0000000000000022 -t = 45.5000, H(p,q)-H0 = 0.0000000021884791, L(p,q)-L0 = 0.0000000000000020 -t = 45.6000, H(p,q)-H0 = 0.0000000021890187, L(p,q)-L0 = 0.0000000000000020 -t = 45.7000, H(p,q)-H0 = 0.0000000021893996, L(p,q)-L0 = 0.0000000000000019 -t = 45.8000, H(p,q)-H0 = 0.0000000021896744, L(p,q)-L0 = 0.0000000000000016 -t = 45.9000, H(p,q)-H0 = 0.0000000021898774, L(p,q)-L0 = 0.0000000000000016 -t = 46.0000, H(p,q)-H0 = 0.0000000021900302, L(p,q)-L0 = 0.0000000000000017 -t = 46.1000, H(p,q)-H0 = 0.0000000021901467, L(p,q)-L0 = 0.0000000000000020 -t = 46.2000, H(p,q)-H0 = 0.0000000021902365, L(p,q)-L0 = 0.0000000000000023 -t = 46.3000, H(p,q)-H0 = 0.0000000021903065, L(p,q)-L0 = 0.0000000000000026 -t = 46.4000, H(p,q)-H0 = 0.0000000021903610, L(p,q)-L0 = 0.0000000000000026 -t = 46.5000, H(p,q)-H0 = 0.0000000021904035, L(p,q)-L0 = 0.0000000000000024 -t = 46.6000, H(p,q)-H0 = 0.0000000021904365, L(p,q)-L0 = 0.0000000000000024 -t = 46.7000, H(p,q)-H0 = 0.0000000021904620, L(p,q)-L0 = 0.0000000000000024 -t = 46.8000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000026 -t = 46.9000, H(p,q)-H0 = 0.0000000021904942, L(p,q)-L0 = 0.0000000000000029 -t = 47.0000, H(p,q)-H0 = 0.0000000021905023, L(p,q)-L0 = 0.0000000000000032 -t = 47.1000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = 0.0000000000000031 -t = 47.2000, H(p,q)-H0 = 0.0000000021905046, L(p,q)-L0 = 0.0000000000000032 -t = 47.3000, H(p,q)-H0 = 0.0000000021904984, L(p,q)-L0 = 0.0000000000000030 -t = 47.4000, H(p,q)-H0 = 0.0000000021904876, L(p,q)-L0 = 0.0000000000000029 -t = 47.5000, H(p,q)-H0 = 0.0000000021904717, L(p,q)-L0 = 0.0000000000000030 -t = 47.6000, H(p,q)-H0 = 0.0000000021904498, L(p,q)-L0 = 0.0000000000000036 -t = 47.7000, H(p,q)-H0 = 0.0000000021904205, L(p,q)-L0 = 0.0000000000000037 -t = 47.8000, H(p,q)-H0 = 0.0000000021903824, L(p,q)-L0 = 0.0000000000000037 -t = 47.9000, H(p,q)-H0 = 0.0000000021903339, L(p,q)-L0 = 0.0000000000000037 -t = 48.0000, H(p,q)-H0 = 0.0000000021902718, L(p,q)-L0 = 0.0000000000000038 -t = 48.1000, H(p,q)-H0 = 0.0000000021901918, L(p,q)-L0 = 0.0000000000000038 -t = 48.2000, H(p,q)-H0 = 0.0000000021900888, L(p,q)-L0 = 0.0000000000000039 -t = 48.3000, H(p,q)-H0 = 0.0000000021899544, L(p,q)-L0 = 0.0000000000000039 -t = 48.4000, H(p,q)-H0 = 0.0000000021897766, L(p,q)-L0 = 0.0000000000000034 -t = 48.5000, H(p,q)-H0 = 0.0000000021895377, L(p,q)-L0 = 0.0000000000000033 -t = 48.6000, H(p,q)-H0 = 0.0000000021892106, L(p,q)-L0 = 0.0000000000000033 -t = 48.7000, H(p,q)-H0 = 0.0000000021887525, L(p,q)-L0 = 0.0000000000000033 -t = 48.8000, H(p,q)-H0 = 0.0000000021880946, L(p,q)-L0 = 0.0000000000000032 -t = 48.9000, H(p,q)-H0 = 0.0000000021871220, L(p,q)-L0 = 0.0000000000000034 -t = 49.0000, H(p,q)-H0 = 0.0000000021856332, L(p,q)-L0 = 0.0000000000000038 -t = 49.1000, H(p,q)-H0 = 0.0000000021832666, L(p,q)-L0 = 0.0000000000000039 -t = 49.2000, H(p,q)-H0 = 0.0000000021793377, L(p,q)-L0 = 0.0000000000000040 -t = 49.3000, H(p,q)-H0 = 0.0000000021724836, L(p,q)-L0 = 0.0000000000000038 -t = 49.4000, H(p,q)-H0 = 0.0000000021598388, L(p,q)-L0 = 0.0000000000000037 -t = 49.5000, H(p,q)-H0 = 0.0000000021350117, L(p,q)-L0 = 0.0000000000000047 -t = 49.6000, H(p,q)-H0 = 0.0000000020828380, L(p,q)-L0 = 0.0000000000000041 -t = 49.7000, H(p,q)-H0 = 0.0000000019653632, L(p,q)-L0 = 0.0000000000000040 -t = 49.8000, H(p,q)-H0 = 0.0000000016849397, L(p,q)-L0 = 0.0000000000000040 -t = 49.9000, H(p,q)-H0 = 0.0000000010054575, L(p,q)-L0 = 0.0000000000000043 -t = 50.0000, H(p,q)-H0 = -0.0000000004525247, L(p,q)-L0 = 0.0000000000000041 -t = 50.1000, H(p,q)-H0 = -0.0000000021925068, L(p,q)-L0 = 0.0000000000000038 -t = 50.2000, H(p,q)-H0 = -0.0000000011262797, L(p,q)-L0 = 0.0000000000000038 -t = 50.3000, H(p,q)-H0 = -0.0000000003393819, L(p,q)-L0 = 0.0000000000000036 -t = 50.4000, H(p,q)-H0 = -0.0000000022861792, L(p,q)-L0 = 0.0000000000000036 -t = 50.5000, H(p,q)-H0 = -0.0000000010909109, L(p,q)-L0 = 0.0000000000000034 -t = 50.6000, H(p,q)-H0 = 0.0000000006344154, L(p,q)-L0 = 0.0000000000000036 -t = 50.7000, H(p,q)-H0 = 0.0000000015278889, L(p,q)-L0 = 0.0000000000000034 -t = 50.8000, H(p,q)-H0 = 0.0000000019017266, L(p,q)-L0 = 0.0000000000000041 -t = 50.9000, H(p,q)-H0 = 0.0000000020559798, L(p,q)-L0 = 0.0000000000000034 -t = 51.0000, H(p,q)-H0 = 0.0000000021228997, L(p,q)-L0 = 0.0000000000000030 -t = 51.1000, H(p,q)-H0 = 0.0000000021539794, L(p,q)-L0 = 0.0000000000000028 -t = 51.2000, H(p,q)-H0 = 0.0000000021694511, L(p,q)-L0 = 0.0000000000000027 -t = 51.3000, H(p,q)-H0 = 0.0000000021776693, L(p,q)-L0 = 0.0000000000000024 -t = 51.4000, H(p,q)-H0 = 0.0000000021822963, L(p,q)-L0 = 0.0000000000000023 -t = 51.5000, H(p,q)-H0 = 0.0000000021850405, L(p,q)-L0 = 0.0000000000000024 -t = 51.6000, H(p,q)-H0 = 0.0000000021867441, L(p,q)-L0 = 0.0000000000000027 -t = 51.7000, H(p,q)-H0 = 0.0000000021878448, L(p,q)-L0 = 0.0000000000000028 -t = 51.8000, H(p,q)-H0 = 0.0000000021885816, L(p,q)-L0 = 0.0000000000000029 -t = 51.9000, H(p,q)-H0 = 0.0000000021890901, L(p,q)-L0 = 0.0000000000000033 -t = 52.0000, H(p,q)-H0 = 0.0000000021894503, L(p,q)-L0 = 0.0000000000000032 -t = 52.1000, H(p,q)-H0 = 0.0000000021897114, L(p,q)-L0 = 0.0000000000000030 -t = 52.2000, H(p,q)-H0 = 0.0000000021899053, L(p,q)-L0 = 0.0000000000000031 -t = 52.3000, H(p,q)-H0 = 0.0000000021900509, L(p,q)-L0 = 0.0000000000000033 -t = 52.4000, H(p,q)-H0 = 0.0000000021901626, L(p,q)-L0 = 0.0000000000000037 -t = 52.5000, H(p,q)-H0 = 0.0000000021902487, L(p,q)-L0 = 0.0000000000000038 -t = 52.6000, H(p,q)-H0 = 0.0000000021903156, L(p,q)-L0 = 0.0000000000000039 -t = 52.7000, H(p,q)-H0 = 0.0000000021903677, L(p,q)-L0 = 0.0000000000000038 -t = 52.8000, H(p,q)-H0 = 0.0000000021904085, L(p,q)-L0 = 0.0000000000000036 -t = 52.9000, H(p,q)-H0 = 0.0000000021904403, L(p,q)-L0 = 0.0000000000000037 -t = 53.0000, H(p,q)-H0 = 0.0000000021904645, L(p,q)-L0 = 0.0000000000000036 -t = 53.1000, H(p,q)-H0 = 0.0000000021904824, L(p,q)-L0 = 0.0000000000000037 -t = 53.2000, H(p,q)-H0 = 0.0000000021904947, L(p,q)-L0 = 0.0000000000000039 -t = 53.3000, H(p,q)-H0 = 0.0000000021905021, L(p,q)-L0 = 0.0000000000000041 -t = 53.4000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = 0.0000000000000046 -t = 53.5000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000046 -t = 53.6000, H(p,q)-H0 = 0.0000000021904966, L(p,q)-L0 = 0.0000000000000049 -t = 53.7000, H(p,q)-H0 = 0.0000000021904851, L(p,q)-L0 = 0.0000000000000048 -t = 53.8000, H(p,q)-H0 = 0.0000000021904681, L(p,q)-L0 = 0.0000000000000050 -t = 53.9000, H(p,q)-H0 = 0.0000000021904447, L(p,q)-L0 = 0.0000000000000048 -t = 54.0000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000046 -t = 54.1000, H(p,q)-H0 = 0.0000000021903745, L(p,q)-L0 = 0.0000000000000044 -t = 54.2000, H(p,q)-H0 = 0.0000000021903241, L(p,q)-L0 = 0.0000000000000048 -t = 54.3000, H(p,q)-H0 = 0.0000000021902591, L(p,q)-L0 = 0.0000000000000047 -t = 54.4000, H(p,q)-H0 = 0.0000000021901758, L(p,q)-L0 = 0.0000000000000047 -t = 54.5000, H(p,q)-H0 = 0.0000000021900680, L(p,q)-L0 = 0.0000000000000043 -t = 54.6000, H(p,q)-H0 = 0.0000000021899273, L(p,q)-L0 = 0.0000000000000047 -t = 54.7000, H(p,q)-H0 = 0.0000000021897409, L(p,q)-L0 = 0.0000000000000047 -t = 54.8000, H(p,q)-H0 = 0.0000000021894895, L(p,q)-L0 = 0.0000000000000044 -t = 54.9000, H(p,q)-H0 = 0.0000000021891444, L(p,q)-L0 = 0.0000000000000047 -t = 55.0000, H(p,q)-H0 = 0.0000000021886584, L(p,q)-L0 = 0.0000000000000046 -t = 55.1000, H(p,q)-H0 = 0.0000000021879574, L(p,q)-L0 = 0.0000000000000044 -t = 55.2000, H(p,q)-H0 = 0.0000000021869148, L(p,q)-L0 = 0.0000000000000049 -t = 55.3000, H(p,q)-H0 = 0.0000000021853098, L(p,q)-L0 = 0.0000000000000047 -t = 55.4000, H(p,q)-H0 = 0.0000000021827406, L(p,q)-L0 = 0.0000000000000046 -t = 55.5000, H(p,q)-H0 = 0.0000000021784419, L(p,q)-L0 = 0.0000000000000049 -t = 55.6000, H(p,q)-H0 = 0.0000000021708755, L(p,q)-L0 = 0.0000000000000050 -t = 55.7000, H(p,q)-H0 = 0.0000000021567761, L(p,q)-L0 = 0.0000000000000053 -t = 55.8000, H(p,q)-H0 = 0.0000000021287814, L(p,q)-L0 = 0.0000000000000049 -t = 55.9000, H(p,q)-H0 = 0.0000000020692630, L(p,q)-L0 = 0.0000000000000052 -t = 56.0000, H(p,q)-H0 = 0.0000000019337545, L(p,q)-L0 = 0.0000000000000053 -t = 56.1000, H(p,q)-H0 = 0.0000000016080133, L(p,q)-L0 = 0.0000000000000050 -t = 56.2000, H(p,q)-H0 = 0.0000000008240018, L(p,q)-L0 = 0.0000000000000054 -t = 56.3000, H(p,q)-H0 = -0.0000000007777232, L(p,q)-L0 = 0.0000000000000053 -t = 56.4000, H(p,q)-H0 = -0.0000000022964355, L(p,q)-L0 = 0.0000000000000052 -t = 56.5000, H(p,q)-H0 = -0.0000000006980465, L(p,q)-L0 = 0.0000000000000052 -t = 56.6000, H(p,q)-H0 = -0.0000000007108090, L(p,q)-L0 = 0.0000000000000051 -t = 56.7000, H(p,q)-H0 = -0.0000000022911208, L(p,q)-L0 = 0.0000000000000050 -t = 56.8000, H(p,q)-H0 = -0.0000000007567429, L(p,q)-L0 = 0.0000000000000050 -t = 56.9000, H(p,q)-H0 = 0.0000000008394492, L(p,q)-L0 = 0.0000000000000053 -t = 57.0000, H(p,q)-H0 = 0.0000000016162609, L(p,q)-L0 = 0.0000000000000052 -t = 57.1000, H(p,q)-H0 = 0.0000000019378454, L(p,q)-L0 = 0.0000000000000050 -t = 57.2000, H(p,q)-H0 = 0.0000000020713116, L(p,q)-L0 = 0.0000000000000049 -t = 57.3000, H(p,q)-H0 = 0.0000000021298465, L(p,q)-L0 = 0.0000000000000049 -t = 57.4000, H(p,q)-H0 = 0.0000000021573541, L(p,q)-L0 = 0.0000000000000040 -t = 57.5000, H(p,q)-H0 = 0.0000000021712041, L(p,q)-L0 = 0.0000000000000041 -t = 57.6000, H(p,q)-H0 = 0.0000000021786368, L(p,q)-L0 = 0.0000000000000044 -t = 57.7000, H(p,q)-H0 = 0.0000000021828603, L(p,q)-L0 = 0.0000000000000044 -t = 57.8000, H(p,q)-H0 = 0.0000000021853853, L(p,q)-L0 = 0.0000000000000042 -t = 57.9000, H(p,q)-H0 = 0.0000000021869638, L(p,q)-L0 = 0.0000000000000044 -t = 58.0000, H(p,q)-H0 = 0.0000000021879897, L(p,q)-L0 = 0.0000000000000040 -t = 58.1000, H(p,q)-H0 = 0.0000000021886802, L(p,q)-L0 = 0.0000000000000041 -t = 58.2000, H(p,q)-H0 = 0.0000000021891585, L(p,q)-L0 = 0.0000000000000038 -t = 58.3000, H(p,q)-H0 = 0.0000000021894993, L(p,q)-L0 = 0.0000000000000039 -t = 58.4000, H(p,q)-H0 = 0.0000000021897474, L(p,q)-L0 = 0.0000000000000038 -t = 58.5000, H(p,q)-H0 = 0.0000000021899316, L(p,q)-L0 = 0.0000000000000038 -t = 58.6000, H(p,q)-H0 = 0.0000000021900710, L(p,q)-L0 = 0.0000000000000042 -t = 58.7000, H(p,q)-H0 = 0.0000000021901776, L(p,q)-L0 = 0.0000000000000042 -t = 58.8000, H(p,q)-H0 = 0.0000000021902602, L(p,q)-L0 = 0.0000000000000047 -t = 58.9000, H(p,q)-H0 = 0.0000000021903247, L(p,q)-L0 = 0.0000000000000050 -t = 59.0000, H(p,q)-H0 = 0.0000000021903750, L(p,q)-L0 = 0.0000000000000052 -t = 59.1000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000052 -t = 59.2000, H(p,q)-H0 = 0.0000000021904442, L(p,q)-L0 = 0.0000000000000047 -t = 59.3000, H(p,q)-H0 = 0.0000000021904675, L(p,q)-L0 = 0.0000000000000052 -t = 59.4000, H(p,q)-H0 = 0.0000000021904839, L(p,q)-L0 = 0.0000000000000048 -t = 59.5000, H(p,q)-H0 = 0.0000000021904950, L(p,q)-L0 = 0.0000000000000044 -t = 59.6000, H(p,q)-H0 = 0.0000000021905014, L(p,q)-L0 = 0.0000000000000043 -t = 59.7000, H(p,q)-H0 = 0.0000000021905032, L(p,q)-L0 = 0.0000000000000042 -t = 59.8000, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = 0.0000000000000043 -t = 59.9000, H(p,q)-H0 = 0.0000000021904931, L(p,q)-L0 = 0.0000000000000044 -t = 60.0000, H(p,q)-H0 = 0.0000000021904805, L(p,q)-L0 = 0.0000000000000043 -t = 60.1000, H(p,q)-H0 = 0.0000000021904624, L(p,q)-L0 = 0.0000000000000042 -t = 60.2000, H(p,q)-H0 = 0.0000000021904379, L(p,q)-L0 = 0.0000000000000040 -t = 60.3000, H(p,q)-H0 = 0.0000000021904059, L(p,q)-L0 = 0.0000000000000042 -t = 60.4000, H(p,q)-H0 = 0.0000000021903648, L(p,q)-L0 = 0.0000000000000044 -t = 60.5000, H(p,q)-H0 = 0.0000000021903120, L(p,q)-L0 = 0.0000000000000044 -t = 60.6000, H(p,q)-H0 = 0.0000000021902444, L(p,q)-L0 = 0.0000000000000043 -t = 60.7000, H(p,q)-H0 = 0.0000000021901574, L(p,q)-L0 = 0.0000000000000043 -t = 60.8000, H(p,q)-H0 = 0.0000000021900446, L(p,q)-L0 = 0.0000000000000041 -t = 60.9000, H(p,q)-H0 = 0.0000000021898974, L(p,q)-L0 = 0.0000000000000042 -t = 61.0000, H(p,q)-H0 = 0.0000000021897019, L(p,q)-L0 = 0.0000000000000047 -t = 61.1000, H(p,q)-H0 = 0.0000000021894369, L(p,q)-L0 = 0.0000000000000044 -t = 61.2000, H(p,q)-H0 = 0.0000000021890715, L(p,q)-L0 = 0.0000000000000044 -t = 61.3000, H(p,q)-H0 = 0.0000000021885554, L(p,q)-L0 = 0.0000000000000040 -t = 61.4000, H(p,q)-H0 = 0.0000000021878070, L(p,q)-L0 = 0.0000000000000038 -t = 61.5000, H(p,q)-H0 = 0.0000000021866884, L(p,q)-L0 = 0.0000000000000034 -t = 61.6000, H(p,q)-H0 = 0.0000000021849565, L(p,q)-L0 = 0.0000000000000037 -t = 61.7000, H(p,q)-H0 = 0.0000000021821646, L(p,q)-L0 = 0.0000000000000040 -t = 61.8000, H(p,q)-H0 = 0.0000000021774544, L(p,q)-L0 = 0.0000000000000036 -t = 61.9000, H(p,q)-H0 = 0.0000000021690871, L(p,q)-L0 = 0.0000000000000032 -t = 62.0000, H(p,q)-H0 = 0.0000000021533373, L(p,q)-L0 = 0.0000000000000038 -t = 62.1000, H(p,q)-H0 = 0.0000000021217116, L(p,q)-L0 = 0.0000000000000032 -t = 62.2000, H(p,q)-H0 = 0.0000000020536803, L(p,q)-L0 = 0.0000000000000034 -t = 62.3000, H(p,q)-H0 = 0.0000000018971157, L(p,q)-L0 = 0.0000000000000032 -t = 62.4000, H(p,q)-H0 = 0.0000000015186385, L(p,q)-L0 = 0.0000000000000027 -t = 62.5000, H(p,q)-H0 = 0.0000000006175833, L(p,q)-L0 = 0.0000000000000024 -t = 62.6000, H(p,q)-H0 = -0.0000000011113854, L(p,q)-L0 = 0.0000000000000024 -t = 62.7000, H(p,q)-H0 = -0.0000000022863662, L(p,q)-L0 = 0.0000000000000024 -t = 62.8000, H(p,q)-H0 = -0.0000000003295020, L(p,q)-L0 = 0.0000000000000021 -t = 62.9000, H(p,q)-H0 = -0.0000000011398287, L(p,q)-L0 = 0.0000000000000023 -t = 63.0000, H(p,q)-H0 = -0.0000000021824698, L(p,q)-L0 = 0.0000000000000022 -t = 63.1000, H(p,q)-H0 = -0.0000000004316751, L(p,q)-L0 = 0.0000000000000030 -t = 63.2000, H(p,q)-H0 = 0.0000000010195209, L(p,q)-L0 = 0.0000000000000029 -t = 63.3000, H(p,q)-H0 = 0.0000000016922781, L(p,q)-L0 = 0.0000000000000033 -t = 63.4000, H(p,q)-H0 = 0.0000000019689945, L(p,q)-L0 = 0.0000000000000034 -t = 63.5000, H(p,q)-H0 = 0.0000000020846639, L(p,q)-L0 = 0.0000000000000037 -t = 63.6000, H(p,q)-H0 = 0.0000000021359661, L(p,q)-L0 = 0.0000000000000042 -t = 63.7000, H(p,q)-H0 = 0.0000000021603613, L(p,q)-L0 = 0.0000000000000042 -t = 63.8000, H(p,q)-H0 = 0.0000000021727820, L(p,q)-L0 = 0.0000000000000043 -t = 63.9000, H(p,q)-H0 = 0.0000000021795151, L(p,q)-L0 = 0.0000000000000044 -t = 64.0000, H(p,q)-H0 = 0.0000000021833759, L(p,q)-L0 = 0.0000000000000047 -t = 64.1000, H(p,q)-H0 = 0.0000000021857027, L(p,q)-L0 = 0.0000000000000051 -t = 64.2000, H(p,q)-H0 = 0.0000000021871673, L(p,q)-L0 = 0.0000000000000051 -t = 64.3000, H(p,q)-H0 = 0.0000000021881255, L(p,q)-L0 = 0.0000000000000053 -t = 64.4000, H(p,q)-H0 = 0.0000000021887733, L(p,q)-L0 = 0.0000000000000052 -t = 64.5000, H(p,q)-H0 = 0.0000000021892246, L(p,q)-L0 = 0.0000000000000051 -t = 64.6000, H(p,q)-H0 = 0.0000000021895474, L(p,q)-L0 = 0.0000000000000053 -t = 64.7000, H(p,q)-H0 = 0.0000000021897830, L(p,q)-L0 = 0.0000000000000052 -t = 64.8000, H(p,q)-H0 = 0.0000000021899583, L(p,q)-L0 = 0.0000000000000048 -t = 64.9000, H(p,q)-H0 = 0.0000000021900913, L(p,q)-L0 = 0.0000000000000050 -t = 65.0000, H(p,q)-H0 = 0.0000000021901936, L(p,q)-L0 = 0.0000000000000056 -t = 65.1000, H(p,q)-H0 = 0.0000000021902724, L(p,q)-L0 = 0.0000000000000054 -t = 65.2000, H(p,q)-H0 = 0.0000000021903344, L(p,q)-L0 = 0.0000000000000060 -t = 65.3000, H(p,q)-H0 = 0.0000000021903822, L(p,q)-L0 = 0.0000000000000057 -t = 65.4000, H(p,q)-H0 = 0.0000000021904196, L(p,q)-L0 = 0.0000000000000056 -t = 65.5000, H(p,q)-H0 = 0.0000000021904488, L(p,q)-L0 = 0.0000000000000059 -t = 65.6000, H(p,q)-H0 = 0.0000000021904707, L(p,q)-L0 = 0.0000000000000059 -t = 65.7000, H(p,q)-H0 = 0.0000000021904865, L(p,q)-L0 = 0.0000000000000061 -t = 65.8000, H(p,q)-H0 = 0.0000000021904972, L(p,q)-L0 = 0.0000000000000064 -t = 65.9000, H(p,q)-H0 = 0.0000000021905028, L(p,q)-L0 = 0.0000000000000063 -t = 66.0000, H(p,q)-H0 = 0.0000000021905041, L(p,q)-L0 = 0.0000000000000064 -t = 66.1000, H(p,q)-H0 = 0.0000000021905004, L(p,q)-L0 = 0.0000000000000062 -t = 66.2000, H(p,q)-H0 = 0.0000000021904920, L(p,q)-L0 = 0.0000000000000060 -t = 66.3000, H(p,q)-H0 = 0.0000000021904784, L(p,q)-L0 = 0.0000000000000058 -t = 66.4000, H(p,q)-H0 = 0.0000000021904595, L(p,q)-L0 = 0.0000000000000058 -t = 66.5000, H(p,q)-H0 = 0.0000000021904338, L(p,q)-L0 = 0.0000000000000058 -t = 66.6000, H(p,q)-H0 = 0.0000000021904004, L(p,q)-L0 = 0.0000000000000057 -t = 66.7000, H(p,q)-H0 = 0.0000000021903573, L(p,q)-L0 = 0.0000000000000058 -t = 66.8000, H(p,q)-H0 = 0.0000000021903023, L(p,q)-L0 = 0.0000000000000060 -t = 66.9000, H(p,q)-H0 = 0.0000000021902322, L(p,q)-L0 = 0.0000000000000064 -t = 67.0000, H(p,q)-H0 = 0.0000000021901418, L(p,q)-L0 = 0.0000000000000070 -t = 67.1000, H(p,q)-H0 = 0.0000000021900243, L(p,q)-L0 = 0.0000000000000071 -t = 67.2000, H(p,q)-H0 = 0.0000000021898695, L(p,q)-L0 = 0.0000000000000067 -t = 67.3000, H(p,q)-H0 = 0.0000000021896638, L(p,q)-L0 = 0.0000000000000067 -t = 67.4000, H(p,q)-H0 = 0.0000000021893843, L(p,q)-L0 = 0.0000000000000064 -t = 67.5000, H(p,q)-H0 = 0.0000000021889982, L(p,q)-L0 = 0.0000000000000064 -t = 67.6000, H(p,q)-H0 = 0.0000000021884506, L(p,q)-L0 = 0.0000000000000067 -t = 67.7000, H(p,q)-H0 = 0.0000000021876523, L(p,q)-L0 = 0.0000000000000068 -t = 67.8000, H(p,q)-H0 = 0.0000000021864515, L(p,q)-L0 = 0.0000000000000066 -t = 67.9000, H(p,q)-H0 = 0.0000000021845806, L(p,q)-L0 = 0.0000000000000071 -t = 68.0000, H(p,q)-H0 = 0.0000000021815426, L(p,q)-L0 = 0.0000000000000074 -t = 68.1000, H(p,q)-H0 = 0.0000000021763747, L(p,q)-L0 = 0.0000000000000079 -t = 68.2000, H(p,q)-H0 = 0.0000000021671083, L(p,q)-L0 = 0.0000000000000078 -t = 68.3000, H(p,q)-H0 = 0.0000000021494821, L(p,q)-L0 = 0.0000000000000081 -t = 68.4000, H(p,q)-H0 = 0.0000000021136843, L(p,q)-L0 = 0.0000000000000075 -t = 68.5000, H(p,q)-H0 = 0.0000000020357698, L(p,q)-L0 = 0.0000000000000072 -t = 68.6000, H(p,q)-H0 = 0.0000000018546116, L(p,q)-L0 = 0.0000000000000074 -t = 68.7000, H(p,q)-H0 = 0.0000000014149373, L(p,q)-L0 = 0.0000000000000071 -t = 68.8000, H(p,q)-H0 = 0.0000000003847842, L(p,q)-L0 = 0.0000000000000068 -t = 68.9000, H(p,q)-H0 = -0.0000000014401935, L(p,q)-L0 = 0.0000000000000071 -t = 69.0000, H(p,q)-H0 = -0.0000000021500677, L(p,q)-L0 = 0.0000000000000071 -t = 69.1000, H(p,q)-H0 = -0.0000000000822351, L(p,q)-L0 = 0.0000000000000073 -t = 69.2000, H(p,q)-H0 = -0.0000000015604593, L(p,q)-L0 = 0.0000000000000069 -t = 69.3000, H(p,q)-H0 = -0.0000000019817259, L(p,q)-L0 = 0.0000000000000071 -t = 69.4000, H(p,q)-H0 = -0.0000000001246847, L(p,q)-L0 = 0.0000000000000073 -t = 69.5000, H(p,q)-H0 = 0.0000000011766541, L(p,q)-L0 = 0.0000000000000074 -t = 69.6000, H(p,q)-H0 = 0.0000000017576444, L(p,q)-L0 = 0.0000000000000072 -t = 69.7000, H(p,q)-H0 = 0.0000000019959023, L(p,q)-L0 = 0.0000000000000069 -t = 69.8000, H(p,q)-H0 = 0.0000000020963230, L(p,q)-L0 = 0.0000000000000075 -t = 69.9000, H(p,q)-H0 = 0.0000000021413751, L(p,q)-L0 = 0.0000000000000075 -t = 70.0000, H(p,q)-H0 = 0.0000000021630508, L(p,q)-L0 = 0.0000000000000071 -t = 70.1000, H(p,q)-H0 = 0.0000000021742094, L(p,q)-L0 = 0.0000000000000073 -t = 70.2000, H(p,q)-H0 = 0.0000000021803188, L(p,q)-L0 = 0.0000000000000078 -t = 70.3000, H(p,q)-H0 = 0.0000000021838529, L(p,q)-L0 = 0.0000000000000080 -t = 70.4000, H(p,q)-H0 = 0.0000000021859990, L(p,q)-L0 = 0.0000000000000081 -t = 70.5000, H(p,q)-H0 = 0.0000000021873595, L(p,q)-L0 = 0.0000000000000084 -t = 70.6000, H(p,q)-H0 = 0.0000000021882546, L(p,q)-L0 = 0.0000000000000087 -t = 70.7000, H(p,q)-H0 = 0.0000000021888631, L(p,q)-L0 = 0.0000000000000087 -t = 70.8000, H(p,q)-H0 = 0.0000000021892885, L(p,q)-L0 = 0.0000000000000082 -t = 70.9000, H(p,q)-H0 = 0.0000000021895940, L(p,q)-L0 = 0.0000000000000082 -t = 71.0000, H(p,q)-H0 = 0.0000000021898182, L(p,q)-L0 = 0.0000000000000080 -t = 71.1000, H(p,q)-H0 = 0.0000000021899852, L(p,q)-L0 = 0.0000000000000078 -t = 71.2000, H(p,q)-H0 = 0.0000000021901124, L(p,q)-L0 = 0.0000000000000080 -t = 71.3000, H(p,q)-H0 = 0.0000000021902100, L(p,q)-L0 = 0.0000000000000082 -t = 71.4000, H(p,q)-H0 = 0.0000000021902857, L(p,q)-L0 = 0.0000000000000081 -t = 71.5000, H(p,q)-H0 = 0.0000000021903450, L(p,q)-L0 = 0.0000000000000083 -t = 71.6000, H(p,q)-H0 = 0.0000000021903911, L(p,q)-L0 = 0.0000000000000082 -t = 71.7000, H(p,q)-H0 = 0.0000000021904273, L(p,q)-L0 = 0.0000000000000083 -t = 71.8000, H(p,q)-H0 = 0.0000000021904549, L(p,q)-L0 = 0.0000000000000084 -t = 71.9000, H(p,q)-H0 = 0.0000000021904759, L(p,q)-L0 = 0.0000000000000085 -t = 72.0000, H(p,q)-H0 = 0.0000000021904909, L(p,q)-L0 = 0.0000000000000088 -t = 72.1000, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = 0.0000000000000091 -t = 72.2000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = 0.0000000000000089 -t = 72.3000, H(p,q)-H0 = 0.0000000021905058, L(p,q)-L0 = 0.0000000000000088 -t = 72.4000, H(p,q)-H0 = 0.0000000021905017, L(p,q)-L0 = 0.0000000000000085 -t = 72.5000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = 0.0000000000000084 -t = 72.6000, H(p,q)-H0 = 0.0000000021904779, L(p,q)-L0 = 0.0000000000000083 -t = 72.7000, H(p,q)-H0 = 0.0000000021904577, L(p,q)-L0 = 0.0000000000000079 -t = 72.8000, H(p,q)-H0 = 0.0000000021904308, L(p,q)-L0 = 0.0000000000000079 -t = 72.9000, H(p,q)-H0 = 0.0000000021903962, L(p,q)-L0 = 0.0000000000000083 -t = 73.0000, H(p,q)-H0 = 0.0000000021903512, L(p,q)-L0 = 0.0000000000000082 -t = 73.1000, H(p,q)-H0 = 0.0000000021902937, L(p,q)-L0 = 0.0000000000000082 -t = 73.2000, H(p,q)-H0 = 0.0000000021902204, L(p,q)-L0 = 0.0000000000000087 -t = 73.3000, H(p,q)-H0 = 0.0000000021901255, L(p,q)-L0 = 0.0000000000000084 -t = 73.4000, H(p,q)-H0 = 0.0000000021900025, L(p,q)-L0 = 0.0000000000000082 -t = 73.5000, H(p,q)-H0 = 0.0000000021898401, L(p,q)-L0 = 0.0000000000000078 -t = 73.6000, H(p,q)-H0 = 0.0000000021896239, L(p,q)-L0 = 0.0000000000000075 -t = 73.7000, H(p,q)-H0 = 0.0000000021893298, L(p,q)-L0 = 0.0000000000000079 -t = 73.8000, H(p,q)-H0 = 0.0000000021889204, L(p,q)-L0 = 0.0000000000000075 -t = 73.9000, H(p,q)-H0 = 0.0000000021883377, L(p,q)-L0 = 0.0000000000000073 -t = 74.0000, H(p,q)-H0 = 0.0000000021874844, L(p,q)-L0 = 0.0000000000000071 -t = 74.1000, H(p,q)-H0 = 0.0000000021861942, L(p,q)-L0 = 0.0000000000000072 -t = 74.2000, H(p,q)-H0 = 0.0000000021841700, L(p,q)-L0 = 0.0000000000000071 -t = 74.3000, H(p,q)-H0 = 0.0000000021808589, L(p,q)-L0 = 0.0000000000000070 -t = 74.4000, H(p,q)-H0 = 0.0000000021751795, L(p,q)-L0 = 0.0000000000000072 -t = 74.5000, H(p,q)-H0 = 0.0000000021648997, L(p,q)-L0 = 0.0000000000000071 -t = 74.6000, H(p,q)-H0 = 0.0000000021451367, L(p,q)-L0 = 0.0000000000000073 -t = 74.7000, H(p,q)-H0 = 0.0000000021045369, L(p,q)-L0 = 0.0000000000000068 -t = 74.8000, H(p,q)-H0 = 0.0000000020151361, L(p,q)-L0 = 0.0000000000000073 -t = 74.9000, H(p,q)-H0 = 0.0000000018052410, L(p,q)-L0 = 0.0000000000000073 -t = 75.0000, H(p,q)-H0 = 0.0000000012948249, L(p,q)-L0 = 0.0000000000000078 -t = 75.1000, H(p,q)-H0 = 0.0000000001250748, L(p,q)-L0 = 0.0000000000000075 -t = 75.2000, H(p,q)-H0 = -0.0000000017463939, L(p,q)-L0 = 0.0000000000000077 -t = 75.3000, H(p,q)-H0 = -0.0000000018898960, L(p,q)-L0 = 0.0000000000000077 -t = 75.4000, H(p,q)-H0 = 0.0000000000002101, L(p,q)-L0 = 0.0000000000000074 -t = 75.5000, H(p,q)-H0 = -0.0000000019155226, L(p,q)-L0 = 0.0000000000000070 -t = 75.6000, H(p,q)-H0 = -0.0000000017140065, L(p,q)-L0 = 0.0000000000000071 -t = 75.7000, H(p,q)-H0 = 0.0000000001587277, L(p,q)-L0 = 0.0000000000000069 -t = 75.8000, H(p,q)-H0 = 0.0000000013130752, L(p,q)-L0 = 0.0000000000000067 -t = 75.9000, H(p,q)-H0 = 0.0000000018138380, L(p,q)-L0 = 0.0000000000000069 -t = 76.0000, H(p,q)-H0 = 0.0000000020191733, L(p,q)-L0 = 0.0000000000000061 -t = 76.1000, H(p,q)-H0 = 0.0000000021065129, L(p,q)-L0 = 0.0000000000000062 -t = 76.2000, H(p,q)-H0 = 0.0000000021461557, L(p,q)-L0 = 0.0000000000000064 -t = 76.3000, H(p,q)-H0 = 0.0000000021654534, L(p,q)-L0 = 0.0000000000000063 -t = 76.4000, H(p,q)-H0 = 0.0000000021754943, L(p,q)-L0 = 0.0000000000000060 -t = 76.5000, H(p,q)-H0 = 0.0000000021810461, L(p,q)-L0 = 0.0000000000000062 -t = 76.6000, H(p,q)-H0 = 0.0000000021842850, L(p,q)-L0 = 0.0000000000000062 -t = 76.7000, H(p,q)-H0 = 0.0000000021862672, L(p,q)-L0 = 0.0000000000000063 -t = 76.8000, H(p,q)-H0 = 0.0000000021875317, L(p,q)-L0 = 0.0000000000000063 -t = 76.9000, H(p,q)-H0 = 0.0000000021883689, L(p,q)-L0 = 0.0000000000000066 -t = 77.0000, H(p,q)-H0 = 0.0000000021889408, L(p,q)-L0 = 0.0000000000000064 -t = 77.1000, H(p,q)-H0 = 0.0000000021893423, L(p,q)-L0 = 0.0000000000000061 -t = 77.2000, H(p,q)-H0 = 0.0000000021896316, L(p,q)-L0 = 0.0000000000000056 -t = 77.3000, H(p,q)-H0 = 0.0000000021898447, L(p,q)-L0 = 0.0000000000000056 -t = 77.4000, H(p,q)-H0 = 0.0000000021900042, L(p,q)-L0 = 0.0000000000000053 -t = 77.5000, H(p,q)-H0 = 0.0000000021901256, L(p,q)-L0 = 0.0000000000000053 -t = 77.6000, H(p,q)-H0 = 0.0000000021902189, L(p,q)-L0 = 0.0000000000000052 -t = 77.7000, H(p,q)-H0 = 0.0000000021902914, L(p,q)-L0 = 0.0000000000000053 -t = 77.8000, H(p,q)-H0 = 0.0000000021903478, L(p,q)-L0 = 0.0000000000000050 -t = 77.9000, H(p,q)-H0 = 0.0000000021903923, L(p,q)-L0 = 0.0000000000000053 -t = 78.0000, H(p,q)-H0 = 0.0000000021904266, L(p,q)-L0 = 0.0000000000000052 -t = 78.1000, H(p,q)-H0 = 0.0000000021904533, L(p,q)-L0 = 0.0000000000000053 -t = 78.2000, H(p,q)-H0 = 0.0000000021904728, L(p,q)-L0 = 0.0000000000000051 -t = 78.3000, H(p,q)-H0 = 0.0000000021904870, L(p,q)-L0 = 0.0000000000000053 -t = 78.4000, H(p,q)-H0 = 0.0000000021904957, L(p,q)-L0 = 0.0000000000000054 -t = 78.5000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000052 -t = 78.6000, H(p,q)-H0 = 0.0000000021904992, L(p,q)-L0 = 0.0000000000000050 -t = 78.7000, H(p,q)-H0 = 0.0000000021904938, L(p,q)-L0 = 0.0000000000000047 -t = 78.8000, H(p,q)-H0 = 0.0000000021904840, L(p,q)-L0 = 0.0000000000000047 -t = 78.9000, H(p,q)-H0 = 0.0000000021904688, L(p,q)-L0 = 0.0000000000000047 -t = 79.0000, H(p,q)-H0 = 0.0000000021904476, L(p,q)-L0 = 0.0000000000000046 -t = 79.1000, H(p,q)-H0 = 0.0000000021904196, L(p,q)-L0 = 0.0000000000000048 -t = 79.2000, H(p,q)-H0 = 0.0000000021903832, L(p,q)-L0 = 0.0000000000000050 -t = 79.3000, H(p,q)-H0 = 0.0000000021903367, L(p,q)-L0 = 0.0000000000000051 -t = 79.4000, H(p,q)-H0 = 0.0000000021902768, L(p,q)-L0 = 0.0000000000000053 -t = 79.5000, H(p,q)-H0 = 0.0000000021902007, L(p,q)-L0 = 0.0000000000000060 -t = 79.6000, H(p,q)-H0 = 0.0000000021901020, L(p,q)-L0 = 0.0000000000000063 -t = 79.7000, H(p,q)-H0 = 0.0000000021899730, L(p,q)-L0 = 0.0000000000000061 -t = 79.8000, H(p,q)-H0 = 0.0000000021898033, L(p,q)-L0 = 0.0000000000000062 -t = 79.9000, H(p,q)-H0 = 0.0000000021895758, L(p,q)-L0 = 0.0000000000000064 -t = 80.0000, H(p,q)-H0 = 0.0000000021892653, L(p,q)-L0 = 0.0000000000000067 -t = 80.1000, H(p,q)-H0 = 0.0000000021888316, L(p,q)-L0 = 0.0000000000000064 -t = 80.2000, H(p,q)-H0 = 0.0000000021882118, L(p,q)-L0 = 0.0000000000000067 -t = 80.3000, H(p,q)-H0 = 0.0000000021872997, L(p,q)-L0 = 0.0000000000000069 -t = 80.4000, H(p,q)-H0 = 0.0000000021859120, L(p,q)-L0 = 0.0000000000000072 -t = 80.5000, H(p,q)-H0 = 0.0000000021837197, L(p,q)-L0 = 0.0000000000000070 -t = 80.6000, H(p,q)-H0 = 0.0000000021801069, L(p,q)-L0 = 0.0000000000000070 -t = 80.7000, H(p,q)-H0 = 0.0000000021738561, L(p,q)-L0 = 0.0000000000000070 -t = 80.8000, H(p,q)-H0 = 0.0000000021624325, L(p,q)-L0 = 0.0000000000000070 -t = 80.9000, H(p,q)-H0 = 0.0000000021402319, L(p,q)-L0 = 0.0000000000000067 -t = 81.0000, H(p,q)-H0 = 0.0000000020940939, L(p,q)-L0 = 0.0000000000000060 -t = 81.1000, H(p,q)-H0 = 0.0000000019913217, L(p,q)-L0 = 0.0000000000000072 -t = 81.2000, H(p,q)-H0 = 0.0000000017478594, L(p,q)-L0 = 0.0000000000000074 -t = 81.3000, H(p,q)-H0 = 0.0000000011560892, L(p,q)-L0 = 0.0000000000000074 -t = 81.4000, H(p,q)-H0 = -0.0000000001606268, L(p,q)-L0 = 0.0000000000000075 -t = 81.5000, H(p,q)-H0 = -0.0000000020080768, L(p,q)-L0 = 0.0000000000000075 -t = 81.6000, H(p,q)-H0 = -0.0000000015271278, L(p,q)-L0 = 0.0000000000000080 -t = 81.7000, H(p,q)-H0 = -0.0000000000970459, L(p,q)-L0 = 0.0000000000000083 -t = 81.8000, H(p,q)-H0 = -0.0000000021650761, L(p,q)-L0 = 0.0000000000000082 -t = 81.9000, H(p,q)-H0 = -0.0000000014039563, L(p,q)-L0 = 0.0000000000000080 -t = 82.0000, H(p,q)-H0 = 0.0000000004158305, L(p,q)-L0 = 0.0000000000000075 -t = 82.1000, H(p,q)-H0 = 0.0000000014310835, L(p,q)-L0 = 0.0000000000000073 -t = 82.2000, H(p,q)-H0 = 0.0000000018621674, L(p,q)-L0 = 0.0000000000000064 -t = 82.3000, H(p,q)-H0 = 0.0000000020393375, L(p,q)-L0 = 0.0000000000000067 -t = 82.4000, H(p,q)-H0 = 0.0000000021154430, L(p,q)-L0 = 0.0000000000000060 -t = 82.5000, H(p,q)-H0 = 0.0000000021503953, L(p,q)-L0 = 0.0000000000000060 -t = 82.6000, H(p,q)-H0 = 0.0000000021676080, L(p,q)-L0 = 0.0000000000000062 -t = 82.7000, H(p,q)-H0 = 0.0000000021766609, L(p,q)-L0 = 0.0000000000000068 -t = 82.8000, H(p,q)-H0 = 0.0000000021817133, L(p,q)-L0 = 0.0000000000000069 -t = 82.9000, H(p,q)-H0 = 0.0000000021846863, L(p,q)-L0 = 0.0000000000000073 -t = 83.0000, H(p,q)-H0 = 0.0000000021865191, L(p,q)-L0 = 0.0000000000000074 -t = 83.1000, H(p,q)-H0 = 0.0000000021876961, L(p,q)-L0 = 0.0000000000000075 -t = 83.2000, H(p,q)-H0 = 0.0000000021884796, L(p,q)-L0 = 0.0000000000000075 -t = 83.3000, H(p,q)-H0 = 0.0000000021890175, L(p,q)-L0 = 0.0000000000000075 -t = 83.4000, H(p,q)-H0 = 0.0000000021893970, L(p,q)-L0 = 0.0000000000000073 -t = 83.5000, H(p,q)-H0 = 0.0000000021896718, L(p,q)-L0 = 0.0000000000000075 -t = 83.6000, H(p,q)-H0 = 0.0000000021898741, L(p,q)-L0 = 0.0000000000000071 -t = 83.7000, H(p,q)-H0 = 0.0000000021900265, L(p,q)-L0 = 0.0000000000000073 -t = 83.8000, H(p,q)-H0 = 0.0000000021901427, L(p,q)-L0 = 0.0000000000000075 -t = 83.9000, H(p,q)-H0 = 0.0000000021902319, L(p,q)-L0 = 0.0000000000000072 -t = 84.0000, H(p,q)-H0 = 0.0000000021903018, L(p,q)-L0 = 0.0000000000000073 -t = 84.1000, H(p,q)-H0 = 0.0000000021903560, L(p,q)-L0 = 0.0000000000000073 -t = 84.2000, H(p,q)-H0 = 0.0000000021903984, L(p,q)-L0 = 0.0000000000000074 -t = 84.3000, H(p,q)-H0 = 0.0000000021904314, L(p,q)-L0 = 0.0000000000000074 -t = 84.4000, H(p,q)-H0 = 0.0000000021904564, L(p,q)-L0 = 0.0000000000000071 -t = 84.5000, H(p,q)-H0 = 0.0000000021904751, L(p,q)-L0 = 0.0000000000000071 -t = 84.6000, H(p,q)-H0 = 0.0000000021904882, L(p,q)-L0 = 0.0000000000000070 -t = 84.7000, H(p,q)-H0 = 0.0000000021904961, L(p,q)-L0 = 0.0000000000000067 -t = 84.8000, H(p,q)-H0 = 0.0000000021904993, L(p,q)-L0 = 0.0000000000000064 -t = 84.9000, H(p,q)-H0 = 0.0000000021904980, L(p,q)-L0 = 0.0000000000000063 -t = 85.0000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = 0.0000000000000067 -t = 85.1000, H(p,q)-H0 = 0.0000000021904816, L(p,q)-L0 = 0.0000000000000070 -t = 85.2000, H(p,q)-H0 = 0.0000000021904655, L(p,q)-L0 = 0.0000000000000068 -t = 85.3000, H(p,q)-H0 = 0.0000000021904430, L(p,q)-L0 = 0.0000000000000066 -t = 85.4000, H(p,q)-H0 = 0.0000000021904135, L(p,q)-L0 = 0.0000000000000064 -t = 85.5000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000063 -t = 85.6000, H(p,q)-H0 = 0.0000000021903267, L(p,q)-L0 = 0.0000000000000066 -t = 85.7000, H(p,q)-H0 = 0.0000000021902641, L(p,q)-L0 = 0.0000000000000064 -t = 85.8000, H(p,q)-H0 = 0.0000000021901839, L(p,q)-L0 = 0.0000000000000062 -t = 85.9000, H(p,q)-H0 = 0.0000000021900807, L(p,q)-L0 = 0.0000000000000062 -t = 86.0000, H(p,q)-H0 = 0.0000000021899460, L(p,q)-L0 = 0.0000000000000062 -t = 86.1000, H(p,q)-H0 = 0.0000000021897676, L(p,q)-L0 = 0.0000000000000062 -t = 86.2000, H(p,q)-H0 = 0.0000000021895281, L(p,q)-L0 = 0.0000000000000057 -t = 86.3000, H(p,q)-H0 = 0.0000000021892003, L(p,q)-L0 = 0.0000000000000058 -t = 86.4000, H(p,q)-H0 = 0.0000000021887415, L(p,q)-L0 = 0.0000000000000062 -t = 86.5000, H(p,q)-H0 = 0.0000000021880811, L(p,q)-L0 = 0.0000000000000058 -t = 86.6000, H(p,q)-H0 = 0.0000000021871047, L(p,q)-L0 = 0.0000000000000060 -t = 86.7000, H(p,q)-H0 = 0.0000000021856101, L(p,q)-L0 = 0.0000000000000060 -t = 86.8000, H(p,q)-H0 = 0.0000000021832333, L(p,q)-L0 = 0.0000000000000060 -t = 86.9000, H(p,q)-H0 = 0.0000000021792859, L(p,q)-L0 = 0.0000000000000061 -t = 87.0000, H(p,q)-H0 = 0.0000000021723967, L(p,q)-L0 = 0.0000000000000066 -t = 87.1000, H(p,q)-H0 = 0.0000000021596795, L(p,q)-L0 = 0.0000000000000066 -t = 87.2000, H(p,q)-H0 = 0.0000000021346939, L(p,q)-L0 = 0.0000000000000062 -t = 87.3000, H(p,q)-H0 = 0.0000000020821591, L(p,q)-L0 = 0.0000000000000060 -t = 87.4000, H(p,q)-H0 = 0.0000000019638011, L(p,q)-L0 = 0.0000000000000066 -t = 87.5000, H(p,q)-H0 = 0.0000000016811532, L(p,q)-L0 = 0.0000000000000062 -t = 87.6000, H(p,q)-H0 = 0.0000000009964631, L(p,q)-L0 = 0.0000000000000069 -t = 87.7000, H(p,q)-H0 = -0.0000000004693257, L(p,q)-L0 = 0.0000000000000071 -t = 87.8000, H(p,q)-H0 = -0.0000000022005300, L(p,q)-L0 = 0.0000000000000074 -t = 87.9000, H(p,q)-H0 = -0.0000000011032628, L(p,q)-L0 = 0.0000000000000073 -t = 88.0000, H(p,q)-H0 = -0.0000000003564984, L(p,q)-L0 = 0.0000000000000075 -t = 88.1000, H(p,q)-H0 = -0.0000000022895406, L(p,q)-L0 = 0.0000000000000075 -t = 88.2000, H(p,q)-H0 = -0.0000000010732333, L(p,q)-L0 = 0.0000000000000073 -t = 88.3000, H(p,q)-H0 = 0.0000000006458933, L(p,q)-L0 = 0.0000000000000073 -t = 88.4000, H(p,q)-H0 = 0.0000000015328927, L(p,q)-L0 = 0.0000000000000071 -t = 88.5000, H(p,q)-H0 = 0.0000000019037667, L(p,q)-L0 = 0.0000000000000063 -t = 88.6000, H(p,q)-H0 = 0.0000000020568408, L(p,q)-L0 = 0.0000000000000066 -t = 88.7000, H(p,q)-H0 = 0.0000000021232862, L(p,q)-L0 = 0.0000000000000062 -t = 88.8000, H(p,q)-H0 = 0.0000000021541653, L(p,q)-L0 = 0.0000000000000067 -t = 88.9000, H(p,q)-H0 = 0.0000000021695464, L(p,q)-L0 = 0.0000000000000066 -t = 89.0000, H(p,q)-H0 = 0.0000000021777204, L(p,q)-L0 = 0.0000000000000061 -t = 89.1000, H(p,q)-H0 = 0.0000000021823255, L(p,q)-L0 = 0.0000000000000061 -t = 89.2000, H(p,q)-H0 = 0.0000000021850579, L(p,q)-L0 = 0.0000000000000062 -t = 89.3000, H(p,q)-H0 = 0.0000000021867548, L(p,q)-L0 = 0.0000000000000067 -t = 89.4000, H(p,q)-H0 = 0.0000000021878511, L(p,q)-L0 = 0.0000000000000064 -t = 89.5000, H(p,q)-H0 = 0.0000000021885854, L(p,q)-L0 = 0.0000000000000066 -t = 89.6000, H(p,q)-H0 = 0.0000000021890915, L(p,q)-L0 = 0.0000000000000062 -t = 89.7000, H(p,q)-H0 = 0.0000000021894508, L(p,q)-L0 = 0.0000000000000064 -t = 89.8000, H(p,q)-H0 = 0.0000000021897113, L(p,q)-L0 = 0.0000000000000064 -t = 89.9000, H(p,q)-H0 = 0.0000000021899041, L(p,q)-L0 = 0.0000000000000064 -t = 90.0000, H(p,q)-H0 = 0.0000000021900493, L(p,q)-L0 = 0.0000000000000062 -t = 90.1000, H(p,q)-H0 = 0.0000000021901603, L(p,q)-L0 = 0.0000000000000066 -t = 90.2000, H(p,q)-H0 = 0.0000000021902459, L(p,q)-L0 = 0.0000000000000063 -t = 90.3000, H(p,q)-H0 = 0.0000000021903125, L(p,q)-L0 = 0.0000000000000061 -t = 90.4000, H(p,q)-H0 = 0.0000000021903648, L(p,q)-L0 = 0.0000000000000061 -t = 90.5000, H(p,q)-H0 = 0.0000000021904051, L(p,q)-L0 = 0.0000000000000057 -t = 90.6000, H(p,q)-H0 = 0.0000000021904369, L(p,q)-L0 = 0.0000000000000060 -t = 90.7000, H(p,q)-H0 = 0.0000000021904610, L(p,q)-L0 = 0.0000000000000059 -t = 90.8000, H(p,q)-H0 = 0.0000000021904785, L(p,q)-L0 = 0.0000000000000057 -t = 90.9000, H(p,q)-H0 = 0.0000000021904907, L(p,q)-L0 = 0.0000000000000058 -t = 91.0000, H(p,q)-H0 = 0.0000000021904982, L(p,q)-L0 = 0.0000000000000062 -t = 91.1000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = 0.0000000000000064 -t = 91.2000, H(p,q)-H0 = 0.0000000021904987, L(p,q)-L0 = 0.0000000000000062 -t = 91.3000, H(p,q)-H0 = 0.0000000021904919, L(p,q)-L0 = 0.0000000000000062 -t = 91.4000, H(p,q)-H0 = 0.0000000021904804, L(p,q)-L0 = 0.0000000000000062 -t = 91.5000, H(p,q)-H0 = 0.0000000021904631, L(p,q)-L0 = 0.0000000000000060 -t = 91.6000, H(p,q)-H0 = 0.0000000021904401, L(p,q)-L0 = 0.0000000000000066 -t = 91.7000, H(p,q)-H0 = 0.0000000021904093, L(p,q)-L0 = 0.0000000000000064 -t = 91.8000, H(p,q)-H0 = 0.0000000021903700, L(p,q)-L0 = 0.0000000000000070 -t = 91.9000, H(p,q)-H0 = 0.0000000021903192, L(p,q)-L0 = 0.0000000000000070 -t = 92.0000, H(p,q)-H0 = 0.0000000021902540, L(p,q)-L0 = 0.0000000000000068 -t = 92.1000, H(p,q)-H0 = 0.0000000021901703, L(p,q)-L0 = 0.0000000000000064 -t = 92.2000, H(p,q)-H0 = 0.0000000021900621, L(p,q)-L0 = 0.0000000000000060 -t = 92.3000, H(p,q)-H0 = 0.0000000021899208, L(p,q)-L0 = 0.0000000000000058 -t = 92.4000, H(p,q)-H0 = 0.0000000021897337, L(p,q)-L0 = 0.0000000000000056 -t = 92.5000, H(p,q)-H0 = 0.0000000021894817, L(p,q)-L0 = 0.0000000000000056 -t = 92.6000, H(p,q)-H0 = 0.0000000021891347, L(p,q)-L0 = 0.0000000000000049 -t = 92.7000, H(p,q)-H0 = 0.0000000021886470, L(p,q)-L0 = 0.0000000000000047 -t = 92.8000, H(p,q)-H0 = 0.0000000021879436, L(p,q)-L0 = 0.0000000000000051 -t = 92.9000, H(p,q)-H0 = 0.0000000021868976, L(p,q)-L0 = 0.0000000000000054 -t = 93.0000, H(p,q)-H0 = 0.0000000021852867, L(p,q)-L0 = 0.0000000000000056 -t = 93.1000, H(p,q)-H0 = 0.0000000021827063, L(p,q)-L0 = 0.0000000000000053 -t = 93.2000, H(p,q)-H0 = 0.0000000021783869, L(p,q)-L0 = 0.0000000000000056 -t = 93.3000, H(p,q)-H0 = 0.0000000021707803, L(p,q)-L0 = 0.0000000000000056 -t = 93.4000, H(p,q)-H0 = 0.0000000021565990, L(p,q)-L0 = 0.0000000000000059 -t = 93.5000, H(p,q)-H0 = 0.0000000021284249, L(p,q)-L0 = 0.0000000000000057 -t = 93.6000, H(p,q)-H0 = 0.0000000020684887, L(p,q)-L0 = 0.0000000000000062 -t = 93.7000, H(p,q)-H0 = 0.0000000019319482, L(p,q)-L0 = 0.0000000000000066 -t = 93.8000, H(p,q)-H0 = 0.0000000016036170, L(p,q)-L0 = 0.0000000000000066 -t = 93.9000, H(p,q)-H0 = 0.0000000008137360, L(p,q)-L0 = 0.0000000000000066 -t = 94.0000, H(p,q)-H0 = -0.0000000007952332, L(p,q)-L0 = 0.0000000000000069 -t = 94.1000, H(p,q)-H0 = -0.0000000022989144, L(p,q)-L0 = 0.0000000000000069 -t = 94.2000, H(p,q)-H0 = -0.0000000006765102, L(p,q)-L0 = 0.0000000000000072 -t = 94.3000, H(p,q)-H0 = -0.0000000007326133, L(p,q)-L0 = 0.0000000000000073 -t = 94.4000, H(p,q)-H0 = -0.0000000022880635, L(p,q)-L0 = 0.0000000000000074 -t = 94.5000, H(p,q)-H0 = -0.0000000007392544, L(p,q)-L0 = 0.0000000000000073 -t = 94.6000, H(p,q)-H0 = 0.0000000008495653, L(p,q)-L0 = 0.0000000000000071 -t = 94.7000, H(p,q)-H0 = 0.0000000016205666, L(p,q)-L0 = 0.0000000000000070 -t = 94.8000, H(p,q)-H0 = 0.0000000019396070, L(p,q)-L0 = 0.0000000000000075 -t = 94.9000, H(p,q)-H0 = 0.0000000020720623, L(p,q)-L0 = 0.0000000000000071 -t = 95.0000, H(p,q)-H0 = 0.0000000021301885, L(p,q)-L0 = 0.0000000000000073 -t = 95.1000, H(p,q)-H0 = 0.0000000021575211, L(p,q)-L0 = 0.0000000000000068 -t = 95.2000, H(p,q)-H0 = 0.0000000021712909, L(p,q)-L0 = 0.0000000000000067 -t = 95.3000, H(p,q)-H0 = 0.0000000021786840, L(p,q)-L0 = 0.0000000000000063 -t = 95.4000, H(p,q)-H0 = 0.0000000021828877, L(p,q)-L0 = 0.0000000000000064 -t = 95.5000, H(p,q)-H0 = 0.0000000021854019, L(p,q)-L0 = 0.0000000000000068 -t = 95.6000, H(p,q)-H0 = 0.0000000021869742, L(p,q)-L0 = 0.0000000000000069 -t = 95.7000, H(p,q)-H0 = 0.0000000021879971, L(p,q)-L0 = 0.0000000000000070 -t = 95.8000, H(p,q)-H0 = 0.0000000021886853, L(p,q)-L0 = 0.0000000000000073 -t = 95.9000, H(p,q)-H0 = 0.0000000021891625, L(p,q)-L0 = 0.0000000000000073 -t = 96.0000, H(p,q)-H0 = 0.0000000021895025, L(p,q)-L0 = 0.0000000000000073 -t = 96.1000, H(p,q)-H0 = 0.0000000021897497, L(p,q)-L0 = 0.0000000000000072 -t = 96.2000, H(p,q)-H0 = 0.0000000021899338, L(p,q)-L0 = 0.0000000000000071 -t = 96.3000, H(p,q)-H0 = 0.0000000021900726, L(p,q)-L0 = 0.0000000000000072 -t = 96.4000, H(p,q)-H0 = 0.0000000021901789, L(p,q)-L0 = 0.0000000000000075 -t = 96.5000, H(p,q)-H0 = 0.0000000021902609, L(p,q)-L0 = 0.0000000000000072 -t = 96.6000, H(p,q)-H0 = 0.0000000021903250, L(p,q)-L0 = 0.0000000000000072 -t = 96.7000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000070 -t = 96.8000, H(p,q)-H0 = 0.0000000021904141, L(p,q)-L0 = 0.0000000000000068 -t = 96.9000, H(p,q)-H0 = 0.0000000021904440, L(p,q)-L0 = 0.0000000000000064 -t = 97.0000, H(p,q)-H0 = 0.0000000021904670, L(p,q)-L0 = 0.0000000000000064 -t = 97.1000, H(p,q)-H0 = 0.0000000021904837, L(p,q)-L0 = 0.0000000000000063 -t = 97.2000, H(p,q)-H0 = 0.0000000021904951, L(p,q)-L0 = 0.0000000000000066 -t = 97.3000, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = 0.0000000000000062 -t = 97.4000, H(p,q)-H0 = 0.0000000021905035, L(p,q)-L0 = 0.0000000000000069 -t = 97.5000, H(p,q)-H0 = 0.0000000021905008, L(p,q)-L0 = 0.0000000000000071 -t = 97.6000, H(p,q)-H0 = 0.0000000021904931, L(p,q)-L0 = 0.0000000000000069 -t = 97.7000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000071 -t = 97.8000, H(p,q)-H0 = 0.0000000021904627, L(p,q)-L0 = 0.0000000000000070 -t = 97.9000, H(p,q)-H0 = 0.0000000021904382, L(p,q)-L0 = 0.0000000000000070 -t = 98.0000, H(p,q)-H0 = 0.0000000021904062, L(p,q)-L0 = 0.0000000000000070 -t = 98.1000, H(p,q)-H0 = 0.0000000021903646, L(p,q)-L0 = 0.0000000000000066 -t = 98.2000, H(p,q)-H0 = 0.0000000021903119, L(p,q)-L0 = 0.0000000000000068 -t = 98.3000, H(p,q)-H0 = 0.0000000021902442, L(p,q)-L0 = 0.0000000000000070 -t = 98.4000, H(p,q)-H0 = 0.0000000021901572, L(p,q)-L0 = 0.0000000000000069 -t = 98.5000, H(p,q)-H0 = 0.0000000021900445, L(p,q)-L0 = 0.0000000000000070 -t = 98.6000, H(p,q)-H0 = 0.0000000021898964, L(p,q)-L0 = 0.0000000000000068 -t = 98.7000, H(p,q)-H0 = 0.0000000021897003, L(p,q)-L0 = 0.0000000000000070 -t = 98.8000, H(p,q)-H0 = 0.0000000021894348, L(p,q)-L0 = 0.0000000000000071 -t = 98.9000, H(p,q)-H0 = 0.0000000021890686, L(p,q)-L0 = 0.0000000000000071 -t = 99.0000, H(p,q)-H0 = 0.0000000021885515, L(p,q)-L0 = 0.0000000000000070 -t = 99.1000, H(p,q)-H0 = 0.0000000021878013, L(p,q)-L0 = 0.0000000000000070 -t = 99.2000, H(p,q)-H0 = 0.0000000021866788, L(p,q)-L0 = 0.0000000000000071 -t = 99.3000, H(p,q)-H0 = 0.0000000021849398, L(p,q)-L0 = 0.0000000000000071 -t = 99.4000, H(p,q)-H0 = 0.0000000021821350, L(p,q)-L0 = 0.0000000000000070 -t = 99.5000, H(p,q)-H0 = 0.0000000021774016, L(p,q)-L0 = 0.0000000000000068 -t = 99.6000, H(p,q)-H0 = 0.0000000021689899, L(p,q)-L0 = 0.0000000000000067 -t = 99.7000, H(p,q)-H0 = 0.0000000021531459, L(p,q)-L0 = 0.0000000000000064 -t = 99.8000, H(p,q)-H0 = 0.0000000021213139, L(p,q)-L0 = 0.0000000000000060 -t = 99.9000, H(p,q)-H0 = 0.0000000020527962, L(p,q)-L0 = 0.0000000000000059 -t = 100.0000, H(p,q)-H0 = 0.0000000018950277, L(p,q)-L0 = 0.0000000000000062 -Current time = 99.99999999999859 +t = 2.0000, H(p,q)-H0 = 0.0000000021900079, L(p,q)-L0 = -0.0000000000000004 +t = 4.0000, H(p,q)-H0 = 0.0000000021902838, L(p,q)-L0 = -0.0000000000000022 +t = 6.0000, H(p,q)-H0 = -0.0000000001292904, L(p,q)-L0 = -0.0000000000000027 +t = 8.0000, H(p,q)-H0 = 0.0000000021893957, L(p,q)-L0 = -0.0000000000000022 +t = 10.0000, H(p,q)-H0 = 0.0000000021904197, L(p,q)-L0 = -0.0000000000000014 +t = 12.0000, H(p,q)-H0 = 0.0000000019669049, L(p,q)-L0 = -0.0000000000000018 +t = 14.0000, H(p,q)-H0 = 0.0000000021878387, L(p,q)-L0 = -0.0000000000000026 +t = 16.0000, H(p,q)-H0 = 0.0000000021904862, L(p,q)-L0 = -0.0000000000000002 +t = 18.0000, H(p,q)-H0 = 0.0000000021569482, L(p,q)-L0 = 0.0000000000000019 +t = 20.0000, H(p,q)-H0 = 0.0000000021828357, L(p,q)-L0 = 0.0000000000000018 +t = 22.0000, H(p,q)-H0 = 0.0000000021905076, L(p,q)-L0 = 0.0000000000000021 +t = 24.0000, H(p,q)-H0 = 0.0000000021822002, L(p,q)-L0 = 0.0000000000000001 +t = 26.0000, H(p,q)-H0 = 0.0000000021602123, L(p,q)-L0 = -0.0000000000000019 +t = 28.0000, H(p,q)-H0 = 0.0000000021904860, L(p,q)-L0 = -0.0000000000000017 +t = 30.0000, H(p,q)-H0 = 0.0000000021876610, L(p,q)-L0 = -0.0000000000000016 +t = 32.0000, H(p,q)-H0 = 0.0000000019945753, L(p,q)-L0 = -0.0000000000000024 +t = 34.0000, H(p,q)-H0 = 0.0000000021904221, L(p,q)-L0 = -0.0000000000000029 +t = 36.0000, H(p,q)-H0 = 0.0000000021893279, L(p,q)-L0 = -0.0000000000000040 +t = 38.0000, H(p,q)-H0 = 0.0000000001444007, L(p,q)-L0 = -0.0000000000000061 +t = 40.0000, H(p,q)-H0 = 0.0000000021902866, L(p,q)-L0 = -0.0000000000000081 +t = 42.0000, H(p,q)-H0 = 0.0000000021899708, L(p,q)-L0 = -0.0000000000000064 +t = 44.0000, H(p,q)-H0 = -0.0000000000875728, L(p,q)-L0 = -0.0000000000000057 +t = 46.0000, H(p,q)-H0 = 0.0000000021900262, L(p,q)-L0 = -0.0000000000000039 +t = 48.0000, H(p,q)-H0 = 0.0000000021902659, L(p,q)-L0 = -0.0000000000000050 +t = 50.0000, H(p,q)-H0 = -0.0000000004525296, L(p,q)-L0 = -0.0000000000000049 +t = 52.0000, H(p,q)-H0 = 0.0000000021894484, L(p,q)-L0 = -0.0000000000000053 +t = 54.0000, H(p,q)-H0 = 0.0000000021904100, L(p,q)-L0 = -0.0000000000000054 +t = 56.0000, H(p,q)-H0 = 0.0000000019337507, L(p,q)-L0 = -0.0000000000000047 +t = 58.0000, H(p,q)-H0 = 0.0000000021879874, L(p,q)-L0 = -0.0000000000000058 +t = 60.0000, H(p,q)-H0 = 0.0000000021904786, L(p,q)-L0 = -0.0000000000000059 +t = 62.0000, H(p,q)-H0 = 0.0000000021533383, L(p,q)-L0 = -0.0000000000000052 +t = 64.0000, H(p,q)-H0 = 0.0000000021833744, L(p,q)-L0 = -0.0000000000000060 +t = 66.0000, H(p,q)-H0 = 0.0000000021905000, L(p,q)-L0 = -0.0000000000000069 +t = 68.0000, H(p,q)-H0 = 0.0000000021815384, L(p,q)-L0 = -0.0000000000000056 +t = 70.0000, H(p,q)-H0 = 0.0000000021630482, L(p,q)-L0 = -0.0000000000000061 +t = 72.0000, H(p,q)-H0 = 0.0000000021904852, L(p,q)-L0 = -0.0000000000000060 +t = 74.0000, H(p,q)-H0 = 0.0000000021874813, L(p,q)-L0 = -0.0000000000000040 +t = 76.0000, H(p,q)-H0 = 0.0000000020191782, L(p,q)-L0 = -0.0000000000000027 +t = 78.0000, H(p,q)-H0 = 0.0000000021904325, L(p,q)-L0 = -0.0000000000000021 +t = 80.0000, H(p,q)-H0 = 0.0000000021892689, L(p,q)-L0 = -0.0000000000000047 +t = 82.0000, H(p,q)-H0 = 0.0000000004158323, L(p,q)-L0 = -0.0000000000000042 +t = 84.0000, H(p,q)-H0 = 0.0000000021903037, L(p,q)-L0 = -0.0000000000000057 +t = 86.0000, H(p,q)-H0 = 0.0000000021899496, L(p,q)-L0 = -0.0000000000000052 +t = 88.0000, H(p,q)-H0 = -0.0000000003565019, L(p,q)-L0 = -0.0000000000000066 +t = 90.0000, H(p,q)-H0 = 0.0000000021900517, L(p,q)-L0 = -0.0000000000000029 +t = 92.0000, H(p,q)-H0 = 0.0000000021902564, L(p,q)-L0 = -0.0000000000000029 +t = 94.0000, H(p,q)-H0 = -0.0000000007952314, L(p,q)-L0 = -0.0000000000000022 +t = 96.0000, H(p,q)-H0 = 0.0000000021895020, L(p,q)-L0 = -0.0000000000000016 +t = 98.0000, H(p,q)-H0 = 0.0000000021904060, L(p,q)-L0 = -0.0000000000000003 +t = 100.0000, H(p,q)-H0 = 0.0000000018950280, L(p,q)-L0 = -0.0000000000000007 +Current time = 100 Steps = 10000 Step attempts = 10000 Stability limited steps = 0 @@ -1019,7 +70,7 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.01 -Last step size = 0.009999999999948264 -Current step size = 0.009999999999948264 +Last step size = 0.009999999998981926 +Current step size = 0.009999999998981926 f1 RHS fn evals = 40001 f2 RHS fn evals = 40001 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out index 6e0afcf2e3..69b0e7aa30 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out @@ -4,1024 +4,75 @@ Problem Arguments: stepper: 1 step mode: 1 + use tstop: 1 use compensated sums: 0 dt: 0.01 Tf: 100 - nout: 1000 + nout: 50 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 0.1000, H(p,q)-H0 = -0.0000062696796468, L(p,q)-L0 = -0.0000005429998904 -t = 0.2000, H(p,q)-H0 = -0.0001135927952709, L(p,q)-L0 = -0.0000114072371575 -t = 0.3000, H(p,q)-H0 = -0.0001759285155116, L(p,q)-L0 = -0.0000192792884657 -t = 0.4000, H(p,q)-H0 = -0.0002002869125659, L(p,q)-L0 = -0.0000226250387698 -t = 0.5000, H(p,q)-H0 = -0.0002010782201837, L(p,q)-L0 = -0.0000226897917929 -t = 0.6000, H(p,q)-H0 = -0.0002056527160148, L(p,q)-L0 = -0.0000231381327631 -t = 0.7000, H(p,q)-H0 = -0.0002078783396466, L(p,q)-L0 = -0.0000233154338760 -t = 0.8000, H(p,q)-H0 = -0.0002090364664149, L(p,q)-L0 = -0.0000233933147147 -t = 0.9000, H(p,q)-H0 = -0.0002096714693198, L(p,q)-L0 = -0.0000234308138786 -t = 1.0000, H(p,q)-H0 = -0.0002100355398247, L(p,q)-L0 = -0.0000234503491130 -t = 1.1000, H(p,q)-H0 = -0.0002102526487975, L(p,q)-L0 = -0.0000234612354948 -t = 1.2000, H(p,q)-H0 = -0.0002103867255953, L(p,q)-L0 = -0.0000234676638518 -t = 1.3000, H(p,q)-H0 = -0.0002104721456131, L(p,q)-L0 = -0.0000234716549572 -t = 1.4000, H(p,q)-H0 = -0.0002105281006790, L(p,q)-L0 = -0.0000234742438319 -t = 1.5000, H(p,q)-H0 = -0.0002105656766314, L(p,q)-L0 = -0.0000234759892890 -t = 1.6000, H(p,q)-H0 = -0.0002105914779699, L(p,q)-L0 = -0.0000234772073124 -t = 1.7000, H(p,q)-H0 = -0.0002106095513844, L(p,q)-L0 = -0.0000234780840148 -t = 1.8000, H(p,q)-H0 = -0.0002106224404057, L(p,q)-L0 = -0.0000234787330590 -t = 1.9000, H(p,q)-H0 = -0.0002106317812685, L(p,q)-L0 = -0.0000234792261447 -t = 2.0000, H(p,q)-H0 = -0.0002106386489813, L(p,q)-L0 = -0.0000234796098375 -t = 2.1000, H(p,q)-H0 = -0.0002106437634820, L(p,q)-L0 = -0.0000234799151920 -t = 2.2000, H(p,q)-H0 = -0.0002106476153432, L(p,q)-L0 = -0.0000234801634272 -t = 2.3000, H(p,q)-H0 = -0.0002106505440783, L(p,q)-L0 = -0.0000234803693731 -t = 2.4000, H(p,q)-H0 = -0.0002106527878885, L(p,q)-L0 = -0.0000234805436206 -t = 2.5000, H(p,q)-H0 = -0.0002106545158288, L(p,q)-L0 = -0.0000234806938915 -t = 2.6000, H(p,q)-H0 = -0.0002106558489441, L(p,q)-L0 = -0.0000234808259383 -t = 2.7000, H(p,q)-H0 = -0.0002106568743364, L(p,q)-L0 = -0.0000234809441408 -t = 2.8000, H(p,q)-H0 = -0.0002106576546294, L(p,q)-L0 = -0.0000234810519173 -t = 2.9000, H(p,q)-H0 = -0.0002106582343624, L(p,q)-L0 = -0.0000234811520122 -t = 3.0000, H(p,q)-H0 = -0.0002106586442909, L(p,q)-L0 = -0.0000234812467022 -t = 3.1000, H(p,q)-H0 = -0.0002106589042116, L(p,q)-L0 = -0.0000234813379530 -t = 3.2000, H(p,q)-H0 = -0.0002106590246974, L(p,q)-L0 = -0.0000234814275419 -t = 3.3000, H(p,q)-H0 = -0.0002106590079697, L(p,q)-L0 = -0.0000234815171618 -t = 3.4000, H(p,q)-H0 = -0.0002106588480201, L(p,q)-L0 = -0.0000234816085181 -t = 3.5000, H(p,q)-H0 = -0.0002106585299889, L(p,q)-L0 = -0.0000234817034248 -t = 3.6000, H(p,q)-H0 = -0.0002106580287222, L(p,q)-L0 = -0.0000234818039164 -t = 3.7000, H(p,q)-H0 = -0.0002106573063074, L(p,q)-L0 = -0.0000234819123797 -t = 3.8000, H(p,q)-H0 = -0.0002106563082501, L(p,q)-L0 = -0.0000234820317282 -t = 3.9000, H(p,q)-H0 = -0.0002106549577361, L(p,q)-L0 = -0.0000234821656365 -t = 4.0000, H(p,q)-H0 = -0.0002106531471080, L(p,q)-L0 = -0.0000234823188732 -t = 4.1000, H(p,q)-H0 = -0.0002106507251770, L(p,q)-L0 = -0.0000234824977813 -t = 4.2000, H(p,q)-H0 = -0.0002106474781862, L(p,q)-L0 = -0.0000234827109934 -t = 4.3000, H(p,q)-H0 = -0.0002106431009092, L(p,q)-L0 = -0.0000234829705201 -t = 4.4000, H(p,q)-H0 = -0.0002106371521462, L(p,q)-L0 = -0.0000234832934438 -t = 4.5000, H(p,q)-H0 = -0.0002106289850994, L(p,q)-L0 = -0.0000234837046210 -t = 4.6000, H(p,q)-H0 = -0.0002106176365483, L(p,q)-L0 = -0.0000234842411053 -t = 4.7000, H(p,q)-H0 = -0.0002106016471730, L(p,q)-L0 = -0.0000234849595961 -t = 4.8000, H(p,q)-H0 = -0.0002105787645791, L(p,q)-L0 = -0.0000234859493718 -t = 4.9000, H(p,q)-H0 = -0.0002105454426794, L(p,q)-L0 = -0.0000234873555242 -t = 5.0000, H(p,q)-H0 = -0.0002104959812197, L(p,q)-L0 = -0.0000234894223092 -t = 5.1000, H(p,q)-H0 = -0.0002104210202308, L(p,q)-L0 = -0.0000234925775160 -t = 5.2000, H(p,q)-H0 = -0.0002103048702212, L(p,q)-L0 = -0.0000234976045969 -t = 5.3000, H(p,q)-H0 = -0.0002101207619831, L(p,q)-L0 = -0.0000235060130325 -t = 5.4000, H(p,q)-H0 = -0.0002098225630768, L(p,q)-L0 = -0.0000235208843751 -t = 5.5000, H(p,q)-H0 = -0.0002093314638612, L(p,q)-L0 = -0.0000235489396382 -t = 5.6000, H(p,q)-H0 = -0.0002085202913832, L(p,q)-L0 = -0.0000236059866302 -t = 5.7000, H(p,q)-H0 = -0.0002072234833019, L(p,q)-L0 = -0.0000237325104756 -t = 5.8000, H(p,q)-H0 = -0.0002054116656489, L(p,q)-L0 = -0.0000240423246145 -t = 5.9000, H(p,q)-H0 = -0.0002040036888862, L(p,q)-L0 = -0.0000248869028331 -t = 6.0000, H(p,q)-H0 = -0.0002066492483566, L(p,q)-L0 = -0.0000274341568969 -t = 6.1000, H(p,q)-H0 = -0.0002146405945813, L(p,q)-L0 = -0.0000355555994543 -t = 6.2000, H(p,q)-H0 = -0.0002169176332283, L(p,q)-L0 = -0.0000596238468652 -t = 6.3000, H(p,q)-H0 = -0.0004117452639090, L(p,q)-L0 = -0.0001107536901481 -t = 6.4000, H(p,q)-H0 = -0.0008766427360893, L(p,q)-L0 = -0.0001668008722370 -t = 6.5000, H(p,q)-H0 = -0.0010430569247366, L(p,q)-L0 = -0.0001854585430967 -t = 6.6000, H(p,q)-H0 = -0.0010546535311935, L(p,q)-L0 = -0.0001867028107823 -t = 6.7000, H(p,q)-H0 = -0.0010774137233291, L(p,q)-L0 = -0.0001898389637827 -t = 6.8000, H(p,q)-H0 = -0.0010861348047309, L(p,q)-L0 = -0.0001908581053202 -t = 6.9000, H(p,q)-H0 = -0.0010900605315678, L(p,q)-L0 = -0.0001912266174271 -t = 7.0000, H(p,q)-H0 = -0.0010920005408979, L(p,q)-L0 = -0.0001913757210377 -t = 7.1000, H(p,q)-H0 = -0.0010930217358297, L(p,q)-L0 = -0.0001914425565277 -t = 7.2000, H(p,q)-H0 = -0.0010935870793521, L(p,q)-L0 = -0.0001914753045394 -t = 7.3000, H(p,q)-H0 = -0.0010939139594537, L(p,q)-L0 = -0.0001914926220660 -t = 7.4000, H(p,q)-H0 = -0.0010941103567657, L(p,q)-L0 = -0.0001915023977180 -t = 7.5000, H(p,q)-H0 = -0.0010942324552590, L(p,q)-L0 = -0.0001915082350198 -t = 7.6000, H(p,q)-H0 = -0.0010943107083297, L(p,q)-L0 = -0.0001915118947599 -t = 7.7000, H(p,q)-H0 = -0.0010943622417681, L(p,q)-L0 = -0.0001915142893028 -t = 7.8000, H(p,q)-H0 = -0.0010943970132706, L(p,q)-L0 = -0.0001915159162691 -t = 7.9000, H(p,q)-H0 = -0.0010944209907731, L(p,q)-L0 = -0.0001915170595739 -t = 8.0000, H(p,q)-H0 = -0.0010944378508272, L(p,q)-L0 = -0.0001915178877776 -t = 8.1000, H(p,q)-H0 = -0.0010944499157366, L(p,q)-L0 = -0.0001915185045589 -t = 8.2000, H(p,q)-H0 = -0.0010944586861276, L(p,q)-L0 = -0.0001915189757391 -t = 8.3000, H(p,q)-H0 = -0.0010944651519293, L(p,q)-L0 = -0.0001915193443178 -t = 8.4000, H(p,q)-H0 = -0.0010944699785398, L(p,q)-L0 = -0.0001915196391242 -t = 8.5000, H(p,q)-H0 = -0.0010944736208596, L(p,q)-L0 = -0.0001915198799560 -t = 8.6000, H(p,q)-H0 = -0.0010944763946228, L(p,q)-L0 = -0.0001915200807163 -t = 8.7000, H(p,q)-H0 = -0.0010944785218818, L(p,q)-L0 = -0.0001915202513803 -t = 8.8000, H(p,q)-H0 = -0.0010944801605186, L(p,q)-L0 = -0.0001915203992561 -t = 8.9000, H(p,q)-H0 = -0.0010944814236866, L(p,q)-L0 = -0.0001915205298145 -t = 9.0000, H(p,q)-H0 = -0.0010944823927834, L(p,q)-L0 = -0.0001915206472463 -t = 9.1000, H(p,q)-H0 = -0.0010944831261832, L(p,q)-L0 = -0.0001915207548424 -t = 9.2000, H(p,q)-H0 = -0.0010944836651313, L(p,q)-L0 = -0.0001915208552671 -t = 9.3000, H(p,q)-H0 = -0.0010944840376905, L(p,q)-L0 = -0.0001915209507526 -t = 9.4000, H(p,q)-H0 = -0.0010944842612949, L(p,q)-L0 = -0.0001915210432497 -t = 9.5000, H(p,q)-H0 = -0.0010944843442663, L(p,q)-L0 = -0.0001915211345465 -t = 9.6000, H(p,q)-H0 = -0.0010944842864822, L(p,q)-L0 = -0.0001915212263734 -t = 9.7000, H(p,q)-H0 = -0.0010944840792847, L(p,q)-L0 = -0.0001915213205018 -t = 9.8000, H(p,q)-H0 = -0.0010944837046116, L(p,q)-L0 = -0.0001915214188469 -t = 9.9000, H(p,q)-H0 = -0.0010944831332337, L(p,q)-L0 = -0.0001915215235870 -t = 10.0000, H(p,q)-H0 = -0.0010944823218577, L(p,q)-L0 = -0.0001915216373113 -t = 10.1000, H(p,q)-H0 = -0.0010944812086856, L(p,q)-L0 = -0.0001915217632142 -t = 10.2000, H(p,q)-H0 = -0.0010944797067785, L(p,q)-L0 = -0.0001915219053650 -t = 10.3000, H(p,q)-H0 = -0.0010944776941881, L(p,q)-L0 = -0.0001915220690886 -t = 10.4000, H(p,q)-H0 = -0.0010944749992298, L(p,q)-L0 = -0.0001915222615247 -t = 10.5000, H(p,q)-H0 = -0.0010944713782886, L(p,q)-L0 = -0.0001915224924662 -t = 10.6000, H(p,q)-H0 = -0.0010944664819517, L(p,q)-L0 = -0.0001915227756430 -t = 10.7000, H(p,q)-H0 = -0.0010944598025584, L(p,q)-L0 = -0.0001915231307398 -t = 10.8000, H(p,q)-H0 = -0.0010944505916284, L(p,q)-L0 = -0.0001915235866442 -t = 10.9000, H(p,q)-H0 = -0.0010944377275457, L(p,q)-L0 = -0.0001915241868180 -t = 11.0000, H(p,q)-H0 = -0.0010944194995262, L(p,q)-L0 = -0.0001915249984384 -t = 11.1000, H(p,q)-H0 = -0.0010943932479631, L(p,q)-L0 = -0.0001915261284662 -t = 11.2000, H(p,q)-H0 = -0.0010943547537499, L(p,q)-L0 = -0.0001915277529010 -t = 11.3000, H(p,q)-H0 = -0.0010942971814794, L(p,q)-L0 = -0.0001915301721849 -t = 11.4000, H(p,q)-H0 = -0.0010942092200645, L(p,q)-L0 = -0.0001915339208459 -t = 11.5000, H(p,q)-H0 = -0.0010940717765956, L(p,q)-L0 = -0.0001915399954439 -t = 11.6000, H(p,q)-H0 = -0.0010938521164288, L(p,q)-L0 = -0.0001915503555203 -t = 11.7000, H(p,q)-H0 = -0.0010934938446772, L(p,q)-L0 = -0.0001915690955830 -t = 11.8000, H(p,q)-H0 = -0.0010929018695994, L(p,q)-L0 = -0.0001916053866893 -t = 11.9000, H(p,q)-H0 = -0.0010919301339142, L(p,q)-L0 = -0.0001916814602209 -t = 12.0000, H(p,q)-H0 = -0.0010904250859533, L(p,q)-L0 = -0.0001918561922067 -t = 12.1000, H(p,q)-H0 = -0.0010885553641629, L(p,q)-L0 = -0.0001923010000755 -t = 12.2000, H(p,q)-H0 = -0.0010880452291475, L(p,q)-L0 = -0.0001935618958890 -t = 12.3000, H(p,q)-H0 = -0.0010933477301296, L(p,q)-L0 = -0.0001974749970777 -t = 12.4000, H(p,q)-H0 = -0.0010988839970971, L(p,q)-L0 = -0.0002098677980509 -t = 12.5000, H(p,q)-H0 = -0.0011269529114526, L(p,q)-L0 = -0.0002435572977308 -t = 12.6000, H(p,q)-H0 = -0.0014674817932647, L(p,q)-L0 = -0.0003014305068376 -t = 12.7000, H(p,q)-H0 = -0.0018211687157268, L(p,q)-L0 = -0.0003411270398648 -t = 12.8000, H(p,q)-H0 = -0.0018291083670114, L(p,q)-L0 = -0.0003417679657713 -t = 12.9000, H(p,q)-H0 = -0.0018329503623904, L(p,q)-L0 = -0.0003421547651702 -t = 13.0000, H(p,q)-H0 = -0.0018485323457278, L(p,q)-L0 = -0.0003442038229382 -t = 13.1000, H(p,q)-H0 = -0.0018549362001028, L(p,q)-L0 = -0.0003448950974303 -t = 13.2000, H(p,q)-H0 = -0.0018579364174628, L(p,q)-L0 = -0.0003451559459211 -t = 13.3000, H(p,q)-H0 = -0.0018594573893078, L(p,q)-L0 = -0.0003452657716745 -t = 13.4000, H(p,q)-H0 = -0.0018602739306338, L(p,q)-L0 = -0.0003453167475367 -t = 13.5000, H(p,q)-H0 = -0.0018607336182570, L(p,q)-L0 = -0.0003453424840643 -t = 13.6000, H(p,q)-H0 = -0.0018610033607634, L(p,q)-L0 = -0.0003453564475209 -t = 13.7000, H(p,q)-H0 = -0.0018611675684923, L(p,q)-L0 = -0.0003453645057516 -t = 13.8000, H(p,q)-H0 = -0.0018612708551833, L(p,q)-L0 = -0.0003453694105353 -t = 13.9000, H(p,q)-H0 = -0.0018613377455846, L(p,q)-L0 = -0.0003453725375925 -t = 14.0000, H(p,q)-H0 = -0.0018613822084146, L(p,q)-L0 = -0.0003453746141515 -t = 14.1000, H(p,q)-H0 = -0.0018614124602533, L(p,q)-L0 = -0.0003453760438756 -t = 14.2000, H(p,q)-H0 = -0.0018614334775717, L(p,q)-L0 = -0.0003453770606663 -t = 14.3000, H(p,q)-H0 = -0.0018614483555500, L(p,q)-L0 = -0.0003453778053157 -t = 14.4000, H(p,q)-H0 = -0.0018614590663113, L(p,q)-L0 = -0.0003453783654941 -t = 14.5000, H(p,q)-H0 = -0.0018614668942953, L(p,q)-L0 = -0.0003453787974823 -t = 14.6000, H(p,q)-H0 = -0.0018614726929026, L(p,q)-L0 = -0.0003453791384194 -t = 14.7000, H(p,q)-H0 = -0.0018614770394814, L(p,q)-L0 = -0.0003453794134385 -t = 14.8000, H(p,q)-H0 = -0.0018614803310230, L(p,q)-L0 = -0.0003453796399498 -t = 14.9000, H(p,q)-H0 = -0.0018614828444614, L(p,q)-L0 = -0.0003453798302816 -t = 15.0000, H(p,q)-H0 = -0.0018614847753803, L(p,q)-L0 = -0.0003453799933509 -t = 15.1000, H(p,q)-H0 = -0.0018614862632728, L(p,q)-L0 = -0.0003453801357464 -t = 15.2000, H(p,q)-H0 = -0.0018614874082644, L(p,q)-L0 = -0.0003453802624437 -t = 15.3000, H(p,q)-H0 = -0.0018614882823109, L(p,q)-L0 = -0.0003453803772917 -t = 15.4000, H(p,q)-H0 = -0.0018614889367469, L(p,q)-L0 = -0.0003453804833496 -t = 15.5000, H(p,q)-H0 = -0.0018614894073659, L(p,q)-L0 = -0.0003453805831282 -t = 15.6000, H(p,q)-H0 = -0.0018614897177854, L(p,q)-L0 = -0.0003453806787665 -t = 15.7000, H(p,q)-H0 = -0.0018614898815636, L(p,q)-L0 = -0.0003453807721731 -t = 15.8000, H(p,q)-H0 = -0.0018614899033522, L(p,q)-L0 = -0.0003453808651371 -t = 15.9000, H(p,q)-H0 = -0.0018614897792327, L(p,q)-L0 = -0.0003453809594340 -t = 16.0000, H(p,q)-H0 = -0.0018614894962796, L(p,q)-L0 = -0.0003453810569265 -t = 16.1000, H(p,q)-H0 = -0.0018614890312849, L(p,q)-L0 = -0.0003453811596765 -t = 16.2000, H(p,q)-H0 = -0.0018614883484740, L(p,q)-L0 = -0.0003453812700795 -t = 16.3000, H(p,q)-H0 = -0.0018614873958954, L(p,q)-L0 = -0.0003453813910341 -t = 16.4000, H(p,q)-H0 = -0.0018614860999633, L(p,q)-L0 = -0.0003453815261732 -t = 16.5000, H(p,q)-H0 = -0.0018614843573266, L(p,q)-L0 = -0.0003453816801865 -t = 16.6000, H(p,q)-H0 = -0.0018614820227592, L(p,q)-L0 = -0.0003453818592847 -t = 16.7000, H(p,q)-H0 = -0.0018614788909996, L(p,q)-L0 = -0.0003453820718907 -t = 16.8000, H(p,q)-H0 = -0.0018614746692118, L(p,q)-L0 = -0.0003453823296833 -t = 16.9000, H(p,q)-H0 = -0.0018614689346489, L(p,q)-L0 = -0.0003453826492192 -t = 17.0000, H(p,q)-H0 = -0.0018614610685390, L(p,q)-L0 = -0.0003453830545128 -t = 17.1000, H(p,q)-H0 = -0.0018614501510690, L(p,q)-L0 = -0.0003453835812437 -t = 17.2000, H(p,q)-H0 = -0.0018614347914931, L(p,q)-L0 = -0.0003453842838139 -t = 17.3000, H(p,q)-H0 = -0.0018614128479901, L(p,q)-L0 = -0.0003453852475582 -t = 17.4000, H(p,q)-H0 = -0.0018613809565386, L(p,q)-L0 = -0.0003453866105798 -t = 17.5000, H(p,q)-H0 = -0.0018613337230237, L(p,q)-L0 = -0.0003453886042962 -t = 17.6000, H(p,q)-H0 = -0.0018612623126402, L(p,q)-L0 = -0.0003453916319220 -t = 17.7000, H(p,q)-H0 = -0.0018611519521051, L(p,q)-L0 = -0.0003453964276342 -t = 17.8000, H(p,q)-H0 = -0.0018609774852931, L(p,q)-L0 = -0.0003454043967241 -t = 17.9000, H(p,q)-H0 = -0.0018606955942646, L(p,q)-L0 = -0.0003454183867333 -t = 18.0000, H(p,q)-H0 = -0.0018602321179333, L(p,q)-L0 = -0.0003454445557470 -t = 18.1000, H(p,q)-H0 = -0.0018594661508811, L(p,q)-L0 = -0.0003454972484257 -t = 18.2000, H(p,q)-H0 = -0.0018582336849553, L(p,q)-L0 = -0.0003456128075078 -t = 18.3000, H(p,q)-H0 = -0.0018564683218352, L(p,q)-L0 = -0.0003458922196216 -t = 18.4000, H(p,q)-H0 = -0.0018548998635801, L(p,q)-L0 = -0.0003466438794800 -t = 18.5000, H(p,q)-H0 = -0.0018568018450045, L(p,q)-L0 = -0.0003488852532501 -t = 18.6000, H(p,q)-H0 = -0.0018647475749838, L(p,q)-L0 = -0.0003560090162371 -t = 18.7000, H(p,q)-H0 = -0.0018656959644174, L(p,q)-L0 = -0.0003774915058423 -t = 18.8000, H(p,q)-H0 = -0.0020182282358414, L(p,q)-L0 = -0.0004256800568112 -t = 18.9000, H(p,q)-H0 = -0.0024790485475783, L(p,q)-L0 = -0.0004833354961167 -t = 19.0000, H(p,q)-H0 = -0.0026441750612420, L(p,q)-L0 = -0.0005013384015580 -t = 19.1000, H(p,q)-H0 = -0.0026602892625991, L(p,q)-L0 = -0.0005030841819079 -t = 19.2000, H(p,q)-H0 = -0.0026861432928482, L(p,q)-L0 = -0.0005066833196889 -t = 19.3000, H(p,q)-H0 = -0.0026958120873084, L(p,q)-L0 = -0.0005078422742242 -t = 19.4000, H(p,q)-H0 = -0.0027001015531652, L(p,q)-L0 = -0.0005082562701093 -t = 19.5000, H(p,q)-H0 = -0.0027022025689444, L(p,q)-L0 = -0.0005084218084530 -t = 19.6000, H(p,q)-H0 = -0.0027033013086656, L(p,q)-L0 = -0.0005084952385246 -t = 19.7000, H(p,q)-H0 = -0.0027039062867852, L(p,q)-L0 = -0.0005085308966847 -t = 19.8000, H(p,q)-H0 = -0.0027042544314777, L(p,q)-L0 = -0.0005085496103345 -t = 19.9000, H(p,q)-H0 = -0.0027044627302788, L(p,q)-L0 = -0.0005085601062749 -t = 20.0000, H(p,q)-H0 = -0.0027045917457975, L(p,q)-L0 = -0.0005085663394765 -t = 20.1000, H(p,q)-H0 = -0.0027046741573683, L(p,q)-L0 = -0.0005085702292218 -t = 20.2000, H(p,q)-H0 = -0.0027047282681847, L(p,q)-L0 = -0.0005085727640877 -t = 20.3000, H(p,q)-H0 = -0.0027047646815265, L(p,q)-L0 = -0.0005085744804718 -t = 20.4000, H(p,q)-H0 = -0.0027047897311039, L(p,q)-L0 = -0.0005085756830288 -t = 20.5000, H(p,q)-H0 = -0.0027048073070048, L(p,q)-L0 = -0.0005085765519144 -t = 20.6000, H(p,q)-H0 = -0.0027048198596485, L(p,q)-L0 = -0.0005085771975512 -t = 20.7000, H(p,q)-H0 = -0.0027048289684720, L(p,q)-L0 = -0.0005085776898252 -t = 20.8000, H(p,q)-H0 = -0.0027048356730022, L(p,q)-L0 = -0.0005085780742647 -t = 20.9000, H(p,q)-H0 = -0.0027048406705076, L(p,q)-L0 = -0.0005085783813203 -t = 21.0000, H(p,q)-H0 = -0.0027048444367570, L(p,q)-L0 = -0.0005085786318568 -t = 21.1000, H(p,q)-H0 = -0.0027048473013811, L(p,q)-L0 = -0.0005085788404975 -t = 21.2000, H(p,q)-H0 = -0.0027048494958251, L(p,q)-L0 = -0.0005085790177164 -t = 21.3000, H(p,q)-H0 = -0.0027048511843949, L(p,q)-L0 = -0.0005085791711745 -t = 21.4000, H(p,q)-H0 = -0.0027048524846762, L(p,q)-L0 = -0.0005085793065996 -t = 21.5000, H(p,q)-H0 = -0.0027048534811320, L(p,q)-L0 = -0.0005085794283737 -t = 21.6000, H(p,q)-H0 = -0.0027048542342416, L(p,q)-L0 = -0.0005085795399357 -t = 21.7000, H(p,q)-H0 = -0.0027048547866578, L(p,q)-L0 = -0.0005085796440673 -t = 21.8000, H(p,q)-H0 = -0.0027048551673203, L(p,q)-L0 = -0.0005085797430993 -t = 21.9000, H(p,q)-H0 = -0.0027048553941125, L(p,q)-L0 = -0.0005085798390698 -t = 22.0000, H(p,q)-H0 = -0.0027048554754254, L(p,q)-L0 = -0.0005085799338481 -t = 22.1000, H(p,q)-H0 = -0.0027048554108372, L(p,q)-L0 = -0.0005085800292474 -t = 22.2000, H(p,q)-H0 = -0.0027048551909873, L(p,q)-L0 = -0.0005085801271273 -t = 22.3000, H(p,q)-H0 = -0.0027048547966326, L(p,q)-L0 = -0.0005085802295034 -t = 22.4000, H(p,q)-H0 = -0.0027048541967503, L(p,q)-L0 = -0.0005085803386752 -t = 22.5000, H(p,q)-H0 = -0.0027048533454305, L(p,q)-L0 = -0.0005085804573840 -t = 22.6000, H(p,q)-H0 = -0.0027048521771140, L(p,q)-L0 = -0.0005085805890219 -t = 22.7000, H(p,q)-H0 = -0.0027048505994641, L(p,q)-L0 = -0.0005085807379221 -t = 22.8000, H(p,q)-H0 = -0.0027048484827537, L(p,q)-L0 = -0.0005085809097725 -t = 22.9000, H(p,q)-H0 = -0.0027048456439869, L(p,q)-L0 = -0.0005085811122224 -t = 23.0000, H(p,q)-H0 = -0.0027048418229105, L(p,q)-L0 = -0.0005085813557973 -t = 23.1000, H(p,q)-H0 = -0.0027048366453082, L(p,q)-L0 = -0.0005085816553043 -t = 23.2000, H(p,q)-H0 = -0.0027048295659814, L(p,q)-L0 = -0.0005085820320510 -t = 23.3000, H(p,q)-H0 = -0.0027048197786954, L(p,q)-L0 = -0.0005085825174312 -t = 23.4000, H(p,q)-H0 = -0.0027048060713872, L(p,q)-L0 = -0.0005085831588867 -t = 23.5000, H(p,q)-H0 = -0.0027047865889311, L(p,q)-L0 = -0.0005085840301058 -t = 23.6000, H(p,q)-H0 = -0.0027047584367719, L(p,q)-L0 = -0.0005085852490599 -t = 23.7000, H(p,q)-H0 = -0.0027047170055611, L(p,q)-L0 = -0.0005085870110634 -t = 23.8000, H(p,q)-H0 = -0.0027046547987080, L(p,q)-L0 = -0.0005085896518540 -t = 23.9000, H(p,q)-H0 = -0.0027045593647116, L(p,q)-L0 = -0.0005085937734841 -t = 24.0000, H(p,q)-H0 = -0.0027044096189748, L(p,q)-L0 = -0.0005086005085452 -t = 24.1000, H(p,q)-H0 = -0.0027041693491044, L(p,q)-L0 = -0.0005086121071035 -t = 24.2000, H(p,q)-H0 = -0.0027037762713912, L(p,q)-L0 = -0.0005086333265301 -t = 24.3000, H(p,q)-H0 = -0.0027031264217569, L(p,q)-L0 = -0.0005086749673004 -t = 24.4000, H(p,q)-H0 = -0.0027020657653758, L(p,q)-L0 = -0.0005087636128355 -t = 24.5000, H(p,q)-H0 = -0.0027004604009702, L(p,q)-L0 = -0.0005089708504893 -t = 24.6000, H(p,q)-H0 = -0.0026986357719079, L(p,q)-L0 = -0.0005095086527398 -t = 24.7000, H(p,q)-H0 = -0.0026988278673472, L(p,q)-L0 = -0.0005110612230143 -t = 24.8000, H(p,q)-H0 = -0.0027053786719118, L(p,q)-L0 = -0.0005159293073538 -t = 24.9000, H(p,q)-H0 = -0.0027085983972137, L(p,q)-L0 = -0.0005311524612439 -t = 25.0000, H(p,q)-H0 = -0.0027683766088034, L(p,q)-L0 = -0.0005701238068577 -t = 25.1000, H(p,q)-H0 = -0.0031695148176025, L(p,q)-L0 = -0.0006292818027249 -t = 25.2000, H(p,q)-H0 = -0.0034110271414587, L(p,q)-L0 = -0.0006555137140452 -t = 25.3000, H(p,q)-H0 = -0.0034282711991802, L(p,q)-L0 = -0.0006571965274131 -t = 25.4000, H(p,q)-H0 = -0.0034658864457926, L(p,q)-L0 = -0.0006625039103769 -t = 25.5000, H(p,q)-H0 = -0.0034789533079216, L(p,q)-L0 = -0.0006641721068398 -t = 25.6000, H(p,q)-H0 = -0.0034844871738191, L(p,q)-L0 = -0.0006647468289152 -t = 25.7000, H(p,q)-H0 = -0.0034871244965118, L(p,q)-L0 = -0.0006649684770003 -t = 25.8000, H(p,q)-H0 = -0.0034884771046654, L(p,q)-L0 = -0.0006650636647787 -t = 25.9000, H(p,q)-H0 = -0.0034892100680847, L(p,q)-L0 = -0.0006651086143324 -t = 26.0000, H(p,q)-H0 = -0.0034896260506707, L(p,q)-L0 = -0.0006651316471397 -t = 26.1000, H(p,q)-H0 = -0.0034898718989165, L(p,q)-L0 = -0.0006651443041876 -t = 26.2000, H(p,q)-H0 = -0.0034900225163956, L(p,q)-L0 = -0.0006651516898012 -t = 26.3000, H(p,q)-H0 = -0.0034901177937515, L(p,q)-L0 = -0.0006651562289874 -t = 26.4000, H(p,q)-H0 = -0.0034901798101881, L(p,q)-L0 = -0.0006651591479252 -t = 26.5000, H(p,q)-H0 = -0.0034902212199680, L(p,q)-L0 = -0.0006651611012674 -t = 26.6000, H(p,q)-H0 = -0.0034902495086671, L(p,q)-L0 = -0.0006651624555913 -t = 26.7000, H(p,q)-H0 = -0.0034902692333419, L(p,q)-L0 = -0.0006651634249686 -t = 26.8000, H(p,q)-H0 = -0.0034902832415543, L(p,q)-L0 = -0.0006651641391544 -t = 26.9000, H(p,q)-H0 = -0.0034902933553485, L(p,q)-L0 = -0.0006651646794552 -t = 27.0000, H(p,q)-H0 = -0.0034903007659777, L(p,q)-L0 = -0.0006651650983650 -t = 27.1000, H(p,q)-H0 = -0.0034903062676729, L(p,q)-L0 = -0.0006651654307063 -t = 27.2000, H(p,q)-H0 = -0.0034903103994157, L(p,q)-L0 = -0.0006651657001612 -t = 27.3000, H(p,q)-H0 = -0.0034903135328193, L(p,q)-L0 = -0.0006651659232111 -t = 27.4000, H(p,q)-H0 = -0.0034903159277001, L(p,q)-L0 = -0.0006651661115814 -t = 27.5000, H(p,q)-H0 = -0.0034903177678589, L(p,q)-L0 = -0.0006651662737929 -t = 27.6000, H(p,q)-H0 = -0.0034903191844959, L(p,q)-L0 = -0.0006651664161734 -t = 27.7000, H(p,q)-H0 = -0.0034903202717431, L(p,q)-L0 = -0.0006651665435291 -t = 27.8000, H(p,q)-H0 = -0.0034903210970733, L(p,q)-L0 = -0.0006651666596035 -t = 27.9000, H(p,q)-H0 = -0.0034903217083071, L(p,q)-L0 = -0.0006651667673970 -t = 28.0000, H(p,q)-H0 = -0.0034903221383109, L(p,q)-L0 = -0.0006651668693980 -t = 28.1000, H(p,q)-H0 = -0.0034903224080635, L(p,q)-L0 = -0.0006651669677552 -t = 28.2000, H(p,q)-H0 = -0.0034903225285250, L(p,q)-L0 = -0.0006651670644148 -t = 28.3000, H(p,q)-H0 = -0.0034903225015527, L(p,q)-L0 = -0.0006651671612359 -t = 28.4000, H(p,q)-H0 = -0.0034903223199827, L(p,q)-L0 = -0.0006651672600979 -t = 28.5000, H(p,q)-H0 = -0.0034903219668829, L(p,q)-L0 = -0.0006651673630116 -t = 28.6000, H(p,q)-H0 = -0.0034903214138777, L(p,q)-L0 = -0.0006651674722431 -t = 28.7000, H(p,q)-H0 = -0.0034903206183087, L(p,q)-L0 = -0.0006651675904671 -t = 28.8000, H(p,q)-H0 = -0.0034903195188336, L(p,q)-L0 = -0.0006651677209669 -t = 28.9000, H(p,q)-H0 = -0.0034903180288115, L(p,q)-L0 = -0.0006651678679087 -t = 29.0000, H(p,q)-H0 = -0.0034903160264397, L(p,q)-L0 = -0.0006651680367299 -t = 29.1000, H(p,q)-H0 = -0.0034903133400144, L(p,q)-L0 = -0.0006651682347079 -t = 29.2000, H(p,q)-H0 = -0.0034903097257010, L(p,q)-L0 = -0.0006651684718093 -t = 29.3000, H(p,q)-H0 = -0.0034903048336041, L(p,q)-L0 = -0.0006651687619943 -t = 29.4000, H(p,q)-H0 = -0.0034902981552060, L(p,q)-L0 = -0.0006651691252606 -t = 29.5000, H(p,q)-H0 = -0.0034902889406130, L(p,q)-L0 = -0.0006651695909365 -t = 29.6000, H(p,q)-H0 = -0.0034902760659488, L(p,q)-L0 = -0.0006651702031204 -t = 29.7000, H(p,q)-H0 = -0.0034902578168481, L(p,q)-L0 = -0.0006651710299391 -t = 29.8000, H(p,q)-H0 = -0.0034902315280380, L(p,q)-L0 = -0.0006651721798137 -t = 29.9000, H(p,q)-H0 = -0.0034901929714395, L(p,q)-L0 = -0.0006651738310672 -t = 30.0000, H(p,q)-H0 = -0.0034901352974456, L(p,q)-L0 = -0.0006651762879805 -t = 30.1000, H(p,q)-H0 = -0.0034900471726931, L(p,q)-L0 = -0.0006651800916873 -t = 30.2000, H(p,q)-H0 = -0.0034899094703147, L(p,q)-L0 = -0.0006651862506569 -t = 30.3000, H(p,q)-H0 = -0.0034896894078449, L(p,q)-L0 = -0.0006651967470516 -t = 30.4000, H(p,q)-H0 = -0.0034893305378918, L(p,q)-L0 = -0.0006652157209478 -t = 30.5000, H(p,q)-H0 = -0.0034887377690769, L(p,q)-L0 = -0.0006652524414416 -t = 30.6000, H(p,q)-H0 = -0.0034877653246912, L(p,q)-L0 = -0.0006653293666734 -t = 30.7000, H(p,q)-H0 = -0.0034862609301248, L(p,q)-L0 = -0.0006655059385221 -t = 30.8000, H(p,q)-H0 = -0.0034843969369103, L(p,q)-L0 = -0.0006659550892802 -t = 30.9000, H(p,q)-H0 = -0.0034839010341134, L(p,q)-L0 = -0.0006672270494776 -t = 31.0000, H(p,q)-H0 = -0.0034891924866152, L(p,q)-L0 = -0.0006711689749941 -t = 31.1000, H(p,q)-H0 = -0.0034946734077965, L(p,q)-L0 = -0.0006836272495381 -t = 31.2000, H(p,q)-H0 = -0.0035236336543538, L(p,q)-L0 = -0.0007173963005592 -t = 31.3000, H(p,q)-H0 = -0.0038642490594232, L(p,q)-L0 = -0.0007752182037646 -t = 31.4000, H(p,q)-H0 = -0.0042118998503460, L(p,q)-L0 = -0.0008142676205763 -t = 31.5000, H(p,q)-H0 = -0.0042204953302023, L(p,q)-L0 = -0.0008149708602982 -t = 31.6000, H(p,q)-H0 = -0.0042235685676935, L(p,q)-L0 = -0.0008152678672543 -t = 31.7000, H(p,q)-H0 = -0.0042391721128923, L(p,q)-L0 = -0.0008173215809774 -t = 31.8000, H(p,q)-H0 = -0.0042455855932363, L(p,q)-L0 = -0.0008180156834426 -t = 31.9000, H(p,q)-H0 = -0.0042485899377882, L(p,q)-L0 = -0.0008182780009178 -t = 32.0000, H(p,q)-H0 = -0.0042501129375417, L(p,q)-L0 = -0.0008183885914257 -t = 32.1000, H(p,q)-H0 = -0.0042509306029648, L(p,q)-L0 = -0.0008184399829928 -t = 32.2000, H(p,q)-H0 = -0.0042513909630921, L(p,q)-L0 = -0.0008184659578230 -t = 32.3000, H(p,q)-H0 = -0.0042516611271731, L(p,q)-L0 = -0.0008184800653182 -t = 32.4000, H(p,q)-H0 = -0.0042518256076409, L(p,q)-L0 = -0.0008184882150274 -t = 32.5000, H(p,q)-H0 = -0.0042519290750632, L(p,q)-L0 = -0.0008184931805912 -t = 32.6000, H(p,q)-H0 = -0.0042519960876275, L(p,q)-L0 = -0.0008184963497181 -t = 32.7000, H(p,q)-H0 = -0.0042520406344556, L(p,q)-L0 = -0.0008184984564961 -t = 32.8000, H(p,q)-H0 = -0.0042520709449108, L(p,q)-L0 = -0.0008184999086722 -t = 32.9000, H(p,q)-H0 = -0.0042520920036411, L(p,q)-L0 = -0.0008185009426691 -t = 33.0000, H(p,q)-H0 = -0.0042521069111490, L(p,q)-L0 = -0.0008185017008866 -t = 33.1000, H(p,q)-H0 = -0.0042521176430697, L(p,q)-L0 = -0.0008185022720542 -t = 33.2000, H(p,q)-H0 = -0.0042521254861825, L(p,q)-L0 = -0.0008185027131675 -t = 33.3000, H(p,q)-H0 = -0.0042521312954527, L(p,q)-L0 = -0.0008185030618642 -t = 33.4000, H(p,q)-H0 = -0.0042521356492664, L(p,q)-L0 = -0.0008185033436325 -t = 33.5000, H(p,q)-H0 = -0.0042521389452854, L(p,q)-L0 = -0.0008185035761433 -t = 33.6000, H(p,q)-H0 = -0.0042521414608466, L(p,q)-L0 = -0.0008185037719213 -t = 33.7000, H(p,q)-H0 = -0.0042521433917296, L(p,q)-L0 = -0.0008185039400369 -t = 33.8000, H(p,q)-H0 = -0.0042521448774507, L(p,q)-L0 = -0.0008185040872023 -t = 33.9000, H(p,q)-H0 = -0.0042521460180021, L(p,q)-L0 = -0.0008185042184971 -t = 34.0000, H(p,q)-H0 = -0.0042521468850472, L(p,q)-L0 = -0.0008185043378623 -t = 34.1000, H(p,q)-H0 = -0.0042521475294530, L(p,q)-L0 = -0.0008185044484437 -t = 34.2000, H(p,q)-H0 = -0.0042521479863378, L(p,q)-L0 = -0.0008185045528371 -t = 34.3000, H(p,q)-H0 = -0.0042521482783826, L(p,q)-L0 = -0.0008185046532719 -t = 34.4000, H(p,q)-H0 = -0.0042521484178717, L(p,q)-L0 = -0.0008185047517550 -t = 34.5000, H(p,q)-H0 = -0.0042521484077327, L(p,q)-L0 = -0.0008185048501910 -t = 34.6000, H(p,q)-H0 = -0.0042521482417159, L(p,q)-L0 = -0.0008185049504934 -t = 34.7000, H(p,q)-H0 = -0.0042521479037272, L(p,q)-L0 = -0.0008185050546974 -t = 34.8000, H(p,q)-H0 = -0.0042521473662255, L(p,q)-L0 = -0.0008185051650842 -t = 34.9000, H(p,q)-H0 = -0.0042521465874625, L(p,q)-L0 = -0.0008185052843360 -t = 35.0000, H(p,q)-H0 = -0.0042521455071741, L(p,q)-L0 = -0.0008185054157341 -t = 35.1000, H(p,q)-H0 = -0.0042521440400842, L(p,q)-L0 = -0.0008185055634314 -t = 35.2000, H(p,q)-H0 = -0.0042521420662149, L(p,q)-L0 = -0.0008185057328369 -t = 35.3000, H(p,q)-H0 = -0.0042521394163949, L(p,q)-L0 = -0.0008185059311780 -t = 35.4000, H(p,q)-H0 = -0.0042521358504150, L(p,q)-L0 = -0.0008185061683392 -t = 35.5000, H(p,q)-H0 = -0.0042521310236963, L(p,q)-L0 = -0.0008185064581467 -t = 35.6000, H(p,q)-H0 = -0.0042521244356883, L(p,q)-L0 = -0.0008185068203828 -t = 35.7000, H(p,q)-H0 = -0.0042521153486834, L(p,q)-L0 = -0.0008185072840223 -t = 35.8000, H(p,q)-H0 = -0.0042521026578213, L(p,q)-L0 = -0.0008185078925762 -t = 35.9000, H(p,q)-H0 = -0.0042520846790199, L(p,q)-L0 = -0.0008185087131721 -t = 36.0000, H(p,q)-H0 = -0.0042520587962509, L(p,q)-L0 = -0.0008185098524811 -t = 36.1000, H(p,q)-H0 = -0.0042520208632216, L(p,q)-L0 = -0.0008185114856636 -t = 36.2000, H(p,q)-H0 = -0.0042519641690127, L(p,q)-L0 = -0.0008185139110645 -t = 36.3000, H(p,q)-H0 = -0.0042518776199740, L(p,q)-L0 = -0.0008185176581977 -t = 36.4000, H(p,q)-H0 = -0.0042517425095954, L(p,q)-L0 = -0.0008185237116487 -t = 36.5000, H(p,q)-H0 = -0.0042515267951109, L(p,q)-L0 = -0.0008185340016967 -t = 36.6000, H(p,q)-H0 = -0.0042511753015657, L(p,q)-L0 = -0.0008185525483562 -t = 36.7000, H(p,q)-H0 = -0.0042505949309153, L(p,q)-L0 = -0.0008185883222189 -t = 36.8000, H(p,q)-H0 = -0.0042496420434726, L(p,q)-L0 = -0.0008186629770863 -t = 36.9000, H(p,q)-H0 = -0.0042481617817196, L(p,q)-L0 = -0.0008188335893515 -t = 37.0000, H(p,q)-H0 = -0.0042462976208397, L(p,q)-L0 = -0.0008192654952978 -t = 37.1000, H(p,q)-H0 = -0.0042456698559565, L(p,q)-L0 = -0.0008204827798054 -t = 37.2000, H(p,q)-H0 = -0.0042506485311904, L(p,q)-L0 = -0.0008242425437404 -t = 37.3000, H(p,q)-H0 = -0.0042565727808794, L(p,q)-L0 = -0.0008361389085031 -t = 37.4000, H(p,q)-H0 = -0.0042805258754357, L(p,q)-L0 = -0.0008687451789684 -t = 37.5000, H(p,q)-H0 = -0.0046052824962284, L(p,q)-L0 = -0.0009260380642024 -t = 37.6000, H(p,q)-H0 = -0.0049837341938264, L(p,q)-L0 = -0.0009689774758115 -t = 37.7000, H(p,q)-H0 = -0.0049861058668461, L(p,q)-L0 = -0.0009691323909832 -t = 37.8000, H(p,q)-H0 = -0.0049992788599926, L(p,q)-L0 = -0.0009707016339562 -t = 37.9000, H(p,q)-H0 = -0.0050155649298023, L(p,q)-L0 = -0.0009728595799862 -t = 38.0000, H(p,q)-H0 = -0.0050222097343599, L(p,q)-L0 = -0.0009735860679964 -t = 38.1000, H(p,q)-H0 = -0.0050253091228053, L(p,q)-L0 = -0.0009738594282986 -t = 38.2000, H(p,q)-H0 = -0.0050268758669775, L(p,q)-L0 = -0.0009739742094643 -t = 38.3000, H(p,q)-H0 = -0.0050277151648982, L(p,q)-L0 = -0.0009740273613330 -t = 38.4000, H(p,q)-H0 = -0.0050281868194839, L(p,q)-L0 = -0.0009740541457517 -t = 38.5000, H(p,q)-H0 = -0.0050284631568361, L(p,q)-L0 = -0.0009740686563200 -t = 38.6000, H(p,q)-H0 = -0.0050286311504677, L(p,q)-L0 = -0.0009740770210646 -t = 38.7000, H(p,q)-H0 = -0.0050287366906917, L(p,q)-L0 = -0.0009740821084884 -t = 38.8000, H(p,q)-H0 = -0.0050288049665206, L(p,q)-L0 = -0.0009740853504421 -t = 38.9000, H(p,q)-H0 = -0.0050288503060190, L(p,q)-L0 = -0.0009740875028450 -t = 39.0000, H(p,q)-H0 = -0.0050288811270882, L(p,q)-L0 = -0.0009740889848376 -t = 39.1000, H(p,q)-H0 = -0.0050289025226183, L(p,q)-L0 = -0.0009740900390791 -t = 39.2000, H(p,q)-H0 = -0.0050289176570719, L(p,q)-L0 = -0.0009740908115313 -t = 39.3000, H(p,q)-H0 = -0.0050289285448868, L(p,q)-L0 = -0.0009740913930358 -t = 39.4000, H(p,q)-H0 = -0.0050289364969542, L(p,q)-L0 = -0.0009740918418861 -t = 39.5000, H(p,q)-H0 = -0.0050289423835528, L(p,q)-L0 = -0.0009740921965404 -t = 39.6000, H(p,q)-H0 = -0.0050289467929883, L(p,q)-L0 = -0.0009740924830222 -t = 39.7000, H(p,q)-H0 = -0.0050289501294627, L(p,q)-L0 = -0.0009740927193606 -t = 39.8000, H(p,q)-H0 = -0.0050289526746908, L(p,q)-L0 = -0.0009740929183270 -t = 39.9000, H(p,q)-H0 = -0.0050289546274184, L(p,q)-L0 = -0.0009740930891646 -t = 40.0000, H(p,q)-H0 = -0.0050289561291880, L(p,q)-L0 = -0.0009740932387113 -t = 40.1000, H(p,q)-H0 = -0.0050289572813773, L(p,q)-L0 = -0.0009740933721403 -t = 40.2000, H(p,q)-H0 = -0.0050289581565872, L(p,q)-L0 = -0.0009740934934646 -t = 40.3000, H(p,q)-H0 = -0.0050289588062963, L(p,q)-L0 = -0.0009740936058875 -t = 40.4000, H(p,q)-H0 = -0.0050289592659851, L(p,q)-L0 = -0.0009740937120533 -t = 40.5000, H(p,q)-H0 = -0.0050289595584951, L(p,q)-L0 = -0.0009740938142346 -t = 40.6000, H(p,q)-H0 = -0.0050289596960870, L(p,q)-L0 = -0.0009740939144793 -t = 40.7000, H(p,q)-H0 = -0.0050289596814824, L(p,q)-L0 = -0.0009740940147337 -t = 40.8000, H(p,q)-H0 = -0.0050289595080223, L(p,q)-L0 = -0.0009740941169565 -t = 40.9000, H(p,q)-H0 = -0.0050289591589571, L(p,q)-L0 = -0.0009740942232347 -t = 41.0000, H(p,q)-H0 = -0.0050289586057721, L(p,q)-L0 = -0.0009740943359134 -t = 41.1000, H(p,q)-H0 = -0.0050289578053148, L(p,q)-L0 = -0.0009740944577541 -t = 41.2000, H(p,q)-H0 = -0.0050289566953134, L(p,q)-L0 = -0.0009740945921420 -t = 41.3000, H(p,q)-H0 = -0.0050289551876253, L(p,q)-L0 = -0.0009740947433694 -t = 41.4000, H(p,q)-H0 = -0.0050289531581493, L(p,q)-L0 = -0.0009740949170368 -t = 41.5000, H(p,q)-H0 = -0.0050289504317323, L(p,q)-L0 = -0.0009740951206405 -t = 41.6000, H(p,q)-H0 = -0.0050289467593814, L(p,q)-L0 = -0.0009740953644510 -t = 41.7000, H(p,q)-H0 = -0.0050289417834415, L(p,q)-L0 = -0.0009740956628630 -t = 41.8000, H(p,q)-H0 = -0.0050289349836028, L(p,q)-L0 = -0.0009740960365126 -t = 41.9000, H(p,q)-H0 = -0.0050289255918023, L(p,q)-L0 = -0.0009740965156926 -t = 42.0000, H(p,q)-H0 = -0.0050289124557135, L(p,q)-L0 = -0.0009740971460033 -t = 42.1000, H(p,q)-H0 = -0.0050288938156277, L(p,q)-L0 = -0.0009740979979824 -t = 42.2000, H(p,q)-H0 = -0.0050288669326233, L(p,q)-L0 = -0.0009740991840553 -t = 42.3000, H(p,q)-H0 = -0.0050288274566321, L(p,q)-L0 = -0.0009741008894487 -t = 42.4000, H(p,q)-H0 = -0.0050287683320491, L(p,q)-L0 = -0.0009741034308430 -t = 42.5000, H(p,q)-H0 = -0.0050286778715601, L(p,q)-L0 = -0.0009741073727012 -t = 42.6000, H(p,q)-H0 = -0.0050285363327320, L(p,q)-L0 = -0.0009741137697146 -t = 42.7000, H(p,q)-H0 = -0.0050283098629591, L(p,q)-L0 = -0.0009741247011466 -t = 42.8000, H(p,q)-H0 = -0.0050279402100668, L(p,q)-L0 = -0.0009741445249911 -t = 42.9000, H(p,q)-H0 = -0.0050273295676402, L(p,q)-L0 = -0.0009741830372008 -t = 43.0000, H(p,q)-H0 = -0.0050263296719493, L(p,q)-L0 = -0.0009742640797716 -t = 43.1000, H(p,q)-H0 = -0.0050247938430936, L(p,q)-L0 = -0.0009744510695272 -t = 43.2000, H(p,q)-H0 = -0.0050229403669362, L(p,q)-L0 = -0.0009749294178648 -t = 43.3000, H(p,q)-H0 = -0.0050226502207049, L(p,q)-L0 = -0.0009762912971842 -t = 43.4000, H(p,q)-H0 = -0.0050283403460893, L(p,q)-L0 = -0.0009805239645397 -t = 43.5000, H(p,q)-H0 = -0.0050331284324954, L(p,q)-L0 = -0.0009938449411351 -t = 43.6000, H(p,q)-H0 = -0.0050709025206879, L(p,q)-L0 = -0.0010292794028619 -t = 43.7000, H(p,q)-H0 = -0.0054318832955049, L(p,q)-L0 = -0.0010876409457482 -t = 43.8000, H(p,q)-H0 = -0.0057371204589447, L(p,q)-L0 = -0.0011215317621289 -t = 43.9000, H(p,q)-H0 = -0.0057497089987111, L(p,q)-L0 = -0.0011226480931769 -t = 44.0000, H(p,q)-H0 = -0.0057934322107638, L(p,q)-L0 = -0.0011288131162329 -t = 44.1000, H(p,q)-H0 = -0.0058082004992484, L(p,q)-L0 = -0.0011307407430252 -t = 44.2000, H(p,q)-H0 = -0.0058143299279987, L(p,q)-L0 = -0.0011313969680044 -t = 44.3000, H(p,q)-H0 = -0.0058172168871219, L(p,q)-L0 = -0.0011316468330285 -t = 44.4000, H(p,q)-H0 = -0.0058186857628013, L(p,q)-L0 = -0.0011317528925029 -t = 44.5000, H(p,q)-H0 = -0.0058194767097800, L(p,q)-L0 = -0.0011318024722731 -t = 44.6000, H(p,q)-H0 = -0.0058199231760993, L(p,q)-L0 = -0.0011318276607565 -t = 44.7000, H(p,q)-H0 = -0.0058201857870415, L(p,q)-L0 = -0.0011318414026297 -t = 44.8000, H(p,q)-H0 = -0.0058203459956877, L(p,q)-L0 = -0.0011318493724733 -t = 44.9000, H(p,q)-H0 = -0.0058204469594461, L(p,q)-L0 = -0.0011318542455230 -t = 45.0000, H(p,q)-H0 = -0.0058205124566160, L(p,q)-L0 = -0.0011318573654847 -t = 45.1000, H(p,q)-H0 = -0.0058205560590923, L(p,q)-L0 = -0.0011318594456199 -t = 45.2000, H(p,q)-H0 = -0.0058205857652835, L(p,q)-L0 = -0.0011318608833193 -t = 45.3000, H(p,q)-H0 = -0.0058206064279326, L(p,q)-L0 = -0.0011318619096317 -t = 45.4000, H(p,q)-H0 = -0.0058206210700082, L(p,q)-L0 = -0.0011318626640651 -t = 45.5000, H(p,q)-H0 = -0.0058206316203492, L(p,q)-L0 = -0.0011318632337425 -t = 45.6000, H(p,q)-H0 = -0.0058206393367858, L(p,q)-L0 = -0.0011318636747448 -t = 45.7000, H(p,q)-H0 = -0.0058206450559579, L(p,q)-L0 = -0.0011318640241778 -t = 45.8000, H(p,q)-H0 = -0.0058206493443911, L(p,q)-L0 = -0.0011318643072169 -t = 45.9000, H(p,q)-H0 = -0.0058206525918998, L(p,q)-L0 = -0.0011318645413481 -t = 46.0000, H(p,q)-H0 = -0.0058206550705058, L(p,q)-L0 = -0.0011318647389886 -t = 46.1000, H(p,q)-H0 = -0.0058206569722915, L(p,q)-L0 = -0.0011318649091501 -t = 46.2000, H(p,q)-H0 = -0.0058206584341152, L(p,q)-L0 = -0.0011318650585159 -t = 46.3000, H(p,q)-H0 = -0.0058206595539725, L(p,q)-L0 = -0.0011318651921591 -t = 46.4000, H(p,q)-H0 = -0.0058206604019360, L(p,q)-L0 = -0.0011318653140299 -t = 46.5000, H(p,q)-H0 = -0.0058206610275047, L(p,q)-L0 = -0.0011318654272955 -t = 46.6000, H(p,q)-H0 = -0.0058206614645095, L(p,q)-L0 = -0.0011318655345860 -t = 46.7000, H(p,q)-H0 = -0.0058206617343021, L(p,q)-L0 = -0.0011318656381772 -t = 46.8000, H(p,q)-H0 = -0.0058206618476738, L(p,q)-L0 = -0.0011318657401382 -t = 46.9000, H(p,q)-H0 = -0.0058206618057600, L(p,q)-L0 = -0.0011318658424541 -t = 47.0000, H(p,q)-H0 = -0.0058206616000502, L(p,q)-L0 = -0.0011318659471427 -t = 47.1000, H(p,q)-H0 = -0.0058206612115000, L(p,q)-L0 = -0.0011318660563755 -t = 47.2000, H(p,q)-H0 = -0.0058206606086190, L(p,q)-L0 = -0.0011318661726155 -t = 47.3000, H(p,q)-H0 = -0.0058206597442708, L(p,q)-L0 = -0.0011318662987865 -t = 47.4000, H(p,q)-H0 = -0.0058206585507228, L(p,q)-L0 = -0.0011318664384982 -t = 47.5000, H(p,q)-H0 = -0.0058206569321985, L(p,q)-L0 = -0.0011318665963569 -t = 47.6000, H(p,q)-H0 = -0.0058206547537494, L(p,q)-L0 = -0.0011318667784058 -t = 47.7000, H(p,q)-H0 = -0.0058206518245656, L(p,q)-L0 = -0.0011318669927772 -t = 47.8000, H(p,q)-H0 = -0.0058206478727060, L(p,q)-L0 = -0.0011318672506705 -t = 47.9000, H(p,q)-H0 = -0.0058206425063481, L(p,q)-L0 = -0.0011318675678629 -t = 48.0000, H(p,q)-H0 = -0.0058206351534674, L(p,q)-L0 = -0.0011318679670966 -t = 48.1000, H(p,q)-H0 = -0.0058206249663622, L(p,q)-L0 = -0.0011318684819501 -t = 48.2000, H(p,q)-H0 = -0.0058206106678044, L(p,q)-L0 = -0.0011318691632873 -t = 48.3000, H(p,q)-H0 = -0.0058205902983943, L(p,q)-L0 = -0.0011318700903342 -t = 48.4000, H(p,q)-H0 = -0.0058205607934987, L(p,q)-L0 = -0.0011318713903341 -t = 48.5000, H(p,q)-H0 = -0.0058205172608594, L(p,q)-L0 = -0.0011318732747279 -t = 48.6000, H(p,q)-H0 = -0.0058204517242235, L(p,q)-L0 = -0.0011318761085131 -t = 48.7000, H(p,q)-H0 = -0.0058203509052255, L(p,q)-L0 = -0.0011318805493998 -t = 48.8000, H(p,q)-H0 = -0.0058201922792199, L(p,q)-L0 = -0.0011318878416345 -t = 48.9000, H(p,q)-H0 = -0.0058199371377256, L(p,q)-L0 = -0.0011319004731334 -t = 49.0000, H(p,q)-H0 = -0.0058195190461326, L(p,q)-L0 = -0.0011319237434934 -t = 49.1000, H(p,q)-H0 = -0.0058188281028627, L(p,q)-L0 = -0.0011319697872911 -t = 49.2000, H(p,q)-H0 = -0.0058177064216066, L(p,q)-L0 = -0.0011320687600078 -t = 49.3000, H(p,q)-H0 = -0.0058160411841781, L(p,q)-L0 = -0.0011323027158024 -t = 49.4000, H(p,q)-H0 = -0.0058142893002238, L(p,q)-L0 = -0.0011329170786468 -t = 49.5000, H(p,q)-H0 = -0.0058150481164643, L(p,q)-L0 = -0.0011347093960148 -t = 49.6000, H(p,q)-H0 = -0.0058222285575142, L(p,q)-L0 = -0.0011403508220538 -t = 49.7000, H(p,q)-H0 = -0.0058241325175381, L(p,q)-L0 = -0.0011577519966036 -t = 49.8000, H(p,q)-H0 = -0.0059136994106861, L(p,q)-L0 = -0.0012002219445524 -t = 49.9000, H(p,q)-H0 = -0.0063434150870048, L(p,q)-L0 = -0.0012592860373102 -t = 50.0000, H(p,q)-H0 = -0.0065347885794942, L(p,q)-L0 = -0.0012798403538276 -t = 50.1000, H(p,q)-H0 = -0.0065546750922132, L(p,q)-L0 = -0.0012819120894538 -t = 50.2000, H(p,q)-H0 = -0.0065874578915532, L(p,q)-L0 = -0.0012865287483356 -t = 50.3000, H(p,q)-H0 = -0.0065991756921480, L(p,q)-L0 = -0.0012879954078655 -t = 50.4000, H(p,q)-H0 = -0.0066042271391532, L(p,q)-L0 = -0.0012885085153759 -t = 50.5000, H(p,q)-H0 = -0.0066066592227889, L(p,q)-L0 = -0.0012887094378090 -t = 50.6000, H(p,q)-H0 = -0.0066079155842371, L(p,q)-L0 = -0.0012887969125107 -t = 50.7000, H(p,q)-H0 = -0.0066086004525748, L(p,q)-L0 = -0.0012888387144001 -t = 50.8000, H(p,q)-H0 = -0.0066089911690477, L(p,q)-L0 = -0.0012888603563264 -t = 50.9000, H(p,q)-H0 = -0.0066092231569694, L(p,q)-L0 = -0.0012888723564067 -t = 51.0000, H(p,q)-H0 = -0.0066093658711800, L(p,q)-L0 = -0.0012888794143149 -t = 51.1000, H(p,q)-H0 = -0.0066094564820851, L(p,q)-L0 = -0.0012888837828469 -t = 51.2000, H(p,q)-H0 = -0.0066095156549980, L(p,q)-L0 = -0.0012888866100695 -t = 51.3000, H(p,q)-H0 = -0.0066095552819064, L(p,q)-L0 = -0.0012888885131881 -t = 51.4000, H(p,q)-H0 = -0.0066095824234229, L(p,q)-L0 = -0.0012888898399438 -t = 51.5000, H(p,q)-H0 = -0.0066096013922989, L(p,q)-L0 = -0.0012888907945314 -t = 51.6000, H(p,q)-H0 = -0.0066096148916256, L(p,q)-L0 = -0.0012888915013389 -t = 51.7000, H(p,q)-H0 = -0.0066096246557593, L(p,q)-L0 = -0.0012888920386659 -t = 51.8000, H(p,q)-H0 = -0.0066096318214277, L(p,q)-L0 = -0.0012888924572783 -t = 51.9000, H(p,q)-H0 = -0.0066096371481736, L(p,q)-L0 = -0.0012888927909871 -t = 52.0000, H(p,q)-H0 = -0.0066096411524224, L(p,q)-L0 = -0.0012888930628742 -t = 52.1000, H(p,q)-H0 = -0.0066096441907917, L(p,q)-L0 = -0.0012888932890647 -t = 52.2000, H(p,q)-H0 = -0.0066096465128904, L(p,q)-L0 = -0.0012888934810753 -t = 52.3000, H(p,q)-H0 = -0.0066096482953797, L(p,q)-L0 = -0.0012888936473121 -t = 52.4000, H(p,q)-H0 = -0.0066096496642913, L(p,q)-L0 = -0.0012888937940477 -t = 52.5000, H(p,q)-H0 = -0.0066096507098400, L(p,q)-L0 = -0.0012888939260762 -t = 52.6000, H(p,q)-H0 = -0.0066096514963420, L(p,q)-L0 = -0.0012888940471600 -t = 52.7000, H(p,q)-H0 = -0.0066096520688672, L(p,q)-L0 = -0.0012888941603451 -t = 52.8000, H(p,q)-H0 = -0.0066096524576551, L(p,q)-L0 = -0.0012888942681910 -t = 52.9000, H(p,q)-H0 = -0.0066096526809337, L(p,q)-L0 = -0.0012888943729444 -t = 53.0000, H(p,q)-H0 = -0.0066096527465372, L(p,q)-L0 = -0.0012888944766810 -t = 53.1000, H(p,q)-H0 = -0.0066096526525365, L(p,q)-L0 = -0.0012888945814292 -t = 53.2000, H(p,q)-H0 = -0.0066096523869617, L(p,q)-L0 = -0.0012888946892897 -t = 53.3000, H(p,q)-H0 = -0.0066096519265759, L(p,q)-L0 = -0.0012888948025636 -t = 53.4000, H(p,q)-H0 = -0.0066096512345324, L(p,q)-L0 = -0.0012888949239023 -t = 53.5000, H(p,q)-H0 = -0.0066096502565770, L(p,q)-L0 = -0.0012888950564980 -t = 53.6000, H(p,q)-H0 = -0.0066096489152456, L(p,q)-L0 = -0.0012888952043394 -t = 53.7000, H(p,q)-H0 = -0.0066096471011606, L(p,q)-L0 = -0.0012888953725680 -t = 53.8000, H(p,q)-H0 = -0.0066096446600086, L(p,q)-L0 = -0.0012888955679944 -t = 53.9000, H(p,q)-H0 = -0.0066096413729405, L(p,q)-L0 = -0.0012888957998609 -t = 54.0000, H(p,q)-H0 = -0.0066096369267550, L(p,q)-L0 = -0.0012888960810047 -t = 54.1000, H(p,q)-H0 = -0.0066096308679107, L(p,q)-L0 = -0.0012888964296658 -t = 54.2000, H(p,q)-H0 = -0.0066096225304835, L(p,q)-L0 = -0.0012888968723725 -t = 54.3000, H(p,q)-H0 = -0.0066096109213525, L(p,q)-L0 = -0.0012888974486692 -t = 54.4000, H(p,q)-H0 = -0.0066095945338401, L(p,q)-L0 = -0.0012888982190820 -t = 54.5000, H(p,q)-H0 = -0.0066095710393603, L(p,q)-L0 = -0.0012888992789692 -t = 54.6000, H(p,q)-H0 = -0.0066095367671244, L(p,q)-L0 = -0.0012889007834390 -t = 54.7000, H(p,q)-H0 = -0.0066094858091885, L(p,q)-L0 = -0.0012889029939144 -t = 54.8000, H(p,q)-H0 = -0.0066094084540587, L(p,q)-L0 = -0.0012889063689402 -t = 54.9000, H(p,q)-H0 = -0.0066092884102232, L(p,q)-L0 = -0.0012889117498753 -t = 55.0000, H(p,q)-H0 = -0.0066090978760566, L(p,q)-L0 = -0.0012889207615009 -t = 55.1000, H(p,q)-H0 = -0.0066087889894710, L(p,q)-L0 = -0.0012889367299387 -t = 55.2000, H(p,q)-H0 = -0.0066082802902981, L(p,q)-L0 = -0.0012889669333794 -t = 55.3000, H(p,q)-H0 = -0.0066074417231171, L(p,q)-L0 = -0.0012890285546462 -t = 55.4000, H(p,q)-H0 = -0.0066061101611179, L(p,q)-L0 = -0.0012891657824488 -t = 55.5000, H(p,q)-H0 = -0.0066042882735218, L(p,q)-L0 = -0.0012895033485001 -t = 55.6000, H(p,q)-H0 = -0.0066030216685655, L(p,q)-L0 = -0.0012904275549047 -t = 55.7000, H(p,q)-H0 = -0.0066061065799383, L(p,q)-L0 = -0.0012932206797746 -t = 55.8000, H(p,q)-H0 = -0.0066137694509310, L(p,q)-L0 = -0.0013020854862585 -t = 55.9000, H(p,q)-H0 = -0.0066189882307113, L(p,q)-L0 = -0.0013278697338168 -t = 56.0000, H(p,q)-H0 = -0.0068405685873001, L(p,q)-L0 = -0.0013804497570724 -t = 56.1000, H(p,q)-H0 = -0.0072982122989294, L(p,q)-L0 = -0.0014350382747530 -t = 56.2000, H(p,q)-H0 = -0.0074722115913586, L(p,q)-L0 = -0.0014551205293620 -t = 56.3000, H(p,q)-H0 = -0.0074800499267142, L(p,q)-L0 = -0.0014559315594759 -t = 56.4000, H(p,q)-H0 = -0.0075014222617891, L(p,q)-L0 = -0.0014588619879621 -t = 56.5000, H(p,q)-H0 = -0.0075097244031698, L(p,q)-L0 = -0.0014598247751505 -t = 56.6000, H(p,q)-H0 = -0.0075134878050911, L(p,q)-L0 = -0.0014601769113199 -t = 56.7000, H(p,q)-H0 = -0.0075153556673117, L(p,q)-L0 = -0.0014603208846896 -t = 56.8000, H(p,q)-H0 = -0.0075163423029451, L(p,q)-L0 = -0.0014603860176833 -t = 56.9000, H(p,q)-H0 = -0.0075168902000945, L(p,q)-L0 = -0.0014604181911663 -t = 57.0000, H(p,q)-H0 = -0.0075172078765056, L(p,q)-L0 = -0.0014604353279253 -t = 57.1000, H(p,q)-H0 = -0.0075173992232433, L(p,q)-L0 = -0.0014604450647453 -t = 57.2000, H(p,q)-H0 = -0.0075175184489205, L(p,q)-L0 = -0.0014604509138185 -t = 57.3000, H(p,q)-H0 = -0.0075175950134688, L(p,q)-L0 = -0.0014604546016129 -t = 57.4000, H(p,q)-H0 = -0.0075176455242807, L(p,q)-L0 = -0.0014604570275039 -t = 57.5000, H(p,q)-H0 = -0.0075176796591728, L(p,q)-L0 = -0.0014604586843965 -t = 57.6000, H(p,q)-H0 = -0.0075177032301303, L(p,q)-L0 = -0.0014604598547530 -t = 57.7000, H(p,q)-H0 = -0.0075177198242240, L(p,q)-L0 = -0.0014604607069530 -t = 57.8000, H(p,q)-H0 = -0.0075177317109864, L(p,q)-L0 = -0.0014604613449558 -t = 57.9000, H(p,q)-H0 = -0.0075177403591021, L(p,q)-L0 = -0.0014604618349991 -t = 58.0000, H(p,q)-H0 = -0.0075177467386638, L(p,q)-L0 = -0.0014604622205047 -t = 58.1000, H(p,q)-H0 = -0.0075177515024203, L(p,q)-L0 = -0.0014604625306857 -t = 58.2000, H(p,q)-H0 = -0.0075177550969621, L(p,q)-L0 = -0.0014604627856751 -t = 58.3000, H(p,q)-H0 = -0.0075177578323614, L(p,q)-L0 = -0.0014604629996662 -t = 58.4000, H(p,q)-H0 = -0.0075177599266217, L(p,q)-L0 = -0.0014604631828864 -t = 58.5000, H(p,q)-H0 = -0.0075177615345337, L(p,q)-L0 = -0.0014604633428685 -t = 58.6000, H(p,q)-H0 = -0.0075177627666821, L(p,q)-L0 = -0.0014604634852903 -t = 58.7000, H(p,q)-H0 = -0.0075177637021057, L(p,q)-L0 = -0.0014604636145387 -t = 58.8000, H(p,q)-H0 = -0.0075177643967819, L(p,q)-L0 = -0.0014604637341017 -t = 58.9000, H(p,q)-H0 = -0.0075177648892975, L(p,q)-L0 = -0.0014604638468488 -t = 59.0000, H(p,q)-H0 = -0.0075177652045599, L(p,q)-L0 = -0.0014604639552379 -t = 59.1000, H(p,q)-H0 = -0.0075177653560790, L(p,q)-L0 = -0.0014604640614755 -t = 59.2000, H(p,q)-H0 = -0.0075177653471343, L(p,q)-L0 = -0.0014604641676541 -t = 59.3000, H(p,q)-H0 = -0.0075177651709807, L(p,q)-L0 = -0.0014604642758754 -t = 59.4000, H(p,q)-H0 = -0.0075177648101135, L(p,q)-L0 = -0.0014604643883762 -t = 59.5000, H(p,q)-H0 = -0.0075177642344932, L(p,q)-L0 = -0.0014604645076705 -t = 59.6000, H(p,q)-H0 = -0.0075177633984745, L(p,q)-L0 = -0.0014604646367194 -t = 59.7000, H(p,q)-H0 = -0.0075177622360031, L(p,q)-L0 = -0.0014604647791587 -t = 59.8000, H(p,q)-H0 = -0.0075177606533507, L(p,q)-L0 = -0.0014604649396059 -t = 59.9000, H(p,q)-H0 = -0.0075177585182388, L(p,q)-L0 = -0.0014604651241005 -t = 60.0000, H(p,q)-H0 = -0.0075177556435133, L(p,q)-L0 = -0.0014604653407451 -t = 60.1000, H(p,q)-H0 = -0.0075177517624332, L(p,q)-L0 = -0.0014604656006749 -t = 60.2000, H(p,q)-H0 = -0.0075177464907911, L(p,q)-L0 = -0.0014604659195445 -t = 60.3000, H(p,q)-H0 = -0.0075177392679974, L(p,q)-L0 = -0.0014604663198776 -t = 60.4000, H(p,q)-H0 = -0.0075177292639086, L(p,q)-L0 = -0.0014604668348677 -t = 60.5000, H(p,q)-H0 = -0.0075177152288441, L(p,q)-L0 = -0.0014604675147014 -t = 60.6000, H(p,q)-H0 = -0.0075176952475605, L(p,q)-L0 = -0.0014604684373947 -t = 60.7000, H(p,q)-H0 = -0.0075176663277495, L(p,q)-L0 = -0.0014604697279813 -t = 60.8000, H(p,q)-H0 = -0.0075176236982062, L(p,q)-L0 = -0.0014604715937520 -t = 60.9000, H(p,q)-H0 = -0.0075175595895836, L(p,q)-L0 = -0.0014604743916310 -t = 61.0000, H(p,q)-H0 = -0.0075174610838133, L(p,q)-L0 = -0.0014604787629693 -t = 61.1000, H(p,q)-H0 = -0.0075173062916998, L(p,q)-L0 = -0.0014604859172346 -t = 61.2000, H(p,q)-H0 = -0.0075170576243150, L(p,q)-L0 = -0.0014604982641889 -t = 61.3000, H(p,q)-H0 = -0.0075166505525075, L(p,q)-L0 = -0.0014605209162322 -t = 61.4000, H(p,q)-H0 = -0.0075159780181615, L(p,q)-L0 = -0.0014605655256930 -t = 61.5000, H(p,q)-H0 = -0.0075148843946853, L(p,q)-L0 = -0.0014606609002255 -t = 61.6000, H(p,q)-H0 = -0.0075132485527077, L(p,q)-L0 = -0.0014608849826797 -t = 61.7000, H(p,q)-H0 = -0.0075114690714533, L(p,q)-L0 = -0.0014614695540665 -t = 61.8000, H(p,q)-H0 = -0.0075119725718271, L(p,q)-L0 = -0.0014631643004741 -t = 61.9000, H(p,q)-H0 = -0.0075188381686173, L(p,q)-L0 = -0.0014684790213803 -t = 62.0000, H(p,q)-H0 = -0.0075213408711894, L(p,q)-L0 = -0.0014849340726064 -t = 62.1000, H(p,q)-H0 = -0.0075977182778122, L(p,q)-L0 = -0.0015258568087962 -t = 62.2000, H(p,q)-H0 = -0.0080142071314444, L(p,q)-L0 = -0.0015849260346221 -t = 62.3000, H(p,q)-H0 = -0.0082223851637226, L(p,q)-L0 = -0.0016074040036949 -t = 62.4000, H(p,q)-H0 = -0.0082417724052919, L(p,q)-L0 = -0.0016093800624443 -t = 62.5000, H(p,q)-H0 = -0.0082767313007306, L(p,q)-L0 = -0.0016143110446043 -t = 62.6000, H(p,q)-H0 = -0.0082890796719279, L(p,q)-L0 = -0.0016158737930068 -t = 62.7000, H(p,q)-H0 = -0.0082943599259726, L(p,q)-L0 = -0.0016164178632248 -t = 62.8000, H(p,q)-H0 = -0.0082968899278144, L(p,q)-L0 = -0.0016166298212301 -t = 62.9000, H(p,q)-H0 = -0.0082981925024845, L(p,q)-L0 = -0.0016167216729231 -t = 63.0000, H(p,q)-H0 = -0.0082989006627422, L(p,q)-L0 = -0.0016167653917382 -t = 63.1000, H(p,q)-H0 = -0.0082993037412200, L(p,q)-L0 = -0.0016167879503431 -t = 63.2000, H(p,q)-H0 = -0.0082995425869782, L(p,q)-L0 = -0.0016168004238233 -t = 63.3000, H(p,q)-H0 = -0.0082996892573692, L(p,q)-L0 = -0.0016168077432006 -t = 63.4000, H(p,q)-H0 = -0.0082997822317507, L(p,q)-L0 = -0.0016168122649221 -t = 63.5000, H(p,q)-H0 = -0.0082998428616258, L(p,q)-L0 = -0.0016168151867020 -t = 63.6000, H(p,q)-H0 = -0.0082998834123414, L(p,q)-L0 = -0.0016168171509681 -t = 63.7000, H(p,q)-H0 = -0.0082999111546376, L(p,q)-L0 = -0.0016168185189600 -t = 63.8000, H(p,q)-H0 = -0.0082999305232168, L(p,q)-L0 = -0.0016168195024386 -t = 63.9000, H(p,q)-H0 = -0.0082999442939573, L(p,q)-L0 = -0.0016168202302111 -t = 64.0000, H(p,q)-H0 = -0.0082999542457802, L(p,q)-L0 = -0.0016168207832555 -t = 64.1000, H(p,q)-H0 = -0.0082999615433328, L(p,q)-L0 = -0.0016168212140173 -t = 64.2000, H(p,q)-H0 = -0.0082999669640187, L(p,q)-L0 = -0.0016168215573935 -t = 64.3000, H(p,q)-H0 = -0.0082999710358979, L(p,q)-L0 = -0.0016168218371879 -t = 64.4000, H(p,q)-H0 = -0.0082999741232850, L(p,q)-L0 = -0.0016168220700212 -t = 64.5000, H(p,q)-H0 = -0.0082999764809404, L(p,q)-L0 = -0.0016168222677582 -t = 64.6000, H(p,q)-H0 = -0.0082999782889923, L(p,q)-L0 = -0.0016168224390563 -t = 64.7000, H(p,q)-H0 = -0.0082999796757974, L(p,q)-L0 = -0.0016168225903772 -t = 64.8000, H(p,q)-H0 = -0.0082999807330948, L(p,q)-L0 = -0.0016168227266612 -t = 64.9000, H(p,q)-H0 = -0.0082999815261381, L(p,q)-L0 = -0.0016168228517890 -t = 65.0000, H(p,q)-H0 = -0.0082999821004788, L(p,q)-L0 = -0.0016168229689082 -t = 65.1000, H(p,q)-H0 = -0.0082999824864498, L(p,q)-L0 = -0.0016168230806700 -t = 65.2000, H(p,q)-H0 = -0.0082999827020094, L(p,q)-L0 = -0.0016168231894107 -t = 65.3000, H(p,q)-H0 = -0.0082999827543395, L(p,q)-L0 = -0.0016168232972990 -t = 65.4000, H(p,q)-H0 = -0.0082999826404160, L(p,q)-L0 = -0.0016168234064659 -t = 65.5000, H(p,q)-H0 = -0.0082999823466205, L(p,q)-L0 = -0.0016168235191315 -t = 65.6000, H(p,q)-H0 = -0.0082999818473403, L(p,q)-L0 = -0.0016168236377444 -t = 65.7000, H(p,q)-H0 = -0.0082999811023532, L(p,q)-L0 = -0.0016168237651417 -t = 65.8000, H(p,q)-H0 = -0.0082999800526313, L(p,q)-L0 = -0.0016168239047598 -t = 65.9000, H(p,q)-H0 = -0.0082999786139314, L(p,q)-L0 = -0.0016168240609143 -t = 66.0000, H(p,q)-H0 = -0.0082999766671743, L(p,q)-L0 = -0.0016168242391964 -t = 66.1000, H(p,q)-H0 = -0.0082999740440215, L(p,q)-L0 = -0.0016168244470466 -t = 66.2000, H(p,q)-H0 = -0.0082999705050973, L(p,q)-L0 = -0.0016168246946116 -t = 66.3000, H(p,q)-H0 = -0.0082999657067434, L(p,q)-L0 = -0.0016168249960538 -t = 66.4000, H(p,q)-H0 = -0.0082999591495398, L(p,q)-L0 = -0.0016168253715996 -t = 66.5000, H(p,q)-H0 = -0.0082999500973145, L(p,q)-L0 = -0.0016168258508293 -t = 66.6000, H(p,q)-H0 = -0.0082999374474856, L(p,q)-L0 = -0.0016168264781042 -t = 66.7000, H(p,q)-H0 = -0.0082999195196036, L(p,q)-L0 = -0.0016168273217750 -t = 66.8000, H(p,q)-H0 = -0.0082998937037715, L(p,q)-L0 = -0.0016168284903244 -t = 66.9000, H(p,q)-H0 = -0.0082998558645395, L(p,q)-L0 = -0.0016168301616697 -t = 67.0000, H(p,q)-H0 = -0.0082997993109404, L(p,q)-L0 = -0.0016168326384758 -t = 67.1000, H(p,q)-H0 = -0.0082997129873277, L(p,q)-L0 = -0.0016168364572351 -t = 67.2000, H(p,q)-H0 = -0.0082995782617741, L(p,q)-L0 = -0.0016168426141706 -t = 67.3000, H(p,q)-H0 = -0.0082993632413220, L(p,q)-L0 = -0.0016168530595803 -t = 67.4000, H(p,q)-H0 = -0.0082990130550606, L(p,q)-L0 = -0.0016168718488706 -t = 67.5000, H(p,q)-H0 = -0.0082984352102494, L(p,q)-L0 = -0.0016169080161300 -t = 67.6000, H(p,q)-H0 = -0.0082974871562463, L(p,q)-L0 = -0.0016169833264885 -t = 67.7000, H(p,q)-H0 = -0.0082960152745801, L(p,q)-L0 = -0.0016171550235442 -t = 67.8000, H(p,q)-H0 = -0.0082941602839841, L(p,q)-L0 = -0.0016175885060412 -t = 67.9000, H(p,q)-H0 = -0.0082935162579298, L(p,q)-L0 = -0.0016188065301203 -t = 68.0000, H(p,q)-H0 = -0.0082983862376713, L(p,q)-L0 = -0.0016225562750811 -t = 68.1000, H(p,q)-H0 = -0.0083043411138335, L(p,q)-L0 = -0.0016343856629001 -t = 68.2000, H(p,q)-H0 = -0.0083281920270246, L(p,q)-L0 = -0.0016667656650784 -t = 68.3000, H(p,q)-H0 = -0.0086483570042810, L(p,q)-L0 = -0.0017238083029936 -t = 68.4000, H(p,q)-H0 = -0.0090262911034760, L(p,q)-L0 = -0.0017668830933191 -t = 68.5000, H(p,q)-H0 = -0.0090286388487173, L(p,q)-L0 = -0.0017670361077707 -t = 68.6000, H(p,q)-H0 = -0.0090420561804545, L(p,q)-L0 = -0.0017686346052104 -t = 68.7000, H(p,q)-H0 = -0.0090585942390076, L(p,q)-L0 = -0.0017708332562726 -t = 68.8000, H(p,q)-H0 = -0.0090653282746891, L(p,q)-L0 = -0.0017715747477229 -t = 68.9000, H(p,q)-H0 = -0.0090684645123734, L(p,q)-L0 = -0.0017718540734429 -t = 69.0000, H(p,q)-H0 = -0.0090700483913224, L(p,q)-L0 = -0.0017719714649240 -t = 69.1000, H(p,q)-H0 = -0.0090708963505156, L(p,q)-L0 = -0.0017720258706756 -t = 69.2000, H(p,q)-H0 = -0.0090713726640493, L(p,q)-L0 = -0.0017720533102098 -t = 69.3000, H(p,q)-H0 = -0.0090716516352027, L(p,q)-L0 = -0.0017720681892406 -t = 69.4000, H(p,q)-H0 = -0.0090718211811023, L(p,q)-L0 = -0.0017720767749683 -t = 69.5000, H(p,q)-H0 = -0.0090719276695290, L(p,q)-L0 = -0.0017720820025667 -t = 69.6000, H(p,q)-H0 = -0.0090719965429189, L(p,q)-L0 = -0.0017720853379229 -t = 69.7000, H(p,q)-H0 = -0.0090720422694386, L(p,q)-L0 = -0.0017720875553366 -t = 69.8000, H(p,q)-H0 = -0.0090720733472431, L(p,q)-L0 = -0.0017720890843776 -t = 69.9000, H(p,q)-H0 = -0.0090720949166577, L(p,q)-L0 = -0.0017720901738885 -t = 70.0000, H(p,q)-H0 = -0.0090721101709692, L(p,q)-L0 = -0.0017720909736432 -t = 70.1000, H(p,q)-H0 = -0.0090721211425577, L(p,q)-L0 = -0.0017720915769186 -t = 70.2000, H(p,q)-H0 = -0.0090721291537154, L(p,q)-L0 = -0.0017720920436137 -t = 70.3000, H(p,q)-H0 = -0.0090721350820813, L(p,q)-L0 = -0.0017720924132787 -t = 70.4000, H(p,q)-H0 = -0.0090721395207606, L(p,q)-L0 = -0.0017720927127016 -t = 70.5000, H(p,q)-H0 = -0.0090721428770837, L(p,q)-L0 = -0.0017720929604614 -t = 70.6000, H(p,q)-H0 = -0.0090721454347672, L(p,q)-L0 = -0.0017720931697378 -t = 70.7000, H(p,q)-H0 = -0.0090721473937664, L(p,q)-L0 = -0.0017720933500884 -t = 70.8000, H(p,q)-H0 = -0.0090721488962415, L(p,q)-L0 = -0.0017720935086003 -t = 70.9000, H(p,q)-H0 = -0.0090721500437103, L(p,q)-L0 = -0.0017720936506560 -t = 71.0000, H(p,q)-H0 = -0.0090721509084859, L(p,q)-L0 = -0.0017720937804515 -t = 71.1000, H(p,q)-H0 = -0.0090721515413342, L(p,q)-L0 = -0.0017720939013606 -t = 71.2000, H(p,q)-H0 = -0.0090721519765558, L(p,q)-L0 = -0.0017720940161962 -t = 71.3000, H(p,q)-H0 = -0.0090721522352515, L(p,q)-L0 = -0.0017720941274088 -t = 71.4000, H(p,q)-H0 = -0.0090721523272342, L(p,q)-L0 = -0.0017720942372426 -t = 71.5000, H(p,q)-H0 = -0.0090721522518485, L(p,q)-L0 = -0.0017720943478735 -t = 71.6000, H(p,q)-H0 = -0.0090721519978030, L(p,q)-L0 = -0.0017720944615396 -t = 71.7000, H(p,q)-H0 = -0.0090721515419860, L(p,q)-L0 = -0.0017720945806758 -t = 71.8000, H(p,q)-H0 = -0.0090721508471047, L(p,q)-L0 = -0.0017720947080773 -t = 71.9000, H(p,q)-H0 = -0.0090721498577995, L(p,q)-L0 = -0.0017720948470973 -t = 72.0000, H(p,q)-H0 = -0.0090721484946692, L(p,q)-L0 = -0.0017720950019193 -t = 72.1000, H(p,q)-H0 = -0.0090721466452724, L(p,q)-L0 = -0.0017720951779303 -t = 72.2000, H(p,q)-H0 = -0.0090721441506338, L(p,q)-L0 = -0.0017720953822646 -t = 72.3000, H(p,q)-H0 = -0.0090721407848957, L(p,q)-L0 = -0.0017720956246077 -t = 72.4000, H(p,q)-H0 = -0.0090721362243098, L(p,q)-L0 = -0.0017720959184213 -t = 72.5000, H(p,q)-H0 = -0.0090721299993369, L(p,q)-L0 = -0.0017720962828538 -t = 72.6000, H(p,q)-H0 = -0.0090721214194909, L(p,q)-L0 = -0.0017720967457904 -t = 72.7000, H(p,q)-H0 = -0.0090721094533683, L(p,q)-L0 = -0.0017720973488647 -t = 72.8000, H(p,q)-H0 = -0.0090720925335971, L(p,q)-L0 = -0.0017720981559204 -t = 72.9000, H(p,q)-H0 = -0.0090720682335765, L(p,q)-L0 = -0.0017720992677591 -t = 73.0000, H(p,q)-H0 = -0.0090720327211511, L(p,q)-L0 = -0.0017721008487499 -t = 73.1000, H(p,q)-H0 = -0.0090719798175243, L(p,q)-L0 = -0.0017721031767188 -t = 73.2000, H(p,q)-H0 = -0.0090718993483431, L(p,q)-L0 = -0.0017721067405880 -t = 73.3000, H(p,q)-H0 = -0.0090717742201148, L(p,q)-L0 = -0.0017721124408663 -t = 73.4000, H(p,q)-H0 = -0.0090715752362395, L(p,q)-L0 = -0.0017721220242014 -t = 73.5000, H(p,q)-H0 = -0.0090712521552103, L(p,q)-L0 = -0.0017721390843276 -t = 73.6000, H(p,q)-H0 = -0.0090707197756448, L(p,q)-L0 = -0.0017721715309078 -t = 73.7000, H(p,q)-H0 = -0.0090698437332671, L(p,q)-L0 = -0.0017722381615727 -t = 73.8000, H(p,q)-H0 = -0.0090684635047171, L(p,q)-L0 = -0.0017723876730750 -t = 73.9000, H(p,q)-H0 = -0.0090666254832028, L(p,q)-L0 = -0.0017727585666919 -t = 74.0000, H(p,q)-H0 = -0.0090655542761282, L(p,q)-L0 = -0.0017737825675123 -t = 74.1000, H(p,q)-H0 = -0.0090692520387496, L(p,q)-L0 = -0.0017768953177677 -t = 74.2000, H(p,q)-H0 = -0.0090764543133928, L(p,q)-L0 = -0.0017867494225026 -t = 74.3000, H(p,q)-H0 = -0.0090865015519208, L(p,q)-L0 = -0.0018148093284425 -t = 74.4000, H(p,q)-H0 = -0.0093433200957809, L(p,q)-L0 = -0.0018691803156745 -t = 74.5000, H(p,q)-H0 = -0.0097912958856576, L(p,q)-L0 = -0.0019218273923377 -t = 74.6000, H(p,q)-H0 = -0.0099717590176849, L(p,q)-L0 = -0.0019433419459464 -t = 74.7000, H(p,q)-H0 = -0.0099756891620331, L(p,q)-L0 = -0.0019437146060501 -t = 74.8000, H(p,q)-H0 = -0.0099777035535575, L(p,q)-L0 = -0.0019439170434462 -t = 74.9000, H(p,q)-H0 = -0.0099854238147500, L(p,q)-L0 = -0.0019447980945843 -t = 75.0000, H(p,q)-H0 = -0.0099889577454678, L(p,q)-L0 = -0.0019451240981223 -t = 75.1000, H(p,q)-H0 = -0.0099907225868604, L(p,q)-L0 = -0.0019452588339414 -t = 75.2000, H(p,q)-H0 = -0.0099916592800522, L(p,q)-L0 = -0.0019453203700721 -t = 75.3000, H(p,q)-H0 = -0.0099921815833290, L(p,q)-L0 = -0.0019453510186034 -t = 75.4000, H(p,q)-H0 = -0.0099924855222087, L(p,q)-L0 = -0.0019453674606181 -t = 75.5000, H(p,q)-H0 = -0.0099926691877048, L(p,q)-L0 = -0.0019453768616721 -t = 75.6000, H(p,q)-H0 = -0.0099927839578055, L(p,q)-L0 = -0.0019453825407121 -t = 75.7000, H(p,q)-H0 = -0.0099928578507223, L(p,q)-L0 = -0.0019453861393932 -t = 75.8000, H(p,q)-H0 = -0.0099929067108120, L(p,q)-L0 = -0.0019453885176047 -t = 75.9000, H(p,q)-H0 = -0.0099929397976624, L(p,q)-L0 = -0.0019453901489064 -t = 76.0000, H(p,q)-H0 = -0.0099929626865476, L(p,q)-L0 = -0.0019453913058545 -t = 76.1000, H(p,q)-H0 = -0.0099929788265547, L(p,q)-L0 = -0.0019453921515604 -t = 76.2000, H(p,q)-H0 = -0.0099929904045709, L(p,q)-L0 = -0.0019453927870905 -t = 76.3000, H(p,q)-H0 = -0.0099929988385175, L(p,q)-L0 = -0.0019453932770516 -t = 76.4000, H(p,q)-H0 = -0.0099930050665622, L(p,q)-L0 = -0.0019453936639264 -t = 76.5000, H(p,q)-H0 = -0.0099930097209175, L(p,q)-L0 = -0.0019453939763810 -t = 76.6000, H(p,q)-H0 = -0.0099930132346632, L(p,q)-L0 = -0.0019453942342287 -t = 76.7000, H(p,q)-H0 = -0.0099930159087687, L(p,q)-L0 = -0.0019453944514792 -t = 76.8000, H(p,q)-H0 = -0.0099930179549358, L(p,q)-L0 = -0.0019453946382598 -t = 76.9000, H(p,q)-H0 = -0.0099930195234442, L(p,q)-L0 = -0.0019453948020579 -t = 77.0000, H(p,q)-H0 = -0.0099930207215003, L(p,q)-L0 = -0.0019453949485412 -t = 77.1000, H(p,q)-H0 = -0.0099930216254550, L(p,q)-L0 = -0.0019453950821140 -t = 77.2000, H(p,q)-H0 = -0.0099930222889737, L(p,q)-L0 = -0.0019453952063045 -t = 77.3000, H(p,q)-H0 = -0.0099930227484619, L(p,q)-L0 = -0.0019453953240427 -t = 77.4000, H(p,q)-H0 = -0.0099930230265628, L(p,q)-L0 = -0.0019453954378694 -t = 77.5000, H(p,q)-H0 = -0.0099930231342297, L(p,q)-L0 = -0.0019453955501012 -t = 77.6000, H(p,q)-H0 = -0.0099930230716538, L(p,q)-L0 = -0.0019453956629731 -t = 77.7000, H(p,q)-H0 = -0.0099930228281742, L(p,q)-L0 = -0.0019453957787718 -t = 77.8000, H(p,q)-H0 = -0.0099930223811472, L(p,q)-L0 = -0.0019453958999783 -t = 77.9000, H(p,q)-H0 = -0.0099930216936193, L(p,q)-L0 = -0.0019453960294287 -t = 78.0000, H(p,q)-H0 = -0.0099930207104675, L(p,q)-L0 = -0.0019453961705185 -t = 78.1000, H(p,q)-H0 = -0.0099930193524340, L(p,q)-L0 = -0.0019453963274751 -t = 78.2000, H(p,q)-H0 = -0.0099930175071323, L(p,q)-L0 = -0.0019453965057353 -t = 78.3000, H(p,q)-H0 = -0.0099930150155447, L(p,q)-L0 = -0.0019453967124932 -t = 78.4000, H(p,q)-H0 = -0.0099930116516529, L(p,q)-L0 = -0.0019453969575093 -t = 78.5000, H(p,q)-H0 = -0.0099930070913876, L(p,q)-L0 = -0.0019453972543433 -t = 78.6000, H(p,q)-H0 = -0.0099930008646626, L(p,q)-L0 = -0.0019453976222752 -t = 78.7000, H(p,q)-H0 = -0.0099929922801030, L(p,q)-L0 = -0.0019453980893771 -t = 78.8000, H(p,q)-H0 = -0.0099929803048895, L(p,q)-L0 = -0.0019453986975518 -t = 78.9000, H(p,q)-H0 = -0.0099929633694020, L(p,q)-L0 = -0.0019453995110439 -t = 79.0000, H(p,q)-H0 = -0.0099929390434504, L(p,q)-L0 = -0.0019454006312738 -t = 79.1000, H(p,q)-H0 = -0.0099929034891034, L(p,q)-L0 = -0.0019454022235986 -t = 79.2000, H(p,q)-H0 = -0.0099928505181908, L(p,q)-L0 = -0.0019454045674818 -t = 79.3000, H(p,q)-H0 = -0.0099927699410771, L(p,q)-L0 = -0.0019454081546778 -t = 79.4000, H(p,q)-H0 = -0.0099926446394676, L(p,q)-L0 = -0.0019454138908312 -t = 79.5000, H(p,q)-H0 = -0.0099924453775971, L(p,q)-L0 = -0.0019454235324121 -t = 79.6000, H(p,q)-H0 = -0.0099921218572024, L(p,q)-L0 = -0.0019454406931061 -t = 79.7000, H(p,q)-H0 = -0.0099915888158008, L(p,q)-L0 = -0.0019454733259514 -t = 79.8000, H(p,q)-H0 = -0.0099907119132548, L(p,q)-L0 = -0.0019455403302662 -t = 79.9000, H(p,q)-H0 = -0.0099893311045773, L(p,q)-L0 = -0.0019456906613882 -t = 80.0000, H(p,q)-H0 = -0.0099874948349223, L(p,q)-L0 = -0.0019460635333235 -t = 80.1000, H(p,q)-H0 = -0.0099864325318035, L(p,q)-L0 = -0.0019470927598084 -t = 80.2000, H(p,q)-H0 = -0.0099901407162957, L(p,q)-L0 = -0.0019502200530284 -t = 80.3000, H(p,q)-H0 = -0.0099973031746305, L(p,q)-L0 = -0.0019601120156503 -t = 80.4000, H(p,q)-H0 = -0.0100076678096364, L(p,q)-L0 = -0.0019882381312694 -t = 80.5000, H(p,q)-H0 = -0.0102652773603542, L(p,q)-L0 = -0.0020426185319661 -t = 80.6000, H(p,q)-H0 = -0.0107122095982610, L(p,q)-L0 = -0.0020951695459250 -t = 80.7000, H(p,q)-H0 = -0.0108935265306584, L(p,q)-L0 = -0.0021168275531895 -t = 80.8000, H(p,q)-H0 = -0.0108966652558362, L(p,q)-L0 = -0.0021171156794441 -t = 80.9000, H(p,q)-H0 = -0.0108980018669784, L(p,q)-L0 = -0.0021172397894572 -t = 81.0000, H(p,q)-H0 = -0.0109057163954509, L(p,q)-L0 = -0.0021181207208465 -t = 81.1000, H(p,q)-H0 = -0.0109092481893738, L(p,q)-L0 = -0.0021184469465749 -t = 81.2000, H(p,q)-H0 = -0.0109110121363254, L(p,q)-L0 = -0.0021185818700191 -t = 81.3000, H(p,q)-H0 = -0.0109119484544988, L(p,q)-L0 = -0.0021186435303976 -t = 81.4000, H(p,q)-H0 = -0.0109124706068250, L(p,q)-L0 = -0.0021186742581565 -t = 81.5000, H(p,q)-H0 = -0.0109127744907085, L(p,q)-L0 = -0.0021186907513099 -t = 81.6000, H(p,q)-H0 = -0.0109129581413182, L(p,q)-L0 = -0.0021187001863054 -t = 81.7000, H(p,q)-H0 = -0.0109130729124098, L(p,q)-L0 = -0.0021187058886171 -t = 81.8000, H(p,q)-H0 = -0.0109131468118039, L(p,q)-L0 = -0.0021187095037902 -t = 81.9000, H(p,q)-H0 = -0.0109131956795278, L(p,q)-L0 = -0.0021187118940683 -t = 82.0000, H(p,q)-H0 = -0.0109132287734842, L(p,q)-L0 = -0.0021187135344699 -t = 82.1000, H(p,q)-H0 = -0.0109132516683955, L(p,q)-L0 = -0.0021187146984795 -t = 82.2000, H(p,q)-H0 = -0.0109132678132625, L(p,q)-L0 = -0.0021187155498146 -t = 82.3000, H(p,q)-H0 = -0.0109132793950569, L(p,q)-L0 = -0.0021187161899480 -t = 82.4000, H(p,q)-H0 = -0.0109132878318280, L(p,q)-L0 = -0.0021187166837658 -t = 82.5000, H(p,q)-H0 = -0.0109132940618613, L(p,q)-L0 = -0.0021187170739476 -t = 82.6000, H(p,q)-H0 = -0.0109132987174561, L(p,q)-L0 = -0.0021187173893020 -t = 82.7000, H(p,q)-H0 = -0.0109133022317410, L(p,q)-L0 = -0.0021187176497479 -t = 82.8000, H(p,q)-H0 = -0.0109133049056946, L(p,q)-L0 = -0.0021187178693753 -t = 82.9000, H(p,q)-H0 = -0.0109133069509852, L(p,q)-L0 = -0.0021187180583759 -t = 83.0000, H(p,q)-H0 = -0.0109133085178130, L(p,q)-L0 = -0.0021187182242896 -t = 83.1000, H(p,q)-H0 = -0.0109133097132526, L(p,q)-L0 = -0.0021187183728291 -t = 83.2000, H(p,q)-H0 = -0.0109133106134618, L(p,q)-L0 = -0.0021187185084398 -t = 83.3000, H(p,q)-H0 = -0.0109133112718355, L(p,q)-L0 = -0.0021187186346895 -t = 83.4000, H(p,q)-H0 = -0.0109133117244098, L(p,q)-L0 = -0.0021187187545486 -t = 83.5000, H(p,q)-H0 = -0.0109133119933285, L(p,q)-L0 = -0.0021187188706012 -t = 83.6000, H(p,q)-H0 = -0.0109133120888704, L(p,q)-L0 = -0.0021187189852138 -t = 83.7000, H(p,q)-H0 = -0.0109133120103146, L(p,q)-L0 = -0.0021187191006796 -t = 83.8000, H(p,q)-H0 = -0.0109133117457603, L(p,q)-L0 = -0.0021187192193588 -t = 83.9000, H(p,q)-H0 = -0.0109133112708661, L(p,q)-L0 = -0.0021187193438232 -t = 84.0000, H(p,q)-H0 = -0.0109133105463348, L(p,q)-L0 = -0.0021187194770287 -t = 84.1000, H(p,q)-H0 = -0.0109133095137762, L(p,q)-L0 = -0.0021187196225296 -t = 84.2000, H(p,q)-H0 = -0.0109133080893308, L(p,q)-L0 = -0.0021187197847686 -t = 84.3000, H(p,q)-H0 = -0.0109133061540541, L(p,q)-L0 = -0.0021187199694810 -t = 84.4000, H(p,q)-H0 = -0.0109133035394668, L(p,q)-L0 = -0.0021187201842813 -t = 84.5000, H(p,q)-H0 = -0.0109133000057140, L(p,q)-L0 = -0.0021187204395356 -t = 84.6000, H(p,q)-H0 = -0.0109132952081982, L(p,q)-L0 = -0.0021187207496935 -t = 84.7000, H(p,q)-H0 = -0.0109132886459009, L(p,q)-L0 = -0.0021187211353736 -t = 84.8000, H(p,q)-H0 = -0.0109132795800588, L(p,q)-L0 = -0.0021187216267085 -t = 84.9000, H(p,q)-H0 = -0.0109132669039578, L(p,q)-L0 = -0.0021187222688603 -t = 85.0000, H(p,q)-H0 = -0.0109132489305745, L(p,q)-L0 = -0.0021187231313811 -t = 85.1000, H(p,q)-H0 = -0.0109132230394979, L(p,q)-L0 = -0.0021187243246132 -t = 85.2000, H(p,q)-H0 = -0.0109131850783282, L(p,q)-L0 = -0.0021187260294560 -t = 85.3000, H(p,q)-H0 = -0.0109131283285595, L(p,q)-L0 = -0.0021187285535456 -t = 85.4000, H(p,q)-H0 = -0.0109130416896392, L(p,q)-L0 = -0.0021187324420242 -t = 85.5000, H(p,q)-H0 = -0.0109129064569512, L(p,q)-L0 = -0.0021187387069049 -t = 85.6000, H(p,q)-H0 = -0.0109126906237351, L(p,q)-L0 = -0.0021187493289231 -t = 85.7000, H(p,q)-H0 = -0.0109123391583420, L(p,q)-L0 = -0.0021187684258649 -t = 85.8000, H(p,q)-H0 = -0.0109117594129803, L(p,q)-L0 = -0.0021188051687964 -t = 85.9000, H(p,q)-H0 = -0.0109108089979079, L(p,q)-L0 = -0.0021188816475575 -t = 86.0000, H(p,q)-H0 = -0.0109093359888048, L(p,q)-L0 = -0.0021190559410214 -t = 86.1000, H(p,q)-H0 = -0.0109074877484749, L(p,q)-L0 = -0.0021194957735100 -t = 86.2000, H(p,q)-H0 = -0.0109068714091538, L(p,q)-L0 = -0.0021207307407236 -t = 86.3000, H(p,q)-H0 = -0.0109117577875528, L(p,q)-L0 = -0.0021245275668438 -t = 86.4000, H(p,q)-H0 = -0.0109176053620308, L(p,q)-L0 = -0.0021364754662838 -t = 86.5000, H(p,q)-H0 = -0.0109427930922656, L(p,q)-L0 = -0.0021690381103824 -t = 86.6000, H(p,q)-H0 = -0.0112644651000506, L(p,q)-L0 = -0.0022260572940562 -t = 86.7000, H(p,q)-H0 = -0.0116323667023930, L(p,q)-L0 = -0.0022679916296054 -t = 86.8000, H(p,q)-H0 = -0.0116372347037963, L(p,q)-L0 = -0.0022683538164008 -t = 86.9000, H(p,q)-H0 = -0.0116454975036508, L(p,q)-L0 = -0.0022692781225820 -t = 87.0000, H(p,q)-H0 = -0.0116619947467989, L(p,q)-L0 = -0.0022714723389374 -t = 87.1000, H(p,q)-H0 = -0.0116687181480568, L(p,q)-L0 = -0.0022722141677665 -t = 87.2000, H(p,q)-H0 = -0.0116718503324800, L(p,q)-L0 = -0.0022724942307270 -t = 87.3000, H(p,q)-H0 = -0.0116734325350082, L(p,q)-L0 = -0.0022726121559400 -t = 87.4000, H(p,q)-H0 = -0.0116742798242482, L(p,q)-L0 = -0.0022726669011819 -t = 87.5000, H(p,q)-H0 = -0.0116747558965855, L(p,q)-L0 = -0.0022726945542673 -t = 87.6000, H(p,q)-H0 = -0.0116750348034620, L(p,q)-L0 = -0.0022727095705783 -t = 87.7000, H(p,q)-H0 = -0.0116752043535724, L(p,q)-L0 = -0.0022727182474204 -t = 87.8000, H(p,q)-H0 = -0.0116753108690369, L(p,q)-L0 = -0.0022727235376084 -t = 87.9000, H(p,q)-H0 = -0.0116753797737961, L(p,q)-L0 = -0.0022727269174422 -t = 88.0000, H(p,q)-H0 = -0.0116754255291172, L(p,q)-L0 = -0.0022727291675011 -t = 88.1000, H(p,q)-H0 = -0.0116754566310913, L(p,q)-L0 = -0.0022727307212435 -t = 88.2000, H(p,q)-H0 = -0.0116754782198893, L(p,q)-L0 = -0.0022727318299871 -t = 88.3000, H(p,q)-H0 = -0.0116754934893036, L(p,q)-L0 = -0.0022727326451254 -t = 88.4000, H(p,q)-H0 = -0.0116755044723642, L(p,q)-L0 = -0.0022727332610225 -t = 88.5000, H(p,q)-H0 = -0.0116755124919519, L(p,q)-L0 = -0.0022727337383271 -t = 88.6000, H(p,q)-H0 = -0.0116755184261677, L(p,q)-L0 = -0.0022727341171190 -t = 88.7000, H(p,q)-H0 = -0.0116755228684349, L(p,q)-L0 = -0.0022727344245699 -t = 88.8000, H(p,q)-H0 = -0.0116755262262619, L(p,q)-L0 = -0.0022727346795451 -t = 88.9000, H(p,q)-H0 = -0.0116755287834091, L(p,q)-L0 = -0.0022727348954440 -t = 89.0000, H(p,q)-H0 = -0.0116755307397417, L(p,q)-L0 = -0.0022727350819987 -t = 89.1000, H(p,q)-H0 = -0.0116755322371913, L(p,q)-L0 = -0.0022727352464408 -t = 89.2000, H(p,q)-H0 = -0.0116755333768903, L(p,q)-L0 = -0.0022727353942779 -t = 89.3000, H(p,q)-H0 = -0.0116755342305835, L(p,q)-L0 = -0.0022727355298210 -t = 89.4000, H(p,q)-H0 = -0.0116755348482395, L(p,q)-L0 = -0.0022727356565552 -t = 89.5000, H(p,q)-H0 = -0.0116755352630685, L(p,q)-L0 = -0.0022727357774082 -t = 89.6000, H(p,q)-H0 = -0.0116755354946961, L(p,q)-L0 = -0.0022727358949552 -t = 89.7000, H(p,q)-H0 = -0.0116755355509413, L(p,q)-L0 = -0.0022727360115843 -t = 89.8000, H(p,q)-H0 = -0.0116755354284488, L(p,q)-L0 = -0.0022727361296420 -t = 89.9000, H(p,q)-H0 = -0.0116755351122514, L(p,q)-L0 = -0.0022727362515771 -t = 90.0000, H(p,q)-H0 = -0.0116755345742000, L(p,q)-L0 = -0.0022727363800956 -t = 90.1000, H(p,q)-H0 = -0.0116755337700345, L(p,q)-L0 = -0.0022727365183433 -t = 90.2000, H(p,q)-H0 = -0.0116755326346694, L(p,q)-L0 = -0.0022727366701436 -t = 90.3000, H(p,q)-H0 = -0.0116755310749777, L(p,q)-L0 = -0.0022727368403186 -t = 90.4000, H(p,q)-H0 = -0.0116755289589217, L(p,q)-L0 = -0.0022727370351420 -t = 90.5000, H(p,q)-H0 = -0.0116755260991936, L(p,q)-L0 = -0.0022727372630031 -t = 90.6000, H(p,q)-H0 = -0.0116755222284115, L(p,q)-L0 = -0.0022727375353997 -t = 90.7000, H(p,q)-H0 = -0.0116755169610728, L(p,q)-L0 = -0.0022727378684673 -t = 90.8000, H(p,q)-H0 = -0.0116755097343482, L(p,q)-L0 = -0.0022727382853873 -t = 90.9000, H(p,q)-H0 = -0.0116754997144365, L(p,q)-L0 = -0.0022727388202846 -t = 91.0000, H(p,q)-H0 = -0.0116754856458056, L(p,q)-L0 = -0.0022727395247037 -t = 91.1000, H(p,q)-H0 = -0.0116754656038935, L(p,q)-L0 = -0.0022727404787057 -t = 91.2000, H(p,q)-H0 = -0.0116754365815127, L(p,q)-L0 = -0.0022727418105053 -t = 91.3000, H(p,q)-H0 = -0.0116753937835889, L(p,q)-L0 = -0.0022727437325208 -t = 91.4000, H(p,q)-H0 = -0.0116753294023650, L(p,q)-L0 = -0.0022727466102721 -t = 91.5000, H(p,q)-H0 = -0.0116752304582204, L(p,q)-L0 = -0.0022727511001586 -t = 91.6000, H(p,q)-H0 = -0.0116750749654719, L(p,q)-L0 = -0.0022727584393155 -t = 91.7000, H(p,q)-H0 = -0.0116748251936716, L(p,q)-L0 = -0.0022727710912600 -t = 91.8000, H(p,q)-H0 = -0.0116744164450329, L(p,q)-L0 = -0.0022727942795326 -t = 91.9000, H(p,q)-H0 = -0.0116737416172368, L(p,q)-L0 = -0.0022728399028177 -t = 92.0000, H(p,q)-H0 = -0.0116726458137774, L(p,q)-L0 = -0.0022729373581436 -t = 92.1000, H(p,q)-H0 = -0.0116710115452102, L(p,q)-L0 = -0.0022731661146591 -t = 92.2000, H(p,q)-H0 = -0.0116692481593472, L(p,q)-L0 = -0.0022737621967697 -t = 92.3000, H(p,q)-H0 = -0.0116697896420428, L(p,q)-L0 = -0.0022754874715050 -t = 92.4000, H(p,q)-H0 = -0.0116766108467816, L(p,q)-L0 = -0.0022808835902508 -t = 92.5000, H(p,q)-H0 = -0.0116791563101679, L(p,q)-L0 = -0.0022975180778501 -t = 92.6000, H(p,q)-H0 = -0.0117582336754383, L(p,q)-L0 = -0.0023386163845479 -t = 92.7000, H(p,q)-H0 = -0.0121738144424437, L(p,q)-L0 = -0.0023975048360171 -t = 92.8000, H(p,q)-H0 = -0.0123755807079817, L(p,q)-L0 = -0.0024193198001374 -t = 92.9000, H(p,q)-H0 = -0.0123955007862977, L(p,q)-L0 = -0.0024213660042965 -t = 93.0000, H(p,q)-H0 = -0.0124303709461078, L(p,q)-L0 = -0.0024262866412741 -t = 93.1000, H(p,q)-H0 = -0.0124427179370294, L(p,q)-L0 = -0.0024278520627135 -t = 93.2000, H(p,q)-H0 = -0.0124479999929756, L(p,q)-L0 = -0.0024283989214057 -t = 93.3000, H(p,q)-H0 = -0.0124505310686296, L(p,q)-L0 = -0.0024286125916958 -t = 93.4000, H(p,q)-H0 = -0.0124518344154581, L(p,q)-L0 = -0.0024287054229380 -t = 93.5000, H(p,q)-H0 = -0.0124525431794179, L(p,q)-L0 = -0.0024287497097740 -t = 93.6000, H(p,q)-H0 = -0.0124529467210605, L(p,q)-L0 = -0.0024287726102160 -t = 93.7000, H(p,q)-H0 = -0.0124531859118437, L(p,q)-L0 = -0.0024287852984457 -t = 93.8000, H(p,q)-H0 = -0.0124533328344218, L(p,q)-L0 = -0.0024287927586206 -t = 93.9000, H(p,q)-H0 = -0.0124534259915194, L(p,q)-L0 = -0.0024287973764554 -t = 94.0000, H(p,q)-H0 = -0.0124534867535154, L(p,q)-L0 = -0.0024288003663469 -t = 94.1000, H(p,q)-H0 = -0.0124535273999505, L(p,q)-L0 = -0.0024288023805756 -t = 94.2000, H(p,q)-H0 = -0.0124535552118401, L(p,q)-L0 = -0.0024288037864038 -t = 94.3000, H(p,q)-H0 = -0.0124535746311821, L(p,q)-L0 = -0.0024288047993952 -t = 94.4000, H(p,q)-H0 = -0.0124535884389774, L(p,q)-L0 = -0.0024288055508315 -t = 94.5000, H(p,q)-H0 = -0.0124535984177182, L(p,q)-L0 = -0.0024288061233486 -t = 94.6000, H(p,q)-H0 = -0.0124536057345193, L(p,q)-L0 = -0.0024288065705326 -t = 94.7000, H(p,q)-H0 = -0.0124536111684569, L(p,q)-L0 = -0.0024288069280863 -t = 94.8000, H(p,q)-H0 = -0.0124536152486828, L(p,q)-L0 = -0.0024288072204000 -t = 94.9000, H(p,q)-H0 = -0.0124536183401623, L(p,q)-L0 = -0.0024288074645308 -t = 95.0000, H(p,q)-H0 = -0.0124536206979511, L(p,q)-L0 = -0.0024288076726805 -t = 95.1000, H(p,q)-H0 = -0.0124536225021683, L(p,q)-L0 = -0.0024288078537766 -t = 95.2000, H(p,q)-H0 = -0.0124536238808726, L(p,q)-L0 = -0.0024288080145057 -t = 95.3000, H(p,q)-H0 = -0.0124536249252047, L(p,q)-L0 = -0.0024288081600046 -t = 95.4000, H(p,q)-H0 = -0.0124536256994822, L(p,q)-L0 = -0.0024288082943376 -t = 95.5000, H(p,q)-H0 = -0.0124536262479096, L(p,q)-L0 = -0.0024288084208313 -t = 95.6000, H(p,q)-H0 = -0.0124536265989559, L(p,q)-L0 = -0.0024288085423254 -t = 95.7000, H(p,q)-H0 = -0.0124536267680351, L(p,q)-L0 = -0.0024288086613631 -t = 95.8000, H(p,q)-H0 = -0.0124536267588753, L(p,q)-L0 = -0.0024288087803535 -t = 95.9000, H(p,q)-H0 = -0.0124536265637566, L(p,q)-L0 = -0.0024288089017174 -t = 96.0000, H(p,q)-H0 = -0.0124536261626464, L(p,q)-L0 = -0.0024288090280378 -t = 96.1000, H(p,q)-H0 = -0.0124536255211083, L(p,q)-L0 = -0.0024288091622261 -t = 96.2000, H(p,q)-H0 = -0.0124536245866796, L(p,q)-L0 = -0.0024288093077297 -t = 96.3000, H(p,q)-H0 = -0.0124536232831824, L(p,q)-L0 = -0.0024288094688035 -t = 96.4000, H(p,q)-H0 = -0.0124536215020822, L(p,q)-L0 = -0.0024288096508844 -t = 96.5000, H(p,q)-H0 = -0.0124536190894825, L(p,q)-L0 = -0.0024288098611279 -t = 96.6000, H(p,q)-H0 = -0.0124536158264926, L(p,q)-L0 = -0.0024288101092036 -t = 96.7000, H(p,q)-H0 = -0.0124536113993123, L(p,q)-L0 = -0.0024288104084977 -t = 96.8000, H(p,q)-H0 = -0.0124536053530625, L(p,q)-L0 = -0.0024288107779832 -t = 96.9000, H(p,q)-H0 = -0.0124535970194308, L(p,q)-L0 = -0.0024288112452016 -t = 97.0000, H(p,q)-H0 = -0.0124535854013511, L(p,q)-L0 = -0.0024288118511404 -t = 97.1000, H(p,q)-H0 = -0.0124535689858291, L(p,q)-L0 = -0.0024288126584459 -t = 97.2000, H(p,q)-H0 = -0.0124535454342959, L(p,q)-L0 = -0.0024288137656887 -t = 97.3000, H(p,q)-H0 = -0.0124535110602939, L(p,q)-L0 = -0.0024288153330081 -t = 97.4000, H(p,q)-H0 = -0.0124534599314556, L(p,q)-L0 = -0.0024288176299959 -t = 97.5000, H(p,q)-H0 = -0.0124533822988214, L(p,q)-L0 = -0.0024288211289933 -t = 97.6000, H(p,q)-H0 = -0.0124532618155920, L(p,q)-L0 = -0.0024288266957104 -t = 97.7000, H(p,q)-H0 = -0.0124530706063499, L(p,q)-L0 = -0.0024288360000898 -t = 97.8000, H(p,q)-H0 = -0.0124527607382662, L(p,q)-L0 = -0.0024288524567904 -t = 97.9000, H(p,q)-H0 = -0.0124522507900346, L(p,q)-L0 = -0.0024288835286854 -t = 98.0000, H(p,q)-H0 = -0.0124514112422069, L(p,q)-L0 = -0.0024289468110305 -t = 98.1000, H(p,q)-H0 = -0.0124500811734186, L(p,q)-L0 = -0.0024290874823376 -t = 98.2000, H(p,q)-H0 = -0.0124482695694264, L(p,q)-L0 = -0.0024294328175133 -t = 98.3000, H(p,q)-H0 = -0.0124470299590245, L(p,q)-L0 = -0.0024303759449791 -t = 98.4000, H(p,q)-H0 = -0.0124501139070228, L(p,q)-L0 = -0.0024332167691324 -t = 98.5000, H(p,q)-H0 = -0.0124576094149678, L(p,q)-L0 = -0.0024421909866428 -t = 98.6000, H(p,q)-H0 = -0.0124638902954999, L(p,q)-L0 = -0.0024681290658568 -t = 98.7000, H(p,q)-H0 = -0.0126868310443740, L(p,q)-L0 = -0.0025206442098520 -t = 98.8000, H(p,q)-H0 = -0.0131398083461249, L(p,q)-L0 = -0.0025749301252771 -t = 98.9000, H(p,q)-H0 = -0.0133186544649435, L(p,q)-L0 = -0.0025957518242055 -t = 99.0000, H(p,q)-H0 = -0.0133255524005569, L(p,q)-L0 = -0.0025964523002127 -t = 99.1000, H(p,q)-H0 = -0.0133470245619602, L(p,q)-L0 = -0.0025994011442716 -t = 99.2000, H(p,q)-H0 = -0.0133553709752087, L(p,q)-L0 = -0.0026003744569378 -t = 99.3000, H(p,q)-H0 = -0.0133591527969216, L(p,q)-L0 = -0.0026007318076002 -t = 99.4000, H(p,q)-H0 = -0.0133610292872759, L(p,q)-L0 = -0.0026008783885043 -t = 99.5000, H(p,q)-H0 = -0.0133620204630073, L(p,q)-L0 = -0.0026009448917919 -t = 99.6000, H(p,q)-H0 = -0.0133625709511405, L(p,q)-L0 = -0.0026009778290205 -t = 99.7000, H(p,q)-H0 = -0.0133628901886764, L(p,q)-L0 = -0.0026009954167799 -t = 99.8000, H(p,q)-H0 = -0.0133630825131530, L(p,q)-L0 = -0.0026010054345476 -t = 99.9000, H(p,q)-H0 = -0.0133632023698425, L(p,q)-L0 = -0.0026010114673212 -t = 100.0000, H(p,q)-H0 = -0.0133632793518368, L(p,q)-L0 = -0.0026010152805880 -Current time = 99.99999999999859 -Steps = 1056 -Step attempts = 1056 +t = 2.0000, H(p,q)-H0 = -0.0005749349147707, L(p,q)-L0 = -0.0000762193764345 +t = 4.0000, H(p,q)-H0 = -0.0006444697300625, L(p,q)-L0 = -0.0001185108356820 +t = 6.0000, H(p,q)-H0 = -0.0006133689098136, L(p,q)-L0 = -0.0002807042268080 +t = 8.0000, H(p,q)-H0 = -0.0032234469444240, L(p,q)-L0 = -0.0009861266213895 +t = 10.0000, H(p,q)-H0 = -0.0033583230552776, L(p,q)-L0 = -0.0010762080874103 +t = 12.0000, H(p,q)-H0 = -0.0031038573413563, L(p,q)-L0 = -0.0011357193830287 +t = 14.0000, H(p,q)-H0 = -0.0061317375517682, L(p,q)-L0 = -0.0020098944058914 +t = 16.0000, H(p,q)-H0 = -0.0062240100957323, L(p,q)-L0 = -0.0020580441342328 +t = 18.0000, H(p,q)-H0 = -0.0061389862168795, L(p,q)-L0 = -0.0021378671060335 +t = 20.0000, H(p,q)-H0 = -0.0079377562441827, L(p,q)-L0 = -0.0026538946822888 +t = 22.0000, H(p,q)-H0 = -0.0080415763727093, L(p,q)-L0 = -0.0027033918826268 +t = 24.0000, H(p,q)-H0 = -0.0078639348456643, L(p,q)-L0 = -0.0027380158847649 +t = 26.0000, H(p,q)-H0 = -0.0102854125280696, L(p,q)-L0 = -0.0034620216564538 +t = 28.0000, H(p,q)-H0 = -0.0104129302744793, L(p,q)-L0 = -0.0035096132947093 +t = 30.0000, H(p,q)-H0 = -0.0103044482302194, L(p,q)-L0 = -0.0036403344181903 +t = 32.0000, H(p,q)-H0 = -0.0126982516827737, L(p,q)-L0 = -0.0044017841713648 +t = 34.0000, H(p,q)-H0 = -0.0128187955424879, L(p,q)-L0 = -0.0044419918179254 +t = 36.0000, H(p,q)-H0 = -0.0126310779345615, L(p,q)-L0 = -0.0045043101428324 +t = 38.0000, H(p,q)-H0 = -0.0150606602811654, L(p,q)-L0 = -0.0052330475264255 +t = 40.0000, H(p,q)-H0 = -0.0151788622112533, L(p,q)-L0 = -0.0052699269120502 +t = 42.0000, H(p,q)-H0 = -0.0150569458100673, L(p,q)-L0 = -0.0053347236023960 +t = 44.0000, H(p,q)-H0 = -0.0173137839631075, L(p,q)-L0 = -0.0059637976433143 +t = 46.0000, H(p,q)-H0 = -0.0174338049959960, L(p,q)-L0 = -0.0060030434143741 +t = 48.0000, H(p,q)-H0 = -0.0172399835389930, L(p,q)-L0 = -0.0060999971564726 +t = 50.0000, H(p,q)-H0 = -0.0195157534390640, L(p,q)-L0 = -0.0068193944869934 +t = 52.0000, H(p,q)-H0 = -0.0196372438315059, L(p,q)-L0 = -0.0068597834913745 +t = 54.0000, H(p,q)-H0 = -0.0195195095084675, L(p,q)-L0 = -0.0069156618390294 +t = 56.0000, H(p,q)-H0 = -0.0217192761687859, L(p,q)-L0 = -0.0075983004186643 +t = 58.0000, H(p,q)-H0 = -0.0218549383018103, L(p,q)-L0 = -0.0076477810149034 +t = 60.0000, H(p,q)-H0 = -0.0216890495859771, L(p,q)-L0 = -0.0076837133297855 +t = 62.0000, H(p,q)-H0 = -0.0246172025377501, L(p,q)-L0 = -0.0085141593196727 +t = 64.0000, H(p,q)-H0 = -0.0247491804628837, L(p,q)-L0 = -0.0085680133938262 +t = 66.0000, H(p,q)-H0 = -0.0245387353644329, L(p,q)-L0 = -0.0087030775251026 +t = 68.0000, H(p,q)-H0 = -0.0270366474206774, L(p,q)-L0 = -0.0094228232239524 +t = 70.0000, H(p,q)-H0 = -0.0271390237904816, L(p,q)-L0 = -0.0094731392035774 +t = 72.0000, H(p,q)-H0 = -0.0268517871738532, L(p,q)-L0 = -0.0096375517088950 +t = 74.0000, H(p,q)-H0 = -0.0282808586526974, L(p,q)-L0 = -0.0099774460306675 +t = 76.0000, H(p,q)-H0 = -0.0283575992521828, L(p,q)-L0 = -0.0100169980641838 +t = 78.0000, H(p,q)-H0 = -0.0282724941057513, L(p,q)-L0 = -0.0102139068836424 +t = 80.0000, H(p,q)-H0 = -0.0299397134815271, L(p,q)-L0 = -0.0105234678397391 +t = 82.0000, H(p,q)-H0 = -0.0301057775046566, L(p,q)-L0 = -0.0106490472235101 +t = 84.0000, H(p,q)-H0 = -0.0325708645786491, L(p,q)-L0 = -0.0115760488284884 +t = 86.0000, H(p,q)-H0 = -0.0331440585017584, L(p,q)-L0 = -0.0116524018992400 +t = 88.0000, H(p,q)-H0 = -0.0332280670701868, L(p,q)-L0 = -0.0117474518102095 +t = 90.0000, H(p,q)-H0 = -0.0354843834356922, L(p,q)-L0 = -0.0125021628634019 +t = 92.0000, H(p,q)-H0 = -0.0358074511974705, L(p,q)-L0 = -0.0125675723192767 +t = 94.0000, H(p,q)-H0 = -0.0358075888003233, L(p,q)-L0 = -0.0126049758375582 +t = 96.0000, H(p,q)-H0 = -0.0384048589306211, L(p,q)-L0 = -0.0134178750747388 +t = 98.0000, H(p,q)-H0 = -0.0386373113353553, L(p,q)-L0 = -0.0134801609211173 +t = 100.0000, H(p,q)-H0 = -0.0385931503110380, L(p,q)-L0 = -0.0135317249790002 +Current time = 100 +Steps = 371 +Step attempts = 438 Stability limited steps = 0 -Accuracy limited steps = 1056 -Error test fails = 0 +Accuracy limited steps = 438 +Error test fails = 67 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 8.68300493183068e-07 -Last step size = 0.09999999999999423 -Current step size = 0.2846790776698955 -Explicit RHS fn evals = 6339 +Initial step size = 1.836231979046091e-06 +Last step size = 0.2400202274108805 +Current step size = 0.2400202274108805 +Explicit RHS fn evals = 2564 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out index 3c3dff90de..c7a77a94dc 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out @@ -4,1075 +4,126 @@ Problem Arguments: stepper: 1 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.01 Tf: 100 - nout: 1000 + nout: 50 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 0.1000, H(p,q)-H0 = -0.0000000160027134, L(p,q)-L0 = -0.0000000005493835 -t = 0.2000, H(p,q)-H0 = -0.0000000305302281, L(p,q)-L0 = -0.0000000008375776 -t = 0.3000, H(p,q)-H0 = -0.0000000349311686, L(p,q)-L0 = -0.0000000009378226 -t = 0.4000, H(p,q)-H0 = -0.0000000362841635, L(p,q)-L0 = -0.0000000009687934 -t = 0.5000, H(p,q)-H0 = -0.0000000368925305, L(p,q)-L0 = -0.0000000009788188 -t = 0.6000, H(p,q)-H0 = -0.0000000372114828, L(p,q)-L0 = -0.0000000009824211 -t = 0.7000, H(p,q)-H0 = -0.0000000373845837, L(p,q)-L0 = -0.0000000009838701 -t = 0.8000, H(p,q)-H0 = -0.0000000374806094, L(p,q)-L0 = -0.0000000009845156 -t = 0.9000, H(p,q)-H0 = -0.0000000375353342, L(p,q)-L0 = -0.0000000009848300 -t = 1.0000, H(p,q)-H0 = -0.0000000375674831, L(p,q)-L0 = -0.0000000009849955 -t = 1.1000, H(p,q)-H0 = -0.0000000375869624, L(p,q)-L0 = -0.0000000009850890 -t = 1.2000, H(p,q)-H0 = -0.0000000375991196, L(p,q)-L0 = -0.0000000009851442 -t = 1.3000, H(p,q)-H0 = -0.0000000376069209, L(p,q)-L0 = -0.0000000009851789 -t = 1.4000, H(p,q)-H0 = -0.0000000376120546, L(p,q)-L0 = -0.0000000009852015 -t = 1.5000, H(p,q)-H0 = -0.0000000376155123, L(p,q)-L0 = -0.0000000009852162 -t = 1.6000, H(p,q)-H0 = -0.0000000376178898, L(p,q)-L0 = -0.0000000009852270 -t = 1.7000, H(p,q)-H0 = -0.0000000376195555, L(p,q)-L0 = -0.0000000009852346 -t = 1.8000, H(p,q)-H0 = -0.0000000376207424, L(p,q)-L0 = -0.0000000009852404 -t = 1.9000, H(p,q)-H0 = -0.0000000376216013, L(p,q)-L0 = -0.0000000009852450 -t = 2.0000, H(p,q)-H0 = -0.0000000376222309, L(p,q)-L0 = -0.0000000009852485 -t = 2.1000, H(p,q)-H0 = -0.0000000376226977, L(p,q)-L0 = -0.0000000009852511 -t = 2.2000, H(p,q)-H0 = -0.0000000376230473, L(p,q)-L0 = -0.0000000009852534 -t = 2.3000, H(p,q)-H0 = -0.0000000376233115, L(p,q)-L0 = -0.0000000009852554 -t = 2.4000, H(p,q)-H0 = -0.0000000376235114, L(p,q)-L0 = -0.0000000009852563 -t = 2.5000, H(p,q)-H0 = -0.0000000376236637, L(p,q)-L0 = -0.0000000009852577 -t = 2.6000, H(p,q)-H0 = -0.0000000376237794, L(p,q)-L0 = -0.0000000009852589 -t = 2.7000, H(p,q)-H0 = -0.0000000376238660, L(p,q)-L0 = -0.0000000009852595 -t = 2.8000, H(p,q)-H0 = -0.0000000376239300, L(p,q)-L0 = -0.0000000009852608 -t = 2.9000, H(p,q)-H0 = -0.0000000376239746, L(p,q)-L0 = -0.0000000009852614 -t = 3.0000, H(p,q)-H0 = -0.0000000376240032, L(p,q)-L0 = -0.0000000009852625 -t = 3.1000, H(p,q)-H0 = -0.0000000376240172, L(p,q)-L0 = -0.0000000009852634 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.84367e-14, num. orbits is now 0.50 -t = 3.1416, H(p,q)-H0 = -0.0000000376233068, L(p,q)-L0 = -0.0000000009834125 -t = 3.2000, H(p,q)-H0 = -0.0000000376240173, L(p,q)-L0 = -0.0000000009852644 -t = 3.3000, H(p,q)-H0 = -0.0000000376240037, L(p,q)-L0 = -0.0000000009852654 -t = 3.4000, H(p,q)-H0 = -0.0000000376239754, L(p,q)-L0 = -0.0000000009852664 -t = 3.5000, H(p,q)-H0 = -0.0000000376239306, L(p,q)-L0 = -0.0000000009852675 -t = 3.6000, H(p,q)-H0 = -0.0000000376238667, L(p,q)-L0 = -0.0000000009852685 -t = 3.7000, H(p,q)-H0 = -0.0000000376237788, L(p,q)-L0 = -0.0000000009852693 -t = 3.8000, H(p,q)-H0 = -0.0000000376236617, L(p,q)-L0 = -0.0000000009852704 -t = 3.9000, H(p,q)-H0 = -0.0000000376235065, L(p,q)-L0 = -0.0000000009852718 -t = 4.0000, H(p,q)-H0 = -0.0000000376233024, L(p,q)-L0 = -0.0000000009852736 -t = 4.1000, H(p,q)-H0 = -0.0000000376230324, L(p,q)-L0 = -0.0000000009852752 -t = 4.2000, H(p,q)-H0 = -0.0000000376226734, L(p,q)-L0 = -0.0000000009852775 -t = 4.3000, H(p,q)-H0 = -0.0000000376221935, L(p,q)-L0 = -0.0000000009852809 -t = 4.4000, H(p,q)-H0 = -0.0000000376215443, L(p,q)-L0 = -0.0000000009852843 -t = 4.5000, H(p,q)-H0 = -0.0000000376206565, L(p,q)-L0 = -0.0000000009852892 -t = 4.6000, H(p,q)-H0 = -0.0000000376194254, L(p,q)-L0 = -0.0000000009852956 -t = 4.7000, H(p,q)-H0 = -0.0000000376176930, L(p,q)-L0 = -0.0000000009853038 -t = 4.8000, H(p,q)-H0 = -0.0000000376152129, L(p,q)-L0 = -0.0000000009853149 -t = 4.9000, H(p,q)-H0 = -0.0000000376115963, L(p,q)-L0 = -0.0000000009853304 -t = 5.0000, H(p,q)-H0 = -0.0000000376062106, L(p,q)-L0 = -0.0000000009853541 -t = 5.1000, H(p,q)-H0 = -0.0000000375980049, L(p,q)-L0 = -0.0000000009853905 -t = 5.2000, H(p,q)-H0 = -0.0000000375851829, L(p,q)-L0 = -0.0000000009854489 -t = 5.3000, H(p,q)-H0 = -0.0000000375645972, L(p,q)-L0 = -0.0000000009855475 -t = 5.4000, H(p,q)-H0 = -0.0000000375305920, L(p,q)-L0 = -0.0000000009857243 -t = 5.5000, H(p,q)-H0 = -0.0000000374727896, L(p,q)-L0 = -0.0000000009860630 -t = 5.6000, H(p,q)-H0 = -0.0000000373719746, L(p,q)-L0 = -0.0000000009867646 -t = 5.7000, H(p,q)-H0 = -0.0000000371929997, L(p,q)-L0 = -0.0000000009883538 -t = 5.8000, H(p,q)-H0 = -0.0000000368740779, L(p,q)-L0 = -0.0000000009923597 -t = 5.9000, H(p,q)-H0 = -0.0000000363018533, L(p,q)-L0 = -0.0000000010036497 -t = 6.0000, H(p,q)-H0 = -0.0000000350889811, L(p,q)-L0 = -0.0000000010388295 -t = 6.1000, H(p,q)-H0 = -0.0000000309316439, L(p,q)-L0 = -0.0000000011521937 -t = 6.2000, H(p,q)-H0 = -0.0000000181206687, L(p,q)-L0 = -0.0000000014682437 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.39906e-13, num. orbits is now 1.00 -t = 6.2832, H(p,q)-H0 = -0.0000001669914971, L(p,q)-L0 = -0.0000000371745501 -t = 6.3000, H(p,q)-H0 = -0.0000000119458055, L(p,q)-L0 = -0.0000000020348256 -t = 6.4000, H(p,q)-H0 = -0.0000000302352290, L(p,q)-L0 = -0.0000000025489727 -t = 6.5000, H(p,q)-H0 = -0.0000000426121982, L(p,q)-L0 = -0.0000000027950873 -t = 6.6000, H(p,q)-H0 = -0.0000000461368410, L(p,q)-L0 = -0.0000000028775315 -t = 6.7000, H(p,q)-H0 = -0.0000000472937363, L(p,q)-L0 = -0.0000000029030033 -t = 6.8000, H(p,q)-H0 = -0.0000000478367490, L(p,q)-L0 = -0.0000000029113768 -t = 6.9000, H(p,q)-H0 = -0.0000000481241171, L(p,q)-L0 = -0.0000000029144436 -t = 7.0000, H(p,q)-H0 = -0.0000000482806308, L(p,q)-L0 = -0.0000000029156998 -t = 7.1000, H(p,q)-H0 = -0.0000000483678173, L(p,q)-L0 = -0.0000000029162688 -t = 7.2000, H(p,q)-H0 = -0.0000000484177519, L(p,q)-L0 = -0.0000000029165501 -t = 7.3000, H(p,q)-H0 = -0.0000000484472411, L(p,q)-L0 = -0.0000000029167009 -t = 7.4000, H(p,q)-H0 = -0.0000000484651992, L(p,q)-L0 = -0.0000000029167861 -t = 7.5000, H(p,q)-H0 = -0.0000000484764615, L(p,q)-L0 = -0.0000000029168371 -t = 7.6000, H(p,q)-H0 = -0.0000000484837200, L(p,q)-L0 = -0.0000000029168692 -t = 7.7000, H(p,q)-H0 = -0.0000000484885161, L(p,q)-L0 = -0.0000000029168896 -t = 7.8000, H(p,q)-H0 = -0.0000000484917583, L(p,q)-L0 = -0.0000000029169037 -t = 7.9000, H(p,q)-H0 = -0.0000000484939955, L(p,q)-L0 = -0.0000000029169139 -t = 8.0000, H(p,q)-H0 = -0.0000000484955676, L(p,q)-L0 = -0.0000000029169216 -t = 8.1000, H(p,q)-H0 = -0.0000000484966906, L(p,q)-L0 = -0.0000000029169268 -t = 8.2000, H(p,q)-H0 = -0.0000000484975049, L(p,q)-L0 = -0.0000000029169313 -t = 8.3000, H(p,q)-H0 = -0.0000000484981032, L(p,q)-L0 = -0.0000000029169348 -t = 8.4000, H(p,q)-H0 = -0.0000000484985476, L(p,q)-L0 = -0.0000000029169376 -t = 8.5000, H(p,q)-H0 = -0.0000000484988811, L(p,q)-L0 = -0.0000000029169398 -t = 8.6000, H(p,q)-H0 = -0.0000000484991330, L(p,q)-L0 = -0.0000000029169418 -t = 8.7000, H(p,q)-H0 = -0.0000000484993246, L(p,q)-L0 = -0.0000000029169435 -t = 8.8000, H(p,q)-H0 = -0.0000000484994699, L(p,q)-L0 = -0.0000000029169444 -t = 8.9000, H(p,q)-H0 = -0.0000000484995802, L(p,q)-L0 = -0.0000000029169457 -t = 9.0000, H(p,q)-H0 = -0.0000000484996628, L(p,q)-L0 = -0.0000000029169466 -t = 9.1000, H(p,q)-H0 = -0.0000000484997233, L(p,q)-L0 = -0.0000000029169479 -t = 9.2000, H(p,q)-H0 = -0.0000000484997655, L(p,q)-L0 = -0.0000000029169489 -t = 9.3000, H(p,q)-H0 = -0.0000000484997914, L(p,q)-L0 = -0.0000000029169498 -t = 9.4000, H(p,q)-H0 = -0.0000000484998032, L(p,q)-L0 = -0.0000000029169505 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.19862e-14, num. orbits is now 1.50 -t = 9.4248, H(p,q)-H0 = -0.0000000484973304, L(p,q)-L0 = -0.0000000029105197 -t = 9.5000, H(p,q)-H0 = -0.0000000484998012, L(p,q)-L0 = -0.0000000029169516 -t = 9.6000, H(p,q)-H0 = -0.0000000484997852, L(p,q)-L0 = -0.0000000029169526 -t = 9.7000, H(p,q)-H0 = -0.0000000484997542, L(p,q)-L0 = -0.0000000029169535 -t = 9.8000, H(p,q)-H0 = -0.0000000484997066, L(p,q)-L0 = -0.0000000029169545 -t = 9.9000, H(p,q)-H0 = -0.0000000484996391, L(p,q)-L0 = -0.0000000029169560 -t = 10.0000, H(p,q)-H0 = -0.0000000484995469, L(p,q)-L0 = -0.0000000029169570 -t = 10.1000, H(p,q)-H0 = -0.0000000484994243, L(p,q)-L0 = -0.0000000029169585 -t = 10.2000, H(p,q)-H0 = -0.0000000484992622, L(p,q)-L0 = -0.0000000029169602 -t = 10.3000, H(p,q)-H0 = -0.0000000484990481, L(p,q)-L0 = -0.0000000029169618 -t = 10.4000, H(p,q)-H0 = -0.0000000484987651, L(p,q)-L0 = -0.0000000029169638 -t = 10.5000, H(p,q)-H0 = -0.0000000484983886, L(p,q)-L0 = -0.0000000029169663 -t = 10.6000, H(p,q)-H0 = -0.0000000484978840, L(p,q)-L0 = -0.0000000029169693 -t = 10.7000, H(p,q)-H0 = -0.0000000484972005, L(p,q)-L0 = -0.0000000029169730 -t = 10.8000, H(p,q)-H0 = -0.0000000484962628, L(p,q)-L0 = -0.0000000029169777 -t = 10.9000, H(p,q)-H0 = -0.0000000484949603, L(p,q)-L0 = -0.0000000029169837 -t = 11.0000, H(p,q)-H0 = -0.0000000484931224, L(p,q)-L0 = -0.0000000029169920 -t = 11.1000, H(p,q)-H0 = -0.0000000484904837, L(p,q)-L0 = -0.0000000029170040 -t = 11.2000, H(p,q)-H0 = -0.0000000484866225, L(p,q)-L0 = -0.0000000029170210 -t = 11.3000, H(p,q)-H0 = -0.0000000484808514, L(p,q)-L0 = -0.0000000029170464 -t = 11.4000, H(p,q)-H0 = -0.0000000484720216, L(p,q)-L0 = -0.0000000029170855 -t = 11.5000, H(p,q)-H0 = -0.0000000484581644, L(p,q)-L0 = -0.0000000029171492 -t = 11.6000, H(p,q)-H0 = -0.0000000484358113, L(p,q)-L0 = -0.0000000029172574 -t = 11.7000, H(p,q)-H0 = -0.0000000483987055, L(p,q)-L0 = -0.0000000029174534 -t = 11.8000, H(p,q)-H0 = -0.0000000483353410, L(p,q)-L0 = -0.0000000029178340 -t = 11.9000, H(p,q)-H0 = -0.0000000482244114, L(p,q)-L0 = -0.0000000029186326 -t = 12.0000, H(p,q)-H0 = -0.0000000480271497, L(p,q)-L0 = -0.0000000029204761 -t = 12.1000, H(p,q)-H0 = -0.0000000476758215, L(p,q)-L0 = -0.0000000029252073 -t = 12.2000, H(p,q)-H0 = -0.0000000470399959, L(p,q)-L0 = -0.0000000029387919 -t = 12.3000, H(p,q)-H0 = -0.0000000455998068, L(p,q)-L0 = -0.0000000029816551 -t = 12.4000, H(p,q)-H0 = -0.0000000403673206, L(p,q)-L0 = -0.0000000031186767 -t = 12.5000, H(p,q)-H0 = -0.0000000264097049, L(p,q)-L0 = -0.0000000034814185 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.79189e-13, num. orbits is now 2.00 -t = 12.5664, H(p,q)-H0 = -0.0000001990599761, L(p,q)-L0 = -0.0000000438879749 -t = 12.6000, H(p,q)-H0 = -0.0000000248257395, L(p,q)-L0 = -0.0000000040677957 -t = 12.7000, H(p,q)-H0 = -0.0000000441475145, L(p,q)-L0 = -0.0000000045400393 -t = 12.8000, H(p,q)-H0 = -0.0000000544472503, L(p,q)-L0 = -0.0000000047481248 -t = 12.9000, H(p,q)-H0 = -0.0000000572878029, L(p,q)-L0 = -0.0000000048157982 -t = 13.0000, H(p,q)-H0 = -0.0000000582880573, L(p,q)-L0 = -0.0000000048367885 -t = 13.1000, H(p,q)-H0 = -0.0000000587741035, L(p,q)-L0 = -0.0000000048438051 -t = 13.2000, H(p,q)-H0 = -0.0000000590331863, L(p,q)-L0 = -0.0000000048464244 -t = 13.3000, H(p,q)-H0 = -0.0000000591747902, L(p,q)-L0 = -0.0000000048475159 -t = 13.4000, H(p,q)-H0 = -0.0000000592540124, L(p,q)-L0 = -0.0000000048480178 -t = 13.5000, H(p,q)-H0 = -0.0000000592996148, L(p,q)-L0 = -0.0000000048482691 -t = 13.6000, H(p,q)-H0 = -0.0000000593266857, L(p,q)-L0 = -0.0000000048484048 -t = 13.7000, H(p,q)-H0 = -0.0000000593432556, L(p,q)-L0 = -0.0000000048484827 -t = 13.8000, H(p,q)-H0 = -0.0000000593536968, L(p,q)-L0 = -0.0000000048485300 -t = 13.9000, H(p,q)-H0 = -0.0000000593604556, L(p,q)-L0 = -0.0000000048485598 -t = 14.0000, H(p,q)-H0 = -0.0000000593649396, L(p,q)-L0 = -0.0000000048485798 -t = 14.1000, H(p,q)-H0 = -0.0000000593679819, L(p,q)-L0 = -0.0000000048485937 -t = 14.2000, H(p,q)-H0 = -0.0000000593700872, L(p,q)-L0 = -0.0000000048486032 -t = 14.3000, H(p,q)-H0 = -0.0000000593715705, L(p,q)-L0 = -0.0000000048486097 -t = 14.4000, H(p,q)-H0 = -0.0000000593726339, L(p,q)-L0 = -0.0000000048486152 -t = 14.5000, H(p,q)-H0 = -0.0000000593734059, L(p,q)-L0 = -0.0000000048486188 -t = 14.6000, H(p,q)-H0 = -0.0000000593739744, L(p,q)-L0 = -0.0000000048486219 -t = 14.7000, H(p,q)-H0 = -0.0000000593743977, L(p,q)-L0 = -0.0000000048486245 -t = 14.8000, H(p,q)-H0 = -0.0000000593747158, L(p,q)-L0 = -0.0000000048486268 -t = 14.9000, H(p,q)-H0 = -0.0000000593749566, L(p,q)-L0 = -0.0000000048486291 -t = 15.0000, H(p,q)-H0 = -0.0000000593751394, L(p,q)-L0 = -0.0000000048486303 -t = 15.1000, H(p,q)-H0 = -0.0000000593752784, L(p,q)-L0 = -0.0000000048486318 -t = 15.2000, H(p,q)-H0 = -0.0000000593753837, L(p,q)-L0 = -0.0000000048486331 -t = 15.3000, H(p,q)-H0 = -0.0000000593754625, L(p,q)-L0 = -0.0000000048486346 -t = 15.4000, H(p,q)-H0 = -0.0000000593755194, L(p,q)-L0 = -0.0000000048486355 -t = 15.5000, H(p,q)-H0 = -0.0000000593755587, L(p,q)-L0 = -0.0000000048486369 -t = 15.6000, H(p,q)-H0 = -0.0000000593755822, L(p,q)-L0 = -0.0000000048486377 -t = 15.7000, H(p,q)-H0 = -0.0000000593755920, L(p,q)-L0 = -0.0000000048486393 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.76977e-16, num. orbits is now 2.50 -t = 15.7080, H(p,q)-H0 = -0.0000000593745442, L(p,q)-L0 = -0.0000000048459146 -t = 15.8000, H(p,q)-H0 = -0.0000000593755872, L(p,q)-L0 = -0.0000000048486396 -t = 15.9000, H(p,q)-H0 = -0.0000000593755689, L(p,q)-L0 = -0.0000000048486408 -t = 16.0000, H(p,q)-H0 = -0.0000000593755352, L(p,q)-L0 = -0.0000000048486415 -t = 16.1000, H(p,q)-H0 = -0.0000000593754842, L(p,q)-L0 = -0.0000000048486424 -t = 16.2000, H(p,q)-H0 = -0.0000000593754125, L(p,q)-L0 = -0.0000000048486432 -t = 16.3000, H(p,q)-H0 = -0.0000000593753153, L(p,q)-L0 = -0.0000000048486436 -t = 16.4000, H(p,q)-H0 = -0.0000000593751868, L(p,q)-L0 = -0.0000000048486454 -t = 16.5000, H(p,q)-H0 = -0.0000000593750168, L(p,q)-L0 = -0.0000000048486469 -t = 16.6000, H(p,q)-H0 = -0.0000000593747926, L(p,q)-L0 = -0.0000000048486486 -t = 16.7000, H(p,q)-H0 = -0.0000000593744955, L(p,q)-L0 = -0.0000000048486504 -t = 16.8000, H(p,q)-H0 = -0.0000000593741000, L(p,q)-L0 = -0.0000000048486527 -t = 16.9000, H(p,q)-H0 = -0.0000000593735690, L(p,q)-L0 = -0.0000000048486554 -t = 17.0000, H(p,q)-H0 = -0.0000000593728482, L(p,q)-L0 = -0.0000000048486588 -t = 17.1000, H(p,q)-H0 = -0.0000000593718588, L(p,q)-L0 = -0.0000000048486637 -t = 17.2000, H(p,q)-H0 = -0.0000000593704803, L(p,q)-L0 = -0.0000000048486704 -t = 17.3000, H(p,q)-H0 = -0.0000000593685294, L(p,q)-L0 = -0.0000000048486791 -t = 17.4000, H(p,q)-H0 = -0.0000000593657208, L(p,q)-L0 = -0.0000000048486918 -t = 17.5000, H(p,q)-H0 = -0.0000000593615960, L(p,q)-L0 = -0.0000000048487099 -t = 17.6000, H(p,q)-H0 = -0.0000000593554075, L(p,q)-L0 = -0.0000000048487371 -t = 17.7000, H(p,q)-H0 = -0.0000000593459000, L(p,q)-L0 = -0.0000000048487790 -t = 17.8000, H(p,q)-H0 = -0.0000000593309115, L(p,q)-L0 = -0.0000000048488482 -t = 17.9000, H(p,q)-H0 = -0.0000000593066188, L(p,q)-L0 = -0.0000000048489672 -t = 18.0000, H(p,q)-H0 = -0.0000000592660978, L(p,q)-L0 = -0.0000000048491851 -t = 18.1000, H(p,q)-H0 = -0.0000000591965846, L(p,q)-L0 = -0.0000000048496129 -t = 18.2000, H(p,q)-H0 = -0.0000000590744705, L(p,q)-L0 = -0.0000000048505251 -t = 18.3000, H(p,q)-H0 = -0.0000000588570473, L(p,q)-L0 = -0.0000000048526683 -t = 18.4000, H(p,q)-H0 = -0.0000000584699920, L(p,q)-L0 = -0.0000000048582733 -t = 18.5000, H(p,q)-H0 = -0.0000000577596622, L(p,q)-L0 = -0.0000000048746636 -t = 18.6000, H(p,q)-H0 = -0.0000000560199105, L(p,q)-L0 = -0.0000000049269229 -t = 18.7000, H(p,q)-H0 = -0.0000000494869183, L(p,q)-L0 = -0.0000000050917097 -t = 18.8000, H(p,q)-H0 = -0.0000000350383482, L(p,q)-L0 = -0.0000000055021806 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.05664e-13, num. orbits is now 3.00 -t = 18.8496, H(p,q)-H0 = -0.0000000386706860, L(p,q)-L0 = -0.0000000071587682 -t = 18.9000, H(p,q)-H0 = -0.0000000384657535, L(p,q)-L0 = -0.0000000060967349 -t = 19.0000, H(p,q)-H0 = -0.0000000576671775, L(p,q)-L0 = -0.0000000065229255 -t = 19.1000, H(p,q)-H0 = -0.0000000660850508, L(p,q)-L0 = -0.0000000066973844 -t = 19.2000, H(p,q)-H0 = -0.0000000683962778, L(p,q)-L0 = -0.0000000067528785 -t = 19.3000, H(p,q)-H0 = -0.0000000692693363, L(p,q)-L0 = -0.0000000067702148 -t = 19.4000, H(p,q)-H0 = -0.0000000697053074, L(p,q)-L0 = -0.0000000067761124 -t = 19.5000, H(p,q)-H0 = -0.0000000699390287, L(p,q)-L0 = -0.0000000067783563 -t = 19.6000, H(p,q)-H0 = -0.0000000700672274, L(p,q)-L0 = -0.0000000067793084 -t = 19.7000, H(p,q)-H0 = -0.0000000701392731, L(p,q)-L0 = -0.0000000067797532 -t = 19.8000, H(p,q)-H0 = -0.0000000701809573, L(p,q)-L0 = -0.0000000067799798 -t = 19.9000, H(p,q)-H0 = -0.0000000702058314, L(p,q)-L0 = -0.0000000067801036 -t = 20.0000, H(p,q)-H0 = -0.0000000702211327, L(p,q)-L0 = -0.0000000067801749 -t = 20.1000, H(p,q)-H0 = -0.0000000702308205, L(p,q)-L0 = -0.0000000067802189 -t = 20.2000, H(p,q)-H0 = -0.0000000702371183, L(p,q)-L0 = -0.0000000067802470 -t = 20.3000, H(p,q)-H0 = -0.0000000702413129, L(p,q)-L0 = -0.0000000067802653 -t = 20.4000, H(p,q)-H0 = -0.0000000702441684, L(p,q)-L0 = -0.0000000067802781 -t = 20.5000, H(p,q)-H0 = -0.0000000702461509, L(p,q)-L0 = -0.0000000067802873 -t = 20.6000, H(p,q)-H0 = -0.0000000702475522, L(p,q)-L0 = -0.0000000067802939 -t = 20.7000, H(p,q)-H0 = -0.0000000702485590, L(p,q)-L0 = -0.0000000067802990 -t = 20.8000, H(p,q)-H0 = -0.0000000702492926, L(p,q)-L0 = -0.0000000067803034 -t = 20.9000, H(p,q)-H0 = -0.0000000702498333, L(p,q)-L0 = -0.0000000067803063 -t = 21.0000, H(p,q)-H0 = -0.0000000702502367, L(p,q)-L0 = -0.0000000067803091 -t = 21.1000, H(p,q)-H0 = -0.0000000702505401, L(p,q)-L0 = -0.0000000067803113 -t = 21.2000, H(p,q)-H0 = -0.0000000702507700, L(p,q)-L0 = -0.0000000067803136 -t = 21.3000, H(p,q)-H0 = -0.0000000702509446, L(p,q)-L0 = -0.0000000067803151 -t = 21.4000, H(p,q)-H0 = -0.0000000702510772, L(p,q)-L0 = -0.0000000067803160 -t = 21.5000, H(p,q)-H0 = -0.0000000702511773, L(p,q)-L0 = -0.0000000067803172 -t = 21.6000, H(p,q)-H0 = -0.0000000702512519, L(p,q)-L0 = -0.0000000067803183 -t = 21.7000, H(p,q)-H0 = -0.0000000702513059, L(p,q)-L0 = -0.0000000067803194 -t = 21.8000, H(p,q)-H0 = -0.0000000702513424, L(p,q)-L0 = -0.0000000067803205 -t = 21.9000, H(p,q)-H0 = -0.0000000702513636, L(p,q)-L0 = -0.0000000067803220 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.25419e-16, num. orbits is now 3.50 -t = 21.9911, H(p,q)-H0 = -0.0000000702509633, L(p,q)-L0 = -0.0000000067792636 -t = 22.0000, H(p,q)-H0 = -0.0000000702513707, L(p,q)-L0 = -0.0000000067803231 -t = 22.1000, H(p,q)-H0 = -0.0000000702513645, L(p,q)-L0 = -0.0000000067803247 -t = 22.2000, H(p,q)-H0 = -0.0000000702513435, L(p,q)-L0 = -0.0000000067803255 -t = 22.3000, H(p,q)-H0 = -0.0000000702513069, L(p,q)-L0 = -0.0000000067803260 -t = 22.4000, H(p,q)-H0 = -0.0000000702512530, L(p,q)-L0 = -0.0000000067803273 -t = 22.5000, H(p,q)-H0 = -0.0000000702511778, L(p,q)-L0 = -0.0000000067803285 -t = 22.6000, H(p,q)-H0 = -0.0000000702510757, L(p,q)-L0 = -0.0000000067803292 -t = 22.7000, H(p,q)-H0 = -0.0000000702509411, L(p,q)-L0 = -0.0000000067803307 -t = 22.8000, H(p,q)-H0 = -0.0000000702507630, L(p,q)-L0 = -0.0000000067803323 -t = 22.9000, H(p,q)-H0 = -0.0000000702505277, L(p,q)-L0 = -0.0000000067803340 -t = 23.0000, H(p,q)-H0 = -0.0000000702502163, L(p,q)-L0 = -0.0000000067803360 -t = 23.1000, H(p,q)-H0 = -0.0000000702498012, L(p,q)-L0 = -0.0000000067803385 -t = 23.2000, H(p,q)-H0 = -0.0000000702492429, L(p,q)-L0 = -0.0000000067803414 -t = 23.3000, H(p,q)-H0 = -0.0000000702484836, L(p,q)-L0 = -0.0000000067803453 -t = 23.4000, H(p,q)-H0 = -0.0000000702474385, L(p,q)-L0 = -0.0000000067803507 -t = 23.5000, H(p,q)-H0 = -0.0000000702459789, L(p,q)-L0 = -0.0000000067803581 -t = 23.6000, H(p,q)-H0 = -0.0000000702439071, L(p,q)-L0 = -0.0000000067803672 -t = 23.7000, H(p,q)-H0 = -0.0000000702409146, L(p,q)-L0 = -0.0000000067803806 -t = 23.8000, H(p,q)-H0 = -0.0000000702365057, L(p,q)-L0 = -0.0000000067804000 -t = 23.9000, H(p,q)-H0 = -0.0000000702298657, L(p,q)-L0 = -0.0000000067804297 -t = 24.0000, H(p,q)-H0 = -0.0000000702196210, L(p,q)-L0 = -0.0000000067804752 -t = 24.1000, H(p,q)-H0 = -0.0000000702033971, L(p,q)-L0 = -0.0000000067805509 -t = 24.2000, H(p,q)-H0 = -0.0000000701769752, L(p,q)-L0 = -0.0000000067806820 -t = 24.3000, H(p,q)-H0 = -0.0000000701326901, L(p,q)-L0 = -0.0000000067809255 -t = 24.4000, H(p,q)-H0 = -0.0000000700563808, L(p,q)-L0 = -0.0000000067814084 -t = 24.5000, H(p,q)-H0 = -0.0000000699219017, L(p,q)-L0 = -0.0000000067824543 -t = 24.6000, H(p,q)-H0 = -0.0000000696822704, L(p,q)-L0 = -0.0000000067849544 -t = 24.7000, H(p,q)-H0 = -0.0000000692557109, L(p,q)-L0 = -0.0000000067916174 -t = 24.8000, H(p,q)-H0 = -0.0000000684561350, L(p,q)-L0 = -0.0000000068114442 -t = 24.9000, H(p,q)-H0 = -0.0000000663202426, L(p,q)-L0 = -0.0000000068751607 -t = 25.0000, H(p,q)-H0 = -0.0000000582801603, L(p,q)-L0 = -0.0000000070720761 -t = 25.1000, H(p,q)-H0 = -0.0000000442582238, L(p,q)-L0 = -0.0000000075293279 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.58359e-13, num. orbits is now 4.00 -t = 25.1327, H(p,q)-H0 = -0.0000001744439233, L(p,q)-L0 = -0.0000000372869364 -t = 25.2000, H(p,q)-H0 = -0.0000000526228769, L(p,q)-L0 = -0.0000000081198200 -t = 25.3000, H(p,q)-H0 = -0.0000000707752226, L(p,q)-L0 = -0.0000000084982439 -t = 25.4000, H(p,q)-H0 = -0.0000000775684346, L(p,q)-L0 = -0.0000000086435084 -t = 25.5000, H(p,q)-H0 = -0.0000000794713557, L(p,q)-L0 = -0.0000000086890063 -t = 25.6000, H(p,q)-H0 = -0.0000000802393612, L(p,q)-L0 = -0.0000000087033629 -t = 25.7000, H(p,q)-H0 = -0.0000000806310355, L(p,q)-L0 = -0.0000000087083367 -t = 25.8000, H(p,q)-H0 = -0.0000000808419982, L(p,q)-L0 = -0.0000000087102652 -t = 25.9000, H(p,q)-H0 = -0.0000000809581407, L(p,q)-L0 = -0.0000000087110980 -t = 26.0000, H(p,q)-H0 = -0.0000000810237136, L(p,q)-L0 = -0.0000000087114930 -t = 26.1000, H(p,q)-H0 = -0.0000000810618471, L(p,q)-L0 = -0.0000000087116955 -t = 26.2000, H(p,q)-H0 = -0.0000000810847210, L(p,q)-L0 = -0.0000000087118069 -t = 26.3000, H(p,q)-H0 = -0.0000000810988622, L(p,q)-L0 = -0.0000000087118719 -t = 26.4000, H(p,q)-H0 = -0.0000000811078569, L(p,q)-L0 = -0.0000000087119124 -t = 26.5000, H(p,q)-H0 = -0.0000000811137293, L(p,q)-L0 = -0.0000000087119387 -t = 26.6000, H(p,q)-H0 = -0.0000000811176550, L(p,q)-L0 = -0.0000000087119558 -t = 26.7000, H(p,q)-H0 = -0.0000000811203367, L(p,q)-L0 = -0.0000000087119680 -t = 26.8000, H(p,q)-H0 = -0.0000000811222050, L(p,q)-L0 = -0.0000000087119767 -t = 26.9000, H(p,q)-H0 = -0.0000000811235288, L(p,q)-L0 = -0.0000000087119825 -t = 27.0000, H(p,q)-H0 = -0.0000000811244821, L(p,q)-L0 = -0.0000000087119875 -t = 27.1000, H(p,q)-H0 = -0.0000000811251781, L(p,q)-L0 = -0.0000000087119911 -t = 27.2000, H(p,q)-H0 = -0.0000000811256926, L(p,q)-L0 = -0.0000000087119941 -t = 27.3000, H(p,q)-H0 = -0.0000000811260765, L(p,q)-L0 = -0.0000000087119965 -t = 27.4000, H(p,q)-H0 = -0.0000000811263661, L(p,q)-L0 = -0.0000000087119989 -t = 27.5000, H(p,q)-H0 = -0.0000000811265854, L(p,q)-L0 = -0.0000000087120005 -t = 27.6000, H(p,q)-H0 = -0.0000000811267514, L(p,q)-L0 = -0.0000000087120012 -t = 27.7000, H(p,q)-H0 = -0.0000000811268779, L(p,q)-L0 = -0.0000000087120021 -t = 27.8000, H(p,q)-H0 = -0.0000000811269734, L(p,q)-L0 = -0.0000000087120035 -t = 27.9000, H(p,q)-H0 = -0.0000000811270443, L(p,q)-L0 = -0.0000000087120050 -t = 28.0000, H(p,q)-H0 = -0.0000000811270948, L(p,q)-L0 = -0.0000000087120056 -t = 28.1000, H(p,q)-H0 = -0.0000000811271282, L(p,q)-L0 = -0.0000000087120061 -t = 28.2000, H(p,q)-H0 = -0.0000000811271469, L(p,q)-L0 = -0.0000000087120071 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.5626e-13, num. orbits is now 4.50 -t = 28.2743, H(p,q)-H0 = -0.0000000811247572, L(p,q)-L0 = -0.0000000087057825 -t = 28.3000, H(p,q)-H0 = -0.0000000811271516, L(p,q)-L0 = -0.0000000087120080 -t = 28.4000, H(p,q)-H0 = -0.0000000811271426, L(p,q)-L0 = -0.0000000087120091 -t = 28.5000, H(p,q)-H0 = -0.0000000811271192, L(p,q)-L0 = -0.0000000087120101 -t = 28.6000, H(p,q)-H0 = -0.0000000811270799, L(p,q)-L0 = -0.0000000087120108 -t = 28.7000, H(p,q)-H0 = -0.0000000811270225, L(p,q)-L0 = -0.0000000087120117 -t = 28.8000, H(p,q)-H0 = -0.0000000811269429, L(p,q)-L0 = -0.0000000087120126 -t = 28.9000, H(p,q)-H0 = -0.0000000811268361, L(p,q)-L0 = -0.0000000087120136 -t = 29.0000, H(p,q)-H0 = -0.0000000811266948, L(p,q)-L0 = -0.0000000087120149 -t = 29.1000, H(p,q)-H0 = -0.0000000811265081, L(p,q)-L0 = -0.0000000087120162 -t = 29.2000, H(p,q)-H0 = -0.0000000811262618, L(p,q)-L0 = -0.0000000087120184 -t = 29.3000, H(p,q)-H0 = -0.0000000811259354, L(p,q)-L0 = -0.0000000087120207 -t = 29.4000, H(p,q)-H0 = -0.0000000811254993, L(p,q)-L0 = -0.0000000087120232 -t = 29.5000, H(p,q)-H0 = -0.0000000811249120, L(p,q)-L0 = -0.0000000087120268 -t = 29.6000, H(p,q)-H0 = -0.0000000811241112, L(p,q)-L0 = -0.0000000087120304 -t = 29.7000, H(p,q)-H0 = -0.0000000811230065, L(p,q)-L0 = -0.0000000087120356 -t = 29.8000, H(p,q)-H0 = -0.0000000811214600, L(p,q)-L0 = -0.0000000087120429 -t = 29.9000, H(p,q)-H0 = -0.0000000811192591, L(p,q)-L0 = -0.0000000087120523 -t = 30.0000, H(p,q)-H0 = -0.0000000811160698, L(p,q)-L0 = -0.0000000087120662 -t = 30.1000, H(p,q)-H0 = -0.0000000811113540, L(p,q)-L0 = -0.0000000087120869 -t = 30.2000, H(p,q)-H0 = -0.0000000811042242, L(p,q)-L0 = -0.0000000087121187 -t = 30.3000, H(p,q)-H0 = -0.0000000810931766, L(p,q)-L0 = -0.0000000087121682 -t = 30.4000, H(p,q)-H0 = -0.0000000810756006, L(p,q)-L0 = -0.0000000087122506 -t = 30.5000, H(p,q)-H0 = -0.0000000810468392, L(p,q)-L0 = -0.0000000087123952 -t = 30.6000, H(p,q)-H0 = -0.0000000809983994, L(p,q)-L0 = -0.0000000087126659 -t = 30.7000, H(p,q)-H0 = -0.0000000809145750, L(p,q)-L0 = -0.0000000087132126 -t = 30.8000, H(p,q)-H0 = -0.0000000807664309, L(p,q)-L0 = -0.0000000087144150 -t = 30.9000, H(p,q)-H0 = -0.0000000805023523, L(p,q)-L0 = -0.0000000087173400 -t = 31.0000, H(p,q)-H0 = -0.0000000800318825, L(p,q)-L0 = -0.0000000087252835 -t = 31.1000, H(p,q)-H0 = -0.0000000791227814, L(p,q)-L0 = -0.0000000087493244 -t = 31.2000, H(p,q)-H0 = -0.0000000764649557, L(p,q)-L0 = -0.0000000088269498 -t = 31.3000, H(p,q)-H0 = -0.0000000667737108, L(p,q)-L0 = -0.0000000090604118 -t = 31.4000, H(p,q)-H0 = -0.0000000542914591, L(p,q)-L0 = -0.0000000095611543 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 7.93636e-16, num. orbits is now 5.00 -t = 31.4159, H(p,q)-H0 = -0.0000002477778185, L(p,q)-L0 = -0.0000000533154386 -t = 31.5000, H(p,q)-H0 = -0.0000000670306719, L(p,q)-L0 = -0.0000000101356428 -t = 31.6000, H(p,q)-H0 = -0.0000000834908505, L(p,q)-L0 = -0.0000000104667233 -t = 31.7000, H(p,q)-H0 = -0.0000000889325074, L(p,q)-L0 = -0.0000000105870224 -t = 31.8000, H(p,q)-H0 = -0.0000000905197366, L(p,q)-L0 = -0.0000000106243445 -t = 31.9000, H(p,q)-H0 = -0.0000000911995413, L(p,q)-L0 = -0.0000000106362668 -t = 32.0000, H(p,q)-H0 = -0.0000000915518402, L(p,q)-L0 = -0.0000000106404743 -t = 32.1000, H(p,q)-H0 = -0.0000000917423686, L(p,q)-L0 = -0.0000000106421368 -t = 32.2000, H(p,q)-H0 = -0.0000000918476626, L(p,q)-L0 = -0.0000000106428659 -t = 32.3000, H(p,q)-H0 = -0.0000000919073938, L(p,q)-L0 = -0.0000000106432165 -t = 32.4000, H(p,q)-H0 = -0.0000000919423115, L(p,q)-L0 = -0.0000000106433993 -t = 32.5000, H(p,q)-H0 = -0.0000000919633653, L(p,q)-L0 = -0.0000000106435013 -t = 32.6000, H(p,q)-H0 = -0.0000000919764453, L(p,q)-L0 = -0.0000000106435613 -t = 32.7000, H(p,q)-H0 = -0.0000000919848028, L(p,q)-L0 = -0.0000000106435986 -t = 32.8000, H(p,q)-H0 = -0.0000000919902816, L(p,q)-L0 = -0.0000000106436229 -t = 32.9000, H(p,q)-H0 = -0.0000000919939582, L(p,q)-L0 = -0.0000000106436391 -t = 33.0000, H(p,q)-H0 = -0.0000000919964785, L(p,q)-L0 = -0.0000000106436504 -t = 33.1000, H(p,q)-H0 = -0.0000000919982395, L(p,q)-L0 = -0.0000000106436585 -t = 33.2000, H(p,q)-H0 = -0.0000000919994916, L(p,q)-L0 = -0.0000000106436651 -t = 33.3000, H(p,q)-H0 = -0.0000000920003955, L(p,q)-L0 = -0.0000000106436697 -t = 33.4000, H(p,q)-H0 = -0.0000000920010561, L(p,q)-L0 = -0.0000000106436733 -t = 33.5000, H(p,q)-H0 = -0.0000000920015450, L(p,q)-L0 = -0.0000000106436756 -t = 33.6000, H(p,q)-H0 = -0.0000000920019114, L(p,q)-L0 = -0.0000000106436783 -t = 33.7000, H(p,q)-H0 = -0.0000000920021879, L(p,q)-L0 = -0.0000000106436806 -t = 33.8000, H(p,q)-H0 = -0.0000000920023973, L(p,q)-L0 = -0.0000000106436824 -t = 33.9000, H(p,q)-H0 = -0.0000000920025567, L(p,q)-L0 = -0.0000000106436839 -t = 34.0000, H(p,q)-H0 = -0.0000000920026775, L(p,q)-L0 = -0.0000000106436852 -t = 34.1000, H(p,q)-H0 = -0.0000000920027685, L(p,q)-L0 = -0.0000000106436867 -t = 34.2000, H(p,q)-H0 = -0.0000000920028356, L(p,q)-L0 = -0.0000000106436875 -t = 34.3000, H(p,q)-H0 = -0.0000000920028832, L(p,q)-L0 = -0.0000000106436883 -t = 34.4000, H(p,q)-H0 = -0.0000000920029144, L(p,q)-L0 = -0.0000000106436893 -t = 34.5000, H(p,q)-H0 = -0.0000000920029305, L(p,q)-L0 = -0.0000000106436898 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.90995e-13, num. orbits is now 5.50 -t = 34.5575, H(p,q)-H0 = -0.0000000920015440, L(p,q)-L0 = -0.0000000106400774 -t = 34.6000, H(p,q)-H0 = -0.0000000920029328, L(p,q)-L0 = -0.0000000106436905 -t = 34.7000, H(p,q)-H0 = -0.0000000920029215, L(p,q)-L0 = -0.0000000106436917 -t = 34.8000, H(p,q)-H0 = -0.0000000920028955, L(p,q)-L0 = -0.0000000106436923 -t = 34.9000, H(p,q)-H0 = -0.0000000920028534, L(p,q)-L0 = -0.0000000106436931 -t = 35.0000, H(p,q)-H0 = -0.0000000920027924, L(p,q)-L0 = -0.0000000106436939 -t = 35.1000, H(p,q)-H0 = -0.0000000920027089, L(p,q)-L0 = -0.0000000106436953 -t = 35.2000, H(p,q)-H0 = -0.0000000920025971, L(p,q)-L0 = -0.0000000106436966 -t = 35.3000, H(p,q)-H0 = -0.0000000920024491, L(p,q)-L0 = -0.0000000106436981 -t = 35.4000, H(p,q)-H0 = -0.0000000920022534, L(p,q)-L0 = -0.0000000106436995 -t = 35.5000, H(p,q)-H0 = -0.0000000920019956, L(p,q)-L0 = -0.0000000106437017 -t = 35.6000, H(p,q)-H0 = -0.0000000920016526, L(p,q)-L0 = -0.0000000106437037 -t = 35.7000, H(p,q)-H0 = -0.0000000920011944, L(p,q)-L0 = -0.0000000106437062 -t = 35.8000, H(p,q)-H0 = -0.0000000920005760, L(p,q)-L0 = -0.0000000106437097 -t = 35.9000, H(p,q)-H0 = -0.0000000919997319, L(p,q)-L0 = -0.0000000106437141 -t = 36.0000, H(p,q)-H0 = -0.0000000919985645, L(p,q)-L0 = -0.0000000106437201 -t = 36.1000, H(p,q)-H0 = -0.0000000919969256, L(p,q)-L0 = -0.0000000106437277 -t = 36.2000, H(p,q)-H0 = -0.0000000919945865, L(p,q)-L0 = -0.0000000106437386 -t = 36.3000, H(p,q)-H0 = -0.0000000919911850, L(p,q)-L0 = -0.0000000106437532 -t = 36.4000, H(p,q)-H0 = -0.0000000919861378, L(p,q)-L0 = -0.0000000106437751 -t = 36.5000, H(p,q)-H0 = -0.0000000919784759, L(p,q)-L0 = -0.0000000106438088 -t = 36.6000, H(p,q)-H0 = -0.0000000919665543, L(p,q)-L0 = -0.0000000106438626 -t = 36.7000, H(p,q)-H0 = -0.0000000919474991, L(p,q)-L0 = -0.0000000106439528 -t = 36.8000, H(p,q)-H0 = -0.0000000919161655, L(p,q)-L0 = -0.0000000106441127 -t = 36.9000, H(p,q)-H0 = -0.0000000918631425, L(p,q)-L0 = -0.0000000106444168 -t = 37.0000, H(p,q)-H0 = -0.0000000917710068, L(p,q)-L0 = -0.0000000106450374 -t = 37.1000, H(p,q)-H0 = -0.0000000916077678, L(p,q)-L0 = -0.0000000106464240 -t = 37.2000, H(p,q)-H0 = -0.0000000913167905, L(p,q)-L0 = -0.0000000106498567 -t = 37.3000, H(p,q)-H0 = -0.0000000907971338, L(p,q)-L0 = -0.0000000106593594 -t = 37.4000, H(p,q)-H0 = -0.0000000897503700, L(p,q)-L0 = -0.0000000106885705 -t = 37.5000, H(p,q)-H0 = -0.0000000864122607, L(p,q)-L0 = -0.0000000107829846 -t = 37.6000, H(p,q)-H0 = -0.0000000750453213, L(p,q)-L0 = -0.0000000110571754 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 7.20874e-13, num. orbits is now 6.00 -t = 37.6991, H(p,q)-H0 = -0.0000000872834929, L(p,q)-L0 = -0.0000000165621049 -t = 37.7000, H(p,q)-H0 = -0.0000000652864798, L(p,q)-L0 = -0.0000000115956111 -t = 37.8000, H(p,q)-H0 = -0.0000000814422616, L(p,q)-L0 = -0.0000000121433266 -t = 37.9000, H(p,q)-H0 = -0.0000000958562416, L(p,q)-L0 = -0.0000000124291885 -t = 38.0000, H(p,q)-H0 = -0.0000001002050563, L(p,q)-L0 = -0.0000000125284016 -t = 38.1000, H(p,q)-H0 = -0.0000001015464115, L(p,q)-L0 = -0.0000000125590501 -t = 38.2000, H(p,q)-H0 = -0.0000001021510567, L(p,q)-L0 = -0.0000000125689790 -t = 38.3000, H(p,q)-H0 = -0.0000001024682371, L(p,q)-L0 = -0.0000000125725501 -t = 38.4000, H(p,q)-H0 = -0.0000001026404101, L(p,q)-L0 = -0.0000000125739883 -t = 38.5000, H(p,q)-H0 = -0.0000001027359420, L(p,q)-L0 = -0.0000000125746296 -t = 38.6000, H(p,q)-H0 = -0.0000001027904003, L(p,q)-L0 = -0.0000000125749428 -t = 38.7000, H(p,q)-H0 = -0.0000001028224009, L(p,q)-L0 = -0.0000000125751077 -t = 38.8000, H(p,q)-H0 = -0.0000001028417953, L(p,q)-L0 = -0.0000000125752007 -t = 38.9000, H(p,q)-H0 = -0.0000001028539034, L(p,q)-L0 = -0.0000000125752562 -t = 39.0000, H(p,q)-H0 = -0.0000001028616745, L(p,q)-L0 = -0.0000000125752908 -t = 39.1000, H(p,q)-H0 = -0.0000001028667902, L(p,q)-L0 = -0.0000000125753136 -t = 39.2000, H(p,q)-H0 = -0.0000001028702363, L(p,q)-L0 = -0.0000000125753292 -t = 39.3000, H(p,q)-H0 = -0.0000001028726058, L(p,q)-L0 = -0.0000000125753397 -t = 39.4000, H(p,q)-H0 = -0.0000001028742664, L(p,q)-L0 = -0.0000000125753472 -t = 39.5000, H(p,q)-H0 = -0.0000001028754503, L(p,q)-L0 = -0.0000000125753531 -t = 39.6000, H(p,q)-H0 = -0.0000001028763066, L(p,q)-L0 = -0.0000000125753573 -t = 39.7000, H(p,q)-H0 = -0.0000001028769347, L(p,q)-L0 = -0.0000000125753611 -t = 39.8000, H(p,q)-H0 = -0.0000001028774008, L(p,q)-L0 = -0.0000000125753643 -t = 39.9000, H(p,q)-H0 = -0.0000001028777498, L(p,q)-L0 = -0.0000000125753665 -t = 40.0000, H(p,q)-H0 = -0.0000001028780130, L(p,q)-L0 = -0.0000000125753685 -t = 40.1000, H(p,q)-H0 = -0.0000001028782125, L(p,q)-L0 = -0.0000000125753696 -t = 40.2000, H(p,q)-H0 = -0.0000001028783645, L(p,q)-L0 = -0.0000000125753710 -t = 40.3000, H(p,q)-H0 = -0.0000001028784796, L(p,q)-L0 = -0.0000000125753720 -t = 40.4000, H(p,q)-H0 = -0.0000001028785666, L(p,q)-L0 = -0.0000000125753734 -t = 40.5000, H(p,q)-H0 = -0.0000001028786304, L(p,q)-L0 = -0.0000000125753749 -t = 40.6000, H(p,q)-H0 = -0.0000001028786749, L(p,q)-L0 = -0.0000000125753756 -t = 40.7000, H(p,q)-H0 = -0.0000001028787032, L(p,q)-L0 = -0.0000000125753764 -t = 40.8000, H(p,q)-H0 = -0.0000001028787173, L(p,q)-L0 = -0.0000000125753777 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.26242e-13, num. orbits is now 6.50 -t = 40.8407, H(p,q)-H0 = -0.0000001028785540, L(p,q)-L0 = -0.0000000125749489 -t = 40.9000, H(p,q)-H0 = -0.0000001028787177, L(p,q)-L0 = -0.0000000125753791 -t = 41.0000, H(p,q)-H0 = -0.0000001028787039, L(p,q)-L0 = -0.0000000125753797 -t = 41.1000, H(p,q)-H0 = -0.0000001028786754, L(p,q)-L0 = -0.0000000125753807 -t = 41.2000, H(p,q)-H0 = -0.0000001028786304, L(p,q)-L0 = -0.0000000125753817 -t = 41.3000, H(p,q)-H0 = -0.0000001028785666, L(p,q)-L0 = -0.0000000125753835 -t = 41.4000, H(p,q)-H0 = -0.0000001028784788, L(p,q)-L0 = -0.0000000125753847 -t = 41.5000, H(p,q)-H0 = -0.0000001028783613, L(p,q)-L0 = -0.0000000125753861 -t = 41.6000, H(p,q)-H0 = -0.0000001028782058, L(p,q)-L0 = -0.0000000125753872 -t = 41.7000, H(p,q)-H0 = -0.0000001028780011, L(p,q)-L0 = -0.0000000125753888 -t = 41.8000, H(p,q)-H0 = -0.0000001028777306, L(p,q)-L0 = -0.0000000125753910 -t = 41.9000, H(p,q)-H0 = -0.0000001028773712, L(p,q)-L0 = -0.0000000125753933 -t = 42.0000, H(p,q)-H0 = -0.0000001028768900, L(p,q)-L0 = -0.0000000125753967 -t = 42.1000, H(p,q)-H0 = -0.0000001028762389, L(p,q)-L0 = -0.0000000125754003 -t = 42.2000, H(p,q)-H0 = -0.0000001028753481, L(p,q)-L0 = -0.0000000125754045 -t = 42.3000, H(p,q)-H0 = -0.0000001028741135, L(p,q)-L0 = -0.0000000125754107 -t = 42.4000, H(p,q)-H0 = -0.0000001028723753, L(p,q)-L0 = -0.0000000125754185 -t = 42.5000, H(p,q)-H0 = -0.0000001028698873, L(p,q)-L0 = -0.0000000125754293 -t = 42.6000, H(p,q)-H0 = -0.0000001028662577, L(p,q)-L0 = -0.0000000125754451 -t = 42.7000, H(p,q)-H0 = -0.0000001028608523, L(p,q)-L0 = -0.0000000125754686 -t = 42.8000, H(p,q)-H0 = -0.0000001028526140, L(p,q)-L0 = -0.0000000125755047 -t = 42.9000, H(p,q)-H0 = -0.0000001028397386, L(p,q)-L0 = -0.0000000125755633 -t = 43.0000, H(p,q)-H0 = -0.0000001028190630, L(p,q)-L0 = -0.0000000125756622 -t = 43.1000, H(p,q)-H0 = -0.0000001027848990, L(p,q)-L0 = -0.0000000125758393 -t = 43.2000, H(p,q)-H0 = -0.0000001027268128, L(p,q)-L0 = -0.0000000125761791 -t = 43.3000, H(p,q)-H0 = -0.0000001026254827, L(p,q)-L0 = -0.0000000125768842 -t = 43.4000, H(p,q)-H0 = -0.0000001024455776, L(p,q)-L0 = -0.0000000125784863 -t = 43.5000, H(p,q)-H0 = -0.0000001021250062, L(p,q)-L0 = -0.0000000125825277 -t = 43.6000, H(p,q)-H0 = -0.0000001015496205, L(p,q)-L0 = -0.0000000125939299 -t = 43.7000, H(p,q)-H0 = -0.0000001003261163, L(p,q)-L0 = -0.0000000126294811 -t = 43.8000, H(p,q)-H0 = -0.0000000961170694, L(p,q)-L0 = -0.0000000127440090 -t = 43.9000, H(p,q)-H0 = -0.0000000832329459, L(p,q)-L0 = -0.0000000130624954 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 9.76298e-13, num. orbits is now 7.00 -t = 43.9823, H(p,q)-H0 = -0.0000001792544178, L(p,q)-L0 = -0.0000000368028036 -t = 44.0000, H(p,q)-H0 = -0.0000000772849236, L(p,q)-L0 = -0.0000000136304049 -t = 44.1000, H(p,q)-H0 = -0.0000000956608024, L(p,q)-L0 = -0.0000000141424648 -t = 44.2000, H(p,q)-H0 = -0.0000001079238068, L(p,q)-L0 = -0.0000000143864448 -t = 44.3000, H(p,q)-H0 = -0.0000001114074679, L(p,q)-L0 = -0.0000000144680287 -t = 44.4000, H(p,q)-H0 = -0.0000001125551181, L(p,q)-L0 = -0.0000000144932376 -t = 44.5000, H(p,q)-H0 = -0.0000001130948968, L(p,q)-L0 = -0.0000000145015316 -t = 44.6000, H(p,q)-H0 = -0.0000001133806781, L(p,q)-L0 = -0.0000000145045729 -t = 44.7000, H(p,q)-H0 = -0.0000001135363544, L(p,q)-L0 = -0.0000000145058183 -t = 44.8000, H(p,q)-H0 = -0.0000001136230946, L(p,q)-L0 = -0.0000000145063828 -t = 44.9000, H(p,q)-H0 = -0.0000001136727873, L(p,q)-L0 = -0.0000000145066626 -t = 45.0000, H(p,q)-H0 = -0.0000001137021408, L(p,q)-L0 = -0.0000000145068115 -t = 45.1000, H(p,q)-H0 = -0.0000001137200214, L(p,q)-L0 = -0.0000000145068958 -t = 45.2000, H(p,q)-H0 = -0.0000001137312385, L(p,q)-L0 = -0.0000000145069469 -t = 45.3000, H(p,q)-H0 = -0.0000001137384691, L(p,q)-L0 = -0.0000000145069785 -t = 45.4000, H(p,q)-H0 = -0.0000001137432486, L(p,q)-L0 = -0.0000000145070000 -t = 45.5000, H(p,q)-H0 = -0.0000001137464800, L(p,q)-L0 = -0.0000000145070147 -t = 45.6000, H(p,q)-H0 = -0.0000001137487096, L(p,q)-L0 = -0.0000000145070247 -t = 45.7000, H(p,q)-H0 = -0.0000001137502768, L(p,q)-L0 = -0.0000000145070322 -t = 45.8000, H(p,q)-H0 = -0.0000001137513964, L(p,q)-L0 = -0.0000000145070376 -t = 45.9000, H(p,q)-H0 = -0.0000001137522087, L(p,q)-L0 = -0.0000000145070420 -t = 46.0000, H(p,q)-H0 = -0.0000001137528052, L(p,q)-L0 = -0.0000000145070452 -t = 46.1000, H(p,q)-H0 = -0.0000001137532486, L(p,q)-L0 = -0.0000000145070479 -t = 46.2000, H(p,q)-H0 = -0.0000001137535812, L(p,q)-L0 = -0.0000000145070502 -t = 46.3000, H(p,q)-H0 = -0.0000001137538326, L(p,q)-L0 = -0.0000000145070516 -t = 46.4000, H(p,q)-H0 = -0.0000001137540235, L(p,q)-L0 = -0.0000000145070534 -t = 46.5000, H(p,q)-H0 = -0.0000001137541685, L(p,q)-L0 = -0.0000000145070548 -t = 46.6000, H(p,q)-H0 = -0.0000001137542787, L(p,q)-L0 = -0.0000000145070562 -t = 46.7000, H(p,q)-H0 = -0.0000001137543613, L(p,q)-L0 = -0.0000000145070576 -t = 46.8000, H(p,q)-H0 = -0.0000001137544215, L(p,q)-L0 = -0.0000000145070588 -t = 46.9000, H(p,q)-H0 = -0.0000001137544632, L(p,q)-L0 = -0.0000000145070593 -t = 47.0000, H(p,q)-H0 = -0.0000001137544889, L(p,q)-L0 = -0.0000000145070601 -t = 47.1000, H(p,q)-H0 = -0.0000001137545003, L(p,q)-L0 = -0.0000000145070608 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.6284e-13, num. orbits is now 7.50 -t = 47.1239, H(p,q)-H0 = -0.0000001137522623, L(p,q)-L0 = -0.0000000145012401 -t = 47.2000, H(p,q)-H0 = -0.0000001137544982, L(p,q)-L0 = -0.0000000145070616 -t = 47.3000, H(p,q)-H0 = -0.0000001137544818, L(p,q)-L0 = -0.0000000145070622 -t = 47.4000, H(p,q)-H0 = -0.0000001137544509, L(p,q)-L0 = -0.0000000145070634 -t = 47.5000, H(p,q)-H0 = -0.0000001137544030, L(p,q)-L0 = -0.0000000145070648 -t = 47.6000, H(p,q)-H0 = -0.0000001137543351, L(p,q)-L0 = -0.0000000145070658 -t = 47.7000, H(p,q)-H0 = -0.0000001137542425, L(p,q)-L0 = -0.0000000145070665 -t = 47.8000, H(p,q)-H0 = -0.0000001137541192, L(p,q)-L0 = -0.0000000145070677 -t = 47.9000, H(p,q)-H0 = -0.0000001137539565, L(p,q)-L0 = -0.0000000145070689 -t = 48.0000, H(p,q)-H0 = -0.0000001137537420, L(p,q)-L0 = -0.0000000145070709 -t = 48.1000, H(p,q)-H0 = -0.0000001137534582, L(p,q)-L0 = -0.0000000145070729 -t = 48.2000, H(p,q)-H0 = -0.0000001137530808, L(p,q)-L0 = -0.0000000145070752 -t = 48.3000, H(p,q)-H0 = -0.0000001137525747, L(p,q)-L0 = -0.0000000145070784 -t = 48.4000, H(p,q)-H0 = -0.0000001137518892, L(p,q)-L0 = -0.0000000145070820 -t = 48.5000, H(p,q)-H0 = -0.0000001137509492, L(p,q)-L0 = -0.0000000145070868 -t = 48.6000, H(p,q)-H0 = -0.0000001137496433, L(p,q)-L0 = -0.0000000145070935 -t = 48.7000, H(p,q)-H0 = -0.0000001137477996, L(p,q)-L0 = -0.0000000145071022 -t = 48.8000, H(p,q)-H0 = -0.0000001137451520, L(p,q)-L0 = -0.0000000145071137 -t = 48.9000, H(p,q)-H0 = -0.0000001137412777, L(p,q)-L0 = -0.0000000145071311 -t = 49.0000, H(p,q)-H0 = -0.0000001137354850, L(p,q)-L0 = -0.0000000145071561 -t = 49.1000, H(p,q)-H0 = -0.0000001137266208, L(p,q)-L0 = -0.0000000145071957 -t = 49.2000, H(p,q)-H0 = -0.0000001137127050, L(p,q)-L0 = -0.0000000145072595 -t = 49.3000, H(p,q)-H0 = -0.0000001136902524, L(p,q)-L0 = -0.0000000145073681 -t = 49.4000, H(p,q)-H0 = -0.0000001136529726, L(p,q)-L0 = -0.0000000145075650 -t = 49.5000, H(p,q)-H0 = -0.0000001135892934, L(p,q)-L0 = -0.0000000145079468 -t = 49.6000, H(p,q)-H0 = -0.0000001134777949, L(p,q)-L0 = -0.0000000145087511 -t = 49.7000, H(p,q)-H0 = -0.0000001132795046, L(p,q)-L0 = -0.0000000145106088 -t = 49.8000, H(p,q)-H0 = -0.0000001129263574, L(p,q)-L0 = -0.0000000145153829 -t = 49.9000, H(p,q)-H0 = -0.0000001122868578, L(p,q)-L0 = -0.0000000145291035 -t = 50.0000, H(p,q)-H0 = -0.0000001108326948, L(p,q)-L0 = -0.0000000145724222 -t = 50.1000, H(p,q)-H0 = -0.0000001055364578, L(p,q)-L0 = -0.0000000147108190 -t = 50.2000, H(p,q)-H0 = -0.0000000915336087, L(p,q)-L0 = -0.0000000150760981 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 4.25441e-15, num. orbits is now 8.00 -t = 50.2655, H(p,q)-H0 = -0.0000002905677339, L(p,q)-L0 = -0.0000000614048129 -t = 50.3000, H(p,q)-H0 = -0.0000000902107362, L(p,q)-L0 = -0.0000000156632152 -t = 50.4000, H(p,q)-H0 = -0.0000001095536482, L(p,q)-L0 = -0.0000000161330825 -t = 50.5000, H(p,q)-H0 = -0.0000001197471942, L(p,q)-L0 = -0.0000000163392598 -t = 50.6000, H(p,q)-H0 = -0.0000001225558985, L(p,q)-L0 = -0.0000000164062217 -t = 50.7000, H(p,q)-H0 = -0.0000001235486917, L(p,q)-L0 = -0.0000000164269965 -t = 50.8000, H(p,q)-H0 = -0.0000001240319016, L(p,q)-L0 = -0.0000000164339478 -t = 50.9000, H(p,q)-H0 = -0.0000001242895604, L(p,q)-L0 = -0.0000000164365455 -t = 51.0000, H(p,q)-H0 = -0.0000001244304126, L(p,q)-L0 = -0.0000000164376296 -t = 51.1000, H(p,q)-H0 = -0.0000001245092338, L(p,q)-L0 = -0.0000000164381290 -t = 51.2000, H(p,q)-H0 = -0.0000001245546178, L(p,q)-L0 = -0.0000000164383799 -t = 51.3000, H(p,q)-H0 = -0.0000001245815663, L(p,q)-L0 = -0.0000000164385151 -t = 51.4000, H(p,q)-H0 = -0.0000001245980652, L(p,q)-L0 = -0.0000000164385927 -t = 51.5000, H(p,q)-H0 = -0.0000001246084648, L(p,q)-L0 = -0.0000000164386396 -t = 51.6000, H(p,q)-H0 = -0.0000001246151977, L(p,q)-L0 = -0.0000000164386690 -t = 51.7000, H(p,q)-H0 = -0.0000001246196659, L(p,q)-L0 = -0.0000000164386891 -t = 51.8000, H(p,q)-H0 = -0.0000001246226981, L(p,q)-L0 = -0.0000000164387031 -t = 51.9000, H(p,q)-H0 = -0.0000001246247963, L(p,q)-L0 = -0.0000000164387125 -t = 52.0000, H(p,q)-H0 = -0.0000001246262762, L(p,q)-L0 = -0.0000000164387198 -t = 52.1000, H(p,q)-H0 = -0.0000001246273358, L(p,q)-L0 = -0.0000000164387248 -t = 52.2000, H(p,q)-H0 = -0.0000001246281061, L(p,q)-L0 = -0.0000000164387290 -t = 52.3000, H(p,q)-H0 = -0.0000001246286729, L(p,q)-L0 = -0.0000000164387320 -t = 52.4000, H(p,q)-H0 = -0.0000001246290950, L(p,q)-L0 = -0.0000000164387345 -t = 52.5000, H(p,q)-H0 = -0.0000001246294123, L(p,q)-L0 = -0.0000000164387365 -t = 52.6000, H(p,q)-H0 = -0.0000001246296523, L(p,q)-L0 = -0.0000000164387381 -t = 52.7000, H(p,q)-H0 = -0.0000001246298343, L(p,q)-L0 = -0.0000000164387396 -t = 52.8000, H(p,q)-H0 = -0.0000001246299730, L(p,q)-L0 = -0.0000000164387409 -t = 52.9000, H(p,q)-H0 = -0.0000001246300778, L(p,q)-L0 = -0.0000000164387421 -t = 53.0000, H(p,q)-H0 = -0.0000001246301560, L(p,q)-L0 = -0.0000000164387427 -t = 53.1000, H(p,q)-H0 = -0.0000001246302127, L(p,q)-L0 = -0.0000000164387436 -t = 53.2000, H(p,q)-H0 = -0.0000001246302517, L(p,q)-L0 = -0.0000000164387445 -t = 53.3000, H(p,q)-H0 = -0.0000001246302751, L(p,q)-L0 = -0.0000000164387456 -t = 53.4000, H(p,q)-H0 = -0.0000001246302840, L(p,q)-L0 = -0.0000000164387460 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.15573e-18, num. orbits is now 8.50 -t = 53.4071, H(p,q)-H0 = -0.0000001246285708, L(p,q)-L0 = -0.0000000164342915 -t = 53.5000, H(p,q)-H0 = -0.0000001246302794, L(p,q)-L0 = -0.0000000164387469 -t = 53.6000, H(p,q)-H0 = -0.0000001246302612, L(p,q)-L0 = -0.0000000164387480 -t = 53.7000, H(p,q)-H0 = -0.0000001246302275, L(p,q)-L0 = -0.0000000164387494 -t = 53.8000, H(p,q)-H0 = -0.0000001246301762, L(p,q)-L0 = -0.0000000164387498 -t = 53.9000, H(p,q)-H0 = -0.0000001246301045, L(p,q)-L0 = -0.0000000164387508 -t = 54.0000, H(p,q)-H0 = -0.0000001246300072, L(p,q)-L0 = -0.0000000164387517 -t = 54.1000, H(p,q)-H0 = -0.0000001246298780, L(p,q)-L0 = -0.0000000164387530 -t = 54.2000, H(p,q)-H0 = -0.0000001246297072, L(p,q)-L0 = -0.0000000164387541 -t = 54.3000, H(p,q)-H0 = -0.0000001246294825, L(p,q)-L0 = -0.0000000164387559 -t = 54.4000, H(p,q)-H0 = -0.0000001246291850, L(p,q)-L0 = -0.0000000164387581 -t = 54.5000, H(p,q)-H0 = -0.0000001246287883, L(p,q)-L0 = -0.0000000164387602 -t = 54.6000, H(p,q)-H0 = -0.0000001246282557, L(p,q)-L0 = -0.0000000164387628 -t = 54.7000, H(p,q)-H0 = -0.0000001246275333, L(p,q)-L0 = -0.0000000164387668 -t = 54.8000, H(p,q)-H0 = -0.0000001246265408, L(p,q)-L0 = -0.0000000164387717 -t = 54.9000, H(p,q)-H0 = -0.0000001246251576, L(p,q)-L0 = -0.0000000164387783 -t = 55.0000, H(p,q)-H0 = -0.0000001246232004, L(p,q)-L0 = -0.0000000164387872 -t = 55.1000, H(p,q)-H0 = -0.0000001246203816, L(p,q)-L0 = -0.0000000164387994 -t = 55.2000, H(p,q)-H0 = -0.0000001246162420, L(p,q)-L0 = -0.0000000164388176 -t = 55.3000, H(p,q)-H0 = -0.0000001246100303, L(p,q)-L0 = -0.0000000164388450 -t = 55.4000, H(p,q)-H0 = -0.0000001246004853, L(p,q)-L0 = -0.0000000164388876 -t = 55.5000, H(p,q)-H0 = -0.0000001245854334, L(p,q)-L0 = -0.0000000164389568 -t = 55.6000, H(p,q)-H0 = -0.0000001245610323, L(p,q)-L0 = -0.0000000164390765 -t = 55.7000, H(p,q)-H0 = -0.0000001245203185, L(p,q)-L0 = -0.0000000164392951 -t = 55.8000, H(p,q)-H0 = -0.0000001244504588, L(p,q)-L0 = -0.0000000164397256 -t = 55.9000, H(p,q)-H0 = -0.0000001243277169, L(p,q)-L0 = -0.0000000164406457 -t = 56.0000, H(p,q)-H0 = -0.0000001241091595, L(p,q)-L0 = -0.0000000164428063 -t = 56.1000, H(p,q)-H0 = -0.0000001237200922, L(p,q)-L0 = -0.0000000164484628 -t = 56.2000, H(p,q)-H0 = -0.0000001230054045, L(p,q)-L0 = -0.0000000164650191 -t = 56.3000, H(p,q)-H0 = -0.0000001212471616, L(p,q)-L0 = -0.0000000165178364 -t = 56.4000, H(p,q)-H0 = -0.0000001146384911, L(p,q)-L0 = -0.0000000166842291 -t = 56.5000, H(p,q)-H0 = -0.0000001001873835, L(p,q)-L0 = -0.0000000170972445 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.08511e-12, num. orbits is now 9.00 -t = 56.5487, H(p,q)-H0 = -0.0000001428438574, L(p,q)-L0 = -0.0000000275339065 -t = 56.6000, H(p,q)-H0 = -0.0000001038851334, L(p,q)-L0 = -0.0000000176918925 -t = 56.7000, H(p,q)-H0 = -0.0000001230515878, L(p,q)-L0 = -0.0000000181155525 -t = 56.8000, H(p,q)-H0 = -0.0000001313757902, L(p,q)-L0 = -0.0000000182883400 -t = 56.9000, H(p,q)-H0 = -0.0000001336624054, L(p,q)-L0 = -0.0000000183432476 -t = 57.0000, H(p,q)-H0 = -0.0000001345293443, L(p,q)-L0 = -0.0000000183604097 -t = 57.1000, H(p,q)-H0 = -0.0000001349628097, L(p,q)-L0 = -0.0000000183662532 -t = 57.2000, H(p,q)-H0 = -0.0000001351952506, L(p,q)-L0 = -0.0000000183684786 -t = 57.3000, H(p,q)-H0 = -0.0000001353227711, L(p,q)-L0 = -0.0000000183694233 -t = 57.4000, H(p,q)-H0 = -0.0000001353944539, L(p,q)-L0 = -0.0000000183698653 -t = 57.5000, H(p,q)-H0 = -0.0000001354359381, L(p,q)-L0 = -0.0000000183700896 -t = 57.6000, H(p,q)-H0 = -0.0000001354607000, L(p,q)-L0 = -0.0000000183702118 -t = 57.7000, H(p,q)-H0 = -0.0000001354759361, L(p,q)-L0 = -0.0000000183702825 -t = 57.8000, H(p,q)-H0 = -0.0000001354855848, L(p,q)-L0 = -0.0000000183703258 -t = 57.9000, H(p,q)-H0 = -0.0000001354918588, L(p,q)-L0 = -0.0000000183703537 -t = 58.0000, H(p,q)-H0 = -0.0000001354960383, L(p,q)-L0 = -0.0000000183703719 -t = 58.1000, H(p,q)-H0 = -0.0000001354988843, L(p,q)-L0 = -0.0000000183703848 -t = 58.2000, H(p,q)-H0 = -0.0000001355008611, L(p,q)-L0 = -0.0000000183703943 -t = 58.3000, H(p,q)-H0 = -0.0000001355022581, L(p,q)-L0 = -0.0000000183704008 -t = 58.4000, H(p,q)-H0 = -0.0000001355032616, L(p,q)-L0 = -0.0000000183704058 -t = 58.5000, H(p,q)-H0 = -0.0000001355039930, L(p,q)-L0 = -0.0000000183704101 -t = 58.6000, H(p,q)-H0 = -0.0000001355045323, L(p,q)-L0 = -0.0000000183704132 -t = 58.7000, H(p,q)-H0 = -0.0000001355049342, L(p,q)-L0 = -0.0000000183704155 -t = 58.8000, H(p,q)-H0 = -0.0000001355052367, L(p,q)-L0 = -0.0000000183704176 -t = 58.9000, H(p,q)-H0 = -0.0000001355054661, L(p,q)-L0 = -0.0000000183704197 -t = 59.0000, H(p,q)-H0 = -0.0000001355056402, L(p,q)-L0 = -0.0000000183704213 -t = 59.1000, H(p,q)-H0 = -0.0000001355057724, L(p,q)-L0 = -0.0000000183704223 -t = 59.2000, H(p,q)-H0 = -0.0000001355058724, L(p,q)-L0 = -0.0000000183704235 -t = 59.3000, H(p,q)-H0 = -0.0000001355059469, L(p,q)-L0 = -0.0000000183704245 -t = 59.4000, H(p,q)-H0 = -0.0000001355060005, L(p,q)-L0 = -0.0000000183704255 -t = 59.5000, H(p,q)-H0 = -0.0000001355060368, L(p,q)-L0 = -0.0000000183704266 -t = 59.6000, H(p,q)-H0 = -0.0000001355060580, L(p,q)-L0 = -0.0000000183704280 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.53192e-13, num. orbits is now 9.50 -t = 59.6902, H(p,q)-H0 = -0.0000001355060429, L(p,q)-L0 = -0.0000000183703716 -t = 59.7000, H(p,q)-H0 = -0.0000001355060648, L(p,q)-L0 = -0.0000000183704284 -t = 59.8000, H(p,q)-H0 = -0.0000001355060578, L(p,q)-L0 = -0.0000000183704294 -t = 59.9000, H(p,q)-H0 = -0.0000001355060362, L(p,q)-L0 = -0.0000000183704296 -t = 60.0000, H(p,q)-H0 = -0.0000001355059995, L(p,q)-L0 = -0.0000000183704301 -t = 60.1000, H(p,q)-H0 = -0.0000001355059450, L(p,q)-L0 = -0.0000000183704308 -t = 60.2000, H(p,q)-H0 = -0.0000001355058696, L(p,q)-L0 = -0.0000000183704323 -t = 60.3000, H(p,q)-H0 = -0.0000001355057675, L(p,q)-L0 = -0.0000000183704332 -t = 60.4000, H(p,q)-H0 = -0.0000001355056324, L(p,q)-L0 = -0.0000000183704350 -t = 60.5000, H(p,q)-H0 = -0.0000001355054539, L(p,q)-L0 = -0.0000000183704363 -t = 60.6000, H(p,q)-H0 = -0.0000001355052183, L(p,q)-L0 = -0.0000000183704378 -t = 60.7000, H(p,q)-H0 = -0.0000001355049060, L(p,q)-L0 = -0.0000000183704398 -t = 60.8000, H(p,q)-H0 = -0.0000001355044899, L(p,q)-L0 = -0.0000000183704427 -t = 60.9000, H(p,q)-H0 = -0.0000001355039301, L(p,q)-L0 = -0.0000000183704458 -t = 61.0000, H(p,q)-H0 = -0.0000001355031688, L(p,q)-L0 = -0.0000000183704498 -t = 61.1000, H(p,q)-H0 = -0.0000001355021206, L(p,q)-L0 = -0.0000000183704553 -t = 61.2000, H(p,q)-H0 = -0.0000001355006560, L(p,q)-L0 = -0.0000000183704619 -t = 61.3000, H(p,q)-H0 = -0.0000001354985779, L(p,q)-L0 = -0.0000000183704714 -t = 61.4000, H(p,q)-H0 = -0.0000001354955748, L(p,q)-L0 = -0.0000000183704845 -t = 61.5000, H(p,q)-H0 = -0.0000001354911499, L(p,q)-L0 = -0.0000000183705037 -t = 61.6000, H(p,q)-H0 = -0.0000001354844839, L(p,q)-L0 = -0.0000000183705325 -t = 61.7000, H(p,q)-H0 = -0.0000001354741976, L(p,q)-L0 = -0.0000000183705787 -t = 61.8000, H(p,q)-H0 = -0.0000001354579040, L(p,q)-L0 = -0.0000000183706546 -t = 61.9000, H(p,q)-H0 = -0.0000001354313633, L(p,q)-L0 = -0.0000000183707869 -t = 62.0000, H(p,q)-H0 = -0.0000001353868654, L(p,q)-L0 = -0.0000000183710315 -t = 62.1000, H(p,q)-H0 = -0.0000001353101723, L(p,q)-L0 = -0.0000000183715174 -t = 62.2000, H(p,q)-H0 = -0.0000001351749971, L(p,q)-L0 = -0.0000000183725717 -t = 62.3000, H(p,q)-H0 = -0.0000001349341148, L(p,q)-L0 = -0.0000000183750920 -t = 62.4000, H(p,q)-H0 = -0.0000001345053224, L(p,q)-L0 = -0.0000000183818172 -t = 62.5000, H(p,q)-H0 = -0.0000001337004563, L(p,q)-L0 = -0.0000000184018487 -t = 62.6000, H(p,q)-H0 = -0.0000001315400913, L(p,q)-L0 = -0.0000000184662441 -t = 62.7000, H(p,q)-H0 = -0.0000001234144738, L(p,q)-L0 = -0.0000000186650045 -t = 62.8000, H(p,q)-H0 = -0.0000001094454982, L(p,q)-L0 = -0.0000000191246895 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.39067e-12, num. orbits is now 10.00 -t = 62.8318, H(p,q)-H0 = -0.0000001832015384, L(p,q)-L0 = -0.0000000361236007 -t = 62.9000, H(p,q)-H0 = -0.0000001180626392, L(p,q)-L0 = -0.0000000197146204 -t = 63.0000, H(p,q)-H0 = -0.0000001361380413, L(p,q)-L0 = -0.0000000200904822 -t = 63.1000, H(p,q)-H0 = -0.0000001428520109, L(p,q)-L0 = -0.0000000202343062 -t = 63.2000, H(p,q)-H0 = -0.0000001447359146, L(p,q)-L0 = -0.0000000202793241 -t = 63.3000, H(p,q)-H0 = -0.0000001454988130, L(p,q)-L0 = -0.0000000202935382 -t = 63.4000, H(p,q)-H0 = -0.0000001458882617, L(p,q)-L0 = -0.0000000202984675 -t = 63.5000, H(p,q)-H0 = -0.0000001460980743, L(p,q)-L0 = -0.0000000203003808 -t = 63.6000, H(p,q)-H0 = -0.0000001462136063, L(p,q)-L0 = -0.0000000203012070 -t = 63.7000, H(p,q)-H0 = -0.0000001462788516, L(p,q)-L0 = -0.0000000203015996 -t = 63.8000, H(p,q)-H0 = -0.0000001463168047, L(p,q)-L0 = -0.0000000203018010 -t = 63.9000, H(p,q)-H0 = -0.0000001463395776, L(p,q)-L0 = -0.0000000203019122 -t = 64.0000, H(p,q)-H0 = -0.0000001463536597, L(p,q)-L0 = -0.0000000203019773 -t = 64.1000, H(p,q)-H0 = -0.0000001463626185, L(p,q)-L0 = -0.0000000203020173 -t = 64.2000, H(p,q)-H0 = -0.0000001463684690, L(p,q)-L0 = -0.0000000203020434 -t = 64.3000, H(p,q)-H0 = -0.0000001463723812, L(p,q)-L0 = -0.0000000203020607 -t = 64.4000, H(p,q)-H0 = -0.0000001463750543, L(p,q)-L0 = -0.0000000203020727 -t = 64.5000, H(p,q)-H0 = -0.0000001463769170, L(p,q)-L0 = -0.0000000203020820 -t = 64.6000, H(p,q)-H0 = -0.0000001463782371, L(p,q)-L0 = -0.0000000203020885 -t = 64.7000, H(p,q)-H0 = -0.0000001463791879, L(p,q)-L0 = -0.0000000203020933 -t = 64.8000, H(p,q)-H0 = -0.0000001463798819, L(p,q)-L0 = -0.0000000203020969 -t = 64.9000, H(p,q)-H0 = -0.0000001463803947, L(p,q)-L0 = -0.0000000203020999 -t = 65.0000, H(p,q)-H0 = -0.0000001463807781, L(p,q)-L0 = -0.0000000203021024 -t = 65.1000, H(p,q)-H0 = -0.0000001463810666, L(p,q)-L0 = -0.0000000203021044 -t = 65.2000, H(p,q)-H0 = -0.0000001463812851, L(p,q)-L0 = -0.0000000203021061 -t = 65.3000, H(p,q)-H0 = -0.0000001463814514, L(p,q)-L0 = -0.0000000203021076 -t = 65.4000, H(p,q)-H0 = -0.0000001463815779, L(p,q)-L0 = -0.0000000203021089 -t = 65.5000, H(p,q)-H0 = -0.0000001463816726, L(p,q)-L0 = -0.0000000203021095 -t = 65.6000, H(p,q)-H0 = -0.0000001463817435, L(p,q)-L0 = -0.0000000203021112 -t = 65.7000, H(p,q)-H0 = -0.0000001463817941, L(p,q)-L0 = -0.0000000203021122 -t = 65.8000, H(p,q)-H0 = -0.0000001463818275, L(p,q)-L0 = -0.0000000203021131 -t = 65.9000, H(p,q)-H0 = -0.0000001463818458, L(p,q)-L0 = -0.0000000203021135 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -9.67217e-16, num. orbits is now 10.50 -t = 65.9734, H(p,q)-H0 = -0.0000001463798367, L(p,q)-L0 = -0.0000000202968783 -t = 66.0000, H(p,q)-H0 = -0.0000001463818502, L(p,q)-L0 = -0.0000000203021142 -t = 66.1000, H(p,q)-H0 = -0.0000001463818412, L(p,q)-L0 = -0.0000000203021153 -t = 66.2000, H(p,q)-H0 = -0.0000001463818174, L(p,q)-L0 = -0.0000000203021159 -t = 66.3000, H(p,q)-H0 = -0.0000001463817784, L(p,q)-L0 = -0.0000000203021169 -t = 66.4000, H(p,q)-H0 = -0.0000001463817207, L(p,q)-L0 = -0.0000000203021181 -t = 66.5000, H(p,q)-H0 = -0.0000001463816411, L(p,q)-L0 = -0.0000000203021189 -t = 66.6000, H(p,q)-H0 = -0.0000001463815341, L(p,q)-L0 = -0.0000000203021201 -t = 66.7000, H(p,q)-H0 = -0.0000001463813922, L(p,q)-L0 = -0.0000000203021215 -t = 66.8000, H(p,q)-H0 = -0.0000001463812054, L(p,q)-L0 = -0.0000000203021234 -t = 66.9000, H(p,q)-H0 = -0.0000001463809585, L(p,q)-L0 = -0.0000000203021252 -t = 67.0000, H(p,q)-H0 = -0.0000001463806313, L(p,q)-L0 = -0.0000000203021276 -t = 67.1000, H(p,q)-H0 = -0.0000001463801940, L(p,q)-L0 = -0.0000000203021303 -t = 67.2000, H(p,q)-H0 = -0.0000001463796050, L(p,q)-L0 = -0.0000000203021340 -t = 67.3000, H(p,q)-H0 = -0.0000001463788020, L(p,q)-L0 = -0.0000000203021379 -t = 67.4000, H(p,q)-H0 = -0.0000001463776947, L(p,q)-L0 = -0.0000000203021440 -t = 67.5000, H(p,q)-H0 = -0.0000001463761437, L(p,q)-L0 = -0.0000000203021515 -t = 67.6000, H(p,q)-H0 = -0.0000001463739359, L(p,q)-L0 = -0.0000000203021617 -t = 67.7000, H(p,q)-H0 = -0.0000001463707360, L(p,q)-L0 = -0.0000000203021764 -t = 67.8000, H(p,q)-H0 = -0.0000001463660031, L(p,q)-L0 = -0.0000000203021971 -t = 67.9000, H(p,q)-H0 = -0.0000001463588457, L(p,q)-L0 = -0.0000000203022288 -t = 68.0000, H(p,q)-H0 = -0.0000001463477532, L(p,q)-L0 = -0.0000000203022782 -t = 68.1000, H(p,q)-H0 = -0.0000001463301014, L(p,q)-L0 = -0.0000000203023612 -t = 68.2000, H(p,q)-H0 = -0.0000001463012093, L(p,q)-L0 = -0.0000000203025072 -t = 68.3000, H(p,q)-H0 = -0.0000001462525354, L(p,q)-L0 = -0.0000000203027803 -t = 68.4000, H(p,q)-H0 = -0.0000001461682867, L(p,q)-L0 = -0.0000000203033309 -t = 68.5000, H(p,q)-H0 = -0.0000001460193725, L(p,q)-L0 = -0.0000000203045434 -t = 68.6000, H(p,q)-H0 = -0.0000001457539152, L(p,q)-L0 = -0.0000000203074929 -t = 68.7000, H(p,q)-H0 = -0.0000001452809537, L(p,q)-L0 = -0.0000000203155135 -t = 68.8000, H(p,q)-H0 = -0.0000001443652686, L(p,q)-L0 = -0.0000000203398052 -t = 68.9000, H(p,q)-H0 = -0.0000001416752902, L(p,q)-L0 = -0.0000000204182535 -t = 69.0000, H(p,q)-H0 = -0.0000001318934946, L(p,q)-L0 = -0.0000000206537967 -t = 69.1000, H(p,q)-H0 = -0.0000001195272865, L(p,q)-L0 = -0.0000000211567287 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 3.1196e-13, num. orbits is now 11.00 -t = 69.1150, H(p,q)-H0 = -0.0000003268473989, L(p,q)-L0 = -0.0000000680246428 -t = 69.2000, H(p,q)-H0 = -0.0000001324768200, L(p,q)-L0 = -0.0000000217300407 -t = 69.3000, H(p,q)-H0 = -0.0000001488338410, L(p,q)-L0 = -0.0000000220586303 -t = 69.4000, H(p,q)-H0 = -0.0000001542105799, L(p,q)-L0 = -0.0000000221777037 -t = 69.5000, H(p,q)-H0 = -0.0000001557830367, L(p,q)-L0 = -0.0000000222146328 -t = 69.6000, H(p,q)-H0 = -0.0000001564585105, L(p,q)-L0 = -0.0000000222264377 -t = 69.7000, H(p,q)-H0 = -0.0000001568088248, L(p,q)-L0 = -0.0000000222306084 -t = 69.8000, H(p,q)-H0 = -0.0000001569983185, L(p,q)-L0 = -0.0000000222322579 -t = 69.9000, H(p,q)-H0 = -0.0000001571030630, L(p,q)-L0 = -0.0000000222329820 -t = 70.0000, H(p,q)-H0 = -0.0000001571624983, L(p,q)-L0 = -0.0000000222333307 -t = 70.1000, H(p,q)-H0 = -0.0000001571972524, L(p,q)-L0 = -0.0000000222335126 -t = 70.2000, H(p,q)-H0 = -0.0000001572182133, L(p,q)-L0 = -0.0000000222336138 -t = 70.3000, H(p,q)-H0 = -0.0000001572312394, L(p,q)-L0 = -0.0000000222336739 -t = 70.4000, H(p,q)-H0 = -0.0000001572395643, L(p,q)-L0 = -0.0000000222337111 -t = 70.5000, H(p,q)-H0 = -0.0000001572450226, L(p,q)-L0 = -0.0000000222337351 -t = 70.6000, H(p,q)-H0 = -0.0000001572486870, L(p,q)-L0 = -0.0000000222337513 -t = 70.7000, H(p,q)-H0 = -0.0000001572511991, L(p,q)-L0 = -0.0000000222337628 -t = 70.8000, H(p,q)-H0 = -0.0000001572529542, L(p,q)-L0 = -0.0000000222337706 -t = 70.9000, H(p,q)-H0 = -0.0000001572542022, L(p,q)-L0 = -0.0000000222337768 -t = 71.0000, H(p,q)-H0 = -0.0000001572551029, L(p,q)-L0 = -0.0000000222337813 -t = 71.1000, H(p,q)-H0 = -0.0000001572557622, L(p,q)-L0 = -0.0000000222337849 -t = 71.2000, H(p,q)-H0 = -0.0000001572562501, L(p,q)-L0 = -0.0000000222337878 -t = 71.3000, H(p,q)-H0 = -0.0000001572566154, L(p,q)-L0 = -0.0000000222337901 -t = 71.4000, H(p,q)-H0 = -0.0000001572568906, L(p,q)-L0 = -0.0000000222337920 -t = 71.5000, H(p,q)-H0 = -0.0000001572570995, L(p,q)-L0 = -0.0000000222337938 -t = 71.6000, H(p,q)-H0 = -0.0000001572572583, L(p,q)-L0 = -0.0000000222337950 -t = 71.7000, H(p,q)-H0 = -0.0000001572573783, L(p,q)-L0 = -0.0000000222337958 -t = 71.8000, H(p,q)-H0 = -0.0000001572574692, L(p,q)-L0 = -0.0000000222337970 -t = 71.9000, H(p,q)-H0 = -0.0000001572575363, L(p,q)-L0 = -0.0000000222337982 -t = 72.0000, H(p,q)-H0 = -0.0000001572575836, L(p,q)-L0 = -0.0000000222337992 -t = 72.1000, H(p,q)-H0 = -0.0000001572576145, L(p,q)-L0 = -0.0000000222338001 -t = 72.2000, H(p,q)-H0 = -0.0000001572576307, L(p,q)-L0 = -0.0000000222338011 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.95956e-13, num. orbits is now 11.50 -t = 72.2566, H(p,q)-H0 = -0.0000001572556351, L(p,q)-L0 = -0.0000000222286056 -t = 72.3000, H(p,q)-H0 = -0.0000001572576328, L(p,q)-L0 = -0.0000000222338018 -t = 72.4000, H(p,q)-H0 = -0.0000001572576213, L(p,q)-L0 = -0.0000000222338027 -t = 72.5000, H(p,q)-H0 = -0.0000001572575952, L(p,q)-L0 = -0.0000000222338037 -t = 72.6000, H(p,q)-H0 = -0.0000001572575530, L(p,q)-L0 = -0.0000000222338042 -t = 72.7000, H(p,q)-H0 = -0.0000001572574919, L(p,q)-L0 = -0.0000000222338056 -t = 72.8000, H(p,q)-H0 = -0.0000001572574082, L(p,q)-L0 = -0.0000000222338067 -t = 72.9000, H(p,q)-H0 = -0.0000001572572962, L(p,q)-L0 = -0.0000000222338080 -t = 73.0000, H(p,q)-H0 = -0.0000001572571477, L(p,q)-L0 = -0.0000000222338096 -t = 73.1000, H(p,q)-H0 = -0.0000001572569518, L(p,q)-L0 = -0.0000000222338112 -t = 73.2000, H(p,q)-H0 = -0.0000001572566929, L(p,q)-L0 = -0.0000000222338131 -t = 73.3000, H(p,q)-H0 = -0.0000001572563492, L(p,q)-L0 = -0.0000000222338151 -t = 73.4000, H(p,q)-H0 = -0.0000001572558899, L(p,q)-L0 = -0.0000000222338180 -t = 73.5000, H(p,q)-H0 = -0.0000001572552698, L(p,q)-L0 = -0.0000000222338215 -t = 73.6000, H(p,q)-H0 = -0.0000001572544235, L(p,q)-L0 = -0.0000000222338259 -t = 73.7000, H(p,q)-H0 = -0.0000001572532525, L(p,q)-L0 = -0.0000000222338319 -t = 73.8000, H(p,q)-H0 = -0.0000001572516086, L(p,q)-L0 = -0.0000000222338397 -t = 73.9000, H(p,q)-H0 = -0.0000001572492617, L(p,q)-L0 = -0.0000000222338505 -t = 74.0000, H(p,q)-H0 = -0.0000001572458490, L(p,q)-L0 = -0.0000000222338656 -t = 74.1000, H(p,q)-H0 = -0.0000001572407829, L(p,q)-L0 = -0.0000000222338877 -t = 74.2000, H(p,q)-H0 = -0.0000001572330914, L(p,q)-L0 = -0.0000000222339216 -t = 74.3000, H(p,q)-H0 = -0.0000001572211208, L(p,q)-L0 = -0.0000000222339759 -t = 74.4000, H(p,q)-H0 = -0.0000001572019823, L(p,q)-L0 = -0.0000000222340664 -t = 74.5000, H(p,q)-H0 = -0.0000001571705042, L(p,q)-L0 = -0.0000000222342278 -t = 74.6000, H(p,q)-H0 = -0.0000001571172206, L(p,q)-L0 = -0.0000000222345322 -t = 74.7000, H(p,q)-H0 = -0.0000001570246138, L(p,q)-L0 = -0.0000000222351564 -t = 74.8000, H(p,q)-H0 = -0.0000001568605209, L(p,q)-L0 = -0.0000000222365533 -t = 74.9000, H(p,q)-H0 = -0.0000001565680252, L(p,q)-L0 = -0.0000000222400157 -t = 75.0000, H(p,q)-H0 = -0.0000001560455560, L(p,q)-L0 = -0.0000000222496106 -t = 75.1000, H(p,q)-H0 = -0.0000001549904116, L(p,q)-L0 = -0.0000000222791301 -t = 75.2000, H(p,q)-H0 = -0.0000001516106689, L(p,q)-L0 = -0.0000000223745359 -t = 75.3000, H(p,q)-H0 = -0.0000001401563476, L(p,q)-L0 = -0.0000000226510208 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.67145e-12, num. orbits is now 12.00 -t = 75.3982, H(p,q)-H0 = -0.0000002026041726, L(p,q)-L0 = -0.0000000394538732 -t = 75.4000, H(p,q)-H0 = -0.0000001305761277, L(p,q)-L0 = -0.0000000231912675 -t = 75.5000, H(p,q)-H0 = -0.0000001468827575, L(p,q)-L0 = -0.0000000237372749 -t = 75.6000, H(p,q)-H0 = -0.0000001611819829, L(p,q)-L0 = -0.0000000240207949 -t = 75.7000, H(p,q)-H0 = -0.0000001654789004, L(p,q)-L0 = -0.0000000241189786 -t = 75.8000, H(p,q)-H0 = -0.0000001668086709, L(p,q)-L0 = -0.0000000241493067 -t = 75.9000, H(p,q)-H0 = -0.0000001674095932, L(p,q)-L0 = -0.0000000241591390 -t = 76.0000, H(p,q)-H0 = -0.0000001677249977, L(p,q)-L0 = -0.0000000241626790 -t = 76.1000, H(p,q)-H0 = -0.0000001678962392, L(p,q)-L0 = -0.0000000241641057 -t = 76.2000, H(p,q)-H0 = -0.0000001679912754, L(p,q)-L0 = -0.0000000241647425 -t = 76.3000, H(p,q)-H0 = -0.0000001680454652, L(p,q)-L0 = -0.0000000241650536 -t = 76.4000, H(p,q)-H0 = -0.0000001680773167, L(p,q)-L0 = -0.0000000241652169 -t = 76.5000, H(p,q)-H0 = -0.0000001680966264, L(p,q)-L0 = -0.0000000241653098 -t = 76.6000, H(p,q)-H0 = -0.0000001681086845, L(p,q)-L0 = -0.0000000241653648 -t = 76.7000, H(p,q)-H0 = -0.0000001681164253, L(p,q)-L0 = -0.0000000241653996 -t = 76.8000, H(p,q)-H0 = -0.0000001681215225, L(p,q)-L0 = -0.0000000241654224 -t = 76.9000, H(p,q)-H0 = -0.0000001681249564, L(p,q)-L0 = -0.0000000241654377 -t = 77.0000, H(p,q)-H0 = -0.0000001681273185, L(p,q)-L0 = -0.0000000241654485 -t = 77.1000, H(p,q)-H0 = -0.0000001681289743, L(p,q)-L0 = -0.0000000241654563 -t = 77.2000, H(p,q)-H0 = -0.0000001681301544, L(p,q)-L0 = -0.0000000241654623 -t = 77.3000, H(p,q)-H0 = -0.0000001681310087, L(p,q)-L0 = -0.0000000241654667 -t = 77.4000, H(p,q)-H0 = -0.0000001681316347, L(p,q)-L0 = -0.0000000241654700 -t = 77.5000, H(p,q)-H0 = -0.0000001681320988, L(p,q)-L0 = -0.0000000241654724 -t = 77.6000, H(p,q)-H0 = -0.0000001681324466, L(p,q)-L0 = -0.0000000241654746 -t = 77.7000, H(p,q)-H0 = -0.0000001681327092, L(p,q)-L0 = -0.0000000241654763 -t = 77.8000, H(p,q)-H0 = -0.0000001681329086, L(p,q)-L0 = -0.0000000241654781 -t = 77.9000, H(p,q)-H0 = -0.0000001681330604, L(p,q)-L0 = -0.0000000241654796 -t = 78.0000, H(p,q)-H0 = -0.0000001681331755, L(p,q)-L0 = -0.0000000241654809 -t = 78.1000, H(p,q)-H0 = -0.0000001681332619, L(p,q)-L0 = -0.0000000241654818 -t = 78.2000, H(p,q)-H0 = -0.0000001681333252, L(p,q)-L0 = -0.0000000241654828 -t = 78.3000, H(p,q)-H0 = -0.0000001681333696, L(p,q)-L0 = -0.0000000241654836 -t = 78.4000, H(p,q)-H0 = -0.0000001681333981, L(p,q)-L0 = -0.0000000241654848 -t = 78.5000, H(p,q)-H0 = -0.0000001681334119, L(p,q)-L0 = -0.0000000241654858 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.30891e-13, num. orbits is now 12.50 -t = 78.5398, H(p,q)-H0 = -0.0000001681333961, L(p,q)-L0 = -0.0000000241654411 -t = 78.6000, H(p,q)-H0 = -0.0000001681334119, L(p,q)-L0 = -0.0000000241654868 -t = 78.7000, H(p,q)-H0 = -0.0000001681333978, L(p,q)-L0 = -0.0000000241654875 -t = 78.8000, H(p,q)-H0 = -0.0000001681333688, L(p,q)-L0 = -0.0000000241654881 -t = 78.9000, H(p,q)-H0 = -0.0000001681333235, L(p,q)-L0 = -0.0000000241654887 -t = 79.0000, H(p,q)-H0 = -0.0000001681332590, L(p,q)-L0 = -0.0000000241654898 -t = 79.1000, H(p,q)-H0 = -0.0000001681331712, L(p,q)-L0 = -0.0000000241654911 -t = 79.2000, H(p,q)-H0 = -0.0000001681330533, L(p,q)-L0 = -0.0000000241654921 -t = 79.3000, H(p,q)-H0 = -0.0000001681328975, L(p,q)-L0 = -0.0000000241654935 -t = 79.4000, H(p,q)-H0 = -0.0000001681326920, L(p,q)-L0 = -0.0000000241654949 -t = 79.5000, H(p,q)-H0 = -0.0000001681324205, L(p,q)-L0 = -0.0000000241654969 -t = 79.6000, H(p,q)-H0 = -0.0000001681320601, L(p,q)-L0 = -0.0000000241654989 -t = 79.7000, H(p,q)-H0 = -0.0000001681315771, L(p,q)-L0 = -0.0000000241655017 -t = 79.8000, H(p,q)-H0 = -0.0000001681309246, L(p,q)-L0 = -0.0000000241655054 -t = 79.9000, H(p,q)-H0 = -0.0000001681300309, L(p,q)-L0 = -0.0000000241655096 -t = 80.0000, H(p,q)-H0 = -0.0000001681287924, L(p,q)-L0 = -0.0000000241655159 -t = 80.1000, H(p,q)-H0 = -0.0000001681270487, L(p,q)-L0 = -0.0000000241655238 -t = 80.2000, H(p,q)-H0 = -0.0000001681245527, L(p,q)-L0 = -0.0000000241655355 -t = 80.3000, H(p,q)-H0 = -0.0000001681209107, L(p,q)-L0 = -0.0000000241655516 -t = 80.4000, H(p,q)-H0 = -0.0000001681154851, L(p,q)-L0 = -0.0000000241655751 -t = 80.5000, H(p,q)-H0 = -0.0000001681072143, L(p,q)-L0 = -0.0000000241656115 -t = 80.6000, H(p,q)-H0 = -0.0000001680942853, L(p,q)-L0 = -0.0000000241656704 -t = 80.7000, H(p,q)-H0 = -0.0000001680735181, L(p,q)-L0 = -0.0000000241657697 -t = 80.8000, H(p,q)-H0 = -0.0000001680391947, L(p,q)-L0 = -0.0000000241659480 -t = 80.9000, H(p,q)-H0 = -0.0000001679808227, L(p,q)-L0 = -0.0000000241662905 -t = 81.0000, H(p,q)-H0 = -0.0000001678789726, L(p,q)-L0 = -0.0000000241670015 -t = 81.1000, H(p,q)-H0 = -0.0000001676981247, L(p,q)-L0 = -0.0000000241686167 -t = 81.2000, H(p,q)-H0 = -0.0000001673758805, L(p,q)-L0 = -0.0000000241726936 -t = 81.3000, H(p,q)-H0 = -0.0000001667972822, L(p,q)-L0 = -0.0000000241842093 -t = 81.4000, H(p,q)-H0 = -0.0000001655629038, L(p,q)-L0 = -0.0000000242201389 -t = 81.5000, H(p,q)-H0 = -0.0000001613010943, L(p,q)-L0 = -0.0000000243358504 -t = 81.6000, H(p,q)-H0 = -0.0000001483443561, L(p,q)-L0 = -0.0000000246567998 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 6.46835e-16, num. orbits is now 13.00 -t = 81.6814, H(p,q)-H0 = -0.0000001884374701, L(p,q)-L0 = -0.0000000357351426 -t = 81.7000, H(p,q)-H0 = -0.0000001426274230, L(p,q)-L0 = -0.0000000252260186 -t = 81.8000, H(p,q)-H0 = -0.0000001610868208, L(p,q)-L0 = -0.0000000257359545 -t = 81.9000, H(p,q)-H0 = -0.0000001732351738, L(p,q)-L0 = -0.0000000259777944 -t = 82.0000, H(p,q)-H0 = -0.0000001766780642, L(p,q)-L0 = -0.0000000260585202 -t = 82.1000, H(p,q)-H0 = -0.0000001778165029, L(p,q)-L0 = -0.0000000260834663 -t = 82.2000, H(p,q)-H0 = -0.0000001783530470, L(p,q)-L0 = -0.0000000260916821 -t = 82.3000, H(p,q)-H0 = -0.0000001786372370, L(p,q)-L0 = -0.0000000260946976 -t = 82.4000, H(p,q)-H0 = -0.0000001787920763, L(p,q)-L0 = -0.0000000260959342 -t = 82.5000, H(p,q)-H0 = -0.0000001788783702, L(p,q)-L0 = -0.0000000260964957 -t = 82.6000, H(p,q)-H0 = -0.0000001789278192, L(p,q)-L0 = -0.0000000260967732 -t = 82.7000, H(p,q)-H0 = -0.0000001789570379, L(p,q)-L0 = -0.0000000260969215 -t = 82.8000, H(p,q)-H0 = -0.0000001789748414, L(p,q)-L0 = -0.0000000260970061 -t = 82.9000, H(p,q)-H0 = -0.0000001789860123, L(p,q)-L0 = -0.0000000260970566 -t = 83.0000, H(p,q)-H0 = -0.0000001789932158, L(p,q)-L0 = -0.0000000260970889 -t = 83.1000, H(p,q)-H0 = -0.0000001789979778, L(p,q)-L0 = -0.0000000260971100 -t = 83.2000, H(p,q)-H0 = -0.0000001790011978, L(p,q)-L0 = -0.0000000260971242 -t = 83.3000, H(p,q)-H0 = -0.0000001790034201, L(p,q)-L0 = -0.0000000260971345 -t = 83.4000, H(p,q)-H0 = -0.0000001790049824, L(p,q)-L0 = -0.0000000260971418 -t = 83.5000, H(p,q)-H0 = -0.0000001790060986, L(p,q)-L0 = -0.0000000260971470 -t = 83.6000, H(p,q)-H0 = -0.0000001790069083, L(p,q)-L0 = -0.0000000260971514 -t = 83.7000, H(p,q)-H0 = -0.0000001790075033, L(p,q)-L0 = -0.0000000260971545 -t = 83.8000, H(p,q)-H0 = -0.0000001790079456, L(p,q)-L0 = -0.0000000260971571 -t = 83.9000, H(p,q)-H0 = -0.0000001790082774, L(p,q)-L0 = -0.0000000260971594 -t = 84.0000, H(p,q)-H0 = -0.0000001790085283, L(p,q)-L0 = -0.0000000260971613 -t = 84.1000, H(p,q)-H0 = -0.0000001790087186, L(p,q)-L0 = -0.0000000260971625 -t = 84.2000, H(p,q)-H0 = -0.0000001790088631, L(p,q)-L0 = -0.0000000260971635 -t = 84.3000, H(p,q)-H0 = -0.0000001790089728, L(p,q)-L0 = -0.0000000260971648 -t = 84.4000, H(p,q)-H0 = -0.0000001790090546, L(p,q)-L0 = -0.0000000260971655 -t = 84.5000, H(p,q)-H0 = -0.0000001790091151, L(p,q)-L0 = -0.0000000260971671 -t = 84.6000, H(p,q)-H0 = -0.0000001790091567, L(p,q)-L0 = -0.0000000260971683 -t = 84.7000, H(p,q)-H0 = -0.0000001790091825, L(p,q)-L0 = -0.0000000260971693 -t = 84.8000, H(p,q)-H0 = -0.0000001790091940, L(p,q)-L0 = -0.0000000260971703 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.68346e-13, num. orbits is now 13.50 -t = 84.8230, H(p,q)-H0 = -0.0000001790074640, L(p,q)-L0 = -0.0000000260926708 -t = 84.9000, H(p,q)-H0 = -0.0000001790091918, L(p,q)-L0 = -0.0000000260971715 -t = 85.0000, H(p,q)-H0 = -0.0000001790091755, L(p,q)-L0 = -0.0000000260971723 -t = 85.1000, H(p,q)-H0 = -0.0000001790091444, L(p,q)-L0 = -0.0000000260971735 -t = 85.2000, H(p,q)-H0 = -0.0000001790090962, L(p,q)-L0 = -0.0000000260971745 -t = 85.3000, H(p,q)-H0 = -0.0000001790090286, L(p,q)-L0 = -0.0000000260971762 -t = 85.4000, H(p,q)-H0 = -0.0000001790089362, L(p,q)-L0 = -0.0000000260971775 -t = 85.5000, H(p,q)-H0 = -0.0000001790088130, L(p,q)-L0 = -0.0000000260971792 -t = 85.6000, H(p,q)-H0 = -0.0000001790086495, L(p,q)-L0 = -0.0000000260971802 -t = 85.7000, H(p,q)-H0 = -0.0000001790084347, L(p,q)-L0 = -0.0000000260971823 -t = 85.8000, H(p,q)-H0 = -0.0000001790081501, L(p,q)-L0 = -0.0000000260971842 -t = 85.9000, H(p,q)-H0 = -0.0000001790077715, L(p,q)-L0 = -0.0000000260971862 -t = 86.0000, H(p,q)-H0 = -0.0000001790072637, L(p,q)-L0 = -0.0000000260971891 -t = 86.1000, H(p,q)-H0 = -0.0000001790065763, L(p,q)-L0 = -0.0000000260971931 -t = 86.2000, H(p,q)-H0 = -0.0000001790056330, L(p,q)-L0 = -0.0000000260971973 -t = 86.3000, H(p,q)-H0 = -0.0000001790043225, L(p,q)-L0 = -0.0000000260972035 -t = 86.4000, H(p,q)-H0 = -0.0000001790024727, L(p,q)-L0 = -0.0000000260972119 -t = 86.5000, H(p,q)-H0 = -0.0000001789998165, L(p,q)-L0 = -0.0000000260972239 -t = 86.6000, H(p,q)-H0 = -0.0000001789959280, L(p,q)-L0 = -0.0000000260972410 -t = 86.7000, H(p,q)-H0 = -0.0000001789901138, L(p,q)-L0 = -0.0000000260972668 -t = 86.8000, H(p,q)-H0 = -0.0000001789812143, L(p,q)-L0 = -0.0000000260973063 -t = 86.9000, H(p,q)-H0 = -0.0000001789672398, L(p,q)-L0 = -0.0000000260973703 -t = 87.0000, H(p,q)-H0 = -0.0000001789446868, L(p,q)-L0 = -0.0000000260974793 -t = 87.1000, H(p,q)-H0 = -0.0000001789072314, L(p,q)-L0 = -0.0000000260976779 -t = 87.2000, H(p,q)-H0 = -0.0000001788432364, L(p,q)-L0 = -0.0000000260980633 -t = 87.3000, H(p,q)-H0 = -0.0000001787311613, L(p,q)-L0 = -0.0000000260988734 -t = 87.4000, H(p,q)-H0 = -0.0000001785318307, L(p,q)-L0 = -0.0000000261007465 -t = 87.5000, H(p,q)-H0 = -0.0000001781768377, L(p,q)-L0 = -0.0000000261055634 -t = 87.6000, H(p,q)-H0 = -0.0000001775336020, L(p,q)-L0 = -0.0000000261194221 -t = 87.7000, H(p,q)-H0 = -0.0000001760651396, L(p,q)-L0 = -0.0000000261632049 -t = 87.8000, H(p,q)-H0 = -0.0000001707039721, L(p,q)-L0 = -0.0000000263030010 -t = 87.9000, H(p,q)-H0 = -0.0000001566574559, L(p,q)-L0 = -0.0000000266708413 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.23226e-14, num. orbits is now 14.00 -t = 87.9646, H(p,q)-H0 = -0.0000003563557172, L(p,q)-L0 = -0.0000000731159798 -t = 88.0000, H(p,q)-H0 = -0.0000001555989786, L(p,q)-L0 = -0.0000000272586693 -t = 88.1000, H(p,q)-H0 = -0.0000001749598755, L(p,q)-L0 = -0.0000000277261296 -t = 88.2000, H(p,q)-H0 = -0.0000001850469524, L(p,q)-L0 = -0.0000000279303964 -t = 88.3000, H(p,q)-H0 = -0.0000001878239839, L(p,q)-L0 = -0.0000000279966472 -t = 88.4000, H(p,q)-H0 = -0.0000001888093408, L(p,q)-L0 = -0.0000000280172091 -t = 88.5000, H(p,q)-H0 = -0.0000001892897106, L(p,q)-L0 = -0.0000000280240952 -t = 88.6000, H(p,q)-H0 = -0.0000001895459414, L(p,q)-L0 = -0.0000000280266713 -t = 88.7000, H(p,q)-H0 = -0.0000001896860389, L(p,q)-L0 = -0.0000000280277472 -t = 88.8000, H(p,q)-H0 = -0.0000001897644556, L(p,q)-L0 = -0.0000000280282425 -t = 88.9000, H(p,q)-H0 = -0.0000001898096190, L(p,q)-L0 = -0.0000000280284912 -t = 89.0000, H(p,q)-H0 = -0.0000001898364448, L(p,q)-L0 = -0.0000000280286255 -t = 89.1000, H(p,q)-H0 = -0.0000001898528728, L(p,q)-L0 = -0.0000000280287027 -t = 89.2000, H(p,q)-H0 = -0.0000001898632301, L(p,q)-L0 = -0.0000000280287495 -t = 89.3000, H(p,q)-H0 = -0.0000001898699378, L(p,q)-L0 = -0.0000000280287791 -t = 89.4000, H(p,q)-H0 = -0.0000001898743898, L(p,q)-L0 = -0.0000000280287989 -t = 89.5000, H(p,q)-H0 = -0.0000001898774109, L(p,q)-L0 = -0.0000000280288124 -t = 89.6000, H(p,q)-H0 = -0.0000001898795028, L(p,q)-L0 = -0.0000000280288219 -t = 89.7000, H(p,q)-H0 = -0.0000001898809773, L(p,q)-L0 = -0.0000000280288288 -t = 89.8000, H(p,q)-H0 = -0.0000001898820338, L(p,q)-L0 = -0.0000000280288337 -t = 89.9000, H(p,q)-H0 = -0.0000001898828024, L(p,q)-L0 = -0.0000000280288380 -t = 90.0000, H(p,q)-H0 = -0.0000001898833679, L(p,q)-L0 = -0.0000000280288410 -t = 90.1000, H(p,q)-H0 = -0.0000001898837888, L(p,q)-L0 = -0.0000000280288436 -t = 90.2000, H(p,q)-H0 = -0.0000001898841049, L(p,q)-L0 = -0.0000000280288452 -t = 90.3000, H(p,q)-H0 = -0.0000001898843445, L(p,q)-L0 = -0.0000000280288475 -t = 90.4000, H(p,q)-H0 = -0.0000001898845265, L(p,q)-L0 = -0.0000000280288495 -t = 90.5000, H(p,q)-H0 = -0.0000001898846649, L(p,q)-L0 = -0.0000000280288510 -t = 90.6000, H(p,q)-H0 = -0.0000001898847695, L(p,q)-L0 = -0.0000000280288522 -t = 90.7000, H(p,q)-H0 = -0.0000001898848473, L(p,q)-L0 = -0.0000000280288526 -t = 90.8000, H(p,q)-H0 = -0.0000001898849037, L(p,q)-L0 = -0.0000000280288535 -t = 90.9000, H(p,q)-H0 = -0.0000001898849425, L(p,q)-L0 = -0.0000000280288543 -t = 91.0000, H(p,q)-H0 = -0.0000001898849659, L(p,q)-L0 = -0.0000000280288553 -t = 91.1000, H(p,q)-H0 = -0.0000001898849750, L(p,q)-L0 = -0.0000000280288560 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -8.63242e-16, num. orbits is now 14.50 -t = 91.1061, H(p,q)-H0 = -0.0000001898827469, L(p,q)-L0 = -0.0000000280230625 -t = 91.2000, H(p,q)-H0 = -0.0000001898849701, L(p,q)-L0 = -0.0000000280288562 -t = 91.3000, H(p,q)-H0 = -0.0000001898849512, L(p,q)-L0 = -0.0000000280288572 -t = 91.4000, H(p,q)-H0 = -0.0000001898849171, L(p,q)-L0 = -0.0000000280288579 -t = 91.5000, H(p,q)-H0 = -0.0000001898848656, L(p,q)-L0 = -0.0000000280288587 -t = 91.6000, H(p,q)-H0 = -0.0000001898847939, L(p,q)-L0 = -0.0000000280288600 -t = 91.7000, H(p,q)-H0 = -0.0000001898846966, L(p,q)-L0 = -0.0000000280288610 -t = 91.8000, H(p,q)-H0 = -0.0000001898845672, L(p,q)-L0 = -0.0000000280288620 -t = 91.9000, H(p,q)-H0 = -0.0000001898843962, L(p,q)-L0 = -0.0000000280288636 -t = 92.0000, H(p,q)-H0 = -0.0000001898841708, L(p,q)-L0 = -0.0000000280288655 -t = 92.1000, H(p,q)-H0 = -0.0000001898838726, L(p,q)-L0 = -0.0000000280288676 -t = 92.2000, H(p,q)-H0 = -0.0000001898834751, L(p,q)-L0 = -0.0000000280288697 -t = 92.3000, H(p,q)-H0 = -0.0000001898829416, L(p,q)-L0 = -0.0000000280288729 -t = 92.4000, H(p,q)-H0 = -0.0000001898822171, L(p,q)-L0 = -0.0000000280288767 -t = 92.5000, H(p,q)-H0 = -0.0000001898812216, L(p,q)-L0 = -0.0000000280288815 -t = 92.6000, H(p,q)-H0 = -0.0000001898798343, L(p,q)-L0 = -0.0000000280288880 -t = 92.7000, H(p,q)-H0 = -0.0000001898778716, L(p,q)-L0 = -0.0000000280288976 -t = 92.8000, H(p,q)-H0 = -0.0000001898750435, L(p,q)-L0 = -0.0000000280289101 -t = 92.9000, H(p,q)-H0 = -0.0000001898708895, L(p,q)-L0 = -0.0000000280289284 -t = 93.0000, H(p,q)-H0 = -0.0000001898646541, L(p,q)-L0 = -0.0000000280289556 -t = 93.1000, H(p,q)-H0 = -0.0000001898550709, L(p,q)-L0 = -0.0000000280289987 -t = 93.2000, H(p,q)-H0 = -0.0000001898399551, L(p,q)-L0 = -0.0000000280290684 -t = 93.3000, H(p,q)-H0 = -0.0000001898154431, L(p,q)-L0 = -0.0000000280291886 -t = 93.4000, H(p,q)-H0 = -0.0000001897745362, L(p,q)-L0 = -0.0000000280294098 -t = 93.5000, H(p,q)-H0 = -0.0000001897043268, L(p,q)-L0 = -0.0000000280298439 -t = 93.6000, H(p,q)-H0 = -0.0000001895809442, L(p,q)-L0 = -0.0000000280307697 -t = 93.7000, H(p,q)-H0 = -0.0000001893612376, L(p,q)-L0 = -0.0000000280329480 -t = 93.8000, H(p,q)-H0 = -0.0000001889701315, L(p,q)-L0 = -0.0000000280386572 -t = 93.9000, H(p,q)-H0 = -0.0000001882510074, L(p,q)-L0 = -0.0000000280553829 -t = 94.0000, H(p,q)-H0 = -0.0000001864738355, L(p,q)-L0 = -0.0000000281087675 -t = 94.1000, H(p,q)-H0 = -0.0000001797882589, L(p,q)-L0 = -0.0000000282767912 -t = 94.2000, H(p,q)-H0 = -0.0000001653372996, L(p,q)-L0 = -0.0000000286923685 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.05948e-15, num. orbits is now 15.00 -t = 94.2477, H(p,q)-H0 = -0.0000002640777677, L(p,q)-L0 = -0.0000000517606307 -t = 94.3000, H(p,q)-H0 = -0.0000001693073164, L(p,q)-L0 = -0.0000000292870754 -t = 94.4000, H(p,q)-H0 = -0.0000001884358527, L(p,q)-L0 = -0.0000000297081790 -t = 94.5000, H(p,q)-H0 = -0.0000001966663752, L(p,q)-L0 = -0.0000000298792937 -t = 94.6000, H(p,q)-H0 = -0.0000001989285208, L(p,q)-L0 = -0.0000000299336169 -t = 94.7000, H(p,q)-H0 = -0.0000001997893495, L(p,q)-L0 = -0.0000000299506040 -t = 94.8000, H(p,q)-H0 = -0.0000002002203056, L(p,q)-L0 = -0.0000000299563938 -t = 94.9000, H(p,q)-H0 = -0.0000002004514631, L(p,q)-L0 = -0.0000000299586003 -t = 95.0000, H(p,q)-H0 = -0.0000002005783051, L(p,q)-L0 = -0.0000000299595384 -t = 95.1000, H(p,q)-H0 = -0.0000002006496229, L(p,q)-L0 = -0.0000000299599773 -t = 95.2000, H(p,q)-H0 = -0.0000002006909088, L(p,q)-L0 = -0.0000000299602008 -t = 95.3000, H(p,q)-H0 = -0.0000002007155586, L(p,q)-L0 = -0.0000000299603227 -t = 95.4000, H(p,q)-H0 = -0.0000002007307307, L(p,q)-L0 = -0.0000000299603936 -t = 95.5000, H(p,q)-H0 = -0.0000002007403406, L(p,q)-L0 = -0.0000000299604366 -t = 95.6000, H(p,q)-H0 = -0.0000002007465910, L(p,q)-L0 = -0.0000000299604641 -t = 95.7000, H(p,q)-H0 = -0.0000002007507558, L(p,q)-L0 = -0.0000000299604828 -t = 95.8000, H(p,q)-H0 = -0.0000002007535922, L(p,q)-L0 = -0.0000000299604959 -t = 95.9000, H(p,q)-H0 = -0.0000002007555624, L(p,q)-L0 = -0.0000000299605052 -t = 96.0000, H(p,q)-H0 = -0.0000002007569556, L(p,q)-L0 = -0.0000000299605120 -t = 96.1000, H(p,q)-H0 = -0.0000002007579564, L(p,q)-L0 = -0.0000000299605171 -t = 96.2000, H(p,q)-H0 = -0.0000002007586850, L(p,q)-L0 = -0.0000000299605203 -t = 96.3000, H(p,q)-H0 = -0.0000002007592228, L(p,q)-L0 = -0.0000000299605234 -t = 96.4000, H(p,q)-H0 = -0.0000002007596239, L(p,q)-L0 = -0.0000000299605261 -t = 96.5000, H(p,q)-H0 = -0.0000002007599259, L(p,q)-L0 = -0.0000000299605285 -t = 96.6000, H(p,q)-H0 = -0.0000002007601543, L(p,q)-L0 = -0.0000000299605303 -t = 96.7000, H(p,q)-H0 = -0.0000002007603281, L(p,q)-L0 = -0.0000000299605317 -t = 96.8000, H(p,q)-H0 = -0.0000002007604597, L(p,q)-L0 = -0.0000000299605325 -t = 96.9000, H(p,q)-H0 = -0.0000002007605596, L(p,q)-L0 = -0.0000000299605338 -t = 97.0000, H(p,q)-H0 = -0.0000002007606337, L(p,q)-L0 = -0.0000000299605348 -t = 97.1000, H(p,q)-H0 = -0.0000002007606874, L(p,q)-L0 = -0.0000000299605361 -t = 97.2000, H(p,q)-H0 = -0.0000002007607235, L(p,q)-L0 = -0.0000000299605371 -t = 97.3000, H(p,q)-H0 = -0.0000002007607446, L(p,q)-L0 = -0.0000000299605381 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.57281e-15, num. orbits is now 15.50 -t = 97.3893, H(p,q)-H0 = -0.0000002007605959, L(p,q)-L0 = -0.0000000299601349 -t = 97.4000, H(p,q)-H0 = -0.0000002007607512, L(p,q)-L0 = -0.0000000299605389 -t = 97.5000, H(p,q)-H0 = -0.0000002007607444, L(p,q)-L0 = -0.0000000299605398 -t = 97.6000, H(p,q)-H0 = -0.0000002007607232, L(p,q)-L0 = -0.0000000299605412 -t = 97.7000, H(p,q)-H0 = -0.0000002007606865, L(p,q)-L0 = -0.0000000299605422 -t = 97.8000, H(p,q)-H0 = -0.0000002007606321, L(p,q)-L0 = -0.0000000299605432 -t = 97.9000, H(p,q)-H0 = -0.0000002007605565, L(p,q)-L0 = -0.0000000299605444 -t = 98.0000, H(p,q)-H0 = -0.0000002007604543, L(p,q)-L0 = -0.0000000299605456 -t = 98.1000, H(p,q)-H0 = -0.0000002007603186, L(p,q)-L0 = -0.0000000299605468 -t = 98.2000, H(p,q)-H0 = -0.0000002007601395, L(p,q)-L0 = -0.0000000299605485 -t = 98.3000, H(p,q)-H0 = -0.0000002007599033, L(p,q)-L0 = -0.0000000299605500 -t = 98.4000, H(p,q)-H0 = -0.0000002007595903, L(p,q)-L0 = -0.0000000299605520 -t = 98.5000, H(p,q)-H0 = -0.0000002007591734, L(p,q)-L0 = -0.0000000299605554 -t = 98.6000, H(p,q)-H0 = -0.0000002007586117, L(p,q)-L0 = -0.0000000299605583 -t = 98.7000, H(p,q)-H0 = -0.0000002007578481, L(p,q)-L0 = -0.0000000299605619 -t = 98.8000, H(p,q)-H0 = -0.0000002007567965, L(p,q)-L0 = -0.0000000299605668 -t = 98.9000, H(p,q)-H0 = -0.0000002007553273, L(p,q)-L0 = -0.0000000299605734 -t = 99.0000, H(p,q)-H0 = -0.0000002007532420, L(p,q)-L0 = -0.0000000299605827 -t = 99.1000, H(p,q)-H0 = -0.0000002007502293, L(p,q)-L0 = -0.0000000299605961 -t = 99.2000, H(p,q)-H0 = -0.0000002007457882, L(p,q)-L0 = -0.0000000299606155 -t = 99.3000, H(p,q)-H0 = -0.0000002007390968, L(p,q)-L0 = -0.0000000299606446 -t = 99.4000, H(p,q)-H0 = -0.0000002007287694, L(p,q)-L0 = -0.0000000299606912 -t = 99.5000, H(p,q)-H0 = -0.0000002007124057, L(p,q)-L0 = -0.0000000299607671 -t = 99.6000, H(p,q)-H0 = -0.0000002006857424, L(p,q)-L0 = -0.0000000299608993 -t = 99.7000, H(p,q)-H0 = -0.0000002006410295, L(p,q)-L0 = -0.0000000299611451 -t = 99.8000, H(p,q)-H0 = -0.0000002005639476, L(p,q)-L0 = -0.0000000299616341 -t = 99.9000, H(p,q)-H0 = -0.0000002004280650, L(p,q)-L0 = -0.0000000299626961 -t = 100.0000, H(p,q)-H0 = -0.0000002001859164, L(p,q)-L0 = -0.0000000299652380 -Current time = 99.99999999999859 +t = 2.0000, H(p,q)-H0 = -0.0000000376222318, L(p,q)-L0 = -0.0000000009852491 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.85142e-14, num. orbits is now 0.50 +t = 3.1416, H(p,q)-H0 = -0.0000000376233078, L(p,q)-L0 = -0.0000000009834136 +t = 4.0000, H(p,q)-H0 = -0.0000000376233031, L(p,q)-L0 = -0.0000000009852743 +t = 6.0000, H(p,q)-H0 = -0.0000000350889846, L(p,q)-L0 = -0.0000000010388308 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 8.46545e-16, num. orbits is now 1.00 +t = 6.2832, H(p,q)-H0 = -0.0000001669914971, L(p,q)-L0 = -0.0000000371745509 +t = 8.0000, H(p,q)-H0 = -0.0000000484955648, L(p,q)-L0 = -0.0000000029169203 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.22089e-14, num. orbits is now 1.50 +t = 9.4248, H(p,q)-H0 = -0.0000000484973282, L(p,q)-L0 = -0.0000000029105186 +t = 10.0000, H(p,q)-H0 = -0.0000000484995450, L(p,q)-L0 = -0.0000000029169562 +t = 12.0000, H(p,q)-H0 = -0.0000000480271458, L(p,q)-L0 = -0.0000000029204726 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.80219e-13, num. orbits is now 2.00 +t = 12.5664, H(p,q)-H0 = -0.0000001990599676, L(p,q)-L0 = -0.0000000438879704 +t = 14.0000, H(p,q)-H0 = -0.0000000593649294, L(p,q)-L0 = -0.0000000048485749 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.43945e-16, num. orbits is now 2.50 +t = 15.7080, H(p,q)-H0 = -0.0000000593745318, L(p,q)-L0 = -0.0000000048459065 +t = 16.0000, H(p,q)-H0 = -0.0000000593755231, L(p,q)-L0 = -0.0000000048486336 +t = 18.0000, H(p,q)-H0 = -0.0000000592660883, L(p,q)-L0 = -0.0000000048491807 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.03794e-13, num. orbits is now 3.00 +t = 18.8496, H(p,q)-H0 = -0.0000000386706762, L(p,q)-L0 = -0.0000000071587637 +t = 20.0000, H(p,q)-H0 = -0.0000000702211224, L(p,q)-L0 = -0.0000000067801686 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.08369e-16, num. orbits is now 3.50 +t = 21.9911, H(p,q)-H0 = -0.0000000702509507, L(p,q)-L0 = -0.0000000067792550 +t = 22.0000, H(p,q)-H0 = -0.0000000702513583, L(p,q)-L0 = -0.0000000067803146 +t = 24.0000, H(p,q)-H0 = -0.0000000702196097, L(p,q)-L0 = -0.0000000067804679 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.94383e-15, num. orbits is now 4.00 +t = 25.1327, H(p,q)-H0 = -0.0000001744439109, L(p,q)-L0 = -0.0000000372869297 +t = 26.0000, H(p,q)-H0 = -0.0000000810237040, L(p,q)-L0 = -0.0000000087114864 +t = 28.0000, H(p,q)-H0 = -0.0000000811270874, L(p,q)-L0 = -0.0000000087120007 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.72026e-16, num. orbits is now 4.50 +t = 28.2743, H(p,q)-H0 = -0.0000000811247498, L(p,q)-L0 = -0.0000000087057775 +t = 30.0000, H(p,q)-H0 = -0.0000000811160636, L(p,q)-L0 = -0.0000000087120632 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.62717e-15, num. orbits is now 5.00 +t = 31.4159, H(p,q)-H0 = -0.0000002477778189, L(p,q)-L0 = -0.0000000533154391 +t = 32.0000, H(p,q)-H0 = -0.0000000915518348, L(p,q)-L0 = -0.0000000106404725 +t = 34.0000, H(p,q)-H0 = -0.0000000920026730, L(p,q)-L0 = -0.0000000106436840 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -9.26993e-16, num. orbits is now 5.50 +t = 34.5575, H(p,q)-H0 = -0.0000000920015394, L(p,q)-L0 = -0.0000000106400764 +t = 36.0000, H(p,q)-H0 = -0.0000000919985591, L(p,q)-L0 = -0.0000000106437179 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 7.15849e-13, num. orbits is now 6.00 +t = 37.6991, H(p,q)-H0 = -0.0000000872834880, L(p,q)-L0 = -0.0000000165621029 +t = 38.0000, H(p,q)-H0 = -0.0000001002050503, L(p,q)-L0 = -0.0000000125283993 +t = 40.0000, H(p,q)-H0 = -0.0000001028780088, L(p,q)-L0 = -0.0000000125753666 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.26574e-13, num. orbits is now 6.50 +t = 40.8407, H(p,q)-H0 = -0.0000001028785500, L(p,q)-L0 = -0.0000000125749476 +t = 42.0000, H(p,q)-H0 = -0.0000001028768848, L(p,q)-L0 = -0.0000000125753943 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 9.73597e-13, num. orbits is now 7.00 +t = 43.9823, H(p,q)-H0 = -0.0000001792544151, L(p,q)-L0 = -0.0000000368028044 +t = 44.0000, H(p,q)-H0 = -0.0000000772849207, L(p,q)-L0 = -0.0000000136304056 +t = 46.0000, H(p,q)-H0 = -0.0000001137528036, L(p,q)-L0 = -0.0000000145070463 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.6285e-13, num. orbits is now 7.50 +t = 47.1239, H(p,q)-H0 = -0.0000001137522608, L(p,q)-L0 = -0.0000000145012423 +t = 48.0000, H(p,q)-H0 = -0.0000001137537413, L(p,q)-L0 = -0.0000000145070741 +t = 50.0000, H(p,q)-H0 = -0.0000001108326937, L(p,q)-L0 = -0.0000000145724238 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 6.47659e-15, num. orbits is now 8.00 +t = 50.2655, H(p,q)-H0 = -0.0000002905677317, L(p,q)-L0 = -0.0000000614048145 +t = 52.0000, H(p,q)-H0 = -0.0000001246262774, L(p,q)-L0 = -0.0000000164387213 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.97973e-17, num. orbits is now 8.50 +t = 53.4071, H(p,q)-H0 = -0.0000001246285745, L(p,q)-L0 = -0.0000000164342973 +t = 54.0000, H(p,q)-H0 = -0.0000001246300113, L(p,q)-L0 = -0.0000000164387585 +t = 56.0000, H(p,q)-H0 = -0.0000001241091641, L(p,q)-L0 = -0.0000000164428131 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.07351e-12, num. orbits is now 9.00 +t = 56.5487, H(p,q)-H0 = -0.0000001428438623, L(p,q)-L0 = -0.0000000275339136 +t = 58.0000, H(p,q)-H0 = -0.0000001354960408, L(p,q)-L0 = -0.0000000183703783 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.47286e-15, num. orbits is now 9.50 +t = 59.6902, H(p,q)-H0 = -0.0000001355060441, L(p,q)-L0 = -0.0000000183703766 +t = 60.0000, H(p,q)-H0 = -0.0000001355060024, L(p,q)-L0 = -0.0000000183704374 +t = 62.0000, H(p,q)-H0 = -0.0000001353868683, L(p,q)-L0 = -0.0000000183710385 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 4.19987e-15, num. orbits is now 10.00 +t = 62.8318, H(p,q)-H0 = -0.0000001832015348, L(p,q)-L0 = -0.0000000361236062 +t = 64.0000, H(p,q)-H0 = -0.0000001463536499, L(p,q)-L0 = -0.0000000203019801 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.69318e-13, num. orbits is now 10.50 +t = 65.9734, H(p,q)-H0 = -0.0000001463798256, L(p,q)-L0 = -0.0000000202968796 +t = 66.0000, H(p,q)-H0 = -0.0000001463818393, L(p,q)-L0 = -0.0000000203021158 +t = 68.0000, H(p,q)-H0 = -0.0000001463477424, L(p,q)-L0 = -0.0000000203022792 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 3.11062e-13, num. orbits is now 11.00 +t = 69.1150, H(p,q)-H0 = -0.0000003268473887, L(p,q)-L0 = -0.0000000680246426 +t = 70.0000, H(p,q)-H0 = -0.0000001571624838, L(p,q)-L0 = -0.0000000222333291 +t = 72.0000, H(p,q)-H0 = -0.0000001572575694, L(p,q)-L0 = -0.0000000222337989 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.97186e-13, num. orbits is now 11.50 +t = 72.2566, H(p,q)-H0 = -0.0000001572556211, L(p,q)-L0 = -0.0000000222286056 +t = 74.0000, H(p,q)-H0 = -0.0000001572458339, L(p,q)-L0 = -0.0000000222338642 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.67255e-12, num. orbits is now 12.00 +t = 75.3982, H(p,q)-H0 = -0.0000002026041548, L(p,q)-L0 = -0.0000000394538707 +t = 76.0000, H(p,q)-H0 = -0.0000001677249825, L(p,q)-L0 = -0.0000000241626776 +t = 78.0000, H(p,q)-H0 = -0.0000001681331613, L(p,q)-L0 = -0.0000000241654816 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.30983e-13, num. orbits is now 12.50 +t = 78.5398, H(p,q)-H0 = -0.0000001681333823, L(p,q)-L0 = -0.0000000241654422 +t = 80.0000, H(p,q)-H0 = -0.0000001681287797, L(p,q)-L0 = -0.0000000241655181 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.31473e-14, num. orbits is now 13.00 +t = 81.6814, H(p,q)-H0 = -0.0000001884374603, L(p,q)-L0 = -0.0000000357351463 +t = 82.0000, H(p,q)-H0 = -0.0000001766780491, L(p,q)-L0 = -0.0000000260585226 +t = 84.0000, H(p,q)-H0 = -0.0000001790085129, L(p,q)-L0 = -0.0000000260971640 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.67361e-13, num. orbits is now 13.50 +t = 84.8230, H(p,q)-H0 = -0.0000001790074484, L(p,q)-L0 = -0.0000000260926729 +t = 86.0000, H(p,q)-H0 = -0.0000001790072481, L(p,q)-L0 = -0.0000000260971915 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.94733e-12, num. orbits is now 14.00 +t = 87.9646, H(p,q)-H0 = -0.0000003563557034, L(p,q)-L0 = -0.0000000731159820 +t = 88.0000, H(p,q)-H0 = -0.0000001555989648, L(p,q)-L0 = -0.0000000272586714 +t = 90.0000, H(p,q)-H0 = -0.0000001898833518, L(p,q)-L0 = -0.0000000280288431 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -9.70903e-16, num. orbits is now 14.50 +t = 91.1061, H(p,q)-H0 = -0.0000001898827311, L(p,q)-L0 = -0.0000000280230654 +t = 92.0000, H(p,q)-H0 = -0.0000001898841560, L(p,q)-L0 = -0.0000000280288693 +t = 94.0000, H(p,q)-H0 = -0.0000001864738195, L(p,q)-L0 = -0.0000000281087710 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.30503e-14, num. orbits is now 15.00 +t = 94.2477, H(p,q)-H0 = -0.0000002640777539, L(p,q)-L0 = -0.0000000517606343 +t = 96.0000, H(p,q)-H0 = -0.0000002007569454, L(p,q)-L0 = -0.0000000299605183 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.38134e-13, num. orbits is now 15.50 +t = 97.3893, H(p,q)-H0 = -0.0000002007605849, L(p,q)-L0 = -0.0000000299601406 +t = 98.0000, H(p,q)-H0 = -0.0000002007604434, L(p,q)-L0 = -0.0000000299605509 +t = 100.0000, H(p,q)-H0 = -0.0000002001859060, L(p,q)-L0 = -0.0000000299652453 +Current time = 100 Steps = 10000 Step attempts = 10000 Stability limited steps = 0 @@ -1081,9 +132,9 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.01 -Last step size = 0.009999999999948264 -Current step size = 0.009999999999948264 -Root fn evals = 10294 +Last step size = 0.009999999998981926 +Current step size = 0.009999999998981926 +Root fn evals = 10288 Explicit RHS fn evals = 60001 Implicit RHS fn evals = 0 NLS iters = 0 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out index 83e71e53dc..a13808f38c 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out @@ -4,1075 +4,126 @@ Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 1 dt: 0.01 Tf: 100 - nout: 1000 + nout: 50 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 0.1000, H(p,q)-H0 = -0.0000000018824737, L(p,q)-L0 = 0.0000000000000000 -t = 0.2000, H(p,q)-H0 = -0.0000000017446897, L(p,q)-L0 = 0.0000000000000000 -t = 0.3000, H(p,q)-H0 = 0.0000000001300120, L(p,q)-L0 = -0.0000000000000001 -t = 0.4000, H(p,q)-H0 = 0.0000000012995796, L(p,q)-L0 = 0.0000000000000000 -t = 0.5000, H(p,q)-H0 = 0.0000000018082987, L(p,q)-L0 = -0.0000000000000001 -t = 0.6000, H(p,q)-H0 = 0.0000000020168753, L(p,q)-L0 = 0.0000000000000001 -t = 0.7000, H(p,q)-H0 = 0.0000000021055039, L(p,q)-L0 = 0.0000000000000000 -t = 0.8000, H(p,q)-H0 = 0.0000000021456816, L(p,q)-L0 = 0.0000000000000000 -t = 0.9000, H(p,q)-H0 = 0.0000000021652163, L(p,q)-L0 = 0.0000000000000001 -t = 1.0000, H(p,q)-H0 = 0.0000000021753693, L(p,q)-L0 = 0.0000000000000000 -t = 1.1000, H(p,q)-H0 = 0.0000000021809765, L(p,q)-L0 = -0.0000000000000001 -t = 1.2000, H(p,q)-H0 = 0.0000000021842454, L(p,q)-L0 = 0.0000000000000000 -t = 1.3000, H(p,q)-H0 = 0.0000000021862439, L(p,q)-L0 = 0.0000000000000001 -t = 1.4000, H(p,q)-H0 = 0.0000000021875181, L(p,q)-L0 = 0.0000000000000000 -t = 1.5000, H(p,q)-H0 = 0.0000000021883610, L(p,q)-L0 = 0.0000000000000000 -t = 1.6000, H(p,q)-H0 = 0.0000000021889367, L(p,q)-L0 = 0.0000000000000000 -t = 1.7000, H(p,q)-H0 = 0.0000000021893412, L(p,q)-L0 = 0.0000000000000000 -t = 1.8000, H(p,q)-H0 = 0.0000000021896323, L(p,q)-L0 = 0.0000000000000000 -t = 1.9000, H(p,q)-H0 = 0.0000000021898465, L(p,q)-L0 = 0.0000000000000000 -t = 2.0000, H(p,q)-H0 = 0.0000000021900070, L(p,q)-L0 = 0.0000000000000000 -t = 2.1000, H(p,q)-H0 = 0.0000000021901287, L(p,q)-L0 = 0.0000000000000000 -t = 2.2000, H(p,q)-H0 = 0.0000000021902227, L(p,q)-L0 = 0.0000000000000000 -t = 2.3000, H(p,q)-H0 = 0.0000000021902956, L(p,q)-L0 = 0.0000000000000000 -t = 2.4000, H(p,q)-H0 = 0.0000000021903526, L(p,q)-L0 = 0.0000000000000000 -t = 2.5000, H(p,q)-H0 = 0.0000000021903970, L(p,q)-L0 = 0.0000000000000000 -t = 2.6000, H(p,q)-H0 = 0.0000000021904316, L(p,q)-L0 = 0.0000000000000000 -t = 2.7000, H(p,q)-H0 = 0.0000000021904581, L(p,q)-L0 = 0.0000000000000000 -t = 2.8000, H(p,q)-H0 = 0.0000000021904781, L(p,q)-L0 = 0.0000000000000000 -t = 2.9000, H(p,q)-H0 = 0.0000000021904921, L(p,q)-L0 = 0.0000000000000000 -t = 3.0000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 -t = 3.1000, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = 0.0000000000000001 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.84095e-14, num. orbits is now 0.50 -t = 3.1416, H(p,q)-H0 = 0.0000000021905044, L(p,q)-L0 = -0.0000000000000036 -t = 3.2000, H(p,q)-H0 = 0.0000000021905047, L(p,q)-L0 = 0.0000000000000000 -t = 3.3000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000001 -t = 3.4000, H(p,q)-H0 = 0.0000000021904899, L(p,q)-L0 = 0.0000000000000000 -t = 3.5000, H(p,q)-H0 = 0.0000000021904749, L(p,q)-L0 = 0.0000000000000000 -t = 3.6000, H(p,q)-H0 = 0.0000000021904538, L(p,q)-L0 = 0.0000000000000000 -t = 3.7000, H(p,q)-H0 = 0.0000000021904260, L(p,q)-L0 = 0.0000000000000000 -t = 3.8000, H(p,q)-H0 = 0.0000000021903896, L(p,q)-L0 = 0.0000000000000000 -t = 3.9000, H(p,q)-H0 = 0.0000000021903431, L(p,q)-L0 = 0.0000000000000001 -t = 4.0000, H(p,q)-H0 = 0.0000000021902835, L(p,q)-L0 = 0.0000000000000000 -t = 4.1000, H(p,q)-H0 = 0.0000000021902072, L(p,q)-L0 = 0.0000000000000000 -t = 4.2000, H(p,q)-H0 = 0.0000000021901089, L(p,q)-L0 = 0.0000000000000000 -t = 4.3000, H(p,q)-H0 = 0.0000000021899808, L(p,q)-L0 = 0.0000000000000001 -t = 4.4000, H(p,q)-H0 = 0.0000000021898117, L(p,q)-L0 = 0.0000000000000000 -t = 4.5000, H(p,q)-H0 = 0.0000000021895855, L(p,q)-L0 = 0.0000000000000000 -t = 4.6000, H(p,q)-H0 = 0.0000000021892765, L(p,q)-L0 = 0.0000000000000000 -t = 4.7000, H(p,q)-H0 = 0.0000000021888458, L(p,q)-L0 = 0.0000000000000000 -t = 4.8000, H(p,q)-H0 = 0.0000000021882303, L(p,q)-L0 = 0.0000000000000000 -t = 4.9000, H(p,q)-H0 = 0.0000000021873244, L(p,q)-L0 = 0.0000000000000000 -t = 5.0000, H(p,q)-H0 = 0.0000000021859471, L(p,q)-L0 = 0.0000000000000000 -t = 5.1000, H(p,q)-H0 = 0.0000000021837736, L(p,q)-L0 = 0.0000000000000000 -t = 5.2000, H(p,q)-H0 = 0.0000000021801940, L(p,q)-L0 = 0.0000000000000000 -t = 5.3000, H(p,q)-H0 = 0.0000000021740070, L(p,q)-L0 = 0.0000000000000000 -t = 5.4000, H(p,q)-H0 = 0.0000000021627109, L(p,q)-L0 = 0.0000000000000000 -t = 5.5000, H(p,q)-H0 = 0.0000000021407837, L(p,q)-L0 = 0.0000000000000001 -t = 5.6000, H(p,q)-H0 = 0.0000000020952696, L(p,q)-L0 = 0.0000000000000001 -t = 5.7000, H(p,q)-H0 = 0.0000000019940064, L(p,q)-L0 = 0.0000000000000001 -t = 5.8000, H(p,q)-H0 = 0.0000000017543399, L(p,q)-L0 = -0.0000000000000001 -t = 5.9000, H(p,q)-H0 = 0.0000000011716927, L(p,q)-L0 = 0.0000000000000000 -t = 6.0000, H(p,q)-H0 = -0.0000000001292899, L(p,q)-L0 = 0.0000000000000000 -t = 6.1000, H(p,q)-H0 = -0.0000000019832624, L(p,q)-L0 = 0.0000000000000000 -t = 6.2000, H(p,q)-H0 = -0.0000000015692070, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 8.34619e-16, num. orbits is now 1.00 -t = 6.2832, H(p,q)-H0 = -0.0000000251097632, L(p,q)-L0 = -0.0000000054735654 -t = 6.3000, H(p,q)-H0 = -0.0000000000785478, L(p,q)-L0 = 0.0000000000000000 -t = 6.4000, H(p,q)-H0 = -0.0000000021444517, L(p,q)-L0 = 0.0000000000000000 -t = 6.5000, H(p,q)-H0 = -0.0000000014380208, L(p,q)-L0 = 0.0000000000000000 -t = 6.6000, H(p,q)-H0 = 0.0000000003899581, L(p,q)-L0 = 0.0000000000000001 -t = 6.7000, H(p,q)-H0 = 0.0000000014194270, L(p,q)-L0 = 0.0000000000000001 -t = 6.8000, H(p,q)-H0 = 0.0000000018574055, L(p,q)-L0 = 0.0000000000000000 -t = 6.9000, H(p,q)-H0 = 0.0000000020373460, L(p,q)-L0 = -0.0000000000000001 -t = 7.0000, H(p,q)-H0 = 0.0000000021145606, L(p,q)-L0 = 0.0000000000000001 -t = 7.1000, H(p,q)-H0 = 0.0000000021499772, L(p,q)-L0 = 0.0000000000000000 -t = 7.2000, H(p,q)-H0 = 0.0000000021673975, L(p,q)-L0 = 0.0000000000000000 -t = 7.3000, H(p,q)-H0 = 0.0000000021765487, L(p,q)-L0 = 0.0000000000000000 -t = 7.4000, H(p,q)-H0 = 0.0000000021816513, L(p,q)-L0 = 0.0000000000000000 -t = 7.5000, H(p,q)-H0 = 0.0000000021846508, L(p,q)-L0 = 0.0000000000000000 -t = 7.6000, H(p,q)-H0 = 0.0000000021864986, L(p,q)-L0 = 0.0000000000000000 -t = 7.7000, H(p,q)-H0 = 0.0000000021876844, L(p,q)-L0 = 0.0000000000000000 -t = 7.8000, H(p,q)-H0 = 0.0000000021884732, L(p,q)-L0 = 0.0000000000000000 -t = 7.9000, H(p,q)-H0 = 0.0000000021890147, L(p,q)-L0 = 0.0000000000000000 -t = 8.0000, H(p,q)-H0 = 0.0000000021893968, L(p,q)-L0 = 0.0000000000000000 -t = 8.1000, H(p,q)-H0 = 0.0000000021896730, L(p,q)-L0 = 0.0000000000000000 -t = 8.2000, H(p,q)-H0 = 0.0000000021898767, L(p,q)-L0 = 0.0000000000000000 -t = 8.3000, H(p,q)-H0 = 0.0000000021900298, L(p,q)-L0 = 0.0000000000000000 -t = 8.4000, H(p,q)-H0 = 0.0000000021901463, L(p,q)-L0 = 0.0000000000000000 -t = 8.5000, H(p,q)-H0 = 0.0000000021902362, L(p,q)-L0 = 0.0000000000000000 -t = 8.6000, H(p,q)-H0 = 0.0000000021903061, L(p,q)-L0 = 0.0000000000000001 -t = 8.7000, H(p,q)-H0 = 0.0000000021903608, L(p,q)-L0 = 0.0000000000000000 -t = 8.8000, H(p,q)-H0 = 0.0000000021904033, L(p,q)-L0 = 0.0000000000000000 -t = 8.9000, H(p,q)-H0 = 0.0000000021904367, L(p,q)-L0 = 0.0000000000000000 -t = 9.0000, H(p,q)-H0 = 0.0000000021904620, L(p,q)-L0 = -0.0000000000000001 -t = 9.1000, H(p,q)-H0 = 0.0000000021904808, L(p,q)-L0 = 0.0000000000000001 -t = 9.2000, H(p,q)-H0 = 0.0000000021904940, L(p,q)-L0 = 0.0000000000000000 -t = 9.3000, H(p,q)-H0 = 0.0000000021905020, L(p,q)-L0 = 0.0000000000000000 -t = 9.4000, H(p,q)-H0 = 0.0000000021905055, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.22192e-14, num. orbits is now 1.50 -t = 9.4248, H(p,q)-H0 = 0.0000000021905012, L(p,q)-L0 = -0.0000000000000127 -t = 9.5000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000001 -t = 9.6000, H(p,q)-H0 = 0.0000000021904984, L(p,q)-L0 = 0.0000000000000000 -t = 9.7000, H(p,q)-H0 = 0.0000000021904878, L(p,q)-L0 = 0.0000000000000000 -t = 9.8000, H(p,q)-H0 = 0.0000000021904717, L(p,q)-L0 = 0.0000000000000000 -t = 9.9000, H(p,q)-H0 = 0.0000000021904497, L(p,q)-L0 = 0.0000000000000000 -t = 10.0000, H(p,q)-H0 = 0.0000000021904205, L(p,q)-L0 = 0.0000000000000000 -t = 10.1000, H(p,q)-H0 = 0.0000000021903827, L(p,q)-L0 = 0.0000000000000000 -t = 10.2000, H(p,q)-H0 = 0.0000000021903341, L(p,q)-L0 = 0.0000000000000000 -t = 10.3000, H(p,q)-H0 = 0.0000000021902720, L(p,q)-L0 = 0.0000000000000000 -t = 10.4000, H(p,q)-H0 = 0.0000000021901924, L(p,q)-L0 = 0.0000000000000000 -t = 10.5000, H(p,q)-H0 = 0.0000000021900896, L(p,q)-L0 = 0.0000000000000000 -t = 10.6000, H(p,q)-H0 = 0.0000000021899554, L(p,q)-L0 = 0.0000000000000000 -t = 10.7000, H(p,q)-H0 = 0.0000000021897782, L(p,q)-L0 = 0.0000000000000000 -t = 10.8000, H(p,q)-H0 = 0.0000000021895400, L(p,q)-L0 = 0.0000000000000000 -t = 10.9000, H(p,q)-H0 = 0.0000000021892140, L(p,q)-L0 = 0.0000000000000000 -t = 11.0000, H(p,q)-H0 = 0.0000000021887575, L(p,q)-L0 = 0.0000000000000000 -t = 11.1000, H(p,q)-H0 = 0.0000000021881021, L(p,q)-L0 = 0.0000000000000000 -t = 11.2000, H(p,q)-H0 = 0.0000000021871323, L(p,q)-L0 = 0.0000000000000000 -t = 11.3000, H(p,q)-H0 = 0.0000000021856494, L(p,q)-L0 = 0.0000000000000000 -t = 11.4000, H(p,q)-H0 = 0.0000000021832930, L(p,q)-L0 = 0.0000000000000000 -t = 11.5000, H(p,q)-H0 = 0.0000000021793823, L(p,q)-L0 = 0.0000000000000000 -t = 11.6000, H(p,q)-H0 = 0.0000000021725635, L(p,q)-L0 = 0.0000000000000000 -t = 11.7000, H(p,q)-H0 = 0.0000000021599907, L(p,q)-L0 = -0.0000000000000001 -t = 11.8000, H(p,q)-H0 = 0.0000000021353180, L(p,q)-L0 = 0.0000000000000000 -t = 11.9000, H(p,q)-H0 = 0.0000000020835041, L(p,q)-L0 = 0.0000000000000001 -t = 12.0000, H(p,q)-H0 = 0.0000000019669062, L(p,q)-L0 = 0.0000000000000000 -t = 12.1000, H(p,q)-H0 = 0.0000000016886883, L(p,q)-L0 = -0.0000000000000001 -t = 12.2000, H(p,q)-H0 = 0.0000000010143810, L(p,q)-L0 = 0.0000000000000001 -t = 12.3000, H(p,q)-H0 = -0.0000000004357776, L(p,q)-L0 = 0.0000000000000000 -t = 12.4000, H(p,q)-H0 = -0.0000000021842266, L(p,q)-L0 = 0.0000000000000000 -t = 12.5000, H(p,q)-H0 = -0.0000000011492796, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.9848e-17, num. orbits is now 2.00 -t = 12.5664, H(p,q)-H0 = -0.0000000433269738, L(p,q)-L0 = -0.0000000094495762 -t = 12.6000, H(p,q)-H0 = -0.0000000003226033, L(p,q)-L0 = 0.0000000000000000 -t = 12.7000, H(p,q)-H0 = -0.0000000022824618, L(p,q)-L0 = 0.0000000000000000 -t = 12.8000, H(p,q)-H0 = -0.0000000011085795, L(p,q)-L0 = 0.0000000000000000 -t = 12.9000, H(p,q)-H0 = 0.0000000006228640, L(p,q)-L0 = 0.0000000000000000 -t = 13.0000, H(p,q)-H0 = 0.0000000015228456, L(p,q)-L0 = 0.0000000000000000 -t = 13.1000, H(p,q)-H0 = 0.0000000018996662, L(p,q)-L0 = -0.0000000000000001 -t = 13.2000, H(p,q)-H0 = 0.0000000020551111, L(p,q)-L0 = 0.0000000000000000 -t = 13.3000, H(p,q)-H0 = 0.0000000021225102, L(p,q)-L0 = 0.0000000000000000 -t = 13.4000, H(p,q)-H0 = 0.0000000021537927, L(p,q)-L0 = 0.0000000000000001 -t = 13.5000, H(p,q)-H0 = 0.0000000021693561, L(p,q)-L0 = 0.0000000000000000 -t = 13.6000, H(p,q)-H0 = 0.0000000021776183, L(p,q)-L0 = 0.0000000000000000 -t = 13.7000, H(p,q)-H0 = 0.0000000021822684, L(p,q)-L0 = 0.0000000000000000 -t = 13.8000, H(p,q)-H0 = 0.0000000021850247, L(p,q)-L0 = -0.0000000000000001 -t = 13.9000, H(p,q)-H0 = 0.0000000021867351, L(p,q)-L0 = 0.0000000000000000 -t = 14.0000, H(p,q)-H0 = 0.0000000021878396, L(p,q)-L0 = 0.0000000000000000 -t = 14.1000, H(p,q)-H0 = 0.0000000021885787, L(p,q)-L0 = 0.0000000000000000 -t = 14.2000, H(p,q)-H0 = 0.0000000021890884, L(p,q)-L0 = 0.0000000000000000 -t = 14.3000, H(p,q)-H0 = 0.0000000021894495, L(p,q)-L0 = 0.0000000000000000 -t = 14.4000, H(p,q)-H0 = 0.0000000021897117, L(p,q)-L0 = 0.0000000000000000 -t = 14.5000, H(p,q)-H0 = 0.0000000021899056, L(p,q)-L0 = 0.0000000000000000 -t = 14.6000, H(p,q)-H0 = 0.0000000021900515, L(p,q)-L0 = 0.0000000000000000 -t = 14.7000, H(p,q)-H0 = 0.0000000021901632, L(p,q)-L0 = 0.0000000000000000 -t = 14.8000, H(p,q)-H0 = 0.0000000021902492, L(p,q)-L0 = -0.0000000000000001 -t = 14.9000, H(p,q)-H0 = 0.0000000021903163, L(p,q)-L0 = 0.0000000000000000 -t = 15.0000, H(p,q)-H0 = 0.0000000021903688, L(p,q)-L0 = 0.0000000000000000 -t = 15.1000, H(p,q)-H0 = 0.0000000021904096, L(p,q)-L0 = 0.0000000000000000 -t = 15.2000, H(p,q)-H0 = 0.0000000021904414, L(p,q)-L0 = 0.0000000000000001 -t = 15.3000, H(p,q)-H0 = 0.0000000021904656, L(p,q)-L0 = 0.0000000000000000 -t = 15.4000, H(p,q)-H0 = 0.0000000021904834, L(p,q)-L0 = 0.0000000000000000 -t = 15.5000, H(p,q)-H0 = 0.0000000021904957, L(p,q)-L0 = 0.0000000000000000 -t = 15.6000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000000 -t = 15.7000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.32597e-16, num. orbits is now 2.50 -t = 15.7080, H(p,q)-H0 = 0.0000000021905013, L(p,q)-L0 = -0.0000000000000129 -t = 15.8000, H(p,q)-H0 = 0.0000000021905038, L(p,q)-L0 = 0.0000000000000001 -t = 15.9000, H(p,q)-H0 = 0.0000000021904970, L(p,q)-L0 = 0.0000000000000000 -t = 16.0000, H(p,q)-H0 = 0.0000000021904856, L(p,q)-L0 = 0.0000000000000001 -t = 16.1000, H(p,q)-H0 = 0.0000000021904686, L(p,q)-L0 = -0.0000000000000001 -t = 16.2000, H(p,q)-H0 = 0.0000000021904453, L(p,q)-L0 = 0.0000000000000000 -t = 16.3000, H(p,q)-H0 = 0.0000000021904149, L(p,q)-L0 = 0.0000000000000001 -t = 16.4000, H(p,q)-H0 = 0.0000000021903752, L(p,q)-L0 = 0.0000000000000000 -t = 16.5000, H(p,q)-H0 = 0.0000000021903246, L(p,q)-L0 = 0.0000000000000000 -t = 16.6000, H(p,q)-H0 = 0.0000000021902601, L(p,q)-L0 = 0.0000000000000000 -t = 16.7000, H(p,q)-H0 = 0.0000000021901770, L(p,q)-L0 = 0.0000000000000000 -t = 16.8000, H(p,q)-H0 = 0.0000000021900695, L(p,q)-L0 = 0.0000000000000000 -t = 16.9000, H(p,q)-H0 = 0.0000000021899291, L(p,q)-L0 = 0.0000000000000000 -t = 17.0000, H(p,q)-H0 = 0.0000000021897431, L(p,q)-L0 = 0.0000000000000000 -t = 17.1000, H(p,q)-H0 = 0.0000000021894925, L(p,q)-L0 = 0.0000000000000000 -t = 17.2000, H(p,q)-H0 = 0.0000000021891479, L(p,q)-L0 = 0.0000000000000000 -t = 17.3000, H(p,q)-H0 = 0.0000000021886638, L(p,q)-L0 = 0.0000000000000000 -t = 17.4000, H(p,q)-H0 = 0.0000000021879651, L(p,q)-L0 = 0.0000000000000000 -t = 17.5000, H(p,q)-H0 = 0.0000000021869262, L(p,q)-L0 = 0.0000000000000000 -t = 17.6000, H(p,q)-H0 = 0.0000000021853275, L(p,q)-L0 = 0.0000000000000000 -t = 17.7000, H(p,q)-H0 = 0.0000000021827699, L(p,q)-L0 = -0.0000000000000001 -t = 17.8000, H(p,q)-H0 = 0.0000000021784917, L(p,q)-L0 = 0.0000000000000001 -t = 17.9000, H(p,q)-H0 = 0.0000000021709649, L(p,q)-L0 = 0.0000000000000001 -t = 18.0000, H(p,q)-H0 = 0.0000000021569465, L(p,q)-L0 = 0.0000000000000001 -t = 18.1000, H(p,q)-H0 = 0.0000000021291303, L(p,q)-L0 = -0.0000000000000001 -t = 18.2000, H(p,q)-H0 = 0.0000000020700275, L(p,q)-L0 = -0.0000000000000001 -t = 18.3000, H(p,q)-H0 = 0.0000000019355423, L(p,q)-L0 = 0.0000000000000000 -t = 18.4000, H(p,q)-H0 = 0.0000000016123713, L(p,q)-L0 = 0.0000000000000000 -t = 18.5000, H(p,q)-H0 = 0.0000000008341923, L(p,q)-L0 = 0.0000000000000000 -t = 18.6000, H(p,q)-H0 = -0.0000000007602408, L(p,q)-L0 = 0.0000000000000000 -t = 18.7000, H(p,q)-H0 = -0.0000000022936408, L(p,q)-L0 = 0.0000000000000000 -t = 18.8000, H(p,q)-H0 = -0.0000000007197527, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.02481e-13, num. orbits is now 3.00 -t = 18.8496, H(p,q)-H0 = -0.0000000120056711, L(p,q)-L0 = -0.0000000026200585 -t = 18.9000, H(p,q)-H0 = -0.0000000006891674, L(p,q)-L0 = -0.0000000000000001 -t = 19.0000, H(p,q)-H0 = -0.0000000022938584, L(p,q)-L0 = 0.0000000000000001 -t = 19.1000, H(p,q)-H0 = -0.0000000007742575, L(p,q)-L0 = 0.0000000000000000 -t = 19.2000, H(p,q)-H0 = 0.0000000008292624, L(p,q)-L0 = 0.0000000000000001 -t = 19.3000, H(p,q)-H0 = 0.0000000016119193, L(p,q)-L0 = 0.0000000000000000 -t = 19.4000, H(p,q)-H0 = 0.0000000019360702, L(p,q)-L0 = 0.0000000000000001 -t = 19.5000, H(p,q)-H0 = 0.0000000020705553, L(p,q)-L0 = 0.0000000000000000 -t = 19.6000, H(p,q)-H0 = 0.0000000021295025, L(p,q)-L0 = -0.0000000000000001 -t = 19.7000, H(p,q)-H0 = 0.0000000021571878, L(p,q)-L0 = 0.0000000000000000 -t = 19.8000, H(p,q)-H0 = 0.0000000021711180, L(p,q)-L0 = -0.0000000000000001 -t = 19.9000, H(p,q)-H0 = 0.0000000021785899, L(p,q)-L0 = 0.0000000000000000 -t = 20.0000, H(p,q)-H0 = 0.0000000021828339, L(p,q)-L0 = 0.0000000000000000 -t = 20.1000, H(p,q)-H0 = 0.0000000021853701, L(p,q)-L0 = 0.0000000000000000 -t = 20.2000, H(p,q)-H0 = 0.0000000021869550, L(p,q)-L0 = 0.0000000000000000 -t = 20.3000, H(p,q)-H0 = 0.0000000021879849, L(p,q)-L0 = 0.0000000000000000 -t = 20.4000, H(p,q)-H0 = 0.0000000021886777, L(p,q)-L0 = 0.0000000000000000 -t = 20.5000, H(p,q)-H0 = 0.0000000021891579, L(p,q)-L0 = 0.0000000000000000 -t = 20.6000, H(p,q)-H0 = 0.0000000021894995, L(p,q)-L0 = -0.0000000000000001 -t = 20.7000, H(p,q)-H0 = 0.0000000021897483, L(p,q)-L0 = 0.0000000000000000 -t = 20.8000, H(p,q)-H0 = 0.0000000021899330, L(p,q)-L0 = 0.0000000000000000 -t = 20.9000, H(p,q)-H0 = 0.0000000021900724, L(p,q)-L0 = 0.0000000000000000 -t = 21.0000, H(p,q)-H0 = 0.0000000021901791, L(p,q)-L0 = 0.0000000000000000 -t = 21.1000, H(p,q)-H0 = 0.0000000021902617, L(p,q)-L0 = 0.0000000000000000 -t = 21.2000, H(p,q)-H0 = 0.0000000021903260, L(p,q)-L0 = 0.0000000000000000 -t = 21.3000, H(p,q)-H0 = 0.0000000021903764, L(p,q)-L0 = 0.0000000000000000 -t = 21.4000, H(p,q)-H0 = 0.0000000021904156, L(p,q)-L0 = 0.0000000000000000 -t = 21.5000, H(p,q)-H0 = 0.0000000021904460, L(p,q)-L0 = 0.0000000000000000 -t = 21.6000, H(p,q)-H0 = 0.0000000021904690, L(p,q)-L0 = 0.0000000000000000 -t = 21.7000, H(p,q)-H0 = 0.0000000021904859, L(p,q)-L0 = 0.0000000000000000 -t = 21.8000, H(p,q)-H0 = 0.0000000021904972, L(p,q)-L0 = -0.0000000000000001 -t = 21.9000, H(p,q)-H0 = 0.0000000021905038, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.06467e-16, num. orbits is now 3.50 -t = 21.9911, H(p,q)-H0 = 0.0000000021905048, L(p,q)-L0 = -0.0000000000000026 -t = 22.0000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000000 -t = 22.1000, H(p,q)-H0 = 0.0000000021905029, L(p,q)-L0 = -0.0000000000000001 -t = 22.2000, H(p,q)-H0 = 0.0000000021904955, L(p,q)-L0 = 0.0000000000000001 -t = 22.3000, H(p,q)-H0 = 0.0000000021904830, L(p,q)-L0 = 0.0000000000000000 -t = 22.4000, H(p,q)-H0 = 0.0000000021904652, L(p,q)-L0 = 0.0000000000000000 -t = 22.5000, H(p,q)-H0 = 0.0000000021904408, L(p,q)-L0 = 0.0000000000000000 -t = 22.6000, H(p,q)-H0 = 0.0000000021904089, L(p,q)-L0 = 0.0000000000000000 -t = 22.7000, H(p,q)-H0 = 0.0000000021903677, L(p,q)-L0 = 0.0000000000000001 -t = 22.8000, H(p,q)-H0 = 0.0000000021903149, L(p,q)-L0 = 0.0000000000000000 -t = 22.9000, H(p,q)-H0 = 0.0000000021902474, L(p,q)-L0 = 0.0000000000000000 -t = 23.0000, H(p,q)-H0 = 0.0000000021901607, L(p,q)-L0 = -0.0000000000000001 -t = 23.1000, H(p,q)-H0 = 0.0000000021900485, L(p,q)-L0 = 0.0000000000000000 -t = 23.2000, H(p,q)-H0 = 0.0000000021899015, L(p,q)-L0 = 0.0000000000000000 -t = 23.3000, H(p,q)-H0 = 0.0000000021897061, L(p,q)-L0 = 0.0000000000000000 -t = 23.4000, H(p,q)-H0 = 0.0000000021894420, L(p,q)-L0 = -0.0000000000000001 -t = 23.5000, H(p,q)-H0 = 0.0000000021890779, L(p,q)-L0 = 0.0000000000000000 -t = 23.6000, H(p,q)-H0 = 0.0000000021885638, L(p,q)-L0 = 0.0000000000000000 -t = 23.7000, H(p,q)-H0 = 0.0000000021878186, L(p,q)-L0 = 0.0000000000000000 -t = 23.8000, H(p,q)-H0 = 0.0000000021867045, L(p,q)-L0 = 0.0000000000000000 -t = 23.9000, H(p,q)-H0 = 0.0000000021849794, L(p,q)-L0 = 0.0000000000000000 -t = 24.0000, H(p,q)-H0 = 0.0000000021821998, L(p,q)-L0 = 0.0000000000000000 -t = 24.1000, H(p,q)-H0 = 0.0000000021775125, L(p,q)-L0 = 0.0000000000000000 -t = 24.2000, H(p,q)-H0 = 0.0000000021691906, L(p,q)-L0 = 0.0000000000000000 -t = 24.3000, H(p,q)-H0 = 0.0000000021535328, L(p,q)-L0 = 0.0000000000000000 -t = 24.4000, H(p,q)-H0 = 0.0000000021221120, L(p,q)-L0 = -0.0000000000000001 -t = 24.5000, H(p,q)-H0 = 0.0000000020545623, L(p,q)-L0 = -0.0000000000000001 -t = 24.6000, H(p,q)-H0 = 0.0000000018991935, L(p,q)-L0 = -0.0000000000000002 -t = 24.7000, H(p,q)-H0 = 0.0000000015237045, L(p,q)-L0 = -0.0000000000000001 -t = 24.8000, H(p,q)-H0 = 0.0000000006291403, L(p,q)-L0 = 0.0000000000000000 -t = 24.9000, H(p,q)-H0 = -0.0000000010937444, L(p,q)-L0 = 0.0000000000000000 -t = 25.0000, H(p,q)-H0 = -0.0000000022899942, L(p,q)-L0 = 0.0000000000000000 -t = 25.1000, H(p,q)-H0 = -0.0000000003464105, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.65651e-15, num. orbits is now 4.00 -t = 25.1327, H(p,q)-H0 = -0.0000000213724662, L(p,q)-L0 = -0.0000000046585861 -t = 25.2000, H(p,q)-H0 = -0.0000000011168149, L(p,q)-L0 = 0.0000000000000000 -t = 25.3000, H(p,q)-H0 = -0.0000000021907156, L(p,q)-L0 = 0.0000000000000000 -t = 25.4000, H(p,q)-H0 = -0.0000000004484462, L(p,q)-L0 = 0.0000000000000001 -t = 25.5000, H(p,q)-H0 = 0.0000000010106103, L(p,q)-L0 = 0.0000000000000000 -t = 25.6000, H(p,q)-H0 = 0.0000000016885486, L(p,q)-L0 = -0.0000000000000002 -t = 25.7000, H(p,q)-H0 = 0.0000000019674660, L(p,q)-L0 = 0.0000000000000000 -t = 25.8000, H(p,q)-H0 = 0.0000000020840075, L(p,q)-L0 = 0.0000000000000000 -t = 25.9000, H(p,q)-H0 = 0.0000000021356651, L(p,q)-L0 = 0.0000000000000000 -t = 26.0000, H(p,q)-H0 = 0.0000000021602146, L(p,q)-L0 = 0.0000000000000000 -t = 26.1000, H(p,q)-H0 = 0.0000000021727057, L(p,q)-L0 = -0.0000000000000001 -t = 26.2000, H(p,q)-H0 = 0.0000000021794737, L(p,q)-L0 = 0.0000000000000001 -t = 26.3000, H(p,q)-H0 = 0.0000000021833528, L(p,q)-L0 = 0.0000000000000001 -t = 26.4000, H(p,q)-H0 = 0.0000000021856892, L(p,q)-L0 = 0.0000000000000000 -t = 26.5000, H(p,q)-H0 = 0.0000000021871594, L(p,q)-L0 = 0.0000000000000000 -t = 26.6000, H(p,q)-H0 = 0.0000000021881206, L(p,q)-L0 = 0.0000000000000000 -t = 26.7000, H(p,q)-H0 = 0.0000000021887707, L(p,q)-L0 = 0.0000000000000000 -t = 26.8000, H(p,q)-H0 = 0.0000000021892236, L(p,q)-L0 = 0.0000000000000000 -t = 26.9000, H(p,q)-H0 = 0.0000000021895470, L(p,q)-L0 = 0.0000000000000000 -t = 27.0000, H(p,q)-H0 = 0.0000000021897834, L(p,q)-L0 = 0.0000000000000000 -t = 27.1000, H(p,q)-H0 = 0.0000000021899593, L(p,q)-L0 = 0.0000000000000000 -t = 27.2000, H(p,q)-H0 = 0.0000000021900926, L(p,q)-L0 = 0.0000000000000000 -t = 27.3000, H(p,q)-H0 = 0.0000000021901946, L(p,q)-L0 = 0.0000000000000000 -t = 27.4000, H(p,q)-H0 = 0.0000000021902737, L(p,q)-L0 = 0.0000000000000000 -t = 27.5000, H(p,q)-H0 = 0.0000000021903354, L(p,q)-L0 = 0.0000000000000000 -t = 27.6000, H(p,q)-H0 = 0.0000000021903837, L(p,q)-L0 = 0.0000000000000000 -t = 27.7000, H(p,q)-H0 = 0.0000000021904212, L(p,q)-L0 = 0.0000000000000000 -t = 27.8000, H(p,q)-H0 = 0.0000000021904504, L(p,q)-L0 = 0.0000000000000000 -t = 27.9000, H(p,q)-H0 = 0.0000000021904722, L(p,q)-L0 = -0.0000000000000001 -t = 28.0000, H(p,q)-H0 = 0.0000000021904881, L(p,q)-L0 = 0.0000000000000000 -t = 28.1000, H(p,q)-H0 = 0.0000000021904987, L(p,q)-L0 = 0.0000000000000000 -t = 28.2000, H(p,q)-H0 = 0.0000000021905043, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.55373e-13, num. orbits is now 4.50 -t = 28.2743, H(p,q)-H0 = 0.0000000021905014, L(p,q)-L0 = -0.0000000000000118 -t = 28.3000, H(p,q)-H0 = 0.0000000021905054, L(p,q)-L0 = 0.0000000000000000 -t = 28.4000, H(p,q)-H0 = 0.0000000021905020, L(p,q)-L0 = 0.0000000000000000 -t = 28.5000, H(p,q)-H0 = 0.0000000021904937, L(p,q)-L0 = 0.0000000000000000 -t = 28.6000, H(p,q)-H0 = 0.0000000021904805, L(p,q)-L0 = 0.0000000000000000 -t = 28.7000, H(p,q)-H0 = 0.0000000021904614, L(p,q)-L0 = -0.0000000000000001 -t = 28.8000, H(p,q)-H0 = 0.0000000021904360, L(p,q)-L0 = 0.0000000000000000 -t = 28.9000, H(p,q)-H0 = 0.0000000021904026, L(p,q)-L0 = 0.0000000000000000 -t = 29.0000, H(p,q)-H0 = 0.0000000021903596, L(p,q)-L0 = 0.0000000000000000 -t = 29.1000, H(p,q)-H0 = 0.0000000021903047, L(p,q)-L0 = 0.0000000000000000 -t = 29.2000, H(p,q)-H0 = 0.0000000021902343, L(p,q)-L0 = 0.0000000000000000 -t = 29.3000, H(p,q)-H0 = 0.0000000021901440, L(p,q)-L0 = 0.0000000000000000 -t = 29.4000, H(p,q)-H0 = 0.0000000021900266, L(p,q)-L0 = 0.0000000000000001 -t = 29.5000, H(p,q)-H0 = 0.0000000021898724, L(p,q)-L0 = 0.0000000000000000 -t = 29.6000, H(p,q)-H0 = 0.0000000021896673, L(p,q)-L0 = 0.0000000000000001 -t = 29.7000, H(p,q)-H0 = 0.0000000021893888, L(p,q)-L0 = 0.0000000000000000 -t = 29.8000, H(p,q)-H0 = 0.0000000021890036, L(p,q)-L0 = 0.0000000000000000 -t = 29.9000, H(p,q)-H0 = 0.0000000021884576, L(p,q)-L0 = 0.0000000000000000 -t = 30.0000, H(p,q)-H0 = 0.0000000021876621, L(p,q)-L0 = 0.0000000000000000 -t = 30.1000, H(p,q)-H0 = 0.0000000021864660, L(p,q)-L0 = 0.0000000000000000 -t = 30.2000, H(p,q)-H0 = 0.0000000021846024, L(p,q)-L0 = 0.0000000000000000 -t = 30.3000, H(p,q)-H0 = 0.0000000021815775, L(p,q)-L0 = 0.0000000000000000 -t = 30.4000, H(p,q)-H0 = 0.0000000021764345, L(p,q)-L0 = 0.0000000000000000 -t = 30.5000, H(p,q)-H0 = 0.0000000021672188, L(p,q)-L0 = 0.0000000000000000 -t = 30.6000, H(p,q)-H0 = 0.0000000021496971, L(p,q)-L0 = 0.0000000000000000 -t = 30.7000, H(p,q)-H0 = 0.0000000021141355, L(p,q)-L0 = 0.0000000000000000 -t = 30.8000, H(p,q)-H0 = 0.0000000020367816, L(p,q)-L0 = 0.0000000000000001 -t = 30.9000, H(p,q)-H0 = 0.0000000018570192, L(p,q)-L0 = 0.0000000000000000 -t = 31.0000, H(p,q)-H0 = 0.0000000014208066, L(p,q)-L0 = 0.0000000000000000 -t = 31.1000, H(p,q)-H0 = 0.0000000003977536, L(p,q)-L0 = 0.0000000000000000 -t = 31.2000, H(p,q)-H0 = -0.0000000014232189, L(p,q)-L0 = 0.0000000000000000 -t = 31.3000, H(p,q)-H0 = -0.0000000021604580, L(p,q)-L0 = 0.0000000000000000 -t = 31.4000, H(p,q)-H0 = -0.0000000000914424, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.00569e-12, num. orbits is now 5.00 -t = 31.4159, H(p,q)-H0 = -0.0000000424953108, L(p,q)-L0 = -0.0000000092674631 -t = 31.5000, H(p,q)-H0 = -0.0000000015394452, L(p,q)-L0 = 0.0000000000000000 -t = 31.6000, H(p,q)-H0 = -0.0000000019942239, L(p,q)-L0 = 0.0000000000000000 -t = 31.7000, H(p,q)-H0 = -0.0000000001403404, L(p,q)-L0 = 0.0000000000000000 -t = 31.8000, H(p,q)-H0 = 0.0000000011688956, L(p,q)-L0 = 0.0000000000000000 -t = 31.9000, H(p,q)-H0 = 0.0000000017544357, L(p,q)-L0 = 0.0000000000000001 -t = 32.0000, H(p,q)-H0 = 0.0000000019945796, L(p,q)-L0 = 0.0000000000000000 -t = 32.1000, H(p,q)-H0 = 0.0000000020957474, L(p,q)-L0 = 0.0000000000000001 -t = 32.2000, H(p,q)-H0 = 0.0000000021411067, L(p,q)-L0 = 0.0000000000000000 -t = 32.3000, H(p,q)-H0 = 0.0000000021629182, L(p,q)-L0 = 0.0000000000000000 -t = 32.4000, H(p,q)-H0 = 0.0000000021741389, L(p,q)-L0 = 0.0000000000000000 -t = 32.5000, H(p,q)-H0 = 0.0000000021802790, L(p,q)-L0 = 0.0000000000000000 -t = 32.6000, H(p,q)-H0 = 0.0000000021838293, L(p,q)-L0 = 0.0000000000000000 -t = 32.7000, H(p,q)-H0 = 0.0000000021859843, L(p,q)-L0 = 0.0000000000000000 -t = 32.8000, H(p,q)-H0 = 0.0000000021873497, L(p,q)-L0 = 0.0000000000000000 -t = 32.9000, H(p,q)-H0 = 0.0000000021882478, L(p,q)-L0 = 0.0000000000000000 -t = 33.0000, H(p,q)-H0 = 0.0000000021888584, L(p,q)-L0 = 0.0000000000000001 -t = 33.1000, H(p,q)-H0 = 0.0000000021892856, L(p,q)-L0 = 0.0000000000000000 -t = 33.2000, H(p,q)-H0 = 0.0000000021895919, L(p,q)-L0 = 0.0000000000000000 -t = 33.3000, H(p,q)-H0 = 0.0000000021898166, L(p,q)-L0 = 0.0000000000000000 -t = 33.4000, H(p,q)-H0 = 0.0000000021899843, L(p,q)-L0 = 0.0000000000000000 -t = 33.5000, H(p,q)-H0 = 0.0000000021901115, L(p,q)-L0 = 0.0000000000000000 -t = 33.6000, H(p,q)-H0 = 0.0000000021902093, L(p,q)-L0 = 0.0000000000000000 -t = 33.7000, H(p,q)-H0 = 0.0000000021902852, L(p,q)-L0 = 0.0000000000000000 -t = 33.8000, H(p,q)-H0 = 0.0000000021903444, L(p,q)-L0 = -0.0000000000000001 -t = 33.9000, H(p,q)-H0 = 0.0000000021903905, L(p,q)-L0 = 0.0000000000000000 -t = 34.0000, H(p,q)-H0 = 0.0000000021904268, L(p,q)-L0 = 0.0000000000000001 -t = 34.1000, H(p,q)-H0 = 0.0000000021904544, L(p,q)-L0 = -0.0000000000000001 -t = 34.2000, H(p,q)-H0 = 0.0000000021904754, L(p,q)-L0 = 0.0000000000000000 -t = 34.3000, H(p,q)-H0 = 0.0000000021904903, L(p,q)-L0 = -0.0000000000000001 -t = 34.4000, H(p,q)-H0 = 0.0000000021905000, L(p,q)-L0 = 0.0000000000000000 -t = 34.5000, H(p,q)-H0 = 0.0000000021905050, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.84312e-16, num. orbits is now 5.50 -t = 34.5575, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = -0.0000000000000135 -t = 34.6000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = -0.0000000000000001 -t = 34.7000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = 0.0000000000000000 -t = 34.8000, H(p,q)-H0 = 0.0000000021904919, L(p,q)-L0 = -0.0000000000000001 -t = 34.9000, H(p,q)-H0 = 0.0000000021904777, L(p,q)-L0 = 0.0000000000000000 -t = 35.0000, H(p,q)-H0 = 0.0000000021904577, L(p,q)-L0 = 0.0000000000000000 -t = 35.1000, H(p,q)-H0 = 0.0000000021904310, L(p,q)-L0 = 0.0000000000000000 -t = 35.2000, H(p,q)-H0 = 0.0000000021903960, L(p,q)-L0 = -0.0000000000000001 -t = 35.3000, H(p,q)-H0 = 0.0000000021903513, L(p,q)-L0 = 0.0000000000000001 -t = 35.4000, H(p,q)-H0 = 0.0000000021902941, L(p,q)-L0 = 0.0000000000000000 -t = 35.5000, H(p,q)-H0 = 0.0000000021902208, L(p,q)-L0 = 0.0000000000000000 -t = 35.6000, H(p,q)-H0 = 0.0000000021901262, L(p,q)-L0 = 0.0000000000000000 -t = 35.7000, H(p,q)-H0 = 0.0000000021900036, L(p,q)-L0 = 0.0000000000000001 -t = 35.8000, H(p,q)-H0 = 0.0000000021898420, L(p,q)-L0 = 0.0000000000000000 -t = 35.9000, H(p,q)-H0 = 0.0000000021896263, L(p,q)-L0 = 0.0000000000000000 -t = 36.0000, H(p,q)-H0 = 0.0000000021893328, L(p,q)-L0 = 0.0000000000000000 -t = 36.1000, H(p,q)-H0 = 0.0000000021889250, L(p,q)-L0 = 0.0000000000000000 -t = 36.2000, H(p,q)-H0 = 0.0000000021883444, L(p,q)-L0 = 0.0000000000000000 -t = 36.3000, H(p,q)-H0 = 0.0000000021874944, L(p,q)-L0 = 0.0000000000000001 -t = 36.4000, H(p,q)-H0 = 0.0000000021862090, L(p,q)-L0 = -0.0000000000000001 -t = 36.5000, H(p,q)-H0 = 0.0000000021841934, L(p,q)-L0 = -0.0000000000000001 -t = 36.6000, H(p,q)-H0 = 0.0000000021808974, L(p,q)-L0 = 0.0000000000000000 -t = 36.7000, H(p,q)-H0 = 0.0000000021752466, L(p,q)-L0 = 0.0000000000000000 -t = 36.8000, H(p,q)-H0 = 0.0000000021650234, L(p,q)-L0 = 0.0000000000000000 -t = 36.9000, H(p,q)-H0 = 0.0000000021453802, L(p,q)-L0 = 0.0000000000000000 -t = 37.0000, H(p,q)-H0 = 0.0000000021050518, L(p,q)-L0 = 0.0000000000000000 -t = 37.1000, H(p,q)-H0 = 0.0000000020163013, L(p,q)-L0 = 0.0000000000000000 -t = 37.2000, H(p,q)-H0 = 0.0000000018080382, L(p,q)-L0 = -0.0000000000000001 -t = 37.3000, H(p,q)-H0 = 0.0000000013016144, L(p,q)-L0 = 0.0000000000000000 -t = 37.4000, H(p,q)-H0 = 0.0000000001394564, L(p,q)-L0 = 0.0000000000000000 -t = 37.5000, H(p,q)-H0 = -0.0000000017311286, L(p,q)-L0 = 0.0000000000000000 -t = 37.6000, H(p,q)-H0 = -0.0000000019064752, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 7.23216e-13, num. orbits is now 6.00 -t = 37.6991, H(p,q)-H0 = -0.0000000216938074, L(p,q)-L0 = -0.0000000047339080 -t = 37.7000, H(p,q)-H0 = 0.0000000000003602, L(p,q)-L0 = 0.0000000000000000 -t = 37.8000, H(p,q)-H0 = -0.0000000018991442, L(p,q)-L0 = 0.0000000000000000 -t = 37.9000, H(p,q)-H0 = -0.0000000017294071, L(p,q)-L0 = -0.0000000000000001 -t = 38.0000, H(p,q)-H0 = 0.0000000001444085, L(p,q)-L0 = 0.0000000000000000 -t = 38.1000, H(p,q)-H0 = 0.0000000013063550, L(p,q)-L0 = 0.0000000000000000 -t = 38.2000, H(p,q)-H0 = 0.0000000018110816, L(p,q)-L0 = 0.0000000000000000 -t = 38.3000, H(p,q)-H0 = 0.0000000020180311, L(p,q)-L0 = 0.0000000000000000 -t = 38.4000, H(p,q)-H0 = 0.0000000021060125, L(p,q)-L0 = -0.0000000000000001 -t = 38.5000, H(p,q)-H0 = 0.0000000021459217, L(p,q)-L0 = 0.0000000000000000 -t = 38.6000, H(p,q)-H0 = 0.0000000021653375, L(p,q)-L0 = 0.0000000000000000 -t = 38.7000, H(p,q)-H0 = 0.0000000021754346, L(p,q)-L0 = 0.0000000000000001 -t = 38.8000, H(p,q)-H0 = 0.0000000021810138, L(p,q)-L0 = 0.0000000000000000 -t = 38.9000, H(p,q)-H0 = 0.0000000021842676, L(p,q)-L0 = 0.0000000000000000 -t = 39.0000, H(p,q)-H0 = 0.0000000021862580, L(p,q)-L0 = 0.0000000000000000 -t = 39.1000, H(p,q)-H0 = 0.0000000021875272, L(p,q)-L0 = 0.0000000000000000 -t = 39.2000, H(p,q)-H0 = 0.0000000021883670, L(p,q)-L0 = 0.0000000000000000 -t = 39.3000, H(p,q)-H0 = 0.0000000021889408, L(p,q)-L0 = 0.0000000000000000 -t = 39.4000, H(p,q)-H0 = 0.0000000021893442, L(p,q)-L0 = 0.0000000000000000 -t = 39.5000, H(p,q)-H0 = 0.0000000021896347, L(p,q)-L0 = 0.0000000000000000 -t = 39.6000, H(p,q)-H0 = 0.0000000021898482, L(p,q)-L0 = 0.0000000000000000 -t = 39.7000, H(p,q)-H0 = 0.0000000021900082, L(p,q)-L0 = 0.0000000000000000 -t = 39.8000, H(p,q)-H0 = 0.0000000021901297, L(p,q)-L0 = 0.0000000000000000 -t = 39.9000, H(p,q)-H0 = 0.0000000021902234, L(p,q)-L0 = 0.0000000000000000 -t = 40.0000, H(p,q)-H0 = 0.0000000021902962, L(p,q)-L0 = 0.0000000000000000 -t = 40.1000, H(p,q)-H0 = 0.0000000021903529, L(p,q)-L0 = -0.0000000000000001 -t = 40.2000, H(p,q)-H0 = 0.0000000021903975, L(p,q)-L0 = -0.0000000000000001 -t = 40.3000, H(p,q)-H0 = 0.0000000021904319, L(p,q)-L0 = 0.0000000000000001 -t = 40.4000, H(p,q)-H0 = 0.0000000021904584, L(p,q)-L0 = 0.0000000000000000 -t = 40.5000, H(p,q)-H0 = 0.0000000021904782, L(p,q)-L0 = 0.0000000000000000 -t = 40.6000, H(p,q)-H0 = 0.0000000021904922, L(p,q)-L0 = 0.0000000000000001 -t = 40.7000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 -t = 40.8000, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.34063e-15, num. orbits is now 6.50 -t = 40.8407, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = -0.0000000000000012 -t = 40.9000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = -0.0000000000000001 -t = 41.0000, H(p,q)-H0 = 0.0000000021904998, L(p,q)-L0 = 0.0000000000000000 -t = 41.1000, H(p,q)-H0 = 0.0000000021904899, L(p,q)-L0 = 0.0000000000000001 -t = 41.2000, H(p,q)-H0 = 0.0000000021904748, L(p,q)-L0 = -0.0000000000000001 -t = 41.3000, H(p,q)-H0 = 0.0000000021904537, L(p,q)-L0 = -0.0000000000000001 -t = 41.4000, H(p,q)-H0 = 0.0000000021904257, L(p,q)-L0 = 0.0000000000000000 -t = 41.5000, H(p,q)-H0 = 0.0000000021903894, L(p,q)-L0 = 0.0000000000000000 -t = 41.6000, H(p,q)-H0 = 0.0000000021903427, L(p,q)-L0 = 0.0000000000000000 -t = 41.7000, H(p,q)-H0 = 0.0000000021902831, L(p,q)-L0 = 0.0000000000000000 -t = 41.8000, H(p,q)-H0 = 0.0000000021902065, L(p,q)-L0 = 0.0000000000000000 -t = 41.9000, H(p,q)-H0 = 0.0000000021901079, L(p,q)-L0 = 0.0000000000000000 -t = 42.0000, H(p,q)-H0 = 0.0000000021899793, L(p,q)-L0 = 0.0000000000000000 -t = 42.1000, H(p,q)-H0 = 0.0000000021898100, L(p,q)-L0 = 0.0000000000000000 -t = 42.2000, H(p,q)-H0 = 0.0000000021895832, L(p,q)-L0 = 0.0000000000000000 -t = 42.3000, H(p,q)-H0 = 0.0000000021892734, L(p,q)-L0 = 0.0000000000000000 -t = 42.4000, H(p,q)-H0 = 0.0000000021888414, L(p,q)-L0 = 0.0000000000000000 -t = 42.5000, H(p,q)-H0 = 0.0000000021882238, L(p,q)-L0 = 0.0000000000000000 -t = 42.6000, H(p,q)-H0 = 0.0000000021873147, L(p,q)-L0 = 0.0000000000000000 -t = 42.7000, H(p,q)-H0 = 0.0000000021859321, L(p,q)-L0 = -0.0000000000000001 -t = 42.8000, H(p,q)-H0 = 0.0000000021837492, L(p,q)-L0 = -0.0000000000000001 -t = 42.9000, H(p,q)-H0 = 0.0000000021801531, L(p,q)-L0 = 0.0000000000000000 -t = 43.0000, H(p,q)-H0 = 0.0000000021739344, L(p,q)-L0 = 0.0000000000000000 -t = 43.1000, H(p,q)-H0 = 0.0000000021625748, L(p,q)-L0 = 0.0000000000000001 -t = 43.2000, H(p,q)-H0 = 0.0000000021405115, L(p,q)-L0 = 0.0000000000000001 -t = 43.3000, H(p,q)-H0 = 0.0000000020946870, L(p,q)-L0 = 0.0000000000000000 -t = 43.4000, H(p,q)-H0 = 0.0000000019926717, L(p,q)-L0 = 0.0000000000000000 -t = 43.5000, H(p,q)-H0 = 0.0000000017511153, L(p,q)-L0 = 0.0000000000000000 -t = 43.6000, H(p,q)-H0 = 0.0000000011639223, L(p,q)-L0 = 0.0000000000000001 -t = 43.7000, H(p,q)-H0 = -0.0000000001449241, L(p,q)-L0 = -0.0000000000000001 -t = 43.8000, H(p,q)-H0 = -0.0000000019957629, L(p,q)-L0 = -0.0000000000000001 -t = 43.9000, H(p,q)-H0 = -0.0000000015482571, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.36008e-15, num. orbits is now 7.00 -t = 43.9823, H(p,q)-H0 = -0.0000000176133172, L(p,q)-L0 = -0.0000000038389568 -t = 44.0000, H(p,q)-H0 = -0.0000000000875642, L(p,q)-L0 = 0.0000000000000000 -t = 44.1000, H(p,q)-H0 = -0.0000000021549387, L(p,q)-L0 = 0.0000000000000000 -t = 44.2000, H(p,q)-H0 = -0.0000000014210171, L(p,q)-L0 = 0.0000000000000000 -t = 44.3000, H(p,q)-H0 = 0.0000000004029339, L(p,q)-L0 = 0.0000000000000000 -t = 44.4000, H(p,q)-H0 = 0.0000000014252806, L(p,q)-L0 = 0.0000000000000001 -t = 44.5000, H(p,q)-H0 = 0.0000000018597992, L(p,q)-L0 = 0.0000000000000000 -t = 44.6000, H(p,q)-H0 = 0.0000000020383484, L(p,q)-L0 = -0.0000000000000001 -t = 44.7000, H(p,q)-H0 = 0.0000000021150063, L(p,q)-L0 = -0.0000000000000002 -t = 44.8000, H(p,q)-H0 = 0.0000000021501902, L(p,q)-L0 = -0.0000000000000001 -t = 44.9000, H(p,q)-H0 = 0.0000000021675061, L(p,q)-L0 = 0.0000000000000000 -t = 45.0000, H(p,q)-H0 = 0.0000000021766077, L(p,q)-L0 = -0.0000000000000001 -t = 45.1000, H(p,q)-H0 = 0.0000000021816851, L(p,q)-L0 = 0.0000000000000000 -t = 45.2000, H(p,q)-H0 = 0.0000000021846714, L(p,q)-L0 = 0.0000000000000000 -t = 45.3000, H(p,q)-H0 = 0.0000000021865115, L(p,q)-L0 = -0.0000000000000001 -t = 45.4000, H(p,q)-H0 = 0.0000000021876930, L(p,q)-L0 = 0.0000000000000000 -t = 45.5000, H(p,q)-H0 = 0.0000000021884788, L(p,q)-L0 = 0.0000000000000000 -t = 45.6000, H(p,q)-H0 = 0.0000000021890186, L(p,q)-L0 = -0.0000000000000001 -t = 45.7000, H(p,q)-H0 = 0.0000000021893997, L(p,q)-L0 = 0.0000000000000000 -t = 45.8000, H(p,q)-H0 = 0.0000000021896751, L(p,q)-L0 = 0.0000000000000000 -t = 45.9000, H(p,q)-H0 = 0.0000000021898783, L(p,q)-L0 = 0.0000000000000000 -t = 46.0000, H(p,q)-H0 = 0.0000000021900309, L(p,q)-L0 = -0.0000000000000001 -t = 46.1000, H(p,q)-H0 = 0.0000000021901472, L(p,q)-L0 = 0.0000000000000000 -t = 46.2000, H(p,q)-H0 = 0.0000000021902369, L(p,q)-L0 = -0.0000000000000001 -t = 46.3000, H(p,q)-H0 = 0.0000000021903067, L(p,q)-L0 = -0.0000000000000001 -t = 46.4000, H(p,q)-H0 = 0.0000000021903611, L(p,q)-L0 = -0.0000000000000001 -t = 46.5000, H(p,q)-H0 = 0.0000000021904037, L(p,q)-L0 = 0.0000000000000000 -t = 46.6000, H(p,q)-H0 = 0.0000000021904369, L(p,q)-L0 = 0.0000000000000000 -t = 46.7000, H(p,q)-H0 = 0.0000000021904621, L(p,q)-L0 = 0.0000000000000000 -t = 46.8000, H(p,q)-H0 = 0.0000000021904809, L(p,q)-L0 = 0.0000000000000000 -t = 46.9000, H(p,q)-H0 = 0.0000000021904941, L(p,q)-L0 = -0.0000000000000001 -t = 47.0000, H(p,q)-H0 = 0.0000000021905021, L(p,q)-L0 = 0.0000000000000000 -t = 47.1000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.6177e-13, num. orbits is now 7.50 -t = 47.1239, H(p,q)-H0 = 0.0000000021905023, L(p,q)-L0 = -0.0000000000000100 -t = 47.2000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = 0.0000000000000000 -t = 47.3000, H(p,q)-H0 = 0.0000000021904983, L(p,q)-L0 = 0.0000000000000000 -t = 47.4000, H(p,q)-H0 = 0.0000000021904877, L(p,q)-L0 = -0.0000000000000001 -t = 47.5000, H(p,q)-H0 = 0.0000000021904717, L(p,q)-L0 = 0.0000000000000000 -t = 47.6000, H(p,q)-H0 = 0.0000000021904494, L(p,q)-L0 = 0.0000000000000000 -t = 47.7000, H(p,q)-H0 = 0.0000000021904202, L(p,q)-L0 = 0.0000000000000000 -t = 47.8000, H(p,q)-H0 = 0.0000000021903822, L(p,q)-L0 = -0.0000000000000001 -t = 47.9000, H(p,q)-H0 = 0.0000000021903336, L(p,q)-L0 = -0.0000000000000001 -t = 48.0000, H(p,q)-H0 = 0.0000000021902714, L(p,q)-L0 = 0.0000000000000000 -t = 48.1000, H(p,q)-H0 = 0.0000000021901916, L(p,q)-L0 = -0.0000000000000001 -t = 48.2000, H(p,q)-H0 = 0.0000000021900884, L(p,q)-L0 = -0.0000000000000001 -t = 48.3000, H(p,q)-H0 = 0.0000000021899541, L(p,q)-L0 = -0.0000000000000001 -t = 48.4000, H(p,q)-H0 = 0.0000000021897765, L(p,q)-L0 = 0.0000000000000000 -t = 48.5000, H(p,q)-H0 = 0.0000000021895376, L(p,q)-L0 = -0.0000000000000001 -t = 48.6000, H(p,q)-H0 = 0.0000000021892106, L(p,q)-L0 = 0.0000000000000000 -t = 48.7000, H(p,q)-H0 = 0.0000000021887528, L(p,q)-L0 = 0.0000000000000000 -t = 48.8000, H(p,q)-H0 = 0.0000000021880950, L(p,q)-L0 = -0.0000000000000001 -t = 48.9000, H(p,q)-H0 = 0.0000000021871218, L(p,q)-L0 = -0.0000000000000001 -t = 49.0000, H(p,q)-H0 = 0.0000000021856331, L(p,q)-L0 = 0.0000000000000000 -t = 49.1000, H(p,q)-H0 = 0.0000000021832664, L(p,q)-L0 = -0.0000000000000001 -t = 49.2000, H(p,q)-H0 = 0.0000000021793375, L(p,q)-L0 = -0.0000000000000001 -t = 49.3000, H(p,q)-H0 = 0.0000000021724830, L(p,q)-L0 = -0.0000000000000002 -t = 49.4000, H(p,q)-H0 = 0.0000000021598386, L(p,q)-L0 = -0.0000000000000001 -t = 49.5000, H(p,q)-H0 = 0.0000000021350104, L(p,q)-L0 = 0.0000000000000000 -t = 49.6000, H(p,q)-H0 = 0.0000000020828375, L(p,q)-L0 = 0.0000000000000000 -t = 49.7000, H(p,q)-H0 = 0.0000000019653625, L(p,q)-L0 = -0.0000000000000002 -t = 49.8000, H(p,q)-H0 = 0.0000000016849391, L(p,q)-L0 = 0.0000000000000000 -t = 49.9000, H(p,q)-H0 = 0.0000000010054564, L(p,q)-L0 = -0.0000000000000001 -t = 50.0000, H(p,q)-H0 = -0.0000000004525242, L(p,q)-L0 = 0.0000000000000000 -t = 50.1000, H(p,q)-H0 = -0.0000000021925064, L(p,q)-L0 = 0.0000000000000000 -t = 50.2000, H(p,q)-H0 = -0.0000000011262788, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 3.49026e-15, num. orbits is now 8.00 -t = 50.2655, H(p,q)-H0 = -0.0000000408960004, L(p,q)-L0 = -0.0000000089179991 -t = 50.3000, H(p,q)-H0 = -0.0000000003393799, L(p,q)-L0 = 0.0000000000000000 -t = 50.4000, H(p,q)-H0 = -0.0000000022861775, L(p,q)-L0 = 0.0000000000000000 -t = 50.5000, H(p,q)-H0 = -0.0000000010909100, L(p,q)-L0 = 0.0000000000000000 -t = 50.6000, H(p,q)-H0 = 0.0000000006344165, L(p,q)-L0 = 0.0000000000000000 -t = 50.7000, H(p,q)-H0 = 0.0000000015278907, L(p,q)-L0 = 0.0000000000000000 -t = 50.8000, H(p,q)-H0 = 0.0000000019017270, L(p,q)-L0 = -0.0000000000000001 -t = 50.9000, H(p,q)-H0 = 0.0000000020559815, L(p,q)-L0 = 0.0000000000000000 -t = 51.0000, H(p,q)-H0 = 0.0000000021229023, L(p,q)-L0 = 0.0000000000000000 -t = 51.1000, H(p,q)-H0 = 0.0000000021539818, L(p,q)-L0 = 0.0000000000000000 -t = 51.2000, H(p,q)-H0 = 0.0000000021694539, L(p,q)-L0 = -0.0000000000000001 -t = 51.3000, H(p,q)-H0 = 0.0000000021776719, L(p,q)-L0 = -0.0000000000000001 -t = 51.4000, H(p,q)-H0 = 0.0000000021822995, L(p,q)-L0 = -0.0000000000000002 -t = 51.5000, H(p,q)-H0 = 0.0000000021850437, L(p,q)-L0 = 0.0000000000000000 -t = 51.6000, H(p,q)-H0 = 0.0000000021867472, L(p,q)-L0 = 0.0000000000000000 -t = 51.7000, H(p,q)-H0 = 0.0000000021878475, L(p,q)-L0 = -0.0000000000000001 -t = 51.8000, H(p,q)-H0 = 0.0000000021885839, L(p,q)-L0 = 0.0000000000000000 -t = 51.9000, H(p,q)-H0 = 0.0000000021890922, L(p,q)-L0 = -0.0000000000000001 -t = 52.0000, H(p,q)-H0 = 0.0000000021894524, L(p,q)-L0 = 0.0000000000000000 -t = 52.1000, H(p,q)-H0 = 0.0000000021897135, L(p,q)-L0 = -0.0000000000000002 -t = 52.2000, H(p,q)-H0 = 0.0000000021899072, L(p,q)-L0 = 0.0000000000000000 -t = 52.3000, H(p,q)-H0 = 0.0000000021900528, L(p,q)-L0 = 0.0000000000000000 -t = 52.4000, H(p,q)-H0 = 0.0000000021901641, L(p,q)-L0 = 0.0000000000000000 -t = 52.5000, H(p,q)-H0 = 0.0000000021902500, L(p,q)-L0 = 0.0000000000000000 -t = 52.6000, H(p,q)-H0 = 0.0000000021903168, L(p,q)-L0 = 0.0000000000000000 -t = 52.7000, H(p,q)-H0 = 0.0000000021903691, L(p,q)-L0 = -0.0000000000000001 -t = 52.8000, H(p,q)-H0 = 0.0000000021904100, L(p,q)-L0 = -0.0000000000000001 -t = 52.9000, H(p,q)-H0 = 0.0000000021904417, L(p,q)-L0 = 0.0000000000000000 -t = 53.0000, H(p,q)-H0 = 0.0000000021904659, L(p,q)-L0 = 0.0000000000000000 -t = 53.1000, H(p,q)-H0 = 0.0000000021904835, L(p,q)-L0 = -0.0000000000000001 -t = 53.2000, H(p,q)-H0 = 0.0000000021904958, L(p,q)-L0 = 0.0000000000000000 -t = 53.3000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = -0.0000000000000001 -t = 53.4000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.27654e-15, num. orbits is now 8.50 -t = 53.4071, H(p,q)-H0 = 0.0000000021905007, L(p,q)-L0 = -0.0000000000000143 -t = 53.5000, H(p,q)-H0 = 0.0000000021905037, L(p,q)-L0 = -0.0000000000000001 -t = 53.6000, H(p,q)-H0 = 0.0000000021904970, L(p,q)-L0 = -0.0000000000000001 -t = 53.7000, H(p,q)-H0 = 0.0000000021904855, L(p,q)-L0 = -0.0000000000000001 -t = 53.8000, H(p,q)-H0 = 0.0000000021904685, L(p,q)-L0 = 0.0000000000000000 -t = 53.9000, H(p,q)-H0 = 0.0000000021904452, L(p,q)-L0 = -0.0000000000000001 -t = 54.0000, H(p,q)-H0 = 0.0000000021904146, L(p,q)-L0 = 0.0000000000000000 -t = 54.1000, H(p,q)-H0 = 0.0000000021903750, L(p,q)-L0 = 0.0000000000000000 -t = 54.2000, H(p,q)-H0 = 0.0000000021903242, L(p,q)-L0 = 0.0000000000000000 -t = 54.3000, H(p,q)-H0 = 0.0000000021902593, L(p,q)-L0 = -0.0000000000000001 -t = 54.4000, H(p,q)-H0 = 0.0000000021901762, L(p,q)-L0 = 0.0000000000000000 -t = 54.5000, H(p,q)-H0 = 0.0000000021900683, L(p,q)-L0 = 0.0000000000000000 -t = 54.6000, H(p,q)-H0 = 0.0000000021899276, L(p,q)-L0 = 0.0000000000000000 -t = 54.7000, H(p,q)-H0 = 0.0000000021897411, L(p,q)-L0 = 0.0000000000000000 -t = 54.8000, H(p,q)-H0 = 0.0000000021894898, L(p,q)-L0 = 0.0000000000000000 -t = 54.9000, H(p,q)-H0 = 0.0000000021891442, L(p,q)-L0 = 0.0000000000000000 -t = 55.0000, H(p,q)-H0 = 0.0000000021886586, L(p,q)-L0 = 0.0000000000000000 -t = 55.1000, H(p,q)-H0 = 0.0000000021879576, L(p,q)-L0 = -0.0000000000000002 -t = 55.2000, H(p,q)-H0 = 0.0000000021869148, L(p,q)-L0 = 0.0000000000000000 -t = 55.3000, H(p,q)-H0 = 0.0000000021853099, L(p,q)-L0 = -0.0000000000000001 -t = 55.4000, H(p,q)-H0 = 0.0000000021827410, L(p,q)-L0 = 0.0000000000000000 -t = 55.5000, H(p,q)-H0 = 0.0000000021784423, L(p,q)-L0 = 0.0000000000000000 -t = 55.6000, H(p,q)-H0 = 0.0000000021708756, L(p,q)-L0 = -0.0000000000000001 -t = 55.7000, H(p,q)-H0 = 0.0000000021567756, L(p,q)-L0 = -0.0000000000000002 -t = 55.8000, H(p,q)-H0 = 0.0000000021287816, L(p,q)-L0 = -0.0000000000000001 -t = 55.9000, H(p,q)-H0 = 0.0000000020692632, L(p,q)-L0 = 0.0000000000000000 -t = 56.0000, H(p,q)-H0 = 0.0000000019337543, L(p,q)-L0 = 0.0000000000000000 -t = 56.1000, H(p,q)-H0 = 0.0000000016080137, L(p,q)-L0 = -0.0000000000000001 -t = 56.2000, H(p,q)-H0 = 0.0000000008240018, L(p,q)-L0 = 0.0000000000000000 -t = 56.3000, H(p,q)-H0 = -0.0000000007777228, L(p,q)-L0 = 0.0000000000000000 -t = 56.4000, H(p,q)-H0 = -0.0000000022964359, L(p,q)-L0 = -0.0000000000000001 -t = 56.5000, H(p,q)-H0 = -0.0000000006980467, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.04465e-12, num. orbits is now 9.00 -t = 56.5487, H(p,q)-H0 = -0.0000000292986948, L(p,q)-L0 = -0.0000000063928232 -t = 56.6000, H(p,q)-H0 = -0.0000000007108081, L(p,q)-L0 = 0.0000000000000000 -t = 56.7000, H(p,q)-H0 = -0.0000000022911197, L(p,q)-L0 = 0.0000000000000000 -t = 56.8000, H(p,q)-H0 = -0.0000000007567420, L(p,q)-L0 = -0.0000000000000001 -t = 56.9000, H(p,q)-H0 = 0.0000000008394496, L(p,q)-L0 = -0.0000000000000001 -t = 57.0000, H(p,q)-H0 = 0.0000000016162618, L(p,q)-L0 = 0.0000000000000000 -t = 57.1000, H(p,q)-H0 = 0.0000000019378465, L(p,q)-L0 = 0.0000000000000000 -t = 57.2000, H(p,q)-H0 = 0.0000000020713128, L(p,q)-L0 = 0.0000000000000000 -t = 57.3000, H(p,q)-H0 = 0.0000000021298476, L(p,q)-L0 = 0.0000000000000000 -t = 57.4000, H(p,q)-H0 = 0.0000000021573562, L(p,q)-L0 = -0.0000000000000001 -t = 57.5000, H(p,q)-H0 = 0.0000000021712063, L(p,q)-L0 = 0.0000000000000001 -t = 57.6000, H(p,q)-H0 = 0.0000000021786388, L(p,q)-L0 = 0.0000000000000000 -t = 57.7000, H(p,q)-H0 = 0.0000000021828624, L(p,q)-L0 = 0.0000000000000000 -t = 57.8000, H(p,q)-H0 = 0.0000000021853875, L(p,q)-L0 = 0.0000000000000000 -t = 57.9000, H(p,q)-H0 = 0.0000000021869661, L(p,q)-L0 = -0.0000000000000001 -t = 58.0000, H(p,q)-H0 = 0.0000000021879923, L(p,q)-L0 = -0.0000000000000001 -t = 58.1000, H(p,q)-H0 = 0.0000000021886828, L(p,q)-L0 = -0.0000000000000001 -t = 58.2000, H(p,q)-H0 = 0.0000000021891614, L(p,q)-L0 = 0.0000000000000000 -t = 58.3000, H(p,q)-H0 = 0.0000000021895021, L(p,q)-L0 = 0.0000000000000000 -t = 58.4000, H(p,q)-H0 = 0.0000000021897503, L(p,q)-L0 = 0.0000000000000000 -t = 58.5000, H(p,q)-H0 = 0.0000000021899346, L(p,q)-L0 = 0.0000000000000000 -t = 58.6000, H(p,q)-H0 = 0.0000000021900737, L(p,q)-L0 = 0.0000000000000000 -t = 58.7000, H(p,q)-H0 = 0.0000000021901799, L(p,q)-L0 = 0.0000000000000000 -t = 58.8000, H(p,q)-H0 = 0.0000000021902624, L(p,q)-L0 = -0.0000000000000001 -t = 58.9000, H(p,q)-H0 = 0.0000000021903266, L(p,q)-L0 = 0.0000000000000000 -t = 59.0000, H(p,q)-H0 = 0.0000000021903768, L(p,q)-L0 = 0.0000000000000000 -t = 59.1000, H(p,q)-H0 = 0.0000000021904160, L(p,q)-L0 = 0.0000000000000000 -t = 59.2000, H(p,q)-H0 = 0.0000000021904463, L(p,q)-L0 = 0.0000000000000000 -t = 59.3000, H(p,q)-H0 = 0.0000000021904691, L(p,q)-L0 = -0.0000000000000001 -t = 59.4000, H(p,q)-H0 = 0.0000000021904860, L(p,q)-L0 = -0.0000000000000001 -t = 59.5000, H(p,q)-H0 = 0.0000000021904973, L(p,q)-L0 = -0.0000000000000001 -t = 59.6000, H(p,q)-H0 = 0.0000000021905039, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.93725e-13, num. orbits is now 9.50 -t = 59.6903, H(p,q)-H0 = 0.0000000021905053, L(p,q)-L0 = -0.0000000000000008 -t = 59.7000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = -0.0000000000000001 -t = 59.8000, H(p,q)-H0 = 0.0000000021905028, L(p,q)-L0 = -0.0000000000000001 -t = 59.9000, H(p,q)-H0 = 0.0000000021904953, L(p,q)-L0 = -0.0000000000000001 -t = 60.0000, H(p,q)-H0 = 0.0000000021904830, L(p,q)-L0 = 0.0000000000000001 -t = 60.1000, H(p,q)-H0 = 0.0000000021904649, L(p,q)-L0 = 0.0000000000000000 -t = 60.2000, H(p,q)-H0 = 0.0000000021904406, L(p,q)-L0 = 0.0000000000000000 -t = 60.3000, H(p,q)-H0 = 0.0000000021904085, L(p,q)-L0 = 0.0000000000000000 -t = 60.4000, H(p,q)-H0 = 0.0000000021903672, L(p,q)-L0 = 0.0000000000000000 -t = 60.5000, H(p,q)-H0 = 0.0000000021903144, L(p,q)-L0 = 0.0000000000000000 -t = 60.6000, H(p,q)-H0 = 0.0000000021902469, L(p,q)-L0 = 0.0000000000000000 -t = 60.7000, H(p,q)-H0 = 0.0000000021901599, L(p,q)-L0 = 0.0000000000000000 -t = 60.8000, H(p,q)-H0 = 0.0000000021900474, L(p,q)-L0 = -0.0000000000000001 -t = 60.9000, H(p,q)-H0 = 0.0000000021899000, L(p,q)-L0 = 0.0000000000000000 -t = 61.0000, H(p,q)-H0 = 0.0000000021897042, L(p,q)-L0 = 0.0000000000000000 -t = 61.1000, H(p,q)-H0 = 0.0000000021894392, L(p,q)-L0 = -0.0000000000000001 -t = 61.2000, H(p,q)-H0 = 0.0000000021890743, L(p,q)-L0 = 0.0000000000000000 -t = 61.3000, H(p,q)-H0 = 0.0000000021885584, L(p,q)-L0 = 0.0000000000000000 -t = 61.4000, H(p,q)-H0 = 0.0000000021878106, L(p,q)-L0 = 0.0000000000000000 -t = 61.5000, H(p,q)-H0 = 0.0000000021866923, L(p,q)-L0 = 0.0000000000000000 -t = 61.6000, H(p,q)-H0 = 0.0000000021849602, L(p,q)-L0 = 0.0000000000000000 -t = 61.7000, H(p,q)-H0 = 0.0000000021821681, L(p,q)-L0 = 0.0000000000000000 -t = 61.8000, H(p,q)-H0 = 0.0000000021774582, L(p,q)-L0 = 0.0000000000000000 -t = 61.9000, H(p,q)-H0 = 0.0000000021690918, L(p,q)-L0 = 0.0000000000000000 -t = 62.0000, H(p,q)-H0 = 0.0000000021533414, L(p,q)-L0 = 0.0000000000000001 -t = 62.1000, H(p,q)-H0 = 0.0000000021217160, L(p,q)-L0 = 0.0000000000000000 -t = 62.2000, H(p,q)-H0 = 0.0000000020536846, L(p,q)-L0 = 0.0000000000000000 -t = 62.3000, H(p,q)-H0 = 0.0000000018971202, L(p,q)-L0 = -0.0000000000000001 -t = 62.4000, H(p,q)-H0 = 0.0000000015186441, L(p,q)-L0 = 0.0000000000000000 -t = 62.5000, H(p,q)-H0 = 0.0000000006175898, L(p,q)-L0 = 0.0000000000000000 -t = 62.6000, H(p,q)-H0 = -0.0000000011113788, L(p,q)-L0 = 0.0000000000000000 -t = 62.7000, H(p,q)-H0 = -0.0000000022863598, L(p,q)-L0 = 0.0000000000000000 -t = 62.8000, H(p,q)-H0 = -0.0000000003294947, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.38874e-12, num. orbits is now 10.00 -t = 62.8319, H(p,q)-H0 = -0.0000000138979517, L(p,q)-L0 = -0.0000000030289787 -t = 62.9000, H(p,q)-H0 = -0.0000000011398216, L(p,q)-L0 = 0.0000000000000000 -t = 63.0000, H(p,q)-H0 = -0.0000000021824618, L(p,q)-L0 = 0.0000000000000000 -t = 63.1000, H(p,q)-H0 = -0.0000000004316694, L(p,q)-L0 = 0.0000000000000000 -t = 63.2000, H(p,q)-H0 = 0.0000000010195265, L(p,q)-L0 = -0.0000000000000001 -t = 63.3000, H(p,q)-H0 = 0.0000000016922828, L(p,q)-L0 = 0.0000000000000000 -t = 63.4000, H(p,q)-H0 = 0.0000000019689991, L(p,q)-L0 = 0.0000000000000000 -t = 63.5000, H(p,q)-H0 = 0.0000000020846681, L(p,q)-L0 = -0.0000000000000001 -t = 63.6000, H(p,q)-H0 = 0.0000000021359695, L(p,q)-L0 = 0.0000000000000000 -t = 63.7000, H(p,q)-H0 = 0.0000000021603651, L(p,q)-L0 = -0.0000000000000001 -t = 63.8000, H(p,q)-H0 = 0.0000000021727854, L(p,q)-L0 = 0.0000000000000001 -t = 63.9000, H(p,q)-H0 = 0.0000000021795182, L(p,q)-L0 = 0.0000000000000000 -t = 64.0000, H(p,q)-H0 = 0.0000000021833789, L(p,q)-L0 = 0.0000000000000000 -t = 64.1000, H(p,q)-H0 = 0.0000000021857053, L(p,q)-L0 = 0.0000000000000000 -t = 64.2000, H(p,q)-H0 = 0.0000000021871699, L(p,q)-L0 = 0.0000000000000000 -t = 64.3000, H(p,q)-H0 = 0.0000000021881276, L(p,q)-L0 = 0.0000000000000000 -t = 64.4000, H(p,q)-H0 = 0.0000000021887756, L(p,q)-L0 = 0.0000000000000000 -t = 64.5000, H(p,q)-H0 = 0.0000000021892269, L(p,q)-L0 = 0.0000000000000000 -t = 64.6000, H(p,q)-H0 = 0.0000000021895494, L(p,q)-L0 = 0.0000000000000000 -t = 64.7000, H(p,q)-H0 = 0.0000000021897852, L(p,q)-L0 = 0.0000000000000000 -t = 64.8000, H(p,q)-H0 = 0.0000000021899607, L(p,q)-L0 = 0.0000000000000000 -t = 64.9000, H(p,q)-H0 = 0.0000000021900936, L(p,q)-L0 = 0.0000000000000000 -t = 65.0000, H(p,q)-H0 = 0.0000000021901955, L(p,q)-L0 = 0.0000000000000000 -t = 65.1000, H(p,q)-H0 = 0.0000000021902744, L(p,q)-L0 = -0.0000000000000001 -t = 65.2000, H(p,q)-H0 = 0.0000000021903360, L(p,q)-L0 = 0.0000000000000000 -t = 65.3000, H(p,q)-H0 = 0.0000000021903842, L(p,q)-L0 = 0.0000000000000001 -t = 65.4000, H(p,q)-H0 = 0.0000000021904217, L(p,q)-L0 = 0.0000000000000000 -t = 65.5000, H(p,q)-H0 = 0.0000000021904507, L(p,q)-L0 = 0.0000000000000000 -t = 65.6000, H(p,q)-H0 = 0.0000000021904725, L(p,q)-L0 = 0.0000000000000000 -t = 65.7000, H(p,q)-H0 = 0.0000000021904882, L(p,q)-L0 = 0.0000000000000000 -t = 65.8000, H(p,q)-H0 = 0.0000000021904988, L(p,q)-L0 = 0.0000000000000000 -t = 65.9000, H(p,q)-H0 = 0.0000000021905046, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.67199e-13, num. orbits is now 10.50 -t = 65.9734, H(p,q)-H0 = 0.0000000021905027, L(p,q)-L0 = -0.0000000000000089 -t = 66.0000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = 0.0000000000000001 -t = 66.1000, H(p,q)-H0 = 0.0000000021905019, L(p,q)-L0 = 0.0000000000000000 -t = 66.2000, H(p,q)-H0 = 0.0000000021904938, L(p,q)-L0 = 0.0000000000000000 -t = 66.3000, H(p,q)-H0 = 0.0000000021904804, L(p,q)-L0 = -0.0000000000000001 -t = 66.4000, H(p,q)-H0 = 0.0000000021904614, L(p,q)-L0 = 0.0000000000000000 -t = 66.5000, H(p,q)-H0 = 0.0000000021904359, L(p,q)-L0 = 0.0000000000000001 -t = 66.6000, H(p,q)-H0 = 0.0000000021904024, L(p,q)-L0 = 0.0000000000000001 -t = 66.7000, H(p,q)-H0 = 0.0000000021903593, L(p,q)-L0 = 0.0000000000000000 -t = 66.8000, H(p,q)-H0 = 0.0000000021903044, L(p,q)-L0 = 0.0000000000000000 -t = 66.9000, H(p,q)-H0 = 0.0000000021902337, L(p,q)-L0 = 0.0000000000000000 -t = 67.0000, H(p,q)-H0 = 0.0000000021901431, L(p,q)-L0 = 0.0000000000000000 -t = 67.1000, H(p,q)-H0 = 0.0000000021900254, L(p,q)-L0 = 0.0000000000000001 -t = 67.2000, H(p,q)-H0 = 0.0000000021898710, L(p,q)-L0 = 0.0000000000000001 -t = 67.3000, H(p,q)-H0 = 0.0000000021896651, L(p,q)-L0 = 0.0000000000000000 -t = 67.4000, H(p,q)-H0 = 0.0000000021893860, L(p,q)-L0 = 0.0000000000000000 -t = 67.5000, H(p,q)-H0 = 0.0000000021889997, L(p,q)-L0 = 0.0000000000000000 -t = 67.6000, H(p,q)-H0 = 0.0000000021884519, L(p,q)-L0 = 0.0000000000000000 -t = 67.7000, H(p,q)-H0 = 0.0000000021876536, L(p,q)-L0 = 0.0000000000000000 -t = 67.8000, H(p,q)-H0 = 0.0000000021864530, L(p,q)-L0 = 0.0000000000000000 -t = 67.9000, H(p,q)-H0 = 0.0000000021845817, L(p,q)-L0 = 0.0000000000000000 -t = 68.0000, H(p,q)-H0 = 0.0000000021815430, L(p,q)-L0 = 0.0000000000000000 -t = 68.1000, H(p,q)-H0 = 0.0000000021763750, L(p,q)-L0 = 0.0000000000000000 -t = 68.2000, H(p,q)-H0 = 0.0000000021671088, L(p,q)-L0 = 0.0000000000000001 -t = 68.3000, H(p,q)-H0 = 0.0000000021494820, L(p,q)-L0 = 0.0000000000000001 -t = 68.4000, H(p,q)-H0 = 0.0000000021136849, L(p,q)-L0 = 0.0000000000000000 -t = 68.5000, H(p,q)-H0 = 0.0000000020357712, L(p,q)-L0 = 0.0000000000000000 -t = 68.6000, H(p,q)-H0 = 0.0000000018546125, L(p,q)-L0 = 0.0000000000000001 -t = 68.7000, H(p,q)-H0 = 0.0000000014149386, L(p,q)-L0 = 0.0000000000000000 -t = 68.8000, H(p,q)-H0 = 0.0000000003847866, L(p,q)-L0 = 0.0000000000000001 -t = 68.9000, H(p,q)-H0 = -0.0000000014401922, L(p,q)-L0 = 0.0000000000000000 -t = 69.0000, H(p,q)-H0 = -0.0000000021500666, L(p,q)-L0 = 0.0000000000000000 -t = 69.1000, H(p,q)-H0 = -0.0000000000822340, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 6.19673e-13, num. orbits is now 11.00 -t = 69.1150, H(p,q)-H0 = -0.0000000386645453, L(p,q)-L0 = -0.0000000084307669 -t = 69.2000, H(p,q)-H0 = -0.0000000015604567, L(p,q)-L0 = 0.0000000000000000 -t = 69.3000, H(p,q)-H0 = -0.0000000019817241, L(p,q)-L0 = 0.0000000000000000 -t = 69.4000, H(p,q)-H0 = -0.0000000001246836, L(p,q)-L0 = 0.0000000000000000 -t = 69.5000, H(p,q)-H0 = 0.0000000011766554, L(p,q)-L0 = 0.0000000000000000 -t = 69.6000, H(p,q)-H0 = 0.0000000017576454, L(p,q)-L0 = -0.0000000000000001 -t = 69.7000, H(p,q)-H0 = 0.0000000019959046, L(p,q)-L0 = -0.0000000000000001 -t = 69.8000, H(p,q)-H0 = 0.0000000020963244, L(p,q)-L0 = 0.0000000000000001 -t = 69.9000, H(p,q)-H0 = 0.0000000021413759, L(p,q)-L0 = -0.0000000000000001 -t = 70.0000, H(p,q)-H0 = 0.0000000021630525, L(p,q)-L0 = -0.0000000000000001 -t = 70.1000, H(p,q)-H0 = 0.0000000021742105, L(p,q)-L0 = 0.0000000000000000 -t = 70.2000, H(p,q)-H0 = 0.0000000021803195, L(p,q)-L0 = -0.0000000000000001 -t = 70.3000, H(p,q)-H0 = 0.0000000021838533, L(p,q)-L0 = 0.0000000000000000 -t = 70.4000, H(p,q)-H0 = 0.0000000021859993, L(p,q)-L0 = 0.0000000000000000 -t = 70.5000, H(p,q)-H0 = 0.0000000021873592, L(p,q)-L0 = -0.0000000000000001 -t = 70.6000, H(p,q)-H0 = 0.0000000021882544, L(p,q)-L0 = 0.0000000000000000 -t = 70.7000, H(p,q)-H0 = 0.0000000021888629, L(p,q)-L0 = 0.0000000000000000 -t = 70.8000, H(p,q)-H0 = 0.0000000021892886, L(p,q)-L0 = 0.0000000000000000 -t = 70.9000, H(p,q)-H0 = 0.0000000021895942, L(p,q)-L0 = -0.0000000000000001 -t = 71.0000, H(p,q)-H0 = 0.0000000021898182, L(p,q)-L0 = 0.0000000000000000 -t = 71.1000, H(p,q)-H0 = 0.0000000021899855, L(p,q)-L0 = 0.0000000000000000 -t = 71.2000, H(p,q)-H0 = 0.0000000021901125, L(p,q)-L0 = -0.0000000000000001 -t = 71.3000, H(p,q)-H0 = 0.0000000021902100, L(p,q)-L0 = 0.0000000000000000 -t = 71.4000, H(p,q)-H0 = 0.0000000021902858, L(p,q)-L0 = 0.0000000000000000 -t = 71.5000, H(p,q)-H0 = 0.0000000021903448, L(p,q)-L0 = 0.0000000000000000 -t = 71.6000, H(p,q)-H0 = 0.0000000021903911, L(p,q)-L0 = 0.0000000000000000 -t = 71.7000, H(p,q)-H0 = 0.0000000021904270, L(p,q)-L0 = 0.0000000000000000 -t = 71.8000, H(p,q)-H0 = 0.0000000021904547, L(p,q)-L0 = 0.0000000000000000 -t = 71.9000, H(p,q)-H0 = 0.0000000021904755, L(p,q)-L0 = 0.0000000000000000 -t = 72.0000, H(p,q)-H0 = 0.0000000021904903, L(p,q)-L0 = -0.0000000000000001 -t = 72.1000, H(p,q)-H0 = 0.0000000021905000, L(p,q)-L0 = -0.0000000000000001 -t = 72.2000, H(p,q)-H0 = 0.0000000021905049, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.4954e-15, num. orbits is now 11.50 -t = 72.2566, H(p,q)-H0 = 0.0000000021905010, L(p,q)-L0 = -0.0000000000000140 -t = 72.3000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = 0.0000000000000000 -t = 72.4000, H(p,q)-H0 = 0.0000000021905009, L(p,q)-L0 = -0.0000000000000001 -t = 72.5000, H(p,q)-H0 = 0.0000000021904918, L(p,q)-L0 = 0.0000000000000000 -t = 72.6000, H(p,q)-H0 = 0.0000000021904775, L(p,q)-L0 = 0.0000000000000000 -t = 72.7000, H(p,q)-H0 = 0.0000000021904575, L(p,q)-L0 = 0.0000000000000000 -t = 72.8000, H(p,q)-H0 = 0.0000000021904306, L(p,q)-L0 = 0.0000000000000000 -t = 72.9000, H(p,q)-H0 = 0.0000000021903958, L(p,q)-L0 = 0.0000000000000000 -t = 73.0000, H(p,q)-H0 = 0.0000000021903509, L(p,q)-L0 = 0.0000000000000000 -t = 73.1000, H(p,q)-H0 = 0.0000000021902936, L(p,q)-L0 = 0.0000000000000000 -t = 73.2000, H(p,q)-H0 = 0.0000000021902199, L(p,q)-L0 = -0.0000000000000001 -t = 73.3000, H(p,q)-H0 = 0.0000000021901253, L(p,q)-L0 = 0.0000000000000000 -t = 73.4000, H(p,q)-H0 = 0.0000000021900022, L(p,q)-L0 = 0.0000000000000000 -t = 73.5000, H(p,q)-H0 = 0.0000000021898404, L(p,q)-L0 = 0.0000000000000000 -t = 73.6000, H(p,q)-H0 = 0.0000000021896238, L(p,q)-L0 = -0.0000000000000001 -t = 73.7000, H(p,q)-H0 = 0.0000000021893297, L(p,q)-L0 = 0.0000000000000000 -t = 73.8000, H(p,q)-H0 = 0.0000000021889207, L(p,q)-L0 = 0.0000000000000000 -t = 73.9000, H(p,q)-H0 = 0.0000000021883382, L(p,q)-L0 = 0.0000000000000000 -t = 74.0000, H(p,q)-H0 = 0.0000000021874852, L(p,q)-L0 = 0.0000000000000000 -t = 74.1000, H(p,q)-H0 = 0.0000000021861951, L(p,q)-L0 = 0.0000000000000000 -t = 74.2000, H(p,q)-H0 = 0.0000000021841708, L(p,q)-L0 = 0.0000000000000000 -t = 74.3000, H(p,q)-H0 = 0.0000000021808598, L(p,q)-L0 = 0.0000000000000000 -t = 74.4000, H(p,q)-H0 = 0.0000000021751803, L(p,q)-L0 = 0.0000000000000000 -t = 74.5000, H(p,q)-H0 = 0.0000000021649006, L(p,q)-L0 = -0.0000000000000001 -t = 74.6000, H(p,q)-H0 = 0.0000000021451375, L(p,q)-L0 = 0.0000000000000000 -t = 74.7000, H(p,q)-H0 = 0.0000000021045381, L(p,q)-L0 = -0.0000000000000002 -t = 74.8000, H(p,q)-H0 = 0.0000000020151367, L(p,q)-L0 = 0.0000000000000000 -t = 74.9000, H(p,q)-H0 = 0.0000000018052415, L(p,q)-L0 = 0.0000000000000000 -t = 75.0000, H(p,q)-H0 = 0.0000000012948249, L(p,q)-L0 = 0.0000000000000000 -t = 75.1000, H(p,q)-H0 = 0.0000000001250755, L(p,q)-L0 = 0.0000000000000000 -t = 75.2000, H(p,q)-H0 = -0.0000000017463930, L(p,q)-L0 = 0.0000000000000000 -t = 75.3000, H(p,q)-H0 = -0.0000000018898954, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.06794e-14, num. orbits is now 12.00 -t = 75.3982, H(p,q)-H0 = -0.0000000350417400, L(p,q)-L0 = -0.0000000076452448 -t = 75.4000, H(p,q)-H0 = 0.0000000000002118, L(p,q)-L0 = 0.0000000000000000 -t = 75.5000, H(p,q)-H0 = -0.0000000019155202, L(p,q)-L0 = -0.0000000000000001 -t = 75.6000, H(p,q)-H0 = -0.0000000017140038, L(p,q)-L0 = 0.0000000000000000 -t = 75.7000, H(p,q)-H0 = 0.0000000001587313, L(p,q)-L0 = -0.0000000000000001 -t = 75.8000, H(p,q)-H0 = 0.0000000013130790, L(p,q)-L0 = -0.0000000000000001 -t = 75.9000, H(p,q)-H0 = 0.0000000018138416, L(p,q)-L0 = 0.0000000000000000 -t = 76.0000, H(p,q)-H0 = 0.0000000020191782, L(p,q)-L0 = -0.0000000000000001 -t = 76.1000, H(p,q)-H0 = 0.0000000021065175, L(p,q)-L0 = -0.0000000000000001 -t = 76.2000, H(p,q)-H0 = 0.0000000021461600, L(p,q)-L0 = 0.0000000000000000 -t = 76.3000, H(p,q)-H0 = 0.0000000021654578, L(p,q)-L0 = -0.0000000000000001 -t = 76.4000, H(p,q)-H0 = 0.0000000021754993, L(p,q)-L0 = -0.0000000000000001 -t = 76.5000, H(p,q)-H0 = 0.0000000021810508, L(p,q)-L0 = 0.0000000000000000 -t = 76.6000, H(p,q)-H0 = 0.0000000021842897, L(p,q)-L0 = 0.0000000000000000 -t = 76.7000, H(p,q)-H0 = 0.0000000021862717, L(p,q)-L0 = -0.0000000000000001 -t = 76.8000, H(p,q)-H0 = 0.0000000021875363, L(p,q)-L0 = 0.0000000000000000 -t = 76.9000, H(p,q)-H0 = 0.0000000021883731, L(p,q)-L0 = -0.0000000000000001 -t = 77.0000, H(p,q)-H0 = 0.0000000021889451, L(p,q)-L0 = -0.0000000000000001 -t = 77.1000, H(p,q)-H0 = 0.0000000021893470, L(p,q)-L0 = 0.0000000000000000 -t = 77.2000, H(p,q)-H0 = 0.0000000021896367, L(p,q)-L0 = 0.0000000000000000 -t = 77.3000, H(p,q)-H0 = 0.0000000021898499, L(p,q)-L0 = 0.0000000000000000 -t = 77.4000, H(p,q)-H0 = 0.0000000021900093, L(p,q)-L0 = -0.0000000000000001 -t = 77.5000, H(p,q)-H0 = 0.0000000021901307, L(p,q)-L0 = 0.0000000000000000 -t = 77.6000, H(p,q)-H0 = 0.0000000021902241, L(p,q)-L0 = 0.0000000000000000 -t = 77.7000, H(p,q)-H0 = 0.0000000021902967, L(p,q)-L0 = -0.0000000000000001 -t = 77.8000, H(p,q)-H0 = 0.0000000021903532, L(p,q)-L0 = 0.0000000000000000 -t = 77.9000, H(p,q)-H0 = 0.0000000021903976, L(p,q)-L0 = -0.0000000000000001 -t = 78.0000, H(p,q)-H0 = 0.0000000021904321, L(p,q)-L0 = -0.0000000000000001 -t = 78.1000, H(p,q)-H0 = 0.0000000021904585, L(p,q)-L0 = 0.0000000000000000 -t = 78.2000, H(p,q)-H0 = 0.0000000021904784, L(p,q)-L0 = -0.0000000000000001 -t = 78.3000, H(p,q)-H0 = 0.0000000021904923, L(p,q)-L0 = -0.0000000000000001 -t = 78.4000, H(p,q)-H0 = 0.0000000021905011, L(p,q)-L0 = 0.0000000000000000 -t = 78.5000, H(p,q)-H0 = 0.0000000021905052, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.32759e-13, num. orbits is now 12.50 -t = 78.5398, H(p,q)-H0 = 0.0000000021905051, L(p,q)-L0 = -0.0000000000000017 -t = 78.6000, H(p,q)-H0 = 0.0000000021905047, L(p,q)-L0 = -0.0000000000000001 -t = 78.7000, H(p,q)-H0 = 0.0000000021904996, L(p,q)-L0 = -0.0000000000000001 -t = 78.8000, H(p,q)-H0 = 0.0000000021904897, L(p,q)-L0 = -0.0000000000000001 -t = 78.9000, H(p,q)-H0 = 0.0000000021904745, L(p,q)-L0 = 0.0000000000000000 -t = 79.0000, H(p,q)-H0 = 0.0000000021904533, L(p,q)-L0 = -0.0000000000000001 -t = 79.1000, H(p,q)-H0 = 0.0000000021904253, L(p,q)-L0 = -0.0000000000000001 -t = 79.2000, H(p,q)-H0 = 0.0000000021903890, L(p,q)-L0 = -0.0000000000000001 -t = 79.3000, H(p,q)-H0 = 0.0000000021903421, L(p,q)-L0 = -0.0000000000000001 -t = 79.4000, H(p,q)-H0 = 0.0000000021902823, L(p,q)-L0 = -0.0000000000000001 -t = 79.5000, H(p,q)-H0 = 0.0000000021902056, L(p,q)-L0 = 0.0000000000000000 -t = 79.6000, H(p,q)-H0 = 0.0000000021901067, L(p,q)-L0 = -0.0000000000000002 -t = 79.7000, H(p,q)-H0 = 0.0000000021899780, L(p,q)-L0 = -0.0000000000000002 -t = 79.8000, H(p,q)-H0 = 0.0000000021898082, L(p,q)-L0 = -0.0000000000000001 -t = 79.9000, H(p,q)-H0 = 0.0000000021895807, L(p,q)-L0 = 0.0000000000000000 -t = 80.0000, H(p,q)-H0 = 0.0000000021892700, L(p,q)-L0 = -0.0000000000000001 -t = 80.1000, H(p,q)-H0 = 0.0000000021888369, L(p,q)-L0 = 0.0000000000000000 -t = 80.2000, H(p,q)-H0 = 0.0000000021882171, L(p,q)-L0 = -0.0000000000000001 -t = 80.3000, H(p,q)-H0 = 0.0000000021873048, L(p,q)-L0 = -0.0000000000000001 -t = 80.4000, H(p,q)-H0 = 0.0000000021859168, L(p,q)-L0 = 0.0000000000000000 -t = 80.5000, H(p,q)-H0 = 0.0000000021837248, L(p,q)-L0 = 0.0000000000000000 -t = 80.6000, H(p,q)-H0 = 0.0000000021801118, L(p,q)-L0 = -0.0000000000000001 -t = 80.7000, H(p,q)-H0 = 0.0000000021738613, L(p,q)-L0 = 0.0000000000000000 -t = 80.8000, H(p,q)-H0 = 0.0000000021624377, L(p,q)-L0 = 0.0000000000000000 -t = 80.9000, H(p,q)-H0 = 0.0000000021402374, L(p,q)-L0 = 0.0000000000000000 -t = 81.0000, H(p,q)-H0 = 0.0000000020941002, L(p,q)-L0 = -0.0000000000000001 -t = 81.1000, H(p,q)-H0 = 0.0000000019913261, L(p,q)-L0 = -0.0000000000000002 -t = 81.2000, H(p,q)-H0 = 0.0000000017478636, L(p,q)-L0 = 0.0000000000000000 -t = 81.3000, H(p,q)-H0 = 0.0000000011560930, L(p,q)-L0 = -0.0000000000000001 -t = 81.4000, H(p,q)-H0 = -0.0000000001606235, L(p,q)-L0 = -0.0000000000000002 -t = 81.5000, H(p,q)-H0 = -0.0000000020080737, L(p,q)-L0 = 0.0000000000000000 -t = 81.6000, H(p,q)-H0 = -0.0000000015271253, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.1633e-15, num. orbits is now 13.00 -t = 81.6814, H(p,q)-H0 = -0.0000000102837558, L(p,q)-L0 = -0.0000000022411522 -t = 81.7000, H(p,q)-H0 = -0.0000000000970446, L(p,q)-L0 = -0.0000000000000001 -t = 81.8000, H(p,q)-H0 = -0.0000000021650746, L(p,q)-L0 = -0.0000000000000001 -t = 81.9000, H(p,q)-H0 = -0.0000000014039538, L(p,q)-L0 = -0.0000000000000001 -t = 82.0000, H(p,q)-H0 = 0.0000000004158340, L(p,q)-L0 = -0.0000000000000001 -t = 82.1000, H(p,q)-H0 = 0.0000000014310879, L(p,q)-L0 = -0.0000000000000001 -t = 82.2000, H(p,q)-H0 = 0.0000000018621736, L(p,q)-L0 = -0.0000000000000001 -t = 82.3000, H(p,q)-H0 = 0.0000000020393431, L(p,q)-L0 = -0.0000000000000001 -t = 82.4000, H(p,q)-H0 = 0.0000000021154496, L(p,q)-L0 = -0.0000000000000001 -t = 82.5000, H(p,q)-H0 = 0.0000000021504017, L(p,q)-L0 = 0.0000000000000000 -t = 82.6000, H(p,q)-H0 = 0.0000000021676144, L(p,q)-L0 = 0.0000000000000000 -t = 82.7000, H(p,q)-H0 = 0.0000000021766666, L(p,q)-L0 = -0.0000000000000001 -t = 82.8000, H(p,q)-H0 = 0.0000000021817191, L(p,q)-L0 = 0.0000000000000000 -t = 82.9000, H(p,q)-H0 = 0.0000000021846919, L(p,q)-L0 = 0.0000000000000000 -t = 83.0000, H(p,q)-H0 = 0.0000000021865242, L(p,q)-L0 = -0.0000000000000002 -t = 83.1000, H(p,q)-H0 = 0.0000000021877013, L(p,q)-L0 = 0.0000000000000000 -t = 83.2000, H(p,q)-H0 = 0.0000000021884847, L(p,q)-L0 = 0.0000000000000000 -t = 83.3000, H(p,q)-H0 = 0.0000000021890226, L(p,q)-L0 = -0.0000000000000001 -t = 83.4000, H(p,q)-H0 = 0.0000000021894024, L(p,q)-L0 = -0.0000000000000001 -t = 83.5000, H(p,q)-H0 = 0.0000000021896770, L(p,q)-L0 = -0.0000000000000001 -t = 83.6000, H(p,q)-H0 = 0.0000000021898798, L(p,q)-L0 = -0.0000000000000001 -t = 83.7000, H(p,q)-H0 = 0.0000000021900322, L(p,q)-L0 = 0.0000000000000000 -t = 83.8000, H(p,q)-H0 = 0.0000000021901481, L(p,q)-L0 = 0.0000000000000000 -t = 83.9000, H(p,q)-H0 = 0.0000000021902377, L(p,q)-L0 = 0.0000000000000000 -t = 84.0000, H(p,q)-H0 = 0.0000000021903072, L(p,q)-L0 = 0.0000000000000000 -t = 84.1000, H(p,q)-H0 = 0.0000000021903615, L(p,q)-L0 = -0.0000000000000001 -t = 84.2000, H(p,q)-H0 = 0.0000000021904041, L(p,q)-L0 = 0.0000000000000000 -t = 84.3000, H(p,q)-H0 = 0.0000000021904372, L(p,q)-L0 = 0.0000000000000000 -t = 84.4000, H(p,q)-H0 = 0.0000000021904625, L(p,q)-L0 = 0.0000000000000000 -t = 84.5000, H(p,q)-H0 = 0.0000000021904810, L(p,q)-L0 = 0.0000000000000000 -t = 84.6000, H(p,q)-H0 = 0.0000000021904942, L(p,q)-L0 = -0.0000000000000001 -t = 84.7000, H(p,q)-H0 = 0.0000000021905022, L(p,q)-L0 = -0.0000000000000001 -t = 84.8000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.68405e-13, num. orbits is now 13.50 -t = 84.8230, H(p,q)-H0 = 0.0000000021905030, L(p,q)-L0 = -0.0000000000000079 -t = 84.9000, H(p,q)-H0 = 0.0000000021905042, L(p,q)-L0 = -0.0000000000000001 -t = 85.0000, H(p,q)-H0 = 0.0000000021904983, L(p,q)-L0 = 0.0000000000000000 -t = 85.1000, H(p,q)-H0 = 0.0000000021904875, L(p,q)-L0 = -0.0000000000000002 -t = 85.2000, H(p,q)-H0 = 0.0000000021904715, L(p,q)-L0 = 0.0000000000000000 -t = 85.3000, H(p,q)-H0 = 0.0000000021904492, L(p,q)-L0 = -0.0000000000000001 -t = 85.4000, H(p,q)-H0 = 0.0000000021904198, L(p,q)-L0 = 0.0000000000000000 -t = 85.5000, H(p,q)-H0 = 0.0000000021903818, L(p,q)-L0 = -0.0000000000000001 -t = 85.6000, H(p,q)-H0 = 0.0000000021903331, L(p,q)-L0 = 0.0000000000000000 -t = 85.7000, H(p,q)-H0 = 0.0000000021902707, L(p,q)-L0 = -0.0000000000000002 -t = 85.8000, H(p,q)-H0 = 0.0000000021901908, L(p,q)-L0 = 0.0000000000000000 -t = 85.9000, H(p,q)-H0 = 0.0000000021900876, L(p,q)-L0 = 0.0000000000000001 -t = 86.0000, H(p,q)-H0 = 0.0000000021899528, L(p,q)-L0 = -0.0000000000000001 -t = 86.1000, H(p,q)-H0 = 0.0000000021897746, L(p,q)-L0 = 0.0000000000000000 -t = 86.2000, H(p,q)-H0 = 0.0000000021895351, L(p,q)-L0 = 0.0000000000000000 -t = 86.3000, H(p,q)-H0 = 0.0000000021892071, L(p,q)-L0 = 0.0000000000000000 -t = 86.4000, H(p,q)-H0 = 0.0000000021887479, L(p,q)-L0 = -0.0000000000000001 -t = 86.5000, H(p,q)-H0 = 0.0000000021880882, L(p,q)-L0 = 0.0000000000000000 -t = 86.6000, H(p,q)-H0 = 0.0000000021871112, L(p,q)-L0 = 0.0000000000000000 -t = 86.7000, H(p,q)-H0 = 0.0000000021856167, L(p,q)-L0 = 0.0000000000000000 -t = 86.8000, H(p,q)-H0 = 0.0000000021832398, L(p,q)-L0 = 0.0000000000000000 -t = 86.9000, H(p,q)-H0 = 0.0000000021792922, L(p,q)-L0 = -0.0000000000000001 -t = 87.0000, H(p,q)-H0 = 0.0000000021724023, L(p,q)-L0 = -0.0000000000000001 -t = 87.1000, H(p,q)-H0 = 0.0000000021596853, L(p,q)-L0 = -0.0000000000000002 -t = 87.2000, H(p,q)-H0 = 0.0000000021347003, L(p,q)-L0 = -0.0000000000000001 -t = 87.3000, H(p,q)-H0 = 0.0000000020821659, L(p,q)-L0 = 0.0000000000000000 -t = 87.4000, H(p,q)-H0 = 0.0000000019638068, L(p,q)-L0 = 0.0000000000000000 -t = 87.5000, H(p,q)-H0 = 0.0000000016811599, L(p,q)-L0 = 0.0000000000000000 -t = 87.6000, H(p,q)-H0 = 0.0000000009964676, L(p,q)-L0 = -0.0000000000000002 -t = 87.7000, H(p,q)-H0 = -0.0000000004693219, L(p,q)-L0 = -0.0000000000000001 -t = 87.8000, H(p,q)-H0 = -0.0000000022005262, L(p,q)-L0 = 0.0000000000000000 -t = 87.9000, H(p,q)-H0 = -0.0000000011032588, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.95627e-12, num. orbits is now 14.00 -t = 87.9646, H(p,q)-H0 = -0.0000000359256414, L(p,q)-L0 = -0.0000000078329813 -t = 88.0000, H(p,q)-H0 = -0.0000000003564948, L(p,q)-L0 = 0.0000000000000000 -t = 88.1000, H(p,q)-H0 = -0.0000000022895377, L(p,q)-L0 = 0.0000000000000000 -t = 88.2000, H(p,q)-H0 = -0.0000000010732304, L(p,q)-L0 = -0.0000000000000001 -t = 88.3000, H(p,q)-H0 = 0.0000000006458953, L(p,q)-L0 = -0.0000000000000001 -t = 88.4000, H(p,q)-H0 = 0.0000000015328960, L(p,q)-L0 = 0.0000000000000000 -t = 88.5000, H(p,q)-H0 = 0.0000000019037720, L(p,q)-L0 = 0.0000000000000001 -t = 88.6000, H(p,q)-H0 = 0.0000000020568457, L(p,q)-L0 = 0.0000000000000001 -t = 88.7000, H(p,q)-H0 = 0.0000000021232918, L(p,q)-L0 = 0.0000000000000000 -t = 88.8000, H(p,q)-H0 = 0.0000000021541700, L(p,q)-L0 = 0.0000000000000000 -t = 88.9000, H(p,q)-H0 = 0.0000000021695511, L(p,q)-L0 = -0.0000000000000001 -t = 89.0000, H(p,q)-H0 = 0.0000000021777253, L(p,q)-L0 = 0.0000000000000000 -t = 89.1000, H(p,q)-H0 = 0.0000000021823305, L(p,q)-L0 = 0.0000000000000000 -t = 89.2000, H(p,q)-H0 = 0.0000000021850627, L(p,q)-L0 = -0.0000000000000001 -t = 89.3000, H(p,q)-H0 = 0.0000000021867591, L(p,q)-L0 = -0.0000000000000001 -t = 89.4000, H(p,q)-H0 = 0.0000000021878555, L(p,q)-L0 = -0.0000000000000001 -t = 89.5000, H(p,q)-H0 = 0.0000000021885893, L(p,q)-L0 = 0.0000000000000000 -t = 89.6000, H(p,q)-H0 = 0.0000000021890958, L(p,q)-L0 = 0.0000000000000000 -t = 89.7000, H(p,q)-H0 = 0.0000000021894550, L(p,q)-L0 = 0.0000000000000000 -t = 89.8000, H(p,q)-H0 = 0.0000000021897156, L(p,q)-L0 = 0.0000000000000000 -t = 89.9000, H(p,q)-H0 = 0.0000000021899086, L(p,q)-L0 = 0.0000000000000000 -t = 90.0000, H(p,q)-H0 = 0.0000000021900538, L(p,q)-L0 = -0.0000000000000001 -t = 90.1000, H(p,q)-H0 = 0.0000000021901648, L(p,q)-L0 = 0.0000000000000000 -t = 90.2000, H(p,q)-H0 = 0.0000000021902505, L(p,q)-L0 = 0.0000000000000000 -t = 90.3000, H(p,q)-H0 = 0.0000000021903174, L(p,q)-L0 = 0.0000000000000000 -t = 90.4000, H(p,q)-H0 = 0.0000000021903695, L(p,q)-L0 = -0.0000000000000001 -t = 90.5000, H(p,q)-H0 = 0.0000000021904104, L(p,q)-L0 = 0.0000000000000000 -t = 90.6000, H(p,q)-H0 = 0.0000000021904418, L(p,q)-L0 = 0.0000000000000000 -t = 90.7000, H(p,q)-H0 = 0.0000000021904659, L(p,q)-L0 = 0.0000000000000000 -t = 90.8000, H(p,q)-H0 = 0.0000000021904836, L(p,q)-L0 = -0.0000000000000001 -t = 90.9000, H(p,q)-H0 = 0.0000000021904958, L(p,q)-L0 = -0.0000000000000001 -t = 91.0000, H(p,q)-H0 = 0.0000000021905031, L(p,q)-L0 = 0.0000000000000001 -t = 91.1000, H(p,q)-H0 = 0.0000000021905057, L(p,q)-L0 = 0.0000000000000000 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -8.73325e-16, num. orbits is now 14.50 -t = 91.1062, H(p,q)-H0 = 0.0000000021905006, L(p,q)-L0 = -0.0000000000000145 -t = 91.2000, H(p,q)-H0 = 0.0000000021905036, L(p,q)-L0 = -0.0000000000000001 -t = 91.3000, H(p,q)-H0 = 0.0000000021904969, L(p,q)-L0 = 0.0000000000000000 -t = 91.4000, H(p,q)-H0 = 0.0000000021904853, L(p,q)-L0 = -0.0000000000000001 -t = 91.5000, H(p,q)-H0 = 0.0000000021904681, L(p,q)-L0 = -0.0000000000000001 -t = 91.6000, H(p,q)-H0 = 0.0000000021904449, L(p,q)-L0 = 0.0000000000000000 -t = 91.7000, H(p,q)-H0 = 0.0000000021904142, L(p,q)-L0 = -0.0000000000000001 -t = 91.8000, H(p,q)-H0 = 0.0000000021903745, L(p,q)-L0 = 0.0000000000000000 -t = 91.9000, H(p,q)-H0 = 0.0000000021903237, L(p,q)-L0 = 0.0000000000000000 -t = 92.0000, H(p,q)-H0 = 0.0000000021902586, L(p,q)-L0 = 0.0000000000000000 -t = 92.1000, H(p,q)-H0 = 0.0000000021901752, L(p,q)-L0 = 0.0000000000000000 -t = 92.2000, H(p,q)-H0 = 0.0000000021900673, L(p,q)-L0 = 0.0000000000000000 -t = 92.3000, H(p,q)-H0 = 0.0000000021899261, L(p,q)-L0 = 0.0000000000000000 -t = 92.4000, H(p,q)-H0 = 0.0000000021897392, L(p,q)-L0 = -0.0000000000000001 -t = 92.5000, H(p,q)-H0 = 0.0000000021894872, L(p,q)-L0 = 0.0000000000000000 -t = 92.6000, H(p,q)-H0 = 0.0000000021891406, L(p,q)-L0 = -0.0000000000000001 -t = 92.7000, H(p,q)-H0 = 0.0000000021886534, L(p,q)-L0 = -0.0000000000000001 -t = 92.8000, H(p,q)-H0 = 0.0000000021879500, L(p,q)-L0 = 0.0000000000000000 -t = 92.9000, H(p,q)-H0 = 0.0000000021869037, L(p,q)-L0 = 0.0000000000000000 -t = 93.0000, H(p,q)-H0 = 0.0000000021852921, L(p,q)-L0 = 0.0000000000000000 -t = 93.1000, H(p,q)-H0 = 0.0000000021827118, L(p,q)-L0 = -0.0000000000000001 -t = 93.2000, H(p,q)-H0 = 0.0000000021783927, L(p,q)-L0 = 0.0000000000000000 -t = 93.3000, H(p,q)-H0 = 0.0000000021707859, L(p,q)-L0 = 0.0000000000000000 -t = 93.4000, H(p,q)-H0 = 0.0000000021566040, L(p,q)-L0 = -0.0000000000000001 -t = 93.5000, H(p,q)-H0 = 0.0000000021284303, L(p,q)-L0 = -0.0000000000000001 -t = 93.6000, H(p,q)-H0 = 0.0000000020684934, L(p,q)-L0 = -0.0000000000000001 -t = 93.7000, H(p,q)-H0 = 0.0000000019319524, L(p,q)-L0 = 0.0000000000000000 -t = 93.8000, H(p,q)-H0 = 0.0000000016036215, L(p,q)-L0 = -0.0000000000000001 -t = 93.9000, H(p,q)-H0 = 0.0000000008137404, L(p,q)-L0 = -0.0000000000000001 -t = 94.0000, H(p,q)-H0 = -0.0000000007952294, L(p,q)-L0 = 0.0000000000000000 -t = 94.1000, H(p,q)-H0 = -0.0000000022989104, L(p,q)-L0 = -0.0000000000000001 -t = 94.2000, H(p,q)-H0 = -0.0000000006765071, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.09707e-12, num. orbits is now 15.00 -t = 94.2478, H(p,q)-H0 = -0.0000000391316370, L(p,q)-L0 = -0.0000000085368175 -t = 94.3000, H(p,q)-H0 = -0.0000000007326104, L(p,q)-L0 = -0.0000000000000002 -t = 94.4000, H(p,q)-H0 = -0.0000000022880617, L(p,q)-L0 = -0.0000000000000001 -t = 94.5000, H(p,q)-H0 = -0.0000000007392522, L(p,q)-L0 = -0.0000000000000002 -t = 94.6000, H(p,q)-H0 = 0.0000000008495675, L(p,q)-L0 = -0.0000000000000002 -t = 94.7000, H(p,q)-H0 = 0.0000000016205692, L(p,q)-L0 = -0.0000000000000001 -t = 94.8000, H(p,q)-H0 = 0.0000000019396089, L(p,q)-L0 = 0.0000000000000000 -t = 94.9000, H(p,q)-H0 = 0.0000000020720647, L(p,q)-L0 = -0.0000000000000001 -t = 95.0000, H(p,q)-H0 = 0.0000000021301907, L(p,q)-L0 = 0.0000000000000000 -t = 95.1000, H(p,q)-H0 = 0.0000000021575237, L(p,q)-L0 = 0.0000000000000000 -t = 95.2000, H(p,q)-H0 = 0.0000000021712937, L(p,q)-L0 = -0.0000000000000001 -t = 95.3000, H(p,q)-H0 = 0.0000000021786871, L(p,q)-L0 = -0.0000000000000001 -t = 95.4000, H(p,q)-H0 = 0.0000000021828907, L(p,q)-L0 = 0.0000000000000000 -t = 95.5000, H(p,q)-H0 = 0.0000000021854049, L(p,q)-L0 = -0.0000000000000001 -t = 95.6000, H(p,q)-H0 = 0.0000000021869770, L(p,q)-L0 = -0.0000000000000001 -t = 95.7000, H(p,q)-H0 = 0.0000000021879995, L(p,q)-L0 = -0.0000000000000001 -t = 95.8000, H(p,q)-H0 = 0.0000000021886876, L(p,q)-L0 = -0.0000000000000001 -t = 95.9000, H(p,q)-H0 = 0.0000000021891650, L(p,q)-L0 = 0.0000000000000000 -t = 96.0000, H(p,q)-H0 = 0.0000000021895045, L(p,q)-L0 = -0.0000000000000001 -t = 96.1000, H(p,q)-H0 = 0.0000000021897521, L(p,q)-L0 = 0.0000000000000000 -t = 96.2000, H(p,q)-H0 = 0.0000000021899358, L(p,q)-L0 = 0.0000000000000000 -t = 96.3000, H(p,q)-H0 = 0.0000000021900747, L(p,q)-L0 = 0.0000000000000000 -t = 96.4000, H(p,q)-H0 = 0.0000000021901808, L(p,q)-L0 = 0.0000000000000000 -t = 96.5000, H(p,q)-H0 = 0.0000000021902628, L(p,q)-L0 = -0.0000000000000001 -t = 96.6000, H(p,q)-H0 = 0.0000000021903269, L(p,q)-L0 = 0.0000000000000000 -t = 96.7000, H(p,q)-H0 = 0.0000000021903769, L(p,q)-L0 = -0.0000000000000001 -t = 96.8000, H(p,q)-H0 = 0.0000000021904161, L(p,q)-L0 = -0.0000000000000001 -t = 96.9000, H(p,q)-H0 = 0.0000000021904463, L(p,q)-L0 = 0.0000000000000000 -t = 97.0000, H(p,q)-H0 = 0.0000000021904694, L(p,q)-L0 = 0.0000000000000000 -t = 97.1000, H(p,q)-H0 = 0.0000000021904860, L(p,q)-L0 = -0.0000000000000001 -t = 97.2000, H(p,q)-H0 = 0.0000000021904973, L(p,q)-L0 = -0.0000000000000001 -t = 97.3000, H(p,q)-H0 = 0.0000000021905037, L(p,q)-L0 = -0.0000000000000001 -ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.39091e-13, num. orbits is now 15.50 -t = 97.3894, H(p,q)-H0 = 0.0000000021905037, L(p,q)-L0 = -0.0000000000000056 -t = 97.4000, H(p,q)-H0 = 0.0000000021905056, L(p,q)-L0 = -0.0000000000000001 -t = 97.5000, H(p,q)-H0 = 0.0000000021905026, L(p,q)-L0 = -0.0000000000000001 -t = 97.6000, H(p,q)-H0 = 0.0000000021904953, L(p,q)-L0 = -0.0000000000000001 -t = 97.7000, H(p,q)-H0 = 0.0000000021904827, L(p,q)-L0 = -0.0000000000000001 -t = 97.8000, H(p,q)-H0 = 0.0000000021904646, L(p,q)-L0 = -0.0000000000000001 -t = 97.9000, H(p,q)-H0 = 0.0000000021904402, L(p,q)-L0 = -0.0000000000000001 -t = 98.0000, H(p,q)-H0 = 0.0000000021904081, L(p,q)-L0 = 0.0000000000000000 -t = 98.1000, H(p,q)-H0 = 0.0000000021903667, L(p,q)-L0 = -0.0000000000000001 -t = 98.2000, H(p,q)-H0 = 0.0000000021903138, L(p,q)-L0 = 0.0000000000000000 -t = 98.3000, H(p,q)-H0 = 0.0000000021902460, L(p,q)-L0 = 0.0000000000000000 -t = 98.4000, H(p,q)-H0 = 0.0000000021901588, L(p,q)-L0 = -0.0000000000000001 -t = 98.5000, H(p,q)-H0 = 0.0000000021900461, L(p,q)-L0 = 0.0000000000000000 -t = 98.6000, H(p,q)-H0 = 0.0000000021898983, L(p,q)-L0 = -0.0000000000000002 -t = 98.7000, H(p,q)-H0 = 0.0000000021897019, L(p,q)-L0 = -0.0000000000000001 -t = 98.8000, H(p,q)-H0 = 0.0000000021894364, L(p,q)-L0 = -0.0000000000000002 -t = 98.9000, H(p,q)-H0 = 0.0000000021890702, L(p,q)-L0 = 0.0000000000000000 -t = 99.0000, H(p,q)-H0 = 0.0000000021885528, L(p,q)-L0 = -0.0000000000000001 -t = 99.1000, H(p,q)-H0 = 0.0000000021878026, L(p,q)-L0 = -0.0000000000000001 -t = 99.2000, H(p,q)-H0 = 0.0000000021866799, L(p,q)-L0 = -0.0000000000000001 -t = 99.3000, H(p,q)-H0 = 0.0000000021849408, L(p,q)-L0 = 0.0000000000000000 -t = 99.4000, H(p,q)-H0 = 0.0000000021821366, L(p,q)-L0 = -0.0000000000000001 -t = 99.5000, H(p,q)-H0 = 0.0000000021774034, L(p,q)-L0 = -0.0000000000000002 -t = 99.6000, H(p,q)-H0 = 0.0000000021689920, L(p,q)-L0 = -0.0000000000000002 -t = 99.7000, H(p,q)-H0 = 0.0000000021531483, L(p,q)-L0 = 0.0000000000000000 -t = 99.8000, H(p,q)-H0 = 0.0000000021213169, L(p,q)-L0 = -0.0000000000000001 -t = 99.9000, H(p,q)-H0 = 0.0000000020527999, L(p,q)-L0 = -0.0000000000000001 -t = 100.0000, H(p,q)-H0 = 0.0000000018950302, L(p,q)-L0 = -0.0000000000000001 -Current time = 99.99999999999859 +t = 2.0000, H(p,q)-H0 = 0.0000155500913761, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -1.88646e-14, num. orbits is now 0.50 +t = 3.1418, H(p,q)-H0 = 0.0000155500918735, L(p,q)-L0 = 0.0000044724976096 +t = 4.0000, H(p,q)-H0 = 0.0000155500916529, L(p,q)-L0 = 0.0000044724976135 +t = 6.0000, H(p,q)-H0 = 0.0000155477772263, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 8.25078e-16, num. orbits is now 1.00 +t = 6.2835, H(p,q)-H0 = 0.0000155203795122, L(p,q)-L0 = 0.0000044664979287 +t = 8.0000, H(p,q)-H0 = 0.0000155500907651, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -5.22907e-14, num. orbits is now 1.50 +t = 9.4252, H(p,q)-H0 = 0.0000155500918704, L(p,q)-L0 = 0.0000044724976006 +t = 10.0000, H(p,q)-H0 = 0.0000155500917899, L(p,q)-L0 = 0.0000044724976135 +t = 12.0000, H(p,q)-H0 = 0.0000155498692904, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 2.79488e-13, num. orbits is now 2.00 +t = 12.5670, H(p,q)-H0 = 0.0000155049003756, L(p,q)-L0 = 0.0000044631180703 +t = 14.0000, H(p,q)-H0 = 0.0000155500892037, L(p,q)-L0 = 0.0000044724976136 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -8.67519e-14, num. orbits is now 2.50 +t = 15.7087, H(p,q)-H0 = 0.0000155500918712, L(p,q)-L0 = 0.0000044724976036 +t = 16.0000, H(p,q)-H0 = 0.0000155500918547, L(p,q)-L0 = 0.0000044724976134 +t = 18.0000, H(p,q)-H0 = 0.0000155500584843, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 3.21073e-13, num. orbits is now 3.00 +t = 18.8504, H(p,q)-H0 = 0.0000155449689148, L(p,q)-L0 = 0.0000044718585810 +t = 20.0000, H(p,q)-H0 = 0.0000155500841750, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -1.40404e-16, num. orbits is now 3.50 +t = 21.9922, H(p,q)-H0 = 0.0000155500918731, L(p,q)-L0 = 0.0000044724976084 +t = 22.0000, H(p,q)-H0 = 0.0000155500918747, L(p,q)-L0 = 0.0000044724976136 +t = 24.0000, H(p,q)-H0 = 0.0000155500836105, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 7.8236e-16, num. orbits is now 4.00 +t = 25.1339, H(p,q)-H0 = 0.0000155169132525, L(p,q)-L0 = 0.0000044657418486 +t = 26.0000, H(p,q)-H0 = 0.0000155500613853, L(p,q)-L0 = 0.0000044724976135 +t = 28.0000, H(p,q)-H0 = 0.0000155500918571, L(p,q)-L0 = 0.0000044724976136 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -1.10849e-15, num. orbits is now 4.50 +t = 28.2757, H(p,q)-H0 = 0.0000155500918702, L(p,q)-L0 = 0.0000044724975999 +t = 30.0000, H(p,q)-H0 = 0.0000155500890452, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.40729e-15, num. orbits is now 5.00 +t = 31.4174, H(p,q)-H0 = 0.0000155063900653, L(p,q)-L0 = 0.0000044634422682 +t = 32.0000, H(p,q)-H0 = 0.0000155498937505, L(p,q)-L0 = 0.0000044724976136 +t = 34.0000, H(p,q)-H0 = 0.0000155500917953, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -1.90379e-13, num. orbits is now 5.50 +t = 34.5592, H(p,q)-H0 = 0.0000155500918726, L(p,q)-L0 = 0.0000044724976068 +t = 36.0000, H(p,q)-H0 = 0.0000155500907079, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.61859e-13, num. orbits is now 6.00 +t = 37.7009, H(p,q)-H0 = 0.0000155418054639, L(p,q)-L0 = 0.0000044711691772 +t = 38.0000, H(p,q)-H0 = 0.0000155480172854, L(p,q)-L0 = 0.0000044724976135 +t = 40.0000, H(p,q)-H0 = 0.0000155500916642, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -2.25117e-13, num. orbits is now 6.50 +t = 40.8426, H(p,q)-H0 = 0.0000155500918724, L(p,q)-L0 = 0.0000044724976068 +t = 42.0000, H(p,q)-H0 = 0.0000155500913513, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 5.75278e-15, num. orbits is now 7.00 +t = 43.9843, H(p,q)-H0 = 0.0000155136751636, L(p,q)-L0 = 0.0000044650354014 +t = 44.0000, H(p,q)-H0 = 0.0000155478340671, L(p,q)-L0 = 0.0000044724976134 +t = 46.0000, H(p,q)-H0 = 0.0000155500913973, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -7.2956e-16, num. orbits is now 7.50 +t = 47.1261, H(p,q)-H0 = 0.0000155500918698, L(p,q)-L0 = 0.0000044724975991 +t = 48.0000, H(p,q)-H0 = 0.0000155500916421, L(p,q)-L0 = 0.0000044724976134 +t = 50.0000, H(p,q)-H0 = 0.0000155474929582, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.11845e-12, num. orbits is now 8.00 +t = 50.2678, H(p,q)-H0 = 0.0000155091249194, L(p,q)-L0 = 0.0000044640381455 +t = 52.0000, H(p,q)-H0 = 0.0000155500908142, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -2.94768e-13, num. orbits is now 8.50 +t = 53.4096, H(p,q)-H0 = 0.0000155500918735, L(p,q)-L0 = 0.0000044724976096 +t = 54.0000, H(p,q)-H0 = 0.0000155500917846, L(p,q)-L0 = 0.0000044724976134 +t = 56.0000, H(p,q)-H0 = 0.0000155498403969, L(p,q)-L0 = 0.0000044724976133 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.24352e-12, num. orbits is now 9.00 +t = 56.5513, H(p,q)-H0 = 0.0000155384487686, L(p,q)-L0 = 0.0000044704375812 +t = 58.0000, H(p,q)-H0 = 0.0000155500893395, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -3.29137e-13, num. orbits is now 9.50 +t = 59.6931, H(p,q)-H0 = 0.0000155500918722, L(p,q)-L0 = 0.0000044724976055 +t = 60.0000, H(p,q)-H0 = 0.0000155500918526, L(p,q)-L0 = 0.0000044724976134 +t = 62.0000, H(p,q)-H0 = 0.0000155500553390, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.38799e-12, num. orbits is now 10.00 +t = 62.8348, H(p,q)-H0 = 0.0000155107582724, L(p,q)-L0 = 0.0000044643988768 +t = 64.0000, H(p,q)-H0 = 0.0000155500846616, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -3.68955e-13, num. orbits is now 10.50 +t = 65.9766, H(p,q)-H0 = 0.0000155500918702, L(p,q)-L0 = 0.0000044724975993 +t = 66.0000, H(p,q)-H0 = 0.0000155500918748, L(p,q)-L0 = 0.0000044724976135 +t = 68.0000, H(p,q)-H0 = 0.0000155500830369, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 6.73073e-16, num. orbits is now 11.00 +t = 69.1183, H(p,q)-H0 = 0.0000155132795978, L(p,q)-L0 = 0.0000044649438806 +t = 70.0000, H(p,q)-H0 = 0.0000155500639313, L(p,q)-L0 = 0.0000044724976135 +t = 72.0000, H(p,q)-H0 = 0.0000155500918592, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -2.11431e-15, num. orbits is now 11.50 +t = 72.2600, H(p,q)-H0 = 0.0000155500918748, L(p,q)-L0 = 0.0000044724976133 +t = 74.0000, H(p,q)-H0 = 0.0000155500888908, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.67165e-12, num. orbits is now 12.00 +t = 75.4017, H(p,q)-H0 = 0.0000155349369808, L(p,q)-L0 = 0.0000044696720972 +t = 76.0000, H(p,q)-H0 = 0.0000155499159623, L(p,q)-L0 = 0.0000044724976134 +t = 78.0000, H(p,q)-H0 = 0.0000155500918005, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -4.30462e-13, num. orbits is now 12.50 +t = 78.5435, H(p,q)-H0 = 0.0000155500918721, L(p,q)-L0 = 0.0000044724976048 +t = 80.0000, H(p,q)-H0 = 0.0000155500906532, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 3.37779e-12, num. orbits is now 13.00 +t = 81.6852, H(p,q)-H0 = 0.0000155082648194, L(p,q)-L0 = 0.0000044638545811 +t = 82.0000, H(p,q)-H0 = 0.0000155482613966, L(p,q)-L0 = 0.0000044724976134 +t = 84.0000, H(p,q)-H0 = 0.0000155500916742, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -4.68566e-13, num. orbits is now 13.50 +t = 84.8270, H(p,q)-H0 = 0.0000155500918701, L(p,q)-L0 = 0.0000044724975993 +t = 86.0000, H(p,q)-H0 = 0.0000155500913284, L(p,q)-L0 = 0.0000044724976135 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.95522e-12, num. orbits is now 14.00 +t = 87.9687, H(p,q)-H0 = 0.0000155190401663, L(p,q)-L0 = 0.0000044662001580 +t = 88.0000, H(p,q)-H0 = 0.0000155476211892, L(p,q)-L0 = 0.0000044724976133 +t = 90.0000, H(p,q)-H0 = 0.0000155500914178, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -2.10881e-15, num. orbits is now 14.50 +t = 91.1105, H(p,q)-H0 = 0.0000155500918745, L(p,q)-L0 = 0.0000044724976124 +t = 92.0000, H(p,q)-H0 = 0.0000155500916311, L(p,q)-L0 = 0.0000044724976134 +t = 94.0000, H(p,q)-H0 = 0.0000155471925649, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 2.09832e-12, num. orbits is now 15.00 +t = 94.2522, H(p,q)-H0 = 0.0000155313150425, L(p,q)-L0 = 0.0000044688825105 +t = 96.0000, H(p,q)-H0 = 0.0000155500908612, L(p,q)-L0 = 0.0000044724976134 +ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -5.98154e-16, num. orbits is now 15.50 +t = 97.3939, H(p,q)-H0 = 0.0000155500918717, L(p,q)-L0 = 0.0000044724976036 +t = 98.0000, H(p,q)-H0 = 0.0000155500917791, L(p,q)-L0 = 0.0000044724976134 +t = 100.0000, H(p,q)-H0 = 0.0000155498072557, L(p,q)-L0 = 0.0000044724976134 +Current time = 100 Steps = 10000 Step attempts = 10000 Stability limited steps = 0 @@ -1081,8 +132,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.01 -Last step size = 0.009999999999990896 -Current step size = 0.009999999999990896 -Root fn evals = 10274 +Last step size = 0.01 +Current step size = 0.01 +Root fn evals = 10315 f1 RHS fn evals = 40032 f2 RHS fn evals = 40032 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out index 7732f92e38..e99de1f424 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out @@ -4,6 +4,7 @@ Problem Arguments: stepper: 1 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.001 Tf: 50 @@ -22,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400010 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -34,6 +35,7 @@ LS setups = 0 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.001 Tf: 50 @@ -61,6 +63,7 @@ f2 RHS fn evals = 50002 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.0005 Tf: 50 @@ -88,6 +91,7 @@ f2 RHS fn evals = 100001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.00025 Tf: 50 @@ -115,6 +119,7 @@ f2 RHS fn evals = 200001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.000125 Tf: 50 @@ -142,6 +147,7 @@ f2 RHS fn evals = 400002 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 6.25e-05 Tf: 50 @@ -169,6 +175,7 @@ f2 RHS fn evals = 800002 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 3.125e-05 Tf: 50 @@ -196,6 +203,7 @@ f2 RHS fn evals = 1600002 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 1.5625e-05 Tf: 50 @@ -223,6 +231,7 @@ f2 RHS fn evals = 3200001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 7.8125e-06 Tf: 50 @@ -245,4 +254,98 @@ f1 RHS fn evals = 6400001 f2 RHS fn evals = 6400001 Order of accuracy wrt solution: expected = 1, max = 1.6317, avg = 1.0843, overall = 1.0418 -Order of accuracy wrt Hamiltonian: expected = 1, max = 0.9999, avg = 0.9979, overall = 0.9983 +Order of accuracy wrt Hamiltonian: expe +================================================================= +==64418==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf153af06c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 + #3 0x7fdf153af322 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf153ecbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fdf15403657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf153ecbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fdf15403657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf153ecbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fdf15403657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf153ecbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fdf15403657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf154039af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf154039af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf154036ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf154036ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 8 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf153af149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 + #3 0x7fdf153af322 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 8 byte(s) in 1 object(s) allocated from: + #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fdf153af1af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 + #3 0x7fdf153af322 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1096 byte(s) leaked in 11 allocation(s). diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out index 1d409aa604..d171b103d2 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -4,6 +4,7 @@ Problem Arguments: stepper: 1 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.001 Tf: 50 @@ -22,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400010 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -34,6 +35,7 @@ LS setups = 0 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.001 Tf: 50 @@ -61,6 +63,7 @@ f2 RHS fn evals = 100003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.0005 Tf: 50 @@ -88,6 +91,7 @@ f2 RHS fn evals = 200001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.00025 Tf: 50 @@ -115,13 +119,14 @@ f2 RHS fn evals = 400001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.000125 Tf: 50 nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000016151294, L(p,q)-L0 = -0.0000000000000340 +t = 50.0000, H(p,q)-H0 = -0.0000000016152086, L(p,q)-L0 = -0.0000000000000624 Current time = 50 Steps = 400001 Step attempts = 400001 @@ -142,6 +147,7 @@ f2 RHS fn evals = 800003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 6.25e-05 Tf: 50 @@ -169,6 +175,7 @@ f2 RHS fn evals = 1600003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 3.125e-05 Tf: 50 @@ -196,6 +203,7 @@ f2 RHS fn evals = 3200003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 1.5625e-05 Tf: 50 @@ -223,6 +231,7 @@ f2 RHS fn evals = 6400001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 7.8125e-06 Tf: 50 @@ -245,4 +254,98 @@ f1 RHS fn evals = 12800001 f2 RHS fn evals = 12800001 Order of accuracy wrt solution: expected = 2, max = 2.0097, avg = 1.8616, overall = 1.9108 -Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0636, avg = 2.0087, overall = 2.0051 +Order of accuracy wrt Hamiltonian: ex +================================================================= +==1966==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec22206c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 + #3 0x7fa2ec22235b in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec25fbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fa2ec276657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec25fbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fa2ec276657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec25fbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fa2ec276657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec25fbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fa2ec276657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec2769af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec2769af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec2766ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec2766ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 16 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec222149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 + #3 0x7fa2ec22235b in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 16 byte(s) in 1 object(s) allocated from: + #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa2ec2221af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 + #3 0x7fa2ec22235b in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1112 byte(s) leaked in 11 allocation(s). diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out index 188d434b47..21996f4ff5 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out @@ -4,6 +4,7 @@ Problem Arguments: stepper: 1 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.001 Tf: 50 @@ -22,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400010 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -34,6 +35,7 @@ LS setups = 0 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.001 Tf: 50 @@ -61,6 +63,7 @@ f2 RHS fn evals = 100003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.0005 Tf: 50 @@ -88,6 +91,7 @@ f2 RHS fn evals = 200001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.00025 Tf: 50 @@ -115,6 +119,7 @@ f2 RHS fn evals = 400001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.000125 Tf: 50 @@ -142,6 +147,7 @@ f2 RHS fn evals = 800003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 6.25e-05 Tf: 50 @@ -169,13 +175,14 @@ f2 RHS fn evals = 1600003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 3.125e-05 Tf: 50 nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000007355181, L(p,q)-L0 = -0.0000000000000266 +t = 50.0000, H(p,q)-H0 = 0.0000000007355567, L(p,q)-L0 = -0.0000000000000118 Current time = 50 Steps = 1600001 Step attempts = 1600001 @@ -196,6 +203,7 @@ f2 RHS fn evals = 3200003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 1.5625e-05 Tf: 50 @@ -223,6 +231,7 @@ f2 RHS fn evals = 6400001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 7.8125e-06 Tf: 50 @@ -245,4 +254,98 @@ f1 RHS fn evals = 12800001 f2 RHS fn evals = 12800001 Order of accuracy wrt solution: expected = 2, max = 2.0069, avg = 1.8941, overall = 1.9322 -Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0006, avg = 1.9998, overall = 1.9999 +Order of accuracy wrt Hamiltonian: expec +================================================================= +==3464==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48a6006c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 + #3 0x7fae48a60406 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48a9dbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fae48ab4657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48a9dbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fae48ab4657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48a9dbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fae48ab4657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48a9dbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fae48ab4657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48ab49af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48ab49af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48ab46ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48ab46ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 16 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48a60149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 + #3 0x7fae48a60406 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 16 byte(s) in 1 object(s) allocated from: + #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fae48a601af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 + #3 0x7fae48a60406 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1112 byte(s) leaked in 11 allocation(s). diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out index f436abc375..2d2ce1c52e 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out @@ -1,248 +1,95 @@ - Begin Kepler Problem - -Problem Arguments: - stepper: 1 - step mode: 0 - use compensated sums: 0 - dt: 0.001 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 -Current time = 50 -Steps = 50001 -Step attempts = 50001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.001 -Last step size = 2.582822844487962e-11 -Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 -Implicit RHS fn evals = 0 -NLS iters = 0 -NLS fails = 0 -NLS iters per step = 0 -LS setups = 0 - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.1 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0008988103468988, L(p,q)-L0 = 0.0000000000000000 -Current time = 50 -Steps = 500 -Step attempts = 500 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0999999999995608 -Current step size = 0.0999999999995608 -f1 RHS fn evals = 1501 -f2 RHS fn evals = 1501 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.05 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0001201209616173, L(p,q)-L0 = 0.0000000000000011 -Current time = 50 -Steps = 1000 -Step attempts = 1000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.05 -Last step size = 0.05 -Current step size = 0.05 -f1 RHS fn evals = 3001 -f2 RHS fn evals = 3001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.025 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000134060753418, L(p,q)-L0 = 0.0000000000000016 -Current time = 50 -Steps = 2001 -Step attempts = 2001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.025 -Last step size = 1.769251412042648e-12 -Current step size = 1.769251412042648e-12 -f1 RHS fn evals = 6004 -f2 RHS fn evals = 6004 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000015483046323, L(p,q)-L0 = -0.0000000000000001 -Current time = 50 -Steps = 4000 -Step attempts = 4000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0125 -Last step size = 0.01249999999719619 -Current step size = 0.01249999999719619 -f1 RHS fn evals = 12001 -f2 RHS fn evals = 12001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000001852911622, L(p,q)-L0 = -0.0000000000000074 -Current time = 50 -Steps = 8000 -Step attempts = 8000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00625 -Last step size = 0.006249999992917305 -Current step size = 0.006249999992917305 -f1 RHS fn evals = 24001 -f2 RHS fn evals = 24001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.003125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000226418211, L(p,q)-L0 = 0.0000000000000095 -Current time = 50 -Steps = 16001 -Step attempts = 16001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.003125 -Last step size = 1.124078607972478e-11 -Current step size = 1.124078607972478e-11 -f1 RHS fn evals = 48004 -f2 RHS fn evals = 48004 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0015625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000027976583, L(p,q)-L0 = 0.0000000000000058 -Current time = 50 -Steps = 32001 -Step attempts = 32001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0015625 -Last step size = 2.835776058418557e-11 -Current step size = 2.835776058418557e-11 -f1 RHS fn evals = 96004 -f2 RHS fn evals = 96004 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00078125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000003476901, L(p,q)-L0 = 0.0000000000000044 -Current time = 50 -Steps = 64000 -Step attempts = 64000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00078125 -Last step size = 0.0007812499550681189 -Current step size = 0.0007812499550681189 -f1 RHS fn evals = 192001 -f2 RHS fn evals = 192001 - -Order of accuracy wrt solution: expected = 3, max = 3.9687, avg = 3.7856, overall = 3.8203 -Order of accuracy wrt Hamiltonian: expected = 3, max = 3.1635, avg = 3.0431, overall = 3.0566 +================================================================= +==4612==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb16917abd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fb169191657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb16913d06c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 + #3 0x7fb16913d43f in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb16917abd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fb169191657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb16917abf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fb169191657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb16917abf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fb169191657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb1691919af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb1691919af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb16913d1af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 + #3 0x7fb16913d43f in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb16913d149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 + #3 0x7fb16913d43f in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb1691916ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fb1691916ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1128 byte(s) leaked in 11 allocation(s). diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out index c75150efa9..aedb664b3c 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out @@ -1,248 +1,95 @@ - Begin Kepler Problem - -Problem Arguments: - stepper: 1 - step mode: 0 - use compensated sums: 0 - dt: 0.001 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 -Current time = 50 -Steps = 50001 -Step attempts = 50001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.001 -Last step size = 2.582822844487962e-11 -Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 -Implicit RHS fn evals = 0 -NLS iters = 0 -NLS fails = 0 -NLS iters per step = 0 -LS setups = 0 - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.1 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000053723049984, L(p,q)-L0 = 0.0000000000000000 -Current time = 50 -Steps = 500 -Step attempts = 500 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0999999999995608 -Current step size = 0.0999999999995608 -f1 RHS fn evals = 2001 -f2 RHS fn evals = 2001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.05 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000002776461714, L(p,q)-L0 = -0.0000000000000049 -Current time = 50 -Steps = 1000 -Step attempts = 1000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.05 -Last step size = 0.05 -Current step size = 0.05 -f1 RHS fn evals = 4001 -f2 RHS fn evals = 4001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.025 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000172503238, L(p,q)-L0 = 0.0000000000000007 -Current time = 50 -Steps = 2001 -Step attempts = 2001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.025 -Last step size = 1.769251412042648e-12 -Current step size = 1.769251412042648e-12 -f1 RHS fn evals = 8005 -f2 RHS fn evals = 8005 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000010987309, L(p,q)-L0 = -0.0000000000000046 -Current time = 50 -Steps = 4000 -Step attempts = 4000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0125 -Last step size = 0.01249999999719619 -Current step size = 0.01249999999719619 -f1 RHS fn evals = 16001 -f2 RHS fn evals = 16001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000697067, L(p,q)-L0 = -0.0000000000000075 -Current time = 50 -Steps = 8000 -Step attempts = 8000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00625 -Last step size = 0.006249999992917305 -Current step size = 0.006249999992917305 -f1 RHS fn evals = 32001 -f2 RHS fn evals = 32001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.003125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000044091, L(p,q)-L0 = -0.0000000000000122 -Current time = 50 -Steps = 16001 -Step attempts = 16001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.003125 -Last step size = 1.124078607972478e-11 -Current step size = 1.124078607972478e-11 -f1 RHS fn evals = 64005 -f2 RHS fn evals = 64005 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0015625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002849, L(p,q)-L0 = 0.0000000000000119 -Current time = 50 -Steps = 32001 -Step attempts = 32001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0015625 -Last step size = 2.835776058418557e-11 -Current step size = 2.835776058418557e-11 -f1 RHS fn evals = 128005 -f2 RHS fn evals = 128005 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00078125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000000451, L(p,q)-L0 = -0.0000000000000351 -Current time = 50 -Steps = 64000 -Step attempts = 64000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00078125 -Last step size = 0.0007812499550681189 -Current step size = 0.0007812499550681189 -f1 RHS fn evals = 256001 -f2 RHS fn evals = 256001 - -Order of accuracy wrt solution: expected = 4, max = 3.9974, avg = 3.5943, overall = 3.7564 -Order of accuracy wrt Hamiltonian: expected = 4, max = 4.2742, avg = 3.8327, overall = 3.8935 +================================================================= +==4658==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe6bd06c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 + #3 0x7f06fe6bd478 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe6fabd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7f06fe711657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe6fabd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7f06fe711657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe6fabf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7f06fe711657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe6fabf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7f06fe711657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe6bd1af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 + #3 0x7f06fe6bd478 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe7119af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe6bd149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 + #3 0x7f06fe6bd478 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe7119af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe7116ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7f06fe7116ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1144 byte(s) leaked in 11 allocation(s). diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out index 362ed410b2..727c16e46b 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out @@ -1,248 +1,95 @@ - Begin Kepler Problem - -Problem Arguments: - stepper: 1 - step mode: 0 - use compensated sums: 0 - dt: 0.001 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 -Current time = 50 -Steps = 50001 -Step attempts = 50001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.001 -Last step size = 2.582822844487962e-11 -Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 -Implicit RHS fn evals = 0 -NLS iters = 0 -NLS fails = 0 -NLS iters per step = 0 -LS setups = 0 - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.1 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000075734793938, L(p,q)-L0 = 0.0000000000000011 -Current time = 50 -Steps = 500 -Step attempts = 500 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0999999999995608 -Current step size = 0.0999999999995608 -f1 RHS fn evals = 3001 -f2 RHS fn evals = 3001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.05 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000001316623315, L(p,q)-L0 = -0.0000000000000020 -Current time = 50 -Steps = 1000 -Step attempts = 1000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.05 -Last step size = 0.05 -Current step size = 0.05 -f1 RHS fn evals = 6001 -f2 RHS fn evals = 6001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.025 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000022657438, L(p,q)-L0 = -0.0000000000000084 -Current time = 50 -Steps = 2001 -Step attempts = 2001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.025 -Last step size = 1.769251412042648e-12 -Current step size = 1.769251412042648e-12 -f1 RHS fn evals = 12007 -f2 RHS fn evals = 12007 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000000410620, L(p,q)-L0 = 0.0000000000000149 -Current time = 50 -Steps = 4000 -Step attempts = 4000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0125 -Last step size = 0.01249999999719619 -Current step size = 0.01249999999719619 -f1 RHS fn evals = 24001 -f2 RHS fn evals = 24001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000000008025, L(p,q)-L0 = -0.0000000000000031 -Current time = 50 -Steps = 8000 -Step attempts = 8000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00625 -Last step size = 0.006249999992917305 -Current step size = 0.006249999992917305 -f1 RHS fn evals = 48001 -f2 RHS fn evals = 48001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.003125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000000000415, L(p,q)-L0 = 0.0000000000000064 -Current time = 50 -Steps = 16001 -Step attempts = 16001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.003125 -Last step size = 1.124078607972478e-11 -Current step size = 1.124078607972478e-11 -f1 RHS fn evals = 96007 -f2 RHS fn evals = 96007 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0015625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000000000040, L(p,q)-L0 = 0.0000000000000299 -Current time = 50 -Steps = 32001 -Step attempts = 32001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0015625 -Last step size = 2.835776058418557e-11 -Current step size = 2.835776058418557e-11 -f1 RHS fn evals = 192007 -f2 RHS fn evals = 192007 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00078125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000000322, L(p,q)-L0 = 0.0000000000000026 -Current time = 50 -Steps = 64000 -Step attempts = 64000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00078125 -Last step size = 0.0007812499550681189 -Current step size = 0.0007812499550681189 -f1 RHS fn evals = 384001 -f2 RHS fn evals = 384001 - -Order of accuracy wrt solution: expected = 5, max = 5.9898, avg = 3.4143, overall = 3.7897 -Order of accuracy wrt Hamiltonian: expected = 5, max = 5.8607, avg = 3.9728, overall = 4.4335 +================================================================= +==4694==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe41168bbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fe4116a2657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe41168bbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fe4116a2657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe41164e06c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 + #3 0x7fe41164e4ea in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe41168bbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fe4116a2657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe41168bbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fe4116a2657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 48 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe41164e1af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 + #3 0x7fe41164e4ea in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 48 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe41164e149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 + #3 0x7fe41164e4ea in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe4116a29af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe4116a29af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe4116a26ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fe4116a26ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1176 byte(s) leaked in 11 allocation(s). diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out index 911ed979ef..bbe2200435 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -4,6 +4,7 @@ Problem Arguments: stepper: 1 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.001 Tf: 50 @@ -22,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400010 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -34,6 +35,7 @@ LS setups = 0 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.001 Tf: 50 @@ -61,6 +63,7 @@ f2 RHS fn evals = 100003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.0005 Tf: 50 @@ -88,6 +91,7 @@ f2 RHS fn evals = 200001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.00025 Tf: 50 @@ -115,6 +119,7 @@ f2 RHS fn evals = 400001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 0.000125 Tf: 50 @@ -142,13 +147,14 @@ f2 RHS fn evals = 800003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 6.25e-05 Tf: 50 nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000125303290, L(p,q)-L0 = -0.0000000000000203 +t = 50.0000, H(p,q)-H0 = 0.0000000125302173, L(p,q)-L0 = -0.0000000000000387 Current time = 50 Steps = 800001 Step attempts = 800001 @@ -169,13 +175,14 @@ f2 RHS fn evals = 1600003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 3.125e-05 Tf: 50 nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000031327123, L(p,q)-L0 = 0.0000000000001195 +t = 50.0000, H(p,q)-H0 = 0.0000000031327705, L(p,q)-L0 = 0.0000000000001050 Current time = 50 Steps = 1600001 Step attempts = 1600001 @@ -196,13 +203,14 @@ f2 RHS fn evals = 3200003 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 1.5625e-05 Tf: 50 nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000007827197, L(p,q)-L0 = -0.0000000000001815 +t = 50.0000, H(p,q)-H0 = 0.0000000007829746, L(p,q)-L0 = -0.0000000000000927 Current time = 50 Steps = 3200000 Step attempts = 3200000 @@ -223,6 +231,7 @@ f2 RHS fn evals = 6400001 Problem Arguments: stepper: 0 step mode: 0 + use tstop: 1 use compensated sums: 0 dt: 7.8125e-06 Tf: 50 @@ -245,4 +254,98 @@ f1 RHS fn evals = 12800001 f2 RHS fn evals = 12800001 Order of accuracy wrt solution: expected = 2, max = 2.0019, avg = 1.9630, overall = 1.9766 -Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0012, avg = 2.0000, overall = 2.0001 +Order of accuracy wrt Hamiltonian: expec +================================================================= +==2728==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4272b506c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 + #3 0x7ff4272b5394 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4272f2bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7ff427309657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4272f2bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7ff427309657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4272f2bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7ff427309657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4272f2bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7ff427309657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4273099af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4273099af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4273096ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4273096ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 16 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4272b5149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 + #3 0x7ff4272b5394 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 16 byte(s) in 1 object(s) allocated from: + #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7ff4272b51af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 + #3 0x7ff4272b5394 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1112 byte(s) leaked in 11 allocation(s). diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out index 1c09b65d2b..286c42fc93 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out @@ -1,248 +1,95 @@ - Begin Kepler Problem - -Problem Arguments: - stepper: 1 - step mode: 0 - use compensated sums: 0 - dt: 0.001 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 -Current time = 50 -Steps = 50001 -Step attempts = 50001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.001 -Last step size = 2.582822844487962e-11 -Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 -Implicit RHS fn evals = 0 -NLS iters = 0 -NLS fails = 0 -NLS iters per step = 0 -LS setups = 0 - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.1 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0008915080580247, L(p,q)-L0 = 0.0000000000000026 -Current time = 50 -Steps = 500 -Step attempts = 500 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0999999999995608 -Current step size = 0.0999999999995608 -f1 RHS fn evals = 1501 -f2 RHS fn evals = 1501 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.05 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000402415167515, L(p,q)-L0 = -0.0000000000000002 -Current time = 50 -Steps = 1000 -Step attempts = 1000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.05 -Last step size = 0.05 -Current step size = 0.05 -f1 RHS fn evals = 3001 -f2 RHS fn evals = 3001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.025 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000011101319375, L(p,q)-L0 = 0.0000000000000000 -Current time = 50 -Steps = 2001 -Step attempts = 2001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.025 -Last step size = 1.769251412042648e-12 -Current step size = 1.769251412042648e-12 -f1 RHS fn evals = 6004 -f2 RHS fn evals = 6004 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000001144882387, L(p,q)-L0 = -0.0000000000000033 -Current time = 50 -Steps = 4000 -Step attempts = 4000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0125 -Last step size = 0.01249999999719619 -Current step size = 0.01249999999719619 -f1 RHS fn evals = 12001 -f2 RHS fn evals = 12001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000302907841, L(p,q)-L0 = -0.0000000000000036 -Current time = 50 -Steps = 8000 -Step attempts = 8000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00625 -Last step size = 0.006249999992917305 -Current step size = 0.006249999992917305 -f1 RHS fn evals = 24001 -f2 RHS fn evals = 24001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.003125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000047862143, L(p,q)-L0 = -0.0000000000000104 -Current time = 50 -Steps = 16001 -Step attempts = 16001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.003125 -Last step size = 1.124078607972478e-11 -Current step size = 1.124078607972478e-11 -f1 RHS fn evals = 48004 -f2 RHS fn evals = 48004 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0015625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000006607368, L(p,q)-L0 = -0.0000000000000004 -Current time = 50 -Steps = 32001 -Step attempts = 32001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0015625 -Last step size = 2.835776058418557e-11 -Current step size = 2.835776058418557e-11 -f1 RHS fn evals = 96004 -f2 RHS fn evals = 96004 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00078125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000864309, L(p,q)-L0 = 0.0000000000000455 -Current time = 50 -Steps = 64000 -Step attempts = 64000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00078125 -Last step size = 0.0007812499550681189 -Current step size = 0.0007812499550681189 -f1 RHS fn evals = 192001 -f2 RHS fn evals = 192001 - -Order of accuracy wrt solution: expected = 3, max = 4.0232, avg = 3.9269, overall = 3.9563 -Order of accuracy wrt Hamiltonian: expected = 3, max = 5.1799, avg = 3.3283, overall = 3.1911 +================================================================= +==4510==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beb30bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fa9beb47657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beaf306c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 + #3 0x7fa9beaf33cd in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beb30bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fa9beb47657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beb30bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fa9beb47657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beb30bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fa9beb47657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beb479af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beb479af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beaf31af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 + #3 0x7fa9beaf33cd in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beaf3149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 + #3 0x7fa9beaf33cd in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beb476ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fa9beb476ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1128 byte(s) leaked in 11 allocation(s). diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out index a9354de318..a5c80f805d 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out @@ -1,248 +1,95 @@ - Begin Kepler Problem - -Problem Arguments: - stepper: 1 - step mode: 0 - use compensated sums: 0 - dt: 0.001 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 -Current time = 50 -Steps = 50001 -Step attempts = 50001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.001 -Last step size = 2.582822844487962e-11 -Current step size = 2.582822844487962e-11 -Explicit RHS fn evals = 400009 -Implicit RHS fn evals = 0 -NLS iters = 0 -NLS fails = 0 -NLS iters per step = 0 -LS setups = 0 - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.1 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0001268118227700, L(p,q)-L0 = 0.0000000000000011 -Current time = 50 -Steps = 500 -Step attempts = 500 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0999999999995608 -Current step size = 0.0999999999995608 -f1 RHS fn evals = 4001 -f2 RHS fn evals = 4001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.05 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000020266123610, L(p,q)-L0 = -0.0000000000000016 -Current time = 50 -Steps = 1000 -Step attempts = 1000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.05 -Last step size = 0.05 -Current step size = 0.05 -f1 RHS fn evals = 8001 -f2 RHS fn evals = 8001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.025 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000319247493, L(p,q)-L0 = 0.0000000000000007 -Current time = 50 -Steps = 2001 -Step attempts = 2001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.025 -Last step size = 1.769251412042648e-12 -Current step size = 1.769251412042648e-12 -f1 RHS fn evals = 16009 -f2 RHS fn evals = 16009 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000004998491, L(p,q)-L0 = 0.0000000000000067 -Current time = 50 -Steps = 4000 -Step attempts = 4000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0125 -Last step size = 0.01249999999719619 -Current step size = 0.01249999999719619 -f1 RHS fn evals = 32001 -f2 RHS fn evals = 32001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000000078000, L(p,q)-L0 = 0.0000000000000017 -Current time = 50 -Steps = 8000 -Step attempts = 8000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00625 -Last step size = 0.006249999992917305 -Current step size = 0.006249999992917305 -f1 RHS fn evals = 64001 -f2 RHS fn evals = 64001 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.003125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000000001414, L(p,q)-L0 = 0.0000000000000111 -Current time = 50 -Steps = 16001 -Step attempts = 16001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.003125 -Last step size = 1.124078607972478e-11 -Current step size = 1.124078607972478e-11 -f1 RHS fn evals = 128009 -f2 RHS fn evals = 128009 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.0015625 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000000000688, L(p,q)-L0 = 0.0000000000000301 -Current time = 50 -Steps = 32001 -Step attempts = 32001 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.0015625 -Last step size = 2.835776058418557e-11 -Current step size = 2.835776058418557e-11 -f1 RHS fn evals = 256009 -f2 RHS fn evals = 256009 - - - Begin Kepler Problem - -Problem Arguments: - stepper: 0 - step mode: 0 - use compensated sums: 0 - dt: 0.00078125 - Tf: 50 - nout: 1 - -t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000000788, L(p,q)-L0 = -0.0000000000000033 -Current time = 50 -Steps = 64000 -Step attempts = 64000 -Stability limited steps = 0 -Accuracy limited steps = 0 -Error test fails = 0 -NLS step fails = 0 -Inequality constraint fails = 0 -Initial step size = 0.00078125 -Last step size = 0.0007812499550681189 -Current step size = 0.0007812499550681189 -f1 RHS fn evals = 512001 -f2 RHS fn evals = 512001 - -Order of accuracy wrt solution: expected = 6, max = 5.9958, avg = 3.9922, overall = 4.4514 -Order of accuracy wrt Hamiltonian: expected = 6, max = 6.0019, avg = 4.3690, overall = 4.7321 +================================================================= +==4746==ERROR: LeakSanitizer: detected memory leaks + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448b0bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fbc448c7657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448b0bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 + #2 0x7fbc448c7657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Direct leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc4487306c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 + #3 0x7fbc44873523 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448b0bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fbc448c7657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #6 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 448 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448b0bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 + #2 0x7fbc448c7657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 + #3 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #4 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #6 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 64 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448731af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 + #3 0x7fbc44873523 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 64 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc44873149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 + #3 0x7fbc44873523 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 + #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 + #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448c79af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #4 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 32 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448c79af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 + #2 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #4 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448c76ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 + #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +Indirect leak of 24 byte(s) in 1 object(s) allocated from: + #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 + #1 0x7fbc448c76ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 + #2 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 + #3 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 + #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 + #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) + +SUMMARY: AddressSanitizer: 1208 byte(s) leaked in 11 allocation(s). From a780a4f3c5ac1d5f0394af1de778b5589526a997 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jul 2023 12:31:20 -0700 Subject: [PATCH 132/177] address many PR comments --- doc/arkode/guide/source/Butcher.rst | 359 ++++++------- doc/arkode/guide/source/Introduction.rst | 6 +- doc/arkode/guide/source/Mathematics.rst | 21 +- .../Usage/SPRKStep_c_interface/Skeleton.rst | 26 +- .../Usage/SPRKStep_c_interface/index.rst | 3 +- .../C_serial/ark_damped_harmonic_symplectic.c | 142 +----- .../C_serial/ark_damped_harmonic_symplectic.h | 148 ++++++ .../arkode/C_serial/ark_harmonic_symplectic.c | 134 +---- .../arkode/C_serial/ark_harmonic_symplectic.h | 147 ++++++ examples/arkode/C_serial/ark_kepler.c | 481 +++++------------- examples/arkode/C_serial/ark_kepler.h | 226 ++++++++ examples/arkode/C_serial/ark_kepler_plot.py | 2 +- include/arkode/arkode_sprkstep.h | 8 +- scripts/arkode | 3 + src/arkode/arkode.c | 14 +- src/arkode/arkode_sprk.c | 233 +++++---- src/arkode/arkode_sprkstep.c | 104 ++-- src/arkode/arkode_sprkstep_impl.h | 11 +- src/arkode/arkode_sprkstep_io.c | 4 +- src/sundials/sundials_utils.h | 11 + 20 files changed, 1091 insertions(+), 992 deletions(-) create mode 100644 examples/arkode/C_serial/ark_damped_harmonic_symplectic.h create mode 100644 examples/arkode/C_serial/ark_harmonic_symplectic.h create mode 100644 examples/arkode/C_serial/ark_kepler.h diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 9b67064bf8..64aa168dc3 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -19,7 +19,8 @@ Appendix: Butcher tables ========================= Here we catalog the full set of Butcher tables included in ARKODE. We group -these into four categories: *explicit*, *implicit*, *additive* and *symplectic*. +these into four categories: *explicit*, *implicit*, *additive* and +*symplectic partitioned*. However, since the methods that comprise an additive Runge--Kutta method are themselves explicit and implicit, their component Butcher tables are listed within their separate sections, but are referenced together in the additive @@ -63,11 +64,11 @@ where here For methods without an embedding (e.g., fixed-step methods) ``P`` is omitted so that methods follow the naming convention ``NAME-S-Q``. -For symplectic methods, the naming convention is ``NAME-SYMPLECTIC-S-Q``. +For SPRK methods, the naming convention is ``SPRK-NAME-S-Q``. In the code, unique integer IDs are defined inside ``arkode_butcher_erk.h`` and ``arkode_butcher_dirk.h`` for each method, which may be used by calling routines -to specify the desired method. Symplectic methods are defined inside ``arkode_sprk.h``. +to specify the desired method. SPRK methods are defined inside ``arkode_sprk.h``. These names are specified in ``fixed width font`` at the start of each method's section below. @@ -157,11 +158,11 @@ Heun-Euler-2-1-2 .. index:: Heun-Euler-2-1-2 ERK method Accessible via the constant ``ARKODE_HEUN_EULER_2_1_2`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_HEUN_EULER_2_1_2"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the default 2nd order explicit method. .. math:: @@ -191,11 +192,11 @@ ARK2-ERK-3-1-2 .. index:: ARK2-ERK-3-1-2 Accessible via the constant ``ARKODE_ARK2_ERK_3_1_2`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_ARK2_ERK_3_1_2"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the explicit portion of the default 2nd order additive method (the explicit portion of the ARK2 method from :cite:p:`giraldo2013implicit`). @@ -227,11 +228,11 @@ Bogacki-Shampine-4-2-3 .. index:: Bogacki-Shampine-4-2-3 ERK method Accessible via the constant ``ARKODE_BOGACKI_SHAMPINE_4_2_3`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_BOGACKI_SHAMPINE_4_2_3"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the default 3rd order explicit method (from :cite:p:`Bogacki:89`). @@ -266,11 +267,11 @@ ARK324L2SA-ERK-4-2-3 .. index:: ARK324L2SA-ERK-4-2-3 method Accessible via the constant ``ARKODE_ARK324L2SA_ERK_4_2_3`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_ARK324L2SA_ERK_4_2_3"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the explicit portion of the default 3rd order additive method (the explicit portion of the ARK3(2)4L[2]SA method from :cite:p:`KenCarp:03`). @@ -305,10 +306,10 @@ Knoth-Wolke-3-3 .. index:: Knoth-Wolke-3-3 ERK method Accessible via the constant ``ARKODE_KNOTH_WOLKE_3_3`` to -:c:func:`MRIStepSetMRITableNum()` or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`MRIStepSetMRITableNum` or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_KNOTH_WOLKE_3_3"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the default 3th order slow and fast MRIStep method (from :cite:p:`KnWo:98`). @@ -339,11 +340,11 @@ Zonneveld-5-3-4 .. index:: Zonneveld-5-3-4 ERK method Accessible via the constant ``ARKODE_ZONNEVELD_5_3_4`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_ZONNEVELD_5_3_4"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the default 4th order explicit method (from :cite:p:`Zon:63`). @@ -380,11 +381,11 @@ ARK436L2SA-ERK-6-3-4 .. index:: ARK436L2SA-ERK-6-3-4 method Accessible via the constant ``ARKODE_ARK436L2SA_ERK_6_3_4`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_ARK436L2SA_ERK_6_3_4"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the explicit portion of the default 4th order additive method (the explicit portion of the ARK4(3)6L[2]SA method from :cite:p:`KenCarp:03`). @@ -421,11 +422,11 @@ ARK437L2SA-ERK-7-3-4 .. index:: ARK437L2SA-ERK-7-3-4 method Accessible via the constant ``ARKODE_ARK437L2SA_ERK_7_3_4`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_ARK437L2SA_ERK_7_3_4"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the explicit portion of the 4th order additive method (the explicit portion of the ARK4(3)7L[2]SA method from :cite:p:`KenCarp:19`). @@ -463,11 +464,11 @@ Sayfy-Aburub-6-3-4 .. index:: Sayfy-Aburub-6-3-4 ERK method Accessible via the constant ``ARKODE_SAYFY_ABURUB_6_3_4`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_SAYFY_ABURUB_6_3_4"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. (from :cite:p:`Sayfy:02`). .. math:: @@ -504,11 +505,11 @@ Cash-Karp-6-4-5 .. index:: Cash-Karp-6-4-5 ERK method Accessible via the constant ``ARKODE_CASH_KARP_6_4_5`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_CASH_KARP_6_4_5"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the default 5th order explicit method (from :cite:p:`CashKarp:90`). .. math:: @@ -547,11 +548,11 @@ Fehlberg-6-4-5 .. index:: Fehlberg-6-4-5 ERK method Accessible via the constant ``ARKODE_FEHLBERG_6_4_5`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_FEHLBERG_6_4_5"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. (from :cite:p:`Fehlberg:69`). .. math:: @@ -588,11 +589,11 @@ Dormand-Prince-7-4-5 .. index:: Dormand-Prince-7-4-5 ERK method Accessible via the constant ``ARKODE_DORMAND_PRINCE_7_4_5`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_DORMAND_PRINCE_7_4_5"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. (from :cite:p:`DorPri:80`). .. math:: @@ -630,11 +631,11 @@ ARK548L2SA-ERK-8-4-5 .. index:: ARK548L2SA-ERK-8-4-5 method Accessible via the constant ``ARKODE_ARK548L2SA_ERK_8_4_5`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_ARK548L2SA_ERK_8_4_5"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the explicit portion of the default 5th order additive method (the explicit portion of the ARK5(4)8L[2]SA method from :cite:p:`KenCarp:03`). @@ -675,11 +676,11 @@ ARK548L2SAb-ERK-8-4-5 .. index:: ARK548L2SAb-ERK-8-4-5 method Accessible via the constant ``ARKODE_ARK548L2SAb_ERK_8_4_5`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_ARK548L2SAb_ERK_8_4_5"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the explicit portion of the 5th order ARK5(4)8L[2]SA method from :cite:p:`KenCarp:19`. @@ -719,11 +720,11 @@ Verner-8-5-6 .. index:: Verner-8-5-6 ERK method Accessible via the constant ``ARKODE_VERNER_8_5_6`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_VERNER_8_5_6"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the default 6th order explicit method (from :cite:p:`Ver:78`). .. math:: @@ -760,11 +761,11 @@ Fehlberg-13-7-8 .. index:: Fehlberg-13-7-8 ERK method Accessible via the constant ``ARKODE_FEHLBERG_13_7_8`` to -:c:func:`ARKStepSetTableNum()`, :c:func:`ERKStepSetTableNum()` -or :c:func:`ARKodeButcherTable_LoadERK()`. +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. Accessible via the string ``"ARKODE_FEHLBERG_13_7_8"`` to -:c:func:`ARKStepSetTableName()`, :c:func:`ERKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadERKByName()`. +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. This is the default 8th order explicit method (from :cite:p:`Butcher:08`). .. math:: @@ -827,11 +828,11 @@ SDIRK-2-1-2 .. index:: SDIRK-2-1-2 method Accessible via the constant ``ARKODE_SDIRK_2_1_2`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_SDIRK_2_1_2"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the default 2nd order implicit method. Both the method and embedding are A- and B-stable. @@ -862,11 +863,11 @@ ARK2-DIRK-3-1-2 .. index:: ARK2-DIRK-3-1-2 Accessible via the constant ``ARKODE_ARK2_DIRK_3_1_2`` to -:c:func:`ARKStepSetTableNum()`, or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum`, or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ARK2_DIRK_3_1_2"`` to -:c:func:`ARKStepSetTableName()`, or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName`, or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the implicit portion of the default 2nd order additive method (the implicit portion of the ARK2 method from :cite:p:`giraldo2013implicit`). @@ -898,11 +899,11 @@ Billington-3-3-2 .. index:: Billington-3-3-2 SDIRK method Accessible via the constant ``ARKODE_BILLINGTON_3_3_2`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_BILLINGTON_3_3_2"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. Here, the higher-order embedding is less stable than the lower-order method (from :cite:p:`Billington:83`). @@ -938,11 +939,11 @@ TRBDF2-3-3-2 .. index:: TRBDF2-3-3-2 ESDIRK method Accessible via the constant ``ARKODE_TRBDF2_3_3_2`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_TRBDF2_3_3_2"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. As with Billington, here the higher-order embedding is less stable than the lower-order method (from :cite:p:`Bank:85`). @@ -978,11 +979,11 @@ Kvaerno-4-2-3 .. index:: Kvaerno-4-2-3 ESDIRK method Accessible via the constant ``ARKODE_KVAERNO_4_2_3`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_KVAERNO_4_2_3"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. Both the method and embedding are A-stable; additionally the method is L-stable (from :cite:p:`Kva:04`). @@ -1019,11 +1020,11 @@ ARK324L2SA-DIRK-4-2-3 .. index:: ARK324L2SA-DIRK-4-2-3 method Accessible via the constant ``ARKODE_ARK324L2SA_DIRK_4_2_3`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ARK324L2SA_DIRK_4_2_3"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the default 3rd order implicit method, and the implicit portion of the default 3rd order additive method. Both the method and embedding are A-stable; additionally the method is L-stable (this is the implicit portion of the @@ -1063,11 +1064,11 @@ Cash-5-2-4 .. index:: Cash-5-2-4 SDIRK method Accessible via the constant ``ARKODE_CASH_5_2_4`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_CASH_5_2_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. Both the method and embedding are A-stable; additionally the method is L-stable (from :cite:p:`Cash:79`). @@ -1105,11 +1106,11 @@ Cash-5-3-4 .. index:: Cash-5-3-4 SDIRK method Accessible via the constant ``ARKODE_CASH_5_3_4`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_CASH_5_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. Both the method and embedding are A-stable; additionally the method is L-stable (from :cite:p:`Cash:79`). @@ -1146,11 +1147,11 @@ SDIRK-5-3-4 .. index:: SDIRK-5-3-4 method Accessible via the constant ``ARKODE_SDIRK_5_3_4`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_SDIRK_5_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the default 4th order implicit method. Here, the method is both A- and L-stable, although the embedding has reduced stability (from :cite:p:`HaWa:91`). @@ -1191,11 +1192,11 @@ Kvaerno-5-3-4 .. index:: Kvaerno-5-3-4 ESDIRK method Accessible via the constant ``ARKODE_KVAERNO_5_3_4`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_KVAERNO_5_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. Both the method and embedding are A-stable (from :cite:p:`Kva:04`). .. math:: @@ -1232,11 +1233,11 @@ ARK436L2SA-DIRK-6-3-4 .. index:: ARK436L2SA-DIRK-6-3-4 method Accessible via the constant ``ARKODE_ARK436L2SA_DIRK_6_3_4`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ARK436L2SA_DIRK_6_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the implicit portion of the default 4th order additive method. Both the method and embedding are A-stable; additionally the method is L-stable (this is the implicit portion of the ARK4(3)6L[2]SA method from :cite:p:`KenCarp:03`). @@ -1276,11 +1277,11 @@ ARK437L2SA-DIRK-7-3-4 .. index:: ARK437L2SA-DIRK-7-3-4 method Accessible via the constant ``ARKODE_ARK437L2SA_DIRK_7_3_4`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ARK437L2SA_DIRK_7_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the implicit portion of the 4th order ARK4(3)7L[2]SA method from :cite:p:`KenCarp:19`. Both the method and embedding are A- and L-stable. @@ -1320,11 +1321,11 @@ Kvaerno-7-4-5 .. index:: Kvaerno-7-4-5 ESDIRK method Accessible via the constant ``ARKODE_KVAERNO_7_4_5`` to -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_KVAERNO_7_4_5"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. Both the method and embedding are A-stable; additionally the method is L-stable (from :cite:p:`Kva:04`). @@ -1365,11 +1366,11 @@ ARK548L2SA-ESDIRK-8-4-5 .. index:: ARK548L2SA-ESDIRK-8-4-5 method Accessible via the constant ``ARKODE_ARK548L2SA_DIRK_8_4_5`` for -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ARK548L2SA_DIRK_8_4_5"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the default 5th order implicit method, and the implicit portion of the default 5th order additive method. Both the method and embedding are A-stable; additionally the method is L-stable (the implicit portion of the ARK5(4)8L[2]SA @@ -1410,11 +1411,11 @@ ARK548L2SAb-DIRK-8-4-5 .. index:: ARK548L2SAb-DIRK-8-4-5 method Accessible via the constant ``ARKODE_ARK548L2SAb_DIRK_8_4_5`` for -:c:func:`ARKStepSetTableNum()` or -:c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ARK548L2SAb_DIRK_8_4_5"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. Both the method and embedding are A-stable; additionally the method is L-stable (this is the implicit portion of the 5th order ARK5(4)8L[2]SA method from :cite:p:`KenCarp:19`). @@ -1454,10 +1455,10 @@ ESDIRK324L2SA-4-2-3 .. index:: ESDIRK324L2SA-4-2-3 method Accessible via the constant ``ARKODE_ESDIRK324L2SA_4_2_3`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ESDIRK324L2SA_4_2_3"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the ESDIRK3(2)4L[2]SA method from :cite:p:`KenCarp:19b`. Both the method and embedding are A- and L-stable. @@ -1478,10 +1479,10 @@ ESDIRK325L2SA-5-2-3 .. index:: ESDIRK325L2SA-5-2-3 method Accessible via the constant ``ARKODE_ESDIRK325L2SA_5_2_3`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ESDIRK325L2SA_5_2_3"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the ESDIRK3(2)5L[2]SA method from :cite:p:`KenCarp:16`. Both the method and embedding are A- and L-stable. @@ -1502,10 +1503,10 @@ ESDIRK32I5L2SA-5-2-3 .. index:: ESDIRK32I5L2SA-5-2-3 method Accessible via the constant ``ARKODE_ESDIRK32I5L2SA_5_2_3`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ESDIRK32I5L2SA_5_2_3"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the ESDIRK3(2I)5L[2]SA method from :cite:p:`KenCarp:16`. Both the method and embedding are A- and L-stable. @@ -1525,10 +1526,10 @@ ESDIRK436L2SA-6-3-4 .. index:: ESDIRK436L2SA-6-3-4 method Accessible via the constant ``ARKODE_ESDIRK436L2SA_6_3_4`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ESDIRK436L2SA_6_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the ESDIRK4(3)6L[2]SA method from :cite:p:`KenCarp:16`. Both the method and embedding are A- and L-stable. @@ -1548,10 +1549,10 @@ ESDIRK43I6L2SA-6-3-4 .. index:: ESDIRK43I6L2SA-6-3-4 method Accessible via the constant ``ARKODE_ESDIRK43I6L2SA_6_3_4`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ESDIRK43I6L2SA_6_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the ESDIRK4(3I)6L[2]SA method from :cite:p:`KenCarp:16`. Both the method and embedding are A- and L-stable. @@ -1571,10 +1572,10 @@ QESDIRK436L2SA-6-3-4 .. index:: QESDIRK436L2SA-6-3-4 method Accessible via the constant ``ARKODE_QESDIRK436L2SA_6_3_4`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_QESDIRK436L2SA_6_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the QESDIRK4(3)6L[2]SA method from :cite:p:`KenCarp:16`. Both the method and embedding are A- and L-stable. @@ -1594,10 +1595,10 @@ ESDIRK437L2SA-7-3-4 .. index:: ESDIRK437L2SA-7-3-4 method Accessible via the constant ``ARKODE_ESDIRK437L2SA_7_3_4`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ESDIRK437L2SA_7_3_4"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the ESDIRK4(3)7L[2]SA method from :cite:p:`KenCarp:19b`. Both the method and embedding are A- and L-stable. @@ -1617,10 +1618,10 @@ ESDIRK547L2SA-7-4-5 .. index:: ESDIRK547L2SA-7-4-5 method Accessible via the constant ``ARKODE_ESDIRK547L2SA_7_4_5`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ESDIRK547L2SA_7_4_5"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the ESDIRK5(4)7L[2]SA method from :cite:p:`KenCarp:16`. Both the method and embedding are A- and L-stable. @@ -1640,10 +1641,10 @@ ESDIRK547L2SA2-7-4-5 .. index:: ESDIRK547L2SA2-7-4-5 method Accessible via the constant ``ARKODE_ESDIRK547L2SA2_7_4_5`` to -:c:func:`ARKStepSetTableNum()` or :c:func:`ARKodeButcherTable_LoadDIRK()`. +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. Accessible via the string ``"ARKODE_ESDIRK547L2SA2_7_4_5"`` to -:c:func:`ARKStepSetTableName()` or -:c:func:`ARKodeButcherTable_LoadDIRKByName()`. +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. This is the ESDIRK5(4)7L[2]SA2 method from :cite:p:`KenCarp:19b`. Both the method and embedding are A- and L-stable. @@ -1670,46 +1671,46 @@ Butcher table pairs are as follows: * :index:`2nd-order pair `: :numref:`Butcher.ARK2_ERK` with :numref:`Butcher.ARK2_DIRK`, corresponding to Butcher tables ``ARKODE_ARK2_ERK_3_1_2`` and - ``ARKODE_ARK2_DIRK_3_1_2`` for :c:func:`ARKStepSetTableNum()` - or :c:func:`ARKStepSetTableName()`. + ``ARKODE_ARK2_DIRK_3_1_2`` for :c:func:`ARKStepSetTableNum` + or :c:func:`ARKStepSetTableName`. * :index:`3rd-order pair `: :numref:`Butcher.ARK_4_2_3_E` with :numref:`Butcher.ARK_4_2_3_I`, corresponding to Butcher tables ``ARKODE_ARK324L2SA_ERK_4_2_3`` and - ``ARKODE_ARK324L2SA_DIRK_4_2_3`` for :c:func:`ARKStepSetTableNum()` - or :c:func:`ARKStepSetTableName()`. + ``ARKODE_ARK324L2SA_DIRK_4_2_3`` for :c:func:`ARKStepSetTableNum` + or :c:func:`ARKStepSetTableName`. * :index:`4th-order pair `: :numref:`Butcher.ARK_6_3_4_E` with :numref:`Butcher.ARK_6_3_4_I`, corresponding to Butcher tables ``ARKODE_ARK436L2SA_ERK_6_3_4`` and - ``ARKODE_ARK436L2SA_DIRK_6_3_4`` for :c:func:`ARKStepSetTableNum()` - or :c:func:`ARKStepSetTableName()`. + ``ARKODE_ARK436L2SA_DIRK_6_3_4`` for :c:func:`ARKStepSetTableNum` + or :c:func:`ARKStepSetTableName`. * :index:`4th-order pair `: :numref:`Butcher.ARK_7_3_4_E` with :numref:`Butcher.ARK_7_3_4_I`, corresponding to Butcher tables ``ARKODE_ARK437L2SA_ERK_7_3_4`` and - ``ARKODE_ARK437L2SA_DIRK_7_3_4`` for :c:func:`ARKStepSetTableNum()` - or :c:func:`ARKStepSetTableName()`. + ``ARKODE_ARK437L2SA_DIRK_7_3_4`` for :c:func:`ARKStepSetTableNum` + or :c:func:`ARKStepSetTableName`. * :index:`5th-order pair `: :numref:`Butcher.ARK_8_4_5_E` with :numref:`Butcher.ARK_8_4_5_I`, corresponding to Butcher tables ``ARKODE_ARK548L2SA_ERK_8_4_5`` and - ``ARKODE_ARK548L2SA_ERK_8_4_5`` for :c:func:`ARKStepSetTableNum()` - or :c:func:`ARKStepSetTableName()`. + ``ARKODE_ARK548L2SA_ERK_8_4_5`` for :c:func:`ARKStepSetTableNum` + or :c:func:`ARKStepSetTableName`. * :index:`5th-order pair `: :numref:`Butcher.ARK_8_4_5b_E` with :numref:`Butcher.ARK_8_4_5b_I`, corresponding to Butcher tables ``ARKODE_ARK548L2SAb_ERK_8_4_5`` and - ``ARKODE_ARK548L2SAb_ERK_8_4_5`` for :c:func:`ARKStepSetTableNum()` - or :c:func:`ARKStepSetTableName()`. + ``ARKODE_ARK548L2SAb_ERK_8_4_5`` for :c:func:`ARKStepSetTableNum` + or :c:func:`ARKStepSetTableName`. .. _Butcher.symplectic: -Symplectic Butcher tables ---------------------------- +Symplectic Partitioned Butcher tables +------------------------------------- ARKODE_SPRK_EULER_1_1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1717,7 +1718,7 @@ ARKODE_SPRK_EULER_1_1 .. index:: 1st-order symplectic Euler method Accessible via the constant ``ARKODE_SPRK_EULER_1_1`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Symplectic Euler method. @@ -1727,7 +1728,7 @@ ARKODE_SPRK_LEAPFROG_2_2 .. index:: 2nd-order Leapfrog method Accessible via the constant ``ARKODE_SPRK_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Leapfrog/Verlet method. @@ -1737,7 +1738,7 @@ ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 .. index:: 2nd-order Pseudo Leapfrog method Accessible via the constant ``ARKODE_SPRK_PSEUDO_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the classic Pseudo Leapfrog/Verlet method. @@ -1747,7 +1748,7 @@ ARKODE_SPRK_MCLACHLAN_2_2 .. index:: 2nd-order McLachlan method Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_2_2`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1757,7 +1758,7 @@ ARKODE_SPRK_RUTH_3_3 .. index:: 3rd-order Ruth method Accessible via the constant ``ARKODE_SPRK_RUTH_3_3`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. @@ -1767,7 +1768,7 @@ ARKODE_SPRK_MCLACHLAN_3_3 .. index:: 3rd-order McLachlan method Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_3_3`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1777,7 +1778,7 @@ ARKODE_SPRK_MCLACHLAN_4_4 .. index:: 4th-order McLachlan method Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_4_4`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. .. warning:: @@ -1791,7 +1792,7 @@ ARKODE_SPRK_CANDY_ROZMUS_4_4 .. index:: 4th-order Candy-Rozmus method Accessible via the constant ``ARKODE_SPRK_CANDY_ROZMUS_4_4`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. @@ -1801,7 +1802,7 @@ ARKODE_SPRK_MCLACHLAN_5_6 .. index:: 5th-order McLachlan method Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_5_6`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. .. warning:: @@ -1815,7 +1816,7 @@ ARKODE_SPRK_YOSHIDA_6_8 .. index:: 6th-order Yoshida method Accessible via the constant ``ARKODE_SPRK_YOSHIDA_6_8`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. @@ -1825,7 +1826,7 @@ ARKODE_SPRK_SUZUKI_UMENO_8_16 .. index:: 8th-order Suzuki-Umeno method Accessible via the constant ``ARKODE_SPRK_SUZUKI_UMENO_8_16`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 8th order method given by Suzuki and Umeno in :cite:p:`Suzuki:93`. @@ -1835,5 +1836,5 @@ ARKODE_SPRK_SOFRONIOU_10_36 .. index:: 10th-order Sofroniou-Spaletta method Accessible via the constant ``ARKODE_SPRK_SOFRONIOU_10_36`` to -:c:func:`ARKodeSPRKStorage_Load()` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. This is the 10th order method given by Sofroniou and Spaletta in :cite:p:`Sofroniou:05`. diff --git a/doc/arkode/guide/source/Introduction.rst b/doc/arkode/guide/source/Introduction.rst index e9231f7219..169431af69 100644 --- a/doc/arkode/guide/source/Introduction.rst +++ b/doc/arkode/guide/source/Introduction.rst @@ -82,11 +82,11 @@ with adaptive explicit methods of orders 2-8. *SPRKStep* focuses on Hamiltonian systems posed in the form, .. math:: - H(p, q, t) = T(p) + V(q, t) + H(t, p, q) = T(t, p) + V(t, q) .. math:: - \dot{p} = f_1(q,t) = \frac{\partial V(q,t)}{\partial q}, \quad - \dot{q} = f_2(p) = \frac{\partial T(p)}{\partial p}, + \dot{p} = f_1(t,q) = \frac{\partial V(t,q)}{\partial q}, \quad + \dot{q} = f_2(t,p) = \frac{\partial T(t,p)}{\partial p}, :label: ARKODE_ODE_hamiltonian allowing for conservation of quadratic invariants. diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 06b73d65fc..fa441d31fa 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -521,9 +521,9 @@ of Butcher tableau, \end{array}. We use a compact storage of these coefficients in terms of two arrays, one for -*a* and one for *b*. The time weights (which matter only for non-autonomous -systems) are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and -:math:`\hat{c}_j = \sum_{i=1}^j \hat{a}_i` respectively +*a* and one for *b*. The abscissae (only relevant for non-autonomous problems) +are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and +:math:`\hat{c}_j = \sum_{i=1}^j \hat{a}_i`, respectively :cite:p:`Jay:21,Diele:11`. These methods approximately conserve a nearby Hamiltonian for exponentially long times :cite:p:`HaWa:06`. SPRKStep makes the assumption that the Hamiltonian is separable, in which case the schemes are @@ -539,8 +539,8 @@ can be ignored). #. For :math:`i = 1,\ldots,s` do: - #. :math:`P_i = P_{i-1} + h_{n+1} \hat{a}_i f_1(Q_i, t_n + \hat{c}_i h)` - #. :math:`Q_{i+1} = Q_i + h_{n+1} a_i f_2(P_i, t_n + c_i h)` + #. :math:`P_i = P_{i-1} + h_{n+1} \hat{a}_i f_1(t_n + \hat{c}_i h, Q_i)` + #. :math:`Q_{i+1} = Q_i + h_{n+1} a_i f_2(t_n + c_i h, P_i)` #. Set :math:`p_{n+1} = P_s, q_{n+1} = Q_{s+1}` @@ -549,15 +549,16 @@ can be ignored). Optionally, a different algorithm leveraging compensated summation can be used that is more robust to roundoff error at the expense of 2 extra vector operations per stage and an additional 5 per time step. It also requires one extra vector to -be stored. However, it signficantly more robust to roundoff error accumulation -:cite:p:`Sof:02`. +be stored. However, it is signficantly more robust to roundoff error accumulation +:cite:p:`Sof:02`. When compensated summation is enabled, the following incremental +form is used to compute a time step: #. Set :math:`\Delta P_0 = 0, \Delta Q_1 = 0` #. For :math:`i = 1,\ldots,s` do: - #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} \hat{a}_i f_1(q_n + \Delta Q_i, t_n + c_i h)` - #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} a_i f_2(p_n + \Delta P_i, t_n + \hat{c}_i h)` + #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} \hat{a}_i f_1(t_n + \hat{c}_i h, q_n + \Delta Q_i)` + #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} a_i f_2(t_n + c_i h, p_n + \Delta P_i)` #. Set :math:`\Delta p_{n+1} = \Delta P_s, \Delta q_{n+1} = \Delta Q_{s+1}` @@ -1129,7 +1130,7 @@ information. In this mode, all internal time step adaptivity is disabled: .. note:: Since temporal error based adaptive time-stepping is known to ruin the - conservation property of SPRK methods, the SPRKStep employs a fixed time-step + conservation property of SPRK methods, SPRKStep employs a fixed time-step size by default. .. note:: diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst index ef58600299..8ee75ba6b0 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst @@ -40,16 +40,16 @@ referenced. functions defined by the particular NVECTOR implementation. The vector should include both the ``q`` and ``p`` variables. - For native SUNDIALS vector implementations (except the CUDA and - RAJA based ones), use a call of the form + For most native SUNDIALS vector implementations, use a call of the form .. code-block:: c y0 = N_VMake_***(..., ydata); if the ``realtype`` array ``ydata`` containing the initial values of - :math:`y` already exists. Otherwise, create a new vector by making - a call of the form + :math:`y` already exists. For some GPU-enabled vectors, a similar constructor + can be used to provide host and device data pointers. If the data array + does not already exist, create a new vector by making a call of the form .. code-block:: c @@ -72,7 +72,7 @@ referenced. this memory structure. See :numref:`ARKODE.Usage.SPRKStep.Initialization` for details. -#. Specify time step size or adaptivity module +#. Specify time step size Call :c:func:`SPRKStepSetFixedStep()` to set the fixed time step size. .. or :c:func:`SPRKStepAdaptivityFn()` to specify either a fixed time-step @@ -114,19 +114,19 @@ referenced. #. Deallocate memory for solution vector - Upon completion of the integration, deallocate memory for the - vector ``y`` (or ``yout``) by calling the NVECTOR destructor - function: + Upon completion of the integration, deallocate memory for the + vector ``y`` (or ``yout``) by calling the NVECTOR destructor + function: - .. code-block:: c + .. code-block:: c - N_VDestroy(y); + N_VDestroy(y); #. Free solver memory - Call :c:func:`SPRKStepFree()` to free the memory allocated for - the SPRKStep module. + Call :c:func:`SPRKStepFree()` to free the memory allocated for + the SPRKStep module. #. Finalize MPI, if used - Call ``MPI_Finalize`` to terminate MPI. + Call ``MPI_Finalize`` to terminate MPI. diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst index cde42d0258..dc35fb2030 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst @@ -25,7 +25,8 @@ descriptions of the SPRKStep user-callable functions and user-supplied functions The example programs located in the source code ``examples/arkode`` folder, may be helpful as templates for new codes. In particular, -* ``examples/arkode/C_serial/ark_hookes_law.c``, and +* ``examples/arkode/C_serial/ark_harmonic_symplectic.c`` +* ``examples/arkode/C_serial/ark_damped_harmonic_symplectic.c``, and * ``examples/arkode/C_serial/ark_kepler.c`` demonstrate ``SPRKStep`` usage. diff --git a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c index 8e4c832ea1..91deec32bd 100644 --- a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c @@ -37,6 +37,9 @@ * --------------------------------------------------------------------------*/ /* clang-format on */ +#include "ark_damped_harmonic_symplectic.h" + +#include #include #include /* prototypes for SPRKStep fcts., consts */ #include @@ -47,29 +50,12 @@ #include #include -#include "arkode/arkode.h" - -#define PI SUN_RCONST(3.14159265358979323846264338327950) - -typedef struct -{ - int order; - int num_output_times; - int use_compsums; - int use_tstop; - sunrealtype Tf; - sunrealtype dt; -} ProgramArgs; - /* RHS functions */ static int pdot(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int qdot(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); -/* Helper functions */ +/* Other functions */ static sunrealtype Hamiltonian(N_Vector yvec, sunrealtype t); -static int ParseArgs(int argc, char* argv[], ProgramArgs* args); -static void PrintHelp(); -static int check_retval(void* returnvalue, const char* funcname, int opt); int main(int argc, char* argv[]) { @@ -171,18 +157,19 @@ int main(int argc, char* argv[]) return 0; } -sunrealtype omega(sunrealtype t) { return cos(t / 2.0); } +sunrealtype omega(sunrealtype t) { return cos(t / SUN_RCONST(2.0)); } -sunrealtype F(sunrealtype t) { return 0.018 * sin(t / PI); } +sunrealtype F(sunrealtype t) { return SUN_RCONST(0.018) * sin(t / PI); } sunrealtype Hamiltonian(N_Vector yvec, sunrealtype t) { - sunrealtype H = 0.0; + sunrealtype H = SUN_RCONST(0.0); sunrealtype* y = N_VGetArrayPointer(yvec); const sunrealtype p = y[0]; const sunrealtype q = y[1]; - H = (p * p * exp(-F(t))) / 2. + (omega(t) * omega(t) * q * q * exp(F(t))) / 2; + H = (p * p * exp(-F(t))) / SUN_RCONST(2.0) + + (omega(t) * omega(t) * q * q * exp(F(t))) / SUN_RCONST(2.0); return H; } @@ -209,114 +196,3 @@ int pdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) return 0; } - -int ParseArgs(int argc, char* argv[], ProgramArgs* args) -{ - int argi = 0; - - args->order = 4; - args->num_output_times = 8; - args->use_compsums = 0; - args->use_tstop = 1; - args->Tf = SUN_RCONST(10.0) * PI; - args->dt = SUN_RCONST(1e-3); - - for (argi = 1; argi < argc; argi++) - { - if (!strcmp(argv[argi], "--order")) - { - argi++; - args->order = atoi(argv[argi]); - } - else if (!strcmp(argv[argi], "--tf")) - { - argi++; - args->Tf = atof(argv[argi]); - } - else if (!strcmp(argv[argi], "--dt")) - { - argi++; - args->dt = atof(argv[argi]); - } - else if (!strcmp(argv[argi], "--nout")) - { - argi++; - args->num_output_times = atoi(argv[argi]); - } - else if (!strcmp(argv[argi], "--use-compensated-sums")) - { - args->use_compsums = 1; - } - else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } - else if (!strcmp(argv[argi], "--help")) - { - PrintHelp(); - return 1; - } - else - { - fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); - PrintHelp(); - return 1; - } - } - - return 0; -} - -void PrintHelp() -{ - fprintf(stderr, - "ark_damped_harmonic_symplectic: an ARKODE example demonstrating " - "the SPRKStep time-stepping module solving a time-dependent " - "damped harmonic oscillator\n"); - /* clang-format off */ - fprintf(stderr, " --order the order of the method to use (default 4)\n"); - fprintf(stderr, " --dt the fixed-time step size to use (default 0.01)\n"); - fprintf(stderr, " --nout the number of output times (default 100)\n"); - fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); - fprintf(stderr, " --disable-tstop turns off tstop mode\n"); - /* clang-format on */ -} - -/* Check function return value... - opt == 0 means SUNDIALS function allocates memory so check if - returned NULL pointer - opt == 1 means SUNDIALS function returns a retval so check if - retval < 0 - opt == 2 means function allocates memory so check if returned - NULL pointer -*/ -int check_retval(void* returnvalue, const char* funcname, int opt) -{ - int* retval; - - /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ - if (opt == 0 && returnvalue == NULL) - { - fprintf(stderr, "\nERROR: %s() failed - returned NULL pointer\n\n", funcname); - return 1; - } - - /* Check if retval < 0 */ - else if (opt == 1) - { - retval = (int*)returnvalue; - if (*retval < 0) - { - fprintf(stderr, "\nERROR: %s() failed with retval = %d\n\n", funcname, - *retval); - return 1; - } - } - - /* Check if function returned NULL pointer - no memory allocated */ - else if (opt == 2 && returnvalue == NULL) - { - fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", - funcname); - return 1; - } - - return 0; -} diff --git a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.h b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.h new file mode 100644 index 0000000000..ace92cf467 --- /dev/null +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.h @@ -0,0 +1,148 @@ +/* ---------------------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ---------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2023, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ---------------------------------------------------------------------------- + * Utilities for the arkode_damped_harmonic_symplectic example. + * ---------------------------------------------------------------------------*/ + +#ifndef ARK_DAMPED_HARMONIC_SYMPLECTIC_H +#define ARK_DAMPED_HARMONIC_SYMPLECTIC_H + +#include +#include +#include +#include + +#define PI SUN_RCONST(3.14159265358979323846264338327950) + +typedef struct +{ + int order; + int num_output_times; + int use_compsums; + int use_tstop; + sunrealtype Tf; + sunrealtype dt; +} ProgramArgs; + +static void PrintHelp() +{ + fprintf(stderr, + "ark_damped_harmonic_symplectic: an ARKODE example demonstrating " + "the SPRKStep time-stepping module solving a time-dependent " + "damped harmonic oscillator\n"); + /* clang-format off */ + fprintf(stderr, " --order the order of the method to use (default 4)\n"); + fprintf(stderr, " --dt the fixed-time step size to use (default 0.01)\n"); + fprintf(stderr, " --nout the number of output times (default 100)\n"); + fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); + fprintf(stderr, " --disable-tstop turns off tstop mode\n"); + /* clang-format on */ +} + +static int ParseArgs(int argc, char* argv[], ProgramArgs* args) +{ + int argi = 0; + + args->order = 4; + args->num_output_times = 8; + args->use_compsums = 0; + args->use_tstop = 1; + args->Tf = SUN_RCONST(10.0) * PI; + args->dt = SUN_RCONST(1e-3); + + for (argi = 1; argi < argc; argi++) + { + if (!strcmp(argv[argi], "--order")) + { + argi++; + args->order = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--tf")) + { + argi++; + args->Tf = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--dt")) + { + argi++; + args->dt = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--nout")) + { + argi++; + args->num_output_times = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--use-compensated-sums")) + { + args->use_compsums = 1; + } + else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } + else if (!strcmp(argv[argi], "--help")) + { + PrintHelp(); + return 1; + } + else + { + fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); + PrintHelp(); + return 1; + } + } + + return 0; +} + +/* Check function return value... + opt == 0 means SUNDIALS function allocates memory so check if + returned NULL pointer + opt == 1 means SUNDIALS function returns a retval so check if + retval < 0 + opt == 2 means function allocates memory so check if returned + NULL pointer +*/ +static int check_retval(void* returnvalue, const char* funcname, int opt) +{ + int* retval; + + /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ + if (opt == 0 && returnvalue == NULL) + { + fprintf(stderr, "\nERROR: %s() failed - returned NULL pointer\n\n", funcname); + return 1; + } + + /* Check if retval < 0 */ + else if (opt == 1) + { + retval = (int*)returnvalue; + if (*retval < 0) + { + fprintf(stderr, "\nERROR: %s() failed with retval = %d\n\n", funcname, + *retval); + return 1; + } + } + + /* Check if function returned NULL pointer - no memory allocated */ + else if (opt == 2 && returnvalue == NULL) + { + fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; + } + + return 0; +} + +#endif /* ARK_DAMPED_HARMONIC_SYMPLECTIC_H */ diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.c b/examples/arkode/C_serial/ark_harmonic_symplectic.c index 96fab1e76f..88704c21a2 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.c +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.c @@ -38,6 +38,9 @@ * --------------------------------------------------------------------------*/ /* clang-format: on */ +#include "ark_harmonic_symplectic.h" + +#include #include #include /* prototypes for SPRKStep fcts., consts */ #include @@ -48,35 +51,18 @@ #include #include -#include "arkode/arkode.h" - -#define PI SUN_RCONST(3.14159265358979323846264338327950) - typedef struct { sunrealtype A, phi, omega; } UserData; -typedef struct -{ - int order; - int num_output_times; - int use_compsums; - int use_tstop; - sunrealtype Tf; - sunrealtype dt; -} ProgramArgs; - /* RHS functions */ static int xdot(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int vdot(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); -/* Helper functions */ +/* Other helper functions */ static void Solution(sunrealtype t, N_Vector y, N_Vector solvec, UserData* udata); static sunrealtype Energy(N_Vector yvec, sunrealtype dt, UserData* udata); -static int ParseArgs(int argc, char* argv[], ProgramArgs* args); -static void PrintHelp(); -static int check_retval(void* returnvalue, const char* funcname, int opt); int main(int argc, char* argv[]) { @@ -175,7 +161,7 @@ int main(int argc, char* argv[]) err = sqrt(N_VDotProd(solution, solution)); /* Output current integration status */ - fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.16Lf\n", + fprintf(stdout, "t = %.6Lf, x(t) = %.6Lf, E = %.6Lf, sol. err = %.16Le\n", (long double)tret, (long double)ydata[0], (long double)Energy(y, dt, &udata), (long double)err); @@ -254,113 +240,3 @@ int vdot(sunrealtype t, N_Vector yvec, N_Vector ydotvec, void* user_data) return 0; } - -int ParseArgs(int argc, char* argv[], ProgramArgs* args) -{ - int argi = 0; - - args->order = 4; - args->num_output_times = 8; - args->use_compsums = 0; - args->use_tstop = 1; - args->dt = SUN_RCONST(1e-3); - args->Tf = SUN_RCONST(2.0) * PI; - - for (argi = 1; argi < argc; argi++) - { - if (!strcmp(argv[argi], "--order")) - { - argi++; - args->order = atoi(argv[argi]); - } - else if (!strcmp(argv[argi], "--tf")) - { - argi++; - args->Tf = atof(argv[argi]); - } - else if (!strcmp(argv[argi], "--dt")) - { - argi++; - args->dt = atof(argv[argi]); - } - else if (!strcmp(argv[argi], "--nout")) - { - argi++; - args->num_output_times = atoi(argv[argi]); - } - else if (!strcmp(argv[argi], "--use-compensated-sums")) - { - args->use_compsums = 1; - } - else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } - else if (!strcmp(argv[argi], "--help")) - { - PrintHelp(); - return 1; - } - else - { - fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); - PrintHelp(); - return 1; - } - } - - return 0; -} - -void PrintHelp() -{ - fprintf(stderr, "ark_harmonic_symplectic: an ARKODE example demonstrating " - "the SPRKStep time-stepping module solving a simple harmonic " - "oscillator\n"); - /* clang-format off */ - fprintf(stderr, " --order the order of the method to use (default 4)\n"); - fprintf(stderr, " --dt the fixed-time step size to use (default 0.01)\n"); - fprintf(stderr, " --nout the number of output times (default 100)\n"); - fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); - fprintf(stderr, " --disable-tstop turns off tstop mode\n"); - /* clang-format on */ -} - -/* Check function return value... - opt == 0 means SUNDIALS function allocates memory so check if - returned NULL pointer - opt == 1 means SUNDIALS function returns a retval so check if - retval < 0 - opt == 2 means function allocates memory so check if returned - NULL pointer -*/ -int check_retval(void* returnvalue, const char* funcname, int opt) -{ - int* retval; - - /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ - if (opt == 0 && returnvalue == NULL) - { - fprintf(stderr, "\nERROR: %s() failed - returned NULL pointer\n\n", funcname); - return 1; - } - - /* Check if retval < 0 */ - else if (opt == 1) - { - retval = (int*)returnvalue; - if (*retval < 0) - { - fprintf(stderr, "\nERROR: %s() failed with retval = %d\n\n", funcname, - *retval); - return 1; - } - } - - /* Check if function returned NULL pointer - no memory allocated */ - else if (opt == 2 && returnvalue == NULL) - { - fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", - funcname); - return 1; - } - - return 0; -} diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.h b/examples/arkode/C_serial/ark_harmonic_symplectic.h new file mode 100644 index 0000000000..7656cec844 --- /dev/null +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.h @@ -0,0 +1,147 @@ +/* ---------------------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ---------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2023, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ---------------------------------------------------------------------------- + * Utilities for the arkode_harmonic_symplectic example. + * ---------------------------------------------------------------------------*/ + +#ifndef ARK_HARMONIC_SYMPLECTIC_H +#define ARK_HARMONIC_SYMPLECTIC_H + +#include +#include +#include +#include + +#define PI SUN_RCONST(3.14159265358979323846264338327950) + +typedef struct +{ + int order; + int num_output_times; + int use_compsums; + int use_tstop; + sunrealtype Tf; + sunrealtype dt; +} ProgramArgs; + +void PrintHelp() +{ + fprintf(stderr, "ark_harmonic_symplectic: an ARKODE example demonstrating " + "the SPRKStep time-stepping module solving a simple harmonic " + "oscillator\n"); + /* clang-format off */ + fprintf(stderr, " --order the order of the method to use (default 4)\n"); + fprintf(stderr, " --dt the fixed-time step size to use (default 0.01)\n"); + fprintf(stderr, " --nout the number of output times (default 100)\n"); + fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); + fprintf(stderr, " --disable-tstop turns off tstop mode\n"); + /* clang-format on */ +} + +int ParseArgs(int argc, char* argv[], ProgramArgs* args) +{ + int argi = 0; + + args->order = 4; + args->num_output_times = 8; + args->use_compsums = 0; + args->use_tstop = 1; + args->dt = SUN_RCONST(1e-3); + args->Tf = SUN_RCONST(2.0) * PI; + + for (argi = 1; argi < argc; argi++) + { + if (!strcmp(argv[argi], "--order")) + { + argi++; + args->order = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--tf")) + { + argi++; + args->Tf = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--dt")) + { + argi++; + args->dt = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--nout")) + { + argi++; + args->num_output_times = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--use-compensated-sums")) + { + args->use_compsums = 1; + } + else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } + else if (!strcmp(argv[argi], "--help")) + { + PrintHelp(); + return 1; + } + else + { + fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); + PrintHelp(); + return 1; + } + } + + return 0; +} + +/* Check function return value... + opt == 0 means SUNDIALS function allocates memory so check if + returned NULL pointer + opt == 1 means SUNDIALS function returns a retval so check if + retval < 0 + opt == 2 means function allocates memory so check if returned + NULL pointer +*/ +int check_retval(void* returnvalue, const char* funcname, int opt) +{ + int* retval; + + /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ + if (opt == 0 && returnvalue == NULL) + { + fprintf(stderr, "\nERROR: %s() failed - returned NULL pointer\n\n", funcname); + return 1; + } + + /* Check if retval < 0 */ + else if (opt == 1) + { + retval = (int*)returnvalue; + if (*retval < 0) + { + fprintf(stderr, "\nERROR: %s() failed with retval = %d\n\n", funcname, + *retval); + return 1; + } + } + + /* Check if function returned NULL pointer - no memory allocated */ + else if (opt == 2 && returnvalue == NULL) + { + fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; + } + + return 0; +} + +#endif /* ARK_HARMONIC_SYMPLECTIC_H */ diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 896896a0bd..de54f48a13 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -3,7 +3,7 @@ * Programmer(s): Cody J. Balos @ LLNL * ---------------------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security + * Copyright (c) 2002-2023, Lawrence Livermore National Security * and Southern Methodist University. * All rights reserved. * @@ -37,7 +37,7 @@ * The rootfinding feature of SPRKStep is used to count the number of complete orbits. * This is done by defining the function, * g(q) = q2 - * and providing it to SPRKStep as the function to find the roots for. + * and providing it to SPRKStep as the function to find the roots for g(q). * * The program also accepts command line arguments to change the method * used and time-stepping strategy. The program has the following CLI arguments: @@ -51,7 +51,7 @@ * --tf the final time for the simulation (default 100) * --nout number of output times * --count-orbits use rootfinding to count the number of completed orbits - * --check-order compute the order of the method used and check if it is within range of the expected + * --check-order compute the order of the method used and check if it is within the expected range * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner @@ -62,6 +62,9 @@ * --------------------------------------------------------------------------*/ /* clang-format on */ +#include "ark_kepler.h" + +#include #include /* prototypes for ARKStep fcts., consts */ #include #include /* prototypes for SPRKStep fcts., consts */ @@ -69,13 +72,11 @@ #include /* serial N_Vector type, fcts., macros */ #include #include +#include #include /* def. math fcns, 'sunrealtype' */ #include #include -#include "arkode/arkode.h" -#include "sundials/sundials_context.h" - #define NUM_DT 8 typedef struct @@ -90,187 +91,20 @@ typedef struct int method_order; } ProblemResult; -typedef struct -{ - int step_mode; - int stepper; - int num_output_times; - int use_compsums; - int use_tstop; - int count_orbits; - int check_order; - sunrealtype dt; - sunrealtype tf; - const char* method_name; -} ProgramArgs; - /* Helper functions */ -static int ParseArgs(int argc, char* argv[], ProgramArgs* args); -static void PrintArgs(ProgramArgs* args); -static void PrintHelp(); -static int ComputeConvergence(int num_dt, sunrealtype* orders, - sunrealtype expected_order, sunrealtype a11, - sunrealtype a12, sunrealtype a21, sunrealtype a22, - sunrealtype b1, sunrealtype b2, - sunrealtype* ord_avg, sunrealtype* ord_max, - sunrealtype* ord_est); -static int check_retval(void* returnvalue, const char* funcname, int opt); - -/* These functions do the interesting work that offer a good example of how to - * use SPRKStep */ static int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx); static void InitialConditions(N_Vector y0, sunrealtype ecc); static sunrealtype Hamiltonian(N_Vector yvec); static sunrealtype AngularMomentum(N_Vector y); + +/* RHS callback functions */ static int dydt(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int velocity(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int force(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); -static int rootfn(sunrealtype t, N_Vector y, sunrealtype* gout, void* user_data); - -int main(int argc, char* argv[]) -{ - ProgramArgs args; - ProblemResult result; - SUNContext sunctx = NULL; - int retval = 0; - - /* Create the SUNDIALS context object for this simulation */ - retval = SUNContext_Create(NULL, &sunctx); - if (check_retval(&retval, "SUNContext_Create", 1)) { return 1; } - - /* Parse the command line arguments */ - if (ParseArgs(argc, argv, &args)) { return 1; }; - - /* Allocate space for result variables */ - result.sol = N_VNew_Serial(4, sunctx); - - if (!args.check_order) - { - /* SolveProblem calls a stepper to evolve the problem to Tf */ - retval = SolveProblem(&args, &result, sunctx); - if (check_retval(&retval, "SolveProblem", 1)) { return 1; } - } - else - { - int i = 0; - /* Compute the order of accuracy of the method by testing - it with different step sizes. */ - sunrealtype acc_orders[NUM_DT]; - sunrealtype con_orders[NUM_DT]; - sunrealtype acc_errors[NUM_DT]; - sunrealtype con_errors[NUM_DT]; - int expected_order = ARKodeSPRKStorage_LoadByName(args.method_name)->q; - N_Vector ref_sol = N_VClone(result.sol); - N_Vector error = N_VClone(result.sol); - sunrealtype a11 = 0, a12 = 0, a21 = 0, a22 = 0; - sunrealtype b1 = 0, b2 = 0, b1e = 0, b2e = 0; - sunrealtype ord_max_acc = 0, ord_max_conv = 0, ord_avg = 0, ord_est = 0; - sunrealtype refine = SUN_RCONST(.5); - sunrealtype dt = (expected_order >= 3) ? SUN_RCONST(1e-1) : SUN_RCONST(1e-3); - sunrealtype dts[NUM_DT]; - - /* Create a reference solution using 8th order ERK with a small time step */ - const int old_step_mode = args.step_mode; - const int old_stepper = args.stepper; - const char* old_method_name = args.method_name; - args.dt = SUN_RCONST(1e-3); - args.step_mode = 0; - args.stepper = 1; - args.method_name = "ARKODE_ARK548L2SAb_ERK_8_4_5"; - - /* SolveProblem calls a stepper to evolve the problem to Tf */ - retval = SolveProblem(&args, &result, sunctx); - if (check_retval(&retval, "SolveProblem", 1)) { return 1; } - - /* Store the reference solution */ - N_VScale(SUN_RCONST(1.0), result.sol, ref_sol); - - /* Restore the program args */ - args.step_mode = old_step_mode; - args.stepper = old_stepper; - args.method_name = old_method_name; - - for (i = 0; i < NUM_DT; i++) { dts[i] = dt * pow(refine, i); } - - /* Compute the error with various step sizes */ - for (i = 0; i < NUM_DT; i++) - { - /* Set the dt to use for this solve */ - args.dt = dts[i]; - - /* SolveProblem calls a stepper to evolve the problem to Tf */ - retval = SolveProblem(&args, &result, sunctx); - if (check_retval(&retval, "SolveProblem", 1)) { return 1; } - - printf("\n"); - - /* Compute the error */ - N_VLinearSum(SUN_RCONST(1.0), result.sol, -SUN_RCONST(1.0), ref_sol, error); - acc_errors[i] = SUNRsqrt(N_VDotProd(error, error)) / - ((sunrealtype)N_VGetLength(error)); - con_errors[i] = SUNRabs(result.energy_error); - - a11 += 1; - a12 += log(dts[i]); - a21 += log(dts[i]); - a22 += (log(dts[i]) * log(dts[i])); - b1 += log(acc_errors[i]); - b2 += (log(acc_errors[i]) * log(dts[i])); - b1e += log(con_errors[i]); - b2e += (log(con_errors[i]) * log(dts[i])); - - if (i >= 1) - { - acc_orders[i - 1] = log(acc_errors[i] / acc_errors[i - 1]) / - log(dts[i] / dts[i - 1]); - con_orders[i - 1] = log(con_errors[i] / con_errors[i - 1]) / - log(dts[i] / dts[i - 1]); - } - } - - /* Compute the order of accuracy */ - retval = ComputeConvergence(NUM_DT, acc_orders, expected_order, a11, a12, a21, - a22, b1, b2, &ord_avg, &ord_max_acc, &ord_est); - printf("Order of accuracy wrt solution: expected = %d, max = %.4Lf, " - "avg " - "= %.4Lf, " - "overall = %.4Lf\n", - expected_order, (long double)ord_max_acc, (long double)ord_avg, - (long double)ord_est); - - /* Compute the order of accuracy with respect to conservation */ - retval = ComputeConvergence(NUM_DT, con_orders, expected_order, a11, a12, - a21, a22, b1e, b2e, &ord_avg, &ord_max_conv, - &ord_est); - - printf("Order of accuracy wrt Hamiltonian: expected = %d, max = %.4Lf, " - "avg = %.4Lf, overall = %.4Lf\n", - expected_order, (long double)ord_max_conv, (long double)ord_avg, - (long double)ord_est); - - if (ord_max_acc < (expected_order - RCONST(0.5))) - { - printf(">>> FAILURE: computed order of accuracy wrt solution is below " - "expected (%d)\n", - expected_order); - return 1; - } - - if (ord_max_conv < (expected_order - RCONST(0.5))) - { - printf(">>> FAILURE: computed order of accuracy wrt Hamiltonian is below " - "expected (%d)\n", - expected_order); - return 1; - } - } - N_VDestroy(result.sol); - SUNContext_Free(&sunctx); - - return 0; -} +/* g(q) callback function for rootfinding */ +static int rootfn(sunrealtype t, N_Vector y, sunrealtype* gout, void* user_data); int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) { @@ -442,14 +276,14 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) fprintf(stdout, " g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg, num. orbits is now %.2Lf\n", rootsfound, (long double)ydata[0], (long double)ydata[1], (long double)num_orbits); - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Le, L(p,q)-L0 = %.16Le\n", (long double)tret, (long double)(Hamiltonian(y) - H0), (long double)(AngularMomentum(y) - L0)); } else if (retval >= 0) { /* Output current integration status */ - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Le, L(p,q)-L0 = %.16Le\n", (long double)tret, (long double)(Hamiltonian(y) - H0), (long double)(AngularMomentum(y) - L0)); fprintf(times_fp, "%.16Lf\n", (long double)tret); @@ -489,14 +323,14 @@ int SolveProblem(ProgramArgs* args, ProblemResult* result, SUNContext sunctx) fprintf(stdout, " g[0] = %3d, y[0] = %3Lg, y[1] = %3Lg, num. orbits is now %.2Lf\n", rootsfound, (long double)ydata[0], (long double)ydata[1], (long double)num_orbits); - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Le, L(p,q)-L0 = %.16Le\n", (long double)tret, (long double)(Hamiltonian(y) - H0), (long double)(AngularMomentum(y) - L0)); } else if (retval >= 0) { /* Output current integration status */ - fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Lf, L(p,q)-L0 = %.16Lf\n", + fprintf(stdout, "t = %.4Lf, H(p,q)-H0 = %.16Le, L(p,q)-L0 = %.16Le\n", (long double)tret, (long double)(Hamiltonian(y) - H0), (long double)(AngularMomentum(y) - L0)); fprintf(times_fp, "%.16Lf\n", (long double)tret); @@ -626,187 +460,146 @@ int rootfn(sunrealtype t, N_Vector yvec, sunrealtype* gout, void* user_data) return 0; } -int ComputeConvergence(int num_dt, sunrealtype* orders, - sunrealtype expected_order, sunrealtype a11, - sunrealtype a12, sunrealtype a21, sunrealtype a22, - sunrealtype b1, sunrealtype b2, sunrealtype* ord_avg, - sunrealtype* ord_max, sunrealtype* ord_est) +int main(int argc, char* argv[]) { - /* Compute/print overall estimated convergence rate */ - int i = 0; - sunrealtype det = 0; - *ord_avg = 0, *ord_max = 0, *ord_est = 0; - for (i = 1; i < num_dt; i++) + ProgramArgs args; + ProblemResult result; + SUNContext sunctx = NULL; + int retval = 0; + + /* Create the SUNDIALS context object for this simulation */ + retval = SUNContext_Create(NULL, &sunctx); + if (check_retval(&retval, "SUNContext_Create", 1)) { return 1; } + + /* Parse the command line arguments */ + if (ParseArgs(argc, argv, &args)) { return 1; }; + + /* Allocate space for result variables */ + result.sol = N_VNew_Serial(4, sunctx); + + if (!args.check_order) { - *ord_avg += orders[i - 1]; - *ord_max = SUNMAX(*ord_max, orders[i - 1]); + /* SolveProblem calls a stepper to evolve the problem to Tf */ + retval = SolveProblem(&args, &result, sunctx); + if (check_retval(&retval, "SolveProblem", 1)) { return 1; } } - *ord_avg = *ord_avg / ((realtype)num_dt - 1); - det = a11 * a22 - a12 * a21; - *ord_est = (a11 * b2 - a21 * b1) / det; - return 0; -} - -int ParseArgs(int argc, char* argv[], ProgramArgs* args) -{ - int argi = 0; - - args->step_mode = 0; - args->stepper = 0; - args->method_name = NULL; - args->count_orbits = 0; - args->use_compsums = 0; - args->use_tstop = 1; - args->dt = SUN_RCONST(1e-2); - args->tf = SUN_RCONST(100.); - args->check_order = 0; - args->num_output_times = 50; - - for (argi = 1; argi < argc; argi++) + else { - if (!strcmp(argv[argi], "--step-mode")) - { - argi++; - if (!strcmp(argv[argi], "fixed")) { args->step_mode = 0; } - else if (!strcmp(argv[argi], "adapt")) { args->step_mode = 1; } - else - { - fprintf(stderr, "ERROR: --step-mode must be 'fixed' or 'adapt'\n"); - return 1; - } - } - else if (!strcmp(argv[argi], "--stepper")) + int i = 0; + /* Compute the order of accuracy of the method by testing + it with different step sizes. */ + sunrealtype acc_orders[NUM_DT]; + sunrealtype con_orders[NUM_DT]; + sunrealtype acc_errors[NUM_DT]; + sunrealtype con_errors[NUM_DT]; + int expected_order = ARKodeSPRKStorage_LoadByName(args.method_name)->q; + N_Vector ref_sol = N_VClone(result.sol); + N_Vector error = N_VClone(result.sol); + sunrealtype a11 = 0, a12 = 0, a21 = 0, a22 = 0; + sunrealtype b1 = 0, b2 = 0, b1e = 0, b2e = 0; + sunrealtype ord_max_acc = 0, ord_max_conv = 0, ord_avg = 0, ord_est = 0; + sunrealtype refine = SUN_RCONST(.5); + sunrealtype dt = (expected_order >= 3) ? SUN_RCONST(1e-1) : SUN_RCONST(1e-3); + sunrealtype dts[NUM_DT]; + + /* Create a reference solution using 8th order ERK with a small time step */ + const int old_step_mode = args.step_mode; + const int old_stepper = args.stepper; + const char* old_method_name = args.method_name; + args.dt = SUN_RCONST(1e-3); + args.step_mode = 0; + args.stepper = 1; + args.method_name = "ARKODE_ARK548L2SAb_ERK_8_4_5"; + + /* SolveProblem calls a stepper to evolve the problem to Tf */ + retval = SolveProblem(&args, &result, sunctx); + if (check_retval(&retval, "SolveProblem", 1)) { return 1; } + + /* Store the reference solution */ + N_VScale(SUN_RCONST(1.0), result.sol, ref_sol); + + /* Restore the program args */ + args.step_mode = old_step_mode; + args.stepper = old_stepper; + args.method_name = old_method_name; + + for (i = 0; i < NUM_DT; i++) { dts[i] = dt * pow(refine, i); } + + /* Compute the error with various step sizes */ + for (i = 0; i < NUM_DT; i++) { - argi++; - if (!strcmp(argv[argi], "SPRK")) { args->stepper = 0; } - else if (!strcmp(argv[argi], "ERK")) { args->stepper = 1; } - else + /* Set the dt to use for this solve */ + args.dt = dts[i]; + + /* SolveProblem calls a stepper to evolve the problem to Tf */ + retval = SolveProblem(&args, &result, sunctx); + if (check_retval(&retval, "SolveProblem", 1)) { return 1; } + + printf("\n"); + + /* Compute the error */ + N_VLinearSum(SUN_RCONST(1.0), result.sol, -SUN_RCONST(1.0), ref_sol, error); + acc_errors[i] = SUNRsqrt(N_VDotProd(error, error)) / + ((sunrealtype)N_VGetLength(error)); + con_errors[i] = SUNRabs(result.energy_error); + + a11 += 1; + a12 += log(dts[i]); + a21 += log(dts[i]); + a22 += (log(dts[i]) * log(dts[i])); + b1 += log(acc_errors[i]); + b2 += (log(acc_errors[i]) * log(dts[i])); + b1e += log(con_errors[i]); + b2e += (log(con_errors[i]) * log(dts[i])); + + if (i >= 1) { - fprintf(stderr, "ERROR: --stepper must be 'SPRK' or 'ERK'\n"); - return 1; + acc_orders[i - 1] = log(acc_errors[i] / acc_errors[i - 1]) / + log(dts[i] / dts[i - 1]); + con_orders[i - 1] = log(con_errors[i] / con_errors[i - 1]) / + log(dts[i] / dts[i - 1]); } } - else if (!strcmp(argv[argi], "--method")) - { - argi++; - args->method_name = argv[argi]; - } - else if (!strcmp(argv[argi], "--dt")) - { - argi++; - args->dt = atof(argv[argi]); - } - else if (!strcmp(argv[argi], "--tf")) - { - argi++; - args->tf = atof(argv[argi]); - } - else if (!strcmp(argv[argi], "--nout")) - { - argi++; - args->num_output_times = atoi(argv[argi]); - } - else if (!strcmp(argv[argi], "--count-orbits")) { args->count_orbits = 1; } - else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } - else if (!strcmp(argv[argi], "--use-compensated-sums")) - { - args->use_compsums = 1; - } - else if (!strcmp(argv[argi], "--check-order")) { args->check_order = 1; } - else if (!strcmp(argv[argi], "--help")) - { - PrintHelp(); - return 1; - } - else - { - fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); - PrintHelp(); - return 1; - } - } - - if (!args->method_name) - { - if (args->stepper == 0) { args->method_name = "ARKODE_SPRK_MCLACHLAN_4_4"; } - else if (args->stepper == 1) - { - args->method_name = "ARKODE_ZONNEVELD_5_3_4"; - } - } - return 0; -} - -void PrintArgs(ProgramArgs* args) -{ - fprintf(stdout, "Problem Arguments:\n"); - fprintf(stdout, " stepper: %d\n", args->stepper); - fprintf(stdout, " step mode: %d\n", args->step_mode); - fprintf(stdout, " use tstop: %d\n", args->use_tstop); - fprintf(stdout, " use compensated sums: %d\n", args->use_compsums); - fprintf(stdout, " dt: %Lg\n", (long double)args->dt); - fprintf(stdout, " Tf: %Lg\n", (long double)args->tf); - fprintf(stdout, " nout: %d\n\n", args->num_output_times); -} + /* Compute the order of accuracy */ + retval = ComputeConvergence(NUM_DT, acc_orders, expected_order, a11, a12, a21, + a22, b1, b2, &ord_avg, &ord_max_acc, &ord_est); + printf("Order of accuracy wrt solution: expected = %d, max = %.4Lf, " + "avg " + "= %.4Lf, " + "overall = %.4Lf\n", + expected_order, (long double)ord_max_acc, (long double)ord_avg, + (long double)ord_est); -void PrintHelp() -{ - fprintf(stderr, "ark_kepler: an ARKODE example demonstrating the SPRKStep " - "time-stepping module solving the Kepler problem\n"); - /* clang-format off */ - fprintf(stderr, " --step-mode should we use a fixed time-step or adaptive time-step (default fixed)\n"); - fprintf(stderr, " --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK)\n"); - fprintf(stderr, " --method which method to use (default ARKODE_SPRK_MCLACHLAN_4_4)\n"); - fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); - fprintf(stderr, " --disable-tstop turns off tstop mode\n"); - fprintf(stderr, " --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01)\n"); - fprintf(stderr, " --tf the final time for the simulation (default 100)\n"); - fprintf(stderr, " --nout the number of output times (default 100)\n"); - fprintf(stderr, " --count-orbits use rootfinding to count the number of completed orbits\n"); - fprintf(stderr, " --check-order compute the order of the method used and check if it is within range of the expected\n"); - /* clang-format on */ -} + /* Compute the order of accuracy with respect to conservation */ + retval = ComputeConvergence(NUM_DT, con_orders, expected_order, a11, a12, + a21, a22, b1e, b2e, &ord_avg, &ord_max_conv, + &ord_est); -/* Check function return value... - opt == 0 means SUNDIALS function allocates memory so check if - returned NULL pointer - opt == 1 means SUNDIALS function returns a retval so check if - retval < 0 - opt == 2 means function allocates memory so check if returned - NULL pointer -*/ -int check_retval(void* returnvalue, const char* funcname, int opt) -{ - int* retval = NULL; + printf("Order of accuracy wrt Hamiltonian: expected = %d, max = %.4Lf, " + "avg = %.4Lf, overall = %.4Lf\n", + expected_order, (long double)ord_max_conv, (long double)ord_avg, + (long double)ord_est); - /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ - if (opt == 0 && returnvalue == NULL) - { - fprintf(stderr, "\nSUNDIALS ERROR: %s() failed - returned NULL pointer\n\n", - funcname); - return 1; - } + if (ord_max_acc < (expected_order - RCONST(0.5))) + { + printf(">>> FAILURE: computed order of accuracy wrt solution is below " + "expected (%d)\n", + expected_order); + return 1; + } - /* Check if retval < 0 */ - else if (opt == 1) - { - retval = (int*)returnvalue; - if (*retval < 0) + if (ord_max_conv < (expected_order - RCONST(0.5))) { - fprintf(stderr, "\nSUNDIALS ERROR: %s() failed with retval = %d\n\n", - funcname, *retval); + printf(">>> FAILURE: computed order of accuracy wrt Hamiltonian is below " + "expected (%d)\n", + expected_order); return 1; } } - /* Check if function returned NULL pointer - no memory allocated */ - else if (opt == 2 && returnvalue == NULL) - { - fprintf(stderr, "\nMEMORY ERROR: %s() failed - returned NULL pointer\n\n", - funcname); - return 1; - } + N_VDestroy(result.sol); + SUNContext_Free(&sunctx); return 0; } diff --git a/examples/arkode/C_serial/ark_kepler.h b/examples/arkode/C_serial/ark_kepler.h new file mode 100644 index 0000000000..c78ec86d42 --- /dev/null +++ b/examples/arkode/C_serial/ark_kepler.h @@ -0,0 +1,226 @@ +/* ---------------------------------------------------------------------------- + * Programmer(s): Cody J. Balos @ LLNL + * ---------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2002-2023, Lawrence Livermore National Security + * and Southern Methodist University. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ---------------------------------------------------------------------------- + * Utilities for the arkode_kepler example. + * ---------------------------------------------------------------------------*/ + +#ifndef ARK_KEPLER_H +#define ARK_KEPLER_H + +#include +#include +#include +#include +#include + +typedef struct +{ + int step_mode; + int stepper; + int num_output_times; + int use_compsums; + int use_tstop; + int count_orbits; + int check_order; + sunrealtype dt; + sunrealtype tf; + const char* method_name; +} ProgramArgs; + + +int ComputeConvergence(int num_dt, sunrealtype* orders, + sunrealtype expected_order, sunrealtype a11, + sunrealtype a12, sunrealtype a21, sunrealtype a22, + sunrealtype b1, sunrealtype b2, sunrealtype* ord_avg, + sunrealtype* ord_max, sunrealtype* ord_est) +{ + /* Compute/print overall estimated convergence rate */ + int i = 0; + sunrealtype det = 0; + *ord_avg = 0, *ord_max = 0, *ord_est = 0; + for (i = 1; i < num_dt; i++) + { + *ord_avg += orders[i - 1]; + *ord_max = SUNMAX(*ord_max, orders[i - 1]); + } + *ord_avg = *ord_avg / ((realtype)num_dt - 1); + det = a11 * a22 - a12 * a21; + *ord_est = (a11 * b2 - a21 * b1) / det; + return 0; +} + + +static void PrintHelp() +{ + fprintf(stderr, "ark_kepler: an ARKODE example demonstrating the SPRKStep " + "time-stepping module solving the Kepler problem\n"); + /* clang-format off */ + fprintf(stderr, " --step-mode should we use a fixed time-step or adaptive time-step (default fixed)\n"); + fprintf(stderr, " --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK)\n"); + fprintf(stderr, " --method which method to use (default ARKODE_SPRK_MCLACHLAN_4_4)\n"); + fprintf(stderr, " --use-compensated-sums turns on compensated summation in ARKODE where applicable\n"); + fprintf(stderr, " --disable-tstop turns off tstop mode\n"); + fprintf(stderr, " --dt the fixed-time step size to use if fixed time stepping is turned on (default 0.01)\n"); + fprintf(stderr, " --tf the final time for the simulation (default 100)\n"); + fprintf(stderr, " --nout the number of output times (default 100)\n"); + fprintf(stderr, " --count-orbits use rootfinding to count the number of completed orbits\n"); + fprintf(stderr, " --check-order compute the order of the method used and check if it is within range of the expected\n"); + /* clang-format on */ +} + +static int ParseArgs(int argc, char* argv[], ProgramArgs* args) +{ + int argi = 0; + + args->step_mode = 0; + args->stepper = 0; + args->method_name = NULL; + args->count_orbits = 0; + args->use_compsums = 0; + args->use_tstop = 1; + args->dt = SUN_RCONST(1e-2); + args->tf = SUN_RCONST(100.); + args->check_order = 0; + args->num_output_times = 50; + + for (argi = 1; argi < argc; argi++) + { + if (!strcmp(argv[argi], "--step-mode")) + { + argi++; + if (!strcmp(argv[argi], "fixed")) { args->step_mode = 0; } + else if (!strcmp(argv[argi], "adapt")) { args->step_mode = 1; } + else + { + fprintf(stderr, "ERROR: --step-mode must be 'fixed' or 'adapt'\n"); + return 1; + } + } + else if (!strcmp(argv[argi], "--stepper")) + { + argi++; + if (!strcmp(argv[argi], "SPRK")) { args->stepper = 0; } + else if (!strcmp(argv[argi], "ERK")) { args->stepper = 1; } + else + { + fprintf(stderr, "ERROR: --stepper must be 'SPRK' or 'ERK'\n"); + return 1; + } + } + else if (!strcmp(argv[argi], "--method")) + { + argi++; + args->method_name = argv[argi]; + } + else if (!strcmp(argv[argi], "--dt")) + { + argi++; + args->dt = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--tf")) + { + argi++; + args->tf = atof(argv[argi]); + } + else if (!strcmp(argv[argi], "--nout")) + { + argi++; + args->num_output_times = atoi(argv[argi]); + } + else if (!strcmp(argv[argi], "--count-orbits")) { args->count_orbits = 1; } + else if (!strcmp(argv[argi], "--disable-tstop")) { args->use_tstop = 0; } + else if (!strcmp(argv[argi], "--use-compensated-sums")) + { + args->use_compsums = 1; + } + else if (!strcmp(argv[argi], "--check-order")) { args->check_order = 1; } + else if (!strcmp(argv[argi], "--help")) + { + PrintHelp(); + return 1; + } + else + { + fprintf(stderr, "ERROR: unrecognized argument %s\n", argv[argi]); + PrintHelp(); + return 1; + } + } + + if (!args->method_name) + { + if (args->stepper == 0) { args->method_name = "ARKODE_SPRK_MCLACHLAN_4_4"; } + else if (args->stepper == 1) + { + args->method_name = "ARKODE_ZONNEVELD_5_3_4"; + } + } + + return 0; +} + +static void PrintArgs(ProgramArgs* args) +{ + fprintf(stdout, "Problem Arguments:\n"); + fprintf(stdout, " stepper: %d\n", args->stepper); + fprintf(stdout, " step mode: %d\n", args->step_mode); + fprintf(stdout, " use tstop: %d\n", args->use_tstop); + fprintf(stdout, " use compensated sums: %d\n", args->use_compsums); + fprintf(stdout, " dt: %Lg\n", (long double)args->dt); + fprintf(stdout, " Tf: %Lg\n", (long double)args->tf); + fprintf(stdout, " nout: %d\n\n", args->num_output_times); +} + +/* Check function return value... + opt == 0 means SUNDIALS function allocates memory so check if + returned NULL pointer + opt == 1 means SUNDIALS function returns a retval so check if + retval < 0 + opt == 2 means function allocates memory so check if returned + NULL pointer +*/ +static int check_retval(void* returnvalue, const char* funcname, int opt) +{ + int* retval; + + /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ + if (opt == 0 && returnvalue == NULL) + { + fprintf(stderr, "\nERROR: %s() failed - returned NULL pointer\n\n", funcname); + return 1; + } + + /* Check if retval < 0 */ + else if (opt == 1) + { + retval = (int*)returnvalue; + if (*retval < 0) + { + fprintf(stderr, "\nERROR: %s() failed with retval = %d\n\n", funcname, + *retval); + return 1; + } + } + + /* Check if function returned NULL pointer - no memory allocated */ + else if (opt == 2 && returnvalue == NULL) + { + fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", + funcname); + return 1; + } + + return 0; +} + +#endif /* ARK_KEPLER_H */ diff --git a/examples/arkode/C_serial/ark_kepler_plot.py b/examples/arkode/C_serial/ark_kepler_plot.py index 2873c23abe..4646a714a6 100755 --- a/examples/arkode/C_serial/ark_kepler_plot.py +++ b/examples/arkode/C_serial/ark_kepler_plot.py @@ -3,7 +3,7 @@ # Programmer(s): Cody J. Balos @ LLNL # ---------------------------------------------------------------- # SUNDIALS Copyright Start -# Copyright (c) 2002-4022, Lawrence Livermore National Security +# Copyright (c) 2002-2023, Lawrence Livermore National Security # and Southern Methodist University. # All rights reserved. # diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 9fe9646a17..7d33ce31e6 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -2,7 +2,7 @@ * Programmer(s): Cody J. Balos @ LLNL * ----------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security + * Copyright (c) 2002-2023, Lawrence Livermore National Security * and Southern Methodist University. * All rights reserved. * @@ -14,8 +14,8 @@ * This is the header file for the ARKode SPRKStep module. * -----------------------------------------------------------------*/ -#ifndef _SPRKSTEP_H -#define _SPRKSTEP_H +#ifndef _ARKODE_SPRKSTEP_H +#define _ARKODE_SPRKSTEP_H #include #include @@ -66,8 +66,6 @@ SUNDIALS_EXPORT int SPRKStepSetMethodName(void* arkode_mem, const char* method); SUNDIALS_EXPORT int SPRKStepSetOrder(void* arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); SUNDIALS_EXPORT int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree); -/* TODO(CJB): should we remove this from the initial release and wait for the OO - * adaptivity? */ SUNDIALS_EXPORT int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps); SUNDIALS_EXPORT int SPRKStepSetStopTime(void* arkode_mem, realtype tstop); SUNDIALS_EXPORT int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed); diff --git a/scripts/arkode b/scripts/arkode index cf76cbf5f3..0ea54dfb4b 100755 --- a/scripts/arkode +++ b/scripts/arkode @@ -195,6 +195,7 @@ $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D_adapt.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_heat1D_adapt.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.c +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.h $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out @@ -210,8 +211,10 @@ $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--s $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_plot.py $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.c +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.h $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_damped_harmonic_symplectic.c +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_damped_harmonic_symplectic.h $tar $tarfile $distrobase/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kpr_mri.out diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index d1d5c7a0c1..33096ee932 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -27,7 +27,8 @@ #include "arkode_impl.h" #include "arkode_interp_impl.h" -#include "sundials/sundials_config.h" +#include "sundials_utils.h" +#include #include #include @@ -2339,15 +2340,6 @@ int arkYddNorm(ARKodeMem ark_mem, realtype hg, realtype *yddnrm) return(ARK_SUCCESS); } -SUNDIALS_STATIC_INLINE -void compensatedSum(sunrealtype base, sunrealtype inc, sunrealtype *sum, sunrealtype *error) -{ - sunrealtype err = *error; - volatile sunrealtype tmp1 = inc - err; - volatile sunrealtype tmp2 = base + tmp1; - *error = (tmp2 - base) - tmp1; - *sum = tmp2; -} /*--------------------------------------------------------------- arkCompleteStep @@ -2375,7 +2367,7 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) /* During long-time integration, roundoff can creep into tcur. Compensated summation fixes this but with increased cost, so it is optional. */ if (ark_mem->use_compensated_sums) { - compensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); + sunCompensatedSum(ark_mem->tn, ark_mem->h, &ark_mem->tcur, &ark_mem->terr); } else { ark_mem->tcur = ark_mem->tn + ark_mem->h; } diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 366c1322d6..5e7837b1ef 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -2,7 +2,7 @@ * Programmer(s): Cody J. Balos @ LLNL *--------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security + * Copyright (c) 2002-2023, Lawrence Livermore National Security * and Southern Methodist University. * All rights reserved. * @@ -23,10 +23,11 @@ ARKodeSPRKStorage ARKodeSymplecticEuler() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(1); - sprk_storage->q = 1; - sprk_storage->stages = 1; - sprk_storage->a[0] = SUN_RCONST(1.0); - sprk_storage->ahat[0] = SUN_RCONST(1.0); + if (!sprk_storage) { return NULL; } + sprk_storage->q = 1; + sprk_storage->stages = 1; + sprk_storage->a[0] = SUN_RCONST(1.0); + sprk_storage->ahat[0] = SUN_RCONST(1.0); return sprk_storage; } @@ -42,32 +43,35 @@ ARKodeSPRKStorage ARKodeSymplecticEuler() ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); - sprk_storage->q = 2; - sprk_storage->stages = 2; - sprk_storage->a[0] = SUN_RCONST(0.5); - sprk_storage->a[1] = SUN_RCONST(0.5); - sprk_storage->ahat[0] = SUN_RCONST(0.0); - sprk_storage->ahat[1] = SUN_RCONST(1.0); + if (!sprk_storage) { return NULL; } + sprk_storage->q = 2; + sprk_storage->stages = 2; + sprk_storage->a[0] = SUN_RCONST(0.5); + sprk_storage->a[1] = SUN_RCONST(0.5); + sprk_storage->ahat[0] = SUN_RCONST(0.0); + sprk_storage->ahat[1] = SUN_RCONST(1.0); return sprk_storage; } ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); - sprk_storage->q = 2; - sprk_storage->stages = 2; - sprk_storage->a[0] = SUN_RCONST(1.0); - sprk_storage->a[1] = SUN_RCONST(0.0); - sprk_storage->ahat[0] = SUN_RCONST(0.5); - sprk_storage->ahat[1] = SUN_RCONST(0.5); + if (!sprk_storage) { return NULL; } + sprk_storage->q = 2; + sprk_storage->stages = 2; + sprk_storage->a[0] = SUN_RCONST(1.0); + sprk_storage->a[1] = SUN_RCONST(0.0); + sprk_storage->ahat[0] = SUN_RCONST(0.5); + sprk_storage->ahat[1] = SUN_RCONST(0.5); return sprk_storage; } ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(4); - sprk_storage->q = 4; - sprk_storage->stages = 4; + if (!sprk_storage) { return NULL; } + sprk_storage->q = 4; + sprk_storage->stages = 4; sprk_storage->a[0] = (SUN_RCONST(2.0) + SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0)) + @@ -104,14 +108,15 @@ ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() ARKodeSPRKStorage ARKodeSymplecticRuth3() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(3); - sprk_storage->q = 3; - sprk_storage->stages = 3; - sprk_storage->a[0] = SUN_RCONST(2.0) / SUN_RCONST(3.0); - sprk_storage->a[1] = -SUN_RCONST(2.0) / SUN_RCONST(3.0); - sprk_storage->a[2] = SUN_RCONST(1.0); - sprk_storage->ahat[0] = SUN_RCONST(7.0) / SUN_RCONST(24.0); - sprk_storage->ahat[1] = SUN_RCONST(3.0) / SUN_RCONST(4.0); - sprk_storage->ahat[2] = -SUN_RCONST(1.0) / SUN_RCONST(24.0); + if (!sprk_storage) { return NULL; } + sprk_storage->q = 3; + sprk_storage->stages = 3; + sprk_storage->a[0] = SUN_RCONST(2.0) / SUN_RCONST(3.0); + sprk_storage->a[1] = -SUN_RCONST(2.0) / SUN_RCONST(3.0); + sprk_storage->a[2] = SUN_RCONST(1.0); + sprk_storage->ahat[0] = SUN_RCONST(7.0) / SUN_RCONST(24.0); + sprk_storage->ahat[1] = SUN_RCONST(3.0) / SUN_RCONST(4.0); + sprk_storage->ahat[2] = -SUN_RCONST(1.0) / SUN_RCONST(24.0); return sprk_storage; } @@ -125,9 +130,10 @@ ARKodeSPRKStorage ARKodeSymplecticRuth3() ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); - sprk_storage->q = 2; - sprk_storage->stages = 2; - sprk_storage->a[1] = SUN_RCONST(1.0) - + if (!sprk_storage) { return NULL; } + sprk_storage->q = 2; + sprk_storage->stages = 2; + sprk_storage->a[1] = SUN_RCONST(1.0) - (SUN_RCONST(1.0) / SUN_RCONST(2.0)) * SUNRsqrt(2.0); sprk_storage->a[0] = SUN_RCONST(1.0) - sprk_storage->a[1]; sprk_storage->ahat[1] = @@ -142,8 +148,10 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() sunrealtype y = 0.0; sunrealtype z = 0.0; ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(3); - sprk_storage->q = 3; - sprk_storage->stages = 3; + if (!sprk_storage) { return NULL; } + + sprk_storage->q = 3; + sprk_storage->stages = 3; z = -SUNRpowerR((SUN_RCONST(2.0) / SUN_RCONST(27.0)) - SUN_RCONST(1.0) / (SUN_RCONST(9.0) * SUNRsqrt(3.0)), @@ -166,36 +174,38 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(4); - sprk_storage->q = 4; - sprk_storage->stages = 4; - sprk_storage->a[0] = SUN_RCONST(0.515352837431122936); - sprk_storage->a[1] = -SUN_RCONST(0.085782019412973646); - sprk_storage->a[2] = SUN_RCONST(0.441583023616466524); - sprk_storage->a[3] = SUN_RCONST(0.128846158365384185); - sprk_storage->ahat[0] = SUN_RCONST(0.134496199277431089); - sprk_storage->ahat[1] = -SUN_RCONST(0.224819803079420806); - sprk_storage->ahat[2] = SUN_RCONST(0.756320000515668291); - sprk_storage->ahat[3] = SUN_RCONST(0.33400360328632142); + if (!sprk_storage) { return NULL; } + sprk_storage->q = 4; + sprk_storage->stages = 4; + sprk_storage->a[0] = SUN_RCONST(0.515352837431122936); + sprk_storage->a[1] = -SUN_RCONST(0.085782019412973646); + sprk_storage->a[2] = SUN_RCONST(0.441583023616466524); + sprk_storage->a[3] = SUN_RCONST(0.128846158365384185); + sprk_storage->ahat[0] = SUN_RCONST(0.134496199277431089); + sprk_storage->ahat[1] = -SUN_RCONST(0.224819803079420806); + sprk_storage->ahat[2] = SUN_RCONST(0.756320000515668291); + sprk_storage->ahat[3] = SUN_RCONST(0.33400360328632142); return sprk_storage; } ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(6); - sprk_storage->q = 5; - sprk_storage->stages = 6; - sprk_storage->a[0] = SUN_RCONST(0.339839625839110000); - sprk_storage->a[1] = -SUN_RCONST(0.088601336903027329); - sprk_storage->a[2] = SUN_RCONST(0.5858564768259621188); - sprk_storage->a[3] = -SUN_RCONST(0.603039356536491888); - sprk_storage->a[4] = SUN_RCONST(0.3235807965546976394); - sprk_storage->a[5] = SUN_RCONST(0.4423637942197494587); - sprk_storage->ahat[0] = SUN_RCONST(0.1193900292875672758); - sprk_storage->ahat[1] = SUN_RCONST(0.6989273703824752308); - sprk_storage->ahat[2] = -SUN_RCONST(0.1713123582716007754); - sprk_storage->ahat[3] = SUN_RCONST(0.4012695022513534480); - sprk_storage->ahat[4] = SUN_RCONST(0.0107050818482359840); - sprk_storage->ahat[5] = -SUN_RCONST(0.0589796254980311632); + if (!sprk_storage) { return NULL; } + sprk_storage->q = 5; + sprk_storage->stages = 6; + sprk_storage->a[0] = SUN_RCONST(0.339839625839110000); + sprk_storage->a[1] = -SUN_RCONST(0.088601336903027329); + sprk_storage->a[2] = SUN_RCONST(0.5858564768259621188); + sprk_storage->a[3] = -SUN_RCONST(0.603039356536491888); + sprk_storage->a[4] = SUN_RCONST(0.3235807965546976394); + sprk_storage->a[5] = SUN_RCONST(0.4423637942197494587); + sprk_storage->ahat[0] = SUN_RCONST(0.1193900292875672758); + sprk_storage->ahat[1] = SUN_RCONST(0.6989273703824752308); + sprk_storage->ahat[2] = -SUN_RCONST(0.1713123582716007754); + sprk_storage->ahat[3] = SUN_RCONST(0.4012695022513534480); + sprk_storage->ahat[4] = SUN_RCONST(0.0107050818482359840); + sprk_storage->ahat[5] = -SUN_RCONST(0.0589796254980311632); return sprk_storage; } @@ -211,16 +221,17 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() ARKodeSPRKStorage ARKodeSymplecticYoshida6() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(8); - sprk_storage->q = 6; - sprk_storage->stages = 8; - sprk_storage->a[0] = SUN_RCONST(0.7845136104775572638194976338663498757768); - sprk_storage->a[1] = SUN_RCONST(0.2355732133593581336847931829785346016865); - sprk_storage->a[2] = -SUN_RCONST(1.177679984178871006946415680964315734639); - sprk_storage->a[3] = SUN_RCONST(1.315186320683911218884249728238862514352); - sprk_storage->a[4] = sprk_storage->a[2]; - sprk_storage->a[5] = sprk_storage->a[1]; - sprk_storage->a[6] = sprk_storage->a[0]; - sprk_storage->a[7] = SUN_RCONST(0.0); + if (!sprk_storage) { return NULL; } + sprk_storage->q = 6; + sprk_storage->stages = 8; + sprk_storage->a[0] = SUN_RCONST(0.7845136104775572638194976338663498757768); + sprk_storage->a[1] = SUN_RCONST(0.2355732133593581336847931829785346016865); + sprk_storage->a[2] = -SUN_RCONST(1.177679984178871006946415680964315734639); + sprk_storage->a[3] = SUN_RCONST(1.315186320683911218884249728238862514352); + sprk_storage->a[4] = sprk_storage->a[2]; + sprk_storage->a[5] = sprk_storage->a[1]; + sprk_storage->a[6] = sprk_storage->a[0]; + sprk_storage->a[7] = SUN_RCONST(0.0); sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / SUN_RCONST(2.0); @@ -252,9 +263,10 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() ARKodeSPRKStorage ARKodeSymplecticSuzukiUmeno816() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(16); - sprk_storage->q = 8; - sprk_storage->stages = 16; - sprk_storage->a[0] = SUN_RCONST(0.7416703643506129534482278017838063156035); + if (!sprk_storage) { return NULL; } + sprk_storage->q = 8; + sprk_storage->stages = 16; + sprk_storage->a[0] = SUN_RCONST(0.7416703643506129534482278017838063156035); sprk_storage->a[1] = -SUN_RCONST(0.4091008258000315939973000958935634173099); sprk_storage->a[2] = SUN_RCONST(0.1907547102962383799538762564503716627355); sprk_storage->a[3] = -SUN_RCONST(0.5738624711160822666563877266355357421595); @@ -308,8 +320,9 @@ ARKodeSPRKStorage ARKodeSymplecticSuzukiUmeno816() ARKodeSPRKStorage ARKodeSymplecticSofroniou10() { ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(36); - sprk_storage->q = 10; - sprk_storage->stages = 36; + if (!sprk_storage) { return NULL; } + sprk_storage->q = 10; + sprk_storage->stages = 36; sprk_storage->a[0] = SUN_RCONST(0.078795722521686419263907679337684); sprk_storage->a[1] = SUN_RCONST(0.31309610341510852776481247192647); @@ -409,8 +422,24 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) ARKodeSPRKStorage sprk_storage = NULL; sprk_storage = (ARKodeSPRKStorage)malloc(sizeof(struct ARKodeSPRKStorage_s)); + if (!sprk_storage) { return NULL; } + + memset(sprk_storage, 0, sizeof(struct ARKodeSPRKStorage_s)); + + sprk_storage->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); + if (!(sprk_storage->ahat)) + { + ARKodeSPRKStorage_Free(sprk_storage); + return NULL; + } + + sprk_storage->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); + if (!(sprk_storage->a)) + { + ARKodeSPRKStorage_Free(sprk_storage); + return NULL; + } - sprk_storage->q = 0; sprk_storage->stages = stages; sprk_storage->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); sprk_storage->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); @@ -521,8 +550,8 @@ void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage) { if (sprk_storage) { - free(sprk_storage->ahat); - free(sprk_storage->a); + if (sprk_storage->ahat) { free(sprk_storage->ahat); } + if (sprk_storage->a) { free(sprk_storage->a); } free(sprk_storage); } } @@ -537,42 +566,46 @@ int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeButcherTable b = NULL; a = ARKodeButcherTable_Alloc(sprk_storage->stages, SUNFALSE); + if (!a) { return ARK_MEM_FAIL; } b = ARKodeButcherTable_Alloc(sprk_storage->stages, SUNFALSE); + if (!b) { return ARK_MEM_FAIL; } /* DIRK table */ for (i = 0; i < sprk_storage->stages; ++i) { b->b[i] = sprk_storage->ahat[i]; for (j = 0; j <= i; ++j) { b->A[i][j] = sprk_storage->ahat[j]; } - } + /* Time weights: C_j = sum_{i=0}^{j} b_i */ + + /* Time weights: C_j = sum_{i=0}^{j-1} b_i */ + for (j = 0; j < sprk_storage->stages; ++j) + { + for (i = 0; i <= j; ++i) { b->c[j] += sprk_storage->ahat[i]; } + } + + /* Explicit table */ + for (i = 0; i < sprk_storage->stages; ++i) + { + a->b[i] = sprk_storage->a[i]; + for (j = 0; j < i; ++j) { a->A[i][j] = sprk_storage->a[j]; } + } + + /* Time weights: c_j = sum_{i=0}^{j-1} a_i */ + for (j = 0; j < sprk_storage->stages; ++j) + { + for (i = 0; i < j; ++i) { a->c[j] += sprk_storage->a[i]; } + } + + /* Set method order */ + a->q = sprk_storage->q; + b->q = sprk_storage->q; + + /* No embedding, so set embedding order to 0 */ + a->p = 0; + b->p = 0; - /* Time weights: C_j = sum_{i=0}^{j-1} b_i */ - for (j = 0; j < sprk_storage->stages; ++j) - { - for (i = 0; i < j; ++i) { b->c[j] += sprk_storage->ahat[i]; } - } - - /* Explicit table */ - for (i = 0; i < sprk_storage->stages; ++i) - { - a->b[i] = sprk_storage->a[i]; - for (j = 0; j < i; ++j) { a->A[i][j] = sprk_storage->a[j]; } } - /* Time weights: c_j = sum_{i=0}^{j-1} a_i */ - for (j = 0; j < sprk_storage->stages; ++j) - { - for (i = 0; i < j; ++i) { a->c[j] += sprk_storage->a[i]; } - } - - /* Set method order */ - a->q = sprk_storage->q; - b->q = sprk_storage->q; - - /* No embedding, so set embedding order to 0 */ - a->p = 0; - b->p = 0; - *erk_ptr = a; *dirk_ptr = b; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 69c8acdbeb..64b7d0710c 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -2,7 +2,7 @@ * Programmer(s): Cody J. Balos @ LLNL *--------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security + * Copyright (c) 2002-2023, Lawrence Livermore National Security * and Southern Methodist University. * All rights reserved. * @@ -42,14 +42,14 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, int retval = 0; /* Check that f1 and f2 are supplied */ - if (f1 == NULL) + if (!f1) { arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", MSG_ARK_NULL_F); return (NULL); } - if (f2 == NULL) + if (!f2) { arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", MSG_ARK_NULL_F); @@ -57,7 +57,7 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, } /* Check for legal input parameters */ - if (y0 == NULL) + if (!y0) { arkProcessError(NULL, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepCreate", MSG_ARK_NULL_Y0); @@ -116,21 +116,10 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0, } } else { step_mem->yerr = NULL; } - - /* Attach step_mem structure and function pointers to ark_mem */ - ark_mem->step_attachlinsol = NULL; - ark_mem->step_attachmasssol = NULL; - ark_mem->step_disablelsetup = NULL; - ark_mem->step_disablemsetup = NULL; - ark_mem->step_getlinmem = NULL; - ark_mem->step_getmassmem = NULL; - ark_mem->step_getimplicitrhs = NULL; - ark_mem->step_mmult = NULL; - ark_mem->step_getgammas = NULL; - ark_mem->step_init = sprkStep_Init; - ark_mem->step_fullrhs = sprkStep_FullRHS; - ark_mem->step = sprkStep_TakeStep; - ark_mem->step_mem = (void*)step_mem; + ark_mem->step_init = sprkStep_Init; + ark_mem->step_fullrhs = sprkStep_FullRHS; + ark_mem->step = sprkStep_TakeStep; + ark_mem->step_mem = (void*)step_mem; /* Set default values for SPRKStep optional inputs */ retval = SPRKStepSetDefaults((void*)ark_mem); @@ -203,7 +192,7 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, } /* Check that f1 and f2 are supplied */ - if (f1 == NULL || f2 == NULL) + if (!f1 || !f2) { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepReInit", MSG_ARK_NULL_F); @@ -211,7 +200,7 @@ int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, } /* Check that y0 is supplied */ - if (y0 == NULL) + if (!y0) { arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::SPRKStep", "SPRKStepReInit", MSG_ARK_NULL_Y0); @@ -270,6 +259,8 @@ int SPRKStepReset(void* arkode_mem, realtype tR, N_Vector yR) return (retval); } + N_VConst(SUN_RCONST(0.0), step_mem->yerr); + return (ARK_SUCCESS); } @@ -381,9 +372,9 @@ void SPRKStepFree(void** arkode_mem) For all initialization types, this routine sets the relevant TakeStep routine based on the current problem configuration. - With initialization type FIRST_INIT this routine: - - With initialization type FIRST_INIT or RESIZE_INIT, this routine: + With initialization type FIRST_INIT or RESIZE_INIT, this routine + this routines loads the default method of the selected order + if necessary. With initialization type RESET_INIT, this routine does nothing. ---------------------------------------------------------------*/ @@ -441,6 +432,10 @@ int sprkStep_Init(void* arkode_mem, int init_type) } } + /* Limit max degree to at most one less than the method global order */ + retval = arkInterpSetDegree(ark_mem, ark_mem->interp, + -(step_mem->method->q - 1)); + /* Signal to shared arkode module that fullrhs is not required after each step */ ark_mem->call_fullrhs = SUNFALSE; @@ -463,6 +458,7 @@ int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g) } /* Utility to call f1 and increment the counter */ +SUNDIALS_INLINE int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f1, void* user_data) { @@ -472,6 +468,7 @@ int sprkStep_f1(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, } /* Utility to call f2 and increment the counter */ +SUNDIALS_INLINE int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, N_Vector f2, void* user_data) { @@ -561,8 +558,8 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) ARKodeSPRKStepMem step_mem = NULL; N_Vector prev_stage = NULL; N_Vector curr_stage = NULL; - sunrealtype ci = 0.0; - sunrealtype chati = 0.0; + sunrealtype ci = SUN_RCONST(0.0); + sunrealtype chati = SUN_RCONST(0.0); int is = 0; int retval = 0; @@ -571,8 +568,8 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - prev_stage = ark_mem->yn; - curr_stage = ark_mem->ycur; + prev_stage = ark_mem->yn; + curr_stage = ark_mem->ycur; for (is = 0; is < step_mem->method->stages; is++) { /* load/compute coefficients */ @@ -588,8 +585,8 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) /* evaluate p' with the previous velocity */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f1(step_mem, ark_mem->tn + chati*ark_mem->h, prev_stage, step_mem->sdata, - ark_mem->user_data); + retval = sprkStep_f1(step_mem, ark_mem->tn + chati * ark_mem->h, prev_stage, + step_mem->sdata, ark_mem->user_data); if (retval != 0) { return ARK_RHSFUNC_FAIL; } /* position update */ @@ -602,8 +599,8 @@ int sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr) /* evaluate q' with the current positions */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tn + ci*ark_mem->h, curr_stage, step_mem->sdata, - ark_mem->user_data); + retval = sprkStep_f2(step_mem, ark_mem->tn + ci * ark_mem->h, curr_stage, + step_mem->sdata, ark_mem->user_data); if (retval != 0) { return ARK_RHSFUNC_FAIL; } /* velocity update */ @@ -637,12 +634,11 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, { ARKodeMem ark_mem = NULL; ARKodeSPRKStepMem step_mem = NULL; - ARKodeSPRKStorage method = NULL; N_Vector delta_Yi = NULL; N_Vector yn_plus_delta_Yi = NULL; N_Vector diff = NULL; - sunrealtype ci = 0.0; - sunrealtype chati = 0.0; + sunrealtype ci = SUN_RCONST(0.0); + sunrealtype chati = SUN_RCONST(0.0); int is = 0; int retval = 0; @@ -651,19 +647,17 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, &ark_mem, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - method = step_mem->method; - /* Vector shortcuts */ delta_Yi = ark_mem->tempv1; yn_plus_delta_Yi = ark_mem->tempv2; diff = ark_mem->tempv3; - /* [ \Delta Q_0 ] = [ 0 ] - [ \Delta P_0 ] = [ 0 ] */ + /* [ \Delta P_0 ] = [ 0 ] + [ \Delta Q_0 ] = [ 0 ] */ N_VConst(ZERO, delta_Yi); /* loop over internal stages to the step */ - for (is = 0; is < method->stages; is++) + for (is = 0; is < step_mem->method->stages; is++) { /* load/compute coefficients */ sunrealtype ai = step_mem->method->a[is]; @@ -675,24 +669,24 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, /* store current stage index */ step_mem->istage = is; - /* [ q_n ] + [ \Delta Q_i ] - [ ] + [ ] */ + /* [ ] + [ ] + [ q_n ] + [ \Delta Q_i ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); /* Evaluate p' with the previous velocity */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f1(step_mem, ark_mem->tn + chati*ark_mem->h, yn_plus_delta_Yi, - step_mem->sdata, ark_mem->user_data); + retval = sprkStep_f1(step_mem, ark_mem->tn + chati * ark_mem->h, + yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); if (retval != 0) { return (ARK_RHSFUNC_FAIL); } /* Incremental position update: - [ ] = [ ] + [ ] - [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] */ + [ \Delta P_i ] = [ \Delta P_{i-1} ] + [ sdata ] + [ ] = [ ] + [ ] */ N_VLinearSum(ONE, delta_Yi, ark_mem->h * ahati, step_mem->sdata, delta_Yi); - /* [ ] + [ ] - [ p_n ] + [ \Delta P_i ] */ + /* [ p_n ] + [ \Delta P_i ] + [ ] + [ ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); /* set current stage time(s) */ @@ -701,13 +695,13 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, /* Evaluate q' with the current positions */ N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - retval = sprkStep_f2(step_mem, ark_mem->tn + ci*ark_mem->h, yn_plus_delta_Yi, - step_mem->sdata, ark_mem->user_data); + retval = sprkStep_f2(step_mem, ark_mem->tn + ci * ark_mem->h, + yn_plus_delta_Yi, step_mem->sdata, ark_mem->user_data); if (retval != 0) { return (ARK_RHSFUNC_FAIL); } /* Incremental velocity update: - [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] - [ ] = [ ] + [ ] */ + [ ] = [ ] + [ ] + [ \Delta Q_i ] = [ \Delta Q_{i-1} ] + [ sdata ] */ N_VLinearSum(ONE, delta_Yi, ark_mem->h * ai, step_mem->sdata, delta_Yi); /* if user-supplied stage postprocessing function, we error out since it @@ -724,15 +718,15 @@ int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, /* Now we compute the step solution via compensated summation. - [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] - [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] */ + [ p_{n+1} ] = [ p_n ] + [ \Delta P_i ] + [ q_{n+1} ] = [ q_n ] + [ \Delta Q_i ] */ N_VLinearSum(ONE, delta_Yi, -ONE, step_mem->yerr, delta_Yi); N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, ark_mem->ycur); N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->yn, diff); N_VLinearSum(ONE, diff, -ONE, delta_Yi, step_mem->yerr); *nflagPtr = 0; - *dsmPtr = 0; + *dsmPtr = SUN_RCONST(0.0); return 0; } diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index f4433e6c99..87ffa08e29 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -2,7 +2,7 @@ * Programmer(s): Cody J. Balos @ LLNL *--------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security + * Copyright (c) 2002-2023, Lawrence Livermore National Security * and Southern Methodist University. * All rights reserved. * @@ -53,7 +53,7 @@ typedef struct ARKodeSPRKStepMemRec /* SPRK problem specification */ ARKRhsFn f1; /* p' = f1(t,q) = - dV(t,q)/dq */ - ARKRhsFn f2; /* q' = f2(p) = dT(p)/dp */ + ARKRhsFn f2; /* q' = f2(t,p) = dT(t,p)/dp */ /* Counters */ long int nf1; /* number of calls to f1 */ @@ -67,10 +67,10 @@ typedef struct ARKodeSPRKStepMemRec ===============================================================*/ int sprkStep_Init(void* arkode_mem, int init_type); -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 sprkStep_TakeStep(void* arkode_mem, realtype* dsmPtr, int* nflagPtr); -int sprkStep_TakeStep_Compensated(void* arkode_mem, realtype* dsmPtr, +int sprkStep_TakeStep(void* arkode_mem, sunrealtype* dsmPtr, int* nflagPtr); +int sprkStep_TakeStep_Compensated(void* arkode_mem, sunrealtype* dsmPtr, int* nflagPtr); /* Internal utility routines */ @@ -91,7 +91,6 @@ int sprkStep_f2(ARKodeSPRKStepMem step_mem, sunrealtype tcur, N_Vector ycur, /* Initialization and I/O error messages */ #define MSG_SPRKSTEP_NO_MEM "Time step module memory is NULL." - #ifdef __cplusplus } #endif diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index c1eec9e781..73094ce519 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -2,7 +2,7 @@ * Programmer(s): Cody J. Balos @ LLNL *--------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security + * Copyright (c) 2002-2023, Lawrence Livermore National Security * and Southern Methodist University. * All rights reserved. * @@ -265,7 +265,7 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) step_mem->method = NULL; } - step_mem->method = sprk_storage; + step_mem->method = ARKodeSPRKStorage_Copy(sprk_storage); return (ARK_SUCCESS); } diff --git a/src/sundials/sundials_utils.h b/src/sundials/sundials_utils.h index 5c7a3fc219..d788abd5a6 100644 --- a/src/sundials/sundials_utils.h +++ b/src/sundials/sundials_utils.h @@ -20,6 +20,8 @@ #include #include #include +#include +#include static int sunvsnprintf(char* buffer, size_t bufsz, const char* format, va_list vlist) { @@ -84,5 +86,14 @@ static int sunvasnprintf(char** str, const char* fmt, va_list args) return size; } +SUNDIALS_STATIC_INLINE +void sunCompensatedSum(sunrealtype base, sunrealtype inc, sunrealtype *sum, sunrealtype *error) +{ + sunrealtype err = *error; + volatile sunrealtype tmp1 = inc - err; + volatile sunrealtype tmp2 = base + tmp1; + *error = (tmp2 - base) - tmp1; + *sum = tmp2; +} #endif /* _SUNDIALS_UTILS_H */ From 5ef29c45258364d2e5bb2fe4fe6a0d7f2b538755 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jul 2023 12:51:36 -0700 Subject: [PATCH 133/177] address more comments --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 2 +- .../SPRKStep_c_interface/User_callable.rst | 105 ++++++++---------- 2 files changed, 47 insertions(+), 60 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 37dccea09c..0bf97691d0 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -127,7 +127,7 @@ ARKodeSPRKStorage functions .. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) - Allocate memory for an ARKodeSPRKStorage structure with the specified number of stages. + Allocate memory for an :c:type:`ARKodeSPRKStorage`` structure with the specified number of stages. :param stages: The number of stages. :return: ARKodeSPRKStorage structure for the loaded method. diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 3087251d27..d6ada2075b 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -83,6 +83,10 @@ called only once, prior to the first call to changed during the solution, :c:func:`SPRKStepRootInit()` can also be called prior to a continuation call to :c:func:`SPRKStepEvolve()`. +.. note:: + + The solution is interpolated to the times at which roots are found. + .. c:function:: int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g) @@ -95,7 +99,7 @@ called prior to a continuation call to :c:func:`SPRKStepEvolve()`. :param g: name of user-supplied function, of type :c:func:`ARKRootFn()`, defining the functions :math:`g_i` whose roots are sought. - :return: + :returns: * *ARK_SUCCESS* if successful * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` * *ARK_MEM_FAIL* if there was a memory allocation failure @@ -171,19 +175,12 @@ has requested rootfinding. the solver was either illegal or missing. Details will be provided in the error message. Typical causes of this failure: - (a) A component of the error weight vector became zero during - internal time-stepping. - - (b) A root of one of the root functions was found both at a + (a) A root of one of the root functions was found both at a point :math:`t` and also very near :math:`t`. - (c) The initial condition violates the inequality constraints. - * *ARK_TOO_MUCH_WORK* if the solver took *mxstep* internal steps but could not reach *tout*. The default value for *mxstep* is *MXSTEP_DEFAULT = 500*. - * *ARK_TOO_MUCH_ACC* if the solver could not satisfy the accuracy - demanded by the user for some internal step. * *ARK_ERR_FAILURE* if error test failures occurred either too many times (*ark_maxnef*) during one internal time step or occurred with :math:`|h| = h_{min}`. @@ -210,8 +207,8 @@ has requested rootfinding. integrator returns at a *tstop* time, any future testing for *tstop* is disabled (and can be re-enabled only though a new call to :c:func:`SPRKStepSetStopTime()`). SPRKStep uses the ARKODE - Lagrange interpolation module by default because testing showed that - it does a better job of maintaining conservation than Hermite interpolation. + Our testing has shown that Lagrange interpolation typically performs + well in this regard, while Hermite interpolation does not. On any error return in which one or more internal steps were taken by :c:func:`SPRKStepEvolve()`, the returned values of *tret* and @@ -249,7 +246,7 @@ functions, :numref:`ARKODE.Usage.UserSupplied`. We note that, on an error return, all of the optional input functions send an error message to the error handler function. All error return values are negative, so a test on the return arguments for negative values will catch all -errors. Finally, a call to an ``SPRKStepSet***`` function can generally be made +errors. Finally, a call to a ``SPRKStepSet***`` function can generally be made from the user's calling program at any time and, if successful, takes effect immediately. ``SPRKStepSet***`` functions that cannot be called at any time note this in the "**Notes**:" section of the function documentation. @@ -279,7 +276,7 @@ Optional inputs for SPRKStep +-----------------------------------------------------+------------------------------------------+------------------------+ | Supply a custom error handler function | :c:func:`SPRKStepSetErrHandlerFn()` | internal fn | +-----------------------------------------------------+------------------------------------------+------------------------+ - | Set fixed step size (disables time step adaptivity) | :c:func:`SPRKStepSetFixedStep()` | disabled | + | Set fixed step size (required user input) | :c:func:`SPRKStepSetFixedStep()` | user defined | +-----------------------------------------------------+------------------------------------------+------------------------+ | Maximum no. of internal steps before *tout* | :c:func:`SPRKStepSetMaxNumSteps()` | 500 | +-----------------------------------------------------+------------------------------------------+------------------------+ @@ -303,7 +300,8 @@ Optional inputs for SPRKStep * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` * *ARK_ILL_INPUT* if an argument has an illegal value - **Notes:** + .. notes:: + Does not change problem-defining function pointer *f* or the *user_data* pointer. @@ -328,7 +326,8 @@ Optional inputs for SPRKStep * *ARK_ILL_INPUT* if the *itype* argument is not recognized or the interpolation module has already been initialized - **Notes:** + .. notes:: + The Hermite interpolation module is described in :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange interpolation module is described in :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. @@ -342,16 +341,16 @@ Optional inputs for SPRKStep not be changed without first calling :c:func:`SPRKStepReInit()`. If this routine is not called, the Lagrange interpolation module will be used. - Our testing indicates that Lagrange interpolation does a better job of conserving - quantites than Hermite interpolation. + + Our testing has shown that Lagrange interpolation typically performs well in + this regard, while Hermite interpolation does not. .. c:function:: int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree) Specifies the degree of the polynomial interpolant - used for dense output (i.e. interpolation of solution output values - and implicit method predictors). + used for dense output (i.e. interpolation of solution output values). :param arkode_mem: pointer to the SPRKStep memory block. :param degree: requested polynomial degree. @@ -379,7 +378,8 @@ Optional inputs for SPRKStep polynomial degree that is used by SPRKStep will be the minimum of :math:`q-1` and the input *degree*, for :math:`q > 1` where :math:`q` is the order of accuracy for the time integration method. - + + When , `q = 1` a linear interpolant is the default to ensure values obtained by the integrator are returned at the ends of the time interval. @@ -431,8 +431,7 @@ Optional inputs for SPRKStep .. c:function:: int SPRKStepSetFixedStep(void* arkode_mem, realtype hfixed) - Disables time step adaptivity within SPRKStep, and specifies the - fixed time step size to use for the following internal step(s). + Sets the time step size used within SPRKStep. :param arkode_mem: pointer to the SPRKStep memory block. :param hfixed: value of the fixed step size to use. @@ -573,8 +572,8 @@ Optional inputs for IVP method selection .. warning:: - This overrides the method so it should not be used with :c:func:`SPRKStepSetMethod` - or :c:func:`SPRKStepMethodByName`. + This overrides any previously set method so it should not be used with + :c:func:`SPRKStepSetMethod` or :c:func:`SPRKStepMethodByName`. .. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) @@ -623,7 +622,7 @@ Optional inputs for IVP method selection **Notes:** This increases the computational cost by 2 extra vector operations per stage and an additional 5 per time step. It also requires one extra vector to be stored. - However, it signficantly more robust to roundoff error accumulation. + However, it is signficantly more robust to roundoff error accumulation. .. _ARKODE.Usage.SPRKStep.SPRKStepRootfindingInput: @@ -706,7 +705,7 @@ An optional function :c:func:`SPRKStepGetDky()` is available to obtain additional values of solution-related quantities. This function should only be called after a successful return from :c:func:`SPRKStepEvolve()`, as it provides interpolated values either of -:math:`y` or of its derivatives (up to the 5th derivative) +:math:`y` or of its derivatives. interpolated to any value of :math:`t` in the last internal step taken by :c:func:`SPRKStepEvolve()`. @@ -768,7 +767,7 @@ obtain solver performance information. We organize these into groups: :numref:`ARKODE.Usage.SPRKStep.SPRKStepRootOutputs`, #. General usability routines (e.g. to print the current SPRKStep - parameters, or output the current Butcher table) are in + parameters, or output the current Butcher tables) are in :numref:`ARKODE.Usage.SPRKStep.SPRKStepExtraOutputs`. Following each table, we elaborate on each function. @@ -782,9 +781,9 @@ SPRKStep. For example: different solver options to suggest which set of options is the most efficient. -* The ratio *nsteps/step_attempts* can measure the quality of the - time step adaptivity algorithm, since a poor algorithm will result - in more failed steps, and hence a lower ratio. +.. * The ratio *nsteps/step_attempts* can measure the quality of the +.. time step adaptivity algorithm, since a poor algorithm will result +.. in more failed steps, and hence a lower ratio. It is therefore recommended that users retrieve and output these statistics following each run, and take some time to investigate @@ -804,27 +803,27 @@ Main solver optional output functions +-----------------------------------------------------+--------------------------------------------+ | Optional output | Function name | +=====================================================+============================================+ - | Cumulative number of internal steps | :c:func:`SPRKStepGetNumSteps()` | + | Cumulative number of internal steps | :c:func:`SPRKStepGetNumSteps` | +-----------------------------------------------------+--------------------------------------------+ - | Step size used for the last successful step | :c:func:`SPRKStepGetLastStep()` | + | Step size used for the last successful step | :c:func:`SPRKStepGetLastStep` | +-----------------------------------------------------+--------------------------------------------+ - | Step size to be attempted on the next step | :c:func:`SPRKStepGetCurrentStep()` | + | Step size to be attempted on the next step | :c:func:`SPRKStepGetCurrentStep` | +-----------------------------------------------------+--------------------------------------------+ - | Current internal time reached by the solver | :c:func:`SPRKStepGetCurrentTime()` | + | Current internal time reached by the solver | :c:func:`SPRKStepGetCurrentTime` | +-----------------------------------------------------+--------------------------------------------+ - | Current internal state reached by the solver | :c:func:`SPRKStepGetCurrentState()` | + | Current internal state reached by the solver | :c:func:`SPRKStepGetCurrentState` | +-----------------------------------------------------+--------------------------------------------+ - | Single accessor to many statistics at once | :c:func:`SPRKStepGetStepStats()` | + | Single accessor to many statistics at once | :c:func:`SPRKStepGetStepStats` | +-----------------------------------------------------+--------------------------------------------+ | Print all statistics | :c:func:`SPRKStepPrintAllStats` | +-----------------------------------------------------+--------------------------------------------+ - | Name of constant associated with a return flag | :c:func:`SPRKStepGetReturnFlagName()` | + | Name of constant associated with a return flag | :c:func:`SPRKStepGetReturnFlagName` | +-----------------------------------------------------+--------------------------------------------+ - | No. of attempted steps | :c:func:`SPRKStepGetNumStepAttempts()` | + | No. of attempted steps | :c:func:`SPRKStepGetNumStepAttempts` | +-----------------------------------------------------+--------------------------------------------+ - | No. of calls to right-hand side functions | :c:func:`SPRKStepGetNumRhsEvals()` | + | No. of calls to right-hand side functions | :c:func:`SPRKStepGetNumRhsEvals` | +-----------------------------------------------------+--------------------------------------------+ - | Current method memory | :c:func:`SPRKStepGetCurrentMethod()` | + | Current method table | :c:func:`SPRKStepGetCurrentMethod` | +-----------------------------------------------------+--------------------------------------------+ | Retrieve a pointer for user data | :c:func:`SPRKStepGetUserData` | +-----------------------------------------------------+--------------------------------------------+ @@ -893,7 +892,8 @@ Main solver optional output functions * *ARK_SUCCESS* if successful * *ARK_MEM_NULL* if the ARKStep memory was ``NULL`` - **Notes:** + .. warning:: + Users should exercise extreme caution when using this function, as altering values of *ycur* may lead to undesirable behavior, depending on the particular use case and on when this routine is called. @@ -970,20 +970,7 @@ Main solver optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param nf1: number of calls to the user's :math:`f_1(t,p)` function. - :param nf2: number of calls to the user's :math:`f_2(q)` function. - - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` - - -.. c:function:: int SPRKStepGetNumErrTestFails(void* arkode_mem, long int* netfails) - - Returns the number of local error test failures that - have occurred (so far). - - :param arkode_mem: pointer to the SPRKStep memory block. - :param netfails: number of error test failures. + :param nf2: number of calls to the user's :math:`f_2(t,q)` function. :return: * *ARK_SUCCESS* if successful @@ -1131,7 +1118,7 @@ user must call the function :c:func:`SPRKStepReInit()`. The new problem must have the same size as the previous one. This routine retains the current settings for all SPRKStep module options and performs the same input checking and initializations that are done in -:c:func:`SPRKStepCreate`, but it performs no memory allocation as is +:c:func:`SPRKStepCreate`, but it performs no memory allocation as it assumes that the existing internal memory is sufficient for the new problem. A call to this re-initialization routine deletes the solution history that was stored internally during the previous @@ -1149,7 +1136,7 @@ One potential use of the :c:func:`SPRKStepReInit()` function is in the treating of jump discontinuities in the RHS function :cite:p:`Tao:22`. In lieu of including if statements within the RHS function to handle discontinuities, it may be more computationally efficient to stop at each -point of discontinuity (e.g., through use of tout or the rootfinding feature) +point of discontinuity (e.g., through use of tstop or the rootfinding feature) and restart the integrator with a readjusted ODE model, using a call to this routine. We note that for the solution to retain temporal accuracy, the RHS function should not incorporate the discontinuity. @@ -1161,8 +1148,8 @@ the RHS function should not incorporate the discontinuity. SPRKStep time-stepper module. :param arkode_mem: pointer to the SPRKStep memory block. - :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f1(q,t) = \frac{\partial V(q,t)}{\partial q}` - :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f2(p) = \frac{\partial T(p)}{\partial p}` + :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f1(t,q) = \frac{\partial V(t,q)}{\partial q}` + :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f2(t,p) = \frac{\partial T(t,p)}{\partial p}` :param t0: the initial value of :math:`t`. :param y0: the initial condition vector :math:`y(t_0)`. From 53092161f5f3ae2347ad6f0d92b032aed147923a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jul 2023 13:13:57 -0700 Subject: [PATCH 134/177] change ARKSPRKStorage to ARKSPRKTable --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 68 +++--- doc/arkode/guide/source/Butcher.rst | 24 +- .../SPRKStep_c_interface/User_callable.rst | 4 +- doc/arkode/guide/source/index.rst | 2 +- .../source/arkode/ARKodeSPRKStorage_link.rst | 2 +- doc/superbuild/source/arkode/index.rst | 2 +- examples/arkode/C_serial/ark_kepler.c | 2 +- ...LER_1_1_--tf_50_--check-order_--nout_1.out | 12 +- ...ROG_2_2_--tf_50_--check-order_--nout_1.out | 12 +- ...LAN_2_2_--tf_50_--check-order_--nout_1.out | 12 +- ...LAN_3_3_--tf_50_--check-order_--nout_1.out | 12 +- ...LAN_4_4_--tf_50_--check-order_--nout_1.out | 12 +- ...LAN_5_6_--tf_50_--check-order_--nout_1.out | 12 +- ...ROG_2_2_--tf_50_--check-order_--nout_1.out | 12 +- ...UTH_3_3_--tf_50_--check-order_--nout_1.out | 12 +- ...IDA_6_8_--tf_50_--check-order_--nout_1.out | 12 +- include/arkode/arkode_sprk.h | 18 +- include/arkode/arkode_sprkstep.h | 4 +- src/arkode/arkode_sprk.c | 76 +++---- src/arkode/arkode_sprkstep.c | 20 +- src/arkode/arkode_sprkstep_impl.h | 2 +- src/arkode/arkode_sprkstep_io.c | 14 +- src/arkode/fmod/farkode_mod.c | 136 +++++------ src/arkode/fmod/farkode_mod.f90 | 214 +++++++++--------- src/arkode/fmod/farkode_sprkstep_mod.c | 8 +- swig/arkode/farkode_mod.i | 4 +- 26 files changed, 354 insertions(+), 354 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst index 0bf97691d0..600460d60b 100644 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ b/doc/arkode/guide/source/ARKodeSPRKStorage.rst @@ -75,7 +75,7 @@ The following enum values are used to identify different SPRK methods: Identifier for the Symplectic Sofroniou 10th order method with 36 stages. -.. c:type:: ARKodeSPRKStorage_s +.. c:type:: ARKodeSPRKTableMem Structure representing the SPRK method that holds the method coefficients. @@ -97,81 +97,81 @@ The following enum values are used to identify different SPRK methods: Array of coefficients that generate the diagonally-implicit Butcher table. ``ahat[i]`` is the coefficient appearing in column i. -.. c:type:: ARKodeSPRKStorage_s* ARKodeSPRKStorage +.. c:type:: ARKodeSPRKTableMem* ARKodeSPRKTable -ARKodeSPRKStorage functions +ARKodeSPRKTable functions --------------------------- -.. _ARKodeSPRKStorage.FunctionsTable: -.. table:: ARKodeSPRKStorage functions +.. _ARKodeSPRKTable.FunctionsTable: +.. table:: ARKodeSPRKTable functions +----------------------------------------------+------------------------------------------------------------+ | **Function name** | **Description** | +==============================================+============================================================+ - | :c:func:`ARKodeSPRKStorage_Alloc()` | Allocate an empty storage structure | + | :c:func:`ARKodeSPRKTable_Alloc()` | Allocate an empty storage structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKStorage_Load()` | Load SPRK method using an identifier | + | :c:func:`ARKodeSPRKTable_Load()` | Load SPRK method using an identifier | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKStorage_LoadByName()` | Load SPRK method using a string version of the identifier | + | :c:func:`ARKodeSPRKTable_LoadByName()` | Load SPRK method using a string version of the identifier | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKStorage_Create()` | Create a new storage structure | + | :c:func:`ARKodeSPRKTable_Create()` | Create a new storage structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKStorage_Copy()` | Create a copy of a storage structure | + | :c:func:`ARKodeSPRKTable_Copy()` | Create a copy of a storage structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKStorage_Space()` | Get the storage structure real and integer workspace size | + | :c:func:`ARKodeSPRKTableMempace()` | Get the storage structure real and integer workspace size | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKStorage_Free()` | Deallocate a storage structure | + | :c:func:`ARKodeSPRKTable_Free()` | Deallocate a storage structure | +----------------------------------------------+------------------------------------------------------------+ -.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) - Allocate memory for an :c:type:`ARKodeSPRKStorage`` structure with the specified number of stages. + Allocate memory for an :c:type:`ARKodeSPRKTable`` structure with the specified number of stages. :param stages: The number of stages. - :return: ARKodeSPRKStorage structure for the loaded method. + :return: ARKodeSPRKTable structure for the loaded method. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Load(ARKODE_SPRKMethodID id) - Load the ARKodeSPRKStorage structure for the specified method ID. + Load the ARKodeSPRKTable structure for the specified method ID. :param id: The ID of the SPRK method. One of :ref:`SPRKStorage.id`. - :return: ARKodeSPRKStorage structure for the loaded method. + :return: ARKodeSPRKTable structure for the loaded method. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_LoadByName(const char* method) - Load the ARKodeSPRKStorage structure for the specified method name. + Load the ARKodeSPRKTable structure for the specified method name. :param method: The name of the SPRK method. Must be one of :ref:`SPRKStorage.id` but as a string. - :return: ARKodeSPRKStorage structure for the loaded method. + :return: ARKodeSPRKTable structure for the loaded method. -.. c:function:: ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage B) +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable B) - Create a copy of the ARKodeSPRKStorage structure. + Create a copy of the ARKodeSPRKTable structure. - :param B: The ARKodeSPRKStorage structure to copy. - :return: Pointer to the copied ARKodeSPRKStorage structure. + :param B: The ARKodeSPRKTable structure to copy. + :return: Pointer to the copied ARKodeSPRKTable structure. -.. c:function:: void ARKodeSPRKStorage_Space(ARKodeSPRKStorage B, sunindextype* liw, sunindextype* lrw) +.. c:function:: void ARKodeSPRKTableMempace(ARKodeSPRKTable B, sunindextype* liw, sunindextype* lrw) - Get the workspace sizes required for the ARKodeSPRKStorage structure. + Get the workspace sizes required for the ARKodeSPRKTable structure. - :param B: The ARKodeSPRKStorage structure. + :param B: The ARKodeSPRKTable structure. :param liw: Pointer to store the integer workspace size. :param lrw: Pointer to store the real workspace size. -.. c:function:: void ARKodeSPRKStorage_Free(ARKodeSPRKStorage B) +.. c:function:: void ARKodeSPRKTable_Free(ARKodeSPRKTable B) - Free the memory allocated for the ARKodeSPRKStorage structure. + Free the memory allocated for the ARKodeSPRKTable structure. - :param B: The ARKodeSPRKStorage structure to free. + :param B: The ARKodeSPRKTable structure to free. -.. c:function:: int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, ARKodeSPRKStorage* a_ptr, ARKodeSPRKStorage* b_ptr) +.. c:function:: int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_storage, ARKodeSPRKTable* a_ptr, ARKodeSPRKTable* b_ptr) - Convert the ARKodeSPRKStorage structure to the Butcher table representation. + Convert the ARKodeSPRKTable structure to the Butcher table representation. - :param sprk_storage: The ARKodeSPRKStorage structure. + :param sprk_storage: The ARKodeSPRKTable structure. :param a_ptr: Pointer to store the explicit Butcher table. :param b_ptr: Pointer to store the diagonally-implicit Butcher table. diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 64aa168dc3..cad6142dc3 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1718,7 +1718,7 @@ ARKODE_SPRK_EULER_1_1 .. index:: 1st-order symplectic Euler method Accessible via the constant ``ARKODE_SPRK_EULER_1_1`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the classic Symplectic Euler method. @@ -1728,7 +1728,7 @@ ARKODE_SPRK_LEAPFROG_2_2 .. index:: 2nd-order Leapfrog method Accessible via the constant ``ARKODE_SPRK_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the classic Leapfrog/Verlet method. @@ -1738,7 +1738,7 @@ ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 .. index:: 2nd-order Pseudo Leapfrog method Accessible via the constant ``ARKODE_SPRK_PSEUDO_LEAPFROG_2_2`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the classic Pseudo Leapfrog/Verlet method. @@ -1748,7 +1748,7 @@ ARKODE_SPRK_MCLACHLAN_2_2 .. index:: 2nd-order McLachlan method Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_2_2`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1758,7 +1758,7 @@ ARKODE_SPRK_RUTH_3_3 .. index:: 3rd-order Ruth method Accessible via the constant ``ARKODE_SPRK_RUTH_3_3`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. @@ -1768,7 +1768,7 @@ ARKODE_SPRK_MCLACHLAN_3_3 .. index:: 3rd-order McLachlan method Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_3_3`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1778,7 +1778,7 @@ ARKODE_SPRK_MCLACHLAN_4_4 .. index:: 4th-order McLachlan method Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_4_4`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. .. warning:: @@ -1792,7 +1792,7 @@ ARKODE_SPRK_CANDY_ROZMUS_4_4 .. index:: 4th-order Candy-Rozmus method Accessible via the constant ``ARKODE_SPRK_CANDY_ROZMUS_4_4`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. @@ -1802,7 +1802,7 @@ ARKODE_SPRK_MCLACHLAN_5_6 .. index:: 5th-order McLachlan method Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_5_6`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. .. warning:: @@ -1816,7 +1816,7 @@ ARKODE_SPRK_YOSHIDA_6_8 .. index:: 6th-order Yoshida method Accessible via the constant ``ARKODE_SPRK_YOSHIDA_6_8`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. @@ -1826,7 +1826,7 @@ ARKODE_SPRK_SUZUKI_UMENO_8_16 .. index:: 8th-order Suzuki-Umeno method Accessible via the constant ``ARKODE_SPRK_SUZUKI_UMENO_8_16`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 8th order method given by Suzuki and Umeno in :cite:p:`Suzuki:93`. @@ -1836,5 +1836,5 @@ ARKODE_SPRK_SOFRONIOU_10_36 .. index:: 10th-order Sofroniou-Spaletta method Accessible via the constant ``ARKODE_SPRK_SOFRONIOU_10_36`` to -:c:func:`ARKodeSPRKStorage_Load` or :c:func:`ARKodeSPRKStorage_LoadByName`. +:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 10th order method given by Sofroniou and Spaletta in :cite:p:`Sofroniou:05`. diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index d6ada2075b..2e3909f64d 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -576,7 +576,7 @@ Optional inputs for IVP method selection :c:func:`SPRKStepSetMethod` or :c:func:`SPRKStepMethodByName`. -.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) +.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKTable sprk_storage) Specifies the SPRK method. @@ -978,7 +978,7 @@ Main solver optional output functions -.. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKStorage *sprk_storage) +.. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKTable *sprk_storage) Returns the SPRK method coefficient structure currently in use by the solver. diff --git a/doc/arkode/guide/source/index.rst b/doc/arkode/guide/source/index.rst index d09a3a4b83..fd61ab5981 100644 --- a/doc/arkode/guide/source/index.rst +++ b/doc/arkode/guide/source/index.rst @@ -59,7 +59,7 @@ with support by the `US Department of Energy `_, sundials/index.rst Usage/index.rst ARKodeButcherTable - ARKodeSPRKStorage + ARKodeSPRKTable nvectors/index.rst sunmatrix/index.rst sunlinsol/index.rst diff --git a/doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst b/doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst index eaeff6cd6b..546f3f59de 100644 --- a/doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst +++ b/doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst @@ -10,4 +10,4 @@ SUNDIALS Copyright End ---------------------------------------------------------------- -.. include:: ../../../arkode/guide/source/ARKodeSPRKStorage.rst +.. include:: ../../../arkode/guide/source/ARKodeSPRKTable.rst diff --git a/doc/superbuild/source/arkode/index.rst b/doc/superbuild/source/arkode/index.rst index 73277dd5a2..5d09b7044c 100644 --- a/doc/superbuild/source/arkode/index.rst +++ b/doc/superbuild/source/arkode/index.rst @@ -24,6 +24,6 @@ ARKODE Documentation Organization_link.rst Usage/index.rst ARKodeButcherTable_link.rst - ARKodeSPRKStorage_link.rst + ARKodeSPRKTable_link.rst Constants_link.rst Butcher_link.rst diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index de54f48a13..95f0023cf9 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -492,7 +492,7 @@ int main(int argc, char* argv[]) sunrealtype con_orders[NUM_DT]; sunrealtype acc_errors[NUM_DT]; sunrealtype con_errors[NUM_DT]; - int expected_order = ARKodeSPRKStorage_LoadByName(args.method_name)->q; + int expected_order = ARKodeSPRKTable_LoadByName(args.method_name)->q; N_Vector ref_sol = N_VClone(result.sol); N_Vector error = N_VClone(result.sol); sunrealtype a11 = 0, a12 = 0, a21 = 0, a22 = 0; diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out index e99de1f424..e556138fbd 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out @@ -260,9 +260,9 @@ Order of accuracy wrt Hamiltonian: expe Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153af06c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7fdf153af06c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 - #3 0x7fdf153af322 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 + #3 0x7fdf153af322 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -334,17 +334,17 @@ Indirect leak of 24 byte(s) in 1 object(s) allocated from: Indirect leak of 8 byte(s) in 1 object(s) allocated from: #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153af149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7fdf153af149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 - #3 0x7fdf153af322 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 + #3 0x7fdf153af322 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) Indirect leak of 8 byte(s) in 1 object(s) allocated from: #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153af1af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7fdf153af1af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 - #3 0x7fdf153af322 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 + #3 0x7fdf153af322 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out index d171b103d2..49417b27b1 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -260,9 +260,9 @@ Order of accuracy wrt Hamiltonian: ex Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec22206c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7fa2ec22206c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 - #3 0x7fa2ec22235b in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 + #3 0x7fa2ec22235b in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -334,17 +334,17 @@ Indirect leak of 24 byte(s) in 1 object(s) allocated from: Indirect leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec222149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7fa2ec222149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 - #3 0x7fa2ec22235b in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 + #3 0x7fa2ec22235b in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) Indirect leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec2221af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7fa2ec2221af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 - #3 0x7fa2ec22235b in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 + #3 0x7fa2ec22235b in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out index 21996f4ff5..8682e5b47b 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out @@ -260,9 +260,9 @@ Order of accuracy wrt Hamiltonian: expec Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a6006c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7fae48a6006c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 - #3 0x7fae48a60406 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 + #3 0x7fae48a60406 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -334,17 +334,17 @@ Indirect leak of 24 byte(s) in 1 object(s) allocated from: Indirect leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a60149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7fae48a60149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 - #3 0x7fae48a60406 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 + #3 0x7fae48a60406 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) Indirect leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a601af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7fae48a601af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 - #3 0x7fae48a60406 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 + #3 0x7fae48a60406 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out index 2d2ce1c52e..311da99ef3 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out @@ -13,9 +13,9 @@ Direct leak of 24 byte(s) in 1 object(s) allocated from: Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16913d06c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7fb16913d06c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 - #3 0x7fb16913d43f in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 + #3 0x7fb16913d43f in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -62,17 +62,17 @@ Indirect leak of 32 byte(s) in 1 object(s) allocated from: Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16913d1af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7fb16913d1af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 - #3 0x7fb16913d43f in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 + #3 0x7fb16913d43f in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16913d149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7fb16913d149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 - #3 0x7fb16913d43f in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 + #3 0x7fb16913d43f in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out index aedb664b3c..2bc968dcfb 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out @@ -4,9 +4,9 @@ Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6bd06c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7f06fe6bd06c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 - #3 0x7f06fe6bd478 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 + #3 0x7f06fe6bd478 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -48,9 +48,9 @@ Indirect leak of 448 byte(s) in 1 object(s) allocated from: Indirect leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6bd1af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7f06fe6bd1af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 - #3 0x7f06fe6bd478 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 + #3 0x7f06fe6bd478 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -63,9 +63,9 @@ Indirect leak of 32 byte(s) in 1 object(s) allocated from: Indirect leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6bd149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7f06fe6bd149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 - #3 0x7f06fe6bd478 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 + #3 0x7f06fe6bd478 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out index 727c16e46b..ac937a5c03 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out @@ -22,9 +22,9 @@ Direct leak of 24 byte(s) in 1 object(s) allocated from: Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41164e06c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7fe41164e06c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 - #3 0x7fe41164e4ea in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 + #3 0x7fe41164e4ea in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -48,17 +48,17 @@ Indirect leak of 448 byte(s) in 1 object(s) allocated from: Indirect leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41164e1af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7fe41164e1af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 - #3 0x7fe41164e4ea in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 + #3 0x7fe41164e4ea in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) Indirect leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41164e149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7fe41164e149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 - #3 0x7fe41164e4ea in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 + #3 0x7fe41164e4ea in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out index bbe2200435..66bb32e956 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -260,9 +260,9 @@ Order of accuracy wrt Hamiltonian: expec Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272b506c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7ff4272b506c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 - #3 0x7ff4272b5394 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 + #3 0x7ff4272b5394 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -334,17 +334,17 @@ Indirect leak of 24 byte(s) in 1 object(s) allocated from: Indirect leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272b5149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7ff4272b5149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 - #3 0x7ff4272b5394 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 + #3 0x7ff4272b5394 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) Indirect leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272b51af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7ff4272b51af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 - #3 0x7ff4272b5394 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 + #3 0x7ff4272b5394 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out index 286c42fc93..c0bde25829 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out @@ -13,9 +13,9 @@ Direct leak of 24 byte(s) in 1 object(s) allocated from: Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beaf306c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7fa9beaf306c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 - #3 0x7fa9beaf33cd in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 + #3 0x7fa9beaf33cd in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -62,17 +62,17 @@ Indirect leak of 32 byte(s) in 1 object(s) allocated from: Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beaf31af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7fa9beaf31af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 - #3 0x7fa9beaf33cd in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 + #3 0x7fa9beaf33cd in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beaf3149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7fa9beaf3149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 - #3 0x7fa9beaf33cd in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 + #3 0x7fa9beaf33cd in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out index a5c80f805d..1d856af12c 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out @@ -22,9 +22,9 @@ Direct leak of 24 byte(s) in 1 object(s) allocated from: Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc4487306c in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 + #1 0x7fbc4487306c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 - #3 0x7fbc44873523 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 + #3 0x7fbc44873523 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) @@ -48,17 +48,17 @@ Indirect leak of 448 byte(s) in 1 object(s) allocated from: Indirect leak of 64 byte(s) in 1 object(s) allocated from: #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448731af in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 + #1 0x7fbc448731af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 - #3 0x7fbc44873523 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 + #3 0x7fbc44873523 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) Indirect leak of 64 byte(s) in 1 object(s) allocated from: #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc44873149 in ARKodeSPRKStorage_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 + #1 0x7fbc44873149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 - #3 0x7fbc44873523 in ARKodeSPRKStorage_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 + #3 0x7fbc44873523 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index ed5da0a9e2..a50c75396e 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -42,7 +42,7 @@ typedef enum ARKODE_MAX_SPRK_NUM = ARKODE_SPRK_SOFRONIOU_10_36 } ARKODE_SPRKMethodID; -struct ARKodeSPRKStorage_s +struct ARKodeSPRKTableMem { /* method order of accuracy */ int q; @@ -54,29 +54,29 @@ struct ARKodeSPRKStorage_s sunrealtype* ahat; }; -typedef _SUNDIALS_STRUCT_ ARKodeSPRKStorage_s* ARKodeSPRKStorage; +typedef _SUNDIALS_STRUCT_ ARKodeSPRKTableMem* ARKodeSPRKTable; /* Utility routines to allocate/free/output SPRK structures */ SUNDIALS_EXPORT -ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages); +ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages); SUNDIALS_EXPORT -ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id); +ARKodeSPRKTable ARKodeSPRKTable_Load(ARKODE_SPRKMethodID id); SUNDIALS_EXPORT -ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method); +ARKodeSPRKTable ARKodeSPRKTable_LoadByName(const char* method); SUNDIALS_EXPORT -ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage); +ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable that_sprk_storage); SUNDIALS_EXPORT -void ARKodeSPRKStorage_Space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, +void ARKodeSPRKTableMempace(ARKodeSPRKTable sprk_storage, sunindextype* liw, sunindextype* lrw); SUNDIALS_EXPORT -void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage); +void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_storage); SUNDIALS_EXPORT -int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, +int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_storage, ARKodeButcherTable* erk_ptr, ARKodeButcherTable* dirk_ptr); diff --git a/include/arkode/arkode_sprkstep.h b/include/arkode/arkode_sprkstep.h index 7d33ce31e6..566f444d49 100644 --- a/include/arkode/arkode_sprkstep.h +++ b/include/arkode/arkode_sprkstep.h @@ -61,7 +61,7 @@ SUNDIALS_EXPORT int SPRKStepSetDefaults(void* arkode_mem); SUNDIALS_EXPORT int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int SPRKStepSetMethod(void* arkode_mem, - ARKodeSPRKStorage sprk_storage); + ARKodeSPRKTable sprk_storage); SUNDIALS_EXPORT int SPRKStepSetMethodName(void* arkode_mem, const char* method); SUNDIALS_EXPORT int SPRKStepSetOrder(void* arkode_mem, int maxord); SUNDIALS_EXPORT int SPRKStepSetInterpolantType(void* arkode_mem, int itype); @@ -90,7 +90,7 @@ SUNDIALS_EXPORT int SPRKStepGetDky(void* arkode_mem, realtype t, int k, /* Optional output functions */ SUNDIALS_EXPORT char* SPRKStepGetReturnFlagName(long int flag); SUNDIALS_EXPORT int SPRKStepGetCurrentMethod(void* arkode_mem, - ARKodeSPRKStorage* sprk_storage); + ARKodeSPRKTable* sprk_storage); SUNDIALS_EXPORT int SPRKStepGetCurrentState(void* arkode_mem, N_Vector* state); SUNDIALS_EXPORT int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur); SUNDIALS_EXPORT int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 5e7837b1ef..ae893c0ee5 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -20,9 +20,9 @@ #include #include -ARKodeSPRKStorage ARKodeSymplecticEuler() +ARKodeSPRKTable ARKodeSymplecticEuler() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(1); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(1); if (!sprk_storage) { return NULL; } sprk_storage->q = 1; sprk_storage->stages = 1; @@ -40,9 +40,9 @@ ARKodeSPRKStorage ARKodeSymplecticEuler() https://doi.org/10.1016/0021-9991(91)90299-Z. */ -ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() +ARKodeSPRKTable ARKodeSymplecticLeapfrog2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(2); if (!sprk_storage) { return NULL; } sprk_storage->q = 2; sprk_storage->stages = 2; @@ -53,9 +53,9 @@ ARKodeSPRKStorage ARKodeSymplecticLeapfrog2() return sprk_storage; } -ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() +ARKodeSPRKTable ARKodeSymplecticPseudoLeapfrog2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(2); if (!sprk_storage) { return NULL; } sprk_storage->q = 2; sprk_storage->stages = 2; @@ -66,9 +66,9 @@ ARKodeSPRKStorage ARKodeSymplecticPseudoLeapfrog2() return sprk_storage; } -ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() +ARKodeSPRKTable ARKodeSymplecticCandyRozmus4() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(4); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(4); if (!sprk_storage) { return NULL; } sprk_storage->q = 4; sprk_storage->stages = 4; @@ -105,9 +105,9 @@ ARKodeSPRKStorage ARKodeSymplecticCandyRozmus4() https://accelconf.web.cern.ch/p83/PDF/PAC1983_2669.PDF */ -ARKodeSPRKStorage ARKodeSymplecticRuth3() +ARKodeSPRKTable ARKodeSymplecticRuth3() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(3); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(3); if (!sprk_storage) { return NULL; } sprk_storage->q = 3; sprk_storage->stages = 3; @@ -127,9 +127,9 @@ ARKodeSPRKStorage ARKodeSymplecticRuth3() Nonlinearity. 5, 541–562 (1992). https://doi.org/10.1088/0951-7715/5/2/011 */ -ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() +ARKodeSPRKTable ARKodeSymplecticMcLachlan2() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(2); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(2); if (!sprk_storage) { return NULL; } sprk_storage->q = 2; sprk_storage->stages = 2; @@ -142,12 +142,12 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan2() return sprk_storage; } -ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() +ARKodeSPRKTable ARKodeSymplecticMcLachlan3() { sunrealtype w = 0.0; sunrealtype y = 0.0; sunrealtype z = 0.0; - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(3); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(3); if (!sprk_storage) { return NULL; } sprk_storage->q = 3; @@ -171,9 +171,9 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan3() return sprk_storage; } -ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() +ARKodeSPRKTable ARKodeSymplecticMcLachlan4() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(4); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(4); if (!sprk_storage) { return NULL; } sprk_storage->q = 4; sprk_storage->stages = 4; @@ -188,9 +188,9 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan4() return sprk_storage; } -ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() +ARKodeSPRKTable ARKodeSymplecticMcLachlan5() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(6); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(6); if (!sprk_storage) { return NULL; } sprk_storage->q = 5; sprk_storage->stages = 6; @@ -218,9 +218,9 @@ ARKodeSPRKStorage ARKodeSymplecticMcLachlan5() */ -ARKodeSPRKStorage ARKodeSymplecticYoshida6() +ARKodeSPRKTable ARKodeSymplecticYoshida6() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(8); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(8); if (!sprk_storage) { return NULL; } sprk_storage->q = 6; sprk_storage->stages = 8; @@ -260,9 +260,9 @@ ARKodeSPRKStorage ARKodeSymplecticYoshida6() */ -ARKodeSPRKStorage ARKodeSymplecticSuzukiUmeno816() +ARKodeSPRKTable ARKodeSymplecticSuzukiUmeno816() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(16); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(16); if (!sprk_storage) { return NULL; } sprk_storage->q = 8; sprk_storage->stages = 16; @@ -317,9 +317,9 @@ ARKodeSPRKStorage ARKodeSymplecticSuzukiUmeno816() */ -ARKodeSPRKStorage ARKodeSymplecticSofroniou10() +ARKodeSPRKTable ARKodeSymplecticSofroniou10() { - ARKodeSPRKStorage sprk_storage = ARKodeSPRKStorage_Alloc(36); + ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(36); if (!sprk_storage) { return NULL; } sprk_storage->q = 10; sprk_storage->stages = 36; @@ -417,26 +417,26 @@ ARKodeSPRKStorage ARKodeSymplecticSofroniou10() return sprk_storage; } -ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) +ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) { - ARKodeSPRKStorage sprk_storage = NULL; + ARKodeSPRKTable sprk_storage = NULL; - sprk_storage = (ARKodeSPRKStorage)malloc(sizeof(struct ARKodeSPRKStorage_s)); + sprk_storage = (ARKodeSPRKTable)malloc(sizeof(struct ARKodeSPRKTableMem)); if (!sprk_storage) { return NULL; } - memset(sprk_storage, 0, sizeof(struct ARKodeSPRKStorage_s)); + memset(sprk_storage, 0, sizeof(struct ARKodeSPRKTableMem)); sprk_storage->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); if (!(sprk_storage->ahat)) { - ARKodeSPRKStorage_Free(sprk_storage); + ARKodeSPRKTable_Free(sprk_storage); return NULL; } sprk_storage->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); if (!(sprk_storage->a)) { - ARKodeSPRKStorage_Free(sprk_storage); + ARKodeSPRKTable_Free(sprk_storage); return NULL; } @@ -447,7 +447,7 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Alloc(int stages) return sprk_storage; } -ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) +ARKodeSPRKTable ARKodeSPRKTable_Load(ARKODE_SPRKMethodID id) { switch (id) { @@ -468,7 +468,7 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Load(ARKODE_SPRKMethodID id) } } -ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) +ARKodeSPRKTable ARKodeSPRKTable_LoadByName(const char* method) { if (!strcmp(method, "ARKODE_SPRK_EULER_1_1")) { @@ -521,12 +521,12 @@ ARKodeSPRKStorage ARKodeSPRKStorage_LoadByName(const char* method) return NULL; } -ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage) +ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable that_sprk_storage) { int i = 0; - ARKodeSPRKStorage sprk_storage = NULL; + ARKodeSPRKTable sprk_storage = NULL; - sprk_storage = ARKodeSPRKStorage_Alloc(that_sprk_storage->stages); + sprk_storage = ARKodeSPRKTable_Alloc(that_sprk_storage->stages); sprk_storage->q = that_sprk_storage->q; @@ -539,14 +539,14 @@ ARKodeSPRKStorage ARKodeSPRKStorage_Copy(ARKodeSPRKStorage that_sprk_storage) return sprk_storage; } -void ARKodeSPRKStorage_Space(ARKodeSPRKStorage sprk_storage, sunindextype* liw, +void ARKodeSPRKTableMempace(ARKodeSPRKTable sprk_storage, sunindextype* liw, sunindextype* lrw) { *liw = 2; *lrw = sprk_storage->stages * 2; } -void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage) +void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_storage) { if (sprk_storage) { @@ -556,7 +556,7 @@ void ARKodeSPRKStorage_Free(ARKodeSPRKStorage sprk_storage) } } -int ARKodeSPRKStorage_ToButcher(ARKodeSPRKStorage sprk_storage, +int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_storage, ARKodeButcherTable* erk_ptr, ARKodeButcherTable* dirk_ptr) { diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 64b7d0710c..ebe5c0de8d 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -344,7 +344,7 @@ void SPRKStepFree(void** arkode_mem) step_mem->yerr = NULL; } - ARKodeSPRKStorage_Free(step_mem->method); + ARKodeSPRKTable_Free(step_mem->method); free(ark_mem->step_mem); ark_mem->step_mem = NULL; @@ -400,33 +400,33 @@ int sprkStep_Init(void* arkode_mem, int init_type) switch (step_mem->q) { case 1: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_1); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_1); break; case 2: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_2); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_2); break; case 3: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_3); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_3); break; case 4: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_4); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_4); break; case 5: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_5); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_5); break; case 6: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_6); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_6); break; case 7: case 8: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_8); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_8); break; case 9: case 10: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_10); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_10); break; default: - step_mem->method = ARKodeSPRKStorage_Load(SPRKSTEP_DEFAULT_4); + step_mem->method = ARKodeSPRKTable_Load(SPRKSTEP_DEFAULT_4); break; } } diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 87ffa08e29..b24f3b62f8 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -46,7 +46,7 @@ extern "C" { typedef struct ARKodeSPRKStepMemRec { /* SPRK method and storage */ - ARKodeSPRKStorage method; /* method spec */ + ARKodeSPRKTable method; /* method spec */ int q; /* method order */ N_Vector sdata; /* persisted stage data */ N_Vector yerr; /* error vector for compensated summation */ diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 73094ce519..9673271de5 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -248,7 +248,7 @@ int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) ** Note in documentation that this should not be called along with SPRKStepSetOrder. ** ---------------------------------------------------------------*/ -int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) +int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKTable sprk_storage) { ARKodeMem ark_mem = NULL; ARKodeSPRKStepMem step_mem = NULL; @@ -261,11 +261,11 @@ int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKStorage sprk_storage) if (step_mem->method) { - ARKodeSPRKStorage_Free(step_mem->method); + ARKodeSPRKTable_Free(step_mem->method); step_mem->method = NULL; } - step_mem->method = ARKodeSPRKStorage_Copy(sprk_storage); + step_mem->method = ARKodeSPRKTable_Copy(sprk_storage); return (ARK_SUCCESS); } @@ -288,11 +288,11 @@ int SPRKStepSetMethodName(void* arkode_mem, const char* method) if (step_mem->method) { - ARKodeSPRKStorage_Free(step_mem->method); + ARKodeSPRKTable_Free(step_mem->method); step_mem->method = NULL; } - step_mem->method = ARKodeSPRKStorage_LoadByName(method); + step_mem->method = ARKodeSPRKTable_LoadByName(method); return step_mem->method ? ARK_SUCCESS : ARK_ILL_INPUT; } @@ -324,7 +324,7 @@ int SPRKStepSetOrder(void* arkode_mem, int ord) if (step_mem->method) { - ARKodeSPRKStorage_Free(step_mem->method); + ARKodeSPRKTable_Free(step_mem->method); step_mem->method = NULL; } @@ -362,7 +362,7 @@ int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) Returns the stepper method structure. ---------------------------------------------------------------*/ -int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKStorage* sprk_storage) +int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKTable* sprk_storage) { ARKodeMem ark_mem = NULL; ARKodeSPRKStepMem step_mem = NULL; diff --git a/src/arkode/fmod/farkode_mod.c b/src/arkode/fmod/farkode_mod.c index 2312a9e2ac..cfc6a6ed08 100644 --- a/src/arkode/fmod/farkode_mod.c +++ b/src/arkode/fmod/farkode_mod.c @@ -804,125 +804,125 @@ SWIGEXPORT void * _wrap_FARKodeButcherTable_LoadERKByName(SwigArrayWrapper *farg } -SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_q_set(SwigClassWrapper const *farg1, int const *farg2) { - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; +SWIGEXPORT void _wrap_ARKodeSPRKTableMem_q_set(SwigClassWrapper const *farg1, int const *farg2) { + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; int arg2 ; - SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::q", return ); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::q", return ); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); arg2 = (int)(*farg2); if (arg1) (arg1)->q = arg2; } -SWIGEXPORT int _wrap_ARKodeSPRKStorage_s_q_get(SwigClassWrapper const *farg1) { +SWIGEXPORT int _wrap_ARKodeSPRKTableMem_q_get(SwigClassWrapper const *farg1) { int fresult ; - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; int result; - SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::q", return 0); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::q", return 0); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); result = (int) ((arg1)->q); fresult = (int)(result); return fresult; } -SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_stages_set(SwigClassWrapper const *farg1, int const *farg2) { - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; +SWIGEXPORT void _wrap_ARKodeSPRKTableMem_stages_set(SwigClassWrapper const *farg1, int const *farg2) { + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; int arg2 ; - SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::stages", return ); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::stages", return ); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); arg2 = (int)(*farg2); if (arg1) (arg1)->stages = arg2; } -SWIGEXPORT int _wrap_ARKodeSPRKStorage_s_stages_get(SwigClassWrapper const *farg1) { +SWIGEXPORT int _wrap_ARKodeSPRKTableMem_stages_get(SwigClassWrapper const *farg1) { int fresult ; - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; int result; - SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::stages", return 0); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::stages", return 0); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); result = (int) ((arg1)->stages); fresult = (int)(result); return fresult; } -SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_a_set(SwigClassWrapper const *farg1, double *farg2) { - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; +SWIGEXPORT void _wrap_ARKodeSPRKTableMem_a_set(SwigClassWrapper const *farg1, double *farg2) { + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; sunrealtype *arg2 = (sunrealtype *) 0 ; - SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::a", return ); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::a", return ); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); arg2 = (sunrealtype *)(farg2); if (arg1) (arg1)->a = arg2; } -SWIGEXPORT double * _wrap_ARKodeSPRKStorage_s_a_get(SwigClassWrapper const *farg1) { +SWIGEXPORT double * _wrap_ARKodeSPRKTableMem_a_get(SwigClassWrapper const *farg1) { double * fresult ; - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; sunrealtype *result = 0 ; - SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::a", return 0); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::a", return 0); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); result = (sunrealtype *) ((arg1)->a); fresult = result; return fresult; } -SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_ahat_set(SwigClassWrapper const *farg1, double *farg2) { - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; +SWIGEXPORT void _wrap_ARKodeSPRKTableMem_ahat_set(SwigClassWrapper const *farg1, double *farg2) { + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; sunrealtype *arg2 = (sunrealtype *) 0 ; - SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::ahat", return ); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::ahat", return ); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); arg2 = (sunrealtype *)(farg2); if (arg1) (arg1)->ahat = arg2; } -SWIGEXPORT double * _wrap_ARKodeSPRKStorage_s_ahat_get(SwigClassWrapper const *farg1) { +SWIGEXPORT double * _wrap_ARKodeSPRKTableMem_ahat_get(SwigClassWrapper const *farg1) { double * fresult ; - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; sunrealtype *result = 0 ; - SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::ahat", return 0); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable_nonnull(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::ahat", return 0); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); result = (sunrealtype *) ((arg1)->ahat); fresult = result; return fresult; } -SWIGEXPORT SwigClassWrapper _wrap_new_ARKodeSPRKStorage_s() { +SWIGEXPORT SwigClassWrapper _wrap_new_ARKodeSPRKTableMem() { SwigClassWrapper fresult ; - struct ARKodeSPRKStorage_s *result = 0 ; + struct ARKodeSPRKTableMem *result = 0 ; - result = (struct ARKodeSPRKStorage_s *)calloc(1, sizeof(struct ARKodeSPRKStorage_s)); + result = (struct ARKodeSPRKTableMem *)calloc(1, sizeof(struct ARKodeSPRKTableMem)); fresult.cptr = result; fresult.cmemflags = SWIG_MEM_RVALUE | (1 ? SWIG_MEM_OWN : 0); return fresult; } -SWIGEXPORT void _wrap_delete_ARKodeSPRKStorage_s(SwigClassWrapper *farg1) { - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; +SWIGEXPORT void _wrap_delete_ARKodeSPRKTableMem(SwigClassWrapper *farg1) { + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; - SWIG_check_mutable(*farg1, "struct ARKodeSPRKStorage_s *", "ARKodeSPRKStorage_s", "ARKodeSPRKStorage_s::~ARKodeSPRKStorage_s()", return ); - arg1 = (struct ARKodeSPRKStorage_s *)(farg1->cptr); + SWIG_check_mutable(*farg1, "struct ARKodeSPRKTableMem *", "ARKodeSPRKTableMem", "ARKodeSPRKTableMem::~ARKodeSPRKTableMem()", return ); + arg1 = (struct ARKodeSPRKTableMem *)(farg1->cptr); free((char *) arg1); } -SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_op_assign__(SwigClassWrapper *farg1, SwigClassWrapper const *farg2) { - struct ARKodeSPRKStorage_s *arg1 = (struct ARKodeSPRKStorage_s *) 0 ; - struct ARKodeSPRKStorage_s *arg2 = 0 ; +SWIGEXPORT void _wrap_ARKodeSPRKTableMem_op_assign__(SwigClassWrapper *farg1, SwigClassWrapper const *farg2) { + struct ARKodeSPRKTableMem *arg1 = (struct ARKodeSPRKTableMem *) 0 ; + struct ARKodeSPRKTableMem *arg2 = 0 ; (void)sizeof(arg1); (void)sizeof(arg2); @@ -931,85 +931,85 @@ SWIGEXPORT void _wrap_ARKodeSPRKStorage_s_op_assign__(SwigClassWrapper *farg1, S } -SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Alloc(int const *farg1) { +SWIGEXPORT void * _wrap_FARKodeSPRKTable_Alloc(int const *farg1) { void * fresult ; int arg1 ; - ARKodeSPRKStorage result; + ARKodeSPRKTable result; arg1 = (int)(*farg1); - result = (ARKodeSPRKStorage)ARKodeSPRKStorage_Alloc(arg1); + result = (ARKodeSPRKTable)ARKodeSPRKTable_Alloc(arg1); fresult = result; return fresult; } -SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Load(int const *farg1) { +SWIGEXPORT void * _wrap_FARKodeSPRKTable_Load(int const *farg1) { void * fresult ; ARKODE_SPRKMethodID arg1 ; - ARKodeSPRKStorage result; + ARKodeSPRKTable result; arg1 = (ARKODE_SPRKMethodID)(*farg1); - result = (ARKodeSPRKStorage)ARKodeSPRKStorage_Load(arg1); + result = (ARKodeSPRKTable)ARKodeSPRKTable_Load(arg1); fresult = result; return fresult; } -SWIGEXPORT void * _wrap_FARKodeSPRKStorage_LoadByName(SwigArrayWrapper *farg1) { +SWIGEXPORT void * _wrap_FARKodeSPRKTable_LoadByName(SwigArrayWrapper *farg1) { void * fresult ; char *arg1 = (char *) 0 ; - ARKodeSPRKStorage result; + ARKodeSPRKTable result; arg1 = (char *)(farg1->data); - result = (ARKodeSPRKStorage)ARKodeSPRKStorage_LoadByName((char const *)arg1); + result = (ARKodeSPRKTable)ARKodeSPRKTable_LoadByName((char const *)arg1); fresult = result; return fresult; } -SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Copy(void *farg1) { +SWIGEXPORT void * _wrap_FARKodeSPRKTable_Copy(void *farg1) { void * fresult ; - ARKodeSPRKStorage arg1 = (ARKodeSPRKStorage) 0 ; - ARKodeSPRKStorage result; + ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; + ARKodeSPRKTable result; - arg1 = (ARKodeSPRKStorage)(farg1); - result = (ARKodeSPRKStorage)ARKodeSPRKStorage_Copy(arg1); + arg1 = (ARKodeSPRKTable)(farg1); + result = (ARKodeSPRKTable)ARKodeSPRKTable_Copy(arg1); fresult = result; return fresult; } -SWIGEXPORT void _wrap_FARKodeSPRKStorage_Space(void *farg1, int64_t *farg2, int64_t *farg3) { - ARKodeSPRKStorage arg1 = (ARKodeSPRKStorage) 0 ; +SWIGEXPORT void _wrap_FARKodeSPRKTableMempace(void *farg1, int64_t *farg2, int64_t *farg3) { + ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; sunindextype *arg2 = (sunindextype *) 0 ; sunindextype *arg3 = (sunindextype *) 0 ; - arg1 = (ARKodeSPRKStorage)(farg1); + arg1 = (ARKodeSPRKTable)(farg1); arg2 = (sunindextype *)(farg2); arg3 = (sunindextype *)(farg3); - ARKodeSPRKStorage_Space(arg1,arg2,arg3); + ARKodeSPRKTableMempace(arg1,arg2,arg3); } -SWIGEXPORT void _wrap_FARKodeSPRKStorage_Free(void *farg1) { - ARKodeSPRKStorage arg1 = (ARKodeSPRKStorage) 0 ; +SWIGEXPORT void _wrap_FARKodeSPRKTable_Free(void *farg1) { + ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; - arg1 = (ARKodeSPRKStorage)(farg1); - ARKodeSPRKStorage_Free(arg1); + arg1 = (ARKodeSPRKTable)(farg1); + ARKodeSPRKTable_Free(arg1); } -SWIGEXPORT int _wrap_FARKodeSPRKStorage_ToButcher(void *farg1, void *farg2, void *farg3) { +SWIGEXPORT int _wrap_FARKodeSPRKTable_ToButcher(void *farg1, void *farg2, void *farg3) { int fresult ; - ARKodeSPRKStorage arg1 = (ARKodeSPRKStorage) 0 ; + ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; ARKodeButcherTable *arg2 = (ARKodeButcherTable *) 0 ; ARKodeButcherTable *arg3 = (ARKodeButcherTable *) 0 ; int result; - arg1 = (ARKodeSPRKStorage)(farg1); + arg1 = (ARKodeSPRKTable)(farg1); arg2 = (ARKodeButcherTable *)(farg2); arg3 = (ARKodeButcherTable *)(farg3); - result = (int)ARKodeSPRKStorage_ToButcher(arg1,arg2,arg3); + result = (int)ARKodeSPRKTable_ToButcher(arg1,arg2,arg3); fresult = (int)(result); return fresult; } diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index 25d1546053..f65367a91e 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -279,32 +279,32 @@ module farkode_mod ARKODE_SPRK_PSEUDO_LEAPFROG_2_2, ARKODE_SPRK_RUTH_3_3, ARKODE_SPRK_MCLACHLAN_2_2, ARKODE_SPRK_MCLACHLAN_3_3, & ARKODE_SPRK_CANDY_ROZMUS_4_4, ARKODE_SPRK_MCLACHLAN_4_4, ARKODE_SPRK_MCLACHLAN_5_6, ARKODE_SPRK_YOSHIDA_6_8, & ARKODE_SPRK_SUZUKI_UMENO_8_16, ARKODE_SPRK_SOFRONIOU_10_36, ARKODE_MAX_SPRK_NUM - ! struct struct ARKodeSPRKStorage_s - type, public :: ARKodeSPRKStorage_s + ! struct struct ARKodeSPRKTableMem + type, public :: ARKodeSPRKTableMem type(SwigClassWrapper), public :: swigdata contains - procedure :: set_q => swigf_ARKodeSPRKStorage_s_q_set - procedure :: get_q => swigf_ARKodeSPRKStorage_s_q_get - procedure :: set_stages => swigf_ARKodeSPRKStorage_s_stages_set - procedure :: get_stages => swigf_ARKodeSPRKStorage_s_stages_get - procedure :: set_a => swigf_ARKodeSPRKStorage_s_a_set - procedure :: get_a => swigf_ARKodeSPRKStorage_s_a_get - procedure :: set_ahat => swigf_ARKodeSPRKStorage_s_ahat_set - procedure :: get_ahat => swigf_ARKodeSPRKStorage_s_ahat_get - procedure :: release => swigf_release_ARKodeSPRKStorage_s - procedure, private :: swigf_ARKodeSPRKStorage_s_op_assign__ - generic :: assignment(=) => swigf_ARKodeSPRKStorage_s_op_assign__ - end type ARKodeSPRKStorage_s - interface ARKodeSPRKStorage_s - module procedure swigf_create_ARKodeSPRKStorage_s + procedure :: set_q => swigf_ARKodeSPRKTableMem_q_set + procedure :: get_q => swigf_ARKodeSPRKTableMem_q_get + procedure :: set_stages => swigf_ARKodeSPRKTableMem_stages_set + procedure :: get_stages => swigf_ARKodeSPRKTableMem_stages_get + procedure :: set_a => swigf_ARKodeSPRKTableMem_a_set + procedure :: get_a => swigf_ARKodeSPRKTableMem_a_get + procedure :: set_ahat => swigf_ARKodeSPRKTableMem_ahat_set + procedure :: get_ahat => swigf_ARKodeSPRKTableMem_ahat_get + procedure :: release => swigf_release_ARKodeSPRKTableMem + procedure, private :: swigf_ARKodeSPRKTableMem_op_assign__ + generic :: assignment(=) => swigf_ARKodeSPRKTableMem_op_assign__ + end type ARKodeSPRKTableMem + interface ARKodeSPRKTableMem + module procedure swigf_create_ARKodeSPRKTableMem end interface - public :: FARKodeSPRKStorage_Alloc - public :: FARKodeSPRKStorage_Load - public :: FARKodeSPRKStorage_LoadByName - public :: FARKodeSPRKStorage_Copy - public :: FARKodeSPRKStorage_Space - public :: FARKodeSPRKStorage_Free - public :: FARKodeSPRKStorage_ToButcher + public :: FARKodeSPRKTable_Alloc + public :: FARKodeSPRKTable_Load + public :: FARKodeSPRKTable_LoadByName + public :: FARKodeSPRKTable_Copy + public :: FARKodeSPRKTableMempace + public :: FARKodeSPRKTable_Free + public :: FARKodeSPRKTable_ToButcher integer(C_INT), parameter, public :: ARKLS_SUCCESS = 0_C_INT integer(C_INT), parameter, public :: ARKLS_MEM_NULL = -1_C_INT integer(C_INT), parameter, public :: ARKLS_LMEM_NULL = -2_C_INT @@ -648,16 +648,16 @@ function swigc_FARKodeButcherTable_LoadERKByName(farg1) & type(C_PTR) :: fresult end function -subroutine swigc_ARKodeSPRKStorage_s_q_set(farg1, farg2) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_q_set") +subroutine swigc_ARKodeSPRKTableMem_q_set(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKTableMem_q_set") use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper type(SwigClassWrapper) :: farg1 integer(C_INT), intent(in) :: farg2 end subroutine -function swigc_ARKodeSPRKStorage_s_q_get(farg1) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_q_get") & +function swigc_ARKodeSPRKTableMem_q_get(farg1) & +bind(C, name="_wrap_ARKodeSPRKTableMem_q_get") & result(fresult) use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper @@ -665,16 +665,16 @@ function swigc_ARKodeSPRKStorage_s_q_get(farg1) & integer(C_INT) :: fresult end function -subroutine swigc_ARKodeSPRKStorage_s_stages_set(farg1, farg2) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_stages_set") +subroutine swigc_ARKodeSPRKTableMem_stages_set(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKTableMem_stages_set") use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper type(SwigClassWrapper) :: farg1 integer(C_INT), intent(in) :: farg2 end subroutine -function swigc_ARKodeSPRKStorage_s_stages_get(farg1) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_stages_get") & +function swigc_ARKodeSPRKTableMem_stages_get(farg1) & +bind(C, name="_wrap_ARKodeSPRKTableMem_stages_get") & result(fresult) use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper @@ -682,16 +682,16 @@ function swigc_ARKodeSPRKStorage_s_stages_get(farg1) & integer(C_INT) :: fresult end function -subroutine swigc_ARKodeSPRKStorage_s_a_set(farg1, farg2) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_a_set") +subroutine swigc_ARKodeSPRKTableMem_a_set(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKTableMem_a_set") use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper type(SwigClassWrapper) :: farg1 type(C_PTR), value :: farg2 end subroutine -function swigc_ARKodeSPRKStorage_s_a_get(farg1) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_a_get") & +function swigc_ARKodeSPRKTableMem_a_get(farg1) & +bind(C, name="_wrap_ARKodeSPRKTableMem_a_get") & result(fresult) use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper @@ -699,16 +699,16 @@ function swigc_ARKodeSPRKStorage_s_a_get(farg1) & type(C_PTR) :: fresult end function -subroutine swigc_ARKodeSPRKStorage_s_ahat_set(farg1, farg2) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_ahat_set") +subroutine swigc_ARKodeSPRKTableMem_ahat_set(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKTableMem_ahat_set") use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper type(SwigClassWrapper) :: farg1 type(C_PTR), value :: farg2 end subroutine -function swigc_ARKodeSPRKStorage_s_ahat_get(farg1) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_ahat_get") & +function swigc_ARKodeSPRKTableMem_ahat_get(farg1) & +bind(C, name="_wrap_ARKodeSPRKTableMem_ahat_get") & result(fresult) use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper @@ -716,47 +716,47 @@ function swigc_ARKodeSPRKStorage_s_ahat_get(farg1) & type(C_PTR) :: fresult end function -function swigc_new_ARKodeSPRKStorage_s() & -bind(C, name="_wrap_new_ARKodeSPRKStorage_s") & +function swigc_new_ARKodeSPRKTableMem() & +bind(C, name="_wrap_new_ARKodeSPRKTableMem") & result(fresult) use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper type(SwigClassWrapper) :: fresult end function -subroutine swigc_delete_ARKodeSPRKStorage_s(farg1) & -bind(C, name="_wrap_delete_ARKodeSPRKStorage_s") +subroutine swigc_delete_ARKodeSPRKTableMem(farg1) & +bind(C, name="_wrap_delete_ARKodeSPRKTableMem") use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper type(SwigClassWrapper), intent(inout) :: farg1 end subroutine -subroutine swigc_ARKodeSPRKStorage_s_op_assign__(farg1, farg2) & -bind(C, name="_wrap_ARKodeSPRKStorage_s_op_assign__") +subroutine swigc_ARKodeSPRKTableMem_op_assign__(farg1, farg2) & +bind(C, name="_wrap_ARKodeSPRKTableMem_op_assign__") use, intrinsic :: ISO_C_BINDING import :: swigclasswrapper type(SwigClassWrapper), intent(inout) :: farg1 type(SwigClassWrapper) :: farg2 end subroutine -function swigc_FARKodeSPRKStorage_Alloc(farg1) & -bind(C, name="_wrap_FARKodeSPRKStorage_Alloc") & +function swigc_FARKodeSPRKTable_Alloc(farg1) & +bind(C, name="_wrap_FARKodeSPRKTable_Alloc") & result(fresult) use, intrinsic :: ISO_C_BINDING integer(C_INT), intent(in) :: farg1 type(C_PTR) :: fresult end function -function swigc_FARKodeSPRKStorage_Load(farg1) & -bind(C, name="_wrap_FARKodeSPRKStorage_Load") & +function swigc_FARKodeSPRKTable_Load(farg1) & +bind(C, name="_wrap_FARKodeSPRKTable_Load") & result(fresult) use, intrinsic :: ISO_C_BINDING integer(C_INT), intent(in) :: farg1 type(C_PTR) :: fresult end function -function swigc_FARKodeSPRKStorage_LoadByName(farg1) & -bind(C, name="_wrap_FARKodeSPRKStorage_LoadByName") & +function swigc_FARKodeSPRKTable_LoadByName(farg1) & +bind(C, name="_wrap_FARKodeSPRKTable_LoadByName") & result(fresult) use, intrinsic :: ISO_C_BINDING import :: swigarraywrapper @@ -764,30 +764,30 @@ function swigc_FARKodeSPRKStorage_LoadByName(farg1) & type(C_PTR) :: fresult end function -function swigc_FARKodeSPRKStorage_Copy(farg1) & -bind(C, name="_wrap_FARKodeSPRKStorage_Copy") & +function swigc_FARKodeSPRKTable_Copy(farg1) & +bind(C, name="_wrap_FARKodeSPRKTable_Copy") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 type(C_PTR) :: fresult end function -subroutine swigc_FARKodeSPRKStorage_Space(farg1, farg2, farg3) & -bind(C, name="_wrap_FARKodeSPRKStorage_Space") +subroutine swigc_FARKodeSPRKTableMempace(farg1, farg2, farg3) & +bind(C, name="_wrap_FARKodeSPRKTableMempace") use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 type(C_PTR), value :: farg2 type(C_PTR), value :: farg3 end subroutine -subroutine swigc_FARKodeSPRKStorage_Free(farg1) & -bind(C, name="_wrap_FARKodeSPRKStorage_Free") +subroutine swigc_FARKodeSPRKTable_Free(farg1) & +bind(C, name="_wrap_FARKodeSPRKTable_Free") use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 end subroutine -function swigc_FARKodeSPRKStorage_ToButcher(farg1, farg2, farg3) & -bind(C, name="_wrap_FARKodeSPRKStorage_ToButcher") & +function swigc_FARKodeSPRKTable_ToButcher(farg1, farg2, farg3) & +bind(C, name="_wrap_FARKodeSPRKTable_ToButcher") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -1379,144 +1379,144 @@ function FARKodeButcherTable_LoadERKByName(emethod) & swig_result = fresult end function -subroutine swigf_ARKodeSPRKStorage_s_q_set(self, q) +subroutine swigf_ARKodeSPRKTableMem_q_set(self, q) use, intrinsic :: ISO_C_BINDING -class(ARKodeSPRKStorage_s), intent(in) :: self +class(ARKodeSPRKTableMem), intent(in) :: self integer(C_INT), intent(in) :: q type(SwigClassWrapper) :: farg1 integer(C_INT) :: farg2 farg1 = self%swigdata farg2 = q -call swigc_ARKodeSPRKStorage_s_q_set(farg1, farg2) +call swigc_ARKodeSPRKTableMem_q_set(farg1, farg2) end subroutine -function swigf_ARKodeSPRKStorage_s_q_get(self) & +function swigf_ARKodeSPRKTableMem_q_get(self) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result -class(ARKodeSPRKStorage_s), intent(in) :: self +class(ARKodeSPRKTableMem), intent(in) :: self integer(C_INT) :: fresult type(SwigClassWrapper) :: farg1 farg1 = self%swigdata -fresult = swigc_ARKodeSPRKStorage_s_q_get(farg1) +fresult = swigc_ARKodeSPRKTableMem_q_get(farg1) swig_result = fresult end function -subroutine swigf_ARKodeSPRKStorage_s_stages_set(self, stages) +subroutine swigf_ARKodeSPRKTableMem_stages_set(self, stages) use, intrinsic :: ISO_C_BINDING -class(ARKodeSPRKStorage_s), intent(in) :: self +class(ARKodeSPRKTableMem), intent(in) :: self integer(C_INT), intent(in) :: stages type(SwigClassWrapper) :: farg1 integer(C_INT) :: farg2 farg1 = self%swigdata farg2 = stages -call swigc_ARKodeSPRKStorage_s_stages_set(farg1, farg2) +call swigc_ARKodeSPRKTableMem_stages_set(farg1, farg2) end subroutine -function swigf_ARKodeSPRKStorage_s_stages_get(self) & +function swigf_ARKodeSPRKTableMem_stages_get(self) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result -class(ARKodeSPRKStorage_s), intent(in) :: self +class(ARKodeSPRKTableMem), intent(in) :: self integer(C_INT) :: fresult type(SwigClassWrapper) :: farg1 farg1 = self%swigdata -fresult = swigc_ARKodeSPRKStorage_s_stages_get(farg1) +fresult = swigc_ARKodeSPRKTableMem_stages_get(farg1) swig_result = fresult end function -subroutine swigf_ARKodeSPRKStorage_s_a_set(self, a) +subroutine swigf_ARKodeSPRKTableMem_a_set(self, a) use, intrinsic :: ISO_C_BINDING -class(ARKodeSPRKStorage_s), intent(in) :: self +class(ARKodeSPRKTableMem), intent(in) :: self real(C_DOUBLE), target, intent(inout) :: a type(SwigClassWrapper) :: farg1 type(C_PTR) :: farg2 farg1 = self%swigdata farg2 = c_loc(a) -call swigc_ARKodeSPRKStorage_s_a_set(farg1, farg2) +call swigc_ARKodeSPRKTableMem_a_set(farg1, farg2) end subroutine -function swigf_ARKodeSPRKStorage_s_a_get(self) & +function swigf_ARKodeSPRKTableMem_a_get(self) & result(swig_result) use, intrinsic :: ISO_C_BINDING real(C_DOUBLE), pointer :: swig_result -class(ARKodeSPRKStorage_s), intent(in) :: self +class(ARKodeSPRKTableMem), intent(in) :: self type(C_PTR) :: fresult type(SwigClassWrapper) :: farg1 farg1 = self%swigdata -fresult = swigc_ARKodeSPRKStorage_s_a_get(farg1) +fresult = swigc_ARKodeSPRKTableMem_a_get(farg1) call c_f_pointer(fresult, swig_result) end function -subroutine swigf_ARKodeSPRKStorage_s_ahat_set(self, ahat) +subroutine swigf_ARKodeSPRKTableMem_ahat_set(self, ahat) use, intrinsic :: ISO_C_BINDING -class(ARKodeSPRKStorage_s), intent(in) :: self +class(ARKodeSPRKTableMem), intent(in) :: self real(C_DOUBLE), target, intent(inout) :: ahat type(SwigClassWrapper) :: farg1 type(C_PTR) :: farg2 farg1 = self%swigdata farg2 = c_loc(ahat) -call swigc_ARKodeSPRKStorage_s_ahat_set(farg1, farg2) +call swigc_ARKodeSPRKTableMem_ahat_set(farg1, farg2) end subroutine -function swigf_ARKodeSPRKStorage_s_ahat_get(self) & +function swigf_ARKodeSPRKTableMem_ahat_get(self) & result(swig_result) use, intrinsic :: ISO_C_BINDING real(C_DOUBLE), pointer :: swig_result -class(ARKodeSPRKStorage_s), intent(in) :: self +class(ARKodeSPRKTableMem), intent(in) :: self type(C_PTR) :: fresult type(SwigClassWrapper) :: farg1 farg1 = self%swigdata -fresult = swigc_ARKodeSPRKStorage_s_ahat_get(farg1) +fresult = swigc_ARKodeSPRKTableMem_ahat_get(farg1) call c_f_pointer(fresult, swig_result) end function -function swigf_create_ARKodeSPRKStorage_s() & +function swigf_create_ARKodeSPRKTableMem() & result(self) use, intrinsic :: ISO_C_BINDING -type(ARKodeSPRKStorage_s) :: self +type(ARKodeSPRKTableMem) :: self type(SwigClassWrapper) :: fresult -fresult = swigc_new_ARKodeSPRKStorage_s() +fresult = swigc_new_ARKodeSPRKTableMem() self%swigdata = fresult end function -subroutine swigf_release_ARKodeSPRKStorage_s(self) +subroutine swigf_release_ARKodeSPRKTableMem(self) use, intrinsic :: ISO_C_BINDING -class(ARKodeSPRKStorage_s), intent(inout) :: self +class(ARKodeSPRKTableMem), intent(inout) :: self type(SwigClassWrapper) :: farg1 farg1 = self%swigdata if (btest(farg1%cmemflags, swig_cmem_own_bit)) then -call swigc_delete_ARKodeSPRKStorage_s(farg1) +call swigc_delete_ARKodeSPRKTableMem(farg1) endif farg1%cptr = C_NULL_PTR farg1%cmemflags = 0 self%swigdata = farg1 end subroutine -subroutine swigf_ARKodeSPRKStorage_s_op_assign__(self, other) +subroutine swigf_ARKodeSPRKTableMem_op_assign__(self, other) use, intrinsic :: ISO_C_BINDING -class(ARKodeSPRKStorage_s), intent(inout) :: self -type(ARKodeSPRKStorage_s), intent(in) :: other +class(ARKodeSPRKTableMem), intent(inout) :: self +type(ARKodeSPRKTableMem), intent(in) :: other type(SwigClassWrapper) :: farg1 type(SwigClassWrapper) :: farg2 farg1 = self%swigdata farg2 = other%swigdata -call swigc_ARKodeSPRKStorage_s_op_assign__(farg1, farg2) +call swigc_ARKodeSPRKTableMem_op_assign__(farg1, farg2) self%swigdata = farg1 end subroutine -function FARKodeSPRKStorage_Alloc(stages) & +function FARKodeSPRKTable_Alloc(stages) & result(swig_result) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: swig_result @@ -1525,11 +1525,11 @@ function FARKodeSPRKStorage_Alloc(stages) & integer(C_INT) :: farg1 farg1 = stages -fresult = swigc_FARKodeSPRKStorage_Alloc(farg1) +fresult = swigc_FARKodeSPRKTable_Alloc(farg1) swig_result = fresult end function -function FARKodeSPRKStorage_Load(id) & +function FARKodeSPRKTable_Load(id) & result(swig_result) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: swig_result @@ -1538,11 +1538,11 @@ function FARKodeSPRKStorage_Load(id) & integer(C_INT) :: farg1 farg1 = id -fresult = swigc_FARKodeSPRKStorage_Load(farg1) +fresult = swigc_FARKodeSPRKTable_Load(farg1) swig_result = fresult end function -function FARKodeSPRKStorage_LoadByName(method) & +function FARKodeSPRKTable_LoadByName(method) & result(swig_result) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: swig_result @@ -1552,11 +1552,11 @@ function FARKodeSPRKStorage_LoadByName(method) & type(SwigArrayWrapper) :: farg1 call SWIG_string_to_chararray(method, farg1_chars, farg1) -fresult = swigc_FARKodeSPRKStorage_LoadByName(farg1) +fresult = swigc_FARKodeSPRKTable_LoadByName(farg1) swig_result = fresult end function -function FARKodeSPRKStorage_Copy(that_sprk_storage) & +function FARKodeSPRKTable_Copy(that_sprk_storage) & result(swig_result) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: swig_result @@ -1565,11 +1565,11 @@ function FARKodeSPRKStorage_Copy(that_sprk_storage) & type(C_PTR) :: farg1 farg1 = that_sprk_storage -fresult = swigc_FARKodeSPRKStorage_Copy(farg1) +fresult = swigc_FARKodeSPRKTable_Copy(farg1) swig_result = fresult end function -subroutine FARKodeSPRKStorage_Space(sprk_storage, liw, lrw) +subroutine FARKodeSPRKTableMempace(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage integer(C_INT64_T), dimension(*), target, intent(inout) :: liw @@ -1581,19 +1581,19 @@ subroutine FARKodeSPRKStorage_Space(sprk_storage, liw, lrw) farg1 = sprk_storage farg2 = c_loc(liw(1)) farg3 = c_loc(lrw(1)) -call swigc_FARKodeSPRKStorage_Space(farg1, farg2, farg3) +call swigc_FARKodeSPRKTableMempace(farg1, farg2, farg3) end subroutine -subroutine FARKodeSPRKStorage_Free(sprk_storage) +subroutine FARKodeSPRKTable_Free(sprk_storage) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage type(C_PTR) :: farg1 farg1 = sprk_storage -call swigc_FARKodeSPRKStorage_Free(farg1) +call swigc_FARKodeSPRKTable_Free(farg1) end subroutine -function FARKodeSPRKStorage_ToButcher(sprk_storage, erk_ptr, dirk_ptr) & +function FARKodeSPRKTable_ToButcher(sprk_storage, erk_ptr, dirk_ptr) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result @@ -1608,7 +1608,7 @@ function FARKodeSPRKStorage_ToButcher(sprk_storage, erk_ptr, dirk_ptr) & farg1 = sprk_storage farg2 = c_loc(erk_ptr) farg3 = c_loc(dirk_ptr) -fresult = swigc_FARKodeSPRKStorage_ToButcher(farg1, farg2, farg3) +fresult = swigc_FARKodeSPRKTable_ToButcher(farg1, farg2, farg3) swig_result = fresult end function diff --git a/src/arkode/fmod/farkode_sprkstep_mod.c b/src/arkode/fmod/farkode_sprkstep_mod.c index b0a538b956..f7ab4ba794 100644 --- a/src/arkode/fmod/farkode_sprkstep_mod.c +++ b/src/arkode/fmod/farkode_sprkstep_mod.c @@ -334,11 +334,11 @@ SWIGEXPORT int _wrap_FSPRKStepSetUseCompensatedSums(void *farg1, int const *farg SWIGEXPORT int _wrap_FSPRKStepSetMethod(void *farg1, void *farg2) { int fresult ; void *arg1 = (void *) 0 ; - ARKodeSPRKStorage arg2 = (ARKodeSPRKStorage) 0 ; + ARKodeSPRKTable arg2 = (ARKodeSPRKTable) 0 ; int result; arg1 = (void *)(farg1); - arg2 = (ARKodeSPRKStorage)(farg2); + arg2 = (ARKodeSPRKTable)(farg2); result = (int)SPRKStepSetMethod(arg1,arg2); fresult = (int)(result); return fresult; @@ -569,11 +569,11 @@ SWIGEXPORT SwigArrayWrapper _wrap_FSPRKStepGetReturnFlagName(long const *farg1) SWIGEXPORT int _wrap_FSPRKStepGetCurrentMethod(void *farg1, void *farg2) { int fresult ; void *arg1 = (void *) 0 ; - ARKodeSPRKStorage *arg2 = (ARKodeSPRKStorage *) 0 ; + ARKodeSPRKTable *arg2 = (ARKodeSPRKTable *) 0 ; int result; arg1 = (void *)(farg1); - arg2 = (ARKodeSPRKStorage *)(farg2); + arg2 = (ARKodeSPRKTable *)(farg2); result = (int)SPRKStepGetCurrentMethod(arg1,arg2); fresult = (int)(result); return fresult; diff --git a/swig/arkode/farkode_mod.i b/swig/arkode/farkode_mod.i index c1ab09667f..caaad3f3c1 100644 --- a/swig/arkode/farkode_mod.i +++ b/swig/arkode/farkode_mod.i @@ -39,8 +39,8 @@ // Treat ARKodeButcherTable as an opaque pointer %apply void* { ARKodeButcherTable }; -// Treat ARKodeSPRKStorage as an opaque pointer -%apply void* { ARKodeSPRKStorage }; +// Treat ARKodeSPRKTable as an opaque pointer +%apply void* { ARKodeSPRKTable }; // Process definitions from these files %include "arkode/arkode.h" From 55c2669349da881b89eb0c5da4befb3ea279229b Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jul 2023 14:17:27 -0700 Subject: [PATCH 135/177] adress remaining comments --- doc/arkode/guide/source/ARKodeSPRKStorage.rst | 177 ----- doc/arkode/guide/source/ARKodeSPRKTable.rst | 147 ++++ doc/arkode/guide/source/Butcher.rst | 46 +- .../ARKStep_c_interface/User_callable.rst | 1 + .../ERKStep_c_interface/User_callable.rst | 1 + .../MRIStep_c_interface/User_callable.rst | 1 + .../SPRKStep_c_interface/User_callable.rst | 229 +++---- ...rage_link.rst => ARKodeSPRKTable_link.rst} | 0 include/arkode/arkode_butcher.h | 1 - include/arkode/arkode_sprk.h | 22 +- src/arkode/arkode_sprk.c | 642 +++++++++--------- src/arkode/fmod/farkode_mod.c | 4 +- src/arkode/fmod/farkode_mod.f90 | 10 +- 13 files changed, 617 insertions(+), 664 deletions(-) delete mode 100644 doc/arkode/guide/source/ARKodeSPRKStorage.rst create mode 100644 doc/arkode/guide/source/ARKodeSPRKTable.rst rename doc/superbuild/source/arkode/{ARKodeSPRKStorage_link.rst => ARKodeSPRKTable_link.rst} (100%) diff --git a/doc/arkode/guide/source/ARKodeSPRKStorage.rst b/doc/arkode/guide/source/ARKodeSPRKStorage.rst deleted file mode 100644 index 600460d60b..0000000000 --- a/doc/arkode/guide/source/ARKodeSPRKStorage.rst +++ /dev/null @@ -1,177 +0,0 @@ -.. ---------------------------------------------------------------- - SUNDIALS Copyright Start - Copyright (c) 2002-2023, Lawrence Livermore National Security - and Southern Methodist University. - All rights reserved. - - See the top-level LICENSE and NOTICE files for details. - - SPDX-License-Identifier: BSD-3-Clause - SUNDIALS Copyright End - ---------------------------------------------------------------- - -.. _SPRKStorage: - -============================== -SPRK Method Storage Structure -============================== - -.. _SPRKStorage.id: - -Method identifiers ------------------- - -The following enum values are used to identify different SPRK methods: - -.. c:macro:: ARKODE_SPRK_NONE - - Identifier representing no SPRK method, this is solely used to mark the beginning of the enum. - -.. c:macro:: ARKODE_SPRK_EULER_1_1 - - Identifier for the Symplectic Euler 1st order method with 1 stage. - -.. c:macro:: ARKODE_SPRK_LEAPFROG_2_2 - - Identifier for the Symplectic Leapfrog 2nd order method with 2 stages. - -.. c:macro:: ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 - - Identifier for the Symplectic Pseudo Leapfrog 2nd order method with 2 stages. - -.. c:macro:: ARKODE_SPRK_RUTH_3_3 - - Identifier for the Symplectic Ruth 3rd order method with 3 stages. - -.. c:macro:: ARKODE_SPRK_MCLACHLAN_2_2 - - Identifier for the Symplectic McLachlan 2nd order method with 2 stages. - -.. c:macro:: ARKODE_SPRK_MCLACHLAN_3_3 - - Identifier for the Symplectic McLachlan 3rd order method with 3 stages. - -.. c:macro:: ARKODE_SPRK_CANDY_ROZMUS_4_4 - - Identifier for the Symplectic Candy Rozmus 4th order method with 4 stages. - -.. c:macro:: ARKODE_SPRK_MCLACHLAN_4_4 - - Identifier for the Symplectic McLachlan 4th order method with 4 stages. - -.. c:macro:: ARKODE_SPRK_MCLACHLAN_5_6 - - Identifier for the Symplectic McLachlan 5th order method with 6 stages. - -.. c:macro:: ARKODE_SPRK_YOSHIDA_6_8 - - Identifier for the Symplectic Yoshida 6th order method with 8 stages. - -.. c:macro:: ARKODE_SPRK_SUZUKI_UMENO_8_16 - - Identifier for the Symplectic Suzuki-Umeno 8th order method with 16 stages. - -.. c:macro:: ARKODE_SPRK_SOFRONIOU_10_36 - - Identifier for the Symplectic Sofroniou 10th order method with 36 stages. - -.. c:type:: ARKodeSPRKTableMem - - Structure representing the SPRK method that holds the method coefficients. - - .. c:member:: int q - - The method order of accuracy. - - .. c:member:: int stages - - The number of stages. - - .. c:member:: sunrealtype* a - - Array of coefficients that generate the explicit Butcher table. - ``a[i]`` is the coefficient appearing in column i+1. - - .. c:member:: sunrealtype* ahat - - Array of coefficients that generate the diagonally-implicit Butcher table. - ``ahat[i]`` is the coefficient appearing in column i. - -.. c:type:: ARKodeSPRKTableMem* ARKodeSPRKTable - - -ARKodeSPRKTable functions ---------------------------- - -.. _ARKodeSPRKTable.FunctionsTable: -.. table:: ARKodeSPRKTable functions - - +----------------------------------------------+------------------------------------------------------------+ - | **Function name** | **Description** | - +==============================================+============================================================+ - | :c:func:`ARKodeSPRKTable_Alloc()` | Allocate an empty storage structure | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Load()` | Load SPRK method using an identifier | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_LoadByName()` | Load SPRK method using a string version of the identifier | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Create()` | Create a new storage structure | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Copy()` | Create a copy of a storage structure | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTableMempace()` | Get the storage structure real and integer workspace size | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Free()` | Deallocate a storage structure | - +----------------------------------------------+------------------------------------------------------------+ - - -.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) - - Allocate memory for an :c:type:`ARKodeSPRKTable`` structure with the specified number of stages. - - :param stages: The number of stages. - :return: ARKodeSPRKTable structure for the loaded method. - -.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Load(ARKODE_SPRKMethodID id) - - Load the ARKodeSPRKTable structure for the specified method ID. - - :param id: The ID of the SPRK method. One of :ref:`SPRKStorage.id`. - :return: ARKodeSPRKTable structure for the loaded method. - -.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_LoadByName(const char* method) - - Load the ARKodeSPRKTable structure for the specified method name. - - :param method: The name of the SPRK method. Must be one of :ref:`SPRKStorage.id` but as a string. - :return: ARKodeSPRKTable structure for the loaded method. - - -.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable B) - - Create a copy of the ARKodeSPRKTable structure. - - :param B: The ARKodeSPRKTable structure to copy. - :return: Pointer to the copied ARKodeSPRKTable structure. - -.. c:function:: void ARKodeSPRKTableMempace(ARKodeSPRKTable B, sunindextype* liw, sunindextype* lrw) - - Get the workspace sizes required for the ARKodeSPRKTable structure. - - :param B: The ARKodeSPRKTable structure. - :param liw: Pointer to store the integer workspace size. - :param lrw: Pointer to store the real workspace size. - -.. c:function:: void ARKodeSPRKTable_Free(ARKodeSPRKTable B) - - Free the memory allocated for the ARKodeSPRKTable structure. - - :param B: The ARKodeSPRKTable structure to free. - -.. c:function:: int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_storage, ARKodeSPRKTable* a_ptr, ARKodeSPRKTable* b_ptr) - - Convert the ARKodeSPRKTable structure to the Butcher table representation. - - :param sprk_storage: The ARKodeSPRKTable structure. - :param a_ptr: Pointer to store the explicit Butcher table. - :param b_ptr: Pointer to store the diagonally-implicit Butcher table. diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst new file mode 100644 index 0000000000..8e162ae52d --- /dev/null +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -0,0 +1,147 @@ +.. ---------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2002-2023, Lawrence Livermore National Security + and Southern Methodist University. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ---------------------------------------------------------------- + +.. _SPRKStorage: + +=========================== +SPRK Method Table Structure +=========================== + +.. c:type:: ARKodeSPRKTableMem + + Structure representing the SPRK method that holds the method coefficients. + + .. c:member:: int q + + The method order of accuracy. + + .. c:member:: int stages + + The number of stages. + + .. c:member:: sunrealtype* a + + Array of coefficients that generate the explicit Butcher table. + ``a[i]`` is the coefficient appearing in column i+1. + + .. math:: + \begin{array}{c|cccc} + c_1 & 0 & \cdots & 0 & 0 \\ + c_2 & a_1 & 0 & \cdots & \vdots \\ + \vdots & \vdots & \ddots & \ddots & \vdots \\ + c_s & a_1 & \cdots & a_{s-1} & 0 \\ + \hline + & a_1 & \cdots & a_{s-1} & a_s + \end{array} + \end{array}. + + .. c:member:: sunrealtype* ahat + + Array of coefficients that generate the diagonally-implicit Butcher table. + ``ahat[i]`` is the coefficient appearing in column i. + + .. math:: + \begin{array}{c|cccc} + \hat{c}_1 & \hat{a}_1 & \cdots & 0 & 0 \\ + \hat{c}_2 & \hat{a}_1 & \hat{a}_2 & \cdots & \vdots \\ + \vdots & \vdots & \ddots & \ddots & \vdots \\ + \hat{c}_s & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} \\ + \hline + & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} + \end{array}. + + +.. c:type:: ARKodeSPRKTableMem* ARKodeSPRKTable + + +ARKodeSPRKTable functions +--------------------------- + +.. _ARKodeSPRKTable.FunctionsTable: +.. table:: ARKodeSPRKTable functions + + +----------------------------------------------+------------------------------------------------------------+ + | **Function name** | **Description** | + +==============================================+============================================================+ + | :c:func:`ARKodeSPRKTable_Alloc()` | Allocate an empty storage structure | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeSPRKTable_Load()` | Load SPRK method using an identifier | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeSPRKTable_LoadByName()` | Load SPRK method using a string version of the identifier | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeSPRKTable_Create()` | Create a new storage structure | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeSPRKTable_Copy()` | Create a copy of a storage structure | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeSPRKTable_Space()` | Get the storage structure real and integer workspace size | + +----------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeSPRKTable_Free()` | Deallocate a storage structure | + +----------------------------------------------+------------------------------------------------------------+ + + +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) + + Allocate memory for an :c:type:`ARKodeSPRKTable` structure with the specified number of stages. + + :param stages: The number of stages. + :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. + +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Load(ARKODE_SPRKMethodID id) + + Load the :c:type:`ARKodeSPRKTable` structure for the specified method ID. + + :param id: The ID of the SPRK method. One of :ref:`SPRKStorage.id`. + :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. + +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_LoadByName(const char* method) + + Load the :c:type:`ARKodeSPRKTable` structure for the specified method name. + + :param method: The name of the SPRK method. Must be one of :ref:`SPRKStorage.id` but as a string. + :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. + +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable sprk_table) + + Create a copy of the :c:type:`ARKodeSPRKTable` structure. + + :param sprk_table: The :c:type:`ARKodeSPRKTable` structure to copy. + :return: Pointer to the copied :c:type:`ARKodeSPRKTable` structure. + +.. c:function:: void ARKodeSPRKTable_Write(ARKodeSPRKTable sprk_table, FILE* outfile) + + Write the ARKodeSPRKTable out to the file. + + :param sprk_table: The :c:type:`ARKodeSPRKTable` structure to write. + :param outfile: The FILE that will be written to. + :return: void + +.. c:function:: void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_table, sunindextype* liw, sunindextype* lrw) + + Get the workspace sizes required for the :c:type:`ARKodeSPRKTable` structure. + + :param sprk_table: The :c:type:`ARKodeSPRKTable` structure. + :param liw: Pointer to store the integer workspace size. + :param lrw: Pointer to store the real workspace size. + +.. c:function:: void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_table) + + Free the memory allocated for the :c:type:`ARKodeSPRKTable` structure. + + :param sprk_table: The :c:type:`ARKodeSPRKTable` structure to free. + +.. c:function:: int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_storage, ARKodeSPRKTable* a_ptr, ARKodeSPRKTable* b_ptr) + + Convert the :c:type:`ARKodeSPRKTable` structure to the Butcher table representation. + + :param sprk_storage: The :c:type:`ARKodeSPRKTable` structure. + :param a_ptr: Pointer to store the explicit Butcher table. + :param b_ptr: Pointer to store the diagonally-implicit Butcher table. diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index cad6142dc3..d4be995acd 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1717,9 +1717,9 @@ ARKODE_SPRK_EULER_1_1 .. index:: 1st-order symplectic Euler method -Accessible via the constant ``ARKODE_SPRK_EULER_1_1`` to +Accessible via the constant (or string) ``ARKODE_SPRK_EULER_1_1`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the classic Symplectic Euler method. +This is the classic Symplectic Euler method and the default 1st order method. ARKODE_SPRK_LEAPFROG_2_2 @@ -1727,9 +1727,9 @@ ARKODE_SPRK_LEAPFROG_2_2 .. index:: 2nd-order Leapfrog method -Accessible via the constant ``ARKODE_SPRK_LEAPFROG_2_2`` to +Accessible via the constant (or string) ``ARKODE_SPRK_LEAPFROG_2_2`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the classic Leapfrog/Verlet method. +This is the classic Leapfrog/Verlet method and the default 2nd order method. ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 @@ -1737,7 +1737,7 @@ ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 .. index:: 2nd-order Pseudo Leapfrog method -Accessible via the constant ``ARKODE_SPRK_PSEUDO_LEAPFROG_2_2`` to +Accessible via the constant (or string) ``ARKODE_SPRK_PSEUDO_LEAPFROG_2_2`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the classic Pseudo Leapfrog/Verlet method. @@ -1747,7 +1747,7 @@ ARKODE_SPRK_MCLACHLAN_2_2 .. index:: 2nd-order McLachlan method -Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_2_2`` to +Accessible via the constant (or string) ``ARKODE_SPRK_MCLACHLAN_2_2`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 2nd order method given by McLachlan in :cite:p:`Mclachlan:92`. @@ -1757,7 +1757,7 @@ ARKODE_SPRK_RUTH_3_3 .. index:: 3rd-order Ruth method -Accessible via the constant ``ARKODE_SPRK_RUTH_3_3`` to +Accessible via the constant (or string) ``ARKODE_SPRK_RUTH_3_3`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 3rd order method given by Ruth in :cite:p:`Ruth:93`. @@ -1767,9 +1767,10 @@ ARKODE_SPRK_MCLACHLAN_3_3 .. index:: 3rd-order McLachlan method -Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_3_3`` to +Accessible via the constant (or string) ``ARKODE_SPRK_MCLACHLAN_3_3`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92`. +This is the 3rd order method given by McLachlan in :cite:p:`Mclachlan:92` +and the default 3rd order method. ARKODE_SPRK_MCLACHLAN_4_4 @@ -1777,9 +1778,10 @@ ARKODE_SPRK_MCLACHLAN_4_4 .. index:: 4th-order McLachlan method -Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_4_4`` to +Accessible via the constant (or string) ``ARKODE_SPRK_MCLACHLAN_4_4`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92`. +This is the 4th order method given by McLachlan in :cite:p:`Mclachlan:92` +and the default 4th order method. .. warning:: @@ -1791,7 +1793,7 @@ ARKODE_SPRK_CANDY_ROZMUS_4_4 .. index:: 4th-order Candy-Rozmus method -Accessible via the constant ``ARKODE_SPRK_CANDY_ROZMUS_4_4`` to +Accessible via the constant (or string) ``ARKODE_SPRK_CANDY_ROZMUS_4_4`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. This is the 4th order method given by Candy and Rozmus in :cite:p:`CandyRozmus:91`. @@ -1801,9 +1803,10 @@ ARKODE_SPRK_MCLACHLAN_5_6 .. index:: 5th-order McLachlan method -Accessible via the constant ``ARKODE_SPRK_MCLACHLAN_5_6`` to +Accessible via the constant (or string) ``ARKODE_SPRK_MCLACHLAN_5_6`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92`. +This is the 5th order method given by McLachlan in :cite:p:`Mclachlan:92` +and the default 5th order method. .. warning:: @@ -1815,9 +1818,10 @@ ARKODE_SPRK_YOSHIDA_6_8 .. index:: 6th-order Yoshida method -Accessible via the constant ``ARKODE_SPRK_YOSHIDA_6_8`` to +Accessible via the constant (or string) ``ARKODE_SPRK_YOSHIDA_6_8`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`. +This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90` +and the 6th order method. ARKODE_SPRK_SUZUKI_UMENO_8_16 @@ -1825,9 +1829,10 @@ ARKODE_SPRK_SUZUKI_UMENO_8_16 .. index:: 8th-order Suzuki-Umeno method -Accessible via the constant ``ARKODE_SPRK_SUZUKI_UMENO_8_16`` to +Accessible via the constant (or string) ``ARKODE_SPRK_SUZUKI_UMENO_8_16`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the 8th order method given by Suzuki and Umeno in :cite:p:`Suzuki:93`. +This is the 8th order method given by Suzuki and Umeno in :cite:p:`Suzuki:93` +and the default 8th order method. ARKODE_SPRK_SOFRONIOU_10_36 @@ -1835,6 +1840,7 @@ ARKODE_SPRK_SOFRONIOU_10_36 .. index:: 10th-order Sofroniou-Spaletta method -Accessible via the constant ``ARKODE_SPRK_SOFRONIOU_10_36`` to +Accessible via the constant (or string) ``ARKODE_SPRK_SOFRONIOU_10_36`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the 10th order method given by Sofroniou and Spaletta in :cite:p:`Sofroniou:05`. +This is the 10th order method given by Sofroniou and Spaletta in :cite:p:`Sofroniou:05` +and the default 10th order method. 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 4713160b05..d55e49897a 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 @@ -3493,6 +3493,7 @@ Retrieve a pointer for user data :c:func:`ARKStepGetUserDa .. c:function:: char *ARKStepGetReturnFlagName(long int flag) Returns the name of the ARKStep constant corresponding to *flag*. + See :ref:`ARKODE.Constants`. **Arguments:** * *flag* -- a return flag from an ARKStep function. diff --git a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst index b40ddbf160..d59bf672bd 100644 --- a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst @@ -1855,6 +1855,7 @@ Main solver optional output functions .. c:function:: char *ERKStepGetReturnFlagName(long int flag) Returns the name of the ERKStep constant corresponding to *flag*. + See :ref:`ARKODE.Constants`. **Arguments:** * *flag* -- a return flag from an ERKStep function. diff --git a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst index 743b9c66e2..5c7c0096ac 100644 --- a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst @@ -2551,6 +2551,7 @@ Main solver optional output functions .. c:function:: char *MRIStepGetReturnFlagName(long int flag) Returns the name of the MRIStep constant corresponding to *flag*. + See :ref:`ARKODE.Constants`. **Arguments:** diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 2e3909f64d..17071db1ce 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -99,11 +99,10 @@ called prior to a continuation call to :c:func:`SPRKStepEvolve()`. :param g: name of user-supplied function, of type :c:func:`ARKRootFn()`, defining the functions :math:`g_i` whose roots are sought. - :returns: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` - * *ARK_MEM_FAIL* if there was a memory allocation failure - * *ARK_ILL_INPUT* if *nrtfn* is greater than zero but *g* = ``NULL``. + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` + :retval ARK_MEM_FAIL: if there was a memory allocation failure + :retval ARK_ILL_INPUT: if *nrtfn* is greater than zero but *g* = ``NULL``. **Notes:** To disable the rootfinding feature after it has already @@ -295,12 +294,11 @@ Optional inputs for SPRKStep :param arkode_mem: pointer to the SPRKStep memory block. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value - .. notes:: + .. note:: Does not change problem-defining function pointer *f* or the *user_data* pointer. @@ -319,14 +317,13 @@ Optional inputs for SPRKStep :param arkode_mem: pointer to the SPRKStep memory block. :param itype: requested interpolant type (``ARK_INTERP_HERMITE`` or ``ARK_INTERP_LAGRANGE``) - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_MEM_FAIL* if the interpolation module cannot be allocated - * *ARK_ILL_INPUT* if the *itype* argument is not recognized or the - interpolation module has already been initialized + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_MEM_FAIL: if the interpolation module cannot be allocated + :retval ARK_ILL_INPUT: if the *itype* argument is not recognized or the + interpolation module has already been initialized - .. notes:: + .. note:: The Hermite interpolation module is described in :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange interpolation module @@ -351,19 +348,18 @@ Optional inputs for SPRKStep Specifies the degree of the polynomial interpolant used for dense output (i.e. interpolation of solution output values). + Allowed values are between 0 and 5. :param arkode_mem: pointer to the SPRKStep memory block. :param degree: requested polynomial degree. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory or interpolation module are ``NULL`` - * *ARK_INTERP_FAIL* if this is called after :c:func:`SPRKStepEvolve()` - * *ARK_ILL_INPUT* if an argument has an illegal value or the - interpolation module has already been initialized + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory or interpolation module are ``NULL`` + :retval ARK_INTERP_FAIL: if this is called after :c:func:`SPRKStepEvolve()` + :retval ARK_ILL_INPUT: if an argument has an illegal value or the + interpolation module has already been initialized - **Notes:** - Allowed values are between 0 and 5. + .. note:: This routine should be called *after* :c:func:`SPRKStepCreate` and *before* :c:func:`SPRKStepEvolve()`. After the first call to :c:func:`SPRKStepEvolve()` @@ -392,10 +388,9 @@ Optional inputs for SPRKStep :param arkode_mem: pointer to the SPRKStep memory block. :param errfp: pointer to the output file. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** The default value for *errfp* is ``stderr``. @@ -419,10 +414,9 @@ Optional inputs for SPRKStep :param ehfun: name of user-supplied error handler function. :param eh_data: pointer to user data passed to *ehfun* every time it is called. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** Error messages indicating that the SPRKStep solver memory is @@ -436,10 +430,9 @@ Optional inputs for SPRKStep :param arkode_mem: pointer to the SPRKStep memory block. :param hfixed: value of the fixed step size to use. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** If both :c:func:`SPRKStepSetFixedStep()` and @@ -459,10 +452,9 @@ Optional inputs for SPRKStep :param arkode_mem: pointer to the SPRKStep memory block. :param mxsteps: maximum allowed number of internal steps. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** Passing *mxsteps* = 0 results in SPRKStep using the @@ -478,10 +470,9 @@ Optional inputs for SPRKStep :param arkode_mem: pointer to the SPRKStep memory block. :param tstop: stopping time for the integrator. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** The default is that no stop time is imposed. @@ -518,10 +509,9 @@ Optional inputs for SPRKStep :param arkode_mem: pointer to the SPRKStep memory block. :param user_data: pointer to the user data. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** If specified, the pointer to *user_data* is passed to all @@ -537,17 +527,17 @@ Optional inputs for IVP method selection .. _ARKODE.Usage.SPRKStep.SPRKStepMethodInputTable: .. table:: Optional inputs for IVP method selection - +-----------------------------+-------------------------------------------+----------+ - | Optional input | Function name | Default | - +=============================+===========================================+==========+ - | Set integrator method order | :c:func:`SPRKStepSetOrder()` | 4 | - +-----------------------------+-------------------------------------------+----------+ - | Set SPRK method | :c:func:`SPRKStepSetMethod()` | internal | - +-----------------------------+-------------------------------------------+----------+ - | Set SPRK method by name | :c:func:`SPRKStepSetMethodName()` | internal | - +-----------------------------+-------------------------------------------+----------+ - | Use compensated summation | :c:func:`SPRKStepSetUseCompensatedSums()` | false | - +-----------------------------+-------------------------------------------+----------+ + +-----------------------------+-------------------------------------------+-------------------------------------+ + | Optional input | Function name | Default | + +=============================+===========================================+=====================================+ + | Set integrator method order | :c:func:`SPRKStepSetOrder()` | 4 | + +-----------------------------+-------------------------------------------+-------------------------------------+ + | Set SPRK method | :c:func:`SPRKStepSetMethod()` | :c:type:`ARKODE_SPRK_MCLACHLAN_4_4` | + +-----------------------------+-------------------------------------------+-------------------------------------+ + | Set SPRK method by name | :c:func:`SPRKStepSetMethodName()` | "ARKODE_SPRK_MCLACHLAN_4_4" | + +-----------------------------+-------------------------------------------+-------------------------------------+ + | Use compensated summation | :c:func:`SPRKStepSetUseCompensatedSums()` | false | + +-----------------------------+-------------------------------------------+-------------------------------------+ .. c:function:: int SPRKStepSetOrder(void* arkode_mem, int ord) @@ -557,10 +547,9 @@ Optional inputs for IVP method selection :param arkode_mem: pointer to the SPRKStep memory block. :param ord: requested order of accuracy. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** The allowed values are :math:`1,2,3,4,5,6,8,10`. @@ -583,10 +572,9 @@ Optional inputs for IVP method selection :param arkode_mem: pointer to the SPRKStep memory block. :param sprk_storage: the SPRK method coefficient structure. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** No error checking is performed on the coefficients contained in the structure to ensure its declared order of accuracy. @@ -600,10 +588,9 @@ Optional inputs for IVP method selection :param arkode_mem: pointer to the SPRKStep memory block. :param method: the SPRK method name. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value .. c:function:: int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) @@ -614,10 +601,9 @@ Optional inputs for IVP method selection :param arkode_mem: pointer to the SPRKStep memory block. :param onoff: should compensated summation be used (1) or not (0) - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** This increases the computational cost by 2 extra vector operations per stage and @@ -662,10 +648,9 @@ described in :numref:`ARKODE.Mathematics.Rootfinding`. should report only zero-crossings where :math:`g_i` is increasing or decreasing, respectively. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - * *ARK_ILL_INPUT* if an argument has an illegal value + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` + :retval ARK_ILL_INPUT: if an argument has an illegal value **Notes:** The default behavior is to monitor for both zero-crossing directions. @@ -838,9 +823,8 @@ Main solver optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param nsteps: number of steps taken in the solver. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` .. c:function:: int SPRKStepGetLastStep(void* arkode_mem, realtype* hlast) @@ -851,9 +835,8 @@ Main solver optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param hlast: step size taken on the last internal step. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` .. c:function:: int SPRKStepGetCurrentStep(void* arkode_mem, realtype* hcur) @@ -863,9 +846,8 @@ Main solver optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param hcur: step size to be attempted on the next internal step. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` .. c:function:: int SPRKStepGetCurrentTime(void* arkode_mem, realtype* tcur) @@ -875,22 +857,19 @@ Main solver optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param tcur: current internal time reached. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` .. c:function:: int SPRKStepGetCurrentState(void *arkode_mem, N_Vector *ycur) Returns the current internal solution reached by the solver. - **Arguments:** - * *arkode_mem* -- pointer to the ARKStep memory block. - * *ycur* -- current internal solution. + :param arkode_mem: pointer to the SPRKStep memory block. + :param ycur: current internal solution - **Return value:** - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the ARKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` .. warning:: @@ -910,27 +889,25 @@ Main solver optional output functions :param hcur: step size to be attempted on the next internal step. :param tcur: current internal time reached. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` .. c:function:: int SPRKStepPrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt) Outputs all of the integrator statistics. - * *arkode_mem* -- pointer to the SPRKStep memory block. - * *outfile* -- pointer to output file. - * *fmt* -- the output format: + :param arkode_mem: pointer to the SPRKStep memory block. + :param outfile: pointer to output file. + :param fmt: the output format: * :c:enumerator:`SUN_OUTPUTFORMAT_TABLE` -- prints a table of values * :c:enumerator:`SUN_OUTPUTFORMAT_CSV` -- prints a comma-separated list of key and value pairs e.g., ``key1,value1,key2,value2,...`` - :return: - * *ARK_SUCCESS* -- if the output was successfully. - * *CV_MEM_NULL* -- if the SPRKStep memory was ``NULL``. - * *CV_ILL_INPUT* -- if an invalid formatting option was provided. + :retval ARK_SUCCESS: -- if the output was successfully. + :retval ARK_MEM_NULL: -- if the SPRKStep memory was ``NULL``. + :retval ARK_ILL_INPUT: -- if an invalid formatting option was provided. .. note:: @@ -943,6 +920,7 @@ Main solver optional output functions .. c:function:: char *SPRKStepGetReturnFlagName(long int flag) Returns the name of the SPRKStep constant corresponding to *flag*. + See :ref:`ARKODE.Constants`. :param flag: a return flag from an SPRKStep function. @@ -958,9 +936,8 @@ Main solver optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param step_attempts: number of steps attempted by solver. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` .. c:function:: int SPRKStepGetNumRhsEvals(void* arkode_mem, long int* nf1, long int* nf2) @@ -972,9 +949,8 @@ Main solver optional output functions :param nf1: number of calls to the user's :math:`f_1(t,p)` function. :param nf2: number of calls to the user's :math:`f_2(t,q)` function. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` @@ -985,9 +961,8 @@ Main solver optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param sprk_storage: pointer to the SPRK method coefficient structure. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` .. c:function:: int SPRKStepGetUserData(void* arkode_mem, void** user_data) @@ -998,9 +973,8 @@ Main solver optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param user_data: memory reference to a user data pointer - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the ARKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the ARKStep memory was ``NULL`` .. _ARKODE.Usage.SPRKStep.SPRKStepRootOutputs: @@ -1035,9 +1009,8 @@ Rootfinding optional output functions *nrtfn*-1, ``rootsfound[i]`` is nonzero if :math:`g_i` has a root, and 0 if not. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` **Notes:** The user must allocate space for *rootsfound* prior to @@ -1058,9 +1031,8 @@ Rootfinding optional output functions :param arkode_mem: pointer to the SPRKStep memory block. :param ngevals: number of calls made to :math:`g` so far. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` @@ -1093,9 +1065,8 @@ for users wishing to better understand SPRKStep. :param arkode_mem: pointer to the SPRKStep memory block. :param fp: pointer to use for printing the solver parameters. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` **Notes:** The *fp* argument can be ``stdout`` or ``stderr``, or it diff --git a/doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst b/doc/superbuild/source/arkode/ARKodeSPRKTable_link.rst similarity index 100% rename from doc/superbuild/source/arkode/ARKodeSPRKStorage_link.rst rename to doc/superbuild/source/arkode/ARKodeSPRKTable_link.rst diff --git a/include/arkode/arkode_butcher.h b/include/arkode/arkode_butcher.h index 5ee6875844..1c842ebd40 100644 --- a/include/arkode/arkode_butcher.h +++ b/include/arkode/arkode_butcher.h @@ -60,7 +60,6 @@ SUNDIALS_EXPORT void ARKodeButcherTable_Space(ARKodeButcherTable B, SUNDIALS_EXPORT void ARKodeButcherTable_Free(ARKodeButcherTable B); SUNDIALS_EXPORT void ARKodeButcherTable_Write(ARKodeButcherTable B, FILE *outfile); - SUNDIALS_EXPORT int ARKodeButcherTable_CheckOrder(ARKodeButcherTable B, int *q, int *p, FILE *outfile); SUNDIALS_EXPORT int ARKodeButcherTable_CheckARKOrder(ARKodeButcherTable B1, diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index a50c75396e..5fd4c36471 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -2,7 +2,7 @@ * Programmer(s): Cody J. Balos @ LLNL * ----------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2002-2022, Lawrence Livermore National Security + * Copyright (c) 2002-2023, Lawrence Livermore National Security * and Southern Methodist University. * All rights reserved. * @@ -11,10 +11,11 @@ * SPDX-License-Identifier: BSD-3-Clause * SUNDIALS Copyright End * ----------------------------------------------------------------- + * This header file defines the ARKodeSPRKTable structure. * -----------------------------------------------------------------*/ -#ifndef _ARKODE_SPRKSTORAGE_H -#define _ARKODE_SPRKSTORAGE_H +#ifndef _ARKODE_SPRKTABLE_H +#define _ARKODE_SPRKTABLE_H #include #include @@ -57,6 +58,10 @@ struct ARKodeSPRKTableMem typedef _SUNDIALS_STRUCT_ ARKodeSPRKTableMem* ARKodeSPRKTable; /* Utility routines to allocate/free/output SPRK structures */ +SUNDIALS_EXPORT +ARKodeSPRKTable ARKodeSPRKStorage_Create(int s, int q, sunrealtype* a, + sunrealtype* ahat); + SUNDIALS_EXPORT ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages); @@ -70,15 +75,18 @@ SUNDIALS_EXPORT ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable that_sprk_storage); SUNDIALS_EXPORT -void ARKodeSPRKTableMempace(ARKodeSPRKTable sprk_storage, sunindextype* liw, - sunindextype* lrw); +void ARKodeSPRKTable_Write(ARKodeSPRKTable sprk_table, FILE* outfile); + +SUNDIALS_EXPORT +void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_storage, sunindextype* liw, + sunindextype* lrw); SUNDIALS_EXPORT void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_storage); SUNDIALS_EXPORT int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_storage, - ARKodeButcherTable* erk_ptr, - ARKodeButcherTable* dirk_ptr); + ARKodeButcherTable* a_ptr, + ARKodeButcherTable* b_ptr); /* Different methods */ diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index ae893c0ee5..3c3736bd75 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -20,15 +20,18 @@ #include #include +#include "arkode/arkode_butcher.h" +#include "arkode_impl.h" + ARKodeSPRKTable ARKodeSymplecticEuler() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(1); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 1; - sprk_storage->stages = 1; - sprk_storage->a[0] = SUN_RCONST(1.0); - sprk_storage->ahat[0] = SUN_RCONST(1.0); - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(1); + if (!sprk_table) { return NULL; } + sprk_table->q = 1; + sprk_table->stages = 1; + sprk_table->a[0] = SUN_RCONST(1.0); + sprk_table->ahat[0] = SUN_RCONST(1.0); + return sprk_table; } /* @@ -42,59 +45,59 @@ ARKodeSPRKTable ARKodeSymplecticEuler() ARKodeSPRKTable ARKodeSymplecticLeapfrog2() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(2); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 2; - sprk_storage->stages = 2; - sprk_storage->a[0] = SUN_RCONST(0.5); - sprk_storage->a[1] = SUN_RCONST(0.5); - sprk_storage->ahat[0] = SUN_RCONST(0.0); - sprk_storage->ahat[1] = SUN_RCONST(1.0); - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(2); + if (!sprk_table) { return NULL; } + sprk_table->q = 2; + sprk_table->stages = 2; + sprk_table->a[0] = SUN_RCONST(0.5); + sprk_table->a[1] = SUN_RCONST(0.5); + sprk_table->ahat[0] = SUN_RCONST(0.0); + sprk_table->ahat[1] = SUN_RCONST(1.0); + return sprk_table; } ARKodeSPRKTable ARKodeSymplecticPseudoLeapfrog2() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(2); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 2; - sprk_storage->stages = 2; - sprk_storage->a[0] = SUN_RCONST(1.0); - sprk_storage->a[1] = SUN_RCONST(0.0); - sprk_storage->ahat[0] = SUN_RCONST(0.5); - sprk_storage->ahat[1] = SUN_RCONST(0.5); - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(2); + if (!sprk_table) { return NULL; } + sprk_table->q = 2; + sprk_table->stages = 2; + sprk_table->a[0] = SUN_RCONST(1.0); + sprk_table->a[1] = SUN_RCONST(0.0); + sprk_table->ahat[0] = SUN_RCONST(0.5); + sprk_table->ahat[1] = SUN_RCONST(0.5); + return sprk_table; } ARKodeSPRKTable ARKodeSymplecticCandyRozmus4() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(4); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 4; - sprk_storage->stages = 4; - sprk_storage->a[0] = + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(4); + if (!sprk_table) { return NULL; } + sprk_table->q = 4; + sprk_table->stages = 4; + sprk_table->a[0] = (SUN_RCONST(2.0) + SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0)) + SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0) / SUN_RCONST(3.0))) / SUN_RCONST(6.0); - sprk_storage->a[1] = + sprk_table->a[1] = (SUN_RCONST(1.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0)) - SUNRpowerR(SUN_RCONST(2.0), -SUN_RCONST(1.0) / SUN_RCONST(3.0))) / SUN_RCONST(6.0); - sprk_storage->a[2] = sprk_storage->a[1]; - sprk_storage->a[3] = sprk_storage->a[0]; - sprk_storage->ahat[0] = SUN_RCONST(0.0); - sprk_storage->ahat[1] = + sprk_table->a[2] = sprk_table->a[1]; + sprk_table->a[3] = sprk_table->a[0]; + sprk_table->ahat[0] = SUN_RCONST(0.0); + sprk_table->ahat[1] = SUN_RCONST(1.0) / (SUN_RCONST(2.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(1.0) / SUN_RCONST(3.0))); - sprk_storage->ahat[2] = + sprk_table->ahat[2] = SUN_RCONST(1.0) / (SUN_RCONST(1.0) - SUNRpowerR(SUN_RCONST(2.0), SUN_RCONST(2.0) / SUN_RCONST(3.0))); - sprk_storage->ahat[3] = sprk_storage->ahat[1]; - return sprk_storage; + sprk_table->ahat[3] = sprk_table->ahat[1]; + return sprk_table; } /* @@ -107,17 +110,17 @@ ARKodeSPRKTable ARKodeSymplecticCandyRozmus4() ARKodeSPRKTable ARKodeSymplecticRuth3() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(3); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 3; - sprk_storage->stages = 3; - sprk_storage->a[0] = SUN_RCONST(2.0) / SUN_RCONST(3.0); - sprk_storage->a[1] = -SUN_RCONST(2.0) / SUN_RCONST(3.0); - sprk_storage->a[2] = SUN_RCONST(1.0); - sprk_storage->ahat[0] = SUN_RCONST(7.0) / SUN_RCONST(24.0); - sprk_storage->ahat[1] = SUN_RCONST(3.0) / SUN_RCONST(4.0); - sprk_storage->ahat[2] = -SUN_RCONST(1.0) / SUN_RCONST(24.0); - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(3); + if (!sprk_table) { return NULL; } + sprk_table->q = 3; + sprk_table->stages = 3; + sprk_table->a[0] = SUN_RCONST(2.0) / SUN_RCONST(3.0); + sprk_table->a[1] = -SUN_RCONST(2.0) / SUN_RCONST(3.0); + sprk_table->a[2] = SUN_RCONST(1.0); + sprk_table->ahat[0] = SUN_RCONST(7.0) / SUN_RCONST(24.0); + sprk_table->ahat[1] = SUN_RCONST(3.0) / SUN_RCONST(4.0); + sprk_table->ahat[2] = -SUN_RCONST(1.0) / SUN_RCONST(24.0); + return sprk_table; } /* @@ -129,84 +132,84 @@ ARKodeSPRKTable ARKodeSymplecticRuth3() ARKodeSPRKTable ARKodeSymplecticMcLachlan2() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(2); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 2; - sprk_storage->stages = 2; - sprk_storage->a[1] = SUN_RCONST(1.0) - - (SUN_RCONST(1.0) / SUN_RCONST(2.0)) * SUNRsqrt(2.0); - sprk_storage->a[0] = SUN_RCONST(1.0) - sprk_storage->a[1]; - sprk_storage->ahat[1] = - SUN_RCONST(1.0) / (SUN_RCONST(2.0) * (SUN_RCONST(1.0) - sprk_storage->a[1])); - sprk_storage->ahat[0] = SUN_RCONST(1.0) - sprk_storage->ahat[1]; - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(2); + if (!sprk_table) { return NULL; } + sprk_table->q = 2; + sprk_table->stages = 2; + sprk_table->a[1] = SUN_RCONST(1.0) - + (SUN_RCONST(1.0) / SUN_RCONST(2.0)) * SUNRsqrt(2.0); + sprk_table->a[0] = SUN_RCONST(1.0) - sprk_table->a[1]; + sprk_table->ahat[1] = SUN_RCONST(1.0) / + (SUN_RCONST(2.0) * (SUN_RCONST(1.0) - sprk_table->a[1])); + sprk_table->ahat[0] = SUN_RCONST(1.0) - sprk_table->ahat[1]; + return sprk_table; } ARKodeSPRKTable ARKodeSymplecticMcLachlan3() { - sunrealtype w = 0.0; - sunrealtype y = 0.0; - sunrealtype z = 0.0; - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(3); - if (!sprk_storage) { return NULL; } + sunrealtype w = 0.0; + sunrealtype y = 0.0; + sunrealtype z = 0.0; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(3); + if (!sprk_table) { return NULL; } - sprk_storage->q = 3; - sprk_storage->stages = 3; + sprk_table->q = 3; + sprk_table->stages = 3; z = -SUNRpowerR((SUN_RCONST(2.0) / SUN_RCONST(27.0)) - SUN_RCONST(1.0) / (SUN_RCONST(9.0) * SUNRsqrt(3.0)), SUN_RCONST(1.0) / SUN_RCONST(3.0)); w = -SUN_RCONST(2.0) / SUN_RCONST(3.0) + SUN_RCONST(1.0) / (SUN_RCONST(9.0) * z) + z; - y = (SUN_RCONST(1.0) + w * w) / SUN_RCONST(4.0); - sprk_storage->a[0] = SUNRsqrt(SUN_RCONST(1.0) / (SUN_RCONST(9.0) * y) - - w / SUN_RCONST(2.0) + SUNRsqrt(y)) - - SUN_RCONST(1.0) / (SUN_RCONST(3.0) * SUNRsqrt(y)); - sprk_storage->a[1] = SUN_RCONST(0.25) / sprk_storage->a[0] - - sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->a[2] = SUN_RCONST(1.0) - sprk_storage->a[0] - sprk_storage->a[1]; - sprk_storage->ahat[0] = sprk_storage->a[2]; - sprk_storage->ahat[1] = sprk_storage->a[1]; - sprk_storage->ahat[2] = sprk_storage->a[0]; - return sprk_storage; + y = (SUN_RCONST(1.0) + w * w) / SUN_RCONST(4.0); + sprk_table->a[0] = SUNRsqrt(SUN_RCONST(1.0) / (SUN_RCONST(9.0) * y) - + w / SUN_RCONST(2.0) + SUNRsqrt(y)) - + SUN_RCONST(1.0) / (SUN_RCONST(3.0) * SUNRsqrt(y)); + sprk_table->a[1] = SUN_RCONST(0.25) / sprk_table->a[0] - + sprk_table->a[0] / SUN_RCONST(2.0); + sprk_table->a[2] = SUN_RCONST(1.0) - sprk_table->a[0] - sprk_table->a[1]; + sprk_table->ahat[0] = sprk_table->a[2]; + sprk_table->ahat[1] = sprk_table->a[1]; + sprk_table->ahat[2] = sprk_table->a[0]; + return sprk_table; } ARKodeSPRKTable ARKodeSymplecticMcLachlan4() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(4); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 4; - sprk_storage->stages = 4; - sprk_storage->a[0] = SUN_RCONST(0.515352837431122936); - sprk_storage->a[1] = -SUN_RCONST(0.085782019412973646); - sprk_storage->a[2] = SUN_RCONST(0.441583023616466524); - sprk_storage->a[3] = SUN_RCONST(0.128846158365384185); - sprk_storage->ahat[0] = SUN_RCONST(0.134496199277431089); - sprk_storage->ahat[1] = -SUN_RCONST(0.224819803079420806); - sprk_storage->ahat[2] = SUN_RCONST(0.756320000515668291); - sprk_storage->ahat[3] = SUN_RCONST(0.33400360328632142); - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(4); + if (!sprk_table) { return NULL; } + sprk_table->q = 4; + sprk_table->stages = 4; + sprk_table->a[0] = SUN_RCONST(0.515352837431122936); + sprk_table->a[1] = -SUN_RCONST(0.085782019412973646); + sprk_table->a[2] = SUN_RCONST(0.441583023616466524); + sprk_table->a[3] = SUN_RCONST(0.128846158365384185); + sprk_table->ahat[0] = SUN_RCONST(0.134496199277431089); + sprk_table->ahat[1] = -SUN_RCONST(0.224819803079420806); + sprk_table->ahat[2] = SUN_RCONST(0.756320000515668291); + sprk_table->ahat[3] = SUN_RCONST(0.33400360328632142); + return sprk_table; } ARKodeSPRKTable ARKodeSymplecticMcLachlan5() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(6); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 5; - sprk_storage->stages = 6; - sprk_storage->a[0] = SUN_RCONST(0.339839625839110000); - sprk_storage->a[1] = -SUN_RCONST(0.088601336903027329); - sprk_storage->a[2] = SUN_RCONST(0.5858564768259621188); - sprk_storage->a[3] = -SUN_RCONST(0.603039356536491888); - sprk_storage->a[4] = SUN_RCONST(0.3235807965546976394); - sprk_storage->a[5] = SUN_RCONST(0.4423637942197494587); - sprk_storage->ahat[0] = SUN_RCONST(0.1193900292875672758); - sprk_storage->ahat[1] = SUN_RCONST(0.6989273703824752308); - sprk_storage->ahat[2] = -SUN_RCONST(0.1713123582716007754); - sprk_storage->ahat[3] = SUN_RCONST(0.4012695022513534480); - sprk_storage->ahat[4] = SUN_RCONST(0.0107050818482359840); - sprk_storage->ahat[5] = -SUN_RCONST(0.0589796254980311632); - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(6); + if (!sprk_table) { return NULL; } + sprk_table->q = 5; + sprk_table->stages = 6; + sprk_table->a[0] = SUN_RCONST(0.339839625839110000); + sprk_table->a[1] = -SUN_RCONST(0.088601336903027329); + sprk_table->a[2] = SUN_RCONST(0.5858564768259621188); + sprk_table->a[3] = -SUN_RCONST(0.603039356536491888); + sprk_table->a[4] = SUN_RCONST(0.3235807965546976394); + sprk_table->a[5] = SUN_RCONST(0.4423637942197494587); + sprk_table->ahat[0] = SUN_RCONST(0.1193900292875672758); + sprk_table->ahat[1] = SUN_RCONST(0.6989273703824752308); + sprk_table->ahat[2] = -SUN_RCONST(0.1713123582716007754); + sprk_table->ahat[3] = SUN_RCONST(0.4012695022513534480); + sprk_table->ahat[4] = SUN_RCONST(0.0107050818482359840); + sprk_table->ahat[5] = -SUN_RCONST(0.0589796254980311632); + return sprk_table; } /* @@ -220,30 +223,27 @@ ARKodeSPRKTable ARKodeSymplecticMcLachlan5() ARKodeSPRKTable ARKodeSymplecticYoshida6() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(8); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 6; - sprk_storage->stages = 8; - sprk_storage->a[0] = SUN_RCONST(0.7845136104775572638194976338663498757768); - sprk_storage->a[1] = SUN_RCONST(0.2355732133593581336847931829785346016865); - sprk_storage->a[2] = -SUN_RCONST(1.177679984178871006946415680964315734639); - sprk_storage->a[3] = SUN_RCONST(1.315186320683911218884249728238862514352); - sprk_storage->a[4] = sprk_storage->a[2]; - sprk_storage->a[5] = sprk_storage->a[1]; - sprk_storage->a[6] = sprk_storage->a[0]; - sprk_storage->a[7] = SUN_RCONST(0.0); - sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / - SUN_RCONST(2.0); - sprk_storage->ahat[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / - SUN_RCONST(2.0); - sprk_storage->ahat[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / - SUN_RCONST(2.0); - sprk_storage->ahat[4] = sprk_storage->ahat[3]; - sprk_storage->ahat[5] = sprk_storage->ahat[2]; - sprk_storage->ahat[6] = sprk_storage->ahat[1]; - sprk_storage->ahat[7] = sprk_storage->ahat[0]; - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(8); + if (!sprk_table) { return NULL; } + sprk_table->q = 6; + sprk_table->stages = 8; + sprk_table->a[0] = SUN_RCONST(0.7845136104775572638194976338663498757768); + sprk_table->a[1] = SUN_RCONST(0.2355732133593581336847931829785346016865); + sprk_table->a[2] = -SUN_RCONST(1.177679984178871006946415680964315734639); + sprk_table->a[3] = SUN_RCONST(1.315186320683911218884249728238862514352); + sprk_table->a[4] = sprk_table->a[2]; + sprk_table->a[5] = sprk_table->a[1]; + sprk_table->a[6] = sprk_table->a[0]; + sprk_table->a[7] = SUN_RCONST(0.0); + sprk_table->ahat[0] = sprk_table->a[0] / SUN_RCONST(2.0); + sprk_table->ahat[1] = (sprk_table->a[0] + sprk_table->a[1]) / SUN_RCONST(2.0); + sprk_table->ahat[2] = (sprk_table->a[1] + sprk_table->a[2]) / SUN_RCONST(2.0); + sprk_table->ahat[3] = (sprk_table->a[2] + sprk_table->a[3]) / SUN_RCONST(2.0); + sprk_table->ahat[4] = sprk_table->ahat[3]; + sprk_table->ahat[5] = sprk_table->ahat[2]; + sprk_table->ahat[6] = sprk_table->ahat[1]; + sprk_table->ahat[7] = sprk_table->ahat[0]; + return sprk_table; } /* @@ -262,50 +262,43 @@ ARKodeSPRKTable ARKodeSymplecticYoshida6() ARKodeSPRKTable ARKodeSymplecticSuzukiUmeno816() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(16); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 8; - sprk_storage->stages = 16; - sprk_storage->a[0] = SUN_RCONST(0.7416703643506129534482278017838063156035); - sprk_storage->a[1] = -SUN_RCONST(0.4091008258000315939973000958935634173099); - sprk_storage->a[2] = SUN_RCONST(0.1907547102962383799538762564503716627355); - sprk_storage->a[3] = -SUN_RCONST(0.5738624711160822666563877266355357421595); - sprk_storage->a[4] = SUN_RCONST(0.2990641813036559238444635406886029882258); - sprk_storage->a[5] = SUN_RCONST(0.3346249182452981837849579798821822886337); - sprk_storage->a[6] = SUN_RCONST(0.3152930923967665966320566638110024309941); - sprk_storage->a[7] = -SUN_RCONST(0.7968879393529163540197888401737330534463); - sprk_storage->a[8] = sprk_storage->a[6]; - sprk_storage->a[9] = sprk_storage->a[5]; - sprk_storage->a[10] = sprk_storage->a[4]; - sprk_storage->a[11] = sprk_storage->a[3]; - sprk_storage->a[12] = sprk_storage->a[2]; - sprk_storage->a[13] = sprk_storage->a[1]; - sprk_storage->a[14] = sprk_storage->a[0]; - sprk_storage->a[15] = SUN_RCONST(0.0); - sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / - SUN_RCONST(2.0); - sprk_storage->ahat[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / - SUN_RCONST(2.0); - sprk_storage->ahat[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / - SUN_RCONST(2.0); - sprk_storage->ahat[4] = (sprk_storage->a[3] + sprk_storage->a[4]) / - SUN_RCONST(2.0); - sprk_storage->ahat[5] = (sprk_storage->a[4] + sprk_storage->a[5]) / - SUN_RCONST(2.0); - sprk_storage->ahat[6] = (sprk_storage->a[5] + sprk_storage->a[6]) / - SUN_RCONST(2.0); - sprk_storage->ahat[7] = (sprk_storage->a[6] + sprk_storage->a[7]) / - SUN_RCONST(2.0); - sprk_storage->ahat[8] = sprk_storage->ahat[7]; - sprk_storage->ahat[9] = sprk_storage->ahat[6]; - sprk_storage->ahat[10] = sprk_storage->ahat[5]; - sprk_storage->ahat[11] = sprk_storage->ahat[4]; - sprk_storage->ahat[12] = sprk_storage->ahat[3]; - sprk_storage->ahat[13] = sprk_storage->ahat[2]; - sprk_storage->ahat[14] = sprk_storage->ahat[1]; - sprk_storage->ahat[15] = sprk_storage->ahat[0]; - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(16); + if (!sprk_table) { return NULL; } + sprk_table->q = 8; + sprk_table->stages = 16; + sprk_table->a[0] = SUN_RCONST(0.7416703643506129534482278017838063156035); + sprk_table->a[1] = -SUN_RCONST(0.4091008258000315939973000958935634173099); + sprk_table->a[2] = SUN_RCONST(0.1907547102962383799538762564503716627355); + sprk_table->a[3] = -SUN_RCONST(0.5738624711160822666563877266355357421595); + sprk_table->a[4] = SUN_RCONST(0.2990641813036559238444635406886029882258); + sprk_table->a[5] = SUN_RCONST(0.3346249182452981837849579798821822886337); + sprk_table->a[6] = SUN_RCONST(0.3152930923967665966320566638110024309941); + sprk_table->a[7] = -SUN_RCONST(0.7968879393529163540197888401737330534463); + sprk_table->a[8] = sprk_table->a[6]; + sprk_table->a[9] = sprk_table->a[5]; + sprk_table->a[10] = sprk_table->a[4]; + sprk_table->a[11] = sprk_table->a[3]; + sprk_table->a[12] = sprk_table->a[2]; + sprk_table->a[13] = sprk_table->a[1]; + sprk_table->a[14] = sprk_table->a[0]; + sprk_table->a[15] = SUN_RCONST(0.0); + sprk_table->ahat[0] = sprk_table->a[0] / SUN_RCONST(2.0); + sprk_table->ahat[1] = (sprk_table->a[0] + sprk_table->a[1]) / SUN_RCONST(2.0); + sprk_table->ahat[2] = (sprk_table->a[1] + sprk_table->a[2]) / SUN_RCONST(2.0); + sprk_table->ahat[3] = (sprk_table->a[2] + sprk_table->a[3]) / SUN_RCONST(2.0); + sprk_table->ahat[4] = (sprk_table->a[3] + sprk_table->a[4]) / SUN_RCONST(2.0); + sprk_table->ahat[5] = (sprk_table->a[4] + sprk_table->a[5]) / SUN_RCONST(2.0); + sprk_table->ahat[6] = (sprk_table->a[5] + sprk_table->a[6]) / SUN_RCONST(2.0); + sprk_table->ahat[7] = (sprk_table->a[6] + sprk_table->a[7]) / SUN_RCONST(2.0); + sprk_table->ahat[8] = sprk_table->ahat[7]; + sprk_table->ahat[9] = sprk_table->ahat[6]; + sprk_table->ahat[10] = sprk_table->ahat[5]; + sprk_table->ahat[11] = sprk_table->ahat[4]; + sprk_table->ahat[12] = sprk_table->ahat[3]; + sprk_table->ahat[13] = sprk_table->ahat[2]; + sprk_table->ahat[14] = sprk_table->ahat[1]; + sprk_table->ahat[15] = sprk_table->ahat[0]; + return sprk_table; } /* @@ -319,132 +312,122 @@ ARKodeSPRKTable ARKodeSymplecticSuzukiUmeno816() ARKodeSPRKTable ARKodeSymplecticSofroniou10() { - ARKodeSPRKTable sprk_storage = ARKodeSPRKTable_Alloc(36); - if (!sprk_storage) { return NULL; } - sprk_storage->q = 10; - sprk_storage->stages = 36; - - sprk_storage->a[0] = SUN_RCONST(0.078795722521686419263907679337684); - sprk_storage->a[1] = SUN_RCONST(0.31309610341510852776481247192647); - sprk_storage->a[2] = SUN_RCONST(0.027918383235078066109520273275299); - sprk_storage->a[3] = -SUN_RCONST(0.22959284159390709415121339679655); - sprk_storage->a[4] = SUN_RCONST(0.13096206107716486317465685927961); - sprk_storage->a[5] = -SUN_RCONST(0.26973340565451071434460973222411); - sprk_storage->a[6] = SUN_RCONST(0.074973343155891435666137105641410); - sprk_storage->a[7] = SUN_RCONST(0.11199342399981020488957508073640); - sprk_storage->a[8] = SUN_RCONST(0.36613344954622675119314812353150); - sprk_storage->a[9] = -SUN_RCONST(0.39910563013603589787862981058340); - sprk_storage->a[10] = SUN_RCONST(0.10308739852747107731580277001372); - sprk_storage->a[11] = SUN_RCONST(0.41143087395589023782070411897608); - sprk_storage->a[12] = -SUN_RCONST(0.0048663605831352617621956593099771); - sprk_storage->a[13] = -SUN_RCONST(0.39203335370863990644808193642610); - sprk_storage->a[14] = SUN_RCONST(0.051942502962449647037182904015976); - sprk_storage->a[15] = SUN_RCONST(0.050665090759924496335874344156866); - sprk_storage->a[16] = SUN_RCONST(0.049674370639729879054568800279461); - sprk_storage->a[17] = SUN_RCONST(0.049317735759594537917680008339338); - sprk_storage->a[18] = sprk_storage->a[16]; - sprk_storage->a[19] = sprk_storage->a[15]; - sprk_storage->a[20] = sprk_storage->a[14]; - sprk_storage->a[21] = sprk_storage->a[13]; - sprk_storage->a[22] = sprk_storage->a[12]; - sprk_storage->a[23] = sprk_storage->a[11]; - sprk_storage->a[24] = sprk_storage->a[10]; - sprk_storage->a[25] = sprk_storage->a[9]; - sprk_storage->a[26] = sprk_storage->a[8]; - sprk_storage->a[27] = sprk_storage->a[7]; - sprk_storage->a[28] = sprk_storage->a[6]; - sprk_storage->a[29] = sprk_storage->a[5]; - sprk_storage->a[30] = sprk_storage->a[4]; - sprk_storage->a[31] = sprk_storage->a[3]; - sprk_storage->a[32] = sprk_storage->a[2]; - sprk_storage->a[33] = sprk_storage->a[1]; - sprk_storage->a[34] = sprk_storage->a[0]; - sprk_storage->a[35] = SUN_RCONST(0.0); - sprk_storage->ahat[0] = sprk_storage->a[0] / SUN_RCONST(2.0); - sprk_storage->ahat[1] = (sprk_storage->a[0] + sprk_storage->a[1]) / - SUN_RCONST(2.0); - sprk_storage->ahat[2] = (sprk_storage->a[1] + sprk_storage->a[2]) / - SUN_RCONST(2.0); - sprk_storage->ahat[3] = (sprk_storage->a[2] + sprk_storage->a[3]) / - SUN_RCONST(2.0); - sprk_storage->ahat[4] = (sprk_storage->a[3] + sprk_storage->a[4]) / - SUN_RCONST(2.0); - sprk_storage->ahat[5] = (sprk_storage->a[4] + sprk_storage->a[5]) / - SUN_RCONST(2.0); - sprk_storage->ahat[6] = (sprk_storage->a[5] + sprk_storage->a[6]) / - SUN_RCONST(2.0); - sprk_storage->ahat[7] = (sprk_storage->a[6] + sprk_storage->a[7]) / - SUN_RCONST(2.0); - sprk_storage->ahat[8] = (sprk_storage->a[7] + sprk_storage->a[8]) / - SUN_RCONST(2.0); - sprk_storage->ahat[9] = (sprk_storage->a[8] + sprk_storage->a[9]) / - SUN_RCONST(2.0); - sprk_storage->ahat[10] = (sprk_storage->a[9] + sprk_storage->a[10]) / - SUN_RCONST(2.0); - sprk_storage->ahat[11] = (sprk_storage->a[10] + sprk_storage->a[11]) / - SUN_RCONST(2.0); - sprk_storage->ahat[12] = (sprk_storage->a[11] + sprk_storage->a[12]) / - SUN_RCONST(2.0); - sprk_storage->ahat[13] = (sprk_storage->a[12] + sprk_storage->a[13]) / - SUN_RCONST(2.0); - sprk_storage->ahat[14] = (sprk_storage->a[13] + sprk_storage->a[14]) / - SUN_RCONST(2.0); - sprk_storage->ahat[15] = (sprk_storage->a[14] + sprk_storage->a[15]) / - SUN_RCONST(2.0); - sprk_storage->ahat[16] = (sprk_storage->a[15] + sprk_storage->a[16]) / - SUN_RCONST(2.0); - sprk_storage->ahat[17] = (sprk_storage->a[16] + sprk_storage->a[17]) / - SUN_RCONST(2.0); - sprk_storage->ahat[18] = sprk_storage->ahat[17]; - sprk_storage->ahat[19] = sprk_storage->ahat[16]; - sprk_storage->ahat[20] = sprk_storage->ahat[15]; - sprk_storage->ahat[21] = sprk_storage->ahat[14]; - sprk_storage->ahat[22] = sprk_storage->ahat[13]; - sprk_storage->ahat[23] = sprk_storage->ahat[12]; - sprk_storage->ahat[24] = sprk_storage->ahat[11]; - sprk_storage->ahat[25] = sprk_storage->ahat[10]; - sprk_storage->ahat[26] = sprk_storage->ahat[9]; - sprk_storage->ahat[27] = sprk_storage->ahat[8]; - sprk_storage->ahat[28] = sprk_storage->ahat[7]; - sprk_storage->ahat[29] = sprk_storage->ahat[6]; - sprk_storage->ahat[30] = sprk_storage->ahat[5]; - sprk_storage->ahat[31] = sprk_storage->ahat[4]; - sprk_storage->ahat[32] = sprk_storage->ahat[3]; - sprk_storage->ahat[33] = sprk_storage->ahat[2]; - sprk_storage->ahat[34] = sprk_storage->ahat[1]; - sprk_storage->ahat[35] = sprk_storage->ahat[0]; - - return sprk_storage; + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(36); + if (!sprk_table) { return NULL; } + sprk_table->q = 10; + sprk_table->stages = 36; + + sprk_table->a[0] = SUN_RCONST(0.078795722521686419263907679337684); + sprk_table->a[1] = SUN_RCONST(0.31309610341510852776481247192647); + sprk_table->a[2] = SUN_RCONST(0.027918383235078066109520273275299); + sprk_table->a[3] = -SUN_RCONST(0.22959284159390709415121339679655); + sprk_table->a[4] = SUN_RCONST(0.13096206107716486317465685927961); + sprk_table->a[5] = -SUN_RCONST(0.26973340565451071434460973222411); + sprk_table->a[6] = SUN_RCONST(0.074973343155891435666137105641410); + sprk_table->a[7] = SUN_RCONST(0.11199342399981020488957508073640); + sprk_table->a[8] = SUN_RCONST(0.36613344954622675119314812353150); + sprk_table->a[9] = -SUN_RCONST(0.39910563013603589787862981058340); + sprk_table->a[10] = SUN_RCONST(0.10308739852747107731580277001372); + sprk_table->a[11] = SUN_RCONST(0.41143087395589023782070411897608); + sprk_table->a[12] = -SUN_RCONST(0.0048663605831352617621956593099771); + sprk_table->a[13] = -SUN_RCONST(0.39203335370863990644808193642610); + sprk_table->a[14] = SUN_RCONST(0.051942502962449647037182904015976); + sprk_table->a[15] = SUN_RCONST(0.050665090759924496335874344156866); + sprk_table->a[16] = SUN_RCONST(0.049674370639729879054568800279461); + sprk_table->a[17] = SUN_RCONST(0.049317735759594537917680008339338); + sprk_table->a[18] = sprk_table->a[16]; + sprk_table->a[19] = sprk_table->a[15]; + sprk_table->a[20] = sprk_table->a[14]; + sprk_table->a[21] = sprk_table->a[13]; + sprk_table->a[22] = sprk_table->a[12]; + sprk_table->a[23] = sprk_table->a[11]; + sprk_table->a[24] = sprk_table->a[10]; + sprk_table->a[25] = sprk_table->a[9]; + sprk_table->a[26] = sprk_table->a[8]; + sprk_table->a[27] = sprk_table->a[7]; + sprk_table->a[28] = sprk_table->a[6]; + sprk_table->a[29] = sprk_table->a[5]; + sprk_table->a[30] = sprk_table->a[4]; + sprk_table->a[31] = sprk_table->a[3]; + sprk_table->a[32] = sprk_table->a[2]; + sprk_table->a[33] = sprk_table->a[1]; + sprk_table->a[34] = sprk_table->a[0]; + sprk_table->a[35] = SUN_RCONST(0.0); + sprk_table->ahat[0] = sprk_table->a[0] / SUN_RCONST(2.0); + sprk_table->ahat[1] = (sprk_table->a[0] + sprk_table->a[1]) / SUN_RCONST(2.0); + sprk_table->ahat[2] = (sprk_table->a[1] + sprk_table->a[2]) / SUN_RCONST(2.0); + sprk_table->ahat[3] = (sprk_table->a[2] + sprk_table->a[3]) / SUN_RCONST(2.0); + sprk_table->ahat[4] = (sprk_table->a[3] + sprk_table->a[4]) / SUN_RCONST(2.0); + sprk_table->ahat[5] = (sprk_table->a[4] + sprk_table->a[5]) / SUN_RCONST(2.0); + sprk_table->ahat[6] = (sprk_table->a[5] + sprk_table->a[6]) / SUN_RCONST(2.0); + sprk_table->ahat[7] = (sprk_table->a[6] + sprk_table->a[7]) / SUN_RCONST(2.0); + sprk_table->ahat[8] = (sprk_table->a[7] + sprk_table->a[8]) / SUN_RCONST(2.0); + sprk_table->ahat[9] = (sprk_table->a[8] + sprk_table->a[9]) / SUN_RCONST(2.0); + sprk_table->ahat[10] = (sprk_table->a[9] + sprk_table->a[10]) / SUN_RCONST(2.0); + sprk_table->ahat[11] = (sprk_table->a[10] + sprk_table->a[11]) / + SUN_RCONST(2.0); + sprk_table->ahat[12] = (sprk_table->a[11] + sprk_table->a[12]) / + SUN_RCONST(2.0); + sprk_table->ahat[13] = (sprk_table->a[12] + sprk_table->a[13]) / + SUN_RCONST(2.0); + sprk_table->ahat[14] = (sprk_table->a[13] + sprk_table->a[14]) / + SUN_RCONST(2.0); + sprk_table->ahat[15] = (sprk_table->a[14] + sprk_table->a[15]) / + SUN_RCONST(2.0); + sprk_table->ahat[16] = (sprk_table->a[15] + sprk_table->a[16]) / + SUN_RCONST(2.0); + sprk_table->ahat[17] = (sprk_table->a[16] + sprk_table->a[17]) / + SUN_RCONST(2.0); + sprk_table->ahat[18] = sprk_table->ahat[17]; + sprk_table->ahat[19] = sprk_table->ahat[16]; + sprk_table->ahat[20] = sprk_table->ahat[15]; + sprk_table->ahat[21] = sprk_table->ahat[14]; + sprk_table->ahat[22] = sprk_table->ahat[13]; + sprk_table->ahat[23] = sprk_table->ahat[12]; + sprk_table->ahat[24] = sprk_table->ahat[11]; + sprk_table->ahat[25] = sprk_table->ahat[10]; + sprk_table->ahat[26] = sprk_table->ahat[9]; + sprk_table->ahat[27] = sprk_table->ahat[8]; + sprk_table->ahat[28] = sprk_table->ahat[7]; + sprk_table->ahat[29] = sprk_table->ahat[6]; + sprk_table->ahat[30] = sprk_table->ahat[5]; + sprk_table->ahat[31] = sprk_table->ahat[4]; + sprk_table->ahat[32] = sprk_table->ahat[3]; + sprk_table->ahat[33] = sprk_table->ahat[2]; + sprk_table->ahat[34] = sprk_table->ahat[1]; + sprk_table->ahat[35] = sprk_table->ahat[0]; + + return sprk_table; } ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) { - ARKodeSPRKTable sprk_storage = NULL; + ARKodeSPRKTable sprk_table = NULL; - sprk_storage = (ARKodeSPRKTable)malloc(sizeof(struct ARKodeSPRKTableMem)); - if (!sprk_storage) { return NULL; } + sprk_table = (ARKodeSPRKTable)malloc(sizeof(struct ARKodeSPRKTableMem)); + if (!sprk_table) { return NULL; } - memset(sprk_storage, 0, sizeof(struct ARKodeSPRKTableMem)); + memset(sprk_table, 0, sizeof(struct ARKodeSPRKTableMem)); - sprk_storage->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); - if (!(sprk_storage->ahat)) + sprk_table->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); + if (!(sprk_table->ahat)) { - ARKodeSPRKTable_Free(sprk_storage); + ARKodeSPRKTable_Free(sprk_table); return NULL; } - sprk_storage->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); - if (!(sprk_storage->a)) + sprk_table->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); + if (!(sprk_table->a)) { - ARKodeSPRKTable_Free(sprk_storage); + ARKodeSPRKTable_Free(sprk_table); return NULL; } - sprk_storage->stages = stages; - sprk_storage->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); - sprk_storage->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); + sprk_table->stages = stages; + sprk_table->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); + sprk_table->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); - return sprk_storage; + return sprk_table; } ARKodeSPRKTable ARKodeSPRKTable_Load(ARKODE_SPRKMethodID id) @@ -521,93 +504,106 @@ ARKodeSPRKTable ARKodeSPRKTable_LoadByName(const char* method) return NULL; } -ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable that_sprk_storage) +ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable that_sprk_table) { - int i = 0; - ARKodeSPRKTable sprk_storage = NULL; + int i = 0; + ARKodeSPRKTable sprk_table = NULL; - sprk_storage = ARKodeSPRKTable_Alloc(that_sprk_storage->stages); + sprk_table = ARKodeSPRKTable_Alloc(that_sprk_table->stages); - sprk_storage->q = that_sprk_storage->q; + sprk_table->q = that_sprk_table->q; - for (i = 0; i < sprk_storage->stages; ++i) + for (i = 0; i < sprk_table->stages; ++i) { - sprk_storage->ahat[i] = that_sprk_storage->ahat[i]; - sprk_storage->a[i] = that_sprk_storage->a[i]; + sprk_table->ahat[i] = that_sprk_table->ahat[i]; + sprk_table->a[i] = that_sprk_table->a[i]; } - return sprk_storage; + return sprk_table; } -void ARKodeSPRKTableMempace(ARKodeSPRKTable sprk_storage, sunindextype* liw, - sunindextype* lrw) +void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_table, sunindextype* liw, + sunindextype* lrw) { *liw = 2; - *lrw = sprk_storage->stages * 2; + *lrw = sprk_table->stages * 2; } -void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_storage) +void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_table) { - if (sprk_storage) + if (sprk_table) { - if (sprk_storage->ahat) { free(sprk_storage->ahat); } - if (sprk_storage->a) { free(sprk_storage->a); } - free(sprk_storage); + if (sprk_table->ahat) { free(sprk_table->ahat); } + if (sprk_table->a) { free(sprk_table->a); } + free(sprk_table); } } -int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_storage, - ARKodeButcherTable* erk_ptr, - ARKodeButcherTable* dirk_ptr) +void ARKodeSPRKTable_Write(ARKodeSPRKTable sprk_table, FILE* outfile) +{ + ARKodeButcherTable a = NULL; + ARKodeButcherTable b = NULL; + + ARKodeSPRKTable_ToButcher(sprk_table, &a, &b); + + ARKodeButcherTable_Write(a, outfile); + ARKodeButcherTable_Write(b, outfile); + + ARKodeButcherTable_Free(a); + ARKodeButcherTable_Free(b); +} + +int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_table, + ARKodeButcherTable* a_ptr, + ARKodeButcherTable* b_ptr) { int i = 0; int j = 0; ARKodeButcherTable a = NULL; ARKodeButcherTable b = NULL; - a = ARKodeButcherTable_Alloc(sprk_storage->stages, SUNFALSE); + a = ARKodeButcherTable_Alloc(sprk_table->stages, SUNFALSE); if (!a) { return ARK_MEM_FAIL; } - b = ARKodeButcherTable_Alloc(sprk_storage->stages, SUNFALSE); + b = ARKodeButcherTable_Alloc(sprk_table->stages, SUNFALSE); if (!b) { return ARK_MEM_FAIL; } /* DIRK table */ - for (i = 0; i < sprk_storage->stages; ++i) + for (i = 0; i < sprk_table->stages; ++i) { - b->b[i] = sprk_storage->ahat[i]; - for (j = 0; j <= i; ++j) { b->A[i][j] = sprk_storage->ahat[j]; } + b->b[i] = sprk_table->ahat[i]; + for (j = 0; j <= i; ++j) { b->A[i][j] = sprk_table->ahat[j]; } /* Time weights: C_j = sum_{i=0}^{j} b_i */ /* Time weights: C_j = sum_{i=0}^{j-1} b_i */ - for (j = 0; j < sprk_storage->stages; ++j) + for (j = 0; j < sprk_table->stages; ++j) { - for (i = 0; i <= j; ++i) { b->c[j] += sprk_storage->ahat[i]; } + for (i = 0; i <= j; ++i) { b->c[j] += sprk_table->ahat[i]; } } /* Explicit table */ - for (i = 0; i < sprk_storage->stages; ++i) + for (i = 0; i < sprk_table->stages; ++i) { - a->b[i] = sprk_storage->a[i]; - for (j = 0; j < i; ++j) { a->A[i][j] = sprk_storage->a[j]; } + a->b[i] = sprk_table->a[i]; + for (j = 0; j < i; ++j) { a->A[i][j] = sprk_table->a[j]; } } /* Time weights: c_j = sum_{i=0}^{j-1} a_i */ - for (j = 0; j < sprk_storage->stages; ++j) + for (j = 0; j < sprk_table->stages; ++j) { - for (i = 0; i < j; ++i) { a->c[j] += sprk_storage->a[i]; } + for (i = 0; i < j; ++i) { a->c[j] += sprk_table->a[i]; } } /* Set method order */ - a->q = sprk_storage->q; - b->q = sprk_storage->q; + a->q = sprk_table->q; + b->q = sprk_table->q; /* No embedding, so set embedding order to 0 */ a->p = 0; b->p = 0; - } - *erk_ptr = a; - *dirk_ptr = b; + *a_ptr = a; + *b_ptr = b; return ARK_SUCCESS; } diff --git a/src/arkode/fmod/farkode_mod.c b/src/arkode/fmod/farkode_mod.c index cfc6a6ed08..a2943b878b 100644 --- a/src/arkode/fmod/farkode_mod.c +++ b/src/arkode/fmod/farkode_mod.c @@ -979,7 +979,7 @@ SWIGEXPORT void * _wrap_FARKodeSPRKTable_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FARKodeSPRKTableMempace(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; sunindextype *arg2 = (sunindextype *) 0 ; sunindextype *arg3 = (sunindextype *) 0 ; @@ -987,7 +987,7 @@ SWIGEXPORT void _wrap_FARKodeSPRKTableMempace(void *farg1, int64_t *farg2, int64 arg1 = (ARKodeSPRKTable)(farg1); arg2 = (sunindextype *)(farg2); arg3 = (sunindextype *)(farg3); - ARKodeSPRKTableMempace(arg1,arg2,arg3); + ARKodeSPRKTable_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index f65367a91e..18e4ff7623 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -302,7 +302,7 @@ module farkode_mod public :: FARKodeSPRKTable_Load public :: FARKodeSPRKTable_LoadByName public :: FARKodeSPRKTable_Copy - public :: FARKodeSPRKTableMempace + public :: FARKodeSPRKTable_Space public :: FARKodeSPRKTable_Free public :: FARKodeSPRKTable_ToButcher integer(C_INT), parameter, public :: ARKLS_SUCCESS = 0_C_INT @@ -772,8 +772,8 @@ function swigc_FARKodeSPRKTable_Copy(farg1) & type(C_PTR) :: fresult end function -subroutine swigc_FARKodeSPRKTableMempace(farg1, farg2, farg3) & -bind(C, name="_wrap_FARKodeSPRKTableMempace") +subroutine swigc_FARKodeSPRKTable_Space(farg1, farg2, farg3) & +bind(C, name="_wrap_FARKodeSPRKTable_Space") use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 type(C_PTR), value :: farg2 @@ -1569,7 +1569,7 @@ function FARKodeSPRKTable_Copy(that_sprk_storage) & swig_result = fresult end function -subroutine FARKodeSPRKTableMempace(sprk_storage, liw, lrw) +subroutine FARKodeSPRKTable_Space(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage integer(C_INT64_T), dimension(*), target, intent(inout) :: liw @@ -1581,7 +1581,7 @@ subroutine FARKodeSPRKTableMempace(sprk_storage, liw, lrw) farg1 = sprk_storage farg2 = c_loc(liw(1)) farg3 = c_loc(lrw(1)) -call swigc_FARKodeSPRKTableMempace(farg1, farg2, farg3) +call swigc_FARKodeSPRKTable_Space(farg1, farg2, farg3) end subroutine subroutine FARKodeSPRKTable_Free(sprk_storage) From 58f3c6f4c77f0bb71285c48db0b229901f4dcfd2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jul 2023 14:23:20 -0700 Subject: [PATCH 136/177] regen fortran --- src/arkode/fmod/farkode_mod.c | 28 +++++++++++++++ src/arkode/fmod/farkode_mod.f90 | 64 ++++++++++++++++++++++++++++++--- 2 files changed, 87 insertions(+), 5 deletions(-) diff --git a/src/arkode/fmod/farkode_mod.c b/src/arkode/fmod/farkode_mod.c index a2943b878b..1064f35078 100644 --- a/src/arkode/fmod/farkode_mod.c +++ b/src/arkode/fmod/farkode_mod.c @@ -931,6 +931,24 @@ SWIGEXPORT void _wrap_ARKodeSPRKTableMem_op_assign__(SwigClassWrapper *farg1, Sw } +SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Create(int const *farg1, int const *farg2, double *farg3, double *farg4) { + void * fresult ; + int arg1 ; + int arg2 ; + sunrealtype *arg3 = (sunrealtype *) 0 ; + sunrealtype *arg4 = (sunrealtype *) 0 ; + ARKodeSPRKTable result; + + arg1 = (int)(*farg1); + arg2 = (int)(*farg2); + arg3 = (sunrealtype *)(farg3); + arg4 = (sunrealtype *)(farg4); + result = (ARKodeSPRKTable)ARKodeSPRKStorage_Create(arg1,arg2,arg3,arg4); + fresult = result; + return fresult; +} + + SWIGEXPORT void * _wrap_FARKodeSPRKTable_Alloc(int const *farg1) { void * fresult ; int arg1 ; @@ -979,6 +997,16 @@ SWIGEXPORT void * _wrap_FARKodeSPRKTable_Copy(void *farg1) { } +SWIGEXPORT void _wrap_FARKodeSPRKTable_Write(void *farg1, void *farg2) { + ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; + FILE *arg2 = (FILE *) 0 ; + + arg1 = (ARKodeSPRKTable)(farg1); + arg2 = (FILE *)(farg2); + ARKodeSPRKTable_Write(arg1,arg2); +} + + SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; sunindextype *arg2 = (sunindextype *) 0 ; diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index 18e4ff7623..8b85385cf7 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -298,10 +298,12 @@ module farkode_mod interface ARKodeSPRKTableMem module procedure swigf_create_ARKodeSPRKTableMem end interface + public :: FARKodeSPRKStorage_Create public :: FARKodeSPRKTable_Alloc public :: FARKodeSPRKTable_Load public :: FARKodeSPRKTable_LoadByName public :: FARKodeSPRKTable_Copy + public :: FARKodeSPRKTable_Write public :: FARKodeSPRKTable_Space public :: FARKodeSPRKTable_Free public :: FARKodeSPRKTable_ToButcher @@ -739,6 +741,17 @@ subroutine swigc_ARKodeSPRKTableMem_op_assign__(farg1, farg2) & type(SwigClassWrapper) :: farg2 end subroutine +function swigc_FARKodeSPRKStorage_Create(farg1, farg2, farg3, farg4) & +bind(C, name="_wrap_FARKodeSPRKStorage_Create") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +integer(C_INT), intent(in) :: farg1 +integer(C_INT), intent(in) :: farg2 +type(C_PTR), value :: farg3 +type(C_PTR), value :: farg4 +type(C_PTR) :: fresult +end function + function swigc_FARKodeSPRKTable_Alloc(farg1) & bind(C, name="_wrap_FARKodeSPRKTable_Alloc") & result(fresult) @@ -772,6 +785,13 @@ function swigc_FARKodeSPRKTable_Copy(farg1) & type(C_PTR) :: fresult end function +subroutine swigc_FARKodeSPRKTable_Write(farg1, farg2) & +bind(C, name="_wrap_FARKodeSPRKTable_Write") +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +end subroutine + subroutine swigc_FARKodeSPRKTable_Space(farg1, farg2, farg3) & bind(C, name="_wrap_FARKodeSPRKTable_Space") use, intrinsic :: ISO_C_BINDING @@ -1516,6 +1536,28 @@ subroutine swigf_ARKodeSPRKTableMem_op_assign__(self, other) self%swigdata = farg1 end subroutine +function FARKodeSPRKStorage_Create(s, q, a, ahat) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: swig_result +integer(C_INT), intent(in) :: s +integer(C_INT), intent(in) :: q +real(C_DOUBLE), target, intent(inout) :: a +real(C_DOUBLE), target, intent(inout) :: ahat +type(C_PTR) :: fresult +integer(C_INT) :: farg1 +integer(C_INT) :: farg2 +type(C_PTR) :: farg3 +type(C_PTR) :: farg4 + +farg1 = s +farg2 = q +farg3 = c_loc(a) +farg4 = c_loc(ahat) +fresult = swigc_FARKodeSPRKStorage_Create(farg1, farg2, farg3, farg4) +swig_result = fresult +end function + function FARKodeSPRKTable_Alloc(stages) & result(swig_result) use, intrinsic :: ISO_C_BINDING @@ -1569,6 +1611,18 @@ function FARKodeSPRKTable_Copy(that_sprk_storage) & swig_result = fresult end function +subroutine FARKodeSPRKTable_Write(sprk_table, outfile) +use, intrinsic :: ISO_C_BINDING +type(C_PTR) :: sprk_table +type(C_PTR) :: outfile +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = sprk_table +farg2 = outfile +call swigc_FARKodeSPRKTable_Write(farg1, farg2) +end subroutine + subroutine FARKodeSPRKTable_Space(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage @@ -1593,21 +1647,21 @@ subroutine FARKodeSPRKTable_Free(sprk_storage) call swigc_FARKodeSPRKTable_Free(farg1) end subroutine -function FARKodeSPRKTable_ToButcher(sprk_storage, erk_ptr, dirk_ptr) & +function FARKodeSPRKTable_ToButcher(sprk_storage, a_ptr, b_ptr) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: sprk_storage -type(C_PTR), target, intent(inout) :: erk_ptr -type(C_PTR), target, intent(inout) :: dirk_ptr +type(C_PTR), target, intent(inout) :: a_ptr +type(C_PTR), target, intent(inout) :: b_ptr integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 farg1 = sprk_storage -farg2 = c_loc(erk_ptr) -farg3 = c_loc(dirk_ptr) +farg2 = c_loc(a_ptr) +farg3 = c_loc(b_ptr) fresult = swigc_FARKodeSPRKTable_ToButcher(farg1, farg2, farg3) swig_result = fresult end function From 8d9c676d451181099f463f38ce24adea7bc33bca Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jul 2023 16:35:33 -0700 Subject: [PATCH 137/177] bump answers --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index ccbb19a2ec..06809e6739 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit ccbb19a2ece54cef109189854748ea1fbe77bf96 +Subproject commit 06809e6739384323de318174e53c887fc14819ba From f4f0b63dab7ec15b701887bf8b41ccafd550a7a0 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jul 2023 16:57:15 -0700 Subject: [PATCH 138/177] fix memory leak --- examples/arkode/C_serial/ark_kepler.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 95f0023cf9..877fd36a23 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -492,9 +492,10 @@ int main(int argc, char* argv[]) sunrealtype con_orders[NUM_DT]; sunrealtype acc_errors[NUM_DT]; sunrealtype con_errors[NUM_DT]; - int expected_order = ARKodeSPRKTable_LoadByName(args.method_name)->q; - N_Vector ref_sol = N_VClone(result.sol); - N_Vector error = N_VClone(result.sol); + ARKodeSPRKTable method = ARKodeSPRKTable_LoadByName(args.method_name); + int expected_order = method->q; + N_Vector ref_sol = N_VClone(result.sol); + N_Vector error = N_VClone(result.sol); sunrealtype a11 = 0, a12 = 0, a21 = 0, a22 = 0; sunrealtype b1 = 0, b2 = 0, b1e = 0, b2e = 0; sunrealtype ord_max_acc = 0, ord_max_conv = 0, ord_avg = 0, ord_est = 0; @@ -502,6 +503,9 @@ int main(int argc, char* argv[]) sunrealtype dt = (expected_order >= 3) ? SUN_RCONST(1e-1) : SUN_RCONST(1e-3); sunrealtype dts[NUM_DT]; + /* Free method, we just needed it to get its order */ + ARKodeSPRKTable_Free(method); + /* Create a reference solution using 8th order ERK with a small time step */ const int old_step_mode = args.step_mode; const int old_stepper = args.stepper; From 5646341bebfb84b3937f198ae385aa825643fd66 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jul 2023 17:02:05 -0700 Subject: [PATCH 139/177] fix remaining PR comments --- .../source/Usage/SPRKStep_c_interface/User_callable.rst | 8 -------- src/arkode/arkode_sprkstep_io.c | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 17071db1ce..38d7dece05 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -434,14 +434,6 @@ Optional inputs for SPRKStep :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - If both :c:func:`SPRKStepSetFixedStep()` and - :c:func:`SPRKStepSetStopTime()` are used, then the fixed step size will be - used for all steps until the final step preceding the provided stop time - (which may be shorter). To resume use of the previous fixed step size, - another call to :c:func:`SPRKStepSetFixedStep()` must be made prior to - calling :c:func:`SPRKStepEvolve()` to resume integration. - .. c:function:: int SPRKStepSetMaxNumSteps(void* arkode_mem, long int mxsteps) diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 9673271de5..0474fd646b 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -316,7 +316,8 @@ int SPRKStepSetOrder(void* arkode_mem, int ord) &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - if (ord == 7 || ord == 9 || ord > 10) { return ARK_ILL_INPUT; } + /* Invalid orders result in the default order being used. */ + if (ord == 7 || ord == 9 || ord > 10) { ord = -1; } /* set user-provided value, or default, depending on argument */ if (ord <= 0) { step_mem->q = 4; } From 8d7c3d7c1dfd2dc8e753d3ddc4a687f9e23d8ae8 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jul 2023 10:26:34 -0700 Subject: [PATCH 140/177] remove duplicates from merge --- examples/arkode/C_serial/CMakeLists.txt | 33 +++++++------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 43a04017a6..8c17d3d33e 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -25,26 +25,6 @@ set(ARKODE_examples # develop tests "ark_analytic_mels\;\;develop" "ark_analytic_nonlin\;\;develop" - "ark_brusselator\;\;develop" - "ark_brusselator_fp\;\;exclude-single" - "ark_brusselator1D\;\;exclude-single" - "ark_conserved_exp_entropy_ark\;1 0\;develop" - "ark_conserved_exp_entropy_ark\;1 1\;develop" - "ark_conserved_exp_entropy_erk\;1\;develop" - "ark_dissipated_exp_entropy\;1 0\;develop" - "ark_dissipated_exp_entropy\;1 1\;develop" - "ark_heat1D\;\;develop" - "ark_heat1D_adapt\;\;develop" - "ark_KrylovDemo_prec\;\;exclude-single" - "ark_KrylovDemo_prec\;1\;exclude-single" - "ark_KrylovDemo_prec\;2\;exclude-single" - "ark_robertson\;\;exclude-single" - "ark_robertson_constraints\;\;exclude-single" - "ark_robertson_root\;\;exclude-single" - "ark_brusselator_mri\;\;develop" - "ark_onewaycouple_mri\;\;develop" - "ark_twowaycouple_mri\;\;develop" - "ark_reaction_diffusion_mri\;\;develop" "ark_brusselator_1D_mri\;\;develop" "ark_brusselator_fp\;\;exclude-single" "ark_brusselator_mri\;\;develop" @@ -57,23 +37,28 @@ set(ARKODE_examples "ark_brusselator1D_imexmri\;6 0.001\;exclude-single" "ark_brusselator1D_imexmri\;7 0.001\;exclude-single" "ark_brusselator1D\;\;exclude-single" - "ark_harmonic_symplectic\;\;exclude-single" + "ark_conserved_exp_entropy_ark\;1 0\;develop" + "ark_conserved_exp_entropy_ark\;1 1\;develop" + "ark_conserved_exp_entropy_erk\;1\;develop" "ark_damped_harmonic_symplectic\;\;exclude-single" + "ark_dissipated_exp_entropy\;1 0\;develop" + "ark_dissipated_exp_entropy\;1 1\;develop" + "ark_harmonic_symplectic\;\;exclude-single" "ark_heat1D_adapt\;\;develop" "ark_heat1D\;\;develop" - "ark_kepler\;\;develop" "ark_kepler\;--stepper ERK --step-mode adapt\;develop" "ark_kepler\;--stepper ERK --step-mode fixed --count-orbits\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --count-orbits --use-compensated-sums\;develop" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_EULER_1_1 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_MCLACHLAN_2_2 --tf 50 --check-order --nout 1\;exclude-single" - "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_RUTH_3_3 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_MCLACHLAN_3_3 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_MCLACHLAN_4_4 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_MCLACHLAN_5_6 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_RUTH_3_3 --tf 50 --check-order --nout 1\;exclude-single" "ark_kepler\;--stepper SPRK --step-mode fixed --method ARKODE_SPRK_YOSHIDA_6_8 --tf 50 --check-order --nout 1\;exclude-single" + "ark_kepler\;\;develop" "ark_kpr_mri\;\;develop" "ark_kpr_mri\;0 0.002\;develop" "ark_kpr_mri\;1 0.002\;develop" From 9886364d9b99a17ed1ed28ad1071686b245b66ee Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 10:48:58 -0700 Subject: [PATCH 141/177] fix table spacing --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index 8e162ae52d..aaa7c1e9dc 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -25,7 +25,7 @@ SPRK Method Table Structure The method order of accuracy. .. c:member:: int stages - + The number of stages. .. c:member:: sunrealtype* a @@ -40,7 +40,7 @@ SPRK Method Table Structure \vdots & \vdots & \ddots & \ddots & \vdots \\ c_s & a_1 & \cdots & a_{s-1} & 0 \\ \hline - & a_1 & \cdots & a_{s-1} & a_s + & a_1 & \cdots & a_{s-1} & a_s \end{array} \end{array}. @@ -82,7 +82,7 @@ ARKodeSPRKTable functions +----------------------------------------------+------------------------------------------------------------+ | :c:func:`ARKodeSPRKTable_Copy()` | Create a copy of a storage structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Space()` | Get the storage structure real and integer workspace size | + | :c:func:`ARKodeSPRKTable_Space()` | Get the storage structure real and integer workspace size | +----------------------------------------------+------------------------------------------------------------+ | :c:func:`ARKodeSPRKTable_Free()` | Deallocate a storage structure | +----------------------------------------------+------------------------------------------------------------+ @@ -118,7 +118,7 @@ ARKodeSPRKTable functions .. c:function:: void ARKodeSPRKTable_Write(ARKodeSPRKTable sprk_table, FILE* outfile) - Write the ARKodeSPRKTable out to the file. + Write the ARKodeSPRKTable out to the file. :param sprk_table: The :c:type:`ARKodeSPRKTable` structure to write. :param outfile: The FILE that will be written to. From 217f29c79732dc6e114d80fcd04b8903f275ef14 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 11:03:15 -0700 Subject: [PATCH 142/177] fix reference --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 4 ++-- doc/arkode/guide/source/Butcher.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index aaa7c1e9dc..afb8d65de4 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -99,14 +99,14 @@ ARKodeSPRKTable functions Load the :c:type:`ARKodeSPRKTable` structure for the specified method ID. - :param id: The ID of the SPRK method. One of :ref:`SPRKStorage.id`. + :param id: The ID of the SPRK method, see :ref:`Butcher.sprk`. :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. .. c:function:: ARKodeSPRKTable ARKodeSPRKTable_LoadByName(const char* method) Load the :c:type:`ARKodeSPRKTable` structure for the specified method name. - :param method: The name of the SPRK method. Must be one of :ref:`SPRKStorage.id` but as a string. + :param method: The name of the SPRK method, see :ref:`Butcher.sprk`. :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. .. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable sprk_table) diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index d4be995acd..99722814c1 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -1707,7 +1707,7 @@ Butcher table pairs are as follows: -.. _Butcher.symplectic: +.. _Butcher.sprk: Symplectic Partitioned Butcher tables ------------------------------------- From 14ca73899b82f07965e6ad67840f46223d5eec94 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 11:03:38 -0700 Subject: [PATCH 143/177] remove duplicate array end --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index afb8d65de4..cb677d799b 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -41,7 +41,6 @@ SPRK Method Table Structure c_s & a_1 & \cdots & a_{s-1} & 0 \\ \hline & a_1 & \cdots & a_{s-1} & a_s - \end{array} \end{array}. .. c:member:: sunrealtype* ahat From 175dfa2058a178dbada8eb3c0e78d3ceaedba44c Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 11:15:20 -0700 Subject: [PATCH 144/177] update answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 06809e6739..f5cd154928 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 06809e6739384323de318174e53c887fc14819ba +Subproject commit f5cd154928781a3648d287b8de376690d6e0e029 From 09315ed4e1322faf80bbeee5234c0c7c456b258b Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 11:47:13 -0700 Subject: [PATCH 145/177] add missing ARKSPRKTable_Crate implementation, regen F2003 --- include/arkode/arkode_sprk.h | 4 ++-- src/arkode/arkode_sprk.c | 19 +++++++++++++++++++ src/arkode/fmod/farkode_mod.c | 4 ++-- src/arkode/fmod/farkode_mod.f90 | 10 +++++----- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 5fd4c36471..de4ca0126d 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -59,8 +59,8 @@ typedef _SUNDIALS_STRUCT_ ARKodeSPRKTableMem* ARKodeSPRKTable; /* Utility routines to allocate/free/output SPRK structures */ SUNDIALS_EXPORT -ARKodeSPRKTable ARKodeSPRKStorage_Create(int s, int q, sunrealtype* a, - sunrealtype* ahat); +ARKodeSPRKTable ARKodeSPRKTable_Create(int s, int q, sunrealtype* a, + sunrealtype* ahat); SUNDIALS_EXPORT ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 3c3736bd75..6daed97fa3 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -400,6 +400,25 @@ ARKodeSPRKTable ARKodeSymplecticSofroniou10() return sprk_table; } +ARKodeSPRKTable ARKodeSPRKTable_Create(int s, int q, sunrealtype* a, + sunrealtype* ahat) +{ + int i; + + ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(s); + if (!sprk_table) { return NULL; } + + sprk_table->q = q; + + for (i = 0; i < sprk_table->stages; ++i) + { + sprk_table->ahat[i] = ahat[i]; + sprk_table->a[i] = a[i]; + } + + return sprk_table; +} + ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) { ARKodeSPRKTable sprk_table = NULL; diff --git a/src/arkode/fmod/farkode_mod.c b/src/arkode/fmod/farkode_mod.c index 1064f35078..514cb0a9a1 100644 --- a/src/arkode/fmod/farkode_mod.c +++ b/src/arkode/fmod/farkode_mod.c @@ -931,7 +931,7 @@ SWIGEXPORT void _wrap_ARKodeSPRKTableMem_op_assign__(SwigClassWrapper *farg1, Sw } -SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Create(int const *farg1, int const *farg2, double *farg3, double *farg4) { +SWIGEXPORT void * _wrap_FARKodeSPRKTable_Create(int const *farg1, int const *farg2, double *farg3, double *farg4) { void * fresult ; int arg1 ; int arg2 ; @@ -943,7 +943,7 @@ SWIGEXPORT void * _wrap_FARKodeSPRKStorage_Create(int const *farg1, int const *f arg2 = (int)(*farg2); arg3 = (sunrealtype *)(farg3); arg4 = (sunrealtype *)(farg4); - result = (ARKodeSPRKTable)ARKodeSPRKStorage_Create(arg1,arg2,arg3,arg4); + result = (ARKodeSPRKTable)ARKodeSPRKTable_Create(arg1,arg2,arg3,arg4); fresult = result; return fresult; } diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index c0dfa09ca5..5ca5dcc9f2 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -309,7 +309,7 @@ module farkode_mod interface ARKodeSPRKTableMem module procedure swigf_create_ARKodeSPRKTableMem end interface - public :: FARKodeSPRKStorage_Create + public :: FARKodeSPRKTable_Create public :: FARKodeSPRKTable_Alloc public :: FARKodeSPRKTable_Load public :: FARKodeSPRKTable_LoadByName @@ -752,8 +752,8 @@ subroutine swigc_ARKodeSPRKTableMem_op_assign__(farg1, farg2) & type(SwigClassWrapper) :: farg2 end subroutine -function swigc_FARKodeSPRKStorage_Create(farg1, farg2, farg3, farg4) & -bind(C, name="_wrap_FARKodeSPRKStorage_Create") & +function swigc_FARKodeSPRKTable_Create(farg1, farg2, farg3, farg4) & +bind(C, name="_wrap_FARKodeSPRKTable_Create") & result(fresult) use, intrinsic :: ISO_C_BINDING integer(C_INT), intent(in) :: farg1 @@ -1547,7 +1547,7 @@ subroutine swigf_ARKodeSPRKTableMem_op_assign__(self, other) self%swigdata = farg1 end subroutine -function FARKodeSPRKStorage_Create(s, q, a, ahat) & +function FARKodeSPRKTable_Create(s, q, a, ahat) & result(swig_result) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: swig_result @@ -1565,7 +1565,7 @@ function FARKodeSPRKStorage_Create(s, q, a, ahat) & farg2 = q farg3 = c_loc(a) farg4 = c_loc(ahat) -fresult = swigc_FARKodeSPRKStorage_Create(farg1, farg2, farg3, farg4) +fresult = swigc_FARKodeSPRKTable_Create(farg1, farg2, farg3, farg4) swig_result = fresult end function From 317bd8a31aeda4011692a3174180e528994bd16c Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 11:50:31 -0700 Subject: [PATCH 146/177] symplectic to sprk in tarscript .out files --- scripts/arkode | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/arkode b/scripts/arkode index ab853db1aa..c14c55216f 100755 --- a/scripts/arkode +++ b/scripts/arkode @@ -211,15 +211,15 @@ $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_EULER_1_1_--tf_50_--check-order_--nout_1.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_RUTH_3_3_--tf_50_--check-order_--nout_1.out -$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SYMPLECTIC_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out +$tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out $tar $tarfile $distrobase/examples/arkode/C_serial/ark_kepler_plot.py $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.c $tar $tarfile $distrobase/examples/arkode/C_serial/ark_harmonic_symplectic.h From fba5fb900b6f30a785b24502440c4451cfdbe053 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jul 2023 11:52:15 -0700 Subject: [PATCH 147/177] add Create implementation --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 10 ++++++++++ include/arkode/arkode_sprk.h | 4 ++-- src/arkode/arkode_sprk.c | 16 +++++++++------- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index cb677d799b..ba572a98ec 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -87,6 +87,16 @@ ARKodeSPRKTable functions +----------------------------------------------+------------------------------------------------------------+ +.. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Create(int stages, int q, const sunrealtype* a, const sunrealtype* ahat) + + Creates and allocates :c:type:`ARKodeSPRKTable` structure with the specified number of stages and the coefficients provided. + + :param stages: The number of stages. + :param q: The order of the method. + :param a: An array of the coefficients for the ``a`` table. + :param ahat: An array of the coefficients for the ``ahat`` table. + :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. + .. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) Allocate memory for an :c:type:`ARKodeSPRKTable` structure with the specified number of stages. diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index de4ca0126d..cae37c8da9 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -59,8 +59,8 @@ typedef _SUNDIALS_STRUCT_ ARKodeSPRKTableMem* ARKodeSPRKTable; /* Utility routines to allocate/free/output SPRK structures */ SUNDIALS_EXPORT -ARKodeSPRKTable ARKodeSPRKTable_Create(int s, int q, sunrealtype* a, - sunrealtype* ahat); +ARKodeSPRKTable ARKodeSPRKTable_Create(int s, int q, const sunrealtype* a, + const sunrealtype* ahat); SUNDIALS_EXPORT ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages); diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 6daed97fa3..0029b7dd68 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -400,20 +400,22 @@ ARKodeSPRKTable ARKodeSymplecticSofroniou10() return sprk_table; } -ARKodeSPRKTable ARKodeSPRKTable_Create(int s, int q, sunrealtype* a, - sunrealtype* ahat) +ARKodeSPRKTable ARKodeSPRKTable_Create(int s, int q, const sunrealtype* a, + const sunrealtype* ahat) { - int i; + int i = 0; + ARKodeSPRKTable sprk_table = NULL; - ARKodeSPRKTable sprk_table = ARKodeSPRKTable_Alloc(s); + sprk_table = (ARKodeSPRKTable)malloc(sizeof(struct ARKodeSPRKTableMem)); if (!sprk_table) { return NULL; } - sprk_table->q = q; + sprk_table->stages = s; + sprk_table->q = q; - for (i = 0; i < sprk_table->stages; ++i) + for (i = 0; i < s; i++) { - sprk_table->ahat[i] = ahat[i]; sprk_table->a[i] = a[i]; + sprk_table->ahat[i] = ahat[i]; } return sprk_table; From d43be32afbbeffc9a190d0639f730bc88e119c35 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 11:58:49 -0700 Subject: [PATCH 148/177] regen f2003 --- src/arkode/fmod/farkode_mod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/fmod/farkode_mod.c b/src/arkode/fmod/farkode_mod.c index 514cb0a9a1..704328f607 100644 --- a/src/arkode/fmod/farkode_mod.c +++ b/src/arkode/fmod/farkode_mod.c @@ -931,7 +931,7 @@ SWIGEXPORT void _wrap_ARKodeSPRKTableMem_op_assign__(SwigClassWrapper *farg1, Sw } -SWIGEXPORT void * _wrap_FARKodeSPRKTable_Create(int const *farg1, int const *farg2, double *farg3, double *farg4) { +SWIGEXPORT void * _wrap_FARKodeSPRKTable_Create(int const *farg1, int const *farg2, double const *farg3, double const *farg4) { void * fresult ; int arg1 ; int arg2 ; @@ -943,7 +943,7 @@ SWIGEXPORT void * _wrap_FARKodeSPRKTable_Create(int const *farg1, int const *far arg2 = (int)(*farg2); arg3 = (sunrealtype *)(farg3); arg4 = (sunrealtype *)(farg4); - result = (ARKodeSPRKTable)ARKodeSPRKTable_Create(arg1,arg2,arg3,arg4); + result = (ARKodeSPRKTable)ARKodeSPRKTable_Create(arg1,arg2,(double const *)arg3,(double const *)arg4); fresult = result; return fresult; } From aa2c9b37254321c7e2d10c246bbbc5b79cbcacf9 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 13:46:39 -0700 Subject: [PATCH 149/177] fix C90 error --- examples/arkode/C_serial/ark_kepler.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/arkode/C_serial/ark_kepler.c b/examples/arkode/C_serial/ark_kepler.c index 877fd36a23..fa0448b808 100644 --- a/examples/arkode/C_serial/ark_kepler.c +++ b/examples/arkode/C_serial/ark_kepler.c @@ -34,14 +34,14 @@ * order symplectic integrator via the SPRKStep time-stepper of ARKODE with a * fixed time-step size. * - * The rootfinding feature of SPRKStep is used to count the number of complete orbits. + * The rootfinding feature of SPRKStep is used to count the number of complete orbits. * This is done by defining the function, * g(q) = q2 * and providing it to SPRKStep as the function to find the roots for g(q). * * The program also accepts command line arguments to change the method * used and time-stepping strategy. The program has the following CLI arguments: - * + * * --step-mode should we use a fixed time-step or adaptive time-step (default fixed) * --stepper should we use SPRKStep or ARKStep with an ERK method (default SPRK) * --method which method to use (default ARKODE_SPRK_MCLACHLAN_4_4) @@ -52,7 +52,7 @@ * --nout number of output times * --count-orbits use rootfinding to count the number of completed orbits * --check-order compute the order of the method used and check if it is within the expected range - * + * * References: * Ernst Hairer, Christain Lubich, Gerhard Wanner * Geometric Numerical Integration: Structure-Preserving @@ -503,9 +503,6 @@ int main(int argc, char* argv[]) sunrealtype dt = (expected_order >= 3) ? SUN_RCONST(1e-1) : SUN_RCONST(1e-3); sunrealtype dts[NUM_DT]; - /* Free method, we just needed it to get its order */ - ARKodeSPRKTable_Free(method); - /* Create a reference solution using 8th order ERK with a small time step */ const int old_step_mode = args.step_mode; const int old_stepper = args.stepper; @@ -515,6 +512,9 @@ int main(int argc, char* argv[]) args.stepper = 1; args.method_name = "ARKODE_ARK548L2SAb_ERK_8_4_5"; + /* Free method, we just needed it to get its order */ + ARKodeSPRKTable_Free(method); + /* SolveProblem calls a stepper to evolve the problem to Tf */ retval = SolveProblem(&args, &result, sunctx); if (check_retval(&retval, "SolveProblem", 1)) { return 1; } From ffc415bb12ca676d610c8e832cb2b9c543876413 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 14:03:34 -0700 Subject: [PATCH 150/177] add sprkstep f2003 files to tarscript --- scripts/arkode | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/arkode b/scripts/arkode index c14c55216f..bb216f7248 100755 --- a/scripts/arkode +++ b/scripts/arkode @@ -110,6 +110,8 @@ $tar $tarfile $distrobase/src/arkode/fmod/farkode_erkstep_mod.c $tar $tarfile $distrobase/src/arkode/fmod/farkode_erkstep_mod.f90 $tar $tarfile $distrobase/src/arkode/fmod/farkode_mristep_mod.c $tar $tarfile $distrobase/src/arkode/fmod/farkode_mristep_mod.f90 +$tar $tarfile $distrobase/src/arkode/fmod/farkode_sprkstep_mod.c +$tar $tarfile $distrobase/src/arkode/fmod/farkode_sprkstep_mod.f90 echo " --- Add arkode examples to $tarfile" From 48344d9128d28a943553ceb83316ee54237398f4 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jul 2023 15:31:38 -0700 Subject: [PATCH 151/177] install headers for examples --- examples/arkode/C_serial/CMakeLists.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt index 8c17d3d33e..1c66bf16bf 100644 --- a/examples/arkode/C_serial/CMakeLists.txt +++ b/examples/arkode/C_serial/CMakeLists.txt @@ -100,17 +100,20 @@ set(ARKODE_examples_SUPERLUMT # Auxiliary files to install set(ARKODE_extras - ark_kepler_plot.py - plot_brusselator1D.py - plot_brusselator1D_FEM.py - plot_heat1D.py - plot_heat1D_adapt.py - plot_sol.py - plot_sol_log.py ark_analytic_nonlin_stats.csv + ark_damped_harmonic_symplectic.h + ark_harmonic_symplectic.h + ark_kepler_plot.py + ark_kepler.h ark_reaction_diffusion_mri_fast_stats.csv ark_reaction_diffusion_mri_slow_stats.csv ark_robertson_stats.csv + plot_brusselator1D_FEM.py + plot_brusselator1D.py + plot_heat1D_adapt.py + plot_heat1D.py + plot_sol_log.py + plot_sol.py ) # Add the build and install targets for each ARKODE example From da891c5311e89570610b28f79aba29626d500a31 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 15:11:59 -0700 Subject: [PATCH 152/177] various doc formatting fixes --- .../SPRKStep_c_interface/User_callable.rst | 415 ++++++++---------- 1 file changed, 194 insertions(+), 221 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 38d7dece05..f6384e14f6 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -46,19 +46,23 @@ SPRKStep initialization and deallocation functions be solved using the SPRKStep time-stepping module in ARKODE. :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_1(t,q) = \frac{\partial V(t,q)}{\partial q}` - :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_2(t,p) = \frac{\partial T(t,p)}{\partial p}` + :param f2: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f_2(t,p) = \frac{\partial T(t,p)}{\partial p}` :param t0: the initial value of :math:`t` :param y0: the initial condition vector :math:`y(t_0)` :param sunctx: the :c:type:`SUNContext` object (see :numref:`SUNDIALS.SUNContext`) - :returns: If successful, a pointer to initialized problem memory of type ``void*``, to be passed to all user-facing SPRKStep routines listed below. If unsuccessful, a ``NULL`` pointer will be returned, and an error message will be printed to ``stderr``. + :returns: If successful, a pointer to initialized problem memory of type + ``void*``, to be passed to all user-facing SPRKStep routines listed + below. If unsuccessful, a ``NULL`` pointer will be returned, and + an error message will be printed to ``stderr``. .. warning:: - SPRKStep requires a partitioned problem where ``f1`` should only modify the q variables - and ``f2`` should only modify the p variables (or vice versa). However, the vector - passed to these functions is the full vector with both p and q. The ordering of the - variables is determined implicitly by the user when they set the initial conditions. + SPRKStep requires a partitioned problem where ``f1`` should only modify + the q variables and ``f2`` should only modify the p variables (or vice + versa). However, the vector passed to these functions is the full vector + with both p and q. The ordering of the variables is determined implicitly + by the user when they set the initial conditions. .. c:function:: void SPRKStepFree(void** arkode_mem) @@ -91,9 +95,17 @@ called prior to a continuation call to :c:func:`SPRKStepEvolve()`. .. c:function:: int SPRKStepRootInit(void* arkode_mem, int nrtfn, ARKRootFn g) Initializes a rootfinding problem to be solved during the - integration of the ODE system. It must be called after + integration of the ODE system. It *must* be called after :c:func:`SPRKStepCreate`, and before :c:func:`SPRKStepEvolve()`. + To disable the rootfinding feature after it has already been initialized, or + to free memory associated with SPRKStep's rootfinding module, call + :c:func:`SPRKStepRootInit` with *nrtfn = 0*. + + Similarly, if a new IVP is to be solved with a call to + :c:func:`SPRKStepReInit()`, where the new IVP has no rootfinding problem but + the prior one did, then call :c:func:`SPRKStepRootInit` with *nrtfn = 0*. + :param arkode_mem: pointer to the SPRKStep memory block. :param nrtfn: number of functions :math:`g_i`, an integer :math:`\ge` 0. :param g: name of user-supplied function, of type :c:func:`ARKRootFn()`, @@ -104,18 +116,6 @@ called prior to a continuation call to :c:func:`SPRKStepEvolve()`. :retval ARK_MEM_FAIL: if there was a memory allocation failure :retval ARK_ILL_INPUT: if *nrtfn* is greater than zero but *g* = ``NULL``. - **Notes:** - To disable the rootfinding feature after it has already - been initialized, or to free memory associated with SPRKStep's - rootfinding module, call *SPRKStepRootInit* with *nrtfn = 0*. - - Similarly, if a new IVP is to be solved with a call to - :c:func:`SPRKStepReInit()`, where the new IVP has no rootfinding - problem but the prior one did, then call *SPRKStepRootInit* with - *nrtfn = 0*. - - - .. _ARKODE.Usage.SPRKStep.Integration: @@ -140,52 +140,51 @@ has requested rootfinding. :param yout: the computed solution vector. :param tret: the time corresponding to *yout* (output). :param itask: a flag indicating the job of the solver for the next user step. - - The *ARK_NORMAL* option causes the solver to take internal - steps until it has just overtaken a user-specified output - time, *tout*, in the direction of integration, - i.e. :math:`t_{n-1} <` *tout* :math:`\le t_{n}` for forward - integration, or :math:`t_{n} \le` *tout* :math:`< t_{n-1}` for - backward integration. It will then compute an approximation - to the solution :math:`y(tout)` by interpolation (using one - of the dense output routines described in - :numref:`ARKODE.Mathematics.Interpolation`). - - The *ARK_ONE_STEP* option tells the solver to only take a - single internal step :math:`y_{n-1} \to y_{n}` and then return - control back to the calling program. If this step will - overtake *tout* then the solver will again return an - interpolated result; otherwise it will return a copy of the - internal solution :math:`y_{n}` in the vector *yout*. - - :return: - * *ARK_SUCCESS* if successful. - * *ARK_ROOT_RETURN* if :c:func:`SPRKStepEvolve()` succeeded, and - found one or more roots. If the number of root functions, - *nrtfn*, is greater than 1, call - :c:func:`SPRKStepGetRootInfo()` to see which :math:`g_i` were - found to have a root at (*\*tret*). - * *ARK_TSTOP_RETURN* if :c:func:`SPRKStepEvolve()` succeeded and - returned at *tstop*. - * *ARK_MEM_NULL* if the *arkode_mem* argument was ``NULL``. - * *ARK_NO_MALLOC* if *arkode_mem* was not allocated. - * *ARK_ILL_INPUT* if one of the inputs to - :c:func:`SPRKStepEvolve()` is illegal, or some other input to - the solver was either illegal or missing. Details will be - provided in the error message. Typical causes of this failure: - - (a) A root of one of the root functions was found both at a - point :math:`t` and also very near :math:`t`. - - * *ARK_TOO_MUCH_WORK* if the solver took *mxstep* internal steps - but could not reach *tout*. The default value for *mxstep* is - *MXSTEP_DEFAULT = 500*. - * *ARK_ERR_FAILURE* if error test failures occurred either too many - times (*ark_maxnef*) during one internal time step or occurred - with :math:`|h| = h_{min}`. - * *ARK_VECTOROP_ERR* a vector operation error occurred. - - **Notes:** + + The *ARK_NORMAL* option causes the solver to take internal + steps until it has just overtaken a user-specified output + time, *tout*, in the direction of integration, + i.e. :math:`t_{n-1} <` *tout* :math:`\le t_{n}` for forward + integration, or :math:`t_{n} \le` *tout* :math:`< t_{n-1}` for + backward integration. It will then compute an approximation + to the solution :math:`y(tout)` by interpolation (using one + of the dense output routines described in + :numref:`ARKODE.Mathematics.Interpolation`). + + The *ARK_ONE_STEP* option tells the solver to only take a + single internal step :math:`y_{n-1} \to y_{n}` and then return + control back to the calling program. If this step will + overtake *tout* then the solver will again return an + interpolated result; otherwise it will return a copy of the + internal solution :math:`y_{n}` in the vector *yout*. + + :retval ARK_SUCCESS: if successful. + :retval ARK_ROOT_RETURN: if :c:func:`SPRKStepEvolve()` succeeded, and + found one or more roots. If the number of root functions, + *nrtfn*, is greater than 1, call + :c:func:`SPRKStepGetRootInfo()` to see which :math:`g_i` were + found to have a root at (*\*tret*). + :retval ARK_TSTOP_RETURN: if :c:func:`SPRKStepEvolve()` succeeded and + returned at *tstop*. + :retval ARK_MEM_NULL: if the *arkode_mem* argument was ``NULL``. + :retval ARK_NO_MALLOC: if *arkode_mem* was not allocated. + :retval ARK_ILL_INPUT: if one of the inputs to + :c:func:`SPRKStepEvolve()` is illegal, or some other + input to the solver was either illegal or missing. + Details will be provided in the error message. Typical + causes of this failure are a root of one of the root + functions was found both at a point :math:`t` and also + very near :math:`t`. + :retval ARK_TOO_MUCH_WORK: if the solver took *mxstep* internal steps but + could not reach *tout*. The default value for + *mxstep* is *MXSTEP_DEFAULT = 500*. + :retval ARK_ERR_FAILURE: if error test failures occurred either too many + times (*ark_maxnef*) during one internal time step + or occurred with :math:`|h| = h_{min}`. + :retval ARK_VECTOROP_ERR: a vector operation error occurred. + + .. note:: + The input vector *yout* can use the same memory as the vector *y0* of initial conditions that was passed to :c:func:`SPRKStepCreate`. @@ -206,8 +205,8 @@ has requested rootfinding. integrator returns at a *tstop* time, any future testing for *tstop* is disabled (and can be re-enabled only though a new call to :c:func:`SPRKStepSetStopTime()`). SPRKStep uses the ARKODE - Our testing has shown that Lagrange interpolation typically performs - well in this regard, while Hermite interpolation does not. + Our testing has shown that Lagrange interpolation typically performs + well in this regard, while Hermite interpolation does not. On any error return in which one or more internal steps were taken by :c:func:`SPRKStepEvolve()`, the returned values of *tret* and @@ -248,7 +247,7 @@ negative, so a test on the return arguments for negative values will catch all errors. Finally, a call to a ``SPRKStepSet***`` function can generally be made from the user's calling program at any time and, if successful, takes effect immediately. ``SPRKStepSet***`` functions that cannot be called at any time note -this in the "**Notes**:" section of the function documentation. +this explicitly noted in the function documentation. @@ -307,7 +306,6 @@ Optional inputs for SPRKStep root-finding (those can be reset using :c:func:`SPRKStepRootInit()`). - .. c:function:: int SPRKStepSetInterpolantType(void* arkode_mem, int itype) Specifies use of the Lagrange or Hermite interpolation modules (used for @@ -321,7 +319,7 @@ Optional inputs for SPRKStep :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_MEM_FAIL: if the interpolation module cannot be allocated :retval ARK_ILL_INPUT: if the *itype* argument is not recognized or the - interpolation module has already been initialized + interpolation module has already been initialized .. note:: @@ -357,7 +355,7 @@ Optional inputs for SPRKStep :retval ARK_MEM_NULL: if the SPRKStep memory or interpolation module are ``NULL`` :retval ARK_INTERP_FAIL: if this is called after :c:func:`SPRKStepEvolve()` :retval ARK_ILL_INPUT: if an argument has an illegal value or the - interpolation module has already been initialized + interpolation module has already been initialized .. note:: @@ -374,9 +372,9 @@ Optional inputs for SPRKStep polynomial degree that is used by SPRKStep will be the minimum of :math:`q-1` and the input *degree*, for :math:`q > 1` where :math:`q` is the order of accuracy for the time integration method. - - When , `q = 1` a linear interpolant is the default to ensure values obtained by the integrator are returned at the ends of the time interval. + When , `q = 1` a linear interpolant is the default to ensure values + obtained by the integrator are returned at the ends of the time interval. .. c:function:: int SPRKStepSetErrFile(void* arkode_mem, FILE* errfp) @@ -385,6 +383,12 @@ Optional inputs for SPRKStep messages will be written if the default internal error handling function is used. + The default value for *errfp* is ``stderr``. + + Passing a ``NULL`` value disables all future error message output + (except for the case wherein the SPRKStep memory pointer is + ``NULL``). This use of the function is strongly discouraged. + :param arkode_mem: pointer to the SPRKStep memory block. :param errfp: pointer to the output file. @@ -392,19 +396,13 @@ Optional inputs for SPRKStep :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - The default value for *errfp* is ``stderr``. - - Passing a ``NULL`` value disables all future error message output - (except for the case wherein the SPRKStep memory pointer is - ``NULL``). This use of the function is strongly discouraged. + .. note:: If used, this routine should be called before any other optional input functions, in order to take effect for subsequent error messages. - .. c:function:: int SPRKStepSetErrHandlerFn(void* arkode_mem, ARKErrHandlerFn ehfun, void* eh_data) Specifies the optional user-defined function to be used @@ -418,7 +416,8 @@ Optional inputs for SPRKStep :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** + .. note:: + Error messages indicating that the SPRKStep solver memory is ``NULL`` will always be directed to ``stderr``. @@ -441,6 +440,11 @@ Optional inputs for SPRKStep solver in its attempt to reach the next output time, before SPRKStep will return with an error. + Passing *mxsteps* = 0 results in SPRKStep using the + default value (500). + + Passing *mxsteps* < 0 disables the test (not recommended). + :param arkode_mem: pointer to the SPRKStep memory block. :param mxsteps: maximum allowed number of internal steps. @@ -448,17 +452,22 @@ Optional inputs for SPRKStep :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - Passing *mxsteps* = 0 results in SPRKStep using the - default value (500). - - Passing *mxsteps* < 0 disables the test (not recommended). .. c:function:: int SPRKStepSetStopTime(void* arkode_mem, realtype tstop) Specifies the value of the independent variable :math:`t` past which the solution is not to proceed. + The default is that no stop time is imposed. + + Once the integrator returns at a stop time, any future testing for + ``tstop`` is disabled (and can be reenabled only though a new call to + :c:func:`SPRKStepSetStopTime`). + + A stop time not reached before a call to :c:func:`SPRKStepReInit` or + :c:func:`SPRKStepReset` will remain active but can be disabled by calling + :c:func:`SPRKStepClearStopTime`. + :param arkode_mem: pointer to the SPRKStep memory block. :param tstop: stopping time for the integrator. @@ -466,31 +475,18 @@ Optional inputs for SPRKStep :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - The default is that no stop time is imposed. - - Once the integrator returns at a stop time, any future testing for - ``tstop`` is disabled (and can be reenabled only though a new call to - :c:func:`SPRKStepSetStopTime`). - - A stop time not reached before a call to :c:func:`SPRKStepReInit` or - :c:func:`SPRKStepReset` will remain active but can be disabled by calling - :c:func:`SPRKStepClearStopTime`. - .. c:function:: int SPRKStepClearStopTime(void* arkode_mem) Disables the stop time set with :c:func:`SPRKStepSetStopTime`. - :param arkode_mem: pointer to the SPRKStep memory block. + The stop time can be reenabled though a new call to + :c:func:`SPRKStepSetStopTime`. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` + :param arkode_mem: pointer to the SPRKStep memory block. - **Notes:** - The stop time can be reenabled though a new call to - :c:func:`SPRKStepSetStopTime`. + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` .. c:function:: int SPRKStepSetUserData(void* arkode_mem, void* user_data) @@ -498,6 +494,10 @@ Optional inputs for SPRKStep Specifies the user data block *user_data* and attaches it to the main SPRKStep memory block. + If specified, the pointer to *user_data* is passed to all + user-supplied functions for which it is an argument; otherwise + ``NULL`` is passed. + :param arkode_mem: pointer to the SPRKStep memory block. :param user_data: pointer to the user data. @@ -505,11 +505,6 @@ Optional inputs for SPRKStep :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - If specified, the pointer to *user_data* is passed to all - user-supplied functions for which it is an argument; otherwise - ``NULL`` is passed. - .. _ARKODE.Usage.SPRKStep.SPRKStepMethodInput: @@ -536,6 +531,13 @@ Optional inputs for IVP method selection Specifies the order of accuracy for the SPRK integration method. + The allowed values are :math:`1,2,3,4,5,6,8,10`. Any illegal input will + result in the default value of 4. + + Since *ord* affects the memory requirements for the internal + SPRKStep memory block, it cannot be changed after the first call to + :c:func:`SPRKStepEvolve()`, unless :c:func:`SPRKStepReInit()` is called. + :param arkode_mem: pointer to the SPRKStep memory block. :param ord: requested order of accuracy. @@ -543,17 +545,9 @@ Optional inputs for IVP method selection :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - The allowed values are :math:`1,2,3,4,5,6,8,10`. - Any illegal input will result in the default value of 4. - - Since *ord* affects the memory requirements for the internal - SPRKStep memory block, it cannot be changed after the first call to - :c:func:`SPRKStepEvolve()`, unless :c:func:`SPRKStepReInit()` is called. + .. warning:: - .. warning:: - - This overrides any previously set method so it should not be used with + This overrides any previously set method so it should not be used with :c:func:`SPRKStepSetMethod` or :c:func:`SPRKStepMethodByName`. @@ -568,9 +562,10 @@ Optional inputs for IVP method selection :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - No error checking is performed on the coefficients contained in the structure to ensure its declared order of accuracy. + .. note:: + No error checking is performed on the coefficients contained in the + structure to ensure its declared order of accuracy. .. c:function:: int SPRKStepSetMethodName(void* arkode_mem, const char* method) @@ -590,6 +585,11 @@ Optional inputs for IVP method selection Specifies if :ref:`compensated summation (and the incremental form) ` should be used where applicable. + This increases the computational cost by 2 extra vector operations per stage + and an additional 5 per time step. It also requires one extra vector to be + stored. However, it is signficantly more robust to roundoff error + accumulation. + :param arkode_mem: pointer to the SPRKStep memory block. :param onoff: should compensated summation be used (1) or not (0) @@ -597,11 +597,6 @@ Optional inputs for IVP method selection :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - This increases the computational cost by 2 extra vector operations per stage and - an additional 5 per time step. It also requires one extra vector to be stored. - However, it is signficantly more robust to roundoff error accumulation. - .. _ARKODE.Usage.SPRKStep.SPRKStepRootfindingInput: @@ -631,6 +626,8 @@ described in :numref:`ARKODE.Mathematics.Rootfinding`. Specifies the direction of zero-crossings to be located and returned. + The default behavior is to monitor for both zero-crossing directions. + :param arkode_mem: pointer to the SPRKStep memory block. :param rootdir: state array of length *nrtfn*, the number of root functions :math:`g_i` (the value of *nrtfn* was supplied in @@ -644,33 +641,23 @@ described in :numref:`ARKODE.Mathematics.Rootfinding`. :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` :retval ARK_ILL_INPUT: if an argument has an illegal value - **Notes:** - The default behavior is to monitor for both zero-crossing directions. - - .. c:function:: int SPRKStepSetNoInactiveRootWarn(void* arkode_mem) Disables issuing a warning if some root function appears to be identically zero at the beginning of the integration. - :param arkode_mem: pointer to the SPRKStep memory block. - - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - - **Notes:** - SPRKStep will not report the initial conditions as a - possible zero-crossing (assuming that one or more components - :math:`g_i` are zero at the initial time). However, if it appears - that some :math:`g_i` is identically zero at the initial time - (i.e., :math:`g_i` is zero at the initial time *and* after the - first step), SPRKStep will issue a warning which can be disabled with - this optional input function. - + SPRKStep will not report the initial conditions as a possible zero-crossing + (assuming that one or more components :math:`g_i` are zero at the initial + time). However, if it appears that some :math:`g_i` is identically zero at + the initial time (i.e., :math:`g_i` is zero at the initial time *and* after + the first step), SPRKStep will issue a warning which can be disabled with + this optional input function. + :param arkode_mem: pointer to the SPRKStep memory block. + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` .. _ARKODE.Usage.SPRKStep.InterpolatedOutput: @@ -690,13 +677,15 @@ by :c:func:`SPRKStepEvolve()`. .. c:function:: int SPRKStepGetDky(void* arkode_mem, realtype t, int k, N_Vector dky) - Computes the *k*-th derivative of the function - :math:`y` at the time *t*, - i.e., :math:`y^{(k)}(t)`, for values of the - independent variable satisfying :math:`t_n-h_n \le t \le t_n`, with - :math:`t_n` as current internal time reached, and :math:`h_n` is - the last internal step size successfully used by the solver. This - routine uses an interpolating polynomial of degree *min(degree, 5)*, + Computes the *k*-th derivative of the function :math:`y` at the time *t*, + i.e., :math:`y^{(k)}(t)`, for values of the independent variable satisfying + :math:`t_n-h_n \le t \le t_n`, with :math:`t_n` as current internal time + reached, and :math:`h_n` is the last internal step size successfully used by + the solver. A user may access the values :math:`t_n` and :math:`h_n` via the + functions :c:func:`SPRKStepGetCurrentTime()` and + :c:func:`SPRKStepGetLastStep()`, respectively. + + This routine uses an interpolating polynomial of degree *min(degree, 5)*, where *degree* is the argument provided to :c:func:`SPRKStepSetInterpolantDegree()`. The user may request *k* in the range {0,..., *min(degree, kmax)*} where *kmax* depends on the choice of @@ -709,24 +698,22 @@ by :c:func:`SPRKStepEvolve()`. :param k: the derivative order requested. :param dky: output vector (must be allocated by the user). - :return: - * *ARK_SUCCESS* if successful - * *ARK_BAD_K* if *k* is not in the range {0,..., *min(degree, kmax)*}. - * *ARK_BAD_T* if *t* is not in the interval :math:`[t_n-h_n, t_n]` - * *ARK_BAD_DKY* if the *dky* vector was ``NULL`` - * *ARK_MEM_NULL* if the SPRKStep memory is ``NULL`` - - **Notes:** - It is only legal to call this function after a successful - return from :c:func:`SPRKStepEvolve()`. + :retval ARK_SUCCESS: if successful + :retval ARK_BAD_K: if *k* is not in the range {0,..., *min(degree, kmax)*}. + :retval ARK_BAD_T: if *t* is not in the interval :math:`[t_n-h_n, t_n]` + :retval ARK_BAD_DKY: if the *dky* vector was ``NULL`` + :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` - A user may access the values :math:`t_n` and :math:`h_n` via the - functions :c:func:`SPRKStepGetCurrentTime()` and - :c:func:`SPRKStepGetLastStep()`, respectively. + .. note:: Dense outputs may or may not conserve the Hamiltonian. Our testing has shown that Lagrange interpolation typically performs well in this regard, - while Hermite interpolation does not. + while Hermite interpolation does not. + + .. warning:: + + It is only legal to call this function after a successful + return from :c:func:`SPRKStepEvolve()`. .. _ARKODE.Usage.SPRKStep.OptionalOutputs: @@ -916,9 +903,8 @@ Main solver optional output functions :param flag: a return flag from an SPRKStep function. - :return: - The return value is a string containing the name of - the corresponding constant. + :returns: The return value is a string containing the name of the + corresponding constant. .. c:function:: int SPRKStepGetNumStepAttempts(void* arkode_mem, long int* step_attempts) @@ -990,8 +976,14 @@ Rootfinding optional output functions .. c:function:: int SPRKStepGetRootInfo(void* arkode_mem, int* rootsfound) - Returns an array showing which functions were found to - have a root. + Returns an array showing which functions were found to have a root. + + For the components of :math:`g_i` for which a root was found, the sign of + ``rootsfound[i]`` indicates the direction of zero-crossing. A value of +1 + indicates that :math:`g_i` is increasing, while a value of -1 indicates a + decreasing :math:`g_i`. + + The user must allocate space for *rootsfound* prior to calling this function. :param arkode_mem: pointer to the SPRKStep memory block. :param rootsfound: array of length *nrtfn* with the indices of the @@ -1004,16 +996,6 @@ Rootfinding optional output functions :retval ARK_SUCCESS: if successful :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` - **Notes:** - The user must allocate space for *rootsfound* prior to - calling this function. - - For the components of :math:`g_i` for which a root was found, the - sign of ``rootsfound[i]`` indicates the direction of - zero-crossing. A value of +1 indicates that :math:`g_i` is - increasing, while a value of -1 indicates a decreasing :math:`g_i`. - - .. c:function:: int SPRKStepGetNumGEvals(void* arkode_mem, long int* ngevals) @@ -1027,8 +1009,6 @@ Rootfinding optional output functions :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` - - .. _ARKODE.Usage.SPRKStep.SPRKStepExtraOutputs: General usability functions @@ -1054,21 +1034,18 @@ for users wishing to better understand SPRKStep. Outputs all SPRKStep solver parameters to the provided file pointer. + The *fp* argument can be ``stdout`` or ``stderr``, or it may point to a + specific file created using ``fopen``. + + When run in parallel, only one process should set a non-NULL value for this + pointer, since parameters for all processes would be identical. + :param arkode_mem: pointer to the SPRKStep memory block. :param fp: pointer to use for printing the solver parameters. :retval ARK_SUCCESS: if successful :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` - **Notes:** - The *fp* argument can be ``stdout`` or ``stderr``, or it - may point to a specific file created using ``fopen``. - - When run in parallel, only one process should set a non-NULL value - for this pointer, since parameters for all processes would be - identical. - - .. _ARKODE.Usage.SPRKStep.Reinitialization: @@ -1107,8 +1084,14 @@ the RHS function should not incorporate the discontinuity. .. c:function:: int SPRKStepReInit(void* arkode_mem, ARKRhsFn f1, ARKRhsFn f2, realtype t0, N_Vector y0) - Provides required problem specifications and re-initializes the - SPRKStep time-stepper module. + Provides required problem specifications and re-initializes the SPRKStep + time-stepper module. + + All previously set options are retained but may be updated by calling the + appropriate "Set" functions. + + If an error occurred, :c:func:`SPRKStepReInit()` also sends an error message + to the error handler function. :param arkode_mem: pointer to the SPRKStep memory block. :param f1: the name of the C function (of type :c:func:`ARKRhsFn()`) defining :math:`f1(t,q) = \frac{\partial V(t,q)}{\partial q}` @@ -1116,20 +1099,10 @@ the RHS function should not incorporate the discontinuity. :param t0: the initial value of :math:`t`. :param y0: the initial condition vector :math:`y(t_0)`. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` - * *ARK_MEM_FAIL* if a memory allocation failed - * *ARK_ILL_INPUT* if an argument has an illegal value. - - **Notes:** - All previously set options are retained but may be updated by calling - the appropriate "Set" functions. - - If an error occurred, :c:func:`SPRKStepReInit()` also - sends an error message to the error handler function. - - + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` + :retval ARK_MEM_FAIL: if a memory allocation failed + :retval ARK_ILL_INPUT: if an argument has an illegal value. .. _ARKODE.Usage.SPRKStep.Reset: @@ -1158,22 +1131,22 @@ use the step size computed by SPRKStep prior to calling :c:func:`SPRKStepReset() Resets the current SPRKStep time-stepper module state to the provided independent variable value and dependent variable vector. + All previously set options are retained but may be updated by calling + the appropriate "Set" functions. + + If an error occurred, :c:func:`SPRKStepReset()` also sends an error message + to the error handler function. + :param arkode_mem: pointer to the SPRKStep memory block. :param tR: the value of the independent variable :math:`t`. :param yR: the value of the dependent variable vector :math:`y(t_R)`. - :return: - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the SPRKStep memory was ``NULL`` - * *ARK_MEM_FAIL* if a memory allocation failed - * *ARK_ILL_INPUT* if an argument has an illegal value. - - **Notes:** - By default the next call to :c:func:`SPRKStepEvolve()` will use the step size - computed by SPRKStep prior to calling :c:func:`SPRKStepReset()`. + :retval ARK_SUCCESS: if successful + :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` + :retval ARK_MEM_FAIL: if a memory allocation failed + :retval ARK_ILL_INPUTL: if an argument has an illegal value. - All previously set options are retained but may be updated by calling - the appropriate "Set" functions. + .. note:: - If an error occurred, :c:func:`SPRKStepReset()` also sends an error message to - the error handler function. + By default the next call to :c:func:`SPRKStepEvolve()` will use the step + size computed by SPRKStep prior to calling :c:func:`SPRKStepReset()`. From dce46ae22dd9ea8dd273c7c4a005c7b46ac7e9d5 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 16:14:27 -0700 Subject: [PATCH 153/177] install sprk headers --- src/arkode/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/arkode/CMakeLists.txt b/src/arkode/CMakeLists.txt index c2be147936..ccbecb402c 100644 --- a/src/arkode/CMakeLists.txt +++ b/src/arkode/CMakeLists.txt @@ -46,16 +46,18 @@ set(arkode_SOURCES # Add variable arkode_HEADERS with the exported ARKODE header files set(arkode_HEADERS + arkode.h arkode_arkstep.h arkode_bandpre.h arkode_bbdpre.h + arkode_butcher.h arkode_butcher_dirk.h arkode_butcher_erk.h - arkode_butcher.h arkode_erkstep.h arkode_ls.h arkode_mristep.h - arkode.h + arkode_sprk.h + arkode_sprkstep.h ) # Add prefix with complete path to the ARKODE header files From 16d1ab6ff0d57011008b3eed0f3f72b745b42278 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 17:24:43 -0700 Subject: [PATCH 154/177] update output files --- .../C_serial/ark_harmonic_symplectic.out | 16 +- examples/arkode/C_serial/ark_kepler.out | 100 ++--- ...kepler_--stepper_ERK_--step-mode_adapt.out | 100 ++--- ...r_ERK_--step-mode_fixed_--count-orbits.out | 162 ++++---- ..._--count-orbits_--use-compensated-sums.out | 226 +++++------ ...LER_1_1_--tf_50_--check-order_--nout_1.out | 114 +----- ...ROG_2_2_--tf_50_--check-order_--nout_1.out | 114 +----- ...LAN_2_2_--tf_50_--check-order_--nout_1.out | 114 +----- ...LAN_3_3_--tf_50_--check-order_--nout_1.out | 350 +++++++++++++----- ...LAN_4_4_--tf_50_--check-order_--nout_1.out | 350 +++++++++++++----- ...LAN_5_6_--tf_50_--check-order_--nout_1.out | 350 +++++++++++++----- ...ROG_2_2_--tf_50_--check-order_--nout_1.out | 114 +----- ...UTH_3_3_--tf_50_--check-order_--nout_1.out | 350 +++++++++++++----- ...IDA_6_8_--tf_50_--check-order_--nout_1.out | 350 +++++++++++++----- 14 files changed, 1622 insertions(+), 1188 deletions(-) diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.out b/examples/arkode/C_serial/ark_harmonic_symplectic.out index 3e5dedb5b2..565fed7a5c 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.out +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.out @@ -2,14 +2,14 @@ Begin simple harmonic oscillator problem t = 0.000000, x(t) = 10.000000, E = 50.000000, sol. err = 0.000000 -t = 0.785398, x(t) = 7.071068, E = 50.000000, sol. err = 0.0000000000000282 -t = 1.570796, x(t) = -0.000000, E = 50.000000, sol. err = 0.0000000000006266 -t = 2.356194, x(t) = -7.071068, E = 50.000000, sol. err = 0.0000000000014916 -t = 3.141593, x(t) = -10.000000, E = 50.000000, sol. err = 0.0000000000023682 -t = 3.926991, x(t) = -7.071068, E = 50.000000, sol. err = 0.0000000000032520 -t = 4.712389, x(t) = 0.000000, E = 50.000000, sol. err = 0.0000000000009537 -t = 5.497787, x(t) = 7.071068, E = 50.000000, sol. err = 0.0000000000016668 -t = 6.283185, x(t) = 10.000000, E = 50.000000, sol. err = 0.0000000000043080 +t = 0.785398, x(t) = 7.071068, E = 50.000000, sol. err = 2.8226751748531428e-14 +t = 1.570796, x(t) = -0.000000, E = 50.000000, sol. err = 6.2659884421989969e-13 +t = 2.356194, x(t) = -7.071068, E = 50.000000, sol. err = 1.4916461428856833e-12 +t = 3.141593, x(t) = -10.000000, E = 50.000000, sol. err = 2.3682463424056722e-12 +t = 3.926991, x(t) = -7.071068, E = 50.000000, sol. err = 3.2519776836359368e-12 +t = 4.712389, x(t) = 0.000000, E = 50.000000, sol. err = 9.5373481893755732e-13 +t = 5.497787, x(t) = 7.071068, E = 50.000000, sol. err = 1.6668477791399526e-12 +t = 6.283185, x(t) = 10.000000, E = 50.000000, sol. err = 4.3080167445556004e-12 Current time = 6.283185307179586 Steps = 6288 diff --git a/examples/arkode/C_serial/ark_kepler.out b/examples/arkode/C_serial/ark_kepler.out index 1df6288300..f8d30be58c 100644 --- a/examples/arkode/C_serial/ark_kepler.out +++ b/examples/arkode/C_serial/ark_kepler.out @@ -11,56 +11,56 @@ Problem Arguments: nout: 50 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 2.0000, H(p,q)-H0 = 0.0000000021900079, L(p,q)-L0 = -0.0000000000000004 -t = 4.0000, H(p,q)-H0 = 0.0000000021902838, L(p,q)-L0 = -0.0000000000000022 -t = 6.0000, H(p,q)-H0 = -0.0000000001292904, L(p,q)-L0 = -0.0000000000000027 -t = 8.0000, H(p,q)-H0 = 0.0000000021893957, L(p,q)-L0 = -0.0000000000000022 -t = 10.0000, H(p,q)-H0 = 0.0000000021904197, L(p,q)-L0 = -0.0000000000000014 -t = 12.0000, H(p,q)-H0 = 0.0000000019669049, L(p,q)-L0 = -0.0000000000000018 -t = 14.0000, H(p,q)-H0 = 0.0000000021878387, L(p,q)-L0 = -0.0000000000000026 -t = 16.0000, H(p,q)-H0 = 0.0000000021904862, L(p,q)-L0 = -0.0000000000000002 -t = 18.0000, H(p,q)-H0 = 0.0000000021569482, L(p,q)-L0 = 0.0000000000000019 -t = 20.0000, H(p,q)-H0 = 0.0000000021828357, L(p,q)-L0 = 0.0000000000000018 -t = 22.0000, H(p,q)-H0 = 0.0000000021905076, L(p,q)-L0 = 0.0000000000000021 -t = 24.0000, H(p,q)-H0 = 0.0000000021822002, L(p,q)-L0 = 0.0000000000000001 -t = 26.0000, H(p,q)-H0 = 0.0000000021602123, L(p,q)-L0 = -0.0000000000000019 -t = 28.0000, H(p,q)-H0 = 0.0000000021904860, L(p,q)-L0 = -0.0000000000000017 -t = 30.0000, H(p,q)-H0 = 0.0000000021876610, L(p,q)-L0 = -0.0000000000000016 -t = 32.0000, H(p,q)-H0 = 0.0000000019945753, L(p,q)-L0 = -0.0000000000000024 -t = 34.0000, H(p,q)-H0 = 0.0000000021904221, L(p,q)-L0 = -0.0000000000000029 -t = 36.0000, H(p,q)-H0 = 0.0000000021893279, L(p,q)-L0 = -0.0000000000000040 -t = 38.0000, H(p,q)-H0 = 0.0000000001444007, L(p,q)-L0 = -0.0000000000000061 -t = 40.0000, H(p,q)-H0 = 0.0000000021902866, L(p,q)-L0 = -0.0000000000000081 -t = 42.0000, H(p,q)-H0 = 0.0000000021899708, L(p,q)-L0 = -0.0000000000000064 -t = 44.0000, H(p,q)-H0 = -0.0000000000875728, L(p,q)-L0 = -0.0000000000000057 -t = 46.0000, H(p,q)-H0 = 0.0000000021900262, L(p,q)-L0 = -0.0000000000000039 -t = 48.0000, H(p,q)-H0 = 0.0000000021902659, L(p,q)-L0 = -0.0000000000000050 -t = 50.0000, H(p,q)-H0 = -0.0000000004525296, L(p,q)-L0 = -0.0000000000000049 -t = 52.0000, H(p,q)-H0 = 0.0000000021894484, L(p,q)-L0 = -0.0000000000000053 -t = 54.0000, H(p,q)-H0 = 0.0000000021904100, L(p,q)-L0 = -0.0000000000000054 -t = 56.0000, H(p,q)-H0 = 0.0000000019337507, L(p,q)-L0 = -0.0000000000000047 -t = 58.0000, H(p,q)-H0 = 0.0000000021879874, L(p,q)-L0 = -0.0000000000000058 -t = 60.0000, H(p,q)-H0 = 0.0000000021904786, L(p,q)-L0 = -0.0000000000000059 -t = 62.0000, H(p,q)-H0 = 0.0000000021533383, L(p,q)-L0 = -0.0000000000000052 -t = 64.0000, H(p,q)-H0 = 0.0000000021833744, L(p,q)-L0 = -0.0000000000000060 -t = 66.0000, H(p,q)-H0 = 0.0000000021905000, L(p,q)-L0 = -0.0000000000000069 -t = 68.0000, H(p,q)-H0 = 0.0000000021815384, L(p,q)-L0 = -0.0000000000000056 -t = 70.0000, H(p,q)-H0 = 0.0000000021630482, L(p,q)-L0 = -0.0000000000000061 -t = 72.0000, H(p,q)-H0 = 0.0000000021904852, L(p,q)-L0 = -0.0000000000000060 -t = 74.0000, H(p,q)-H0 = 0.0000000021874813, L(p,q)-L0 = -0.0000000000000040 -t = 76.0000, H(p,q)-H0 = 0.0000000020191782, L(p,q)-L0 = -0.0000000000000027 -t = 78.0000, H(p,q)-H0 = 0.0000000021904325, L(p,q)-L0 = -0.0000000000000021 -t = 80.0000, H(p,q)-H0 = 0.0000000021892689, L(p,q)-L0 = -0.0000000000000047 -t = 82.0000, H(p,q)-H0 = 0.0000000004158323, L(p,q)-L0 = -0.0000000000000042 -t = 84.0000, H(p,q)-H0 = 0.0000000021903037, L(p,q)-L0 = -0.0000000000000057 -t = 86.0000, H(p,q)-H0 = 0.0000000021899496, L(p,q)-L0 = -0.0000000000000052 -t = 88.0000, H(p,q)-H0 = -0.0000000003565019, L(p,q)-L0 = -0.0000000000000066 -t = 90.0000, H(p,q)-H0 = 0.0000000021900517, L(p,q)-L0 = -0.0000000000000029 -t = 92.0000, H(p,q)-H0 = 0.0000000021902564, L(p,q)-L0 = -0.0000000000000029 -t = 94.0000, H(p,q)-H0 = -0.0000000007952314, L(p,q)-L0 = -0.0000000000000022 -t = 96.0000, H(p,q)-H0 = 0.0000000021895020, L(p,q)-L0 = -0.0000000000000016 -t = 98.0000, H(p,q)-H0 = 0.0000000021904060, L(p,q)-L0 = -0.0000000000000003 -t = 100.0000, H(p,q)-H0 = 0.0000000018950280, L(p,q)-L0 = -0.0000000000000007 +t = 2.0000, H(p,q)-H0 = 2.1900078972514336e-09, L(p,q)-L0 = -4.4408920985006262e-16 +t = 4.0000, H(p,q)-H0 = 2.1902838431842042e-09, L(p,q)-L0 = -2.2204460492503131e-15 +t = 6.0000, H(p,q)-H0 = -1.2929035619890783e-10, L(p,q)-L0 = -2.6645352591003757e-15 +t = 8.0000, H(p,q)-H0 = 2.1893957202756553e-09, L(p,q)-L0 = -2.2204460492503131e-15 +t = 10.0000, H(p,q)-H0 = 2.1904196789712671e-09, L(p,q)-L0 = -1.4432899320127035e-15 +t = 12.0000, H(p,q)-H0 = 1.9669048612058759e-09, L(p,q)-L0 = -1.7763568394002505e-15 +t = 14.0000, H(p,q)-H0 = 2.1878387435059210e-09, L(p,q)-L0 = -2.5535129566378600e-15 +t = 16.0000, H(p,q)-H0 = 2.1904862368415934e-09, L(p,q)-L0 = -2.2204460492503131e-16 +t = 18.0000, H(p,q)-H0 = 2.1569481756245068e-09, L(p,q)-L0 = 1.8873791418627661e-15 +t = 20.0000, H(p,q)-H0 = 2.1828357454900527e-09, L(p,q)-L0 = 1.7763568394002505e-15 +t = 22.0000, H(p,q)-H0 = 2.1905075531236662e-09, L(p,q)-L0 = 2.1094237467877974e-15 +t = 24.0000, H(p,q)-H0 = 2.1822001983196060e-09, L(p,q)-L0 = 1.1102230246251565e-16 +t = 26.0000, H(p,q)-H0 = 2.1602123423392072e-09, L(p,q)-L0 = -1.8873791418627661e-15 +t = 28.0000, H(p,q)-H0 = 2.1904859592858372e-09, L(p,q)-L0 = -1.6653345369377348e-15 +t = 30.0000, H(p,q)-H0 = 2.1876609967996785e-09, L(p,q)-L0 = -1.5543122344752192e-15 +t = 32.0000, H(p,q)-H0 = 1.9945752827155161e-09, L(p,q)-L0 = -2.4424906541753444e-15 +t = 34.0000, H(p,q)-H0 = 2.1904221214619213e-09, L(p,q)-L0 = -2.8865798640254070e-15 +t = 36.0000, H(p,q)-H0 = 2.1893279411600020e-09, L(p,q)-L0 = -3.9968028886505635e-15 +t = 38.0000, H(p,q)-H0 = 1.4440071360866114e-10, L(p,q)-L0 = -6.1062266354383610e-15 +t = 40.0000, H(p,q)-H0 = 2.1902865632306145e-09, L(p,q)-L0 = -8.1046280797636427e-15 +t = 42.0000, H(p,q)-H0 = 2.1899708158024112e-09, L(p,q)-L0 = -6.4392935428259079e-15 +t = 44.0000, H(p,q)-H0 = -8.7572837870197873e-11, L(p,q)-L0 = -5.6621374255882984e-15 +t = 46.0000, H(p,q)-H0 = 2.1900262159313399e-09, L(p,q)-L0 = -3.8857805861880479e-15 +t = 48.0000, H(p,q)-H0 = 2.1902658575712053e-09, L(p,q)-L0 = -4.9960036108132044e-15 +t = 50.0000, H(p,q)-H0 = -4.5252956937247291e-10, L(p,q)-L0 = -4.8849813083506888e-15 +t = 52.0000, H(p,q)-H0 = 2.1894484003581738e-09, L(p,q)-L0 = -5.3290705182007514e-15 +t = 54.0000, H(p,q)-H0 = 2.1904100200309529e-09, L(p,q)-L0 = -5.4400928206632670e-15 +t = 56.0000, H(p,q)-H0 = 1.9337507151107047e-09, L(p,q)-L0 = -4.6629367034256575e-15 +t = 58.0000, H(p,q)-H0 = 2.1879874023689183e-09, L(p,q)-L0 = -5.7731597280508140e-15 +t = 60.0000, H(p,q)-H0 = 2.1904785763027235e-09, L(p,q)-L0 = -5.8841820305133297e-15 +t = 62.0000, H(p,q)-H0 = 2.1533382854599381e-09, L(p,q)-L0 = -5.2180482157382357e-15 +t = 64.0000, H(p,q)-H0 = 2.1833743701904496e-09, L(p,q)-L0 = -5.9952043329758453e-15 +t = 66.0000, H(p,q)-H0 = 2.1905000036070987e-09, L(p,q)-L0 = -6.8833827526759706e-15 +t = 68.0000, H(p,q)-H0 = 2.1815383943746269e-09, L(p,q)-L0 = -5.5511151231257827e-15 +t = 70.0000, H(p,q)-H0 = 2.1630481850110073e-09, L(p,q)-L0 = -6.1062266354383610e-15 +t = 72.0000, H(p,q)-H0 = 2.1904852376408712e-09, L(p,q)-L0 = -5.9952043329758453e-15 +t = 74.0000, H(p,q)-H0 = 2.1874812516919917e-09, L(p,q)-L0 = -3.9968028886505635e-15 +t = 76.0000, H(p,q)-H0 = 2.0191781580081170e-09, L(p,q)-L0 = -2.6645352591003757e-15 +t = 78.0000, H(p,q)-H0 = 2.1904325020472015e-09, L(p,q)-L0 = -2.1094237467877974e-15 +t = 80.0000, H(p,q)-H0 = 2.1892689328062431e-09, L(p,q)-L0 = -4.6629367034256575e-15 +t = 82.0000, H(p,q)-H0 = 4.1583225751651298e-10, L(p,q)-L0 = -4.2188474935755949e-15 +t = 84.0000, H(p,q)-H0 = 2.1903036606651938e-09, L(p,q)-L0 = -5.6621374255882984e-15 +t = 86.0000, H(p,q)-H0 = 2.1899496105426408e-09, L(p,q)-L0 = -5.2180482157382357e-15 +t = 88.0000, H(p,q)-H0 = -3.5650193908054462e-10, L(p,q)-L0 = -6.5503158452884236e-15 +t = 90.0000, H(p,q)-H0 = 2.1900516955497551e-09, L(p,q)-L0 = -2.8865798640254070e-15 +t = 92.0000, H(p,q)-H0 = 2.1902563651643447e-09, L(p,q)-L0 = -2.8865798640254070e-15 +t = 94.0000, H(p,q)-H0 = -7.9523143625692683e-10, L(p,q)-L0 = -2.2204460492503131e-15 +t = 96.0000, H(p,q)-H0 = 2.1895019686191119e-09, L(p,q)-L0 = -1.5543122344752192e-15 +t = 98.0000, H(p,q)-H0 = 2.1904059677169130e-09, L(p,q)-L0 = -3.3306690738754696e-16 +t = 100.0000, H(p,q)-H0 = 1.8950280233909211e-09, L(p,q)-L0 = -6.6613381477509392e-16 Current time = 100 Steps = 10000 Step attempts = 10000 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out index 69b0e7aa30..36873efa02 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out @@ -11,56 +11,56 @@ Problem Arguments: nout: 50 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 2.0000, H(p,q)-H0 = -0.0005749349147707, L(p,q)-L0 = -0.0000762193764345 -t = 4.0000, H(p,q)-H0 = -0.0006444697300625, L(p,q)-L0 = -0.0001185108356820 -t = 6.0000, H(p,q)-H0 = -0.0006133689098136, L(p,q)-L0 = -0.0002807042268080 -t = 8.0000, H(p,q)-H0 = -0.0032234469444240, L(p,q)-L0 = -0.0009861266213895 -t = 10.0000, H(p,q)-H0 = -0.0033583230552776, L(p,q)-L0 = -0.0010762080874103 -t = 12.0000, H(p,q)-H0 = -0.0031038573413563, L(p,q)-L0 = -0.0011357193830287 -t = 14.0000, H(p,q)-H0 = -0.0061317375517682, L(p,q)-L0 = -0.0020098944058914 -t = 16.0000, H(p,q)-H0 = -0.0062240100957323, L(p,q)-L0 = -0.0020580441342328 -t = 18.0000, H(p,q)-H0 = -0.0061389862168795, L(p,q)-L0 = -0.0021378671060335 -t = 20.0000, H(p,q)-H0 = -0.0079377562441827, L(p,q)-L0 = -0.0026538946822888 -t = 22.0000, H(p,q)-H0 = -0.0080415763727093, L(p,q)-L0 = -0.0027033918826268 -t = 24.0000, H(p,q)-H0 = -0.0078639348456643, L(p,q)-L0 = -0.0027380158847649 -t = 26.0000, H(p,q)-H0 = -0.0102854125280696, L(p,q)-L0 = -0.0034620216564538 -t = 28.0000, H(p,q)-H0 = -0.0104129302744793, L(p,q)-L0 = -0.0035096132947093 -t = 30.0000, H(p,q)-H0 = -0.0103044482302194, L(p,q)-L0 = -0.0036403344181903 -t = 32.0000, H(p,q)-H0 = -0.0126982516827737, L(p,q)-L0 = -0.0044017841713648 -t = 34.0000, H(p,q)-H0 = -0.0128187955424879, L(p,q)-L0 = -0.0044419918179254 -t = 36.0000, H(p,q)-H0 = -0.0126310779345615, L(p,q)-L0 = -0.0045043101428324 -t = 38.0000, H(p,q)-H0 = -0.0150606602811654, L(p,q)-L0 = -0.0052330475264255 -t = 40.0000, H(p,q)-H0 = -0.0151788622112533, L(p,q)-L0 = -0.0052699269120502 -t = 42.0000, H(p,q)-H0 = -0.0150569458100673, L(p,q)-L0 = -0.0053347236023960 -t = 44.0000, H(p,q)-H0 = -0.0173137839631075, L(p,q)-L0 = -0.0059637976433143 -t = 46.0000, H(p,q)-H0 = -0.0174338049959960, L(p,q)-L0 = -0.0060030434143741 -t = 48.0000, H(p,q)-H0 = -0.0172399835389930, L(p,q)-L0 = -0.0060999971564726 -t = 50.0000, H(p,q)-H0 = -0.0195157534390640, L(p,q)-L0 = -0.0068193944869934 -t = 52.0000, H(p,q)-H0 = -0.0196372438315059, L(p,q)-L0 = -0.0068597834913745 -t = 54.0000, H(p,q)-H0 = -0.0195195095084675, L(p,q)-L0 = -0.0069156618390294 -t = 56.0000, H(p,q)-H0 = -0.0217192761687859, L(p,q)-L0 = -0.0075983004186643 -t = 58.0000, H(p,q)-H0 = -0.0218549383018103, L(p,q)-L0 = -0.0076477810149034 -t = 60.0000, H(p,q)-H0 = -0.0216890495859771, L(p,q)-L0 = -0.0076837133297855 -t = 62.0000, H(p,q)-H0 = -0.0246172025377501, L(p,q)-L0 = -0.0085141593196727 -t = 64.0000, H(p,q)-H0 = -0.0247491804628837, L(p,q)-L0 = -0.0085680133938262 -t = 66.0000, H(p,q)-H0 = -0.0245387353644329, L(p,q)-L0 = -0.0087030775251026 -t = 68.0000, H(p,q)-H0 = -0.0270366474206774, L(p,q)-L0 = -0.0094228232239524 -t = 70.0000, H(p,q)-H0 = -0.0271390237904816, L(p,q)-L0 = -0.0094731392035774 -t = 72.0000, H(p,q)-H0 = -0.0268517871738532, L(p,q)-L0 = -0.0096375517088950 -t = 74.0000, H(p,q)-H0 = -0.0282808586526974, L(p,q)-L0 = -0.0099774460306675 -t = 76.0000, H(p,q)-H0 = -0.0283575992521828, L(p,q)-L0 = -0.0100169980641838 -t = 78.0000, H(p,q)-H0 = -0.0282724941057513, L(p,q)-L0 = -0.0102139068836424 -t = 80.0000, H(p,q)-H0 = -0.0299397134815271, L(p,q)-L0 = -0.0105234678397391 -t = 82.0000, H(p,q)-H0 = -0.0301057775046566, L(p,q)-L0 = -0.0106490472235101 -t = 84.0000, H(p,q)-H0 = -0.0325708645786491, L(p,q)-L0 = -0.0115760488284884 -t = 86.0000, H(p,q)-H0 = -0.0331440585017584, L(p,q)-L0 = -0.0116524018992400 -t = 88.0000, H(p,q)-H0 = -0.0332280670701868, L(p,q)-L0 = -0.0117474518102095 -t = 90.0000, H(p,q)-H0 = -0.0354843834356922, L(p,q)-L0 = -0.0125021628634019 -t = 92.0000, H(p,q)-H0 = -0.0358074511974705, L(p,q)-L0 = -0.0125675723192767 -t = 94.0000, H(p,q)-H0 = -0.0358075888003233, L(p,q)-L0 = -0.0126049758375582 -t = 96.0000, H(p,q)-H0 = -0.0384048589306211, L(p,q)-L0 = -0.0134178750747388 -t = 98.0000, H(p,q)-H0 = -0.0386373113353553, L(p,q)-L0 = -0.0134801609211173 -t = 100.0000, H(p,q)-H0 = -0.0385931503110380, L(p,q)-L0 = -0.0135317249790002 +t = 2.0000, H(p,q)-H0 = -5.7493491477067504e-04, L(p,q)-L0 = -7.6219376434538688e-05 +t = 4.0000, H(p,q)-H0 = -6.4446973006249131e-04, L(p,q)-L0 = -1.1851083568203968e-04 +t = 6.0000, H(p,q)-H0 = -6.1336890981356085e-04, L(p,q)-L0 = -2.8070422680803730e-04 +t = 8.0000, H(p,q)-H0 = -3.2234469444240021e-03, L(p,q)-L0 = -9.8612662138952700e-04 +t = 10.0000, H(p,q)-H0 = -3.3583230552776122e-03, L(p,q)-L0 = -1.0762080874102686e-03 +t = 12.0000, H(p,q)-H0 = -3.1038573413563197e-03, L(p,q)-L0 = -1.1357193830286993e-03 +t = 14.0000, H(p,q)-H0 = -6.1317375517682127e-03, L(p,q)-L0 = -2.0098944058913881e-03 +t = 16.0000, H(p,q)-H0 = -6.2240100957322575e-03, L(p,q)-L0 = -2.0580441342328282e-03 +t = 18.0000, H(p,q)-H0 = -6.1389862168794718e-03, L(p,q)-L0 = -2.1378671060334753e-03 +t = 20.0000, H(p,q)-H0 = -7.9377562441826921e-03, L(p,q)-L0 = -2.6538946822888265e-03 +t = 22.0000, H(p,q)-H0 = -8.0415763727093026e-03, L(p,q)-L0 = -2.7033918826268044e-03 +t = 24.0000, H(p,q)-H0 = -7.8639348456642777e-03, L(p,q)-L0 = -2.7380158847648550e-03 +t = 26.0000, H(p,q)-H0 = -1.0285412528069582e-02, L(p,q)-L0 = -3.4620216564538175e-03 +t = 28.0000, H(p,q)-H0 = -1.0412930274479315e-02, L(p,q)-L0 = -3.5096132947093350e-03 +t = 30.0000, H(p,q)-H0 = -1.0304448230219365e-02, L(p,q)-L0 = -3.6403344181903385e-03 +t = 32.0000, H(p,q)-H0 = -1.2698251682773720e-02, L(p,q)-L0 = -4.4017841713648309e-03 +t = 34.0000, H(p,q)-H0 = -1.2818795542487882e-02, L(p,q)-L0 = -4.4419918179253726e-03 +t = 36.0000, H(p,q)-H0 = -1.2631077934561530e-02, L(p,q)-L0 = -4.5043101428323684e-03 +t = 38.0000, H(p,q)-H0 = -1.5060660281165372e-02, L(p,q)-L0 = -5.2330475264255050e-03 +t = 40.0000, H(p,q)-H0 = -1.5178862211253308e-02, L(p,q)-L0 = -5.2699269120501935e-03 +t = 42.0000, H(p,q)-H0 = -1.5056945810067335e-02, L(p,q)-L0 = -5.3347236023959521e-03 +t = 44.0000, H(p,q)-H0 = -1.7313783963107454e-02, L(p,q)-L0 = -5.9637976433143391e-03 +t = 46.0000, H(p,q)-H0 = -1.7433804995996005e-02, L(p,q)-L0 = -6.0030434143740763e-03 +t = 48.0000, H(p,q)-H0 = -1.7239983538993031e-02, L(p,q)-L0 = -6.0999971564725808e-03 +t = 50.0000, H(p,q)-H0 = -1.9515753439063976e-02, L(p,q)-L0 = -6.8193944869934242e-03 +t = 52.0000, H(p,q)-H0 = -1.9637243831505891e-02, L(p,q)-L0 = -6.8597834913745048e-03 +t = 54.0000, H(p,q)-H0 = -1.9519509508467481e-02, L(p,q)-L0 = -6.9156618390293634e-03 +t = 56.0000, H(p,q)-H0 = -2.1719276168785884e-02, L(p,q)-L0 = -7.5983004186642722e-03 +t = 58.0000, H(p,q)-H0 = -2.1854938301810289e-02, L(p,q)-L0 = -7.6477810149033765e-03 +t = 60.0000, H(p,q)-H0 = -2.1689049585977060e-02, L(p,q)-L0 = -7.6837133297854576e-03 +t = 62.0000, H(p,q)-H0 = -2.4617202537750127e-02, L(p,q)-L0 = -8.5141593196726983e-03 +t = 64.0000, H(p,q)-H0 = -2.4749180462883658e-02, L(p,q)-L0 = -8.5680133938261793e-03 +t = 66.0000, H(p,q)-H0 = -2.4538735364432851e-02, L(p,q)-L0 = -8.7030775251025760e-03 +t = 68.0000, H(p,q)-H0 = -2.7036647420677351e-02, L(p,q)-L0 = -9.4228232239523813e-03 +t = 70.0000, H(p,q)-H0 = -2.7139023790481609e-02, L(p,q)-L0 = -9.4731392035773965e-03 +t = 72.0000, H(p,q)-H0 = -2.6851787173853170e-02, L(p,q)-L0 = -9.6375517088950202e-03 +t = 74.0000, H(p,q)-H0 = -2.8280858652697360e-02, L(p,q)-L0 = -9.9774460306675250e-03 +t = 76.0000, H(p,q)-H0 = -2.8357599252182841e-02, L(p,q)-L0 = -1.0016998064183769e-02 +t = 78.0000, H(p,q)-H0 = -2.8272494105751278e-02, L(p,q)-L0 = -1.0213906883642432e-02 +t = 80.0000, H(p,q)-H0 = -2.9939713481527130e-02, L(p,q)-L0 = -1.0523467839739120e-02 +t = 82.0000, H(p,q)-H0 = -3.0105777504656595e-02, L(p,q)-L0 = -1.0649047223510122e-02 +t = 84.0000, H(p,q)-H0 = -3.2570864578649106e-02, L(p,q)-L0 = -1.1576048828488394e-02 +t = 86.0000, H(p,q)-H0 = -3.3144058501758389e-02, L(p,q)-L0 = -1.1652401899239995e-02 +t = 88.0000, H(p,q)-H0 = -3.3228067070186773e-02, L(p,q)-L0 = -1.1747451810209530e-02 +t = 90.0000, H(p,q)-H0 = -3.5484383435692157e-02, L(p,q)-L0 = -1.2502162863401889e-02 +t = 92.0000, H(p,q)-H0 = -3.5807451197470530e-02, L(p,q)-L0 = -1.2567572319276743e-02 +t = 94.0000, H(p,q)-H0 = -3.5807588800323309e-02, L(p,q)-L0 = -1.2604975837558152e-02 +t = 96.0000, H(p,q)-H0 = -3.8404858930621066e-02, L(p,q)-L0 = -1.3417875074738794e-02 +t = 98.0000, H(p,q)-H0 = -3.8637311335355307e-02, L(p,q)-L0 = -1.3480160921117257e-02 +t = 100.0000, H(p,q)-H0 = -3.8593150311038049e-02, L(p,q)-L0 = -1.3531724979000237e-02 Current time = 100 Steps = 371 Step attempts = 438 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out index c7a77a94dc..32f8333a1e 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out @@ -11,118 +11,118 @@ Problem Arguments: nout: 50 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 2.0000, H(p,q)-H0 = -0.0000000376222318, L(p,q)-L0 = -0.0000000009852491 +t = 2.0000, H(p,q)-H0 = -3.7622231774392390e-08, L(p,q)-L0 = -9.8524910452368886e-10 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.85142e-14, num. orbits is now 0.50 -t = 3.1416, H(p,q)-H0 = -0.0000000376233078, L(p,q)-L0 = -0.0000000009834136 -t = 4.0000, H(p,q)-H0 = -0.0000000376233031, L(p,q)-L0 = -0.0000000009852743 -t = 6.0000, H(p,q)-H0 = -0.0000000350889846, L(p,q)-L0 = -0.0000000010388308 +t = 3.1416, H(p,q)-H0 = -3.7623307802547856e-08, L(p,q)-L0 = -9.8341357279707609e-10 +t = 4.0000, H(p,q)-H0 = -3.7623303139611153e-08, L(p,q)-L0 = -9.8527430658634785e-10 +t = 6.0000, H(p,q)-H0 = -3.5088984606801432e-08, L(p,q)-L0 = -1.0388307991604506e-09 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 8.46545e-16, num. orbits is now 1.00 -t = 6.2832, H(p,q)-H0 = -0.0000001669914971, L(p,q)-L0 = -0.0000000371745509 -t = 8.0000, H(p,q)-H0 = -0.0000000484955648, L(p,q)-L0 = -0.0000000029169203 +t = 6.2832, H(p,q)-H0 = -1.6699149707477545e-07, L(p,q)-L0 = -3.7174550882035362e-08 +t = 8.0000, H(p,q)-H0 = -4.8495564786144030e-08, L(p,q)-L0 = -2.9169202608869682e-09 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.22089e-14, num. orbits is now 1.50 -t = 9.4248, H(p,q)-H0 = -0.0000000484973282, L(p,q)-L0 = -0.0000000029105186 -t = 10.0000, H(p,q)-H0 = -0.0000000484995450, L(p,q)-L0 = -0.0000000029169562 -t = 12.0000, H(p,q)-H0 = -0.0000000480271458, L(p,q)-L0 = -0.0000000029204726 +t = 9.4248, H(p,q)-H0 = -4.8497328153374042e-08, L(p,q)-L0 = -2.9105186039046771e-09 +t = 10.0000, H(p,q)-H0 = -4.8499545046709613e-08, L(p,q)-L0 = -2.9169562321129661e-09 +t = 12.0000, H(p,q)-H0 = -4.8027145815865424e-08, L(p,q)-L0 = -2.9204726414988613e-09 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.80219e-13, num. orbits is now 2.00 -t = 12.5664, H(p,q)-H0 = -0.0000001990599676, L(p,q)-L0 = -0.0000000438879704 -t = 14.0000, H(p,q)-H0 = -0.0000000593649294, L(p,q)-L0 = -0.0000000048485749 +t = 12.5664, H(p,q)-H0 = -1.9905996762048517e-07, L(p,q)-L0 = -4.3887970369027585e-08 +t = 14.0000, H(p,q)-H0 = -5.9364929416716450e-08, L(p,q)-L0 = -4.8485748749271806e-09 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.43945e-16, num. orbits is now 2.50 -t = 15.7080, H(p,q)-H0 = -0.0000000593745318, L(p,q)-L0 = -0.0000000048459065 -t = 16.0000, H(p,q)-H0 = -0.0000000593755231, L(p,q)-L0 = -0.0000000048486336 -t = 18.0000, H(p,q)-H0 = -0.0000000592660883, L(p,q)-L0 = -0.0000000048491807 +t = 15.7080, H(p,q)-H0 = -5.9374531846678735e-08, L(p,q)-L0 = -4.8459064538874941e-09 +t = 16.0000, H(p,q)-H0 = -5.9375523053795121e-08, L(p,q)-L0 = -4.8486336057251833e-09 +t = 18.0000, H(p,q)-H0 = -5.9266088259235516e-08, L(p,q)-L0 = -4.8491807236317186e-09 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.03794e-13, num. orbits is now 3.00 -t = 18.8496, H(p,q)-H0 = -0.0000000386706762, L(p,q)-L0 = -0.0000000071587637 -t = 20.0000, H(p,q)-H0 = -0.0000000702211224, L(p,q)-L0 = -0.0000000067801686 +t = 18.8496, H(p,q)-H0 = -3.8670676216767674e-08, L(p,q)-L0 = -7.1587636929493215e-09 +t = 20.0000, H(p,q)-H0 = -7.0221122361324717e-08, L(p,q)-L0 = -6.7801686487456436e-09 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.08369e-16, num. orbits is now 3.50 -t = 21.9911, H(p,q)-H0 = -0.0000000702509507, L(p,q)-L0 = -0.0000000067792550 -t = 22.0000, H(p,q)-H0 = -0.0000000702513583, L(p,q)-L0 = -0.0000000067803146 -t = 24.0000, H(p,q)-H0 = -0.0000000702196097, L(p,q)-L0 = -0.0000000067804679 +t = 21.9911, H(p,q)-H0 = -7.0250950723327321e-08, L(p,q)-L0 = -6.7792550462186796e-09 +t = 22.0000, H(p,q)-H0 = -7.0251358286199661e-08, L(p,q)-L0 = -6.7803146430733818e-09 +t = 24.0000, H(p,q)-H0 = -7.0219609682453665e-08, L(p,q)-L0 = -6.7804678538507801e-09 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.94383e-15, num. orbits is now 4.00 -t = 25.1327, H(p,q)-H0 = -0.0000001744439109, L(p,q)-L0 = -0.0000000372869297 -t = 26.0000, H(p,q)-H0 = -0.0000000810237040, L(p,q)-L0 = -0.0000000087114864 -t = 28.0000, H(p,q)-H0 = -0.0000000811270874, L(p,q)-L0 = -0.0000000087120007 +t = 25.1327, H(p,q)-H0 = -1.7444391087195754e-07, L(p,q)-L0 = -3.7286929654989365e-08 +t = 26.0000, H(p,q)-H0 = -8.1023703968341465e-08, L(p,q)-L0 = -8.7114864211201848e-09 +t = 28.0000, H(p,q)-H0 = -8.1127087381283047e-08, L(p,q)-L0 = -8.7120006764251912e-09 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.72026e-16, num. orbits is now 4.50 -t = 28.2743, H(p,q)-H0 = -0.0000000811247498, L(p,q)-L0 = -0.0000000087057775 -t = 30.0000, H(p,q)-H0 = -0.0000000811160636, L(p,q)-L0 = -0.0000000087120632 +t = 28.2743, H(p,q)-H0 = -8.1124749806704699e-08, L(p,q)-L0 = -8.7057775433052598e-09 +t = 30.0000, H(p,q)-H0 = -8.1116063643804637e-08, L(p,q)-L0 = -8.7120631819814776e-09 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.62717e-15, num. orbits is now 5.00 -t = 31.4159, H(p,q)-H0 = -0.0000002477778189, L(p,q)-L0 = -0.0000000533154391 -t = 32.0000, H(p,q)-H0 = -0.0000000915518348, L(p,q)-L0 = -0.0000000106404725 -t = 34.0000, H(p,q)-H0 = -0.0000000920026730, L(p,q)-L0 = -0.0000000106436840 +t = 31.4159, H(p,q)-H0 = -2.4777781892915129e-07, L(p,q)-L0 = -5.3315439063617021e-08 +t = 32.0000, H(p,q)-H0 = -9.1551834779934893e-08, L(p,q)-L0 = -1.0640472503098408e-08 +t = 34.0000, H(p,q)-H0 = -9.2002673035551652e-08, L(p,q)-L0 = -1.0643684045241741e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -9.26993e-16, num. orbits is now 5.50 -t = 34.5575, H(p,q)-H0 = -0.0000000920015394, L(p,q)-L0 = -0.0000000106400764 -t = 36.0000, H(p,q)-H0 = -0.0000000919985591, L(p,q)-L0 = -0.0000000106437179 +t = 34.5575, H(p,q)-H0 = -9.2001539386821207e-08, L(p,q)-L0 = -1.0640076375523222e-08 +t = 36.0000, H(p,q)-H0 = -9.1998559104133903e-08, L(p,q)-L0 = -1.0643717907043992e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 7.15849e-13, num. orbits is now 6.00 -t = 37.6991, H(p,q)-H0 = -0.0000000872834880, L(p,q)-L0 = -0.0000000165621029 -t = 38.0000, H(p,q)-H0 = -0.0000001002050503, L(p,q)-L0 = -0.0000000125283993 -t = 40.0000, H(p,q)-H0 = -0.0000001028780088, L(p,q)-L0 = -0.0000000125753666 +t = 37.6991, H(p,q)-H0 = -8.7283487992806386e-08, L(p,q)-L0 = -1.6562102911343857e-08 +t = 38.0000, H(p,q)-H0 = -1.0020505025742921e-07, L(p,q)-L0 = -1.2528399317979222e-08 +t = 40.0000, H(p,q)-H0 = -1.0287800877861741e-07, L(p,q)-L0 = -1.2575366636902174e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.26574e-13, num. orbits is now 6.50 -t = 40.8407, H(p,q)-H0 = -0.0000001028785500, L(p,q)-L0 = -0.0000000125749476 -t = 42.0000, H(p,q)-H0 = -0.0000001028768848, L(p,q)-L0 = -0.0000000125753943 +t = 40.8407, H(p,q)-H0 = -1.0287855001234192e-07, L(p,q)-L0 = -1.2574947638732681e-08 +t = 42.0000, H(p,q)-H0 = -1.0287688478882728e-07, L(p,q)-L0 = -1.2575394281455488e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 9.73597e-13, num. orbits is now 7.00 -t = 43.9823, H(p,q)-H0 = -0.0000001792544151, L(p,q)-L0 = -0.0000000368028044 -t = 44.0000, H(p,q)-H0 = -0.0000000772849207, L(p,q)-L0 = -0.0000000136304056 -t = 46.0000, H(p,q)-H0 = -0.0000001137528036, L(p,q)-L0 = -0.0000000145070463 +t = 43.9823, H(p,q)-H0 = -1.7925441508914730e-07, L(p,q)-L0 = -3.6802804359581387e-08 +t = 44.0000, H(p,q)-H0 = -7.7284920685372072e-08, L(p,q)-L0 = -1.3630405581999128e-08 +t = 46.0000, H(p,q)-H0 = -1.1375280362102558e-07, L(p,q)-L0 = -1.4507046341982743e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.6285e-13, num. orbits is now 7.50 -t = 47.1239, H(p,q)-H0 = -0.0000001137522608, L(p,q)-L0 = -0.0000000145012423 -t = 48.0000, H(p,q)-H0 = -0.0000001137537413, L(p,q)-L0 = -0.0000000145070741 -t = 50.0000, H(p,q)-H0 = -0.0000001108326937, L(p,q)-L0 = -0.0000000145724238 +t = 47.1239, H(p,q)-H0 = -1.1375226083298884e-07, L(p,q)-L0 = -1.4501242318054608e-08 +t = 48.0000, H(p,q)-H0 = -1.1375374131539218e-07, L(p,q)-L0 = -1.4507074097558359e-08 +t = 50.0000, H(p,q)-H0 = -1.1083269368938886e-07, L(p,q)-L0 = -1.4572423823189240e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 6.47659e-15, num. orbits is now 8.00 -t = 50.2655, H(p,q)-H0 = -0.0000002905677317, L(p,q)-L0 = -0.0000000614048145 -t = 52.0000, H(p,q)-H0 = -0.0000001246262774, L(p,q)-L0 = -0.0000000164387213 +t = 50.2655, H(p,q)-H0 = -2.9056773165336836e-07, L(p,q)-L0 = -6.1404814455379153e-08 +t = 52.0000, H(p,q)-H0 = -1.2462627740905674e-07, L(p,q)-L0 = -1.6438721273104306e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.97973e-17, num. orbits is now 8.50 -t = 53.4071, H(p,q)-H0 = -0.0000001246285745, L(p,q)-L0 = -0.0000000164342973 -t = 54.0000, H(p,q)-H0 = -0.0000001246300113, L(p,q)-L0 = -0.0000000164387585 -t = 56.0000, H(p,q)-H0 = -0.0000001241091641, L(p,q)-L0 = -0.0000000164428131 +t = 53.4071, H(p,q)-H0 = -1.2462857446049469e-07, L(p,q)-L0 = -1.6434297256395780e-08 +t = 54.0000, H(p,q)-H0 = -1.2463001131113316e-07, L(p,q)-L0 = -1.6438758465575631e-08 +t = 56.0000, H(p,q)-H0 = -1.2410916405691808e-07, L(p,q)-L0 = -1.6442813111083865e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.07351e-12, num. orbits is now 9.00 -t = 56.5487, H(p,q)-H0 = -0.0000001428438623, L(p,q)-L0 = -0.0000000275339136 -t = 58.0000, H(p,q)-H0 = -0.0000001354960408, L(p,q)-L0 = -0.0000000183703783 +t = 56.5487, H(p,q)-H0 = -1.4284386229412860e-07, L(p,q)-L0 = -2.7533913593558168e-08 +t = 58.0000, H(p,q)-H0 = -1.3549604083173961e-07, L(p,q)-L0 = -1.8370378329635173e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.47286e-15, num. orbits is now 9.50 -t = 59.6902, H(p,q)-H0 = -0.0000001355060441, L(p,q)-L0 = -0.0000000183703766 -t = 60.0000, H(p,q)-H0 = -0.0000001355060024, L(p,q)-L0 = -0.0000000183704374 -t = 62.0000, H(p,q)-H0 = -0.0000001353868683, L(p,q)-L0 = -0.0000000183710385 +t = 59.6902, H(p,q)-H0 = -1.3550604405221378e-07, L(p,q)-L0 = -1.8370376553278334e-08 +t = 60.0000, H(p,q)-H0 = -1.3550600241885036e-07, L(p,q)-L0 = -1.8370437393500083e-08 +t = 62.0000, H(p,q)-H0 = -1.3538686827185842e-07, L(p,q)-L0 = -1.8371038468245615e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 4.19987e-15, num. orbits is now 10.00 -t = 62.8318, H(p,q)-H0 = -0.0000001832015348, L(p,q)-L0 = -0.0000000361236062 -t = 64.0000, H(p,q)-H0 = -0.0000001463536499, L(p,q)-L0 = -0.0000000203019801 +t = 62.8318, H(p,q)-H0 = -1.8320153483131207e-07, L(p,q)-L0 = -3.6123606217408621e-08 +t = 64.0000, H(p,q)-H0 = -1.4635364986581578e-07, L(p,q)-L0 = -2.0301980097059413e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.69318e-13, num. orbits is now 10.50 -t = 65.9734, H(p,q)-H0 = -0.0000001463798256, L(p,q)-L0 = -0.0000000202968796 -t = 66.0000, H(p,q)-H0 = -0.0000001463818393, L(p,q)-L0 = -0.0000000203021158 -t = 68.0000, H(p,q)-H0 = -0.0000001463477424, L(p,q)-L0 = -0.0000000203022792 +t = 65.9734, H(p,q)-H0 = -1.4637982559406737e-07, L(p,q)-L0 = -2.0296879621461983e-08 +t = 66.0000, H(p,q)-H0 = -1.4638183931658943e-07, L(p,q)-L0 = -2.0302115766313023e-08 +t = 68.0000, H(p,q)-H0 = -1.4634774236910175e-07, L(p,q)-L0 = -2.0302279191142247e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 3.11062e-13, num. orbits is now 11.00 -t = 69.1150, H(p,q)-H0 = -0.0000003268473887, L(p,q)-L0 = -0.0000000680246426 -t = 70.0000, H(p,q)-H0 = -0.0000001571624838, L(p,q)-L0 = -0.0000000222333291 -t = 72.0000, H(p,q)-H0 = -0.0000001572575694, L(p,q)-L0 = -0.0000000222337989 +t = 69.1150, H(p,q)-H0 = -3.2684738870969454e-07, L(p,q)-L0 = -6.8024642585484685e-08 +t = 70.0000, H(p,q)-H0 = -1.5716248380481801e-07, L(p,q)-L0 = -2.2233329066700946e-08 +t = 72.0000, H(p,q)-H0 = -1.5725756941087354e-07, L(p,q)-L0 = -2.2233798913084968e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.97186e-13, num. orbits is now 11.50 -t = 72.2566, H(p,q)-H0 = -0.0000001572556211, L(p,q)-L0 = -0.0000000222286056 -t = 74.0000, H(p,q)-H0 = -0.0000001572458339, L(p,q)-L0 = -0.0000000222338642 +t = 72.2566, H(p,q)-H0 = -1.5725562108048763e-07, L(p,q)-L0 = -2.2228605622842679e-08 +t = 74.0000, H(p,q)-H0 = -1.5724583390941405e-07, L(p,q)-L0 = -2.2233864194198816e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.67255e-12, num. orbits is now 12.00 -t = 75.3982, H(p,q)-H0 = -0.0000002026041548, L(p,q)-L0 = -0.0000000394538707 -t = 76.0000, H(p,q)-H0 = -0.0000001677249825, L(p,q)-L0 = -0.0000000241626776 -t = 78.0000, H(p,q)-H0 = -0.0000001681331613, L(p,q)-L0 = -0.0000000241654816 +t = 75.3982, H(p,q)-H0 = -2.0260415478645655e-07, L(p,q)-L0 = -3.9453870726013918e-08 +t = 76.0000, H(p,q)-H0 = -1.6772498245831713e-07, L(p,q)-L0 = -2.4162677636496710e-08 +t = 78.0000, H(p,q)-H0 = -1.6813316128239109e-07, L(p,q)-L0 = -2.4165481615767703e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.30983e-13, num. orbits is now 12.50 -t = 78.5398, H(p,q)-H0 = -0.0000001681333823, L(p,q)-L0 = -0.0000000241654422 -t = 80.0000, H(p,q)-H0 = -0.0000001681287797, L(p,q)-L0 = -0.0000000241655181 +t = 78.5398, H(p,q)-H0 = -1.6813338232779529e-07, L(p,q)-L0 = -2.4165442202850329e-08 +t = 80.0000, H(p,q)-H0 = -1.6812877967620210e-07, L(p,q)-L0 = -2.4165518142105213e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.31473e-14, num. orbits is now 13.00 -t = 81.6814, H(p,q)-H0 = -0.0000001884374603, L(p,q)-L0 = -0.0000000357351463 -t = 82.0000, H(p,q)-H0 = -0.0000001766780491, L(p,q)-L0 = -0.0000000260585226 -t = 84.0000, H(p,q)-H0 = -0.0000001790085129, L(p,q)-L0 = -0.0000000260971640 +t = 81.6814, H(p,q)-H0 = -1.8843746030228203e-07, L(p,q)-L0 = -3.5735146286519637e-08 +t = 82.0000, H(p,q)-H0 = -1.7667804907972595e-07, L(p,q)-L0 = -2.6058522561989150e-08 +t = 84.0000, H(p,q)-H0 = -1.7900851290164610e-07, L(p,q)-L0 = -2.6097163985383531e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.67361e-13, num. orbits is now 13.50 -t = 84.8230, H(p,q)-H0 = -0.0000001790074484, L(p,q)-L0 = -0.0000000260926729 -t = 86.0000, H(p,q)-H0 = -0.0000001790072481, L(p,q)-L0 = -0.0000000260971915 +t = 84.8230, H(p,q)-H0 = -1.7900744841981009e-07, L(p,q)-L0 = -2.6092672911204318e-08 +t = 86.0000, H(p,q)-H0 = -1.7900724813557645e-07, L(p,q)-L0 = -2.6097191518914542e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.94733e-12, num. orbits is now 14.00 -t = 87.9646, H(p,q)-H0 = -0.0000003563557034, L(p,q)-L0 = -0.0000000731159820 -t = 88.0000, H(p,q)-H0 = -0.0000001555989648, L(p,q)-L0 = -0.0000000272586714 -t = 90.0000, H(p,q)-H0 = -0.0000001898833518, L(p,q)-L0 = -0.0000000280288431 +t = 87.9646, H(p,q)-H0 = -3.5635570339032085e-07, L(p,q)-L0 = -7.3115982046623174e-08 +t = 88.0000, H(p,q)-H0 = -1.5559896482386648e-07, L(p,q)-L0 = -2.7258671431162895e-08 +t = 90.0000, H(p,q)-H0 = -1.8988335181990834e-07, L(p,q)-L0 = -2.8028843135352588e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -9.70903e-16, num. orbits is now 14.50 -t = 91.1061, H(p,q)-H0 = -0.0000001898827311, L(p,q)-L0 = -0.0000000280230654 -t = 92.0000, H(p,q)-H0 = -0.0000001898841560, L(p,q)-L0 = -0.0000000280288693 -t = 94.0000, H(p,q)-H0 = -0.0000001864738195, L(p,q)-L0 = -0.0000000281087710 +t = 91.1061, H(p,q)-H0 = -1.8988273109421527e-07, L(p,q)-L0 = -2.8023065423710136e-08 +t = 92.0000, H(p,q)-H0 = -1.8988415595444508e-07, L(p,q)-L0 = -2.8028869336615969e-08 +t = 94.0000, H(p,q)-H0 = -1.8647381949676856e-07, L(p,q)-L0 = -2.8108770977475217e-08 ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.30503e-14, num. orbits is now 15.00 -t = 94.2477, H(p,q)-H0 = -0.0000002640777539, L(p,q)-L0 = -0.0000000517606343 -t = 96.0000, H(p,q)-H0 = -0.0000002007569454, L(p,q)-L0 = -0.0000000299605183 +t = 94.2477, H(p,q)-H0 = -2.6407775388648247e-07, L(p,q)-L0 = -5.1760634334208078e-08 +t = 96.0000, H(p,q)-H0 = -2.0075694540100386e-07, L(p,q)-L0 = -2.9960518288518756e-08 ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.38134e-13, num. orbits is now 15.50 -t = 97.3893, H(p,q)-H0 = -0.0000002007605849, L(p,q)-L0 = -0.0000000299601406 -t = 98.0000, H(p,q)-H0 = -0.0000002007604434, L(p,q)-L0 = -0.0000000299605509 -t = 100.0000, H(p,q)-H0 = -0.0000002001859060, L(p,q)-L0 = -0.0000000299652453 +t = 97.3893, H(p,q)-H0 = -2.0076058493412319e-07, L(p,q)-L0 = -2.9960140590645779e-08 +t = 98.0000, H(p,q)-H0 = -2.0076044338068755e-07, L(p,q)-L0 = -2.9960550929075680e-08 +t = 100.0000, H(p,q)-H0 = -2.0018590596304620e-07, L(p,q)-L0 = -2.9965245285090703e-08 Current time = 100 Steps = 10000 Step attempts = 10000 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out index a13808f38c..c63591e498 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out @@ -11,118 +11,118 @@ Problem Arguments: nout: 50 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 2.0000, H(p,q)-H0 = 0.0000155500913761, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -1.88646e-14, num. orbits is now 0.50 -t = 3.1418, H(p,q)-H0 = 0.0000155500918735, L(p,q)-L0 = 0.0000044724976096 -t = 4.0000, H(p,q)-H0 = 0.0000155500916529, L(p,q)-L0 = 0.0000044724976135 -t = 6.0000, H(p,q)-H0 = 0.0000155477772263, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 8.25078e-16, num. orbits is now 1.00 -t = 6.2835, H(p,q)-H0 = 0.0000155203795122, L(p,q)-L0 = 0.0000044664979287 -t = 8.0000, H(p,q)-H0 = 0.0000155500907651, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -5.22907e-14, num. orbits is now 1.50 -t = 9.4252, H(p,q)-H0 = 0.0000155500918704, L(p,q)-L0 = 0.0000044724976006 -t = 10.0000, H(p,q)-H0 = 0.0000155500917899, L(p,q)-L0 = 0.0000044724976135 -t = 12.0000, H(p,q)-H0 = 0.0000155498692904, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 2.79488e-13, num. orbits is now 2.00 -t = 12.5670, H(p,q)-H0 = 0.0000155049003756, L(p,q)-L0 = 0.0000044631180703 -t = 14.0000, H(p,q)-H0 = 0.0000155500892037, L(p,q)-L0 = 0.0000044724976136 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -8.67519e-14, num. orbits is now 2.50 -t = 15.7087, H(p,q)-H0 = 0.0000155500918712, L(p,q)-L0 = 0.0000044724976036 -t = 16.0000, H(p,q)-H0 = 0.0000155500918547, L(p,q)-L0 = 0.0000044724976134 -t = 18.0000, H(p,q)-H0 = 0.0000155500584843, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 3.21073e-13, num. orbits is now 3.00 -t = 18.8504, H(p,q)-H0 = 0.0000155449689148, L(p,q)-L0 = 0.0000044718585810 -t = 20.0000, H(p,q)-H0 = 0.0000155500841750, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -1.40404e-16, num. orbits is now 3.50 -t = 21.9922, H(p,q)-H0 = 0.0000155500918731, L(p,q)-L0 = 0.0000044724976084 -t = 22.0000, H(p,q)-H0 = 0.0000155500918747, L(p,q)-L0 = 0.0000044724976136 -t = 24.0000, H(p,q)-H0 = 0.0000155500836105, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 7.8236e-16, num. orbits is now 4.00 -t = 25.1339, H(p,q)-H0 = 0.0000155169132525, L(p,q)-L0 = 0.0000044657418486 -t = 26.0000, H(p,q)-H0 = 0.0000155500613853, L(p,q)-L0 = 0.0000044724976135 -t = 28.0000, H(p,q)-H0 = 0.0000155500918571, L(p,q)-L0 = 0.0000044724976136 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -1.10849e-15, num. orbits is now 4.50 -t = 28.2757, H(p,q)-H0 = 0.0000155500918702, L(p,q)-L0 = 0.0000044724975999 -t = 30.0000, H(p,q)-H0 = 0.0000155500890452, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.40729e-15, num. orbits is now 5.00 -t = 31.4174, H(p,q)-H0 = 0.0000155063900653, L(p,q)-L0 = 0.0000044634422682 -t = 32.0000, H(p,q)-H0 = 0.0000155498937505, L(p,q)-L0 = 0.0000044724976136 -t = 34.0000, H(p,q)-H0 = 0.0000155500917953, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -1.90379e-13, num. orbits is now 5.50 -t = 34.5592, H(p,q)-H0 = 0.0000155500918726, L(p,q)-L0 = 0.0000044724976068 -t = 36.0000, H(p,q)-H0 = 0.0000155500907079, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.61859e-13, num. orbits is now 6.00 -t = 37.7009, H(p,q)-H0 = 0.0000155418054639, L(p,q)-L0 = 0.0000044711691772 -t = 38.0000, H(p,q)-H0 = 0.0000155480172854, L(p,q)-L0 = 0.0000044724976135 -t = 40.0000, H(p,q)-H0 = 0.0000155500916642, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -2.25117e-13, num. orbits is now 6.50 -t = 40.8426, H(p,q)-H0 = 0.0000155500918724, L(p,q)-L0 = 0.0000044724976068 -t = 42.0000, H(p,q)-H0 = 0.0000155500913513, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 5.75278e-15, num. orbits is now 7.00 -t = 43.9843, H(p,q)-H0 = 0.0000155136751636, L(p,q)-L0 = 0.0000044650354014 -t = 44.0000, H(p,q)-H0 = 0.0000155478340671, L(p,q)-L0 = 0.0000044724976134 -t = 46.0000, H(p,q)-H0 = 0.0000155500913973, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -7.2956e-16, num. orbits is now 7.50 -t = 47.1261, H(p,q)-H0 = 0.0000155500918698, L(p,q)-L0 = 0.0000044724975991 -t = 48.0000, H(p,q)-H0 = 0.0000155500916421, L(p,q)-L0 = 0.0000044724976134 -t = 50.0000, H(p,q)-H0 = 0.0000155474929582, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.11845e-12, num. orbits is now 8.00 -t = 50.2678, H(p,q)-H0 = 0.0000155091249194, L(p,q)-L0 = 0.0000044640381455 -t = 52.0000, H(p,q)-H0 = 0.0000155500908142, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -2.94768e-13, num. orbits is now 8.50 -t = 53.4096, H(p,q)-H0 = 0.0000155500918735, L(p,q)-L0 = 0.0000044724976096 -t = 54.0000, H(p,q)-H0 = 0.0000155500917846, L(p,q)-L0 = 0.0000044724976134 -t = 56.0000, H(p,q)-H0 = 0.0000155498403969, L(p,q)-L0 = 0.0000044724976133 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.24352e-12, num. orbits is now 9.00 -t = 56.5513, H(p,q)-H0 = 0.0000155384487686, L(p,q)-L0 = 0.0000044704375812 -t = 58.0000, H(p,q)-H0 = 0.0000155500893395, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -3.29137e-13, num. orbits is now 9.50 -t = 59.6931, H(p,q)-H0 = 0.0000155500918722, L(p,q)-L0 = 0.0000044724976055 -t = 60.0000, H(p,q)-H0 = 0.0000155500918526, L(p,q)-L0 = 0.0000044724976134 -t = 62.0000, H(p,q)-H0 = 0.0000155500553390, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.38799e-12, num. orbits is now 10.00 -t = 62.8348, H(p,q)-H0 = 0.0000155107582724, L(p,q)-L0 = 0.0000044643988768 -t = 64.0000, H(p,q)-H0 = 0.0000155500846616, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -3.68955e-13, num. orbits is now 10.50 -t = 65.9766, H(p,q)-H0 = 0.0000155500918702, L(p,q)-L0 = 0.0000044724975993 -t = 66.0000, H(p,q)-H0 = 0.0000155500918748, L(p,q)-L0 = 0.0000044724976135 -t = 68.0000, H(p,q)-H0 = 0.0000155500830369, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 6.73073e-16, num. orbits is now 11.00 -t = 69.1183, H(p,q)-H0 = 0.0000155132795978, L(p,q)-L0 = 0.0000044649438806 -t = 70.0000, H(p,q)-H0 = 0.0000155500639313, L(p,q)-L0 = 0.0000044724976135 -t = 72.0000, H(p,q)-H0 = 0.0000155500918592, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -2.11431e-15, num. orbits is now 11.50 -t = 72.2600, H(p,q)-H0 = 0.0000155500918748, L(p,q)-L0 = 0.0000044724976133 -t = 74.0000, H(p,q)-H0 = 0.0000155500888908, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.67165e-12, num. orbits is now 12.00 -t = 75.4017, H(p,q)-H0 = 0.0000155349369808, L(p,q)-L0 = 0.0000044696720972 -t = 76.0000, H(p,q)-H0 = 0.0000155499159623, L(p,q)-L0 = 0.0000044724976134 -t = 78.0000, H(p,q)-H0 = 0.0000155500918005, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -4.30462e-13, num. orbits is now 12.50 -t = 78.5435, H(p,q)-H0 = 0.0000155500918721, L(p,q)-L0 = 0.0000044724976048 -t = 80.0000, H(p,q)-H0 = 0.0000155500906532, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 3.37779e-12, num. orbits is now 13.00 -t = 81.6852, H(p,q)-H0 = 0.0000155082648194, L(p,q)-L0 = 0.0000044638545811 -t = 82.0000, H(p,q)-H0 = 0.0000155482613966, L(p,q)-L0 = 0.0000044724976134 -t = 84.0000, H(p,q)-H0 = 0.0000155500916742, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -4.68566e-13, num. orbits is now 13.50 -t = 84.8270, H(p,q)-H0 = 0.0000155500918701, L(p,q)-L0 = 0.0000044724975993 -t = 86.0000, H(p,q)-H0 = 0.0000155500913284, L(p,q)-L0 = 0.0000044724976135 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 1.95522e-12, num. orbits is now 14.00 -t = 87.9687, H(p,q)-H0 = 0.0000155190401663, L(p,q)-L0 = 0.0000044662001580 -t = 88.0000, H(p,q)-H0 = 0.0000155476211892, L(p,q)-L0 = 0.0000044724976133 -t = 90.0000, H(p,q)-H0 = 0.0000155500914178, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -2.10881e-15, num. orbits is now 14.50 -t = 91.1105, H(p,q)-H0 = 0.0000155500918745, L(p,q)-L0 = 0.0000044724976124 -t = 92.0000, H(p,q)-H0 = 0.0000155500916311, L(p,q)-L0 = 0.0000044724976134 -t = 94.0000, H(p,q)-H0 = 0.0000155471925649, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = 1, y[0] = 0.400002, y[1] = 2.09832e-12, num. orbits is now 15.00 -t = 94.2522, H(p,q)-H0 = 0.0000155313150425, L(p,q)-L0 = 0.0000044688825105 -t = 96.0000, H(p,q)-H0 = 0.0000155500908612, L(p,q)-L0 = 0.0000044724976134 -ROOT RETURN: g[0] = -1, y[0] = -1.60006, y[1] = -5.98154e-16, num. orbits is now 15.50 -t = 97.3939, H(p,q)-H0 = 0.0000155500918717, L(p,q)-L0 = 0.0000044724976036 -t = 98.0000, H(p,q)-H0 = 0.0000155500917791, L(p,q)-L0 = 0.0000044724976134 -t = 100.0000, H(p,q)-H0 = 0.0000155498072557, L(p,q)-L0 = 0.0000044724976134 +t = 2.0000, H(p,q)-H0 = 2.1900069535618627e-09, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.84649e-14, num. orbits is now 0.50 +t = 3.1416, H(p,q)-H0 = 2.1771856539842815e-09, L(p,q)-L0 = -3.4632297030157133e-11 +t = 4.0000, H(p,q)-H0 = 2.1902835656284481e-09, L(p,q)-L0 = 0.0000000000000000e+00 +t = 6.0000, H(p,q)-H0 = -1.2929013415430290e-10, L(p,q)-L0 = 1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.42861e-16, num. orbits is now 1.00 +t = 6.2832, H(p,q)-H0 = 2.1834023646860601e-06, L(p,q)-L0 = 4.9307926430763871e-07 +t = 8.0000, H(p,q)-H0 = 2.1893968860098312e-09, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.18136e-14, num. orbits is now 1.50 +t = 9.4248, H(p,q)-H0 = 2.1541973760363931e-09, L(p,q)-L0 = -9.4402263783877061e-11 +t = 10.0000, H(p,q)-H0 = 2.1904204006162331e-09, L(p,q)-L0 = 0.0000000000000000e+00 +t = 12.0000, H(p,q)-H0 = 1.9669063044958079e-09, L(p,q)-L0 = 1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.80035e-13, num. orbits is now 2.00 +t = 12.5664, H(p,q)-H0 = 3.2666979974393939e-06, L(p,q)-L0 = 7.3786250787133412e-07 +t = 14.0000, H(p,q)-H0 = 2.1878396316843407e-09, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.88071e-16, num. orbits is now 2.50 +t = 15.7080, H(p,q)-H0 = 2.1581316178576060e-09, L(p,q)-L0 = -8.4173779058005493e-11 +t = 16.0000, H(p,q)-H0 = 2.1904854596854761e-09, L(p,q)-L0 = 0.0000000000000000e+00 +t = 18.0000, H(p,q)-H0 = 2.1569462882453649e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 4.2188e-14, num. orbits is now 3.00 +t = 18.8496, H(p,q)-H0 = 7.9684258746937076e-07, L(p,q)-L0 = 1.8003222113094353e-07 +t = 20.0000, H(p,q)-H0 = 2.1828338581109108e-09, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.59287e-13, num. orbits is now 3.50 +t = 21.9911, H(p,q)-H0 = 2.1809747896561760e-09, L(p,q)-L0 = -2.4779955865028569e-11 +t = 22.0000, H(p,q)-H0 = 2.1905054436999194e-09, L(p,q)-L0 = 0.0000000000000000e+00 +t = 24.0000, H(p,q)-H0 = 2.1821994211634888e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 3.2396e-15, num. orbits is now 4.00 +t = 25.1327, H(p,q)-H0 = 1.8982353684471320e-06, L(p,q)-L0 = 4.2867047012062898e-07 +t = 26.0000, H(p,q)-H0 = 2.1602143407406516e-09, L(p,q)-L0 = -1.1102230246251565e-16 +t = 28.0000, H(p,q)-H0 = 2.1904880131984328e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.5573e-13, num. orbits is now 4.50 +t = 28.2743, H(p,q)-H0 = 2.1564632857185018e-09, L(p,q)-L0 = -8.8510865303703667e-11 +t = 30.0000, H(p,q)-H0 = 2.1876619404892494e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.02194e-12, num. orbits is now 5.00 +t = 31.4159, H(p,q)-H0 = 3.2652130843580096e-06, L(p,q)-L0 = 7.3750452778131859e-07 +t = 32.0000, H(p,q)-H0 = 1.9945795015630097e-09, L(p,q)-L0 = 0.0000000000000000e+00 +t = 34.0000, H(p,q)-H0 = 2.1904265623540198e-09, L(p,q)-L0 = -2.2204460492503131e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.9092e-13, num. orbits is now 5.50 +t = 34.5575, H(p,q)-H0 = 2.1547714723624267e-09, L(p,q)-L0 = -9.2910568127990700e-11 +t = 36.0000, H(p,q)-H0 = 2.1893326040967054e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.18837e-13, num. orbits is now 6.00 +t = 37.6991, H(p,q)-H0 = 1.4644406864938730e-06, L(p,q)-L0 = 3.3085088491091597e-07 +t = 38.0000, H(p,q)-H0 = 1.4440848516983351e-10, L(p,q)-L0 = -1.1102230246251565e-16 +t = 40.0000, H(p,q)-H0 = 2.1902958335928702e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -2.26967e-13, num. orbits is now 6.50 +t = 40.8407, H(p,q)-H0 = 2.1847282871689799e-09, L(p,q)-L0 = -1.5020873433968518e-11 +t = 42.0000, H(p,q)-H0 = 2.1899792534973983e-09, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 9.77503e-13, num. orbits is now 7.00 +t = 43.9823, H(p,q)-H0 = 1.5984138088676048e-06, L(p,q)-L0 = 3.6095561650739683e-07 +t = 44.0000, H(p,q)-H0 = -8.7564400175210721e-11, L(p,q)-L0 = 0.0000000000000000e+00 +t = 46.0000, H(p,q)-H0 = 2.1900307123345897e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.21501e-16, num. orbits is now 7.50 +t = 47.1239, H(p,q)-H0 = 2.1591558541089739e-09, L(p,q)-L0 = -8.1509909932719893e-11 +t = 48.0000, H(p,q)-H0 = 2.1902712976640260e-09, L(p,q)-L0 = -1.1102230246251565e-16 +t = 50.0000, H(p,q)-H0 = -4.5252468439116456e-10, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 6.09365e-15, num. orbits is now 8.00 +t = 50.2655, H(p,q)-H0 = 3.2033230468186957e-06, L(p,q)-L0 = 7.2350434687784571e-07 +t = 52.0000, H(p,q)-H0 = 2.1894521751164575e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.38778e-16, num. orbits is now 8.50 +t = 53.4071, H(p,q)-H0 = 2.1524908522252417e-09, L(p,q)-L0 = -9.8839714191001349e-11 +t = 54.0000, H(p,q)-H0 = 2.1904144609230514e-09, L(p,q)-L0 = 0.0000000000000000e+00 +t = 56.0000, H(p,q)-H0 = 1.9337540457797786e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.71703e-12, num. orbits is now 9.00 +t = 56.5487, H(p,q)-H0 = 2.0121016088836541e-06, L(p,q)-L0 = 4.5456268404908684e-07 +t = 58.0000, H(p,q)-H0 = 2.1879919542833193e-09, L(p,q)-L0 = -2.2204460492503131e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -7.71159e-16, num. orbits is now 9.50 +t = 59.6903, H(p,q)-H0 = 2.1883964640423414e-09, L(p,q)-L0 = -5.4833915186236482e-12 +t = 60.0000, H(p,q)-H0 = 2.1904827951502170e-09, L(p,q)-L0 = -1.1102230246251565e-16 +t = 62.0000, H(p,q)-H0 = 2.1533409499951972e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.65131e-15, num. orbits is now 10.00 +t = 62.8319, H(p,q)-H0 = 1.2891478551324553e-06, L(p,q)-L0 = 2.9111120158908932e-07 +t = 64.0000, H(p,q)-H0 = 2.1833788110825481e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.13744e-15, num. orbits is now 10.50 +t = 65.9734, H(p,q)-H0 = 2.1621995305309838e-09, L(p,q)-L0 = -7.3596240213191777e-11 +t = 66.0000, H(p,q)-H0 = 2.1905053881887682e-09, L(p,q)-L0 = 0.0000000000000000e+00 +t = 68.0000, H(p,q)-H0 = 2.1815430018001791e-09, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.23713e-12, num. orbits is now 11.00 +t = 69.1150, H(p,q)-H0 = 3.0882619195260474e-06, L(p,q)-L0 = 6.9749695053022975e-07 +t = 70.0000, H(p,q)-H0 = 2.1630525148808033e-09, L(p,q)-L0 = -1.1102230246251565e-16 +t = 72.0000, H(p,q)-H0 = 2.1904902336444820e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -3.96608e-13, num. orbits is now 11.50 +t = 72.2566, H(p,q)-H0 = 2.1511883385727515e-09, L(p,q)-L0 = -1.0222600543841054e-10 +t = 74.0000, H(p,q)-H0 = 2.1874849154279730e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 5.75581e-15, num. orbits is now 12.00 +t = 75.3982, H(p,q)-H0 = 2.4488947434342379e-06, L(p,q)-L0 = 5.5322002912028267e-07 +t = 76.0000, H(p,q)-H0 = 2.0191779359635120e-09, L(p,q)-L0 = -1.1102230246251565e-16 +t = 78.0000, H(p,q)-H0 = 2.1904320024468404e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -4.30512e-13, num. orbits is now 12.50 +t = 78.5398, H(p,q)-H0 = 2.1863212351647121e-09, L(p,q)-L0 = -1.0879075418301909e-11 +t = 80.0000, H(p,q)-H0 = 2.1892699875181165e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 1.8114e-12, num. orbits is now 13.00 +t = 81.6814, H(p,q)-H0 = 9.7535366494483355e-07, L(p,q)-L0 = 2.2024722368119143e-07 +t = 82.0000, H(p,q)-H0 = 4.1583381182874746e-10, L(p,q)-L0 = -2.2204460492503131e-16 +t = 84.0000, H(p,q)-H0 = 2.1903069358231164e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -6.01949e-16, num. orbits is now 13.50 +t = 84.8230, H(p,q)-H0 = 2.1655218729321746e-09, L(p,q)-L0 = -6.4957705880885896e-11 +t = 86.0000, H(p,q)-H0 = 2.1899523861002024e-09, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 8.92949e-16, num. orbits is now 14.00 +t = 87.9646, H(p,q)-H0 = 2.9269917813934399e-06, L(p,q)-L0 = 6.6105562701590515e-07 +t = 88.0000, H(p,q)-H0 = -3.5649505569779194e-10, L(p,q)-L0 = 0.0000000000000000e+00 +t = 90.0000, H(p,q)-H0 = 2.1900535829288970e-09, L(p,q)-L0 = 0.0000000000000000e+00 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -1.25442e-16, num. orbits is now 14.50 +t = 91.1062, H(p,q)-H0 = 2.1507646774665545e-09, L(p,q)-L0 = -1.0332734667883869e-10 +t = 92.0000, H(p,q)-H0 = 2.1902584745880915e-09, L(p,q)-L0 = 0.0000000000000000e+00 +t = 94.0000, H(p,q)-H0 = -7.9522965990008743e-10, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = 1, y[0] = 0.4, y[1] = 2.10223e-12, num. orbits is now 15.00 +t = 94.2478, H(p,q)-H0 = 2.7836469302933153e-06, L(p,q)-L0 = 6.2882004014941373e-07 +t = 96.0000, H(p,q)-H0 = 2.1895043000874637e-09, L(p,q)-L0 = -1.1102230246251565e-16 +ROOT RETURN: g[0] = -1, y[0] = -1.6, y[1] = -5.37004e-13, num. orbits is now 15.50 +t = 97.3894, H(p,q)-H0 = 2.1772518232765492e-09, L(p,q)-L0 = -3.4459657349827921e-11 +t = 98.0000, H(p,q)-H0 = 2.1904077440737524e-09, L(p,q)-L0 = -2.2204460492503131e-16 +t = 100.0000, H(p,q)-H0 = 1.8950301328146679e-09, L(p,q)-L0 = -2.2204460492503131e-16 Current time = 100 Steps = 10000 Step attempts = 10000 @@ -134,6 +134,6 @@ Inequality constraint fails = 0 Initial step size = 0.01 Last step size = 0.01 Current step size = 0.01 -Root fn evals = 10315 +Root fn evals = 10297 f1 RHS fn evals = 40032 f2 RHS fn evals = 40032 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out index e556138fbd..1564a68045 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out @@ -11,7 +11,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 Current time = 50 Steps = 50001 Step attempts = 50001 @@ -42,7 +42,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0012973337429578, L(p,q)-L0 = 0.0000000000000004 +t = 50.0000, H(p,q)-H0 = -1.2973337429578180e-03, L(p,q)-L0 = 4.4408920985006262e-16 Current time = 50 Steps = 50001 Step attempts = 50001 @@ -70,7 +70,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0006522136203477, L(p,q)-L0 = -0.0000000000000224 +t = 50.0000, H(p,q)-H0 = -6.5221362034773023e-04, L(p,q)-L0 = -2.2426505097428162e-14 Current time = 50 Steps = 100000 Step attempts = 100000 @@ -98,7 +98,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0003269003906117, L(p,q)-L0 = 0.0000000000000115 +t = 50.0000, H(p,q)-H0 = -3.2690039061167298e-04, L(p,q)-L0 = 1.1546319456101628e-14 Current time = 50 Steps = 200000 Step attempts = 200000 @@ -126,7 +126,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0001636371851703, L(p,q)-L0 = -0.0000000000000148 +t = 50.0000, H(p,q)-H0 = -1.6363718517031778e-04, L(p,q)-L0 = -1.4765966227514582e-14 Current time = 50 Steps = 400001 Step attempts = 400001 @@ -154,7 +154,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000818639245175, L(p,q)-L0 = -0.0000000000001292 +t = 50.0000, H(p,q)-H0 = -8.1863924517477926e-05, L(p,q)-L0 = -1.2922996006636822e-13 Current time = 50 Steps = 800001 Step attempts = 800001 @@ -182,7 +182,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000409431186841, L(p,q)-L0 = -0.0000000000000142 +t = 50.0000, H(p,q)-H0 = -4.0943118684078073e-05, L(p,q)-L0 = -1.4210854715202004e-14 Current time = 50 Steps = 1600001 Step attempts = 1600001 @@ -210,7 +210,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000204743261560, L(p,q)-L0 = 0.0000000000000230 +t = 50.0000, H(p,q)-H0 = -2.0474326156039169e-05, L(p,q)-L0 = 2.2981616609740740e-14 Current time = 50 Steps = 3200000 Step attempts = 3200000 @@ -238,7 +238,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000102378522768, L(p,q)-L0 = -0.0000000000001756 +t = 50.0000, H(p,q)-H0 = -1.0237852276828718e-05, L(p,q)-L0 = -1.7563728249569976e-13 Current time = 50 Steps = 6400000 Step attempts = 6400000 @@ -254,98 +254,4 @@ f1 RHS fn evals = 6400001 f2 RHS fn evals = 6400001 Order of accuracy wrt solution: expected = 1, max = 1.6317, avg = 1.0843, overall = 1.0418 -Order of accuracy wrt Hamiltonian: expe -================================================================= -==64418==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153af06c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 - #3 0x7fdf153af322 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153ecbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fdf15403657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153ecbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fdf15403657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153ecbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fdf15403657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153ecbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fdf15403657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf154039af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf154039af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf154036ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf154036ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fdf154038e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fdf153f196a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 8 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153af149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 - #3 0x7fdf153af322 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 8 byte(s) in 1 object(s) allocated from: - #0 0x7fdf15bed07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fdf153af1af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7fdf153a485c in ARKodeSymplecticEuler /home/gardner48/sundials/src/arkode/arkode_sprk.c:25 - #3 0x7fdf153af322 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:446 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fdf137a9554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1096 byte(s) leaked in 11 allocation(s). +Order of accuracy wrt Hamiltonian: expected = 1, max = 0.9999, avg = 0.9979, overall = 0.9983 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out index 49417b27b1..e94148fd44 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -11,7 +11,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 Current time = 50 Steps = 50001 Step attempts = 50001 @@ -42,7 +42,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000001032118342, L(p,q)-L0 = 0.0000000000000104 +t = 50.0000, H(p,q)-H0 = -1.0321183419037538e-07, L(p,q)-L0 = 1.0436096431476471e-14 Current time = 50 Steps = 50001 Step attempts = 50001 @@ -70,7 +70,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000258323680, L(p,q)-L0 = 0.0000000000000211 +t = 50.0000, H(p,q)-H0 = -2.5832368022449259e-08, L(p,q)-L0 = 2.1094237467877974e-14 Current time = 50 Steps = 100000 Step attempts = 100000 @@ -98,7 +98,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000064599039, L(p,q)-L0 = 0.0000000000000443 +t = 50.0000, H(p,q)-H0 = -6.4599039450996543e-09, L(p,q)-L0 = 4.4297898682543746e-14 Current time = 50 Steps = 200000 Step attempts = 200000 @@ -126,7 +126,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000016152086, L(p,q)-L0 = -0.0000000000000624 +t = 50.0000, H(p,q)-H0 = -1.6152086335097238e-09, L(p,q)-L0 = -6.2394533983933798e-14 Current time = 50 Steps = 400001 Step attempts = 400001 @@ -154,7 +154,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000004036786, L(p,q)-L0 = 0.0000000000000238 +t = 50.0000, H(p,q)-H0 = -4.0367864606594139e-10, L(p,q)-L0 = 2.3758772726978350e-14 Current time = 50 Steps = 800001 Step attempts = 800001 @@ -182,7 +182,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000001008020, L(p,q)-L0 = 0.0000000000000557 +t = 50.0000, H(p,q)-H0 = -1.0080203338702631e-10, L(p,q)-L0 = 5.5733195836182858e-14 Current time = 50 Steps = 1600001 Step attempts = 1600001 @@ -210,7 +210,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000252491, L(p,q)-L0 = 0.0000000000000155 +t = 50.0000, H(p,q)-H0 = -2.5249136115235160e-11, L(p,q)-L0 = 1.5543122344752192e-14 Current time = 50 Steps = 3200000 Step attempts = 3200000 @@ -238,7 +238,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000060401, L(p,q)-L0 = 0.0000000000002092 +t = 50.0000, H(p,q)-H0 = -6.0400573431707016e-12, L(p,q)-L0 = 2.0916601783937949e-13 Current time = 50 Steps = 6400000 Step attempts = 6400000 @@ -254,98 +254,4 @@ f1 RHS fn evals = 12800001 f2 RHS fn evals = 12800001 Order of accuracy wrt solution: expected = 2, max = 2.0097, avg = 1.8616, overall = 1.9108 -Order of accuracy wrt Hamiltonian: ex -================================================================= -==1966==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec22206c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 - #3 0x7fa2ec22235b in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec25fbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fa2ec276657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec25fbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fa2ec276657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec25fbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fa2ec276657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec25fbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fa2ec276657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec2769af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec2769af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec2766ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec2766ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fa2ec2768e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fa2ec26496a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 16 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec222149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 - #3 0x7fa2ec22235b in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 16 byte(s) in 1 object(s) allocated from: - #0 0x7fa2eca6007a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa2ec2221af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7fa2ec217a87 in ARKodeSymplecticLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:44 - #3 0x7fa2ec22235b in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:450 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fa2ea61c554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1112 byte(s) leaked in 11 allocation(s). +Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0636, avg = 2.0087, overall = 2.0051 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out index 8682e5b47b..fdeadbccd4 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out @@ -11,7 +11,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 Current time = 50 Steps = 50001 Step attempts = 50001 @@ -42,7 +42,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000007537055449, L(p,q)-L0 = -0.0000000000000051 +t = 50.0000, H(p,q)-H0 = 7.5370554486475783e-07, L(p,q)-L0 = -5.1070259132757201e-15 Current time = 50 Steps = 50001 Step attempts = 50001 @@ -70,7 +70,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000001883497172, L(p,q)-L0 = -0.0000000000000051 +t = 50.0000, H(p,q)-H0 = 1.8834971715619986e-07, L(p,q)-L0 = -5.1070259132757201e-15 Current time = 50 Steps = 100000 Step attempts = 100000 @@ -98,7 +98,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000470814610, L(p,q)-L0 = -0.0000000000000091 +t = 50.0000, H(p,q)-H0 = 4.7081460952114185e-08, L(p,q)-L0 = -9.1038288019262836e-15 Current time = 50 Steps = 200000 Step attempts = 200000 @@ -126,7 +126,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000117697354, L(p,q)-L0 = -0.0000000000000354 +t = 50.0000, H(p,q)-H0 = 1.1769735408506676e-08, L(p,q)-L0 = -3.5416114485542494e-14 Current time = 50 Steps = 400001 Step attempts = 400001 @@ -154,7 +154,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000029423715, L(p,q)-L0 = -0.0000000000000328 +t = 50.0000, H(p,q)-H0 = 2.9423714575926851e-09, L(p,q)-L0 = -3.2751579226442118e-14 Current time = 50 Steps = 800001 Step attempts = 800001 @@ -182,7 +182,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000007355567, L(p,q)-L0 = -0.0000000000000118 +t = 50.0000, H(p,q)-H0 = 7.3555672663871974e-10, L(p,q)-L0 = -1.1768364061026659e-14 Current time = 50 Steps = 1600001 Step attempts = 1600001 @@ -210,7 +210,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000001839353, L(p,q)-L0 = 0.0000000000000517 +t = 50.0000, H(p,q)-H0 = 1.8393531142635311e-10, L(p,q)-L0 = 5.1736392947532295e-14 Current time = 50 Steps = 3200000 Step attempts = 3200000 @@ -238,7 +238,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000000460576, L(p,q)-L0 = 0.0000000000000979 +t = 50.0000, H(p,q)-H0 = 4.6057602176574619e-11, L(p,q)-L0 = 9.7921670771938807e-14 Current time = 50 Steps = 6400000 Step attempts = 6400000 @@ -254,98 +254,4 @@ f1 RHS fn evals = 12800001 f2 RHS fn evals = 12800001 Order of accuracy wrt solution: expected = 2, max = 2.0069, avg = 1.8941, overall = 1.9322 -Order of accuracy wrt Hamiltonian: expec -================================================================= -==3464==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a6006c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 - #3 0x7fae48a60406 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a9dbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fae48ab4657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a9dbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fae48ab4657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a9dbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fae48ab4657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a9dbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fae48ab4657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48ab49af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48ab49af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48ab46ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48ab46ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fae48ab48e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fae48aa296a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 16 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a60149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 - #3 0x7fae48a60406 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 16 byte(s) in 1 object(s) allocated from: - #0 0x7fae4929e07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fae48a601af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7fae48a56d88 in ARKodeSymplecticMcLachlan2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:127 - #3 0x7fae48a60406 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:462 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fae46e5a554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1112 byte(s) leaked in 11 allocation(s). +Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0006, avg = 1.9998, overall = 1.9999 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out index 311da99ef3..ef38bc2855 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out @@ -1,95 +1,257 @@ -================================================================= -==4612==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16917abd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fb169191657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16913d06c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 - #3 0x7fb16913d43f in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16917abd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fb169191657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16917abf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fb169191657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16917abf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fb169191657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb1691919af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb1691919af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16913d1af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 - #3 0x7fb16913d43f in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb16913d149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7fb169134275 in ARKodeSymplecticMcLachlan3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:144 - #3 0x7fb16913d43f in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:466 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb1691916ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fb16997b07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fb1691916ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fb1691918e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fb16917f96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7fb167537554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1128 byte(s) leaked in 11 allocation(s). + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400010 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 8.9881034690120210e-04, L(p,q)-L0 = -4.4408920985006262e-16 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 1501 +f2 RHS fn evals = 1501 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 1.2012096161595487e-04, L(p,q)-L0 = 0.0000000000000000e+00 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 3001 +f2 RHS fn evals = 3001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 1.3406075334732037e-05, L(p,q)-L0 = -1.1102230246251565e-15 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 6004 +f2 RHS fn evals = 6004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 1.5483046356123964e-06, L(p,q)-L0 = -8.8817841970012523e-16 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 12001 +f2 RHS fn evals = 12001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 1.8529115486387582e-07, L(p,q)-L0 = -1.2878587085651816e-14 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 24001 +f2 RHS fn evals = 24001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 2.2641823971270014e-08, L(p,q)-L0 = 1.1102230246251565e-14 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 48004 +f2 RHS fn evals = 48004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 2.7976634342508078e-09, L(p,q)-L0 = -1.0880185641326534e-14 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 96004 +f2 RHS fn evals = 96004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 3.4767055900886135e-10, L(p,q)-L0 = -2.4424906541753444e-15 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 192001 +f2 RHS fn evals = 192001 + +Order of accuracy wrt solution: expected = 3, max = 3.9687, avg = 3.7860, overall = 3.8206 +Order of accuracy wrt Hamiltonian: expected = 3, max = 3.1635, avg = 3.0431, overall = 3.0566 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out index 2bc968dcfb..cc70a39b92 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out @@ -1,95 +1,257 @@ -================================================================= -==4658==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6bd06c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 - #3 0x7f06fe6bd478 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6fabd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7f06fe711657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6fabd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7f06fe711657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6fabf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7f06fe711657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6fabf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7f06fe711657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6bd1af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 - #3 0x7f06fe6bd478 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe7119af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe6bd149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7f06fe6b4c0f in ARKodeSymplecticMcLachlan4 /home/gardner48/sundials/src/arkode/arkode_sprk.c:168 - #3 0x7f06fe6bd478 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:470 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe7119af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe7116ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7f06feefb07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7f06fe7116ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7f06fe7118e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7f06fe6ff96a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7f06fcab7554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1144 byte(s) leaked in 11 allocation(s). + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400010 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -5.3723049984188975e-06, L(p,q)-L0 = 0.0000000000000000e+00 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 2001 +f2 RHS fn evals = 2001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -2.7764617138714698e-07, L(p,q)-L0 = -4.8849813083506888e-15 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 4001 +f2 RHS fn evals = 4001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -1.7250323836037751e-08, L(p,q)-L0 = 6.6613381477509392e-16 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 8005 +f2 RHS fn evals = 8005 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -1.0987308840526566e-09, L(p,q)-L0 = -4.5519144009631418e-15 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 16001 +f2 RHS fn evals = 16001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -6.9706684868720004e-11, L(p,q)-L0 = -7.5495165674510645e-15 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 32001 +f2 RHS fn evals = 32001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -4.4091397199963467e-12, L(p,q)-L0 = -1.2212453270876722e-14 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 64005 +f2 RHS fn evals = 64005 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -2.8488322811881517e-13, L(p,q)-L0 = 1.1879386363489175e-14 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 128005 +f2 RHS fn evals = 128005 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -4.5075054799781356e-14, L(p,q)-L0 = -3.5083047578154947e-14 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 256001 +f2 RHS fn evals = 256001 + +Order of accuracy wrt solution: expected = 4, max = 3.9974, avg = 3.5943, overall = 3.7564 +Order of accuracy wrt Hamiltonian: expected = 4, max = 4.2742, avg = 3.8327, overall = 3.8935 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out index ac937a5c03..0a49a39dcc 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out @@ -1,95 +1,257 @@ -================================================================= -==4694==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41168bbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fe4116a2657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41168bbd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fe4116a2657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41164e06c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 - #3 0x7fe41164e4ea in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41168bbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fe4116a2657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41168bbf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fe4116a2657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 48 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41164e1af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 - #3 0x7fe41164e4ea in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 48 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe41164e149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7fe411646134 in ARKodeSymplecticMcLachlan5 /home/gardner48/sundials/src/arkode/arkode_sprk.c:184 - #3 0x7fe41164e4ea in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:478 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe4116a29af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe4116a29af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe4116a26ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fe411e8c07a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fe4116a26ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fe4116a28e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fe41169096a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7fe40fa48554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1176 byte(s) leaked in 11 allocation(s). + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400010 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 7.5734793938408984e-06, L(p,q)-L0 = 1.1102230246251565e-15 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 3001 +f2 RHS fn evals = 3001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 1.3166233214789713e-07, L(p,q)-L0 = -1.1102230246251565e-15 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 6001 +f2 RHS fn evals = 6001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 2.2657438147888342e-09, L(p,q)-L0 = -8.4376949871511897e-15 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 12007 +f2 RHS fn evals = 12007 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 4.1062042654971265e-11, L(p,q)-L0 = 1.4876988529977098e-14 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 24001 +f2 RHS fn evals = 24001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 8.0246920219906315e-13, L(p,q)-L0 = -3.1086244689504383e-15 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 48001 +f2 RHS fn evals = 48001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 2.6867397195928788e-14, L(p,q)-L0 = 4.2188474935755949e-15 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 96007 +f2 RHS fn evals = 96007 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 3.9968028886505635e-15, L(p,q)-L0 = 2.9864999362416711e-14 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 192007 +f2 RHS fn evals = 192007 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -3.2196467714129540e-14, L(p,q)-L0 = 2.5535129566378600e-15 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 384001 +f2 RHS fn evals = 384001 + +Order of accuracy wrt solution: expected = 5, max = 5.9898, avg = 3.4143, overall = 3.7927 +Order of accuracy wrt Hamiltonian: expected = 5, max = 5.8607, avg = 3.9728, overall = 4.4560 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out index 66bb32e956..7c87a4670d 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -11,7 +11,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = -0.0000000000002238, L(p,q)-L0 = -0.0000000000000500 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 Current time = 50 Steps = 50001 Step attempts = 50001 @@ -42,7 +42,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000032112992008, L(p,q)-L0 = -0.0000000000000158 +t = 50.0000, H(p,q)-H0 = 3.2112992007782282e-06, L(p,q)-L0 = -1.5765166949677223e-14 Current time = 50 Steps = 50001 Step attempts = 50001 @@ -70,7 +70,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000008021580005, L(p,q)-L0 = -0.0000000000000071 +t = 50.0000, H(p,q)-H0 = 8.0215800046801178e-07, L(p,q)-L0 = -7.1054273576010019e-15 Current time = 50 Steps = 100000 Step attempts = 100000 @@ -98,7 +98,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000002004977220, L(p,q)-L0 = -0.0000000000000198 +t = 50.0000, H(p,q)-H0 = 2.0049772198049709e-07, L(p,q)-L0 = -1.9761969838327786e-14 Current time = 50 Steps = 200000 Step attempts = 200000 @@ -126,7 +126,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000501218240, L(p,q)-L0 = -0.0000000000000068 +t = 50.0000, H(p,q)-H0 = 5.0121824024529360e-08, L(p,q)-L0 = -6.7723604502134549e-15 Current time = 50 Steps = 400001 Step attempts = 400001 @@ -154,7 +154,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000125302173, L(p,q)-L0 = -0.0000000000000387 +t = 50.0000, H(p,q)-H0 = 1.2530217308182046e-08, L(p,q)-L0 = -3.8746783559417963e-14 Current time = 50 Steps = 800001 Step attempts = 800001 @@ -182,7 +182,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000031327705, L(p,q)-L0 = 0.0000000000001050 +t = 50.0000, H(p,q)-H0 = 3.1327704874684059e-09, L(p,q)-L0 = 1.0502709812953981e-13 Current time = 50 Steps = 1600001 Step attempts = 1600001 @@ -210,7 +210,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000007829746, L(p,q)-L0 = -0.0000000000000927 +t = 50.0000, H(p,q)-H0 = 7.8297457406506510e-10, L(p,q)-L0 = -9.2703622556200571e-14 Current time = 50 Steps = 3200000 Step attempts = 3200000 @@ -238,7 +238,7 @@ Problem Arguments: nout: 1 t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 -t = 50.0000, H(p,q)-H0 = 0.0000000001959848, L(p,q)-L0 = 0.0000000000000366 +t = 50.0000, H(p,q)-H0 = 1.9598478395721486e-10, L(p,q)-L0 = 3.6637359812630166e-14 Current time = 50 Steps = 6400000 Step attempts = 6400000 @@ -254,98 +254,4 @@ f1 RHS fn evals = 12800001 f2 RHS fn evals = 12800001 Order of accuracy wrt solution: expected = 2, max = 2.0019, avg = 1.9630, overall = 1.9766 -Order of accuracy wrt Hamiltonian: expec -================================================================= -==2728==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272b506c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 - #3 0x7ff4272b5394 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272f2bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7ff427309657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272f2bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7ff427309657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272f2bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7ff427309657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272f2bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7ff427309657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4273099af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4273099af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4273096ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4273096ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7ff4273098e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7ff4272f796a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 16 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272b5149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 - #3 0x7ff4272b5394 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 16 byte(s) in 1 object(s) allocated from: - #0 0x7ff427af307a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7ff4272b51af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7ff4272aadac in ARKodeSymplecticPseudoLeapfrog2 /home/gardner48/sundials/src/arkode/arkode_sprk.c:56 - #3 0x7ff4272b5394 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:454 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7ff4256af554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1112 byte(s) leaked in 11 allocation(s). +Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0012, avg = 2.0000, overall = 2.0001 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out index c0bde25829..f666db3112 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out @@ -1,95 +1,257 @@ -================================================================= -==4510==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beb30bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fa9beb47657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beaf306c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 - #3 0x7fa9beaf33cd in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beb30bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fa9beb47657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beb30bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fa9beb47657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beb30bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fa9beb47657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beb479af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beb479af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beaf31af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 - #3 0x7fa9beaf33cd in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beaf3149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7fa9beae995f in ARKodeSymplecticRuth3 /home/gardner48/sundials/src/arkode/arkode_sprk.c:106 - #3 0x7fa9beaf33cd in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:458 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beb476ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fa9bf33107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fa9beb476ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fa9beb478e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fa9beb3596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7fa9bceed554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1128 byte(s) leaked in 11 allocation(s). + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400010 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 8.9150805802473698e-04, L(p,q)-L0 = 2.5535129566378600e-15 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 1501 +f2 RHS fn evals = 1501 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 4.0241516751526873e-05, L(p,q)-L0 = -2.2204460492503131e-16 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 3001 +f2 RHS fn evals = 3001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 1.1101319374873242e-06, L(p,q)-L0 = 0.0000000000000000e+00 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 6004 +f2 RHS fn evals = 6004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -1.1448823866722080e-07, L(p,q)-L0 = -3.3306690738754696e-15 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 12001 +f2 RHS fn evals = 12001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -3.0290784103215174e-08, L(p,q)-L0 = -3.5527136788005009e-15 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 24001 +f2 RHS fn evals = 24001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -4.7862143137678004e-09, L(p,q)-L0 = -1.0436096431476471e-14 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 48004 +f2 RHS fn evals = 48004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -6.6073679860778611e-10, L(p,q)-L0 = -4.4408920985006262e-16 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 96004 +f2 RHS fn evals = 96004 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -8.6430862467068437e-11, L(p,q)-L0 = 4.5519144009631418e-14 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 192001 +f2 RHS fn evals = 192001 + +Order of accuracy wrt solution: expected = 3, max = 4.0232, avg = 3.9269, overall = 3.9563 +Order of accuracy wrt Hamiltonian: expected = 3, max = 5.1799, avg = 3.3283, overall = 3.1911 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out index 1d856af12c..4ba8e975f8 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out @@ -1,95 +1,257 @@ -================================================================= -==4746==ERROR: LeakSanitizer: detected memory leaks - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448b0bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fbc448c7657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448b0bd2 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:48 - #2 0x7fbc448c7657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Direct leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc4487306c in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:411 - #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 - #3 0x7fbc44873523 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448b0bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fbc448c7657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #6 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 448 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448b0bf9 in N_VNewEmpty /home/gardner48/sundials/src/sundials/sundials_nvector.c:53 - #2 0x7fbc448c7657 in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:295 - #3 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #4 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #5 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #6 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 64 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448731af in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:416 - #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 - #3 0x7fbc44873523 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 64 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc44873149 in ARKodeSPRKTable_Alloc /home/gardner48/sundials/src/arkode/arkode_sprk.c:415 - #2 0x7fbc4486b857 in ARKodeSymplecticYoshida6 /home/gardner48/sundials/src/arkode/arkode_sprk.c:213 - #3 0x7fbc44873523 in ARKodeSPRKTable_LoadByName /home/gardner48/sundials/src/arkode/arkode_sprk.c:482 - #4 0x40232f in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:163 - #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448c79af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #4 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 32 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448c79af in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:334 - #2 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #3 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #4 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448c76ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x402398 in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:164 - #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7fbc450b107a in __interceptor_malloc /tmp/gardner48/spack-stage/spack-stage-gcc-5.5.0-khqnsyjkc36jajm2637pm3dftr2egjwk/spack-src/libsanitizer/asan/asan_malloc_linux.cc:62 - #1 0x7fbc448c76ab in N_VCloneEmpty_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:303 - #2 0x7fbc448c78e1 in N_VClone_Serial /home/gardner48/sundials/src/nvector/serial/nvector_serial.c:324 - #3 0x7fbc448b596a in N_VClone /home/gardner48/sundials/src/sundials/sundials_nvector.c:284 - #4 0x4023ae in main /home/gardner48/sundials/examples/arkode/C_serial/ark_kepler.c:165 - #5 0x7fbc42c6d554 in __libc_start_main (/lib64/libc.so.6+0x22554) - -SUMMARY: AddressSanitizer: 1208 byte(s) leaked in 11 allocation(s). + Begin Kepler Problem + +Problem Arguments: + stepper: 1 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.001 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -2.2382096176443156e-13, L(p,q)-L0 = -4.9960036108132044e-14 +Current time = 50 +Steps = 50001 +Step attempts = 50001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 2.582822844487962e-11 +Current step size = 2.582822844487962e-11 +Explicit RHS fn evals = 400010 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.1 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 1.2681182276619296e-04, L(p,q)-L0 = -3.8857805861880479e-15 +Current time = 50 +Steps = 500 +Step attempts = 500 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0999999999995608 +Current step size = 0.0999999999995608 +f1 RHS fn evals = 4001 +f2 RHS fn evals = 4001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.05 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 2.0266123599288477e-06, L(p,q)-L0 = -2.4424906541753444e-15 +Current time = 50 +Steps = 1000 +Step attempts = 1000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.05 +Last step size = 0.05 +Current step size = 0.05 +f1 RHS fn evals = 8001 +f2 RHS fn evals = 8001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.025 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 3.1924773491454062e-08, L(p,q)-L0 = 1.4321877017664519e-14 +Current time = 50 +Steps = 2001 +Step attempts = 2001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.025 +Last step size = 1.769251412042648e-12 +Current step size = 1.769251412042648e-12 +f1 RHS fn evals = 16009 +f2 RHS fn evals = 16009 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 4.9982995520281293e-10, L(p,q)-L0 = 1.5543122344752192e-15 +Current time = 50 +Steps = 4000 +Step attempts = 4000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0125 +Last step size = 0.01249999999719619 +Current step size = 0.01249999999719619 +f1 RHS fn evals = 32001 +f2 RHS fn evals = 32001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 7.8130835134970766e-12, L(p,q)-L0 = -7.8825834748386114e-15 +Current time = 50 +Steps = 8000 +Step attempts = 8000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00625 +Last step size = 0.006249999992917305 +Current step size = 0.006249999992917305 +f1 RHS fn evals = 64001 +f2 RHS fn evals = 64001 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.003125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = 1.0147438445073931e-13, L(p,q)-L0 = 3.2196467714129540e-15 +Current time = 50 +Steps = 16001 +Step attempts = 16001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.003125 +Last step size = 1.124078607972478e-11 +Current step size = 1.124078607972478e-11 +f1 RHS fn evals = 128009 +f2 RHS fn evals = 128009 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.0015625 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -6.5281113847959205e-14, L(p,q)-L0 = -4.8294701571194310e-14 +Current time = 50 +Steps = 32001 +Step attempts = 32001 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.0015625 +Last step size = 2.835776058418557e-11 +Current step size = 2.835776058418557e-11 +f1 RHS fn evals = 256009 +f2 RHS fn evals = 256009 + + + Begin Kepler Problem + +Problem Arguments: + stepper: 0 + step mode: 0 + use tstop: 1 + use compensated sums: 0 + dt: 0.00078125 + Tf: 50 + nout: 1 + +t = 0.0000, H(p,q) = -0.5000000000000000, L(p,q) = 0.8000000000000000 +t = 50.0000, H(p,q)-H0 = -2.0872192862952943e-14, L(p,q)-L0 = -2.9753977059954195e-14 +Current time = 50 +Steps = 64000 +Step attempts = 64000 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.00078125 +Last step size = 0.0007812499550681189 +Current step size = 0.0007812499550681189 +f1 RHS fn evals = 512001 +f2 RHS fn evals = 512001 + +Order of accuracy wrt solution: expected = 6, max = 5.9959, avg = 3.9792, overall = 4.5039 +Order of accuracy wrt Hamiltonian: expected = 6, max = 6.2667, avg = 4.6429, overall = 4.9135 From d4a380076aee9069d59c6416f72084838fb28d0c Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:36:45 -0700 Subject: [PATCH 155/177] add into text for SPRK table type --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 75 ++++++++++++++------- 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index ba572a98ec..aab5e50766 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -10,12 +10,62 @@ SUNDIALS Copyright End ---------------------------------------------------------------- -.. _SPRKStorage: +.. _ARKodeSPRKTable: =========================== SPRK Method Table Structure =========================== +To store the pair of Butcher tables defining a SPRK method of order :math:`q` +ARKODE provides the :c:type:`ARKodeSPRKTable` type and several related utility +routines. We use the following notation + +.. math:: + + B \; \equiv \; + \begin{array}{r|c} + c & A \\ + \hline + & b \\ + \end{array} + \; = \; + \begin{array}{c|cccc} + c_1 & 0 & \cdots & 0 & 0 \\ + c_2 & a_1 & 0 & \cdots & \vdots \\ + \vdots & \vdots & \ddots & \ddots & \vdots \\ + c_s & a_1 & \cdots & a_{s-1} & 0 \\ + \hline + & a_1 & \cdots & a_{s-1} & a_s + \end{array} + \qquad + \qquad + \hat{B} \; \equiv \; + \begin{array}{r|c} + \hat{c} & \hat{A} \\ + \hline + & \hat{b} \\ + \end{array} + \; = \; + \begin{array}{c|cccc} + \hat{c}_1 & \hat{a}_1 & \cdots & 0 & 0 \\ + \hat{c}_2 & \hat{a}_1 & \hat{a}_2 & \cdots & \vdots \\ + \vdots & \vdots & \ddots & \ddots & \vdots \\ + \hat{c}_s & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} \\ + \hline + & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} + \end{array} + +where :math:`B` and :math:`\hat{B}` contain the coefficients for the explicit +and diagonally implicit tables, respectively. We use a compact storage of these +coefficients in terms of two arrays, one for :math:`a` values and one for +:math:`\hat{a}` values. The abscissae (only relevant for non-autonomous +problems) are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and +:math:`\hat{c}_j = \sum_{i=1}^j \hat{a}_i`, respectively +:cite:p:`Jay:21,Diele:11`. The :c:type:`ARKodeSPRKTable` type is a pointer to +the :c:type:`ARKodeSPRKTableMem` structure: + +.. c:type:: ARKodeSPRKTableMem* ARKodeSPRKTable + .. c:type:: ARKodeSPRKTableMem Structure representing the SPRK method that holds the method coefficients. @@ -33,34 +83,11 @@ SPRK Method Table Structure Array of coefficients that generate the explicit Butcher table. ``a[i]`` is the coefficient appearing in column i+1. - .. math:: - \begin{array}{c|cccc} - c_1 & 0 & \cdots & 0 & 0 \\ - c_2 & a_1 & 0 & \cdots & \vdots \\ - \vdots & \vdots & \ddots & \ddots & \vdots \\ - c_s & a_1 & \cdots & a_{s-1} & 0 \\ - \hline - & a_1 & \cdots & a_{s-1} & a_s - \end{array}. - .. c:member:: sunrealtype* ahat Array of coefficients that generate the diagonally-implicit Butcher table. ``ahat[i]`` is the coefficient appearing in column i. - .. math:: - \begin{array}{c|cccc} - \hat{c}_1 & \hat{a}_1 & \cdots & 0 & 0 \\ - \hat{c}_2 & \hat{a}_1 & \hat{a}_2 & \cdots & \vdots \\ - \vdots & \vdots & \ddots & \ddots & \vdots \\ - \hat{c}_s & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} \\ - \hline - & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} - \end{array}. - - -.. c:type:: ARKodeSPRKTableMem* ARKodeSPRKTable - ARKodeSPRKTable functions --------------------------- From d62ce6b403023d81440d945ea821ac50e81d76b3 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:36:59 -0700 Subject: [PATCH 156/177] storage to table --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index aab5e50766..2118da2064 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -98,19 +98,19 @@ ARKodeSPRKTable functions +----------------------------------------------+------------------------------------------------------------+ | **Function name** | **Description** | +==============================================+============================================================+ - | :c:func:`ARKodeSPRKTable_Alloc()` | Allocate an empty storage structure | + | :c:func:`ARKodeSPRKTable_Alloc()` | Allocate an empty table structure | +----------------------------------------------+------------------------------------------------------------+ | :c:func:`ARKodeSPRKTable_Load()` | Load SPRK method using an identifier | +----------------------------------------------+------------------------------------------------------------+ | :c:func:`ARKodeSPRKTable_LoadByName()` | Load SPRK method using a string version of the identifier | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Create()` | Create a new storage structure | + | :c:func:`ARKodeSPRKTable_Create()` | Create a new table structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Copy()` | Create a copy of a storage structure | + | :c:func:`ARKodeSPRKTable_Copy()` | Create a copy of a table structure | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Space()` | Get the storage structure real and integer workspace size | + | :c:func:`ARKodeSPRKTable_Space()` | Get the table structure real and integer workspace size | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Free()` | Deallocate a storage structure | + | :c:func:`ARKodeSPRKTable_Free()` | Deallocate a table structure | +----------------------------------------------+------------------------------------------------------------+ From febcafb6cb3c0e0661d4d5fda17f0acbb50e8dec Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:37:22 -0700 Subject: [PATCH 157/177] fix signature types in doc --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index 2118da2064..6beff46bc1 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -174,10 +174,10 @@ ARKodeSPRKTable functions :param sprk_table: The :c:type:`ARKodeSPRKTable` structure to free. -.. c:function:: int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_storage, ARKodeSPRKTable* a_ptr, ARKodeSPRKTable* b_ptr) +.. c:function:: int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_table, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) Convert the :c:type:`ARKodeSPRKTable` structure to the Butcher table representation. - :param sprk_storage: The :c:type:`ARKodeSPRKTable` structure. + :param sprk_table: The :c:type:`ARKodeSPRKTable` structure. :param a_ptr: Pointer to store the explicit Butcher table. :param b_ptr: Pointer to store the diagonally-implicit Butcher table. From 67fd7b95f5016a8a0728bb9e1f8545db77fd1a98 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:37:47 -0700 Subject: [PATCH 158/177] add into text for method list --- doc/arkode/guide/source/Butcher.rst | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 99722814c1..73f4028e04 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -19,7 +19,7 @@ Appendix: Butcher tables ========================= Here we catalog the full set of Butcher tables included in ARKODE. We group -these into four categories: *explicit*, *implicit*, *additive* and +these into four categories: *explicit*, *implicit*, *additive* and *symplectic partitioned*. However, since the methods that comprise an additive Runge--Kutta method are themselves explicit and implicit, their component Butcher tables are listed @@ -62,14 +62,14 @@ where here * ``Q`` is the global order of accuracy for the method. For methods without an embedding (e.g., fixed-step methods) ``P`` is omitted so -that methods follow the naming convention ``NAME-S-Q``. +that methods follow the naming convention ``NAME-S-Q``. For SPRK methods, the naming convention is ``SPRK-NAME-S-Q``. In the code, unique integer IDs are defined inside ``arkode_butcher_erk.h`` and ``arkode_butcher_dirk.h`` for each method, which may be used by calling routines to specify the desired method. SPRK methods are defined inside ``arkode_sprk.h``. -These names are specified in ``fixed width font`` at the start of each method's +These names are specified in ``fixed width font`` at the start of each method's section below. Additionally, for each method we provide a plot of the linear @@ -143,7 +143,7 @@ Explicit Butcher tables In the category of explicit Runge--Kutta methods, ARKODE includes methods that have orders 2 through 6, with embeddings that are of orders 1 through 5. Each of ARKODE's explicit Butcher tables are -specified via a unique ID: +specified via a unique ID and name: .. c:enum:: ARKODE_ERKTableID @@ -813,7 +813,7 @@ includes methods that have orders 2 through 5, with embeddings that are of orders 1 through 4. Each of ARKODE's diagonally-implicit Butcher tables are -specified via a unique ID: +specified via a unique ID and name: .. c:enum:: ARKODE_DIRKTableID @@ -1712,6 +1712,11 @@ Butcher table pairs are as follows: Symplectic Partitioned Butcher tables ------------------------------------- +In the category of symplectic partitioned Runge-Kutta (SPRK) methods, ARKODE +includes methods that have orders :math:`q = \{1,2,3,4,5,6,8,10\}`. Each of +the ARKODE SPRK tables are specified via a unique ID and name. + + ARKODE_SPRK_EULER_1_1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1739,7 +1744,7 @@ ARKODE_SPRK_PSEUDO_LEAPFROG_2_2 Accessible via the constant (or string) ``ARKODE_SPRK_PSEUDO_LEAPFROG_2_2`` to :c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`. -This is the classic Pseudo Leapfrog/Verlet method. +This is the classic Pseudo Leapfrog/Verlet method. ARKODE_SPRK_MCLACHLAN_2_2 From 3aec87e6245e4629b7cdebf69aae73d4b89b839f Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:38:46 -0700 Subject: [PATCH 159/177] move table storage details to table strucutre section --- doc/arkode/guide/source/Mathematics.rst | 44 +++++++++++-------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index f6e4002bfb..d0b34a0394 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -468,11 +468,11 @@ SPRKStep -- Symplectic Partitioned Runge--Kutta methods The SPRKStep time-stepping module in ARKODE is designed for IVPs of the form .. math:: - \dot{p} = f_1(t, q) = \frac{\partial V(t, q)}{\partial q}, \quad - \dot{q} = f_2(t, p) = \frac{\partial T(t, p)}{\partial p}, + \dot{p} = f_1(t, q) = \frac{\partial V(t, q)}{\partial q}, \quad + \dot{q} = f_2(t, p) = \frac{\partial T(t, p)}{\partial p}, \qquad p(t_0) = p_0,\quad q(t_0) = q_0, :label: ARKODE_IVP_Hamiltonian - + where the system Hamiltonian .. math:: @@ -486,19 +486,19 @@ obtainable from the Hamiltonian :cite:p:`Struckmeier:02`. In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form .. math:: - \dot{y} = + \dot{y} = \begin{bmatrix} f_1(t, q) \\ f_2(t, p) - \end{bmatrix}, \qquad - y(t_0) = + \end{bmatrix}, \qquad + y(t_0) = \begin{bmatrix} p_0\\ q_0 \end{bmatrix}. In practice, the ordering of the variables does not matter and is determined by the user. -SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair +SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair of Butcher tableau, .. math:: @@ -508,7 +508,7 @@ of Butcher tableau, \vdots & \vdots & \ddots & \ddots & \vdots \\ c_s & a_1 & \cdots & a_{s-1} & 0 \\ \hline - & a_1 & \cdots & a_{s-1} & a_s + & a_1 & \cdots & a_{s-1} & a_s \end{array} \qquad \qquad \begin{array}{c|cccc} @@ -520,16 +520,12 @@ of Butcher tableau, & \hat{a}_1 & \hat{a}_2 & \cdots & \hat{a}_{s} \end{array}. -We use a compact storage of these coefficients in terms of two arrays, one for -*a* and one for *b*. The abscissae (only relevant for non-autonomous problems) -are computed dynamically as :math:`c_j = \sum_{i=1}^j a_i` and -:math:`\hat{c}_j = \sum_{i=1}^j \hat{a}_i`, respectively -:cite:p:`Jay:21,Diele:11`. These methods approximately conserve a nearby -Hamiltonian for exponentially long times :cite:p:`HaWa:06`. SPRKStep makes the -assumption that the Hamiltonian is separable, in which case the schemes are -explicit. SPRKStep provides methods with order of accuracy and conservation -equal to :math:`q = \{1,2,3,4,5,6,8,10\}`. The tables for these methods, and the -default methods used, are given in the section :numref:`SPRKStorage`. +These methods approximately conserve a nearby Hamiltonian for exponentially long +times :cite:p:`HaWa:06`. SPRKStep makes the assumption that the Hamiltonian is +separable, in which case the schemes are explicit. SPRKStep provides methods +with order of accuracy and conservation equal to +:math:`q = \{1,2,3,4,5,6,8,10\}`. The references for these these methods and +the default methods used are given in the section :numref:`Butcher.sprk`. In the default case, the algorithm for a single time-step is as follows (for autonomous Hamiltonian systems the times provided to :math:`f1` and :math:`f2` @@ -564,12 +560,12 @@ form is used to compute a time step: #. Using compensated summation, set :math:`p_{n+1} = p_n + \Delta p_{n+1}, q_{n+1} = q_n + \Delta Q_{s+1}` -Since temporal error based adaptive time-stepping is known to ruin the -conservation property :cite:p:`HaWa:06`, SPRKStep employs a fixed time-step size. +Since temporal error based adaptive time-stepping is known to ruin the +conservation property :cite:p:`HaWa:06`, SPRKStep employs a fixed time-step size. .. However, it is possible for a user to provide a .. problem-specific adaptivity controller such as the one described in :cite:p:`HaSo:05`. -.. The `ark_kepler.c` example demonstrates an implementation of such controller. +.. The `ark_kepler.c` example demonstrates an implementation of such controller. .. _ARKODE.Mathematics.MRIStep: @@ -1131,9 +1127,9 @@ information. In this mode, all internal time step adaptivity is disabled: .. note:: Since temporal error based adaptive time-stepping is known to ruin the conservation property of SPRK methods, SPRKStep employs a fixed time-step - size by default. - -.. note:: + size by default. + +.. note:: Fixed-step mode is currently required for the slow time scale in the MRIStep module. From e34acf0a3065fd398a7af81b587a6d9b842455b0 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:43:36 -0700 Subject: [PATCH 160/177] remove structure, refer to type --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 48 +++++++++++---------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index 6beff46bc1..fde2807b96 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -98,86 +98,88 @@ ARKodeSPRKTable functions +----------------------------------------------+------------------------------------------------------------+ | **Function name** | **Description** | +==============================================+============================================================+ - | :c:func:`ARKodeSPRKTable_Alloc()` | Allocate an empty table structure | + | :c:func:`ARKodeSPRKTable_Alloc()` | Allocate an empty table | +----------------------------------------------+------------------------------------------------------------+ | :c:func:`ARKodeSPRKTable_Load()` | Load SPRK method using an identifier | +----------------------------------------------+------------------------------------------------------------+ | :c:func:`ARKodeSPRKTable_LoadByName()` | Load SPRK method using a string version of the identifier | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Create()` | Create a new table structure | + | :c:func:`ARKodeSPRKTable_Create()` | Create a new table | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Copy()` | Create a copy of a table structure | + | :c:func:`ARKodeSPRKTable_Copy()` | Create a copy of a table | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Space()` | Get the table structure real and integer workspace size | + | :c:func:`ARKodeSPRKTable_Space()` | Get the table real and integer workspace size | +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeSPRKTable_Free()` | Deallocate a table structure | + | :c:func:`ARKodeSPRKTable_Free()` | Deallocate a table | +----------------------------------------------+------------------------------------------------------------+ .. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Create(int stages, int q, const sunrealtype* a, const sunrealtype* ahat) - Creates and allocates :c:type:`ARKodeSPRKTable` structure with the specified number of stages and the coefficients provided. + Creates and allocates an :c:type:`ARKodeSPRKTable` with the specified number + of stages and the coefficients provided. :param stages: The number of stages. :param q: The order of the method. :param a: An array of the coefficients for the ``a`` table. :param ahat: An array of the coefficients for the ``ahat`` table. - :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. + :return: :c:type:`ARKodeSPRKTable` for the loaded method. .. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) - Allocate memory for an :c:type:`ARKodeSPRKTable` structure with the specified number of stages. + Allocate memory for an :c:type:`ARKodeSPRKTable` with the specified + number of stages. :param stages: The number of stages. - :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. + :return: :c:type:`ARKodeSPRKTable` for the loaded method. .. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Load(ARKODE_SPRKMethodID id) - Load the :c:type:`ARKodeSPRKTable` structure for the specified method ID. + Load the :c:type:`ARKodeSPRKTable` for the specified method ID. :param id: The ID of the SPRK method, see :ref:`Butcher.sprk`. - :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. + :return: :c:type:`ARKodeSPRKTable` for the loaded method. .. c:function:: ARKodeSPRKTable ARKodeSPRKTable_LoadByName(const char* method) - Load the :c:type:`ARKodeSPRKTable` structure for the specified method name. + Load the :c:type:`ARKodeSPRKTable` for the specified method name. :param method: The name of the SPRK method, see :ref:`Butcher.sprk`. - :return: :c:type:`ARKodeSPRKTable` structure for the loaded method. + :return: :c:type:`ARKodeSPRKTable` for the loaded method. .. c:function:: ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable sprk_table) - Create a copy of the :c:type:`ARKodeSPRKTable` structure. + Create a copy of the :c:type:`ARKodeSPRKTable`. - :param sprk_table: The :c:type:`ARKodeSPRKTable` structure to copy. - :return: Pointer to the copied :c:type:`ARKodeSPRKTable` structure. + :param sprk_table: The :c:type:`ARKodeSPRKTable` to copy. + :return: Pointer to the copied :c:type:`ARKodeSPRKTable`. .. c:function:: void ARKodeSPRKTable_Write(ARKodeSPRKTable sprk_table, FILE* outfile) Write the ARKodeSPRKTable out to the file. - :param sprk_table: The :c:type:`ARKodeSPRKTable` structure to write. + :param sprk_table: The :c:type:`ARKodeSPRKTable` to write. :param outfile: The FILE that will be written to. :return: void .. c:function:: void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_table, sunindextype* liw, sunindextype* lrw) - Get the workspace sizes required for the :c:type:`ARKodeSPRKTable` structure. + Get the workspace sizes required for the :c:type:`ARKodeSPRKTable`. - :param sprk_table: The :c:type:`ARKodeSPRKTable` structure. + :param sprk_table: The :c:type:`ARKodeSPRKTable`. :param liw: Pointer to store the integer workspace size. :param lrw: Pointer to store the real workspace size. .. c:function:: void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_table) - Free the memory allocated for the :c:type:`ARKodeSPRKTable` structure. + Free the memory allocated for the :c:type:`ARKodeSPRKTable`. - :param sprk_table: The :c:type:`ARKodeSPRKTable` structure to free. + :param sprk_table: The :c:type:`ARKodeSPRKTable` to free. .. c:function:: int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_table, ARKodeButcherTable* a_ptr, ARKodeButcherTable* b_ptr) - Convert the :c:type:`ARKodeSPRKTable` structure to the Butcher table representation. + Convert the :c:type:`ARKodeSPRKTable` to the Butcher table representation. - :param sprk_table: The :c:type:`ARKodeSPRKTable` structure. + :param sprk_table: The :c:type:`ARKodeSPRKTable`. :param a_ptr: Pointer to store the explicit Butcher table. :param b_ptr: Pointer to store the diagonally-implicit Butcher table. From 8efa79379817ece1fccb29f27a97f00156237fc2 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:44:56 -0700 Subject: [PATCH 161/177] remove return in docs for void function --- doc/arkode/guide/source/ARKodeSPRKTable.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/arkode/guide/source/ARKodeSPRKTable.rst b/doc/arkode/guide/source/ARKodeSPRKTable.rst index fde2807b96..90200e4b52 100644 --- a/doc/arkode/guide/source/ARKodeSPRKTable.rst +++ b/doc/arkode/guide/source/ARKodeSPRKTable.rst @@ -160,7 +160,6 @@ ARKodeSPRKTable functions :param sprk_table: The :c:type:`ARKodeSPRKTable` to write. :param outfile: The FILE that will be written to. - :return: void .. c:function:: void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_table, sunindextype* liw, sunindextype* lrw) From 858cd004f79dbc8bc6791aedbc6ae893859d1fe8 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:51:26 -0700 Subject: [PATCH 162/177] minor updates to math section --- doc/arkode/guide/source/Mathematics.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index d0b34a0394..ec66f9838b 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -499,7 +499,7 @@ In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the In practice, the ordering of the variables does not matter and is determined by the user. SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair -of Butcher tableau, +of explicit and diagonally implicit Butcher tableaux, .. math:: \begin{array}{c|cccc} @@ -522,8 +522,8 @@ of Butcher tableau, These methods approximately conserve a nearby Hamiltonian for exponentially long times :cite:p:`HaWa:06`. SPRKStep makes the assumption that the Hamiltonian is -separable, in which case the schemes are explicit. SPRKStep provides methods -with order of accuracy and conservation equal to +separable, in which case the resulting method is explicit. SPRKStep provides +schemes with order of accuracy and conservation equal to :math:`q = \{1,2,3,4,5,6,8,10\}`. The references for these these methods and the default methods used are given in the section :numref:`Butcher.sprk`. From 6713fde17eb3944b956651dc6ac938920f61c88f Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:56:32 -0700 Subject: [PATCH 163/177] add copyright block --- .../guide/source/Usage/SPRKStep_c_interface/Skeleton.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst index 8ee75ba6b0..fdc5f03545 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/Skeleton.rst @@ -1,3 +1,12 @@ +.. ---------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2002-2023, Lawrence Livermore National Security + and Southern Methodist University. + All rights reserved. + See the top-level LICENSE and NOTICE files for details. + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ---------------------------------------------------------------- .. _ARKODE.Usage.SPRKStep.Skeleton: From 3dacbef054b14b0e08525abbc51b8dc2bad26de8 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 18:59:05 -0700 Subject: [PATCH 164/177] structure and storage to table --- .../SPRKStep_c_interface/User_callable.rst | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index f6384e14f6..d4e6bbb5db 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -336,9 +336,9 @@ Optional inputs for SPRKStep not be changed without first calling :c:func:`SPRKStepReInit()`. If this routine is not called, the Lagrange interpolation module will be used. - - Our testing has shown that Lagrange interpolation typically performs well in - this regard, while Hermite interpolation does not. + + Our testing has shown that Lagrange interpolation typically performs well in + this regard, while Hermite interpolation does not. @@ -551,12 +551,12 @@ Optional inputs for IVP method selection :c:func:`SPRKStepSetMethod` or :c:func:`SPRKStepMethodByName`. -.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKTable sprk_storage) +.. c:function:: int SPRKStepSetMethod(void* arkode_mem, ARKodeSPRKTable sprk_table) Specifies the SPRK method. :param arkode_mem: pointer to the SPRKStep memory block. - :param sprk_storage: the SPRK method coefficient structure. + :param sprk_table: the SPRK method table. :retval ARK_SUCCESS: if successful :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` @@ -565,7 +565,7 @@ Optional inputs for IVP method selection .. note:: No error checking is performed on the coefficients contained in the - structure to ensure its declared order of accuracy. + table to ensure its declared order of accuracy. .. c:function:: int SPRKStepSetMethodName(void* arkode_mem, const char* method) @@ -582,8 +582,8 @@ Optional inputs for IVP method selection .. c:function:: int SPRKStepSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) - Specifies if :ref:`compensated summation (and the incremental form) ` - should be used where applicable. + Specifies if :ref:`compensated summation (and the incremental form) ` + should be used where applicable. This increases the computational cost by 2 extra vector operations per stage and an additional 5 per time step. It also requires one extra vector to be @@ -932,12 +932,12 @@ Main solver optional output functions -.. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKTable *sprk_storage) +.. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKTable *sprk_table) - Returns the SPRK method coefficient structure currently in use by the solver. + Returns the SPRK method coefficient table currently in use by the solver. :param arkode_mem: pointer to the SPRKStep memory block. - :param sprk_storage: pointer to the SPRK method coefficient structure. + :param sprk_table: pointer to the SPRK method table. :retval ARK_SUCCESS: if successful :retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL`` @@ -1015,8 +1015,8 @@ General usability functions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following optional routine may be called by a user to inquire -about existing solver parameters. While it would not typically be called -during the course of solving an initial value problem, it may be useful +about existing solver parameters. While it would not typically be called +during the course of solving an initial value problem, it may be useful for users wishing to better understand SPRKStep. @@ -1073,11 +1073,11 @@ for the previous problem. This condition is automatically fulfilled if the method order *q* is left unchanged. One potential use of the :c:func:`SPRKStepReInit()` function is in the -treating of jump discontinuities in the RHS function :cite:p:`Tao:22`. -In lieu of including if statements within the RHS function to handle -discontinuities, it may be more computationally efficient to stop at each +treating of jump discontinuities in the RHS function :cite:p:`Tao:22`. +In lieu of including if statements within the RHS function to handle +discontinuities, it may be more computationally efficient to stop at each point of discontinuity (e.g., through use of tstop or the rootfinding feature) -and restart the integrator with a readjusted ODE model, using a call to +and restart the integrator with a readjusted ODE model, using a call to this routine. We note that for the solution to retain temporal accuracy, the RHS function should not incorporate the discontinuity. From 393fddb1ed064db1d94c13473f558b3b9538f9b2 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 18 Jul 2023 19:04:28 -0700 Subject: [PATCH 165/177] use their for user pronoun --- .../guide/source/Usage/ARKStep_c_interface/User_callable.rst | 2 +- .../guide/source/Usage/ERKStep_c_interface/User_callable.rst | 2 +- .../guide/source/Usage/MRIStep_c_interface/User_callable.rst | 2 +- .../guide/source/Usage/SPRKStep_c_interface/User_callable.rst | 2 +- 4 files changed, 4 insertions(+), 4 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 d55e49897a..df8a32a095 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 @@ -30,7 +30,7 @@ On an error, each user-callable function returns a negative value (or ``NULL`` if the function returns a pointer) and sends an error message to the error handler routine, which prints the message to ``stderr`` by default. However, the user can set a file as error output or can -provide her own error handler function (see +provide their own error handler function (see :numref:`ARKODE.Usage.ARKStep.OptionalInputs` for details). diff --git a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst index d59bf672bd..d8782622a6 100644 --- a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst @@ -30,7 +30,7 @@ On an error, each user-callable function returns a negative value (or ``NULL`` if the function returns a pointer) and sends an error message to the error handler routine, which prints the message to ``stderr`` by default. However, the user can set a file as error output or can -provide her own error handler function (see +provide their own error handler function (see :numref:`ARKODE.Usage.ERKStep.OptionalInputs` for details). diff --git a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst index 5c7c0096ac..2daf213487 100644 --- a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst @@ -31,7 +31,7 @@ On an error, each user-callable function returns a negative value (or ``NULL`` if the function returns a pointer) and sends an error message to the error handler routine, which prints the message to ``stderr`` by default. However, the user can set a file as error output or can -provide her own error handler function (see +provide their own error handler function (see :numref:`ARKODE.Usage.MRIStep.OptionalInputs` for details). diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index d4e6bbb5db..139ab19d15 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -28,7 +28,7 @@ On an error, each user-callable function returns a negative value (or ``NULL`` if the function returns a pointer) and sends an error message to the error handler routine, which prints the message to ``stderr`` by default. However, the user can set a file as error output or can -provide her own error handler function (see +provide their own error handler function (see :numref:`ARKODE.Usage.SPRKStep.OptionalInputs` for details). From a40ec54b1bb299f935e6045173b2da5872f19691 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 05:59:22 -0700 Subject: [PATCH 166/177] fix incomplete sentence --- .../source/Usage/SPRKStep_c_interface/User_callable.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 139ab19d15..df695cd1f4 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -204,9 +204,10 @@ has requested rootfinding. :math:`y_{n}` will be returned in the vector *yout*. Once the integrator returns at a *tstop* time, any future testing for *tstop* is disabled (and can be re-enabled only though a new call - to :c:func:`SPRKStepSetStopTime()`). SPRKStep uses the ARKODE - Our testing has shown that Lagrange interpolation typically performs - well in this regard, while Hermite interpolation does not. + to :c:func:`SPRKStepSetStopTime()`). SPRKStep uses the Lagrange + interpolation module by default as our testing has shown that Lagrange + interpolation typically performs well in this regard, while Hermite + interpolation does not. On any error return in which one or more internal steps were taken by :c:func:`SPRKStepEvolve()`, the returned values of *tret* and From 3e4fa1d0076f20e3d7e10cce2c3598ce01668e22 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 06:01:20 -0700 Subject: [PATCH 167/177] fix typo --- .../guide/source/Usage/SPRKStep_c_interface/User_callable.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index df695cd1f4..b0d5c22748 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -247,8 +247,8 @@ error message to the error handler function. All error return values are negative, so a test on the return arguments for negative values will catch all errors. Finally, a call to a ``SPRKStepSet***`` function can generally be made from the user's calling program at any time and, if successful, takes effect -immediately. ``SPRKStepSet***`` functions that cannot be called at any time note -this explicitly noted in the function documentation. +immediately. For ``SPRKStepSet***`` functions that cannot be called at any time, +this is explicitly noted in the function documentation. From b84a5cbbfa35f6c7fd97042e1078a38761a6a952 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 06:05:27 -0700 Subject: [PATCH 168/177] clarify context --- .../Usage/SPRKStep_c_interface/User_callable.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index b0d5c22748..83f8ef1ee3 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -204,10 +204,11 @@ has requested rootfinding. :math:`y_{n}` will be returned in the vector *yout*. Once the integrator returns at a *tstop* time, any future testing for *tstop* is disabled (and can be re-enabled only though a new call - to :c:func:`SPRKStepSetStopTime()`). SPRKStep uses the Lagrange - interpolation module by default as our testing has shown that Lagrange + to :c:func:`SPRKStepSetStopTime()`). Interpolated outputs may or may not + conserve the Hamiltonian. Our testing has shown that Lagrange interpolation typically performs well in this regard, while Hermite - interpolation does not. + interpolation does not. As such, SPRKStep uses the Lagrange interpolation + module by default. On any error return in which one or more internal steps were taken by :c:func:`SPRKStepEvolve()`, the returned values of *tret* and @@ -338,8 +339,9 @@ Optional inputs for SPRKStep If this routine is not called, the Lagrange interpolation module will be used. - Our testing has shown that Lagrange interpolation typically performs well in - this regard, while Hermite interpolation does not. + Interpolated outputs may or may not conserve the Hamiltonian. Our testing + has shown that Lagrange interpolation typically performs well in this + regard, while Hermite interpolation does not. From 49e960e40451cfbb9b2e6d93feaf53c166d63bac Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 06:06:32 -0700 Subject: [PATCH 169/177] fix typo --- .../guide/source/Usage/SPRKStep_c_interface/User_callable.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 83f8ef1ee3..1450ea2c64 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -376,7 +376,7 @@ Optional inputs for SPRKStep :math:`q-1` and the input *degree*, for :math:`q > 1` where :math:`q` is the order of accuracy for the time integration method. - When , `q = 1` a linear interpolant is the default to ensure values + When `q = 1`, a linear interpolant is the default to ensure values obtained by the integrator are returned at the ends of the time interval. From bba8319fc413eace937b9c3160da8fecb19c0fcc Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 06:33:37 -0700 Subject: [PATCH 170/177] remove incorrect comment --- src/arkode/arkode_io.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 7a607d17e6..60e6d04187 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -1298,7 +1298,6 @@ int arkSetUseCompensatedSums(void *arkode_mem, sunbooleantype onoff) } ark_mem = (ARKodeMem) arkode_mem; - /* argument <= 0 sets default, otherwise set input */ if (onoff) { ark_mem->use_compensated_sums = SUNTRUE; } else { From f793b1f3d7aaff1dae972866bbff940b9a45e30c Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 06:46:02 -0700 Subject: [PATCH 171/177] remove double allocation of a and ahat --- src/arkode/arkode_sprk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 0029b7dd68..ed14b2b397 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -445,8 +445,6 @@ ARKodeSPRKTable ARKodeSPRKTable_Alloc(int stages) } sprk_table->stages = stages; - sprk_table->ahat = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); - sprk_table->a = (sunrealtype*)malloc(stages * sizeof(sunrealtype)); return sprk_table; } From b43aaf90ae71b2cee72284ccba6c6b2866ad0679 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 06:48:58 -0700 Subject: [PATCH 172/177] free table on failure --- src/arkode/arkode_sprk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index ed14b2b397..e62b243eb7 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -584,7 +584,11 @@ int ARKodeSPRKTable_ToButcher(ARKodeSPRKTable sprk_table, a = ARKodeButcherTable_Alloc(sprk_table->stages, SUNFALSE); if (!a) { return ARK_MEM_FAIL; } b = ARKodeButcherTable_Alloc(sprk_table->stages, SUNFALSE); - if (!b) { return ARK_MEM_FAIL; } + if (!b) + { + if (a) { ARKodeButcherTable_Free(a); } + return ARK_MEM_FAIL; + } /* DIRK table */ for (i = 0; i < sprk_table->stages; ++i) From f3eeb967d341211fec9b010e7c8ce3645b2a8e10 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 06:55:20 -0700 Subject: [PATCH 173/177] use linear interpolant for first degree method --- src/arkode/arkode_sprkstep.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index ebe5c0de8d..5d6219e98e 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -432,9 +432,32 @@ int sprkStep_Init(void* arkode_mem, int init_type) } } - /* Limit max degree to at most one less than the method global order */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, - -(step_mem->method->q - 1)); + /* Limit max interpolant degree (negative input only overwrites the current + interpolant degree if it is greater than abs(input). */ + if (ark_mem->interp != NULL) + { + if (step_mem->method->q > 1) + { + /* Limit max degree to at most one less than the method global order */ + retval = arkInterpSetDegree(ark_mem, ark_mem->interp, + -(step_mem->method->q - 1)); + } + else + { + /* Allow for linear interpolant with first order methods to ensure + solution values are returned at the time interval end points */ + retval = arkInterpSetDegree(ark_mem, ark_mem->interp, + -(step_mem->method->q)); + } + + if (retval != ARK_SUCCESS) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::SPRKStep", + "arkStep_Init", + "Unable to update interpolation polynomial degree"); + return (ARK_ILL_INPUT); + } + } /* Signal to shared arkode module that fullrhs is not required after each step */ From 8f5bd516e6c4da0e8834904a371c12907a22ff97 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 19 Jul 2023 08:52:11 -0700 Subject: [PATCH 174/177] bump answers --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index f5cd154928..127022138d 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit f5cd154928781a3648d287b8de376690d6e0e029 +Subproject commit 127022138dc41d6a5fd4456eb6b0ad15c6a2d737 From 3255d3b9fcae38c75d75a33e3831ea1f2896882b Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 19 Jul 2023 10:11:15 -0700 Subject: [PATCH 175/177] bump answers --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 127022138d..b053dc2206 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 127022138dc41d6a5fd4456eb6b0ad15c6a2d737 +Subproject commit b053dc2206d94e7d40ece7d18b02290a4224c8c5 From 2f71186438a645727eacb86118f627a60030a6cc Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 19 Jul 2023 11:12:19 -0700 Subject: [PATCH 176/177] update double --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index b053dc2206..f76eff0bab 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit b053dc2206d94e7d40ece7d18b02290a4224c8c5 +Subproject commit f76eff0babf6b634572b87591574ef369099b9f7 From cf4aee48958c24c3a6b1329898b10c19fd22c968 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Wed, 19 Jul 2023 12:15:55 -0700 Subject: [PATCH 177/177] update answers submodule --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index f76eff0bab..59ceb24b2e 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit f76eff0babf6b634572b87591574ef369099b9f7 +Subproject commit 59ceb24b2edee3b4062153047a4bdc561b626b5e