diff --git a/.github/workflows/double-precision.yml b/.github/workflows/double-precision.yml index 31feaf3ffb..6f43b2f2f2 100644 --- a/.github/workflows/double-precision.yml +++ b/.github/workflows/double-precision.yml @@ -1,5 +1,5 @@ # -name: double precision build and test with GCC+TPLs (no GPUs) +name: Build and Test - Ubuntu/gcc double precision (TPLs, no GPUs) on: push: diff --git a/.github/workflows/extended-precision.yml b/.github/workflows/extended-precision.yml index 55d75f7d5d..dfb021dc66 100644 --- a/.github/workflows/extended-precision.yml +++ b/.github/workflows/extended-precision.yml @@ -1,5 +1,5 @@ # -name: extended precision build and test with GCC+TPLs (no GPUs) +name: Build and Test - Ubuntu/gcc extended precision (TPLs, no GPUs) on: pull_request: diff --git a/.github/workflows/macos-latest.yml b/.github/workflows/macos-latest.yml index 4d5599295e..457d191b5c 100644 --- a/.github/workflows/macos-latest.yml +++ b/.github/workflows/macos-latest.yml @@ -1,4 +1,4 @@ -name: MacOS short test +name: Build and Test - MacOS (short) on: pull_request: @@ -14,7 +14,7 @@ env: BUILD_TYPE: Release jobs: - build: + build_and_test: # The CMake configure and build commands are platform agnostic and should work equally # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. diff --git a/.github/workflows/single-precision.yml b/.github/workflows/single-precision.yml index 9a87e7f0bd..a769b09729 100644 --- a/.github/workflows/single-precision.yml +++ b/.github/workflows/single-precision.yml @@ -1,5 +1,5 @@ # -name: single precision build and test with GCC+TPLs (no GPUs) +name: Build and Test - Ubuntu/gcc single precision (TPLs, no GPUs) on: pull_request: diff --git a/.github/workflows/spack-develop.yml b/.github/workflows/spack-develop.yml index 745a57df7e..388fdd0940 100644 --- a/.github/workflows/spack-develop.yml +++ b/.github/workflows/spack-develop.yml @@ -1,5 +1,5 @@ # -name: spack@develop build and test with GCC+TPLs (no GPUs) +name: Build and Test - Ubuntu/gcc spack@develop (TPLs, no GPUs) on: pull_request: diff --git a/.github/workflows/ubuntu-clang-latest.yml b/.github/workflows/ubuntu-clang-latest.yml index 71f398d30a..eb46e250d4 100644 --- a/.github/workflows/ubuntu-clang-latest.yml +++ b/.github/workflows/ubuntu-clang-latest.yml @@ -1,4 +1,4 @@ -name: Ubuntu (clang) short test +name: Build - Ubuntu/Clang (no TPLs) on: pull_request: @@ -14,9 +14,15 @@ env: BUILD_TYPE: Release jobs: - build: + build_cycle_log_levels: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # 2 is what all other builds use (its the default), so skip it here + logging_level: [0, 1, 3, 4, 5] + steps: - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v1 @@ -28,14 +34,32 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) -DSUNDIALS_LOGGING_LEVEL=${{matrix.logging_level}} - name: Build # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - name: Test - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{env.BUILD_TYPE}} + build_cycle_profiling: + runs-on: ubuntu-latest + + strategy: + matrix: + profiling: ['OFF', 'ON'] + + steps: + - name: Install LLVM and Clang + uses: KyleMayes/install-llvm-action@v1 + with: + version: "14.0" + + - uses: actions/checkout@v3 + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) -DSUNDIALS_BUILD_WITH_PROFILING=${{matrix.profiling}} + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 5289a953da..ac296c6b1c 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -1,4 +1,4 @@ -name: Windows (mingw) short test +name: Build and Test - Windows/mingw (short) on: pull_request: @@ -14,7 +14,7 @@ env: BUILD_TYPE: Release jobs: - build: + buil_and_test: runs-on: windows-latest steps: diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 66489fe976..feca1a4e67 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -1,4 +1,4 @@ -name: Windows short test +name: Build and Test - Windows/MSVC (short) on: pull_request: @@ -14,7 +14,7 @@ env: BUILD_TYPE: Release jobs: - build: + build_and_test: runs-on: windows-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 43a704af8e..18acc7355e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # SUNDIALS Changelog +## Changes to SUNDIALS in release X.X.X + +**Breaking change** +Functions, types and header files that were previously deprecated have been +removed. + ## Changes to SUNDIALS in release 6.7.0 Added the `SUNAdaptController` base class, ported ARKODE's internal diff --git a/benchmarks/advection_reaction_3D/kokkos/arkode_driver.cpp b/benchmarks/advection_reaction_3D/kokkos/arkode_driver.cpp index e2cf1451e3..5535557af4 100644 --- a/benchmarks/advection_reaction_3D/kokkos/arkode_driver.cpp +++ b/benchmarks/advection_reaction_3D/kokkos/arkode_driver.cpp @@ -38,7 +38,7 @@ typedef struct #define LOCAL_NLS(NLS) ( GET_NLS_CONTENT(NLS)->local_nls ) /* SUNNonlinearSolver constructor */ -SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID); +SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y); /* -------------------------------------------------------------- @@ -59,7 +59,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt) long int nfe, nfi; /* RHS stats */ long int nni, ncnf; /* nonlinear solver stats */ long int nli, npsol; /* linear solver stats */ - FILE* DFID = NULL; /* diagnostics output file */ char fname[MXSTR]; /* Additively split methods should not add the advection and reaction terms */ @@ -85,16 +84,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt) retval = ARKStepSetMaxNumSteps(arkode_mem, 100000); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1, udata->myid)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->save) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ARKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ARKStepSetDiagnostics", 1, udata->myid)) return 1; - } - /* Create the (non)linear solver */ if (uopt->nls == "newton") { @@ -107,7 +96,7 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt) if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1; /* Create linear solver */ - LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx); + LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1; /* Attach linear solver */ @@ -169,9 +158,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt) iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->save) fclose(DFID); - /* Get final statistics */ retval = ARKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ARKStepGetNumSteps", 1, udata->myid); @@ -234,7 +220,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) long int nfe, nfi; /* RHS stats */ long int nni, ncnf; /* nonlinear solver stats */ long int nli, npsol; /* linear solver stats */ - FILE* DFID = NULL; /* diagnostics output file */ char fname[MXSTR]; /* Additively split methods should not add the advection and reaction terms */ @@ -260,16 +245,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) retval = ARKStepSetMaxNumSteps(arkode_mem, 100000); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1, udata->myid)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->save) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ARKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ARKStepSetDiagnostics", 1, udata->myid)) return 1; - } - /* Create the (non)linear solver */ if (uopt->nls == "newton") { @@ -282,7 +257,7 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1; /* Create linear solver */ - LS = SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx); + LS = SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1; /* Attach linear solver */ @@ -297,7 +272,7 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) { /* The custom task-local nonlinear solver handles the linear solve as well, so we do not need a SUNLinearSolver. */ - NLS = TaskLocalNewton(udata->ctx, y, DFID); + NLS = TaskLocalNewton(udata->ctx, y); if (check_retval((void *)NLS, "TaskLocalNewton", 0, udata->myid)) return 1; /* Attach nonlinear solver */ @@ -355,9 +330,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->save) fclose(DFID); - /* Get final statistics */ retval = ARKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ARKStepGetNumSteps", 1, udata->myid); @@ -415,7 +387,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt) int iout; /* output counter */ long int nst, nst_a, netf; /* step stats */ long int nfe; /* RHS stats */ - FILE* DFID; /* diagnostics output file */ char fname[MXSTR]; /* Additively split methods should not add the advection and reaction terms */ @@ -445,16 +416,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt) retval = ERKStepSetFixedStep(arkode_mem, 1e-5); if (check_retval(&retval, "ERKStepSetFixedStep", 1, udata->myid)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->save) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ERKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ERKStepSetDiagnostics", 1, udata->myid)) return 1; - } - /* Output initial condition */ if (uopt->nout > 0) { @@ -490,9 +451,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt) iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->save) fclose(DFID); - /* Get final statistics */ retval = ERKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ERKStepGetNumSteps", 1, udata->myid); @@ -718,7 +676,7 @@ int TaskLocalNewton_GetNumConvFails(SUNNonlinearSolver NLS, } -SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID) +SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y) { SUNNonlinearSolver NLS; TaskLocalNewton_Content content; @@ -771,12 +729,5 @@ SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID) content->ncnf = 0; - /* Setup the local nonlinear solver monitoring */ - if (DFID != NULL) - { - SUNNonlinSolSetInfoFile_Newton(LOCAL_NLS(NLS), DFID); - SUNNonlinSolSetPrintLevel_Newton(LOCAL_NLS(NLS), 1); - } - return NLS; } diff --git a/benchmarks/advection_reaction_3D/kokkos/cvode_driver.cpp b/benchmarks/advection_reaction_3D/kokkos/cvode_driver.cpp index e147ccd8c4..dd75f4189a 100644 --- a/benchmarks/advection_reaction_3D/kokkos/cvode_driver.cpp +++ b/benchmarks/advection_reaction_3D/kokkos/cvode_driver.cpp @@ -70,7 +70,7 @@ int EvolveProblemBDF(N_Vector y, UserData* udata, UserOptions* uopt) if (check_retval(&retval, "CVodeSetNonlinearSolver", 1, udata->myid)) return 1; /* Create linear solver */ - LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx); + LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1; /* Attach linear solver */ diff --git a/benchmarks/advection_reaction_3D/kokkos/ida_driver.cpp b/benchmarks/advection_reaction_3D/kokkos/ida_driver.cpp index 3ae28a43ca..792e805365 100644 --- a/benchmarks/advection_reaction_3D/kokkos/ida_driver.cpp +++ b/benchmarks/advection_reaction_3D/kokkos/ida_driver.cpp @@ -92,7 +92,7 @@ int EvolveDAEProblem(N_Vector y, UserData* udata, UserOptions* uopt) if (check_retval(&retval, "IDASetNonlinearSolver", 1, udata->myid)) return 1; /* Create linear solver */ - LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx); + LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1; /* Attach linear solver */ diff --git a/benchmarks/advection_reaction_3D/raja/arkode_driver.cpp b/benchmarks/advection_reaction_3D/raja/arkode_driver.cpp index e2cf1451e3..5535557af4 100644 --- a/benchmarks/advection_reaction_3D/raja/arkode_driver.cpp +++ b/benchmarks/advection_reaction_3D/raja/arkode_driver.cpp @@ -38,7 +38,7 @@ typedef struct #define LOCAL_NLS(NLS) ( GET_NLS_CONTENT(NLS)->local_nls ) /* SUNNonlinearSolver constructor */ -SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID); +SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y); /* -------------------------------------------------------------- @@ -59,7 +59,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt) long int nfe, nfi; /* RHS stats */ long int nni, ncnf; /* nonlinear solver stats */ long int nli, npsol; /* linear solver stats */ - FILE* DFID = NULL; /* diagnostics output file */ char fname[MXSTR]; /* Additively split methods should not add the advection and reaction terms */ @@ -85,16 +84,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt) retval = ARKStepSetMaxNumSteps(arkode_mem, 100000); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1, udata->myid)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->save) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ARKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ARKStepSetDiagnostics", 1, udata->myid)) return 1; - } - /* Create the (non)linear solver */ if (uopt->nls == "newton") { @@ -107,7 +96,7 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt) if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1; /* Create linear solver */ - LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx); + LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1; /* Attach linear solver */ @@ -169,9 +158,6 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt) iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->save) fclose(DFID); - /* Get final statistics */ retval = ARKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ARKStepGetNumSteps", 1, udata->myid); @@ -234,7 +220,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) long int nfe, nfi; /* RHS stats */ long int nni, ncnf; /* nonlinear solver stats */ long int nli, npsol; /* linear solver stats */ - FILE* DFID = NULL; /* diagnostics output file */ char fname[MXSTR]; /* Additively split methods should not add the advection and reaction terms */ @@ -260,16 +245,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) retval = ARKStepSetMaxNumSteps(arkode_mem, 100000); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1, udata->myid)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->save) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ARKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ARKStepSetDiagnostics", 1, udata->myid)) return 1; - } - /* Create the (non)linear solver */ if (uopt->nls == "newton") { @@ -282,7 +257,7 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) if (check_retval(&retval, "ARKStepSetNonlinearSolver", 1, udata->myid)) return 1; /* Create linear solver */ - LS = SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx); + LS = SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1; /* Attach linear solver */ @@ -297,7 +272,7 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) { /* The custom task-local nonlinear solver handles the linear solve as well, so we do not need a SUNLinearSolver. */ - NLS = TaskLocalNewton(udata->ctx, y, DFID); + NLS = TaskLocalNewton(udata->ctx, y); if (check_retval((void *)NLS, "TaskLocalNewton", 0, udata->myid)) return 1; /* Attach nonlinear solver */ @@ -355,9 +330,6 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt) iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->save) fclose(DFID); - /* Get final statistics */ retval = ARKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ARKStepGetNumSteps", 1, udata->myid); @@ -415,7 +387,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt) int iout; /* output counter */ long int nst, nst_a, netf; /* step stats */ long int nfe; /* RHS stats */ - FILE* DFID; /* diagnostics output file */ char fname[MXSTR]; /* Additively split methods should not add the advection and reaction terms */ @@ -445,16 +416,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt) retval = ERKStepSetFixedStep(arkode_mem, 1e-5); if (check_retval(&retval, "ERKStepSetFixedStep", 1, udata->myid)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->save) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ERKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ERKStepSetDiagnostics", 1, udata->myid)) return 1; - } - /* Output initial condition */ if (uopt->nout > 0) { @@ -490,9 +451,6 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt) iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->save) fclose(DFID); - /* Get final statistics */ retval = ERKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ERKStepGetNumSteps", 1, udata->myid); @@ -718,7 +676,7 @@ int TaskLocalNewton_GetNumConvFails(SUNNonlinearSolver NLS, } -SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID) +SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y) { SUNNonlinearSolver NLS; TaskLocalNewton_Content content; @@ -771,12 +729,5 @@ SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID) content->ncnf = 0; - /* Setup the local nonlinear solver monitoring */ - if (DFID != NULL) - { - SUNNonlinSolSetInfoFile_Newton(LOCAL_NLS(NLS), DFID); - SUNNonlinSolSetPrintLevel_Newton(LOCAL_NLS(NLS), 1); - } - return NLS; } diff --git a/benchmarks/advection_reaction_3D/raja/cvode_driver.cpp b/benchmarks/advection_reaction_3D/raja/cvode_driver.cpp index e147ccd8c4..dd75f4189a 100644 --- a/benchmarks/advection_reaction_3D/raja/cvode_driver.cpp +++ b/benchmarks/advection_reaction_3D/raja/cvode_driver.cpp @@ -70,7 +70,7 @@ int EvolveProblemBDF(N_Vector y, UserData* udata, UserOptions* uopt) if (check_retval(&retval, "CVodeSetNonlinearSolver", 1, udata->myid)) return 1; /* Create linear solver */ - LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx); + LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1; /* Attach linear solver */ diff --git a/benchmarks/advection_reaction_3D/raja/ida_driver.cpp b/benchmarks/advection_reaction_3D/raja/ida_driver.cpp index 3ae28a43ca..792e805365 100644 --- a/benchmarks/advection_reaction_3D/raja/ida_driver.cpp +++ b/benchmarks/advection_reaction_3D/raja/ida_driver.cpp @@ -92,7 +92,7 @@ int EvolveDAEProblem(N_Vector y, UserData* udata, UserOptions* uopt) if (check_retval(&retval, "IDASetNonlinearSolver", 1, udata->myid)) return 1; /* Create linear solver */ - LS = uopt->precond ? SUNLinSol_SPGMR(y, PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, PREC_NONE, 0, udata->ctx); + LS = uopt->precond ? SUNLinSol_SPGMR(y, SUN_PREC_LEFT, 0, udata->ctx) : SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, udata->ctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0, udata->myid)) return 1; /* Attach linear solver */ diff --git a/benchmarks/diffusion_2D/README.md b/benchmarks/diffusion_2D/README.md index 453879953f..f98f058f7f 100644 --- a/benchmarks/diffusion_2D/README.md +++ b/benchmarks/diffusion_2D/README.md @@ -71,7 +71,6 @@ listed below. | `--maxsteps ` | Max number of steps between outputs (0 uses the integrator default) | 0 | | `--onstep ` | Number of steps to run using `ONE_STEP` mode for debugging (0 uses `NORMAL` mode) | 0 | | `--ls ` | Linear solver: CG, GMRES, or SuperLU_DIST | cg | -| `--lsinfo` | Output linear solver diagnostics | Off | | `--liniters ` | Number of linear iterations | 20 | | `--epslin ` | Linear solve tolerance factor (0 uses the integrator default) | 0 | | `--msbp ` | The linear solver setup frequency (CVODE and ARKODE only, 0 uses the integrator default) | 0 | @@ -79,7 +78,6 @@ listed below. | `--order ` | Methods order | 3 | | `--controller ` | Error controller option | 0 | | `--nonlinear` | Treat the problem as nonlinearly implicit | Linear | -| `--diagnostics` | Output integrator diagnostics | Off | ## Building diff --git a/benchmarks/diffusion_2D/main_arkode.cpp b/benchmarks/diffusion_2D/main_arkode.cpp index 2c6e549360..f45da5fedc 100644 --- a/benchmarks/diffusion_2D/main_arkode.cpp +++ b/benchmarks/diffusion_2D/main_arkode.cpp @@ -28,7 +28,6 @@ struct UserOptions int maxsteps = 0; // max steps between outputs int onestep = 0; // one step mode, number of steps bool linear = true; // linearly implicit RHS - bool diagnostics = false; // output diagnostics // Linear solver and preconditioner settings std::string ls = "cg"; // linear solver to use @@ -119,21 +118,11 @@ int main(int argc, char* argv[]) flag = udata.setup(); if (check_flag(&flag, "UserData::setup", 1)) return 1; - // Output problem setup/options - FILE *diagfp = NULL; - if (outproc) { udata.print(); uopts.print(); uout.print(); - - // Open diagnostics output file - if (uopts.diagnostics || uopts.lsinfo) - { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // --------------- @@ -187,35 +176,18 @@ int main(int argc, char* argv[]) sunindextype* A_row_ptrs = nullptr; #endif - int prectype = (uopts.preconditioning) ? PREC_RIGHT : PREC_NONE; + int prectype = (uopts.preconditioning) ? SUN_PREC_RIGHT : SUN_PREC_NONE; if (uopts.ls == "cg") { LS = SUNLinSol_PCG(u, prectype, uopts.liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - if (uopts.lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else if (uopts.ls == "gmres") { LS = SUNLinSol_SPGMR(u, prectype, uopts.liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (uopts.lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } else { @@ -343,13 +315,6 @@ int main(int argc, char* argv[]) flag = ARKStepSetStopTime(arkode_mem, udata.tf); if (check_flag(&flag, "ARKStepSetStopTime", 1)) return 1; - // Set diagnostics output file - if (diagfp) - { - flag = ARKStepSetDiagnostics(arkode_mem, diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // ----------------------- // Loop over output times // ----------------------- @@ -417,10 +382,6 @@ int main(int argc, char* argv[]) // Free MPI Cartesian communicator MPI_Comm_free(&(udata.comm_c)); - // Close diagnostics output file - if (diagfp) fclose(diagfp); - - // Free integrator and linear solver ARKStepFree(&arkode_mem); SUNLinSolFree(LS); @@ -525,13 +486,6 @@ int UserOptions::parse_args(vector &args, bool outproc) args.erase(it); } - it = find(args.begin(), args.end(), "--diagnostics"); - if (it != args.end()) - { - diagnostics = true; - args.erase(it); - } - it = find(args.begin(), args.end(), "--ls"); if (it != args.end()) { @@ -582,7 +536,6 @@ void UserOptions::help() cout << " --order : method order" << endl; cout << " --fixedstep : used fixed step size" << endl; cout << " --controller : time step adaptivity controller" << endl; - cout << " --diagnostics : output diagnostics" << endl; cout << " --ls : linear solver" << endl; cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; @@ -605,7 +558,6 @@ void UserOptions::print() cout << " controller = " << controller << endl; cout << " max steps = " << maxsteps << endl; cout << " linear RHS = " << linear << endl; - cout << " diagnostics = " << diagnostics << endl; cout << " --------------------------------- " << endl; cout << endl; diff --git a/benchmarks/diffusion_2D/main_cvode.cpp b/benchmarks/diffusion_2D/main_cvode.cpp index 77a917970d..285a45ecd1 100644 --- a/benchmarks/diffusion_2D/main_cvode.cpp +++ b/benchmarks/diffusion_2D/main_cvode.cpp @@ -114,21 +114,11 @@ int main(int argc, char* argv[]) flag = udata.setup(); if (check_flag(&flag, "UserData::setup", 1)) return 1; - // Output problem setup/options - FILE *diagfp = NULL; - if (outproc) { udata.print(); uopts.print(); uout.print(); - - // Open diagnostics output file - if (uopts.lsinfo) - { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // --------------- @@ -182,35 +172,17 @@ int main(int argc, char* argv[]) sunindextype* A_row_ptrs = nullptr; #endif - int prectype = (uopts.preconditioning) ? PREC_RIGHT : PREC_NONE; + int prectype = (uopts.preconditioning) ? SUN_PREC_RIGHT : SUN_PREC_NONE; if (uopts.ls == "cg") { LS = SUNLinSol_PCG(u, prectype, uopts.liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (uopts.lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else if (uopts.ls == "gmres") { LS = SUNLinSol_SPGMR(u, prectype, uopts.liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (uopts.lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } else if (uopts.ls == "sludist") { @@ -390,9 +362,6 @@ int main(int argc, char* argv[]) // Free MPI Cartesian communicator MPI_Comm_free(&(udata.comm_c)); - // Close diagnostics output file - if (diagfp) fclose(diagfp); - // Free integrator and linear solver CVodeFree(&cvode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver diff --git a/benchmarks/diffusion_2D/main_ida.cpp b/benchmarks/diffusion_2D/main_ida.cpp index d34dc81948..46cf86d84c 100644 --- a/benchmarks/diffusion_2D/main_ida.cpp +++ b/benchmarks/diffusion_2D/main_ida.cpp @@ -28,7 +28,6 @@ struct UserOptions // Linear solver and preconditioner settings std::string ls = "cg"; // linear solver to use bool preconditioning = true; // preconditioner on/off - bool lsinfo = false; // output residual history int liniters = 20; // number of linear iterations realtype epslin = ZERO; // linear solver tolerance factor @@ -113,21 +112,11 @@ int main(int argc, char* argv[]) flag = udata.setup(); if (check_flag(&flag, "UserData::setup", 1)) return 1; - // Output problem setup/options - FILE *diagfp = NULL; - if (outproc) { udata.print(); uopts.print(); uout.print(); - - // Open diagnostics output file - if (uopts.lsinfo) - { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // --------------- @@ -187,35 +176,17 @@ int main(int argc, char* argv[]) sunindextype* A_row_ptrs = nullptr; #endif - int prectype = (uopts.preconditioning) ? PREC_RIGHT : PREC_NONE; + int prectype = (uopts.preconditioning) ? SUN_PREC_RIGHT : SUN_PREC_NONE; if (uopts.ls == "cg") { LS = SUNLinSol_PCG(u, prectype, uopts.liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (uopts.lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else if (uopts.ls == "gmres") { LS = SUNLinSol_SPGMR(u, prectype, uopts.liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (uopts.lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } else { @@ -386,9 +357,6 @@ int main(int argc, char* argv[]) // Free MPI Cartesian communicator MPI_Comm_free(&(udata.comm_c)); - // Close diagnostics output file - if (diagfp) fclose(diagfp); - // Free integrator and linear solver IDAFree(&ida_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver @@ -474,12 +442,6 @@ int UserOptions::parse_args(vector &args, bool outproc) args.erase(it, it + 2); } - it = find(args.begin(), args.end(), "--lsinfo"); - if (it != args.end()) - { - lsinfo = true; - args.erase(it); - } it = find(args.begin(), args.end(), "--liniters"); if (it != args.end()) @@ -507,7 +469,6 @@ void UserOptions::help() cout << " --rtol : relative tolerance" << endl; cout << " --atol : absoltue tolerance" << endl; cout << " --ls : linear solver" << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --noprec : disable preconditioner" << endl; @@ -537,7 +498,6 @@ void UserOptions::print() #else cout << " LS = SuperLU_DIST" << endl; #endif - cout << " LS info = " << lsinfo << endl; cout << " --------------------------------- " << endl; } else @@ -546,7 +506,6 @@ void UserOptions::print() cout << " --------------------------------- " << endl; cout << " LS = " << ls << endl; cout << " precond = " << preconditioning << endl; - cout << " LS info = " << lsinfo << endl; cout << " LS iters = " << liniters << endl; cout << " epslin = " << epslin << endl; cout << " --------------------------------- " << endl; diff --git a/cmake/SundialsBuildOptionsPre.cmake b/cmake/SundialsBuildOptionsPre.cmake index b9959f745d..3de3b3a29a 100644 --- a/cmake/SundialsBuildOptionsPre.cmake +++ b/cmake/SundialsBuildOptionsPre.cmake @@ -76,12 +76,12 @@ sundials_option(SUNDIALS_BUILD_WITH_PROFILING BOOL "${DOCSTR}" OFF) # --------------------------------------------------------------- set(DOCSTR "Build with logging capabilities enabled (0 = no logging, 1 = errors, 2 = +warnings, 3 = +info, 4 = +debug, 5 = +extras") -sundials_option(SUNDIALS_LOGGING_LEVEL STRING "${DOCSTR}" 0 +sundials_option(SUNDIALS_LOGGING_LEVEL STRING "${DOCSTR}" 2 OPTIONS "0;1;2;3;4;5") -if(SUNDIALS_LOGGING_LEVEL GREATER_EQUAL 1) +if(SUNDIALS_LOGGING_LEVEL GREATER_EQUAL 3) message(STATUS "SUNDIALS logging level set to ${SUNDIALS_LOGGING_LEVEL}") - message(WARNING "SUNDIALS built with logging turned on, performance may be affected.") + message(WARNING "SUNDIALS built with additional logging turned on, performance may be affected.") endif() set(DOCSTR "Build SUNDIALS logging with MPI support") diff --git a/doc/arkode/guide/source/Introduction.rst b/doc/arkode/guide/source/Introduction.rst index dbca297219..58ff9bb82d 100644 --- a/doc/arkode/guide/source/Introduction.rst +++ b/doc/arkode/guide/source/Introduction.rst @@ -130,6 +130,13 @@ provided with SUNDIALS, or again may utilize a user-supplied module. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +**Breaking change** +Functions, types and header files that were previously deprecated have been +removed. + Changes in v5.7.0 ----------------- diff --git a/doc/cvode/guide/source/Introduction.rst b/doc/cvode/guide/source/Introduction.rst index 0d6048ac27..31daa6df9c 100644 --- a/doc/cvode/guide/source/Introduction.rst +++ b/doc/cvode/guide/source/Introduction.rst @@ -111,6 +111,13 @@ implementations. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +**Breaking change** +Functions, types and header files that were previously deprecated have been +removed. + Changes in v6.7.0 ----------------- diff --git a/doc/cvodes/guide/source/Introduction.rst b/doc/cvodes/guide/source/Introduction.rst index e37293e303..f10df9be81 100644 --- a/doc/cvodes/guide/source/Introduction.rst +++ b/doc/cvodes/guide/source/Introduction.rst @@ -111,6 +111,13 @@ Fortran. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +**Breaking change** +Functions, types and header files that were previously deprecated have been +removed. + Changes in v6.7.0 ----------------- diff --git a/doc/ida/guide/source/Introduction.rst b/doc/ida/guide/source/Introduction.rst index 93eeef276f..f358679aa3 100644 --- a/doc/ida/guide/source/Introduction.rst +++ b/doc/ida/guide/source/Introduction.rst @@ -72,6 +72,13 @@ systems. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +**Breaking change** +Functions, types and header files that were previously deprecated have been +removed. + Changes in v6.7.0 ----------------- diff --git a/doc/idas/guide/source/Introduction.rst b/doc/idas/guide/source/Introduction.rst index c5d63486c9..18d997bece 100644 --- a/doc/idas/guide/source/Introduction.rst +++ b/doc/idas/guide/source/Introduction.rst @@ -86,6 +86,13 @@ integrate any final-condition ODE dependent on the solution of the original IVP Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +**Breaking change** +Functions, types and header files that were previously deprecated have been +removed. + Changes in v5.7.0 ----------------- diff --git a/doc/kinsol/guide/source/Introduction.rst b/doc/kinsol/guide/source/Introduction.rst index 47478fa22c..0daf95ba79 100644 --- a/doc/kinsol/guide/source/Introduction.rst +++ b/doc/kinsol/guide/source/Introduction.rst @@ -88,6 +88,13 @@ applications written in Fortran. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +**Breaking change** +Functions, types and header files that were previously deprecated have been +removed. + Changes in v6.7.0 ----------------- diff --git a/doc/kinsol/guide/source/Usage/index.rst b/doc/kinsol/guide/source/Usage/index.rst index c55d695dc8..98deec00ea 100644 --- a/doc/kinsol/guide/source/Usage/index.rst +++ b/doc/kinsol/guide/source/Usage/index.rst @@ -483,12 +483,8 @@ negative, so a test ``retval`` :math:`<0` will catch any error. +--------------------------------------------------------+----------------------------------+------------------------------+ | Info handler function | :c:func:`KINSetInfoHandlerFn` | internal fn. | +--------------------------------------------------------+----------------------------------+------------------------------+ - | Pointer to an info file | :c:func:`KINSetInfoFile` | ``stdout`` | - +--------------------------------------------------------+----------------------------------+------------------------------+ | Data for problem-defining function | :c:func:`KINSetUserData` | ``NULL`` | +--------------------------------------------------------+----------------------------------+------------------------------+ - | Verbosity level of output | :c:func:`KINSetPrintLevel` | 0 | - +--------------------------------------------------------+----------------------------------+------------------------------+ | Max. number of nonlinear iterations | :c:func:`KINSetNumMaxIters` | 200 | +--------------------------------------------------------+----------------------------------+------------------------------+ | No initial matrix setup | :c:func:`KINSetNoInitSetup` | ``SUNFALSE`` | @@ -601,83 +597,6 @@ negative, so a test ``retval`` :math:`<0` will catch any error. ``NULL`` will always be directed to ``stderr``. -.. c:function:: int KINSetInfoFile(void * kin_mem, FILE * infofp) - - The function :c:func:`KINSetInfoFile` specifies the pointer to the file - where all informative (non-error) messages should be directed. - - **Arguments:** - * ``kin_mem`` -- pointer to the KINSOL memory block. - * ``infofp`` -- pointer to output file. - - **Return value:** - * ``KIN_SUCCESS`` -- The optional value has been successfully set. - * ``KIN_MEM_NULL`` -- The ``kin_mem`` pointer is ``NULL``. - - **Notes:** - The default value for ``infofp`` is ``stdout``. - - .. deprecated:: 6.2.0 - - Use :c:func:`SUNLogger_SetInfoFilename` instead. - - -.. c:function:: int KINSetInfoHandlerFn(void * kin_mem, KINInfoHandlerFn ihfun, void * ih_data) - - The function :c:func:`KINSetInfoHandlerFn` specifies the optional - user-defined function to be used in handling informative (non-error) - messages. - - **Arguments:** - * ``kin_mem`` -- pointer to the KINSOL memory block. - * ``ihfun`` -- is the user's CC information handler function (see :numref:`KINSOL.Usage.CC.user_fct_sim.ihFn`). - * ``ih_data`` -- pointer to user data passed to ``ihfun`` every time it is called. - - **Return value:** - * ``KIN_SUCCESS`` -- The function ``ihfun`` and data pointer ``ih_data`` have been successfully set. - * ``KIN_MEM_NULL`` -- The ``kin_mem`` pointer is ``NULL``. - - **Notes:** - The default internal information handler function directs informative - (non-error) messages to the file specified by the file pointer ``infofp`` - (see :c:func:`KINSetInfoFile` above). - - -.. c:function:: int KINSetPrintLevel(void * kin_mem, int printfl) - - The function :c:func:`KINSetPrintLevel` specifies the level of verbosity of the output. - - **Arguments:** - * ``kin_mem`` -- pointer to the KINSOL memory block. - * ``printfl`` -- flag indicating the level of verbosity. Must be one of: - - 0 -- no information is displayed. - - 1 -- for each nonlinear iteration display the following information: - - - the scaled Euclidean :math:`\ell_2` norm of the system function evaluated at the current iterate, - - the scaled norm of the Newton step (only if using ``KIN_NONE``), and - - the number of function evaluations performed so far. - - 2 -- display level 1 output and the following values for each iteration: - - - :math:`\|F(u)\|_{D_F}` (only for ``KIN_NONE``). - - :math:`\|F(u)\|_{D_F,\infty}` (for ``KIN_NONE`` and ``KIN_LINESEARCH``). - - 3 -- display level 2 output plus - - - additional values used by the global strategy (only if using ``KIN_LINESEARCH``), and - - statistical information for iterative linear solver modules. - - **Return value:** - * ``KIN_SUCCESS`` -- The optional value has been successfully set. - * ``KIN_MEM_NULL`` -- The ``kin_mem`` pointer is ``NULL``. - * ``KIN_ILL_INPUT`` -- The argument ``printfl`` had an illegal value. - - **Notes:** - The default value for ``printfl`` is :math:`0`. - - .. c:function:: int KINSetUserData(void * kin_mem, void * user_data) The function :c:func:`KINSetUserData` specifies the pointer to user-defined @@ -2000,31 +1919,6 @@ follows: warnings. If a function that returns a pointer to memory encounters an error, it sets ``error_code`` to 0. -.. _KINSOL.Usage.CC.user_fct_sim.ihFn: - -Informational message handler function -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -As an alternative to the default behavior of directing informational (meaning non-error) messages -to the file pointed to by ``infofp`` (see :c:func:`KINSetInfoFile`), the user may -provide a function of type :c:type:`KINInfoHandlerFn` to process any such messages. -The function type :c:type:`KINInfoHandlerFn` is defined as follows: - -.. c:type:: void (*KINInfoHandlerFn)(const char *module, const char *function, char *msg, void *ih_data) - - This function processes error and warning messages from KINSOL and its - sub-modules. - - **Arguments:** - * ``error_code`` -- is the error code - * ``module`` -- is the name of the KINSOL module reporting the error - * ``function`` -- is the name of the function in which the error occurred - * ``ih_data`` -- is a pointer to user data, the same as the ``ih_data`` - parameter passed to :c:func:`KINSetInfoHandlerFn` - - **Return value:** - This function has no return value. - .. _KINSOL.Usage.CC.user_fct_sim.jacFn: diff --git a/doc/shared/Install.rst b/doc/shared/Install.rst index 9021e5b340..0c44d10d87 100644 --- a/doc/shared/Install.rst +++ b/doc/shared/Install.rst @@ -1967,15 +1967,11 @@ configuration file to build against SUNDIALS in their own CMake project. | | +----------------------------------------------+ | | | ``cvode/cvode_diag.h`` | | | +----------------------------------------------+ - | | | ``cvode/cvode_direct.h`` | - | | +----------------------------------------------+ | | | ``cvode/cvode_impl.h`` | | | +----------------------------------------------+ | | | ``cvode/cvode_ls.h`` | | | +----------------------------------------------+ | | | ``cvode/cvode_proj.h`` | - | | +----------------------------------------------+ - | | | ``cvode/cvode_spils.h`` | +------------------------------+--------------+----------------------------------------------+ | CVODES | Libraries | ``libsundials_cvodes.LIB`` | | +--------------+----------------------------------------------+ @@ -1987,13 +1983,9 @@ configuration file to build against SUNDIALS in their own CMake project. | | +----------------------------------------------+ | | | ``cvodes/cvodes_diag.h`` | | | +----------------------------------------------+ - | | | ``cvodes/cvodes_direct.h`` | - | | +----------------------------------------------+ | | | ``cvodes/cvodes_impl.h`` | | | +----------------------------------------------+ | | | ``cvodes/cvodes_ls.h`` | - | | +----------------------------------------------+ - | | | ``cvodes/cvodes_spils.h`` | +------------------------------+--------------+----------------------------------------------+ | ARKODE | Libraries | ``libsundials_arkode.LIB`` | | | +----------------------------------------------+ @@ -2029,13 +2021,9 @@ configuration file to build against SUNDIALS in their own CMake project. | | +----------------------------------------------+ | | | ``ida/ida_bbdpre.h`` | | | +----------------------------------------------+ - | | | ``ida/ida_direct.h`` | - | | +----------------------------------------------+ | | | ``ida/ida_impl.h`` | | | +----------------------------------------------+ | | | ``ida/ida_ls.h`` | - | | +----------------------------------------------+ - | | | ``ida/ida_spils.h`` | +------------------------------+--------------+----------------------------------------------+ | IDAS | Libraries | ``libsundials_idas.LIB`` | | +--------------+----------------------------------------------+ @@ -2043,11 +2031,7 @@ configuration file to build against SUNDIALS in their own CMake project. | | +----------------------------------------------+ | | | ``idas/idas_bbdpre.h`` | | | +----------------------------------------------+ - | | | ``idas/idas_direct.h`` | - | | +----------------------------------------------+ | | | ``idas/idas_impl.h`` | - | | +----------------------------------------------+ - | | | ``idas/idas_spils.h`` | +------------------------------+--------------+----------------------------------------------+ | KINSOL | Libraries | ``libsundials_kinsol.LIB`` | | +--------------+----------------------------------------------+ @@ -2055,11 +2039,7 @@ configuration file to build against SUNDIALS in their own CMake project. | | +----------------------------------------------+ | | | ``kinsol/kinsol_bbdpre.h`` | | | +----------------------------------------------+ - | | | ``kinsol/kinsol_direct.h`` | - | | +----------------------------------------------+ | | | ``kinsol/kinsol_impl.h`` | | | +----------------------------------------------+ | | | ``kinsol/kinsol_ls.h`` | - | | +----------------------------------------------+ - | | | ``kinsol/kinsol_spils.h`` | +------------------------------+--------------+----------------------------------------------+ diff --git a/doc/shared/nvectors/NVector_OpenMP.rst b/doc/shared/nvectors/NVector_OpenMP.rst index dcd63c0709..09e3311bb9 100644 --- a/doc/shared/nvectors/NVector_OpenMP.rst +++ b/doc/shared/nvectors/NVector_OpenMP.rst @@ -289,13 +289,11 @@ options as the vector they are cloned from while vectors created with ``v_data = NV_DATA_OMP(v)`` and then access ``v_data[i]`` within the loop than it is to use ``NV_Ith_OMP(v,i)`` within the loop. -* :c:func:`N_VNewEmpty_OpenMP`, :c:func:`N_VMake_OpenMP`, and - :c:func:`N_VCloneVectorArrayEmpty_OpenMP()` set the field *own_data* - to ``SUNFALSE``. The functions :c:func:`N_VDestroy_OpenMP()` and - :c:func:`N_VDestroyVectorArray_OpenMP()` will not attempt to free the - pointer data for any ``N_Vector`` with *own_data* set to ``SUNFALSE``. - In such a case, it is the user's responsibility to deallocate the - data pointer. +* :c:func:`N_VNewEmpty_OpenMP` and :c:func:`N_VMake_OpenMP` set the field + *own_data* to ``SUNFALSE``. The function :c:func:`N_VDestroy_OpenMP()` will + not attempt to free the pointer data for any ``N_Vector`` with *own_data* set + to ``SUNFALSE``. In such a case, it is the user's responsibility to deallocate + the data pointer. * To maximize efficiency, vector operations in the NVECTOR_OPENMP implementation that have more than one ``N_Vector`` argument do not diff --git a/doc/shared/nvectors/NVector_OpenMPDEV.rst b/doc/shared/nvectors/NVector_OpenMPDEV.rst index 8415431485..9db8affe63 100644 --- a/doc/shared/nvectors/NVector_OpenMPDEV.rst +++ b/doc/shared/nvectors/NVector_OpenMPDEV.rst @@ -291,13 +291,11 @@ options as the vector they are cloned from while vectors created with back from the device with ``N_VCopyFromDevice_OpenMPDEV(v)`` to ensure the array is up to date. -* :c:func:`N_VNewEmpty_OpenMPDEV`, :c:func:`N_VMake_OpenMPDEV`, and - :c:func:`N_VCloneVectorArrayEmpty_OpenMPDEV()` set the field *own_data* - to ``SUNFALSE``. The functions :c:func:`N_VDestroy_OpenMPDEV()` and - :c:func:`N_VDestroyVectorArray_OpenMPDEV()` will not attempt to free the - pointer data for any ``N_Vector`` with *own_data* set to ``SUNFALSE``. - In such a case, it is the user's responsibility to deallocate the - data pointers. +* :c:func:`N_VNewEmpty_OpenMPDEV` and :c:func:`N_VMake_OpenMPDEV` set the field + *own_data* to ``SUNFALSE``. The function :c:func:`N_VDestroy_OpenMPDEV()` + will not attempt to free the pointer data for any ``N_Vector`` with *own_data* + set to ``SUNFALSE``. In such a case, it is the user's responsibility to + deallocate the data pointers. * To maximize efficiency, vector operations in the NVECTOR_OPENMPDEV implementation that have more than one ``N_Vector`` argument do not diff --git a/doc/shared/nvectors/NVector_PETSc.rst b/doc/shared/nvectors/NVector_PETSc.rst index 6c8549f46c..5857f5d249 100644 --- a/doc/shared/nvectors/NVector_PETSc.rst +++ b/doc/shared/nvectors/NVector_PETSc.rst @@ -179,13 +179,11 @@ options as the vector they are cloned from while vectors created with is recommeded to extract the PETSc vector via ``x_vec = N_VGetVector_Petsc(v);`` and then access components using appropriate PETSc functions. -* The functions :c:func:`N_VNewEmpty_Petsc`, :c:func:`N_VMake_Petsc`, - and :c:func:`N_VCloneVectorArrayEmpty_Petsc()` set the field - *own_data* to ``SUNFALSE``. The routines :c:func:`N_VDestroy_Petsc()` and - :c:func:`N_VDestroyVectorArray_Petsc()` will not attempt to free the - pointer ``pvec`` for any ``N_Vector`` with *own_data* set to - ``SUNFALSE``. In such a case, it is the user's responsibility to - deallocate the ``pvec`` pointer. +* The functions :c:func:`N_VNewEmpty_Petsc` and :c:func:`N_VMake_Petsc`, set the + field *own_data* to ``SUNFALSE``. The routine :c:func:`N_VDestroy_Petsc()` + will not attempt to free the pointer ``pvec`` for any ``N_Vector`` with + *own_data* set to ``SUNFALSE``. In such a case, it is the user's + responsibility to deallocate the ``pvec`` pointer. * To maximize efficiency, vector operations in the NVECTOR_PETSC implementation that have more than one ``N_Vector`` argument do not diff --git a/doc/shared/nvectors/NVector_ParHyp.rst b/doc/shared/nvectors/NVector_ParHyp.rst index 92b881bbd6..97f3ed0f40 100644 --- a/doc/shared/nvectors/NVector_ParHyp.rst +++ b/doc/shared/nvectors/NVector_ParHyp.rst @@ -188,13 +188,11 @@ options as the vector they are cloned from while vectors created with ``x_vec = N_VGetVector_ParHyp(v)`` and then access components using appropriate HYPRE functions. -* :c:func:`N_VNewEmpty_ParHyp`, :c:func:`N_VMake_ParHyp`, and - :c:func:`N_VCloneVectorArrayEmpty_ParHyp()` set the field *own_parvector* - to ``SUNFALSE``. The functions :c:func:`N_VDestroy_ParHyp()` and - :c:func:`N_VDestroyVectorArray_ParHyp()` will not attempt to delete an - underlying HYPRE vector for any ``N_Vector`` with *own_parvector* - set to ``SUNFALSE``. In such a case, it is the user's responsibility - to delete the underlying vector. +* :c:func:`N_VNewEmpty_ParHyp`, and :c:func:`N_VMake_ParHyp` set the field + *own_parvector* to ``SUNFALSE``. The function :c:func:`N_VDestroy_ParHyp()` + will not attempt to delete an underlying HYPRE vector for any ``N_Vector`` + with *own_parvector* set to ``SUNFALSE``. In such a case, it is the + user's responsibility to delete the underlying vector. * To maximize efficiency, vector operations in the NVECTOR_PARHYP implementation that have more than one ``N_Vector`` argument do not diff --git a/doc/shared/nvectors/NVector_Parallel.rst b/doc/shared/nvectors/NVector_Parallel.rst index 0b9b2ae8f7..56721550c1 100644 --- a/doc/shared/nvectors/NVector_Parallel.rst +++ b/doc/shared/nvectors/NVector_Parallel.rst @@ -287,13 +287,11 @@ options as the vector they are cloned from, while vectors created with ``v_data = NV_DATA_P(v)``, and then access ``v_data[i]`` within the loop than it is to use ``NV_Ith_P(v,i)`` within the loop. -* :c:func:`N_VNewEmpty_Parallel`, :c:func:`N_VMake_Parallel`, and - :c:func:`N_VCloneVectorArrayEmpty_Parallel()` set the field *own_data* to - ``SUNFALSE``. The routines :c:func:`N_VDestroy_Parallel()` and - :c:func:`N_VDestroyVectorArray_Parallel()` will not attempt to free the - pointer data for any ``N_Vector`` with *own_data* set to - ``SUNFALSE``. In such a case, it is the user's responsibility to - deallocate the data pointer. +* :c:func:`N_VNewEmpty_Parallel` and :c:func:`N_VMake_Parallel` set the field + *own_data* to ``SUNFALSE``. The routine :c:func:`N_VDestroy_Parallel()` will + not attempt to free the pointer data for any ``N_Vector`` with *own_data* set + to ``SUNFALSE``. In such a case, it is the user's responsibility to deallocate + the data pointer. * To maximize efficiency, vector operations in the NVECTOR_PARALLEL implementation that have more than one ``N_Vector`` argument do not diff --git a/doc/shared/nvectors/NVector_Pthreads.rst b/doc/shared/nvectors/NVector_Pthreads.rst index fc78cfa323..5669210aa5 100644 --- a/doc/shared/nvectors/NVector_Pthreads.rst +++ b/doc/shared/nvectors/NVector_Pthreads.rst @@ -285,13 +285,11 @@ options as the vector they are cloned from while vectors created with NV_DATA_PT(v)`` and then access ``v_data[i]`` within the loop than it is to use ``NV_Ith_S(v,i)`` within the loop. -* :c:func:`N_VNewEmpty_Pthreads`, :c:func:`N_VMake_Pthreads`, and - :c:func:`N_VCloneVectorArrayEmpty_Pthreads()` set the field *own_data* - to ``SUNFALSE``. The functions :c:func:`N_VDestroy_Pthreads()` and - :c:func:`N_VDestroyVectorArray_Pthreads()` will not attempt to free the - pointer data for any ``N_Vector`` with *own_data* set to ``SUNFALSE``. - In such a case, it is the user's responsibility to deallocate the - data pointer. +* :c:func:`N_VNewEmpty_Pthreads` and :c:func:`N_VMake_Pthreads` set the field + *own_data* to ``SUNFALSE``. The function :c:func:`N_VDestroy_Pthreads()` will + not attempt to free the pointer data for any ``N_Vector`` with *own_data* set + to ``SUNFALSE``. In such a case, it is the user's responsibility to deallocate + the data pointer. * To maximize efficiency, vector operations in the NVECTOR_PTHREADS implementation that have more than one ``N_Vector`` argument do not diff --git a/doc/shared/nvectors/NVector_Serial.rst b/doc/shared/nvectors/NVector_Serial.rst index 53194e0569..b7b8bcab24 100644 --- a/doc/shared/nvectors/NVector_Serial.rst +++ b/doc/shared/nvectors/NVector_Serial.rst @@ -263,13 +263,11 @@ options as the vector they are cloned, from while vectors created with and then access ``v_data[i]`` within the loop than it is to use ``NV_Ith_S(v,i)`` within the loop. -* :c:func:`N_VNewEmpty_Serial`, :c:func:`N_VMake_Serial`, and - :c:func:`N_VCloneVectorArrayEmpty_Serial()` set the field *own_data* - to ``SUNFALSE``. The functions :c:func:`N_VDestroy_Serial()` and - :c:func:`N_VDestroyVectorArray_Serial()` will not attempt to free the - pointer data for any ``N_Vector`` with *own_data* set to ``SUNFALSE``. - In such a case, it is the user's responsibility to deallocate the - data pointer. +* :c:func:`N_VNewEmpty_Serial`, :c:func:`N_VMake_Serial` set the field + *own_data* to ``SUNFALSE``. The function :c:func:`N_VDestroy_Serial()` will + not attempt to free the pointer data for any ``N_Vector`` with *own_data* set + to ``SUNFALSE``. In such a case, it is the user's responsibility to deallocate + the data pointer. * To maximize efficiency, vector operations in the NVECTOR_SERIAL implementation that have more than one ``N_Vector`` argument do not diff --git a/doc/shared/nvectors/NVector_Trilinos.rst b/doc/shared/nvectors/NVector_Trilinos.rst index 861ffcacbf..6a47becd0c 100644 --- a/doc/shared/nvectors/NVector_Trilinos.rst +++ b/doc/shared/nvectors/NVector_Trilinos.rst @@ -108,7 +108,6 @@ The module NVECTOR_TRILINOS provides the following additional user-callable rout N_VGetVector_Trilinos(v)`` and then access components using the appropriate Trilinos functions. -* The functions ``N_VDestroy_Trilinos`` and - ``N_VDestroyVectorArray_Trilinos`` only delete the ``N_Vector`` +* The function ``N_VDestroy_Trilinos`` only deletes the ``N_Vector`` wrapper. The underlying Tpetra vector object will exist for as long as there is at least one reference to it. diff --git a/doc/superbuild/source/developers/benchmarks/diffusion.rst b/doc/superbuild/source/developers/benchmarks/diffusion.rst index 5c35ac4ec2..9b96887853 100644 --- a/doc/superbuild/source/developers/benchmarks/diffusion.rst +++ b/doc/superbuild/source/developers/benchmarks/diffusion.rst @@ -149,8 +149,6 @@ listed in :numref:`Benchmarks.Table.2D_diffusion_options`. | ``--ls`` | Linear solver: ``cg``, ``gmres``, | ``cg`` | | | ``sludist`` | | +-------------------------------+--------------------------------------+---------------+ - | ``--lsinfo`` | Output linear solver diagnostics | Off | - +-------------------------------+--------------------------------------+---------------+ | ``--liniters `` | Number of linear iterations | 20 | +-------------------------------+--------------------------------------+---------------+ | ``--epslin `` | Linear solve tolerance factor | 0 | @@ -169,8 +167,6 @@ listed in :numref:`Benchmarks.Table.2D_diffusion_options`. | ``--nonlinear`` | Treat the problem as nonlinearly | Linear | | | implicit | | +-------------------------------+--------------------------------------+---------------+ - | ``--diagnostics`` | Output integrator diagnostics | Off | - +-------------------------------+--------------------------------------+---------------+ Building diff --git a/examples/arkode/CXX_parallel/ark_brusselator1D.h b/examples/arkode/CXX_parallel/ark_brusselator1D.h index d1e0a83254..b59fda6390 100644 --- a/examples/arkode/CXX_parallel/ark_brusselator1D.h +++ b/examples/arkode/CXX_parallel/ark_brusselator1D.h @@ -196,7 +196,7 @@ typedef struct #define LOCAL_NLS(NLS) ( GET_NLS_CONTENT(NLS)->local_nls ) /* SUNNonlinearSolver constructor */ -SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID); +SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y); /* diff --git a/examples/arkode/CXX_parallel/ark_brusselator1D_task_local_nls.cpp b/examples/arkode/CXX_parallel/ark_brusselator1D_task_local_nls.cpp index a6d081357c..2d157c3d8c 100644 --- a/examples/arkode/CXX_parallel/ark_brusselator1D_task_local_nls.cpp +++ b/examples/arkode/CXX_parallel/ark_brusselator1D_task_local_nls.cpp @@ -142,6 +142,20 @@ int main(int argc, char *argv[]) retval = SetupProblem(argc, argv, &udata, &uopt, ctx); if (check_retval(&retval, "SetupProblem", 1)) MPI_Abort(comm, 1); + /* Setup diagnostic logging if it is enabled */ + if (uopt.monitor) + { + SUNLogger logger; + + sprintf(fname, "%s/diagnostics.%06d.txt", uopt.outputdir, udata.myid); + + retval = SUNContext_GetLogger(ctx, &logger); + if (check_retval(&retval, "SUNContext_GetLogger", 1)) return 1; + + retval = SUNLogger_SetInfoFilename(logger, fname); + if (check_retval(&retval, "SUNLogger_SetInfoFilename", 1)) return 1; + } + /* Create solution vector */ y = N_VMake_MPIPlusX(udata.comm, LocalNvector(udata.NEQ, ctx), ctx); if (check_retval((void *) y, "N_VMake_MPIPlusX", 0)) MPI_Abort(comm, 1); @@ -218,8 +232,6 @@ int EvolveProblemIMEX(SUNContext ctx, N_Vector y, UserData* udata, long int nfe, nfi; /* RHS stats */ long int nni, ncnf; /* nonlinear solver stats */ long int nli, npsol; /* linear solver stats */ - FILE* DFID = NULL; /* diagnostics output file */ - char fname[MXSTR]; /* Create the ARK timestepper module */ arkode_mem = ARKStepCreate(Advection, Reaction, uopt->t0, y, ctx); @@ -241,16 +253,6 @@ int EvolveProblemIMEX(SUNContext ctx, N_Vector y, UserData* udata, retval = ARKStepSetMaxNumSteps(arkode_mem, 100000); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->monitor) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ARKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ARKStepSetDiagnostics", 1)) return 1; - } - /* Create the (non)linear solver */ if (uopt->global) { @@ -278,7 +280,7 @@ int EvolveProblemIMEX(SUNContext ctx, N_Vector y, UserData* udata, { /* The custom task-local nonlinear solver handles the linear solve as well, so we do not need a SUNLinearSolver. */ - NLS = TaskLocalNewton(ctx, y, DFID); + NLS = TaskLocalNewton(ctx, y); if (check_retval((void *)NLS, "TaskLocalNewton", 0)) return 1; /* Attach nonlinear solver */ @@ -318,9 +320,6 @@ int EvolveProblemIMEX(SUNContext ctx, N_Vector y, UserData* udata, iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->monitor) fclose(DFID); - /* Get final statistics */ retval = ARKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ARKStepGetNumSteps", 1); @@ -380,8 +379,6 @@ int EvolveProblemExplicit(SUNContext ctx, N_Vector y, UserData* udata, int iout; /* output counter */ long int nst, nst_a, netf; /* step stats */ long int nfe; /* RHS stats */ - FILE* DFID; /* diagnostics output file */ - char fname[MXSTR]; /* Create the ERK timestepper module */ arkode_mem = ERKStepCreate(AdvectionReaction, uopt->t0, y, ctx); @@ -403,16 +400,6 @@ int EvolveProblemExplicit(SUNContext ctx, N_Vector y, UserData* udata, retval = ERKStepSetMaxNumSteps(arkode_mem, 1000000); if (check_retval(&retval, "ERKStepSetMaxNumSteps", 1)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->monitor) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ERKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ERKStepSetDiagnostics", 1)) return 1; - } - /* Output initial condition */ if (udata->myid == 0 && uopt->monitor) { @@ -445,9 +432,6 @@ int EvolveProblemExplicit(SUNContext ctx, N_Vector y, UserData* udata, iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->monitor) fclose(DFID); - /* Get final statistics */ retval = ERKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ERKStepGetNumSteps", 1); @@ -1083,7 +1067,7 @@ int TaskLocalNewton_GetNumConvFails(SUNNonlinearSolver NLS, } -SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID) +SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y) { void* tmp_comm; SUNNonlinearSolver NLS; @@ -1135,13 +1119,6 @@ SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID) content->ncnf = 0; - /* Setup the local nonlinear solver monitoring */ - if (DFID != NULL) - { - SUNNonlinSolSetInfoFile_Newton(LOCAL_NLS(NLS), DFID); - SUNNonlinSolSetPrintLevel_Newton(LOCAL_NLS(NLS), 1); - } - return NLS; } diff --git a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp index ad98ede688..788c16d067 100644 --- a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp +++ b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp @@ -291,7 +291,6 @@ struct UserData int maxsteps = 0; // max steps between outputs (0 = use default) bool linear = true; // enable/disable linearly implicit option bool diagnostics = false; // output diagnostics - FILE *diagfp = NULL; // diagnostics output file // ----------------------------------------- // Nonlinear solver settings @@ -508,6 +507,20 @@ int main(int argc, char* argv[]) if (check_flag(&flag, "PrintUserData", 1)) return 1; } + if (udata.diagnostics || udata.lsinfo) + { + SUNLogger logger; + + flag = SUNContext_GetLogger(ctx, &logger); + if (check_flag(&flag, "SUNContext_GetLogger", 1)) return 1; + + flag = SUNLogger_SetInfoFilename(logger, "diagnostics.txt"); + if (check_flag(&flag, "SUNLogger_SetInfoFilename", 1)) return 1; + + flag = SUNLogger_SetDebugFilename(logger, "diagnostics.txt"); + if (check_flag(&flag, "SUNLogger_SetDebugFilename", 1)) return 1; + } + // -------------- // Create vectors // -------------- @@ -520,13 +533,6 @@ int main(int argc, char* argv[]) // Create linear solver // -------------------- - // Open diagnostics file - if (outproc && (udata.diagnostics || udata.lsinfo)) - { - udata.diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) (udata.diagfp), "fopen", 0)) return 1; - } - // Preconditioning type int prectype = (udata.prec) ? SUN_PREC_RIGHT : SUN_PREC_NONE; @@ -537,29 +543,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata.liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata.lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, udata.diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata.liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata.lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, udata.diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // Allocate preconditioner workspace @@ -712,8 +700,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if (outproc && (udata.diagnostics || udata.lsinfo)) fclose(udata.diagfp); - switch(udata.integrator) { case(0): @@ -1042,13 +1028,6 @@ static int SetupARK(SUNContext ctx, UserData* udata, N_Vector u, flag = ARKStepSetStopTime(*arkode_mem, udata->tf); if (check_flag(&flag, "ARKStepSetStopTime", 1)) return 1; - // Set diagnostics output file - if (udata->diagnostics && udata->outproc) - { - flag = ARKStepSetDiagnostics(*arkode_mem, udata->diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - return 0; } @@ -1104,13 +1083,6 @@ static int SetupMRI(SUNContext ctx, UserData* udata, N_Vector y, flag = ARKStepSetMaxNumSteps(inner_arkode_mem, udata->maxsteps); if (check_flag(&flag, "ARKStepSetMaxNumSteps", 1)) return 1; - // Set diagnostics output file - if (udata->diagnostics && udata->outproc) - { - flag = ARKStepSetDiagnostics(inner_arkode_mem, udata->diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // Wrap ARKODE as an MRIStepInnerStepper flag = ARKStepCreateMRIStepInnerStepper(inner_arkode_mem, stepper); @@ -1179,13 +1151,6 @@ static int SetupMRI(SUNContext ctx, UserData* udata, N_Vector y, flag = MRIStepSetStopTime(*arkode_mem, udata->tf); if (check_flag(&flag, "MRIStepSetStopTime", 1)) return 1; - // Set diagnostics output file - if (udata->diagnostics && udata->outproc) - { - flag = MRIStepSetDiagnostics(*arkode_mem, udata->diagfp); - if (check_flag(&flag, "MRIStepSetDiagnostics", 1)) return 1; - } - return 0; } @@ -1339,13 +1304,6 @@ static int SetupMRICVODE(SUNContext ctx, UserData *udata, N_Vector y, flag = MRIStepSetStopTime(*arkode_mem, udata->tf); if (check_flag(&flag, "MRIStepSetStopTime", 1)) return 1; - // Set diagnostics output file - if (udata->diagnostics && udata->outproc) - { - flag = MRIStepSetDiagnostics(*arkode_mem, udata->diagfp); - if (check_flag(&flag, "MRIStepSetDiagnostics", 1)) return 1; - } - return 0; } diff --git a/examples/arkode/CXX_parallel/ark_heat2D_p.cpp b/examples/arkode/CXX_parallel/ark_heat2D_p.cpp index 0e096b71b9..3e414c5224 100644 --- a/examples/arkode/CXX_parallel/ark_heat2D_p.cpp +++ b/examples/arkode/CXX_parallel/ark_heat2D_p.cpp @@ -278,7 +278,6 @@ int main(int argc, char* argv[]) N_Vector u = NULL; // vector for storing solution SUNLinearSolver LS = NULL; // linear solver memory structure void *arkode_mem = NULL; // ARKODE memory structure - FILE *diagfp = NULL; // diagnostics output file SUNAdaptController C = NULL; // timestep adaptivity controller // Timing variables @@ -327,13 +326,20 @@ int main(int argc, char* argv[]) { flag = PrintUserData(udata); if (check_flag(&flag, "PrintUserData", 1)) return 1; + } - // Open diagnostics output file - if (udata->diagnostics || udata->lsinfo) - { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } + if (udata->diagnostics || udata->lsinfo) + { + SUNLogger logger = NULL; + + flag = SUNContext_GetLogger(ctx, &logger); + if (check_flag(&flag, "SUNContext_GetLogger", 1)) return 1; + + flag = SUNLogger_SetInfoFilename(logger, "diagnostics.txt"); + if (check_flag(&flag, "SUNLogger_SetInfoFilename", 1)) return 1; + + flag = SUNLogger_SetDebugFilename(logger, "diagnostics.txt"); + if (check_flag(&flag, "SUNLogger_SetDebugFilename", 1)) return 1; } // ------------------------ @@ -363,29 +369,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // Allocate preconditioner workspace @@ -491,13 +479,6 @@ int main(int argc, char* argv[]) flag = ARKStepSetStopTime(arkode_mem, udata->tf); if (check_flag(&flag, "ARKStepSetStopTime", 1)) return 1; - // Set diagnostics output file - if (udata->diagnostics && outproc) - { - flag = ARKStepSetDiagnostics(arkode_mem, diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // ----------------------- // Loop over output times // ----------------------- @@ -580,8 +561,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if ((udata->diagnostics || udata->lsinfo) && outproc) fclose(diagfp); - ARKStepFree(&arkode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver N_VDestroy(u); // Free vectors diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp index b38e7ded64..65695000b3 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp @@ -170,7 +170,6 @@ struct UserData int controller; // step size adaptivity method int maxsteps; // max number of steps between outputs bool linear; // enable/disable linearly implicit option - bool diagnostics; // output diagnostics // Linear solver and preconditioner settings bool pcg; // use PCG (true) or GMRES (false) @@ -362,8 +361,7 @@ int main(int argc, char* argv[]) SUNMatrix A = NULL; // matrix for Jacobian SUNLinearSolver LS = NULL; // linear solver memory structure void *arkode_mem = NULL; // ARKODE memory structure - FILE *diagfp = NULL; // diagnostics output file - SUNAdaptController C = NULL; // timestep adaptivity controller + SUNAdaptController C = NULL; // timestep adaptivity controlle // Timing variables double t1 = 0.0; @@ -411,13 +409,6 @@ int main(int argc, char* argv[]) { flag = PrintUserData(udata); if (check_flag(&flag, "PrintUserData", 1)) return 1; - - // Open diagnostics output file - if (udata->diagnostics) - { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // ------------------------ @@ -541,13 +532,6 @@ int main(int argc, char* argv[]) flag = ARKStepSetStopTime(arkode_mem, udata->tf); if (check_flag(&flag, "ARKStepSetStopTime", 1)) return 1; - // Set diagnostics output file - if (udata->diagnostics && outproc) - { - flag = ARKStepSetDiagnostics(arkode_mem, diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // ----------------------- // Loop over output times // ----------------------- @@ -630,8 +614,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if (udata->diagnostics && outproc) fclose(diagfp); - ARKStepFree(&arkode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver SUNMatDestroy(A); // Free matrix @@ -1660,7 +1642,6 @@ static int InitUserData(UserData *udata) udata->controller = 0; // PID controller udata->maxsteps = 0; // use default udata->linear = true; // linearly implicit problem - udata->diagnostics = false; // output diagnostics // Linear solver and preconditioner options udata->pcg = true; // use PCG (true) or GMRES (false) @@ -1788,10 +1769,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->linear = false; } - else if (arg == "--diagnostics") - { - udata->diagnostics = true; - } // Linear solver settings else if (arg == "--gmres") { @@ -1951,7 +1928,6 @@ static void InputHelp() cout << " --order : method order" << endl; cout << " --fixedstep : used fixed step size" << endl; cout << " --controller : time step adaptivity controller" << endl; - cout << " --diagnostics : output diagnostics" << endl; cout << " --gmres : use GMRES linear solver" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp index 29c9a4d0ee..3418b03ce2 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp @@ -170,13 +170,11 @@ struct UserData int controller; // step size adaptivity method int maxsteps; // max number of steps between outputs bool linear; // enable/disable linearly implicit option - bool diagnostics; // output diagnostics // Linear solver and preconditioner settings bool pcg; // use PCG (true) or GMRES (false) bool prec; // preconditioner on/off bool matvec; // use hypre matrix-vector product - bool lsinfo; // output residual history int liniters; // number of linear iterations int msbp; // max number of steps between preconditioner setups realtype epslin; // linear solver tolerance factor @@ -321,7 +319,6 @@ int main(int argc, char* argv[]) N_Vector u = NULL; // vector for storing solution SUNLinearSolver LS = NULL; // linear solver memory structure void *arkode_mem = NULL; // ARKODE memory structure - FILE *diagfp = NULL; // diagnostics output file SUNAdaptController C = NULL; // timestep adaptivity controller // Timing variables @@ -370,13 +367,6 @@ int main(int argc, char* argv[]) { flag = PrintUserData(udata); if (check_flag(&flag, "PrintUserData", 1)) return 1; - - // Open diagnostics output file - if (udata->diagnostics || udata->lsinfo) - { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // ------------------------ @@ -406,29 +396,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // --------------------- @@ -544,13 +516,6 @@ int main(int argc, char* argv[]) flag = ARKStepSetStopTime(arkode_mem, udata->tf); if (check_flag(&flag, "ARKStepSetStopTime", 1)) return 1; - // Set diagnostics output file - if (udata->diagnostics && outproc) - { - flag = ARKStepSetDiagnostics(arkode_mem, diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // ----------------------- // Loop over output times // ----------------------- @@ -633,8 +598,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if ((udata->diagnostics || udata->lsinfo) && outproc) fclose(diagfp); - ARKStepFree(&arkode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver N_VDestroy(u); // Free vectors @@ -2085,13 +2048,11 @@ static int InitUserData(UserData *udata) udata->controller = 0; // PID controller udata->maxsteps = 0; // use default udata->linear = true; // linearly implicit problem - udata->diagnostics = false; // output diagnostics // Linear solver and preconditioner options udata->pcg = true; // use PCG (true) or GMRES (false) udata->prec = true; // enable preconditioning udata->matvec = false; // use hypre matrix-vector product - udata->lsinfo = false; // output residual history udata->liniters = 10; // max linear iterations udata->msbp = 0; // use default (20 steps) udata->epslin = ZERO; // use default (0.05) @@ -2253,10 +2214,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->linear = false; } - else if (arg == "--diagnostics") - { - udata->diagnostics = true; - } // Linear solver settings else if (arg == "--gmres") { @@ -2266,10 +2223,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->matvec = true; } - else if (arg == "--lsinfo") - { - udata->lsinfo = true; - } else if (arg == "--liniters") { udata->liniters = stoi((*argv)[arg_idx++]); @@ -2424,10 +2377,8 @@ static void InputHelp() cout << " --order : method order" << endl; cout << " --fixedstep : used fixed step size" << endl; cout << " --controller : time step adaptivity controller" << endl; - cout << " --diagnostics : output diagnostics" << endl; cout << " --gmres : use GMRES linear solver" << endl; cout << " --matvec : use hypre matrix-vector product" << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --noprec : disable preconditioner" << endl; diff --git a/examples/arkode/CXX_serial/ark_heat2D.cpp b/examples/arkode/CXX_serial/ark_heat2D.cpp index 60c5748b82..12949c2698 100644 --- a/examples/arkode/CXX_serial/ark_heat2D.cpp +++ b/examples/arkode/CXX_serial/ark_heat2D.cpp @@ -208,7 +208,6 @@ int main(int argc, char* argv[]) SUNLinearSolver LS = NULL; // linear solver memory structure void *arkode_mem = NULL; // ARKODE memory structure SUNAdaptController C = NULL; // Adaptivity controller - FILE *diagfp = NULL; // diagnostics output file // Timing variables chrono::time_point t1; @@ -237,11 +236,18 @@ int main(int argc, char* argv[]) flag = PrintUserData(udata); if (check_flag(&flag, "PrintUserData", 1)) return 1; - // Open diagnostics output file if (udata->diagnostics || udata->lsinfo) { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; + SUNLogger logger = NULL; + + flag = SUNContext_GetLogger(ctx, &logger); + if (check_flag(&flag, "SUNContext_GetLogger", 1)) return 1; + + flag = SUNLogger_SetInfoFilename(logger, "diagnostics.txt"); + if (check_flag(&flag, "SUNLogger_SetInfoFilename", 1)) return 1; + + flag = SUNLogger_SetDebugFilename(logger, "diagnostics.txt"); + if (check_flag(&flag, "SUNLogger_SetInfoFilename", 1)) return 1; } // ---------------------- @@ -271,29 +277,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata->lsinfo) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata->lsinfo) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // Allocate preconditioner workspace @@ -399,13 +387,6 @@ int main(int argc, char* argv[]) flag = ARKStepSetStopTime(arkode_mem, udata->tf); if (check_flag(&flag, "ARKStepSetStopTime", 1)) return 1; - // Set diagnostics output file - if (udata->diagnostics) - { - flag = ARKStepSetDiagnostics(arkode_mem, diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // ----------------------- // Loop over output times // ----------------------- @@ -485,8 +466,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if (udata->diagnostics || udata->lsinfo) fclose(diagfp); - ARKStepFree(&arkode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver N_VDestroy(u); // Free vectors diff --git a/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid.cpp b/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid.cpp index f20e4c97e0..4bb96c8ab4 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid.cpp +++ b/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid.cpp @@ -177,13 +177,11 @@ struct UserData realtype atol; // absolute tolerance int order; // ARKode method order bool linear; // enable/disable linearly implicit option - bool diagnostics; // output diagnostics // Linear solver and preconditioner settings bool pcg; // use PCG (true) or GMRES (false) bool prec; // preconditioner on/off bool matvec; // use hypre matrix-vector product - bool lsinfo; // output residual history int liniters; // number of linear iterations int msbp; // max number of steps between preconditioner setups realtype epslin; // linear solver tolerance factor @@ -355,7 +353,6 @@ int main(int argc, char* argv[]) N_Vector u = NULL; // vector for storing solution SUNLinearSolver LS = NULL; // linear solver memory structure void *arkode_mem = NULL; // ARKODE memory structure - FILE *diagfp = NULL; // diagnostics output file braid_Core core = NULL; // XBraid memory structure braid_App app = NULL; // ARKode + XBraid interface structure SUNAdaptController C = NULL; // time step adaptivity controller @@ -406,18 +403,6 @@ int main(int argc, char* argv[]) { flag = PrintUserData(udata); if (check_flag(&flag, "PrintUserData", 1)) return 1; - - // Open diagnostics output file - if ((udata->diagnostics || udata->lsinfo) && udata->myid_c == 0) - { - stringstream fname; - fname << "diagnostics." << setfill('0') << setw(5) << udata->myid_w - << ".txt"; - - const std::string tmp = fname.str(); - diagfp = fopen(tmp.c_str(), "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // ------------------------ @@ -447,29 +432,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // --------------------- @@ -575,13 +542,6 @@ int main(int argc, char* argv[]) if (check_flag(&flag, "ARKStepSetMaxCFailGrowth", 1)) return 1; } - // Set diagnostics output file - if (udata->diagnostics && udata->myid_c == 0) - { - flag = ARKStepSetDiagnostics(arkode_mem, diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // ------------------------ // Create XBraid interface // ------------------------ @@ -742,8 +702,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if ((udata->diagnostics || udata->lsinfo) && udata->myid_c == 0) fclose(diagfp); - ARKStepFree(&arkode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver N_VDestroy(u); // Free vectors @@ -2407,13 +2365,11 @@ static int InitUserData(UserData *udata, SUNContext ctx) udata->atol = RCONST(1.e-10); // absolute tolerance udata->order = 3; // method order udata->linear = true; // linearly implicit problem - udata->diagnostics = false; // output diagnostics // Linear solver and preconditioner options udata->pcg = true; // use PCG (true) or GMRES (false) udata->prec = true; // enable preconditioning udata->matvec = false; // use hypre matrix-vector product - udata->lsinfo = false; // output residual history udata->liniters = 100; // max linear iterations udata->msbp = 0; // use default (20 steps) udata->epslin = ZERO; // use default (0.05) @@ -2600,10 +2556,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->linear = false; } - else if (arg == "--diagnostics") - { - udata->diagnostics = true; - } // Linear solver settings else if (arg == "--gmres") { @@ -2613,10 +2565,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->matvec = true; } - else if (arg == "--lsinfo") - { - udata->lsinfo = true; - } else if (arg == "--liniters") { udata->liniters = stoi((*argv)[arg_idx++]); @@ -2854,10 +2802,8 @@ static void InputHelp() cout << " --atol : absoltue tolerance" << endl; cout << " --nonlinear : disable linearly implicit flag" << endl; cout << " --order : method order" << endl; - cout << " --diagnostics : output diagnostics" << endl; cout << " --gmres : use GMRES linear solver" << endl; cout << " --matvec : use hypre matrix-vector product" << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --noprec : disable preconditioner" << endl; diff --git a/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid.cpp b/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid.cpp index a9d90df9bd..e08c612f29 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid.cpp +++ b/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid.cpp @@ -175,12 +175,10 @@ struct UserData realtype atol; // absolute tolerance int order; // ARKode method order bool linear; // enable/disable linearly implicit option - bool diagnostics; // output diagnostics // Linear solver and preconditioner settings bool pcg; // use PCG (true) or GMRES (false) bool prec; // preconditioner on/off - bool lsinfo; // output residual history int liniters; // number of linear iterations int msbp; // max number of steps between preconditioner setups realtype epslin; // linear solver tolerance factor @@ -312,7 +310,6 @@ int main(int argc, char* argv[]) N_Vector u = NULL; // vector for storing solution SUNLinearSolver LS = NULL; // linear solver memory structure void *arkode_mem = NULL; // ARKODE memory structure - FILE *diagfp = NULL; // diagnostics output file braid_Core core = NULL; // XBraid memory structure braid_App app = NULL; // ARKode + XBraid interface structure SUNAdaptController C = NULL; // time step adaptivity controller @@ -363,18 +360,6 @@ int main(int argc, char* argv[]) { flag = PrintUserData(udata); if (check_flag(&flag, "PrintUserData", 1)) return 1; - - // Open diagnostics output file - if ((udata->diagnostics || udata->lsinfo) && udata->myid_c == 0) - { - stringstream fname; - fname << "diagnostics." << setfill('0') << setw(5) << udata->myid_w - << ".txt"; - - const std::string tmp = fname.str(); - diagfp = fopen(tmp.c_str(), "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // ------------------------ @@ -404,29 +389,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // Allocate preconditioner workspace @@ -522,13 +489,6 @@ int main(int argc, char* argv[]) if (check_flag(&flag, "ARKStepSetMaxCFailGrowth", 1)) return 1; } - // Set diagnostics output file - if (udata->diagnostics && udata->myid_c == 0) - { - flag = ARKStepSetDiagnostics(arkode_mem, diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // ------------------------ // Create XBraid interface // ------------------------ @@ -689,8 +649,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if ((udata->diagnostics || udata->lsinfo) && udata->myid_c == 0) fclose(diagfp); - ARKStepFree(&arkode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver N_VDestroy(u); // Free vectors @@ -1672,12 +1630,10 @@ static int InitUserData(UserData *udata, SUNContext ctx) udata->atol = RCONST(1.e-10); // absolute tolerance udata->order = 3; // method order udata->linear = true; // linearly implicit problem - udata->diagnostics = false; // output diagnostics // Linear solver and preconditioner options udata->pcg = true; // use PCG (true) or GMRES (false) udata->prec = true; // enable preconditioning - udata->lsinfo = false; // output residual history udata->liniters = 100; // max linear iterations udata->msbp = 0; // use default (20 steps) udata->epslin = ZERO; // use default (0.05) @@ -1831,19 +1787,11 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->linear = false; } - else if (arg == "--diagnostics") - { - udata->diagnostics = true; - } // Linear solver settings else if (arg == "--gmres") { udata->pcg = false; } - else if (arg == "--lsinfo") - { - udata->lsinfo = true; - } else if (arg == "--liniters") { udata->liniters = stoi((*argv)[arg_idx++]); @@ -2072,9 +2020,7 @@ static void InputHelp() cout << " --atol : absoltue tolerance" << endl; cout << " --nonlinear : disable linearly implicit flag" << endl; cout << " --order : method order" << endl; - cout << " --diagnostics : output diagnostics" << endl; cout << " --gmres : use GMRES linear solver" << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --noprec : disable preconditioner" << endl; diff --git a/examples/arkode/CXX_xbraid/ark_heat2D_xbraid.cpp b/examples/arkode/CXX_xbraid/ark_heat2D_xbraid.cpp index 1b146d8a80..b773c5c93a 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_xbraid.cpp +++ b/examples/arkode/CXX_xbraid/ark_heat2D_xbraid.cpp @@ -120,12 +120,10 @@ struct UserData realtype atol; // absolute tolerance int order; // ARKode method order bool linear; // enable/disable linearly implicit option - bool diagnostics; // output diagnostics // Linear solver and preconditioner settings bool pcg; // use PCG (true) or GMRES (false) bool prec; // preconditioner on/off - bool lsinfo; // output residual history int liniters; // number of linear iterations int msbp; // max number of steps between preconditioner setups realtype epslin; // linear solver tolerance factor @@ -244,7 +242,6 @@ int main(int argc, char* argv[]) N_Vector u = NULL; // vector for storing solution SUNLinearSolver LS = NULL; // linear solver memory structure void *arkode_mem = NULL; // ARKODE memory structure - FILE *diagfp = NULL; // diagnostics output file braid_Core core = NULL; // XBraid memory structure braid_App app = NULL; // ARKode + XBraid interface structure SUNAdaptController C = NULL; // time adaptivity controller @@ -303,18 +300,6 @@ int main(int argc, char* argv[]) if (check_flag(&flag, "PrintUserData", 1)) return 1; } - // Open diagnostics output file - if (udata->diagnostics || udata->lsinfo) - { - stringstream fname; - fname << "diagnostics." << setfill('0') << setw(5) << udata->myid_w - << ".txt"; - - const std::string tmp = fname.str(); - diagfp = fopen(tmp.c_str(), "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } - // ---------------------- // Create serial vectors // ---------------------- @@ -342,29 +327,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata->lsinfo) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata->liniters, ctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata->lsinfo) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // Allocate preconditioner workspace @@ -460,13 +427,6 @@ int main(int argc, char* argv[]) if (check_flag(&flag, "ARKStepSetMaxCFailGrowth", 1)) return 1; } - // Set diagnostics output file - if (udata->diagnostics) - { - flag = ARKStepSetDiagnostics(arkode_mem, diagfp); - if (check_flag(&flag, "ARKStepSetDiagnostics", 1)) return 1; - } - // ------------------------ // Create XBraid interface // ------------------------ @@ -627,12 +587,10 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if (udata->diagnostics || udata->lsinfo) fclose(diagfp); - - ARKStepFree(&arkode_mem); // Free integrator memory - SUNLinSolFree(LS); // Free linear solver - N_VDestroy(u); // Free vectors - FreeUserData(udata); // Free user data + ARKStepFree(&arkode_mem); // Free integrator memory + SUNLinSolFree(LS); // Free linear solver + N_VDestroy(u); // Free vectors + FreeUserData(udata); // Free user data delete udata; braid_Destroy(core); // Free braid memory ARKBraid_Free(&app); // Free interface memory @@ -1016,12 +974,10 @@ static int InitUserData(UserData *udata, SUNContext ctx) udata->atol = RCONST(1.e-10); // absolute tolerance udata->order = 3; // method order udata->linear = true; // linearly implicit problem - udata->diagnostics = false; // output diagnostics // Linear solver and preconditioner options udata->pcg = true; // use PCG (true) or GMRES (false) udata->prec = true; // enable preconditioning - udata->lsinfo = false; // output residual history udata->liniters = 100; // max linear iterations udata->msbp = 0; // use default (20 steps) udata->epslin = ZERO; // use default (0.05) @@ -1146,19 +1102,11 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->linear = false; } - else if (arg == "--diagnostics") - { - udata->diagnostics = true; - } // Linear solver settings else if (arg == "--gmres") { udata->pcg = false; } - else if (arg == "--lsinfo") - { - udata->lsinfo = true; - } else if (arg == "--liniters") { udata->liniters = stoi((*argv)[arg_idx++]); @@ -1379,9 +1327,7 @@ static void InputHelp() cout << " --atol : absoltue tolerance" << endl; cout << " --nonlinear : disable linearly implicit flag" << endl; cout << " --order : method order" << endl; - cout << " --diagnostics : output diagnostics" << endl; cout << " --gmres : use GMRES linear solver" << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --noprec : disable preconditioner" << endl; diff --git a/examples/arkode/C_parallel/ark_brusselator1D_task_local_nls.c b/examples/arkode/C_parallel/ark_brusselator1D_task_local_nls.c index bd7b19fccf..b05278871a 100644 --- a/examples/arkode/C_parallel/ark_brusselator1D_task_local_nls.c +++ b/examples/arkode/C_parallel/ark_brusselator1D_task_local_nls.c @@ -70,6 +70,7 @@ #include "arkode/arkode_erkstep.h" /* ERKStep */ #include "nvector/nvector_mpiplusx.h" /* MPI+X N_Vector */ #include "nvector/nvector_serial.h" /* serial N_Vector */ +#include "sundials/sundials_logger.h" #include "sunmatrix/sunmatrix_dense.h" /* dense SUNMatrix */ #include "sunlinsol/sunlinsol_dense.h" /* dense SUNLinearSolver */ #include "sunlinsol/sunlinsol_spgmr.h" /* GMRES SUNLinearSolver */ @@ -183,7 +184,7 @@ typedef struct #define LOCAL_NLS(NLS) ( GET_NLS_CONTENT(NLS)->local_nls ) /* SUNNonlinearSolver constructor */ -SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID); +SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y); /* @@ -280,6 +281,23 @@ int main(int argc, char *argv[]) retval = SetupProblem(argc, argv, udata, uopt, ctx); if (check_retval(&retval, "SetupProblem", 1)) MPI_Abort(comm, 1); + /* Setup diagnostic logging if it is enabled */ + if (uopt->monitor) + { + SUNLogger logger; + + sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); + + retval = SUNContext_GetLogger(ctx, &logger); + if (check_retval(&retval, "SUNContext_GetLogger", 1)) return 1; + + retval = SUNLogger_SetInfoFilename(logger, fname); + if (check_retval(&retval, "SUNLogger_SetInfoFilename", 1)) return 1; + + retval = SUNLogger_SetDebugFilename(logger, fname); + if (check_retval(&retval, "SUNLogger_SetInfoFilename", 1)) return 1; + } + /* Create solution vector */ y = N_VMake_MPIPlusX(udata->comm, N_VNew_Serial(udata->NEQ, ctx), ctx); if (check_retval((void *) y, "N_VMake_MPIPlusX", 0)) MPI_Abort(comm, 1); @@ -351,8 +369,6 @@ int EvolveProblemIMEX(N_Vector y, UserData udata, UserOptions uopt, long int nfe, nfi; /* RHS stats */ long int nni, ncnf; /* nonlinear solver stats */ long int nli, npre, npsol; /* linear solver stats */ - FILE* DFID = NULL; /* diagnostics output file */ - char fname[MXSTR]; /* Create the ARK timestepper module */ arkode_mem = ARKStepCreate(Advection, Reaction, uopt->t0, y, ctx); @@ -374,16 +390,6 @@ int EvolveProblemIMEX(N_Vector y, UserData udata, UserOptions uopt, retval = ARKStepSetMaxNumSteps(arkode_mem, 100000); if (check_retval(&retval, "ARKStepSetMaxNumSteps", 1)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->monitor) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ARKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ARKStepSetDiagnostics", 1)) return 1; - } - /* Create the (non)linear solver */ if (uopt->global) { @@ -411,7 +417,7 @@ int EvolveProblemIMEX(N_Vector y, UserData udata, UserOptions uopt, { /* The custom task-local nonlinear solver handles the linear solve as well, so we do not need a SUNLinearSolver */ - NLS = TaskLocalNewton(ctx, y, DFID); + NLS = TaskLocalNewton(ctx, y); if (check_retval((void *)NLS, "TaskLocalNewton", 0)) return 1; /* Attach nonlinear solver */ @@ -451,9 +457,6 @@ int EvolveProblemIMEX(N_Vector y, UserData udata, UserOptions uopt, iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->monitor) fclose(DFID); - /* Get final statistics */ retval = ARKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ARKStepGetNumSteps", 1); @@ -516,8 +519,6 @@ int EvolveProblemExplicit(N_Vector y, UserData udata, UserOptions uopt, int iout; /* output counter */ long int nst, nst_a, netf; /* step stats */ long int nfe; /* RHS stats */ - FILE* DFID; /* diagnostics output file */ - char fname[MXSTR]; /* Create the ERK timestepper module */ arkode_mem = ERKStepCreate(AdvectionReaction, uopt->t0, y, ctx); @@ -539,16 +540,6 @@ int EvolveProblemExplicit(N_Vector y, UserData udata, UserOptions uopt, retval = ERKStepSetMaxNumSteps(arkode_mem, 1000000); if (check_retval(&retval, "ERKStepSetMaxNumSteps", 1)) return 1; - /* Open output file for integrator diagnostics */ - if (uopt->monitor) - { - sprintf(fname, "%s/diagnostics.%06d.txt", uopt->outputdir, udata->myid); - DFID = fopen(fname, "w"); - - retval = ERKStepSetDiagnostics(arkode_mem, DFID); - if (check_retval(&retval, "ERKStepSetDiagnostics", 1)) return 1; - } - /* Output initial condition */ if (udata->myid == 0 && uopt->monitor) { @@ -581,9 +572,6 @@ int EvolveProblemExplicit(N_Vector y, UserData udata, UserOptions uopt, iout++; } while (iout < uopt->nout); - /* close output stream */ - if (uopt->monitor) fclose(DFID); - /* Get final statistics */ retval = ERKStepGetNumSteps(arkode_mem, &nst); check_retval(&retval, "ERKStepGetNumSteps", 1); @@ -1173,7 +1161,7 @@ int TaskLocalNewton_GetNumConvFails(SUNNonlinearSolver NLS, } -SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID) +SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y) { void* tmp_comm; SUNNonlinearSolver NLS; @@ -1225,13 +1213,6 @@ SUNNonlinearSolver TaskLocalNewton(SUNContext ctx, N_Vector y, FILE* DFID) content->ncnf = 0; - /* Setup the local nonlinear solver monitoring */ - if (DFID != NULL) - { - SUNNonlinSolSetInfoFile_Newton(LOCAL_NLS(NLS), DFID); - SUNNonlinSolSetPrintLevel_Newton(LOCAL_NLS(NLS), 1); - } - return NLS; } diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_p.c b/examples/arkode/C_parallel/ark_diurnal_kry_p.c index b17ed5f283..2eea2b3860 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_p.c +++ b/examples/arkode/C_parallel/ark_diurnal_kry_p.c @@ -838,7 +838,7 @@ static int Precond(realtype tn, N_Vector u, N_Vector fu, /* jok = SUNTRUE: Copy Jbd to P */ for (ly = 0; ly < MYSUB; ly++) for (lx = 0; lx < MXSUB; lx++) - denseCopy(Jbd[lx][ly], P[lx][ly], NVARS, NVARS); + SUNDlsMat_denseCopy(Jbd[lx][ly], P[lx][ly], NVARS, NVARS); *jcurPtr = SUNFALSE; @@ -873,7 +873,7 @@ static int Precond(realtype tn, N_Vector u, N_Vector fu, IJth(j,1,2) = -Q2*c1 + q4coef; IJth(j,2,1) = Q1*C3 - Q2*c2; IJth(j,2,2) = (-Q2*c1 - q4coef) + diag; - denseCopy(j, a, NVARS, NVARS); + SUNDlsMat_denseCopy(j, a, NVARS, NVARS); } } @@ -884,7 +884,7 @@ static int Precond(realtype tn, N_Vector u, N_Vector fu, /* Scale by -gamma */ for (ly = 0; ly < MYSUB; ly++) for (lx = 0; lx < MXSUB; lx++) - denseScale(-gamma, P[lx][ly], NVARS, NVARS); + SUNDlsMat_denseScale(-gamma, P[lx][ly], NVARS, NVARS); /* Add identity matrix and do LU decompositions on blocks in place */ for (lx = 0; lx < MXSUB; lx++) { diff --git a/examples/arkode/C_serial/ark_brusselator_fp.c b/examples/arkode/C_serial/ark_brusselator_fp.c index a8f3084cde..3c99f2d8de 100644 --- a/examples/arkode/C_serial/ark_brusselator_fp.c +++ b/examples/arkode/C_serial/ark_brusselator_fp.c @@ -59,6 +59,7 @@ #include /* serial N_Vector types, fcts., macros */ #include /* access to FP nonlinear solver */ #include /* def. of type 'realtype' */ +#include #if defined(SUNDIALS_EXTENDED_PRECISION) #define GSYM "Lg" @@ -96,25 +97,40 @@ int main(int argc, char *argv[]) int monitor = 0; /* turn on/off monitoring */ /* general problem variables */ + SUNContext ctx = NULL; + SUNLogger logger = NULL; + const char* info_fname = "ark_brusselator_fp-info.txt"; int flag; /* reusable error-checking flag */ N_Vector y = NULL; /* empty vector for storing solution */ SUNNonlinearSolver NLS = NULL; /* empty nonlinear solver object */ void *arkode_mem = NULL; /* empty ARKode memory structure */ - FILE *UFID, *INFOFID; + FILE *UFID; realtype t, tout; int iout; long int nst, nst_a, nfe, nfi, nni, ncfn, netf; - /* Create SUNDIALS context */ - SUNContext ctx = NULL; - flag = SUNContext_Create(NULL, &ctx); - if (check_flag(&flag, "SUNContext_Create", 1)) return 1; - /* read inputs */ if (argc == 2) { monitor = atoi(argv[1]); } + /* create SUNDIALS context and a logger which will record + nonlinear solver info (e.g., residual) amongst other things. */ + + flag = SUNContext_Create(NULL, &ctx); + if (check_flag(&flag, "SUNContext_Create", 1)) return 1; + + flag = SUNLogger_Create(NULL, 0, &logger); + if (check_flag(&flag, "SUNLogger_Create", 1)) return 1; + + if (monitor) { + flag = SUNLogger_SetInfoFilename(logger, info_fname); + if (check_flag(&flag, "SUNLogger_SetInfoFilename", 1)) return 1; + } + + flag = SUNContext_SetLogger(ctx, logger); + if (check_flag(&flag, "SUNContext_SetLogger", 1)) return 1; + /* set up the test problem according to the desired test */ if (test == 1) { u0 = RCONST(3.9); @@ -145,10 +161,6 @@ int main(int argc, char *argv[]) printf(" problem parameters: a = %"GSYM", b = %"GSYM", ep = %"GSYM"\n",a,b,ep); printf(" reltol = %.1"ESYM", abstol = %.1"ESYM"\n\n",reltol,abstol); - /* Open up info output file */ - INFOFID = NULL; - if (monitor) INFOFID = fopen("ark_brusselator_fp-info.txt","w"); - /* Initialize data structures */ rdata[0] = a; /* set user data */ rdata[1] = b; @@ -168,12 +180,7 @@ int main(int argc, char *argv[]) /* Initialize fixed-point nonlinear solver and attach to ARKStep */ NLS = SUNNonlinSol_FixedPoint(y, fp_m, ctx); if (check_flag((void *)NLS, "SUNNonlinSol_FixedPoint", 0)) return 1; - if (monitor) { - flag = SUNNonlinSolSetPrintLevel_FixedPoint(NLS, 1); - if (check_flag(&flag, "SUNNonlinSolSetPrintLevel_Newton", 1)) return(1); - flag = SUNNonlinSolSetInfoFile_FixedPoint(NLS, INFOFID); - if (check_flag(&flag, "SUNNonlinSolSetPrintLevel_Newton", 1)) return(1); - } + flag = ARKStepSetNonlinearSolver(arkode_mem, NLS); if (check_flag(&flag, "ARKStepSetNonlinearSolver", 1)) return 1; @@ -217,7 +224,6 @@ int main(int argc, char *argv[]) } printf(" ----------------------------------------------\n"); fclose(UFID); - if (monitor) fclose(INFOFID); /* Print some final statistics */ flag = ARKStepGetNumSteps(arkode_mem, &nst); @@ -241,10 +247,11 @@ int main(int argc, char *argv[]) printf(" Total number of error test failures = %li\n\n", netf); /* Clean up and return with successful completion */ - N_VDestroy(y); /* Free y vector */ - ARKStepFree(&arkode_mem); /* Free integrator memory */ - SUNNonlinSolFree(NLS); /* Free NLS object */ - SUNContext_Free(&ctx); /* Free context */ + N_VDestroy(y); + ARKStepFree(&arkode_mem); + SUNNonlinSolFree(NLS); + SUNLogger_Destroy(&logger); + SUNContext_Free(&ctx); return 0; } diff --git a/examples/arkode/F2003_parallel/ark_brusselator1D_task_local_nls_f2003.f90 b/examples/arkode/F2003_parallel/ark_brusselator1D_task_local_nls_f2003.f90 index 04d8477122..e3888b5fde 100644 --- a/examples/arkode/F2003_parallel/ark_brusselator1D_task_local_nls_f2003.f90 +++ b/examples/arkode/F2003_parallel/ark_brusselator1D_task_local_nls_f2003.f90 @@ -110,7 +110,6 @@ module ode_mod real(c_double) :: t0, tf ! initial and final time real(c_double) :: rtol, atol ! relative and absolute tolerance integer(c_int) :: order ! method order - type(c_ptr) :: DFID ! ARKODE diagnostics file logical :: explicit ! use explicit or IMEX method logical :: global ! use global or task-local nonlinear solver @@ -999,7 +998,7 @@ function TaskLocalNewton(arkode_mem, sunvec_y) result(sunnls) use fsunlinsol_dense_mod use fsunmatrix_dense_mod - use ode_mod, only : sunctx, Nvar, comm, DFID, monitor + use ode_mod, only : sunctx, Nvar, comm !======= Declarations ========= implicit none @@ -1012,7 +1011,6 @@ function TaskLocalNewton(arkode_mem, sunvec_y) result(sunnls) type(SUNNonlinearSolver_Ops), pointer :: nlsops ! solver operations integer :: ierr ! MPI error status - integer(c_int) :: retval ! SUNDIALS error status !======= Internals ============ @@ -1055,20 +1053,6 @@ function TaskLocalNewton(arkode_mem, sunvec_y) result(sunnls) nnlfi = 0 ncnf_loc = 0 - if (monitor) then - retval = FSUNNonlinSolSetInfoFile_Newton(sunnls_LOC, DFID) - if (retval /= 0) then - print *, "Error: FSUNNonlinSolSetInfoFile_Newton returned ",retval - call MPI_Abort(comm, 1, ierr) - end if - - retval = FSUNNonlinSolSetPrintLevel_Newton(sunnls_LOC, 1) - if (retval /= 0) then - print *, "Error: FSUNNonlinSolSetPrintLevel_Newton returned ",retval - call MPI_Abort(comm, 1, ierr) - end if - end if - end function TaskLocalNewton end module nls_mod @@ -1229,7 +1213,7 @@ subroutine EvolveProblemIMEX(sunvec_y) use fsundials_nonlinearsolver_mod ! Access generic SUNNonlinearSolver use fsunnonlinsol_newton_mod ! Access Newton SUNNonlinearSolver - use ode_mod, only : sunctx, comm, myid, Neq, t0, tf, atol, rtol, order, DFID, & + use ode_mod, only : sunctx, comm, myid, Neq, t0, tf, atol, rtol, order, & monitor, global, nout, umask_s, Advection, Reaction use prec_mod, only : sunls_P, sunmat_P, PSetup, PSolve @@ -1267,7 +1251,6 @@ subroutine EvolveProblemIMEX(sunvec_y) integer :: ierr ! MPI error status integer :: iout ! output counter double precision :: tout, dtout ! output time and update - character(len=100) :: outname ! diagnostics ouptput file !======= Internals ============ @@ -1300,20 +1283,6 @@ subroutine EvolveProblemIMEX(sunvec_y) call MPI_Abort(comm, 1, ierr) end if - ! Open output file for integrator diagnostics - if (monitor) then - - write(outname,"(A,I0.6,A)") "diagnostics.",myid,".txt" - DFID = FSUNDIALSFileOpen(trim(outname), "w") - - retval = FARKStepSetDiagnostics(arkode_mem, DFID) - if (retval /= 0) then - print *, "Error: FARKStepSetDiagnostics returned ",retval - call MPI_Abort(comm, 1, ierr) - end if - - end if - ! Create the (non)linear solver if (global) then @@ -1423,9 +1392,6 @@ subroutine EvolveProblemIMEX(sunvec_y) print *, "" end if - ! close output stream - if (monitor) call FSUNDIALSFileClose(DFID) - ! Get final statistics retval = FARKStepGetNumSteps(arkode_mem, nst) if (retval /= 0) then @@ -1552,7 +1518,7 @@ subroutine EvolveProblemExplicit(sunvec_y) use farkode_erkstep_mod ! Access ERKStep use fsundials_nvector_mod ! Access generic N_Vector - use ode_mod, only : sunctx, comm, myid, t0, tf, atol, rtol, order, DFID, monitor, & + use ode_mod, only : sunctx, comm, myid, t0, tf, atol, rtol, order, monitor, & nout, AdvectionReaction !======= Declarations ========= @@ -1576,7 +1542,6 @@ subroutine EvolveProblemExplicit(sunvec_y) integer :: ierr ! output counter integer :: iout ! output counter double precision :: tout, dtout ! output time and update - character(len=100) :: outname ! diagnostics ouptput file !======= Internals ============ @@ -1608,20 +1573,6 @@ subroutine EvolveProblemExplicit(sunvec_y) call MPI_Abort(comm, 1, ierr) end if - ! Open output file for integrator diagnotics - if (monitor) then - - write(outname,"(A,I0.6,A)") "diagnostics.",myid,".txt" - DFID = FSUNDIALSFileOpen(trim(outname), "w") - - retval = FERKStepSetDiagnostics(arkode_mem, DFID) - if (retval /= 0) then - print *, "Error: FERKStepSetDiagnostics returned ",retval - call MPI_Abort(comm, 1, ierr) - end if - - end if - ! Set initial time, determine output time, and initialize output count t(1) = t0 dtout = (tf - t0) @@ -1668,9 +1619,6 @@ subroutine EvolveProblemExplicit(sunvec_y) print *, "" end if - ! close output stream - if (monitor) call FSUNDIALSFileClose(DFID) - ! Get final statistics retval = FERKStepGetNumSteps(arkode_mem, nst) if (retval /= 0) then diff --git a/examples/cvode/CXX_parallel/cv_heat2D_p.cpp b/examples/cvode/CXX_parallel/cv_heat2D_p.cpp index 547f6cd342..b7a896014f 100644 --- a/examples/cvode/CXX_parallel/cv_heat2D_p.cpp +++ b/examples/cvode/CXX_parallel/cv_heat2D_p.cpp @@ -168,7 +168,6 @@ struct UserData // Linear solver and preconditioner settings bool pcg; // use PCG (true) or GMRES (false) bool prec; // preconditioner on/off - bool lsinfo; // output residual history int liniters; // number of linear iterations int msbp; // max number of steps between preconditioner setups realtype epslin; // linear solver tolerance factor @@ -292,7 +291,6 @@ int main(int argc, char* argv[]) N_Vector u = NULL; // vector for storing solution SUNLinearSolver LS = NULL; // linear solver memory structure void *cvode_mem = NULL; // CVODE memory structure - FILE *diagfp = NULL; // diagnostics output file // SUNDIALS context sundials::Context sunctx(&comm_w); @@ -324,12 +322,6 @@ int main(int argc, char* argv[]) flag = PrintUserData(udata); if (check_flag(&flag, "PrintUserData", 1)) return 1; - // Open diagnostics output file - if (udata->lsinfo) - { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // ------------------------ @@ -359,29 +351,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata->liniters, sunctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata->liniters, sunctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // Allocate preconditioner workspace @@ -520,8 +494,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if (udata->lsinfo && outproc) fclose(diagfp); - CVodeFree(&cvode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver N_VDestroy(u); // Free vectors @@ -1290,7 +1262,6 @@ static int InitUserData(UserData *udata) // Linear solver and preconditioner options udata->pcg = true; // use PCG (true) or GMRES (false) udata->prec = true; // enable preconditioning - udata->lsinfo = false; // output residual history udata->liniters = 20; // max linear iterations udata->msbp = 0; // use default (20 steps) udata->epslin = ZERO; // use default (0.05) @@ -1408,10 +1379,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->pcg = false; } - else if (arg == "--lsinfo") - { - udata->lsinfo = true; - } else if (arg == "--liniters") { udata->liniters = stoi((*argv)[arg_idx++]); @@ -1547,7 +1514,6 @@ static void InputHelp() cout << " --rtol : relative tolerance" << endl; cout << " --atol : absoltue tolerance" << endl; cout << " --gmres : use GMRES linear solver" << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --noprec : disable preconditioner" << endl; diff --git a/examples/cvode/CXX_parhyp/cv_heat2D_hypre_pfmg.cpp b/examples/cvode/CXX_parhyp/cv_heat2D_hypre_pfmg.cpp index 255520260f..fb783c1cea 100644 --- a/examples/cvode/CXX_parhyp/cv_heat2D_hypre_pfmg.cpp +++ b/examples/cvode/CXX_parhyp/cv_heat2D_hypre_pfmg.cpp @@ -176,7 +176,6 @@ struct UserData bool pcg; // use PCG (true) or GMRES (false) bool prec; // preconditioner on/off bool matvec; // use hypre matrix-vector product - bool lsinfo; // output residual history int liniters; // number of linear iterations int msbp; // max number of steps between preconditioner setups realtype epslin; // linear solver tolerance factor @@ -334,7 +333,6 @@ int main(int argc, char* argv[]) N_Vector u = NULL; // vector for storing solution SUNLinearSolver LS = NULL; // linear solver memory structure void *cvode_mem = NULL; // CVODE memory structure - FILE *diagfp = NULL; // diagnostics output file // SUNDIALS context sundials::Context sunctx(&comm_w); @@ -363,13 +361,6 @@ int main(int argc, char* argv[]) { flag = PrintUserData(udata); if (check_flag(&flag, "PrintUserData", 1)) return 1; - - // Open diagnostics output file - if (udata->lsinfo) - { - diagfp = fopen("diagnostics.txt", "w"); - if (check_flag((void *) diagfp, "fopen", 0)) return 1; - } } // ------------------------ @@ -399,29 +390,11 @@ int main(int argc, char* argv[]) { LS = SUNLinSol_PCG(u, prectype, udata->liniters, sunctx); if (check_flag((void *) LS, "SUNLinSol_PCG", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_PCG(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_PCG", 1)) return(1); - - flag = SUNLinSolSetInfoFile_PCG(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_PCG", 1)) return(1); - } } else { LS = SUNLinSol_SPGMR(u, prectype, udata->liniters, sunctx); if (check_flag((void *) LS, "SUNLinSol_SPGMR", 0)) return 1; - - if (udata->lsinfo && outproc) - { - flag = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_flag(&flag, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - - flag = SUNLinSolSetInfoFile_SPGMR(LS, diagfp); - if (check_flag(&flag, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } } // --------------------- @@ -570,8 +543,6 @@ int main(int argc, char* argv[]) // Clean up and return // -------------------- - if (udata->lsinfo && outproc) fclose(diagfp); - CVodeFree(&cvode_mem); // Free integrator memory SUNLinSolFree(LS); // Free linear solver N_VDestroy(u); // Free vectors @@ -2023,7 +1994,6 @@ UserData::UserData(sundials::Context& sunctx) pcg = true; // use PCG (true) or GMRES (false) prec = true; // enable preconditioning matvec = false; // use hypre matrix-vector product - lsinfo = false; // output residual history liniters = 10; // max linear iterations msbp = 0; // use default (20 steps) epslin = ZERO; // use default (0.05) @@ -2172,10 +2142,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) { udata->matvec = true; } - else if (arg == "--lsinfo") - { - udata->lsinfo = true; - } else if (arg == "--liniters") { udata->liniters = stoi((*argv)[arg_idx++]); @@ -2321,7 +2287,6 @@ static void InputHelp() cout << " --atol : absoltue tolerance" << endl; cout << " --gmres : use GMRES linear solver" << endl; cout << " --matvec : use hypre matrix-vector product" << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --noprec : disable preconditioner" << endl; diff --git a/examples/cvode/serial/cvKrylovDemo_ls.c b/examples/cvode/serial/cvKrylovDemo_ls.c index 3b4cbf411a..dc89dfc91f 100644 --- a/examples/cvode/serial/cvKrylovDemo_ls.c +++ b/examples/cvode/serial/cvKrylovDemo_ls.c @@ -53,6 +53,7 @@ #include /* serial N_Vector types, fct. and macros */ #include /* use generic DENSE solver in preconditioning */ #include /* definition of realtype */ +#include /* helpful macros */ @@ -195,17 +196,17 @@ int main(int argc, char* argv[]) SUNNonlinearSolver NLS; void *cvode_mem; int linsolver, iout, retval; - FILE* infofp; int nrmfactor; /* LS norm conversion factor flag */ realtype nrmfac; /* LS norm conversion factor */ int monitor; /* LS resiudal monitoring flag */ SUNContext sunctx; + SUNLogger logger; + const char* info_fname = "cvKrylovDemo_ls-info.txt"; u = NULL; data = NULL; LS = NULL; cvode_mem = NULL; - infofp = NULL; nrmfactor = 0; monitor = 0; @@ -213,16 +214,23 @@ int main(int argc, char* argv[]) if (argc > 1) nrmfactor = atoi(argv[1]); if (argc > 2) monitor = atoi(argv[2]); - /* Create SUNDIALS context */ + /* Create SUNDIALS context and a logger which will record + nonlinear solver info (e.g., residual) amongst other things. */ + retval = SUNContext_Create(NULL, &sunctx); - if (check_retval(&retval, "SUNContext_Create", 1)) return(1); + if (check_retval(&retval, "SUNContext_Create", 1)) return 1; + + retval = SUNLogger_Create(NULL, 0, &logger); + if (check_retval(&retval, "SUNLogger_Create", 1)) return 1; - /* Open info file if monitoring is turned on */ if (monitor) { - infofp = fopen("cvKrylovDemo_ls-info.txt", "w+"); - if (check_retval((void *)infofp, "fopen", 0)) return(1); + retval = SUNLogger_SetInfoFilename(logger, info_fname); + if (check_retval(&retval, "SUNLogger_SetInfoFilename", 1)) return 1; } + retval = SUNContext_SetLogger(sunctx, logger); + if (check_retval(&retval, "SUNContext_SetLogger", 1)) return 1; + /* Allocate memory, and set problem data, initial values, tolerances */ u = N_VNew_Serial(NEQ, sunctx); if (check_retval((void *)u, "N_VNew_Serial", 0)) return(1); @@ -265,14 +273,6 @@ int main(int argc, char* argv[]) /* Create the SUNNonlinearSolver */ NLS = SUNNonlinSol_Newton(u, sunctx); if (check_retval(&retval, "SUNNonlinSol_Newton", 0)) return(1); - if (monitor) { - /* Set the print level set to 1, so that the nonlinear residual - is printed every newton iteration. */ - retval = SUNNonlinSolSetPrintLevel_Newton(NLS, 1); - if (check_retval(&retval, "SUNNonlinSolSetPrintLevel_Newton", 1)) return(1); - retval = SUNNonlinSolSetInfoFile_Newton(NLS, infofp); - if (check_retval(&retval, "SUNNonlinSolSetInfoFile_Newton", 1)) return(1); - } /* Call CVodeSetNonlinearSolver to attach the nonlinear solver to CVode */ retval = CVodeSetNonlinearSolver(cvode_mem, NLS); @@ -309,22 +309,12 @@ int main(int argc, char* argv[]) printf(" -------"); printf(" \n| SPGMR |\n"); printf(" -------\n"); - if (monitor) { - fprintf(infofp, " ---------"); - fprintf(infofp, " \n| SPGMR |\n"); - fprintf(infofp, " ---------\n"); - } /* Call SUNLinSol_SPGMR to specify the linear solver SPGMR with left preconditioning and the default maximum Krylov dimension */ LS = SUNLinSol_SPGMR(u, SUN_PREC_LEFT, 0, sunctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0)) return(1); - if (monitor) { - retval = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_retval(&retval, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - retval = SUNLinSolSetInfoFile_SPGMR(LS, infofp); - if (check_retval(&retval, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } + retval = CVodeSetLinearSolver(cvode_mem, LS, NULL); if (check_retval(&retval, "CVodeSetLinearSolver", 1)) return 1; @@ -337,22 +327,12 @@ int main(int argc, char* argv[]) printf(" ---------"); printf(" \n| SPFGMR |\n"); printf(" ---------\n"); - if (monitor) { - fprintf(infofp, " ---------"); - fprintf(infofp, " \n| SPFGMR |\n"); - fprintf(infofp, " ---------\n"); - } /* Call SUNLinSol_SPFGMR to specify the linear solver SPFGMR with left preconditioning and the default maximum Krylov dimension */ LS = SUNLinSol_SPFGMR(u, SUN_PREC_LEFT, 0, sunctx); if (check_retval((void *)LS, "SUNLinSol_SPFGMR", 0)) return(1); - if (monitor) { - retval = SUNLinSolSetPrintLevel_SPFGMR(LS, 1); - if (check_retval(&retval, "SUNLinSolSetPrintLevel_SPFGMR", 1)) return(1); - retval = SUNLinSolSetInfoFile_SPFGMR(LS, infofp); - if (check_retval(&retval, "SUNLinSolSetInfoFile_SPFGMR", 1)) return(1); - } + retval = CVodeSetLinearSolver(cvode_mem, LS, NULL); if (check_retval(&retval, "CVodeSetLinearSolver", 1)) return 1; @@ -365,22 +345,12 @@ int main(int argc, char* argv[]) printf(" -------"); printf(" \n| SPBCGS |\n"); printf(" -------\n"); - if (monitor) { - fprintf(infofp, " ---------"); - fprintf(infofp, " \n| SPBCGS |\n"); - fprintf(infofp, " ---------\n"); - } /* Call SUNLinSol_SPBCGS to specify the linear solver SPBCGS with left preconditioning and the default maximum Krylov dimension */ LS = SUNLinSol_SPBCGS(u, SUN_PREC_LEFT, 0, sunctx); if (check_retval((void *)LS, "SUNLinSol_SPBCGS", 0)) return(1); - if (monitor) { - retval = SUNLinSolSetPrintLevel_SPBCGS(LS, 1); - if (check_retval(&retval, "SUNLinSolSetPrintLevel_SPBCGS", 1)) return(1); - retval = SUNLinSolSetInfoFile_SPBCGS(LS, infofp); - if (check_retval(&retval, "SUNLinSolSetInfoFile_SPBCGS", 1)) return(1); - } + retval = CVodeSetLinearSolver(cvode_mem, LS, NULL); if (check_retval(&retval, "CVodeSetLinearSolver", 1)) return 1; @@ -393,22 +363,12 @@ int main(int argc, char* argv[]) printf(" ---------"); printf(" \n| SPTFQMR |\n"); printf(" ---------\n"); - if (monitor) { - fprintf(infofp, " ---------"); - fprintf(infofp, " \n| SPTFQMR |\n"); - fprintf(infofp, " ---------\n"); - } /* Call SUNLinSol_SPTFQMR to specify the linear solver SPTFQMR with left preconditioning and the default maximum Krylov dimension */ LS = SUNLinSol_SPTFQMR(u, SUN_PREC_LEFT, 0, sunctx); if (check_retval((void *)LS, "SUNLinSol_SPTFQMR", 0)) return(1); - if (monitor) { - retval = SUNLinSolSetPrintLevel_SPTFQMR(LS, 1); - if (check_retval(&retval, "SUNLinSolSetPrintLevel_SPTFQMR", 1)) return(1); - retval = SUNLinSolSetInfoFile_SPTFQMR(LS, infofp); - if (check_retval(&retval, "SUNLinSolSetInfoFile_SPTFQMR", 1)) return(1); - } + retval = CVodeSetLinearSolver(cvode_mem, LS, NULL); if (check_retval(&retval, "CVodeSetLinearSolver", 1)) return 1; @@ -454,12 +414,12 @@ int main(int argc, char* argv[]) } /* END: Loop through SPGMR, SPBCG and SPTFQMR linear solver modules */ /* Free memory */ - if (monitor) fclose(infofp); N_VDestroy(u); FreeUserData(data); CVodeFree(&cvode_mem); SUNLinSolFree(LS); SUNNonlinSolFree(NLS); + SUNLogger_Destroy(&logger); SUNContext_Free(&sunctx); return(0); diff --git a/examples/cvode/superludist/cvAdvDiff_sludist.cpp b/examples/cvode/superludist/cvAdvDiff_sludist.cpp index 08700e17f4..1b9ef77f15 100644 --- a/examples/cvode/superludist/cvAdvDiff_sludist.cpp +++ b/examples/cvode/superludist/cvAdvDiff_sludist.cpp @@ -46,7 +46,6 @@ #include "superlu_ddefs.h" #include /* prototypes for CVODE fcts., consts. */ -#include /* CVODE direct linear solver interface */ #include /* access to MPI-parallel N_Vector */ #include /* access to the SuperLU-DIST SUNLinearSolver */ #include /* access to the SuperLU SLU_NR_loc SUNMatrix */ diff --git a/examples/cvodes/serial/cvsKrylovDemo_ls.c b/examples/cvodes/serial/cvsKrylovDemo_ls.c index 02309e0010..e76ccfa5dc 100644 --- a/examples/cvodes/serial/cvsKrylovDemo_ls.c +++ b/examples/cvodes/serial/cvsKrylovDemo_ls.c @@ -192,17 +192,17 @@ int main(int argc, char* argv[]) SUNNonlinearSolver NLS; void *cvode_mem; int linsolver, iout, retval; - FILE* infofp; int nrmfactor; /* LS norm conversion factor flag */ realtype nrmfac; /* LS norm conversion factor */ int monitor; /* LS resiudal monitoring flag */ SUNContext sunctx; + SUNLogger logger; + const char* info_fname = "cvKrylovDemo_ls-info.txt"; u = NULL; data = NULL; LS = NULL; cvode_mem = NULL; - infofp = NULL; nrmfactor = 0; monitor = 0; @@ -210,16 +210,23 @@ int main(int argc, char* argv[]) if (argc > 1) nrmfactor = atoi(argv[1]); if (argc > 2) monitor = atoi(argv[2]); - /* Create SUNDIALS context */ + /* Create SUNDIALS context and a logger which will record + nonlinear solver info (e.g., residual) amongst other things. */ + retval = SUNContext_Create(NULL, &sunctx); - if (check_retval(&retval, "SUNContext_Create", 1)) return(1); + if (check_retval(&retval, "SUNContext_Create", 1)) return 1; + + retval = SUNLogger_Create(NULL, 0, &logger); + if (check_retval(&retval, "SUNLogger_Create", 1)) return 1; - /* Open info file if monitoring is turned on */ if (monitor) { - infofp = fopen("cvKrylovDemo_ls-info.txt", "w+"); - if (check_retval((void *)infofp, "fopen", 0)) return(1); + retval = SUNLogger_SetInfoFilename(logger, info_fname); + if (check_retval(&retval, "SUNLogger_SetInfoFilename", 1)) return 1; } + retval = SUNContext_SetLogger(sunctx, logger); + if (check_retval(&retval, "SUNContext_SetLogger", 1)) return 1; + /* Allocate memory, and set problem data, initial values, tolerances */ u = N_VNew_Serial(NEQ, sunctx); if (check_retval((void *)u, "N_VNew_Serial", 0)) return(1); @@ -253,14 +260,6 @@ int main(int argc, char* argv[]) /* Create the SUNNonlinearSolver */ NLS = SUNNonlinSol_Newton(u, sunctx); if (check_retval(&retval, "SUNNonlinSol_Newton", 0)) return(1); - if (monitor) { - /* Set the print level set to 1, so that the nonlinear residual - is printed every newton iteration. */ - retval = SUNNonlinSolSetPrintLevel_Newton(NLS, 1); - if (check_retval(&retval, "SUNNonlinSolSetPrintLevel_Newton", 1)) return(1); - retval = SUNNonlinSolSetInfoFile_Newton(NLS, infofp); - if (check_retval(&retval, "SUNNonlinSolSetInfoFile_Newton", 1)) return(1); - } /* Call CVodeSetNonlinearSolver to attach the nonlinear solver to CVode */ retval = CVodeSetNonlinearSolver(cvode_mem, NLS); @@ -294,22 +293,12 @@ int main(int argc, char* argv[]) printf(" -------"); printf(" \n| SPGMR |\n"); printf(" -------\n"); - if (monitor) { - fprintf(infofp, " ---------"); - fprintf(infofp, " \n| SPGMR |\n"); - fprintf(infofp, " ---------\n"); - } /* Call SUNLinSol_SPGMR to specify the linear solver SPGMR with left preconditioning and the default maximum Krylov dimension */ LS = SUNLinSol_SPGMR(u, SUN_PREC_LEFT, 0, sunctx); if (check_retval((void *)LS, "SUNLinSol_SPGMR", 0)) return(1); - if (monitor) { - retval = SUNLinSolSetPrintLevel_SPGMR(LS, 1); - if (check_retval(&retval, "SUNLinSolSetPrintLevel_SPGMR", 1)) return(1); - retval = SUNLinSolSetInfoFile_SPGMR(LS, infofp); - if (check_retval(&retval, "SUNLinSolSetInfoFile_SPGMR", 1)) return(1); - } + retval = CVodeSetLinearSolver(cvode_mem, LS, NULL); if (check_retval(&retval, "CVodeSetLinearSolver", 1)) return 1; @@ -322,22 +311,12 @@ int main(int argc, char* argv[]) printf(" ---------"); printf(" \n| SPFGMR |\n"); printf(" ---------\n"); - if (monitor) { - fprintf(infofp, " ---------"); - fprintf(infofp, " \n| SPFGMR |\n"); - fprintf(infofp, " ---------\n"); - } /* Call SUNLinSol_SPFGMR to specify the linear solver SPFGMR with left preconditioning and the default maximum Krylov dimension */ LS = SUNLinSol_SPFGMR(u, SUN_PREC_LEFT, 0, sunctx); if (check_retval((void *)LS, "SUNLinSol_SPFGMR", 0)) return(1); - if (monitor) { - retval = SUNLinSolSetPrintLevel_SPFGMR(LS, 1); - if (check_retval(&retval, "SUNLinSolSetPrintLevel_SPFGMR", 1)) return(1); - retval = SUNLinSolSetInfoFile_SPFGMR(LS, infofp); - if (check_retval(&retval, "SUNLinSolSetInfoFile_SPFGMR", 1)) return(1); - } + retval = CVodeSetLinearSolver(cvode_mem, LS, NULL); if (check_retval(&retval, "CVodeSetLinearSolver", 1)) return 1; @@ -350,22 +329,12 @@ int main(int argc, char* argv[]) printf(" -------"); printf(" \n| SPBCGS |\n"); printf(" -------\n"); - if (monitor) { - fprintf(infofp, " ---------"); - fprintf(infofp, " \n| SPBCGS |\n"); - fprintf(infofp, " ---------\n"); - } /* Call SUNLinSol_SPBCGS to specify the linear solver SPBCGS with left preconditioning and the default maximum Krylov dimension */ LS = SUNLinSol_SPBCGS(u, SUN_PREC_LEFT, 0, sunctx); if (check_retval((void *)LS, "SUNLinSol_SPBCGS", 0)) return(1); - if (monitor) { - retval = SUNLinSolSetPrintLevel_SPBCGS(LS, 1); - if (check_retval(&retval, "SUNLinSolSetPrintLevel_SPBCGS", 1)) return(1); - retval = SUNLinSolSetInfoFile_SPBCGS(LS, infofp); - if (check_retval(&retval, "SUNLinSolSetInfoFile_SPBCGS", 1)) return(1); - } + retval = CVodeSetLinearSolver(cvode_mem, LS, NULL); if (check_retval(&retval, "CVodeSetLinearSolver", 1)) return 1; @@ -378,22 +347,12 @@ int main(int argc, char* argv[]) printf(" ---------"); printf(" \n| SPTFQMR |\n"); printf(" ---------\n"); - if (monitor) { - fprintf(infofp, " ---------"); - fprintf(infofp, " \n| SPTFQMR |\n"); - fprintf(infofp, " ---------\n"); - } /* Call SUNLinSol_SPTFQMR to specify the linear solver SPTFQMR with left preconditioning and the default maximum Krylov dimension */ LS = SUNLinSol_SPTFQMR(u, SUN_PREC_LEFT, 0, sunctx); if (check_retval((void *)LS, "SUNLinSol_SPTFQMR", 0)) return(1); - if (monitor) { - retval = SUNLinSolSetPrintLevel_SPTFQMR(LS, 1); - if (check_retval(&retval, "SUNLinSolSetPrintLevel_SPTFQMR", 1)) return(1); - retval = SUNLinSolSetInfoFile_SPTFQMR(LS, infofp); - if (check_retval(&retval, "SUNLinSolSetInfoFile_SPTFQMR", 1)) return(1); - } + retval = CVodeSetLinearSolver(cvode_mem, LS, NULL); if (check_retval(&retval, "CVodeSetLinearSolver", 1)) return 1; @@ -439,12 +398,12 @@ int main(int argc, char* argv[]) } /* END: Loop through SPGMR, SPBCG and SPTFQMR linear solver modules */ /* Free memory */ - if (monitor) fclose(infofp); N_VDestroy(u); FreeUserData(data); CVodeFree(&cvode_mem); SUNLinSolFree(LS); SUNNonlinSolFree(NLS); + SUNLogger_Destroy(&logger); SUNContext_Free(&sunctx); return(0); diff --git a/examples/cvodes/serial/cvsRoberts_ASAi_dns_constraints.c b/examples/cvodes/serial/cvsRoberts_ASAi_dns_constraints.c index 79c9d8038f..21538d367d 100644 --- a/examples/cvodes/serial/cvsRoberts_ASAi_dns_constraints.c +++ b/examples/cvodes/serial/cvsRoberts_ASAi_dns_constraints.c @@ -61,7 +61,6 @@ #include /* access to serial N_Vector */ #include /* access to dense SUNMatrix */ #include /* access to dense SUNLinearSolver */ -#include /* access to CVDls interface */ #include /* defs. of realtype, sunindextype */ #include /* defs. of SUNRabs, SUNRexp, etc. */ diff --git a/examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.cpp b/examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.cpp index e3f1b20711..64445583a5 100644 --- a/examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.cpp +++ b/examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.cpp @@ -495,7 +495,7 @@ static int SetupLS(N_Vector u, void *user_data, SUNContext sunctx) // Access problem data UserData *udata = (UserData *) user_data; - int prectype = PREC_RIGHT; + int prectype = SUN_PREC_RIGHT; // Create linear solver udata->LS = SUNLinSol_PCG(u, prectype, udata->liniters, sunctx); @@ -1282,7 +1282,6 @@ static int InitUserData(UserData *udata) // Linear solver and preconditioner options - udata->lsinfo = false; // output residual history udata->liniters = 20; // max linear iterations udata->epslin = RCONST(1.e-8); // relative stopping tolerance @@ -1412,10 +1411,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) udata->maxits = stoi((*argv)[arg_idx++]); } // Linear solver settings - else if (arg == "--lsinfo") - { - udata->lsinfo = true; - } else if (arg == "--liniters") { udata->liniters = stoi((*argv)[arg_idx++]); @@ -1488,7 +1483,6 @@ static void InputHelp() cout << " --damping : damping for Anderson Acceleration " << endl; cout << " --orthaa : orthogonalization routine used in Anderson Acceleration " << endl; cout << " --C : scalar value on exponential term " << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --pfmg_relax : relaxtion type in PFMG" << endl; diff --git a/examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.hpp b/examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.hpp index dfdb220127..fb5a8c6ce1 100644 --- a/examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.hpp +++ b/examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.hpp @@ -108,7 +108,6 @@ struct UserData int maxits; // max number of fixed point iterations // Linear solver and preconditioner settings - bool lsinfo; // output residual history int liniters; // number of linear iterations int msbp; // max number of steps between preconditioner setups realtype epslin; // linear solver tolerance factor diff --git a/examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.cpp b/examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.cpp index 1cb74e17ca..1c0f12a76c 100644 --- a/examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.cpp +++ b/examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.cpp @@ -688,7 +688,7 @@ static int SetupLS(N_Vector u, void *user_data, SUNContext sunctx) // Access problem data UserData *udata = (UserData *) user_data; - int prectype = PREC_RIGHT; + int prectype = SUN_PREC_RIGHT; // Create linear solver udata->LS = SUNLinSol_PCG(u, prectype, udata->liniters, sunctx); @@ -1452,7 +1452,6 @@ static int InitUserData(UserData *udata) // Linear solver and preconditioner options - udata->lsinfo = false; // output residual history udata->liniters = 20; // max linear iterations udata->epslin = RCONST(1.e-8); // use default (0.05) @@ -1629,10 +1628,6 @@ static int ReadInputs(int *argc, char ***argv, UserData *udata, bool outproc) udata->c_int = stoi((*argv)[arg_idx++]); } // Linear solver settings - else if (arg == "--lsinfo") - { - udata->lsinfo = true; - } else if (arg == "--liniters") { udata->liniters = stoi((*argv)[arg_idx++]); @@ -1756,7 +1751,6 @@ static void InputHelp() cout << " --damping : damping for Anderson Acceleration " << endl; cout << " --orthaa : orthogonalization routine used in Anderson Acceleration " << endl; cout << " --c : nonlinear function parameter" << endl; - cout << " --lsinfo : output residual history" << endl; cout << " --liniters : max number of iterations" << endl; cout << " --epslin : linear tolerance factor" << endl; cout << " --pfmg_relax : relaxtion type in PFMG" << endl; diff --git a/examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.hpp b/examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.hpp index 409ae447a3..723b93e8f7 100644 --- a/examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.hpp +++ b/examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.hpp @@ -139,7 +139,6 @@ struct UserData int maxits; // max number of fixed point iterations // Linear solver and preconditioner settings - bool lsinfo; // output residual history int liniters; // number of linear iterations int msbp; // max number of steps between preconditioner setups realtype epslin; // linear solver tolerance factor diff --git a/examples/kinsol/F2003_serial/kinLaplace_picard_kry_f2003.f90 b/examples/kinsol/F2003_serial/kinLaplace_picard_kry_f2003.f90 index 0f34228822..b6cd3d643b 100644 --- a/examples/kinsol/F2003_serial/kinLaplace_picard_kry_f2003.f90 +++ b/examples/kinsol/F2003_serial/kinLaplace_picard_kry_f2003.f90 @@ -215,7 +215,6 @@ program main type(SUNLinearSolver), pointer :: sunlinsol_LS ! sundials linear solver type(c_ptr) :: kmem ! KINSOL memory - type(c_ptr) :: infofp ! info file ! solution and scaling vectors; nx, ny are set in the prob_mod module real(c_double), dimension(nx,ny) :: u, scale @@ -296,22 +295,6 @@ program main stop 1 end if - ! Set information file - - infofp = FSUNDIALSFileOpen("KINSOL.log", "w"); - - ierr = FKINSetInfoFile(kmem, infofp); - if (ierr /= 0) then - print *, 'Error in FKINSetInfoFile, ierr = ', ierr, '; halting' - stop 1 - end if - - ierr = FKINSetPrintLevel(kmem, 3); - if (ierr /= 0) then - print *, 'Error in FKINSetPrintLevel, ierr = ', ierr, '; halting' - stop 1 - end if - ! ------------------------- ! Create a linear solver @@ -372,7 +355,6 @@ program main call PrintFinalStats(kmem) ! clean up - call FSUNDIALSFileClose(infofp) call FKINFree(kmem) ierr = FSUNLinSolFree(sunlinsol_LS) call FN_VDestroy(sunvec_u) diff --git a/examples/kinsol/serial/kinAnalytic_fp.c b/examples/kinsol/serial/kinAnalytic_fp.c index 9fedd989c7..fb3dbe2106 100644 --- a/examples/kinsol/serial/kinAnalytic_fp.c +++ b/examples/kinsol/serial/kinAnalytic_fp.c @@ -231,11 +231,7 @@ int main(int argc, char *argv[]) infofp = fopen("kinsol.log", "w"); if (check_retval((void *)infofp, "fopen", 0)) return(1); - retval = KINSetInfoFile(kmem, infofp); - if (check_retval(&retval, "KINSetInfoFile", 1)) return(1); - retval = KINSetPrintLevel(kmem, 1); - if (check_retval(&retval, "KINSetPrintLevel", 1)) return(1); /* ------------- * Initial guess diff --git a/examples/kinsol/serial/kinLaplace_picard_kry.c b/examples/kinsol/serial/kinLaplace_picard_kry.c index 30b18a92ba..7edd10866b 100644 --- a/examples/kinsol/serial/kinLaplace_picard_kry.c +++ b/examples/kinsol/serial/kinLaplace_picard_kry.c @@ -144,11 +144,7 @@ int main() infofp = fopen("KINSOL.log", "w"); - retval = KINSetInfoFile(kmem, infofp); - if (check_retval(&retval, "KINSetInfoFile", 1)) return(1); - retval = KINSetPrintLevel(kmem, 3); - if (check_retval(&retval, "KINSetPrintLevel", 1)) return(1); /* ---------------------- * Create SUNLinearSolver diff --git a/examples/sunlinsol/test_sunlinsol.h b/examples/sunlinsol/test_sunlinsol.h index d816f613de..7ae8aa000c 100644 --- a/examples/sunlinsol/test_sunlinsol.h +++ b/examples/sunlinsol/test_sunlinsol.h @@ -38,8 +38,8 @@ int Test_SUNLinSolSpace(SUNLinearSolver S, int myid); int Test_SUNLinSolNumIters(SUNLinearSolver S, int myid); int Test_SUNLinSolResNorm(SUNLinearSolver S, int myid); int Test_SUNLinSolResid(SUNLinearSolver S, int myid); -int Test_SUNLinSolSetATimes(SUNLinearSolver S, void* ATdata, ATimesFn ATimes, int myid); -int Test_SUNLinSolSetPreconditioner(SUNLinearSolver S, void* Pdata, PSetupFn PSetup, PSolveFn PSolve, int myid); +int Test_SUNLinSolSetATimes(SUNLinearSolver S, void* ATdata, SUNATimesFn ATimes, int myid); +int Test_SUNLinSolSetPreconditioner(SUNLinearSolver S, void* Pdata, SUNPSetupFn PSetup, SUNPSolveFn PSolve, int myid); int Test_SUNLinSolSetScalingVectors(SUNLinearSolver S, N_Vector s1, N_Vector s2, int myid); int Test_SUNLinSolSetZeroGuess(SUNLinearSolver S, int myid); int Test_SUNLinSolInitialize(SUNLinearSolver S, int myid); diff --git a/include/arkode/arkode_arkstep.h b/include/arkode/arkode_arkstep.h index 666318568c..4e090943c2 100644 --- a/include/arkode/arkode_arkstep.h +++ b/include/arkode/arkode_arkstep.h @@ -63,53 +63,6 @@ static const int ARKSTEP_DEFAULT_ARK_ITABLE_3 = ARKODE_ARK324L2SA_DIRK_4_2_3; static const int ARKSTEP_DEFAULT_ARK_ITABLE_4 = ARKODE_ARK436L2SA_DIRK_6_3_4; static const int ARKSTEP_DEFAULT_ARK_ITABLE_5 = ARKODE_ARK548L2SA_DIRK_8_4_5; -#ifndef DEFAULT_ERK_2 -/* DEPRECATED DEFAULT_ERK_2: use ARKSTEP_ERK_DEFAULT_2 */ -#define DEFAULT_ERK_2 ARKSTEP_ERK_DEFAULT_2 -#endif - -#ifndef DEFAULT_ERK_3 -/* DEPRECATED DEFAULT_ERK_3: use ARKSTEP_ERK_DEFAULT_3 */ -#define DEFAULT_ERK_3 ARKSTEP_ERK_DEFAULT_3 -#endif - -#ifndef DEFAULT_ERK_4 -/* DEPRECATED DEFAULT_ERK_4: use ARKSTEP_ERK_DEFAULT_4 */ -#define DEFAULT_ERK_4 ARKSTEP_ERK_DEFAULT_4 -#endif - -#ifndef DEFAULT_ERK_5 -/* DEPRECATED DEFAULT_ERK_5: use ARKSTEP_ERK_DEFAULT_5 */ -#define DEFAULT_ERK_5 ARKSTEP_ERK_DEFAULT_5 -#endif - -#ifndef DEFAULT_ERK_6 -/* DEPRECATED DEFAULT_ERK_6: use ARKSTEP_ERK_DEFAULT_6 */ -#define DEFAULT_ERK_6 ARKSTEP_ERK_DEFAULT_6 -#endif - -#ifndef DEFAULT_ERK_8 -/* DEPRECATED DEFAULT_ERK_8: use ARKSTEP_ERK_DEFAULT_8 */ -#define DEFAULT_ERK_8 ARKSTEP_ERK_DEFAULT_8 -#endif - -/* ImEx */ -/* DEPRECATED DEFAULT_ARK_ETABLE_3: use ARKSTEP_DEFAULT_ARK_ETABLE_3 */ -#define DEFAULT_ARK_ETABLE_3 ARKSTEP_DEFAULT_ARK_ETABLE_3 -/* DEPRECATED DEFAULT_ARK_ETABLE_4: use ARKSTEP_DEFAULT_ARK_ETABLE_4 */ -#define DEFAULT_ARK_ETABLE_4 ARKSTEP_DEFAULT_ARK_ETABLE_4 -/* DEPRECATED DEFAULT_ARK_ETABLE_5: use ARKSTEP_DEFAULT_ARK_ETABLE_4 */ -#define DEFAULT_ARK_ETABLE_5 ARKSTEP_DEFAULT_ARK_ETABLE_5 -/* DEPRECATED DEFAULT_ARK_ITABLE_3: use ARKSTEP_DEFAULT_ARK_ITABLE_3 */ -#define DEFAULT_ARK_ITABLE_3 ARKSTEP_DEFAULT_ARK_ITABLE_3 -/* DEPRECATED DEFAULT_ARK_ITABLE_4: use ARKSTEP_DEFAULT_ARK_ITABLE_4 */ -#define DEFAULT_ARK_ITABLE_4 ARKSTEP_DEFAULT_ARK_ITABLE_4 -/* DEPRECATED DEFAULT_ARK_ITABLE_5: use ARKSTEP_DEFAULT_ARK_ITABLE_5 */ -#define DEFAULT_ARK_ITABLE_5 ARKSTEP_DEFAULT_ARK_ITABLE_5 - -/* backwards-compatibility */ -typedef ARKStagePredictFn ARKStepStagePredictFn; - /* ------------------- * Exported Functions * ------------------- */ @@ -267,8 +220,6 @@ SUNDIALS_EXPORT int ARKStepSetErrFile(void *arkode_mem, FILE *errfp); SUNDIALS_EXPORT int ARKStepSetUserData(void *arkode_mem, void *user_data); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDIALS_LOGGER instead") -int ARKStepSetDiagnostics(void *arkode_mem, FILE *diagfp); SUNDIALS_EXPORT int ARKStepSetPostprocessStepFn(void *arkode_mem, ARKPostProcessFn ProcessStep); diff --git a/include/arkode/arkode_butcher_dirk.h b/include/arkode/arkode_butcher_dirk.h index aecaf16a82..0dd8a788ea 100644 --- a/include/arkode/arkode_butcher_dirk.h +++ b/include/arkode/arkode_butcher_dirk.h @@ -23,49 +23,6 @@ extern "C" { #endif - -/* Butcher table accessor IDs - ERK: 0 - 99 - DIRK: 100 - 199 - MRI: 200 - 299 */ - -/* DEPRECATED SDIRK_2_1_2: use ARKODE_SDIRK_2_1_2 */ -#define SDIRK_2_1_2 100 -/* DEPRECATED BILLINGTON_3_3_2: use ARKODE_BILLINGTON_3_3_2 */ -#define BILLINGTON_3_3_2 101 -/* DEPRECATED TRBDF2_3_3_2: use ARKODE_TRBDF2_3_3_2 */ -#define TRBDF2_3_3_2 102 -/* DEPRECATED KVAERNO_4_2_3: use ARKODE_KVAERNO_4_2_3 */ -#define KVAERNO_4_2_3 103 -/* DEPRECATED ARK324L2SA_DIRK_4_2_3: use ARKODE_ARK324L2SA_DIRK_4_2_3 */ -#define ARK324L2SA_DIRK_4_2_3 104 -/* DEPRECATED CASH_5_2_4: use ARKODE_CASH_5_2_4 */ -#define CASH_5_2_4 105 -/* DEPRECATED CASH_5_3_4: use ARKODE_CASH_5_3_4 */ -#define CASH_5_3_4 106 -/* DEPRECATED SDIRK_5_3_4: use ARKODE_SDIRK_5_3_4 */ -#define SDIRK_5_3_4 107 -/* DEPRECATED KVAERNO_5_3_4: use ARKODE_KVAERNO_5_3_4 */ -#define KVAERNO_5_3_4 108 -/* DEPRECATED ARK436L2SA_DIRK_6_3_4: use ARKODE_ARK436L2SA_DIRK_6_3_4 */ -#define ARK436L2SA_DIRK_6_3_4 109 -/* DEPRECATED KVAERNO_7_4_5: use ARKODE_KVAERNO_7_4_5 */ -#define KVAERNO_7_4_5 110 -/* DEPRECATED ARK548L2SA_DIRK_8_4_5: use ARKODE_ARK548L2SA_DIRK_8_4_5 */ -#define ARK548L2SA_DIRK_8_4_5 111 -/* DEPRECATED ARK437L2SA_DIRK_7_3_4: use ARKODE_ARK437L2SA_DIRK_7_3_4 */ -#define ARK437L2SA_DIRK_7_3_4 112 -/* DEPRECATED ARK548L2SAb_DIRK_8_4_5: use ARKODE_ARK548L2SAb_DIRK_8_4_5 */ -#define ARK548L2SAb_DIRK_8_4_5 113 - -/* Utility #defines to ensure valid input IDs for DIRK tables */ - -/* DEPRECATED MIN_DIRK_NUM: use ARKODE_MIN_DIRK_NUM */ -#define MIN_DIRK_NUM 100 - -/* DEPRECATED MAX_DIRK_NUM: use ARKODE_MAX_DIRK_NUM */ -#define MAX_DIRK_NUM 113 - typedef enum { ARKODE_DIRK_NONE = -1, /* ensure enum is signed int */ ARKODE_MIN_DIRK_NUM = 100, diff --git a/include/arkode/arkode_butcher_erk.h b/include/arkode/arkode_butcher_erk.h index cd552f58e3..e0c3c546a1 100644 --- a/include/arkode/arkode_butcher_erk.h +++ b/include/arkode/arkode_butcher_erk.h @@ -23,49 +23,6 @@ extern "C" { #endif -/* Butcher table accessor IDs - ERK: 0 - 99 - DIRK: 100 - 199 - MRI: 200 - 299 */ - -/* DEPRECATED HEUN_EULER_2_1_2: use ARKODE_HEUN_EULER_2_1_2 */ -#define HEUN_EULER_2_1_2 0 -/* DEPRECATED BOGACKI_SHAMPINE_4_2_3: use ARKODE_BOGACKI_SHAMPINE_4_2_3 */ -#define BOGACKI_SHAMPINE_4_2_3 1 -/* DEPRECATED ARK324L2SA_ERK_4_2_3: use ARKODE_ARK324L2SA_ERK_4_2_3 */ -#define ARK324L2SA_ERK_4_2_3 2 -/* DEPRECATED ZONNEVELD_5_3_4: use ARKODE_ZONNEVELD_5_3_4 */ -#define ZONNEVELD_5_3_4 3 -/* DEPRECATED ARK436L2SA_ERK_6_3_4: use ARKODE_ARK436L2SA_ERK_6_3_4 */ -#define ARK436L2SA_ERK_6_3_4 4 -/* DEPRECATED SAYFY_ABURUB_6_3_4: use ARKODE_SAYFY_ABURUB_6_3_4 */ -#define SAYFY_ABURUB_6_3_4 5 -/* DEPRECATED CASH_KARP_6_4_5: use ARKODE_CASH_KARP_6_4_5 */ -#define CASH_KARP_6_4_5 6 -/* DEPRECATED FEHLBERG_6_4_5: use ARKODE_FEHLBERG_6_4_5 */ -#define FEHLBERG_6_4_5 7 -/* DEPRECATED DORMAND_PRINCE_7_4_5: use ARKODE_DORMAND_PRINCE_7_4_5 */ -#define DORMAND_PRINCE_7_4_5 8 -/* DEPRECATED ARK548L2SA_ERK_8_4_5: use ARKODE_ARK548L2SA_ERK_8_4_5 */ -#define ARK548L2SA_ERK_8_4_5 9 -/* DEPRECATED VERNER_8_5_6: use ARKODE_VERNER_8_5_6 */ -#define VERNER_8_5_6 10 -/* DEPRECATED FEHLBERG_13_7_8: use ARKODE_FEHLBERG_13_7_8 */ -#define FEHLBERG_13_7_8 11 -/* DEPRECATED KNOTH_WOLKE_3_3: use ARKODE_KNOTH_WOLKE_3_3 */ -#define KNOTH_WOLKE_3_3 12 -/* DEPRECATED ARK437L2SA_ERK_7_3_4: use ARKODE_ARK437L2SA_ERK_7_3_4 */ -#define ARK437L2SA_ERK_7_3_4 13 -/* DEPRECATED ARK548L2SAb_ERK_8_4_5: use ARKODE_ARK548L2SAb_ERK_8_4_5 */ -#define ARK548L2SAb_ERK_8_4_5 14 - -/* Utility #defines to ensure valid input IDs for ERK tables */ - -/* DEPRECATED MIN_ERK_NUM: use ARKODE_MIN_ERK_NUM */ -#define MIN_ERK_NUM 0 -/* DEPRECATED MAX_ERK_NUM: use ARKODE_MAX_ERK_NUM */ -#define MAX_ERK_NUM 21 - typedef enum { ARKODE_ERK_NONE = -1, /* ensure enum is signed int */ ARKODE_MIN_ERK_NUM = 0, diff --git a/include/arkode/arkode_erkstep.h b/include/arkode/arkode_erkstep.h index 304c1925c2..b0fc8636dd 100644 --- a/include/arkode/arkode_erkstep.h +++ b/include/arkode/arkode_erkstep.h @@ -42,36 +42,6 @@ static const int ERKSTEP_DEFAULT_7 = ARKODE_VERNER_10_6_7; static const int ERKSTEP_DEFAULT_8 = ARKODE_FEHLBERG_13_7_8; static const int ERKSTEP_DEFAULT_9 = ARKODE_VERNER_16_8_9; -#ifndef DEFAULT_ERK_2 -/* DEPRECATED DEFAULT_ERK_2: use ERKSTEP_DEFAULT_2 */ -#define DEFAULT_ERK_2 ERKSTEP_DEFAULT_2 -#endif - -#ifndef DEFAULT_ERK_3 -/* DEPRECATED DEFAULT_ERK_3: use ERKSTEP_DEFAULT_3 */ -#define DEFAULT_ERK_3 ERKSTEP_DEFAULT_3 -#endif - -#ifndef DEFAULT_ERK_4 -/* DEPRECATED DEFAULT_ERK_4: use ERKSTEP_DEFAULT_4 */ -#define DEFAULT_ERK_4 ERKSTEP_DEFAULT_4 -#endif - -#ifndef DEFAULT_ERK_5 -/* DEPRECATED DEFAULT_ERK_5: use ERKSTEP_DEFAULT_5 */ -#define DEFAULT_ERK_5 ERKSTEP_DEFAULT_5 -#endif - -#ifndef DEFAULT_ERK_6 -/* DEPRECATED DEFAULT_ERK_6: use ERKSTEP_DEFAULT_6 */ -#define DEFAULT_ERK_6 ERKSTEP_DEFAULT_6 -#endif - -#ifndef DEFAULT_ERK_8 -/* DEPRECATED DEFAULT_ERK_8: use ERKSTEP_DEFAULT_8 */ -#define DEFAULT_ERK_8 ERKSTEP_DEFAULT_8 -#endif - /* ------------------- * Exported Functions * ------------------- */ @@ -180,8 +150,6 @@ SUNDIALS_EXPORT int ERKStepSetErrFile(void *arkode_mem, FILE *errfp); SUNDIALS_EXPORT int ERKStepSetUserData(void *arkode_mem, void *user_data); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDIALS_LOGGER instead") -int ERKStepSetDiagnostics(void *arkode_mem, FILE *diagfp); SUNDIALS_EXPORT int ERKStepSetPostprocessStepFn(void *arkode_mem, ARKPostProcessFn ProcessStep); diff --git a/include/arkode/arkode_mristep.h b/include/arkode/arkode_mristep.h index d4d889813f..fbfb91c349 100644 --- a/include/arkode/arkode_mristep.h +++ b/include/arkode/arkode_mristep.h @@ -41,38 +41,6 @@ typedef enum { MRISTEP_IMEX } MRISTEP_METHOD_TYPE; - -/* MRI coupling table table accessor IDs: - ERK: 0 - 99 - DIRK: 100 - 199 - MRI: 200 - 299 */ - -/* DEPRECATED MIS_KW3: use ARKODE_MIS_KW3 */ -#define MIS_KW3 200 -/* DEPRECATED MRI_GARK_ERK33a: use ARKODE_MRI_GARK_ERK33a */ -#define MRI_GARK_ERK33a 201 -/* DEPRECATED MRI_GARK_ERK45a: use ARKODE_MRI_GARK_ERK45a */ -#define MRI_GARK_ERK45a 202 -/* DEPRECATED MRI_GARK_IRK21a: use ARKODE_MRI_GARK_IRK21a */ -#define MRI_GARK_IRK21a 203 -/* DEPRECATED MRI_GARK_ESDIRK34a: use ARKODE_MRI_GARK_ESDIRK34a */ -#define MRI_GARK_ESDIRK34a 204 -/* DEPRECATED MRI_GARK_ESDIRK46a: use ARKODE_MRI_GARK_ESDIRK46a */ -#define MRI_GARK_ESDIRK46a 205 -/* DEPRECATED IMEX_MRI_GARK3a: use ARKODE_IMEX_MRI_GARK3a */ -#define IMEX_MRI_GARK3a 206 -/* DEPRECATED IMEX_MRI_GARK3b: use ARKODE_IMEX_MRI_GARK3b */ -#define IMEX_MRI_GARK3b 207 -/* DEPRECATED IMEX_MRI_GARK4: use ARKODE_IMEX_MRI_GARK4 */ -#define IMEX_MRI_GARK4 208 - -/* Utility #defines to ensure valid input IDs for MRI tables */ - -/* DEPRECATED MIN_MRI_NUM: use ARKODE_MIN_MRI_NUM */ -#define MIN_MRI_NUM 200 -/* DEPRECATED MAX_MRI_NUM: use ARKODE_MAX_MRI_NUM */ -#define MAX_MRI_NUM 208 - typedef enum { ARKODE_MRI_NONE = -1, /* ensure enum is signed int */ ARKODE_MIN_MRI_NUM = 200, @@ -100,23 +68,6 @@ static const int MRISTEP_DEFAULT_IMPL_SD_4 = ARKODE_MRI_GARK_ESDIRK46a; static const int MRISTEP_DEFAULT_IMEX_SD_3 = ARKODE_IMEX_MRI_GARK3b; static const int MRISTEP_DEFAULT_IMEX_SD_4 = ARKODE_IMEX_MRI_GARK4; -/* DEPRECATED DEFAULT_MRI_TABLE_3: use MRISTEP_DEFAULT_3 */ -#define DEFAULT_MRI_TABLE_3 MRISTEP_DEFAULT_3 /* backwards-compatibility */ -/* DEPRECATED DEFAULT_EXPL_MRI_TABLE_3: use MRISTEP_DEFAULT_EXPL_3 */ -#define DEFAULT_EXPL_MRI_TABLE_3 MRISTEP_DEFAULT_EXPL_3 -/* DEPRECATED DEFAULT_EXPL_MRI_TABLE_4: use MRISTEP_DEFAULT_EXPL_4 */ -#define DEFAULT_EXPL_MRI_TABLE_4 MRISTEP_DEFAULT_EXPL_4 -/* DEPRECATED DEFAULT_IMPL_SD_TABLE_2: use MRISTEP_DEFAULT_IMPL_SD_2 */ -#define DEFAULT_IMPL_SD_MRI_TABLE_2 MRISTEP_DEFAULT_IMPL_SD_2 -/* DEPRECATED DEFAULT_IMPL_SD_TABLE_3: use MRISTEP_DEFAULT_IMPL_SD_3 */ -#define DEFAULT_IMPL_SD_MRI_TABLE_3 MRISTEP_DEFAULT_IMPL_SD_3 -/* DEPRECATED DEFAULT_IMPL_SD_TABLE_4: use MRISTEP_DEFAULT_IMPL_SD_4 */ -#define DEFAULT_IMPL_SD_MRI_TABLE_4 MRISTEP_DEFAULT_IMPL_SD_4 -/* DEPRECATED DEFAULT_IMEX_SD_TABLE_3: use MRISTEP_DEFAULT_IMEX_SD_3 */ -#define DEFAULT_IMEX_SD_MRI_TABLE_3 MRISTEP_DEFAULT_IMEX_SD_3 -/* DEPRECATED DEFAULT_IMEX_SD_TABLE_4: use MRISTEP_DEFAULT_IMEX_SD_4 */ -#define DEFAULT_IMEX_SD_MRI_TABLE_4 MRISTEP_DEFAULT_IMEX_SD_4 - /* ------------------------------------ * MRIStep Inner Stepper Function Types * ------------------------------------ */ @@ -268,8 +219,6 @@ SUNDIALS_EXPORT int MRIStepSetErrFile(void *arkode_mem, FILE *errfp); SUNDIALS_EXPORT int MRIStepSetUserData(void *arkode_mem, void *user_data); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDIALS_LOGGER instead") -int MRIStepSetDiagnostics(void *arkode_mem, FILE *diagfp); SUNDIALS_EXPORT int MRIStepSetPostprocessStepFn(void *arkode_mem, ARKPostProcessFn ProcessStep); SUNDIALS_EXPORT int MRIStepSetPostprocessStageFn(void *arkode_mem, diff --git a/include/cvode/cvode_direct.h b/include/cvode/cvode_direct.h deleted file mode 100644 index 88568252d4..0000000000 --- a/include/cvode/cvode_direct.h +++ /dev/null @@ -1,67 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Header file for the deprecated direct linear solver interface in - * CVODE; these routines now just wrap the updated CVODE generic - * linear solver interface in cvode_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _CVDLS_H -#define _CVDLS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*================================================================= - Function Types (typedefs for equivalent types in cvode_ls.h) - =================================================================*/ - -typedef CVLsJacFn CVDlsJacFn; - -/*=================================================================== - Exported Functions (wrappers for equivalent routines in cvode_ls.h) - ===================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetLinearSolver instead") -int CVDlsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS, - SUNMatrix A); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetJacFn instead") -int CVDlsSetJacFn(void *cvode_mem, CVDlsJacFn jac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLinWorkSpace instead") -int CVDlsGetWorkSpace(void *cvode_mem, long int *lenrwLS, - long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumJacEvals instead") -int CVDlsGetNumJacEvals(void *cvode_mem, long int *njevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumLinRhsEvals instead") -int CVDlsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLastLinFlag instead") -int CVDlsGetLastFlag(void *cvode_mem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLinReturnFlagName instead") -char *CVDlsGetReturnFlagName(long int flag); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/cvode/cvode_spils.h b/include/cvode/cvode_spils.h deleted file mode 100644 index 2c60f794d4..0000000000 --- a/include/cvode/cvode_spils.h +++ /dev/null @@ -1,92 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Header file for the deprecated Scaled, Preconditioned Iterative - * Linear Solver interface in CVODE; these routines now just wrap - * the updated CVODE generic linear solver interface in cvode_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _CVSPILS_H -#define _CVSPILS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*=============================================================== - Function Types (typedefs for equivalent types in cvode_ls.h) - ===============================================================*/ - -typedef CVLsPrecSetupFn CVSpilsPrecSetupFn; -typedef CVLsPrecSolveFn CVSpilsPrecSolveFn; -typedef CVLsJacTimesSetupFn CVSpilsJacTimesSetupFn; -typedef CVLsJacTimesVecFn CVSpilsJacTimesVecFn; - -/*==================================================================== - Exported Functions (wrappers for equivalent routines in cvode_ls.h) - ====================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetLinearSolver instead") -int CVSpilsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetEpsLin instead") -int CVSpilsSetEpsLin(void *cvode_mem, realtype eplifac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetPreconditioner instead") -int CVSpilsSetPreconditioner(void *cvode_mem, CVSpilsPrecSetupFn pset, - CVSpilsPrecSolveFn psolve); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetJacTimes instead") -int CVSpilsSetJacTimes(void *cvode_mem, CVSpilsJacTimesSetupFn jtsetup, - CVSpilsJacTimesVecFn jtimes); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLinWorkSpace instead") -int CVSpilsGetWorkSpace(void *cvode_mem, long int *lenrwLS, - long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumPrecEvals instead") -int CVSpilsGetNumPrecEvals(void *cvode_mem, long int *npevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumPrecSolves instead") -int CVSpilsGetNumPrecSolves(void *cvode_mem, long int *npsolves); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumLinIters instead") -int CVSpilsGetNumLinIters(void *cvode_mem, long int *nliters); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumConvFails instead") -int CVSpilsGetNumConvFails(void *cvode_mem, long int *nlcfails); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumJTSetupEvals instead") -int CVSpilsGetNumJTSetupEvals(void *cvode_mem, long int *njtsetups); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumJtimesEvals instead") -int CVSpilsGetNumJtimesEvals(void *cvode_mem, long int *njvevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumLinRhsEvals instead") -int CVSpilsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLastLinFlag instead") -int CVSpilsGetLastFlag(void *cvode_mem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLinReturnFlagName instead") -char *CVSpilsGetReturnFlagName(long int flag); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/cvodes/cvodes_direct.h b/include/cvodes/cvodes_direct.h deleted file mode 100644 index a1b8a02cbe..0000000000 --- a/include/cvodes/cvodes_direct.h +++ /dev/null @@ -1,79 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Header file for the deprecated direct linear solver interface in - * CVODES; these routines now just wrap the updated CVODE generic - * linear solver interface in cvodes_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _CVSDLS_H -#define _CVSDLS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*================================================================= - Function Types (typedefs for equivalent types in cvodes_ls.h) - =================================================================*/ - -typedef CVLsJacFn CVDlsJacFn; -typedef CVLsJacFnB CVDlsJacFnB; -typedef CVLsJacFnBS CVDlsJacFnBS; - -/*==================================================================== - Exported Functions (wrappers for equivalent routines in cvodes_ls.h) - ====================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetLinearSolver instead") -int CVDlsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS, - SUNMatrix A); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetJacFn instead") -int CVDlsSetJacFn(void *cvode_mem, CVDlsJacFn jac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLinWorkSpace instead") -int CVDlsGetWorkSpace(void *cvode_mem, long int *lenrwLS, - long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumJacEvals instead") -int CVDlsGetNumJacEvals(void *cvode_mem, long int *njevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumLinRhsEvals instead") -int CVDlsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLastLinFlag instead") -int CVDlsGetLastFlag(void *cvode_mem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLinReturnFlagName instead") -char *CVDlsGetReturnFlagName(long int flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetLinearSolverB instead") -int CVDlsSetLinearSolverB(void *cvode_mem, int which, - SUNLinearSolver LS, SUNMatrix A); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetJacFnB instead") -int CVDlsSetJacFnB(void *cvode_mem, int which, CVDlsJacFnB jacB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetJacFnBS instead") -int CVDlsSetJacFnBS(void *cvode_mem, int which, CVDlsJacFnBS jacBS); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/cvodes/cvodes_spils.h b/include/cvodes/cvodes_spils.h deleted file mode 100644 index 76b986d880..0000000000 --- a/include/cvodes/cvodes_spils.h +++ /dev/null @@ -1,127 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Header file for the deprecated Scaled, Preconditioned Iterative - * Linear Solver interface in CVODES; these routines now just wrap - * the updated CVODES generic linear solver interface in cvodes_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _CVSSPILS_H -#define _CVSSPILS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*=============================================================== - Function Types (typedefs for equivalent types in cvodes_ls.h) - ===============================================================*/ - -typedef CVLsPrecSetupFn CVSpilsPrecSetupFn; -typedef CVLsPrecSolveFn CVSpilsPrecSolveFn; -typedef CVLsJacTimesSetupFn CVSpilsJacTimesSetupFn; -typedef CVLsJacTimesVecFn CVSpilsJacTimesVecFn; -typedef CVLsPrecSetupFnB CVSpilsPrecSetupFnB; -typedef CVLsPrecSetupFnBS CVSpilsPrecSetupFnBS; -typedef CVLsPrecSolveFnB CVSpilsPrecSolveFnB; -typedef CVLsPrecSolveFnBS CVSpilsPrecSolveFnBS; -typedef CVLsJacTimesSetupFnB CVSpilsJacTimesSetupFnB; -typedef CVLsJacTimesSetupFnBS CVSpilsJacTimesSetupFnBS; -typedef CVLsJacTimesVecFnB CVSpilsJacTimesVecFnB; -typedef CVLsJacTimesVecFnBS CVSpilsJacTimesVecFnBS; - -/*==================================================================== - Exported Functions (wrappers for equivalent routines in cvodes_ls.h) - ====================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetLinearSolver instead") -int CVSpilsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetEpsLin instead") -int CVSpilsSetEpsLin(void *cvode_mem, realtype eplifac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetPreconditioner instead") -int CVSpilsSetPreconditioner(void *cvode_mem, CVSpilsPrecSetupFn pset, - CVSpilsPrecSolveFn psolve); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetJacTimes instead") -int CVSpilsSetJacTimes(void *cvode_mem, CVSpilsJacTimesSetupFn jtsetup, - CVSpilsJacTimesVecFn jtimes); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLinWorkSpace instead") -int CVSpilsGetWorkSpace(void *cvode_mem, long int *lenrwLS, - long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumPrecEvals instead") -int CVSpilsGetNumPrecEvals(void *cvode_mem, long int *npevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumPrecSolves instead") -int CVSpilsGetNumPrecSolves(void *cvode_mem, long int *npsolves); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumLinIters instead") -int CVSpilsGetNumLinIters(void *cvode_mem, long int *nliters); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumConvFails instead") -int CVSpilsGetNumConvFails(void *cvode_mem, long int *nlcfails); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumJTSetupEvals instead") -int CVSpilsGetNumJTSetupEvals(void *cvode_mem, long int *njtsetups); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumJtimesEvals instead") -int CVSpilsGetNumJtimesEvals(void *cvode_mem, long int *njvevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetNumLinRhsEvals instead") -int CVSpilsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLastLinFlag instead") -int CVSpilsGetLastFlag(void *cvode_mem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeGetLinReturnFlagName instead") -char *CVSpilsGetReturnFlagName(long int flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetLinearSolverB instead") -int CVSpilsSetLinearSolverB(void *cvode_mem, int which, - SUNLinearSolver LS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetEpsLinB instead") -int CVSpilsSetEpsLinB(void *cvode_mem, int which, realtype eplifacB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetPreconditionerB instead") -int CVSpilsSetPreconditionerB(void *cvode_mem, int which, - CVSpilsPrecSetupFnB psetB, - CVSpilsPrecSolveFnB psolveB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetPreconditionerBS instead") -int CVSpilsSetPreconditionerBS(void *cvode_mem, int which, - CVSpilsPrecSetupFnBS psetBS, - CVSpilsPrecSolveFnBS psolveBS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetJacTimesB instead") -int CVSpilsSetJacTimesB(void *cvode_mem, int which, - CVSpilsJacTimesSetupFnB jtsetupB, - CVSpilsJacTimesVecFnB jtimesB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use CVodeSetJacTimesBS instead") -int CVSpilsSetJacTimesBS(void *cvode_mem, int which, - CVSpilsJacTimesSetupFnBS jtsetupBS, - CVSpilsJacTimesVecFnBS jtimesBS); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/ida/ida_direct.h b/include/ida/ida_direct.h deleted file mode 100644 index e45fc3018c..0000000000 --- a/include/ida/ida_direct.h +++ /dev/null @@ -1,68 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * Radu Serban @ 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 - * ----------------------------------------------------------------- - * Header file for the deprecated direct linear solver interface in - * IDA; these routines now just wrap the updated IDA generic - * linear solver interface in ida_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _IDADLS_H -#define _IDADLS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*================================================================= - Function Types (typedefs for equivalent types in ida_ls.h) - =================================================================*/ - -typedef IDALsJacFn IDADlsJacFn; - -/*=================================================================== - Exported Functions (wrappers for equivalent routines in ida_ls.h) - ===================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetLinearSolver instead") -int IDADlsSetLinearSolver(void *ida_mem, SUNLinearSolver LS, - SUNMatrix A); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetJacFn instead") -int IDADlsSetJacFn(void *ida_mem, IDADlsJacFn jac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLinWorkSpace instead") -int IDADlsGetWorkSpace(void *ida_mem, long int *lenrwLS, - long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumJacEvals instead") -int IDADlsGetNumJacEvals(void *ida_mem, long int *njevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumLinResEvals instead") -int IDADlsGetNumResEvals(void *ida_mem, long int *nrevalsLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLastLinFlag instead") -int IDADlsGetLastFlag(void *ida_mem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLinReturnFlagName instead") -char *IDADlsGetReturnFlagName(long int flag); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/ida/ida_spils.h b/include/ida/ida_spils.h deleted file mode 100644 index 2d40789ac2..0000000000 --- a/include/ida/ida_spils.h +++ /dev/null @@ -1,95 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * Alan Hindmarsh, Radu Serban and Aaron Collier @ 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 - * ----------------------------------------------------------------- - * Header file for the deprecated Scaled, Preconditioned Iterative - * Linear Solver interface in IDA; these routines now just wrap - * the updated IDA generic linear solver interface in ida_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _IDASPILS_H -#define _IDASPILS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*=============================================================== - Function Types (typedefs for equivalent types in ida_ls.h) - ===============================================================*/ - -typedef IDALsPrecSetupFn IDASpilsPrecSetupFn; -typedef IDALsPrecSolveFn IDASpilsPrecSolveFn; -typedef IDALsJacTimesSetupFn IDASpilsJacTimesSetupFn; -typedef IDALsJacTimesVecFn IDASpilsJacTimesVecFn; - -/*==================================================================== - Exported Functions (wrappers for equivalent routines in ida_ls.h) - ====================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetLinearSolver instead") -int IDASpilsSetLinearSolver(void *ida_mem, SUNLinearSolver LS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetPreconditioner instead") -int IDASpilsSetPreconditioner(void *ida_mem, IDASpilsPrecSetupFn pset, - IDASpilsPrecSolveFn psolve); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetJacTimes instead") -int IDASpilsSetJacTimes(void *ida_mem, IDASpilsJacTimesSetupFn jtsetup, - IDASpilsJacTimesVecFn jtimes); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetEpsLin instead") -int IDASpilsSetEpsLin(void *ida_mem, realtype eplifac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetIncrementFactor instead") -int IDASpilsSetIncrementFactor(void *ida_mem, realtype dqincfac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLinWorkSpace instead") -int IDASpilsGetWorkSpace(void *ida_mem, long int *lenrwLS, long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumPrecEvals instead") -int IDASpilsGetNumPrecEvals(void *ida_mem, long int *npevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumPrecSolves instead") -int IDASpilsGetNumPrecSolves(void *ida_mem, long int *npsolves); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumLinIters instead") -int IDASpilsGetNumLinIters(void *ida_mem, long int *nliters); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumLinConvFails instead") -int IDASpilsGetNumConvFails(void *ida_mem, long int *nlcfails); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumJTSetupEvals instead") -int IDASpilsGetNumJTSetupEvals(void *ida_mem, long int *njtsetups); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumJtimesEvals instead") -int IDASpilsGetNumJtimesEvals(void *ida_mem, long int *njvevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumLinResEvals instead") -int IDASpilsGetNumResEvals(void *ida_mem, long int *nrevalsLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLastLinFlag instead") -int IDASpilsGetLastFlag(void *ida_mem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLinReturnFlagName instead") -char *IDASpilsGetReturnFlagName(long int flag); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/idas/idas_direct.h b/include/idas/idas_direct.h deleted file mode 100644 index 7fc6f47cf2..0000000000 --- a/include/idas/idas_direct.h +++ /dev/null @@ -1,81 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Header file for the deprecated direct linear solver interface in - * IDA; these routines now just wrap the updated IDA generic - * linear solver interface in idas_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _IDADLS_H -#define _IDADLS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*================================================================= - Function Types (typedefs for equivalent types in ida_ls.h) - =================================================================*/ - -typedef IDALsJacFn IDADlsJacFn; -typedef IDALsJacFnB IDADlsJacFnB; -typedef IDALsJacFnBS IDADlsJacFnBS; - -/*=================================================================== - Exported Functions (wrappers for equivalent routines in idas_ls.h) - ===================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetLinearSolver instead") -int IDADlsSetLinearSolver(void *ida_mem, SUNLinearSolver LS, - SUNMatrix A); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetJacFn instead") -int IDADlsSetJacFn(void *ida_mem, IDADlsJacFn jac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLinWorkSpace instead") -int IDADlsGetWorkSpace(void *ida_mem, long int *lenrwLS, - long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumJacEvals instead") -int IDADlsGetNumJacEvals(void *ida_mem, long int *njevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumLinResEvals instead") -int IDADlsGetNumResEvals(void *ida_mem, long int *nrevalsLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLastLinFlag instead") -int IDADlsGetLastFlag(void *ida_mem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLinReturnFlagName instead") -char *IDADlsGetReturnFlagName(long int flag); - - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetLinearSolverB instead") -int IDADlsSetLinearSolverB(void *ida_mem, int which, - SUNLinearSolver LS, SUNMatrix A); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetJacFnB instead") -int IDADlsSetJacFnB(void *ida_mem, int which, IDADlsJacFnB jacB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetJacFnBS instead") -int IDADlsSetJacFnBS(void *ida_mem, int which, IDADlsJacFnBS jacBS); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/idas/idas_spils.h b/include/idas/idas_spils.h deleted file mode 100644 index 9ea7b01749..0000000000 --- a/include/idas/idas_spils.h +++ /dev/null @@ -1,131 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Header file for the deprecated Scaled, Preconditioned Iterative - * Linear Solver interface in IDAS; these routines now just wrap - * the updated IDA generic linear solver interface in idas_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _IDASSPILS_H -#define _IDASSPILS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*=============================================================== - Function Types (typedefs for equivalent types in idas_ls.h) - ===============================================================*/ - -typedef IDALsPrecSetupFn IDASpilsPrecSetupFn; -typedef IDALsPrecSolveFn IDASpilsPrecSolveFn; -typedef IDALsJacTimesSetupFn IDASpilsJacTimesSetupFn; -typedef IDALsJacTimesVecFn IDASpilsJacTimesVecFn; -typedef IDALsPrecSetupFnB IDASpilsPrecSetupFnB; -typedef IDALsPrecSetupFnBS IDASpilsPrecSetupFnBS; -typedef IDALsPrecSolveFnB IDASpilsPrecSolveFnB; -typedef IDALsPrecSolveFnBS IDASpilsPrecSolveFnBS; -typedef IDALsJacTimesSetupFnB IDASpilsJacTimesSetupFnB; -typedef IDALsJacTimesSetupFnBS IDASpilsJacTimesSetupFnBS; -typedef IDALsJacTimesVecFnB IDASpilsJacTimesVecFnB; -typedef IDALsJacTimesVecFnBS IDASpilsJacTimesVecFnBS; - -/*==================================================================== - Exported Functions (wrappers for equivalent routines in idas_ls.h) - ====================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetLinearSolver instead") -int IDASpilsSetLinearSolver(void *ida_mem, SUNLinearSolver LS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetPreconditioner instead") -int IDASpilsSetPreconditioner(void *ida_mem, IDASpilsPrecSetupFn pset, - IDASpilsPrecSolveFn psolve); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetJacTimes instead") -int IDASpilsSetJacTimes(void *ida_mem, IDASpilsJacTimesSetupFn jtsetup, - IDASpilsJacTimesVecFn jtimes); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetEpsLin instead") -int IDASpilsSetEpsLin(void *ida_mem, realtype eplifac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetIncrementFactor instead") -int IDASpilsSetIncrementFactor(void *ida_mem, realtype dqincfac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLinWorkSpace instead") -int IDASpilsGetWorkSpace(void *ida_mem, long int *lenrwLS, long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumPrecEvals instead") -int IDASpilsGetNumPrecEvals(void *ida_mem, long int *npevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumPrecSolves instead") -int IDASpilsGetNumPrecSolves(void *ida_mem, long int *npsolves); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumLinIters instead") -int IDASpilsGetNumLinIters(void *ida_mem, long int *nliters); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumLinConvFails instead") -int IDASpilsGetNumConvFails(void *ida_mem, long int *nlcfails); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumJTSetupEvals instead") -int IDASpilsGetNumJTSetupEvals(void *ida_mem, long int *njtsetups); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumJtimesEvals instead") -int IDASpilsGetNumJtimesEvals(void *ida_mem, long int *njvevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetNumLinResEvals instead") -int IDASpilsGetNumResEvals(void *ida_mem, long int *nrevalsLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLastLinFlag instead") -int IDASpilsGetLastFlag(void *ida_mem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDAGetLinReturnFlagName instead") -char *IDASpilsGetReturnFlagName(long int flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetLinearSolverB instead") -int IDASpilsSetLinearSolverB(void *ida_mem, int which, SUNLinearSolver LS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetEpsLinB instead") -int IDASpilsSetEpsLinB(void *ida_mem, int which, realtype eplifacB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetIncrementFactorB instead") -int IDASpilsSetIncrementFactorB(void *ida_mem, int which, realtype dqincfacB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetPreconditionerB instead") -int IDASpilsSetPreconditionerB(void *ida_mem, int which, - IDASpilsPrecSetupFnB psetB, - IDASpilsPrecSolveFnB psolveB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetPreconditionerBS instead") -int IDASpilsSetPreconditionerBS(void *ida_mem, int which, - IDASpilsPrecSetupFnBS psetBS, - IDASpilsPrecSolveFnBS psolveBS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetJacTimesB instead") -int IDASpilsSetJacTimesB(void *ida_mem, int which, - IDASpilsJacTimesSetupFnB jtsetupB, - IDASpilsJacTimesVecFnB jtimesB); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use IDASetJacTimesBS instead") -int IDASpilsSetJacTimesBS(void *ida_mem, int which, - IDASpilsJacTimesSetupFnBS jtsetupBS, - IDASpilsJacTimesVecFnBS jtimesBS); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/kinsol/kinsol.h b/include/kinsol/kinsol.h index 7d8c7da50d..5a306fc967 100644 --- a/include/kinsol/kinsol.h +++ b/include/kinsol/kinsol.h @@ -133,18 +133,10 @@ SUNDIALS_EXPORT int KINSetScaledStepTol(void *kinmem, realtype scsteptol); SUNDIALS_EXPORT int KINSetConstraints(void *kinmem, N_Vector constraints); SUNDIALS_EXPORT int KINSetSysFunc(void *kinmem, KINSysFn func); -/* Optional input functions for handling error/info/debug events */ +/* Optional input functions for handling error events */ SUNDIALS_EXPORT int KINSetErrHandlerFn(void *kinmem, KINErrHandlerFn ehfun, void *eh_data); SUNDIALS_EXPORT int KINSetErrFile(void *kinmem, FILE *errfp); -SUNDIALS_EXPORT int KINSetInfoHandlerFn(void *kinmem, KINInfoHandlerFn ihfun, - void *ih_data); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetInfoFilename instead") -SUNDIALS_EXPORT int KINSetInfoFile(void *kinmem, FILE *infofp); -SUNDIALS_EXPORT int KINSetPrintLevel(void *kinmem, int printfl); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetDebugFilename instead") -int KINSetDebugFile(void *kinmem, FILE *debugfp); - /* Optional output functions */ SUNDIALS_EXPORT int KINGetWorkSpace(void *kinmem, long int *lenrw, diff --git a/include/kinsol/kinsol_direct.h b/include/kinsol/kinsol_direct.h deleted file mode 100644 index bc5c1c6307..0000000000 --- a/include/kinsol/kinsol_direct.h +++ /dev/null @@ -1,66 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * Radu Serban @ 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 - * ----------------------------------------------------------------- - * Header file for the deprecated direct linear solver interface in - * KINSOL; these routines now just wrap the updated KINSOL generic - * linear solver interface in kinsol_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _KINDLS_H -#define _KINDLS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*================================================================= - Function Types (typedefs for equivalent types in kinsol_ls.h) - =================================================================*/ - -typedef KINLsJacFn KINDlsJacFn; - -/*=================================================================== - Exported Functions (wrappers for equivalent routines in kinsol_ls.h) - ===================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINSetLinearSolver instead") -int KINDlsSetLinearSolver(void *kinmem, SUNLinearSolver LS, SUNMatrix A); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINSetJacFn instead") -int KINDlsSetJacFn(void *kinmem, KINDlsJacFn jac); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetLinWorkSpace instead") -int KINDlsGetWorkSpace(void *kinmem, long int *lenrw, long int *leniw); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetNumJacEvals instead") -int KINDlsGetNumJacEvals(void *kinmem, long int *njevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetNumLinFuncEvals instead") -int KINDlsGetNumFuncEvals(void *kinmem, long int *nfevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetLastLinFlag instead") -int KINDlsGetLastFlag(void *kinmem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetLinReturnFlagName instead") -char *KINDlsGetReturnFlagName(long int flag); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/kinsol/kinsol_spils.h b/include/kinsol/kinsol_spils.h deleted file mode 100644 index 075ff106ea..0000000000 --- a/include/kinsol/kinsol_spils.h +++ /dev/null @@ -1,85 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * Scott Cohen, Alan Hindmarsh, Radu Serban, - * and Aaron Collier @ 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 - * ----------------------------------------------------------------- - * Header file for the deprecated Scaled Preconditioned Iterative - * Linear Solver interface in KINSOL; these routines now just wrap - * the updated KINSOL generic linear solver interface in kinsol_ls.h. - * -----------------------------------------------------------------*/ - -#ifndef _KINSPILS_H -#define _KINSPILS_H - -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - - -/*=============================================================== - Function Types (typedefs for equivalent types in kinsol_ls.h) - ===============================================================*/ - -typedef KINLsPrecSetupFn KINSpilsPrecSetupFn; -typedef KINLsPrecSolveFn KINSpilsPrecSolveFn; -typedef KINLsJacTimesVecFn KINSpilsJacTimesVecFn; - -/*==================================================================== - Exported Functions (wrappers for equivalent routines in kinsol_ls.h) - ====================================================================*/ - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINSetLinearSolver instead") -int KINSpilsSetLinearSolver(void *kinmem, SUNLinearSolver LS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINSetPreconditioner instead") -int KINSpilsSetPreconditioner(void *kinmem, KINSpilsPrecSetupFn psetup, - KINSpilsPrecSolveFn psolve); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINSetJacTimesVecFn instead") -int KINSpilsSetJacTimesVecFn(void *kinmem, KINSpilsJacTimesVecFn jtv); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetLinWorkSpace instead") -int KINSpilsGetWorkSpace(void *kinmem, long int *lenrwLS, long int *leniwLS); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetNumPrecEvals instead") -int KINSpilsGetNumPrecEvals(void *kinmem, long int *npevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetNumPrecSolves instead") -int KINSpilsGetNumPrecSolves(void *kinmem, long int *npsolves); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetNumLinIters instead") -int KINSpilsGetNumLinIters(void *kinmem, long int *nliters); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetNumLinConvFails instead") -int KINSpilsGetNumConvFails(void *kinmem, long int *nlcfails); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetNumJtimesEvals instead") -int KINSpilsGetNumJtimesEvals(void *kinmem, long int *njvevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetNumLinFuncEvals instead") -int KINSpilsGetNumFuncEvals(void *kinmem, long int *nfevals); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetLastLinFlag instead") -int KINSpilsGetLastFlag(void *kinmem, long int *flag); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use KINGetLinReturnFlagName instead") -char *KINSpilsGetReturnFlagName(long int flag); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/nvector/nvector_openmp.h b/include/nvector/nvector_openmp.h index 9eaf4d8d04..713f1fbd64 100644 --- a/include/nvector/nvector_openmp.h +++ b/include/nvector/nvector_openmp.h @@ -194,22 +194,6 @@ SUNDIALS_EXPORT int N_VEnableWrmsNormMaskVectorArray_OpenMP(N_Vector v, booleant SUNDIALS_EXPORT int N_VEnableScaleAddMultiVectorArray_OpenMP(N_Vector v, booleantype tf); SUNDIALS_EXPORT int N_VEnableLinearCombinationVectorArray_OpenMP(N_Vector v, booleantype tf); -/* - * ----------------------------------------------------------------- - * Deprecated functions - * ----------------------------------------------------------------- - */ - -/* use N_VCloneVectorArray */ -SUNDIALS_DEPRECATED_EXPORT N_Vector* N_VCloneVectorArray_OpenMP(int count, N_Vector w); - -/* use N_VCloneVectorArrayEmpty */ -SUNDIALS_DEPRECATED_EXPORT N_Vector* N_VCloneVectorArrayEmpty_OpenMP(int count, N_Vector w); - -/* use N_VDestroyVectorArray */ -SUNDIALS_DEPRECATED_EXPORT void N_VDestroyVectorArray_OpenMP(N_Vector* vs, int count); - - #ifdef __cplusplus } #endif diff --git a/include/nvector/nvector_openmpdev.h b/include/nvector/nvector_openmpdev.h index 62cb37e811..fcc2ced766 100644 --- a/include/nvector/nvector_openmpdev.h +++ b/include/nvector/nvector_openmpdev.h @@ -195,22 +195,6 @@ SUNDIALS_EXPORT int N_VEnableWrmsNormMaskVectorArray_OpenMPDEV(N_Vector v, boole SUNDIALS_EXPORT int N_VEnableScaleAddMultiVectorArray_OpenMPDEV(N_Vector v, booleantype tf); SUNDIALS_EXPORT int N_VEnableLinearCombinationVectorArray_OpenMPDEV(N_Vector v, booleantype tf); -/* - * ----------------------------------------------------------------- - * Deprecated functions - * ----------------------------------------------------------------- - */ - -/* use N_VCloneVectorArray */ -SUNDIALS_DEPRECATED_EXPORT N_Vector *N_VCloneVectorArray_OpenMPDEV(int count, N_Vector w); - -/* use N_VCloneVectorArrayEmpty */ -SUNDIALS_DEPRECATED_EXPORT N_Vector *N_VCloneVectorArrayEmpty_OpenMPDEV(int count, N_Vector w); - -/* use N_VDestroyVectorArray */ -SUNDIALS_DEPRECATED_EXPORT void N_VDestroyVectorArray_OpenMPDEV(N_Vector *vs, int count); - - #ifdef __cplusplus } #endif diff --git a/include/nvector/nvector_parallel.h b/include/nvector/nvector_parallel.h index bbb29b7de3..127f319c0b 100644 --- a/include/nvector/nvector_parallel.h +++ b/include/nvector/nvector_parallel.h @@ -225,21 +225,6 @@ SUNDIALS_EXPORT int N_VEnableLinearCombinationVectorArray_Parallel(N_Vector v, b SUNDIALS_EXPORT int N_VEnableDotProdMultiLocal_Parallel(N_Vector v, booleantype tf); -/* - * ----------------------------------------------------------------- - * Deprecated functions - * ----------------------------------------------------------------- - */ - -/* use N_VCloneVectorArray */ -SUNDIALS_DEPRECATED_EXPORT N_Vector* N_VCloneVectorArray_Parallel(int count, N_Vector w); - -/* use N_VCloneVectorArrayEmpty */ -SUNDIALS_DEPRECATED_EXPORT N_Vector* N_VCloneVectorArrayEmpty_Parallel(int count, N_Vector w); - -/* use N_VDestroyVectorArray */ -SUNDIALS_DEPRECATED_EXPORT void N_VDestroyVectorArray_Parallel(N_Vector* vs, int count); - #ifdef __cplusplus } diff --git a/include/nvector/nvector_parhyp.h b/include/nvector/nvector_parhyp.h index f2748db746..03e7f66df6 100644 --- a/include/nvector/nvector_parhyp.h +++ b/include/nvector/nvector_parhyp.h @@ -211,24 +211,6 @@ SUNDIALS_EXPORT int N_VEnableScaleAddMultiVectorArray_ParHyp(N_Vector v, SUNDIALS_EXPORT int N_VEnableLinearCombinationVectorArray_ParHyp(N_Vector v, booleantype tf); -/* - * ----------------------------------------------------------------- - * Deprecated functions - * ----------------------------------------------------------------- - */ - -/* use N_VCloneVectorArray */ -SUNDIALS_DEPRECATED_EXPORT N_Vector *N_VCloneVectorArray_ParHyp(int count, - N_Vector w); - -/* use N_VCloneVectorArrayEmpty */ -SUNDIALS_DEPRECATED_EXPORT N_Vector *N_VCloneVectorArrayEmpty_ParHyp(int count, - N_Vector w); - -/* use N_VDestroyVectorArray */ -SUNDIALS_DEPRECATED_EXPORT void N_VDestroyVectorArray_ParHyp(N_Vector *vs, - int count); - SUNDIALS_EXPORT int N_VEnableDotProdMultiLocal_ParHyp(N_Vector v, booleantype tf); #ifdef __cplusplus diff --git a/include/nvector/nvector_petsc.h b/include/nvector/nvector_petsc.h index 8ccbdcf2dc..f7745ad98f 100644 --- a/include/nvector/nvector_petsc.h +++ b/include/nvector/nvector_petsc.h @@ -195,21 +195,6 @@ SUNDIALS_EXPORT int N_VEnableLinearCombinationVectorArray_Petsc(N_Vector v, bool SUNDIALS_EXPORT int N_VEnableDotProdMultiLocal_Petsc(N_Vector v, booleantype tf); -/* - * ----------------------------------------------------------------- - * Deprecated functions - * ----------------------------------------------------------------- - */ - -/* use N_VCloneVectorArray */ -SUNDIALS_DEPRECATED_EXPORT N_Vector *N_VCloneVectorArray_Petsc(int count, N_Vector w); - -/* use N_VCloneVectorArrayEmpty */ -SUNDIALS_DEPRECATED_EXPORT N_Vector *N_VCloneVectorArrayEmpty_Petsc(int count, N_Vector w); - -/* use N_VDestroyVectorArray */ -SUNDIALS_DEPRECATED_EXPORT void N_VDestroyVectorArray_Petsc(N_Vector *vs, int count); - #ifdef __cplusplus } #endif diff --git a/include/nvector/nvector_pthreads.h b/include/nvector/nvector_pthreads.h index da6be3e461..4e20c7ad5b 100644 --- a/include/nvector/nvector_pthreads.h +++ b/include/nvector/nvector_pthreads.h @@ -243,24 +243,6 @@ SUNDIALS_EXPORT int N_VEnableScaleAddMultiVectorArray_Pthreads(N_Vector v, SUNDIALS_EXPORT int N_VEnableLinearCombinationVectorArray_Pthreads(N_Vector v, booleantype tf); -/* - * ----------------------------------------------------------------- - * Deprecated functions - * ----------------------------------------------------------------- - */ - -/* use N_VCloneVectorArray */ -SUNDIALS_DEPRECATED_EXPORT N_Vector* N_VCloneVectorArray_Pthreads(int count, - N_Vector w); - -/* use N_VCloneVectorArrayEmpty */ -SUNDIALS_DEPRECATED_EXPORT N_Vector* N_VCloneVectorArrayEmpty_Pthreads(int count, - N_Vector w); - -/* use N_VDestroyVectorArray */ -SUNDIALS_DEPRECATED_EXPORT void N_VDestroyVectorArray_Pthreads(N_Vector* vs, - int count); - #ifdef __cplusplus } #endif diff --git a/include/nvector/nvector_serial.h b/include/nvector/nvector_serial.h index 7a96499ee9..1b08708c6c 100644 --- a/include/nvector/nvector_serial.h +++ b/include/nvector/nvector_serial.h @@ -184,21 +184,6 @@ SUNDIALS_EXPORT int N_VEnableWrmsNormMaskVectorArray_Serial(N_Vector v, booleant SUNDIALS_EXPORT int N_VEnableScaleAddMultiVectorArray_Serial(N_Vector v, booleantype tf); SUNDIALS_EXPORT int N_VEnableLinearCombinationVectorArray_Serial(N_Vector v, booleantype tf); -/* - * ----------------------------------------------------------------- - * Deprecated functions - * ----------------------------------------------------------------- - */ - -/* use N_VCloneVectorArray */ -SUNDIALS_DEPRECATED_EXPORT N_Vector* N_VCloneVectorArray_Serial(int count, N_Vector w); - -/* use N_VCloneVectorArrayEmpty */ -SUNDIALS_DEPRECATED_EXPORT N_Vector* N_VCloneVectorArrayEmpty_Serial(int count, N_Vector w); - -/* use N_VDestroyVectorArray */ -SUNDIALS_DEPRECATED_EXPORT void N_VDestroyVectorArray_Serial(N_Vector* vs, int count); - #ifdef __cplusplus } diff --git a/include/sundials/sundials_band.h b/include/sundials/sundials_band.h index 47ef42a4cf..9c306de2c1 100644 --- a/include/sundials/sundials_band.h +++ b/include/sundials/sundials_band.h @@ -79,19 +79,11 @@ extern "C" { SUNDIALS_EXPORT sunindextype SUNDlsMat_BandGBTRF(SUNDlsMat A, sunindextype* p); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_BandGBTRF instead") -sunindextype BandGBTRF(DlsMat A, sunindextype *p); - SUNDIALS_EXPORT sunindextype SUNDlsMat_bandGBTRF(realtype **a, sunindextype n, sunindextype mu, sunindextype ml, sunindextype smu, sunindextype *p); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_bandGBTRF instead") -sunindextype bandGBTRF(realtype **a, sunindextype n, - sunindextype mu, sunindextype ml, - sunindextype smu, sunindextype *p); - /* * ----------------------------------------------------------------- * Function: SUNDlsMat_BandGBTRS @@ -113,17 +105,10 @@ sunindextype bandGBTRF(realtype **a, sunindextype n, SUNDIALS_EXPORT void SUNDlsMat_BandGBTRS(SUNDlsMat A, sunindextype *p, realtype *b); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_BandGBTRS instead") -void BandGBTRS(DlsMat A, sunindextype *p, realtype *b); - SUNDIALS_EXPORT void SUNDlsMat_bandGBTRS(realtype **a, sunindextype n, sunindextype smu, sunindextype ml, sunindextype *p, realtype *b); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_bandGBTRS instead") -void bandGBTRS(realtype **a, sunindextype n, sunindextype smu, - sunindextype ml, sunindextype *p, realtype *b); - /* * ----------------------------------------------------------------- * Function: SUNDlsMat_BandCopy @@ -143,21 +128,11 @@ void bandGBTRS(realtype **a, sunindextype n, sunindextype smu, SUNDIALS_EXPORT void SUNDlsMat_BandCopy(SUNDlsMat A, SUNDlsMat B, sunindextype copymu, sunindextype copyml); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_BandCopy instead") -void BandCopy(DlsMat A, DlsMat B, sunindextype copymu, - sunindextype copyml); - SUNDIALS_EXPORT void SUNDlsMat_bandCopy(realtype **a, realtype **b, sunindextype n, sunindextype a_smu, sunindextype b_smu, sunindextype copymu, sunindextype copyml); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_bandCopy instead") -void bandCopy(realtype **a, realtype **b, sunindextype n, - sunindextype a_smu, sunindextype b_smu, - sunindextype copymu, sunindextype copyml); - /* * ----------------------------------------------------------------- * Function: SUNDlsMat_BandScale @@ -174,17 +149,10 @@ void bandCopy(realtype **a, realtype **b, sunindextype n, void SUNDlsMat_BandScale(realtype c, SUNDlsMat A); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_BandScale instead") -void BandScale(realtype c, DlsMat A); - SUNDIALS_EXPORT void SUNDlsMat_bandScale(realtype c, realtype **a, sunindextype n, sunindextype mu, sunindextype ml, sunindextype smu); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_bandScale instead") -void bandScale(realtype c, realtype **a, sunindextype n, - sunindextype mu, sunindextype ml, sunindextype smu); - /* * ----------------------------------------------------------------- * Function: SUNDlsMat_bandAddIdentity @@ -196,9 +164,6 @@ void bandScale(realtype c, realtype **a, sunindextype n, void SUNDlsMat_bandAddIdentity(realtype **a, sunindextype n, sunindextype smu); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_bandAddIdentity instead") -void bandAddIdentity(realtype **a, sunindextype n, sunindextype smu); - /* * ----------------------------------------------------------------- @@ -218,19 +183,11 @@ void bandAddIdentity(realtype **a, sunindextype n, sunindextype smu); SUNDIALS_EXPORT void SUNDlsMat_BandMatvec(SUNDlsMat A, realtype *x, realtype *y); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_BandMatvec instead") -void BandMatvec(DlsMat A, realtype *x, realtype *y); - SUNDIALS_EXPORT void SUNDlsMat_bandMatvec(realtype **a, realtype *x, realtype *y, sunindextype n, sunindextype mu, sunindextype ml, sunindextype smu); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_bandMatvec instead") -void bandMatvec(realtype **a, realtype *x, realtype *y, - sunindextype n, sunindextype mu, - sunindextype ml, sunindextype smu); - #ifdef __cplusplus } #endif diff --git a/include/sundials/sundials_dense.h b/include/sundials/sundials_dense.h index 2ba052c968..201580cad4 100644 --- a/include/sundials/sundials_dense.h +++ b/include/sundials/sundials_dense.h @@ -71,27 +71,17 @@ extern "C" { SUNDIALS_EXPORT sunindextype SUNDlsMat_DenseGETRF(SUNDlsMat A, sunindextype *p); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DenseGETRF instead") -sunindextype DenseGETRF(DlsMat A, sunindextype *p); SUNDIALS_EXPORT void SUNDlsMat_DenseGETRS(SUNDlsMat A, sunindextype *p, realtype *b); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DenseGETRS instead") -void DenseGETRS(DlsMat A, sunindextype *p, realtype *b); SUNDIALS_EXPORT sunindextype SUNDlsMat_denseGETRF(realtype **a, sunindextype m, sunindextype n, sunindextype *p); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_denseGETRF instead") -sunindextype denseGETRF(realtype **a, sunindextype m, - sunindextype n, sunindextype *p); SUNDIALS_EXPORT void SUNDlsMat_denseGETRS(realtype **a, sunindextype n, sunindextype *p, realtype *b); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_denseGETRS instead") -void denseGETRS(realtype **a, sunindextype n, sunindextype *p, - realtype *b); /* * ---------------------------------------------------------------------------- @@ -114,23 +104,15 @@ void denseGETRS(realtype **a, sunindextype n, sunindextype *p, SUNDIALS_EXPORT sunindextype SUNDlsMat_DensePOTRF(SUNDlsMat A); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DensePOTRF instead") -sunindextype DensePOTRF(DlsMat A); SUNDIALS_EXPORT void SUNDlsMat_DensePOTRS(SUNDlsMat A, realtype *b); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DensePOTRS instead") -void DensePOTRS(DlsMat A, realtype *b); SUNDIALS_EXPORT sunindextype SUNDlsMat_densePOTRF(realtype **a, sunindextype m); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_densePOTRF instead") -sunindextype densePOTRF(realtype **a, sunindextype m); SUNDIALS_EXPORT void SUNDlsMat_densePOTRS(realtype **a, sunindextype m, realtype *b); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_densePOTRS instead") -void densePOTRS(realtype **a, sunindextype m, realtype *b); /* * ----------------------------------------------------------------------------- @@ -160,32 +142,20 @@ void densePOTRS(realtype **a, sunindextype m, realtype *b); SUNDIALS_EXPORT int SUNDlsMat_DenseGEQRF(SUNDlsMat A, realtype *beta, realtype *wrk); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DenseGEQRF instead") -int DenseGEQRF(DlsMat A, realtype *beta, realtype *wrk); SUNDIALS_EXPORT int SUNDlsMat_DenseORMQR(SUNDlsMat A, realtype *beta, realtype *vn, realtype *vm, realtype *wrk); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DenseORMQR instead") -int DenseORMQR(DlsMat A, realtype *beta, realtype *vn, - realtype *vm, realtype *wrk); SUNDIALS_EXPORT int SUNDlsMat_denseGEQRF(realtype **a, sunindextype m, sunindextype n, realtype *beta, realtype *wrk); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_denseGEQRF instead") -int denseGEQRF(realtype **a, sunindextype m, sunindextype n, - realtype *beta, realtype *wrk); SUNDIALS_EXPORT int SUNDlsMat_denseORMQR(realtype **a, sunindextype m, sunindextype n, realtype *beta, realtype *v, realtype *w, realtype *wrk); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_denseORMQR instead") -int denseORMQR(realtype **a, sunindextype m, sunindextype n, - realtype *beta, realtype *v, realtype *w, - realtype *wrk); /* * ---------------------------------------------------------------------------- @@ -201,15 +171,10 @@ int denseORMQR(realtype **a, sunindextype m, sunindextype n, SUNDIALS_EXPORT void SUNDlsMat_DenseCopy(SUNDlsMat A, SUNDlsMat B); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DenseCopy instead") -void DenseCopy(DlsMat A, DlsMat B); SUNDIALS_EXPORT void SUNDlsMat_denseCopy(realtype **a, realtype **b, sunindextype m, sunindextype n); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_denseCopy instead") -void denseCopy(realtype **a, realtype **b, sunindextype m, - sunindextype n); /* * ----------------------------------------------------------------------------- @@ -226,16 +191,10 @@ void denseCopy(realtype **a, realtype **b, sunindextype m, SUNDIALS_EXPORT void SUNDlsMat_DenseScale(realtype c, SUNDlsMat A); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsSUNDlsMat_DenseScale_denseCopy instead") -void DenseScale(realtype c, DlsMat A); SUNDIALS_EXPORT void SUNDlsMat_denseScale(realtype c, realtype **a, sunindextype m, sunindextype n); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_denseScale instead") -void denseScale(realtype c, realtype **a, sunindextype m, - sunindextype n); - /* * ----------------------------------------------------------------------------- @@ -248,8 +207,6 @@ void denseScale(realtype c, realtype **a, sunindextype m, SUNDIALS_EXPORT void SUNDlsMat_denseAddIdentity(realtype **a, sunindextype n); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_denseAddIdentity instead") -void denseAddIdentity(realtype **a, sunindextype n); /* @@ -268,15 +225,10 @@ void denseAddIdentity(realtype **a, sunindextype n); SUNDIALS_EXPORT void SUNDlsMat_DenseMatvec(SUNDlsMat A, realtype *x, realtype *y); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DenseMatvec instead") -void DenseMatvec(DlsMat A, realtype *x, realtype *y); SUNDIALS_EXPORT void SUNDlsMat_denseMatvec(realtype **a, realtype *x, realtype *y, sunindextype m, sunindextype n); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_denseMatvec instead") -void denseMatvec(realtype **a, realtype *x, realtype *y, - sunindextype m, sunindextype n); #ifdef __cplusplus diff --git a/include/sundials/sundials_direct.h b/include/sundials/sundials_direct.h index b33c718032..b73ffeae7e 100644 --- a/include/sundials/sundials_direct.h +++ b/include/sundials/sundials_direct.h @@ -125,9 +125,8 @@ typedef struct _DlsMat { realtype *data; sunindextype ldata; realtype **cols; -} *SUNDlsMat; /* DEPRECATED DlsMat: use SUNDlsMat instead */ +} *SUNDlsMat; -typedef SUNDlsMat DlsMat; /* * ================================================================== @@ -155,11 +154,6 @@ typedef SUNDlsMat DlsMat; #define SUNDLS_DENSE_COL(A,j) ((A->cols)[j]) #define SUNDLS_DENSE_ELEM(A,i,j) ((A->cols)[j][i]) -/* DEPRECATED DENSE_COL: use SUNDLS_DENSE_COL instead */ -#define DENSE_COL(A,j) SUNDLS_DENSE_COL(A,j) -/* DEPRECATED DENSE_ELEM: use SUNDLS_DENSE_ELEM instead */ -#define DENSE_ELEM(A,i,j) SUNDLS_DENSE_ELEM(A,i,j) - /* * ----------------------------------------------------------------- * SUNDLS_BAND_COL, SUNDLS_BAND_COL_ELEM, and SUNDLS_BAND_ELEM @@ -185,14 +179,6 @@ typedef SUNDlsMat DlsMat; #define SUNDLS_BAND_COL(A,j) (((A->cols)[j])+(A->s_mu)) #define SUNDLS_BAND_COL_ELEM(col_j,i,j) (col_j[(i)-(j)]) #define SUNDLS_BAND_ELEM(A,i,j) ((A->cols)[j][(i)-(j)+(A->s_mu)]) - -/* DEPRECATED BAND_COL: use SUNDLS_BAND_COL */ -#define BAND_COL(A,j) SUNDLS_BAND_COL(A,j) -/* DEPRECATED BAND_COL_ELEM: use SUNDLS_BAND_COL_ELEM */ -#define BAND_COL_ELEM(col_j,i,j) SUNDLS_BAND_COL_ELEM(col_j,i,j) -/* DEPRECATED BAND_ELEM: use SUNDLS_BAND_ELEM */ -#define BAND_ELEM(A,i,j) SUNDLS_BAND_ELEM(A,i,j) - /* * ================================================================== * Exported function prototypes (functions working on SUNDlsMat) @@ -214,9 +200,6 @@ typedef SUNDlsMat DlsMat; SUNDIALS_EXPORT SUNDlsMat SUNDlsMat_NewDenseMat(sunindextype M, sunindextype N); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_NewDenseMat instead") -DlsMat NewDenseMat(sunindextype M, sunindextype N); - /* * ----------------------------------------------------------------- * Function: SUNDlsMat_NewBandMat @@ -241,10 +224,6 @@ SUNDIALS_EXPORT SUNDlsMat SUNDlsMat_NewBandMat(sunindextype N, sunindextype mu, sunindextype ml, sunindextype smu); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_NewBandMat instead") -DlsMat NewBandMat(sunindextype N, sunindextype mu, - sunindextype ml, sunindextype smu); - /* * ----------------------------------------------------------------- * Functions: SUNDlsMat_DestroyMat @@ -255,10 +234,7 @@ DlsMat NewBandMat(sunindextype N, sunindextype mu, */ SUNDIALS_EXPORT -void SUNDlsMat_DestroyMat(DlsMat A); - -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DestroyMat instead") -void DestroyMat(DlsMat A); +void SUNDlsMat_DestroyMat(SUNDlsMat A); /* * ----------------------------------------------------------------- @@ -273,9 +249,6 @@ void DestroyMat(DlsMat A); SUNDIALS_EXPORT int* SUNDlsMat_NewIntArray(int N); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_NewIntArray instead") -int* NewIntArray(int N); - /* * ----------------------------------------------------------------- * Function: SUNDlsMat_NewIndexArray @@ -290,9 +263,6 @@ int* NewIntArray(int N); SUNDIALS_EXPORT sunindextype* SUNDlsMat_NewIndexArray(sunindextype N); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_NewIndexArray instead") -sunindextype* NewIndexArray(sunindextype N); - /* * ----------------------------------------------------------------- * Function: SUNDlsMat_NewRealArray @@ -306,9 +276,6 @@ sunindextype* NewIndexArray(sunindextype N); SUNDIALS_EXPORT realtype* SUNDlsMat_NewRealArray(sunindextype N); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_NewRealArray instead") -realtype* NewRealArray(sunindextype N); - /* * ----------------------------------------------------------------- * Function: SUNDlsMat_DestroyArray @@ -322,9 +289,6 @@ realtype* NewRealArray(sunindextype N); SUNDIALS_EXPORT void SUNDlsMat_DestroyArray(void *p); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_DestroyArray instead") -void DestroyArray(void *p); - /* * ----------------------------------------------------------------- * Function : SUNDlsMat_AddIdentity @@ -340,9 +304,6 @@ void DestroyArray(void *p); SUNDIALS_EXPORT void SUNDlsMat_AddIdentity(SUNDlsMat A); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_AddIdentity instead") -void AddIdentity(DlsMat A); - /* * ----------------------------------------------------------------- * Function : SUNDlsMat_SetToZero @@ -355,9 +316,6 @@ void AddIdentity(DlsMat A); SUNDIALS_EXPORT void SUNDlsMat_SetToZero(SUNDlsMat A); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_SetToZero instead") -void SetToZero(DlsMat A); - /* * ----------------------------------------------------------------- * Functions: SUNDlsMat_PrintMat @@ -373,9 +331,6 @@ void SetToZero(DlsMat A); SUNDIALS_EXPORT void SUNDlsMat_PrintMat(SUNDlsMat A, FILE *outfile); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_PrintMat") -void PrintMat(DlsMat A, FILE *outfile); - /* * ================================================================== * Exported function prototypes (functions working on realtype**) @@ -385,47 +340,26 @@ void PrintMat(DlsMat A, FILE *outfile); SUNDIALS_EXPORT realtype** SUNDlsMat_newDenseMat(sunindextype m, sunindextype n); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_newDenseMat instead") -realtype** newDenseMat(sunindextype m, sunindextype n); - SUNDIALS_EXPORT realtype** SUNDlsMat_newBandMat(sunindextype n, sunindextype smu, sunindextype ml); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_newBandMat instead") -realtype** newBandMat(sunindextype n, sunindextype smu, - sunindextype ml); SUNDIALS_EXPORT void SUNDlsMat_destroyMat(realtype** a); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_destroyMat instead") -void destroyMat(realtype** a); - SUNDIALS_EXPORT int* SUNDlsMat_newIntArray(int n); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_newIntArray instead") -int* newIntArray(int n); - SUNDIALS_EXPORT sunindextype* SUNDlsMat_newIndexArray(sunindextype n); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_newIndexArray instead") -sunindextype* newIndexArray(sunindextype n); - SUNDIALS_EXPORT realtype* SUNDlsMat_newRealArray(sunindextype m); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_newRealArray instead") - realtype* newRealArray(sunindextype m); - SUNDIALS_EXPORT void SUNDlsMat_destroyArray(void* v); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNDlsMat_destroyArray instead") -void destroyArray(void* v); - #ifdef __cplusplus } diff --git a/include/sundials/sundials_iterative.h b/include/sundials/sundials_iterative.h index 80cf17ab75..ba909df174 100644 --- a/include/sundials/sundials_iterative.h +++ b/include/sundials/sundials_iterative.h @@ -51,11 +51,6 @@ extern "C" { * ----------------------------------------------------------------- */ -/* DEPRECATED PREC_NONE: use SUN_PREC_NONE */ -/* DEPRECATED PREC_LEFT: use SUN_PREC_LEFT */ -/* DEPRECATED PREC_RIGHT: use SUN_PREC_RIGHT */ -/* DEPRECATED PREC_BOTH: use SUN_PREC_BOTH */ -enum { PREC_NONE, PREC_LEFT, PREC_RIGHT, PREC_BOTH }; enum { SUN_PREC_NONE, SUN_PREC_LEFT, SUN_PREC_RIGHT, SUN_PREC_BOTH }; /* @@ -72,9 +67,6 @@ enum { SUN_PREC_NONE, SUN_PREC_LEFT, SUN_PREC_RIGHT, SUN_PREC_BOTH }; * ----------------------------------------------------------------- */ -/* DEPRECATED MODIFIED_GS: use SUN_MODIFIED_GS */ -/* DEPRECATED CLASSICAL_GS: use SUN_CLASSICAL_GS */ -enum { MODIFIED_GS = 1, CLASSICAL_GS = 2 }; enum { SUN_MODIFIED_GS = 1, SUN_CLASSICAL_GS = 2 }; /* @@ -90,8 +82,6 @@ enum { SUN_MODIFIED_GS = 1, SUN_CLASSICAL_GS = 2 }; * ----------------------------------------------------------------- */ -/* DEPRECATED ATimesFn: use SUNATimesFn */ -typedef int (*ATimesFn)(void *A_data, N_Vector v, N_Vector z); typedef int (*SUNATimesFn)(void *A_data, N_Vector v, N_Vector z); /* @@ -104,8 +94,6 @@ typedef int (*SUNATimesFn)(void *A_data, N_Vector v, N_Vector z); * ----------------------------------------------------------------- */ -/* DEPRECATED PSetupFn: use SUNPSetupFn */ -typedef int (*PSetupFn)(void *P_data); typedef int (*SUNPSetupFn)(void *P_data); /* @@ -134,9 +122,6 @@ typedef int (*SUNPSetupFn)(void *P_data); * ----------------------------------------------------------------- */ -/* DEPRECATED PSolveFn: use SUNPSolveFn */ -typedef int (*PSolveFn)(void *P_data, N_Vector r, N_Vector z, - realtype tol, int lr); typedef int (*SUNPSolveFn)(void *P_data, N_Vector r, N_Vector z, realtype tol, int lr); @@ -207,10 +192,6 @@ SUNDIALS_EXPORT int SUNModifiedGS(N_Vector* v, realtype **h, int k, int p, realtype *new_vk_norm); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNModifiedGS instead") -int ModifiedGS(N_Vector* v, realtype **h, int k, int p, - realtype *new_vk_norm); - /* * ----------------------------------------------------------------- * Function: SUNClassicalGS @@ -236,11 +217,6 @@ int SUNClassicalGS(N_Vector* v, realtype **h, int k, int p, realtype *new_vk_norm, realtype *stemp, N_Vector* vtemp); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNClassicalGS instead") -int ClassicalGS(N_Vector* v, realtype **h, int k, int p, - realtype *new_vk_norm, realtype *stemp, - N_Vector* vtemp); - /* * ----------------------------------------------------------------- * Function: SUNQRfact @@ -276,9 +252,6 @@ int ClassicalGS(N_Vector* v, realtype **h, int k, int p, SUNDIALS_EXPORT int SUNQRfact(int n, realtype **h, realtype *q, int job); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNQRFact instead") -int QRfact(int n, realtype **h, realtype *q, int job); - /* * ----------------------------------------------------------------- * Function: SUNQRsol @@ -314,9 +287,6 @@ int QRfact(int n, realtype **h, realtype *q, int job); SUNDIALS_EXPORT int SUNQRsol(int n, realtype **h, realtype *q, realtype *b); -SUNDIALS_DEPRECATED_EXPORT_MSG("use SUNQRsol instead") -int QRsol(int n, realtype **h, realtype *q, realtype *b); - /* * ----------------------------------------------------------------- * Function: SUNQRAdd_MGS diff --git a/include/sundials/sundials_lapack.h b/include/sundials/sundials_lapack.h deleted file mode 100644 index b7e6ef0cd4..0000000000 --- a/include/sundials/sundials_lapack.h +++ /dev/null @@ -1,258 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer: Radu Serban @ LLNL - * Daniel Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 is the header file for a generic package of direct matrix - * operations for use with BLAS/LAPACK. - * -----------------------------------------------------------------*/ - -#ifndef _SUNDIALS_LAPACK_H -#define _SUNDIALS_LAPACK_H - -#include - -#warning "This header file is deprecated and will be removed in SUNDIALS v7.0.0" - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/* - * ================================================================== - * Blas and Lapack functions - * ================================================================== - */ - -#if defined(SUNDIALS_F77_FUNC) - -#define dcopy_f77 SUNDIALS_F77_FUNC(dcopy, DCOPY) -#define dscal_f77 SUNDIALS_F77_FUNC(dscal, DSCAL) -#define dgemv_f77 SUNDIALS_F77_FUNC(dgemv, DGEMV) -#define dtrsv_f77 SUNDIALS_F77_FUNC(dtrsv, DTRSV) -#define dsyrk_f77 SUNDIALS_F77_FUNC(dsyrk, DSKYR) - -#define dgbtrf_f77 SUNDIALS_F77_FUNC(dgbtrf, DGBTRF) -#define dgbtrs_f77 SUNDIALS_F77_FUNC(dgbtrs, DGBTRS) -#define dgetrf_f77 SUNDIALS_F77_FUNC(dgetrf, DGETRF) -#define dgetrs_f77 SUNDIALS_F77_FUNC(dgetrs, DGETRS) -#define dgeqp3_f77 SUNDIALS_F77_FUNC(dgeqp3, DGEQP3) -#define dgeqrf_f77 SUNDIALS_F77_FUNC(dgeqrf, DGEQRF) -#define dormqr_f77 SUNDIALS_F77_FUNC(dormqr, DORMQR) -#define dpotrf_f77 SUNDIALS_F77_FUNC(dpotrf, DPOTRF) -#define dpotrs_f77 SUNDIALS_F77_FUNC(dpotrs, DPOTRS) - -#define scopy_f77 SUNDIALS_F77_FUNC(scopy, SCOPY) -#define sscal_f77 SUNDIALS_F77_FUNC(sscal, SSCAL) -#define sgemv_f77 SUNDIALS_F77_FUNC(sgemv, SGEMV) -#define strsv_f77 SUNDIALS_F77_FUNC(strsv, STRSV) -#define ssyrk_f77 SUNDIALS_F77_FUNC(ssyrk, SSKYR) - -#define sgbtrf_f77 SUNDIALS_F77_FUNC(sgbtrf, SGBTRF) -#define sgbtrs_f77 SUNDIALS_F77_FUNC(sgbtrs, SGBTRS) -#define sgetrf_f77 SUNDIALS_F77_FUNC(sgetrf, SGETRF) -#define sgetrs_f77 SUNDIALS_F77_FUNC(sgetrs, SGETRS) -#define sgeqp3_f77 SUNDIALS_F77_FUNC(sgeqp3, SGEQP3) -#define sgeqrf_f77 SUNDIALS_F77_FUNC(sgeqrf, SGEQRF) -#define sormqr_f77 SUNDIALS_F77_FUNC(sormqr, SORMQR) -#define spotrf_f77 SUNDIALS_F77_FUNC(spotrf, SPOTRF) -#define spotrs_f77 SUNDIALS_F77_FUNC(spotrs, SPOTRS) - -#else - -#define dcopy_f77 dcopy_ -#define dscal_f77 dscal_ -#define dgemv_f77 dgemv_ -#define dtrsv_f77 dtrsv_ -#define dsyrk_f77 dsyrk_ - -#define dgbtrf_f77 dgbtrf_ -#define dgbtrs_f77 dgbtrs_ -#define dgeqp3_f77 dgeqp3_ -#define dgeqrf_f77 dgeqrf_ -#define dgetrf_f77 dgetrf_ -#define dgetrs_f77 dgetrs_ -#define dormqr_f77 dormqr_ -#define dpotrf_f77 dpotrf_ -#define dpotrs_f77 dpotrs_ - -#define scopy_f77 scopy_ -#define sscal_f77 sscal_ -#define sgemv_f77 sgemv_ -#define strsv_f77 strsv_ -#define ssyrk_f77 ssyrk_ - -#define sgbtrf_f77 sgbtrf_ -#define sgbtrs_f77 sgbtrs_ -#define sgeqp3_f77 sgeqp3_ -#define sgeqrf_f77 sgeqrf_ -#define sgetrf_f77 sgetrf_ -#define sgetrs_f77 sgetrs_ -#define sormqr_f77 sormqr_ -#define spotrf_f77 spotrf_ -#define spotrs_f77 spotrs_ - -#endif - -/* Level-1 BLAS */ - -extern void dcopy_f77(sunindextype *n, const double *x, - const sunindextype *inc_x, double *y, - const sunindextype *inc_y); - -extern void dscal_f77(sunindextype *n, const double *alpha, double *x, - const sunindextype *inc_x); - -extern void scopy_f77(sunindextype *n, const float *x, - const sunindextype *inc_x, float *y, - const sunindextype *inc_y); - -extern void sscal_f77(sunindextype *n, const float *alpha, float *x, - const sunindextype *inc_x); - -/* Level-2 BLAS */ - -extern void dgemv_f77(const char *trans, sunindextype *m, sunindextype *n, - const double *alpha, const double *a, sunindextype *lda, - const double *x, sunindextype *inc_x, const double *beta, - double *y, sunindextype *inc_y); - -extern void dtrsv_f77(const char *uplo, const char *trans, const char *diag, - const sunindextype *n, const double *a, - const sunindextype *lda, double *x, - const sunindextype *inc_x); - -extern void sgemv_f77(const char *trans, sunindextype *m, sunindextype *n, - const float *alpha, const float *a, sunindextype *lda, - const float *x, sunindextype *inc_x, const float *beta, - float *y, sunindextype *inc_y); - -extern void strsv_f77(const char *uplo, const char *trans, const char *diag, - const sunindextype *n, const float *a, - const sunindextype *lda, float *x, - const sunindextype *inc_x); - -/* Level-3 BLAS */ - -extern void dsyrk_f77(const char *uplo, const char *trans, - const sunindextype *n, const sunindextype *k, - const double *alpha, const double *a, - const sunindextype *lda, const double *beta, - const double *c, const sunindextype *ldc); - -extern void ssyrk_f77(const char *uplo, const char *trans, - const sunindextype *n, const sunindextype *k, - const float *alpha, const float *a, - const sunindextype *lda, const float *beta, - const float *c, const sunindextype *ldc); - -/* LAPACK */ - -extern void dgbtrf_f77(const sunindextype *m, const sunindextype *n, - const sunindextype *kl, const sunindextype *ku, - double *ab, sunindextype *ldab, sunindextype *ipiv, - sunindextype *info); - -extern void dgbtrs_f77(const char *trans, const sunindextype *n, - const sunindextype *kl, const sunindextype *ku, - const sunindextype *nrhs, double *ab, - const sunindextype *ldab, sunindextype *ipiv, - double *b, const sunindextype *ldb, sunindextype *info); - - -extern void dgeqp3_f77(const sunindextype *m, const sunindextype *n, double *a, - const sunindextype *lda, sunindextype *jpvt, double *tau, - double *work, const sunindextype *lwork, - sunindextype *info); - -extern void dgeqrf_f77(const sunindextype *m, const sunindextype *n, double *a, - const sunindextype *lda, double *tau, double *work, - const sunindextype *lwork, sunindextype *info); - -extern void dgetrf_f77(const sunindextype *m, const sunindextype *n, double *a, - sunindextype *lda, sunindextype *ipiv, - sunindextype *info); - -extern void dgetrs_f77(const char *trans, const sunindextype *n, - const sunindextype *nrhs, double *a, - const sunindextype *lda, sunindextype *ipiv, double *b, - const sunindextype *ldb, sunindextype *info); - - -extern void dormqr_f77(const char *side, const char *trans, - const sunindextype *m, const sunindextype *n, - const sunindextype *k, double *a, - const sunindextype *lda, double *tau, double *c, - const sunindextype *ldc, double *work, - const sunindextype *lwork, sunindextype *info); - -extern void dpotrf_f77(const char *uplo, const sunindextype *n, double *a, - sunindextype *lda, sunindextype *info); - -extern void dpotrs_f77(const char *uplo, const sunindextype *n, - const sunindextype *nrhs, double *a, - const sunindextype *lda, double *b, - const sunindextype *ldb, sunindextype *info); - - -extern void sgbtrf_f77(const sunindextype *m, const sunindextype *n, - const sunindextype *kl, const sunindextype *ku, - float *ab, sunindextype *ldab, sunindextype *ipiv, - sunindextype *info); - -extern void sgbtrs_f77(const char *trans, const sunindextype *n, - const sunindextype *kl, const sunindextype *ku, - const sunindextype *nrhs, float *ab, - const sunindextype *ldab, sunindextype *ipiv, - float *b, const sunindextype *ldb, sunindextype *info); - - -extern void sgeqp3_f77(const sunindextype *m, const sunindextype *n, float *a, - const sunindextype *lda, sunindextype *jpvt, float *tau, - float *work, const sunindextype *lwork, - sunindextype *info); - -extern void sgeqrf_f77(const sunindextype *m, const sunindextype *n, float *a, - const sunindextype *lda, float *tau, float *work, - const sunindextype *lwork, sunindextype *info); - -extern void sgetrf_f77(const sunindextype *m, const sunindextype *n, float *a, - sunindextype *lda, sunindextype *ipiv, - sunindextype *info); - -extern void sgetrs_f77(const char *trans, const sunindextype *n, - const sunindextype *nrhs, float *a, - const sunindextype *lda, sunindextype *ipiv, - float *b, const sunindextype *ldb, sunindextype *info); - - -extern void sormqr_f77(const char *side, const char *trans, - const sunindextype *m, const sunindextype *n, - const sunindextype *k, float *a, const sunindextype *lda, - float *tau, float *c, const sunindextype *ldc, - float *work, const sunindextype *lwork, - sunindextype *info); - -extern void spotrf_f77(const char *uplo, const sunindextype *n, float *a, - sunindextype *lda, sunindextype *info); - -extern void spotrs_f77(const char *uplo, const sunindextype *n, - const sunindextype *nrhs, float *a, - const sunindextype *lda, float *b, - const sunindextype *ldb, sunindextype *info); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/sunlinsol/sunlinsol_pcg.h b/include/sunlinsol/sunlinsol_pcg.h index 3b748e813e..28e34ae6f9 100644 --- a/include/sunlinsol/sunlinsol_pcg.h +++ b/include/sunlinsol/sunlinsol_pcg.h @@ -105,11 +105,6 @@ SUNDIALS_EXPORT int SUNLinSolSpace_PCG(SUNLinearSolver S, long int *lenrwLS, long int *leniwLS); SUNDIALS_EXPORT int SUNLinSolFree_PCG(SUNLinearSolver S); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetInfoFilename instead") -int SUNLinSolSetInfoFile_PCG(SUNLinearSolver LS, - FILE* info_file); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger interface instead") -int SUNLinSolSetPrintLevel_PCG(SUNLinearSolver LS, int print_level); #ifdef __cplusplus } diff --git a/include/sunlinsol/sunlinsol_spbcgs.h b/include/sunlinsol/sunlinsol_spbcgs.h index a257d850ee..f2caa1ba06 100644 --- a/include/sunlinsol/sunlinsol_spbcgs.h +++ b/include/sunlinsol/sunlinsol_spbcgs.h @@ -112,12 +112,6 @@ SUNDIALS_EXPORT int SUNLinSolSpace_SPBCGS(SUNLinearSolver S, long int *lenrwLS, long int *leniwLS); SUNDIALS_EXPORT int SUNLinSolFree_SPBCGS(SUNLinearSolver S); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetInfoFilename instead") -int SUNLinSolSetInfoFile_SPBCGS(SUNLinearSolver LS, - FILE* info_file); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger interface instead") -int SUNLinSolSetPrintLevel_SPBCGS(SUNLinearSolver LS, int print_level); - diff --git a/include/sunlinsol/sunlinsol_spfgmr.h b/include/sunlinsol/sunlinsol_spfgmr.h index 5814662e6d..39ba18027e 100644 --- a/include/sunlinsol/sunlinsol_spfgmr.h +++ b/include/sunlinsol/sunlinsol_spfgmr.h @@ -119,12 +119,6 @@ SUNDIALS_EXPORT int SUNLinSolSpace_SPFGMR(SUNLinearSolver S, long int *lenrwLS, long int *leniwLS); SUNDIALS_EXPORT int SUNLinSolFree_SPFGMR(SUNLinearSolver S); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetInfoFilename instead") -int SUNLinSolSetInfoFile_SPFGMR(SUNLinearSolver LS, - FILE* info_file); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger interface instead") -int SUNLinSolSetPrintLevel_SPFGMR(SUNLinearSolver LS, int print_level); - #ifdef __cplusplus } diff --git a/include/sunlinsol/sunlinsol_spgmr.h b/include/sunlinsol/sunlinsol_spgmr.h index 3fe7da9aee..807556b9a3 100644 --- a/include/sunlinsol/sunlinsol_spgmr.h +++ b/include/sunlinsol/sunlinsol_spgmr.h @@ -121,13 +121,6 @@ SUNDIALS_EXPORT int SUNLinSolSpace_SPGMR(SUNLinearSolver S, long int *lenrwLS, long int *leniwLS); SUNDIALS_EXPORT int SUNLinSolFree_SPGMR(SUNLinearSolver S); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetInfoFilename instead") -int SUNLinSolSetInfoFile_SPGMR(SUNLinearSolver LS, - FILE* info_file); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger interface instead") -int SUNLinSolSetPrintLevel_SPGMR(SUNLinearSolver LS, int print_level); - - #ifdef __cplusplus } diff --git a/include/sunlinsol/sunlinsol_sptfqmr.h b/include/sunlinsol/sunlinsol_sptfqmr.h index 79f4f5f306..11355d15d9 100644 --- a/include/sunlinsol/sunlinsol_sptfqmr.h +++ b/include/sunlinsol/sunlinsol_sptfqmr.h @@ -112,12 +112,6 @@ SUNDIALS_EXPORT int SUNLinSolSpace_SPTFQMR(SUNLinearSolver S, long int *lenrwLS, long int *leniwLS); SUNDIALS_EXPORT int SUNLinSolFree_SPTFQMR(SUNLinearSolver S); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetInfoFilename instead") -int SUNLinSolSetInfoFile_SPTFQMR(SUNLinearSolver LS, - FILE* info_file); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger interface instead") -int SUNLinSolSetPrintLevel_SPTFQMR(SUNLinearSolver LS, int print_level); - #ifdef __cplusplus } diff --git a/include/sunnonlinsol/sunnonlinsol_fixedpoint.h b/include/sunnonlinsol/sunnonlinsol_fixedpoint.h index 06c5f386a8..caaea50c20 100644 --- a/include/sunnonlinsol/sunnonlinsol_fixedpoint.h +++ b/include/sunnonlinsol/sunnonlinsol_fixedpoint.h @@ -122,15 +122,6 @@ SUNDIALS_EXPORT int SUNNonlinSolGetNumConvFails_FixedPoint(SUNNonlinearSolver NL SUNDIALS_EXPORT int SUNNonlinSolGetSysFn_FixedPoint(SUNNonlinearSolver NLS, SUNNonlinSolSysFn *SysFn); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetInfoFilename instead") -int SUNNonlinSolSetInfoFile_FixedPoint(SUNNonlinearSolver NLS, - FILE* info_file); - -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger interface instead") -SUNDIALS_EXPORT int SUNNonlinSolSetPrintLevel_FixedPoint(SUNNonlinearSolver NLS, - int print_level); - - #ifdef __cplusplus } #endif diff --git a/include/sunnonlinsol/sunnonlinsol_newton.h b/include/sunnonlinsol/sunnonlinsol_newton.h index 9f6333cb5c..d6bbe89d4f 100644 --- a/include/sunnonlinsol/sunnonlinsol_newton.h +++ b/include/sunnonlinsol/sunnonlinsol_newton.h @@ -113,15 +113,6 @@ SUNDIALS_EXPORT int SUNNonlinSolGetNumConvFails_Newton(SUNNonlinearSolver NLS, SUNDIALS_EXPORT int SUNNonlinSolGetSysFn_Newton(SUNNonlinearSolver NLS, SUNNonlinSolSysFn *SysFn); -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger_SetInfoFilename instead") -int SUNNonlinSolSetInfoFile_Newton(SUNNonlinearSolver NLS, - FILE* info_file); - -SUNDIALS_DEPRECATED_EXPORT_MSG("Use SUNLogger interface instead") -SUNDIALS_EXPORT int SUNNonlinSolSetPrintLevel_Newton(SUNNonlinearSolver NLS, - int print_level); - - #ifdef __cplusplus } #endif diff --git a/scripts/cpodes b/scripts/cpodes deleted file mode 100755 index ccc4f2bcde..0000000000 --- a/scripts/cpodes +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh - -tarfile=$1 -distrobase=$2 -doc=$3 - -shift 3 -tar=$* - -echo " --- Add cpodes module to $tarfile" - -#if [ $doc = "T" ]; then -#$tar $tarfile $distrobase/doc/cpodes/cps_guide.ps -#$tar $tarfile $distrobase/doc/cpodes/cps_guide.pdf -#$tar $tarfile $distrobase/doc/cpodes/cps_examples.ps -#$tar $tarfile $distrobase/doc/cpodes/cps_examples.pdf -#fi - -$tar $tarfile $distrobase/include/cpodes/cpodes.h -$tar $tarfile $distrobase/include/cpodes/cpodes_direct.h -$tar $tarfile $distrobase/include/cpodes/cpodes_dense.h -$tar $tarfile $distrobase/include/cpodes/cpodes_band.h -$tar $tarfile $distrobase/include/cpodes/cpodes_lapack.h -$tar $tarfile $distrobase/include/cpodes/cpodes_spgmr.h -$tar $tarfile $distrobase/include/cpodes/cpodes_spbcgs.h -$tar $tarfile $distrobase/include/cpodes/cpodes_sptfqmr.h -$tar $tarfile $distrobase/include/cpodes/cpodes_spils.h -$tar $tarfile $distrobase/include/cpodes/cpodes_bandpre.h -$tar $tarfile $distrobase/include/cpodes/cpodes_bbdpre.h - -$tar $tarfile $distrobase/src/cpodes/LICENSE -$tar $tarfile $distrobase/src/cpodes/NOTICE -$tar $tarfile $distrobase/src/cpodes/README -$tar $tarfile $distrobase/src/cpodes/CMakeLists.txt - -$tar $tarfile $distrobase/src/cpodes/cpodes.c -$tar $tarfile $distrobase/src/cpodes/cpodes_nls.c -$tar $tarfile $distrobase/src/cpodes/cpodes_proj.c -$tar $tarfile $distrobase/src/cpodes/cpodes_root.c -$tar $tarfile $distrobase/src/cpodes/cpodes_io.c -$tar $tarfile $distrobase/src/cpodes/cpodes_ic.c -$tar $tarfile $distrobase/src/cpodes/cpodes_direct.c -$tar $tarfile $distrobase/src/cpodes/cpodes_dense.c -$tar $tarfile $distrobase/src/cpodes/cpodes_band.c -$tar $tarfile $distrobase/src/cpodes/cpodes_lapack.c -$tar $tarfile $distrobase/src/cpodes/cpodes_spils.c -$tar $tarfile $distrobase/src/cpodes/cpodes_spgmr.c -$tar $tarfile $distrobase/src/cpodes/cpodes_spbcgs.c -$tar $tarfile $distrobase/src/cpodes/cpodes_sptfqmr.c -$tar $tarfile $distrobase/src/cpodes/cpodes_bandpre.c -$tar $tarfile $distrobase/src/cpodes/cpodes_bbdpre.c -$tar $tarfile $distrobase/src/cpodes/cpodes_private.h -$tar $tarfile $distrobase/src/cpodes/cpodes_impl.h -$tar $tarfile $distrobase/src/cpodes/cpodes_direct_impl.h -$tar $tarfile $distrobase/src/cpodes/cpodes_spils_impl.h -$tar $tarfile $distrobase/src/cpodes/cpodes_bandpre_impl.h -$tar $tarfile $distrobase/src/cpodes/cpodes_bbdpre_impl.h - -echo " --- Add cpodes examples to $tarfile" - -$tar $tarfile $distrobase/examples/cpodes/CMakeLists.txt - -$tar $tarfile $distrobase/examples/cpodes/serial/README -$tar $tarfile $distrobase/examples/cpodes/serial/CMakeLists.txt -$tar $tarfile $distrobase/examples/cpodes/serial/cpsAdvDiff_bnd.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsAdvDiff_bndL.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsAdvDiff_non.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsAkzoNob_dnsL.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsNewtCrd_dns.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsPend_dns.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsPend_dnsL.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsRoberts_dns.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsRoberts_dnsL.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsSlCrank_dns.c -$tar $tarfile $distrobase/examples/cpodes/serial/cpsVanDPol_non.c - -$tar $tarfile $distrobase/examples/cpodes/parallel/README -$tar $tarfile $distrobase/examples/cpodes/parallel/CMakeLists.txt -$tar $tarfile $distrobase/examples/cpodes/parallel/cpsHeat2D_kry_bbd_p.c -$tar $tarfile $distrobase/examples/cpodes/parallel/cpsHeat2D_kry_bbd_p.out - diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index c191270ec2..2a910b107d 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -102,10 +102,6 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->relax_enabled = SUNFALSE; ark_mem->relax_mem = NULL; - /* Initialize diagnostics reporting variables */ - ark_mem->report = SUNFALSE; - ark_mem->diagfp = NULL; - /* Initialize lrw and liw */ ark_mem->lrw = 18; ark_mem->liw = 41; /* fcn/data ptr, int, long int, sunindextype, booleantype */ @@ -856,8 +852,8 @@ int arkEvolve(ARKodeMem ark_mem, realtype tout, N_Vector yout, attempts++; ark_mem->nst_attempts++; -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkEvolve", "start-step", "step = %li, attempt = %i, h = %"RSYM", tcur = %"RSYM, ark_mem->nst, attempts, ark_mem->h, ark_mem->tcur); @@ -1435,7 +1431,6 @@ void arkPrintMem(ARKodeMem ark_mem, FILE *outfile) fprintf(outfile, "tstopset = %i\n", ark_mem->tstopset); fprintf(outfile, "tstopinterp = %i\n", ark_mem->tstopinterp); fprintf(outfile, "tstop = %" RSYM"\n", ark_mem->tstop); - fprintf(outfile, "report = %i\n", ark_mem->report); fprintf(outfile, "VabstolMallocDone = %i\n", ark_mem->VabstolMallocDone); fprintf(outfile, "MallocDone = %i\n", ark_mem->MallocDone); fprintf(outfile, "initsetup = %i\n", ark_mem->initsetup); @@ -2481,8 +2476,8 @@ int arkCompleteStep(ARKodeMem ark_mem, realtype dsm) ark_mem->tcur = ark_mem->tstop; } -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkCompleteStep", "end-step", "step = %li, h = %"RSYM", tcur = %"RSYM, ark_mem->nst, ark_mem->h, ark_mem->tcur); diff --git a/src/arkode/arkode_adapt.c b/src/arkode/arkode_adapt.c index afe0dfe61b..d18cdf5d5a 100644 --- a/src/arkode/arkode_adapt.c +++ b/src/arkode/arkode_adapt.c @@ -152,10 +152,6 @@ int arkAdapt(void* arkode_mem, ARKodeHAdaptMem hadapt_mem, /* enforce minimum bound time step reduction */ h_acc = int_dir * SUNMAX(SUNRabs(h_acc), SUNRabs(hadapt_mem->etamin*hcur)); - /* Solver diagnostics reporting */ - if (ark_mem->report) - fprintf(ark_mem->diagfp, "%"RSYM" %"RSYM" ", h_acc, h_cfl); - #if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::arkAdapt", "new-step-after-max-min-bounds", @@ -187,12 +183,8 @@ int arkAdapt(void* arkode_mem, ARKodeHAdaptMem hadapt_mem, ark_mem->eta /= SUNMAX(ONE, SUNRabs(hcur) * ark_mem->hmax_inv*ark_mem->eta); - /* Solver diagnostics reporting */ - if (ark_mem->report) - fprintf(ark_mem->diagfp, "%"RSYM"\n", ark_mem->eta); - -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::arkAdapt", +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkAdapt", "new-step-eta", "eta = %"RSYM, ark_mem->eta); #endif diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index a3d22e2dee..b1ea90d03f 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1268,12 +1268,6 @@ int arkStep_Init(void* arkode_mem, int init_type) return (ARK_ILL_INPUT); } } - - /* If configured with either predictor 4 or 5 and a non-identity mass - matrix, reset to trivial predictor */ - if (step_mem->mass_type != MASS_IDENTITY) - if ((step_mem->predictor == 4) || (step_mem->predictor == 5)) - step_mem->predictor = 0; } /* set appropriate TakeStep routine based on problem configuration */ @@ -1883,8 +1877,8 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) else ark_mem->tcur = ark_mem->tn + step_mem->Be->c[is]*ark_mem->h; -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkStep_TakeStep_Z", "start-stage", "step = %li, stage = %i, implicit = %i, h = %"RSYM", tcur = %"RSYM, ark_mem->nst, is, implicit_stage, ark_mem->h, ark_mem->tcur); @@ -1935,11 +1929,6 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) N_VPrintFile(step_mem->sdata, ARK_LOGGER->debug_fp); #endif - /* solver diagnostics reporting */ - if (ark_mem->report) - fprintf(ark_mem->diagfp, "ARKStep step %li %"RSYM" %i %"RSYM"\n", - ark_mem->nst, ark_mem->h, is, ark_mem->tcur); - /* perform implicit solve if required */ if (implicit_stage) { @@ -2088,11 +2077,6 @@ int arkStep_TakeStep_Z(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) N_VPrintFile(ark_mem->ycur, ARK_LOGGER->debug_fp); #endif - /* solver diagnostics reporting */ - if (ark_mem->report) - fprintf(ark_mem->diagfp, "ARKStep 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::arkStep_TakeStep_Z", "end-step", @@ -2742,28 +2726,6 @@ int arkStep_StageSetup(ARKodeMem ark_mem, booleantype implicit) ONE : step_mem->gamma / step_mem->gammap; /* protect x/x != 1.0 */ } - /* If predictor==5, then sdata=0 (plus any implicit forcing). - Set sdata appropriately and return */ - if (implicit && (step_mem->predictor == 5)) { - - /* apply external polynomial forcing (updates nvec, cvals, Xvecs) */ - if (step_mem->impforcing) { - nvec = 0; - - step_mem->stage_times[0] = ark_mem->tcur; - step_mem->stage_coefs[0] = step_mem->gamma; - - arkStep_ApplyForcing(step_mem, step_mem->stage_times, - step_mem->stage_coefs, 1, &nvec); - retval = N_VLinearCombination(nvec, cvals, Xvecs, step_mem->sdata); - if (retval != 0) return(ARK_VECTOROP_ERR); - } else { - N_VConst(ZERO, step_mem->sdata); - } - return (ARK_SUCCESS); - - } - /* If implicit, initialize sdata to yn - zpred (here: zpred = zp), and set first entries for eventual N_VLinearCombination call */ nvec = 0; diff --git a/src/arkode/arkode_arkstep_io.c b/src/arkode/arkode_arkstep_io.c index 5925b29582..1452669fbb 100644 --- a/src/arkode/arkode_arkstep_io.c +++ b/src/arkode/arkode_arkstep_io.c @@ -44,8 +44,6 @@ int ARKStepSetErrHandlerFn(void *arkode_mem, ARKErrHandlerFn ehfun, return(arkSetErrHandlerFn(arkode_mem, ehfun, eh_data)); } int ARKStepSetErrFile(void *arkode_mem, FILE *errfp) { return(arkSetErrFile(arkode_mem, errfp)); } -int ARKStepSetDiagnostics(void *arkode_mem, FILE *diagfp) { - return(arkSetDiagnostics(arkode_mem, diagfp)); } int ARKStepSetMaxNumSteps(void *arkode_mem, long int mxsteps) { return(arkSetMaxNumSteps(arkode_mem, mxsteps)); } int ARKStepSetMaxHnilWarns(void *arkode_mem, int mxhnil) { @@ -1456,16 +1454,6 @@ int ARKStepSetPredictorMethod(void *arkode_mem, int pred_method) return(ARK_ILL_INPUT); } - /* Deprecate options 4 and 5 */ - if (pred_method == 4) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ARKStep", "ARKStepSetPredictorMethod", - "Predictor option 4 is deprecated, and will be removed in an upcoming release"); - } - if (pred_method == 5) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ARKStep", "ARKStepSetPredictorMethod", - "Predictor option 5 is deprecated, and will be removed in an upcoming release"); - } - /* set parameter */ step_mem->predictor = pred_method; @@ -1564,14 +1552,6 @@ int ARKStepSetStagePredictFn(void *arkode_mem, &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - /* override predictor method 5 if non-NULL PredictStage is supplied */ - if ((step_mem->predictor == 5) && (PredictStage != NULL)) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ARKStep", - "ARKStepSetStagePredictFn", - "User-supplied predictor is incompatible with predictor method 5"); - return(ARK_ILL_INPUT); - } - step_mem->stage_predict = PredictStage; return(ARK_SUCCESS); } diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 4f1265358b..78aec3331a 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -764,8 +764,8 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) cvals = step_mem->cvals; Xvecs = step_mem->Xvecs; -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", "start-stage", "step = %li, stage = 0, h = %"RSYM", tcur = %"RSYM, ark_mem->nst, ark_mem->h, ark_mem->tcur); @@ -804,13 +804,8 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) /* Set current stage time(s) */ 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", - ark_mem->nst, ark_mem->h, is, ark_mem->tcur); - -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", "start-stage", "step = %li, stage = %i, h = %"RSYM", tcur = %"RSYM, ark_mem->nst, is, ark_mem->h, ark_mem->tcur); @@ -866,13 +861,8 @@ int erkStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) 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", - ark_mem->nst, ark_mem->h, *dsmPtr); - -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::erkStep_TakeStep", "error-test", "step = %li, h = %"RSYM", dsm = %"RSYM, ark_mem->nst, ark_mem->h, *dsmPtr); diff --git a/src/arkode/arkode_erkstep_io.c b/src/arkode/arkode_erkstep_io.c index bfdf929f3e..7a3f9dbc54 100644 --- a/src/arkode/arkode_erkstep_io.c +++ b/src/arkode/arkode_erkstep_io.c @@ -45,8 +45,6 @@ int ERKStepSetErrFile(void *arkode_mem, FILE *errfp) { return(arkSetErrFile(arkode_mem, errfp)); } int ERKStepSetUserData(void *arkode_mem, void *user_data) { return(arkSetUserData(arkode_mem, user_data)); } -int ERKStepSetDiagnostics(void *arkode_mem, FILE *diagfp) { - return(arkSetDiagnostics(arkode_mem, diagfp)); } int ERKStepSetMaxNumSteps(void *arkode_mem, long int mxsteps) { return(arkSetMaxNumSteps(arkode_mem, mxsteps)); } int ERKStepSetMaxHnilWarns(void *arkode_mem, int mxhnil) { diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 6cd8b85c25..596d3202a5 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -390,10 +390,6 @@ struct ARKodeMemRec long int netf; /* num error test failures */ long int nconstrfails; /* number of constraint failures */ - /* Diagnostic output */ - booleantype report; /* flag to enable/disable diagnostic output */ - FILE *diagfp; /* diagnostic outputs are sent to diagfp */ - /* Space requirements for ARKODE */ sunindextype lrw1; /* no. of realtype words in 1 N_Vector */ sunindextype liw1; /* no. of integer words in 1 N_Vector */ @@ -1010,7 +1006,6 @@ int arkSetErrHandlerFn(void *arkode_mem, void *eh_data); int arkSetErrFile(void *arkode_mem, FILE *errfp); int arkSetUserData(void *arkode_mem, void *user_data); -int arkSetDiagnostics(void *arkode_mem, FILE *diagfp); int arkSetMaxNumSteps(void *arkode_mem, long int mxsteps); int arkSetMaxHnilWarns(void *arkode_mem, int mxhnil); int arkSetInitStep(void *arkode_mem, realtype hin); diff --git a/src/arkode/arkode_interp.c b/src/arkode/arkode_interp.c index 9854194c3f..542126463a 100644 --- a/src/arkode/arkode_interp.c +++ b/src/arkode/arkode_interp.c @@ -497,8 +497,8 @@ int arkInterpEvaluate_Hermite(void* arkode_mem, ARKInterp interp, q = SUNMAX(order, 0); /* respect lower bound */ q = SUNMIN(q, HINT_DEGREE(interp)); /* respect max possible */ -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkInterpEvaluate_Hermite", "interp-eval", "tau = %"RSYM", d = %i, q = %i", tau, d, q); #endif @@ -1185,8 +1185,8 @@ int arkInterpEvaluate_Lagrange(void* arkode_mem, ARKInterp I, q = SUNMAX(degree, 0); /* respect lower bound */ q = SUNMIN(q, nhist-1); /* respect max possible */ -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkInterpEvaluate_Lagrange", "interp-eval", "tau = %"RSYM", d = %i, q = %i", tau, deriv, q); #endif diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index cc45123175..fe6bd4c5b1 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -86,8 +86,6 @@ int arkSetDefaults(void *arkode_mem) ark_mem->tstopset = SUNFALSE; /* no stop time set */ ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ ark_mem->tstop = ZERO; /* no fixed stop time */ - ark_mem->diagfp = NULL; /* no solver diagnostics file */ - ark_mem->report = SUNFALSE; /* don't report solver diagnostics */ ark_mem->hadapt_mem->etamx1 = ETAMX1; /* max change on first step */ ark_mem->hadapt_mem->etamxf = ETAMXF; /* max change on error-failed step */ ark_mem->hadapt_mem->etamin = ETAMIN; /* min bound on time step reduction */ @@ -309,33 +307,6 @@ int arkSetUserData(void *arkode_mem, void *user_data) return(ARK_SUCCESS); } - -/*--------------------------------------------------------------- - arkSetDiagnostics: - - Specifies to enable solver diagnostics, and specifies the FILE - pointer for output (diagfp==NULL disables output) - ---------------------------------------------------------------*/ -int arkSetDiagnostics(void *arkode_mem, FILE *diagfp) -{ - ARKodeMem ark_mem; - if (arkode_mem==NULL) { - arkProcessError(NULL, ARK_MEM_NULL, "ARKODE", - "arkSetDiagnostics", MSG_ARK_NO_MEM); - return(ARK_MEM_NULL); - } - ark_mem = (ARKodeMem) arkode_mem; - ark_mem->diagfp = diagfp; - if (diagfp != NULL) { - ark_mem->report = SUNTRUE; - } else { - ark_mem->report = SUNFALSE; - } - - return(ARK_SUCCESS); -} - - /*--------------------------------------------------------------- arkSetAdaptController: diff --git a/src/arkode/arkode_ls.c b/src/arkode/arkode_ls.c index 71c05682a6..bd6749d401 100644 --- a/src/arkode/arkode_ls.c +++ b/src/arkode/arkode_ls.c @@ -2731,15 +2731,15 @@ int arkLsSolve(void* arkode_mem, N_Vector b, realtype tnow, if (retval != SUNLS_SUCCESS) arkls_mem->ncfl++; /* Log solver statistics to diagnostics file (if requested) */ - if (ark_mem->report) - fprintf(ark_mem->diagfp, "ARKLS kry %"RSYM" %"RSYM" %i %i\n", - bnorm, resnorm, nli_inc, (int) (arkls_mem->nps - nps_inc)); - -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, "ARKODE::arkLsSolve", +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkLsSolve", "ls-stats", "bnorm = %"RSYM", resnorm = %"RSYM ", ls_iters = %i, prec_solves = %i", bnorm, resnorm, nli_inc, (int) (arkls_mem->nps - nps_inc)); +#else + /* Suppress warning about set but unused variables due to logging ifdef. */ + (void) nps_inc; + (void) resnorm; #endif /* Interpret solver return value */ @@ -3150,15 +3150,15 @@ int arkLsMassSolve(void *arkode_mem, N_Vector b, realtype nlscoef) if (retval != SUNLS_SUCCESS) arkls_mem->ncfl++; /* Log solver statistics to diagnostics file (if requested) */ - if (ark_mem->report) - fprintf(ark_mem->diagfp, "ARKLS mass %"RSYM" %i %i\n", - resnorm, nli_inc, (int) (arkls_mem->nps - nps_inc)); - -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkLsMassSolve", "mass-ls-stats", "resnorm = %"RSYM", ls_iters = %i, prec_solves = %i", resnorm, nli_inc, (int) (arkls_mem->nps - nps_inc)); +#else + /* Suppress warning about set but unused variables due to logging ifdef. */ + (void) nps_inc; + (void) resnorm; #endif /* Interpret solver return value */ diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index f6af65c193..e6d32c65b3 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1569,12 +1569,8 @@ int mriStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) ark_mem->tcur = ark_mem->tn + step_mem->MRIC->c[is]*ark_mem->h; /* Solver diagnostics reporting */ - if (ark_mem->report) - fprintf(ark_mem->diagfp, "MRIStep 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, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::mriStep_TakeStep", "start-stage", "step = %li, stage = %i, stage type = %d, h = %"RSYM", tcur = %"RSYM, ark_mem->nst, is, step_mem->stagetypes[is], ark_mem->h, ark_mem->tcur); @@ -1679,12 +1675,8 @@ int mriStep_TakeStep(void* arkode_mem, realtype *dsmPtr, int *nflagPtr) #endif /* Solver diagnostics reporting */ - if (ark_mem->report) - fprintf(ark_mem->diagfp, "MRIStep 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, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::mriStep_TakeStep", "error-test", "step = %li, h = %"RSYM", dsm = %"RSYM, ark_mem->nst, ark_mem->h, *dsmPtr); @@ -2810,7 +2802,7 @@ int mriStepInnerStepper_Evolve(MRIStepInnerStepper stepper, if (stepper->ops == NULL) return ARK_ILL_INPUT; if (stepper->ops->evolve == NULL) return ARK_ILL_INPUT; -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG SUNLogger_QueueMsg(stepper->sunctx->logger, SUN_LOGLEVEL_INFO, "ARKODE::mriStepInnerStepper_Evolve", "start-inner-evolve", "t0 = %"RSYM", tout = %"RSYM, t0, tout); @@ -2818,7 +2810,7 @@ int mriStepInnerStepper_Evolve(MRIStepInnerStepper stepper, stepper->last_flag = stepper->ops->evolve(stepper, t0, tout, y); -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG SUNLogger_QueueMsg(stepper->sunctx->logger, SUN_LOGLEVEL_INFO, "ARKODE::mriStepInnerStepper_Evolve", "end-inner-evolve", "flag = %i", stepper->last_flag); @@ -2851,7 +2843,7 @@ int mriStepInnerStepper_Reset(MRIStepInnerStepper stepper, if (stepper == NULL) return ARK_ILL_INPUT; if (stepper->ops == NULL) return ARK_ILL_INPUT; -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG SUNLogger_QueueMsg(stepper->sunctx->logger, SUN_LOGLEVEL_INFO, "ARKODE::mriStepInnerStepper_Reset", "reset-inner-state", "tR = %"RSYM, tR); diff --git a/src/arkode/arkode_mristep_io.c b/src/arkode/arkode_mristep_io.c index 5c6ced636e..da5a76442b 100644 --- a/src/arkode/arkode_mristep_io.c +++ b/src/arkode/arkode_mristep_io.c @@ -40,8 +40,6 @@ int MRIStepSetErrHandlerFn(void *arkode_mem, ARKErrHandlerFn ehfun, return(arkSetErrHandlerFn(arkode_mem, ehfun, eh_data)); } int MRIStepSetErrFile(void *arkode_mem, FILE *errfp) { return(arkSetErrFile(arkode_mem, errfp)); } -int MRIStepSetDiagnostics(void *arkode_mem, FILE *diagfp) { - return(arkSetDiagnostics(arkode_mem, diagfp)); } int MRIStepSetMaxNumSteps(void *arkode_mem, long int mxsteps) { return(arkSetMaxNumSteps(arkode_mem, mxsteps)); } int MRIStepSetMaxHnilWarns(void *arkode_mem, int mxhnil) { @@ -600,12 +598,6 @@ int MRIStepSetPredictorMethod(void *arkode_mem, int pred_method) &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - /* Deprecate option 4 */ - if (pred_method == 4) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::MRIStep", "MRIStepSetPredictorMethod", - "Predictor option 4 is deprecated, and will be removed in an upcoming release"); - } - /* set parameter */ step_mem->predictor = pred_method; @@ -704,14 +696,6 @@ int MRIStepSetStagePredictFn(void *arkode_mem, &ark_mem, &step_mem); if (retval != ARK_SUCCESS) return(retval); - /* override predictor method 5 if non-NULL PredictStage is supplied */ - if ((step_mem->predictor == 5) && (PredictStage != NULL)) { - arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::MRIStep", - "MRIStepSetStagePredictFn", - "User-supplied predictor is incompatible with predictor method 5"); - return(ARK_ILL_INPUT); - } - step_mem->stage_predict = PredictStage; return(ARK_SUCCESS); } diff --git a/src/arkode/arkode_relaxation.c b/src/arkode/arkode_relaxation.c index 4badc7cb70..5161b46dc0 100644 --- a/src/arkode/arkode_relaxation.c +++ b/src/arkode/arkode_relaxation.c @@ -841,8 +841,8 @@ int arkRelax(ARKodeMem ark_mem, int* relax_fails, realtype* dsm_inout, /* Cut step size and try again */ ark_mem->eta = relax_mem->eta_fail; -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkStep_TakeStep_Z", "relaxation", "relaxation failed"); #endif @@ -858,8 +858,8 @@ int arkRelax(ARKodeMem ark_mem, int* relax_fails, realtype* dsm_inout, N_VLinearSum(relax_val, ark_mem->ycur, (ONE - relax_val), ark_mem->yn, ark_mem->ycur); -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_INFO, +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG + SUNLogger_QueueMsg(ARK_LOGGER, SUN_LOGLEVEL_DEBUG, "ARKODE::arkStep_TakeStep_Z", "relaxation", "relaxation parameter = %"RSYM", relaxed h = %"RSYM ", relaxed error = %"RSYM, diff --git a/src/arkode/fmod/farkode_arkstep_mod.c b/src/arkode/fmod/farkode_arkstep_mod.c index 311cea273e..cd0dfe64b1 100644 --- a/src/arkode/fmod/farkode_arkstep_mod.c +++ b/src/arkode/fmod/farkode_arkstep_mod.c @@ -1255,20 +1255,6 @@ SWIGEXPORT int _wrap_FARKStepSetUserData(void *farg1, void *farg2) { } -SWIGEXPORT int _wrap_FARKStepSetDiagnostics(void *farg1, void *farg2) { - int fresult ; - void *arg1 = (void *) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (void *)(farg1); - arg2 = (FILE *)(farg2); - result = (int)ARKStepSetDiagnostics(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FARKStepSetPostprocessStepFn(void *farg1, ARKPostProcessFn 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 08ee14cc0a..189ac8b844 100644 --- a/src/arkode/fmod/farkode_arkstep_mod.f90 +++ b/src/arkode/fmod/farkode_arkstep_mod.f90 @@ -134,7 +134,6 @@ module farkode_arkstep_mod public :: FARKStepSetErrHandlerFn public :: FARKStepSetErrFile public :: FARKStepSetUserData - public :: FARKStepSetDiagnostics public :: FARKStepSetPostprocessStepFn public :: FARKStepSetPostprocessStageFn public :: FARKStepSetStagePredictFn @@ -888,15 +887,6 @@ function swigc_FARKStepSetUserData(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKStepSetDiagnostics(farg1, farg2) & -bind(C, name="_wrap_FARKStepSetDiagnostics") & -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_FARKStepSetPostprocessStepFn(farg1, farg2) & bind(C, name="_wrap_FARKStepSetPostprocessStepFn") & result(fresult) @@ -3023,22 +3013,6 @@ function FARKStepSetUserData(arkode_mem, user_data) & swig_result = fresult end function -function FARKStepSetDiagnostics(arkode_mem, diagfp) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: arkode_mem -type(C_PTR) :: diagfp -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = arkode_mem -farg2 = diagfp -fresult = swigc_FARKStepSetDiagnostics(farg1, farg2) -swig_result = fresult -end function - function FARKStepSetPostprocessStepFn(arkode_mem, processstep) & 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 8a6be0ea0f..1e04abc320 100644 --- a/src/arkode/fmod/farkode_erkstep_mod.c +++ b/src/arkode/fmod/farkode_erkstep_mod.c @@ -923,20 +923,6 @@ SWIGEXPORT int _wrap_FERKStepSetUserData(void *farg1, void *farg2) { } -SWIGEXPORT int _wrap_FERKStepSetDiagnostics(void *farg1, void *farg2) { - int fresult ; - void *arg1 = (void *) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (void *)(farg1); - arg2 = (FILE *)(farg2); - result = (int)ERKStepSetDiagnostics(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FERKStepSetPostprocessStepFn(void *farg1, ARKPostProcessFn 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 d7f2b4fa8b..d3650fe392 100644 --- a/src/arkode/fmod/farkode_erkstep_mod.f90 +++ b/src/arkode/fmod/farkode_erkstep_mod.f90 @@ -99,7 +99,6 @@ module farkode_erkstep_mod public :: FERKStepSetErrHandlerFn public :: FERKStepSetErrFile public :: FERKStepSetUserData - public :: FERKStepSetDiagnostics public :: FERKStepSetPostprocessStepFn public :: FERKStepSetPostprocessStageFn public :: FERKStepEvolve @@ -589,15 +588,6 @@ function swigc_FERKStepSetUserData(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FERKStepSetDiagnostics(farg1, farg2) & -bind(C, name="_wrap_FERKStepSetDiagnostics") & -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_FERKStepSetPostprocessStepFn(farg1, farg2) & bind(C, name="_wrap_FERKStepSetPostprocessStepFn") & result(fresult) @@ -1853,22 +1843,6 @@ function FERKStepSetUserData(arkode_mem, user_data) & swig_result = fresult end function -function FERKStepSetDiagnostics(arkode_mem, diagfp) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: arkode_mem -type(C_PTR) :: diagfp -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = arkode_mem -farg2 = diagfp -fresult = swigc_FERKStepSetDiagnostics(farg1, farg2) -swig_result = fresult -end function - function FERKStepSetPostprocessStepFn(arkode_mem, processstep) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index 62abb8d176..6724ba8188 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -163,22 +163,6 @@ module farkode_mod public :: FARKodeButcherTable_IsStifflyAccurate public :: FARKodeButcherTable_CheckOrder public :: FARKodeButcherTable_CheckARKOrder - integer(C_INT), parameter, public :: SDIRK_2_1_2 = 100_C_INT - integer(C_INT), parameter, public :: BILLINGTON_3_3_2 = 101_C_INT - integer(C_INT), parameter, public :: TRBDF2_3_3_2 = 102_C_INT - integer(C_INT), parameter, public :: KVAERNO_4_2_3 = 103_C_INT - integer(C_INT), parameter, public :: ARK324L2SA_DIRK_4_2_3 = 104_C_INT - integer(C_INT), parameter, public :: CASH_5_2_4 = 105_C_INT - integer(C_INT), parameter, public :: CASH_5_3_4 = 106_C_INT - integer(C_INT), parameter, public :: SDIRK_5_3_4 = 107_C_INT - integer(C_INT), parameter, public :: KVAERNO_5_3_4 = 108_C_INT - integer(C_INT), parameter, public :: ARK436L2SA_DIRK_6_3_4 = 109_C_INT - integer(C_INT), parameter, public :: KVAERNO_7_4_5 = 110_C_INT - integer(C_INT), parameter, public :: ARK548L2SA_DIRK_8_4_5 = 111_C_INT - integer(C_INT), parameter, public :: ARK437L2SA_DIRK_7_3_4 = 112_C_INT - integer(C_INT), parameter, public :: ARK548L2SAb_DIRK_8_4_5 = 113_C_INT - integer(C_INT), parameter, public :: MIN_DIRK_NUM = 100_C_INT - integer(C_INT), parameter, public :: MAX_DIRK_NUM = 113_C_INT ! typedef enum ARKODE_DIRKTableID enum, bind(c) enumerator :: ARKODE_DIRK_NONE = -1 @@ -223,23 +207,6 @@ module farkode_mod integer(C_SIZE_T), public :: size = 0 end type public :: FARKodeButcherTable_LoadDIRKByName - integer(C_INT), parameter, public :: HEUN_EULER_2_1_2 = 0_C_INT - integer(C_INT), parameter, public :: BOGACKI_SHAMPINE_4_2_3 = 1_C_INT - integer(C_INT), parameter, public :: ARK324L2SA_ERK_4_2_3 = 2_C_INT - integer(C_INT), parameter, public :: ZONNEVELD_5_3_4 = 3_C_INT - integer(C_INT), parameter, public :: ARK436L2SA_ERK_6_3_4 = 4_C_INT - integer(C_INT), parameter, public :: SAYFY_ABURUB_6_3_4 = 5_C_INT - integer(C_INT), parameter, public :: CASH_KARP_6_4_5 = 6_C_INT - integer(C_INT), parameter, public :: FEHLBERG_6_4_5 = 7_C_INT - integer(C_INT), parameter, public :: DORMAND_PRINCE_7_4_5 = 8_C_INT - integer(C_INT), parameter, public :: ARK548L2SA_ERK_8_4_5 = 9_C_INT - integer(C_INT), parameter, public :: VERNER_8_5_6 = 10_C_INT - integer(C_INT), parameter, public :: FEHLBERG_13_7_8 = 11_C_INT - integer(C_INT), parameter, public :: KNOTH_WOLKE_3_3 = 12_C_INT - integer(C_INT), parameter, public :: ARK437L2SA_ERK_7_3_4 = 13_C_INT - integer(C_INT), parameter, public :: ARK548L2SAb_ERK_8_4_5 = 14_C_INT - integer(C_INT), parameter, public :: MIN_ERK_NUM = 0_C_INT - integer(C_INT), parameter, public :: MAX_ERK_NUM = 21_C_INT ! typedef enum ARKODE_ERKTableID enum, bind(c) enumerator :: ARKODE_ERK_NONE = -1 diff --git a/src/arkode/fmod/farkode_mristep_mod.c b/src/arkode/fmod/farkode_mristep_mod.c index 8ba7ad5296..0065b6553f 100644 --- a/src/arkode/fmod/farkode_mristep_mod.c +++ b/src/arkode/fmod/farkode_mristep_mod.c @@ -1171,20 +1171,6 @@ SWIGEXPORT int _wrap_FMRIStepSetUserData(void *farg1, void *farg2) { } -SWIGEXPORT int _wrap_FMRIStepSetDiagnostics(void *farg1, void *farg2) { - int fresult ; - void *arg1 = (void *) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (void *)(farg1); - arg2 = (FILE *)(farg2); - result = (int)MRIStepSetDiagnostics(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FMRIStepSetPostprocessStepFn(void *farg1, ARKPostProcessFn farg2) { 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 6db939a4b7..d5de6b89fc 100644 --- a/src/arkode/fmod/farkode_mristep_mod.f90 +++ b/src/arkode/fmod/farkode_mristep_mod.f90 @@ -48,17 +48,6 @@ module farkode_mristep_mod end enum integer, parameter, public :: MRISTEP_METHOD_TYPE = kind(MRISTEP_EXPLICIT) public :: MRISTEP_EXPLICIT, MRISTEP_IMPLICIT, MRISTEP_IMEX - integer(C_INT), parameter, public :: MIS_KW3 = 200_C_INT - integer(C_INT), parameter, public :: MRI_GARK_ERK33a = 201_C_INT - integer(C_INT), parameter, public :: MRI_GARK_ERK45a = 202_C_INT - integer(C_INT), parameter, public :: MRI_GARK_IRK21a = 203_C_INT - integer(C_INT), parameter, public :: MRI_GARK_ESDIRK34a = 204_C_INT - integer(C_INT), parameter, public :: MRI_GARK_ESDIRK46a = 205_C_INT - integer(C_INT), parameter, public :: IMEX_MRI_GARK3a = 206_C_INT - integer(C_INT), parameter, public :: IMEX_MRI_GARK3b = 207_C_INT - integer(C_INT), parameter, public :: IMEX_MRI_GARK4 = 208_C_INT - integer(C_INT), parameter, public :: MIN_MRI_NUM = 200_C_INT - integer(C_INT), parameter, public :: MAX_MRI_NUM = 208_C_INT ! typedef enum ARKODE_MRITableID enum, bind(c) enumerator :: ARKODE_MRI_NONE = -1 @@ -169,7 +158,6 @@ module farkode_mristep_mod public :: FMRIStepSetErrHandlerFn public :: FMRIStepSetErrFile public :: FMRIStepSetUserData - public :: FMRIStepSetDiagnostics public :: FMRIStepSetPostprocessStepFn public :: FMRIStepSetPostprocessStageFn public :: FMRIStepSetPreInnerFn @@ -807,15 +795,6 @@ function swigc_FMRIStepSetUserData(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FMRIStepSetDiagnostics(farg1, farg2) & -bind(C, name="_wrap_FMRIStepSetDiagnostics") & -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_FMRIStepSetPostprocessStepFn(farg1, farg2) & bind(C, name="_wrap_FMRIStepSetPostprocessStepFn") & result(fresult) @@ -2449,22 +2428,6 @@ function FMRIStepSetUserData(arkode_mem, user_data) & swig_result = fresult end function -function FMRIStepSetDiagnostics(arkode_mem, diagfp) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: arkode_mem -type(C_PTR) :: diagfp -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = arkode_mem -farg2 = diagfp -fresult = swigc_FMRIStepSetDiagnostics(farg1, farg2) -swig_result = fresult -end function - function FMRIStepSetPostprocessStepFn(arkode_mem, processstep) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/cvode/CMakeLists.txt b/src/cvode/CMakeLists.txt index bcdbe0d513..ed1eb55dfe 100644 --- a/src/cvode/CMakeLists.txt +++ b/src/cvode/CMakeLists.txt @@ -23,12 +23,10 @@ set(cvode_SOURCES cvode_bandpre.c cvode_bbdpre.c cvode_diag.c - cvode_direct.c cvode_io.c cvode_ls.c cvode_nls.c cvode_proj.c - cvode_spils.c ) # Add variable cvode_HEADERS with the exported CVODE header files @@ -37,10 +35,8 @@ set(cvode_HEADERS cvode_bandpre.h cvode_bbdpre.h cvode_diag.h - cvode_direct.h cvode_ls.h cvode_proj.h - cvode_spils.h ) # Add prefix with complete path to the CVODE header files diff --git a/src/cvode/cvode_direct.c b/src/cvode/cvode_direct.c deleted file mode 100644 index ca7c25ec13..0000000000 --- a/src/cvode/cvode_direct.c +++ /dev/null @@ -1,54 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - *----------------------------------------------------------------- - * 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 - *----------------------------------------------------------------- - * Implementation file for the deprecated direct linear solver interface in - * CVODE; these routines now just wrap the updated CVODE generic - * linear solver interface in cvode_ls.h. - *-----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - Exported Functions (wrappers for equivalent routines in cvode_ls.h) - =================================================================*/ - -int CVDlsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS, SUNMatrix A) -{ return(CVodeSetLinearSolver(cvode_mem, LS, A)); } - -int CVDlsSetJacFn(void *cvode_mem, CVDlsJacFn jac) -{ return(CVodeSetJacFn(cvode_mem, jac)); } - -int CVDlsGetWorkSpace(void *cvode_mem, long int *lenrwLS, long int *leniwLS) -{ return(CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS)); } - -int CVDlsGetNumJacEvals(void *cvode_mem, long int *njevals) -{ return(CVodeGetNumJacEvals(cvode_mem, njevals)); } - -int CVDlsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS) -{ return(CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS)); } - -int CVDlsGetLastFlag(void *cvode_mem, long int *flag) -{ return(CVodeGetLastLinFlag(cvode_mem, flag)); } - -char *CVDlsGetReturnFlagName(long int flag) -{ return(CVodeGetLinReturnFlagName(flag)); } - - -#ifdef __cplusplus -} -#endif diff --git a/src/cvode/cvode_spils.c b/src/cvode/cvode_spils.c deleted file mode 100644 index eebde519c5..0000000000 --- a/src/cvode/cvode_spils.c +++ /dev/null @@ -1,76 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Implementation file for the deprecated Scaled, Preconditioned Iterative - * Linear Solver interface in CVODE; these routines now just wrap - * the updated CVODE generic linear solver interface in cvode_ls.h. - * -----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - CVSPILS Exported functions (wrappers for equivalent routines in - cvode_ls.h) - =================================================================*/ - -int CVSpilsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS) -{ return(CVodeSetLinearSolver(cvode_mem, LS, NULL)); } - -int CVSpilsSetEpsLin(void *cvode_mem, realtype eplifac) -{ return(CVodeSetEpsLin(cvode_mem, eplifac)); } - -int CVSpilsSetPreconditioner(void *cvode_mem, CVSpilsPrecSetupFn pset, CVSpilsPrecSolveFn psolve) -{ return(CVodeSetPreconditioner(cvode_mem, pset, psolve)); } - -int CVSpilsSetJacTimes(void *cvode_mem, CVSpilsJacTimesSetupFn jtsetup, CVSpilsJacTimesVecFn jtimes) -{ return(CVodeSetJacTimes(cvode_mem, jtsetup, jtimes)); } - -int CVSpilsGetWorkSpace(void *cvode_mem, long int *lenrwLS, long int *leniwLS) -{ return(CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS)); } - -int CVSpilsGetNumPrecEvals(void *cvode_mem, long int *npevals) -{ return(CVodeGetNumPrecEvals(cvode_mem, npevals)); } - -int CVSpilsGetNumPrecSolves(void *cvode_mem, long int *npsolves) -{ return(CVodeGetNumPrecSolves(cvode_mem, npsolves)); } - -int CVSpilsGetNumLinIters(void *cvode_mem, long int *nliters) -{ return(CVodeGetNumLinIters(cvode_mem, nliters)); } - -int CVSpilsGetNumConvFails(void *cvode_mem, long int *nlcfails) -{ return(CVodeGetNumLinConvFails(cvode_mem, nlcfails)); } - -int CVSpilsGetNumJTSetupEvals(void *cvode_mem, long int *njtsetups) -{ return(CVodeGetNumJTSetupEvals(cvode_mem, njtsetups)); } - -int CVSpilsGetNumJtimesEvals(void *cvode_mem, long int *njvevals) -{ return(CVodeGetNumJtimesEvals(cvode_mem, njvevals)); } - -int CVSpilsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS) -{ return(CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS)); } - -int CVSpilsGetLastFlag(void *cvode_mem, long int *flag) -{ return(CVodeGetLastLinFlag(cvode_mem, flag)); } - -char *CVSpilsGetReturnFlagName(long int flag) -{ return(CVodeGetLinReturnFlagName(flag)); } - - -#ifdef __cplusplus -} -#endif diff --git a/src/cvodes/CMakeLists.txt b/src/cvodes/CMakeLists.txt index 480830056d..38cfc129a9 100644 --- a/src/cvodes/CMakeLists.txt +++ b/src/cvodes/CMakeLists.txt @@ -25,7 +25,6 @@ set(cvodes_SOURCES cvodes_bandpre.c cvodes_bbdpre.c cvodes_diag.c - cvodes_direct.c cvodes_io.c cvodes_ls.c cvodes_nls.c @@ -33,7 +32,6 @@ set(cvodes_SOURCES cvodes_nls_stg.c cvodes_nls_stg1.c cvodes_proj.c - cvodes_spils.c ) # Add variable cvodes_HEADERS with the exported CVODES header files @@ -42,10 +40,8 @@ set(cvodes_HEADERS cvodes_bandpre.h cvodes_bbdpre.h cvodes_diag.h - cvodes_direct.h cvodes_ls.h cvodes_proj.h - cvodes_spils.h ) # Add prefix with complete path to the CVODES header files diff --git a/src/cvodes/cvodes_direct.c b/src/cvodes/cvodes_direct.c deleted file mode 100644 index e5bccaf427..0000000000 --- a/src/cvodes/cvodes_direct.c +++ /dev/null @@ -1,65 +0,0 @@ -/* ----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Header file for the deprecated direct linear solver interface in - * CVODES; these routines now just wrap the updated CVODE generic - * linear solver interface in cvodes_ls.h. - * -----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - Exported Functions (wrappers for equivalent routines in cvodes_ls.h) - =================================================================*/ - -int CVDlsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS, - SUNMatrix A) -{ return(CVodeSetLinearSolver(cvode_mem, LS, A)); } - -int CVDlsSetJacFn(void *cvode_mem, CVDlsJacFn jac) -{ return(CVodeSetJacFn(cvode_mem, jac)); } - -int CVDlsGetWorkSpace(void *cvode_mem, long int *lenrwLS, - long int *leniwLS) -{ return(CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS)); } - -int CVDlsGetNumJacEvals(void *cvode_mem, long int *njevals) -{ return(CVodeGetNumJacEvals(cvode_mem, njevals)); } - -int CVDlsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS) -{ return(CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS)); } - -int CVDlsGetLastFlag(void *cvode_mem, long int *flag) -{ return(CVodeGetLastLinFlag(cvode_mem, flag)); } - -char *CVDlsGetReturnFlagName(long int flag) -{ return(CVodeGetLinReturnFlagName(flag)); } - -int CVDlsSetLinearSolverB(void *cvode_mem, int which, - SUNLinearSolver LS, SUNMatrix A) -{ return(CVodeSetLinearSolverB(cvode_mem, which, LS, A)); } - -int CVDlsSetJacFnB(void *cvode_mem, int which, CVDlsJacFnB jacB) -{ return(CVodeSetJacFnB(cvode_mem, which, jacB)); } - -int CVDlsSetJacFnBS(void *cvode_mem, int which, CVDlsJacFnBS jacBS) -{ return(CVodeSetJacFnBS(cvode_mem, which, jacBS)); } - -#ifdef __cplusplus -} -#endif diff --git a/src/cvodes/cvodes_spils.c b/src/cvodes/cvodes_spils.c deleted file mode 100644 index 9f6f6cd037..0000000000 --- a/src/cvodes/cvodes_spils.c +++ /dev/null @@ -1,107 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * ----------------------------------------------------------------- - * 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 - * ----------------------------------------------------------------- - * Header file for the deprecated Scaled, Preconditioned Iterative - * Linear Solver interface in CVODES; these routines now just wrap - * the updated CVODES generic linear solver interface in cvodes_ls.h. - * -----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - CVSSPILS Exported functions (wrappers for equivalent routines in - cvodes_ls.h) - =================================================================*/ - -int CVSpilsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS) -{ return(CVodeSetLinearSolver(cvode_mem, LS, NULL)); } - -int CVSpilsSetEpsLin(void *cvode_mem, realtype eplifac) -{ return(CVodeSetEpsLin(cvode_mem, eplifac)); } - -int CVSpilsSetPreconditioner(void *cvode_mem, CVSpilsPrecSetupFn pset, - CVSpilsPrecSolveFn psolve) -{ return(CVodeSetPreconditioner(cvode_mem, pset, psolve)); } - -int CVSpilsSetJacTimes(void *cvode_mem, CVSpilsJacTimesSetupFn jtsetup, - CVSpilsJacTimesVecFn jtimes) -{ return(CVodeSetJacTimes(cvode_mem, jtsetup, jtimes)); } - -int CVSpilsGetWorkSpace(void *cvode_mem, long int *lenrwLS, - long int *leniwLS) -{ return(CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS)); } - -int CVSpilsGetNumPrecEvals(void *cvode_mem, long int *npevals) -{ return(CVodeGetNumPrecEvals(cvode_mem, npevals)); } - -int CVSpilsGetNumPrecSolves(void *cvode_mem, long int *npsolves) -{ return(CVodeGetNumPrecSolves(cvode_mem, npsolves)); } - -int CVSpilsGetNumLinIters(void *cvode_mem, long int *nliters) -{ return(CVodeGetNumLinIters(cvode_mem, nliters)); } - -int CVSpilsGetNumConvFails(void *cvode_mem, long int *nlcfails) -{ return(CVodeGetNumLinConvFails(cvode_mem, nlcfails)); } - -int CVSpilsGetNumJTSetupEvals(void *cvode_mem, long int *njtsetups) -{ return(CVodeGetNumJTSetupEvals(cvode_mem, njtsetups)); } - -int CVSpilsGetNumJtimesEvals(void *cvode_mem, long int *njvevals) -{ return(CVodeGetNumJtimesEvals(cvode_mem, njvevals)); } - -int CVSpilsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS) -{ return(CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS)); } - -int CVSpilsGetLastFlag(void *cvode_mem, long int *flag) -{ return(CVodeGetLastLinFlag(cvode_mem, flag)); } - -char *CVSpilsGetReturnFlagName(long int flag) -{ return(CVodeGetLinReturnFlagName(flag)); } - -int CVSpilsSetLinearSolverB(void *cvode_mem, int which, - SUNLinearSolver LS) -{ return(CVodeSetLinearSolverB(cvode_mem, which, LS, NULL)); } - -int CVSpilsSetEpsLinB(void *cvode_mem, int which, realtype eplifacB) -{ return(CVodeSetEpsLinB(cvode_mem, which, eplifacB)); } - -int CVSpilsSetPreconditionerB(void *cvode_mem, int which, - CVSpilsPrecSetupFnB psetB, - CVSpilsPrecSolveFnB psolveB) -{ return(CVodeSetPreconditionerB(cvode_mem, which, psetB, psolveB)); } - -int CVSpilsSetPreconditionerBS(void *cvode_mem, int which, - CVSpilsPrecSetupFnBS psetBS, - CVSpilsPrecSolveFnBS psolveBS) -{ return(CVodeSetPreconditionerBS(cvode_mem, which, psetBS, psolveBS)); } - -int CVSpilsSetJacTimesB(void *cvode_mem, int which, - CVSpilsJacTimesSetupFnB jtsetupB, - CVSpilsJacTimesVecFnB jtimesB) -{ return(CVodeSetJacTimesB(cvode_mem, which, jtsetupB, jtimesB)); } - -int CVSpilsSetJacTimesBS(void *cvode_mem, int which, - CVSpilsJacTimesSetupFnBS jtsetupBS, - CVSpilsJacTimesVecFnBS jtimesBS) -{ return(CVodeSetJacTimesBS(cvode_mem, which, jtsetupBS, jtimesBS)); } - - -#ifdef __cplusplus -} -#endif - diff --git a/src/ida/CMakeLists.txt b/src/ida/CMakeLists.txt index 120f3f9687..b95ee46f48 100644 --- a/src/ida/CMakeLists.txt +++ b/src/ida/CMakeLists.txt @@ -21,21 +21,17 @@ install(CODE "MESSAGE(\"\nInstall IDA\n\")") set(ida_SOURCES ida.c ida_bbdpre.c - ida_direct.c ida_ic.c ida_io.c ida_ls.c ida_nls.c - ida_spils.c ) # Add variable ida_HEADERS with the exported IDA header files set(ida_HEADERS ida.h ida_bbdpre.h - ida_direct.h ida_ls.h - ida_spils.h ) # Add prefix with complete path to the IDA header files diff --git a/src/ida/ida_direct.c b/src/ida/ida_direct.c deleted file mode 100644 index 52ef5ef0b6..0000000000 --- a/src/ida/ida_direct.c +++ /dev/null @@ -1,56 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * Radu Serban @ 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 - *----------------------------------------------------------------- - * Implementation file for the deprecated direct linear solver interface in - * IDA; these routines now just wrap the updated IDA generic - * linear solver interface in ida_ls.h. - *-----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - Exported Functions (wrappers for equivalent routines in ida_ls.h) - =================================================================*/ - -int IDADlsSetLinearSolver(void *ida_mem, SUNLinearSolver LS, SUNMatrix A) -{ return(IDASetLinearSolver(ida_mem, LS, A)); } - -int IDADlsSetJacFn(void *ida_mem, IDADlsJacFn jac) -{ return(IDASetJacFn(ida_mem, jac)); } - -int IDADlsGetWorkSpace(void *ida_mem, long int *lenrwLS, long int *leniwLS) -{ return(IDAGetLinWorkSpace(ida_mem, lenrwLS, leniwLS)); } - -int IDADlsGetNumJacEvals(void *ida_mem, long int *njevals) -{ return(IDAGetNumJacEvals(ida_mem, njevals)); } - -int IDADlsGetNumResEvals(void *ida_mem, long int *nfevalsLS) -{ return(IDAGetNumLinResEvals(ida_mem, nfevalsLS)); } - -int IDADlsGetLastFlag(void *ida_mem, long int *flag) -{ return(IDAGetLastLinFlag(ida_mem, flag)); } - -char *IDADlsGetReturnFlagName(long int flag) -{ return(IDAGetLinReturnFlagName(flag)); } - - -#ifdef __cplusplus -} -#endif - diff --git a/src/ida/ida_spils.c b/src/ida/ida_spils.c deleted file mode 100644 index 50e2cbe94f..0000000000 --- a/src/ida/ida_spils.c +++ /dev/null @@ -1,81 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * Alan Hindmarsh, Radu Serban and Aaron Collier @ 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 - *----------------------------------------------------------------- - * Implementation file for the deprecated Scaled and Preconditioned - * Iterative Linear Solver interface in IDA; these routines now just - * wrap the updated IDA generic linear solver interface in ida_ls.h. - *-----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - Exported Functions (wrappers for equivalent routines in ida_ls.h) - =================================================================*/ - -int IDASpilsSetLinearSolver(void *ida_mem, SUNLinearSolver LS) -{ return(IDASetLinearSolver(ida_mem, LS, NULL)); } - -int IDASpilsSetPreconditioner(void *ida_mem, IDASpilsPrecSetupFn pset, - IDASpilsPrecSolveFn psolve) -{ return(IDASetPreconditioner(ida_mem, pset, psolve)); } - -int IDASpilsSetJacTimes(void *ida_mem, IDASpilsJacTimesSetupFn jtsetup, - IDASpilsJacTimesVecFn jtimes) -{ return(IDASetJacTimes(ida_mem, jtsetup, jtimes)); } - -int IDASpilsSetEpsLin(void *ida_mem, realtype eplifac) -{ return(IDASetEpsLin(ida_mem, eplifac)); } - -int IDASpilsSetIncrementFactor(void *ida_mem, realtype dqincfac) -{ return(IDASetIncrementFactor(ida_mem, dqincfac)); } - -int IDASpilsGetWorkSpace(void *ida_mem, long int *lenrwLS, long int *leniwLS) -{ return(IDAGetLinWorkSpace(ida_mem, lenrwLS, leniwLS)); } - -int IDASpilsGetNumPrecEvals(void *ida_mem, long int *npevals) -{ return(IDAGetNumPrecEvals(ida_mem, npevals)); } - -int IDASpilsGetNumPrecSolves(void *ida_mem, long int *npsolves) -{ return(IDAGetNumPrecSolves(ida_mem, npsolves)); } - -int IDASpilsGetNumLinIters(void *ida_mem, long int *nliters) -{ return(IDAGetNumLinIters(ida_mem, nliters)); } - -int IDASpilsGetNumConvFails(void *ida_mem, long int *nlcfails) -{ return(IDAGetNumLinConvFails(ida_mem, nlcfails)); } - -int IDASpilsGetNumJTSetupEvals(void *ida_mem, long int *njtsetups) -{ return(IDAGetNumJTSetupEvals(ida_mem, njtsetups)); } - -int IDASpilsGetNumJtimesEvals(void *ida_mem, long int *njvevals) -{ return(IDAGetNumJtimesEvals(ida_mem, njvevals)); } - -int IDASpilsGetNumResEvals(void *ida_mem, long int *nrevalsLS) -{ return(IDAGetNumLinResEvals(ida_mem, nrevalsLS)); } - -int IDASpilsGetLastFlag(void *ida_mem, long int *flag) -{ return(IDAGetLastLinFlag(ida_mem, flag)); } - -char *IDASpilsGetReturnFlagName(long int flag) -{ return(IDAGetLinReturnFlagName(flag)); } - -#ifdef __cplusplus -} -#endif - diff --git a/src/idas/CMakeLists.txt b/src/idas/CMakeLists.txt index c825d114c1..b0c6aa4df0 100644 --- a/src/idas/CMakeLists.txt +++ b/src/idas/CMakeLists.txt @@ -21,7 +21,6 @@ install(CODE "MESSAGE(\"\nInstall IDAS\n\")") set(idas_SOURCES idas.c idaa.c - idas_direct.c idas_io.c idas_ic.c idaa_io.c @@ -30,16 +29,13 @@ set(idas_SOURCES idas_nls.c idas_nls_sim.c idas_nls_stg.c - idas_spils.c ) # Add variable idas_HEADERS with the exported IDAS header files set(idas_HEADERS idas.h idas_bbdpre.h - idas_direct.h idas_ls.h - idas_spils.h ) # Add prefix with complete path to the IDAS header files diff --git a/src/idas/idas_direct.c b/src/idas/idas_direct.c deleted file mode 100644 index c42f22c1ff..0000000000 --- a/src/idas/idas_direct.c +++ /dev/null @@ -1,66 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - *----------------------------------------------------------------- - * 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 - *----------------------------------------------------------------- - * Implementation file for the deprecated direct linear solver interface in - * IDA; these routines now just wrap the updated IDA generic - * linear solver interface in idas_ls.h. - *-----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - Exported Functions (wrappers for equivalent routines in idas_ls.h) - =================================================================*/ - -int IDADlsSetLinearSolver(void *ida_mem, SUNLinearSolver LS, - SUNMatrix A) -{ return(IDASetLinearSolver(ida_mem, LS, A)); } - -int IDADlsSetJacFn(void *ida_mem, IDADlsJacFn jac) -{ return(IDASetJacFn(ida_mem, jac)); } - -int IDADlsGetWorkSpace(void *ida_mem, long int *lenrwLS, - long int *leniwLS) -{ return(IDAGetLinWorkSpace(ida_mem, lenrwLS, leniwLS)); } - -int IDADlsGetNumJacEvals(void *ida_mem, long int *njevals) -{ return(IDAGetNumJacEvals(ida_mem, njevals)); } - -int IDADlsGetNumResEvals(void *ida_mem, long int *nrevalsLS) -{ return(IDAGetNumLinResEvals(ida_mem, nrevalsLS)); } - -int IDADlsGetLastFlag(void *ida_mem, long int *flag) -{ return(IDAGetLastLinFlag(ida_mem, flag)); } - -char *IDADlsGetReturnFlagName(long int flag) -{ return(IDAGetLinReturnFlagName(flag)); } - -int IDADlsSetLinearSolverB(void *ida_mem, int which, - SUNLinearSolver LS, SUNMatrix A) -{ return(IDASetLinearSolverB(ida_mem, which, LS, A)); } - -int IDADlsSetJacFnB(void *ida_mem, int which, IDADlsJacFnB jacB) -{ return(IDASetJacFnB(ida_mem, which, jacB)); } - -int IDADlsSetJacFnBS(void *ida_mem, int which, IDADlsJacFnBS jacBS) -{ return(IDASetJacFnBS(ida_mem, which, jacBS)); } - -#ifdef __cplusplus -} -#endif - diff --git a/src/idas/idas_spils.c b/src/idas/idas_spils.c deleted file mode 100644 index 9ee1b1d311..0000000000 --- a/src/idas/idas_spils.c +++ /dev/null @@ -1,114 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - *----------------------------------------------------------------- - * 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 - *----------------------------------------------------------------- - * Implementation file for the deprecated Scaled and Preconditioned - * Iterative Linear Solver interface in IDAS; these routines now just - * wrap the updated IDA generic linear solver interface in idas_ls.h. - *-----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - Exported Functions (wrappers for equivalent routines in idas_ls.h) - =================================================================*/ - -int IDASpilsSetLinearSolver(void *ida_mem, SUNLinearSolver LS) -{ return(IDASetLinearSolver(ida_mem, LS, NULL)); } - -int IDASpilsSetPreconditioner(void *ida_mem, IDASpilsPrecSetupFn pset, - IDASpilsPrecSolveFn psolve) -{ return(IDASetPreconditioner(ida_mem, pset, psolve)); } - -int IDASpilsSetJacTimes(void *ida_mem, IDASpilsJacTimesSetupFn jtsetup, - IDASpilsJacTimesVecFn jtimes) -{ return(IDASetJacTimes(ida_mem, jtsetup, jtimes)); } - -int IDASpilsSetEpsLin(void *ida_mem, realtype eplifac) -{ return(IDASetEpsLin(ida_mem, eplifac)); } - -int IDASpilsSetIncrementFactor(void *ida_mem, realtype dqincfac) -{ return(IDASetIncrementFactor(ida_mem, dqincfac)); } - -int IDASpilsGetWorkSpace(void *ida_mem, long int *lenrwLS, - long int *leniwLS) -{ return(IDAGetLinWorkSpace(ida_mem, lenrwLS, leniwLS)); } - -int IDASpilsGetNumPrecEvals(void *ida_mem, long int *npevals) -{ return(IDAGetNumPrecEvals(ida_mem, npevals)); } - -int IDASpilsGetNumPrecSolves(void *ida_mem, long int *npsolves) -{ return(IDAGetNumPrecSolves(ida_mem, npsolves)); } - -int IDASpilsGetNumLinIters(void *ida_mem, long int *nliters) -{ return(IDAGetNumLinIters(ida_mem, nliters)); } - -int IDASpilsGetNumConvFails(void *ida_mem, long int *nlcfails) -{ return(IDAGetNumLinConvFails(ida_mem, nlcfails)); } - -int IDASpilsGetNumJTSetupEvals(void *ida_mem, long int *njtsetups) -{ return(IDAGetNumJTSetupEvals(ida_mem, njtsetups)); } - -int IDASpilsGetNumJtimesEvals(void *ida_mem, long int *njvevals) -{ return(IDAGetNumJtimesEvals(ida_mem, njvevals)); } - -int IDASpilsGetNumResEvals(void *ida_mem, long int *nrevalsLS) -{ return(IDAGetNumLinResEvals(ida_mem, nrevalsLS)); } - -int IDASpilsGetLastFlag(void *ida_mem, long int *flag) -{ return(IDAGetLastLinFlag(ida_mem, flag)); } - -char *IDASpilsGetReturnFlagName(long int flag) -{ return(IDAGetLinReturnFlagName(flag)); } - -int IDASpilsSetLinearSolverB(void *ida_mem, int which, - SUNLinearSolver LS) -{ return(IDASetLinearSolverB(ida_mem, which, LS, NULL)); } - -int IDASpilsSetEpsLinB(void *ida_mem, int which, realtype eplifacB) -{ return(IDASetEpsLinB(ida_mem, which, eplifacB)); } - -int IDASpilsSetIncrementFactorB(void *ida_mem, int which, - realtype dqincfacB) -{ return(IDASetIncrementFactorB(ida_mem, which, dqincfacB)); } - -int IDASpilsSetPreconditionerB(void *ida_mem, int which, - IDASpilsPrecSetupFnB psetB, - IDASpilsPrecSolveFnB psolveB) -{ return(IDASetPreconditionerB(ida_mem, which, psetB, psolveB)); } - -int IDASpilsSetPreconditionerBS(void *ida_mem, int which, - IDASpilsPrecSetupFnBS psetBS, - IDASpilsPrecSolveFnBS psolveBS) -{ return(IDASetPreconditionerBS(ida_mem, which, psetBS, psolveBS)); } - -int IDASpilsSetJacTimesB(void *ida_mem, int which, - IDASpilsJacTimesSetupFnB jtsetupB, - IDASpilsJacTimesVecFnB jtimesB) -{ return(IDASetJacTimesB(ida_mem, which, jtsetupB, jtimesB)); } - -int IDASpilsSetJacTimesBS(void *ida_mem, int which, - IDASpilsJacTimesSetupFnBS jtsetupBS, - IDASpilsJacTimesVecFnBS jtimesBS) -{ return(IDASetJacTimesBS(ida_mem, which, jtsetupBS, jtimesBS)); } - - - -#ifdef __cplusplus -} -#endif - diff --git a/src/kinsol/CMakeLists.txt b/src/kinsol/CMakeLists.txt index 20fd1572ec..aa331f6560 100644 --- a/src/kinsol/CMakeLists.txt +++ b/src/kinsol/CMakeLists.txt @@ -21,19 +21,15 @@ install(CODE "MESSAGE(\"\nInstall KINSOL\n\")") set(kinsol_SOURCES kinsol.c kinsol_bbdpre.c - kinsol_direct.c kinsol_io.c kinsol_ls.c - kinsol_spils.c ) # Add variable kinsol_HEADERS with the exported KINSOL header files set(kinsol_HEADERS kinsol.h kinsol_bbdpre.h - kinsol_direct.h kinsol_ls.h - kinsol_spils.h ) # Add prefix with complete path to the KINSOL header files diff --git a/src/kinsol/fmod/fkinsol_mod.c b/src/kinsol/fmod/fkinsol_mod.c index 29e070fbb6..11473b35fb 100644 --- a/src/kinsol/fmod/fkinsol_mod.c +++ b/src/kinsol/fmod/fkinsol_mod.c @@ -667,64 +667,6 @@ SWIGEXPORT int _wrap_FKINSetErrFile(void *farg1, void *farg2) { } -SWIGEXPORT int _wrap_FKINSetInfoHandlerFn(void *farg1, KINInfoHandlerFn farg2, void *farg3) { - int fresult ; - void *arg1 = (void *) 0 ; - KINInfoHandlerFn arg2 = (KINInfoHandlerFn) 0 ; - void *arg3 = (void *) 0 ; - int result; - - arg1 = (void *)(farg1); - arg2 = (KINInfoHandlerFn)(farg2); - arg3 = (void *)(farg3); - result = (int)KINSetInfoHandlerFn(arg1,arg2,arg3); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FKINSetInfoFile(void *farg1, void *farg2) { - int fresult ; - void *arg1 = (void *) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (void *)(farg1); - arg2 = (FILE *)(farg2); - result = (int)KINSetInfoFile(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FKINSetPrintLevel(void *farg1, int const *farg2) { - int fresult ; - void *arg1 = (void *) 0 ; - int arg2 ; - int result; - - arg1 = (void *)(farg1); - arg2 = (int)(*farg2); - result = (int)KINSetPrintLevel(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FKINSetDebugFile(void *farg1, void *farg2) { - int fresult ; - void *arg1 = (void *) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (void *)(farg1); - arg2 = (FILE *)(farg2); - result = (int)KINSetDebugFile(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FKINGetWorkSpace(void *farg1, long *farg2, long *farg3) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/kinsol/fmod/fkinsol_mod.f90 b/src/kinsol/fmod/fkinsol_mod.f90 index c60ae37fb3..325c4dd6c7 100644 --- a/src/kinsol/fmod/fkinsol_mod.f90 +++ b/src/kinsol/fmod/fkinsol_mod.f90 @@ -100,10 +100,6 @@ module fkinsol_mod public :: FKINSetSysFunc public :: FKINSetErrHandlerFn public :: FKINSetErrFile - public :: FKINSetInfoHandlerFn - public :: FKINSetInfoFile - public :: FKINSetPrintLevel - public :: FKINSetDebugFile public :: FKINGetWorkSpace public :: FKINGetNumNonlinSolvIters public :: FKINGetNumFuncEvals @@ -430,43 +426,6 @@ function swigc_FKINSetErrFile(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FKINSetInfoHandlerFn(farg1, farg2, farg3) & -bind(C, name="_wrap_FKINSetInfoHandlerFn") & -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_FKINSetInfoFile(farg1, farg2) & -bind(C, name="_wrap_FKINSetInfoFile") & -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_FKINSetPrintLevel(farg1, farg2) & -bind(C, name="_wrap_FKINSetPrintLevel") & -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_FKINSetDebugFile(farg1, farg2) & -bind(C, name="_wrap_FKINSetDebugFile") & -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_FKINGetWorkSpace(farg1, farg2, farg3) & bind(C, name="_wrap_FKINGetWorkSpace") & result(fresult) @@ -1264,73 +1223,6 @@ function FKINSetErrFile(kinmem, errfp) & swig_result = fresult end function -function FKINSetInfoHandlerFn(kinmem, ihfun, ih_data) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: kinmem -type(C_FUNPTR), intent(in), value :: ihfun -type(C_PTR) :: ih_data -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_FUNPTR) :: farg2 -type(C_PTR) :: farg3 - -farg1 = kinmem -farg2 = ihfun -farg3 = ih_data -fresult = swigc_FKINSetInfoHandlerFn(farg1, farg2, farg3) -swig_result = fresult -end function - -function FKINSetInfoFile(kinmem, infofp) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: kinmem -type(C_PTR) :: infofp -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = kinmem -farg2 = infofp -fresult = swigc_FKINSetInfoFile(farg1, farg2) -swig_result = fresult -end function - -function FKINSetPrintLevel(kinmem, printfl) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: kinmem -integer(C_INT), intent(in) :: printfl -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = kinmem -farg2 = printfl -fresult = swigc_FKINSetPrintLevel(farg1, farg2) -swig_result = fresult -end function - -function FKINSetDebugFile(kinmem, debugfp) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: kinmem -type(C_PTR) :: debugfp -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = kinmem -farg2 = debugfp -fresult = swigc_FKINSetDebugFile(farg1, farg2) -swig_result = fresult -end function - function FKINGetWorkSpace(kinmem, lenrw, leniw) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/kinsol/kinsol.c b/src/kinsol/kinsol.c index 10e200c49c..3446f0ff65 100644 --- a/src/kinsol/kinsol.c +++ b/src/kinsol/kinsol.c @@ -49,7 +49,6 @@ * KINScSNorm * KINSOL Verbose output functions * KINPrintInfo - * KINInfoHandler * KINSOL Error Handling functions * KINProcessError * KINErrHandler @@ -274,8 +273,6 @@ void *KINCreate(SUNContext sunctx) kin_mem->kin_constraintsSet = SUNFALSE; kin_mem->kin_ehfun = KINErrHandler; kin_mem->kin_eh_data = kin_mem; - kin_mem->kin_ihfun = KINInfoHandler; - kin_mem->kin_ih_data = kin_mem; kin_mem->kin_ret_newest = SUNFALSE; kin_mem->kin_mxiter = MXITER_DEFAULT; kin_mem->kin_noInitSetup = SUNFALSE; @@ -301,18 +298,9 @@ void *KINCreate(SUNContext sunctx) kin_mem->kin_omega_max = OMEGA_MAX; kin_mem->kin_errfp = stderr; - kin_mem->kin_infofp = stdout; - kin_mem->kin_debugfp = stdout; - kin_mem->kin_printfl = PRINTFL_DEFAULT; #if SUNDIALS_LOGGING_LEVEL > 0 kin_mem->kin_errfp = (KIN_LOGGER->error_fp) ? KIN_LOGGER->error_fp : stderr; #endif -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - kin_mem->kin_infofp = (KIN_LOGGER->info_fp) ? KIN_LOGGER->info_fp : stdout; -#endif -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_DEBUG - kin_mem->kin_debugfp = (KIN_LOGGER->debug_fp) ? KIN_LOGGER->debug_fp : stdout; -#endif /* initialize lrw and liw */ @@ -532,8 +520,10 @@ int KINSol(void *kinmem, N_Vector u, int strategy_in, return(KIN_ILL_INPUT); } - if (kin_mem->kin_printfl > 0) - KINPrintInfo(kin_mem, PRNT_TOL, "KINSOL", "KINSol", INFO_TOL, kin_mem->kin_scsteptol, kin_mem->kin_fnormtol); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_TOL, "KINSOL", "KINSol", INFO_TOL, kin_mem->kin_scsteptol, + kin_mem->kin_fnormtol); +#endif kin_mem->kin_nfe = kin_mem->kin_nnilset = kin_mem->kin_nnilset_sub = kin_mem->kin_nni = kin_mem->kin_nbcf = kin_mem->kin_nbktrk = 0; ret = KINFP(kin_mem); @@ -685,10 +675,12 @@ int KINSol(void *kinmem, N_Vector u, int strategy_in, kin_mem->kin_f1norm = f1normp; - /* print the current nni, fnorm, and nfe values if printfl > 0 */ + /* print the current nni, fnorm, and nfe values */ - if (kin_mem->kin_printfl > 0) - KINPrintInfo(kin_mem, PRNT_NNI, "KINSOL", "KINSol", INFO_NNI, kin_mem->kin_nni, kin_mem->kin_nfe, kin_mem->kin_fnorm); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_NNI, "KINSOL", "KINSol", INFO_NNI, kin_mem->kin_nni, kin_mem->kin_nfe, + kin_mem->kin_fnorm); +#endif if (ret != CONTINUE_ITERATIONS) break; @@ -697,9 +689,9 @@ int KINSol(void *kinmem, N_Vector u, int strategy_in, } /* end of loop; return */ - - if (kin_mem->kin_printfl > 0) - KINPrintInfo(kin_mem, PRNT_RETVAL, "KINSOL", "KINSol", INFO_RETVAL, ret); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_RETVAL, "KINSOL", "KINSol", INFO_RETVAL, ret); +#endif switch(ret) { case KIN_SYSFUNC_FAIL: @@ -1411,9 +1403,10 @@ static int KINSolInit(KINMem kin_mem) } /* all error checking is complete at this point */ - - if (kin_mem->kin_printfl > 0) - KINPrintInfo(kin_mem, PRNT_TOL, "KINSOL", "KINSolInit", INFO_TOL, kin_mem->kin_scsteptol, kin_mem->kin_fnormtol); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_TOL, "KINSOL", "KINSolInit", INFO_TOL, kin_mem->kin_scsteptol, + kin_mem->kin_fnormtol); +#endif /* calculate the default value for mxnewtstep (maximum Newton step) */ @@ -1472,8 +1465,9 @@ static int KINSolInit(KINMem kin_mem) return(KIN_INITIAL_GUESS_OK); } - if (kin_mem->kin_printfl > 1) - KINPrintInfo(kin_mem, PRNT_FMAX, "KINSOL", "KINSolInit", INFO_FMAX, fmax); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_FMAX, "KINSOL", "KINSolInit", INFO_FMAX, fmax); +#endif /* initialize the linear solver if linit != NULL */ @@ -1490,10 +1484,10 @@ static int KINSolInit(KINMem kin_mem) kin_mem->kin_fnorm = N_VWL2Norm(kin_mem->kin_fval, kin_mem->kin_fscale); kin_mem->kin_f1norm = HALF * kin_mem->kin_fnorm * kin_mem->kin_fnorm; kin_mem->kin_fnorm_sub = kin_mem->kin_fnorm; - - if (kin_mem->kin_printfl > 0) +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO KINPrintInfo(kin_mem, PRNT_NNI, "KINSOL", "KINSolInit", INFO_NNI, kin_mem->kin_nni, kin_mem->kin_nfe, kin_mem->kin_fnorm); +#endif /* problem has now been successfully initialized */ @@ -1588,9 +1582,9 @@ static int KINFullNewton(KINMem kin_mem, realtype *fnormp, realtype *f1normp, N_VScale(ratio, kin_mem->kin_pp, kin_mem->kin_pp); pnorm = kin_mem->kin_mxnewtstep; } - - if (kin_mem->kin_printfl > 0) +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO KINPrintInfo(kin_mem, PRNT_PNORM, "KINSOL", "KINFullNewton", INFO_PNORM, pnorm); +#endif /* If constraints are active, then constrain the step accordingly */ @@ -1604,8 +1598,9 @@ static int KINFullNewton(KINMem kin_mem, realtype *fnormp, realtype *f1normp, N_VScale(kin_mem->kin_stepmul, kin_mem->kin_pp, kin_mem->kin_pp); pnorm *= kin_mem->kin_stepmul; kin_mem->kin_stepl = pnorm; - if (kin_mem->kin_printfl > 0) - KINPrintInfo(kin_mem, PRNT_PNORM, "KINSOL", "KINFullNewton", INFO_PNORM, pnorm); + #if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_PNORM, "KINSOL", "KINFullNewton", INFO_PNORM, pnorm); + #endif if (pnorm <= kin_mem->kin_scsteptol) { N_VLinearSum(ONE, kin_mem->kin_uu, ONE, kin_mem->kin_pp, kin_mem->kin_unew); return(STEP_TOO_SMALL);} @@ -1651,8 +1646,9 @@ static int KINFullNewton(KINMem kin_mem, realtype *fnormp, realtype *f1normp, kin_mem->kin_sFdotJp *= ratio; kin_mem->kin_sJpnorm *= ratio; - if (kin_mem->kin_printfl > 1) - KINPrintInfo(kin_mem, PRNT_FNORM, "KINSOL", "KINFullNewton", INFO_FNORM, *fnormp); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_FNORM, "KINSOL", "KINFullNewton", INFO_FNORM, *fnormp); +#endif if (pnorm > (POINT99 * kin_mem->kin_mxnewtstep)) *maxStepTaken = SUNTRUE; @@ -1756,7 +1752,9 @@ static int KINLineSearch(KINMem kin_mem, realtype *fnormp, realtype *f1normp, pnorm *= kin_mem->kin_stepmul; rlmax = ONE; kin_mem->kin_stepl = pnorm; - if (kin_mem->kin_printfl > 0) KINPrintInfo(kin_mem, PRNT_PNORM1, "KINSOL", "KINLineSearch", INFO_PNORM1, pnorm); + #if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_PNORM1, "KINSOL", "KINLineSearch", INFO_PNORM1, pnorm); + #endif if (pnorm <= kin_mem->kin_scsteptol) { N_VLinearSum(ONE, kin_mem->kin_uu, ONE, kin_mem->kin_pp, kin_mem->kin_unew); return(STEP_TOO_SMALL);} @@ -1806,8 +1804,9 @@ static int KINLineSearch(KINMem kin_mem, realtype *fnormp, realtype *f1normp, rlmin = (kin_mem->kin_scsteptol) / rlength; rl = ONE; - if (kin_mem->kin_printfl > 2) - KINPrintInfo(kin_mem, PRNT_LAM, "KINSOL", "KINLineSearch", INFO_LAM, rlmin, kin_mem->kin_f1norm, pnorm); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_LAM, "KINSOL", "KINLineSearch", INFO_LAM, rlmin, kin_mem->kin_f1norm, pnorm); +#endif /* Loop until the ALPHA condition is satisfied. Terminate if rl becomes too small */ @@ -1817,9 +1816,10 @@ static int KINLineSearch(KINMem kin_mem, realtype *fnormp, realtype *f1normp, alpha_cond = kin_mem->kin_f1norm + (alpha * slpi * rl); - if (kin_mem->kin_printfl > 2) - KINPrintInfo(kin_mem, PRNT_ALPHA, "KINSOL", "KINLinesearch", - INFO_ALPHA, *fnormp, *f1normp, alpha_cond, rl); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_ALPHA, "KINSOL", "KINLinesearch", + INFO_ALPHA, *fnormp, *f1normp, alpha_cond, rl); +#endif /* If ALPHA condition is satisfied, break out from loop */ @@ -1908,9 +1908,10 @@ static int KINLineSearch(KINMem kin_mem, realtype *fnormp, realtype *f1normp, alpha_cond = kin_mem->kin_f1norm + (alpha * slpi * rl); beta_cond = kin_mem->kin_f1norm + (beta * slpi * rl); - if (kin_mem->kin_printfl > 2) - KINPrintInfo(kin_mem, PRNT_BETA, "KINSOL", "KINLineSearch", - INFO_BETA, *f1normp, beta_cond, rl); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_BETA, "KINSOL", "KINLineSearch", + INFO_BETA, *f1normp, beta_cond, rl); +#endif } while (((*f1normp) <= alpha_cond) && ((*f1normp) < beta_cond) && (rl < rlmax)); @@ -1937,9 +1938,10 @@ static int KINLineSearch(KINMem kin_mem, realtype *fnormp, realtype *f1normp, alpha_cond = kin_mem->kin_f1norm + (alpha * slpi * rl); beta_cond = kin_mem->kin_f1norm + (beta * slpi * rl); - if (kin_mem->kin_printfl > 2) - KINPrintInfo(kin_mem, PRNT_ALPHABETA, "KINSOL", "KINLineSearch", - INFO_ALPHABETA, *f1normp, alpha_cond, beta_cond, rl); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_ALPHABETA, "KINSOL", "KINLineSearch", + INFO_ALPHABETA, *f1normp, alpha_cond, beta_cond, rl); +#endif if ((*f1normp) > alpha_cond) rldiff = rlinc; else if (*f1normp < beta_cond) { @@ -1976,8 +1978,9 @@ static int KINLineSearch(KINMem kin_mem, realtype *fnormp, realtype *f1normp, kin_mem->kin_nbktrk += nbktrk_l; - if (kin_mem->kin_printfl > 1) +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO KINPrintInfo(kin_mem, PRNT_ADJ, "KINSOL", "KINLineSearch", INFO_ADJ, nbktrk_l); +#endif /* scale sFdotJp and sJpnorm by rl * ratio for later use in KINForcingTerm */ @@ -2065,8 +2068,9 @@ static int KINStop(KINMem kin_mem, booleantype maxStepTaken, int sflag) fmax = KINScFNorm(kin_mem, kin_mem->kin_fval, kin_mem->kin_fscale); - if (kin_mem->kin_printfl > 1) - KINPrintInfo(kin_mem, PRNT_FMAX, "KINSOL", "KINStop", INFO_FMAX, fmax); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_FMAX, "KINSOL", "KINStop", INFO_FMAX, fmax); +#endif if (fmax <= kin_mem->kin_fnormtol) return(KIN_SUCCESS); @@ -2352,9 +2356,10 @@ void KINPrintInfo(KINMem kin_mem, } - /* call the info message handler */ - - kin_mem->kin_ihfun(module, fname, msg, kin_mem->kin_ih_data); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO + SUNLogger_QueueMsg(KIN_LOGGER, SUN_LOGLEVEL_INFO, + "KINSOL", fname, "%s", msg); +#endif /* finalize argument processing */ @@ -2363,35 +2368,6 @@ void KINPrintInfo(KINMem kin_mem, return; } - -/* - * KINInfoHandler - * - * This is the default KINSOL info handling function. - * It sends the info message to the stream pointed to by kin_infofp - */ - -void KINInfoHandler(const char *module, const char *function, - char *msg, void *data) -{ - KINMem kin_mem; - - /* data points to kin_mem here */ - - kin_mem = (KINMem) data; -#ifndef NO_FPRINTF_OUTPUT - if (kin_mem->kin_infofp != NULL && - kin_mem->kin_infofp != kin_mem->kin_sunctx->logger->info_fp) { - fprintf(kin_mem->kin_infofp,"\n[%s] %s\n",module, function); - fprintf(kin_mem->kin_infofp," %s\n",msg); - } -#endif -#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO - SUNLogger_QueueMsg(KIN_LOGGER, SUN_LOGLEVEL_INFO, - "KINSOL::KINInfoHandler", function, "%s", msg); -#endif -} - /* * ================================================================= * KINSOL Error Handling functions @@ -2578,14 +2554,16 @@ static int KINPicardAA(KINMem kin_mem) kin_mem->kin_fnorm = KINScFNorm(kin_mem, kin_mem->kin_fval, kin_mem->kin_fscale); - if (kin_mem->kin_printfl > 1) - KINPrintInfo(kin_mem, PRNT_FMAX, "KINSOL", "KINPicardAA", INFO_FMAX, - kin_mem->kin_fnorm); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_FMAX, "KINSOL", "KINPicardAA", INFO_FMAX, + kin_mem->kin_fnorm); +#endif - /* print the current iter, fnorm, and nfe values if printfl > 0 */ - if (kin_mem->kin_printfl > 0) - KINPrintInfo(kin_mem, PRNT_NNI, "KINSOL", "KINPicardAA", INFO_NNI, - kin_mem->kin_nni, kin_mem->kin_nfe, kin_mem->kin_fnorm); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + /* print the current iter, fnorm, and nfe values */ + KINPrintInfo(kin_mem, PRNT_NNI, "KINSOL", "KINPicardAA", INFO_NNI, + kin_mem->kin_nni, kin_mem->kin_nfe, kin_mem->kin_fnorm); +#endif /* Check if the maximum number of iterations is reached */ if (kin_mem->kin_nni >= kin_mem->kin_mxiter) { @@ -2608,9 +2586,9 @@ static int KINPicardAA(KINMem kin_mem) fflush(kin_mem->kin_errfp); } /* end of loop; return */ - - if (kin_mem->kin_printfl > 0) +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO KINPrintInfo(kin_mem, PRNT_RETVAL, "KINSOL", "KINPicardAA", INFO_RETVAL, ret); +#endif return(ret); } @@ -2786,14 +2764,16 @@ static int KINFP(KINMem kin_mem) /* measure || g(x) - x || */ kin_mem->kin_fnorm = KINScFNorm(kin_mem, delta, kin_mem->kin_fscale); - if (kin_mem->kin_printfl > 1) - KINPrintInfo(kin_mem, PRNT_FMAX, "KINSOL", "KINFP", INFO_FMAX, - kin_mem->kin_fnorm); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_FMAX, "KINSOL", "KINFP", INFO_FMAX, + kin_mem->kin_fnorm); +#endif - /* print the current iter, fnorm, and nfe values if printfl > 0 */ - if (kin_mem->kin_printfl > 0) - KINPrintInfo(kin_mem, PRNT_NNI, "KINSOL", "KINFP", INFO_NNI, - kin_mem->kin_nni, kin_mem->kin_nfe, kin_mem->kin_fnorm); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + /* print the current iter, fnorm, and nfe values */ + KINPrintInfo(kin_mem, PRNT_NNI, "KINSOL", "KINFP", INFO_NNI, + kin_mem->kin_nni, kin_mem->kin_nfe, kin_mem->kin_fnorm); +#endif /* Check if the maximum number of iterations is reached */ if (kin_mem->kin_nni >= kin_mem->kin_mxiter) { @@ -2814,8 +2794,9 @@ static int KINFP(KINMem kin_mem) } /* end of loop; return */ - if (kin_mem->kin_printfl > 0) - KINPrintInfo(kin_mem, PRNT_RETVAL, "KINSOL", "KINFP", INFO_RETVAL, ret); +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + KINPrintInfo(kin_mem, PRNT_RETVAL, "KINSOL", "KINFP", INFO_RETVAL, ret); +#endif return(ret); } diff --git a/src/kinsol/kinsol_direct.c b/src/kinsol/kinsol_direct.c deleted file mode 100644 index a9427041ea..0000000000 --- a/src/kinsol/kinsol_direct.c +++ /dev/null @@ -1,55 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * Radu Serban @ 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 - *----------------------------------------------------------------- - * Implementation file for the deprecated direct linear solver interface in - * KINSOL; these routines now just wrap the updated KINSOL generic - * linear solver interface in kinsol_ls.h. - *-----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - Exported Functions (wrappers for equivalent routines in kinsol_ls.h) - =================================================================*/ - -int KINDlsSetLinearSolver(void *kinmem, SUNLinearSolver LS, SUNMatrix A) -{ return(KINSetLinearSolver(kinmem, LS, A)); } - -int KINDlsSetJacFn(void *kinmem, KINDlsJacFn jac) -{ return(KINSetJacFn(kinmem, jac)); } - -int KINDlsGetWorkSpace(void *kinmem, long int *lenrw, long int *leniw) -{ return(KINGetLinWorkSpace(kinmem, lenrw, leniw)); } - -int KINDlsGetNumJacEvals(void *kinmem, long int *njevals) -{ return(KINGetNumJacEvals(kinmem, njevals)); } - -int KINDlsGetNumFuncEvals(void *kinmem, long int *nfevals) -{ return(KINGetNumLinFuncEvals(kinmem, nfevals)); } - -int KINDlsGetLastFlag(void *kinmem, long int *flag) -{ return(KINGetLastLinFlag(kinmem, flag)); } - -char *KINDlsGetReturnFlagName(long int flag) -{ return(KINGetLinReturnFlagName(flag)); } - -#ifdef __cplusplus -} -#endif - diff --git a/src/kinsol/kinsol_impl.h b/src/kinsol/kinsol_impl.h index 47a684cc73..d76542cfdc 100644 --- a/src/kinsol/kinsol_impl.h +++ b/src/kinsol/kinsol_impl.h @@ -47,7 +47,6 @@ extern "C" { /* KINSOL default constants */ -#define PRINTFL_DEFAULT 0 #define MXITER_DEFAULT 200 #define MXNBCF_DEFAULT 10 #define MSBSET_DEFAULT 10 @@ -90,7 +89,6 @@ typedef struct KINMemRec { realtype kin_scsteptol; /* scaled step length tolerance */ int kin_globalstrategy; /* choices are KIN_NONE, KIN_LINESEARCH KIN_PICARD and KIN_FP */ - int kin_printfl; /* level of verbosity of output */ long int kin_mxiter; /* maximum number of nonlinear iterations */ long int kin_msbset; /* maximum number of nonlinear iterations that may be performed between calls to the @@ -279,16 +277,6 @@ typedef struct KINMemRec { void *kin_eh_data; /* dats pointer passed to ehfun */ FILE *kin_errfp; /* KINSOL error messages are sent to errfp */ - KINInfoHandlerFn kin_ihfun; /* Info messages are handled by ihfun */ - void *kin_ih_data; /* dats pointer passed to ihfun */ - FILE *kin_infofp; /* where KINSol info messages are sent */ - - /*--------- - Debugging - ---------*/ - - FILE *kin_debugfp; /* debugging output file */ - } *KINMem; /* @@ -432,7 +420,6 @@ void KINInfoHandler(const char *module, const char *function, #define MSG_FUNC_NULL "func = NULL illegal." #define MSG_NO_MALLOC "Attempt to call before KINMalloc illegal." -#define MSG_BAD_PRINTFL "Illegal value for printfl." #define MSG_BAD_MXITER "Illegal value for mxiter." #define MSG_BAD_MSBSET "Illegal msbset < 0." #define MSG_BAD_MSBSETSUB "Illegal msbsetsub < 0." diff --git a/src/kinsol/kinsol_io.c b/src/kinsol/kinsol_io.c index 2e393ee383..e46968053b 100644 --- a/src/kinsol/kinsol_io.c +++ b/src/kinsol/kinsol_io.c @@ -85,104 +85,6 @@ int KINSetErrFile(void *kinmem, FILE *errfp) return(KIN_SUCCESS); } -/* - * ----------------------------------------------------------------- - * Function : KINSetPrintLevel - * ----------------------------------------------------------------- - */ - -int KINSetPrintLevel(void *kinmem, int printfl) -{ - KINMem kin_mem; - - if (kinmem == NULL) { - KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetPrintLevel", MSG_NO_MEM); - return(KIN_MEM_NULL); - } - - kin_mem = (KINMem) kinmem; - - if ((printfl < 0) || (printfl > 3)) { - KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetPrintLevel", MSG_BAD_PRINTFL); - return(KIN_ILL_INPUT); - } - - kin_mem->kin_printfl = printfl; - - return(KIN_SUCCESS); -} - -/* - * ----------------------------------------------------------------- - * KINSetInfoHandlerFn - * ----------------------------------------------------------------- - */ - -int KINSetInfoHandlerFn(void *kinmem, KINInfoHandlerFn ihfun, void *ih_data) -{ - KINMem kin_mem; - - if (kinmem == NULL) { - KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetInfoHandlerFn", MSG_NO_MEM); - return(KIN_MEM_NULL); - } - - kin_mem = (KINMem) kinmem; - - kin_mem->kin_ihfun = ihfun; - kin_mem->kin_ih_data = ih_data; - - return(KIN_SUCCESS); -} - - -/* - * ----------------------------------------------------------------- - * Function : KINSetInfoFile - * DEPRECATED: use SUNLogger_SetInfoFilename instead - * ----------------------------------------------------------------- - */ - -int KINSetInfoFile(void *kinmem, FILE *infofp) -{ - KINMem kin_mem; - - if (kinmem == NULL) { - KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetInfoFile", MSG_NO_MEM); - return(KIN_MEM_NULL); - } - - kin_mem = (KINMem) kinmem; - kin_mem->kin_infofp = infofp; - - return(KIN_SUCCESS); -} - - -/* - * ----------------------------------------------------------------- - * Function : KINSetDebugFile - * DEPRECATED: use SUNLogger_SetDebugFilename instead - * ----------------------------------------------------------------- - */ - -int KINSetDebugFile(void *kinmem, FILE *debugfp) -{ - KINMem kin_mem; - - if (kinmem == NULL) { - KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetDebugFile", - MSG_NO_MEM); - return(KIN_MEM_NULL); - } - - kin_mem = (KINMem) kinmem; - kin_mem->kin_debugfp = debugfp; - - return(KIN_SUCCESS); -} - - /* * ----------------------------------------------------------------- * Function : KINSetUserData diff --git a/src/kinsol/kinsol_ls.c b/src/kinsol/kinsol_ls.c index 61e9f8f659..59dd1ccb8c 100644 --- a/src/kinsol/kinsol_ls.c +++ b/src/kinsol/kinsol_ls.c @@ -1244,9 +1244,11 @@ int kinLsSolve(KINMem kin_mem, N_Vector xx, N_Vector bb, if (kinls_mem->LS->ops->numiters) nli_inc = SUNLinSolNumIters(kinls_mem->LS); - if (kinls_mem->iterative && kin_mem->kin_printfl > 2) +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + if (kinls_mem->iterative) KINPrintInfo(kin_mem, PRNT_NLI, "KINLS", "kinLsSolve", INFO_NLI, nli_inc); +#endif /* Increment counters nli and ncfl */ kinls_mem->nli += nli_inc; @@ -1325,9 +1327,11 @@ int kinLsSolve(KINMem kin_mem, N_Vector xx, N_Vector bb, } } - if (kin_mem->kin_inexact_ls && kin_mem->kin_printfl > 2) +#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGLEVEL_INFO + if (kin_mem->kin_inexact_ls) KINPrintInfo(kin_mem, PRNT_EPS, "KINLS", "kinLsSolve", INFO_EPS, res_norm, kin_mem->kin_eps); +#endif return(0); } diff --git a/src/kinsol/kinsol_spils.c b/src/kinsol/kinsol_spils.c deleted file mode 100644 index aad4005762..0000000000 --- a/src/kinsol/kinsol_spils.c +++ /dev/null @@ -1,73 +0,0 @@ -/*----------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ SMU - * Scott Cohen, Alan Hindmarsh, Radu Serban, - * and Aaron Collier @ 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 - *----------------------------------------------------------------- - * Header file for the deprecated Scaled Preconditioned Iterative - * Linear Solver interface in KINSOL; these routines now just wrap - * the updated KINSOL generic linear solver interface in kinsol_ls.h. - *-----------------------------------------------------------------*/ - -#include -#include - -#ifdef __cplusplus /* wrapper to enable C++ usage */ -extern "C" { -#endif - -/*================================================================= - Exported Functions (wrappers for equivalent routines in kinsol_ls.h) - =================================================================*/ - -int KINSpilsSetLinearSolver(void *kinmem, SUNLinearSolver LS) -{ return(KINSetLinearSolver(kinmem, LS, NULL)); } - -int KINSpilsSetPreconditioner(void *kinmem, KINSpilsPrecSetupFn psetup, - KINSpilsPrecSolveFn psolve) -{ return(KINSetPreconditioner(kinmem, psetup, psolve)); } - -int KINSpilsSetJacTimesVecFn(void *kinmem, KINSpilsJacTimesVecFn jtv) -{ return(KINSetJacTimesVecFn(kinmem, jtv)); } - -int KINSpilsGetWorkSpace(void *kinmem, long int *lenrwLS, long int *leniwLS) -{ return(KINGetLinWorkSpace(kinmem, lenrwLS, leniwLS)); } - -int KINSpilsGetNumPrecEvals(void *kinmem, long int *npevals) -{ return(KINGetNumPrecEvals(kinmem, npevals)); } - -int KINSpilsGetNumPrecSolves(void *kinmem, long int *npsolves) -{ return(KINGetNumPrecSolves(kinmem, npsolves)); } - -int KINSpilsGetNumLinIters(void *kinmem, long int *nliters) -{ return(KINGetNumLinIters(kinmem, nliters)); } - -int KINSpilsGetNumConvFails(void *kinmem, long int *nlcfails) -{ return(KINGetNumLinConvFails(kinmem, nlcfails)); } - -int KINSpilsGetNumJtimesEvals(void *kinmem, long int *njvevals) -{ return(KINGetNumJtimesEvals(kinmem, njvevals)); } - -int KINSpilsGetNumFuncEvals(void *kinmem, long int *nfevals) -{ return(KINGetNumLinFuncEvals(kinmem, nfevals)); } - -int KINSpilsGetLastFlag(void *kinmem, long int *flag) -{ return(KINGetLastLinFlag(kinmem, flag)); } - -char *KINSpilsGetReturnFlagName(long int flag) -{ return(KINGetLinReturnFlagName(flag)); } - - -#ifdef __cplusplus -} -#endif - diff --git a/src/nvector/openmp/fmod/fnvector_openmp_mod.c b/src/nvector/openmp/fmod/fnvector_openmp_mod.c index 4216804206..91edfc2791 100644 --- a/src/nvector/openmp/fmod/fnvector_openmp_mod.c +++ b/src/nvector/openmp/fmod/fnvector_openmp_mod.c @@ -946,44 +946,6 @@ SWIGEXPORT int _wrap_FN_VEnableWrmsNormMaskVectorArray_OpenMP(N_Vector farg1, in } -SWIGEXPORT void * _wrap_FN_VCloneVectorArray_OpenMP(int const *farg1, N_Vector farg2) { - void * fresult ; - int arg1 ; - N_Vector arg2 = (N_Vector) 0 ; - N_Vector *result = 0 ; - - arg1 = (int)(*farg1); - arg2 = (N_Vector)(farg2); - result = (N_Vector *)N_VCloneVectorArray_OpenMP(arg1,arg2); - fresult = result; - return fresult; -} - - -SWIGEXPORT void * _wrap_FN_VCloneVectorArrayEmpty_OpenMP(int const *farg1, N_Vector farg2) { - void * fresult ; - int arg1 ; - N_Vector arg2 = (N_Vector) 0 ; - N_Vector *result = 0 ; - - arg1 = (int)(*farg1); - arg2 = (N_Vector)(farg2); - result = (N_Vector *)N_VCloneVectorArrayEmpty_OpenMP(arg1,arg2); - fresult = result; - return fresult; -} - - -SWIGEXPORT void _wrap_FN_VDestroyVectorArray_OpenMP(void *farg1, int const *farg2) { - N_Vector *arg1 = (N_Vector *) 0 ; - int arg2 ; - - arg1 = (N_Vector *)(farg1); - arg2 = (int)(*farg2); - N_VDestroyVectorArray_OpenMP(arg1,arg2); -} - - SWIGEXPORT double * _wrap_FN_VGetArrayPointer_OpenMP(N_Vector farg1) { double * fresult ; diff --git a/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 b/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 index 8518caf673..ab547e6c94 100644 --- a/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 +++ b/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 @@ -80,9 +80,6 @@ module fnvector_openmp_mod public :: FN_VEnableConstVectorArray_OpenMP public :: FN_VEnableWrmsNormVectorArray_OpenMP public :: FN_VEnableWrmsNormMaskVectorArray_OpenMP - public :: FN_VCloneVectorArray_OpenMP - public :: FN_VCloneVectorArrayEmpty_OpenMP - public :: FN_VDestroyVectorArray_OpenMP public :: FN_VGetArrayPointer_OpenMP @@ -564,31 +561,6 @@ function swigc_FN_VEnableWrmsNormMaskVectorArray_OpenMP(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FN_VCloneVectorArray_OpenMP(farg1, farg2) & -bind(C, name="_wrap_FN_VCloneVectorArray_OpenMP") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR) :: fresult -end function - -function swigc_FN_VCloneVectorArrayEmpty_OpenMP(farg1, farg2) & -bind(C, name="_wrap_FN_VCloneVectorArrayEmpty_OpenMP") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR) :: fresult -end function - -subroutine swigc_FN_VDestroyVectorArray_OpenMP(farg1, farg2) & -bind(C, name="_wrap_FN_VDestroyVectorArray_OpenMP") -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -end subroutine - function swigc_FN_VGetArrayPointer_OpenMP(farg1) & bind(C, name="_wrap_FN_VGetArrayPointer_OpenMP") & @@ -1473,50 +1445,6 @@ function FN_VEnableWrmsNormMaskVectorArray_OpenMP(v, tf) & swig_result = fresult end function -function FN_VCloneVectorArray_OpenMP(count, w) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: swig_result -integer(C_INT), intent(in) :: count -type(N_Vector), target, intent(inout) :: w -type(C_PTR) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 - -farg1 = count -farg2 = c_loc(w) -fresult = swigc_FN_VCloneVectorArray_OpenMP(farg1, farg2) -swig_result = fresult -end function - -function FN_VCloneVectorArrayEmpty_OpenMP(count, w) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: swig_result -integer(C_INT), intent(in) :: count -type(N_Vector), target, intent(inout) :: w -type(C_PTR) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 - -farg1 = count -farg2 = c_loc(w) -fresult = swigc_FN_VCloneVectorArrayEmpty_OpenMP(farg1, farg2) -swig_result = fresult -end function - -subroutine FN_VDestroyVectorArray_OpenMP(vs, count) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: vs -integer(C_INT), intent(in) :: count -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = vs -farg2 = count -call swigc_FN_VDestroyVectorArray_OpenMP(farg1, farg2) -end subroutine - function FN_VGetArrayPointer_OpenMP(v) & result(swig_result) diff --git a/src/nvector/openmp/nvector_openmp.c b/src/nvector/openmp/nvector_openmp.c index d9d3889493..5b8db6e85a 100644 --- a/src/nvector/openmp/nvector_openmp.c +++ b/src/nvector/openmp/nvector_openmp.c @@ -219,25 +219,6 @@ N_Vector* N_VCloneVectorArray_OpenMP(int count, N_Vector w) return(N_VCloneVectorArray(count, w)); } -/* ---------------------------------------------------------------------------- - * Function to create an array of new vectors with NULL data array. - */ - -N_Vector* N_VCloneVectorArrayEmpty_OpenMP(int count, N_Vector w) -{ - return(N_VCloneEmptyVectorArray(count, w)); -} - -/* ---------------------------------------------------------------------------- - * Function to free an array created with N_VCloneVectorArray_OpenMP - */ - -void N_VDestroyVectorArray_OpenMP(N_Vector* vs, int count) -{ - N_VDestroyVectorArray(vs, count); - return; -} - /* ---------------------------------------------------------------------------- * Function to return number of vector elements */ diff --git a/src/nvector/openmpdev/nvector_openmpdev.c b/src/nvector/openmpdev/nvector_openmpdev.c index 7b8d46bf9b..3d4ccd8355 100644 --- a/src/nvector/openmpdev/nvector_openmpdev.c +++ b/src/nvector/openmpdev/nvector_openmpdev.c @@ -230,25 +230,6 @@ N_Vector *N_VCloneVectorArray_OpenMPDEV(int count, N_Vector w) return(N_VCloneVectorArray(count, w)); } -/* ---------------------------------------------------------------------------- - * Function to create an array of new vectors with NULL data array. - */ - -N_Vector *N_VCloneVectorArrayEmpty_OpenMPDEV(int count, N_Vector w) -{ - return(N_VCloneEmptyVectorArray(count, w)); -} - -/* ---------------------------------------------------------------------------- - * Function to free an array created with N_VCloneVectorArray_OpenMPDEV - */ - -void N_VDestroyVectorArray_OpenMPDEV(N_Vector *vs, int count) -{ - N_VDestroyVectorArray(vs, count); - return; -} - /* ---------------------------------------------------------------------------- * Function to return number of vector elements */ diff --git a/src/nvector/parallel/fmod/fnvector_parallel_mod.c b/src/nvector/parallel/fmod/fnvector_parallel_mod.c index cc4244981e..c2668e3c4c 100644 --- a/src/nvector/parallel/fmod/fnvector_parallel_mod.c +++ b/src/nvector/parallel/fmod/fnvector_parallel_mod.c @@ -1130,44 +1130,6 @@ SWIGEXPORT int _wrap_FN_VEnableDotProdMultiLocal_Parallel(N_Vector farg1, int co } -SWIGEXPORT void * _wrap_FN_VCloneVectorArray_Parallel(int const *farg1, N_Vector farg2) { - void * fresult ; - int arg1 ; - N_Vector arg2 = (N_Vector) 0 ; - N_Vector *result = 0 ; - - arg1 = (int)(*farg1); - arg2 = (N_Vector)(farg2); - result = (N_Vector *)N_VCloneVectorArray_Parallel(arg1,arg2); - fresult = result; - return fresult; -} - - -SWIGEXPORT void * _wrap_FN_VCloneVectorArrayEmpty_Parallel(int const *farg1, N_Vector farg2) { - void * fresult ; - int arg1 ; - N_Vector arg2 = (N_Vector) 0 ; - N_Vector *result = 0 ; - - arg1 = (int)(*farg1); - arg2 = (N_Vector)(farg2); - result = (N_Vector *)N_VCloneVectorArrayEmpty_Parallel(arg1,arg2); - fresult = result; - return fresult; -} - - -SWIGEXPORT void _wrap_FN_VDestroyVectorArray_Parallel(void *farg1, int const *farg2) { - N_Vector *arg1 = (N_Vector *) 0 ; - int arg2 ; - - arg1 = (N_Vector *)(farg1); - arg2 = (int)(*farg2); - N_VDestroyVectorArray_Parallel(arg1,arg2); -} - - SWIGEXPORT double * _wrap_FN_VGetArrayPointer_Parallel(N_Vector farg1) { double * fresult ; diff --git a/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 b/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 index d8e7fcb23e..43fb070b88 100644 --- a/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 +++ b/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 @@ -92,9 +92,6 @@ module fnvector_parallel_mod public :: FN_VEnableWrmsNormVectorArray_Parallel public :: FN_VEnableWrmsNormMaskVectorArray_Parallel public :: FN_VEnableDotProdMultiLocal_Parallel - public :: FN_VCloneVectorArray_Parallel - public :: FN_VCloneVectorArrayEmpty_Parallel - public :: FN_VDestroyVectorArray_Parallel public :: FN_VGetArrayPointer_Parallel @@ -686,31 +683,6 @@ function swigc_FN_VEnableDotProdMultiLocal_Parallel(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FN_VCloneVectorArray_Parallel(farg1, farg2) & -bind(C, name="_wrap_FN_VCloneVectorArray_Parallel") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR) :: fresult -end function - -function swigc_FN_VCloneVectorArrayEmpty_Parallel(farg1, farg2) & -bind(C, name="_wrap_FN_VCloneVectorArrayEmpty_Parallel") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR) :: fresult -end function - -subroutine swigc_FN_VDestroyVectorArray_Parallel(farg1, farg2) & -bind(C, name="_wrap_FN_VDestroyVectorArray_Parallel") -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -end subroutine - function swigc_FN_VGetArrayPointer_Parallel(farg1) & bind(C, name="_wrap_FN_VGetArrayPointer_Parallel") & @@ -1793,50 +1765,6 @@ function FN_VEnableDotProdMultiLocal_Parallel(v, tf) & swig_result = fresult end function -function FN_VCloneVectorArray_Parallel(count, w) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: swig_result -integer(C_INT), intent(in) :: count -type(N_Vector), target, intent(inout) :: w -type(C_PTR) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 - -farg1 = count -farg2 = c_loc(w) -fresult = swigc_FN_VCloneVectorArray_Parallel(farg1, farg2) -swig_result = fresult -end function - -function FN_VCloneVectorArrayEmpty_Parallel(count, w) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: swig_result -integer(C_INT), intent(in) :: count -type(N_Vector), target, intent(inout) :: w -type(C_PTR) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 - -farg1 = count -farg2 = c_loc(w) -fresult = swigc_FN_VCloneVectorArrayEmpty_Parallel(farg1, farg2) -swig_result = fresult -end function - -subroutine FN_VDestroyVectorArray_Parallel(vs, count) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: vs -integer(C_INT), intent(in) :: count -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = vs -farg2 = count -call swigc_FN_VDestroyVectorArray_Parallel(farg1, farg2) -end subroutine - function FN_VGetArrayPointer_Parallel(v) & result(swig_result) diff --git a/src/nvector/parallel/nvector_parallel.c b/src/nvector/parallel/nvector_parallel.c index 88dee009e6..097e2cd1ee 100644 --- a/src/nvector/parallel/nvector_parallel.c +++ b/src/nvector/parallel/nvector_parallel.c @@ -241,26 +241,6 @@ N_Vector* N_VCloneVectorArray_Parallel(int count, N_Vector w) return(N_VCloneVectorArray(count, w)); } -/* ---------------------------------------------------------------- - * Function to create an array of new parallel vectors with empty - * (NULL) data array. - */ - -N_Vector* N_VCloneVectorArrayEmpty_Parallel(int count, N_Vector w) -{ - return(N_VCloneEmptyVectorArray(count, w)); -} - -/* ---------------------------------------------------------------- - * Function to free an array created with N_VCloneVectorArray_Parallel - */ - -void N_VDestroyVectorArray_Parallel(N_Vector* vs, int count) -{ - N_VDestroyVectorArray(vs, count); - return; -} - /* ---------------------------------------------------------------- * Function to return global vector length */ diff --git a/src/nvector/parhyp/nvector_parhyp.c b/src/nvector/parhyp/nvector_parhyp.c index c5a7983c7c..5397f0308b 100644 --- a/src/nvector/parhyp/nvector_parhyp.c +++ b/src/nvector/parhyp/nvector_parhyp.c @@ -266,27 +266,6 @@ N_Vector *N_VCloneVectorArray_ParHyp(int count, N_Vector w) return(N_VCloneVectorArray(count, w)); } -/* ---------------------------------------------------------------- - * Function to create an array of new parhyp vector wrappers - * without uderlying HYPRE vectors. - */ - -N_Vector *N_VCloneVectorArrayEmpty_ParHyp(int count, N_Vector w) -{ - return(N_VCloneEmptyVectorArray(count, w)); -} - -/* ---------------------------------------------------------------- - * Function to free an array created with N_VCloneVectorArray_ParHyp - */ - -void N_VDestroyVectorArray_ParHyp(N_Vector *vs, int count) -{ - N_VDestroyVectorArray(vs, count); - return; -} - - /* ---------------------------------------------------------------- * Extract HYPRE vector */ diff --git a/src/nvector/petsc/nvector_petsc.c b/src/nvector/petsc/nvector_petsc.c index 0cd81a84c8..3dbff29050 100644 --- a/src/nvector/petsc/nvector_petsc.c +++ b/src/nvector/petsc/nvector_petsc.c @@ -248,26 +248,6 @@ N_Vector *N_VCloneVectorArray_Petsc(int count, N_Vector w) return(N_VCloneVectorArray(count, w)); } -/* ---------------------------------------------------------------- - * Function to create an array of new PETSc vector wrappers with - * empty (NULL) PETSc vectors. - */ - -N_Vector *N_VCloneVectorArrayEmpty_Petsc(int count, N_Vector w) -{ - return(N_VCloneEmptyVectorArray(count, w)); -} - -/* ---------------------------------------------------------------- - * Function to free an array created with N_VCloneVectorArray_Petsc - */ - -void N_VDestroyVectorArray_Petsc(N_Vector *vs, int count) -{ - N_VDestroyVectorArray(vs, count); - return; -} - /* ---------------------------------------------------------------- * Function to extract PETSc vector */ diff --git a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c index d34088af42..73c8ca0c51 100644 --- a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c +++ b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c @@ -946,44 +946,6 @@ SWIGEXPORT int _wrap_FN_VEnableWrmsNormMaskVectorArray_Pthreads(N_Vector farg1, } -SWIGEXPORT void * _wrap_FN_VCloneVectorArray_Pthreads(int const *farg1, N_Vector farg2) { - void * fresult ; - int arg1 ; - N_Vector arg2 = (N_Vector) 0 ; - N_Vector *result = 0 ; - - arg1 = (int)(*farg1); - arg2 = (N_Vector)(farg2); - result = (N_Vector *)N_VCloneVectorArray_Pthreads(arg1,arg2); - fresult = result; - return fresult; -} - - -SWIGEXPORT void * _wrap_FN_VCloneVectorArrayEmpty_Pthreads(int const *farg1, N_Vector farg2) { - void * fresult ; - int arg1 ; - N_Vector arg2 = (N_Vector) 0 ; - N_Vector *result = 0 ; - - arg1 = (int)(*farg1); - arg2 = (N_Vector)(farg2); - result = (N_Vector *)N_VCloneVectorArrayEmpty_Pthreads(arg1,arg2); - fresult = result; - return fresult; -} - - -SWIGEXPORT void _wrap_FN_VDestroyVectorArray_Pthreads(void *farg1, int const *farg2) { - N_Vector *arg1 = (N_Vector *) 0 ; - int arg2 ; - - arg1 = (N_Vector *)(farg1); - arg2 = (int)(*farg2); - N_VDestroyVectorArray_Pthreads(arg1,arg2); -} - - SWIGEXPORT double * _wrap_FN_VGetArrayPointer_Pthreads(N_Vector farg1) { double * fresult ; diff --git a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 index 4456bf0f8a..40fac42471 100644 --- a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 +++ b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 @@ -80,9 +80,6 @@ module fnvector_pthreads_mod public :: FN_VEnableConstVectorArray_Pthreads public :: FN_VEnableWrmsNormVectorArray_Pthreads public :: FN_VEnableWrmsNormMaskVectorArray_Pthreads - public :: FN_VCloneVectorArray_Pthreads - public :: FN_VCloneVectorArrayEmpty_Pthreads - public :: FN_VDestroyVectorArray_Pthreads public :: FN_VGetArrayPointer_Pthreads @@ -564,31 +561,6 @@ function swigc_FN_VEnableWrmsNormMaskVectorArray_Pthreads(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FN_VCloneVectorArray_Pthreads(farg1, farg2) & -bind(C, name="_wrap_FN_VCloneVectorArray_Pthreads") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR) :: fresult -end function - -function swigc_FN_VCloneVectorArrayEmpty_Pthreads(farg1, farg2) & -bind(C, name="_wrap_FN_VCloneVectorArrayEmpty_Pthreads") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR) :: fresult -end function - -subroutine swigc_FN_VDestroyVectorArray_Pthreads(farg1, farg2) & -bind(C, name="_wrap_FN_VDestroyVectorArray_Pthreads") -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -end subroutine - function swigc_FN_VGetArrayPointer_Pthreads(farg1) & bind(C, name="_wrap_FN_VGetArrayPointer_Pthreads") & @@ -1473,50 +1445,6 @@ function FN_VEnableWrmsNormMaskVectorArray_Pthreads(v, tf) & swig_result = fresult end function -function FN_VCloneVectorArray_Pthreads(count, w) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: swig_result -integer(C_INT), intent(in) :: count -type(N_Vector), target, intent(inout) :: w -type(C_PTR) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 - -farg1 = count -farg2 = c_loc(w) -fresult = swigc_FN_VCloneVectorArray_Pthreads(farg1, farg2) -swig_result = fresult -end function - -function FN_VCloneVectorArrayEmpty_Pthreads(count, w) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: swig_result -integer(C_INT), intent(in) :: count -type(N_Vector), target, intent(inout) :: w -type(C_PTR) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 - -farg1 = count -farg2 = c_loc(w) -fresult = swigc_FN_VCloneVectorArrayEmpty_Pthreads(farg1, farg2) -swig_result = fresult -end function - -subroutine FN_VDestroyVectorArray_Pthreads(vs, count) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: vs -integer(C_INT), intent(in) :: count -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = vs -farg2 = count -call swigc_FN_VDestroyVectorArray_Pthreads(farg1, farg2) -end subroutine - function FN_VGetArrayPointer_Pthreads(v) & result(swig_result) diff --git a/src/nvector/pthreads/nvector_pthreads.c b/src/nvector/pthreads/nvector_pthreads.c index 62093e6363..d4b3b10caa 100644 --- a/src/nvector/pthreads/nvector_pthreads.c +++ b/src/nvector/pthreads/nvector_pthreads.c @@ -289,25 +289,6 @@ N_Vector* N_VCloneVectorArray_Pthreads(int count, N_Vector w) return(N_VCloneVectorArray(count, w)); } -/* ---------------------------------------------------------------------------- - * Function to create an array of new vectors with NULL data array. - */ - -N_Vector* N_VCloneVectorArrayEmpty_Pthreads(int count, N_Vector w) -{ - return(N_VCloneEmptyVectorArray(count, w)); -} - -/* ---------------------------------------------------------------------------- - * Function to free an array created with N_VCloneVectorArray_Pthreads - */ - -void N_VDestroyVectorArray_Pthreads(N_Vector* vs, int count) -{ - N_VDestroyVectorArray(vs, count); - return; -} - /* ---------------------------------------------------------------------------- * Function to return number of vector elements */ diff --git a/src/nvector/serial/fmod/fnvector_serial_mod.c b/src/nvector/serial/fmod/fnvector_serial_mod.c index ed9a774185..591ee2c0f7 100644 --- a/src/nvector/serial/fmod/fnvector_serial_mod.c +++ b/src/nvector/serial/fmod/fnvector_serial_mod.c @@ -940,44 +940,6 @@ SWIGEXPORT int _wrap_FN_VEnableWrmsNormMaskVectorArray_Serial(N_Vector farg1, in } -SWIGEXPORT void * _wrap_FN_VCloneVectorArray_Serial(int const *farg1, N_Vector farg2) { - void * fresult ; - int arg1 ; - N_Vector arg2 = (N_Vector) 0 ; - N_Vector *result = 0 ; - - arg1 = (int)(*farg1); - arg2 = (N_Vector)(farg2); - result = (N_Vector *)N_VCloneVectorArray_Serial(arg1,arg2); - fresult = result; - return fresult; -} - - -SWIGEXPORT void * _wrap_FN_VCloneVectorArrayEmpty_Serial(int const *farg1, N_Vector farg2) { - void * fresult ; - int arg1 ; - N_Vector arg2 = (N_Vector) 0 ; - N_Vector *result = 0 ; - - arg1 = (int)(*farg1); - arg2 = (N_Vector)(farg2); - result = (N_Vector *)N_VCloneVectorArrayEmpty_Serial(arg1,arg2); - fresult = result; - return fresult; -} - - -SWIGEXPORT void _wrap_FN_VDestroyVectorArray_Serial(void *farg1, int const *farg2) { - N_Vector *arg1 = (N_Vector *) 0 ; - int arg2 ; - - arg1 = (N_Vector *)(farg1); - arg2 = (int)(*farg2); - N_VDestroyVectorArray_Serial(arg1,arg2); -} - - SWIGEXPORT double * _wrap_FN_VGetArrayPointer_Serial(N_Vector farg1) { double * fresult ; diff --git a/src/nvector/serial/fmod/fnvector_serial_mod.f90 b/src/nvector/serial/fmod/fnvector_serial_mod.f90 index 97b2660ec9..8bf8ca4fd9 100644 --- a/src/nvector/serial/fmod/fnvector_serial_mod.f90 +++ b/src/nvector/serial/fmod/fnvector_serial_mod.f90 @@ -80,9 +80,6 @@ module fnvector_serial_mod public :: FN_VEnableConstVectorArray_Serial public :: FN_VEnableWrmsNormVectorArray_Serial public :: FN_VEnableWrmsNormMaskVectorArray_Serial - public :: FN_VCloneVectorArray_Serial - public :: FN_VCloneVectorArrayEmpty_Serial - public :: FN_VDestroyVectorArray_Serial public :: FN_VGetArrayPointer_Serial @@ -561,31 +558,6 @@ function swigc_FN_VEnableWrmsNormMaskVectorArray_Serial(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FN_VCloneVectorArray_Serial(farg1, farg2) & -bind(C, name="_wrap_FN_VCloneVectorArray_Serial") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR) :: fresult -end function - -function swigc_FN_VCloneVectorArrayEmpty_Serial(farg1, farg2) & -bind(C, name="_wrap_FN_VCloneVectorArrayEmpty_Serial") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR) :: fresult -end function - -subroutine swigc_FN_VDestroyVectorArray_Serial(farg1, farg2) & -bind(C, name="_wrap_FN_VDestroyVectorArray_Serial") -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -end subroutine - function swigc_FN_VGetArrayPointer_Serial(farg1) & bind(C, name="_wrap_FN_VGetArrayPointer_Serial") & @@ -1461,50 +1433,6 @@ function FN_VEnableWrmsNormMaskVectorArray_Serial(v, tf) & swig_result = fresult end function -function FN_VCloneVectorArray_Serial(count, w) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: swig_result -integer(C_INT), intent(in) :: count -type(N_Vector), target, intent(inout) :: w -type(C_PTR) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 - -farg1 = count -farg2 = c_loc(w) -fresult = swigc_FN_VCloneVectorArray_Serial(farg1, farg2) -swig_result = fresult -end function - -function FN_VCloneVectorArrayEmpty_Serial(count, w) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: swig_result -integer(C_INT), intent(in) :: count -type(N_Vector), target, intent(inout) :: w -type(C_PTR) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 - -farg1 = count -farg2 = c_loc(w) -fresult = swigc_FN_VCloneVectorArrayEmpty_Serial(farg1, farg2) -swig_result = fresult -end function - -subroutine FN_VDestroyVectorArray_Serial(vs, count) -use, intrinsic :: ISO_C_BINDING -type(C_PTR) :: vs -integer(C_INT), intent(in) :: count -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = vs -farg2 = count -call swigc_FN_VDestroyVectorArray_Serial(farg1, farg2) -end subroutine - function FN_VGetArrayPointer_Serial(v) & result(swig_result) diff --git a/src/nvector/serial/nvector_serial.c b/src/nvector/serial/nvector_serial.c index 980363fbb6..43ced7bc82 100644 --- a/src/nvector/serial/nvector_serial.c +++ b/src/nvector/serial/nvector_serial.c @@ -213,25 +213,6 @@ N_Vector* N_VCloneVectorArray_Serial(int count, N_Vector w) return(N_VCloneVectorArray(count, w)); } -/* ---------------------------------------------------------------------------- - * Function to create an array of new serial vectors with NULL data array. - */ - -N_Vector* N_VCloneVectorArrayEmpty_Serial(int count, N_Vector w) -{ - return(N_VCloneEmptyVectorArray(count, w)); -} - -/* ---------------------------------------------------------------------------- - * Function to free an array created with N_VCloneVectorArray_Serial - */ - -void N_VDestroyVectorArray_Serial(N_Vector* vs, int count) -{ - N_VDestroyVectorArray(vs, count); - return; -} - /* ---------------------------------------------------------------------------- * Function to return number of vector elements */ diff --git a/src/sundials/CMakeLists.txt b/src/sundials/CMakeLists.txt index df5af04cd6..d782ef0103 100644 --- a/src/sundials/CMakeLists.txt +++ b/src/sundials/CMakeLists.txt @@ -65,11 +65,6 @@ if(ENABLE_SYCL) list(APPEND sundials_HEADERS sundials_sycl_policies.hpp) endif() -# If Blas/Lapack support was enabled, add the Lapack interface headers -if(BUILD_SUNLINSOL_LAPACKBAND OR BUILD_SUNLINSOL_LAPACKDENSE) - list(APPEND sundials_HEADERS sundials_lapack.h) -endif() - # If enabled, add the XBraid interface header if(ENABLE_XBRAID) list(APPEND sundials_HEADERS sundials_xbraid.h) diff --git a/src/sundials/fmod/fsundials_linearsolver_mod.c b/src/sundials/fmod/fsundials_linearsolver_mod.c index c755ea1949..9c6ed9076e 100644 --- a/src/sundials/fmod/fsundials_linearsolver_mod.c +++ b/src/sundials/fmod/fsundials_linearsolver_mod.c @@ -211,26 +211,6 @@ SWIGEXPORT int _wrap_FSUNModifiedGS(void *farg1, void *farg2, int const *farg3, } -SWIGEXPORT int _wrap_FModifiedGS(void *farg1, void *farg2, int const *farg3, int const *farg4, double *farg5) { - int fresult ; - N_Vector *arg1 = (N_Vector *) 0 ; - realtype **arg2 = (realtype **) 0 ; - int arg3 ; - int arg4 ; - realtype *arg5 = (realtype *) 0 ; - int result; - - arg1 = (N_Vector *)(farg1); - arg2 = (realtype **)(farg2); - arg3 = (int)(*farg3); - arg4 = (int)(*farg4); - arg5 = (realtype *)(farg5); - result = (int)ModifiedGS(arg1,arg2,arg3,arg4,arg5); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FSUNClassicalGS(void *farg1, void *farg2, int const *farg3, int const *farg4, double *farg5, double *farg6, void *farg7) { int fresult ; N_Vector *arg1 = (N_Vector *) 0 ; @@ -255,30 +235,6 @@ SWIGEXPORT int _wrap_FSUNClassicalGS(void *farg1, void *farg2, int const *farg3, } -SWIGEXPORT int _wrap_FClassicalGS(void *farg1, void *farg2, int const *farg3, int const *farg4, double *farg5, double *farg6, void *farg7) { - int fresult ; - N_Vector *arg1 = (N_Vector *) 0 ; - realtype **arg2 = (realtype **) 0 ; - int arg3 ; - int arg4 ; - realtype *arg5 = (realtype *) 0 ; - realtype *arg6 = (realtype *) 0 ; - N_Vector *arg7 = (N_Vector *) 0 ; - int result; - - arg1 = (N_Vector *)(farg1); - arg2 = (realtype **)(farg2); - arg3 = (int)(*farg3); - arg4 = (int)(*farg4); - arg5 = (realtype *)(farg5); - arg6 = (realtype *)(farg6); - arg7 = (N_Vector *)(farg7); - result = (int)ClassicalGS(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FSUNQRfact(int const *farg1, void *farg2, double *farg3, int const *farg4) { int fresult ; int arg1 ; @@ -297,24 +253,6 @@ SWIGEXPORT int _wrap_FSUNQRfact(int const *farg1, void *farg2, double *farg3, in } -SWIGEXPORT int _wrap_FQRfact(int const *farg1, void *farg2, double *farg3, int const *farg4) { - int fresult ; - int arg1 ; - realtype **arg2 = (realtype **) 0 ; - realtype *arg3 = (realtype *) 0 ; - int arg4 ; - int result; - - arg1 = (int)(*farg1); - arg2 = (realtype **)(farg2); - arg3 = (realtype *)(farg3); - arg4 = (int)(*farg4); - result = (int)QRfact(arg1,arg2,arg3,arg4); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FSUNQRsol(int const *farg1, void *farg2, double *farg3, double *farg4) { int fresult ; int arg1 ; @@ -333,24 +271,6 @@ SWIGEXPORT int _wrap_FSUNQRsol(int const *farg1, void *farg2, double *farg3, dou } -SWIGEXPORT int _wrap_FQRsol(int const *farg1, void *farg2, double *farg3, double *farg4) { - int fresult ; - int arg1 ; - realtype **arg2 = (realtype **) 0 ; - realtype *arg3 = (realtype *) 0 ; - realtype *arg4 = (realtype *) 0 ; - int result; - - arg1 = (int)(*farg1); - arg2 = (realtype **)(farg2); - arg3 = (realtype *)(farg3); - arg4 = (realtype *)(farg4); - result = (int)QRsol(arg1,arg2,arg3,arg4); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FSUNQRAdd_MGS(void *farg1, double *farg2, N_Vector farg3, int const *farg4, int const *farg5, void *farg6) { int fresult ; N_Vector *arg1 = (N_Vector *) 0 ; diff --git a/src/sundials/fmod/fsundials_linearsolver_mod.f90 b/src/sundials/fmod/fsundials_linearsolver_mod.f90 index e5fc92eb13..2c4272768e 100644 --- a/src/sundials/fmod/fsundials_linearsolver_mod.f90 +++ b/src/sundials/fmod/fsundials_linearsolver_mod.f90 @@ -18,13 +18,6 @@ module fsundials_linearsolver_mod private ! DECLARATION CONSTRUCTS - enum, bind(c) - enumerator :: PREC_NONE - enumerator :: PREC_LEFT - enumerator :: PREC_RIGHT - enumerator :: PREC_BOTH - end enum - public :: PREC_NONE, PREC_LEFT, PREC_RIGHT, PREC_BOTH enum, bind(c) enumerator :: SUN_PREC_NONE enumerator :: SUN_PREC_LEFT @@ -32,24 +25,15 @@ module fsundials_linearsolver_mod enumerator :: SUN_PREC_BOTH end enum public :: SUN_PREC_NONE, SUN_PREC_LEFT, SUN_PREC_RIGHT, SUN_PREC_BOTH - enum, bind(c) - enumerator :: MODIFIED_GS = 1 - enumerator :: CLASSICAL_GS = 2 - end enum - public :: MODIFIED_GS, CLASSICAL_GS enum, bind(c) enumerator :: SUN_MODIFIED_GS = 1 enumerator :: SUN_CLASSICAL_GS = 2 end enum public :: SUN_MODIFIED_GS, SUN_CLASSICAL_GS public :: FSUNModifiedGS - public :: FModifiedGS public :: FSUNClassicalGS - public :: FClassicalGS public :: FSUNQRfact - public :: FQRfact public :: FSUNQRsol - public :: FQRsol public :: FSUNQRAdd_MGS public :: FSUNQRAdd_ICWY public :: FSUNQRAdd_ICWY_SB @@ -170,18 +154,6 @@ function swigc_FSUNModifiedGS(farg1, farg2, farg3, farg4, farg5) & integer(C_INT) :: fresult end function -function swigc_FModifiedGS(farg1, farg2, farg3, farg4, farg5) & -bind(C, name="_wrap_FModifiedGS") & -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), intent(in) :: farg4 -type(C_PTR), value :: farg5 -integer(C_INT) :: fresult -end function - function swigc_FSUNClassicalGS(farg1, farg2, farg3, farg4, farg5, farg6, farg7) & bind(C, name="_wrap_FSUNClassicalGS") & result(fresult) @@ -196,20 +168,6 @@ function swigc_FSUNClassicalGS(farg1, farg2, farg3, farg4, farg5, farg6, farg7) integer(C_INT) :: fresult end function -function swigc_FClassicalGS(farg1, farg2, farg3, farg4, farg5, farg6, farg7) & -bind(C, name="_wrap_FClassicalGS") & -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), intent(in) :: farg4 -type(C_PTR), value :: farg5 -type(C_PTR), value :: farg6 -type(C_PTR), value :: farg7 -integer(C_INT) :: fresult -end function - function swigc_FSUNQRfact(farg1, farg2, farg3, farg4) & bind(C, name="_wrap_FSUNQRfact") & result(fresult) @@ -221,17 +179,6 @@ function swigc_FSUNQRfact(farg1, farg2, farg3, farg4) & integer(C_INT) :: fresult end function -function swigc_FQRfact(farg1, farg2, farg3, farg4) & -bind(C, name="_wrap_FQRfact") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR), value :: farg3 -integer(C_INT), intent(in) :: farg4 -integer(C_INT) :: fresult -end function - function swigc_FSUNQRsol(farg1, farg2, farg3, farg4) & bind(C, name="_wrap_FSUNQRsol") & result(fresult) @@ -243,17 +190,6 @@ function swigc_FSUNQRsol(farg1, farg2, farg3, farg4) & integer(C_INT) :: fresult end function -function swigc_FQRsol(farg1, farg2, farg3, farg4) & -bind(C, name="_wrap_FQRsol") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -integer(C_INT), intent(in) :: farg1 -type(C_PTR), value :: farg2 -type(C_PTR), value :: farg3 -type(C_PTR), value :: farg4 -integer(C_INT) :: fresult -end function - function swigc_FSUNQRAdd_MGS(farg1, farg2, farg3, farg4, farg5, farg6) & bind(C, name="_wrap_FSUNQRAdd_MGS") & result(fresult) @@ -511,31 +447,6 @@ function FSUNModifiedGS(v, h, k, p, new_vk_norm) & swig_result = fresult end function -function FModifiedGS(v, h, k, p, new_vk_norm) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: v -type(C_PTR), target, intent(inout) :: h -integer(C_INT), intent(in) :: k -integer(C_INT), intent(in) :: p -real(C_DOUBLE), dimension(*), target, intent(inout) :: new_vk_norm -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 -integer(C_INT) :: farg3 -integer(C_INT) :: farg4 -type(C_PTR) :: farg5 - -farg1 = v -farg2 = c_loc(h) -farg3 = k -farg4 = p -farg5 = c_loc(new_vk_norm(1)) -fresult = swigc_FModifiedGS(farg1, farg2, farg3, farg4, farg5) -swig_result = fresult -end function - function FSUNClassicalGS(v, h, k, p, new_vk_norm, stemp, vtemp) & result(swig_result) use, intrinsic :: ISO_C_BINDING @@ -567,37 +478,6 @@ function FSUNClassicalGS(v, h, k, p, new_vk_norm, stemp, vtemp) & swig_result = fresult end function -function FClassicalGS(v, h, k, p, new_vk_norm, stemp, vtemp) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: v -type(C_PTR), target, intent(inout) :: h -integer(C_INT), intent(in) :: k -integer(C_INT), intent(in) :: p -real(C_DOUBLE), dimension(*), target, intent(inout) :: new_vk_norm -real(C_DOUBLE), dimension(*), target, intent(inout) :: stemp -type(C_PTR) :: vtemp -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 -integer(C_INT) :: farg3 -integer(C_INT) :: farg4 -type(C_PTR) :: farg5 -type(C_PTR) :: farg6 -type(C_PTR) :: farg7 - -farg1 = v -farg2 = c_loc(h) -farg3 = k -farg4 = p -farg5 = c_loc(new_vk_norm(1)) -farg6 = c_loc(stemp(1)) -farg7 = vtemp -fresult = swigc_FClassicalGS(farg1, farg2, farg3, farg4, farg5, farg6, farg7) -swig_result = fresult -end function - function FSUNQRfact(n, h, q, job) & result(swig_result) use, intrinsic :: ISO_C_BINDING @@ -620,28 +500,6 @@ function FSUNQRfact(n, h, q, job) & swig_result = fresult end function -function FQRfact(n, h, q, job) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -integer(C_INT), intent(in) :: n -type(C_PTR), target, intent(inout) :: h -real(C_DOUBLE), dimension(*), target, intent(inout) :: q -integer(C_INT), intent(in) :: job -integer(C_INT) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 -type(C_PTR) :: farg3 -integer(C_INT) :: farg4 - -farg1 = n -farg2 = c_loc(h) -farg3 = c_loc(q(1)) -farg4 = job -fresult = swigc_FQRfact(farg1, farg2, farg3, farg4) -swig_result = fresult -end function - function FSUNQRsol(n, h, q, b) & result(swig_result) use, intrinsic :: ISO_C_BINDING @@ -664,28 +522,6 @@ function FSUNQRsol(n, h, q, b) & swig_result = fresult end function -function FQRsol(n, h, q, b) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -integer(C_INT), intent(in) :: n -type(C_PTR), target, intent(inout) :: h -real(C_DOUBLE), dimension(*), target, intent(inout) :: q -real(C_DOUBLE), dimension(*), target, intent(inout) :: b -integer(C_INT) :: fresult -integer(C_INT) :: farg1 -type(C_PTR) :: farg2 -type(C_PTR) :: farg3 -type(C_PTR) :: farg4 - -farg1 = n -farg2 = c_loc(h) -farg3 = c_loc(q(1)) -farg4 = c_loc(b(1)) -fresult = swigc_FQRsol(farg1, farg2, farg3, farg4) -swig_result = fresult -end function - function FSUNQRAdd_MGS(q, r, df, m, mmax, qrdata) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/sundials/sundials_logger.c b/src/sundials/sundials_logger.c index b0ae437223..ce4769c76f 100644 --- a/src/sundials/sundials_logger.c +++ b/src/sundials/sundials_logger.c @@ -143,7 +143,7 @@ static sunbooleantype sunLoggerIsOutputRank(SUNLogger logger, int* rank_ref) #else if (rank_ref) { - *rank_ref = -1; + *rank_ref = 0; } retval = SUNTRUE; #endif @@ -254,13 +254,6 @@ int SUNLogger_SetErrorFilename(SUNLogger logger, const char* error_filename) return -1; } } -#else - fprintf(stderr, - "[LOGGER WARNING] " - "SUNDIALS_LOGGING_LEVEL=%d (build time option) " - "is set too low for ERROR, but a ERROR file was provided. " - "Set the logging level to >= %d and recompile if ERROR output level " - "is desired.\n", SUN_LOGLEVEL_ERROR, SUNDIALS_LOGGING_LEVEL); #endif } @@ -300,13 +293,6 @@ int SUNLogger_SetWarningFilename(SUNLogger logger, const char* warning_filename) return -1; } } -#else - fprintf(stderr, - "[LOGGER WARNING] " - "SUNDIALS_LOGGING_LEVEL=%d (build time option) " - "is set too low for WARNING, but a WARNING file was provided. " - "Set the logging level to >= %d and recompile if WARNING output " - "level is desired.\n", SUN_LOGLEVEL_WARNING, SUNDIALS_LOGGING_LEVEL); #endif } @@ -346,13 +332,6 @@ int SUNLogger_SetInfoFilename(SUNLogger logger, const char* info_filename) return -1; } } -#else - fprintf(stderr, - "[LOGGER WARNING] " - "SUNDIALS_LOGGING_LEVEL=%d (build time option) " - "is set too low for INFO, but a INFO file was provided. Set the " - "logging level to >= %d and recompile if INFO output level is " - "desired.\n", SUN_LOGLEVEL_INFO, SUNDIALS_LOGGING_LEVEL); #endif } @@ -392,13 +371,6 @@ int SUNLogger_SetDebugFilename(SUNLogger logger, const char* debug_filename) return -1; } } -#else - fprintf(stderr, - "[LOGGER WARNING] " - "SUNDIALS_LOGGING_LEVEL=%d (build time option) " - "is set too low for DEBUG output, but a DEBUG file was provided. " - "Set the logging level to >= %d and recompile if DEBUG output level " - "is desired.\n", SUN_LOGLEVEL_DEBUG, SUNDIALS_LOGGING_LEVEL); #endif } diff --git a/src/sunlinsol/pcg/fmod/fsunlinsol_pcg_mod.c b/src/sunlinsol/pcg/fmod/fsunlinsol_pcg_mod.c index 3bdb6ea15f..68489d3520 100644 --- a/src/sunlinsol/pcg/fmod/fsunlinsol_pcg_mod.c +++ b/src/sunlinsol/pcg/fmod/fsunlinsol_pcg_mod.c @@ -464,32 +464,4 @@ SWIGEXPORT int _wrap_FSUNLinSolFree_PCG(SUNLinearSolver farg1) { } -SWIGEXPORT int _wrap_FSUNLinSolSetInfoFile_PCG(SUNLinearSolver farg1, void *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (FILE *)(farg2); - result = (int)SUNLinSolSetInfoFile_PCG(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FSUNLinSolSetPrintLevel_PCG(SUNLinearSolver farg1, int const *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - int arg2 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (int)(*farg2); - result = (int)SUNLinSolSetPrintLevel_PCG(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - diff --git a/src/sunlinsol/pcg/fmod/fsunlinsol_pcg_mod.f90 b/src/sunlinsol/pcg/fmod/fsunlinsol_pcg_mod.f90 index faf98e9503..6334343b52 100644 --- a/src/sunlinsol/pcg/fmod/fsunlinsol_pcg_mod.f90 +++ b/src/sunlinsol/pcg/fmod/fsunlinsol_pcg_mod.f90 @@ -53,8 +53,6 @@ module fsunlinsol_pcg_mod public :: FSUNLinSolLastFlag_PCG public :: FSUNLinSolSpace_PCG public :: FSUNLinSolFree_PCG - public :: FSUNLinSolSetInfoFile_PCG - public :: FSUNLinSolSetPrintLevel_PCG ! WRAPPER DECLARATIONS interface @@ -222,24 +220,6 @@ function swigc_FSUNLinSolFree_PCG(farg1) & integer(C_INT) :: fresult end function -function swigc_FSUNLinSolSetInfoFile_PCG(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetInfoFile_PCG") & -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_FSUNLinSolSetPrintLevel_PCG(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetPrintLevel_PCG") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -integer(C_INT) :: fresult -end function - end interface @@ -539,37 +519,5 @@ function FSUNLinSolFree_PCG(s) & swig_result = fresult end function -function FSUNLinSolSetInfoFile_PCG(ls, info_file) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -type(C_PTR) :: info_file -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = c_loc(ls) -farg2 = info_file -fresult = swigc_FSUNLinSolSetInfoFile_PCG(farg1, farg2) -swig_result = fresult -end function - -function FSUNLinSolSetPrintLevel_PCG(ls, print_level) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -integer(C_INT), intent(in) :: print_level -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = c_loc(ls) -farg2 = print_level -fresult = swigc_FSUNLinSolSetPrintLevel_PCG(farg1, farg2) -swig_result = fresult -end function - end module diff --git a/src/sunlinsol/pcg/sunlinsol_pcg.c b/src/sunlinsol/pcg/sunlinsol_pcg.c index eb21a71da2..46d0a24842 100644 --- a/src/sunlinsol/pcg/sunlinsol_pcg.c +++ b/src/sunlinsol/pcg/sunlinsol_pcg.c @@ -577,33 +577,3 @@ int SUNLinSolFree_PCG(SUNLinearSolver S) free(S); S = NULL; return(SUNLS_SUCCESS); } - - -int SUNLinSolSetInfoFile_PCG(SUNLinearSolver S, - FILE* info_file) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - PCG_CONTENT(S)->info_file = info_file; - - return(SUNLS_SUCCESS); -} - - -int SUNLinSolSetPrintLevel_PCG(SUNLinearSolver S, - int print_level) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - /* check for valid print level */ - if (print_level < 0 || print_level > 1) - return(SUNLS_ILL_INPUT); - - PCG_CONTENT(S)->print_level = print_level; - - return(SUNLS_SUCCESS); -} diff --git a/src/sunlinsol/spbcgs/fmod/fsunlinsol_spbcgs_mod.c b/src/sunlinsol/spbcgs/fmod/fsunlinsol_spbcgs_mod.c index 1d58f0c9b1..e6e3e56704 100644 --- a/src/sunlinsol/spbcgs/fmod/fsunlinsol_spbcgs_mod.c +++ b/src/sunlinsol/spbcgs/fmod/fsunlinsol_spbcgs_mod.c @@ -464,32 +464,4 @@ SWIGEXPORT int _wrap_FSUNLinSolFree_SPBCGS(SUNLinearSolver farg1) { } -SWIGEXPORT int _wrap_FSUNLinSolSetInfoFile_SPBCGS(SUNLinearSolver farg1, void *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (FILE *)(farg2); - result = (int)SUNLinSolSetInfoFile_SPBCGS(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FSUNLinSolSetPrintLevel_SPBCGS(SUNLinearSolver farg1, int const *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - int arg2 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (int)(*farg2); - result = (int)SUNLinSolSetPrintLevel_SPBCGS(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - diff --git a/src/sunlinsol/spbcgs/fmod/fsunlinsol_spbcgs_mod.f90 b/src/sunlinsol/spbcgs/fmod/fsunlinsol_spbcgs_mod.f90 index 301bcf85d5..2159bfe002 100644 --- a/src/sunlinsol/spbcgs/fmod/fsunlinsol_spbcgs_mod.f90 +++ b/src/sunlinsol/spbcgs/fmod/fsunlinsol_spbcgs_mod.f90 @@ -53,8 +53,6 @@ module fsunlinsol_spbcgs_mod public :: FSUNLinSolLastFlag_SPBCGS public :: FSUNLinSolSpace_SPBCGS public :: FSUNLinSolFree_SPBCGS - public :: FSUNLinSolSetInfoFile_SPBCGS - public :: FSUNLinSolSetPrintLevel_SPBCGS ! WRAPPER DECLARATIONS interface @@ -222,24 +220,6 @@ function swigc_FSUNLinSolFree_SPBCGS(farg1) & integer(C_INT) :: fresult end function -function swigc_FSUNLinSolSetInfoFile_SPBCGS(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetInfoFile_SPBCGS") & -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_FSUNLinSolSetPrintLevel_SPBCGS(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetPrintLevel_SPBCGS") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -integer(C_INT) :: fresult -end function - end interface @@ -539,37 +519,5 @@ function FSUNLinSolFree_SPBCGS(s) & swig_result = fresult end function -function FSUNLinSolSetInfoFile_SPBCGS(ls, info_file) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -type(C_PTR) :: info_file -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = c_loc(ls) -farg2 = info_file -fresult = swigc_FSUNLinSolSetInfoFile_SPBCGS(farg1, farg2) -swig_result = fresult -end function - -function FSUNLinSolSetPrintLevel_SPBCGS(ls, print_level) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -integer(C_INT), intent(in) :: print_level -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = c_loc(ls) -farg2 = print_level -fresult = swigc_FSUNLinSolSetPrintLevel_SPBCGS(farg1, farg2) -swig_result = fresult -end function - end module diff --git a/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c b/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c index f2e6360251..efdc437f70 100644 --- a/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c +++ b/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c @@ -779,33 +779,3 @@ int SUNLinSolFree_SPBCGS(SUNLinearSolver S) free(S); S = NULL; return(SUNLS_SUCCESS); } - - -int SUNLinSolSetInfoFile_SPBCGS(SUNLinearSolver S, - FILE* info_file) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - SPBCGS_CONTENT(S)->info_file = info_file; - - return(SUNLS_SUCCESS); -} - - -int SUNLinSolSetPrintLevel_SPBCGS(SUNLinearSolver S, - int print_level) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - /* check for valid print level */ - if (print_level < 0 || print_level > 1) - return(SUNLS_ILL_INPUT); - - SPBCGS_CONTENT(S)->print_level = print_level; - - return(SUNLS_SUCCESS); -} diff --git a/src/sunlinsol/spfgmr/fmod/fsunlinsol_spfgmr_mod.c b/src/sunlinsol/spfgmr/fmod/fsunlinsol_spfgmr_mod.c index 8332d7967a..69904ab23d 100644 --- a/src/sunlinsol/spfgmr/fmod/fsunlinsol_spfgmr_mod.c +++ b/src/sunlinsol/spfgmr/fmod/fsunlinsol_spfgmr_mod.c @@ -478,32 +478,4 @@ SWIGEXPORT int _wrap_FSUNLinSolFree_SPFGMR(SUNLinearSolver farg1) { } -SWIGEXPORT int _wrap_FSUNLinSolSetInfoFile_SPFGMR(SUNLinearSolver farg1, void *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (FILE *)(farg2); - result = (int)SUNLinSolSetInfoFile_SPFGMR(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FSUNLinSolSetPrintLevel_SPFGMR(SUNLinearSolver farg1, int const *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - int arg2 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (int)(*farg2); - result = (int)SUNLinSolSetPrintLevel_SPFGMR(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - diff --git a/src/sunlinsol/spfgmr/fmod/fsunlinsol_spfgmr_mod.f90 b/src/sunlinsol/spfgmr/fmod/fsunlinsol_spfgmr_mod.f90 index f62b8e6dd8..c6ed64bf5b 100644 --- a/src/sunlinsol/spfgmr/fmod/fsunlinsol_spfgmr_mod.f90 +++ b/src/sunlinsol/spfgmr/fmod/fsunlinsol_spfgmr_mod.f90 @@ -55,8 +55,6 @@ module fsunlinsol_spfgmr_mod public :: FSUNLinSolLastFlag_SPFGMR public :: FSUNLinSolSpace_SPFGMR public :: FSUNLinSolFree_SPFGMR - public :: FSUNLinSolSetInfoFile_SPFGMR - public :: FSUNLinSolSetPrintLevel_SPFGMR ! WRAPPER DECLARATIONS interface @@ -233,24 +231,6 @@ function swigc_FSUNLinSolFree_SPFGMR(farg1) & integer(C_INT) :: fresult end function -function swigc_FSUNLinSolSetInfoFile_SPFGMR(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetInfoFile_SPFGMR") & -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_FSUNLinSolSetPrintLevel_SPFGMR(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetPrintLevel_SPFGMR") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -integer(C_INT) :: fresult -end function - end interface @@ -566,37 +546,5 @@ function FSUNLinSolFree_SPFGMR(s) & swig_result = fresult end function -function FSUNLinSolSetInfoFile_SPFGMR(ls, info_file) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -type(C_PTR) :: info_file -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = c_loc(ls) -farg2 = info_file -fresult = swigc_FSUNLinSolSetInfoFile_SPFGMR(farg1, farg2) -swig_result = fresult -end function - -function FSUNLinSolSetPrintLevel_SPFGMR(ls, print_level) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -integer(C_INT), intent(in) :: print_level -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = c_loc(ls) -farg2 = print_level -fresult = swigc_FSUNLinSolSetPrintLevel_SPFGMR(farg1, farg2) -swig_result = fresult -end function - end module diff --git a/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c b/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c index 23ce66f615..ef5e759eee 100644 --- a/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c +++ b/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c @@ -818,34 +818,3 @@ int SUNLinSolFree_SPFGMR(SUNLinearSolver S) free(S); S = NULL; return(SUNLS_SUCCESS); } - - -int SUNLinSolSetInfoFile_SPFGMR(SUNLinearSolver S, - FILE* info_file) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - SPFGMR_CONTENT(S)->info_file = info_file; - - return(SUNLS_SUCCESS); -} - - -int SUNLinSolSetPrintLevel_SPFGMR(SUNLinearSolver S, - int print_level) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - /* check for valid print level */ - if (print_level < 0 || print_level > 1) - return(SUNLS_ILL_INPUT); - - SPFGMR_CONTENT(S)->print_level = print_level; - - return(SUNLS_SUCCESS); -} - diff --git a/src/sunlinsol/spgmr/fmod/fsunlinsol_spgmr_mod.c b/src/sunlinsol/spgmr/fmod/fsunlinsol_spgmr_mod.c index eec1e72e4a..eaa89837b1 100644 --- a/src/sunlinsol/spgmr/fmod/fsunlinsol_spgmr_mod.c +++ b/src/sunlinsol/spgmr/fmod/fsunlinsol_spgmr_mod.c @@ -478,32 +478,4 @@ SWIGEXPORT int _wrap_FSUNLinSolFree_SPGMR(SUNLinearSolver farg1) { } -SWIGEXPORT int _wrap_FSUNLinSolSetInfoFile_SPGMR(SUNLinearSolver farg1, void *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (FILE *)(farg2); - result = (int)SUNLinSolSetInfoFile_SPGMR(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FSUNLinSolSetPrintLevel_SPGMR(SUNLinearSolver farg1, int const *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - int arg2 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (int)(*farg2); - result = (int)SUNLinSolSetPrintLevel_SPGMR(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - diff --git a/src/sunlinsol/spgmr/fmod/fsunlinsol_spgmr_mod.f90 b/src/sunlinsol/spgmr/fmod/fsunlinsol_spgmr_mod.f90 index d185bd8d43..77873a000a 100644 --- a/src/sunlinsol/spgmr/fmod/fsunlinsol_spgmr_mod.f90 +++ b/src/sunlinsol/spgmr/fmod/fsunlinsol_spgmr_mod.f90 @@ -55,8 +55,6 @@ module fsunlinsol_spgmr_mod public :: FSUNLinSolLastFlag_SPGMR public :: FSUNLinSolSpace_SPGMR public :: FSUNLinSolFree_SPGMR - public :: FSUNLinSolSetInfoFile_SPGMR - public :: FSUNLinSolSetPrintLevel_SPGMR ! WRAPPER DECLARATIONS interface @@ -233,24 +231,6 @@ function swigc_FSUNLinSolFree_SPGMR(farg1) & integer(C_INT) :: fresult end function -function swigc_FSUNLinSolSetInfoFile_SPGMR(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetInfoFile_SPGMR") & -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_FSUNLinSolSetPrintLevel_SPGMR(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetPrintLevel_SPGMR") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -integer(C_INT) :: fresult -end function - end interface @@ -566,37 +546,5 @@ function FSUNLinSolFree_SPGMR(s) & swig_result = fresult end function -function FSUNLinSolSetInfoFile_SPGMR(ls, info_file) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -type(C_PTR) :: info_file -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = c_loc(ls) -farg2 = info_file -fresult = swigc_FSUNLinSolSetInfoFile_SPGMR(farg1, farg2) -swig_result = fresult -end function - -function FSUNLinSolSetPrintLevel_SPGMR(ls, print_level) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -integer(C_INT), intent(in) :: print_level -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = c_loc(ls) -farg2 = print_level -fresult = swigc_FSUNLinSolSetPrintLevel_SPGMR(farg1, farg2) -swig_result = fresult -end function - end module diff --git a/src/sunlinsol/spgmr/sunlinsol_spgmr.c b/src/sunlinsol/spgmr/sunlinsol_spgmr.c index 3aa0934c13..4922c71740 100644 --- a/src/sunlinsol/spgmr/sunlinsol_spgmr.c +++ b/src/sunlinsol/spgmr/sunlinsol_spgmr.c @@ -867,33 +867,3 @@ int SUNLinSolFree_SPGMR(SUNLinearSolver S) free(S); S = NULL; return(SUNLS_SUCCESS); } - - -int SUNLinSolSetInfoFile_SPGMR(SUNLinearSolver S, - FILE* info_file) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - SPGMR_CONTENT(S)->info_file = info_file; - - return(SUNLS_SUCCESS); -} - - -int SUNLinSolSetPrintLevel_SPGMR(SUNLinearSolver S, - int print_level) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - /* check for valid print level */ - if (print_level < 0 || print_level > 1) - return(SUNLS_ILL_INPUT); - - SPGMR_CONTENT(S)->print_level = print_level; - - return(SUNLS_SUCCESS); -} diff --git a/src/sunlinsol/sptfqmr/fmod/fsunlinsol_sptfqmr_mod.c b/src/sunlinsol/sptfqmr/fmod/fsunlinsol_sptfqmr_mod.c index ebc9c85d8b..9a46dee3a2 100644 --- a/src/sunlinsol/sptfqmr/fmod/fsunlinsol_sptfqmr_mod.c +++ b/src/sunlinsol/sptfqmr/fmod/fsunlinsol_sptfqmr_mod.c @@ -464,32 +464,4 @@ SWIGEXPORT int _wrap_FSUNLinSolFree_SPTFQMR(SUNLinearSolver farg1) { } -SWIGEXPORT int _wrap_FSUNLinSolSetInfoFile_SPTFQMR(SUNLinearSolver farg1, void *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (FILE *)(farg2); - result = (int)SUNLinSolSetInfoFile_SPTFQMR(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FSUNLinSolSetPrintLevel_SPTFQMR(SUNLinearSolver farg1, int const *farg2) { - int fresult ; - SUNLinearSolver arg1 = (SUNLinearSolver) 0 ; - int arg2 ; - int result; - - arg1 = (SUNLinearSolver)(farg1); - arg2 = (int)(*farg2); - result = (int)SUNLinSolSetPrintLevel_SPTFQMR(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - diff --git a/src/sunlinsol/sptfqmr/fmod/fsunlinsol_sptfqmr_mod.f90 b/src/sunlinsol/sptfqmr/fmod/fsunlinsol_sptfqmr_mod.f90 index 5f3b43ecf2..c4d9abe539 100644 --- a/src/sunlinsol/sptfqmr/fmod/fsunlinsol_sptfqmr_mod.f90 +++ b/src/sunlinsol/sptfqmr/fmod/fsunlinsol_sptfqmr_mod.f90 @@ -53,8 +53,6 @@ module fsunlinsol_sptfqmr_mod public :: FSUNLinSolLastFlag_SPTFQMR public :: FSUNLinSolSpace_SPTFQMR public :: FSUNLinSolFree_SPTFQMR - public :: FSUNLinSolSetInfoFile_SPTFQMR - public :: FSUNLinSolSetPrintLevel_SPTFQMR ! WRAPPER DECLARATIONS interface @@ -222,24 +220,6 @@ function swigc_FSUNLinSolFree_SPTFQMR(farg1) & integer(C_INT) :: fresult end function -function swigc_FSUNLinSolSetInfoFile_SPTFQMR(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetInfoFile_SPTFQMR") & -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_FSUNLinSolSetPrintLevel_SPTFQMR(farg1, farg2) & -bind(C, name="_wrap_FSUNLinSolSetPrintLevel_SPTFQMR") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -integer(C_INT) :: fresult -end function - end interface @@ -539,37 +519,5 @@ function FSUNLinSolFree_SPTFQMR(s) & swig_result = fresult end function -function FSUNLinSolSetInfoFile_SPTFQMR(ls, info_file) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -type(C_PTR) :: info_file -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = c_loc(ls) -farg2 = info_file -fresult = swigc_FSUNLinSolSetInfoFile_SPTFQMR(farg1, farg2) -swig_result = fresult -end function - -function FSUNLinSolSetPrintLevel_SPTFQMR(ls, print_level) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNLinearSolver), target, intent(inout) :: ls -integer(C_INT), intent(in) :: print_level -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = c_loc(ls) -farg2 = print_level -fresult = swigc_FSUNLinSolSetPrintLevel_SPTFQMR(farg1, farg2) -swig_result = fresult -end function - end module diff --git a/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c b/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c index 47c6544819..4a5c5e6c8d 100644 --- a/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c +++ b/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c @@ -906,33 +906,3 @@ int SUNLinSolFree_SPTFQMR(SUNLinearSolver S) free(S); S = NULL; return(SUNLS_SUCCESS); } - - -int SUNLinSolSetInfoFile_SPTFQMR(SUNLinearSolver S, - FILE* info_file) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - SPTFQMR_CONTENT(S)->info_file = info_file; - - return(SUNLS_SUCCESS); -} - - -int SUNLinSolSetPrintLevel_SPTFQMR(SUNLinearSolver S, - int print_level) -{ - /* check that the linear solver is non-null */ - if (S == NULL) - return(SUNLS_MEM_NULL); - - /* check for valid print level */ - if (print_level < 0 || print_level > 1) - return(SUNLS_ILL_INPUT); - - SPTFQMR_CONTENT(S)->print_level = print_level; - - return(SUNLS_SUCCESS); -} diff --git a/src/sunnonlinsol/fixedpoint/fmod/fsunnonlinsol_fixedpoint_mod.c b/src/sunnonlinsol/fixedpoint/fmod/fsunnonlinsol_fixedpoint_mod.c index 905b285380..3afafbe18c 100644 --- a/src/sunnonlinsol/fixedpoint/fmod/fsunnonlinsol_fixedpoint_mod.c +++ b/src/sunnonlinsol/fixedpoint/fmod/fsunnonlinsol_fixedpoint_mod.c @@ -416,32 +416,4 @@ SWIGEXPORT int _wrap_FSUNNonlinSolGetSysFn_FixedPoint(SUNNonlinearSolver farg1, } -SWIGEXPORT int _wrap_FSUNNonlinSolSetInfoFile_FixedPoint(SUNNonlinearSolver farg1, void *farg2) { - int fresult ; - SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (SUNNonlinearSolver)(farg1); - arg2 = (FILE *)(farg2); - result = (int)SUNNonlinSolSetInfoFile_FixedPoint(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FSUNNonlinSolSetPrintLevel_FixedPoint(SUNNonlinearSolver farg1, int const *farg2) { - int fresult ; - SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ; - int arg2 ; - int result; - - arg1 = (SUNNonlinearSolver)(farg1); - arg2 = (int)(*farg2); - result = (int)SUNNonlinSolSetPrintLevel_FixedPoint(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - diff --git a/src/sunnonlinsol/fixedpoint/fmod/fsunnonlinsol_fixedpoint_mod.f90 b/src/sunnonlinsol/fixedpoint/fmod/fsunnonlinsol_fixedpoint_mod.f90 index 4b7cf6dfcb..a1b693a285 100644 --- a/src/sunnonlinsol/fixedpoint/fmod/fsunnonlinsol_fixedpoint_mod.f90 +++ b/src/sunnonlinsol/fixedpoint/fmod/fsunnonlinsol_fixedpoint_mod.f90 @@ -45,8 +45,6 @@ module fsunnonlinsol_fixedpoint_mod public :: FSUNNonlinSolGetCurIter_FixedPoint public :: FSUNNonlinSolGetNumConvFails_FixedPoint public :: FSUNNonlinSolGetSysFn_FixedPoint - public :: FSUNNonlinSolSetInfoFile_FixedPoint - public :: FSUNNonlinSolSetPrintLevel_FixedPoint ! WRAPPER DECLARATIONS interface @@ -182,24 +180,6 @@ function swigc_FSUNNonlinSolGetSysFn_FixedPoint(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FSUNNonlinSolSetInfoFile_FixedPoint(farg1, farg2) & -bind(C, name="_wrap_FSUNNonlinSolSetInfoFile_FixedPoint") & -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_FSUNNonlinSolSetPrintLevel_FixedPoint(farg1, farg2) & -bind(C, name="_wrap_FSUNNonlinSolSetPrintLevel_FixedPoint") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -integer(C_INT) :: fresult -end function - end interface @@ -447,37 +427,5 @@ function FSUNNonlinSolGetSysFn_FixedPoint(nls, sysfn) & swig_result = fresult end function -function FSUNNonlinSolSetInfoFile_FixedPoint(nls, info_file) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNNonlinearSolver), target, intent(inout) :: nls -type(C_PTR) :: info_file -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = c_loc(nls) -farg2 = info_file -fresult = swigc_FSUNNonlinSolSetInfoFile_FixedPoint(farg1, farg2) -swig_result = fresult -end function - -function FSUNNonlinSolSetPrintLevel_FixedPoint(nls, print_level) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNNonlinearSolver), target, intent(inout) :: nls -integer(C_INT), intent(in) :: print_level -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = c_loc(nls) -farg2 = print_level -fresult = swigc_FSUNNonlinSolSetPrintLevel_FixedPoint(farg1, farg2) -swig_result = fresult -end function - end module diff --git a/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c b/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c index 5204d53be7..64249652b3 100644 --- a/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c +++ b/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c @@ -739,31 +739,3 @@ static void FreeContent(SUNNonlinearSolver NLS) return; } - -int SUNNonlinSolSetInfoFile_FixedPoint(SUNNonlinearSolver NLS, - FILE* info_file) -{ - /* check that the nonlinear solver is non-null */ - if (NLS == NULL) - return(SUN_NLS_MEM_NULL); - - FP_CONTENT(NLS)->info_file = info_file; - - return(SUN_NLS_SUCCESS); -} - -int SUNNonlinSolSetPrintLevel_FixedPoint(SUNNonlinearSolver NLS, - int print_level) -{ - /* check that the nonlinear solver is non-null */ - if (NLS == NULL) - return(SUN_NLS_MEM_NULL); - - /* check for valid print level */ - if (print_level < 0 || print_level > 1) - return(SUN_NLS_ILL_INPUT); - - FP_CONTENT(NLS)->print_level = print_level; - - return(SUN_NLS_SUCCESS); -} diff --git a/src/sunnonlinsol/newton/fmod/fsunnonlinsol_newton_mod.c b/src/sunnonlinsol/newton/fmod/fsunnonlinsol_newton_mod.c index ae1c387991..fc17b3040e 100644 --- a/src/sunnonlinsol/newton/fmod/fsunnonlinsol_newton_mod.c +++ b/src/sunnonlinsol/newton/fmod/fsunnonlinsol_newton_mod.c @@ -426,32 +426,4 @@ SWIGEXPORT int _wrap_FSUNNonlinSolGetSysFn_Newton(SUNNonlinearSolver farg1, void } -SWIGEXPORT int _wrap_FSUNNonlinSolSetInfoFile_Newton(SUNNonlinearSolver farg1, void *farg2) { - int fresult ; - SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ; - FILE *arg2 = (FILE *) 0 ; - int result; - - arg1 = (SUNNonlinearSolver)(farg1); - arg2 = (FILE *)(farg2); - result = (int)SUNNonlinSolSetInfoFile_Newton(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - -SWIGEXPORT int _wrap_FSUNNonlinSolSetPrintLevel_Newton(SUNNonlinearSolver farg1, int const *farg2) { - int fresult ; - SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ; - int arg2 ; - int result; - - arg1 = (SUNNonlinearSolver)(farg1); - arg2 = (int)(*farg2); - result = (int)SUNNonlinSolSetPrintLevel_Newton(arg1,arg2); - fresult = (int)(result); - return fresult; -} - - diff --git a/src/sunnonlinsol/newton/fmod/fsunnonlinsol_newton_mod.f90 b/src/sunnonlinsol/newton/fmod/fsunnonlinsol_newton_mod.f90 index 52fb84ca61..634bc969c0 100644 --- a/src/sunnonlinsol/newton/fmod/fsunnonlinsol_newton_mod.f90 +++ b/src/sunnonlinsol/newton/fmod/fsunnonlinsol_newton_mod.f90 @@ -46,8 +46,6 @@ module fsunnonlinsol_newton_mod public :: FSUNNonlinSolGetCurIter_Newton public :: FSUNNonlinSolGetNumConvFails_Newton public :: FSUNNonlinSolGetSysFn_Newton - public :: FSUNNonlinSolSetInfoFile_Newton - public :: FSUNNonlinSolSetPrintLevel_Newton ! WRAPPER DECLARATIONS interface @@ -190,24 +188,6 @@ function swigc_FSUNNonlinSolGetSysFn_Newton(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FSUNNonlinSolSetInfoFile_Newton(farg1, farg2) & -bind(C, name="_wrap_FSUNNonlinSolSetInfoFile_Newton") & -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_FSUNNonlinSolSetPrintLevel_Newton(farg1, farg2) & -bind(C, name="_wrap_FSUNNonlinSolSetPrintLevel_Newton") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT), intent(in) :: farg2 -integer(C_INT) :: fresult -end function - end interface @@ -465,37 +445,5 @@ function FSUNNonlinSolGetSysFn_Newton(nls, sysfn) & swig_result = fresult end function -function FSUNNonlinSolSetInfoFile_Newton(nls, info_file) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNNonlinearSolver), target, intent(inout) :: nls -type(C_PTR) :: info_file -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -type(C_PTR) :: farg2 - -farg1 = c_loc(nls) -farg2 = info_file -fresult = swigc_FSUNNonlinSolSetInfoFile_Newton(farg1, farg2) -swig_result = fresult -end function - -function FSUNNonlinSolSetPrintLevel_Newton(nls, print_level) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(SUNNonlinearSolver), target, intent(inout) :: nls -integer(C_INT), intent(in) :: print_level -integer(C_INT) :: fresult -type(C_PTR) :: farg1 -integer(C_INT) :: farg2 - -farg1 = c_loc(nls) -farg2 = print_level -fresult = swigc_FSUNNonlinSolSetPrintLevel_Newton(farg1, farg2) -swig_result = fresult -end function - end module diff --git a/src/sunnonlinsol/newton/sunnonlinsol_newton.c b/src/sunnonlinsol/newton/sunnonlinsol_newton.c index 6422b24963..75781e6018 100644 --- a/src/sunnonlinsol/newton/sunnonlinsol_newton.c +++ b/src/sunnonlinsol/newton/sunnonlinsol_newton.c @@ -499,31 +499,3 @@ int SUNNonlinSolGetSysFn_Newton(SUNNonlinearSolver NLS, SUNNonlinSolSysFn *SysFn *SysFn = NEWTON_CONTENT(NLS)->Sys; return(SUN_NLS_SUCCESS); } - -int SUNNonlinSolSetInfoFile_Newton(SUNNonlinearSolver NLS, - FILE* info_file) -{ - /* check that the nonlinear solver is non-null */ - if (NLS == NULL) - return(SUN_NLS_MEM_NULL); - - NEWTON_CONTENT(NLS)->info_file = info_file; - - return(SUN_NLS_SUCCESS); -} - -int SUNNonlinSolSetPrintLevel_Newton(SUNNonlinearSolver NLS, - int print_level) -{ - /* check that the nonlinear solver is non-null */ - if (NLS == NULL) - return(SUN_NLS_MEM_NULL); - - /* check for valid print level */ - if (print_level < 0 || print_level > 1) - return(SUN_NLS_ILL_INPUT); - - NEWTON_CONTENT(NLS)->print_level = print_level; - - return(SUN_NLS_SUCCESS); -}