diff --git a/.clang-format b/.clang-format index 35fa8341a5..c7692ae54e 100644 --- a/.clang-format +++ b/.clang-format @@ -140,7 +140,6 @@ SpacesInConditionalStatement : false SpacesInContainerLiterals : true SpacesInParentheses : false SpacesInSquareBrackets : false -SpaceBeforeSquareBrackets : false Standard : c++14 TabWidth: 2 UseCRLF : false diff --git a/.github/workflows/double-precision.yml b/.github/workflows/double-precision.yml index d8b8fbb631..31feaf3ffb 100644 --- a/.github/workflows/double-precision.yml +++ b/.github/workflows/double-precision.yml @@ -4,6 +4,12 @@ name: double precision build and test with GCC+TPLs (no GPUs) on: push: pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build_and_test: @@ -25,10 +31,18 @@ jobs: with: indexsize: ${{ matrix.indexsize }} precision: ${{ matrix.precision }} - - name: Archive files from failed build - uses: actions/upload-artifact@v2.2.4 + - name: Archive build files from failed build + uses: actions/upload-artifact@v3 if: failure() with: name: build_files path: | ${{ github.workspace }}/test/build_* + !${{ github.workspace }}/test/build_*/Testing/output + - name: Archive output files from failed build + uses: actions/upload-artifact@v3 + if: failure() + with: + name: output_files + path: | + ${{ github.workspace }}/test/build_*/Testing/ diff --git a/.github/workflows/extended-precision.yml b/.github/workflows/extended-precision.yml index 7af3fb6e76..55d75f7d5d 100644 --- a/.github/workflows/extended-precision.yml +++ b/.github/workflows/extended-precision.yml @@ -3,6 +3,12 @@ name: extended precision build and test with GCC+TPLs (no GPUs) on: pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build_and_test: @@ -24,10 +30,18 @@ jobs: with: indexsize: ${{ matrix.indexsize }} precision: ${{ matrix.precision }} - - name: Archive files from failed build - uses: actions/upload-artifact@v2.2.4 + - name: Archive build files from failed build + uses: actions/upload-artifact@v3 if: failure() with: name: build_files path: | ${{ github.workspace }}/test/build_* + !${{ github.workspace }}/test/build_*/Testing/output + - name: Archive output files from failed build + uses: actions/upload-artifact@v3 + if: failure() + with: + name: output_files + path: | + ${{ github.workspace }}/test/build_*/Testing/ diff --git a/.github/workflows/macos-latest.yml b/.github/workflows/macos-latest.yml index 9efb20d976..4d5599295e 100644 --- a/.github/workflows/macos-latest.yml +++ b/.github/workflows/macos-latest.yml @@ -2,6 +2,12 @@ name: MacOS short test on: pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) diff --git a/.github/workflows/single-precision.yml b/.github/workflows/single-precision.yml index cf5ab5f213..9a87e7f0bd 100644 --- a/.github/workflows/single-precision.yml +++ b/.github/workflows/single-precision.yml @@ -3,6 +3,12 @@ name: single precision build and test with GCC+TPLs (no GPUs) on: pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build_and_test: @@ -24,10 +30,18 @@ jobs: with: indexsize: ${{ matrix.indexsize }} precision: ${{ matrix.precision }} - - name: Archive files from failed build - uses: actions/upload-artifact@v2.2.4 + - name: Archive build files from failed build + uses: actions/upload-artifact@v3 if: failure() with: name: build_files path: | ${{ github.workspace }}/test/build_* + !${{ github.workspace }}/test/build_*/Testing/output + - name: Archive output files from failed build + uses: actions/upload-artifact@v3 + if: failure() + with: + name: output_files + path: | + ${{ github.workspace }}/test/build_*/Testing/ diff --git a/.github/workflows/spack-develop.yml b/.github/workflows/spack-develop.yml index 915e38838c..745a57df7e 100644 --- a/.github/workflows/spack-develop.yml +++ b/.github/workflows/spack-develop.yml @@ -3,10 +3,15 @@ name: spack@develop build and test with GCC+TPLs (no GPUs) on: pull_request: + merge_group: workflow_dispatch: schedule: - cron: '00 22 * * *' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build_and_test: runs-on: ubuntu-latest @@ -27,10 +32,18 @@ jobs: with: indexsize: ${{ matrix.indexsize }} precision: ${{ matrix.precision }} - - name: Archive files from failed build - uses: actions/upload-artifact@v2.2.4 + - name: Archive build files from failed build + uses: actions/upload-artifact@v3 if: failure() with: name: build_files path: | ${{ github.workspace }}/test/build_* + !${{ github.workspace }}/test/build_*/Testing/output + - name: Archive output files from failed build + uses: actions/upload-artifact@v3 + if: failure() + with: + name: output_files + path: | + ${{ github.workspace }}/test/build_*/Testing/ diff --git a/.github/workflows/ubuntu-clang-latest.yml b/.github/workflows/ubuntu-clang-latest.yml index 29da08a417..71f398d30a 100644 --- a/.github/workflows/ubuntu-clang-latest.yml +++ b/.github/workflows/ubuntu-clang-latest.yml @@ -2,6 +2,12 @@ name: Ubuntu (clang) short test on: pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index ef1fad6ee2..5289a953da 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -2,6 +2,12 @@ name: Windows (mingw) short test on: pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -21,7 +27,7 @@ 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 -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_LOGGING_LEVEL=2 -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index fee4f246d9..66489fe976 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -2,6 +2,12 @@ name: Windows short test on: pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -17,7 +23,7 @@ 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}} -DBUILD_STATIC_LIBS=OFF + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_LOGGING_LEVEL=2 -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration diff --git a/.gitlab/build_and_test.sh b/.gitlab/build_and_test.sh index 0ef3a2e9ce..cf7ab193fa 100755 --- a/.gitlab/build_and_test.sh +++ b/.gitlab/build_and_test.sh @@ -188,11 +188,23 @@ then $cmake_exe --version # configure - $cmake_exe \ - -C "${hostconfig_path}" \ - -DCMAKE_INSTALL_PREFIX=${install_dir} \ - "${project_dir}" - + if [[ "${CI_COMMIT_BRANCH}" == "main" ]] + then + # redirect caliper files to release directory + sundials_version=$(cd ${project_dir}; git describe --abbrev=0) + $cmake_exe \ + -C "${hostconfig_path}" \ + -DCMAKE_INSTALL_PREFIX=${install_dir} \ + -DSUNDIALS_CALIPER_OUTPUT_DIR="${CALIPER_DIR}/Release/${hostname}/${sundials_version}" \ + "${project_dir}" + + else + $cmake_exe \ + -C "${hostconfig_path}" \ + -DCMAKE_INSTALL_PREFIX=${install_dir} \ + "${project_dir}" + fi + # build VERBOSE_BUILD=${VERBOSE_BUILD:-"OFF"} if [[ "${VERBOSE_BUILD}" == "ON" ]]; then diff --git a/.gitlab/lassen-jobs.yml b/.gitlab/lassen-jobs.yml index 92362a3d2a..1ffca71d46 100644 --- a/.gitlab/lassen-jobs.yml +++ b/.gitlab/lassen-jobs.yml @@ -38,7 +38,8 @@ lassen_gcc_cuda_bench: matrix: - COMPILER_SPEC: gcc@8.3.1 CUDA_SPEC: [cuda@11.8.0] + CALIPER_DIR: /usr/workspace/sundials/califiles variables: - SPEC: "%${COMPILER_SPEC} cstd=99 cxxstd=14 build_type=Release precision=double scheduler=lsf caliper-dir=/usr/workspace/sundials/califiles ~int64 +benchmarks+profiling+caliper+adiak+mpi+openmp+cuda+raja cuda_arch=70 ^raja+cuda~openmp~examples~exercises cuda_arch=70 ^caliper+adiak+cuda cuda_arch=70 ^${CUDA_SPEC}+allow-unsupported-compilers" + SPEC: "%${COMPILER_SPEC} cstd=99 cxxstd=14 build_type=Release precision=double scheduler=lsf caliper-dir=${CALIPER_DIR} ~int64 +benchmarks+profiling+caliper+adiak+mpi+openmp+cuda+raja cuda_arch=70 ^raja+cuda~openmp~examples~exercises cuda_arch=70 ^caliper+adiak+cuda cuda_arch=70 ^${CUDA_SPEC}+allow-unsupported-compilers" extends: .lassen_build_and_bench diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7332c6d972..162f9eb490 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,6 +10,8 @@ build: os: ubuntu-20.04 tools: python: "3.9" + apt_packages: + - graphviz # Build documentation in the doc/ directory with Sphinx sphinx: diff --git a/CHANGELOG.md b/CHANGELOG.md index 17333cb454..14cdf52f02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,71 @@ # SUNDIALS Changelog +## Changes to SUNDIALS in release 6.7.0 + +Added the `SUNAdaptController` base class, ported ARKODE's internal +implementations of time step controllers into implementations of this class, +and updated ARKODE to use these objects instead of its own implementations. +Added `ARKStepSetAdaptController` and `ERKStepSetAdaptController` routines +so that users can modify controller parameters, or even provide custom +implementations. + +Added the routines `ARKStepSetAdaptivityAdjustment` and +`ERKStepSetAdaptivityAdjustment`, that allow users to adjust the +value for the method order supplied to the temporal adaptivity controllers. +The ARKODE default for this adjustment has been -1 since its initial +release, but for some applications a value of 0 is more appropriate. +Users who notice that their simulations encounter a large number of +temporal error test failures may want to experiment with adjusting this value. + +Added the third order ERK method `ARKODE_SHU_OSHER_3_2_3`, the fourth order +ERK method `ARKODE_SOFRONIOU_SPALETTA_5_3_4`, the sixth order ERK method +`ARKODE_VERNER_9_5_6`, the seventh order ERK method `ARKODE_VERNER_10_6_7`, +the eighth order ERK method `ARKODE_VERNER_13_7_8`, and the ninth order ERK +method `ARKODE_VERNER_16_8_9`. + +ARKStep, ERKStep, MRIStep, and SPRKStep were updated to remove a potentially +unnecessary right-hand side evaluation at the end of an integration. ARKStep was +additionally updated to remove extra right-hand side evaluations when using an +explicit method or an implicit method with an explicit first stage. + +Added Fortran support for the LAPACK dense `SUNLinearSolver` implementation. + +Improved computational complexity of `SUNMatScaleAddI_Sparse` from `O(M*N)` to +`O(NNZ)`. + +Changed the `SUNProfiler` so that it does not rely on `MPI_WTime` in any case. +This fixes [GitHub Issue #312](https://github.com/LLNL/sundials/issues/312). + +Fixed a regression introduced by the stop time bug fix in v6.6.1 where ARKODE, +CVODE, CVODES, IDA, and IDAS would return at the stop time rather than the +requested output time if the stop time was reached in the same step in which the +output time was passed. + +Fixed a bug in ERKStep where methods with `c[s-1] = 1` but `a[s-1,j] != b[j]` +were incorrectly treated as having the first same as last (FSAL) property. + +Fixed a bug in ARKODE where `ARKStepSetInterpolateStopTime` would return an +interpolated solution at the stop time in some cases when interpolation was +disabled. + +Fixed a bug in `MRIStepCoupling_Write` where explicit coupling tables were not +written to the output file pointer. + +Fixed a bug in `ARKStepSetTableNum` wherein it did not recognize +`ARKODE_ARK2_ERK_3_1_2` and `ARKODE_ARK2_DIRK_3_1_2` as a valid additive +Runge--Kutta Butcher table pair. + +The `MRIStepInnerStepper` class in MRIStep was updated to make supplying an +`MRIStepInnerFullRhsFn` optional. + +Fixed scaling bug in `SUNMatScaleAddI_Sparse` for non-square matrices. + +Fixed missing soversions in some `SUNLinearSolver` and `SUNNonlinearSolver` +CMake targets. + +Renamed some internal types in CVODES and IDAS to allow both packages to be +built together in the same binary. + ## Changes to SUNDIALS in release 6.6.2 Fixed the build system support for MAGMA when using a NVIDIA HPC SDK installation of CUDA @@ -14,8 +80,9 @@ object. Fixed a bug in ARKODE, CVODE, CVODES, IDA, and IDAS where the stop time may not be cleared when using normal mode if the requested output time is the same as -the stop time. Additionally, with ARKODE, CVODE, and CVODES an unnecessary -interpolation of the solution at the stop time may occur in this case. +the stop time. Additionally, with ARKODE, CVODE, and CVODES this fix removes an +unnecessary interpolation of the solution at the stop time that could occur in +this case. ## Changes to SUNDIALS in release 6.6.0 diff --git a/CITATIONS.md b/CITATIONS.md index ef2fcbbff9..60a3dc3d59 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -66,7 +66,7 @@ they are using rather than the combined SUNDIALS online guide: author = {Daniel R. Reynolds and David J. Gardner and Carol S. Woodward and Cody J. Balos}, title = {User Documentation for ARKODE}, year = {2023}, - note = {v5.6.2} + note = {v5.7.0} } ``` @@ -75,7 +75,7 @@ they are using rather than the combined SUNDIALS online guide: author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, title = {User Documentation for CVODE}, year = {2023}, - note = {v6.6.2} + note = {v6.7.0} } ``` @@ -84,7 +84,7 @@ they are using rather than the combined SUNDIALS online guide: author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, title = {User Documentation for CVODES}, year = {2023}, - note = {v6.6.2} + note = {v6.7.0} } ``` @@ -93,7 +93,7 @@ they are using rather than the combined SUNDIALS online guide: author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, title = {User Documentation for IDA}, year = {2023}, - note = {v6.6.2} + note = {v6.7.0} } ``` @@ -102,7 +102,7 @@ they are using rather than the combined SUNDIALS online guide: author = {Radu Serban and Cosmin Petra and Alan C. Hindmarsh and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, title = {User Documentation for IDAS}, year = {2023}, - note = {v5.6.2} + note = {v5.7.0} } ``` @@ -111,6 +111,6 @@ they are using rather than the combined SUNDIALS online guide: author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, title = {User Documentation for KINSOL}, year = {2023}, - note = {v6.6.2} + note = {v6.7.0} } ``` diff --git a/CMakeLists.txt b/CMakeLists.txt index cf35f0db98..57a00a263d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ project(SUNDIALS C) # Specify the location of additional CMAKE modules set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ${PROJECT_SOURCE_DIR}/cmake/macros ${PROJECT_SOURCE_DIR}/cmake/tpl @@ -42,7 +43,7 @@ include(FindPackageHandleStandardArgs) # Set some variables with info on the SUNDIALS project set(PACKAGE_BUGREPORT "sundials-users@llnl.gov") set(PACKAGE_NAME "SUNDIALS") -set(PACKAGE_STRING "SUNDIALS 6.6.2") +set(PACKAGE_STRING "SUNDIALS 6.7.0") set(PACKAGE_TARNAME "sundials") # Set SUNDIALS version numbers @@ -51,8 +52,8 @@ message(STATUS "SUNDIALS_GIT_VERSION: ${SUNDIALS_GIT_VERSION}") # (use "" for the version label if none is needed) set(PACKAGE_VERSION_MAJOR "6") -set(PACKAGE_VERSION_MINOR "6") -set(PACKAGE_VERSION_PATCH "2") +set(PACKAGE_VERSION_MINOR "7") +set(PACKAGE_VERSION_PATCH "0") set(PACKAGE_VERSION_LABEL "") if(PACKAGE_VERSION_LABEL) @@ -67,37 +68,37 @@ endif() # Specify the VERSION and SOVERSION for shared libraries -set(arkodelib_VERSION "5.6.2") +set(arkodelib_VERSION "5.7.0") set(arkodelib_SOVERSION "5") -set(cvodelib_VERSION "6.6.2") +set(cvodelib_VERSION "6.7.0") set(cvodelib_SOVERSION "6") -set(cvodeslib_VERSION "6.6.2") +set(cvodeslib_VERSION "6.7.0") set(cvodeslib_SOVERSION "6") -set(idalib_VERSION "6.6.2") +set(idalib_VERSION "6.7.0") set(idalib_SOVERSION "6") -set(idaslib_VERSION "5.6.2") +set(idaslib_VERSION "5.7.0") set(idaslib_SOVERSION "5") -set(kinsollib_VERSION "6.6.2") +set(kinsollib_VERSION "6.7.0") set(kinsollib_SOVERSION "6") set(cpodeslib_VERSION "0.0.0") set(cpodeslib_SOVERSION "0") -set(nveclib_VERSION "6.6.2") +set(nveclib_VERSION "6.7.0") set(nveclib_SOVERSION "6") -set(sunmatrixlib_VERSION "4.6.2") +set(sunmatrixlib_VERSION "4.7.0") set(sunmatrixlib_SOVERSION "4") -set(sunlinsollib_VERSION "4.6.2") +set(sunlinsollib_VERSION "4.7.0") set(sunlinsollib_SOVERSION "4") -set(sunnonlinsollib_VERSION "3.6.2") +set(sunnonlinsollib_VERSION "3.7.0") set(sunnonlinsollib_SOVERSION "3") set(sundialslib_VERSION diff --git a/README.md b/README.md index fb3f77704d..b522dd4ff2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic equation Solvers # -### Version 6.6.2 (Nov 2023) ### +### Version 6.7.0 (Dec 2023) ### **Center for Applied Scientific Computing, Lawrence Livermore National Laboratory** diff --git a/cmake/SundialsSetupCompilers.cmake b/cmake/SundialsSetupCompilers.cmake index 3cd0c055a0..b993ec85f5 100644 --- a/cmake/SundialsSetupCompilers.cmake +++ b/cmake/SundialsSetupCompilers.cmake @@ -223,13 +223,6 @@ if(SUNDIALS_POSIX_TIMERS AND POSIX_TIMERS_NEED_POSIX_C_SOURCE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=${SUNDIALS_POSIX_C_SOURCE}") endif() -# Check if profiling is being built with no timers. -if(SUNDIALS_BUILD_WITH_PROFILING AND - (NOT ENABLE_CALIPER) AND - (NOT ENABLE_MPI) AND - (NOT SUNDIALS_POSIX_TIMERS)) - message(SEND_ERROR "The SUNDIALS native profiler requires POSIX timers or MPI_Wtime, but neither were found.") -endif() # --------------------------------------------------------------- # Check for deprecated attribute with message diff --git a/cmake/macros/SundialsAddExamplesGinkgo.cmake b/cmake/macros/SundialsAddExamplesGinkgo.cmake index 1e56b34230..7fc5ef2d5f 100644 --- a/cmake/macros/SundialsAddExamplesGinkgo.cmake +++ b/cmake/macros/SundialsAddExamplesGinkgo.cmake @@ -63,6 +63,8 @@ macro(sundials_add_examples_ginkgo EXAMPLES_VAR) elseif(backend MATCHES "HIP") set_source_files_properties(${example} PROPERTIES LANGUAGE CXX) set(vector nvechip) + elseif(backend MATCHES "DPCPP") + set(vector nvecsycl) elseif(backend MATCHES "OMP") set(vector nvecopenmp) elseif(backend MATCHES "REF") diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index 96d71765ec..2717e66bf8 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -152,6 +152,8 @@ macro(sundials_add_library target) # create the target for the object library add_library(${obj_target} OBJECT ${sources}) + set_target_properties(${obj_target} PROPERTIES FOLDER "obj") + # add all object libraries to object library if(sundials_add_library_OBJECT_LIBRARIES) target_link_libraries(${obj_target} @@ -174,6 +176,15 @@ macro(sundials_add_library target) target_link_libraries(${obj_target} ${_all_libs}) endif() + if(SUNDIALS_BUILD_WITH_PROFILING) + if(ENABLE_CALIPER) + target_link_libraries(${obj_target} PUBLIC caliper) + endif() + if(ENABLE_ADIAK) + target_link_libraries(${obj_target} PUBLIC adiak::adiak ${CMAKE_DL_LIBS}) + endif() + endif() + # add includes to object library target_include_directories(${obj_target} PUBLIC @@ -229,6 +240,8 @@ macro(sundials_add_library target) add_library(${_actual_target_name} ${_libtype} $) + set_target_properties(${_actual_target_name} PROPERTIES FOLDER "src") + # add any object library dependencies if(sundials_add_library_OBJECT_LIBRARIES) if(${_libtype} MATCHES "STATIC") diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000000..3fe743f033 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,10 @@ +# SUNDIALS Documentation + +The SUNDIALS documentation is written using reStructuredText and +[Sphinx](https://www.sphinx-doc.org/). + +To build the documentation with Sphinx you will need Python 3.9+. Sphinx and the +necessary extensions can be installed using the requirements file i.e., +`pip install -r requirements.txt`. Additionally, building the developer +documentation requires [Graphviz](https://graphviz.org/) for generating +flowcharts. diff --git a/doc/arkode/examples/source/index.rst b/doc/arkode/examples/source/index.rst index d5970d14d8..c98fa9dcc4 100644 --- a/doc/arkode/examples/source/index.rst +++ b/doc/arkode/examples/source/index.rst @@ -45,7 +45,7 @@ B598130 from `Lawrence Livermore National Laboratory Along with the ARKode solver, we have created a suite of example problems demonstrating its usage on applications written in C, C++ and -Fortran 77 and Fortran 90. These examples demonstrate a large variety +Fortran. These examples demonstrate a large variety of ARKode solver options, including explicit, implicit and ImEx solvers, root-finding, Newton and fixed-point nonlinear solvers, direct and iterative linear solvers, adaptive resize capabilities, and @@ -60,8 +60,7 @@ The following tables summarize the salient features of each of the example problems in this document. Each example is designed to be relatively self-contained, so that you need only study and/or emulate the problem that is most closely related to your own. We group these -examples according to programming language (C, C++, Fortran 77, -Fortran 90). +examples according to programming language (C, C++, Fortran). ARKode example problems written in C are summarized in the table @@ -106,35 +105,36 @@ Problem Integrator Nonlinear Linear Size Extras ======================= ========== =========== ====== ============= ================================= -ARKode example problems written in Fortran 77 are summarized in the table -below, and are further described in the chapters :ref:`serial_f77` and -:ref:`parallel_f77`. +.. + ARKode example problems written in Fortran 77 are summarized in the table + below, and are further described in the chapters :ref:`serial_f77` and + :ref:`parallel_f77`. -.. cssclass:: table-bordered + .. cssclass:: table-bordered -========================== ========== =========== ====== ============= ================================= -Problem Integrator Nonlinear Linear Size Extras -========================== ========== =========== ====== ============= ================================= -:ref:`fark_diurnal_kry_bp` DIRK Newton SPGMR 10 banded preconditioner -:ref:`fark_roberts_dnsL` DIRK Newton Dense 3 LAPACK dense solver, rootfinding -:ref:`fark_diag_kry_bbd_p` DIRK Newton SPGMR 10*NProcs parallel BBD preconditioner -:ref:`fark_diag_non_p` ERK N.A. N.A. 10*NProcs parallel -========================== ========== =========== ====== ============= ================================= + ========================== ========== =========== ====== ============= ================================= + Problem Integrator Nonlinear Linear Size Extras + ========================== ========== =========== ====== ============= ================================= + :ref:`fark_diurnal_kry_bp` DIRK Newton SPGMR 10 banded preconditioner + :ref:`fark_roberts_dnsL` DIRK Newton Dense 3 LAPACK dense solver, rootfinding + :ref:`fark_diag_kry_bbd_p` DIRK Newton SPGMR 10*NProcs parallel BBD preconditioner + :ref:`fark_diag_non_p` ERK N.A. N.A. 10*NProcs parallel + ========================== ========== =========== ====== ============= ================================= -ARKode example problems written in Fortran 90 are summarized in the table -below, and are further described in the chapters :ref:`serial_f90` and -:ref:`parallel_f90`. + ARKode example problems written in Fortran 90 are summarized in the table + below, and are further described in the chapters :ref:`serial_f90` and + :ref:`parallel_f90`. -.. cssclass:: table-bordered + .. cssclass:: table-bordered -========================== ========== ========= ====== ============= =============================================== -Problem Integrator Nonlinear Linear Size Extras -========================== ========== ========= ====== ============= =============================================== -:ref:`ark_bruss` ARK Newton Dense 3 -:ref:`ark_bruss1D_FEM_klu` DIRK Newton KLU 3N finite-element, :math:`M\ne I`, sparse matrices -:ref:`fark_heat2D` DIRK Newton PCG :math:`nx*ny` parallel -========================== ========== ========= ====== ============= =============================================== + ========================== ========== ========= ====== ============= =============================================== + Problem Integrator Nonlinear Linear Size Extras + ========================== ========== ========= ====== ============= =============================================== + :ref:`ark_bruss` ARK Newton Dense 3 + :ref:`ark_bruss1D_FEM_klu` DIRK Newton KLU 3N finite-element, :math:`M\ne I`, sparse matrices + :ref:`fark_heat2D` DIRK Newton PCG :math:`nx*ny` parallel + ========================== ========== ========= ====== ============= =============================================== @@ -154,14 +154,14 @@ Problem Integrator Nonlinear Linear Size Extras c_parhyp cpp_serial cpp_parallel - f77_serial - f77_parallel - f90_serial - f90_parallel - References - + References +.. + Remove F77 interface examples + f77_serial + f77_parallel + f90_serial + f90_parallel + .. only:: html * :ref:`search` - - diff --git a/doc/arkode/guide/source/ARKodeButcherTable.rst b/doc/arkode/guide/source/ARKodeButcherTable.rst index 8e6ea6acbc..9cb67a32a6 100644 --- a/doc/arkode/guide/source/ARKodeButcherTable.rst +++ b/doc/arkode/guide/source/ARKodeButcherTable.rst @@ -76,33 +76,35 @@ ARKodeButcherTable functions .. _ARKodeButcherTable.FunctionsTable: .. table:: ARKodeButcherTable functions - +----------------------------------------------+------------------------------------------------------------+ - | **Function name** | **Description** | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_LoadERK()` | Retrieve a given explicit Butcher table by its unique ID | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_LoadERKByName()` | Retrieve a given explicit Butcher table by its unique name | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_LoadDIRK()` | Retrieve a given implicit Butcher table by its unique ID | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_LoadDIRKByName()`| Retrieve a given implicit Butcher table by its unique name | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Alloc()` | Allocate an empty Butcher table | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Create()` | Create a new Butcher table | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Copy()` | Create a copy of a Butcher table | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Space()` | Get the Butcher table real and integer workspace size | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Free()` | Deallocate a Butcher table | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_Write()` | Write the Butcher table to an output file | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_CheckOrder()` | Check the order of a Butcher table | - +----------------------------------------------+------------------------------------------------------------+ - | :c:func:`ARKodeButcherTable_CheckARKOrder()` | Check the order of an ARK pair of Butcher tables | - +----------------------------------------------+------------------------------------------------------------+ + +--------------------------------------------------+------------------------------------------------------------+ + | **Function name** | **Description** | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_LoadERK()` | Retrieve a given explicit Butcher table by its unique ID | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_LoadERKByName()` | Retrieve a given explicit Butcher table by its unique name | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_LoadDIRK()` | Retrieve a given implicit Butcher table by its unique ID | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_LoadDIRKByName()` | Retrieve a given implicit Butcher table by its unique name | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Alloc()` | Allocate an empty Butcher table | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Create()` | Create a new Butcher table | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Copy()` | Create a copy of a Butcher table | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Space()` | Get the Butcher table real and integer workspace size | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Free()` | Deallocate a Butcher table | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_Write()` | Write the Butcher table to an output file | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_IsStifflyAccurate()` | Determine if ``A[stages - 1][i] == b[i]`` | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_CheckOrder()` | Check the order of a Butcher table | + +--------------------------------------------------+------------------------------------------------------------+ + | :c:func:`ARKodeButcherTable_CheckARKOrder()` | Check the order of an ARK pair of Butcher tables | + +--------------------------------------------------+------------------------------------------------------------+ .. c:function:: ARKodeButcherTable ARKodeButcherTable_LoadERK(ARKODE_ERKTableID emethod) @@ -252,6 +254,19 @@ ARKodeButcherTable functions The *outfile* argument can be ``stdout`` or ``stderr``, or it may point to a specific file created using ``fopen``. +.. c:function:: void ARKodeButcherTable_IsStifflyAccurate(ARKodeButcherTable B) + + Determine if the table satisfies ``A[stages - 1][i] == b[i]`` + + **Arguments:** + * *B* -- the Butcher table. + + **Returns** + * ``SUNTRUE`` if the method is "stiffly accurate", otherwise returns + ``SUNFALSE`` + + .. versionadded:: v5.7.0 + .. c:function:: int ARKodeButcherTable_CheckOrder(ARKodeButcherTable B, int* q, int* p, FILE* outfile) Determine the analytic order of accuracy for the specified Butcher diff --git a/doc/arkode/guide/source/Butcher.rst b/doc/arkode/guide/source/Butcher.rst index 73f4028e04..31193f395e 100644 --- a/doc/arkode/guide/source/Butcher.rst +++ b/doc/arkode/guide/source/Butcher.rst @@ -297,6 +297,39 @@ method from :cite:p:`KenCarp:03`). region is outlined in blue; the embedding's region is in red. +Shu-Osher-3-2-3 +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: Shu-Osher-3-2-3 ERK method + +Accessible via the constant ``ARKODE_SHU_OSHER_3_2_3`` to +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadERK`. +Accessible via the string ``"ARKODE_SHU_OSHER_3_2_3"`` to +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. +(from :cite:p:`ShOs:88` with embedding from :cite:p:`FCS:21`). + +.. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|ccc} + 0 & 0 & 0 & 0 \\ + 1 & 0 & 0 & 0 \\ + \frac{1}{2} & \frac{1}{4} & \frac{1}{4} & 0 \\ + \hline + 3 & \frac{1}{6} & \frac{1}{6} & \frac{2}{3} \\ + 2 & \frac{291485418878409}{1000000000000000} & \frac{291485418878409}{1000000000000000} & \frac{208514581121591}{500000000000000} + \end{array} + +.. figure:: /figs/arkode/shu_osher_erk_stab_region.png + :scale: 50 % + :align: center + + Linear stability region for the Shu-Osher method. The method's + region is outlined in blue; the embedding's region is in red. + + .. _Butcher.Knoth_Wolke: @@ -331,6 +364,44 @@ This is the default 3th order slow and fast MRIStep method (from Linear stability region for the Knoth-Wolke method +.. _Butcher.Sofroniou_Spaletta: + +Sofroniou-Spaletta-5-3-4 +^^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: Sofroniou-Spaletta-5-3-4 ERK method + +Accessible via the constant ``ARKODE_SOFRONIOU_SPALETTA_5_3_4`` to +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. +Accessible via the string ``"ARKODE_SOFRONIOU_SPALETTA_5_3_4"`` to +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. +(from :cite:p:`Sof:04`). + +.. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|ccccc} + 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{2}{5} & \frac{2}{5} & 0 & 0 & 0 & 0 \\ + \frac{3}{5} & -\frac{3}{20} & \frac{3}{4} & 0 & 0 & 0 \\ + 1 & \frac{19}{44} & -\frac{15}{44} & \frac{10}{11} & 0 & 0 \\ + 1 & \frac{11}{72} & \frac{25}{72} & \frac{25}{72} & \frac{11}{72} & 0 \\ + \hline + 4 & \frac{11}{72} & \frac{25}{72} & \frac{25}{72} & \frac{11}{72} & 0 \\ + 3 & \frac{1251515}{8970912} & \frac{3710105}{8970912} & \frac{2519695}{8970912} & \frac{61105}{8970912} & \frac{119041}{747576} \\ + \end{array} + +.. figure:: /figs/arkode/sofroniou_spaletta_erk_stab_region.png + :scale: 50 % + :align: center + + Linear stability region for the Sofroniou-Spaletta method. The method's + region is outlined in blue; the embedding's region is in red. + + + .. _Butcher.Zonneveld: @@ -430,21 +501,27 @@ Accessible via the string ``"ARKODE_ARK437L2SA_ERK_7_3_4"`` to This is the explicit portion of the 4th order additive method (the explicit portion of the ARK4(3)7L[2]SA method from :cite:p:`KenCarp:19`). -.. math:: +.. only:: html - \renewcommand{\arraystretch}{1.5} - \begin{array}{r|ccccccc} - 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{247}{1000} & \frac{247}{1000} & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{4276536705230}{10142255878289} & \frac{247}{4000} & \frac{2694949928731}{7487940209513} & 0 & 0 & 0 & 0 & 0 \\ - \frac{67}{200} & \frac{464650059369}{8764239774964} & \frac{878889893998}{2444806327765} & -\frac{952945855348}{12294611323341} & 0 & 0 & 0 & 0 \\ - \frac{3}{40} & \frac{476636172619}{8159180917465} & -\frac{1271469283451}{7793814740893} & -\frac{859560642026}{4356155882851} & \frac{1723805262919}{4571918432560} & 0 & 0 & 0 \\ - \frac{7}{10} & \frac{6338158500785}{11769362343261} & -\frac{4970555480458}{10924838743837} & \frac{3326578051521}{2647936831840} & -\frac{880713585975}{1841400956686} & -\frac{1428733748635}{8843423958496} & 0 & 0 \\ - 1 & \frac{760814592956}{3276306540349} & \frac{760814592956}{3276306540349} & -\frac{47223648122716}{6934462133451} & \frac{71187472546993}{9669769126921} & -\frac{13330509492149}{9695768672337} & \frac{11565764226357}{8513123442827} & 0 \\ - \hline - 4 & 0 & 0 & \frac{9164257142617}{17756377923965} & -\frac{10812980402763}{74029279521829} & \frac{1335994250573}{5691609445217} & \frac{2273837961795}{8368240463276} & \frac{247}{2000} \\ - 3 & 0 & 0 & \frac{4469248916618}{8635866897933} & -\frac{621260224600}{4094290005349} & \frac{696572312987}{2942599194819} & \frac{1532940081127}{5565293938103} & \frac{2441}{20000} - \end{array} + .. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|ccccccc} + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{247}{1000} & \frac{247}{1000} & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{4276536705230}{10142255878289} & \frac{247}{4000} & \frac{2694949928731}{7487940209513} & 0 & 0 & 0 & 0 & 0 \\ + \frac{67}{200} & \frac{464650059369}{8764239774964} & \frac{878889893998}{2444806327765} & -\frac{952945855348}{12294611323341} & 0 & 0 & 0 & 0 \\ + \frac{3}{40} & \frac{476636172619}{8159180917465} & -\frac{1271469283451}{7793814740893} & -\frac{859560642026}{4356155882851} & \frac{1723805262919}{4571918432560} & 0 & 0 & 0 \\ + \frac{7}{10} & \frac{6338158500785}{11769362343261} & -\frac{4970555480458}{10924838743837} & \frac{3326578051521}{2647936831840} & -\frac{880713585975}{1841400956686} & -\frac{1428733748635}{8843423958496} & 0 & 0 \\ + 1 & \frac{760814592956}{3276306540349} & \frac{760814592956}{3276306540349} & -\frac{47223648122716}{6934462133451} & \frac{71187472546993}{9669769126921} & -\frac{13330509492149}{9695768672337} & \frac{11565764226357}{8513123442827} & 0 \\ + \hline + 4 & 0 & 0 & \frac{9164257142617}{17756377923965} & -\frac{10812980402763}{74029279521829} & \frac{1335994250573}{5691609445217} & \frac{2273837961795}{8368240463276} & \frac{247}{2000} \\ + 3 & 0 & 0 & \frac{4469248916618}{8635866897933} & -\frac{621260224600}{4094290005349} & \frac{696572312987}{2942599194819} & \frac{1532940081127}{5565293938103} & \frac{2441}{20000} + \end{array} + +.. only:: latex + + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. .. figure:: /figs/arkode/stab_region_34.png :scale: 50 % @@ -639,22 +716,29 @@ Accessible via the string ``"ARKODE_ARK548L2SA_ERK_8_4_5"`` to This is the explicit portion of the default 5th order additive method (the explicit portion of the ARK5(4)8L[2]SA method from :cite:p:`KenCarp:03`). -.. math:: +.. only:: html + + .. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|cccccccc} + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{41}{100} & \frac{41}{100} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{2935347310677}{11292855782101} & \frac{367902744464}{2072280473677} & \frac{677623207551}{8224143866563} & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{1426016391358}{7196633302097} & \frac{1268023523408}{10340822734521} & 0 & \frac{1029933939417}{13636558850479} & 0 & 0 & 0 & 0 & 0 \\ + \frac{92}{100} & \frac{14463281900351}{6315353703477} & 0 & \frac{66114435211212}{5879490589093} & -\frac{54053170152839}{4284798021562} & 0 & 0 & 0 & 0 \\ + \frac{24}{100} & \frac{14090043504691}{34967701212078} & 0 & \frac{15191511035443}{11219624916014} & -\frac{18461159152457}{12425892160975} & -\frac{281667163811}{9011619295870} & 0 & 0 & 0 \\ + \frac{3}{5} & \frac{19230459214898}{13134317526959} & 0 & \frac{21275331358303}{2942455364971} & -\frac{38145345988419}{4862620318723} & -\frac{1}{8} & -\frac{1}{8} & 0 & 0 \\ + 1 & -\frac{19977161125411}{11928030595625} & 0 & -\frac{40795976796054}{6384907823539} & \frac{177454434618887}{12078138498510} & \frac{782672205425}{8267701900261} & -\frac{69563011059811}{9646580694205} & \frac{7356628210526}{4942186776405} & 0 \\ + \hline + 5 & -\frac{872700587467}{9133579230613} & 0 & 0 & \frac{22348218063261}{9555858737531} & -\frac{1143369518992}{8141816002931} & -\frac{39379526789629}{19018526304540} & \frac{32727382324388}{42900044865799} & \frac{41}{200} \\ + 4 & -\frac{975461918565}{9796059967033} & 0 & 0 & \frac{78070527104295}{32432590147079} & -\frac{548382580838}{3424219808633} & -\frac{33438840321285}{15594753105479} & \frac{3629800801594}{4656183773603} & \frac{4035322873751}{18575991585200} + \end{array} + +.. only:: latex + + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. - \renewcommand{\arraystretch}{1.5} - \begin{array}{r|cccccccc} - 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{41}{100} & \frac{41}{100} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{2935347310677}{11292855782101} & \frac{367902744464}{2072280473677} & \frac{677623207551}{8224143866563} & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{1426016391358}{7196633302097} & \frac{1268023523408}{10340822734521} & 0 & \frac{1029933939417}{13636558850479} & 0 & 0 & 0 & 0 & 0 \\ - \frac{92}{100} & \frac{14463281900351}{6315353703477} & 0 & \frac{66114435211212}{5879490589093} & -\frac{54053170152839}{4284798021562} & 0 & 0 & 0 & 0 \\ - \frac{24}{100} & \frac{14090043504691}{34967701212078} & 0 & \frac{15191511035443}{11219624916014} & -\frac{18461159152457}{12425892160975} & -\frac{281667163811}{9011619295870} & 0 & 0 & 0 \\ - \frac{3}{5} & \frac{19230459214898}{13134317526959} & 0 & \frac{21275331358303}{2942455364971} & -\frac{38145345988419}{4862620318723} & -\frac{1}{8} & -\frac{1}{8} & 0 & 0 \\ - 1 & -\frac{19977161125411}{11928030595625} & 0 & -\frac{40795976796054}{6384907823539} & \frac{177454434618887}{12078138498510} & \frac{782672205425}{8267701900261} & -\frac{69563011059811}{9646580694205} & \frac{7356628210526}{4942186776405} & 0 \\ - \hline - 5 & -\frac{872700587467}{9133579230613} & 0 & 0 & \frac{22348218063261}{9555858737531} & -\frac{1143369518992}{8141816002931} & -\frac{39379526789629}{19018526304540} & \frac{32727382324388}{42900044865799} & \frac{41}{200} \\ - 4 & -\frac{975461918565}{9796059967033} & 0 & 0 & \frac{78070527104295}{32432590147079} & -\frac{548382580838}{3424219808633} & -\frac{33438840321285}{15594753105479} & \frac{3629800801594}{4656183773603} & \frac{4035322873751}{18575991585200} - \end{array} .. figure:: /figs/arkode/stab_region_9.png :scale: 50 % @@ -684,22 +768,28 @@ Accessible via the string ``"ARKODE_ARK548L2SAb_ERK_8_4_5"`` to This is the explicit portion of the 5th order ARK5(4)8L[2]SA method from :cite:p:`KenCarp:19`. -.. math:: +.. only:: html - \renewcommand{\arraystretch}{1.5} - \begin{array}{r|cccccccc} - 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{4}{9} & \frac{4}{9} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{6456083330201}{8509243623797} & \frac{1}{9} & \frac{1183333538310}{1827251437969} & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{1632083962415}{14158861528103} & \frac{895379019517}{9750411845327} & \frac{477606656805}{13473228687314} & \frac{-112564739183}{9373365219272} & 0 & 0 & 0 & 0 & 0 \\ - \frac{6365430648612}{17842476412687} & \frac{-4458043123994}{13015289567637} & \frac{-2500665203865}{9342069639922} & \frac{983347055801}{8893519644487} & \frac{2185051477207}{2551468980502} & 0 & 0 & 0 & 0 \\ - \frac{18}{25} & \frac{-167316361917}{17121522574472} & \frac{1605541814917}{7619724128744} & \frac{991021770328}{13052792161721} & \frac{2342280609577}{11279663441611} & \frac{3012424348531}{12792462456678} & 0 & 0 & 0 \\ - \frac{191}{200} & \frac{6680998715867}{14310383562358} & \frac{5029118570809}{3897454228471} & \frac{2415062538259}{6382199904604} & \frac{-3924368632305}{6964820224454} & \frac{-4331110370267}{15021686902756} & \frac{-3944303808049}{11994238218192} & 0 & 0 \\ - 1 & \frac{2193717860234}{3570523412979} & \frac{2193717860234}{3570523412979} & \frac{5952760925747}{18750164281544} & \frac{-4412967128996}{6196664114337} & \frac{4151782504231}{36106512998704} & \frac{572599549169}{6265429158920} & \frac{-457874356192}{11306498036315} & 0 \\ - \hline - 5 & 0 & 0 & \frac{3517720773327}{20256071687669} & \frac{4569610470461}{17934693873752} & \frac{2819471173109}{11655438449929} & \frac{3296210113763}{10722700128969} & \frac{-1142099968913}{5710983926999} & \frac{2}{9} \\ - 4 & 0 & 0 & \frac{520639020421}{8300446712847} & \frac{4550235134915}{17827758688493} & \frac{1482366381361}{6201654941325} & \frac{5551607622171}{13911031047899} & \frac{-5266607656330}{36788968843917} & \frac{1074053359553}{5740751784926} - \end{array} + .. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|cccccccc} + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{4}{9} & \frac{4}{9} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{6456083330201}{8509243623797} & \frac{1}{9} & \frac{1183333538310}{1827251437969} & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{1632083962415}{14158861528103} & \frac{895379019517}{9750411845327} & \frac{477606656805}{13473228687314} & \frac{-112564739183}{9373365219272} & 0 & 0 & 0 & 0 & 0 \\ + \frac{6365430648612}{17842476412687} & \frac{-4458043123994}{13015289567637} & \frac{-2500665203865}{9342069639922} & \frac{983347055801}{8893519644487} & \frac{2185051477207}{2551468980502} & 0 & 0 & 0 & 0 \\ + \frac{18}{25} & \frac{-167316361917}{17121522574472} & \frac{1605541814917}{7619724128744} & \frac{991021770328}{13052792161721} & \frac{2342280609577}{11279663441611} & \frac{3012424348531}{12792462456678} & 0 & 0 & 0 \\ + \frac{191}{200} & \frac{6680998715867}{14310383562358} & \frac{5029118570809}{3897454228471} & \frac{2415062538259}{6382199904604} & \frac{-3924368632305}{6964820224454} & \frac{-4331110370267}{15021686902756} & \frac{-3944303808049}{11994238218192} & 0 & 0 \\ + 1 & \frac{2193717860234}{3570523412979} & \frac{2193717860234}{3570523412979} & \frac{5952760925747}{18750164281544} & \frac{-4412967128996}{6196664114337} & \frac{4151782504231}{36106512998704} & \frac{572599549169}{6265429158920} & \frac{-457874356192}{11306498036315} & 0 \\ + \hline + 5 & 0 & 0 & \frac{3517720773327}{20256071687669} & \frac{4569610470461}{17934693873752} & \frac{2819471173109}{11655438449929} & \frac{3296210113763}{10722700128969} & \frac{-1142099968913}{5710983926999} & \frac{2}{9} \\ + 4 & 0 & 0 & \frac{520639020421}{8300446712847} & \frac{4550235134915}{17827758688493} & \frac{1482366381361}{6201654941325} & \frac{5551607622171}{13911031047899} & \frac{-5266607656330}{36788968843917} & \frac{1074053359553}{5740751784926} + \end{array} + +.. only:: latex + + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. .. figure:: /figs/arkode/stab_region_35.png @@ -753,6 +843,107 @@ This is the default 6th order explicit method (from :cite:p:`Ver:78`). +.. _Butcher.Verner-6-5b: + +Verner-9-5-6 +^^^^^^^^^^^^^^ + +.. index:: Verner-9-5-6 ERK method + +Accessible via the constant ``ARKODE_VERNER_9_5_6`` to +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. +Accessible via the string ``"ARKODE_VERNER_9_5_6"`` to +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. +This is the 6th order explicit method IIIXb-6(5) from :cite:p:`Ver:10`. + +.. only:: html + + .. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|ccccccccc} + 0 & 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{3}{50} & \frac{3}{50}& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{1439}{15000} & \frac{519479}{27000000}& \frac{2070721}{27000000}& 0& 0& 0& 0& 0& 0& 0\\ + \frac{1439}{10000} & \frac{1439}{40000}& 0& \frac{4317}{40000}& 0& 0& 0& 0& 0& 0\\ + \frac{4973}{10000} & \frac{109225017611}{82828840000}& 0& -\frac{417627820623}{82828840000}& \frac{43699198143}{10353605000}& 0& 0& 0& 0& 0\\ + \frac{389}{400} & -\frac{8036815292643907349452552172369}{191934985946683241245914401600}& 0& \frac{246134619571490020064824665}{1543816496655405117602368}& -\frac{13880495956885686234074067279}{113663489566254201783474344}& \frac{755005057777788994734129}{136485922925633667082436}& 0& 0& 0& 0\\ + \frac{1999}{2000} & -\frac{1663299841566102097180506666498880934230261}{30558424506156170307020957791311384232000}& 0& \frac{130838124195285491799043628811093033}{631862949514135618861563657970240}& -\frac{3287100453856023634160618787153901962873}{20724314915376755629135711026851409200}& \frac{2771826790140332140865242520369241}{396438716042723436917079980147600}& -\frac{1799166916139193}{96743806114007800}& 0& 0& 0\\ + 1 & -\frac{832144750039369683895428386437986853923637763}{15222974550069600748763651844667619945204887}& 0& \frac{818622075710363565982285196611368750}{3936576237903728151856072395343129}& -\frac{9818985165491658464841194581385463434793741875}{61642597962658994069869370923196463581866011}& \frac{31796692141848558720425711042548134769375}{4530254033500045975557858016006308628092}& -\frac{14064542118843830075}{766928748264306853644}& -\frac{1424670304836288125}{2782839104764768088217}& 0& 0\\ + 1 & \frac{382735282417}{11129397249634}& 0& 0& \frac{5535620703125000}{21434089949505429}& \frac{13867056347656250}{32943296570459319}& \frac{626271188750}{142160006043}& -\frac{51160788125000}{289890548217}& \frac{163193540017}{946795234}& 0\\ + \hline + 6 & \frac{382735282417}{11129397249634}& 0& 0& \frac{5535620703125000}{21434089949505429}& \frac{13867056347656250}{32943296570459319}& \frac{626271188750}{142160006043}& -\frac{51160788125000}{289890548217}& \frac{163193540017}{946795234}& 0 \\ + 5 & \frac{273361583}{5567482366}& 0& 0& \frac{1964687500000}{8727630165387}& \frac{596054687500}{1269637976277}& \frac{12740367500}{15795556227}& 0& -\frac{4462730789736252634813752317}{7350663039626676022821734166}& \frac{441454562788983500}{7763730504400359099} + \end{array} + + +.. only:: latex + + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. + + + +.. figure:: /figs/arkode/v65b_erk_stab_region.png + :scale: 75 % + :align: center + + Linear stability region for the Verner-9-5-6 method. The method's + region is outlined in blue; the embedding's region is in red. + + + +.. _Butcher.Verner-7-6: + +Verner-10-6-7 +^^^^^^^^^^^^^^ + +.. index:: Verner-10-6-7 ERK method + +Accessible via the constant ``ARKODE_VERNER_10_6_7`` to +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. +Accessible via the string ``"ARKODE_VERNER_10_6_7"`` to +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. +This is the default 7th order explicit method (from :cite:p:`Ver:10`). + +.. only:: html + + .. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|cccccccccc} + 0 & 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{1}{200} & \frac{1}{200}& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{49}{450} & -\frac{4361}{4050}& \frac{2401}{2025}& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{49}{300} & \frac{49}{1200}& 0& \frac{49}{400}& 0& 0& 0& 0& 0& 0& 0\\ + \frac{911}{2000} & \frac{2454451729}{3841600000}& 0& -\frac{9433712007}{3841600000}& \frac{4364554539}{1920800000}& 0& 0& 0& 0& 0& 0\\ + \frac{3480084980}{5709648941} & -\frac{6187101755456742839167388910402379177523537620}{2324599620333464857202963610201679332423082271}& 0& \frac{27569888999279458303270493567994248533230000}{2551701010245296220859455115479340650299761}& -\frac{37368161901278864592027018689858091583238040000}{4473131870960004275166624817435284159975481033}& \frac{1392547243220807196190880383038194667840000000}{1697219131380493083996999253929006193143549863}& 0& 0& 0& 0& 0\\ + \frac{221}{250} & \frac{11272026205260557297236918526339}{1857697188743815510261537500000}& 0& -\frac{48265918242888069}{1953194276993750}& \frac{26726983360888651136155661781228}{1308381343805114800955157615625}& -\frac{2090453318815827627666994432}{1096684189897834170412307919}& \frac{1148577938985388929671582486744843844943428041509}{1141532118233823914568777901158338927629837500000}& 0& 0& 0& 0\\ + \frac{37}{40} & \frac{1304457204588839386329181466225966641}{108211771565488329642169667802016000}& 0& -\frac{1990261989751005}{40001418792832}& \frac{2392691599894847687194643439066780106875}{58155654089143548047476915856270826016}& -\frac{1870932273351008733802814881998561250}{419326053051486744762255151208232123}& \frac{1043329047173803328972823866240311074041739158858792987034783181}{510851127745017966999893975119259285040213723744255237522144000}& -\frac{311918858557595100410788125}{3171569057622789618800376448}& 0& 0& 0\\ + 1 & \frac{17579784273699839132265404100877911157}{1734023495717116205617154737841023480}& 0& -\frac{18539365951217471064750}{434776548575709731377}& \frac{447448655912568142291911830292656995992000}{12511202807447096607487664209063950964109}& -\frac{65907597316483030274308429593905808000000}{15158061430635748897861852383197382130691}& \frac{273847823027445129865693702689010278588244606493753883568739168819449761}{136252034448398939768371761610231099586032870552034688235302796640584360}& \frac{694664732797172504668206847646718750}{1991875650119463976442052358853258111}& -\frac{19705319055289176355560129234220800}{72595753317320295604316217197876507}& 0& 0\\ + 1 & -\frac{511858190895337044664743508805671}{11367030248263048398341724647960}& 0& \frac{2822037469238841750}{15064746656776439}& -\frac{23523744880286194122061074624512868000}{152723005449262599342117017051789699}& \frac{10685036369693854448650967542704000000}{575558095977344459903303055137999707}& -\frac{6259648732772142303029374363607629515525848829303541906422993}{876479353814142962817551241844706205620792843316435566420120}& \frac{17380896627486168667542032602031250}{13279937889697320236613879977356033}& 0& 0& 0\\ + \hline + 7 & \frac{96762636172307789}{2051985304794103980}& 0& 0& \frac{312188947591288252500000}{1212357694274963646019729}& \frac{13550580884964304000000000000}{51686919683339547115937980629}& \frac{72367769693133178898676076432831566019684378142853445230956642801}{475600216991873963561768100160364792981629064220601844848928537580}& \frac{1619421054120605468750}{3278200730370057108183}& -\frac{66898316144057728000}{227310933007074849597}& \frac{181081444637946577}{2226845467039736466}& 0 \\ + 6 & \frac{117807213929927}{2640907728177740}& 0& 0& \frac{4758744518816629500000}{17812069906509312711137}& \frac{1730775233574080000000000}{7863520414322158392809673}& \frac{2682653613028767167314032381891560552585218935572349997}{12258338284789875762081637252125169126464880985167722660}& \frac{40977117022675781250}{178949401077111131341}& 0& 0& \frac{2152106665253777}{106040260335225546} + \end{array} + +.. only:: latex + + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. + + +.. figure:: /figs/arkode/v76_erk_stab_region.png + :scale: 75 % + :align: center + + Linear stability region for the Verner-10-6-7 method. The method's + region is outlined in blue; the embedding's region is in red. + + + .. _Butcher.Fehlberg-8-7: Fehlberg-13-7-8 @@ -800,6 +991,117 @@ This is the default 8th order explicit method (from :cite:p:`Butcher:08`). +.. _Butcher.Verner-8-7: + +Verner-13-7-8 +^^^^^^^^^^^^^^ + +.. index:: Verner-13-7-8 ERK method + +Accessible via the constant ``ARKODE_VERNER_13_7_8`` to +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. +Accessible via the string ``"ARKODE_VERNER_13_7_8"`` to +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. +This is the 8th order explicit method IIIX-8(7) from :cite:p:`Ver:10`. + + +.. only:: html + + .. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|ccccccccccccc} + 0 & 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{1}{20} & \frac{1}{20}& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{341}{3200} & -\frac{7161}{1024000}& \frac{116281}{1024000}& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{1023}{6400} & \frac{1023}{25600}& 0& \frac{3069}{25600}& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{39}{100} & \frac{4202367}{11628100}& 0& -\frac{3899844}{2907025}& \frac{3982992}{2907025}& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{93}{200} & \frac{5611}{114400}& 0& 0& \frac{31744}{135025}& \frac{923521}{5106400}& 0& 0& 0& 0& 0& 0& 0& 0\\ + \frac{31}{200} & \frac{21173}{343200}& 0& 0& \frac{8602624}{76559175}& -\frac{26782109}{689364000}& \frac{5611}{283500}& 0& 0& 0& 0& 0& 0& 0\\ + \frac{943}{1000} & -\frac{1221101821869329}{690812928000000}& 0& 0& -\frac{125}{2}& -\frac{1024030607959889}{168929280000000}& \frac{1501408353528689}{265697280000000}& \frac{6070139212132283}{92502016000000}& 0& 0& 0& 0& 0& 0\\ + \frac{7067558016280}{7837150160667} & -\frac{1472514264486215803881384708877264246346044433307094207829051978044531801133057155}{1246894801620032001157059621643986024803301558393487900440453636168046069686436608}& 0& 0& -\frac{5172294311085668458375175655246981230039025336933699114138315270772319372469280000}{124619381004809145897278630571215298365257079410236252921850936749076487132995191}& -\frac{12070679258469254807978936441733187949484571516120469966534514296406891652614970375}{2722031154761657221710478184531100699497284085048389015085076961673446140398628096}& \frac{780125155843893641323090552530431036567795592568497182701460674803126770111481625}{183110425412731972197889874507158786859226102980861859505241443073629143100805376}& \frac{664113122959911642134782135839106469928140328160577035357155340392950009492511875}{15178465598586248136333023107295349175279765150089078301139943253016877823170816}& \frac{10332848184452015604056836767286656859124007796970668046446015775000000}{1312703550036033648073834248740727914537972028638950165249582733679393783}& 0& 0& 0& 0& 0\\ + \frac{909}{1000} & -\frac{29055573360337415088538618442231036441314060511}{22674759891089577691327962602370597632000000000}& 0& 0& -\frac{20462749524591049105403365239069}{454251913499893469596231268750}& -\frac{180269259803172281163724663224981097}{38100922558256871086579832832000000}& \frac{21127670214172802870128286992003940810655221489}{4679473877997892906145822697976708633673728000}& \frac{318607235173649312405151265849660869927653414425413}{6714716715558965303132938072935465423910912000000}& \frac{212083202434519082281842245535894}{20022426044775672563822865371173879}& -\frac{2698404929400842518721166485087129798562269848229517793703413951226714583}{469545674913934315077000442080871141884676035902717550325616728175875000000}& 0& 0& 0& 0\\ + \frac{47}{50} & -\frac{2342659845814086836951207140065609179073838476242943917}{1358480961351056777022231400139158760857532162795520000}& 0& 0& -\frac{996286030132538159613930889652}{16353068885996164905464325675}& -\frac{26053085959256534152588089363841}{4377552804565683061011299942400}& \frac{20980822345096760292224086794978105312644533925634933539}{3775889992007550803878727839115494641972212962174156800}& \frac{890722993756379186418929622095833835264322635782294899}{13921242001395112657501941955594013822830119803764736}& \frac{161021426143124178389075121929246710833125}{10997207722131034650667041364346422894371443}& \frac{300760669768102517834232497565452434946672266195876496371874262392684852243925359864884962513}{4655443337501346455585065336604505603760824779615521285751892810315680492364106674524398280000}& -\frac{31155237437111730665923206875}{392862141594230515010338956291}& 0& 0& 0\\ + 1 & -\frac{2866556991825663971778295329101033887534912787724034363}{868226711619262703011213925016143612030669233795338240}& 0& 0& -\frac{16957088714171468676387054358954754000}{143690415119654683326368228101570221}& -\frac{4583493974484572912949314673356033540575}{451957703655250747157313034270335135744}& \frac{2346305388553404258656258473446184419154740172519949575}{256726716407895402892744978301151486254183185289662464}& \frac{1657121559319846802171283690913610698586256573484808662625}{13431480411255146477259155104956093505361644432088109056}& \frac{345685379554677052215495825476969226377187500}{74771167436930077221667203179551347546362089}& -\frac{3205890962717072542791434312152727534008102774023210240571361570757249056167015230160352087048674542196011}{947569549683965814783015124451273604984657747127257615372449205973192657306017239103491074738324033259120}& \frac{40279545832706233433100438588458933210937500}{8896460842799482846916972126377338947215101}& -\frac{6122933601070769591613093993993358877250}{1050517001510235513198246721302027675953}& 0& 0\\ + 1 & -\frac{618675905535482500672800859344538410358660153899637}{203544282118214047100119475340667684874292102389760}& 0& 0& -\frac{4411194916804718600478400319122931000}{40373053902469967450761491269633019}& -\frac{16734711409449292534539422531728520225}{1801243715290088669307203927210237952}& \frac{135137519757054679098042184152749677761254751865630525}{16029587794486289597771326361911895112703716593983488}& \frac{38937568367409876012548551903492196137929710431584875}{340956454090191606099548798001469306974758443147264}& -\frac{6748865855011993037732355335815350667265625}{7002880395717424621213565406715087764770357}& -\frac{1756005520307450928195422767042525091954178296002788308926563193523662404739779789732685671}{348767814578469983605688098046186480904607278021030540735333862087061574934154942830062320}& \frac{53381024589235611084013897674181629296875}{8959357584795694524874969598508592944141}& 0& 0& 0\\ + \hline + 8 & \frac{44901867737754616851973}{1014046409980231013380680}& 0& 0& 0& 0& \frac{791638675191615279648100000}{2235604725089973126411512319}& \frac{3847749490868980348119500000}{15517045062138271618141237517}& -\frac{13734512432397741476562500000}{875132892924995907746928783}& \frac{12274765470313196878428812037740635050319234276006986398294443554969616342274215316330684448207141}{489345147493715517650385834143510934888829280686609654482896526796523353052166757299452852166040}& -\frac{9798363684577739445312500000}{308722986341456031822630699}& \frac{282035543183190840068750}{12295407629873040425991}& -\frac{306814272936976936753}{1299331183183744997286}& 0\\ + 7 & \frac{10835401739407019406577}{244521829356935137978320}& 0& 0& 0& 0& \frac{13908189778321895491375000}{39221135527894265375640567}& \frac{73487947527027243487625000}{296504045773342769773399443}& \frac{68293140641257649609375000}{15353208647806945749946119}& \frac{22060647948996678611017711379974578860522018208949721559448560203338437626022142776381}{1111542009262325874512959185795727215759010577565736079641376621381577236680929558640}& -\frac{547971229495642458203125000}{23237214025700991642563601}& 0& 0& -\frac{28735456870978964189}{79783493704265043693} + \end{array} + +.. only:: latex + + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. + + +.. figure:: /figs/arkode/v87_erk_stab_region.png + :scale: 75 % + :align: center + + Linear stability region for the Verner-13-7-8 method. The method's + region is outlined in blue; the embedding's region is in red. + + + +.. _Butcher.Verner-9-8: + +Verner-16-8-9 +^^^^^^^^^^^^^^ + +.. index:: Verner-16-8-9 ERK method + +Accessible via the constant ``ARKODE_VERNER_16_8_9`` to +:c:func:`ARKStepSetTableNum`, :c:func:`ERKStepSetTableNum` +or :c:func:`ARKodeButcherTable_LoadERK`. +Accessible via the string ``"ARKODE_VERNER_16_8_9"`` to +:c:func:`ARKStepSetTableName`, :c:func:`ERKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadERKByName`. +This is the default 9th order explicit method (from :cite:p:`Ver:10`). + + +.. only:: html + + .. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|cccccccccccccccc} + 0 & 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.03462 & 0.03462& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.09702435063878044594828361677100617517633 & -0.0389335438857287327017042687229284478532& 0.1359578945245091786499878854939346230295& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.1455365259581706689224254251565092627645 & 0.03638413148954266723060635628912731569111& 0& 0.1091523944686280016918190688673819470733& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.561 & 2.025763914393969636805657604282571047511& 0& -7.638023836496292020387602153091964592952& 6.173259922102322383581944548809393545442& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.2290079115904850126662751771814700052182 & 0.05112275589406060872792270881648288397197& 0& 0& 0.1770823794555021537929910813839068684087& 0.00080277624092225014536138698108025283759& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.5449920884095149873337248228185299947818 & 0.1316006357975216279279871693164256985334& 0& 0& -0.2957276252669636417685183174672273730699& 0.0878137803564295237421124704053886667082& 0.6213052975225274774321435005639430026100& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.645 & 0.07166666666666666666666666666666666666667& 0& 0& 0& 0& 0.3305533578915319409260346730051472207728& 0.2427799754418013924072986603281861125606& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.48375 & 0.071806640625& 0& 0& 0& 0& 0.3294380283228177160744825466257672816401& 0.1165190029271822839255174533742327183599& -0.034013671875& 0& 0& 0& 0& 0& 0& 0& 0\\ + 0.06757 & 0.04836757646340646986611287718844085773549& 0& 0& 0& 0& 0.03928989925676163974333190042057047002852& 0.1054740945890344608263649267140088017604& -0.02143865284648312665982642293830533996214& -0.1041229174627194437759832813847147895623& 0& 0& 0& 0& 0& 0& 0\\ + 0.25 & -0.02664561487201478635337289243849737340534& 0& 0& 0& 0& 0.03333333333333333333333333333333333333333& -0.1631072244872467239162704487554706387141& 0.03396081684127761199487954930015522928244& 0.1572319413814626097110769806810024118077& 0.2152267478031879552303534778794770376960& 0& 0& 0& 0& 0& 0\\ + 0.6590650618730998549405331618649220295334 & 0.03689009248708622334786359863227633989718& 0& 0& 0& 0& -0.1465181576725542928653609891758501156785& 0.2242577768172024345345469822625833796001& 0.02294405717066072637090897902753790803034& -0.0035850052905728761357394424889330334334& 0.08669223316444385506869203619044453906053& 0.4383840651968337846196219974168630120572& 0& 0& 0& 0& 0\\ + 0.8206 & -0.4866012215113340846662212357570395295088& 0& 0& 0& 0& -6.304602650282852990657772792012007122988& -0.281245618289472564778284183790118418111& -2.679019236219849057687906597489223155566& 0.518815663924157511565311164615012522024& 1.365353187603341710683633635235238678626& 5.885091088503946585721274891680604830712& 2.802808786272062889819965117517532194812& 0& 0& 0& 0\\ + 0.9012 & 0.4185367457753471441471025246471931649633& 0& 0& 0& 0& 6.724547581906459363100870806514855026676& -0.425444280164611790606983409697113064616& 3.343279153001265577811816947557982637749& 0.617081663117537759528421117507709784737& -0.929966123939932833937749523988800852013& -6.099948804751010722472962837945508844846& -3.002206187889399044804158084895173690015& 0.2553202529443445472336424602988558373637& 0& 0& 0\\ + 1 & -0.779374086122884664644623040843840506343& 0& 0& 0& 0& -13.93734253810777678786523664804936051203& 1.252048853379357320949735183924200895136& -14.69150040801686878191527989293072091588& -0.494705058533141685655191992136962873577& 2.242974909146236657906984549543692874755& 13.36789380382864375813864978592679139881& 14.39665048665068644512236935340272139005& -0.7975813331776800379127866056663258667437& 0.4409353709534277758753793068298041158235& 0& 0\\ + 1 & 2.058051337466886442151242368989994043993& 0& 0& 0& 0& 22.35793772796803295519317565842520212899& 0.90949810997556332745009198137971890783& 35.89110098240264104710550686568482456493& -3.442515027624453437985000403608480262211& -4.865481358036368826566013387928704014496& -18.90980381354342625688427480879773032857& -34.26354448030451782929251177395134170515& 1.264756521695642578827783499806516664686& 0& 0& 0\\ + \hline + 9 & 0.01461197685842315252051541915018784713459& 0& 0& 0& 0& 0& 0& -0.3915211862331339089410228267288242030810& 0.2310932500289506415909675644868993669908& 0.1274766769992852382560589467488989175618& 0.2246434176204157731566981937082069688984& 0.5684352689748512932705226972873692126743& 0.05825871557215827200814768021863420902155& 0.1364317403482215641609022744494239843327& 0.03057013983082797397721005067920369646664& 0\\ + 8 & 0.01996996514886773085518508418098868756464& 0& 0& 0& 0& 0& 0& 2.191499304949330054530747099310837524864& 0.08857071848208438030833722031786358862953& 0.1140560234865965622484956605091432032674& 0.2533163805345107065564577734569651977347& -2.056564386240941011158999594595981300493& 0.3408096799013119935160094894224543812830& 0& 0& 0.04834231373823958314376726739772871714902 + \end{array} + +.. only:: latex + + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. + + +.. figure:: /figs/arkode/v98_erk_stab_region.png + :scale: 75 % + :align: center + + Linear stability region for the Verner-16-8-9 method. The method's + region is outlined in blue; the embedding's region is in red. + + + .. _Butcher.implicit: @@ -967,8 +1269,75 @@ lower-order method (from :cite:p:`Bank:85`). region is outlined in blue; the embedding's region is in red. +.. _Butcher.ESDIRK324L2SA: + +ESDIRK324L2SA-4-2-3 +^^^^^^^^^^^^^^^^^^^^^ + +.. index:: ESDIRK324L2SA-4-2-3 method + +Accessible via the constant ``ARKODE_ESDIRK324L2SA_4_2_3`` to +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_ESDIRK324L2SA_4_2_3"`` to +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. +This is the ESDIRK3(2)4L[2]SA method from :cite:p:`KenCarp:19b`. +Both the method and embedding are A- and L-stable. + +.. figure:: /figs/arkode/stab_region_25.png + :scale: 50 % + :align: center + + Linear stability region for the ESDIRK324L2SA-4-2-3 method method. The method's + region is outlined in blue; the embedding's region is in red. + + + +.. _Butcher.ESDIRK325L2SA: + +ESDIRK325L2SA-5-2-3 +^^^^^^^^^^^^^^^^^^^^^ + +.. index:: ESDIRK325L2SA-5-2-3 method + +Accessible via the constant ``ARKODE_ESDIRK325L2SA_5_2_3`` to +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_ESDIRK325L2SA_5_2_3"`` to +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. +This is the ESDIRK3(2)5L[2]SA method from :cite:p:`KenCarp:16`. +Both the method and embedding are A- and L-stable. + +.. figure:: /figs/arkode/stab_region_26.png + :scale: 50 % + :align: center + + Linear stability region for the ESDIRK325L2SA-5-2-3 method method. The method's + region is outlined in blue; the embedding's region is in red. + + + +.. _Butcher.ESDIRK32I5L2SA: + +ESDIRK32I5L2SA-5-2-3 +^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: ESDIRK32I5L2SA-5-2-3 method + +Accessible via the constant ``ARKODE_ESDIRK32I5L2SA_5_2_3`` to +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_ESDIRK32I5L2SA_5_2_3"`` to +:c:func:`ARKStepSetTableName` or +:c:func:`ARKodeButcherTable_LoadDIRKByName`. +This is the ESDIRK3(2I)5L[2]SA method from :cite:p:`KenCarp:16`. +Both the method and embedding are A- and L-stable. +.. figure:: /figs/arkode/stab_region_27.png + :scale: 50 % + :align: center + Linear stability region for the ESDIRK32I5L2SA-5-2-3 method method. The method's + region is outlined in blue; the embedding's region is in red. .. _Butcher.Kvaerno_4_2_3: @@ -1199,19 +1568,26 @@ Accessible via the string ``"ARKODE_KVAERNO_5_3_4"`` to :c:func:`ARKodeButcherTable_LoadDIRKByName`. Both the method and embedding are A-stable (from :cite:p:`Kva:04`). -.. math:: +.. only:: html + + .. math:: + + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|ccccc} + 0 & 0 & 0 & 0 & 0 & 0 \\ + 0.871733043 & 0.4358665215 & 0.4358665215 & 0 & 0 & 0 \\ + 0.468238744853136 & 0.140737774731968 & -0.108365551378832 & 0.4358665215 & 0 & 0 \\ + 1 & 0.102399400616089 & -0.376878452267324 & 0.838612530151233 & 0.4358665215 & 0 \\ + 1 & 0.157024897860995 & 0.117330441357768 & 0.61667803039168 & -0.326899891110444 & 0.4358665215 \\ + \hline + 4 & 0.157024897860995 & 0.117330441357768 & 0.61667803039168 & -0.326899891110444 & 0.4358665215 \\ + 3 & 0.102399400616089 & -0.376878452267324 & 0.838612530151233 & 0.4358665215 & 0 + \end{array} + +.. only:: latex + + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. - \renewcommand{\arraystretch}{1.5} - \begin{array}{r|ccccc} - 0 & 0 & 0 & 0 & 0 & 0 \\ - 0.871733043 & 0.4358665215 & 0.4358665215 & 0 & 0 & 0 \\ - 0.468238744853136 & 0.140737774731968 & -0.108365551378832 & 0.4358665215 & 0 & 0 \\ - 1 & 0.102399400616089 & -0.376878452267324 & 0.838612530151233 & 0.4358665215 & 0 \\ - 1 & 0.157024897860995 & 0.117330441357768 & 0.61667803039168 & -0.326899891110444 & 0.4358665215 \\ - \hline - 4 & 0.157024897860995 & 0.117330441357768 & 0.61667803039168 & -0.326899891110444 & 0.4358665215 \\ - 3 & 0.102399400616089 & -0.376878452267324 & 0.838612530151233 & 0.4358665215 & 0 - \end{array} .. figure:: /figs/arkode/stab_region_19.png :scale: 50 % @@ -1309,304 +1685,248 @@ This is the implicit portion of the 4th order ARK4(3)7L[2]SA method from region is outlined in blue; the embedding's region is in red. +.. _Butcher.ESDIRK436L2SA: +ESDIRK436L2SA-6-3-4 +^^^^^^^^^^^^^^^^^^^^ +.. index:: ESDIRK436L2SA-6-3-4 method - -.. _Butcher.Kvaerno_7_4_5: - -Kvaerno-7-4-5 -^^^^^^^^^^^^^^^^^ - -.. index:: Kvaerno-7-4-5 ESDIRK method - -Accessible via the constant ``ARKODE_KVAERNO_7_4_5`` to -:c:func:`ARKStepSetTableNum` or -:c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_KVAERNO_7_4_5"`` to +Accessible via the constant ``ARKODE_ESDIRK436L2SA_6_3_4`` to +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_ESDIRK436L2SA_6_3_4"`` to :c:func:`ARKStepSetTableName` or :c:func:`ARKodeButcherTable_LoadDIRKByName`. -Both the method and embedding are A-stable; additionally the method is -L-stable (from :cite:p:`Kva:04`). - -.. math:: - - \renewcommand{\arraystretch}{1.5} - \begin{array}{r|ccccccc} - 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ - 0.52 & 0.26 & 0.26 & 0 & 0 & 0 & 0 & 0 \\ - 1.230333209967908 & 0.13 & 0.84033320996790809 & 0.26 & 0 & 0 & 0 & 0 \\ - 0.895765984350076 & 0.22371961478320505 & 0.47675532319799699 & -0.06470895363112615 & 0.26 & 0 & 0 & 0 \\ - 0.436393609858648 & 0.16648564323248321 & 0.10450018841591720 & 0.03631482272098715 & -0.13090704451073998 & 0.26 & 0 & 0 \\ - 1 & 0.13855640231268224 & 0 & -0.04245337201752043 & 0.02446657898003141 & 0.61943039072480676 & 0.26 & 0 \\ - 1 & 0.13659751177640291 & 0 & -0.05496908796538376 & -0.04118626728321046 & 0.62993304899016403 & 0.06962479448202728 & 0.26 \\ - \hline - 5 & 0.13659751177640291 & 0 & -0.05496908796538376 & -0.04118626728321046 & 0.62993304899016403 & 0.06962479448202728 & 0.26 \\ - 4 & 0.13855640231268224 & 0 & -0.04245337201752043 & 0.02446657898003141 & 0.61943039072480676 & 0.26 & 0 - \end{array} +This is the ESDIRK4(3)6L[2]SA method from :cite:p:`KenCarp:16`. +Both the method and embedding are A- and L-stable. -.. figure:: /figs/arkode/stab_region_21.png +.. figure:: /figs/arkode/stab_region_28.png :scale: 50 % :align: center - Linear stability region for the Kvaerno-7-4-5 method. The method's + Linear stability region for the ESDIRK436L2SA-6-3-4 method method. The method's region is outlined in blue; the embedding's region is in red. +.. _Butcher.ESDIRK43I6L2SA: +ESDIRK43I6L2SA-6-3-4 +^^^^^^^^^^^^^^^^^^^^ +.. index:: ESDIRK43I6L2SA-6-3-4 method - - -.. _Butcher.ARK_8_4_5_I: - -ARK548L2SA-ESDIRK-8-4-5 -^^^^^^^^^^^^^^^^^^^^^^^ - -.. index:: ARK548L2SA-ESDIRK-8-4-5 method - -Accessible via the constant ``ARKODE_ARK548L2SA_DIRK_8_4_5`` for -:c:func:`ARKStepSetTableNum` or -:c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_ARK548L2SA_DIRK_8_4_5"`` to +Accessible via the constant ``ARKODE_ESDIRK43I6L2SA_6_3_4`` to +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_ESDIRK43I6L2SA_6_3_4"`` to :c:func:`ARKStepSetTableName` or :c:func:`ARKodeButcherTable_LoadDIRKByName`. -This is the default 5th order implicit method, and the implicit portion of the -default 5th order additive method. Both the method and embedding are A-stable; -additionally the method is L-stable (the implicit portion of the ARK5(4)8L[2]SA -method from :cite:p:`KenCarp:03`). - -.. math:: - - \renewcommand{\arraystretch}{1.5} - \begin{array}{r|cccccccc} - 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{41}{100} & \frac{41}{200} & \frac{41}{200} & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{2935347310677}{11292855782101} & \frac{41}{400} & -\frac{567603406766}{11931857230679} & \frac{41}{200} & 0 & 0 & 0 & 0 & 0 \\ - \frac{1426016391358}{7196633302097} & \frac{683785636431}{9252920307686} & 0 & -\frac{110385047103}{1367015193373} & \frac{41}{200} & 0 & 0 & 0 & 0 \\ - \frac{92}{100} & \frac{3016520224154}{10081342136671} & 0 & \frac{30586259806659}{12414158314087} & -\frac{22760509404356}{11113319521817} & \frac{41}{200} & 0 & 0 & 0 \\ - \frac{24}{100} & \frac{218866479029}{1489978393911} & 0 & \frac{638256894668}{5436446318841} & -\frac{1179710474555}{5321154724896} & -\frac{60928119172}{8023461067671} & \frac{41}{200} & 0 & 0 \\ - \frac{3}{5} & \frac{1020004230633}{5715676835656} & 0 & \frac{25762820946817}{25263940353407} & -\frac{2161375909145}{9755907335909} & -\frac{211217309593}{5846859502534} & -\frac{4269925059573}{7827059040749} & \frac{41}{200} & 0 \\ - 1 & -\frac{872700587467}{9133579230613} & 0 & 0 & \frac{22348218063261}{9555858737531} & -\frac{1143369518992}{8141816002931} & -\frac{39379526789629}{19018526304540} & \frac{32727382324388}{42900044865799} & \frac{41}{200} \\ - \hline - 5 & -\frac{872700587467}{9133579230613} & 0 & 0 & \frac{22348218063261}{9555858737531} & -\frac{1143369518992}{8141816002931} & -\frac{39379526789629}{19018526304540} & \frac{32727382324388}{42900044865799} & \frac{41}{200} \\ - 4 & -\frac{975461918565}{9796059967033} & 0 & 0 & \frac{78070527104295}{32432590147079} & -\frac{548382580838}{3424219808633} & -\frac{33438840321285}{15594753105479} & \frac{3629800801594}{4656183773603} & \frac{4035322873751}{18575991585200} - \end{array} +This is the ESDIRK4(3I)6L[2]SA method from :cite:p:`KenCarp:16`. +Both the method and embedding are A- and L-stable. -.. figure:: /figs/arkode/stab_region_22.png +.. figure:: /figs/arkode/stab_region_29.png :scale: 50 % :align: center - Linear stability region for the implicit ARK548L2SA-ESDIRK-8-4-5 method. The method's + Linear stability region for the ESDIRK43I6L2SA-6-3-4 method method. The method's region is outlined in blue; the embedding's region is in red. +.. _Butcher.QESDIRK436L2SA: +QESDIRK436L2SA-6-3-4 +^^^^^^^^^^^^^^^^^^^^ -.. _Butcher.ARK_8_4_5b_I: - -ARK548L2SAb-DIRK-8-4-5 -^^^^^^^^^^^^^^^^^^^^^^ - -.. index:: ARK548L2SAb-DIRK-8-4-5 method +.. index:: QESDIRK436L2SA-6-3-4 method -Accessible via the constant ``ARKODE_ARK548L2SAb_DIRK_8_4_5`` for -:c:func:`ARKStepSetTableNum` or -:c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_ARK548L2SAb_DIRK_8_4_5"`` to +Accessible via the constant ``ARKODE_QESDIRK436L2SA_6_3_4`` to +:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_QESDIRK436L2SA_6_3_4"`` to :c:func:`ARKStepSetTableName` or :c:func:`ARKodeButcherTable_LoadDIRKByName`. -Both the method and embedding are A-stable; additionally the method is L-stable -(this is the implicit portion of the 5th order ARK5(4)8L[2]SA method from -:cite:p:`KenCarp:19`). - -.. math:: - - \renewcommand{\arraystretch}{1.5} - \begin{array}{r|cccccccc} - 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{4}{9} & \frac{2}{9} & \frac{2}{9} & 0 & 0 & 0 & 0 & 0 & 0 \\ - \frac{6456083330201}{8509243623797} & \frac{2366667076620}{8822750406821} & \frac{2366667076620}{8822750406821} & \frac{2}{9} & 0 & 0 & 0 & 0 & 0 \\ - \frac{1632083962415}{14158861528103} & -\frac{257962897183}{4451812247028} & -\frac{257962897183}{4451812247028} & \frac{128530224461}{14379561246022} & \frac{2}{9} & 0 & 0 & 0 & 0 \\ - \frac{6365430648612}{17842476412687} & -\frac{486229321650}{11227943450093} & -\frac{486229321650}{11227943450093} & -\frac{225633144460}{6633558740617} & \frac{1741320951451}{6824444397158} & \frac{2}{9} & 0 & 0 & 0 \\ - \frac{18}{25} & \frac{621307788657}{4714163060173} & \frac{621307788657}{4714163060173} & -\frac{125196015625}{3866852212004} & \frac{940440206406}{7593089888465} & \frac{961109811699}{6734810228204} & \frac{2}{9} & 0 & 0 \\ - \frac{191}{200} & \frac{2036305566805}{6583108094622} & \frac{2036305566805}{6583108094622} & -\frac{3039402635899}{4450598839912} & -\frac{1829510709469}{31102090912115} & -\frac{286320471013}{6931253422520} & \frac{8651533662697}{9642993110008} & \frac{2}{9} & 0 \\ - 1 & 0 & 0 & \frac{3517720773327}{20256071687669} & \frac{4569610470461}{17934693873752} & \frac{2819471173109}{11655438449929} & \frac{3296210113763}{10722700128969} & -\frac{1142099968913}{5710983926999} & \frac{2}{9} \\ - \hline - 5 & 0 & 0 & \frac{3517720773327}{20256071687669} & \frac{4569610470461}{17934693873752} & \frac{2819471173109}{11655438449929} & \frac{3296210113763}{10722700128969} & -\frac{1142099968913}{5710983926999} & \frac{2}{9} \\ - 4 & 0 & 0 & \frac{520639020421}{8300446712847} & \frac{4550235134915}{17827758688493} & \frac{1482366381361}{6201654941325} & \frac{5551607622171}{13911031047899} & -\frac{5266607656330}{36788968843917} & \frac{1074053359553}{5740751784926} - \end{array} - +This is the QESDIRK4(3)6L[2]SA method from :cite:p:`KenCarp:16`. +Both the method and embedding are A- and L-stable. -.. figure:: /figs/arkode/stab_region_37.png +.. figure:: /figs/arkode/stab_region_30.png :scale: 50 % :align: center - Linear stability region for the ARK548L2SAb-DIRK-8-4-5 method. The method's + Linear stability region for the QESDIRK436L2SA-6-3-4 method method. The method's region is outlined in blue; the embedding's region is in red. +.. _Butcher.ESDIRK437L2SA: -.. _Butcher.ESDIRK324L2SA: - -ESDIRK324L2SA-4-2-3 -^^^^^^^^^^^^^^^^^^^^^ +ESDIRK437L2SA-7-3-4 +^^^^^^^^^^^^^^^^^^^ -.. index:: ESDIRK324L2SA-4-2-3 method +.. index:: ESDIRK437L2SA-7-3-4 method -Accessible via the constant ``ARKODE_ESDIRK324L2SA_4_2_3`` to +Accessible via the constant ``ARKODE_ESDIRK437L2SA_7_3_4`` to :c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_ESDIRK324L2SA_4_2_3"`` to +Accessible via the string ``"ARKODE_ESDIRK437L2SA_7_3_4"`` to :c:func:`ARKStepSetTableName` or :c:func:`ARKodeButcherTable_LoadDIRKByName`. -This is the ESDIRK3(2)4L[2]SA method from :cite:p:`KenCarp:19b`. +This is the ESDIRK4(3)7L[2]SA method from :cite:p:`KenCarp:19b`. Both the method and embedding are A- and L-stable. -.. figure:: /figs/arkode/stab_region_25.png +.. figure:: /figs/arkode/stab_region_31.png :scale: 50 % :align: center - Linear stability region for the ESDIRK324L2SA-4-2-3 method method. The method's + Linear stability region for the ESDIRK437L2SA-7-3-4 method method. The method's region is outlined in blue; the embedding's region is in red. +.. _Butcher.Kvaerno_7_4_5: -.. _Butcher.ESDIRK325L2SA: - -ESDIRK325L2SA-5-2-3 -^^^^^^^^^^^^^^^^^^^^^ +Kvaerno-7-4-5 +^^^^^^^^^^^^^^^^^ -.. index:: ESDIRK325L2SA-5-2-3 method +.. index:: Kvaerno-7-4-5 ESDIRK method -Accessible via the constant ``ARKODE_ESDIRK325L2SA_5_2_3`` to -:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_ESDIRK325L2SA_5_2_3"`` to +Accessible via the constant ``ARKODE_KVAERNO_7_4_5`` to +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_KVAERNO_7_4_5"`` to :c:func:`ARKStepSetTableName` or :c:func:`ARKodeButcherTable_LoadDIRKByName`. -This is the ESDIRK3(2)5L[2]SA method from :cite:p:`KenCarp:16`. -Both the method and embedding are A- and L-stable. - -.. figure:: /figs/arkode/stab_region_26.png - :scale: 50 % - :align: center - - Linear stability region for the ESDIRK325L2SA-5-2-3 method method. The method's - region is outlined in blue; the embedding's region is in red. +Both the method and embedding are A-stable; additionally the method is +L-stable (from :cite:p:`Kva:04`). +.. only:: html + .. math:: -.. _Butcher.ESDIRK32I5L2SA: + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|ccccccc} + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + 0.52 & 0.26 & 0.26 & 0 & 0 & 0 & 0 & 0 \\ + 1.230333209967908 & 0.13 & 0.84033320996790809 & 0.26 & 0 & 0 & 0 & 0 \\ + 0.895765984350076 & 0.22371961478320505 & 0.47675532319799699 & -0.06470895363112615 & 0.26 & 0 & 0 & 0 \\ + 0.436393609858648 & 0.16648564323248321 & 0.10450018841591720 & 0.03631482272098715 & -0.13090704451073998 & 0.26 & 0 & 0 \\ + 1 & 0.13855640231268224 & 0 & -0.04245337201752043 & 0.02446657898003141 & 0.61943039072480676 & 0.26 & 0 \\ + 1 & 0.13659751177640291 & 0 & -0.05496908796538376 & -0.04118626728321046 & 0.62993304899016403 & 0.06962479448202728 & 0.26 \\ + \hline + 5 & 0.13659751177640291 & 0 & -0.05496908796538376 & -0.04118626728321046 & 0.62993304899016403 & 0.06962479448202728 & 0.26 \\ + 4 & 0.13855640231268224 & 0 & -0.04245337201752043 & 0.02446657898003141 & 0.61943039072480676 & 0.26 & 0 + \end{array} -ESDIRK32I5L2SA-5-2-3 -^^^^^^^^^^^^^^^^^^^^^^^ +.. only:: latex -.. index:: ESDIRK32I5L2SA-5-2-3 method + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. -Accessible via the constant ``ARKODE_ESDIRK32I5L2SA_5_2_3`` to -:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_ESDIRK32I5L2SA_5_2_3"`` to -:c:func:`ARKStepSetTableName` or -:c:func:`ARKodeButcherTable_LoadDIRKByName`. -This is the ESDIRK3(2I)5L[2]SA method from :cite:p:`KenCarp:16`. -Both the method and embedding are A- and L-stable. -.. figure:: /figs/arkode/stab_region_27.png +.. figure:: /figs/arkode/stab_region_21.png :scale: 50 % :align: center - Linear stability region for the ESDIRK32I5L2SA-5-2-3 method method. The method's + Linear stability region for the Kvaerno-7-4-5 method. The method's region is outlined in blue; the embedding's region is in red. -.. _Butcher.ESDIRK436L2SA: -ESDIRK436L2SA-6-3-4 -^^^^^^^^^^^^^^^^^^^^ -.. index:: ESDIRK436L2SA-6-3-4 method -Accessible via the constant ``ARKODE_ESDIRK436L2SA_6_3_4`` to -:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_ESDIRK436L2SA_6_3_4"`` to + + +.. _Butcher.ARK_8_4_5_I: + +ARK548L2SA-ESDIRK-8-4-5 +^^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: ARK548L2SA-ESDIRK-8-4-5 method + +Accessible via the constant ``ARKODE_ARK548L2SA_DIRK_8_4_5`` for +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_ARK548L2SA_DIRK_8_4_5"`` to :c:func:`ARKStepSetTableName` or :c:func:`ARKodeButcherTable_LoadDIRKByName`. -This is the ESDIRK4(3)6L[2]SA method from :cite:p:`KenCarp:16`. -Both the method and embedding are A- and L-stable. - -.. figure:: /figs/arkode/stab_region_28.png - :scale: 50 % - :align: center +This is the default 5th order implicit method, and the implicit portion of the +default 5th order additive method. Both the method and embedding are A-stable; +additionally the method is L-stable (the implicit portion of the ARK5(4)8L[2]SA +method from :cite:p:`KenCarp:03`). - Linear stability region for the ESDIRK436L2SA-6-3-4 method method. The method's - region is outlined in blue; the embedding's region is in red. +.. only:: html + .. math:: -.. _Butcher.ESDIRK43I6L2SA: + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|cccccccc} + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{41}{100} & \frac{41}{200} & \frac{41}{200} & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{2935347310677}{11292855782101} & \frac{41}{400} & -\frac{567603406766}{11931857230679} & \frac{41}{200} & 0 & 0 & 0 & 0 & 0 \\ + \frac{1426016391358}{7196633302097} & \frac{683785636431}{9252920307686} & 0 & -\frac{110385047103}{1367015193373} & \frac{41}{200} & 0 & 0 & 0 & 0 \\ + \frac{92}{100} & \frac{3016520224154}{10081342136671} & 0 & \frac{30586259806659}{12414158314087} & -\frac{22760509404356}{11113319521817} & \frac{41}{200} & 0 & 0 & 0 \\ + \frac{24}{100} & \frac{218866479029}{1489978393911} & 0 & \frac{638256894668}{5436446318841} & -\frac{1179710474555}{5321154724896} & -\frac{60928119172}{8023461067671} & \frac{41}{200} & 0 & 0 \\ + \frac{3}{5} & \frac{1020004230633}{5715676835656} & 0 & \frac{25762820946817}{25263940353407} & -\frac{2161375909145}{9755907335909} & -\frac{211217309593}{5846859502534} & -\frac{4269925059573}{7827059040749} & \frac{41}{200} & 0 \\ + 1 & -\frac{872700587467}{9133579230613} & 0 & 0 & \frac{22348218063261}{9555858737531} & -\frac{1143369518992}{8141816002931} & -\frac{39379526789629}{19018526304540} & \frac{32727382324388}{42900044865799} & \frac{41}{200} \\ + \hline + 5 & -\frac{872700587467}{9133579230613} & 0 & 0 & \frac{22348218063261}{9555858737531} & -\frac{1143369518992}{8141816002931} & -\frac{39379526789629}{19018526304540} & \frac{32727382324388}{42900044865799} & \frac{41}{200} \\ + 4 & -\frac{975461918565}{9796059967033} & 0 & 0 & \frac{78070527104295}{32432590147079} & -\frac{548382580838}{3424219808633} & -\frac{33438840321285}{15594753105479} & \frac{3629800801594}{4656183773603} & \frac{4035322873751}{18575991585200} + \end{array} -ESDIRK43I6L2SA-6-3-4 -^^^^^^^^^^^^^^^^^^^^ +.. only:: latex -.. index:: ESDIRK43I6L2SA-6-3-4 method + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. -Accessible via the constant ``ARKODE_ESDIRK43I6L2SA_6_3_4`` to -:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_ESDIRK43I6L2SA_6_3_4"`` to -:c:func:`ARKStepSetTableName` or -:c:func:`ARKodeButcherTable_LoadDIRKByName`. -This is the ESDIRK4(3I)6L[2]SA method from :cite:p:`KenCarp:16`. -Both the method and embedding are A- and L-stable. -.. figure:: /figs/arkode/stab_region_29.png +.. figure:: /figs/arkode/stab_region_22.png :scale: 50 % :align: center - Linear stability region for the ESDIRK43I6L2SA-6-3-4 method method. The method's + Linear stability region for the implicit ARK548L2SA-ESDIRK-8-4-5 method. The method's region is outlined in blue; the embedding's region is in red. -.. _Butcher.QESDIRK436L2SA: -QESDIRK436L2SA-6-3-4 -^^^^^^^^^^^^^^^^^^^^ -.. index:: QESDIRK436L2SA-6-3-4 method +.. _Butcher.ARK_8_4_5b_I: -Accessible via the constant ``ARKODE_QESDIRK436L2SA_6_3_4`` to -:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_QESDIRK436L2SA_6_3_4"`` to +ARK548L2SAb-DIRK-8-4-5 +^^^^^^^^^^^^^^^^^^^^^^ + +.. index:: ARK548L2SAb-DIRK-8-4-5 method + +Accessible via the constant ``ARKODE_ARK548L2SAb_DIRK_8_4_5`` for +:c:func:`ARKStepSetTableNum` or +:c:func:`ARKodeButcherTable_LoadDIRK`. +Accessible via the string ``"ARKODE_ARK548L2SAb_DIRK_8_4_5"`` to :c:func:`ARKStepSetTableName` or :c:func:`ARKodeButcherTable_LoadDIRKByName`. -This is the QESDIRK4(3)6L[2]SA method from :cite:p:`KenCarp:16`. -Both the method and embedding are A- and L-stable. +Both the method and embedding are A-stable; additionally the method is L-stable +(this is the implicit portion of the 5th order ARK5(4)8L[2]SA method from +:cite:p:`KenCarp:19`). -.. figure:: /figs/arkode/stab_region_30.png - :scale: 50 % - :align: center +.. only:: html - Linear stability region for the QESDIRK436L2SA-6-3-4 method method. The method's - region is outlined in blue; the embedding's region is in red. + .. math:: + \renewcommand{\arraystretch}{1.5} + \begin{array}{r|cccccccc} + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{4}{9} & \frac{2}{9} & \frac{2}{9} & 0 & 0 & 0 & 0 & 0 & 0 \\ + \frac{6456083330201}{8509243623797} & \frac{2366667076620}{8822750406821} & \frac{2366667076620}{8822750406821} & \frac{2}{9} & 0 & 0 & 0 & 0 & 0 \\ + \frac{1632083962415}{14158861528103} & -\frac{257962897183}{4451812247028} & -\frac{257962897183}{4451812247028} & \frac{128530224461}{14379561246022} & \frac{2}{9} & 0 & 0 & 0 & 0 \\ + \frac{6365430648612}{17842476412687} & -\frac{486229321650}{11227943450093} & -\frac{486229321650}{11227943450093} & -\frac{225633144460}{6633558740617} & \frac{1741320951451}{6824444397158} & \frac{2}{9} & 0 & 0 & 0 \\ + \frac{18}{25} & \frac{621307788657}{4714163060173} & \frac{621307788657}{4714163060173} & -\frac{125196015625}{3866852212004} & \frac{940440206406}{7593089888465} & \frac{961109811699}{6734810228204} & \frac{2}{9} & 0 & 0 \\ + \frac{191}{200} & \frac{2036305566805}{6583108094622} & \frac{2036305566805}{6583108094622} & -\frac{3039402635899}{4450598839912} & -\frac{1829510709469}{31102090912115} & -\frac{286320471013}{6931253422520} & \frac{8651533662697}{9642993110008} & \frac{2}{9} & 0 \\ + 1 & 0 & 0 & \frac{3517720773327}{20256071687669} & \frac{4569610470461}{17934693873752} & \frac{2819471173109}{11655438449929} & \frac{3296210113763}{10722700128969} & -\frac{1142099968913}{5710983926999} & \frac{2}{9} \\ + \hline + 5 & 0 & 0 & \frac{3517720773327}{20256071687669} & \frac{4569610470461}{17934693873752} & \frac{2819471173109}{11655438449929} & \frac{3296210113763}{10722700128969} & -\frac{1142099968913}{5710983926999} & \frac{2}{9} \\ + 4 & 0 & 0 & \frac{520639020421}{8300446712847} & \frac{4550235134915}{17827758688493} & \frac{1482366381361}{6201654941325} & \frac{5551607622171}{13911031047899} & -\frac{5266607656330}{36788968843917} & \frac{1074053359553}{5740751784926} + \end{array} -.. _Butcher.ESDIRK437L2SA: +.. only:: latex -ESDIRK437L2SA-7-3-4 -^^^^^^^^^^^^^^^^^^^ + The Butcher table is too large to fit in the PDF version of this documentation. Please see the HTML documentation for the table coefficients. -.. index:: ESDIRK437L2SA-7-3-4 method -Accessible via the constant ``ARKODE_ESDIRK437L2SA_7_3_4`` to -:c:func:`ARKStepSetTableNum` or :c:func:`ARKodeButcherTable_LoadDIRK`. -Accessible via the string ``"ARKODE_ESDIRK437L2SA_7_3_4"`` to -:c:func:`ARKStepSetTableName` or -:c:func:`ARKodeButcherTable_LoadDIRKByName`. -This is the ESDIRK4(3)7L[2]SA method from :cite:p:`KenCarp:19b`. -Both the method and embedding are A- and L-stable. - -.. figure:: /figs/arkode/stab_region_31.png +.. figure:: /figs/arkode/stab_region_37.png :scale: 50 % :align: center - Linear stability region for the ESDIRK437L2SA-7-3-4 method method. The method's + Linear stability region for the ARK548L2SAb-DIRK-8-4-5 method. The method's region is outlined in blue; the embedding's region is in red. @@ -1695,13 +2015,13 @@ Butcher table pairs are as follows: * :index:`5th-order pair `: :numref:`Butcher.ARK_8_4_5_E` with :numref:`Butcher.ARK_8_4_5_I`, corresponding to Butcher tables ``ARKODE_ARK548L2SA_ERK_8_4_5`` and - ``ARKODE_ARK548L2SA_ERK_8_4_5`` for :c:func:`ARKStepSetTableNum` + ``ARKODE_ARK548L2SA_DIRK_8_4_5`` for :c:func:`ARKStepSetTableNum` or :c:func:`ARKStepSetTableName`. * :index:`5th-order pair `: :numref:`Butcher.ARK_8_4_5b_E` with :numref:`Butcher.ARK_8_4_5b_I`, corresponding to Butcher tables ``ARKODE_ARK548L2SAb_ERK_8_4_5`` and - ``ARKODE_ARK548L2SAb_ERK_8_4_5`` for :c:func:`ARKStepSetTableNum` + ``ARKODE_ARK548L2SAb_DIRK_8_4_5`` for :c:func:`ARKStepSetTableNum` or :c:func:`ARKStepSetTableName`. diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index 968b68b432..833a061251 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -80,6 +80,8 @@ contains the ARKODE output constants. +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_ARK324L2SA_ERK_4_2_3` | Use the ARK-4-2-3 ERK method. | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_SOFRONIOU_SPALETTA_5_3_4` | Use the Sofroniou-Spaletta-5-3-4 ERK method. | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_ZONNEVELD_5_3_4` | Use the Zonneveld-5-3-4 ERK method. | +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_ARK436L2SA_ERK_6_3_4` | Use the ARK-6-3-4 ERK method. | @@ -104,6 +106,16 @@ contains the ARKODE output constants. +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_ARK548L2SAb_ERK_8_4_5` | Use the ARK-8-4-5b ERK method. | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_SHU_OSHER_3_2_3` | Use the Shu-Osher-3-2-3 ERK method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_VERNER_9_5_6` | Use the Verner-9-5-6 ERK method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_VERNER_10_6_7` | Use the Verner-10-6-7 ERK method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_VERNER_13_7_8` | Use the Verner-13-7-8 ERK method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_VERNER_16_8_9` | Use the Verner-16-8-9 ERK method. | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKSTEP_DEFAULT_ERK_2` | Use ARKStep's default second-order ERK method | | | (ARKODE_HEUN_EULER_2_1_2). | +-----------------------------------------------+------------------------------------------------------------+ @@ -119,9 +131,15 @@ contains the ARKODE output constants. | :index:`ARKSTEP_DEFAULT_ERK_6` | Use ARKStep's default sixth-order ERK method | | | (ARKODE_VERNER_8_5_6). | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ERK_7` | Use ARKStep's default seventh-order ERK method | + | | (ARKODE_VERNER_10_6_7). | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKSTEP_DEFAULT_ERK_8` | Use ARKStep's default eighth-order ERK method | | | (ARKODE_FEHLBERG_13_7_8). | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKSTEP_DEFAULT_ERK_9` | Use ARKStep's default ninth-order ERK method | + | | (ARKODE_VERNER_16_8_9). | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ERKSTEP_DEFAULT_2` | Use ERKStep's default second-order ERK method | | | (ARKODE_HEUN_EULER_2_1_2). | +-----------------------------------------------+------------------------------------------------------------+ @@ -137,9 +155,15 @@ contains the ARKODE output constants. | :index:`ERKSTEP_DEFAULT_6` | Use ERKStep's default sixth-order ERK method | | | (ARKODE_VERNER_8_5_6). | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ERKSTEP_DEFAULT_7` | Use ERKStep's default seventh-order ERK method | + | | (ARKODE_VERNER_10_6_7). | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ERKSTEP_DEFAULT_8` | Use ERKStep's default eighth-order ERK method | | | (ARKODE_FEHLBERG_13_7_8). | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ERKSTEP_DEFAULT_9` | Use ERKStep's default ninth-order ERK method | + | | (ARKODE_VERNER_16_8_9). | + +-----------------------------------------------+------------------------------------------------------------+ | | | +-----------------------------------------------+------------------------------------------------------------+ | **Implicit Butcher table specification** | | @@ -148,6 +172,12 @@ contains the ARKODE output constants. +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_BILLINGTON_3_3_2` | Use the Billington-3-3-2 SDIRK method. | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ESDIRK324L2SA_4_2_3` | Use the ESDIRK324L2SA-4-2-3 ESDIRK method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ESDIRK325L2SA_5_2_3` | Use the ESDIRK325L2SA-5-2-3 ESDIRK method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ESDIRK32I5L2SA_5_2_3` | Use the ESDIRK32I5L2SA-5-2-3 ESDIRK method. | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_TRBDF2_3_3_2` | Use the TRBDF2-3-3-2 ESDIRK method. | +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_KVAERNO_4_2_3` | Use the Kvaerno-4-2-3 ESDIRK method. | @@ -166,12 +196,24 @@ contains the ARKODE output constants. +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_KVAERNO_7_4_5` | Use the Kvaerno-7-4-5 ESDIRK method. | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ESDIRK436L2SA_6_3_4` | Use the ESDIRK436L2SA-6-3-4 method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ESDIRK43I6L2SA_6_3_4` | Use the ESDIRK43I6L2SA-6-3-4 method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_QESDIRK436L2SA_6_3_4` | Use the QESDIRK436L2SA-6-3-4 method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ESDIRK437L2SA_7_3_4` | Use the ESDIRK437L2SA-7-3-4 method. | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_ARK548L2SA_DIRK_8_4_5` | Use the ARK-8-4-5 ESDIRK method. | +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_ARK437L2SA_DIRK_7_3_4` | Use the ARK-7-3-4 ESDIRK method. | +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKODE_ARK548L2SAb_DIRK_8_4_5` | Use the ARK-8-4-5b ESDIRK method. | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ESDIRK547L2SA_7_4_5` | Use the ESDIRK547L2SA-7-4-5 ESDIRK method. | + +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARKODE_ESDIRK547L2SA2_7_4_5` | Use the ESDIRK547L2SA2-7-4-5 ESDIRK method. | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARKSTEP_DEFAULT_DIRK_2` | Use ARKStep's default second-order DIRK method | | | (ARKODE_SDIRK_2_1_2). | +-----------------------------------------------+------------------------------------------------------------+ @@ -215,33 +257,33 @@ contains the ARKODE output constants. | :index:`ARKSTEP_DEFAULT_ARK_ITABLE_5` | (ARKODE_ARK548L2SA_ERK_8_4_5 and | | | ARKODE_ARK548L2SA_DIRK_8_4_5). | +-----------------------------------------------+------------------------------------------------------------+ - | | + | + | | | +-----------------------------------------------+------------------------------------------------------------+ | **Symplectic Method storage specification** | | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_EULER_1_1` | Symplectic Euler 1st order method with 1 stage. | + | :index:`ARKODE_SPRK_EULER_1_1` | Symplectic Euler 1st order method with 1 stage. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_LEAPFROG_2_2` | Symplectic Leapfrog 2nd order method with 2 stages. | + | :index:`ARKODE_SPRK_LEAPFROG_2_2` | Symplectic Leapfrog 2nd order method with 2 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_PSEUDO_LEAPFROG_2_2` | Symplectic Pseudo Leapfrog 2nd order method with 2 stages. | + | :index:`ARKODE_SPRK_PSEUDO_LEAPFROG_2_2` | Symplectic Pseudo Leapfrog 2nd order method with 2 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_RUTH_3_3` | Symplectic Ruth 3rd order method with 3 stages. | + | :index:`ARKODE_SPRK_RUTH_3_3` | Symplectic Ruth 3rd order method with 3 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_MCLACHLAN_2_2` | Symplectic McLachlan 2nd order method with 2 stages. | + | :index:`ARKODE_SPRK_MCLACHLAN_2_2` | Symplectic McLachlan 2nd order method with 2 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_MCLACHLAN_3_3` | Symplectic McLachlan 3rd order method with 3 stages. | + | :index:`ARKODE_SPRK_MCLACHLAN_3_3` | Symplectic McLachlan 3rd order method with 3 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_CANDY_ROZMUS_4_4` | Symplectic Candy-Rozmus 4th order method with 4 stages. | + | :index:`ARKODE_SPRK_CANDY_ROZMUS_4_4` | Symplectic Candy-Rozmus 4th order method with 4 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_MCLACHLAN_4_4` | Symplectic McLachlan 4th order method with 4 stages. | + | :index:`ARKODE_SPRK_MCLACHLAN_4_4` | Symplectic McLachlan 4th order method with 4 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_MCLACHLAN_5_6` | Symplectic McLachlan 5th order method with 6 stages. | + | :index:`ARKODE_SPRK_MCLACHLAN_5_6` | Symplectic McLachlan 5th order method with 6 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_YOSHIDA_6_8` | Symplectic Yoshida 6th order method with 8 stages. | + | :index:`ARKODE_SPRK_YOSHIDA_6_8` | Symplectic Yoshida 6th order method with 8 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_SUZUKI_UMENO_8_16` | Symplectic McLachlan 8th order method with 16 stages. | + | :index:`ARKODE_SPRK_SUZUKI_UMENO_8_16` | Symplectic McLachlan 8th order method with 16 stages. | +-----------------------------------------------+------------------------------------------------------------+ - | :c:macro:`ARKODE_SPRK_SOFRONIOU_10_36` | Symplectic Sofroniou 10th order method with 36 stages. | + | :index:`ARKODE_SPRK_SOFRONIOU_10_36` | Symplectic Sofroniou 10th order method with 36 stages. | +-----------------------------------------------+------------------------------------------------------------+ | | | +-----------------------------------------------+------------------------------------------------------------+ @@ -426,6 +468,8 @@ contains the ARKODE output constants. | :index:`ARK_RELAX_JAC_FAIL` | -46 | The relaxation Jacobian function returned an unrecoverable | | | | error | +-------------------------------------+------+------------------------------------------------------------+ + | :index:`ARK_CONTROLLER_ERR` | -47 | An error with a SUNAdaptController object was encountered. | + +-------------------------------------+------+------------------------------------------------------------+ | :index:`ARK_UNRECOGNIZED_ERROR` | -99 | An unknown error was encountered. | +-------------------------------------+------+------------------------------------------------------------+ | | diff --git a/doc/arkode/guide/source/Introduction.rst b/doc/arkode/guide/source/Introduction.rst index 2e7bae4f92..8334402fa1 100644 --- a/doc/arkode/guide/source/Introduction.rst +++ b/doc/arkode/guide/source/Introduction.rst @@ -64,8 +64,8 @@ for splittings tuned for use with optimal implicit solver algorithms. This framework allows for significant freedom over the constitutive methods used for each component, and ARKODE is packaged with a wide array of built-in methods for use. These built-in Butcher tables -include adaptive explicit methods of orders 2-8, adaptive implicit -methods of orders 2-5, and adaptive ImEx methods of orders 3-5. +include adaptive explicit methods of orders 2-9, adaptive implicit +methods of orders 2-5, and adaptive ImEx methods of orders 2-5. *ERKStep* focuses specifically on problems posed in explicit form, @@ -77,7 +77,7 @@ methods of orders 2-5, and adaptive ImEx methods of orders 3-5. allowing for increased computational efficiency and memory savings. The algorithms used in ERKStep are adaptive- and fixed-step explicit Runge--Kutta methods. As with ARKStep, the ERKStep module is packaged -with adaptive explicit methods of orders 2-8. +with adaptive explicit methods of orders 2-9. *SPRKStep* focuses on Hamiltonian systems posed in the form, @@ -85,8 +85,8 @@ with adaptive explicit methods of orders 2-8. H(t, p, q) = T(t, p) + V(t, q) .. math:: - \dot{p} = f_1(t,q) = \frac{\partial V(t,q)}{\partial q}, \quad - \dot{q} = f_2(t,p) = \frac{\partial T(t,p)}{\partial p}, + \dot{p} = f_1(t,q) = \frac{\partial V(t,q)}{\partial q}, \quad + \dot{q} = f_2(t,p) = \frac{\partial T(t,p)}{\partial p}, :label: ARKODE_ODE_hamiltonian allowing for conservation of quadratic invariants. @@ -130,6 +130,72 @@ provided with SUNDIALS, or again may utilize a user-supplied module. Changes from previous versions ============================== +Changes in v5.7.0 +----------------- + +Added the :c:type:`SUNAdaptController` base class, ported ARKODE's internal +implementations of time step controllers into implementations of this class, +and updated ARKODE to use these objects instead of its own implementations. Added +:c:func:`ARKStepSetAdaptController` and :c:func:`ERKStepSetAdaptController` +routines so that users can modify controller parameters, or even provide custom +implementations. + +Added the routines :c:func:`ARKStepSetAdaptivityAdjustment` and +:c:func:`ERKStepSetAdaptivityAdjustment`, that allow users to adjust the +value for the method order supplied to the temporal adaptivity controllers. +The ARKODE default for this adjustment has been :math:`-1` since its initial +release, but for some applications a value of :math:`0` is more appropriate. +Users who notice that their simulations encounter a large number of +temporal error test failures may want to experiment with adjusting this value. + +Added the third order ERK method ``ARKODE_SHU_OSHER_3_2_3``, the fourth order +ERK method ``ARKODE_SOFRONIOU_SPALETTA_5_3_4``, the sixth order ERK method +``ARKODE_VERNER_9_5_6``, the seventh order ERK method ``ARKODE_VERNER_10_6_7``, +the eighth order ERK method ``ARKODE_VERNER_13_7_8``, and the ninth order ERK +method ``ARKODE_VERNER_16_8_9``. + +ARKStep, ERKStep, MRIStep, and SPRKStep were updated to remove a potentially +unnecessary right-hand side evaluation at the end of an integration. ARKStep was +additionally updated to remove extra right-hand side evaluations when using an +explicit method or an implicit method with an explicit first stage. + +Added Fortran support for the LAPACK dense ``SUNLinearSolver`` implementation. + +Added the fourth order ERK method ``ARKODE_SOFRONIOU_SPALETTA_5_3_4``. + +Improved computational complexity of ``SUNMatScaleAddI_Sparse`` from ``O(M*N)`` +to ``O(NNZ)``. + +Changed the ``SUNProfiler`` so that it does not rely on ``MPI_WTime`` in any case. +This fixes `GitHub Issue #312 `_. + +Fixed a regression introduced by the stop time bug fix in v6.6.1 where ARKODE +steppers would return at the stop time rather than the requested output time if +the stop time was reached in the same step in which the output time was passed. + +Fixed a bug in ERKStep where methods with :math:`c_s = 1` but +:math:`a_{s,j} \neq b_j` were incorrectly treated as having the first same as +last (FSAL) property. + +Fixed a bug in ARKODE where :c:func:`ARKStepSetInterpolateStopTime` would return +an interpolated solution at the stop time in some cases when interpolation was +disabled. + +Fixed a bug in :c:func:`MRIStepCoupling_Write` where explicit coupling tables +were not written to the output file pointer. + +Fixed a bug in :c:func:`ARKStepSetTableNum` wherein it did not recognize +`ARKODE_ARK2_ERK_3_1_2` and `ARKODE_ARK2_DIRK_3_1_2` as a valid additive +Runge--Kutta Butcher table pair. + +The :c:type:`MRIStepInnerStepper` class in MRIStep was updated to make supplying +an :c:func:`MRIStepInnerFullRhsFn` optional. + +Fixed scaling bug in ``SUNMatScaleAddI_Sparse`` for non-square matrices. + +Fixed missing soversions in some ``SUNLinearSolver`` and ``SUNNonlinearSolver`` +CMake targets. + Changes in v5.6.2 ----------------- @@ -144,9 +210,10 @@ Updated the Tpetra NVector interface to support Trilinos 14. Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper object. -Fixed a bug where the stop time may not be cleared and an unnecessary -interpolation may occur when using normal mode if the requested output time is -the same as the stop time. +Fixed a bug where the stop time may not be cleared when using normal mode if the +requested output time is the same as the stop time. Additionally, this fix +removes an unnecessary interpolation of the solution at the stop time that could +occur in this case. Changes in v5.6.0 ----------------- @@ -964,7 +1031,6 @@ utilize a zero initial guess. A bug was fixed in the ARKODE stepper modules where the stop time may be passed after resetting the integrator. - Changes in v4.7.0 ----------------- diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index ec66f9838b..aa8b389dc8 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -375,10 +375,11 @@ described in the section :numref:`Butcher`. For mixed stiff/nonstiff problems, a user should provide both of the functions :math:`f^E` and :math:`f^I` that define the IVP system. For such problems, ARKStep currently implements the ARK methods proposed in -:cite:p:`KenCarp:03`, allowing for methods having order of accuracy :math:`q = -\{3,4,5\}` and embeddings with orders :math:`p = \{2, 3, 4\}`; -the tables for these methods are given in section :numref:`Butcher.additive`. -Additionally, user-defined ARK tables are supported. +:cite:p:`KenCarp:03,KenCarp:19,giraldo2013implicit`, allowing for methods having +order of accuracy :math:`q = \{2,3,4,5\}` and embeddings with orders :math:`p = +\{1,2,3,4\}`; the tables for these methods are given in section +:numref:`Butcher.additive`. Additionally, user-defined ARK tables are +supported. For nonstiff problems, a user may specify that :math:`f^I = 0`, i.e. the equation :eq:`ARKODE_IMEX_IVP` reduces to the non-split IVP @@ -391,8 +392,8 @@ In this scenario, the coefficients :math:`A^I=0`, :math:`c^I=0`, :math:`b^I=0` and :math:`\tilde{b}^I=0` in :eq:`ARKODE_ARK`, and the ARK methods reduce to classical :index:`explicit Runge--Kutta methods` (ERK). For these classes of methods, ARKODE provides coefficients -with orders of accuracy :math:`q = \{2,3,4,5,6,8\}`, with embeddings -of orders :math:`p = \{1,2,3,4,5,7\}`. These default to the methods in +with orders of accuracy :math:`q = \{2,3,4,5,6,7,8,9\}`, with embeddings +of orders :math:`p = \{1,2,3,4,5,6,7,8\}`. These default to the methods in sections :numref:`Butcher.Heun_Euler`, :numref:`Butcher.Bogacki_Shampine`, :numref:`Butcher.Zonneveld`, @@ -465,39 +466,41 @@ than the more general form :eq:`ARKODE_IVP_simple_explicit`. SPRKStep -- Symplectic Partitioned Runge--Kutta methods ======================================================= -The SPRKStep time-stepping module in ARKODE is designed for IVPs of the form +The SPRKStep time-stepping module in ARKODE is designed for problems where the +state vector is partitioned as .. math:: - \dot{p} = f_1(t, q) = \frac{\partial V(t, q)}{\partial q}, \quad - \dot{q} = f_2(t, p) = \frac{\partial T(t, p)}{\partial p}, - \qquad p(t_0) = p_0,\quad q(t_0) = q_0, - :label: ARKODE_IVP_Hamiltonian + y(t) = + \begin{bmatrix} + p(t) \\ + q(t) + \end{bmatrix} -where the system Hamiltonian +and the component partitioned IVP is given by .. math:: - H(t, p, q) = T(t, p) + V(t, q) + \dot{p} &= f_1(t, q), \qquad p(t_0) = p_0 \\ + \dot{q} &= f_2(t, p), \qquad q(t_0) = q_0. + :label: ARKODE_IVP_SPRK + +The right-hand side functions :math:`f_1(t,p)` and :math:`f_2(t,q)` typically +arise from the **separable** Hamiltonian system -**is separable**. When *H* is autonomous, then *H* is a conserved quantity. -Often this correponds to the conservation of energy (for example, in *n*-body -problems). For non-autonomous *H*, the invariants are no longer directly -obtainable from the Hamiltonian :cite:p:`Struckmeier:02`. +.. math:: + H(t, p, q) = T(t, p) + V(t, q) -In solving the IVP :eq:`ARKODE_IVP_Hamiltonian`, we consider the problem in the form +where .. math:: - \dot{y} = - \begin{bmatrix} - f_1(t, q) \\ - f_2(t, p) - \end{bmatrix}, \qquad - y(t_0) = - \begin{bmatrix} - p_0\\ - q_0 - \end{bmatrix}. + f_1(t, q) \equiv \frac{\partial V(t, q)}{\partial q}, \qquad + f_2(t, p) \equiv \frac{\partial T(t, p)}{\partial p}. -In practice, the ordering of the variables does not matter and is determined by the user. +When *H* is autonomous, then *H* is a conserved quantity. Often this corresponds +to the conservation of energy (for example, in *n*-body problems). For +non-autonomous *H*, the invariants are no longer directly obtainable from the +Hamiltonian :cite:p:`Struckmeier:02`. + +In practice, the ordering of the variables does not matter and is determined by the user. SPRKStep utilizes Symplectic Partitioned Runge-Kutta (SPRK) methods represented by the pair of explicit and diagonally implicit Butcher tableaux, @@ -528,17 +531,18 @@ schemes with order of accuracy and conservation equal to the default methods used are given in the section :numref:`Butcher.sprk`. In the default case, the algorithm for a single time-step is as follows -(for autonomous Hamiltonian systems the times provided to :math:`f1` and :math:`f2` +(for autonomous Hamiltonian systems the times provided to :math:`f_1` and +:math:`f_2` can be ignored). -#. Set :math:`P_0 = p_n, Q_1 = q_n` +#. Set :math:`P_0 = p_{n-1}, Q_1 = q_{n-1}` #. For :math:`i = 1,\ldots,s` do: - #. :math:`P_i = P_{i-1} + h_{n+1} \hat{a}_i f_1(t_n + \hat{c}_i h, Q_i)` - #. :math:`Q_{i+1} = Q_i + h_{n+1} a_i f_2(t_n + c_i h, P_i)` + #. :math:`P_i = P_{i-1} + h_n \hat{a}_i f_1(t_{n-1} + \hat{c}_i h_n, Q_i)` + #. :math:`Q_{i+1} = Q_i + h_n a_i f_2(t_{n-1} + c_i h_n, P_i)` -#. Set :math:`p_{n+1} = P_s, q_{n+1} = Q_{s+1}` +#. Set :math:`p_n = P_s, q_n = Q_{s+1}` .. _ARKODE.Mathematics.SPRKStep.Compensated: @@ -553,12 +557,12 @@ form is used to compute a time step: #. For :math:`i = 1,\ldots,s` do: - #. :math:`\Delta P_i = \Delta P_{i-1} + h_{n+1} \hat{a}_i f_1(t_n + \hat{c}_i h, q_n + \Delta Q_i)` - #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_{n+1} a_i f_2(t_n + c_i h, p_n + \Delta P_i)` + #. :math:`\Delta P_i = \Delta P_{i-1} + h_n \hat{a}_i f_1(t_{n-1} + \hat{c}_i h_n, q_{n-1} + \Delta Q_i)` + #. :math:`\Delta Q_{i+1} = \Delta Q_i + h_n a_i f_2(t_{n-1} + c_i h_n, p_{n-1} + \Delta P_i)` -#. Set :math:`\Delta p_{n+1} = \Delta P_s, \Delta q_{n+1} = \Delta Q_{s+1}` +#. Set :math:`\Delta p_n = \Delta P_s, \Delta q_n = \Delta Q_{s+1}` -#. Using compensated summation, set :math:`p_{n+1} = p_n + \Delta p_{n+1}, q_{n+1} = q_n + \Delta Q_{s+1}` +#. Using compensated summation, set :math:`p_n = p_{n-1} + \Delta p_n, q_n = q_{n-1} + \Delta q_n` Since temporal error based adaptive time-stepping is known to ruin the conservation property :cite:p:`HaWa:06`, SPRKStep employs a fixed time-step size. @@ -705,7 +709,7 @@ characterized by nonzero values on or above the diagonal of the matrices :math:`\Gamma^{\{k\}}`. Typically, MRI-GARK and IMEX-MRI-GARK methods are at most diagonally-implicit (i.e., :math:`\gamma_{i,j}^{\{k\}}=0` for all :math:`j>i`). Furthermore, diagonally-implicit stages are characterized as being -"solve-decoupled" if :math:`\Delta c_i^S = 0` when `\gamma_{i,i}^{\{k\}} \ne 0`, +"solve-decoupled" if :math:`\Delta c_i^S = 0` when :math:`\gamma_{i,i}^{\{k\}} \ne 0`, in which case the stage is computed as standard ARK or DIRK update. Alternately, a diagonally-implicit stage :math:`i` is considered "solve-coupled" if :math:`\Delta c^S_i \gamma_{i,j}^{\{k\}} \ne 0`, in which @@ -902,147 +906,24 @@ steps, :math:`t_{n-3} \to t_{n-2} \to t_{n-1} \to t_n`. These local error history values are all initialized to 1 upon program initialization, to accommodate the few initial time steps of a calculation where some of these error estimates have not yet been -computed. With these estimates, ARKODE supports a variety of error -control algorithms, as specified in the subsections below. - - -.. _ARKODE.Mathematics.Adaptivity.ErrorControl.PID: - -PID controller ------------------ - -This is the default time adaptivity controller used by the ARKStep and -ERKStep modules. It derives from those found in :cite:p:`KenCarp:03`, :cite:p:`Sod:98`, :cite:p:`Sod:03` and -:cite:p:`Sod:06`, and uses all three of the local error estimates -:math:`\varepsilon_n`, :math:`\varepsilon_{n-1}` and -:math:`\varepsilon_{n-2}` in determination of a prospective step size, - -.. math:: - h' \;=\; h_n\; \varepsilon_n^{-k_1/p}\; \varepsilon_{n-1}^{k_2/p}\; - \varepsilon_{n-2}^{-k_3/p}, - -where the constants :math:`k_1`, :math:`k_2` and :math:`k_3` default -to 0.58, 0.21 and 0.1, respectively, and may be modified by the user. -In this estimate, a floor of :math:`\varepsilon > 10^{-10}` is -enforced to avoid division-by-zero errors. - - - -.. _ARKODE.Mathematics.Adaptivity.ErrorControl.PI: - -PI controller ----------------------- - -Like with the previous method, the PI controller derives from those -found in :cite:p:`KenCarp:03`, :cite:p:`Sod:98`, :cite:p:`Sod:03` and :cite:p:`Sod:06`, but it differs in -that it only uses the two most recent step sizes in its adaptivity -algorithm, - -.. math:: - h' \;=\; h_n\; \varepsilon_n^{-k_1/p}\; \varepsilon_{n-1}^{k_2/p}. - -Here, the default values of :math:`k_1` and :math:`k_2` default -to 0.8 and 0.31, respectively, though they may be changed by the user. - - - -.. _ARKODE.Mathematics.Adaptivity.ErrorControl.I: - -I controller ----------------------- - -This is the standard time adaptivity control algorithm in use by most -publicly-available ODE solver codes. It bases the prospective time step -estimate entirely off of the current local error estimate, - -.. math:: - h' \;=\; h_n\; \varepsilon_n^{-k_1/p}. - -By default, :math:`k_1=1`, but that may be modified by the user. - - - - -.. _ARKODE.Mathematics.Adaptivity.ErrorControl.eGus: - -Explicit Gustafsson controller ---------------------------------- - -This step adaptivity algorithm was proposed in :cite:p:`Gust:91`, and -is primarily useful with explicit Runge--Kutta methods. -In the notation of our earlier controllers, it has the form - -.. math:: - h' \;=\; \begin{cases} - h_1\; \varepsilon_1^{-1/p}, &\quad\text{on the first step}, \\ - h_n\; \varepsilon_n^{-k_1/p}\; - \left(\dfrac{\varepsilon_n}{\varepsilon_{n-1}}\right)^{k_2/p}, & - \quad\text{on subsequent steps}. - \end{cases} - :label: ARKODE_expGus - -The default values of :math:`k_1` and :math:`k_2` are 0.367 and 0.268, -respectively, and may be modified by the user. - - - - -.. _ARKODE.Mathematics.Adaptivity.ErrorControl.iGus: - -Implicit Gustafsson controller ---------------------------------- - -A version of the above controller suitable for implicit Runge--Kutta -methods was introduced in :cite:p:`Gust:94`, and has the form - -.. math:: - h' = \begin{cases} - h_1 \varepsilon_1^{-1/p}, &\quad\text{on the first step}, \\ - h_n \left(\dfrac{h_n}{h_{n-1}}\right) \varepsilon_n^{-k_1/p} - \left(\dfrac{\varepsilon_n}{\varepsilon_{n-1}}\right)^{-k_2/p}, & - \quad\text{on subsequent steps}. - \end{cases} - :label: ARKODE_impGus - -The algorithm parameters default to :math:`k_1 = 0.98` and -:math:`k_2 = 0.95`, but may be modified by the user. - - - - -.. _ARKODE.Mathematics.Adaptivity.ErrorControl.ieGus: - -ImEx Gustafsson controller ---------------------------------- - -An ImEx version of these two preceding controllers is also available. -This approach computes the estimates :math:`h'_1` arising from -equation :eq:`ARKODE_expGus` and the estimate :math:`h'_2` arising from -equation :eq:`ARKODE_impGus`, and selects - -.. math:: - h' = \frac{h}{|h|}\min\left\{|h'_1|, |h'_2|\right\}. - -Here, equation :eq:`ARKODE_expGus` uses :math:`k_1` and -:math:`k_2` with default values of 0.367 and 0.268, while equation -:eq:`ARKODE_impGus` sets both parameters to the input :math:`k_3` that -defaults to 0.95. All of these values may be modified by the user. - - - -.. _ARKODE.Mathematics.Adaptivity.ErrorControl.User: +computed. With these estimates, ARKODE supports one of two approaches +for temporal error control. -User-supplied controller ---------------------------------- +First, any valid implementation of the SUNAdaptController class +:numref:`SUNAdaptController.Description` may be used by ARKODE's adaptive +time-stepping modules to provide a candidate error-based prospective step +size :math:`h'`. -Finally, ARKODE's time-stepping modules allow the user to define their -own time step adaptivity function, +Second, ARKODE's adaptive time-stepping modules currently still allow the +user to define their own time step adaptivity function, .. math:: h' = H(y, t, h_n, h_{n-1}, h_{n-2}, \varepsilon_n, \varepsilon_{n-1}, \varepsilon_{n-2}, q, p), -to allow for problem-specific choices, or for continued -experimentation with temporal error controllers. +allowing for problem-specific choices, or for continued +experimentation with temporal error controllers. We note that this +support has been deprecated in favor of the SUNAdaptController class, +and will be removed in a future release. diff --git a/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst index df8a32a095..7b12d500e7 100644 --- a/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst @@ -726,11 +726,8 @@ the user has set a stop time (with a call to the optional input function in :numref:`ARKODE.Mathematics.Interpolation`). The *ARK_ONE_STEP* option tells the solver to only take a - single internal step :math:`y_{n-1} \to y_{n}` and then return - control back to the calling program. If this step will - overtake *tout* then the solver will again return an - interpolated result; otherwise it will return a copy of the - internal solution :math:`y_{n}` in the vector *yout*. + single internal step, :math:`y_{n-1} \to y_{n}`, and return the solution + at that point, :math:`y_{n}`, in the vector *yout*. **Return value:** * *ARK_SUCCESS* if successful. @@ -795,8 +792,8 @@ the user has set a stop time (with a call to the optional input function only to get the direction and a rough scale of the independent variable. - All failure return values are negative and so testing the return argument for - negative values will trap all :c:func:`ARKStepEvolve()` failures. + All failure return values are negative and so testing the return argument + for negative values will trap all :c:func:`ARKStepEvolve()` failures. Since interpolation may reduce the accuracy in the reported solution, if full method accuracy is desired the user should issue @@ -1110,8 +1107,9 @@ Set max number of constraint failures :c:func:`ARKStepSetMaxNumConst :c:func:`ARKStepSetMaxGrowth()`, :c:func:`ARKStepSetMinReduction()`, :c:func:`ARKStepSetSafetyFactor()`, - :c:func:`ARKStepSetSmallNumEFails()` and - :c:func:`ARKStepSetStabilityFn()` + :c:func:`ARKStepSetSmallNumEFails()`, + :c:func:`ARKStepSetStabilityFn()`, and + :c:func:`ARKStepSetAdaptController()` will be ignored, since temporal adaptivity is disabled. If both :c:func:`ARKStepSetFixedStep()` and @@ -1691,26 +1689,44 @@ the code, is provided in :numref:`ARKODE.Mathematics.Adaptivity`. .. cssclass:: table-bordered -======================================================== ====================================== ======== -Optional input Function name Default -======================================================== ====================================== ======== -Set a custom time step adaptivity function :c:func:`ARKStepSetAdaptivityFn()` internal -Choose an existing time step adaptivity method :c:func:`ARKStepSetAdaptivityMethod()` 0 -Explicit stability safety factor :c:func:`ARKStepSetCFLFraction()` 0.5 -Time step error bias factor :c:func:`ARKStepSetErrorBias()` 1.5 -Bounds determining no change in step size :c:func:`ARKStepSetFixedStepBounds()` 1.0 1.5 -Maximum step growth factor on convergence fail :c:func:`ARKStepSetMaxCFailGrowth()` 0.25 -Maximum step growth factor on error test fail :c:func:`ARKStepSetMaxEFailGrowth()` 0.3 -Maximum first step growth factor :c:func:`ARKStepSetMaxFirstGrowth()` 10000.0 -Maximum allowed general step growth factor :c:func:`ARKStepSetMaxGrowth()` 20.0 -Minimum allowed step reduction factor on error test fail :c:func:`ARKStepSetMinReduction()` 0.1 -Time step safety factor :c:func:`ARKStepSetSafetyFactor()` 0.96 -Error fails before MaxEFailGrowth takes effect :c:func:`ARKStepSetSmallNumEFails()` 2 -Explicit stability function :c:func:`ARKStepSetStabilityFn()` none -======================================================== ====================================== ======== +========================================================= ========================================== ======== +Optional input Function name Default +========================================================= ========================================== ======== +Provide a :c:type:`SUNAdaptController` for ARKStep to use :c:func:`ARKStepSetAdaptController()` PID +Set a custom time step adaptivity function :c:func:`ARKStepSetAdaptivityFn()` internal +Choose an existing time step adaptivity method :c:func:`ARKStepSetAdaptivityMethod()` 0 +Adjust the method order used in the controller :c:func:`ERKStepSetAdaptivityAdjustment()` -1 +Explicit stability safety factor :c:func:`ARKStepSetCFLFraction()` 0.5 +Time step error bias factor :c:func:`ARKStepSetErrorBias()` 1.5 +Bounds determining no change in step size :c:func:`ARKStepSetFixedStepBounds()` 1.0 1.5 +Maximum step growth factor on convergence fail :c:func:`ARKStepSetMaxCFailGrowth()` 0.25 +Maximum step growth factor on error test fail :c:func:`ARKStepSetMaxEFailGrowth()` 0.3 +Maximum first step growth factor :c:func:`ARKStepSetMaxFirstGrowth()` 10000.0 +Maximum allowed general step growth factor :c:func:`ARKStepSetMaxGrowth()` 20.0 +Minimum allowed step reduction factor on error test fail :c:func:`ARKStepSetMinReduction()` 0.1 +Time step safety factor :c:func:`ARKStepSetSafetyFactor()` 0.96 +Error fails before MaxEFailGrowth takes effect :c:func:`ARKStepSetSmallNumEFails()` 2 +Explicit stability function :c:func:`ARKStepSetStabilityFn()` none +========================================================= ========================================== ======== +.. c:function:: int ARKStepSetAdaptController(void* arkode_mem, SUNAdaptController C) + + Sets a user-supplied time-step controller object. + + **Arguments:** + * *arkode_mem* -- pointer to the ARKStep memory block. + * *C* -- user-supplied time adaptivity controller. If ``NULL`` then the PID controller will be created (see :numref:`SUNAdaptController.Soderlind`). + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ARKStep memory is ``NULL`` + * *ARK_MEM_FAIL* if *C* was ``NULL`` and the PID controller could not be allocated. + + .. versionadded:: 5.7.0 + + .. c:function:: int ARKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data) Sets a user-supplied time-step adaptivity function. @@ -1732,6 +1748,11 @@ Explicit stability function :c:func:`ARKStepSetSt :c:func:`ARKStepSetStabilityFn()` should be used instead. + .. deprecated:: 5.7.0 + + Use the SUNAdaptController infrastructure instead (see :numref:`SUNAdaptController.Description`). + + .. c:function:: int ARKStepSetAdaptivityMethod(void* arkode_mem, int imethod, int idefault, int pq, realtype* adapt_params) @@ -1747,7 +1768,8 @@ Explicit stability function :c:func:`ARKStepSetSt parameters (1), or that they will be supplied in the *adapt_params* argument (0). * *pq* -- flag denoting whether to use the embedding order of - accuracy *p* (0) or the method order of accuracy *q* (1) + accuracy *p* (0), the method order of accuracy *q* (1), or the + minimum of the two (any input not equal to 0 or 1) within the adaptivity algorithm. *p* is the default. * *adapt_params[0]* -- :math:`k_1` parameter within accuracy-based adaptivity algorithms. * *adapt_params[1]* -- :math:`k_2` parameter within accuracy-based adaptivity algorithms. @@ -1764,8 +1786,40 @@ Explicit stability function :c:func:`ARKStepSetSt parameter values are desired, it is recommended to instead provide a custom function through a call to :c:func:`ARKStepSetAdaptivityFn()`. + .. versionchanged:: 5.7.0 + + Prior to version 5.7.0, any nonzero value for *pq* would result in use of the + embedding order of accuracy. + + + .. deprecated:: 5.7.0 + + Use the SUNAdaptController infrastructure instead (see :numref:`SUNAdaptController.Description`). + +.. c:function:: int ARKStepSetAdaptivityAdjustment(void* arkode_mem, int adjust) + + Called by a user to adjust the method order supplied to the temporal adaptivity + controller. For example, if the user expects order reduction due to problem stiffness, + they may request that the controller assume a reduced order of accuracy for the method + by specifying a value :math:`adjust < 0`. + + **Arguments:** + * *arkode_mem* -- pointer to the ARKStep memory block. + * *adjust* -- adjustment factor (default is -1). + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ARKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + This should be called prior to calling :c:func:`ARKStepEvolve()`, and can only be + reset following a call to :c:func:`ARKStepReInit()`. + + .. versionadded:: 5.7.0 + .. c:function:: int ARKStepSetCFLFraction(void* arkode_mem, realtype cfl_frac) Specifies the fraction of the estimated explicitly stable step to use. @@ -1803,6 +1857,13 @@ Explicit stability function :c:func:`ARKStepSetSt **Notes:** Any value below 1.0 will imply a reset to the default value. + If both this and one of :c:func:`ARKStepSetAdaptivityMethod` or + :c:func:`ARKStepSetAdaptController` will be called, then this routine must be called + *second*. + + .. deprecated:: 5.7.0 + + Use the SUNAdaptController infrastructure instead (see :numref:`SUNAdaptController.Description`). .. c:function:: int ARKStepSetFixedStepBounds(void* arkode_mem, realtype lb, realtype ub) diff --git a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst index d8782622a6..ed98810913 100644 --- a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst @@ -352,11 +352,8 @@ has requested rootfinding. :numref:`ARKODE.Mathematics.Interpolation`). The *ARK_ONE_STEP* option tells the solver to only take a - single internal step :math:`y_{n-1} \to y_{n}` and then return - control back to the calling program. If this step will - overtake *tout* then the solver will again return an - interpolated result; otherwise it will return a copy of the - internal solution :math:`y_{n}` in the vector *yout*. + single internal step, :math:`y_{n-1} \to y_{n}`, and return the solution + at that point, :math:`y_{n}`, in the vector *yout*. **Return value:** * *ARK_SUCCESS* if successful. @@ -399,7 +396,9 @@ has requested rootfinding. In *ARK_ONE_STEP* mode, *tout* is used only on the first call, and only to get the direction and a rough scale of the independent - variable. All failure return values are negative and so testing the + variable. + + All failure return values are negative and so testing the return argument for negative values will trap all :c:func:`ERKStepEvolve()` failures. @@ -732,8 +731,9 @@ Optional inputs for ERKStep :c:func:`ERKStepSetMaxGrowth()`, :c:func:`ERKStepSetMinReduction()`, :c:func:`ERKStepSetSafetyFactor()`, - :c:func:`ERKStepSetSmallNumEFails()` and - :c:func:`ERKStepSetStabilityFn()` + :c:func:`ERKStepSetSmallNumEFails()`, + :c:func:`ERKStepSetStabilityFn()`, and + :c:func:`ERKStepSetAdaptController()` will be ignored, since temporal adaptivity is disabled. If both :c:func:`ERKStepSetFixedStep()` and @@ -1159,34 +1159,59 @@ the code, is provided in :numref:`ARKODE.Mathematics.Adaptivity`. .. _ARKODE.Usage.ERKStep.ERKStepAdaptivityInputTable: .. table:: Optional inputs for time step adaptivity - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Optional input | Function name | Default | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Set a custom time step adaptivity function | :c:func:`ERKStepSetAdaptivityFn()` | internal | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Choose an existing time step adaptivity method | :c:func:`ERKStepSetAdaptivityMethod()` | 0 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Explicit stability safety factor | :c:func:`ERKStepSetCFLFraction()` | 0.5 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Time step error bias factor | :c:func:`ERKStepSetErrorBias()` | 1.5 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Bounds determining no change in step size | :c:func:`ERKStepSetFixedStepBounds()` | 1.0 1.5 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Maximum step growth factor on error test fail | :c:func:`ERKStepSetMaxEFailGrowth()` | 0.3 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Maximum first step growth factor | :c:func:`ERKStepSetMaxFirstGrowth()` | 10000.0 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Maximum allowed general step growth factor | :c:func:`ERKStepSetMaxGrowth()` | 20.0 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Minimum allowed step reduction factor on error test fail | :c:func:`ERKStepSetMinReduction()` | 0.1 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Time step safety factor | :c:func:`ERKStepSetSafetyFactor()` | 0.96 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Error fails before MaxEFailGrowth takes effect | :c:func:`ERKStepSetSmallNumEFails()` | 2 | - +-----------------------------------------------------------+----------------------------------------+-----------+ - | Explicit stability function | :c:func:`ERKStepSetStabilityFn()` | none | - +-----------------------------------------------------------+----------------------------------------+-----------+ + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Optional input | Function name | Default | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Provide a :c:type:`SUNAdaptController` for ERKStep to use | :c:func:`ERKStepSetAdaptController()` | PI | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Set a custom time step adaptivity function | :c:func:`ERKStepSetAdaptivityFn()` | internal | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Choose an existing time step adaptivity method | :c:func:`ERKStepSetAdaptivityMethod()` | 0 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Adjust the method order used in the controller | :c:func:`ERKStepSetAdaptivityAdjustment()` | -1 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Explicit stability safety factor | :c:func:`ERKStepSetCFLFraction()` | 0.5 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Time step error bias factor | :c:func:`ERKStepSetErrorBias()` | 1.5 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Bounds determining no change in step size | :c:func:`ERKStepSetFixedStepBounds()` | 1.0 1.5 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Maximum step growth factor on error test fail | :c:func:`ERKStepSetMaxEFailGrowth()` | 0.3 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Maximum first step growth factor | :c:func:`ERKStepSetMaxFirstGrowth()` | 10000.0 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Maximum allowed general step growth factor | :c:func:`ERKStepSetMaxGrowth()` | 20.0 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Minimum allowed step reduction factor on error test fail | :c:func:`ERKStepSetMinReduction()` | 0.1 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Time step safety factor | :c:func:`ERKStepSetSafetyFactor()` | 0.96 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Error fails before MaxEFailGrowth takes effect | :c:func:`ERKStepSetSmallNumEFails()` | 2 | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + | Explicit stability function | :c:func:`ERKStepSetStabilityFn()` | none | + +-----------------------------------------------------------+--------------------------------------------+-----------+ + + +.. c:function:: int ERKStepSetAdaptController(void* arkode_mem, SUNAdaptController C) + + Sets a user-supplied time-step controller object. + + **Arguments:** + * *arkode_mem* -- pointer to the ERKStep memory block. + * *C* -- user-supplied time adaptivity controller. If ``NULL`` then the PID controller will be created (see :numref:`SUNAdaptController.Soderlind`). + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ERKStep memory is ``NULL`` + * *ARK_MEM_FAIL* if *C* was ``NULL`` and the PID controller could not be allocated. + + **Notes:** + When *C* is ``NULL``, the PID controller that is created is not the same as the ERKStep default (PI). + To reset ERKStep to its default behavior after a non-default controller has been used, users should either + specifically create the PI controller *C* and attach it here, or call :c:func:`ERKStepSetDefaults()`. + + .. versionadded:: 5.7.0 .. c:function:: int ERKStepSetAdaptivityFn(void* arkode_mem, ARKAdaptFn hfun, void* h_data) @@ -1210,6 +1235,10 @@ the code, is provided in :numref:`ARKODE.Mathematics.Adaptivity`. :c:func:`ERKStepSetStabilityFn()` should be used instead. + .. deprecated:: 5.7.0 + + Use the SUNAdaptController infrastructure instead (see :numref:`SUNAdaptController.Description`). + .. c:function:: int ERKStepSetAdaptivityMethod(void* arkode_mem, int imethod, int idefault, int pq, realtype* adapt_params) @@ -1225,7 +1254,8 @@ the code, is provided in :numref:`ARKODE.Mathematics.Adaptivity`. parameters (1), or that they will be supplied in the *adapt_params* argument (0). * *pq* -- flag denoting whether to use the embedding order of - accuracy *p* (0) or the method order of accuracy *q* (1) + accuracy *p* (0), the method order of accuracy *q* (1), or the + minimum of the two (any input not equal to 0 or 1) within the adaptivity algorithm. *p* is the default. * *adapt_params[0]* -- :math:`k_1` parameter within accuracy-based adaptivity algorithms. * *adapt_params[1]* -- :math:`k_2` parameter within accuracy-based adaptivity algorithms. @@ -1242,7 +1272,37 @@ the code, is provided in :numref:`ARKODE.Mathematics.Adaptivity`. parameter values are desired, it is recommended to instead provide a custom function through a call to :c:func:`ERKStepSetAdaptivityFn()`. + .. versionchanged:: 5.7.0 + + Prior to version 5.7.0, any nonzero value for *pq* would result in use of the + embedding order of accuracy. + + .. deprecated:: 5.7.0 + Use the SUNAdaptController infrastructure instead (see :numref:`SUNAdaptController.Description`). + + +.. c:function:: int ERKStepSetAdaptivityAdjustment(void* arkode_mem, int adjust) + + Called by a user to adjust the method order supplied to the temporal adaptivity + controller. For example, if the user expects order reduction due to problem stiffness, + they may request that the controller assume a reduced order of accuracy for the method + by specifying a value :math:`adjust < 0`. + + **Arguments:** + * *arkode_mem* -- pointer to the ERKStep memory block. + * *adjust* -- adjustment factor (default is -1). + + **Return value:** + * *ARK_SUCCESS* if successful + * *ARK_MEM_NULL* if the ERKStep memory is ``NULL`` + * *ARK_ILL_INPUT* if an argument has an illegal value + + **Notes:** + This should be called prior to calling :c:func:`ERKStepEvolve()`, and can only be + reset following a call to :c:func:`ERKStepReInit()`. + + .. versionadded:: 5.7.0 .. c:function:: int ERKStepSetCFLFraction(void* arkode_mem, realtype cfl_frac) @@ -1281,6 +1341,14 @@ the code, is provided in :numref:`ARKODE.Mathematics.Adaptivity`. **Notes:** Any value below 1.0 will imply a reset to the default value. + If both this and one of :c:func:`ERKStepSetAdaptivityMethod` or + :c:func:`ERKStepSetAdaptController` will be called, then this routine must be called + *second*. + + .. deprecated:: 5.7.0 + + Use the SUNAdaptController infrastructure instead (see :numref:`SUNAdaptController.Description`). + .. c:function:: int ERKStepSetFixedStepBounds(void* arkode_mem, realtype lb, realtype ub) diff --git a/doc/arkode/guide/source/Usage/MRIStep_c_interface/Custom_Inner_Stepper/Description.rst b/doc/arkode/guide/source/Usage/MRIStep_c_interface/Custom_Inner_Stepper/Description.rst index 4fd6f14b53..ceba8ea9e7 100644 --- a/doc/arkode/guide/source/Usage/MRIStep_c_interface/Custom_Inner_Stepper/Description.rst +++ b/doc/arkode/guide/source/Usage/MRIStep_c_interface/Custom_Inner_Stepper/Description.rst @@ -365,6 +365,11 @@ member functions: **Example codes:** * ``examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp`` +Optional Member Functions +""""""""""""""""""""""""" + +An :c:type:`MRIStepInnerStepper` *may* provide implementations of any of the +following member functions: .. c:type:: int (*MRIStepInnerFullRhsFn)(MRIStepInnerStepper stepper, realtype t, N_Vector v, N_Vector f, int mode) @@ -393,11 +398,9 @@ member functions: **Example codes:** * ``examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp`` -Optional Member Functions -""""""""""""""""""""""""" + .. versionchanged:: v5.7.0 -An :c:type:`MRIStepInnerStepper` *may* provide implementations of any of the -following member functions: + Supplying a full right-hand side function was made optional. .. c:type:: int (*MRIStepInnerResetFn)(MRIStepInnerStepper stepper, realtype tR, N_Vector vR) diff --git a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst index 2daf213487..e39f20bbbf 100644 --- a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst @@ -545,11 +545,8 @@ the user has set a stop time (with a call to the optional input function in :numref:`ARKODE.Mathematics.Interpolation`). The *ARK_ONE_STEP* option tells the solver to only take a - single internal step :math:`y_{n-1} \to y_{n}` and then return - control back to the calling program. If this step will - overtake *tout* then the solver will again return an - interpolated result; otherwise it will return a copy of the - internal solution :math:`y_{n}` in the vector *yout*. + single internal step, :math:`y_{n-1} \to y_{n}`, and return the solution + at that point, :math:`y_{n}`, in the vector *yout*. **Return value:** * *ARK_SUCCESS* if successful. @@ -604,8 +601,8 @@ the user has set a stop time (with a call to the optional input function only to get the direction and a rough scale of the independent variable. - All failure return values are negative and so testing the return argument for - negative values will trap all :c:func:`MRIStepEvolve()` failures. + All failure return values are negative and so testing the return argument + for negative values will trap all :c:func:`MRIStepEvolve()` failures. Since interpolation may reduce the accuracy in the reported solution, if full method accuracy is desired the user should issue diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 1450ea2c64..28fb2f2ca8 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -152,11 +152,8 @@ has requested rootfinding. :numref:`ARKODE.Mathematics.Interpolation`). The *ARK_ONE_STEP* option tells the solver to only take a - single internal step :math:`y_{n-1} \to y_{n}` and then return - control back to the calling program. If this step will - overtake *tout* then the solver will again return an - interpolated result; otherwise it will return a copy of the - internal solution :math:`y_{n}` in the vector *yout*. + single internal step, :math:`y_{n-1} \to y_{n}`, and return the + solution at that point, :math:`y_{n}`, in the vector *yout*. :retval ARK_SUCCESS: if successful. :retval ARK_ROOT_RETURN: if :c:func:`SPRKStepEvolve()` succeeded, and @@ -191,7 +188,9 @@ has requested rootfinding. In *ARK_ONE_STEP* mode, *tout* is used only on the first call, and only to get the direction and a rough scale of the independent - variable. All failure return values are negative and so testing the + variable. + + All failure return values are negative and so testing the return argument for negative values will trap all :c:func:`SPRKStepEvolve()` failures. diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst index dc35fb2030..ed65b70324 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/index.rst @@ -17,19 +17,19 @@ Using the SPRKStep time-stepping module ========================================== This chapter is concerned with the use of the SPRKStep time-stepping module for -the solution of Hamiltonian initial value problems (IVPs) of the form -:eq:`ARKODE_IVP_Hamiltonian` in a C or C++ language setting. The following sections +the solution of initial value problems (IVPs) of the form +:eq:`ARKODE_IVP_SPRK` in a C or C++ language setting. The following sections discuss the header files and the layout of the user's main program, and provide descriptions of the SPRKStep user-callable functions and user-supplied functions. -The example programs located in the source code ``examples/arkode`` folder, may +The example programs located in the source code ``examples/arkode`` folder, may be helpful as templates for new codes. In particular, * ``examples/arkode/C_serial/ark_harmonic_symplectic.c`` * ``examples/arkode/C_serial/ark_damped_harmonic_symplectic.c``, and * ``examples/arkode/C_serial/ark_kepler.c`` -demonstrate ``SPRKStep`` usage. +demonstrate ``SPRKStep`` usage. SPRKStep uses the input and output constants from the shared ARKODE infrastructure. These are defined as needed in this chapter, but for convenience the full list is diff --git a/doc/arkode/guide/source/index.rst b/doc/arkode/guide/source/index.rst index fd61ab5981..4d4828f787 100644 --- a/doc/arkode/guide/source/index.rst +++ b/doc/arkode/guide/source/index.rst @@ -28,7 +28,7 @@ to have a similar user experience to the `CVODE solver, including user modes to allow adaptive integration to specified output times, return after each internal step and root-finding capabilities, and for calculations in serial, using shared-memory -parallelism (via OpenMP, Pthreads, CUDA, Raja) or distributed-memory +parallelism (e.g., via OpenMP, CUDA, Raja, Kokkos) or distributed-memory parallelism (via MPI). The default integration and solver options should apply to most users, though control over nearly all internal parameters and time adaptivity algorithms is enabled through optional @@ -64,6 +64,7 @@ with support by the `US Department of Energy `_, sunmatrix/index.rst sunlinsol/index.rst sunnonlinsol/index.rst + sunadaptcontroller/index.rst sunmemory/index.rst Install_link.rst Constants diff --git a/doc/arkode/guide/source/nvectors/ARKODE_requirements.rst b/doc/arkode/guide/source/nvectors/ARKODE_requirements.rst index 22718c5c86..6c7e5e2f26 100644 --- a/doc/arkode/guide/source/nvectors/ARKODE_requirements.rst +++ b/doc/arkode/guide/source/nvectors/ARKODE_requirements.rst @@ -20,10 +20,13 @@ NVECTOR functions required by ARKODE In :numref:`NVectors.ARKODE.Table` below, we list the vector functions in the ``N_Vector`` module that are called within the ARKODE package. The table also shows, for each function, which ARKODE module uses the function. -The ARKSTEP and ERKSTEP columns show function usage within the main -time-stepping modules and the shared ARKODE infrastructure, while the -remaining columns show function usage within the ARKLS linear solver -interface, the ARKBANDPRE and ARKBBDPRE preconditioner modules. +The ARKStep, ERKStep, MRIStep, and SPRKStep columns show function usage +within the main time-stepping modules and the shared ARKODE infrastructure, +while the remaining columns show function usage within the ARKLS linear solver +interface, within constraint-handling (i.e., when :c:func:`ARKStepSetConstraints` +and :c:func:`ERKStepSetConstraints` are used), relaxation (i.e., when +:c:func:`ARKStepSetRelaxFn`, :c:func:`ERKStepSetRelaxFn` and related are used), +the ARKBANDPRE and ARKBBDPRE preconditioner modules. Note that for ARKLS we only list the ``N_Vector`` routines used directly by ARKLS, each ``SUNLinearSolver`` module may have additional @@ -48,31 +51,55 @@ modules). .. _NVectors.ARKODE.Table: .. table:: List of vector functions usage by ARKODE code modules - ======================================== ======= ======= ======= ===== ========== ========= - Routine ARKSTEP ERKSTEP MRISTEP ARKLS ARKBANDPRE ARKBBDPRE - ======================================== ======= ======= ======= ===== ========== ========= - :c:func:`N_VGetLength` 4 - :c:func:`N_VAbs` X X - :c:func:`N_VAddConst` X X - :c:func:`N_VClone` X X X X - :c:func:`N_VCloneEmpty` - :c:func:`N_VConst` X X X X - :c:func:`N_VDestroy` X X X X - :c:func:`N_VDiv` X X - :c:func:`N_VGetArrayPointer` 1 X X - :c:func:`N_VInv` X X - :c:func:`N_VLinearSum` X X X X - :c:func:`N_VMaxNorm` X X - :c:func:`N_VMin` X X - :c:func:`N_VScale` X X X X X X - :c:func:`N_VSetArrayPointer` 1 - :c:func:`N_VSpace`\ :sup:`2` X X X X X X - :c:func:`N_VWrmsNorm` X X X X X X - :c:func:`N_VLinearCombination`\ :sup:`3` X X X - :c:func:`N_VMinQuotient`\ :sup:`5` X X - :c:func:`N_VConstrMask`\ :sup:`5` X X - :c:func:`N_VCompare`\ :sup:`5` X X - ======================================== ======= ======= ======= ===== ========== ========= + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | | | | | | | | | BBDPRE, | + | Routine | ARKStep | ERKStep | MRIStep | SPRKStep | ARKLS | Constraints | Relaxation | BANDPRE | + +==========================================+=========+=========+=========+==========+=======+=============+============+=========+ + | :c:func:`N_VAbs` | X | X | X | X | | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VAddConst` | X | X | X | X | | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VClone` | X | X | X | X | X | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VCloneEmpty` | | | | | 1 | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VConst` | X | X | X | X | X | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VConstrMask` | | | | | | X | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VDestroy` | X | X | X | X | X | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VDiv` | X | X | | | | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VDotProd` | | | | | | | X | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VGetArrayPointer` | | | | | 1 | | | X | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VGetLength` | | | | | 4 | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VInv` | X | X | X | X | | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VLinearCombination`\ :sup:`3` | X | X | X | X | | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VLinearSum` | X | X | X | X | X | | X | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VMaxNorm` | X | X | | | | X | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VMin` | X | X | X | X | | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VMinQuotient` | | | | | | X | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VProd` | | | | | | X | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VScale` | X | X | X | X | X | X | X | X | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VSetArrayPointer` | | | | | 1 | | | | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VSpace`\ :sup:`2` | X | X | X | X | X | | | X | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + | :c:func:`N_VWrmsNorm` | X | X | X | X | X | | | X | + +------------------------------------------+---------+---------+---------+----------+-------+-------------+------------+---------+ + Special cases (numbers match markings in table): @@ -88,7 +115,3 @@ Special cases (numbers match markings in table): 4. The :c:func:`N_VGetLength()` function is only required when an iterative or matrix iterative ``SUNLinearSolver`` module is used. - -5. The functions :c:func:`N_VMinQuotient`, :c:func:`N_VConstrMask`, and - :c:func:`N_VCompare` are only used when inequality constraints are enabled - and may be omitted if this feature is not used. diff --git a/doc/arkode/guide/source/sunadaptcontroller/SUNAdaptController_links.rst b/doc/arkode/guide/source/sunadaptcontroller/SUNAdaptController_links.rst new file mode 100644 index 0000000000..949d84196f --- /dev/null +++ b/doc/arkode/guide/source/sunadaptcontroller/SUNAdaptController_links.rst @@ -0,0 +1,15 @@ +.. ---------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2002-2023, Lawrence Livermore National Security + and Southern Methodist University. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ---------------------------------------------------------------- + +.. include:: ../../../../shared/sunadaptcontroller/SUNAdaptController_Description.rst +.. include:: ../../../../shared/sunadaptcontroller/SUNAdaptController_Soderlind.rst +.. include:: ../../../../shared/sunadaptcontroller/SUNAdaptController_ImExGus.rst diff --git a/doc/arkode/guide/source/sunadaptcontroller/index.rst b/doc/arkode/guide/source/sunadaptcontroller/index.rst new file mode 100644 index 0000000000..bd4ab38d7b --- /dev/null +++ b/doc/arkode/guide/source/sunadaptcontroller/index.rst @@ -0,0 +1,29 @@ +.. ---------------------------------------------------------------- + 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 + ---------------------------------------------------------------- + +.. _SUNAdaptController: + +##################################### +Time Step Adaptivity Controllers +##################################### + +The SUNDIALS library comes packaged with a variety of :c:type:`SUNAdaptController` +implementations, designed to support various forms of error-based time step +adaptivity within SUNDIALS time integrators. To support applications that may +want to adjust the controller parameters or provide their own implementations, +SUNDIALS defines the :c:type:`SUNAdaptController` base class, along with a +variety of default implementations. + +.. toctree:: + :maxdepth: 1 + + SUNAdaptController_links.rst diff --git a/doc/cvode/Makefile b/doc/cvode/Makefile index b91bc99ff1..00a00a83c0 100644 --- a/doc/cvode/Makefile +++ b/doc/cvode/Makefile @@ -22,7 +22,9 @@ cv_ex_intro.tex \ cv_ex_serial.tex \ cv_ex_parallel.tex \ cv_ex_parhyp.tex \ -cv_ex_fortran.tex \ cv_ex_tests.tex +# Remove F77 example text +# cv_ex_fortran.tex \ + include ../Makefile.in diff --git a/doc/cvode/cv_ex_codes.tex b/doc/cvode/cv_ex_codes.tex index d30aabcd91..7b3af9d9ae 100644 --- a/doc/cvode/cv_ex_codes.tex +++ b/doc/cvode/cv_ex_codes.tex @@ -30,14 +30,12 @@ \section{Listing of cvDiurnal\_kry\_bbd\_p.c}\label{s:cvDiurnal_bbd_p_c} %% Fortran examples -\lstset{language=[77]Fortran} - -\newpage -\section{Listing of fcvDiurnal\_kry.f}\label{s:fcvDiurnal_f} -\includeCode{../../examples/cvode/fcmix_serial/fcvDiurnal_kry.f} - -\newpage -\section{Listing of fcvDiag\_kry\_bbd\_p.f}\label{s:fcvDiag_bbd_p_f} -\includeCode{../../examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p.f} +%% \lstset{language=[77]Fortran} +%% \newpage +%% \section{Listing of fcvDiurnal\_kry.f}\label{s:fcvDiurnal_f} +%% \includeCode{../../examples/cvode/fcmix_serial/fcvDiurnal_kry.f} +%% \newpage +%% \section{Listing of fcvDiag\_kry\_bbd\_p.f}\label{s:fcvDiag_bbd_p_f} +%% \includeCode{../../examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p.f} diff --git a/doc/cvode/cv_ex_intro.tex b/doc/cvode/cv_ex_intro.tex index f06936ff22..e761486efd 100644 --- a/doc/cvode/cv_ex_intro.tex +++ b/doc/cvode/cv_ex_intro.tex @@ -7,9 +7,9 @@ \section{Introduction}\label{s:ex_intro} listings, on the example programs supplied with the {\cvode} distribution package. -The {\cvode} distribution contains examples of six types: serial -{\CC} examples, parallel {\CC} examples, serial and parallel {\F} -examples, an OpenMP example, and a {\hypre} example. +The {\cvode} distribution contains examples of the following types: serial +{\CC} examples, parallel {\CC} examples, an OpenMP example, and a {\hypre} +example. %% With the exception of ''demo''-type example files, the names of all the examples distributed with {\sundials} are of the form \verb![slv][PbName]_[ls]_[prec]_[p]!, @@ -159,28 +159,28 @@ \section{Introduction}\label{s:ex_intro} \id{cvAdvDiff\_non\_p} but with {\hypre} vectors instead of {\sundials} parallel vectors. -\vspace{0.2in}\noindent -As part of the {\fcvode} module, in the directories -{\em srcdir}\id{/examples/cvode/fcmix\_serial} and -{\em srcdir}\id{/examples/cvode/fcmix\_parallel}, are the following examples for -the {\F}-{\CC} interface. The first five of these are serial, while -the last three are parallel. -\begin{itemize} -\item \id{fcvRoberts\_dns} is a serial chemical kinetics example (\id{BDF}/{\sunlinsoldense}) - with rootfinding. -\item \id{fcvRoberts\_dns\_constraints} is the same as \id{fcvRoberts\_dns} but - but imposes the constraint $u \geq 0.0$ for all components. -\item \id{fcvRoberts\_dnsL} is the same as \id{fcvRoberts\_dns} but uses the Lapack - implementation of {\sunlinsollapdense}. -\item \id{fcvAdvDiff\_bnd} is a serial advection-diffusion example (\id{BDF}/{\sunlinsolband}). -\item \id{fcvDiurnal\_kry} is a serial kinetics-transport example (\id{BDF}/{\sunlinsolspgmr}). -\item \id{fcvDiurnal\_kry\_bp} is the \id{fcvDiurnal\_kry} example with {\fcvbp}. -\item \id{fcvDiag\_non\_p} is a nonstiff parallel diagonal ODE example - (\id{ADAMS}/\id{FIXEDPOINT}). -\item \id{fcvDiag\_kry\_p} is a stiff parallel diagonal ODE example (\id{BDF}/{\sunlinsolspgmr}). -\item \id{fcvDiag\_kry\_bbd\_p} is the same as the \id{fcvDiag\_kry\_p} example - but using the {\fcvbbd} module. -\end{itemize} +%% \vspace{0.2in}\noindent +%% As part of the {\fcvode} module, in the directories +%% {\em srcdir}\id{/examples/cvode/fcmix\_serial} and +%% {\em srcdir}\id{/examples/cvode/fcmix\_parallel}, are the following examples for +%% the {\F}-{\CC} interface. The first five of these are serial, while +%% the last three are parallel. +%% \begin{itemize} +%% \item \id{fcvRoberts\_dns} is a serial chemical kinetics example (\id{BDF}/{\sunlinsoldense}) +%% with rootfinding. +%% \item \id{fcvRoberts\_dns\_constraints} is the same as \id{fcvRoberts\_dns} but +%% but imposes the constraint $u \geq 0.0$ for all components. +%% \item \id{fcvRoberts\_dnsL} is the same as \id{fcvRoberts\_dns} but uses the Lapack +%% implementation of {\sunlinsollapdense}. +%% \item \id{fcvAdvDiff\_bnd} is a serial advection-diffusion example (\id{BDF}/{\sunlinsolband}). +%% \item \id{fcvDiurnal\_kry} is a serial kinetics-transport example (\id{BDF}/{\sunlinsolspgmr}). +%% \item \id{fcvDiurnal\_kry\_bp} is the \id{fcvDiurnal\_kry} example with {\fcvbp}. +%% \item \id{fcvDiag\_non\_p} is a nonstiff parallel diagonal ODE example +%% (\id{ADAMS}/\id{FIXEDPOINT}). +%% \item \id{fcvDiag\_kry\_p} is a stiff parallel diagonal ODE example (\id{BDF}/{\sunlinsolspgmr}). +%% \item \id{fcvDiag\_kry\_bbd\_p} is the same as the \id{fcvDiag\_kry\_p} example +%% but using the {\fcvbbd} module. +%% \end{itemize} \vspace{0.2in}\noindent In the following sections, we give detailed descriptions of some (but diff --git a/doc/cvode/cv_examples.tex b/doc/cvode/cv_examples.tex index 0ba4e68c28..51800eb32f 100644 --- a/doc/cvode/cv_examples.tex +++ b/doc/cvode/cv_examples.tex @@ -5,7 +5,7 @@ \externaldocument{install} \externaldocument{cv_math} \externaldocument{cv_usage} -\externaldocument{cv_fcmix} +%\externaldocument{cv_fcmix} \externaldocument{cv_nvec} \externaldocument{cv_sunmat} \externaldocument{cv_sunlinsol} @@ -40,7 +40,7 @@ \include{cv_ex_parhyp} \include{cv_ex_cuda} \include{cv_ex_raja} -\include{cv_ex_fortran} +%\include{cv_ex_fortran} \include{cv_ex_tests} %=============================================================== % References diff --git a/doc/cvode/guide/source/Introduction.rst b/doc/cvode/guide/source/Introduction.rst index 9cf52e4b73..a6a0456eb4 100644 --- a/doc/cvode/guide/source/Introduction.rst +++ b/doc/cvode/guide/source/Introduction.rst @@ -111,6 +111,32 @@ implementations. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +Added Fortran support for the LAPACK dense ``SUNLinearSolver`` implementation. + +Improved computational complexity of ``SUNMatScaleAddI_Sparse`` from ``O(M*N)`` +to ``O(NNZ)``. + +Changed the ``SUNProfiler`` so that it does not rely on ``MPI_WTime`` in any case. +This fixes `GitHub Issue #312 `_. + +Fixed a regression introduced by the stop time bug fix in v6.6.1 where CVODE +would return at the stop time rather than the requested output time if the stop +time was reached in the same step in which the output time was passed. + +Fixed scaling bug in ``SUNMatScaleAddI_Sparse`` for non-square matrices. + +Fixed missing soversions in some ``SUNLinearSolver`` and ``SUNNonlinearSolver`` +CMake targets. + +Changes in v6.6.2 +----------------- + +Fixed the build system support for MAGMA when using a NVIDIA HPC SDK installation of CUDA +and fixed the targets used for rocBLAS and rocSPARSE. + Changes in v6.6.2 ----------------- @@ -125,9 +151,10 @@ Updated the Tpetra NVector interface to support Trilinos 14. Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper object. -Fixed a bug where the stop time may not be cleared and an unnecessary -interpolation may occur when using normal mode if the requested output time is -the same as the stop time. +Fixed a bug where the stop time may not be cleared when using normal mode if the +requested output time is the same as the stop time. Additionally, this fix +removes an unnecessary interpolation of the solution at the stop time that could +occur in this case. Changes in v6.6.0 ----------------- diff --git a/doc/cvodes/guide/source/Introduction.rst b/doc/cvodes/guide/source/Introduction.rst index 8801381fdf..f1a2d01c4e 100644 --- a/doc/cvodes/guide/source/Introduction.rst +++ b/doc/cvodes/guide/source/Introduction.rst @@ -111,6 +111,32 @@ Fortran. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +Added Fortran support for the LAPACK dense ``SUNLinearSolver`` implementation. + +Improved computational complexity of ``SUNMatScaleAddI_Sparse`` from ``O(M*N)`` +to ``O(NNZ)``. + +Changed the ``SUNProfiler`` so that it does not rely on ``MPI_WTime`` in any case. +This fixes `GitHub Issue #312 `_. + +Fixed a regression introduced by the stop time bug fix in v6.6.1 where CVODES +would return at the stop time rather than the requested output time if the stop +time was reached in the same step in which the output time was passed. + +Fixed scaling bug in ``SUNMatScaleAddI_Sparse`` for non-square matrices. + +Fixed missing soversions in some ``SUNLinearSolver`` and ``SUNNonlinearSolver`` +CMake targets. + +Changes in v6.6.2 +----------------- + +Fixed the build system support for MAGMA when using a NVIDIA HPC SDK installation of CUDA +and fixed the targets used for rocBLAS and rocSPARSE. + Changes in v6.6.2 ----------------- @@ -125,9 +151,10 @@ Updated the Tpetra NVector interface to support Trilinos 14. Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper object. -Fixed a bug where the stop time may not be cleared and an unnecessary -interpolation may occur when using normal mode if the requested output time is -the same as the stop time. +Fixed a bug where the stop time may not be cleared when using normal mode if the +requested output time is the same as the stop time. Additionally, this fix +removes an unnecessary interpolation of the solution at the stop time that could +occur in this case. Changes in v6.6.0 ----------------- diff --git a/doc/cvodes/guide/source/Usage/ADJ.rst b/doc/cvodes/guide/source/Usage/ADJ.rst index db4d6b9655..80e567f024 100644 --- a/doc/cvodes/guide/source/Usage/ADJ.rst +++ b/doc/cvodes/guide/source/Usage/ADJ.rst @@ -24,7 +24,7 @@ several supporting user-callable functions. For this reason, in the following sections we refer to the *backward problem* and not to the *adjoint problem* when discussing details relevant to the ODEs that are integrated backward in time. The backward problem can be the adjoint problem :eq:`CVODES_adj_eqns` or -:eq:`CVODES_adj_eqns`, and can be augmented with some quadrature differential +:eq:`CVODES_adj1_eqns`, and can be augmented with some quadrature differential equations. CVODES uses various constants for both input and output. These are defined as diff --git a/doc/cvodes/guide/source/Usage/SIM.rst b/doc/cvodes/guide/source/Usage/SIM.rst index dbc6506dd1..539f521ea7 100644 --- a/doc/cvodes/guide/source/Usage/SIM.rst +++ b/doc/cvodes/guide/source/Usage/SIM.rst @@ -4122,13 +4122,13 @@ If the quadrature variables are part of the step size control mechanism, one of the following functions must be called to specify the integration tolerances for quadrature variables. -.. c:function:: int CVodeQuadSVtolerances(void * cvode_mem, realtype reltolQ, N_Vector abstolQ) +.. c:function:: int CVodeQuadSStolerances(void *cvode_mem, realtype reltolQ, realtype abstolQ) - The function ``CVodeQuadSStolerances`` specifies scalar relative and absolute tolerances. + The function ``CVodeQuadSStolerances`` specifies scalar relative and absolute tolerances. **Arguments:** * ``cvode_mem`` -- pointer to the CVODES memory block. - * ``reltolQ`` -- tolerances is the scalar relative error tolerance. + * ``reltolQ`` -- is the scalar relative error tolerance. * ``abstolQ`` -- is the scalar absolute error tolerance. **Return value:** @@ -4138,6 +4138,22 @@ integration tolerances for quadrature variables. * ``CV_ILL_INPUT`` -- One of the input tolerances was negative. +.. c:function:: int CVodeQuadSVtolerances(void * cvode_mem, realtype reltolQ, N_Vector abstolQ) + + The function ``CVodeQuadSVtolerances`` specifies scalar relative and vector absolute tolerances. + + **Arguments:** + * ``cvode_mem`` -- pointer to the CVODES memory block. + * ``reltolQ`` -- is the scalar relative error tolerance. + * ``abstolQ`` -- the vector of absolute error tolerances. + + **Return value:** + * ``CV_SUCCESS`` -- The optional value has been successfully set. + * ``CV_NO_QUAD`` -- Quadrature integration was not initialized. + * ``CV_MEM_NULL`` -- The ``cvode_mem`` pointer is ``NULL``. + * ``CV_ILL_INPUT`` -- One of the input tolerances was negative. + + .. _CVODES.Usage.purequad.optional_output: Optional outputs for quadrature integration diff --git a/doc/ida/Makefile b/doc/ida/Makefile index add4d56563..ca2372cfd2 100644 --- a/doc/ida/Makefile +++ b/doc/ida/Makefile @@ -23,7 +23,9 @@ ida_ex_serial.tex \ ida_ex_parallel.tex \ ida_ex_petsc.tex \ ida_ex_trilinos.tex \ -ida_ex_fortran.tex \ ida_ex_codes.tex +# Remove F77 example text +# ida_ex_fortran.tex \ + include ../Makefile.in diff --git a/doc/ida/guide/source/Introduction.rst b/doc/ida/guide/source/Introduction.rst index a7535365a9..3e86a10169 100644 --- a/doc/ida/guide/source/Introduction.rst +++ b/doc/ida/guide/source/Introduction.rst @@ -72,6 +72,32 @@ systems. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +Added Fortran support for the LAPACK dense ``SUNLinearSolver`` implementation. + +Improved computational complexity of ``SUNMatScaleAddI_Sparse`` from ``O(M*N)`` +to ``O(NNZ)``. + +Changed the ``SUNProfiler`` so that it does not rely on ``MPI_WTime`` in any case. +This fixes `GitHub Issue #312 `_. + +Fixed a regression introduced by the stop time bug fix in v6.6.1 where IDA +would return at the stop time rather than the requested output time if the stop +time was reached in the same step in which the output time was passed. + +Fixed scaling bug in ``SUNMatScaleAddI_Sparse`` for non-square matrices. + +Fixed missing soversions in some ``SUNLinearSolver`` and ``SUNNonlinearSolver`` +CMake targets. + +Changes in v6.6.2 +----------------- + +Fixed the build system support for MAGMA when using a NVIDIA HPC SDK installation of CUDA +and fixed the targets used for rocBLAS and rocSPARSE. + Changes in v6.6.2 ----------------- diff --git a/doc/ida/ida_ex_codes.tex b/doc/ida/ida_ex_codes.tex index dcafb9e401..3cced710d2 100644 --- a/doc/ida/ida_ex_codes.tex +++ b/doc/ida/ida_ex_codes.tex @@ -26,12 +26,12 @@ \section{Listing of idaFoodWeb\_kry\_bbd\_p.c}\label{s:idaFoodWeb_bbd_p_c} %% Fortran examples -\lstset{language=[77]Fortran} +%% \lstset{language=[77]Fortran} -\newpage -\section{Listing of fidaRoberts\_dns.f}\label{s:fidaRoberts_f} -\includeCode{../../examples/ida/fcmix_serial/fidaRoberts_dns.f} +%% \newpage +%% \section{Listing of fidaRoberts\_dns.f}\label{s:fidaRoberts_f} +%% \includeCode{../../examples/ida/fcmix_serial/fidaRoberts_dns.f} -\newpage -\section{Listing of fidaHeat2D\_kry\_bbd\_p.f}\label{s:fidaHeat2D_bbd_p} -\includeCode{../../examples/ida/fcmix_parallel/fidaHeat2D_kry_bbd_p.f} +%% \newpage +%% \section{Listing of fidaHeat2D\_kry\_bbd\_p.f}\label{s:fidaHeat2D_bbd_p} +%% \includeCode{../../examples/ida/fcmix_parallel/fidaHeat2D_kry_bbd_p.f} diff --git a/doc/ida/ida_ex_intro.tex b/doc/ida/ida_ex_intro.tex index 2d6acd24f3..5eab9b0a02 100644 --- a/doc/ida/ida_ex_intro.tex +++ b/doc/ida/ida_ex_intro.tex @@ -7,9 +7,9 @@ \section{Introduction}\label{s:ex_intro} listings, on the example programs supplied with the {\ida} distribution package. -The {\ida} distribution contains examples of four types: serial -{\CC} examples, parallel {\CC} examples, {\F} examples, -{\petsc} examples, and {\trilinos} examples. +The {\ida} distribution contains examples of the following types: serial +{\CC} examples, parallel {\CC} examples, {\petsc} examples, and {\trilinos} +examples. %% With the exception of ``demo''-type example files, the names of all the examples distributed with {\sundials} are of the form \verb![slv][PbName]_[ls]_[prec]_[p]!, @@ -131,27 +131,27 @@ \section{Introduction}\label{s:ex_intro} \end{itemize} -\vspace{0.2in}\noindent -As part of the {\fida} module, in the four subdirectories \id{fcmix\_serial}, -\id{fcmix\_parallel}, \id{fcmix\_openmp}, and \id{fcmix\_pthreads}, -within the directory {\em srcdir}\id{/examples/ida}, -are the following four examples for the {\F}-{\CC} interface: -% -\begin{itemize} -\item \id{fidaRoberts\_dns} is a serial chemical kinetics example ({\dense}) - with rootfinding, equivalent to \id{idaRoberts\_dns}. +%% As part of the {\fida} module, in the subdirectories \id{fcmix\_serial}, +%% \id{fcmix\_parallel}, \id{fcmix\_openmp}, and \id{fcmix\_pthreads}, +%% within the directory {\em srcdir}\id{/examples/ida}, +%% are the following four examples for the {\F}-{\CC} interface: +%% % +%% \begin{itemize} +%% \item \id{fidaRoberts\_dns} is a serial chemical kinetics example ({\dense}) +%% with rootfinding, equivalent to \id{idaRoberts\_dns}. -\item \id{fidaHeat2D\_kry\_bbd\_p} is a parallel example ({\spgmr}/{\idabbdpre}) - equivalent to the example \id{idaHeat2D\_kry\_bbd\_p}. +%% \item \id{fidaHeat2D\_kry\_bbd\_p} is a parallel example ({\spgmr}/{\idabbdpre}) +%% equivalent to the example \id{idaHeat2D\_kry\_bbd\_p}. -\item \id{fidaRoberts\_dns\_openmp} is the same as \id{fidaRoberts\_dns} but - uses the NVECTOR module NVECTOR\_OPENMP. +%% \item \id{fidaRoberts\_dns\_openmp} is the same as \id{fidaRoberts\_dns} but +%% uses the NVECTOR module NVECTOR\_OPENMP. -\item \id{fidaRoberts\_dns\_pthreads} is the same as \id{fidaRoberts\_dns} but - uses the NVECTOR module NVECTOR\_PTHREADS. +%% \item \id{fidaRoberts\_dns\_pthreads} is the same as \id{fidaRoberts\_dns} but +%% uses the NVECTOR module NVECTOR\_PTHREADS. -\end{itemize} -\ +%% \end{itemize} +%% \ +\vspace{0.2in}\noindent Finally, in the subdirectory \id{petsc} of \id{examples/ida} are the following examples: \begin{itemize} diff --git a/doc/ida/ida_examples.tex b/doc/ida/ida_examples.tex index b45aa69fa3..8d93c17d7a 100644 --- a/doc/ida/ida_examples.tex +++ b/doc/ida/ida_examples.tex @@ -5,7 +5,7 @@ \externaldocument{install} \externaldocument{ida_math} \externaldocument{ida_usage} -\externaldocument{ida_fcmix} +%\externaldocument{ida_fcmix} \externaldocument{ida_nvec} \externaldocument{ida_sunmat} \externaldocument{ida_sunlinsol} @@ -39,7 +39,7 @@ \include{ida_ex_parallel} \include{ida_ex_petsc} \include{ida_ex_trilinos} -\include{ida_ex_fortran} +%\include{ida_ex_fortran} %=============================================================== % References \bibliographystyle{plain} diff --git a/doc/idas/guide/source/Introduction.rst b/doc/idas/guide/source/Introduction.rst index ef03902031..a808d1b3cc 100644 --- a/doc/idas/guide/source/Introduction.rst +++ b/doc/idas/guide/source/Introduction.rst @@ -86,6 +86,26 @@ integrate any final-condition ODE dependent on the solution of the original IVP Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +Added Fortran support for the LAPACK dense ``SUNLinearSolver`` implementation. + +Improved computational complexity of ``SUNMatScaleAddI_Sparse`` from ``O(M*N)`` +to ``O(NNZ)``. + +Changed the ``SUNProfiler`` so that it does not rely on ``MPI_WTime`` in any case. +This fixes `GitHub Issue #312 `_. + +Fixed a regression introduced by the stop time bug fix in v6.6.1 where IDAS +would return at the stop time rather than the requested output time if the stop +time was reached in the same step in which the output time was passed. + +Fixed scaling bug in ``SUNMatScaleAddI_Sparse`` for non-square matrices. + +Fixed missing soversions in some ``SUNLinearSolver`` and ``SUNNonlinearSolver`` +CMake targets. + Changes in v5.6.2 ----------------- diff --git a/doc/kinsol/Makefile b/doc/kinsol/Makefile index 25f4b6e915..9b7a3db8f2 100644 --- a/doc/kinsol/Makefile +++ b/doc/kinsol/Makefile @@ -20,7 +20,9 @@ EX_FILES = \ ${EXAMPLES}.tex \ kin_ex_intro.tex \ kin_ex_c.tex \ -kin_ex_cxx.tex \ -kin_ex_fortran.tex +kin_ex_cxx.tex + +# Remove F77 examples +# kin_ex_fortran.tex include ../Makefile.in diff --git a/doc/kinsol/guide/source/Introduction.rst b/doc/kinsol/guide/source/Introduction.rst index 85e260518c..ba97a5ef5b 100644 --- a/doc/kinsol/guide/source/Introduction.rst +++ b/doc/kinsol/guide/source/Introduction.rst @@ -88,6 +88,28 @@ applications written in Fortran. Changes from previous versions ============================== +Changes in vX.X.X +----------------- + +Added Fortran support for the LAPACK dense ``SUNLinearSolver`` implementation. + +Improved computational complexity of ``SUNMatScaleAddI_Sparse`` from ``O(M*N)`` +to ``O(NNZ)``. + +Changed the ``SUNProfiler`` so that it does not rely on ``MPI_WTime`` in any case. +This fixes `GitHub Issue #312 `_. + +Fixed scaling bug in ``SUNMatScaleAddI_Sparse`` for non-square matrices. + +Fixed missing soversions in some ``SUNLinearSolver`` and ``SUNNonlinearSolver`` +CMake targets. + +Changes in v6.6.2 +----------------- + +Fixed the build system support for MAGMA when using a NVIDIA HPC SDK installation of CUDA +and fixed the targets used for rocBLAS and rocSPARSE. + Changes in v6.6.2 ----------------- @@ -102,6 +124,9 @@ Updated the Tpetra NVector interface to support Trilinos 14. Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper object. +Changed the ``SUNProfiler`` so that it does not rely on ``MPI_WTime`` in any case. +This fixes `GitHub Issue #312 `_. + Changes in v6.6.0 ----------------- diff --git a/doc/kinsol/kin_ex_codes.tex b/doc/kinsol/kin_ex_codes.tex index d97169529e..79a7ff35ac 100644 --- a/doc/kinsol/kin_ex_codes.tex +++ b/doc/kinsol/kin_ex_codes.tex @@ -16,14 +16,12 @@ \section{Listing of kinFoodWeb\_kry\_bbd\_p.c}\label{s:kinFoodWeb_kry_bbd_p_c} %% Fortran examples -\lstset{language=[77]Fortran} - -\newpage -\section{Listing of fkinDiagon\_kry.f}\label{s:fkinDiagon_kry_f} -\includeCode{../../examples/kinsol/fcmix_serial/fkinDiagon_kry.f} - -\newpage -\section{Listing of fkinDiagon\_kry\_p.f}\label{s:fkinDiagon_kry_p_f} -\includeCode{../../examples/kinsol/fcmix_parallel/fkinDiagon_kry_p.f} +%% \lstset{language=[77]Fortran} +%% \newpage +%% \section{Listing of fkinDiagon\_kry.f}\label{s:fkinDiagon_kry_f} +%% \includeCode{../../examples/kinsol/fcmix_serial/fkinDiagon_kry.f} +%% \newpage +%% \section{Listing of fkinDiagon\_kry\_p.f}\label{s:fkinDiagon_kry_p_f} +%% \includeCode{../../examples/kinsol/fcmix_parallel/fkinDiagon_kry_p.f} diff --git a/doc/kinsol/kin_ex_intro.tex b/doc/kinsol/kin_ex_intro.tex index 89818128d8..f2f3a1be28 100644 --- a/doc/kinsol/kin_ex_intro.tex +++ b/doc/kinsol/kin_ex_intro.tex @@ -7,9 +7,8 @@ \section{Introduction}\label{s:ex_intro} listings, on the example programs supplied with the {\kinsol} distribution package. -The {\kinsol} distribution contains examples of types: serial -{\CC} examples, parallel {\CC} examples, serial and parallel {\F} -examples, and an OpenMP example. +The {\kinsol} distribution contains examples of the following types: serial +{\CC} examples, parallel {\CC} examples, and an OpenMP example. %% With the exception of ''demo''-type example files, the names of all the examples distributed with {\sundials} are of the form @@ -92,18 +91,18 @@ \section{Introduction}\label{s:ex_intro} using the {\kinbbdpre} module. \end{itemize} -\vspace{0.2in}\noindent -As part of the {\fkinsol} module, in the directories -{\em srcdir}\id{/examples/kinsol/fcmix\_serial} and -{\em srcdir}\id{/examples/kinsol/fcmix\_parallel}, respectively, are the -following examples for the {\F}-{\CC} interface: -\begin{itemize} -\item \id{fkinDiagon\_kry} - is a serial example, which solves a nonlinear system of the form - $u_i^2 = i^2$ using an approximate diagonal preconditioner. -\item \id{fkinDiagon\_kry\_p} - is a parallel implementation of \id{fkinDiagon\_kry}. -\end{itemize} +%% \vspace{0.2in}\noindent +%% As part of the {\fkinsol} module, in the directories +%% {\em srcdir}\id{/examples/kinsol/fcmix\_serial} and +%% {\em srcdir}\id{/examples/kinsol/fcmix\_parallel}, respectively, are the +%% following examples for the {\F}-{\CC} interface: +%% \begin{itemize} +%% \item \id{fkinDiagon\_kry} +%% is a serial example, which solves a nonlinear system of the form +%% $u_i^2 = i^2$ using an approximate diagonal preconditioner. +%% \item \id{fkinDiagon\_kry\_p} +%% is a parallel implementation of \id{fkinDiagon\_kry}. +%% \end{itemize} \vspace{0.2in}\noindent Supplied in directory {\em srcdir}\id{/examples/kinsol/C\_openmp} diff --git a/doc/kinsol/kin_examples.tex b/doc/kinsol/kin_examples.tex index 399a5a723e..6b9fa022ce 100644 --- a/doc/kinsol/kin_examples.tex +++ b/doc/kinsol/kin_examples.tex @@ -5,7 +5,7 @@ \externaldocument{install} \externaldocument{kin_math} \externaldocument{kin_use} -\externaldocument{kin_fcmix} +%\externaldocument{kin_fcmix} \externaldocument{kin_nvec} \externaldocument{kin_sunmat} \externaldocument{kin_sunlinsol} @@ -35,7 +35,7 @@ %=============================================================== \include{kin_ex_intro} \include{kin_ex_c} -\include{kin_ex_fortran} +%\include{kin_ex_fortran} \include{kin_ex_cxx} %=============================================================== % References diff --git a/doc/shared/History.rst b/doc/shared/History.rst index 7a06c592c9..cb33a4d423 100644 --- a/doc/shared/History.rst +++ b/doc/shared/History.rst @@ -14,13 +14,15 @@ .. _History: -################################## -Appendix: SUNDIALS Release History -################################## +############### +Release History +############### +----------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+ | Date | SUNDIALS | ARKODE | CVODE | CVODES | IDA | IDAS | KINSOL | +==========+===================+===================+===================+===================+===================+===================+===================+ +| Dec 2023 | 6.7.0 | 5.7.0 | 6.7.0 | 6.7.0 | 6.7.0 | 5.7.0 | 6.7.0 | ++----------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+ | Nov 2023 | 6.6.2 | 5.6.2 | 6.6.2 | 6.6.2 | 6.6.2 | 5.6.2 | 6.6.2 | +----------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+ | Sep 2023 | 6.6.1 | 5.6.1 | 6.6.1 | 6.6.1 | 6.6.1 | 5.6.1 | 6.6.1 | diff --git a/doc/shared/Install.rst b/doc/shared/Install.rst index f6126c9bb0..9021e5b340 100644 --- a/doc/shared/Install.rst +++ b/doc/shared/Install.rst @@ -14,9 +14,9 @@ .. _Installation: -=============================== -SUNDIALS Installation Procedure -=============================== +====================== +Installation Procedure +====================== The installation of any SUNDIALS package is accomplished by installing the SUNDIALS suite as a whole, according to the instructions that follow. The same @@ -1022,6 +1022,7 @@ illustration only. .. cmakeoption:: SUNDIALS_BUILD_WITH_PROFILING Build SUNDIALS with capabilties for fine-grained profiling. + This requires POSIX timers or the Windows ``profileapi.h`` timers. Default: OFF diff --git a/doc/shared/figs/arkode/shu_osher_erk_stab_region.png b/doc/shared/figs/arkode/shu_osher_erk_stab_region.png new file mode 100644 index 0000000000..25c75d6ed8 Binary files /dev/null and b/doc/shared/figs/arkode/shu_osher_erk_stab_region.png differ diff --git a/doc/shared/figs/arkode/sofroniou_spaletta_erk_stab_region.png b/doc/shared/figs/arkode/sofroniou_spaletta_erk_stab_region.png new file mode 100644 index 0000000000..78bd107329 Binary files /dev/null and b/doc/shared/figs/arkode/sofroniou_spaletta_erk_stab_region.png differ diff --git a/doc/shared/figs/arkode/v65b_erk_stab_region.png b/doc/shared/figs/arkode/v65b_erk_stab_region.png new file mode 100644 index 0000000000..8a13299753 Binary files /dev/null and b/doc/shared/figs/arkode/v65b_erk_stab_region.png differ diff --git a/doc/shared/figs/arkode/v76_erk_stab_region.png b/doc/shared/figs/arkode/v76_erk_stab_region.png new file mode 100644 index 0000000000..eed5da6a7c Binary files /dev/null and b/doc/shared/figs/arkode/v76_erk_stab_region.png differ diff --git a/doc/shared/figs/arkode/v87_erk_stab_region.png b/doc/shared/figs/arkode/v87_erk_stab_region.png new file mode 100644 index 0000000000..237f215969 Binary files /dev/null and b/doc/shared/figs/arkode/v87_erk_stab_region.png differ diff --git a/doc/shared/figs/arkode/v98_erk_stab_region.png b/doc/shared/figs/arkode/v98_erk_stab_region.png new file mode 100644 index 0000000000..cfbf657c42 Binary files /dev/null and b/doc/shared/figs/arkode/v98_erk_stab_region.png differ diff --git a/doc/shared/sunadaptcontroller/SUNAdaptController_Description.rst b/doc/shared/sunadaptcontroller/SUNAdaptController_Description.rst new file mode 100644 index 0000000000..acea4a0790 --- /dev/null +++ b/doc/shared/sunadaptcontroller/SUNAdaptController_Description.rst @@ -0,0 +1,338 @@ +.. + ---------------------------------------------------------------- + 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 + ---------------------------------------------------------------- + +.. _SUNAdaptController.Description: + +The SUNAdaptController API +========================== + +.. versionadded:: x.x.x + +The SUNAdaptController base class provides a common API for accuracy-based adaptivity +controllers to be used by SUNDIALS integrators. These controllers estimate step +sizes (among other things) such that the next step solution satisfies a desired +temporal accuracy, while striving to maximize computational efficiency. We note +that in the descriptions below, we frequently use *dsm* to represent +temporal error. This is **not** the raw temporal error estimate; instead, it is +a norm of the temporal error estimate after scaling by the user-supplied +accuracy tolerances (see :eq:`ARKODE_WRMS_NORM`), + +.. math:: + \text{dsm} = \left( \frac{1}{N} \sum_{i=1}^N + \left(\frac{\text{error}_i}{\text{rtol}\cdot |y_{n-1,i}| + \text{atol}_i}\right)^2\right)^{1/2}. + +Thus *dsm* values below one represent errors estimated to be more accurate than +needed, whereas errors above one are considered to be larger than allowable. + +The base ``SUNAdaptController`` class is modeled after SUNDIALS' other object-oriented +classes, in that this class contains a pointer to an implementation-specific +*content*, an *ops* structure with generic controller operations, and a +:c:type:`SUNContext` object. Specifically, the type ``SUNAdaptController`` is defined +as: + +.. c:type:: struct _generic_SUNAdaptController *SUNAdaptController + +and the base class structure is defined as + +.. code-block:: C + + struct _generic_SUNAdaptController { + void* content; + generic_SUNAdaptController_Ops* ops; + SUNContext sunctx; + }; + +Here, ``_generic_SUNAdaptController_Ops`` is the pointer to a structure containing +function pointers to the various controller operations, and is defined as + +.. code-block:: c + + struct _generic_SUNAdaptController_Ops { + SUNAdaptController_Type (*getid)(SUNAdaptController C); + int (*destroy)(SUNAdaptController C); + int (*estimatestep)(SUNAdaptController C, sunrealtype h, int p, sunrealtype dsm, sunrealtype* hnew); + int (*reset)(SUNAdaptController C); + int (*setdefaults)(SUNAdaptController C); + int (*write)(SUNAdaptController C, FILE* fptr); + int (*seterrorbias)(SUNAdaptController C, sunrealtype bias); + int (*updateh)(SUNAdaptController C, sunrealtype h, sunrealtype dsm); + int (*space)(SUNAdaptController C, long int *lenrw, long int *leniw); + }; + + +.. _SUNAdaptController.Description.controllerTypes: + +SUNAdaptController Types +------------------------ + +The time integrators in SUNDIALS adapt a variety of parameters to achieve +accurate and efficient computations. To this end, each SUNAdaptController implementation +should note its type, so that integrators will understand the types of +adaptivity that the controller is designed to perform. These are encoded in the +following set of SUNAdaptController types: + +.. c:enum:: SUNAdaptController_Type + + The enumerated type :c:type:`SUNAdaptController_Type` defines the enumeration + constants for SUNDIALS error controller types + +.. c:enumerator:: SUN_ADAPTCONTROLLER_NONE + + Empty object that performs no control. + +.. c:enumerator:: SUN_ADAPTCONTROLLER_H + + Controls a single-rate step size. + + + +.. _SUNAdaptController.Description.operations: + +SUNAdaptController Operations +----------------------------- + +The base SUNAdaptController class defines and implements all SUNAdaptController functions. Most +of these routines are merely wrappers for the operations defined by a particular +SUNAdaptController implementation, which are accessed through the *ops* field of the +``SUNAdaptController`` structure. The base SUNAdaptController class provides the +constructor + +.. c:function:: SUNAdaptController SUNAdaptController_NewEmpty(SUNContext sunctx) + + This function allocates a new generic ``SUNAdaptController`` object and initializes + its content pointer and the function pointers in the operations structure to + ``NULL``. + + :param sunctx: the :c:type:`SUNContext` object (see :numref:`SUNDIALS.SUNContext`) + + :returns: If successful, a generic :c:type:`SUNAdaptController` object. If + unsuccessful, a ``NULL`` pointer will be returned. + +Each of the following methods are *optional* for any specific SUNAdaptController +implementation, however some may be required based on the implementation's +:c:type:`SUNAdaptController_Type` (see Section :numref:`SUNAdaptController.Description.controllerTypes`). We +note these requirements below. Additionally, we note the behavior of the base SUNAdaptController methods when they perform an action other than only a successful return. + +.. c:function:: SUNAdaptController_Type SUNAdaptController_GetType(SUNAdaptController C) + + Returns the type identifier for the controller *C*. Returned values + are given in Section :numref:`SUNAdaptController.Description.controllerTypes` + + :param C: the :c:type:`SUNAdaptController` object. + :return: :c:type:`SUNAdaptController_Type` type identifier. + + Usage: + + .. code-block:: c + + SUNAdaptController_Type id = SUNAdaptController_GetType(C); + +.. c:function:: int SUNAdaptController_Destroy(SUNAdaptController C) + + Deallocates the controller *C*. If this method is not provided by the + implementation, the base class method will free both the *content* and + *ops* objects -- this should be sufficient unless a controller implementation + performs dynamic memory allocation of its own (note that the + SUNDIALS-provided SUNAdaptController implementations do not need to supply this + routine). + + :param C: the :c:type:`SUNAdaptController` object. + :return: error code indicating success failure + (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_Destroy(C); + +.. c:function:: int SUNAdaptController_EstimateStep(SUNAdaptController C, sunrealtype h, int p, sunrealtype dsm, sunrealtype* hnew) + + Estimates a single-rate step size. This routine is required for controllers + of type ``SUN_ADAPTCONTROLLER_H``. If this is not provided by the + implementation, the base class method will set ``*hnew = h`` and return. + + :param C: the :c:type:`SUNAdaptController` object. + :param h: the step size from the previous step attempt. + :param p: the current order of accuracy for the time integration method. + :param dsm: the local temporal estimate from the previous step attempt. + :param hnew: (output) the estimated step size. + :return: error code indicating success failure + (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_EstimateStep(C, hcur, p, dsm, &hnew); + +.. c:function:: int SUNAdaptController_Reset(SUNAdaptController C) + + Resets the controller to its initial state, e.g., if it stores a small number + of previous *dsm* or *h* values. + + :param C: the :c:type:`SUNAdaptController` object. + :return: error code indicating success failure + (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_Reset(C); + +.. c:function:: int SUNAdaptController_SetDefaults(SUNAdaptController C) + + Sets the controller parameters to their default values. + + :param C: the :c:type:`SUNAdaptController` object. + :return: error code indicating success failure + (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_SetDefaults(C); + +.. c:function:: int SUNAdaptController_Write(SUNAdaptController C, FILE* fptr) + + Writes all controller parameters to the indicated file pointer. + + :param C: the :c:type:`SUNAdaptController` object. + :param fptr: the output stream to write the parameters to. + :return: error code indicating success failure + (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_Write(C, stdout); + +.. c:function:: int SUNAdaptController_SetErrorBias(SUNAdaptController C, sunrealtype bias) + + Sets an error bias factor for scaling the local error factors. This is + typically used to slightly exaggerate the temporal error during the + estimation process, leading to a more conservative estimated step size. + + :param C: the :c:type:`SUNAdaptController` object. + :param bias: the error bias factor -- an input :math:`\leq 0` indicates to use + the default value for the controller. + :return: error code indicating success failure + (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_SetErrorBias(C, 1.2); + +.. c:function:: int SUNAdaptController_UpdateH(SUNAdaptController C, sunrealtype h, sunrealtype dsm) + + Notifies a controller of type SUN_ADAPTCONTROLLER_H that a successful time step + was taken with stepsize *h* and local error factor *dsm*, indicating that these + can be saved for subsequent controller functions. This is typically relevant for + controllers that store a history of either step sizes or error estimates for + performing the estimation process. + + :param C: the :c:type:`SUNAdaptController` object. + :param h: the successful step size. + :param dsm: the successful temporal error estimate. + :return: error code indicating success failure + (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_UpdateH(C, h, dsm); + +.. c:function:: int SUNAdaptController_Space(SUNAdaptController C, long int *lenrw, long int *leniw) + + Informative routine that returns the memory requirements of the + :c:type:`SUNAdaptController` object. + + :param C: the :c:type:`SUNAdaptController` object.. + :param lenrw: (output) number of ``sunsunrealtype`` words stored in the + controller. + :param leniw: (output) number of ``sunindextype`` words stored in the + controller. This may also include pointers, `int` and + `long int` words. + :return: error code indicating success failure + (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_Space(C, &lenrw, &leniw); + + + +.. _SUNAdaptController.Description.errorCodes: + +SUNAdaptController Error Codes +------------------------------ + +SUNAdaptController functions return one of the following set of error codes: + +* ``SUNADAPTCONTROLLER_SUCCESS`` (0) -- successful call. + +* ``SUNADAPTCONTROLLER_ILL_INPUT`` (-1001) -- an illegal input has been provided to the function. + +* ``SUNADAPTCONTROLLER_MEM_FAIL`` (-1002) -- a memory access or allocation failed. + +* ``SUNADAPTCONTROLLER_USER_FCN_FAIL`` (-1003) -- a user-supplied function returned a nonzero [error] value. + +* ``SUNADAPTCONTROLLER_OPERATION_FAIL`` (-1004) -- catch-all for errors not in the above list. + +.. note:: + The SUNDIALS time integrators do not rely on these specific return values and only + on whether the returned values are 0 (successful) or non-zero (failure). Thus, + user-defined implementations are not required to use these specific error codes, + so long as the zero/non-zero convention is followed. + + +C/C++ API Usage +--------------- + +Specific SUNDIALS adaptivity controller modules can be used in C and C++ programs by including +the corresponding header file for that module, e.g. ``sunadaptcontroller/sunadaptcontroller_XYZ.h``. + +Example usage (here ``SUNAdaptController_XYZ`` is a placeholder for an actual SUNAdaptController +constructor): + +.. code-block:: c + + #include + #include + #include + #include + #include + + int main() + { + /* Create a SUNContext object */ + SUNContext sunctx = ...; + + /* Create a SUNAdaptController object */ + SUNAdaptController C = SUNAdaptController_XYZ(sunctx); + + /* Use the control object */ + + /* Destroy the control object */ + retval = SUNAdaptController_Destroy(C); + + return 0; + } diff --git a/doc/shared/sunadaptcontroller/SUNAdaptController_ImExGus.rst b/doc/shared/sunadaptcontroller/SUNAdaptController_ImExGus.rst new file mode 100644 index 0000000000..c0a54fddf8 --- /dev/null +++ b/doc/shared/sunadaptcontroller/SUNAdaptController_ImExGus.rst @@ -0,0 +1,128 @@ +.. + 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 + ---------------------------------------------------------------- + +.. _SUNAdaptController.ImExGus: + +The SUNAdaptController_ImExGus Module +====================================== + +The ImEx Gustafsson implementation of the SUNAdaptController class, SUNAdaptController_ImExGus, +implements a combination of two adaptivity controllers proposed +by K. Gustafsson. His "explicit" controller was proposed in :cite:p:`Gust:91`, +is primarily useful with explicit Runge--Kutta methods, and has the form + +.. math:: + h' \;=\; \begin{cases} + h_1\; \varepsilon_1^{-1/(p+1)}, &\quad\text{on the first step}, \\ + h_n\; \varepsilon_n^{-k_1^E/(p+1)}\; + \left(\dfrac{\varepsilon_n}{\varepsilon_{n-1}}\right)^{k_2^E/(p+1)}, & + \quad\text{on subsequent steps}. + \end{cases} + :label: expGusController + +Similarly, Gustafsson's "implicit" controller was proposed in :cite:p:`Gust:94` +with the form + +.. math:: + h' = \begin{cases} + h_1 \varepsilon_1^{-1/(p+1)}, &\quad\text{on the first step}, \\ + h_n \left(\dfrac{h_n}{h_{n-1}}\right) \varepsilon_n^{-k_1^I/(p+1)} + \left(\dfrac{\varepsilon_n}{\varepsilon_{n-1}}\right)^{-k_2^I/(p+1)}, & + \quad\text{on subsequent steps}. + \end{cases} + :label: impGusController + +In the above formulas, the default values of :math:`k_1^E`, :math:`k_2^E`, +:math:`k_1^I`, and :math:`k_2^I` are 0.367, 0.268, 0.98, and 0.95, respectively, +and :math:`p` is the global order of the time integration method. In these +estimates, a floor of :math:`\varepsilon_* > 10^{-10}` is enforced to avoid +division-by-zero errors. + +The SUNAdaptController_ImExGus controller implements both formulas +:eq:`expGusController` and :eq:`impGusController`, and sets its recommended step +size as the minimum of these two. It is implemented as a derived SUNAdaptController +class, and defines its *content* field as: + +.. code-block:: c + + struct _SUNAdaptControllerContent_ImExGus { + sunrealtype k1e; + sunrealtype k2e; + sunrealtype k1i; + sunrealtype k2i; + sunrealtype bias; + sunrealtype ep; + sunrealtype hp; + sunbooleantype firststep; + }; + +These entries of the *content* field contain the following information: + +* ``k1e, k2e`` - explicit controller parameters used in :eq:`expGusController`. + +* ``k1i, k2i`` - implicit controller parameters used in :eq:`impGusController`. + +* ``bias`` - error bias factor, that converts from an input temporal error + estimate via :math:`\varepsilon = \text{bias}*\text{dsm}`. + +* ``ep`` - storage for the previous error estimate, :math:`\varepsilon_{n-1}`. + +* ``hp`` - storage for the previous step size, :math:`h_{n-1}`. + +* ``firststep`` - flag indicating whether a step has completed successfully, allowing + the formulas above to transition between :math:`h_1` and :math:`h_n`. + +The header file to be included when using this module is +``sunadaptcontroller/sunadaptcontroller_imexgus.h``. + + +The SUNAdaptController_ImExGus class provides implementations of all operations +relevant to a ``SUN_ADAPTCONTROLLER_H`` controller listed in +:numref:`SUNAdaptController.Description.operations`. The +SUNAdaptController_ImExGus class also provides the following additional user-callable +routines: + + +.. c:function:: SUNAdaptController SUNAdaptController_ImExGus(SUNContext sunctx) + + This constructor creates and allocates memory for a SUNAdaptController_ImExGus + object, and inserts its default parameters. + + :param sunctx: the current :c:type:`SUNContext` object. + :return: if successful, a usable :c:type:`SUNAdaptController` object; otherwise it will return ``NULL``. + + Usage: + + .. code-block:: c + + SUNAdaptController C = SUNAdaptController_ImExGus(sunctx); + +.. c:function:: int SUNAdaptController_SetParams_ImExGus(SUNAdaptController C, sunrealtype k1e, sunrealtype k2e, sunrealtype k1i, sunrealtype k2i) + + This user-callable function provides control over the relevant parameters + above. This should be called *before* the time integrator is called to evolve + the problem. + + :param C: the SUNAdaptController_ImExGus object. + :param k1e: parameter used within the controller time step estimate. + :param k2e: parameter used within the controller time step estimate. + :param k1i: parameter used within the controller time step estimate. + :param k2i: parameter used within the controller time step estimate. + :return: error code indication success or failure (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_SetParams_ImExGus(C, 0.4, 0.3, -1.0, 1.0); diff --git a/doc/shared/sunadaptcontroller/SUNAdaptController_Soderlind.rst b/doc/shared/sunadaptcontroller/SUNAdaptController_Soderlind.rst new file mode 100644 index 0000000000..e7bf4867f2 --- /dev/null +++ b/doc/shared/sunadaptcontroller/SUNAdaptController_Soderlind.rst @@ -0,0 +1,315 @@ +.. + 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 + ---------------------------------------------------------------- + +.. _SUNAdaptController.Soderlind: + +The SUNAdaptController_Soderlind Module +======================================= + +The Soderlind implementation of the SUNAdaptController class, +SUNAdaptController_Soderlind, implements a general structure for temporal +control proposed by G. Soderlind in :cite:p:`Sod:98`, :cite:p:`Sod:03`, +and :cite:p:`Sod:06`. This controller has the form + +.. math:: + h' = h_n \varepsilon_n^{-k_1/(p+1)} \varepsilon_{n-1}^{-k_2/(p+1)} \varepsilon_{n-2}^{-k_3/(p+1)} \left(\dfrac{h_n}{h_{n-1}}\right)^{k_4} \left(\dfrac{h_{n-1}}{h_{n-2}}\right)^{k_5} + +with default parameter values :math:`k_1 = 1.25`, :math:`k_2 = 0.5`, +:math:`k_3 = -0.75`, :math:`k_4 = 0.25`, and :math:`k_5 = 0.75`, where +:math:`p` is the global order of the time integration method. In this estimate, +a floor of :math:`\varepsilon_* > 10^{-10}` is enforced to avoid division-by-zero +errors. During the first two steps (when :math:`\varepsilon_{n-2}`, +:math:`\varepsilon_{n-1}`, :math:`h_{n-2}`, and :math:`h_{n-2}` may be unavailable), +the corresponding terms are merely omitted during estimation of :math:`h'`. + +The SUNAdaptController_Soderlind controller is implemented as a derived +SUNAdaptController class, and defines its *content* field as: + +.. code-block:: c + + struct _SUNAdaptControllerContent_Soderlind { + sunrealtype k1; + sunrealtype k2; + sunrealtype k3; + sunrealtype k4; + sunrealtype k5; + sunrealtype bias; + sunrealtype ep; + sunrealtype epp; + sunrealtype hp; + sunrealtype hpp; + int firststeps; + }; + +These entries of the *content* field contain the following information: + +* ``k1, k2, k3, k4, k5`` - controller parameters above. + +* ``bias`` - error bias factor, that converts from an input temporal error + estimate via :math:`\varepsilon = \text{bias}*\text{dsm}`. + +* ``ep, epp`` - storage for the two previous error estimates, + :math:`\varepsilon_{n-1}` and :math:`\varepsilon_{n-2}`. + +* ``hp, hpp`` - storage for the previous two step sizes, :math:`h_{n-1}` + and :math:`h_{n-2}`. + +* ``firststeps`` - counter to handle first two steps (where previous + step sizes and errors are unavailable). + +The header file to be included when using this module is +``sunadaptcontroller/sunadaptcontroller_soderlind.h``. + +We note that through appropriate selection of the parameters :math:`k_*`, +this controller may create a wide range of proposed temporal adaptivity controllers, +including the PID, PI, I, as well as Gustafsson's explicit and implicit controllers, +:cite:p:`Gust:91` and :cite:p:`Gust:94`. As a convenience, utility routines to +create these controllers and set their parameters (as special cases of the +SUNAdaptController_Soderlind) are provided. + +The SUNAdaptController_Soderlind class provides implementations of all operations +relevant to a ``SUN_ADAPTCONTROLLER_H`` controller listed in +:numref:`SUNAdaptController.Description.operations`. This class +also provides the following additional user-callable routines: + + +.. c:function:: SUNAdaptController SUNAdaptController_Soderlind(SUNContext sunctx) + + This constructor creates and allocates memory for a SUNAdaptController_Soderlind + object, and inserts its default parameters. + + :param sunctx: the current :c:type:`SUNContext` object. + :return: if successful, a usable :c:type:`SUNAdaptController` object; + otherwise it will return ``NULL``. + + Usage: + + .. code-block:: c + + SUNAdaptController C = SUNAdaptController_Soderlind(sunctx); + +.. c:function:: int SUNAdaptController_SetParams_Soderlind(SUNAdaptController C, sunrealtype k1, sunrealtype k2, sunrealtype k3, sunrealtype k4, sunrealtype k5) + + This user-callable function provides control over the relevant parameters + above. This should be called *before* the time integrator is called to evolve + the problem. + + :param C: the SUNAdaptController_Soderlind object. + :param k1: parameter used within the controller time step estimate. + :param k2: parameter used within the controller time step estimate. + :param k3: parameter used within the controller time step estimate. + :param k4: parameter used within the controller time step estimate. + :param k5: parameter used within the controller time step estimate. + :return: error code indication success or failure (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + /* Specify parameters for Soderlind's H_{0}312 controller */ + retval = SUNAdaptController_SetParams_Soderlind(C, 0.25, 0.5, 0.25, -0.75, -0.25); + + +.. c:function:: SUNAdaptController SUNAdaptController_PID(SUNContext sunctx) + + This constructor creates and allocates memory for a SUNAdaptController_Soderlind + object, set up to replicate a PID controller, and inserts its default parameters + :math:`k_1=0.58`, :math:`k_2=-0.21`, :math:`k_3=0.1`, and :math:`k_4=k_5=0`. + + :param sunctx: the current :c:type:`SUNContext` object. + :return: if successful, a usable :c:type:`SUNAdaptController` object; + otherwise it will return ``NULL``. + + Usage: + + .. code-block:: c + + SUNAdaptController C = SUNAdaptController_PID(sunctx); + +.. c:function:: int SUNAdaptController_SetParams_PID(SUNAdaptController C, sunrealtype k1, sunrealtype k2, sunrealtype k3) + + This user-callable function provides control over the relevant parameters + above for a PID controller, setting :math:`k_4 = k_5 = 0`. This should be + called *before* the time integrator is called to evolve the problem. + + :param C: the SUNAdaptController_Soderlind object. + :param k1: parameter used within the controller time step estimate. + :param k2: parameter used within the controller time step estimate. + :param k3: parameter used within the controller time step estimate. + :return: error code indication success or failure (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_SetParams_PID(C, 0.58, -0.21, 0.1); + + +.. c:function:: SUNAdaptController SUNAdaptController_PI(SUNContext sunctx) + + This constructor creates and allocates memory for a SUNAdaptController_Soderlind + object, set up to replicate a PI controller, and inserts its default parameters + :math:`k_1=0.8`, :math:`k_2=-0.31`, and :math:`k_3=k_4=k_5=0`. + + :param sunctx: the current :c:type:`SUNContext` object. + :return: if successful, a usable :c:type:`SUNAdaptController` object; + otherwise it will return ``NULL``. + + Usage: + + .. code-block:: c + + SUNAdaptController C = SUNAdaptController_PI(sunctx); + +.. c:function:: int SUNAdaptController_SetParams_PI(SUNAdaptController C, sunrealtype k1, sunrealtype k2) + + This user-callable function provides control over the relevant parameters + above for a PI controller, setting :math:`k_3 = k_4 = k_5 = 0`. This should + be called *before* the time integrator is called to evolve the problem. + + :param C: the SUNAdaptController_Soderlind object. + :param k1: parameter used within the controller time step estimate. + :param k2: parameter used within the controller time step estimate. + :return: error code indication success or failure (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_SetParams_PI(C, 0.8, -0.31); + + +.. c:function:: SUNAdaptController SUNAdaptController_I(SUNContext sunctx) + + This constructor creates and allocates memory for a SUNAdaptController_Soderlind + object, set up to replicate an I controller, and inserts its default parameters + :math:`k_1=1.0` and :math:`k_2=k_3=k_4=k_5=0`. + + :param sunctx: the current :c:type:`SUNContext` object. + :return: if successful, a usable :c:type:`SUNAdaptController` object; + otherwise it will return ``NULL``. + + Usage: + + .. code-block:: c + + SUNAdaptController C = SUNAdaptController_I(sunctx); + +.. c:function:: int SUNAdaptController_SetParams_I(SUNAdaptController C, sunrealtype k1) + + This user-callable function provides control over the relevant parameters + above for an I controller, setting :math:`k_2 = k_3 = k_4 = k_5 = 0`. This + should be called *before* the time integrator is called to evolve the problem. + + :param C: the SUNAdaptController_Soderlind object. + :param k1: parameter used within the controller time step estimate. + :return: error code indication success or failure (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_SetParams_I(C, 1.0); + + +.. c:function:: SUNAdaptController SUNAdaptController_ExpGus(SUNContext sunctx) + + This constructor creates and allocates memory for a SUNAdaptController_Soderlind + object, set up to replicate Gustafsson's explicit controller :cite:p:`Gust:91`, and + inserts its default parameters :math:`k_1=0.635`, :math:`k_2=-0.268`, and + :math:`k_3=k_4=k_5=0`. + + :param sunctx: the current :c:type:`SUNContext` object. + :return: if successful, a usable :c:type:`SUNAdaptController` object; + otherwise it will return ``NULL``. + + Usage: + + .. code-block:: c + + SUNAdaptController C = SUNAdaptController_ExpGus(sunctx); + +.. c:function:: int SUNAdaptController_SetParams_ExpGus(SUNAdaptController C, sunrealtype k1_hat, sunrealtype k2_hat) + + This user-callable function provides control over the relevant parameters + above for the explicit Gustafsson controller, setting :math:`k_3 = k_4 = k_5 = 0`. + This should be called *before* the time integrator is called to evolve the problem. + + .. note:: + + Gustafsson's explicit controller has the form + + .. math:: + h' = h_n \varepsilon_n^{-\hat{k}_1/(p+1)} \left(\frac{\varepsilon_n}{\varepsilon_{n-1}}\right)^{-\hat{k}_2/(p+1)}. + + The inputs to this function correspond to the values of :math:`\hat{k}_1` and :math:`\hat{k}_2`, + which are internally transformed into the Soderlind coeficients :math:`k_1 = \hat{k}_1+\hat{k}_2` + and :math:`k_2 = -\hat{k}_2`. + + :param C: the SUNAdaptController_Soderlind object. + :param k1_hat: parameter used within the explicit Gustafsson controller time step estimate. + :param k2_hat: parameter used within the explicit Gustafsson controller time step estimate. + :return: error code indication success or failure (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_SetParams_ExpGus(C, 0.367, 0.268); + + +.. c:function:: SUNAdaptController SUNAdaptController_ImpGus(SUNContext sunctx) + + This constructor creates and allocates memory for a SUNAdaptController_Soderlind + object, set up to replicate Gustafsson's implicit controller :cite:p:`Gust:94`, and + inserts its default parameters :math:`k_1=1.93`, :math:`k_2=-0.95`, :math:`k_4=1`, and + :math:`k_3=k_5=0`. + + :param sunctx: the current :c:type:`SUNContext` object. + :return: if successful, a usable :c:type:`SUNAdaptController` object; + otherwise it will return ``NULL``. + + Usage: + + .. code-block:: c + + SUNAdaptController C = SUNAdaptController_ImpGus(sunctx); + +.. c:function:: int SUNAdaptController_SetParams_ImpGus(SUNAdaptController C, sunrealtype k1_hat, sunrealtype k2_hat) + + This user-callable function provides control over the relevant parameters + above for the implicit Gustafsson controller, setting :math:`k_3 = k_4 = k_5 = 0`. + This should be called *before* the time integrator is called to evolve the problem. + + .. note:: + + Gustafsson's implicit controller has the form + + .. math:: + h' = h_n \varepsilon_n^{-\hat{k}_1/(p+1)} \left(\frac{\varepsilon_n}{\varepsilon_{n-1}}\right)^{-\hat{k}_2/(p+1)} \left(\frac{h_n}{h_{n-1}}\right). + + The inputs to this function correspond to the values of :math:`\hat{k}_1` and :math:`\hat{k}_2`, + which are internally transformed into the Soderlind coeficients :math:`k_1 = \hat{k}_1+\hat{k}_2`, + :math:`k_2 = -\hat{k}_2`, and :math:`k_4=1`. + + :param C: the SUNAdaptController_Soderlind object. + :param k1_hat: parameter used within the implicit Gustafsson controller time step estimate. + :param k2_hat: parameter used within the implicit Gustafsson controller time step estimate. + :return: error code indication success or failure (see :numref:`SUNAdaptController.Description.errorCodes`). + + Usage: + + .. code-block:: c + + retval = SUNAdaptController_SetParams_ImpGus(C, 0.98, 0.95); diff --git a/doc/shared/sundials.bib b/doc/shared/sundials.bib index 15586bd01f..bb81aceb5c 100644 --- a/doc/shared/sundials.bib +++ b/doc/shared/sundials.bib @@ -26,120 +26,120 @@ % ARKODE user guide % @techreport{arkode_ug, -author = {Daniel R. Reynolds and David J. Gardner and Carol S. Woodward and Rujeko Chinomona and Cody J. Balos}, -title = {{User Documentation for ARKODE v5.6.2}}, -institution = {LLNL}, -number = {LLNL-SM-668082}, -year = 2023 + author = {Daniel R. Reynolds and David J. Gardner and Carol S. Woodward and Rujeko Chinomona and Cody J. Balos}, + title = {{User Documentation for ARKODE v5.7.0}}, + institution = {LLNL}, + number = {LLNL-SM-668082}, + year = 2023 } % % ARKODE examples % @techreport{arkode_ex, -author = {Daniel R. Reynolds}, -title = {{Example Programs for ARKODE v5.6.2}}, -institution = {Southern Methodist University}, -year = 2023 + author = {Daniel R. Reynolds}, + title = {{Example Programs for ARKODE v5.7.0}}, + institution = {Southern Methodist University}, + year = 2023 } % % CVODE user guide % @techreport{cvode_ug, -author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, -title = {{User Documentation for CVODE v6.6.2}}, -institution = {LLNL}, -number = {UCRL-SM-208108}, -year = 2023 + author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, + title = {{User Documentation for CVODE v6.7.0}}, + institution = {LLNL}, + number = {UCRL-SM-208108}, + year = 2023 } % % CVODE examples % @techreport{cvode_ex, -author = {Alan C. Hindmarsh and Radu Serban}, -title = {{Example Programs for CVODE v6.6.2}}, -institution = {LLNL}, -note = {UCRL-SM-208110}, -year = 2023 + author = {Alan C. Hindmarsh and Radu Serban}, + title = {{Example Programs for CVODE v6.7.0}}, + institution = {LLNL}, + note = {UCRL-SM-208110}, + year = 2023 } % % CVODES user guide % @techreport{cvodes_ug, -author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, -title = {{User Documentation for CVODES v6.6.2}}, -institution = {LLNL}, -note = {UCRL-SM-208111}, -year = 2023 + author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, + title = {{User Documentation for CVODES v6.7.0}}, + institution = {LLNL}, + note = {UCRL-SM-208111}, + year = 2023 } % % CVODES examples % @techreport{cvodes_ex, -author = {Radu Serban and Alan C. Hindmarsh}, -title = {{Example Programs for CVODES v6.6.2}}, -institution = {LLNL}, -number = {UCRL-SM-208115}, -year = 2023 + author = {Radu Serban and Alan C. Hindmarsh}, + title = {{Example Programs for CVODES v6.7.0}}, + institution = {LLNL}, + number = {UCRL-SM-208115}, + year = 2023 } % % IDA user guide % @techreport{ida_ug, -author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, -title = {{User Documentation for IDA v6.6.2}}, -institution = {LLNL}, -number = {UCRL-SM-208112}, -year = 2023 + author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, + title = {{User Documentation for IDA v6.7.0}}, + institution = {LLNL}, + number = {UCRL-SM-208112}, + year = 2023 } % % IDA examples % @techreport{ida_ex, -author = {Alan C. Hindmarsh and Radu Serban and Aaron Collier}, -title = {{Example Programs for IDA v6.6.2}}, -institution = {LLNL}, -number = {UCRL-SM-208113}, -year = 2023 + author = {Alan C. Hindmarsh and Radu Serban and Aaron Collier}, + title = {{Example Programs for IDA v6.7.0}}, + institution = {LLNL}, + number = {UCRL-SM-208113}, + year = 2023 } % % IDAS user guide % @techreport{idas_ug, -author = {Radu Serban and Cosmin Petra and Alan C. Hindmarsh and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, -title = {{User Documentation for IDAS v5.6.2}}, -institution = {LLNL}, -number = {UCRL-SM-234051}, -year = 2023 + author = {Radu Serban and Cosmin Petra and Alan C. Hindmarsh and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, + title = {{User Documentation for IDAS v5.7.0}}, + institution = {LLNL}, + number = {UCRL-SM-234051}, + year = 2023 } % % IDAS examples % @techreport{idas_ex, -author = {Radu Serban and Alan C. Hindmarsh}, -title = {{Example Programs for IDAS v5.6.2}}, -institution = {LLNL}, -number = {LLNL-TR-437091}, -year = 2023 + author = {Radu Serban and Alan C. Hindmarsh}, + title = {{Example Programs for IDAS v5.7.0}}, + institution = {LLNL}, + number = {LLNL-TR-437091}, + year = 2023 } % % KINSOL user guide % @techreport{kinsol_ug, -author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, -title = {{User Documentation for KINSOL v6.6.2}}, -institution = {LLNL}, -number = {UCRL-SM-208116}, -year = 2023 + author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward}, + title = {{User Documentation for KINSOL v6.7.0}}, + institution = {LLNL}, + number = {UCRL-SM-208116}, + year = 2023 } % % KINSOL examples % @techreport{kinsol_ex, -author = {Aaron M. Collier and Radu Serban}, -title = {{Example Programs for KINSOL v6.6.2}}, -institution = {LLNL}, -number = {UCRL-SM-208114}, -year = 2023 + author = {Aaron M. Collier and Radu Serban}, + title = {{Example Programs for KINSOL v6.7.0}}, + institution = {LLNL}, + number = {UCRL-SM-208114}, + year = 2023 } %--------------------------------------------------------- @@ -150,45 +150,45 @@ @techreport{kinsol_ex % CVODE original report % @techreport{CoHi:94, -author = {S. D. Cohen and A. C. Hindmarsh}, -title = {{CVODE User Guide}}, -institution = {LLNL}, -number = {UCRL-MA-118618}, -month = {Sep}, -year = 1994 + author = {S. D. Cohen and A. C. Hindmarsh}, + title = {{CVODE User Guide}}, + institution = {LLNL}, + number = {UCRL-MA-118618}, + month = {Sep}, + year = 1994 } % % PVODE original report % @techreport{ByHi:98, -author = {G. D. Byrne and A. C. Hindmarsh}, -title = {{User Documentation for PVODE, An ODE Solver for Parallel Computers}}, -institution = {LLNL}, -number = {UCRL-ID-130884}, -month = {May}, -year = 1998 + author = {G. D. Byrne and A. C. Hindmarsh}, + title = {{User Documentation for PVODE, An ODE Solver for Parallel Computers}}, + institution = {LLNL}, + number = {UCRL-ID-130884}, + month = {May}, + year = 1998 } % % IDA original report % @techreport{HiTa:99, -author = {A. C. Hindmarsh and A. G. Taylor}, -title = {{User Documentation for IDA, a Differential-Algebraic Equation Solver for Sequential and Parallel Computers}}, -institution = {LLNL}, -number = {UCRL-MA-136910}, -month = {Dec}, -year = 1999 + author = {A. C. Hindmarsh and A. G. Taylor}, + title = {{User Documentation for IDA, a Differential-Algebraic Equation Solver for Sequential and Parallel Computers}}, + institution = {LLNL}, + number = {UCRL-MA-136910}, + month = {Dec}, + year = 1999 } % % KINSOL original report % @techreport{TaHi:98, -author = {A. G. Taylor and A. C. Hindmarsh}, -title = {{User Documentation for KINSOL, A Nonlinear Solver for Sequential and Parallel Computers}}, -institution = {LLNL}, -number = {UCRL-ID-131185}, -month = {Jul}, -year = 1998 + author = {A. G. Taylor and A. C. Hindmarsh}, + title = {{User Documentation for KINSOL, A Nonlinear Solver for Sequential and Parallel Computers}}, + institution = {LLNL}, + number = {UCRL-ID-131185}, + month = {Jul}, + year = 1998 } %--------------------------------------------------------- @@ -199,129 +199,129 @@ @techreport{TaHi:98 % SUNDIALS ACM article % @article{HBGLSSW:05, -author = {A. C. Hindmarsh and P. N. Brown and K. E. Grant and S. L. Lee and R. Serban and D. E. Shumaker and C. S. Woodward}, -title = {{SUNDIALS: Suite} of Nonlinear and Differential/Algebraic Equation Solvers}, -journal = {ACM Trans. Math. Softw.}, -number = {31}, -pages = {363--396}, -year = {2005}, -doi = {10.1145/1089014.1089020} + author = {A. C. Hindmarsh and P. N. Brown and K. E. Grant and S. L. Lee and R. Serban and D. E. Shumaker and C. S. Woodward}, + title = {{SUNDIALS: Suite} of Nonlinear and Differential/Algebraic Equation Solvers}, + journal = {ACM Trans. Math. Softw.}, + number = {31}, + pages = {363--396}, + year = {2005}, + doi = {10.1145/1089014.1089020} } % % SUNDIALS PARCO GPU paper % @article{balos2021enabling, -title = {Enabling {GPU} accelerated computing in the {SUNDIALS} time integration library}, -author = {Balos, Cody J and Gardner, David J and Woodward, Carol S and Reynolds, Daniel R}, -journal = {Parallel Computing}, -volume = {108}, -pages = {102836}, -year = {2021}, -publisher = {Elsevier}, -doi = {10.1016/j.parco.2021.102836} + title = {Enabling {GPU} accelerated computing in the {SUNDIALS} time integration library}, + author = {Balos, Cody J and Gardner, David J and Woodward, Carol S and Reynolds, Daniel R}, + journal = {Parallel Computing}, + volume = {108}, + pages = {102836}, + year = {2021}, + publisher = {Elsevier}, + doi = {10.1016/j.parco.2021.102836} } % % CVODES ASME article % @inproceedings{SeHi:05, -author = {R. Serban and A. C. Hindmarsh}, -title = {{CVODES: The} Sensitivity-Enabled {ODE} Solver in {SUNDIALS}}, -booktitle = {Proceedings of the 5th International Conference on Multibody Systems, Nonlinear Dynamics and Control}, -publisher = {ASME}, -address = {Long Beach, CA}, -year = {2005}, -doi = {10.1115/DETC2005-85597} + author = {R. Serban and A. C. Hindmarsh}, + title = {{CVODES: The} Sensitivity-Enabled {ODE} Solver in {SUNDIALS}}, + booktitle = {Proceedings of the 5th International Conference on Multibody Systems, Nonlinear Dynamics and Control}, + publisher = {ASME}, + address = {Long Beach, CA}, + year = {2005}, + doi = {10.1115/DETC2005-85597} } % % CVODE original article % @article{CoHi:96, -author = {S. D. Cohen and A. C. Hindmarsh}, -title = {{CVODE, A Stiff/Nonstiff ODE Solver in C}}, -journal = {Computers in Physics}, -volume = {10}, -number = {2}, -pages = {138--143}, -year = {1996}, -doi = {10.1063/1.4822377} + author = {S. D. Cohen and A. C. Hindmarsh}, + title = {{CVODE, A Stiff/Nonstiff ODE Solver in C}}, + journal = {Computers in Physics}, + volume = {10}, + number = {2}, + pages = {138--143}, + year = {1996}, + doi = {10.1063/1.4822377} } % % PVODE & IDA % @techreport{Hin:00, -author = {A. C. Hindmarsh}, -title = {{The PVODE and IDA Algorithms}}, -institution = {LLNL}, -number = {UCRL-ID-141558}, -month = {Dec}, -year = 2000 + author = {A. C. Hindmarsh}, + title = {{The PVODE and IDA Algorithms}}, + institution = {LLNL}, + number = {UCRL-ID-141558}, + month = {Dec}, + year = 2000 } % % Report on PVODE and KINSOL % @techreport{HiTa:98, -author = {A. C. Hindmarsh and A. G. Taylor}, -title = {{PVODE and KINSOL: Parallel Software for Differential and Nonlinear Systems}}, -institution = {LLNL}, -number = {UCRL-ID-129739}, -month = feb, -year = 1998 + author = {A. C. Hindmarsh and A. G. Taylor}, + title = {{PVODE and KINSOL: Parallel Software for Differential and Nonlinear Systems}}, + institution = {LLNL}, + number = {UCRL-ID-129739}, + month = feb, + year = 1998 } % % SensPVODE user guide % @techreport{LHB:00, -author = {S. L. Lee and A. C. Hindmarsh and P. N. Brown}, -title = {{User Documentation for {SensPVODE}, A Variant of {PVODE} for Sensitivity Analysis}}, -institution = {LLNL}, -number = {UCRL-MA-140211}, -month = aug, -year = 2000 + author = {S. L. Lee and A. C. Hindmarsh and P. N. Brown}, + title = {{User Documentation for {SensPVODE}, A Variant of {PVODE} for Sensitivity Analysis}}, + institution = {LLNL}, + number = {UCRL-MA-140211}, + month = aug, + year = 2000 } % % SensIDA user guide % @techreport{LeHi:01, -author = {S. L. Lee and A. C. Hindmarsh}, -title = {{User Documentation for {SensIDA}, A Variant of {IDA} for Sensitivity Analysis}}, -institution = {LLNL}, -number = {UCRL-MA-145712}, -month = oct, -year = 2001 + author = {S. L. Lee and A. C. Hindmarsh}, + title = {{User Documentation for {SensIDA}, A Variant of {IDA} for Sensitivity Analysis}}, + institution = {LLNL}, + number = {UCRL-MA-145712}, + month = oct, + year = 2001 } % % SensKINSOL user guide % @techreport{GHT:03, -author = {K. E. Grant and A. C. Hindmarsh and A. G. Taylor}, -title = {{User Documentation for SensKINSOL, a Variant of KINSOL for Sensitivity Analysis}}, -institution = {LLNL}, -number = {in preparation}, -year = 2003 + author = {K. E. Grant and A. C. Hindmarsh and A. G. Taylor}, + title = {{User Documentation for SensKINSOL, a Variant of KINSOL for Sensitivity Analysis}}, + institution = {LLNL}, + number = {in preparation}, + year = 2003 } % % Problem test for PVODE % @techreport{Wit:96, -author = {M. R. Wittman}, -title = {{Testing of PVODE, a Parallel ODE Solver}}, -institution = {LLNL}, -number = {UCRL-ID-125562}, -month = aug, -syear = 1996 + author = {M. R. Wittman}, + title = {{Testing of PVODE, a Parallel ODE Solver}}, + institution = {LLNL}, + number = {UCRL-ID-125562}, + month = aug, + syear = 1996 } % % PVODE % @article{ByHi:99, -author = {G. D. Byrne and A. C. Hindmarsh}, -title = {{PVODE, an ODE Solver for Parallel Computers}}, -journal = {Intl. J. High Perf. Comput. Apps.}, -volume = {13}, -number = {4}, -pages = {254--365}, -year = {1999}, -doi = {10.1177/109434209901300405} + author = {G. D. Byrne and A. C. Hindmarsh}, + title = {{PVODE, an ODE Solver for Parallel Computers}}, + journal = {Intl. J. High Perf. Comput. Apps.}, + volume = {13}, + number = {4}, + pages = {254--365}, + year = {1999}, + doi = {10.1177/109434209901300405} } %--------------------------------------------------------- @@ -332,89 +332,89 @@ @article{ByHi:99 % DASSL % @book{BCP:96, -author = {K. E. Brenan and S. L. Campbell and L. R. Petzold}, -title = {{Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations}}, -publisher = {SIAM}, -address = {Philadelphia, Pa}, -year = {1996}, -doi = {10.1137/1.9781611971224} + author = {K. E. Brenan and S. L. Campbell and L. R. Petzold}, + title = {{Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations}}, + publisher = {SIAM}, + address = {Philadelphia, Pa}, + year = {1996}, + doi = {10.1137/1.9781611971224} } % % VODE/EPISODE % @article{BBH:89, -author = {P. N. Brown and G. D. Byrne and A. C. Hindmarsh}, -title = {{VODE, a Variable-Coefficient ODE Solver}}, -journal = {SIAM J. Sci. Stat. Comput.}, -volume = {10}, -pages = {1038--1051}, -year = {1989}, -doi = {10.1137/0910062} + author = {P. N. Brown and G. D. Byrne and A. C. Hindmarsh}, + title = {{VODE, a Variable-Coefficient ODE Solver}}, + journal = {SIAM J. Sci. Stat. Comput.}, + volume = {10}, + pages = {1038--1051}, + year = {1989}, + doi = {10.1137/0910062} } % % DASPK % @article{BHP:94, -author = {P. N. Brown and A. C. Hindmarsh and L. R. Petzold}, -title = {{Using Krylov Methods in the Solution of Large-Scale Differential-Algebraic Systems}}, -journal = {SIAM J. Sci. Comput.}, -volume = {15}, -pages = {1467--1488}, -year = {1994}, -doi = {10.1137/0915088} + author = {P. N. Brown and A. C. Hindmarsh and L. R. Petzold}, + title = {{Using Krylov Methods in the Solution of Large-Scale Differential-Algebraic Systems}}, + journal = {SIAM J. Sci. Comput.}, + volume = {15}, + pages = {1467--1488}, + year = {1994}, + doi = {10.1137/0915088} } % % DASPK3.0 description % @article{LiPe:99a, -author = {S. Li and L. R. Petzold}, -title = {{Software and Algorithms for Sensitivity Analysis of Large-Scale Differential-Algebraic Systems}}, -journal = {Journal of Computational and Applied Mathematics}, -volume = {125}, -pages = {131-145}, -year = 2000 + author = {S. Li and L. R. Petzold}, + title = {{Software and Algorithms for Sensitivity Analysis of Large-Scale Differential-Algebraic Systems}}, + journal = {Journal of Computational and Applied Mathematics}, + volume = {125}, + pages = {131-145}, + year = 2000 } @techreport{LiPe:99b, -author = {S. Li and L. R. Petzold}, -title = {{Design of New {DASPK} for Sensitivity Analysis}}, -institution = {Dept. of Computer Science, UCSB}, -year = 1999 + author = {S. Li and L. R. Petzold}, + title = {{Design of New {DASPK} for Sensitivity Analysis}}, + institution = {Dept. of Computer Science, UCSB}, + year = 1999 } % % NKSOL % @article{BrSa:90, -author = {P. N. Brown and Y. Saad}, -title = {{Hybrid Krylov Methods for Nonlinear Systems of Equations}}, -journal = {SIAM J. Sci. Stat. Comput.}, -volume = {11}, -pages = {450--481}, -year = {1990}, -doi = {10.1137/0911026} + author = {P. N. Brown and Y. Saad}, + title = {{Hybrid Krylov Methods for Nonlinear Systems of Equations}}, + journal = {SIAM J. Sci. Stat. Comput.}, + volume = {11}, + pages = {450--481}, + year = {1990}, + doi = {10.1137/0911026} } % % VODPK % @inproceedings{Byr:92, -author = {G. D. Byrne}, -title = {{Pragmatic Experiments with Krylov Methods in the Stiff ODE Setting}}, -booktitle = {Computational Ordinary Differential Equations}, -editor = {Cash, J.R. and Gladwell, I.}, -publisher = {Oxford University Press}, -address = {Oxford}, -pages = {323--356}, -year = 1992 + author = {G. D. Byrne}, + title = {{Pragmatic Experiments with Krylov Methods in the Stiff ODE Setting}}, + booktitle = {Computational Ordinary Differential Equations}, + editor = {Cash, J.R. and Gladwell, I.}, + publisher = {Oxford University Press}, + address = {Oxford}, + pages = {323--356}, + year = 1992 } % % LSODE report % @techreport{RaHi:94, -author = {K. Radhakrishnan and A. C. Hindmarsh}, -title = {{Description and Use of LSODE, the Livermore Solver for Ordinary Differential Equations}}, -institution = {LLNL}, -number = {UCRL-ID-113855}, -month = {march}, -year = 1994 + author = {K. Radhakrishnan and A. C. Hindmarsh}, + title = {{Description and Use of LSODE, the Livermore Solver for Ordinary Differential Equations}}, + institution = {LLNL}, + number = {UCRL-ID-113855}, + month = {march}, + year = 1994 } %--------------------------------------------------------- @@ -425,94 +425,94 @@ @techreport{RaHi:94 % General ODE/DAE % @book{AsPe:98, -author = {U. M. Ascher and L. R. Petzold}, -title = {{Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations}}, -publisher = {SIAM}, -address = {Philadelphia, Pa}, -year = {1998} + author = {U. M. Ascher and L. R. Petzold}, + title = {{Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations}}, + publisher = {SIAM}, + address = {Philadelphia, Pa}, + year = {1998} } @book{HWN:87, -author = {E. Hairer and S. P. Norsett and G. Wanner}, -title = {{Solving Ordinary Differential Equations I}}, -publisher = {Springer-Verlag}, -address = {Berlin}, -year = 1987 + author = {E. Hairer and S. P. Norsett and G. Wanner}, + title = {{Solving Ordinary Differential Equations I}}, + publisher = {Springer-Verlag}, + address = {Berlin}, + year = 1987 } @book{HaWa:91, -author = {E. Hairer and G. Wanner}, -title = {{Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems}}, -publisher = {Springer-Verlag}, -address = {Berlin}, -year = 1991, -} -@book{HaWa:06, -author = {Hairer, Ernst and Wanner, Gerhard and Lubich, Christian}, -title = {{Geometric Numerical Integration, Structure-Preserving Algorithms for Ordinary Differential Equations}}, -publisher = {Springer Series in Computational Mathematics}, -doi = {10.1007/3-540-30666-8}, -year = {2006} + author = {E. Hairer and G. Wanner}, + title = {{Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems}}, + publisher = {Springer-Verlag}, + address = {Berlin}, + year = 1991 +} +@book{HaWa:06, + author = {Hairer, Ernst and Wanner, Gerhard and Lubich, Christian}, + title = {{Geometric Numerical Integration, Structure-Preserving Algorithms for Ordinary Differential Equations}}, + publisher = {Springer Series in Computational Mathematics}, + doi = {10.1007/3-540-30666-8}, + year = {2006} } @article{GGL:85, -author = {C.W. Gear and B. Leimkuhler and G.K. Gupta}, -title = {{Automatic Integration of Euler-Lagrange Equations with Constraints}}, -journal = {J. Comput. Appl. Math.}, -volume = {12/13}, -pages = {77--90}, -year = 1985 + author = {C.W. Gear and B. Leimkuhler and G.K. Gupta}, + title = {{Automatic Integration of Euler-Lagrange Equations with Constraints}}, + journal = {J. Comput. Appl. Math.}, + volume = {12/13}, + pages = {77--90}, + year = 1985 } % % LMM articles % @article{BrHi:89, -author = {P. N. Brown and A. C. Hindmarsh}, -title = {Reduced Storage Matrix Methods in Stiff {ODE} Systems}, -journal = {J. Appl. Math. \& Comp.}, -volume = {31}, -pages = {49--91}, -year = {1989}, -doi = {10.1016/0096-3003(89)90110-0} + author = {P. N. Brown and A. C. Hindmarsh}, + title = {Reduced Storage Matrix Methods in Stiff {ODE} Systems}, + journal = {J. Appl. Math. \& Comp.}, + volume = {31}, + pages = {49--91}, + year = {1989}, + doi = {10.1016/0096-3003(89)90110-0} } @article{ByHi:75, -author = {G. D. Byrne and A. C. Hindmarsh}, -title = {{A Polyalgorithm for the Numerical Solution of Ordinary Differential Equations}}, -journal = {ACM Trans. Math. Softw.}, -volume = {1}, -pages = {71--96}, -year = {1975}, -doi = {10.1145/355626.355636} + author = {G. D. Byrne and A. C. Hindmarsh}, + title = {{A Polyalgorithm for the Numerical Solution of Ordinary Differential Equations}}, + journal = {ACM Trans. Math. Softw.}, + volume = {1}, + pages = {71--96}, + year = {1975}, + doi = {10.1145/355626.355636} } @article{JaSD:80, -author = {K. R. Jackson and R. Sacks-Davis}, -title = {{An Alternative Implementation of Variable Step-Size Multistep Formulas for Stiff ODEs}}, -journal = {ACM Trans. Math. Softw.}, -volume = {6}, -number = {3}, -pages = {295--318}, -year = {1980}, -doi = {10.1145/355900.355903} + author = {K. R. Jackson and R. Sacks-Davis}, + title = {{An Alternative Implementation of Variable Step-Size Multistep Formulas for Stiff ODEs}}, + journal = {ACM Trans. Math. Softw.}, + volume = {6}, + number = {3}, + pages = {295--318}, + year = {1980}, + doi = {10.1145/355900.355903} } % % BDF Stability Limit Detection % @inproceedings{Hin:92, -author = {A. C. Hindmarsh}, -title = {{Detecting Stability Barriers in BDF Solvers}}, -booktitle = {Computational Ordinary Differential Equations}, -editor = {{J.R. Cash and I. Gladwell}}, -publisher = {Oxford University Press}, -address = {Oxford}, -pages = {87--96}, -year = 1992 + author = {A. C. Hindmarsh}, + title = {{Detecting Stability Barriers in BDF Solvers}}, + booktitle = {Computational Ordinary Differential Equations}, + editor = {{J.R. Cash and I. Gladwell}}, + publisher = {Oxford University Press}, + address = {Oxford}, + pages = {87--96}, + year = 1992 } @article{Hin:95, -author = {A. C. Hindmarsh}, -title = {Avoiding {BDF} Stability Barriers in the {MOL} Solution of Advection-Dominated Problems}, -journal = {Appl. Num. Math.}, -volume = {17}, -number = {3}, -pages = {311--318}, -year = {1995}, -doi = {10.1016/0168-9274(95)00036-T} + author = {A. C. Hindmarsh}, + title = {Avoiding {BDF} Stability Barriers in the {MOL} Solution of Advection-Dominated Problems}, + journal = {Appl. Num. Math.}, + volume = {17}, + number = {3}, + pages = {311--318}, + year = {1995}, + doi = {10.1016/0168-9274(95)00036-T} } % % Projection methods for IVPs with constraints @@ -543,112 +543,112 @@ @article{shampine1999conservation % Consistent initialization for DAE % @article{BHP:98, -author = {P. N. Brown and A. C. Hindmarsh and L. R. Petzold}, -title = {{Consistent Initial Condition Calculation for Differential-Algebraic Systems}}, -journal = {SIAM J. Sci. Comput.}, -volume = {19}, -pages = {1495--1512}, -year = {1998}, -doi = {10.1137/S1064827595289996} + author = {P. N. Brown and A. C. Hindmarsh and L. R. Petzold}, + title = {{Consistent Initial Condition Calculation for Differential-Algebraic Systems}}, + journal = {SIAM J. Sci. Comput.}, + volume = {19}, + pages = {1495--1512}, + year = {1998}, + doi = {10.1137/S1064827595289996} } % % Rootfinding % @techreport{HeSh:80, -author = {K. L. Hiebert and L. F. Shampine}, -title = {{Implicitly Defined Output Points for Solutions of ODEs}}, -institution = {Sandia National Laboratories}, -number = {SAND80-0180}, -month = feb, -year = 1980 + author = {K. L. Hiebert and L. F. Shampine}, + title = {{Implicitly Defined Output Points for Solutions of ODEs}}, + institution = {Sandia National Laboratories}, + number = {SAND80-0180}, + month = feb, + year = 1980 } % % DAE Adjoint sensitivity % @article{CLPS:03, -author = {Y. Cao and S. Li and L. R. Petzold and R. Serban}, -title = {{Adjoint Sensitivity Analysis for Differential-Algebraic Equations: The Adjoint {DAE} System and its Numerical Solution}}, -journal = {SIAM J. Sci. Comput.}, -volume = {24}, -number = {3}, -pages = {1076--1089}, -year = {2003}, -doi = {10.1137/S1064827501380630} + author = {Y. Cao and S. Li and L. R. Petzold and R. Serban}, + title = {{Adjoint Sensitivity Analysis for Differential-Algebraic Equations: The Adjoint {DAE} System and its Numerical Solution}}, + journal = {SIAM J. Sci. Comput.}, + volume = {24}, + number = {3}, + pages = {1076--1089}, + year = {2003}, + doi = {10.1137/S1064827501380630} } % % 2nd order sensitivity analysis % @article{OzBa:05, -author = {D.B. Ozyurt and P.I. Barton}, -title = {Cheap second order directional derivatives of stiff {ODE} embedded functionals}, -journal = {SIAM J. of Sci. Comp.}, -volume = {26}, -number = {5}, -pages = {1725--1743}, -year = {2005}, -doi = {10.1137/030601582} + author = {D.B. Ozyurt and P.I. Barton}, + title = {Cheap second order directional derivatives of stiff {ODE} embedded functionals}, + journal = {SIAM J. of Sci. Comp.}, + volume = {26}, + number = {5}, + pages = {1725--1743}, + year = {2005}, + doi = {10.1137/030601582} } % % Staggered direct method for forward sensitivity % @article{CaSt:85, -author = {M. Caracotsios and W. E. Stewart}, -title = {Sensitivity Analysis of Initial Value Problems with Mixed ODEs and Algebraic Equations}, -journal = {Computers and Chemical Engineering}, -volume = {9}, -number = {4}, -pages = {359-365}, -year = {1985}, -doi = {10.1016/0098-1354(85)85014-6} + author = {M. Caracotsios and W. E. Stewart}, + title = {Sensitivity Analysis of Initial Value Problems with Mixed ODEs and Algebraic Equations}, + journal = {Computers and Chemical Engineering}, + volume = {9}, + number = {4}, + pages = {359-365}, + year = {1985}, + doi = {10.1016/0098-1354(85)85014-6} } % % Simultaneous corrector method for forward sensitivity % @article{MaPe:97, -author = {T. Maly and L. R. Petzold}, -title = {{Numerical Methods and Software for Sensitivity Analysis of Differential-Algebraic Systems}}, -journal = {Applied Numerical Mathematics}, -volume = {20}, -number = {1-2}, -pages = {57-79}, -year = {1996}, -doi = {10.1016/0168-9274(95)00117-4} + author = {T. Maly and L. R. Petzold}, + title = {{Numerical Methods and Software for Sensitivity Analysis of Differential-Algebraic Systems}}, + journal = {Applied Numerical Mathematics}, + volume = {20}, + number = {1-2}, + pages = {57-79}, + year = {1996}, + doi = {10.1016/0168-9274(95)00117-4} } % % Staggered corrector method for forward sensitivity % @article{FTB:97, -author = {W. F. Feehery and J. E. Tolsma and P. I. Barton}, -title = {{Efficient Sensitivity Analysis of Large-Scale Differential-Algebraic Systems}}, -journal = {Applied Numer. Math.}, -volume = {25}, -number = {1}, -pages = {41--54}, -year = {1997}, -doi = {10.1016/S0168-9274(97)00050-0} + author = {W. F. Feehery and J. E. Tolsma and P. I. Barton}, + title = {{Efficient Sensitivity Analysis of Large-Scale Differential-Algebraic Systems}}, + journal = {Applied Numer. Math.}, + volume = {25}, + number = {1}, + pages = {41--54}, + year = {1997}, + doi = {10.1016/S0168-9274(97)00050-0} } % % Linear algebra % @book{GoVL:96, -author = {G. H. Golub and C. F. Van Loan}, -title = {{Matrix computations}}, -publisher = {The Johns Hopkins University Press}, -address = {Baltimore, Md}, -year = 1996 + author = {G. H. Golub and C. F. Van Loan}, + title = {{Matrix computations}}, + publisher = {The Johns Hopkins University Press}, + address = {Baltimore, Md}, + year = 1996 } % % GMRES % @article{SaSc:86, -author = {Y. Saad and M. H. Schultz}, -title = {{GMRES: A Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems}}, -journal = {SIAM J. Sci. Stat. Comp.}, -volume = {7}, -number = {3}, -pages = {856--869}, -year = {1986}, -doi = {10.1137/0907058} + author = {Y. Saad and M. H. Schultz}, + title = {{GMRES: A Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems}}, + journal = {SIAM J. Sci. Stat. Comp.}, + volume = {7}, + number = {3}, + pages = {856--869}, + year = {1986}, + doi = {10.1137/0907058} } % % FGMRES @@ -708,21 +708,21 @@ @article{HeSt:52 % Ginkgo % @article{ginkgo-toms-2022, -title = {{Ginkgo: A Modern Linear Operator Algebra Framework for High Performance Computing}}, -volume = {48}, -copyright = {All rights reserved}, -issn = {0098-3500}, -shorttitle = {Ginkgo}, -url = {https://doi.org/10.1145/3480935}, -doi = {10.1145/3480935}, -number = {1}, -urldate = {2022-02-17}, -journal = {ACM Transactions on Mathematical Software}, -author = {Anzt, Hartwig and Cojean, Terry and Flegar, Goran and G\"obel, Fritz and Gr\"utzmacher, Thomas and Nayak, Pratik and Ribizel, Tobias and Tsai, Yuhsiang Mike and Quintana-Ort\'i, Enrique S.}, -month = feb, -year = {2022}, -keywords = {ginkgo, healthy software lifecycle, High performance computing, multi-core and manycore architectures}, -pages = {2:1--2:33} + title = {{Ginkgo: A Modern Linear Operator Algebra Framework for High Performance Computing}}, + volume = {48}, + copyright = {All rights reserved}, + issn = {0098-3500}, + shorttitle = {Ginkgo}, + url = {https://doi.org/10.1145/3480935}, + doi = {10.1145/3480935}, + number = {1}, + urldate = {2022-02-17}, + journal = {ACM Transactions on Mathematical Software}, + author = {Anzt, Hartwig and Cojean, Terry and Flegar, Goran and G\"obel, Fritz and Gr\"utzmacher, Thomas and Nayak, Pratik and Ribizel, Tobias and Tsai, Yuhsiang Mike and Quintana-Ort\'i, Enrique S.}, + month = feb, + year = {2022}, + keywords = {ginkgo, healthy software lifecycle, High performance computing, multi-core and manycore architectures}, + pages = {2:1--2:33} } % % KLU @@ -738,44 +738,44 @@ @article{DaPa:10 publisher = {ACM}, doi = {10.1145/1824801.1824814} } -@Misc{KLU_site, +@misc{KLU_site, title = {{KLU Sparse Matrix Factorization Library}}, - howpublished = {\url{http://faculty.cse.tamu.edu/davis/suitesparse.html}}, + howpublished = {\url{http://faculty.cse.tamu.edu/davis/suitesparse.html}} } % % SuperLU_MT % @article{Li:05, - author = {X. S. Li}, - title = {An Overview of {SuperLU}: Algorithms, Implementation, and User Interface}, - journal = {{ACM} Trans. Math. Softw.}, - volume = {31}, - number = {3}, - month = {September}, - year = {2005}, - pages = {302--325}, - doi = {10.1145/1089014.1089017} + author = {X. S. Li}, + title = {An Overview of {SuperLU}: Algorithms, Implementation, and User Interface}, + journal = {{ACM} Trans. Math. Softw.}, + volume = {31}, + number = {3}, + month = {September}, + year = {2005}, + pages = {302--325}, + doi = {10.1145/1089014.1089017} } @article{DGL:99, - author = {J. W. Demmel and J. R. Gilbert and X. S. Li}, - title = {{An Asynchronous Parallel Supernodal Algorithm for Sparse Gaussian Elimination}}, - journal = {SIAM J. Matrix Analysis and Applications}, - volume = {20}, - number = {4}, - pages = {915--952}, - year = {1999}, - doi = {10.1137/S0895479897317685} -} -@Misc{SuperLUMT_site, + author = {J. W. Demmel and J. R. Gilbert and X. S. Li}, + title = {{An Asynchronous Parallel Supernodal Algorithm for Sparse Gaussian Elimination}}, + journal = {SIAM J. Matrix Analysis and Applications}, + volume = {20}, + number = {4}, + pages = {915--952}, + year = {1999}, + doi = {10.1137/S0895479897317685} +} +@misc{SuperLUMT_site, title = {{SuperLU\_MT Threaded Sparse Matrix Factorization Library}}, - howpublished = {\url{https://portal.nersc.gov/project/sparse/superlu/#superlu_mt}}, + howpublished = {\url{https://portal.nersc.gov/project/sparse/superlu/#superlu_mt}} } % % SuperLU_DIST % @article{GDL:07, - Author = {Laura Grigori and James W. Demmel and Xiaoye S. Li}, - Title = {Parallel Symbolic Factorization for Sparse {LU} with Static Pivoting}, + author = {Laura Grigori and James W. Demmel and Xiaoye S. Li}, + title = {Parallel Symbolic Factorization for Sparse {LU} with Static Pivoting}, journal = {SIAM J. Scientific Computing}, volume = {29}, number = {3}, @@ -801,62 +801,62 @@ @techreport{SLUUG:99 title = {{SuperLU Users' Guide}}, month = {September}, year = {1999}, - note = "\url{http://crd.lbl.gov/~xiaoye/SuperLU/}. Last update: August 2011" + note = {\url{http://crd.lbl.gov/~xiaoye/SuperLU/}. Last update: August 2011} } -@Misc{SuperLUDIST_site, +@misc{SuperLUDIST_site, title = {{SuperLU\_DIST Parallel Sparse Matrix Factorization Library}}, - howpublished = {\url{https://portal.nersc.gov/project/sparse/superlu/#superlu_dist}}, + howpublished = {\url{https://portal.nersc.gov/project/sparse/superlu/#superlu_dist}} } % % ADIFOR % @article{BCCGH:92, -author = {C. Bischof and A. Carle and G. Corliss and A. Griewank and P. Hovland}, -title = {{ADIFOR - Generating Derivative Codes from Fortran Programs}}, -journal = {Scientific Programming}, -volume = {1}, -pages = {11-29}, -year = 1992 + author = {C. Bischof and A. Carle and G. Corliss and A. Griewank and P. Hovland}, + title = {{ADIFOR - Generating Derivative Codes from Fortran Programs}}, + journal = {Scientific Programming}, + volume = {1}, + pages = {11-29}, + year = 1992 } % % TAMC: reverse automatic differentiation (Fortran) % @article{GiKa:98, -author = {R. Giering and T. Kaminski}, -title = {{Recipes for Adjoint Code Construction}}, -journal = {ACM Transactions on Mathematical Software}, -volume = {24(4)}, -pages = {437-474}, -year = 1998 + author = {R. Giering and T. Kaminski}, + title = {{Recipes for Adjoint Code Construction}}, + journal = {ACM Transactions on Mathematical Software}, + volume = {24(4)}, + pages = {437-474}, + year = 1998 } % % TAPENADE % @techreport{tapenade:04, -title = {TAPENADE 2.1 user's guide}, -author = {L. Hasco{\''e}t and V Pascual}, -typdoc = {Technical report}, -number = {300}, -institution = {INRIA}, -year = {2004}, -url = {http://hal.inria.fr/inria-00069880}, + title = {TAPENADE 2.1 user's guide}, + author = {L. Hasco{\''e}t and V Pascual}, + typdoc = {Technical report}, + number = {300}, + institution = {INRIA}, + year = {2004}, + url = {http://hal.inria.fr/inria-00069880} } % % ADOLC % @article{adolc:96, - author = {Andreas Griewank and David Juedes and Jean Utke}, - title = {Algorithm 755: {ADOL-C}: a package for the automatic differentiation of algorithms written in C/C++}, - journal = {ACM Trans. Math. Softw.}, - volume = {22}, - number = {2}, - year = {1996}, - issn = {0098-3500}, - pages = {131--167}, - publisher = {ACM}, - address = {New York, NY, USA}, - doi = {10.1145/229473.229474} - } + author = {Andreas Griewank and David Juedes and Jean Utke}, + title = {Algorithm 755: {ADOL-C}: a package for the automatic differentiation of algorithms written in C/C++}, + journal = {ACM Trans. Math. Softw.}, + volume = {22}, + number = {2}, + year = {1996}, + issn = {0098-3500}, + pages = {131--167}, + publisher = {ACM}, + address = {New York, NY, USA}, + doi = {10.1145/229473.229474} +} %--------------------------------------------------------- %--------------------------------------------------------- @@ -864,81 +864,81 @@ @article{adolc:96 @article{ACR:79, -author = {U. M. Ascher and J. Christiansen and R. D. Russel}, -title = {{A Collocation Solver for Mixed Order Systems of Boundary Value Problems}}, -journal = {Math. Comp.}, -volume = {33}, -pages = {659-679}, -year = {1979} + author = {U. M. Ascher and J. Christiansen and R. D. Russel}, + title = {{A Collocation Solver for Mixed Order Systems of Boundary Value Problems}}, + journal = {Math. Comp.}, + volume = {33}, + pages = {659-679}, + year = {1979} } @book{AMR:95, -author = {U. M. Ascher and R. M. Mattheij and R. D. Russell}, -title = {{Numerical solution of Boundary Value Problems for Ordinary Differential Equations}}, -publisher = {SIAM}, -address = {Philadelphia, Pa}, -year = 1995 + author = {U. M. Ascher and R. M. Mattheij and R. D. Russell}, + title = {{Numerical solution of Boundary Value Problems for Ordinary Differential Equations}}, + publisher = {SIAM}, + address = {Philadelphia, Pa}, + year = 1995 } @article{AsPe:93, -author = {U. M. Ascher and L. R. Petzold}, -title = {{Stability of Computational Methods for Constrained Dynamics Systems}}, -journal = {SIAM J. Sci. Comput.}, -volume = {14}, -number = {1}, -pages = {95-120}, -year = {1993}, -doi = {10.1137/0914007} + author = {U. M. Ascher and L. R. Petzold}, + title = {{Stability of Computational Methods for Constrained Dynamics Systems}}, + journal = {SIAM J. Sci. Comput.}, + volume = {14}, + number = {1}, + pages = {95-120}, + year = {1993}, + doi = {10.1137/0914007} } @article{Bal:96a, -author = {K. Balla}, -title = {{Linear Subspaces for Linear DAEs of Index 1}}, -journal = {Computers Math. Applic.}, -volume = {32}, -number = {4/5}, -pages = {81--86}, -year = 1996 + author = {K. Balla}, + title = {{Linear Subspaces for Linear DAEs of Index 1}}, + journal = {Computers Math. Applic.}, + volume = {32}, + number = {4/5}, + pages = {81--86}, + year = 1996 } @article{Bal:96b, -author = {K. Balla}, -title = {{Boundary Conditions and their Transfer for Differential Algebraic Equations of Index 1}}, -journal = {Computers Math. Applic.}, -volume = {31}, -nubmer = {10}, -pages = {1--5}, -year = 1996 + author = {K. Balla}, + title = {{Boundary Conditions and their Transfer for Differential Algebraic Equations of Index 1}}, + journal = {Computers Math. Applic.}, + volume = {31}, + nubmer = {10}, + pages = {1--5}, + year = 1996 } @article{BaMa:96, -author = {K. Balla and R. M{\"a}rz}, -title = {{Transfer of Boundary Conditions for DAEs of Index 1}}, -journal = {SIAM J. Numer. Anal.}, -volume = {33}, -number = {6}, -pages = {2318--2332}, -year = 1996 + author = {K. Balla and R. M{\"a}rz}, + title = {{Transfer of Boundary Conditions for DAEs of Index 1}}, + journal = {SIAM J. Numer. Anal.}, + volume = {33}, + number = {6}, + pages = {2318--2332}, + year = 1996 } @article{BaMa:00, -author = {K. Balla and R. M{\"a}rz}, -title = {{An Unified Approach to Linear Differential Algebraic Equations and their Adjoint Equations}}, -journal = {Institute of Mathematics Technical Report, Humboldt University, Berlin}, -year = 2000 + author = {K. Balla and R. M{\"a}rz}, + title = {{An Unified Approach to Linear Differential Algebraic Equations and their Adjoint Equations}}, + journal = {Institute of Mathematics Technical Report, Humboldt University, Berlin}, + year = 2000 } @article{BaMa:99, -author = {K. Balla and R. M{\"a}rz}, -title = {{Linear Differential Algebraic Equations of Index 1 and their Adjoint Equations}}, -journal = {Results in Mathematics}, -volume = {37}, -pages = {13-35}, -year = 2000 + author = {K. Balla and R. M{\"a}rz}, + title = {{Linear Differential Algebraic Equations of Index 1 and their Adjoint Equations}}, + journal = {Results in Mathematics}, + volume = {37}, + pages = {13-35}, + year = 2000 } % % % -@Book{Ber:95, -author = {D. P. Bertsekas}, -title = {{Nonlinear Programming}}, -publisher = {Athena Scientific}, -address = {Belmont, Massachusetts}, -year = 1995 +@book{Ber:95, + author = {D. P. Bertsekas}, + title = {{Nonlinear Programming}}, + publisher = {Athena Scientific}, + address = {Belmont, Massachusetts}, + year = 1995 } @@ -949,11 +949,11 @@ @Book{Ber:95 % % @article{BGW:03, -author = {P. N. Brown and K. E. Grant and C. S. Woodward}, -title = {{On the Calculation of Uncertainties for 3-D Time-Dependent Neutral Particle Transport}}, -journal = {J. of Comp. Phys.}, -volume = {submitted}, -year = 2003 + author = {P. N. Brown and K. E. Grant and C. S. Woodward}, + title = {{On the Calculation of Uncertainties for 3-D Time-Dependent Neutral Particle Transport}}, + journal = {J. of Comp. Phys.}, + volume = {submitted}, + year = 2003 } @@ -962,251 +962,251 @@ @article{BGW:03 % PVODE for BOUT equations % @article{RXH:02, -author = {T. D. Rognlien and X. Q. Xu and A. C. Hindmarsh}, -title = {{Application of Parallel Implicit Methods to Edge-Plasma Numerical Simulations}}, -journal = {Journal of Computational Physics}, -volume = {175}, -pages = {249-268}, -year = 2002 + author = {T. D. Rognlien and X. Q. Xu and A. C. Hindmarsh}, + title = {{Application of Parallel Implicit Methods to Edge-Plasma Numerical Simulations}}, + journal = {Journal of Computational Physics}, + volume = {175}, + pages = {249-268}, + year = 2002 } % % Forward sensitivity analysis, radiation diffusion % @unpublished{LWG:03, -author = {S. L. Lee and C. S. Woodward and F. Graziani}, -title = {{Analyzing Radiation Diffusion using Time-Dependent Sensitivity-Based Techniques}}, -journal = {Journal of Computational Physics}, -note = {To appear in J. on Comp. Phys.}, -year = 2003 + author = {S. L. Lee and C. S. Woodward and F. Graziani}, + title = {{Analyzing Radiation Diffusion using Time-Dependent Sensitivity-Based Techniques}}, + journal = {Journal of Computational Physics}, + note = {To appear in J. on Comp. Phys.}, + year = 2003 } % % Adjoint sensitivity % @article{Cac:81a, -author = {D. G. Cacuci}, -title = {{Sensitivity Theory for Nonlinear Systems. I. Nonlinear Functional Analysis Approach}}, -journal = {J. Math. Phys.}, -volume = {22}, -number = {12}, -pages = {2794-2802}, -year = 1981 + author = {D. G. Cacuci}, + title = {{Sensitivity Theory for Nonlinear Systems. I. Nonlinear Functional Analysis Approach}}, + journal = {J. Math. Phys.}, + volume = {22}, + number = {12}, + pages = {2794-2802}, + year = 1981 } % % Adjoint sensitivity % @article{Cac:81b, -author = {D. G. Cacuci}, -title = {{Sensitivity Theory for Nonlinear Systems. II. Extension to Additional Classes of Responses}}, -journal = {J. Math. Phys.}, -volume = {22}, -number = {12}, -pages = {2803-2812}, -year = 1981 + author = {D. G. Cacuci}, + title = {{Sensitivity Theory for Nonlinear Systems. II. Extension to Additional Classes of Responses}}, + journal = {J. Math. Phys.}, + volume = {22}, + number = {12}, + pages = {2803-2812}, + year = 1981 } @article{CBT:91, -author = {S. L. Campbell and N. K. Bichols and W. J. Terrel}, -title = {{Duality, Observability and Controllability for Linear Time-Varying Systems}}, -journal = {Circuits, Systems, Signal Process}, -volume = {10}, -number = {4}, -pages = {455--470}, -year = 1991 + author = {S. L. Campbell and N. K. Bichols and W. J. Terrel}, + title = {{Duality, Observability and Controllability for Linear Time-Varying Systems}}, + journal = {Circuits, Systems, Signal Process}, + volume = {10}, + number = {4}, + pages = {455--470}, + year = 1991 } @book{CoLe:55, -author = {E. A. Coddington and N. Levinson}, -title = {{Theory of Ordinary Differential Equations}}, -publisher = {McGraw-Hill}, -address = {New York}, -year = 1955 + author = {E. A. Coddington and N. Levinson}, + title = {{Theory of Ordinary Differential Equations}}, + publisher = {McGraw-Hill}, + address = {New York}, + year = 1955 } % % % -@Article{Den:81, -author = {J. E. {Dennis Jr.} and D. M. Gay and R. E. Welsch}, -title = {{An Adaptive Nonlinear Least-Squares Algorithm}}, -journal = {ACM Transactions on Mathematical Software}, -volume = {7}, -number = {3}, -pages = {348-368}, -year = 1981 +@article{Den:81, + author = {J. E. {Dennis Jr.} and D. M. Gay and R. E. Welsch}, + title = {{An Adaptive Nonlinear Least-Squares Algorithm}}, + journal = {ACM Transactions on Mathematical Software}, + volume = {7}, + number = {3}, + pages = {348-368}, + year = 1981 } % % % @article{DiEi:99, -author = {L. Dieci and T. Eirola}, -title = {{On Smooth Decompositions of Matrices}}, -journal = {SIAM J. Matrix Anal. Appl.}, -volume = {20}, -number = {4}, -pages = {800--819}, -year = 1999 + author = {L. Dieci and T. Eirola}, + title = {{On Smooth Decompositions of Matrices}}, + journal = {SIAM J. Matrix Anal. Appl.}, + volume = {20}, + number = {4}, + pages = {800--819}, + year = 1999 } @article{Err:97, -author = {R. M. Errico}, -title = {{What is an adjoint model?}}, -journal = {Bulletin of the American Meteorological Society}, -volume = {78}, -number = {11}, -pages = {2577-2591}, -year = 1997 + author = {R. M. Errico}, + title = {{What is an adjoint model?}}, + journal = {Bulletin of the American Meteorological Society}, + volume = {78}, + number = {11}, + pages = {2577-2591}, + year = 1997 } @article{GhBa:97, -author = {O. Ghattas and J. H. Bark}, -title = {{Optimal Control of Two- and Three-Dimensional Incompressible Navier-Stokes Flows}}, -journal = {Journal of Computational Physics}, -volume = {136}, -pages = {231-244}, -year = 1997 + author = {O. Ghattas and J. H. Bark}, + title = {{Optimal Control of Two- and Three-Dimensional Incompressible Navier-Stokes Flows}}, + journal = {Journal of Computational Physics}, + volume = {136}, + pages = {231-244}, + year = 1997 } @article{GiPi:97, -author = {M. B. Giles and N. A. Pierce}, -title = {{Adjoint Equations in CFD: Duality, Boundary Conditions and Solution Behavior}}, -journal = {AIAA Paper 97-1850}, -volume = {AIAA, New York}, -year = 1997 + author = {M. B. Giles and N. A. Pierce}, + title = {{Adjoint Equations in CFD: Duality, Boundary Conditions and Solution Behavior}}, + journal = {AIAA Paper 97-1850}, + volume = {AIAA, New York}, + year = 1997 } @article{GJLPS:98, -author = {P. E. Gill and L. O. Jay and M. W. Leonard and L. R. Petzold and V. Sharma}, -title = {{An SQP Method for the Optimal Control of Large-Scale Dynamical Systems}}, -journal = {J. Comp. Appl. Math.}, -volume = {20}, -pages = {197-213}, -year = 2000 + author = {P. E. Gill and L. O. Jay and M. W. Leonard and L. R. Petzold and V. Sharma}, + title = {{An SQP Method for the Optimal Control of Large-Scale Dynamical Systems}}, + journal = {J. Comp. Appl. Math.}, + volume = {20}, + pages = {197-213}, + year = 2000 } @article{HMM:98, -author = {M. Hanke and E. I. Macana and R. M{\"a}rz}, -title = {{On Asymptotics in Case of Linear Index-2 Differential-Algebraic Equations}}, -journal = {SIAM J. Numer. Anal.}, -volume = {35}, -pages = {1326--1346}, -year = 1998 + author = {M. Hanke and E. I. Macana and R. M{\"a}rz}, + title = {{On Asymptotics in Case of Linear Index-2 Differential-Algebraic Equations}}, + journal = {SIAM J. Numer. Anal.}, + volume = {35}, + pages = {1326--1346}, + year = 1998 } % % @book{Kel:68, -author = {H. B. Keller}, -title = {{Numerical methods for two-point boundary-value problems}}, -publisher = {Blaisdel}, -address = {Waltham, Ma}, -year = 1968 + author = {H. B. Keller}, + title = {{Numerical methods for two-point boundary-value problems}}, + publisher = {Blaisdel}, + address = {Waltham, Ma}, + year = 1968 } @article{KBYPT:97, -author = {D. Knapp and V. Barocas and K. Yoo and L. R. Petzold and R. Tranquillo}, -title = {{Rheology of Reconstituted Type I Collagen Gel in Confined Compression}}, -journal = {J. Rheology}, -volume = {41}, -pages = {971--993}, -year = 1997 + author = {D. Knapp and V. Barocas and K. Yoo and L. R. Petzold and R. Tranquillo}, + title = {{Rheology of Reconstituted Type I Collagen Gel in Confined Compression}}, + journal = {J. Rheology}, + volume = {41}, + pages = {971--993}, + year = 1997 } @inproceedings{LeHo:01, -author = {{S. L. Lee. and P. D. Hovland}}, -title = {{Sensitivity Analysis using Parallel {ODE} Solvers and Automatic Differentiation in C: SensPVODE and ADIC}}, -booktitle = {Automatic Differentiation of Algorithms: From Simulation to Optimization}, -editors = {George Corliss, Christele Faure, Andreas Griewank, Laurent Hascoet, and Uwe Naumann}, -publisher = {Springer-Verlag}, -address = {New York}, -pages = {223--229}, -year = 2001 + author = {{S. L. Lee. and P. D. Hovland}}, + title = {{Sensitivity Analysis using Parallel {ODE} Solvers and Automatic Differentiation in C: SensPVODE and ADIC}}, + booktitle = {Automatic Differentiation of Algorithms: From Simulation to Optimization}, + editors = {George Corliss, Christele Faure, Andreas Griewank, Laurent Hascoet, and Uwe Naumann}, + publisher = {Springer-Verlag}, + address = {New York}, + pages = {223--229}, + year = 2001 } % % % @inproceedings{KKPR:01, -author = {S. Kohn and G. Kumfert and J. Painter and C. Ribbens}, -title = {{Divorcing Language Dependencies from a Scientific Software Library}}, -booktitle = {10th SIAM Conference on Parallel Processing}, -address = {Portsmouth, VA}, -month = {March}, -year = 2001 + author = {S. Kohn and G. Kumfert and J. Painter and C. Ribbens}, + title = {{Divorcing Language Dependencies from a Scientific Software Library}}, + booktitle = {10th SIAM Conference on Parallel Processing}, + address = {Portsmouth, VA}, + month = {March}, + year = 2001 } % % % @article{Lew:98, -author = {R. M. Lewis}, -title = {{Numerical Computation of Sensitivities and the Adjoint Approach}}, -journal = {ICASE technical report}, -volume = {97-61}, -year = 1997 + author = {R. M. Lewis}, + title = {{Numerical Computation of Sensitivities and the Adjoint Approach}}, + journal = {ICASE technical report}, + volume = {97-61}, + year = 1997 } % % Neutron Transport % @book{LeMi:93, -author = {E. E. Lewis and W. F. Miller}, -title = {{Computational Methods of Neutron Transport}}, -publisher = {American Nuclear Society}, -address = {La Grange Park, IL}, -year = 1993 + author = {E. E. Lewis and W. F. Miller}, + title = {{Computational Methods of Neutron Transport}}, + publisher = {American Nuclear Society}, + address = {La Grange Park, IL}, + year = 1993 } % % Comparison of methods for forward sensitivity % @article{LPZ:99, -author = {S. Li and L. R. Petzold and W. Zhu}, -title = {{Sensitivity Analysis of Differential-Algebraic Equations: A Comparison of Methods on a Special Problem}}, -journal = {Applied Num. Math.}, -volume = {32}, -number = {2}, -pages = {161--174}, -year = {2000}, -doi = {10.1016/S0168-9274(99)00020-3} + author = {S. Li and L. R. Petzold and W. Zhu}, + title = {{Sensitivity Analysis of Differential-Algebraic Equations: A Comparison of Methods on a Special Problem}}, + journal = {Applied Num. Math.}, + volume = {32}, + number = {2}, + pages = {161--174}, + year = {2000}, + doi = {10.1016/S0168-9274(99)00020-3} } @article{Mac:99a, -author = {L. Machiels}, -title = {{A Posteriori Finite Element Output Bounds for Discontinuous Galerkin Discretizations of Parabolic Problems}}, -journal = {Lawrence Livermore National Laboratory technical report}, -volume = {UCRL-JC-136614}, -year = 1999 + author = {L. Machiels}, + title = {{A Posteriori Finite Element Output Bounds for Discontinuous Galerkin Discretizations of Parabolic Problems}}, + journal = {Lawrence Livermore National Laboratory technical report}, + volume = {UCRL-JC-136614}, + year = 1999 } @article{MaMaPa:99, -author = {L. Machiels and Y. Maday and A. T. Patera}, -title = {{Output Bounds for Reduced-Order Approximations of Elliptic Partial Differential Equations}}, -journal = {MIT technical report}, -volume = {FML 99-5-1}, -year = 1999 + author = {L. Machiels and Y. Maday and A. T. Patera}, + title = {{Output Bounds for Reduced-Order Approximations of Elliptic Partial Differential Equations}}, + journal = {MIT technical report}, + volume = {FML 99-5-1}, + year = 1999 } % % Adjoint equations (formal approach) % @book{MAS:96, -author = {G. I. Marchuk and V. I. Agoshkov and V. P. Shutyaev}, -title = {{Adjoint Equations and Perturbation Algorithms}}, -publisher = {CRC Press}, -address = {Boca Raton, Fl}, -year = 1996 + author = {G. I. Marchuk and V. I. Agoshkov and V. P. Shutyaev}, + title = {{Adjoint Equations and Perturbation Algorithms}}, + publisher = {CRC Press}, + address = {Boca Raton, Fl}, + year = 1996 } @article{Mar:00, -author = {R. M{\"a}rz}, -title = {{Differential Algebraic Systems Anew}}, -journal = {Institute of Mathematics Technical Report, Humboldt University, Berlin}, -year = 2000 + author = {R. M{\"a}rz}, + title = {{Differential Algebraic Systems Anew}}, + journal = {Institute of Mathematics Technical Report, Humboldt University, Berlin}, + year = 2000 } % % Radiation Hydrodynamics % @book{Pom:73, -author = {G. C. Pomraning}, -title = {{"The Equations of Radiation Hydrodynamics"}}, -publisher = {Pergamon Press}, -address = {Oxford}, -year = 1973 + author = {G. C. Pomraning}, + title = {{"The Equations of Radiation Hydrodynamics"}}, + publisher = {Pergamon Press}, + address = {Oxford}, + year = 1973 } @@ -1214,137 +1214,137 @@ @book{Pom:73 % Optimal control w/ forward sensitivities (cooptFM application) % @article{RKSP:00, -author = {L. L. Raja and R. J. Kee and R. Serban and L. R. Petzold}, -title = {{Computational Algorithm for Dynamic Optimization of Chemical Vapor Deposition Processes in Stagnation Flow Reactors}}, -journal = {J. Electrochemical Soc.}, -volume = {147}, -number = {7}, -pages = {2718--2726}, -year = 2000 + author = {L. L. Raja and R. J. Kee and R. Serban and L. R. Petzold}, + title = {{Computational Algorithm for Dynamic Optimization of Chemical Vapor Deposition Processes in Stagnation Flow Reactors}}, + journal = {J. Electrochemical Soc.}, + volume = {147}, + number = {7}, + pages = {2718--2726}, + year = 2000 } % % Halo orbit paper % @article{SKLMPRW:02, -author = {R. Serban and W. S. Koon and M. Lo and J. Marsden and L. R. Petzold and S. D. Ross and R. Wilson}, -title = {{Halo Orbit Mission Correction Maneuvers Using Optimal Control}}, -journal = {Automatica}, -volume = {38}, -number = {4}, -pages = {571--583}, -year = 2002 + author = {R. Serban and W. S. Koon and M. Lo and J. Marsden and L. R. Petzold and S. D. Ross and R. Wilson}, + title = {{Halo Orbit Mission Correction Maneuvers Using Optimal Control}}, + journal = {Automatica}, + volume = {38}, + number = {4}, + pages = {571--583}, + year = 2002 } % % cooptAM paper % @article{SLP:03, -author = {R. Serban and S. Li and L. R. Petzold}, -title = {{Adaptive Algorithms for Optimal Control of Time-Dependent Partial Differential-Algebraic Equation Systems}}, -journal = {Int. J. Numer. Math. Eng.}, -volume = {57}, -pages = {1457--1569}, -year = 2003 + author = {R. Serban and S. Li and L. R. Petzold}, + title = {{Adaptive Algorithms for Optimal Control of Time-Dependent Partial Differential-Algebraic Equation Systems}}, + journal = {Int. J. Numer. Math. Eng.}, + volume = {57}, + pages = {1457--1569}, + year = 2003 } % % cooptFM description % @article{SePe:01, -author = {R. Serban and L. R. Petzold}, -title = {{{COOPT} - A Software Package for Optimal Control of Large-Scale Differential-Algebraic Equation Systems}}, -journal = {J. Math. Comp. Sim.}, -volume = {56}, -number = {2}, -pages = {187--203}, -year = 2001 + author = {R. Serban and L. R. Petzold}, + title = {{{COOPT} - A Software Package for Optimal Control of Large-Scale Differential-Algebraic Equation Systems}}, + journal = {J. Math. Comp. Sim.}, + volume = {56}, + number = {2}, + pages = {187--203}, + year = 2001 } % % ODE BVP adjoint sensitivity analysis % @article{SePe:02, -author = {R. Serban and L. R. Petzold}, -title = {{Efficient Computation of Sensitivities for Ordinary Differential Equation Boundary Value Problems}}, -journal = {SIAM J. Num. An.}, -volume = {40}, -number = {1}, -pages = {220--232}, -year = 2002 + author = {R. Serban and L. R. Petzold}, + title = {{Efficient Computation of Sensitivities for Ordinary Differential Equation Boundary Value Problems}}, + journal = {SIAM J. Num. An.}, + volume = {40}, + number = {1}, + pages = {220--232}, + year = 2002 } % % % @inproceedings{WGM:02, -author = {C. S. Woodward and K. E. Grant and R. Maxwell}, -title = {{Applications of Sensitivity Analysis to Uncertainty Quantification for Variably Saturated Flow}}, -booktitle = {Computational Methods in Water Resources}, -editor = {{S. M. Hassanizadeh and R. J. Schotting and W. G. Gray and G. F. Pinder}}, -publisher = {Elsevier}, -address = {Amsterdam}, -pages = {73--80}, -year = 2002 + author = {C. S. Woodward and K. E. Grant and R. Maxwell}, + title = {{Applications of Sensitivity Analysis to Uncertainty Quantification for Variably Saturated Flow}}, + booktitle = {Computational Methods in Water Resources}, + editor = {{S. M. Hassanizadeh and R. J. Schotting and W. G. Gray and G. F. Pinder}}, + publisher = {Elsevier}, + address = {Amsterdam}, + pages = {73--80}, + year = 2002 } % % Inexact Newton Methods % @book{DeSc:96, -author = {J. E. Dennis and R. B. Schnabel}, -title = {{Numerical Methods for Unconstrained Optimization and Nonlinear Equations}}, -publisher = {SIAM}, -address = {Philadelphia}, -year = {1996}, -doi = {10.1137/1.9781611971200} + author = {J. E. Dennis and R. B. Schnabel}, + title = {{Numerical Methods for Unconstrained Optimization and Nonlinear Equations}}, + publisher = {SIAM}, + address = {Philadelphia}, + year = {1996}, + doi = {10.1137/1.9781611971200} } @article{EiWa:96, -author = {S. C. Eisenstat and H. F. Walker}, -title = {{Choosing the Forcing Terms in an Inexact Newton Method}}, -journal = {SIAM J. Sci. Comput.}, -volume = {17}, -number = {1}, -pages = {16--32}, -year = {1996}, -doi = {10.1137/0917003} -} -@Article{EiWa:94, -author = {S. C. Eisenstat and H. F. Walker}, -title = {{Globally Convergent Inexact {N}ewton Methods}}, -journal = {SIAM J. Optimization}, -volume = {4}, -pages = {393-422}, -year = {1994} -} -@Article{DES:82, -author = {R. S. Dembo and S. C. Eisenstat and T. Steihaug}, -title = {{Inexact {N}ewton Methods}}, -journal = {SIAM J. Numer. Anal.}, -volume = {19}, -number = {2}, -pages = {400-408}, -year = {1982}, -doi = {10.1137/0719025} -} -@Article{Bro:87, -author = {P. N. Brown}, -title = {{A local convergence theory for combined inexact-{N}ewton/finite difference projection methods}}, -journal = {SIAM J. Numer. Anal.}, -volume = {24}, -number = {2}, -pages = {407--434}, -year = {1987}, -doi = {10.1137/0724031} + author = {S. C. Eisenstat and H. F. Walker}, + title = {{Choosing the Forcing Terms in an Inexact Newton Method}}, + journal = {SIAM J. Sci. Comput.}, + volume = {17}, + number = {1}, + pages = {16--32}, + year = {1996}, + doi = {10.1137/0917003} +} +@article{EiWa:94, + author = {S. C. Eisenstat and H. F. Walker}, + title = {{Globally Convergent Inexact {N}ewton Methods}}, + journal = {SIAM J. Optimization}, + volume = {4}, + pages = {393-422}, + year = {1994} +} +@article{DES:82, + author = {R. S. Dembo and S. C. Eisenstat and T. Steihaug}, + title = {{Inexact {N}ewton Methods}}, + journal = {SIAM J. Numer. Anal.}, + volume = {19}, + number = {2}, + pages = {400-408}, + year = {1982}, + doi = {10.1137/0719025} +} +@article{Bro:87, + author = {P. N. Brown}, + title = {{A local convergence theory for combined inexact-{N}ewton/finite difference projection methods}}, + journal = {SIAM J. Numer. Anal.}, + volume = {24}, + number = {2}, + pages = {407--434}, + year = {1987}, + doi = {10.1137/0724031} } @book{Kel:95, -author = {C. T. Kelley}, -title = {Iterative Methods for Solving Linear and Nonlinear Equations}, -publisher = {SIAM}, -address = {Philadelphia}, -year = {1995}, -doi = {10.1137/1.9781611970944} + author = {C. T. Kelley}, + title = {Iterative Methods for Solving Linear and Nonlinear Equations}, + publisher = {SIAM}, + address = {Philadelphia}, + year = {1995}, + doi = {10.1137/1.9781611970944} } % % % -@Article{BrWo:01, +@article{BrWo:01, author = {P.~N.~Brown and C.~S.~Woodward}, title = {{Preconditioning Strategies for Fully Implicit Radiation Diffusion with Material-Energy Transfer}}, journal = {SIAM J. Sci. Comput.}, @@ -1353,7 +1353,7 @@ @Article{BrWo:01 pages = {499--516}, year = 2001 } -@Article{JoWo:01, +@article{JoWo:01, author = {J.~E.~Jones and C.~S.~Woodward}, title = {{{N}ewton-{K}rylov-Multigrid Solvers for Large-Scale, Highly Heterogeneous, Variably Saturated Flow Problems}}, journal = {Advances in Water Resources}, @@ -1380,46 +1380,46 @@ @inproceedings{Woo:98 % @inproceedings{Rob:66, -author = {H. H. Robertson}, -title = {The solution of a set of reaction rate equations}, -booktitle = {Numerical analysis: an introduction}, -editor = {J. Walsh}, -publisher = {Academ. Press}, -pages = {178--182}, -year = 1966 + author = {H. H. Robertson}, + title = {The solution of a set of reaction rate equations}, + booktitle = {Numerical analysis: an introduction}, + editor = {J. Walsh}, + publisher = {Academ. Press}, + pages = {178--182}, + year = 1966 } @article{Bro:86, -author = {Peter N. Brown}, -title = {Decay to uniform states in food webs}, -journal = {SIAM J. Appl. Math.}, -volume = {46}, -pages = {376--392}, -year = 1986 + author = {Peter N. Brown}, + title = {Decay to uniform states in food webs}, + journal = {SIAM J. Appl. Math.}, + volume = {46}, + pages = {376--392}, + year = 1986 } % % Citations for KINSOL examples % @book{FlPa:99, -author = {C. Floudas and P. Pardalos and C. Adjiman and W. Esposito and Z. Gumus and S. Harding and J. Klepeis and C. Meyer and C. Schweiger}, -title = {Handbook of Test Problems in Local and Global Optimization}, -publisher = {Kluwer Academic Publishers}, -address = {Dordrecht}, -year = {1999} + author = {C. Floudas and P. Pardalos and C. Adjiman and W. Esposito and Z. Gumus and S. Harding and J. Klepeis and C. Meyer and C. Schweiger}, + title = {Handbook of Test Problems in Local and Global Optimization}, + publisher = {Kluwer Academic Publishers}, + address = {Dordrecht}, + year = {1999} } @book{Frank-Kam:55, - author = {D. A. Frank-Kamenetskii and N. Thon}, - publisher = {Princeton University Press}, - title = {Diffusion and Heat Exchange in Chemical Kinetics}, - year = {1955} + author = {D. A. Frank-Kamenetskii and N. Thon}, + publisher = {Princeton University Press}, + title = {Diffusion and Heat Exchange in Chemical Kinetics}, + year = {1955} } % % Citations for Picard, Anderson, Broyden % -@Article{Walker-Ni09, +@article{Walker-Ni09, author = {H. F. Walker and P. Ni}, title = {{Anderson Acceleration for Fixed-Point Iterations}}, journal = {SIAM Jour. Num. Anal.}, @@ -1430,7 +1430,7 @@ @Article{Walker-Ni09 doi = {10.1137/10078356X} } -@Article{Anderson65, +@article{Anderson65, author = {D. G. Anderson}, title = {Iterative Procedures for Nonlinear Integral Equations}, journal = {J. Assoc. Comput. Machinery}, @@ -1441,29 +1441,29 @@ @Article{Anderson65 doi = {10.1145/321296.321305} } -@Article{Broyden65, - author = {C. G. Broyden}, - title = {A class of methods for solving nonlinear simultaneous equations}, - journal = {Math. Comp.}, - year = {1965}, - key = {Broyden65}, - volume = {19}, - pages = {577-593} +@article{Broyden65, + author = {C. G. Broyden}, + title = {A class of methods for solving nonlinear simultaneous equations}, + journal = {Math. Comp.}, + year = {1965}, + key = {Broyden65}, + volume = {19}, + pages = {577-593} } -@Article{Fang-Saad09, - author = {H. Fang and Y. Saad}, - title = {Two classes of secant methods for nonlinear acceleration}, - journal = {Numer. Linear Algebra Appl.}, - year = {2009}, - key = {Fang-Saad09}, - volume = {16}, - number = {3}, - pages = {197-221}, - doi = {10.1002/nla.617} +@article{Fang-Saad09, + author = {H. Fang and Y. Saad}, + title = {Two classes of secant methods for nonlinear acceleration}, + journal = {Numer. Linear Algebra Appl.}, + year = {2009}, + key = {Fang-Saad09}, + volume = {16}, + number = {3}, + pages = {197-221}, + doi = {10.1002/nla.617} } -@Article{LWWY11, +@article{LWWY11, author = {P. A. Lott and H. F. Walker and C. S. Woodward and U. M. Yang}, title = {An Accelerated {Picard} Method for Nonlinear Systems Related to Variably Saturated Flow}, journal = {Adv. Wat. Resour.}, @@ -1473,7 +1473,7 @@ @Article{LWWY11 doi = {10.1016/j.advwatres.2011.12.013} } -@Book{Ortega-Rheinbolt00, +@book{Ortega-Rheinbolt00, author = {J.~M.~Ortega and W.~C.~Rheinbolt}, title = {Iterative solution of nonlinear equations in several variables}, year = {2000}, @@ -1539,24 +1539,24 @@ @article{magma_ref % % PETSc references % -@TechReport{petsc-user-ref, - Author = {Satish Balay and Shrirang Abhyankar and Mark F. Adams and Jed Brown and Peter Brune - and Kris Buschelman and Lisandro Dalcin and Victor Eijkhout and William D. Gropp - and Dinesh Kaushik and Matthew G. Knepley - and Lois Curfman McInnes and Karl Rupp and Barry F. Smith - and Stefano Zampini and Hong Zhang}, - Title = {{PETS}c Users Manual}, - Number = {ANL-95/11 - Revision 3.12}, - Institution = {Argonne National Laboratory}, - Year = {2019} -} - -@Misc{petsc-web-page, - author = {Satish Balay and Shrirang Abhyankar and Mark~F. Adams and Jed Brown and Peter Brune - and Kris Buschelman and Lisandro Dalcin and Victor Eijkhout and William~D. Gropp - and Dinesh Kaushik and Matthew~G. Knepley - and Lois Curfman McInnes and Karl Rupp and Barry~F. Smith - and Stefano Zampini and Hong Zhang and Hong Zhang}, +@techreport{petsc-user-ref, + author = {Satish Balay and Shrirang Abhyankar and Mark F. Adams and Jed Brown and Peter Brune + and Kris Buschelman and Lisandro Dalcin and Victor Eijkhout and William D. Gropp + and Dinesh Kaushik and Matthew G. Knepley + and Lois Curfman McInnes and Karl Rupp and Barry F. Smith + and Stefano Zampini and Hong Zhang}, + title = {{PETS}c Users Manual}, + number = {ANL-95/11 - Revision 3.12}, + institution = {Argonne National Laboratory}, + year = {2019} +} + +@misc{petsc-web-page, + author = {Satish Balay and Shrirang Abhyankar and Mark~F. Adams and Jed Brown and Peter Brune + and Kris Buschelman and Lisandro Dalcin and Victor Eijkhout and William~D. Gropp + and Dinesh Kaushik and Matthew~G. Knepley + and Lois Curfman McInnes and Karl Rupp and Barry~F. Smith + and Stefano Zampini and Hong Zhang and Hong Zhang}, title = {{PETS}c {W}eb page}, url = {http://www.mcs.anl.gov/petsc}, howpublished = {\url{http://www.mcs.anl.gov/petsc}}, @@ -1574,28 +1574,28 @@ @techreport{nvidia2017samples institution = {TRM-06704-001 v8} } -@Misc{cuda_site, +@misc{cuda_site, title = {{NVIDIA CUDA Programming Guide}}, - howpublished = {\url{https://docs.nvidia.com/cuda/index.html}}, + howpublished = {\url{https://docs.nvidia.com/cuda/index.html}} } -@Misc{cuSOLVER_site, +@misc{cuSOLVER_site, title = {{NVIDIA cuSOLVER Programming Guide}}, - howpublished = {\url{https://docs.nvidia.com/cuda/cusolver/index.html}}, + howpublished = {\url{https://docs.nvidia.com/cuda/cusolver/index.html}} } -@Misc{cuSPARSE_site, +@misc{cuSPARSE_site, title = {{NVIDIA cuSPARSE Programming Guide}}, - howpublished = {\url{https://docs.nvidia.com/cuda/cusparse/index.html}}, + howpublished = {\url{https://docs.nvidia.com/cuda/cusparse/index.html}} } % % ROCm/HIP references % -@Misc{rocm_site, +@misc{rocm_site, title = {{AMD ROCm Documentation}}, - howpublished = {\url{https://rocmdocs.amd.com/en/latest/index.html}}, + howpublished = {\url{https://rocmdocs.amd.com/en/latest/index.html}} } @@ -1603,22 +1603,22 @@ @Misc{rocm_site % oneAPI references % -@Misc{oneAPI_site, +@misc{oneAPI_site, title = {{Intel oneAPI Programming Guide}}, - howpublished = {\url{https://software.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top.html}}, + howpublished = {\url{https://software.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top.html}} } % % RAJA references % -@TechReport{raja, - author = {R. D. Hornung and J. A. Keasler}, - title = {The RAJA Poratability Layer: Overview and Status}, - institution = {Lawrence Livermore National Laboratory}, - month = {September}, - year = {2014}, - number = {LLNL-TR-661403}, +@techreport{raja, + author = {R. D. Hornung and J. A. Keasler}, + title = {The RAJA Poratability Layer: Overview and Status}, + institution = {Lawrence Livermore National Laboratory}, + month = {September}, + year = {2014}, + number = {LLNL-TR-661403} } % @@ -1626,11 +1626,12 @@ @TechReport{raja % @techreport{Trilinos-Overview, -title = "{An Overview of Trilinos}", -author = "Michael Heroux and Roscoe Bartlett and Vicki Howle Robert Hoekstra and Jonathan Hu and Tamara Kolda and Richard Lehoucq and Kevin Long and Roger Pawlowski and Eric Phipps and Andrew Salinger and Heidi Thornquist and Ray Tuminaro and James Willenbring and Alan Williams ", -institution = "Sandia National Laboratories", -number = "SAND2003-2927", -year = 2003} + title = {{An Overview of Trilinos}}, + author = {Michael Heroux and Roscoe Bartlett and Vicki Howle Robert Hoekstra and Jonathan Hu and Tamara Kolda and Richard Lehoucq and Kevin Long and Roger Pawlowski and Eric Phipps and Andrew Salinger and Heidi Thornquist and Ray Tuminaro and James Willenbring and Alan Williams }, + institution = {Sandia National Laboratories}, + number = {SAND2003-2927}, + year = 2003 +} @techreport{hoemmen2015tpetra, title = {Tpetra Project Overview.}, @@ -1644,14 +1645,14 @@ @techreport{hoemmen2015tpetra % @article{Swig-Fortran, -author = {Seth R. Johnson and Andrey Prokopenko and Katherine J. Evans}, -title = {Automated Fortran-C++ Bindings for Large-Scale Scientific Applications}, -journal = {Computing in Science & Engineering}, -volume = {22}, -number = {5}, -pages = {84-94}, -year = {2020}, -doi = {10.1109/MCSE.2019.2924204} + author = {Seth R. Johnson and Andrey Prokopenko and Katherine J. Evans}, + title = {Automated Fortran-C++ Bindings for Large-Scale Scientific Applications}, + journal = {Computing in Science & Engineering}, + volume = {22}, + number = {5}, + pages = {84-94}, + year = {2020}, + doi = {10.1109/MCSE.2019.2924204} } % @@ -1728,14 +1729,14 @@ @book{Butcher:08 } @article{CandyRozmus:91, - title={A symplectic integration algorithm for separable Hamiltonian functions}, - author={Candy, J and Rozmus, W}, - journal={Journal of Computational Physics}, - volume={92}, - number={1}, - pages={230--256}, - year={1991}, - publisher={Elsevier} + title = {A symplectic integration algorithm for separable Hamiltonian functions}, + author = {Candy, J and Rozmus, W}, + journal = {Journal of Computational Physics}, + volume = {92}, + number = {1}, + pages = {230--256}, + year = {1991}, + publisher = {Elsevier} } @article{Cash:79, @@ -1796,14 +1797,25 @@ @article{DorPri:80 } @article{HaSo:05, - title={Explicit, time reversible, adaptive step size control}, - author={Hairer, Ernst and S{\"o}derlind, Gustaf}, - journal={SIAM Journal on Scientific Computing}, - volume={26}, - number={6}, - pages={1838--1851}, - year={2005}, - publisher={SIAM} + title = {Explicit, time reversible, adaptive step size control}, + author = {Hairer, Ernst and S{\"o}derlind, Gustaf}, + journal = {SIAM Journal on Scientific Computing}, + volume = {26}, + number = {6}, + pages = {1838--1851}, + year = {2005}, + publisher = {SIAM} +} + +@article{FCS:21, + author = {Imre Fekete and Sidafa Conde and John N. Shadid}, + title = {Embedded pairs for optimal explicit strong stability preserving {Runge--Kutta} methods}, + journal = {Journal of Computational and Applied Mathematics}, + volume = {412}, + pages = {114325}, + year = {2022}, + issn = {0377-0427}, + doi = {10.1016/j.cam.2022.114325} } @article{FFKMS:14, @@ -1922,14 +1934,14 @@ @article{Kva:04 } @article{Mclachlan:92, - author = {Mclachlan, Robert I AND Atela, Pau}, - title = {The accuracy of symplectic integrators}, - journal = {Nonlinearity}, - volume = {5}, - number = {2}, - pages = {541}, - year = {1992}, - publisher = {IOP Publishing} + author = {Mclachlan, Robert I AND Atela, Pau}, + title = {The accuracy of symplectic integrators}, + journal = {Nonlinearity}, + volume = {5}, + number = {2}, + pages = {541}, + year = {1992}, + publisher = {IOP Publishing} } @article{Sandu:19, @@ -1998,6 +2010,18 @@ @article{Shampine:80 doi = {10.1137/0901005} } +@article{ShOs:88, + author = {Chi-Wang Shu and Stanley Osher}, + title = {Efficient implementation of essentially non-oscillatory shock-capturing schemes}, + journal = {Journal of Computational Physics}, + volume = {77}, + number = {2}, + pages = {439-471}, + year = {1988}, + issn = {0021-9991}, + doi = {10.1016/0021-9991(88)90177-5} +} + @article{Sod:98, author = {Soderlind, G.}, title = {The automatic control of numerical integration}, @@ -2053,6 +2077,18 @@ @article{Sof:02 pages = {506--515} } +@article{Sof:04, + author = {M. Sofroniou and G. Spaletta}, + title = {Construction of explicit {Runge-Kutta} pairs with stiffness detection}, + journal = {Mathematical and Computer Modelling}, + volume = {40}, + number = {11}, + pages = {1157-1169}, + year = {2004}, + issn = {0895-7177}, + doi = {10.1016/j.mcm.2005.01.010} +} + @article{Ver:78, author = {Verner, J.H}, title = {Explicit Runge-Kutta methods with estimates of the local truncation error}, @@ -2064,6 +2100,17 @@ @article{Ver:78 doi = {10.1137/0715051} } +@article{Ver:10, + author = {Verner, J.H}, + title = {Numerically optimal {Runge–Kutta} pairs with interpolants}, + journal = {Numerical Algorithms}, + volume = {53}, + number = {2}, + pages = {383-396}, + year = {2010}, + doi = {10.1007/s11075-009-9290-3} +} + @article{Ruth:93, title = {A canonical integration technique}, author = {Ruth, Ronald D}, @@ -2134,14 +2181,14 @@ @misc{xbraid } @article{Yoshida:90, - title={Construction of higher order symplectic integrators}, - author={Yoshida, Haruo}, - journal={Physics letters A}, - volume={150}, - number={5-7}, - pages={262--268}, - year={1990}, - publisher={Elsevier} + title = {Construction of higher order symplectic integrators}, + author = {Yoshida, Haruo}, + journal = {Physics letters A}, + volume = {150}, + number = {5-7}, + pages = {262--268}, + year = {1990}, + publisher = {Elsevier} } @techreport{Zon:63, @@ -2268,7 +2315,7 @@ @article{trott2021kokkos number = {5}, pages = {10-18}, doi = {10.1109/MCSE.2021.3098509} - } +} @article{edwards2014kokkos, author = {H. Carter Edwards and Christian R. Trott and Daniel Sunderland}, diff --git a/doc/shared/sundials/Profiling.rst b/doc/shared/sundials/Profiling.rst index 4f9e9357df..4695643f29 100644 --- a/doc/shared/sundials/Profiling.rst +++ b/doc/shared/sundials/Profiling.rst @@ -48,6 +48,11 @@ If Caliper is enabled, then users should refer to the `Caliper documentation v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -html_logo = 'figs/sundials_logo_blue.png' - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['../../shared/_static'] - -# These paths are either relative to html_static_path -# or fully qualified paths (eg. https://...) -html_css_files = [ - 'css/custom.css' -] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -html_show_sourcelink = False - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'SUNDIALSdoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -latex_additional_files = ['../../shared/latex/preamble.tex.txt', - '../../shared/latex/cover_pages.tex.txt'] - -im_number = "" - -# 1. the rst file name used to generate the LaTeX file -# 2. the name of the LaTeX file to generate (and the resulting PDF file name) -# 3. the document title -# 4. text for \author -# 5. the LaTeX theme -# 6. include the file from 1. in the output -tex_author = "The SUNDIALS Development Team" - -latex_documents = [('index', 'dev_guide.tex', project, - tex_author, 'manual', False)] - -# make sure the doc logo gets copied to the build directory -latex_logo = 'figs/doc_logo_blue.pdf' - -# LaTeX customizations -latex_elements = { -# paper size option of the document class -'papersize': 'letterpaper', -# font size option of the document class -'pointsize': '10pt', -# set the version number/release name -'releasename' : version, -# arguments to the sphinxsetup macro -'sphinxsetup': - # the color for titles - 'TitleColor={RGB}{0,0,0},'+ - # disable frames around code-blocks - 'verbatimwithframe=false,'+ - # do not wrap long lines in code-blocks - 'verbatimwrapslines=false,'+ - # background color for code-blocks - 'VerbatimColor={RGB}{240.0,240.0,240.0},'+ - # font used by heading - 'HeaderFamily=\\rmfamily\\bfseries,' + - # line breaks are allowed inside inline literals - 'inlineliteralwraps=true', -# disable the fncychap package -'fncychap':'', -# figure alignment options -'figure_align': 'htbp', -# additional preamble content -'preamble': - '\\input{preamble.tex.txt}\n'+ - '\\newcommand{\\sunreleasename}{' + sun_version + '}\n' + - '\\newcommand{\\imnumber}{' + im_number + '}\n', -# extra class options -'extraclassoptions': 'twoside,openright', -# custom maketitle -'maketitle': '\\input{cover_pages.tex.txt}' -} - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'SUNDEV', u'Developer Documentation for SUNDIALS', - [u'The SUNDIALS Development Team'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'SUNDEV', u'Developer Documentation for SUNDIALS', - u'The SUNDIALS Development Team', 'SUNDEV', - 'SUNDIALS library of time integrators and nonlinear solvers.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' diff --git a/doc/sundials_developers/source/figs b/doc/sundials_developers/source/figs deleted file mode 120000 index d3070ad74a..0000000000 --- a/doc/sundials_developers/source/figs +++ /dev/null @@ -1 +0,0 @@ -../../shared/figs \ No newline at end of file diff --git a/doc/sundials_developers/source/introduction/index.rst b/doc/sundials_developers/source/introduction/index.rst deleted file mode 100644 index fea930c8b1..0000000000 --- a/doc/sundials_developers/source/introduction/index.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. - Author(s): David J. Gardner @ 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 - ----------------------------------------------------------------------------- - -.. _Introduction: - -Introduction -============ - -The SUite of Nonlinear and DIfferential/ALgebraic equation Solvers (SUNDIALS) -consists of the time integration packages CVODE, IDA, and ARKODE, the -sensitivity analysis enabled variants CVODES and IDAS, and the nonlinear solver -package KINSOL. - -.. toctree:: - :maxdepth: 2 - - History diff --git a/doc/sundials_developers/source/testing/index.rst b/doc/sundials_developers/source/testing/index.rst deleted file mode 100644 index 983bdb205c..0000000000 --- a/doc/sundials_developers/source/testing/index.rst +++ /dev/null @@ -1,29 +0,0 @@ -.. - Author(s): David J. Gardner @ 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 - ----------------------------------------------------------------------------- - -.. _Testing: - -******* -Testing -******* - -The following sections describe the SUNDIALS CI suite as well as a testing workflow for developers. - -.. toctree:: - :maxdepth: 2 - - CI - Local - Benchmarking - Spot diff --git a/doc/superbuild/source/arkode/index.rst b/doc/superbuild/source/arkode/index.rst index 5d09b7044c..972153c5a4 100644 --- a/doc/superbuild/source/arkode/index.rst +++ b/doc/superbuild/source/arkode/index.rst @@ -14,6 +14,8 @@ ARKODE Documentation ******************** +.. include:: ../../../arkode/guide/source/Landing.rst + **Table of Contents**: .. toctree:: diff --git a/doc/superbuild/source/conf.py b/doc/superbuild/source/conf.py index 8e5ddb8017..4b54602384 100644 --- a/doc/superbuild/source/conf.py +++ b/doc/superbuild/source/conf.py @@ -28,7 +28,7 @@ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx_rtd_theme', 'sphinx.ext.ifconfig', 'sphinx.ext.mathjax', 'sphinxfortran.fortran_domain', 'sphinxcontrib.bibtex', - 'sphinx_copybutton', 'sphinx_sundials'] + 'sphinx_copybutton', 'sphinx.ext.graphviz', 'sphinx_sundials'] # References bibtex_bibfiles = ['../../shared/sundials.bib'] diff --git a/doc/sundials_developers/source/introduction/History.rst b/doc/superbuild/source/developers/History.rst similarity index 100% rename from doc/sundials_developers/source/introduction/History.rst rename to doc/superbuild/source/developers/History.rst diff --git a/doc/sundials_developers/Makefile b/doc/superbuild/source/developers/Makefile similarity index 100% rename from doc/sundials_developers/Makefile rename to doc/superbuild/source/developers/Makefile diff --git a/doc/sundials_developers/source/appendix/GitCheatSheet.rst b/doc/superbuild/source/developers/appendix/GitCheatSheet.rst similarity index 100% rename from doc/sundials_developers/source/appendix/GitCheatSheet.rst rename to doc/superbuild/source/developers/appendix/GitCheatSheet.rst diff --git a/doc/sundials_developers/source/appendix/index.rst b/doc/superbuild/source/developers/appendix/index.rst similarity index 97% rename from doc/sundials_developers/source/appendix/index.rst rename to doc/superbuild/source/developers/appendix/index.rst index d26cc8092e..b845b13c14 100644 --- a/doc/sundials_developers/source/appendix/index.rst +++ b/doc/superbuild/source/developers/appendix/index.rst @@ -18,6 +18,6 @@ Appendix ======== .. toctree:: - :maxdepth: 2 + :maxdepth: 1 GitCheatSheet diff --git a/doc/sundials_developers/source/benchmarks/advection_reaction.rst b/doc/superbuild/source/developers/benchmarks/advection_reaction.rst similarity index 100% rename from doc/sundials_developers/source/benchmarks/advection_reaction.rst rename to doc/superbuild/source/developers/benchmarks/advection_reaction.rst diff --git a/doc/sundials_developers/source/benchmarks/diffusion.rst b/doc/superbuild/source/developers/benchmarks/diffusion.rst similarity index 100% rename from doc/sundials_developers/source/benchmarks/diffusion.rst rename to doc/superbuild/source/developers/benchmarks/diffusion.rst diff --git a/doc/sundials_developers/source/benchmarks/index.rst b/doc/superbuild/source/developers/benchmarks/index.rst similarity index 97% rename from doc/sundials_developers/source/benchmarks/index.rst rename to doc/superbuild/source/developers/benchmarks/index.rst index 55a5a9ec21..eca6ce7849 100644 --- a/doc/sundials_developers/source/benchmarks/index.rst +++ b/doc/superbuild/source/developers/benchmarks/index.rst @@ -20,7 +20,7 @@ Benchmarks The following sections describe the SUNDIALS performance benchmark problems. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 advection_reaction.rst diffusion.rst diff --git a/doc/sundials_developers/source/development/Checklist.rst b/doc/superbuild/source/developers/development/Checklist.rst similarity index 95% rename from doc/sundials_developers/source/development/Checklist.rst rename to doc/superbuild/source/developers/development/Checklist.rst index dfe19d9af2..0d04412848 100644 --- a/doc/sundials_developers/source/development/Checklist.rst +++ b/doc/superbuild/source/developers/development/Checklist.rst @@ -81,3 +81,6 @@ system, etc. developers should adhere to the following checklist. only. Additionally, the ``SUNDIALS_DEBUG_PRINTVEC`` macro should be used to ``#ifdef`` out calls to the generic vector print functions ``N_VPrint`` and ``N_VPrintFile`` used for debugging purposes. + +#. If answer files changed, and it is expected/desired, then update the `.out` files + that are embedded in the `examples/` directory AND the :ref:`"answers" repository<>`. diff --git a/doc/sundials_developers/source/development/index.rst b/doc/superbuild/source/developers/development/index.rst similarity index 91% rename from doc/sundials_developers/source/development/index.rst rename to doc/superbuild/source/developers/development/index.rst index 3ed659e61a..45c5214cc9 100644 --- a/doc/sundials_developers/source/development/index.rst +++ b/doc/superbuild/source/developers/development/index.rst @@ -18,10 +18,6 @@ Development =========== .. toctree:: - :maxdepth: 2 + :maxdepth: 1 Checklist - -.. - Debugging - FortranInterfaces diff --git a/doc/superbuild/source/developers/figs b/doc/superbuild/source/developers/figs new file mode 120000 index 0000000000..8d81ed6895 --- /dev/null +++ b/doc/superbuild/source/developers/figs @@ -0,0 +1 @@ +../../../shared/figs \ No newline at end of file diff --git a/doc/sundials_developers/source/getting_started/Documentation.rst b/doc/superbuild/source/developers/getting_started/Documentation.rst similarity index 100% rename from doc/sundials_developers/source/getting_started/Documentation.rst rename to doc/superbuild/source/developers/getting_started/Documentation.rst diff --git a/doc/sundials_developers/source/getting_started/Environment.rst b/doc/superbuild/source/developers/getting_started/Environment.rst similarity index 100% rename from doc/sundials_developers/source/getting_started/Environment.rst rename to doc/superbuild/source/developers/getting_started/Environment.rst diff --git a/doc/sundials_developers/source/getting_started/Setup.rst b/doc/superbuild/source/developers/getting_started/Setup.rst similarity index 100% rename from doc/sundials_developers/source/getting_started/Setup.rst rename to doc/superbuild/source/developers/getting_started/Setup.rst diff --git a/doc/sundials_developers/source/getting_started/Workflow.rst b/doc/superbuild/source/developers/getting_started/Workflow.rst similarity index 100% rename from doc/sundials_developers/source/getting_started/Workflow.rst rename to doc/superbuild/source/developers/getting_started/Workflow.rst diff --git a/doc/sundials_developers/source/getting_started/index.rst b/doc/superbuild/source/developers/getting_started/index.rst similarity index 100% rename from doc/sundials_developers/source/getting_started/index.rst rename to doc/superbuild/source/developers/getting_started/index.rst diff --git a/doc/sundials_developers/source/index.rst b/doc/superbuild/source/developers/index.rst similarity index 59% rename from doc/sundials_developers/source/index.rst rename to doc/superbuild/source/developers/index.rst index 901544a729..b4ad109d17 100644 --- a/doc/sundials_developers/source/index.rst +++ b/doc/superbuild/source/developers/index.rst @@ -12,15 +12,19 @@ SUNDIALS Copyright End ----------------------------------------------------------------------------- -######################### -SUNDIALS Developers Guide -######################### +**************** +Developers Guide +**************** + +The SUite of Nonlinear and DIfferential/ALgebraic equation Solvers (SUNDIALS) consists of the time +integration packages CVODE, IDA, and ARKODE, the sensitivity analysis enabled variants CVODES and +IDAS, and the nonlinear solver package KINSOL. This is the part of the SUNDIALS documentation is +meant for SUNDIALS developers. .. toctree:: - :numbered: - :maxdepth: 2 + :maxdepth: 1 - introduction/index + History getting_started/index style_guide/index development/index @@ -28,5 +32,10 @@ SUNDIALS Developers Guide benchmarks/index pull_requests/index releases/index + packages/index appendix/index - references + +.. only:: html + + * :ref:`genindex` + diff --git a/doc/superbuild/source/developers/packages/ARKODE.rst b/doc/superbuild/source/developers/packages/ARKODE.rst new file mode 100644 index 0000000000..7f51198df8 --- /dev/null +++ b/doc/superbuild/source/developers/packages/ARKODE.rst @@ -0,0 +1,283 @@ +.. + Author(s): David J. Gardner @ 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 + ----------------------------------------------------------------------------- + +.. _ARKODE.ERKFullRHS: + +ERKStep Full RHS +================ + +.. digraph:: erk_fullrhs + + node [shape=box] + splines=ortho + + // ----------------- + // Before first step + // ----------------- + + init [label="Initialize integrator\lCopy t0, y0 to tn, yn\l"] + f0cur [label="Set fn_is_current to False", style=filled, fillcolor=tomato1] + h0 [label="Is h0 provided?", target="_top"] + f0_q1 [label="Has f(tn, yn) been computed?"] + eval1 [label="Evaluate f(tn, yn)\lStore in F[0]\lCopy F[0] to fn\l", style=filled, fillcolor=lightskyblue] + fcur1 [label="Set fn_is_current to True", style=filled, fillcolor=lightgreen] + h0_comp [label="Compute h0"] + start [label="Start Step"] + + init -> f0cur -> h0 + h0 -> start [taillabel="Yes", labeldistance=2, labelangle=45] + h0 -> f0_q1 [taillabel="No", labeldistance=2, labelangle=-45] + f0_q1 -> h0_comp [taillabel="Yes", labeldistance=2, labelangle=-45] + f0_q1 -> eval1 [taillabel="No", labeldistance=2, labelangle=-45] + eval1 -> fcur1 + fcur1 -> h0_comp + h0_comp -> start + + // ---------- + // First step + // ---------- + + f0q2 [label="Has f(tn, yn) been computed?"] + step_q [label="Is this the first step after initial setup?"] + eval2 [label="Evaluate f(tn, yn)\lStore in F[0]\lCopy F[0] to fn\l", style=filled, fillcolor=lightskyblue] + fsal [label="Is the method FSAL?", style=filled, fillcolor=slateblue1] + eval3 [label="Evaluate f(tn, yn)\lStore in F[0]\lCopy F[0] to fn\l", style=filled, fillcolor=slateblue1] + copy1 [label="Copy F[s-1] to F[0]\lCopy F[0] to fn\l", style=filled, fillcolor=slateblue1] + fcur2 [label="Set fn_is_current to True", style=filled, fillcolor=lightgreen] + stages1 [label="Compute Stages"] + complete [label="Complete Step"] + + start -> f0q2 + f0q2 -> stages1 [taillabel="Yes", labeldistance=2, labelangle=45] + f0q2 -> step_q [taillabel="No", labeldistance=2, labelangle=-45] + step_q -> eval2 [taillabel="Yes", labeldistance=2, labelangle=45] + eval2 -> fcur2 + step_q -> fsal [taillabel="No", labeldistance=2, labelangle=-45] + fsal -> eval3 [taillabel="No", labeldistance=2, labelangle=-45] + eval3 -> fcur2 + fsal -> copy1 [taillabel="Yes", labeldistance=2, labelangle=45] + copy1 -> fcur2 + fcur2 -> stages1 -> complete + + // ------------- + // Complete step + // ------------- + + interp_update [label="Interpolation enabled?"] + interp_type1 [label="Using Hermite interpolation?"] + f0q3 [label="Has f(tn, yn) been computed?"] + update_yn [label="Copy tcur, ycur to tn, yn"] + fcur3 [label="Set fn_is_current to False", style=filled, fillcolor=tomato1] + + complete -> interp_update + interp_update -> update_yn [taillabel="No", labeldistance=2, labelangle=45] + interp_update -> interp_type1 [taillabel="Yes", labeldistance=2, labelangle=-45] + interp_type1 -> update_yn [taillabel="No", labeldistance=2, labelangle=45] + interp_type1 -> f0q3 [taillabel="Yes", labeldistance=2, labelangle=-45] + f0q3 -> update_yn [taillabel="Yes", labeldistance=2, labelangle=45] + update_yn -> fcur3 + + // ---------- + // After step + // ---------- + + interp_eval [label="Evaluate interpolant?"] + interp_type2 [label="Using Hermite interpolation?"] + f1q1 [label="Has f(tn, yn) been computed?"] + fsal1 [label="Is the method FSAL?", style=filled, fillcolor=slateblue1] + eval4 [label="Evaluate f(tn, yn)\lStore in F[0]\lCopy F[0] to fn\l", style=filled, fillcolor=slateblue1] + copy2 [label="Copy F[s-1] to F[0]\lCopy F[0] to fn\l", style=filled, fillcolor=slateblue1] + fcur4 [label="Set fn_is_current to True", style=filled, fillcolor=lightgreen] + interp_yout [label="Compute yout"] + step2 [label="Start Next Step"] + + fcur3 -> interp_eval + interp_eval -> step2 [taillabel="No", labeldistance=2, labelangle=45] + interp_eval -> interp_type2 [taillabel="Yes", labeldistance=2, labelangle=-45] + interp_type2 -> interp_yout [taillabel="No", labeldistance=2, labelangle=45] + interp_type2 -> f1q1 [taillabel="Yes", labeldistance=2, labelangle=-45] + f1q1 -> fsal1 [taillabel="No", labeldistance=2, labelangle=45] + fsal1 -> eval4 [taillabel="No", labeldistance=2, labelangle=-45] + eval4 -> fcur4 + fsal1 -> copy2 [taillabel="Yes", labeldistance=2, labelangle=45] + copy2 -> fcur4 + fcur4 -> interp_yout -> step2 + + +ARKStep Full RHS +================ + +.. digraph:: ark_fullrhs_start + :caption: ARKStep Full RHS Start + + node [shape=box, style=filled, fillcolor=white] + splines=ortho + bgcolor=lightskyblue + + // -------------- + // Full RHS Start + // -------------- + + fcur [label="Has f(tn, yn) been computed?"] + eval [label="Evaluate fe(tn, yn), fi(tn,yn)\lStore in Fe[0], Fi[0]\l"] + mass_a [label="Is there a mass matrix?"] + mass_b [label="Is M time dependent?"] + mass_c [label="Solve M(t) u = Fe[0], M(t) v = Fi[0]\lStore u, v in Fe[0], Fi[0]\lCopy Fe[0] + Fi[0] to f\l"] + mass_d [label="Copy Fe[0] + Fi[0] to f\lSolve M x = f\lCopy x to f\l"] + copy [label="Copy Fe[0] + Fi[0] to f"] + return [label="Set fn_is_current to True", style=filled, fillcolor=lightgreen] + + fcur -> copy [taillabel="Yes", labeldistance=2, labelangle=45] + fcur -> eval [taillabel="No", labeldistance=2, labelangle=45] + eval -> mass_a + mass_a -> copy [taillabel="No", labeldistance=2, labelangle=45] + copy -> return + mass_a -> mass_b [taillabel="Yes", labeldistance=2, labelangle=-45] + mass_b -> mass_c [taillabel="Yes", labeldistance=2, labelangle=-45] + mass_c -> return + mass_b -> mass_d [taillabel="No", labeldistance=2, labelangle=45] + mass_d -> return + +.. digraph:: ark_fullrhs_start + :caption: ARKStep Full RHS End + + node [shape=box, style=filled, fillcolor=white] + splines=ortho + bgcolor=slateblue1 + + // ------------ + // Full RHS End + // ------------ + + fcur [label="Has f(tn, yn) been computed?"] + sa [label="Is the method stiffly accurate?"] + eval [label="Evaluate fe(tn, yn), fi(tn, yn)\lStore in Fe[0], Fi[0]\l"] + mass_a1 [label="Is there a mass matrix?"] + mass_a2 [label="Is there a mass matrix?"] + mass_b1 [label="Is M time dependent?"] + mass_b2 [label="Is M time dependent?"] + mass_c [label="Solve M(t) u = Fe[0], M(t) v = Fi[0]\lStore u, v in Fe[0], Fi[0]\lCopy Fe[0] + Fi[0] to fn\l"] + mass_d1 [label="Solve M x = fn\lCopy x to fn\l"] + mass_d2 [label="Copy Fe[0] + Fi[0] to fn\lSolve M x = fn\lCopy x to fn\l"] + copy_1 [label="Copy Fe[0] + Fi[0] to fn"] + copy_2 [label="Copy Fe[s-1], Fi[s-1] to Fe[0], Fi[0]\lCopy Fe[0] + Fi[0] to fn\l"] + return [label="Set fn_is_current to True", style=filled, fillcolor=lightgreen] + + fcur -> copy_1 [taillabel="Yes", labeldistance=2, labelangle=45] + fcur -> sa [taillabel="No", labeldistance=2, labelangle=45] + sa -> copy_2 [taillabel="Yes", labeldistance=2, labelangle=45] + copy_2 -> mass_a1 + mass_a1 -> return [taillabel="No", labeldistance=2, labelangle=-45] + mass_a1 -> mass_b1 [taillabel="Yes", labeldistance=2, labelangle=45] + mass_b1 -> mass_d1 [taillabel="No", labeldistance=2, labelangle=-45] + mass_d1 -> return + mass_b1 -> return [taillabel="Yes", labeldistance=2, labelangle=45] + sa -> eval [taillabel="No", labeldistance=2, labelangle=-45] + eval -> mass_a2 + mass_a2 -> copy_1 [taillabel="No", labeldistance=2, labelangle=45] + copy_1 -> return + mass_a2 -> mass_b2 [taillabel="Yes", labeldistance=2, labelangle=-45] + mass_b2 -> mass_c [taillabel="Yes", labeldistance=2, labelangle=-45] + mass_c -> return + mass_b2 -> mass_d2 [taillabel="No", labeldistance=2, labelangle=45] + mass_d2 -> return + + +.. digraph:: ark_fullrhs + + node [shape=box] + splines=ortho + + // ----------------- + // Before first step + // ----------------- + + init [label="Initialize integrator\lCopy t0, y0 to tn, yn\l"] + f0cur [label="Set fn_is_current to False", style=filled, fillcolor=tomato1] + h0 [label="Is h0 provided?"] + f0_q [label="Has f(tn, yn) been computed?"] + rhs_1 [label="Call Full RHS Start", style=filled, fillcolor=lightskyblue] + h0_comp [label="Compute h0"] + start [label="Start Step"] + + init -> f0cur -> h0 + h0 -> start [taillabel="Yes", labeldistance=2, labelangle=45] + h0 -> f0_q [taillabel="No", labeldistance=2, labelangle=-45] + f0_q -> h0_comp [taillabel="Yes", labeldistance=2, labelangle=45] + f0_q -> rhs_1 [taillabel="No", labeldistance=2, labelangle=-45] + rhs_1 -> h0_comp + h0_comp -> start + + // ---------- + // Start step + // ---------- + + method_q [label="Is the first stage explicit?\nor\nIs the method stiffly accurate and Hermite interpolation is used?"] + step_q [label="Is this the first step after initial setup?"] + fn_q [label="Has f(tn, yn) been computed?"] + rhs_2 [label="Call Full RHS Start", style=filled, fillcolor=lightskyblue] + rhs_3 [label="Call Full RHS End", style=filled, fillcolor=slateblue1] + stages [label="Compute Stages"] + complete [label="Complete Step"] + + start -> method_q + method_q -> stages [taillabel="No", labeldistance=2, labelangle=45] + method_q -> fn_q [taillabel="Yes", labeldistance=2, labelangle=-45] + fn_q -> stages [taillabel="Yes", labeldistance=2, labelangle=-45] + fn_q -> step_q [taillabel="No", labeldistance=2, labelangle=-45] + step_q -> rhs_2 [taillabel="Yes", labeldistance=2, labelangle=-45] + step_q -> rhs_3 [taillabel="No", labeldistance=2, labelangle=-45] + rhs_2 -> stages + rhs_3 -> stages + stages -> complete + + // ------------- + // Complete step + // ------------- + + interp_update [label="Interpolation enabled?"] + interp_type1 [label="Using Hermite interpolation?"] + f0q3 [label="Has f(tn, yn) been computed?"] + rhs3 [label="Call Full RHS Start", style=filled, fillcolor=lightskyblue] + update_yn [label="Copy tcur, ycur to tn, yn"] + fcur1 [label="Set fn_is_current to False", style=filled, fillcolor=tomato1] + + complete -> interp_update + interp_update -> update_yn [taillabel="No", labeldistance=2, labelangle=45] + interp_update -> interp_type1 [taillabel="Yes", labeldistance=2, labelangle=-45] + interp_type1 -> update_yn [taillabel="No", labeldistance=2, labelangle=45] + interp_type1 -> f0q3 [taillabel="Yes", labeldistance=2, labelangle=-45] + f0q3 -> update_yn [taillabel="Yes", labeldistance=2, labelangle=45] + f0q3 -> rhs3 [taillabel="No", labeldistance=2, labelangle=-45] + rhs3 -> update_yn -> fcur1 + + // ---------- + // After step + // ---------- + + interp_eval [label="Evaluate interpolant?"] + interp_type2 [label="Using Hermite interpolation?"] + f1q1 [label="Has f(tn, yn) been computed?"] + rhs4 [label="Call Full RHS End", style=filled, fillcolor=slateblue1] + interp_yout [label="Compute yout"] + return [label="Start Next Step"] + + fcur1 -> interp_eval + interp_eval -> return [taillabel="No", labeldistance=2, labelangle=45] + interp_eval -> interp_type2 [taillabel="Yes", labeldistance=2, labelangle=-45] + interp_type2 -> interp_yout [taillabel="No", labeldistance=2, labelangle=45] + interp_type2 -> f1q1 [taillabel="Yes", labeldistance=2, labelangle=-45] + f1q1 -> interp_yout [taillabel="Yes", labeldistance=2, labelangle=45] + f1q1 -> rhs4 [taillabel="No", labeldistance=2, labelangle=45] + rhs4 -> interp_yout -> return diff --git a/doc/sundials_developers/source/references.rst b/doc/superbuild/source/developers/packages/index.rst similarity index 79% rename from doc/sundials_developers/source/references.rst rename to doc/superbuild/source/developers/packages/index.rst index 766b8f108a..372543ead6 100644 --- a/doc/sundials_developers/source/references.rst +++ b/doc/superbuild/source/developers/packages/index.rst @@ -12,9 +12,12 @@ SUNDIALS Copyright End ----------------------------------------------------------------------------- -********** -References -********** +.. _Packages: -.. [GoogleStyle] `Google Style Guides - `_ +Packages +=========== + +.. toctree:: + :maxdepth: 2 + + ARKODE diff --git a/doc/sundials_developers/source/pull_requests/MergePR.rst b/doc/superbuild/source/developers/pull_requests/MergePR.rst similarity index 100% rename from doc/sundials_developers/source/pull_requests/MergePR.rst rename to doc/superbuild/source/developers/pull_requests/MergePR.rst diff --git a/doc/sundials_developers/source/pull_requests/OpenPR.rst b/doc/superbuild/source/developers/pull_requests/OpenPR.rst similarity index 100% rename from doc/sundials_developers/source/pull_requests/OpenPR.rst rename to doc/superbuild/source/developers/pull_requests/OpenPR.rst diff --git a/doc/sundials_developers/source/pull_requests/ReviewPR.rst b/doc/superbuild/source/developers/pull_requests/ReviewPR.rst similarity index 100% rename from doc/sundials_developers/source/pull_requests/ReviewPR.rst rename to doc/superbuild/source/developers/pull_requests/ReviewPR.rst diff --git a/doc/sundials_developers/source/pull_requests/index.rst b/doc/superbuild/source/developers/pull_requests/index.rst similarity index 98% rename from doc/sundials_developers/source/pull_requests/index.rst rename to doc/superbuild/source/developers/pull_requests/index.rst index 9e2c5ed2e5..6fd8b01082 100644 --- a/doc/sundials_developers/source/pull_requests/index.rst +++ b/doc/superbuild/source/developers/pull_requests/index.rst @@ -24,7 +24,7 @@ creating a new pull request, items a that should be consider when reviewing, and how to merge the pull request after approval. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 OpenPR ReviewPR diff --git a/doc/sundials_developers/source/releases/Checklist.rst b/doc/superbuild/source/developers/releases/Checklist.rst similarity index 100% rename from doc/sundials_developers/source/releases/Checklist.rst rename to doc/superbuild/source/developers/releases/Checklist.rst diff --git a/doc/sundials_developers/source/releases/index.rst b/doc/superbuild/source/developers/releases/index.rst similarity index 97% rename from doc/sundials_developers/source/releases/index.rst rename to doc/superbuild/source/developers/releases/index.rst index 8fde8f3922..75d9ccd97a 100644 --- a/doc/sundials_developers/source/releases/index.rst +++ b/doc/superbuild/source/developers/releases/index.rst @@ -20,6 +20,6 @@ Releases This chapter discusses preparing a SUNDIALS release. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 Checklist diff --git a/doc/sundials_developers/source/style_guide/Classes.rst b/doc/superbuild/source/developers/style_guide/Classes.rst similarity index 100% rename from doc/sundials_developers/source/style_guide/Classes.rst rename to doc/superbuild/source/developers/style_guide/Classes.rst diff --git a/doc/sundials_developers/source/style_guide/Documentation.rst b/doc/superbuild/source/developers/style_guide/Documentation.rst similarity index 99% rename from doc/sundials_developers/source/style_guide/Documentation.rst rename to doc/superbuild/source/developers/style_guide/Documentation.rst index 9aae3bfdc7..2041405fb6 100644 --- a/doc/sundials_developers/source/style_guide/Documentation.rst +++ b/doc/superbuild/source/developers/style_guide/Documentation.rst @@ -18,7 +18,7 @@ Documentation Style ******************* -Style guide for RestructuredText with Sphinx. For the most part, we attempt +Style guide for reStructuredText with Sphinx. For the most part, we attempt to follow the Python developer's guide commentary on documentation (where relevant): https://devguide.python.org/documenting/#style-guide. diff --git a/doc/sundials_developers/source/style_guide/SourceCode.rst b/doc/superbuild/source/developers/style_guide/SourceCode.rst similarity index 83% rename from doc/sundials_developers/source/style_guide/SourceCode.rst rename to doc/superbuild/source/developers/style_guide/SourceCode.rst index 05098a2d35..9b858ade69 100644 --- a/doc/sundials_developers/source/style_guide/SourceCode.rst +++ b/doc/superbuild/source/developers/style_guide/SourceCode.rst @@ -106,16 +106,15 @@ Comments TODO Comments ^^^^^^^^^^^^^ -Following the Google Style Guide [GoogleStyle]_, TODO comments are used to note -code that is "temporary, a short-term solution, or good-enough but not perfect." - -A consistent TODO comment format provides an easy to search for keyword with -details on how to get more information. TODO comments should start with ``TODO`` -followed by a unique identifier, enclosed in parentheses, for the person most -knowledgeable about the issue and a brief description of the TODO item. -Generally, these comments should be used sparingly and are not a substitute for -creating an issue or bug report. When applicable, the comment should include the -relevant issue or bug report number. +Following the `Google Style Guide `_ , TODO comments are used +to note code that is "temporary, a short-term solution, or good-enough but not perfect." + +A consistent TODO comment format provides an easy to search for keyword with details on how to get +more information. TODO comments should start with ``TODO`` followed by a unique identifier, enclosed +in parentheses, for the person most knowledgeable about the issue and a brief description of the +TODO item. Generally, these comments should be used sparingly and are not a substitute for creating +an issue or bug report. When applicable, the comment should include the relevant issue or bug report +number. Examples: diff --git a/doc/sundials_developers/source/style_guide/index.rst b/doc/superbuild/source/developers/style_guide/index.rst similarity index 94% rename from doc/sundials_developers/source/style_guide/index.rst rename to doc/superbuild/source/developers/style_guide/index.rst index 07c3a2f565..09ee444c82 100644 --- a/doc/sundials_developers/source/style_guide/index.rst +++ b/doc/superbuild/source/developers/style_guide/index.rst @@ -14,15 +14,14 @@ .. _Style: -*********** Style Guide -*********** +=========== This chapter covers the SUNDIALS style conventions for formatting source code, CMake files, and documentation files to ensure consistency and maintainability. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 SourceCode Classes diff --git a/doc/superbuild/source/developers/testing/Answers.rst b/doc/superbuild/source/developers/testing/Answers.rst new file mode 100644 index 0000000000..b0c20513ce --- /dev/null +++ b/doc/superbuild/source/developers/testing/Answers.rst @@ -0,0 +1,118 @@ +.. + ----------------------------------------------------------------------------- + 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 + ----------------------------------------------------------------------------- + +.. _Answers: + +Answer Files +============ + +When solving ODEs/DAEs and nonlinear algebraic equations numerically, there is not always a known +analytical solution for the problem to compare with. Additionally, there may be many paths to a +correct solution and some may be less efficient than others. This presents an issue for testing +SUNDIALS. How do we ensure SUNDIALS is working correctly if we cannot write down what "correct" is? +To solve this problem SUNDIALS has tests (which often also serve as example codes) that have been +verified by the author to be functioning correctly. These tests produce output which is stored in a +file known as the "answer" file (aka "out" or "output" file). The output typically consist of the +solution and/or some quantities derived from the solution as well as statistics about how the +integration and/or solve (e.g., number of time steps). When changes are made to SUNDIALS, we ensure +that these output files do not change unless it is expected/desired. Practically, this is ensured +by our :ref:`CI testing `. + +Due to difference in microarichtectures and the nature of floating point arithmetic, it is quite +possible that the output generated on one machine may differ from the output generated on another. +As such, we specify that the the answer files that are embedded in ``examples/`` (the ``.out`` +files) should match what is produced on the Jenkins CI machine. We also have a `separate git +repostiory `_ which holds answers for other machines, +such as the GitHub Actions virtual machines. + + +Updating and Adding Answer Files for Existing Machines +------------------------------------------------------ + +Sometimes it is necessary to update the answer files, or add a new file, so that the tests pass, if a change in output +is expected/desired. Changing output files requires careful verification that the output is still +"correct". The procedure for updating answer files is as follows: + +- For the ``.out`` files embedded in examples, simply overwrite the file with the new output. If the + tests still fail, then you will need to download the output file generated on the Jenkins CI + machine and commit it. Extracting this file from the Jenkins machine may require help from David + or Cody currently. + +- For the ``.out`` files in `sundials-codes/answers `_: + + #. Navigate to `test/answers` in the sundials repository. If there is nothing in this directory, + you need to run `git submodule init && git submodule update`. Alternatively clone the answers + repository outside of the SUNDIALS source tree. + + #. Checkout the main branch: ``git checkout main``. + + #. Create a new branch off of main. It is ideal if you use a branch name that matches the name of + the branch that you are developing in sundials on: ``git checkout -b ``. + + #. Update the relevant ``.out`` files in + ``test/answers/linux-ubuntu20.04-x86_64/gcc-9.4.0/`` (this is the files + used for the GitHub Actions CI). Like with the embedded `.out` files, you can try and use the + output generated on your machine, but it may be different enough from what is produced on the + GitHub actions to trigger a failure. You can download the output files generated on the GitHub + machines by going to ``_ finding your failing + test, clicking it, then at the bottom downloading the "output_files" artifact (you can also find your + failing test at the bottom of a PR). The downloaded zip file will be the SUNDIALS build + directory. To update just the failed files you can use ``scripts/updateOutFiles.py ``e.g., + + .. code:: + + cd scripts + ./updateOutFiles.py + + When updating files in the answers repo the source path is the path to the build directory + downloaded from GitHub and the destination path is ``/linux-ubuntu20.04-x86_64/gcc-9.4.0/``. When updating with output + from Jenkins the source path is the build directory for the Jenkins run and the destination + path is the top level of the sundials repo (i.e., ../. if running from scripts). The script + will automatically traverse the examples and test/unit_test directories to update output files + for failed tests. + + #. If you need to use ssh authentication for pushing to GitHub, then you may need to update the + remote for the submodule: + + .. code:: + + git remote set-url origin git@github.com:sundials-codes/answers.git + + #. Create a pull-request in `sundials-codes/answers `_ + with your updates. + + +Adding Answer Files for a New Machine +------------------------------------- + +- For the ``.out`` files embedded in examples, simply overwrite the file with the new output. If the + tests running on Jenkins still fail, then you will need to download the output file generated on + the Jenkins CI machine and commit it. Extracting this file from the Jenkins machine may require + help from David or Cody currently. + +- For the ``.out`` files in `sundials-codes/answers `_: + + #. To add new answers, start by copying the relevant answers in ``linux-ubuntu20.04-x86_64`` to + your new directory (following the naming scheme outlined above). + + #. Next Commit these files and open a PR to the "staging" branch. + + #. Once the PR is merged, you can generate your new answer files and overwrite the ones you copied + from ``linux-ubuntu20.04-x86_64``. + + #. Compare the diff and make sure it is reasonable, then commit. + + #. Finally, open a new PR targeting the "staging" branch. + + #. Eventually, "staging" will be merged into main. diff --git a/doc/sundials_developers/source/testing/Benchmarking.rst b/doc/superbuild/source/developers/testing/Benchmarking.rst similarity index 100% rename from doc/sundials_developers/source/testing/Benchmarking.rst rename to doc/superbuild/source/developers/testing/Benchmarking.rst diff --git a/doc/sundials_developers/source/testing/CI.rst b/doc/superbuild/source/developers/testing/CI.rst similarity index 98% rename from doc/sundials_developers/source/testing/CI.rst rename to doc/superbuild/source/developers/testing/CI.rst index 2e5b6e276b..c8b527d844 100644 --- a/doc/sundials_developers/source/testing/CI.rst +++ b/doc/superbuild/source/developers/testing/CI.rst @@ -11,10 +11,12 @@ SUNDIALS Copyright End ----------------------------------------------------------------------------- +.. _CI: + GitHub CI Testing ================= -There are two types of CI testing that we run on GitHub via `GitHub actions `_: +There are two categories of CI testing that we run on GitHub via `GitHub actions `_: 1. Comprehensive (excluding GPUs) 2. Minimal/Short diff --git a/doc/sundials_developers/source/testing/Local.rst b/doc/superbuild/source/developers/testing/Local.rst similarity index 100% rename from doc/sundials_developers/source/testing/Local.rst rename to doc/superbuild/source/developers/testing/Local.rst diff --git a/doc/sundials_developers/source/testing/Spot.rst b/doc/superbuild/source/developers/testing/Spot.rst similarity index 100% rename from doc/sundials_developers/source/testing/Spot.rst rename to doc/superbuild/source/developers/testing/Spot.rst diff --git a/doc/superbuild/source/developers/testing/index.rst b/doc/superbuild/source/developers/testing/index.rst new file mode 100644 index 0000000000..4af8caf083 --- /dev/null +++ b/doc/superbuild/source/developers/testing/index.rst @@ -0,0 +1,50 @@ +.. + Author(s): David J. Gardner @ 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 + ----------------------------------------------------------------------------- + +.. _Testing: + +Testing +======= + +We include several types of tests in SUNDIALS: unit tests, integration test and performance tests. +These tests are run via as part of our :ref:`Continuous Integration suite `. + +**Unit Tests** + +The unit tests reside in two places: ``test/unit_tests`` and in files named ``test_`` within +``examples/``. With few exceptions, SUNDIALS unit tests should return an exit code indicating if the +test was successful or not. I.e., they should be self-contained and not require any output file to +determine success or failure. + +**Integration Tests** + +The integration tests are dual purpose; they serve as tests and also examples for users. They are +found in ``examples/``. The integration tests produce output that is checked against an output file, +i.e. an answer file, to determine if the test passed or failed. See :ref:`Answers ` for details. + +**Performance Tests** + +These tests are benchmarks of SUNDIALS performance and are found in ``benchmarks/``. Refer to +:ref:`Continuous Performance Testing ` for more detail. + + +.. toctree:: + :maxdepth: 1 + + CI + Local + Answers + Benchmarking + Spot + \ No newline at end of file diff --git a/doc/superbuild/source/index.rst b/doc/superbuild/source/index.rst index 571e8f9c2d..62298bc824 100644 --- a/doc/superbuild/source/index.rst +++ b/doc/superbuild/source/index.rst @@ -39,9 +39,11 @@ SUNDIALS is developed on `GitHub `_. sunmatrix/index.rst sunlinsol/index.rst sunnonlinsol/index.rst + sunadaptcontroller/index.rst sunmemory/index.rst Install_link.rst History_link.rst + developers/index.rst References diff --git a/doc/superbuild/source/sunadaptcontroller/SUNAdaptController_links.rst b/doc/superbuild/source/sunadaptcontroller/SUNAdaptController_links.rst new file mode 100644 index 0000000000..ee94a630b1 --- /dev/null +++ b/doc/superbuild/source/sunadaptcontroller/SUNAdaptController_links.rst @@ -0,0 +1,15 @@ +.. ---------------------------------------------------------------- + SUNDIALS Copyright Start + Copyright (c) 2002-2023, Lawrence Livermore National Security + and Southern Methodist University. + All rights reserved. + + See the top-level LICENSE and NOTICE files for details. + + SPDX-License-Identifier: BSD-3-Clause + SUNDIALS Copyright End + ---------------------------------------------------------------- + +.. include:: ../../../shared/sunadaptcontroller/SUNAdaptController_Description.rst +.. include:: ../../../shared/sunadaptcontroller/SUNAdaptController_Soderlind.rst +.. include:: ../../../shared/sunadaptcontroller/SUNAdaptController_ImExGus.rst diff --git a/doc/superbuild/source/sunadaptcontroller/index.rst b/doc/superbuild/source/sunadaptcontroller/index.rst new file mode 100644 index 0000000000..6ba75858a6 --- /dev/null +++ b/doc/superbuild/source/sunadaptcontroller/index.rst @@ -0,0 +1,31 @@ +.. + 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 + ---------------------------------------------------------------- + +.. _SUNAdaptController: + +##################################### +Time Step Adaptivity Controllers +##################################### + +The SUNDIALS library comes packaged with a variety of :c:type:`SUNAdaptController` +implementations, designed to support various forms of error-based time step +adaptivity within SUNDIALS time integrators. To support applications that may +want to adjust the controller parameters or provide their own implementations, +SUNDIALS defines the :c:type:`SUNAdaptController` base class, along with a +variety of default implementations. + +.. toctree:: + :maxdepth: 1 + + SUNAdaptController_links.rst diff --git a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp index 15fac77098..ad98ede688 100644 --- a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp +++ b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp @@ -67,7 +67,7 @@ // Include MPI #include "mpi.h" -// Include desired integrators, vectors, linear solvers, and nonlinear sovlers +// Include desired integrators, vectors, linear solvers, and nonlinear solvers #include "arkode/arkode_arkstep.h" #include "arkode/arkode_mristep.h" #include "cvode/cvode.h" @@ -307,7 +307,7 @@ struct UserData bool pcg = true; // use PCG (true) or GMRES (false) bool prec = true; // preconditioner on/off bool lsinfo = false; // output residual history - int liniters = 5; // number of linear iterations + int liniters = 10; // number of linear iterations int msbp = 0; // preconditioner setup frequency (0 = default) realtype epslin = ZERO; // linear solver tolerance factor (ZERO = default) N_Vector diag = NULL; // inverse of Jacobian diagonal @@ -393,10 +393,11 @@ static int SetupDecomp(UserData *udata); // Integrator setup functions static int SetupARK(SUNContext ctx, UserData *udata, N_Vector u, - SUNLinearSolver LS, void **arkode_mem); + SUNLinearSolver LS, SUNAdaptController *Ctrl, + void **arkode_mem); static int SetupMRI(SUNContext ctx, UserData *udata, N_Vector u, - SUNLinearSolver LS, void **arkode_mem, - MRIStepInnerStepper *stepper); + SUNLinearSolver LS, SUNAdaptController *Ctrl, + void **arkode_mem, MRIStepInnerStepper *stepper); static int SetupMRICVODE(SUNContext ctx, UserData *udata, N_Vector u, SUNLinearSolver LS, SUNNonlinearSolver *NLS, void **arkode_mem, MRIStepInnerStepper *stepper); @@ -588,15 +589,18 @@ int main(int argc, char* argv[]) // Inner stepper nonlinear solver (CVODE) SUNNonlinearSolver NLS = NULL; + // Timestep adaptivity controller + SUNAdaptController Ctrl = NULL; + // Create integrator switch(udata.integrator) { case(0): - flag = SetupARK(ctx, &udata, u, LS, &arkode_mem); + flag = SetupARK(ctx, &udata, u, LS, &Ctrl, &arkode_mem); if (check_flag((void *) arkode_mem, "SetupARK", 0)) return 1; break; case(1): - flag = SetupMRI(ctx, &udata, u, LS, &arkode_mem, &stepper); + flag = SetupMRI(ctx, &udata, u, LS, &Ctrl, &arkode_mem, &stepper); if (check_flag((void *) arkode_mem, "SetupMRI", 0)) return 1; break; case(2): @@ -746,6 +750,7 @@ int main(int argc, char* argv[]) N_VDestroy(N_VGetLocalVector_MPIPlusX(u)); N_VDestroy(u); FreeUserData(&udata); + (void) SUNAdaptController_Destroy(Ctrl); SUNContext_Free(&ctx); flag = MPI_Finalize(); return 0; @@ -955,7 +960,8 @@ static int SetupDecomp(UserData *udata) static int SetupARK(SUNContext ctx, UserData* udata, N_Vector u, - SUNLinearSolver LS, void** arkode_mem) + SUNLinearSolver LS, SUNAdaptController *Ctrl, + void** arkode_mem) { int flag; @@ -1016,9 +1022,16 @@ static int SetupARK(SUNContext ctx, UserData* udata, N_Vector u, } else { - flag = ARKStepSetAdaptivityMethod(*arkode_mem, udata->controller, SUNTRUE, - SUNFALSE, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + switch (udata->controller) { + case (ARK_ADAPT_PID): *Ctrl = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): *Ctrl = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): *Ctrl = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): *Ctrl = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): *Ctrl = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): *Ctrl = SUNAdaptController_ImExGus(ctx); break; + } + flag = ARKStepSetAdaptController(*arkode_mem, *Ctrl); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; } // Set max steps between outputs @@ -1041,8 +1054,8 @@ static int SetupARK(SUNContext ctx, UserData* udata, N_Vector u, static int SetupMRI(SUNContext ctx, UserData* udata, N_Vector y, - SUNLinearSolver LS, void** arkode_mem, - MRIStepInnerStepper* stepper) + SUNLinearSolver LS, SUNAdaptController *Ctrl, + void** arkode_mem, MRIStepInnerStepper* stepper) { int flag; @@ -1075,9 +1088,16 @@ static int SetupMRI(SUNContext ctx, UserData* udata, N_Vector y, } else { - flag = ARKStepSetAdaptivityMethod(inner_arkode_mem, udata->controller, - SUNTRUE, SUNFALSE, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + switch (udata->controller) { + case (ARK_ADAPT_PID): *Ctrl = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): *Ctrl = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): *Ctrl = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): *Ctrl = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): *Ctrl = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): *Ctrl = SUNAdaptController_ImExGus(ctx); break; + } + flag = ARKStepSetAdaptController(inner_arkode_mem, *Ctrl); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; } // Set max steps between outputs diff --git a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--imex.out b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--imex.out index b7c7a5805c..06735a9ae5 100644 --- a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--imex.out +++ b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--imex.out @@ -37,7 +37,7 @@ linear = 1 --------------------------------- linear solver = PCG - lin iters = 5 + lin iters = 10 eps lin = 0 prec = 1 msbp = 0 @@ -48,45 +48,45 @@ t ||u||_rms ---------------------------------------------- 0.000000000000000e+00 3.172144385112383e+00 - 5.000000000000000e-01 3.136781978966371e+00 - 1.000000000000000e+00 3.125095500559746e+00 - 1.500000000000000e+00 3.152620956520280e+00 - 2.000000000000000e+00 3.252033049944731e+00 - 2.500000000000000e+00 3.404813950977549e+00 - 3.000000000000000e+00 3.570162567428832e+00 - 3.500000000000000e+00 3.699962132487487e+00 - 4.000000000000000e+00 3.694761763072449e+00 - 4.500000000000000e+00 3.628565769394313e+00 - 5.000000000000000e+00 3.475500510795411e+00 - 5.500000000000000e+00 3.344032274118367e+00 - 6.000000000000000e+00 3.233949925729428e+00 - 6.500000000000000e+00 3.082058120794513e+00 - 7.000000000000000e+00 2.890442427981788e+00 - 7.500000000000000e+00 2.837091032458512e+00 - 8.000000000000000e+00 2.898054545259084e+00 - 8.500000000000000e+00 3.139933622385019e+00 - 9.000000000000000e+00 3.442183323454377e+00 - 9.500000000000000e+00 3.740380013622370e+00 - 1.000000000000000e+01 4.014473424455050e+00 + 5.000000000000000e-01 3.136697189650961e+00 + 1.000000000000000e+00 3.125045556354785e+00 + 1.500000000000000e+00 3.152624763885952e+00 + 2.000000000000000e+00 3.252110216645144e+00 + 2.500000000000000e+00 3.404844617318184e+00 + 3.000000000000000e+00 3.570312084328844e+00 + 3.500000000000000e+00 3.700253327108766e+00 + 4.000000000000000e+00 3.694878484122721e+00 + 4.500000000000000e+00 3.628319195038670e+00 + 5.000000000000000e+00 3.475278388464473e+00 + 5.500000000000000e+00 3.343897893358916e+00 + 6.000000000000000e+00 3.233978972947007e+00 + 6.500000000000000e+00 3.082324512637206e+00 + 7.000000000000000e+00 2.890530860599866e+00 + 7.500000000000000e+00 2.837258314564151e+00 + 8.000000000000000e+00 2.898203339016268e+00 + 8.500000000000000e+00 3.140063067933301e+00 + 9.000000000000000e+00 3.442273509340489e+00 + 9.500000000000000e+00 3.740451074463314e+00 + 1.000000000000000e+01 4.014529388100347e+00 ---------------------------------------------- Final integrator statistics: Steps = 105 - Step attempts = 111 - Error test fails = 6 - RHS reaction = 447 - RHS diffusion = 780 - NLS iters = 333 + Step attempts = 112 + Error test fails = 7 + RHS reaction = 443 + RHS diffusion = 779 + NLS iters = 336 NLS fails = 0 - LS iters = 1638 - LS fails = 300 + LS iters = 2697 + LS fails = 87 LS setups = 0 - LS RHS evals = 1638 - Jv products = 1638 + LS RHS evals = 2697 + Jv products = 2697 Avg NLS iters per step attempt = 3.000000 - Avg LS iters per NLS iter = 4.918919 + Avg LS iters per NLS iter = 8.026786 Preconditioner setups = 0 - Preconditioner solves = 1638 + Preconditioner solves = 2697 diff --git a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-arkstep.out b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-arkstep.out index 44e9ca39ad..ae206aafd4 100644 --- a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-arkstep.out +++ b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-arkstep.out @@ -40,7 +40,7 @@ linear = 1 --------------------------------- linear solver = PCG - lin iters = 5 + lin iters = 10 eps lin = 0 prec = 1 msbp = 0 @@ -51,49 +51,49 @@ t ||u||_rms ---------------------------------------------- 0.000000000000000e+00 3.172144385112383e+00 - 5.000000000000000e-01 3.136741760177363e+00 - 1.000000000000000e+00 3.125063288126960e+00 - 1.500000000000000e+00 3.152612100930424e+00 - 2.000000000000000e+00 3.252042400952964e+00 - 2.500000000000000e+00 3.404761539326434e+00 - 3.000000000000000e+00 3.570183798164206e+00 - 3.500000000000000e+00 3.699958243267201e+00 - 4.000000000000000e+00 3.694644394786519e+00 - 4.500000000000000e+00 3.628182390566946e+00 - 5.000000000000000e+00 3.475214313463735e+00 - 5.500000000000000e+00 3.343937480671038e+00 - 6.000000000000000e+00 3.234080840699362e+00 - 6.500000000000000e+00 3.082501265216459e+00 - 7.000000000000000e+00 2.890793620590566e+00 - 7.500000000000000e+00 2.837373326530296e+00 - 8.000000000000000e+00 2.898190808646831e+00 - 8.500000000000000e+00 3.139962981781891e+00 - 9.000000000000000e+00 3.442134760530028e+00 - 9.500000000000000e+00 3.740312877536207e+00 - 1.000000000000000e+01 4.014396629231554e+00 + 5.000000000000000e-01 3.136741760652088e+00 + 1.000000000000000e+00 3.125063175301122e+00 + 1.500000000000000e+00 3.152612863029649e+00 + 2.000000000000000e+00 3.252046438757223e+00 + 2.500000000000000e+00 3.404770336275880e+00 + 3.000000000000000e+00 3.570197843463192e+00 + 3.500000000000000e+00 3.699979298705992e+00 + 4.000000000000000e+00 3.694673743577147e+00 + 4.500000000000000e+00 3.628192807357139e+00 + 5.000000000000000e+00 3.475181871691853e+00 + 5.500000000000000e+00 3.343883541753708e+00 + 6.000000000000000e+00 3.234020189727759e+00 + 6.500000000000000e+00 3.082396969215168e+00 + 7.000000000000000e+00 2.890645348225157e+00 + 7.500000000000000e+00 2.837264086636537e+00 + 8.000000000000000e+00 2.898204389104409e+00 + 8.500000000000000e+00 3.140043837970826e+00 + 9.000000000000000e+00 3.442234882231944e+00 + 9.500000000000000e+00 3.740410418605710e+00 + 1.000000000000000e+01 4.014486526389547e+00 ---------------------------------------------- Final integrator statistics: Slow Integrator: Steps = 132 - RHS diffusion = 793 + RHS diffusion = 792 NLS iters = 396 NLS fails = 0 - LS iters = 1958 - LS fails = 360 + LS iters = 2633 + LS fails = 1 LS setups = 0 - LS RHS evals = 1958 - Jv products = 1958 + LS RHS evals = 2633 + Jv products = 2633 Avg NLS iters per step attempt = 3.000000 - Avg LS iters per NLS iter = 4.944444 + Avg LS iters per NLS iter = 6.648990 Preconditioner setups = 0 - Preconditioner solves = 1958 + Preconditioner solves = 2633 Fast Integrator: - Steps = 472 - Step attempts = 472 + Steps = 470 + Step attempts = 470 Error test fails = 0 - RHS reaction = 2419 + RHS reaction = 1827 diff --git a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-cvode-global.out b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-cvode-global.out index 7db0c6bb47..eb6c3b2f7a 100644 --- a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-cvode-global.out +++ b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-cvode-global.out @@ -40,7 +40,7 @@ linear = 1 --------------------------------- linear solver = PCG - lin iters = 5 + lin iters = 10 eps lin = 0 prec = 1 msbp = 0 @@ -52,50 +52,50 @@ ---------------------------------------------- 0.000000000000000e+00 3.172144385112383e+00 5.000000000000000e-01 3.136722629465066e+00 - 1.000000000000000e+00 3.125057666159531e+00 - 1.500000000000000e+00 3.152636290021100e+00 - 2.000000000000000e+00 3.252083347119256e+00 - 2.500000000000000e+00 3.404787326260405e+00 - 3.000000000000000e+00 3.570169612064414e+00 - 3.500000000000000e+00 3.699861041719807e+00 - 4.000000000000000e+00 3.694342711292659e+00 - 4.500000000000000e+00 3.627870941932435e+00 - 5.000000000000000e+00 3.474902190560723e+00 - 5.500000000000000e+00 3.343695434939634e+00 - 6.000000000000000e+00 3.233894498163541e+00 - 6.500000000000000e+00 3.082341713678574e+00 - 7.000000000000000e+00 2.890723917928596e+00 - 7.500000000000000e+00 2.837417967150272e+00 - 8.000000000000000e+00 2.898409418371463e+00 - 8.500000000000000e+00 3.140209829663979e+00 - 9.000000000000000e+00 3.442357276093309e+00 - 9.500000000000000e+00 3.740503273636440e+00 - 1.000000000000000e+01 4.014544572497562e+00 + 1.000000000000000e+00 3.125057552024107e+00 + 1.500000000000000e+00 3.152636979017849e+00 + 2.000000000000000e+00 3.252085784090209e+00 + 2.500000000000000e+00 3.404791619294692e+00 + 3.000000000000000e+00 3.570175845435155e+00 + 3.500000000000000e+00 3.699871659893790e+00 + 4.000000000000000e+00 3.694354186527817e+00 + 4.500000000000000e+00 3.627867393042675e+00 + 5.000000000000000e+00 3.474857085470333e+00 + 5.500000000000000e+00 3.343640002216232e+00 + 6.000000000000000e+00 3.233844046127571e+00 + 6.500000000000000e+00 3.082251062694838e+00 + 7.000000000000000e+00 2.890585369424622e+00 + 7.500000000000000e+00 2.837315452756236e+00 + 8.000000000000000e+00 2.898424893363213e+00 + 8.500000000000000e+00 3.140291028418725e+00 + 9.000000000000000e+00 3.442457327275146e+00 + 9.500000000000000e+00 3.740600281636448e+00 + 1.000000000000000e+01 4.014633157708740e+00 ---------------------------------------------- Final integrator statistics: Slow Integrator: Steps = 132 - RHS diffusion = 793 + RHS diffusion = 792 NLS iters = 396 NLS fails = 0 - LS iters = 1958 - LS fails = 361 + LS iters = 2640 + LS fails = 0 LS setups = 0 - LS RHS evals = 1958 - Jv products = 1958 + LS RHS evals = 2640 + Jv products = 2640 Avg NLS iters per step attempt = 3.000000 - Avg LS iters per NLS iter = 4.944444 + Avg LS iters per NLS iter = 6.666667 Preconditioner setups = 0 - Preconditioner solves = 1958 + Preconditioner solves = 2640 Fast Integrator: - Steps = 2058 + Steps = 2057 Error test fails = 392 - RHS reaction = 4992 - NLS iters = 3804 + RHS reaction = 4991 + NLS iters = 3803 NLS fails = 0 diff --git a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-cvode-local.out b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-cvode-local.out index f2aee774c9..2069d3daf0 100644 --- a/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-cvode-local.out +++ b/examples/arkode/CXX_parallel/ark_diffusion_reaction_p_--np_2_2_--mri-cvode-local.out @@ -40,7 +40,7 @@ linear = 1 --------------------------------- linear solver = PCG - lin iters = 5 + lin iters = 10 eps lin = 0 prec = 1 msbp = 0 @@ -51,46 +51,46 @@ t ||u||_rms ---------------------------------------------- 0.000000000000000e+00 3.172144385112383e+00 - 5.000000000000000e-01 3.136728159494494e+00 - 1.000000000000000e+00 3.125054277650959e+00 - 1.500000000000000e+00 3.152604392883360e+00 - 2.000000000000000e+00 3.252018267648228e+00 - 2.500000000000000e+00 3.404688232954761e+00 - 3.000000000000000e+00 3.570039091260456e+00 - 3.500000000000000e+00 3.699700617638115e+00 - 4.000000000000000e+00 3.694127992765750e+00 - 4.500000000000000e+00 3.627693732995581e+00 - 5.000000000000000e+00 3.474745808958595e+00 - 5.500000000000000e+00 3.343638848927724e+00 - 6.000000000000000e+00 3.233956510132078e+00 - 6.500000000000000e+00 3.082497090887950e+00 - 7.000000000000000e+00 2.890880779320601e+00 - 7.500000000000000e+00 2.837548720834195e+00 - 8.000000000000000e+00 2.898444607824460e+00 - 8.500000000000000e+00 3.140194708467158e+00 - 9.000000000000000e+00 3.442324814047467e+00 - 9.500000000000000e+00 3.740458273532059e+00 - 1.000000000000000e+01 4.014484356709024e+00 + 5.000000000000000e-01 3.136728141568442e+00 + 1.000000000000000e+00 3.125054078969537e+00 + 1.500000000000000e+00 3.152605475501787e+00 + 2.000000000000000e+00 3.252022913428429e+00 + 2.500000000000000e+00 3.404698680378851e+00 + 3.000000000000000e+00 3.570053730764652e+00 + 3.500000000000000e+00 3.699720763396807e+00 + 4.000000000000000e+00 3.694157931241854e+00 + 4.500000000000000e+00 3.627712125668464e+00 + 5.000000000000000e+00 3.474734466021550e+00 + 5.500000000000000e+00 3.343606933034505e+00 + 6.000000000000000e+00 3.233915506336244e+00 + 6.500000000000000e+00 3.082406527906669e+00 + 7.000000000000000e+00 2.890736516064352e+00 + 7.500000000000000e+00 2.837432528460552e+00 + 8.000000000000000e+00 2.898441248594821e+00 + 8.500000000000000e+00 3.140256919387213e+00 + 9.000000000000000e+00 3.442407086783334e+00 + 9.500000000000000e+00 3.740539247790086e+00 + 1.000000000000000e+01 4.014559182532612e+00 ---------------------------------------------- Final integrator statistics: Slow Integrator: Steps = 132 - RHS diffusion = 793 + RHS diffusion = 792 NLS iters = 396 NLS fails = 0 - LS iters = 1965 - LS fails = 358 + LS iters = 2630 + LS fails = 0 LS setups = 0 - LS RHS evals = 1965 - Jv products = 1965 + LS RHS evals = 2630 + Jv products = 2630 Avg NLS iters per step attempt = 3.000000 - Avg LS iters per NLS iter = 4.962121 + Avg LS iters per NLS iter = 6.641414 Preconditioner setups = 0 - Preconditioner solves = 1965 + Preconditioner solves = 2630 Fast Integrator: Steps = 2002 diff --git a/examples/arkode/CXX_parallel/ark_heat2D_p.cpp b/examples/arkode/CXX_parallel/ark_heat2D_p.cpp index 32623f530c..0e096b71b9 100644 --- a/examples/arkode/CXX_parallel/ark_heat2D_p.cpp +++ b/examples/arkode/CXX_parallel/ark_heat2D_p.cpp @@ -279,6 +279,7 @@ int main(int argc, char* argv[]) 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 double t1 = 0.0; @@ -463,9 +464,16 @@ int main(int argc, char* argv[]) } else { - flag = ARKStepSetAdaptivityMethod(arkode_mem, udata->controller, SUNTRUE, - SUNFALSE, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + switch (udata->controller) { + case (ARK_ADAPT_PID): C = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): C = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): C = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): C = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): C = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): C = SUNAdaptController_ImExGus(ctx); break; + } + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; } // Specify linearly implicit non-time-dependent RHS @@ -579,6 +587,7 @@ int main(int argc, char* argv[]) N_VDestroy(u); // Free vectors FreeUserData(udata); // Free user data delete udata; + (void) SUNAdaptController_Destroy(C); // Free timestep adaptivity controller SUNContext_Free(&ctx); // Free context flag = MPI_Finalize(); // Finalize MPI return 0; @@ -1347,7 +1356,7 @@ static int InitUserData(UserData *udata) 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->liniters = 40; // max linear iterations udata->msbp = 0; // use default (20 steps) udata->epslin = ZERO; // use default (0.05) diff --git a/examples/arkode/CXX_parallel/ark_heat2D_p_--np_2_2.out b/examples/arkode/CXX_parallel/ark_heat2D_p_--np_2_2.out index 5a9b81eb98..7ab208a80b 100644 --- a/examples/arkode/CXX_parallel/ark_heat2D_p_--np_2_2.out +++ b/examples/arkode/CXX_parallel/ark_heat2D_p_--np_2_2.out @@ -26,7 +26,7 @@ linear = 1 --------------------------------- linear solver = PCG - lin iters = 20 + lin iters = 40 eps lin = 0 prec = 1 msbp = 0 @@ -37,45 +37,45 @@ t ||u||_rms max error ----------------------------------------------------------------------- 0.000000000000000e+00 3.632812500000001e-01 0.000000000000000e+00 - 5.000000000000000e-02 3.551986504206954e-01 2.454704268845198e-03 - 1.000000000000000e-01 3.296221522563136e-01 2.894351312350718e-03 - 1.500000000000000e-01 2.894445052045986e-01 2.833234860738609e-03 - 2.000000000000000e-01 2.387097405487202e-01 2.521351471365452e-03 - 2.500000000000000e-01 1.824253004688915e-01 2.077548067353219e-03 - 3.000000000000000e-01 1.261158186733340e-01 1.577622926918210e-03 - 3.500000000000000e-01 7.529892942993587e-02 1.082586631952070e-03 - 4.000000000000000e-01 3.495153500642601e-02 6.466745969102711e-04 - 4.500000000000000e-01 9.023447459645315e-03 3.130355812321628e-04 - 4.999999999999999e-01 5.513862655620992e-05 1.155536642670245e-04 - 5.499999999999999e-01 8.918873554259306e-03 7.364539806451950e-05 - 6.000000000000000e-01 3.475277433850531e-02 1.915331682145610e-04 - 6.500000000000000e-01 7.502605966973638e-02 4.576681070362631e-04 - 7.000000000000001e-01 1.257964113977601e-01 8.457898377413064e-04 - 7.500000000000001e-01 1.820944185535271e-01 1.318767636581897e-03 - 8.000000000000002e-01 2.384087203852070e-01 1.828962145097535e-03 - 8.500000000000002e-01 2.892272171327287e-01 2.327446157641688e-03 - 9.000000000000002e-01 3.295754296203942e-01 2.765080717683888e-03 - 9.500000000000003e-01 3.555038632193712e-01 3.099435546668361e-03 - 1.000000000000000e+00 3.644741937247666e-01 3.297054597400817e-03 + 5.000000000000000e-02 3.551988422773351e-01 2.455482033533629e-03 + 1.000000000000000e-01 3.296234292363186e-01 2.897896070159778e-03 + 1.500000000000000e-01 2.894441908882201e-01 2.832303715537221e-03 + 2.000000000000000e-01 2.387114782162635e-01 2.525801964766261e-03 + 2.500000000000000e-01 1.824256478587985e-01 2.078269197756610e-03 + 3.000000000000000e-01 1.261168083661019e-01 1.580109403207297e-03 + 3.500000000000000e-01 7.529981277589509e-02 1.084790395311314e-03 + 4.000000000000000e-01 3.495180900127044e-02 6.472682226835030e-04 + 4.500000000000000e-01 9.023693954928847e-03 3.135810291332412e-04 + 4.999999999999999e-01 5.528701553701492e-05 1.158664422041093e-04 + 5.499999999999999e-01 8.918915917846342e-03 7.372606743541107e-05 + 6.000000000000000e-01 3.475275192986246e-02 1.914158585883952e-04 + 6.500000000000000e-01 7.502609251530372e-02 4.577116765183409e-04 + 7.000000000000001e-01 1.257965751119296e-01 8.461653253856172e-04 + 7.500000000000001e-01 1.820941861384917e-01 1.318095298729283e-03 + 8.000000000000002e-01 2.384093995726680e-01 1.830603288722976e-03 + 8.500000000000002e-01 2.892274536259308e-01 2.327914434912759e-03 + 9.000000000000002e-01 3.295751200296289e-01 2.764242715472154e-03 + 9.500000000000003e-01 3.555039203503529e-01 3.099492697821171e-03 + 1.000000000000000e+00 3.644737419510748e-01 3.296010382116465e-03 ----------------------------------------------------------------------- Final integrator statistics: - Steps = 201 - Step attempts = 225 - Error test fails = 24 - RHS evals = 1578 - NLS iters = 675 + Steps = 124 + Step attempts = 125 + Error test fails = 1 + RHS evals = 753 + NLS iters = 375 NLS fails = 0 - LS iters = 13075 - LS fails = 623 - LS setups = 82 - LS RHS evals = 13075 - Jv products = 13075 + LS iters = 12925 + LS fails = 36 + LS setups = 56 + LS RHS evals = 12925 + Jv products = 12925 Avg NLS iters per step attempt = 3.000000 - Avg LS iters per NLS iter = 19.370370 + Avg LS iters per NLS iter = 34.466667 - Preconditioner setups = 26 - Preconditioner solves = 13075 + Preconditioner setups = 4 + Preconditioner solves = 12925 - Max error = 3.297054597400817e-03 + Max error = 3.296010382116465e-03 diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp index f4b27d9bf8..b38e7ded64 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp @@ -363,6 +363,7 @@ int main(int argc, char* argv[]) 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 double t1 = 0.0; @@ -513,9 +514,16 @@ int main(int argc, char* argv[]) } else { - flag = ARKStepSetAdaptivityMethod(arkode_mem, udata->controller, SUNTRUE, - SUNFALSE, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + switch (udata->controller) { + case (ARK_ADAPT_PID): C = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): C = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): C = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): C = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): C = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): C = SUNAdaptController_ImExGus(ctx); break; + } + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; } // Specify linearly implicit non-time-dependent RHS @@ -630,6 +638,7 @@ int main(int argc, char* argv[]) N_VDestroy(u); // Free vectors FreeUserData(udata); // Free user data delete udata; + (void) SUNAdaptController_Destroy(C); // Free time adaptivity controller SUNContext_Free(&ctx); // Free context flag = MPI_Finalize(); // Finalize MPI return 0; diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls_--np_2_2.out b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls_--np_2_2.out index 995ecf1103..caced8662d 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls_--np_2_2.out +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls_--np_2_2.out @@ -39,33 +39,33 @@ t ||u||_rms max error ----------------------------------------------------------------------- 0.000000000000000e+00 3.691406249999997e-01 0.000000000000000e+00 - 5.000000000000000e-02 3.603048616851151e-01 5.947581797283163e-04 - 1.000000000000000e-01 3.341442212572840e-01 7.029487839260717e-04 - 1.500000000000000e-01 2.933129364211772e-01 6.872104501928211e-04 - 2.000000000000000e-01 2.418371827909151e-01 6.138967488541480e-04 - 2.500000000000000e-01 1.847632280527681e-01 5.043531323443151e-04 - 3.000000000000000e-01 1.276840002010777e-01 3.835930211336658e-04 - 3.500000000000000e-01 7.618719033675811e-02 2.636045435802092e-04 - 4.000000000000000e-01 3.531419593151618e-02 1.573064662659523e-04 - 4.500000000000000e-01 9.066519343283548e-03 7.648430090645419e-05 - 4.999999999999999e-01 1.366001184678036e-05 2.823151530294188e-05 - 5.499999999999999e-01 9.040623250818201e-03 1.797011524983308e-05 - 6.000000000000000e-01 3.526521493345149e-02 4.668317652109510e-05 - 6.500000000000000e-01 7.611978800433235e-02 1.113065341032948e-04 - 7.000000000000001e-01 1.276052139912309e-01 2.055078043680103e-04 - 7.500000000000001e-01 1.846816872673240e-01 3.198179447260197e-04 - 8.000000000000002e-01 2.417622665681260e-01 4.436012109942933e-04 - 8.500000000000002e-01 2.932595626602583e-01 5.646811622962433e-04 - 9.000000000000002e-01 3.341325736101829e-01 6.709854988270481e-04 - 9.500000000000003e-01 3.603805168277087e-01 7.524532455107646e-04 - 1.000000000000000e+00 3.694333172773836e-01 7.994041692465093e-04 + 5.000000000000000e-02 3.603048616826305e-01 5.947581725728179e-04 + 1.000000000000000e-01 3.341442212752840e-01 7.029488321168564e-04 + 1.500000000000000e-01 2.933129364265377e-01 6.872104657476008e-04 + 2.000000000000000e-01 2.418371828053933e-01 6.138967875570778e-04 + 2.500000000000000e-01 1.847632280574957e-01 5.043531454586581e-04 + 3.000000000000000e-01 1.276840002086280e-01 3.835930415112543e-04 + 3.500000000000000e-01 7.618719032747635e-02 2.636045188839364e-04 + 4.000000000000000e-01 3.531419592900913e-02 1.573064596348678e-04 + 4.500000000000000e-01 9.066519339379787e-03 7.648429036438351e-05 + 4.999999999999999e-01 1.366001182955177e-05 2.823151525618881e-05 + 5.499999999999999e-01 9.040623249804479e-03 1.797011257123962e-05 + 6.000000000000000e-01 3.526521493542883e-02 4.668318201425659e-05 + 6.500000000000000e-01 7.611978800168785e-02 1.113065272947134e-04 + 7.000000000000001e-01 1.276052139795591e-01 2.055077733625899e-04 + 7.500000000000001e-01 1.846816872915430e-01 3.198180091384950e-04 + 8.000000000000002e-01 2.417622665897318e-01 4.436012686822588e-04 + 8.500000000000002e-01 2.932595626759321e-01 5.646812043804683e-04 + 9.000000000000002e-01 3.341325736187308e-01 6.709855218931526e-04 + 9.500000000000003e-01 3.603805168237891e-01 7.524532351810276e-04 + 1.000000000000000e+00 3.694333172786589e-01 7.994041731159696e-04 ----------------------------------------------------------------------- Final integrator statistics: Steps = 134 Step attempts = 135 Error test fails = 1 - RHS evals = 948 + RHS evals = 813 NLS iters = 405 NLS fails = 0 LS iters = 2925 @@ -76,4 +76,4 @@ Final integrator statistics: Avg NLS iters per step attempt = 3.000000 Avg LS iters per NLS iter = 7.222222 - Max error = 7.994041692465093e-04 + Max error = 7.994041731159696e-04 diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp index b9468dfc3f..29c9a4d0ee 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp @@ -322,6 +322,7 @@ int main(int argc, char* argv[]) 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 double t1 = 0.0; @@ -516,9 +517,16 @@ int main(int argc, char* argv[]) } else { - flag = ARKStepSetAdaptivityMethod(arkode_mem, udata->controller, SUNTRUE, - SUNFALSE, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + switch (udata->controller) { + case (ARK_ADAPT_PID): C = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): C = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): C = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): C = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): C = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): C = SUNAdaptController_ImExGus(ctx); break; + } + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; } // Specify linearly implicit non-time-dependent RHS @@ -632,6 +640,7 @@ int main(int argc, char* argv[]) N_VDestroy(u); // Free vectors FreeUserData(udata); // Free user data delete udata; + (void) SUNAdaptController_Destroy(C); // Free timestep adaptivity controller SUNContext_Free(&ctx); // Free context flag = MPI_Finalize(); // Finalize MPI return 0; diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_--np_2_2.out b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_--np_2_2.out index 72c9868caa..3aa6089418 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_--np_2_2.out +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_--np_2_2.out @@ -40,33 +40,33 @@ t ||u||_rms max error ----------------------------------------------------------------------- 0.000000000000000e+00 3.691406249999997e-01 0.000000000000000e+00 - 5.000000000000000e-02 3.603048619327799e-01 5.947588761685552e-04 - 1.000000000000000e-01 3.341442198324603e-01 7.029449875427529e-04 - 1.500000000000000e-01 2.933129359408688e-01 6.872090865805980e-04 - 2.000000000000000e-01 2.418371816114719e-01 6.138936173949450e-04 - 2.500000000000000e-01 1.847632276987459e-01 5.043521686299290e-04 - 3.000000000000000e-01 1.276839996709629e-01 3.835916125021210e-04 - 3.500000000000000e-01 7.618719090432620e-02 2.636060692945696e-04 - 4.000000000000000e-01 3.531419605764338e-02 1.573068055824300e-04 - 4.500000000000000e-01 9.066519483453687e-03 7.648468362444691e-05 - 4.999999999999999e-01 1.366000934602030e-05 2.823150954460473e-05 - 5.499999999999999e-01 9.040623272556180e-03 1.797017413211754e-05 - 6.000000000000000e-01 3.526521486171871e-02 4.668298506418922e-05 - 6.500000000000000e-01 7.611978811657902e-02 1.113068278075224e-04 - 7.000000000000001e-01 1.276052146286863e-01 2.055095081313074e-04 - 7.500000000000001e-01 1.846816856478577e-01 3.198136633395521e-04 - 8.000000000000002e-01 2.417622647584950e-01 4.435963861751935e-04 - 8.500000000000002e-01 2.932595610245435e-01 5.646767564563282e-04 - 9.000000000000002e-01 3.341325725110011e-01 6.709825281477899e-04 - 9.500000000000003e-01 3.603805174370124e-01 7.524548362450867e-04 - 1.000000000000000e+00 3.694333171114552e-01 7.994036412738437e-04 + 5.000000000000000e-02 3.603048619753333e-01 5.947590016540660e-04 + 1.000000000000000e-01 3.341442195764323e-01 7.029443280297532e-04 + 1.500000000000000e-01 2.933129358633914e-01 6.872088817982958e-04 + 2.000000000000000e-01 2.418371813857269e-01 6.138930097124851e-04 + 2.500000000000000e-01 1.847632276239268e-01 5.043519623673109e-04 + 3.000000000000000e-01 1.276839995499893e-01 3.835912864304514e-04 + 3.500000000000000e-01 7.618719105489918e-02 2.636064591631515e-04 + 4.000000000000000e-01 3.531419609803035e-02 1.573069173000513e-04 + 4.500000000000000e-01 9.066519524079126e-03 7.648478735214695e-05 + 4.999999999999999e-01 1.366000892977262e-05 2.823150845772370e-05 + 5.499999999999999e-01 9.040623278407151e-03 1.797019017690110e-05 + 6.000000000000000e-01 3.526521486057654e-02 4.668298068317978e-05 + 6.500000000000000e-01 7.611978811031622e-02 1.113068150605245e-04 + 7.000000000000001e-01 1.276052145445968e-01 2.055092828922023e-04 + 7.500000000000001e-01 1.846816859443554e-01 3.198144283996229e-04 + 8.000000000000002e-01 2.417622651778854e-01 4.435975267760295e-04 + 8.500000000000002e-01 2.932595614654954e-01 5.646779628073473e-04 + 9.000000000000002e-01 3.341325728392148e-01 6.709834145076643e-04 + 9.500000000000003e-01 3.603805172400869e-01 7.524543311739906e-04 + 1.000000000000000e+00 3.694333171606730e-01 7.994038031826634e-04 ----------------------------------------------------------------------- Final integrator statistics: Steps = 134 Step attempts = 135 Error test fails = 1 - RHS evals = 948 + RHS evals = 813 NLS iters = 405 NLS fails = 0 LS iters = 2482 @@ -82,4 +82,4 @@ Final integrator statistics: Preconditioner solves = 2482 PFMG iters = 2482 - Max error = 7.994036412738437e-04 + Max error = 7.994038031826634e-04 diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex.cpp b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex.cpp index ecbd9b44c1..b550f9e607 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex.cpp +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex.cpp @@ -318,6 +318,7 @@ 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 + SUNAdaptController C = NULL; // Time adaptivity controller // Timing variables double t1 = 0.0; @@ -444,9 +445,16 @@ int main(int argc, char* argv[]) } else { - flag = ARKStepSetAdaptivityMethod(arkode_mem, udata.controller, SUNTRUE, - SUNFALSE, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + switch (udata.controller) { + case (ARK_ADAPT_PID): C = SUNAdaptController_PID(sunctx); break; + case (ARK_ADAPT_PI): C = SUNAdaptController_PI(sunctx); break; + case (ARK_ADAPT_I): C = SUNAdaptController_I(sunctx); break; + case (ARK_ADAPT_EXP_GUS): C = SUNAdaptController_ExpGus(sunctx); break; + case (ARK_ADAPT_IMP_GUS): C = SUNAdaptController_ImpGus(sunctx); break; + case (ARK_ADAPT_IMEX_GUS): C = SUNAdaptController_ImExGus(sunctx); break; + } + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; } // Specify linearly implicit non-time-dependent RHS @@ -538,6 +546,7 @@ int main(int argc, char* argv[]) SUNLinSolFree(LS); // Free linear solver N_VDestroy(u); // Free vectors FreeUserData(&udata); // Free user data + (void) SUNAdaptController_Destroy(C); // Free time adaptivity controller } // Finalize MPI diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex_--np_2_2.out b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex_--np_2_2.out index 370707799c..66fc95aae1 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex_--np_2_2.out +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex_--np_2_2.out @@ -40,15 +40,15 @@ t ||u||_rms ---------------------------------------------- 0.000000000000000e+00 3.691406249999997e-01 - 1.000000000000000e-01 5.162013648736323e-02 - 2.000000000000000e-01 7.426103375907699e-03 - 3.000000000000000e-01 1.067221964126028e-03 - 4.000000000000000e-01 1.533639279173463e-04 - 5.000000000000000e-01 2.203893657177772e-05 - 6.000000000000000e-01 3.167052399497521e-06 - 7.000000000000000e-01 4.550960415372650e-07 - 7.999999999999999e-01 6.537285820788082e-08 - 8.999999999999999e-01 9.413914309992992e-09 + 1.000000000000000e-01 5.162013561953564e-02 + 2.000000000000000e-01 7.426103216931702e-03 + 3.000000000000000e-01 1.067221955570474e-03 + 4.000000000000000e-01 1.533639242649863e-04 + 5.000000000000000e-01 2.203893152743892e-05 + 6.000000000000000e-01 3.167052161936452e-06 + 7.000000000000000e-01 4.550959197622963e-07 + 7.999999999999999e-01 6.537253782319481e-08 + 8.999999999999999e-01 9.573763963251624e-09 1.000000000000000e+00 1.326291426916513e-09 ---------------------------------------------- @@ -56,7 +56,7 @@ Final fast integrator statistics: Steps = 722 Step attempts = 722 Error test fails = 0 - RHS evals = 5445 + RHS evals = 5444 NLS iters = 2554 NLS fails = 0 LS iters = 8545 diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri.cpp b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri.cpp index 8b1d75c513..7445479282 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri.cpp +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri.cpp @@ -325,6 +325,7 @@ int main(int argc, char* argv[]) void *inner_arkode_mem = NULL; // ARKode memory structure MRIStepInnerStepper inner_stepper = NULL; // inner stepper MRIStepCoupling C = NULL; // slow coupling coefficients + SUNAdaptController Ctrl = NULL; // timestep adaptivity controller // Timing variables double t1 = 0.0; @@ -439,9 +440,16 @@ int main(int argc, char* argv[]) } else { - flag = ARKStepSetAdaptivityMethod(inner_arkode_mem, udata.controller, SUNTRUE, - SUNFALSE, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + switch (udata.controller) { + case (ARK_ADAPT_PID): Ctrl = SUNAdaptController_PID(sunctx); break; + case (ARK_ADAPT_PI): Ctrl = SUNAdaptController_PI(sunctx); break; + case (ARK_ADAPT_I): Ctrl = SUNAdaptController_I(sunctx); break; + case (ARK_ADAPT_EXP_GUS): Ctrl = SUNAdaptController_ExpGus(sunctx); break; + case (ARK_ADAPT_IMP_GUS): Ctrl = SUNAdaptController_ImpGus(sunctx); break; + case (ARK_ADAPT_IMEX_GUS): Ctrl = SUNAdaptController_ImExGus(sunctx); break; + } + flag = ARKStepSetAdaptController(inner_arkode_mem, Ctrl); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; } // Attach user data @@ -606,6 +614,7 @@ int main(int argc, char* argv[]) SUNLinSolFree(LSf); // Free linear solver N_VDestroy(u); // Free vectors FreeUserData(&udata); // Free user data + (void) SUNAdaptController_Destroy(Ctrl); // Free timestep adaptivity controller } // Finalize MPI diff --git a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri_--np_2_2.out b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri_--np_2_2.out index 0473af4ffa..5c1a518ea8 100644 --- a/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri_--np_2_2.out +++ b/examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri_--np_2_2.out @@ -42,21 +42,21 @@ t ||u||_rms ---------------------------------------------- 0.000000000000000e+00 3.691406249999997e-01 - 1.000000000000000e-01 5.162012484063394e-02 - 2.000000000000000e-01 7.426100623733855e-03 - 3.000000000000000e-01 1.067221389928324e-03 - 4.000000000000000e-01 1.533638122100311e-04 - 5.000000000000000e-01 2.203890106093356e-05 - 6.000000000000000e-01 3.167064486065304e-06 - 7.000000000000000e-01 4.551179117995729e-07 - 7.999999999999999e-01 6.540200053027528e-08 - 8.999999999999999e-01 9.398526428504205e-09 - 1.000000000000000e+00 1.350608973293624e-09 + 1.000000000000000e-01 5.162014241947240e-02 + 2.000000000000000e-01 7.426100187263422e-03 + 3.000000000000000e-01 1.067221316468460e-03 + 4.000000000000000e-01 1.533638016722887e-04 + 5.000000000000000e-01 2.203889954704845e-05 + 6.000000000000000e-01 3.167064268518253e-06 + 7.000000000000000e-01 4.551178805373316e-07 + 7.999999999999999e-01 6.540199603778498e-08 + 8.999999999999999e-01 9.398525782915539e-09 + 1.000000000000000e+00 1.350608880519736e-09 ---------------------------------------------- Final slow integrator statistics: Steps = 1000 - RHS evals = 7356 + RHS evals = 7355 NLS iters = 3355 NLS fails = 0 LS iters = 10603 @@ -74,7 +74,7 @@ Final fast integrator statistics: Steps = 3003 Step attempts = 3003 Error test fails = 0 - RHS evals = 33857 + RHS evals = 29862 NLS iters = 17842 NLS fails = 0 LS iters = 10048 diff --git a/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.cpp b/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.cpp index dfb312466b..cde3f49b41 100644 --- a/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.cpp +++ b/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.cpp @@ -185,6 +185,9 @@ int main(int argc, char* argv[]) SUNMatrix A = nullptr; SUNLinearSolver LS = nullptr; + // Adaptivity controller for DIRK, IMEX or MRI fast integrators + SUNAdaptController C = nullptr; + // Matrix and linear solver for MRI fast integrator SUNMatrix A_fast = nullptr; SUNLinearSolver LS_fast = nullptr; @@ -196,13 +199,13 @@ int main(int argc, char* argv[]) switch(uopts.integrator) { case(0): - flag = SetupERK(ctx, udata, uopts, y, &arkode_mem); + flag = SetupERK(ctx, udata, uopts, y, &C, &arkode_mem); break; case(1): - flag = SetupARK(ctx, udata, uopts, y, &A, &LS, &arkode_mem); + flag = SetupARK(ctx, udata, uopts, y, &A, &LS, &C, &arkode_mem); break; case(2): - flag = SetupMRIARK(ctx, udata, uopts, y, &A, &LS, &A_fast, &LS_fast, + flag = SetupMRIARK(ctx, udata, uopts, y, &A, &LS, &A_fast, &LS_fast, &C, &fast_mem, &arkode_mem); break; case(3): @@ -365,6 +368,7 @@ int main(int argc, char* argv[]) SUNLinSolFree(LS); SUNMatDestroy(A_fast); SUNLinSolFree(LS_fast); + (void) SUNAdaptController_Destroy(C); return 0; } @@ -376,7 +380,7 @@ int main(int argc, char* argv[]) int SetupERK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, - void** arkode_mem) + SUNAdaptController* C, void** arkode_mem) { // Problem configuration ARKRhsFn f_RHS; // explicit RHS function @@ -426,9 +430,16 @@ int SetupERK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, } else if (uopts.controller >= 0) { - flag = ERKStepSetAdaptivityMethod(*arkode_mem, uopts.controller, SUNTRUE, - SUNFALSE, nullptr); - if (check_flag(flag, "ERKStepSetAdaptivityMethod")) return 1; + switch (uopts.controller) { + case (ARK_ADAPT_PID): *C = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): *C = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): *C = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): *C = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): *C = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): *C = SUNAdaptController_ImExGus(ctx); break; + } + flag = ERKStepSetAdaptController(*arkode_mem, *C); + if (check_flag(flag, "ERKStepSetAdaptController")) return 1; } // Set max steps between outputs @@ -444,7 +455,7 @@ int SetupERK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, int SetupARK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, - SUNMatrix* A, SUNLinearSolver* LS, void** arkode_mem) + SUNMatrix* A, SUNLinearSolver* LS, SUNAdaptController* C, void** arkode_mem) { // Problem configuration ARKRhsFn fe_RHS; // explicit RHS function @@ -673,9 +684,16 @@ int SetupARK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, } else if (uopts.controller >= 0) { - flag = ARKStepSetAdaptivityMethod(*arkode_mem, uopts.controller, SUNTRUE, - SUNFALSE, nullptr); - if (check_flag(flag, "ARKStepSetAdaptivityMethod")) return 1; + switch (uopts.controller) { + case (ARK_ADAPT_PID): *C = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): *C = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): *C = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): *C = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): *C = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): *C = SUNAdaptController_ImExGus(ctx); break; + } + flag = ARKStepSetAdaptController(*arkode_mem, *C); + if (check_flag(flag, "ARKStepSetAdaptController")) return 1; } // Set max steps between outputs @@ -693,7 +711,8 @@ int SetupARK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, int SetupMRIARK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, SUNMatrix* A, SUNLinearSolver* LS, SUNMatrix* A_fast, SUNLinearSolver* LS_fast, - MRIStepInnerStepper* fast_mem, void** arkode_mem) + SUNAdaptController* C, MRIStepInnerStepper* fast_mem, + void** arkode_mem) { // Problem configuration ARKRhsFn fse_RHS; // slow explicit RHS function @@ -805,9 +824,16 @@ int SetupMRIARK(SUNContext ctx, UserData &udata, UserOptions &uopts, } else if (uopts.controller_fast >= 0) { - flag = ARKStepSetAdaptivityMethod(fast_arkode_mem, uopts.controller_fast, - SUNTRUE, SUNFALSE, nullptr); - if (check_flag(flag, "ARKStepSetAdaptivityMethod")) return 1; + switch (uopts.controller_fast) { + case (ARK_ADAPT_PID): *C = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): *C = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): *C = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): *C = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): *C = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): *C = SUNAdaptController_ImExGus(ctx); break; + } + flag = ARKStepSetAdaptController(fast_arkode_mem, *C); + if (check_flag(flag, "ARKStepSetAdaptController")) return 1; } // Set max steps between outputs diff --git a/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.hpp b/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.hpp index f4c2a56146..f72f53b066 100644 --- a/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.hpp +++ b/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.hpp @@ -248,14 +248,14 @@ int J_adv_diff_react(realtype t, N_Vector y, N_Vector fy, SUNMatrix J, // Integrator setup functions int SetupERK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, - void** arkode_mem); + SUNAdaptController* C, void** arkode_mem); int SetupARK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, - SUNMatrix* A, SUNLinearSolver* LS, void** arkode_mem); + SUNMatrix* A, SUNLinearSolver* LS, SUNAdaptController* C, void** arkode_mem); int SetupMRIARK(SUNContext ctx, UserData &udata, UserOptions &uopts, N_Vector y, SUNMatrix* A, SUNLinearSolver* LS, - SUNMatrix* A_fast, SUNLinearSolver* LS_fast, + SUNMatrix* A_fast, SUNLinearSolver* LS_fast, SUNAdaptController* C_fast, MRIStepInnerStepper* fast_mem, void** arkode_mem); int SetupMRICVODE(SUNContext ctx, UserData &udata, UserOptions &uopts, diff --git a/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.out b/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.out index 06a9c9284d..ea8c1ea7d6 100644 --- a/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.out +++ b/examples/arkode/CXX_serial/ark_advection_diffusion_reaction.out @@ -31,15 +31,15 @@ Problem parameters and options: t ||y||_rms ---------------------------------------------- 0.000000000000000e+00 4.029895706298216e+00 - 3.000000000000000e-01 3.942279347418077e+00 - 6.000000000000000e-01 3.877431469116385e+00 - 8.999999999999999e-01 3.793649083180712e+00 - 1.200000000000000e+00 3.689067746332020e+00 - 1.500000000000000e+00 3.567028985343041e+00 - 1.800000000000000e+00 3.439281992076554e+00 - 2.100000000000000e+00 3.320144385200880e+00 - 2.400000000000000e+00 3.219721039168443e+00 - 2.700000000000000e+00 3.146930769180139e+00 + 3.000000000000000e-01 3.942280121135499e+00 + 6.000000000000000e-01 3.877434662389668e+00 + 8.999999999999999e-01 3.793654006700049e+00 + 1.200000000000000e+00 3.689067718768748e+00 + 1.500000000000000e+00 3.567028830880791e+00 + 1.800000000000000e+00 3.439281683889970e+00 + 2.100000000000000e+00 3.320143971224290e+00 + 2.400000000000000e+00 3.219720187221883e+00 + 2.700000000000000e+00 3.146931515115551e+00 3.000000000000000e+00 3.110922385062612e+00 ---------------------------------------------- @@ -47,8 +47,8 @@ Final integrator statistics: Steps = 23 Step attempts = 24 Error test fails = 0 - Explicit RHS evals = 96 - Implicit RHS evals = 288 + Explicit RHS evals = 94 + Implicit RHS evals = 286 NLS iters = 192 NLS fails = 7 LS setups = 16 diff --git a/examples/arkode/CXX_serial/ark_heat2D.cpp b/examples/arkode/CXX_serial/ark_heat2D.cpp index 3a78042a25..60c5748b82 100644 --- a/examples/arkode/CXX_serial/ark_heat2D.cpp +++ b/examples/arkode/CXX_serial/ark_heat2D.cpp @@ -207,6 +207,7 @@ 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 + SUNAdaptController C = NULL; // Adaptivity controller FILE *diagfp = NULL; // diagnostics output file // Timing variables @@ -371,9 +372,16 @@ int main(int argc, char* argv[]) } else { - flag = ARKStepSetAdaptivityMethod(arkode_mem, udata->controller, SUNTRUE, - SUNFALSE, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + switch (udata->controller) { + case (ARK_ADAPT_PID): C = SUNAdaptController_PID(ctx); break; + case (ARK_ADAPT_PI): C = SUNAdaptController_PI(ctx); break; + case (ARK_ADAPT_I): C = SUNAdaptController_I(ctx); break; + case (ARK_ADAPT_EXP_GUS): C = SUNAdaptController_ExpGus(ctx); break; + case (ARK_ADAPT_IMP_GUS): C = SUNAdaptController_ImpGus(ctx); break; + case (ARK_ADAPT_IMEX_GUS): C = SUNAdaptController_ImExGus(ctx); break; + } + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; } // Specify linearly implicit non-time-dependent RHS @@ -484,6 +492,7 @@ int main(int argc, char* argv[]) N_VDestroy(u); // Free vectors FreeUserData(udata); // Free user data delete udata; + (void) SUNAdaptController_Destroy(C); // Free time adaptivity controller SUNContext_Free(&ctx); // Free context return 0; @@ -691,7 +700,7 @@ static int InitUserData(UserData *udata) 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->liniters = 40; // max linear iterations udata->msbp = 0; // use default (20 steps) udata->epslin = ZERO; // use default (0.05) diff --git a/examples/arkode/CXX_serial/ark_heat2D.out b/examples/arkode/CXX_serial/ark_heat2D.out index 78a569fc79..07fbd3c159 100644 --- a/examples/arkode/CXX_serial/ark_heat2D.out +++ b/examples/arkode/CXX_serial/ark_heat2D.out @@ -20,7 +20,7 @@ linear = 1 --------------------------------- linear solver = PCG - lin iters = 20 + lin iters = 40 eps lin = 0 prec = 1 msbp = 0 @@ -31,45 +31,45 @@ t ||u||_rms max error ----------------------------------------------------------------------- 0.000000000000000e+00 3.632812500000000e-01 0.000000000000000e+00 - 5.000000000000000e-02 3.551986506970737e-01 2.454708334354683e-03 - 1.000000000000000e-01 3.296221524496879e-01 2.894333980192343e-03 - 1.500000000000000e-01 2.894444182004682e-01 2.832987149069655e-03 - 2.000000000000000e-01 2.387098264599945e-01 2.521582136275402e-03 - 2.500000000000000e-01 1.824252212041233e-01 2.077346466104524e-03 - 3.000000000000000e-01 1.261157381228246e-01 1.577424243514536e-03 - 3.500000000000000e-01 7.529904383258686e-02 1.082876471873273e-03 - 4.000000000000000e-01 3.495155701826252e-02 6.467375369675482e-04 - 4.500000000000000e-01 9.023496104529438e-03 3.131515037812990e-04 - 4.999999999999999e-01 5.514776992824374e-05 1.155729556710013e-04 - 5.499999999999999e-01 8.918881510806801e-03 7.366549900058444e-05 - 6.000000000000000e-01 3.475274602119641e-02 1.914543241995081e-04 - 6.500000000000000e-01 7.502608870114677e-02 4.577447220200370e-04 - 7.000000000000001e-01 1.257965457940830e-01 8.461313384890978e-04 - 7.500000000000001e-01 1.820944007923683e-01 1.318710942714962e-03 - 8.000000000000002e-01 2.384087154352889e-01 1.828963073706169e-03 - 8.500000000000002e-01 2.892273973706390e-01 2.327791690218795e-03 - 9.000000000000002e-01 3.295756160298886e-01 2.765521979463892e-03 - 9.500000000000003e-01 3.555038689873394e-01 3.099441273207049e-03 - 1.000000000000000e+00 3.644742066608401e-01 3.297074883238493e-03 + 5.000000000000000e-02 3.551988422792973e-01 2.455482048598578e-03 + 1.000000000000000e-01 3.296234292110422e-01 2.897895995286115e-03 + 1.500000000000000e-01 2.894441909302122e-01 2.832303854545248e-03 + 2.000000000000000e-01 2.387114783517686e-01 2.525802321085235e-03 + 2.500000000000000e-01 1.824256479734333e-01 2.078269488693274e-03 + 3.000000000000000e-01 1.261168083293890e-01 1.580109287144749e-03 + 3.500000000000000e-01 7.529981275357446e-02 1.084790334542951e-03 + 4.000000000000000e-01 3.495180902992235e-02 6.472683008614116e-04 + 4.500000000000000e-01 9.023693952669724e-03 3.135810223303982e-04 + 4.999999999999999e-01 5.528701552159280e-05 1.158664421454541e-04 + 5.499999999999999e-01 8.918915918112386e-03 7.372606746483198e-05 + 6.000000000000000e-01 3.475275193284167e-02 1.914158675670324e-04 + 6.500000000000000e-01 7.502609250656343e-02 4.577116535290637e-04 + 7.000000000000001e-01 1.257965751177328e-01 8.461653470575592e-04 + 7.500000000000001e-01 1.820941861469086e-01 1.318095315867573e-03 + 8.000000000000002e-01 2.384093995809592e-01 1.830603315116197e-03 + 8.500000000000002e-01 2.892274536079913e-01 2.327914393411401e-03 + 9.000000000000002e-01 3.295751199857850e-01 2.764242599605837e-03 + 9.500000000000003e-01 3.555039203642584e-01 3.099492771073020e-03 + 1.000000000000000e+00 3.644737419562301e-01 3.296010393803339e-03 ----------------------------------------------------------------------- Final integrator statistics: - Steps = 198 - Step attempts = 220 - Error test fails = 22 - RHS evals = 1543 - NLS iters = 660 + Steps = 124 + Step attempts = 125 + Error test fails = 1 + RHS evals = 753 + NLS iters = 375 NLS fails = 0 - LS iters = 12758 - LS fails = 609 - LS setups = 77 - LS RHS evals = 12758 - Jv products = 12758 + LS iters = 12926 + LS fails = 37 + LS setups = 56 + LS RHS evals = 12926 + Jv products = 12926 Avg NLS iters per step attempt = 3.000000 - Avg LS iters per NLS iter = 19.330303 + Avg LS iters per NLS iter = 34.469333 - Preconditioner setups = 24 - Preconditioner solves = 12758 + Preconditioner setups = 4 + Preconditioner solves = 12926 - Max error = 3.297074883238493e-03 + Max error = 3.296010393803339e-03 diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt.cpp b/examples/arkode/CXX_serial/ark_kpr_Mt.cpp index 53a6e56ec5..83e549c031 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt.cpp +++ b/examples/arkode/CXX_serial/ark_kpr_Mt.cpp @@ -631,6 +631,8 @@ static int check_order(void *arkode_mem, N_Vector y, realtype T0, if (check_retval(&retval, "ARKStepSetLSetupFrequency", 1)) return 1; retval = ARKStepSetMaxNonlinIters(arkode_mem, 20); if (check_retval(&retval, "ARKStepSetMaxNonlinIters", 1)) return 1; + retval = ARKStepSetNonlinConvCoef(arkode_mem, SUN_RCONST(0.01)); + if (check_retval(&retval, "ARKStepSetNonlinConvCoef", 1)) return 1; } // Set array of fixed step sizes to use, storage for corresponding errors/orders diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_0_-4.out b/examples/arkode/CXX_serial/ark_kpr_Mt_0_-4.out index 28232c62c7..8a2bebd177 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_0_-4.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_0_-4.out @@ -16,8 +16,8 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: h = 1.250e-01, error = 1.367e-05, order = 1.54 h = 6.250e-02, error = 3.085e-06, order = 2.15 h = 3.125e-02, error = 4.714e-07, order = 2.71 - h = 1.562e-02, error = 5.336e-08, order = 3.14 - h = 7.812e-03, error = 4.819e-09, order = 3.47 - h = 3.906e-03, error = 3.726e-10, order = 3.69 + h = 1.562e-02, error = 5.337e-08, order = 3.14 + h = 7.812e-03, error = 4.828e-09, order = 3.47 + h = 3.906e-03, error = 3.726e-10, order = 3.70 ----------------------------------------------------- - Order: max = 3.69, avg = 2.53, overall = 2.57 [SUCCESS] + Order: max = 3.70, avg = 2.53, overall = 2.57 [SUCCESS] diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_0_3_0_-10_0.out b/examples/arkode/CXX_serial/ark_kpr_Mt_0_3_0_-10_0.out index f38ae7c147..e3c31815e3 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_0_3_0_-10_0.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_0_3_0_-10_0.out @@ -12,117 +12,117 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: t u v uerr verr ------------------------------------------------------ -3.000000 0.710636 1.363407 0.00e+00 0.00e+00 - -2.900000 0.717671 1.324640 3.70e-04 2.29e-03 - -2.800000 0.727992 1.287515 7.44e-04 2.84e-03 - -2.700000 0.741092 1.251460 8.46e-04 2.58e-03 - -2.600000 0.757028 1.216006 1.01e-03 2.39e-03 - -2.500000 0.775576 1.181098 1.35e-03 2.76e-03 - -2.400000 0.795610 1.149093 1.06e-03 1.79e-03 - -2.300000 0.818403 1.117287 1.79e-03 2.67e-03 - -2.200000 0.842494 1.088504 2.40e-03 3.06e-03 - -2.100000 0.867789 1.062951 3.16e-03 3.25e-03 - -2.000000 0.890243 1.044103 3.40e-04 2.64e-04 - -1.900000 0.918743 1.024377 3.13e-03 2.12e-03 - -1.800000 0.944502 1.011651 3.01e-03 1.34e-03 - -1.700000 0.967983 1.003922 7.30e-04 2.37e-04 - -1.600000 0.996105 0.999928 3.43e-03 2.85e-04 - -1.500000 1.019955 1.001656 2.42e-03 4.05e-04 - -1.400000 1.043204 1.007716 1.58e-03 4.68e-04 - -1.300000 1.068074 1.019878 3.30e-03 1.82e-03 - -1.200000 1.088381 1.034712 1.56e-03 1.29e-03 - -1.100000 1.109643 1.054948 2.03e-03 1.96e-03 - -1.000000 1.129780 1.079804 2.77e-03 3.45e-03 - -0.900000 1.145536 1.104049 6.32e-04 1.02e-03 - -0.800000 1.163216 1.136066 2.03e-03 3.53e-03 - -0.700000 1.177736 1.168573 1.97e-03 4.19e-03 - -0.600000 1.188627 1.198295 7.04e-05 2.31e-04 - -0.500000 1.201096 1.237762 1.60e-03 4.65e-03 - -0.400000 1.209605 1.273093 1.08e-03 4.01e-03 - -0.300000 1.215977 1.307261 3.83e-04 1.70e-03 - -0.200000 1.221524 1.347217 8.55e-04 5.08e-03 - -0.100000 1.224023 1.381573 2.99e-04 3.11e-03 - 0.000000 1.224915 1.417046 1.70e-04 2.83e-03 - 0.100000 1.223682 1.453905 4.31e-05 4.83e-03 - 0.200000 1.220491 1.484604 1.78e-04 1.81e-03 - 0.300000 1.215142 1.518474 4.52e-04 3.38e-03 - 0.400000 1.207613 1.549792 9.12e-04 4.02e-03 - 0.500000 1.199317 1.575083 1.79e-04 4.64e-04 - 0.600000 1.187241 1.604738 1.32e-03 3.29e-03 - 0.700000 1.174195 1.628977 1.57e-03 2.87e-03 - 0.800000 1.160798 1.649024 3.88e-04 5.83e-04 - 0.900000 1.142674 1.670977 2.23e-03 2.65e-03 - 1.000000 1.125149 1.687306 1.86e-03 1.64e-03 - 1.100000 1.106375 1.701281 1.23e-03 9.26e-04 - 1.200000 1.083821 1.713934 3.00e-03 1.61e-03 - 1.300000 1.063098 1.722088 1.68e-03 5.89e-04 - 1.400000 1.039432 1.728436 2.19e-03 5.91e-04 - 1.500000 1.014086 1.731733 3.44e-03 4.05e-04 - 1.600000 0.991678 1.731904 9.96e-04 2.36e-05 - 1.700000 0.961426 1.728911 5.83e-03 7.32e-04 - 1.800000 0.935542 1.723129 5.95e-03 1.36e-03 - 1.900000 0.909675 1.714513 5.94e-03 1.97e-03 - 2.000000 0.884086 1.703125 5.82e-03 2.54e-03 - 2.100000 0.859058 1.689043 5.57e-03 3.06e-03 - 2.200000 0.835574 1.672856 4.52e-03 3.00e-03 - 2.300000 0.814580 1.655404 2.04e-03 1.61e-03 - 2.400000 0.792171 1.633239 2.37e-03 2.45e-03 - 2.500000 0.771823 1.609184 2.40e-03 2.79e-03 - 2.600000 0.753719 1.582648 2.29e-03 3.38e-03 - 2.700000 0.739155 1.555902 1.09e-03 2.10e-03 - 2.800000 0.726876 1.527066 3.71e-04 1.00e-03 - 2.900000 0.717091 1.495571 2.10e-04 8.41e-04 - 3.000000 0.710388 1.461718 2.48e-04 1.54e-03 - 3.100000 0.707227 1.426224 1.85e-04 2.62e-03 - 3.200000 0.707774 1.389871 6.43e-05 3.55e-03 - 3.300000 0.711937 1.353272 4.17e-04 4.02e-03 - 3.400000 0.719482 1.316831 7.32e-04 3.95e-03 - 3.500000 0.730101 1.280910 8.74e-04 3.31e-03 - 3.600000 0.743437 1.245871 7.25e-04 2.12e-03 - 3.700000 0.759104 1.212075 1.91e-04 4.28e-04 - 3.800000 0.778229 1.176840 7.22e-04 1.35e-03 - 3.900000 0.799673 1.143027 1.53e-03 2.50e-03 - 4.000000 0.822611 1.111958 2.14e-03 3.03e-03 - 4.100000 0.846613 1.084064 2.46e-03 3.01e-03 - 4.200000 0.872616 1.058537 3.78e-03 3.74e-03 - 4.300000 0.896759 1.038903 2.56e-03 2.17e-03 - 4.400000 0.922654 1.022357 2.69e-03 1.56e-03 - 4.500000 0.949804 1.009423 3.97e-03 1.75e-03 - 4.600000 0.971677 1.003131 1.20e-04 1.84e-05 - 4.700000 1.000881 0.999978 3.98e-03 6.03e-05 - 4.800000 1.024123 1.002244 2.48e-03 3.28e-04 - 4.900000 1.048218 1.009872 2.63e-03 1.14e-03 - 5.000000 1.072193 1.022451 3.63e-03 2.12e-03 - 5.100000 1.090618 1.036650 2.10e-04 2.21e-04 - 5.200000 1.114344 1.060263 3.37e-03 3.60e-03 - 5.300000 1.132066 1.083037 1.94e-03 2.42e-03 - 5.400000 1.149808 1.111129 2.05e-03 3.32e-03 - 5.500000 1.166384 1.142517 2.62e-03 4.77e-03 - 5.600000 1.178247 1.170493 2.05e-04 5.64e-04 - 5.700000 1.192675 1.209460 2.15e-03 5.58e-03 - 5.800000 1.202249 1.242415 1.10e-03 3.30e-03 - 5.900000 1.210920 1.279453 1.07e-03 4.26e-03 - 6.000000 1.217779 1.317297 1.19e-03 5.59e-03 - 6.100000 1.221394 1.349080 6.94e-05 8.08e-04 - 6.200000 1.224584 1.390348 5.45e-04 5.82e-03 - 6.300000 1.224861 1.423309 1.45e-04 3.16e-03 - 6.400000 1.223197 1.458922 1.55e-04 4.09e-03 - 6.500000 1.219541 1.493333 4.15e-04 5.01e-03 - 6.600000 1.214349 1.521229 1.94e-04 8.53e-04 - 6.700000 1.205961 1.555583 1.18e-03 4.82e-03 - 6.800000 1.197025 1.581689 7.64e-04 2.41e-03 - 6.900000 1.185091 1.608881 1.44e-03 3.13e-03 - 7.000000 1.171483 1.633589 1.95e-03 3.56e-03 + -2.900000 0.717316 1.326932 1.47e-05 9.30e-07 + -2.800000 0.727263 1.290352 1.55e-05 1.41e-06 + -2.700000 0.740260 1.254041 1.37e-05 9.10e-07 + -2.600000 0.756026 1.218399 1.32e-05 1.28e-06 + -2.500000 0.774239 1.183861 1.16e-05 8.00e-07 + -2.400000 0.794556 1.150884 9.86e-06 9.51e-07 + -2.300000 0.816624 1.119952 8.14e-06 5.76e-07 + -2.200000 0.840096 1.091559 7.49e-06 1.29e-06 + -2.100000 0.864636 1.066203 1.09e-05 9.87e-07 + -2.000000 0.889911 1.044366 8.52e-06 1.42e-06 + -1.900000 0.915620 1.026500 2.77e-06 1.52e-06 + -1.800000 0.941486 1.012993 1.33e-06 1.21e-06 + -1.700000 0.967247 1.004162 5.58e-06 2.92e-06 + -1.600000 0.992663 1.000217 1.08e-05 3.99e-06 + -1.500000 1.017517 1.001257 1.39e-05 5.41e-06 + -1.400000 1.041608 1.007254 1.72e-05 5.39e-06 + -1.300000 1.064756 1.018066 2.11e-05 7.67e-06 + -1.200000 1.086799 1.033429 2.13e-05 6.93e-06 + -1.100000 1.107583 1.053000 2.60e-05 8.00e-06 + -1.000000 1.126983 1.076359 2.70e-05 9.49e-06 + -0.900000 1.144876 1.103036 2.80e-05 7.01e-06 + -0.800000 1.161155 1.132548 3.11e-05 9.47e-06 + -0.700000 1.175735 1.164388 2.88e-05 7.11e-06 + -0.600000 1.188524 1.198072 3.31e-05 7.78e-06 + -0.500000 1.199463 1.233124 3.29e-05 8.30e-06 + -0.400000 1.208491 1.269093 3.27e-05 5.77e-06 + -0.300000 1.215559 1.305564 3.51e-05 7.20e-06 + -0.200000 1.220638 1.342141 3.14e-05 4.88e-06 + -0.100000 1.223689 1.378471 3.53e-05 5.22e-06 + 0.000000 1.224711 1.414219 3.42e-05 5.14e-06 + 0.100000 1.223691 1.449083 3.33e-05 3.29e-06 + 0.200000 1.220634 1.482795 3.50e-05 3.94e-06 + 0.300000 1.215563 1.515100 3.04e-05 2.14e-06 + 0.400000 1.208490 1.545777 3.36e-05 2.28e-06 + 0.500000 1.199464 1.574621 3.18e-05 2.03e-06 + 0.600000 1.188527 1.601451 3.02e-05 1.01e-06 + 0.700000 1.175733 1.626106 3.09e-05 1.39e-06 + 0.800000 1.161160 1.648441 2.58e-05 1.18e-07 + 0.900000 1.144876 1.668331 2.78e-05 4.44e-08 + 1.000000 1.126984 1.685666 2.53e-05 3.97e-07 + 1.100000 1.107586 1.700354 2.29e-05 1.20e-06 + 1.200000 1.086798 1.712318 2.23e-05 1.40e-06 + 1.300000 1.064760 1.721497 1.71e-05 2.15e-06 + 1.400000 1.041608 1.727843 1.70e-05 2.44e-06 + 1.500000 1.017517 1.731325 1.39e-05 2.90e-06 + 1.600000 0.992663 1.731924 1.02e-05 3.31e-06 + 1.700000 0.967239 1.729638 1.35e-05 4.84e-06 + 1.800000 0.941479 1.724478 8.60e-06 7.09e-06 + 1.900000 0.915621 1.716469 3.16e-06 9.53e-06 + 2.000000 0.889921 1.705654 1.84e-05 1.20e-05 + 2.100000 0.864659 1.692088 3.40e-05 1.40e-05 + 2.200000 0.840134 1.675842 4.55e-05 1.50e-05 + 2.300000 0.816667 1.657002 5.04e-05 1.46e-05 + 2.400000 0.794592 1.635671 4.58e-05 1.29e-05 + 2.500000 0.774269 1.611965 4.20e-05 1.31e-05 + 2.600000 0.756048 1.586022 3.55e-05 1.15e-05 + 2.700000 0.740280 1.557994 3.41e-05 1.07e-05 + 2.800000 0.727280 1.528057 3.23e-05 1.03e-05 + 2.900000 0.717332 1.496403 3.06e-05 9.62e-06 + 3.000000 0.710665 1.463248 2.89e-05 8.97e-06 + 3.100000 0.707440 1.428831 2.71e-05 8.29e-06 + 3.200000 0.707734 1.393415 2.51e-05 7.67e-06 + 3.300000 0.711545 1.357289 2.59e-05 7.84e-06 + 3.400000 0.718776 1.320772 2.60e-05 7.74e-06 + 3.500000 0.729252 1.284211 2.51e-05 7.39e-06 + 3.600000 0.742735 1.247983 2.31e-05 6.80e-06 + 3.700000 0.758934 1.212497 2.04e-05 6.03e-06 + 3.800000 0.777524 1.178189 1.72e-05 5.18e-06 + 3.900000 0.798158 1.145523 1.38e-05 4.36e-06 + 4.000000 0.820485 1.114984 1.07e-05 3.81e-06 + 4.100000 0.844158 1.087067 8.91e-06 4.05e-06 + 4.200000 0.868842 1.062267 9.49e-06 5.94e-06 + 4.300000 0.894213 1.041069 8.96e-06 4.31e-06 + 4.400000 0.919966 1.023913 2.07e-06 3.47e-07 + 4.500000 0.945831 1.011172 3.41e-06 8.05e-07 + 4.600000 0.971546 1.003152 1.12e-05 2.18e-06 + 4.700000 0.996883 1.000042 1.55e-05 3.97e-06 + 4.800000 1.021617 1.001922 2.33e-05 6.45e-06 + 4.900000 1.045562 1.008742 2.69e-05 6.55e-06 + 5.000000 1.068534 1.020341 3.13e-05 1.03e-05 + 5.100000 1.090371 1.036440 3.70e-05 1.06e-05 + 5.200000 1.110937 1.056675 3.46e-05 8.26e-06 + 5.300000 1.130084 1.080630 4.28e-05 1.37e-05 + 5.400000 1.147713 1.107817 4.42e-05 1.06e-05 + 5.500000 1.163715 1.137755 4.38e-05 1.22e-05 + 5.600000 1.177993 1.169941 4.89e-05 1.25e-05 + 5.700000 1.190483 1.203883 4.46e-05 8.51e-06 + 5.800000 1.201100 1.239124 4.97e-05 1.20e-05 + 5.900000 1.209801 1.275204 4.99e-05 8.96e-06 + 6.000000 1.216540 1.311719 4.73e-05 8.93e-06 + 6.100000 1.221273 1.348281 5.21e-05 8.85e-06 + 6.200000 1.223992 1.384531 4.65e-05 5.55e-06 + 6.300000 1.224665 1.420153 5.12e-05 7.47e-06 + 6.400000 1.223303 1.454842 5.01e-05 5.07e-06 + 6.500000 1.219909 1.488333 4.71e-05 4.73e-06 + 6.600000 1.214493 1.520380 5.05e-05 4.31e-06 + 6.700000 1.207098 1.550760 4.38e-05 1.96e-06 + 6.800000 1.197742 1.579279 4.76e-05 2.86e-06 + 6.900000 1.186489 1.605753 4.51e-05 1.14e-06 + 7.000000 1.173394 1.630027 4.15e-05 6.93e-07 ------------------------------------------------------ Final Solver Statistics: - Internal solver steps = 168 (attempted = 168) + Internal solver steps = 167 (attempted = 167) Total number of error test failures = 0 - Total RHS evals: Fe = 675, Fi = 1698 - Total mass matrix setups = 508 - Total mass matrix solves = 1515 - Total mass times evals = 1191 - Total number of Jacobian evaluations = 18 + Total RHS evals: Fe = 671, Fi = 1763 + Total mass matrix setups = 504 + Total mass matrix solves = 1340 + Total mass times evals = 1259 + Total number of Jacobian evaluations = 7 Total linear solver setups = 18 - Total number of Nonlinear iterations = 1023 + Total number of Nonlinear iterations = 1092 Total number of Nonlinear convergence failures = 5 - Errors: u = 0.00224481, v = 0.0027708, total = 0.00252156 + Errors: u = 3.02996e-05, v = 6.97389e-06, total = 2.19852e-05 diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_0_-10_0_10_1.out b/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_0_-10_0_10_1.out index 0966765b36..25d972ace0 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_0_-10_0_10_1.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_0_-10_0_10_1.out @@ -12,117 +12,117 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: t u v uerr verr ------------------------------------------------------ -3.000000 0.710636 1.363407 0.00e+00 0.00e+00 - -2.900000 0.717019 1.329852 2.82e-04 2.92e-03 - -2.800000 0.727128 1.291781 1.19e-04 1.43e-03 - -2.700000 0.740964 1.252385 7.18e-04 1.66e-03 - -2.600000 0.756983 1.216059 9.70e-04 2.34e-03 - -2.500000 0.773350 1.185766 8.78e-04 1.90e-03 - -2.400000 0.793611 1.152873 9.34e-04 1.99e-03 - -2.300000 0.817253 1.119332 6.37e-04 6.21e-04 - -2.200000 0.841717 1.089568 1.63e-03 1.99e-03 - -2.100000 0.864011 1.066886 6.14e-04 6.82e-04 - -2.000000 0.892474 1.042263 2.57e-03 2.10e-03 - -1.900000 0.917602 1.025755 1.98e-03 7.44e-04 - -1.800000 0.937390 1.016647 4.10e-03 3.65e-03 - -1.700000 0.971792 1.003765 4.54e-03 3.94e-04 - -1.600000 0.989541 1.001911 3.13e-03 1.70e-03 - -1.500000 1.020109 1.001600 2.58e-03 3.48e-04 - -1.400000 1.041436 1.008886 1.89e-04 1.64e-03 - -1.300000 1.062303 1.017039 2.47e-03 1.02e-03 - -1.200000 1.089683 1.036317 2.86e-03 2.90e-03 - -1.100000 1.105577 1.052294 2.03e-03 6.98e-04 - -1.000000 1.126083 1.075316 9.26e-04 1.03e-03 - -0.900000 1.147001 1.106761 2.10e-03 3.73e-03 - -0.800000 1.159860 1.131459 1.33e-03 1.08e-03 - -0.700000 1.174024 1.161179 1.74e-03 3.20e-03 - -0.600000 1.190189 1.202272 1.63e-03 4.21e-03 - -0.500000 1.199459 1.234387 3.74e-05 1.27e-03 - -0.400000 1.206986 1.264980 1.54e-03 4.11e-03 - -0.300000 1.215711 1.306063 1.17e-04 5.06e-04 - -0.200000 1.221127 1.346177 4.58e-04 4.04e-03 - -0.100000 1.223082 1.376940 6.43e-04 1.53e-03 - 0.000000 1.224285 1.409999 4.59e-04 4.21e-03 - 0.100000 1.223699 1.452499 2.62e-05 3.42e-03 - 0.200000 1.220132 1.484766 5.37e-04 1.98e-03 - 0.300000 1.215566 1.511788 2.80e-05 3.31e-03 - 0.400000 1.208854 1.543863 3.30e-04 1.91e-03 - 0.500000 1.198305 1.577949 1.19e-03 3.33e-03 - 0.600000 1.188064 1.601091 4.93e-04 3.59e-04 - 0.700000 1.177002 1.622831 1.24e-03 3.27e-03 - 0.800000 1.160467 1.649540 7.19e-04 1.10e-03 - 0.900000 1.143024 1.669900 1.88e-03 1.57e-03 - 1.000000 1.127703 1.684083 6.93e-04 1.58e-03 - 1.100000 1.109563 1.698647 1.95e-03 1.71e-03 - 1.200000 1.084375 1.713548 2.45e-03 1.23e-03 - 1.300000 1.063451 1.721352 1.33e-03 1.47e-04 - 1.400000 1.043958 1.726670 2.33e-03 1.18e-03 - 1.500000 1.018212 1.731200 6.81e-04 1.28e-04 - 1.600000 0.989541 1.731687 3.13e-03 2.41e-04 - 1.700000 0.967594 1.729038 3.42e-04 6.05e-04 - 1.800000 0.945779 1.724938 4.29e-03 4.53e-04 - 1.900000 0.913122 1.714408 2.50e-03 2.07e-03 - 2.000000 0.892727 1.706653 2.82e-03 9.87e-04 - 2.100000 0.863079 1.690005 1.55e-03 2.10e-03 - 2.200000 0.842837 1.677421 2.75e-03 1.56e-03 - 2.300000 0.813660 1.654059 2.96e-03 2.96e-03 - 2.400000 0.796357 1.636543 1.81e-03 8.59e-04 - 2.500000 0.776495 1.614269 2.27e-03 2.29e-03 - 2.600000 0.754401 1.583710 1.61e-03 2.32e-03 - 2.700000 0.738886 1.554989 1.36e-03 3.02e-03 - 2.800000 0.727154 1.526628 9.33e-05 1.44e-03 - 2.900000 0.717938 1.496740 6.37e-04 3.28e-04 - 3.000000 0.711417 1.464762 7.80e-04 1.51e-03 - 3.100000 0.708036 1.430991 6.24e-04 2.15e-03 - 3.200000 0.708079 1.395889 3.70e-04 2.47e-03 - 3.300000 0.711619 1.359926 9.94e-05 2.63e-03 - 3.400000 0.718581 1.323519 1.69e-04 2.74e-03 - 3.500000 0.728792 1.287040 4.35e-04 2.82e-03 - 3.600000 0.742019 1.250864 6.93e-04 2.87e-03 - 3.700000 0.757977 1.215395 9.37e-04 2.89e-03 - 3.800000 0.776344 1.181065 1.16e-03 2.87e-03 - 3.900000 0.796778 1.148333 1.37e-03 2.81e-03 - 4.000000 0.818928 1.117683 1.55e-03 2.69e-03 - 4.100000 0.842446 1.089606 1.70e-03 2.53e-03 - 4.200000 0.866998 1.064597 1.83e-03 2.32e-03 - 4.300000 0.892261 1.043136 1.94e-03 2.06e-03 - 4.400000 0.916058 1.027104 3.91e-03 3.19e-03 - 4.500000 0.949013 1.011415 3.18e-03 2.42e-04 - 4.600000 0.967871 1.004821 3.69e-03 1.67e-03 - 4.700000 1.000576 1.000388 3.68e-03 3.49e-04 - 4.800000 1.019516 1.003159 2.12e-03 1.24e-03 - 4.900000 1.045822 1.008812 2.34e-04 7.65e-05 - 5.000000 1.070392 1.022564 1.83e-03 2.23e-03 - 5.100000 1.087297 1.034966 3.11e-03 1.46e-03 - 5.200000 1.112850 1.058594 1.88e-03 1.93e-03 - 5.300000 1.131091 1.082926 9.64e-04 2.31e-03 - 5.400000 1.145267 1.104991 2.49e-03 2.82e-03 - 5.500000 1.164313 1.138717 5.54e-04 9.74e-04 - 5.600000 1.179397 1.173602 1.35e-03 3.67e-03 - 5.700000 1.189228 1.201963 1.30e-03 1.91e-03 - 5.800000 1.199849 1.235675 1.30e-03 3.44e-03 - 5.900000 1.210965 1.279516 1.11e-03 4.32e-03 - 6.000000 1.216453 1.313042 1.34e-04 1.33e-03 - 6.100000 1.220283 1.344121 1.04e-03 4.15e-03 - 6.200000 1.224013 1.384363 2.59e-05 1.62e-04 - 6.300000 1.224687 1.424123 2.89e-05 3.98e-03 - 6.400000 1.222879 1.453549 4.74e-04 1.29e-03 - 6.500000 1.220024 1.484232 6.72e-05 4.10e-03 - 6.600000 1.214102 1.523276 4.41e-04 2.90e-03 - 6.700000 1.206270 1.552659 8.72e-04 1.90e-03 - 6.800000 1.198139 1.576403 3.50e-04 2.87e-03 - 6.900000 1.187244 1.603789 7.10e-04 1.96e-03 - 7.000000 1.171735 1.632792 1.70e-03 2.77e-03 + -2.900000 0.717301 1.326933 2.70e-07 3.73e-08 + -2.800000 0.727249 1.290351 1.13e-06 1.93e-06 + -2.700000 0.740247 1.254036 1.07e-06 5.17e-06 + -2.600000 0.756014 1.218395 7.58e-07 4.79e-06 + -2.500000 0.774228 1.183857 4.73e-07 4.46e-06 + -2.400000 0.794546 1.150881 3.10e-07 4.15e-06 + -2.300000 0.816616 1.119949 1.90e-07 3.86e-06 + -2.200000 0.840089 1.091557 7.29e-08 3.57e-06 + -2.100000 0.864625 1.066201 5.01e-08 3.31e-06 + -2.000000 0.889902 1.044364 2.51e-07 2.98e-06 + -1.900000 0.915617 1.026496 7.41e-07 2.44e-06 + -1.800000 0.941484 1.012992 3.21e-06 4.66e-07 + -1.700000 0.967244 1.004159 8.82e-06 3.48e-08 + -1.600000 0.992667 1.000213 5.91e-06 1.67e-07 + -1.500000 1.017525 1.001250 6.01e-06 1.73e-06 + -1.400000 1.041618 1.007250 7.55e-06 6.60e-07 + -1.300000 1.064770 1.018056 7.07e-06 1.39e-06 + -1.200000 1.086812 1.033423 8.15e-06 1.14e-06 + -1.100000 1.107603 1.052993 6.37e-06 1.16e-06 + -1.000000 1.127003 1.076350 6.54e-06 5.97e-07 + -0.900000 1.144897 1.103030 7.12e-06 1.12e-06 + -0.800000 1.161181 1.132540 5.65e-06 1.73e-06 + -0.700000 1.175759 1.164384 5.09e-06 3.04e-06 + -0.600000 1.188551 1.198067 6.35e-06 3.20e-06 + -0.500000 1.199490 1.233118 5.85e-06 1.93e-06 + -0.400000 1.208519 1.269088 5.00e-06 5.89e-07 + -0.300000 1.215588 1.305555 6.04e-06 2.25e-06 + -0.200000 1.220662 1.342131 6.84e-06 5.78e-06 + -0.100000 1.223719 1.378457 6.01e-06 7.95e-06 + 0.000000 1.224739 1.414204 5.62e-06 9.85e-06 + 0.100000 1.223718 1.449068 7.07e-06 1.25e-05 + 0.200000 1.220662 1.482778 6.74e-06 1.28e-05 + 0.300000 1.215588 1.515084 5.72e-06 1.31e-05 + 0.400000 1.208518 1.545760 5.96e-06 1.46e-05 + 0.500000 1.199489 1.574603 6.91e-06 1.62e-05 + 0.600000 1.188551 1.601433 6.09e-06 1.67e-05 + 0.700000 1.175759 1.626088 5.28e-06 1.69e-05 + 0.800000 1.161180 1.648423 5.98e-06 1.75e-05 + 0.900000 1.144898 1.668313 5.87e-06 1.77e-05 + 1.000000 1.127005 1.685649 4.85e-06 1.72e-05 + 1.100000 1.107605 1.700338 4.37e-06 1.67e-05 + 1.200000 1.086816 1.712303 4.71e-06 1.64e-05 + 1.300000 1.064773 1.721483 3.98e-06 1.56e-05 + 1.400000 1.041622 1.727831 3.10e-06 1.45e-05 + 1.500000 1.017528 1.731314 2.71e-06 1.35e-05 + 1.600000 0.992671 1.731915 2.16e-06 1.23e-05 + 1.700000 0.967251 1.729632 1.35e-06 1.10e-05 + 1.800000 0.941487 1.724475 4.26e-07 9.77e-06 + 1.900000 0.915622 1.716469 5.05e-06 1.00e-05 + 2.000000 0.889909 1.705658 6.21e-06 8.62e-06 + 2.100000 0.864636 1.692092 1.05e-05 1.02e-05 + 2.200000 0.840099 1.675847 1.03e-05 9.88e-06 + 2.300000 0.816629 1.657008 1.24e-05 9.44e-06 + 2.400000 0.794555 1.635676 9.06e-06 8.49e-06 + 2.500000 0.774235 1.611970 7.64e-06 7.70e-06 + 2.600000 0.756021 1.586026 7.63e-06 7.67e-06 + 2.700000 0.740253 1.557998 6.87e-06 7.15e-06 + 2.800000 0.727253 1.528060 5.82e-06 7.10e-06 + 2.900000 0.717306 1.496405 4.89e-06 7.26e-06 + 3.000000 0.710640 1.463249 4.17e-06 7.32e-06 + 3.100000 0.707416 1.428831 3.60e-06 7.55e-06 + 3.200000 0.707712 1.393413 3.07e-06 8.92e-06 + 3.300000 0.711522 1.357287 2.62e-06 9.53e-06 + 3.400000 0.718752 1.320772 2.24e-06 7.95e-06 + 3.500000 0.729229 1.284212 1.93e-06 6.49e-06 + 3.600000 0.742713 1.247985 1.62e-06 5.13e-06 + 3.700000 0.758915 1.212499 1.32e-06 3.88e-06 + 3.800000 0.777507 1.178192 1.01e-06 2.73e-06 + 3.900000 0.798145 1.145526 7.18e-07 1.69e-06 + 4.000000 0.820475 1.114987 4.41e-07 7.68e-07 + 4.100000 0.844149 1.087071 1.85e-07 3.81e-08 + 4.200000 0.868832 1.062274 5.04e-08 7.17e-07 + 4.300000 0.894204 1.041075 2.64e-07 1.26e-06 + 4.400000 0.919963 1.023915 9.20e-07 2.28e-06 + 4.500000 0.945828 1.011177 6.19e-06 4.81e-06 + 4.600000 0.971553 1.003152 4.72e-06 1.97e-06 + 4.700000 0.996891 1.000041 7.14e-06 2.29e-06 + 4.800000 1.021634 1.001919 6.39e-06 3.05e-06 + 4.900000 1.045581 1.008736 7.54e-06 9.35e-07 + 5.000000 1.068557 1.020334 7.55e-06 2.47e-06 + 5.100000 1.090402 1.036431 5.68e-06 1.83e-06 + 5.200000 1.110965 1.056670 7.01e-06 2.46e-06 + 5.300000 1.130120 1.080619 6.62e-06 2.63e-06 + 5.400000 1.147752 1.107809 5.22e-06 2.51e-06 + 5.500000 1.163753 1.137747 5.96e-06 3.76e-06 + 5.600000 1.178036 1.169935 6.19e-06 6.46e-06 + 5.700000 1.190523 1.203881 5.11e-06 5.99e-06 + 5.800000 1.201144 1.239116 4.94e-06 4.32e-06 + 5.900000 1.209845 1.275199 6.25e-06 3.31e-06 + 6.000000 1.216582 1.311713 5.78e-06 2.19e-06 + 6.100000 1.221320 1.348274 4.88e-06 1.47e-06 + 6.200000 1.224033 1.384526 5.58e-06 8.06e-07 + 6.300000 1.224710 1.420146 6.33e-06 9.33e-08 + 6.400000 1.223348 1.454836 5.45e-06 7.00e-07 + 6.500000 1.219952 1.488327 4.87e-06 1.03e-06 + 6.600000 1.214538 1.520374 6.04e-06 1.49e-06 + 6.700000 1.207136 1.550752 6.18e-06 5.85e-06 + 6.800000 1.197784 1.579267 5.34e-06 8.88e-06 + 6.900000 1.186528 1.605740 5.46e-06 1.20e-05 + 7.000000 1.173429 1.630011 6.48e-06 1.55e-05 ------------------------------------------------------ Final Solver Statistics: Internal solver steps = 80 (attempted = 82) Total number of error test failures = 2 - Total RHS evals: Fe = 495, Fi = 1086 - Total mass matrix setups = 416 - Total mass matrix solves = 657 - Total mass times evals = 1081 - Total number of Jacobian evaluations = 21 + Total RHS evals: Fe = 493, Fi = 1082 + Total mass matrix setups = 413 + Total mass matrix solves = 574 + Total mass times evals = 1079 + Total number of Jacobian evaluations = 12 Total linear solver setups = 21 - Total number of Nonlinear iterations = 1001 - Total number of Nonlinear convergence failures = 13 - Errors: u = 0.00178101, v = 0.00231678, total = 0.00206634 + Total number of Nonlinear iterations = 999 + Total number of Nonlinear convergence failures = 11 + Errors: u = 5.44891e-06, v = 7.96021e-06, total = 6.82113e-06 diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_0_-10_1_10_1.out b/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_0_-10_1_10_1.out index 2d97a74e97..e28c955d6b 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_0_-10_1_10_1.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_0_-10_1_10_1.out @@ -12,117 +12,117 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: t u v uerr verr ------------------------------------------------------ -3.000000 0.710636 1.363407 0.00e+00 0.00e+00 - -2.900000 0.717211 1.328223 8.99e-05 1.29e-03 - -2.800000 0.728269 1.287692 1.02e-03 2.66e-03 - -2.700000 0.739164 1.256719 1.08e-03 2.68e-03 - -2.600000 0.757034 1.216907 1.02e-03 1.49e-03 - -2.500000 0.773721 1.184656 5.07e-04 7.94e-04 - -2.400000 0.794153 1.151722 3.93e-04 8.37e-04 - -2.300000 0.818329 1.118100 1.71e-03 1.85e-03 - -2.200000 0.837303 1.094451 2.79e-03 2.89e-03 - -2.100000 0.862921 1.067619 1.70e-03 1.41e-03 - -2.000000 0.890741 1.043833 8.39e-04 5.34e-04 - -1.900000 0.917113 1.027334 1.50e-03 8.36e-04 - -1.800000 0.937132 1.014893 4.36e-03 1.90e-03 - -1.700000 0.971264 1.004558 4.01e-03 3.99e-04 - -1.600000 0.989148 1.001512 3.53e-03 1.30e-03 - -1.500000 1.019857 1.001974 2.33e-03 7.23e-04 - -1.400000 1.041333 1.009018 2.92e-04 1.77e-03 - -1.300000 1.062133 1.016423 2.64e-03 1.64e-03 - -1.200000 1.089269 1.036935 2.45e-03 3.51e-03 - -1.100000 1.105611 1.051822 2.00e-03 1.17e-03 - -1.000000 1.126373 1.075348 6.37e-04 1.00e-03 - -0.900000 1.146348 1.106984 1.44e-03 3.96e-03 - -0.800000 1.159966 1.130930 1.22e-03 1.61e-03 - -0.700000 1.174625 1.161225 1.14e-03 3.16e-03 - -0.600000 1.189605 1.202473 1.05e-03 4.41e-03 - -0.500000 1.199275 1.233916 2.21e-04 8.00e-04 - -0.400000 1.207551 1.264783 9.73e-04 4.30e-03 - -0.300000 1.215744 1.306771 1.50e-04 1.21e-03 - -0.200000 1.220747 1.345850 7.74e-05 3.71e-03 - -0.100000 1.223304 1.376541 4.20e-04 1.92e-03 - 0.000000 1.224655 1.410336 9.03e-05 3.88e-03 - 0.100000 1.223464 1.452678 2.60e-04 3.60e-03 - 0.200000 1.220141 1.484317 5.28e-04 1.53e-03 - 0.300000 1.215820 1.511673 2.26e-04 3.42e-03 - 0.400000 1.208782 1.544565 2.58e-04 1.21e-03 - 0.500000 1.198262 1.577820 1.23e-03 3.20e-03 - 0.600000 1.188266 1.600763 2.91e-04 6.87e-04 - 0.700000 1.177064 1.622917 1.30e-03 3.19e-03 - 0.800000 1.160152 1.650027 1.03e-03 1.59e-03 - 0.900000 1.143163 1.669738 1.74e-03 1.41e-03 - 1.000000 1.127953 1.683870 9.43e-04 1.80e-03 - 1.100000 1.109344 1.698839 1.74e-03 1.52e-03 - 1.200000 1.084126 1.713713 2.69e-03 1.39e-03 - 1.300000 1.063729 1.721220 1.05e-03 2.79e-04 - 1.400000 1.044265 1.726551 2.64e-03 1.29e-03 - 1.500000 1.017322 1.731363 2.09e-04 3.55e-05 - 1.600000 0.989409 1.731682 3.26e-03 2.45e-04 - 1.700000 0.968115 1.729005 8.62e-04 6.38e-04 - 1.800000 0.945780 1.724905 4.29e-03 4.21e-04 - 1.900000 0.913350 1.714227 2.27e-03 2.25e-03 - 2.000000 0.891914 1.706373 2.01e-03 7.06e-04 - 2.100000 0.863536 1.689964 1.09e-03 2.14e-03 - 2.200000 0.842451 1.677230 2.36e-03 1.37e-03 - 2.300000 0.813595 1.653718 3.02e-03 3.30e-03 - 2.400000 0.797036 1.637090 2.49e-03 1.41e-03 - 2.500000 0.776409 1.614316 2.18e-03 2.34e-03 - 2.600000 0.753957 1.582797 2.06e-03 3.24e-03 - 2.700000 0.739018 1.554652 1.23e-03 3.35e-03 - 2.800000 0.727507 1.526918 2.60e-04 1.15e-03 - 2.900000 0.718202 1.497373 9.00e-04 9.61e-04 - 3.000000 0.711511 1.465459 8.75e-04 2.20e-03 - 3.100000 0.707986 1.431691 5.73e-04 2.85e-03 - 3.200000 0.707904 1.396535 1.95e-04 3.11e-03 - 3.300000 0.711361 1.360512 1.59e-04 3.21e-03 - 3.400000 0.718242 1.324028 5.08e-04 3.25e-03 - 3.500000 0.728403 1.287440 8.23e-04 3.22e-03 - 3.600000 0.741598 1.251148 1.11e-03 3.16e-03 - 3.700000 0.757545 1.215559 1.37e-03 3.06e-03 - 3.800000 0.775921 1.181111 1.59e-03 2.92e-03 - 3.900000 0.796382 1.148270 1.76e-03 2.74e-03 - 4.000000 0.818578 1.117520 1.90e-03 2.53e-03 - 4.100000 0.842160 1.089361 1.99e-03 2.29e-03 - 4.200000 0.866788 1.064291 2.04e-03 2.02e-03 - 4.300000 0.892141 1.042793 2.06e-03 1.72e-03 - 4.400000 0.915470 1.026651 4.49e-03 2.74e-03 - 4.500000 0.949956 1.010481 4.12e-03 6.92e-04 - 4.600000 0.969819 1.004919 1.74e-03 1.77e-03 - 4.700000 0.995171 0.999962 1.73e-03 7.62e-05 - 4.800000 1.024036 1.003989 2.40e-03 2.07e-03 - 4.900000 1.042057 1.008020 3.53e-03 7.16e-04 - 5.000000 1.070886 1.022350 2.32e-03 2.02e-03 - 5.100000 1.090463 1.038105 5.51e-05 1.68e-03 - 5.200000 1.108350 1.053723 2.62e-03 2.94e-03 - 5.300000 1.131978 1.084116 1.85e-03 3.50e-03 - 5.400000 1.147773 1.109311 1.62e-05 1.50e-03 - 5.500000 1.161934 1.133924 1.83e-03 3.82e-03 - 5.600000 1.178681 1.171971 6.39e-04 2.04e-03 - 5.700000 1.191085 1.207296 5.57e-04 3.42e-03 - 5.800000 1.200245 1.236544 9.04e-04 2.57e-03 - 5.900000 1.209250 1.271951 6.01e-04 3.24e-03 - 6.000000 1.217002 1.316051 4.15e-04 4.34e-03 - 6.100000 1.221052 1.349146 2.73e-04 8.74e-04 - 6.200000 1.223662 1.380339 3.76e-04 4.19e-03 - 6.300000 1.224706 1.420575 1.02e-05 4.30e-04 - 6.400000 1.222895 1.458395 4.58e-04 3.56e-03 - 6.500000 1.219734 1.486790 2.23e-04 1.54e-03 - 6.600000 1.215038 1.516684 4.95e-04 3.69e-03 - 6.700000 1.206372 1.553655 7.70e-04 2.90e-03 - 6.800000 1.196854 1.580760 9.35e-04 1.48e-03 - 6.900000 1.187218 1.602951 6.84e-04 2.80e-03 - 7.000000 1.174139 1.628591 7.03e-04 1.44e-03 + -2.900000 0.717302 1.326933 5.18e-07 6.29e-08 + -2.800000 0.727249 1.290354 1.76e-06 3.00e-07 + -2.700000 0.740248 1.254042 1.77e-06 6.52e-07 + -2.600000 0.756015 1.218401 2.05e-06 1.18e-06 + -2.500000 0.774229 1.183863 1.80e-06 1.67e-06 + -2.400000 0.794548 1.150887 1.78e-06 2.26e-06 + -2.300000 0.816618 1.119956 1.73e-06 2.88e-06 + -2.200000 0.840091 1.091561 2.35e-06 9.16e-07 + -2.100000 0.864627 1.066206 1.41e-06 1.78e-06 + -2.000000 0.889903 1.044369 7.08e-07 1.83e-06 + -1.900000 0.915617 1.026506 8.72e-08 7.10e-06 + -1.800000 0.941487 1.013000 3.27e-07 8.36e-06 + -1.700000 0.967250 1.004167 2.68e-06 8.25e-06 + -1.600000 0.992670 1.000223 3.57e-06 9.84e-06 + -1.500000 1.017527 1.001259 3.97e-06 7.51e-06 + -1.400000 1.041619 1.007259 6.46e-06 9.78e-06 + -1.300000 1.064772 1.018066 5.08e-06 8.29e-06 + -1.200000 1.086813 1.033430 7.23e-06 8.10e-06 + -1.100000 1.107603 1.053000 6.59e-06 8.19e-06 + -1.000000 1.127004 1.076357 5.43e-06 7.25e-06 + -0.900000 1.144897 1.103036 7.08e-06 7.19e-06 + -0.800000 1.161180 1.132545 6.46e-06 6.66e-06 + -0.700000 1.175759 1.164387 5.27e-06 6.15e-06 + -0.600000 1.188551 1.198070 6.33e-06 6.04e-06 + -0.500000 1.199489 1.233121 6.80e-06 5.48e-06 + -0.400000 1.208518 1.269092 5.71e-06 4.92e-06 + -0.300000 1.215588 1.305562 5.38e-06 4.74e-06 + -0.200000 1.220662 1.342141 6.93e-06 4.44e-06 + -0.100000 1.223718 1.378469 6.52e-06 3.81e-06 + 0.000000 1.224739 1.414217 5.45e-06 3.44e-06 + 0.100000 1.223719 1.449083 6.01e-06 3.25e-06 + 0.200000 1.220662 1.482794 6.90e-06 2.72e-06 + 0.300000 1.215588 1.515100 5.89e-06 2.20e-06 + 0.400000 1.208519 1.545776 5.12e-06 1.91e-06 + 0.500000 1.199490 1.574621 6.23e-06 1.56e-06 + 0.600000 1.188551 1.601451 5.98e-06 9.90e-07 + 0.700000 1.175759 1.626106 4.83e-06 5.92e-07 + 0.800000 1.161182 1.648441 4.59e-06 3.18e-07 + 0.900000 1.144899 1.668330 5.22e-06 1.80e-07 + 1.000000 1.127005 1.685666 4.37e-06 6.52e-07 + 1.100000 1.107606 1.700354 3.45e-06 9.25e-07 + 1.200000 1.086817 1.712319 3.52e-06 1.26e-06 + 1.300000 1.064774 1.721497 3.17e-06 1.75e-06 + 1.400000 1.041623 1.727843 2.27e-06 2.05e-06 + 1.500000 1.017529 1.731325 1.62e-06 2.23e-06 + 1.600000 0.992672 1.731925 1.09e-06 2.62e-06 + 1.700000 0.967252 1.729640 2.98e-07 2.96e-06 + 1.800000 0.941488 1.724482 3.06e-07 3.07e-06 + 1.900000 0.915619 1.716476 1.21e-06 3.20e-06 + 2.000000 0.889905 1.705663 2.67e-06 3.54e-06 + 2.100000 0.864629 1.692098 3.20e-06 3.66e-06 + 2.200000 0.840092 1.675853 3.55e-06 3.60e-06 + 2.300000 0.816622 1.657013 5.76e-06 3.73e-06 + 2.400000 0.794553 1.635680 7.17e-06 3.89e-06 + 2.500000 0.774234 1.611974 6.62e-06 3.74e-06 + 2.600000 0.756019 1.586030 6.45e-06 3.52e-06 + 2.700000 0.740253 1.558002 7.30e-06 3.40e-06 + 2.800000 0.727255 1.528064 7.08e-06 3.25e-06 + 2.900000 0.717306 1.496410 4.96e-06 2.49e-06 + 3.000000 0.710640 1.463255 3.65e-06 1.95e-06 + 3.100000 0.707417 1.428837 4.78e-06 1.61e-06 + 3.200000 0.707713 1.393421 3.79e-06 1.41e-06 + 3.300000 0.711524 1.357296 4.13e-06 1.09e-06 + 3.400000 0.718753 1.320779 3.08e-06 9.90e-07 + 3.500000 0.729230 1.284218 3.50e-06 7.02e-07 + 3.600000 0.742714 1.247989 2.37e-06 7.15e-07 + 3.700000 0.758915 1.212502 9.93e-07 1.30e-06 + 3.800000 0.777507 1.178192 2.56e-07 1.98e-06 + 3.900000 0.798144 1.145525 2.27e-07 2.69e-06 + 4.000000 0.820474 1.114984 5.91e-07 3.44e-06 + 4.100000 0.844148 1.087067 8.85e-07 4.17e-06 + 4.200000 0.868831 1.062268 1.12e-06 4.90e-06 + 4.300000 0.894202 1.041068 1.31e-06 5.58e-06 + 4.400000 0.919963 1.023910 1.35e-06 3.31e-06 + 4.500000 0.945833 1.011171 9.17e-07 1.79e-06 + 4.600000 0.971554 1.003150 2.99e-06 5.83e-07 + 4.700000 0.996895 1.000039 2.92e-06 8.52e-07 + 4.800000 1.021636 1.001916 4.52e-06 5.99e-07 + 4.900000 1.045583 1.008738 5.49e-06 2.78e-06 + 5.000000 1.068560 1.020333 4.65e-06 1.94e-06 + 5.100000 1.090401 1.036432 6.80e-06 2.61e-06 + 5.200000 1.110966 1.056670 6.28e-06 3.13e-06 + 5.300000 1.130122 1.080620 5.31e-06 2.82e-06 + 5.400000 1.147750 1.107810 6.97e-06 3.23e-06 + 5.500000 1.163752 1.137746 6.56e-06 3.16e-06 + 5.600000 1.178037 1.169932 5.39e-06 3.04e-06 + 5.700000 1.190522 1.203878 6.25e-06 3.28e-06 + 5.800000 1.201142 1.239115 6.96e-06 3.08e-06 + 5.900000 1.209845 1.275198 5.92e-06 2.78e-06 + 6.000000 1.216582 1.311713 5.43e-06 2.82e-06 + 6.100000 1.221318 1.348275 6.97e-06 2.77e-06 + 6.200000 1.224032 1.384528 6.70e-06 2.33e-06 + 6.300000 1.224710 1.420148 5.59e-06 2.09e-06 + 6.400000 1.223347 1.454839 5.89e-06 2.04e-06 + 6.500000 1.219950 1.488330 6.96e-06 1.68e-06 + 6.600000 1.214538 1.520377 6.02e-06 1.24e-06 + 6.700000 1.207137 1.550759 5.14e-06 1.04e-06 + 6.800000 1.197783 1.579277 6.12e-06 7.99e-07 + 6.900000 1.186528 1.605752 6.04e-06 3.04e-07 + 7.000000 1.173431 1.630027 4.89e-06 4.45e-08 ------------------------------------------------------ Final Solver Statistics: - Internal solver steps = 82 (attempted = 84) - Total number of error test failures = 2 - Total RHS evals: Fe = 507, Fi = 1758 - Total mass matrix setups = 426 - Total mass matrix solves = 673 - Total mass times evals = 1753 - Total number of Jacobian evaluations = 153 - Total linear solver setups = 153 - Total number of Nonlinear iterations = 1671 - Total number of Nonlinear convergence failures = 146 - Errors: u = 0.00176018, v = 0.00238235, total = 0.0020945 + Internal solver steps = 83 (attempted = 83) + Total number of error test failures = 0 + Total RHS evals: Fe = 501, Fi = 1738 + Total mass matrix setups = 418 + Total mass matrix solves = 585 + Total mass times evals = 1735 + Total number of Jacobian evaluations = 145 + Total linear solver setups = 150 + Total number of Nonlinear iterations = 1652 + Total number of Nonlinear convergence failures = 144 + Errors: u = 4.76925e-06, v = 3.83012e-06, total = 4.32525e-06 diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_1.out b/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_1.out index e2be8b2242..b27df8ddb3 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_1.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_0_4_1.out @@ -12,117 +12,117 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: t u v uerr verr ------------------------------------------------------ -3.000000 0.710636 1.363407 0.00e+00 0.00e+00 - -2.900000 0.717289 1.326981 1.22e-05 4.87e-05 - -2.800000 0.727288 1.290237 4.09e-05 1.17e-04 - -2.700000 0.740297 1.253927 5.15e-05 1.15e-04 - -2.600000 0.756075 1.218287 6.16e-05 1.13e-04 - -2.500000 0.774294 1.183760 6.63e-05 1.02e-04 - -2.400000 0.794465 1.150991 8.04e-05 1.06e-04 - -2.300000 0.816591 1.119982 2.54e-05 2.88e-05 - -2.200000 0.839974 1.091671 1.15e-04 1.11e-04 - -2.100000 0.864501 1.066305 1.25e-04 1.01e-04 - -2.000000 0.889952 1.044335 4.99e-05 3.23e-05 - -1.900000 0.915478 1.026570 1.40e-04 7.14e-05 - -1.800000 0.941493 1.012996 5.06e-06 4.44e-06 - -1.700000 0.967415 1.004136 1.62e-04 2.32e-05 - -1.600000 0.992703 1.000214 2.93e-05 1.23e-06 - -1.500000 1.017014 1.001151 5.16e-04 1.01e-04 - -1.400000 1.041533 1.007206 9.20e-05 4.25e-05 - -1.300000 1.064795 1.018071 1.80e-05 1.30e-05 - -1.200000 1.086754 1.033357 6.67e-05 6.51e-05 - -1.100000 1.107534 1.052895 7.53e-05 9.68e-05 - -1.000000 1.127009 1.076351 3.43e-07 8.07e-07 - -0.900000 1.144852 1.102926 5.16e-05 1.03e-04 - -0.800000 1.161168 1.132493 1.86e-05 4.54e-05 - -0.700000 1.175722 1.164256 4.22e-05 1.25e-04 - -0.600000 1.188552 1.198047 5.27e-06 1.75e-05 - -0.500000 1.199515 1.233200 1.89e-05 8.43e-05 - -0.400000 1.208522 1.269075 2.42e-06 1.17e-05 - -0.300000 1.215578 1.305441 1.55e-05 1.17e-04 - -0.200000 1.220681 1.342266 1.14e-05 1.29e-04 - -0.100000 1.223722 1.378393 3.13e-06 7.23e-05 - 0.000000 1.224745 1.414086 1.48e-07 1.28e-04 - 0.100000 1.223729 1.448982 4.45e-06 9.83e-05 - 0.200000 1.220673 1.482752 3.61e-06 3.94e-05 - 0.300000 1.215597 1.515075 3.25e-06 2.20e-05 - 0.400000 1.208502 1.545874 2.24e-05 9.94e-05 - 0.500000 1.199516 1.574554 1.92e-05 6.55e-05 - 0.600000 1.188518 1.601549 3.87e-05 9.88e-05 - 0.700000 1.175761 1.626111 2.75e-06 5.57e-06 - 0.800000 1.161205 1.648410 1.86e-05 3.00e-05 - 0.900000 1.144846 1.668405 5.80e-05 7.45e-05 - 1.000000 1.127053 1.685621 4.32e-05 4.52e-05 - 1.100000 1.107589 1.700371 2.04e-05 1.55e-05 - 1.200000 1.086897 1.712271 7.69e-05 4.83e-05 - 1.300000 1.064768 1.721502 8.56e-06 3.00e-06 - 1.400000 1.041562 1.727865 6.34e-05 1.99e-05 - 1.500000 1.016979 1.731422 5.52e-04 9.44e-05 - 1.600000 0.992455 1.731939 2.18e-04 1.18e-05 - 1.700000 0.967255 1.729643 2.52e-06 1.22e-07 - 1.800000 0.941270 1.724450 2.17e-04 3.51e-05 - 1.900000 0.915449 1.716434 1.69e-04 4.49e-05 - 2.000000 0.889997 1.705701 9.49e-05 3.43e-05 - 2.100000 0.864509 1.692044 1.17e-04 5.82e-05 - 2.200000 0.840053 1.675834 3.55e-05 2.29e-05 - 2.300000 0.816625 1.657023 8.96e-06 5.95e-06 - 2.400000 0.794637 1.635769 9.09e-05 8.47e-05 - 2.500000 0.774242 1.611994 1.46e-05 1.59e-05 - 2.600000 0.756072 1.586117 5.87e-05 8.37e-05 - 2.700000 0.740248 1.558009 2.12e-06 3.87e-06 - 2.800000 0.727215 1.527988 3.21e-05 7.88e-05 - 2.900000 0.717284 1.496348 1.74e-05 6.40e-05 - 3.000000 0.710627 1.463197 9.55e-06 5.99e-05 - 3.100000 0.707416 1.428919 3.99e-06 7.98e-05 - 3.200000 0.707704 1.393517 5.54e-06 9.49e-05 - 3.300000 0.711505 1.357381 1.41e-05 8.48e-05 - 3.400000 0.718731 1.320849 1.80e-05 6.91e-05 - 3.500000 0.729200 1.284292 2.71e-05 7.41e-05 - 3.600000 0.742748 1.247913 3.58e-05 7.72e-05 - 3.700000 0.758982 1.212381 6.88e-05 1.22e-04 - 3.800000 0.777446 1.178286 6.03e-05 9.15e-05 - 3.900000 0.798166 1.145500 2.24e-05 2.78e-05 - 4.000000 0.820371 1.115102 1.04e-04 1.14e-04 - 4.100000 0.844171 1.087051 2.16e-05 2.02e-05 - 4.200000 0.868963 1.062173 1.30e-04 1.00e-04 - 4.300000 0.894283 1.041024 7.92e-05 4.92e-05 - 4.400000 0.920076 1.023865 1.12e-04 4.82e-05 - 4.500000 0.945936 1.011146 1.02e-04 2.64e-05 - 4.600000 0.970923 1.003241 6.35e-04 9.12e-05 - 4.700000 0.996888 1.000082 9.99e-06 4.35e-05 - 4.800000 1.022163 1.002075 5.22e-04 1.59e-04 - 4.900000 1.045496 1.008688 9.33e-05 4.76e-05 - 5.000000 1.068614 1.020369 4.90e-05 3.76e-05 - 5.100000 1.090360 1.036381 4.73e-05 4.80e-05 - 5.200000 1.110916 1.056593 5.59e-05 7.42e-05 - 5.300000 1.130183 1.080712 5.58e-05 9.51e-05 - 5.400000 1.147723 1.107737 3.42e-05 6.99e-05 - 5.500000 1.163719 1.137644 3.97e-05 9.93e-05 - 5.600000 1.178039 1.169920 3.34e-06 8.82e-06 - 5.700000 1.190563 1.204006 3.50e-05 1.31e-04 - 5.800000 1.201123 1.238990 2.66e-05 1.22e-04 - 5.900000 1.209871 1.275316 2.03e-05 1.20e-04 - 6.000000 1.216589 1.311725 1.53e-06 1.48e-05 - 6.100000 1.221314 1.348140 1.10e-05 1.33e-04 - 6.200000 1.224040 1.384556 1.20e-06 3.07e-05 - 6.300000 1.224715 1.420276 1.45e-06 1.30e-04 - 6.400000 1.223358 1.454743 4.94e-06 9.31e-05 - 6.500000 1.219962 1.488272 5.90e-06 5.59e-05 - 6.600000 1.214545 1.520364 1.61e-06 1.17e-05 - 6.700000 1.207127 1.550821 1.50e-05 6.31e-05 - 6.800000 1.197802 1.579235 1.25e-05 4.12e-05 - 6.900000 1.186493 1.605851 4.03e-05 9.91e-05 - 7.000000 1.173431 1.630035 4.42e-06 8.62e-06 + -2.900000 0.717301 1.326933 4.49e-10 2.27e-12 + -2.800000 0.727247 1.290353 4.71e-10 2.40e-12 + -2.700000 0.740246 1.254042 4.75e-10 2.42e-12 + -2.600000 0.756013 1.218400 4.81e-10 2.45e-12 + -2.500000 0.774227 1.183861 4.86e-10 2.53e-12 + -2.400000 0.794546 1.150885 4.63e-10 2.35e-12 + -2.300000 0.816616 1.119953 4.77e-10 2.40e-12 + -2.200000 0.840089 1.091560 4.63e-10 2.28e-12 + -2.100000 0.864625 1.066204 4.49e-10 1.91e-12 + -2.000000 0.889903 1.044367 4.35e-10 2.22e-12 + -1.900000 0.915617 1.026499 1.65e-10 5.44e-12 + -1.800000 0.941488 1.012992 2.06e-09 3.81e-11 + -1.700000 0.967253 1.004159 8.28e-10 5.15e-12 + -1.600000 0.992673 1.000213 2.51e-08 1.04e-10 + -1.500000 1.017531 1.001252 7.18e-08 1.15e-09 + -1.400000 1.041625 1.007249 7.22e-10 3.60e-11 + -1.300000 1.064777 1.018058 7.17e-10 3.30e-11 + -1.200000 1.086821 1.033422 6.98e-10 2.85e-11 + -1.100000 1.107609 1.052992 7.02e-10 2.53e-11 + -1.000000 1.127010 1.076350 7.44e-10 2.17e-11 + -0.900000 1.144904 1.103029 7.25e-10 1.91e-11 + -0.800000 1.161186 1.132539 7.50e-10 1.63e-11 + -0.700000 1.175764 1.164381 7.38e-10 1.40e-11 + -0.600000 1.188557 1.198064 7.71e-10 1.19e-11 + -0.500000 1.199496 1.233116 8.00e-10 9.72e-12 + -0.400000 1.208524 1.269087 7.82e-10 8.43e-12 + -0.300000 1.215594 1.305557 7.61e-10 6.91e-12 + -0.200000 1.220669 1.342137 8.22e-10 5.38e-12 + -0.100000 1.223725 1.378465 1.64e-07 8.46e-10 + 0.000000 1.224745 1.414214 7.74e-08 3.69e-10 + 0.100000 1.223724 1.449080 1.98e-07 9.71e-10 + 0.200000 1.220669 1.482791 2.35e-07 1.13e-09 + 0.300000 1.215594 1.515097 2.41e-07 1.12e-09 + 0.400000 1.208524 1.545774 8.88e-10 9.81e-11 + 0.500000 1.199496 1.574619 7.62e-10 8.75e-11 + 0.600000 1.188557 1.601450 8.07e-10 7.72e-11 + 0.700000 1.175764 1.626105 7.70e-10 6.85e-11 + 0.800000 1.161186 1.648441 7.48e-10 6.09e-11 + 0.900000 1.144904 1.668331 7.79e-10 5.39e-11 + 1.000000 1.127010 1.685666 7.17e-10 4.84e-11 + 1.100000 1.107609 1.700355 7.31e-10 4.30e-11 + 1.200000 1.086821 1.712320 6.79e-10 3.86e-11 + 1.300000 1.064777 1.721499 6.92e-10 3.44e-11 + 1.400000 1.041625 1.727845 2.04e-08 6.72e-11 + 1.500000 1.017530 1.731328 1.59e-07 7.12e-10 + 1.600000 0.992673 1.731928 6.88e-08 2.91e-10 + 1.700000 0.967253 1.729643 8.70e-08 3.76e-10 + 1.800000 0.941488 1.724485 5.13e-10 5.69e-11 + 1.900000 0.915617 1.716479 8.67e-10 5.85e-11 + 2.000000 0.889903 1.705666 6.33e-10 5.28e-11 + 2.100000 0.864625 1.692102 6.31e-10 4.83e-11 + 2.200000 0.840089 1.675857 5.82e-10 4.42e-11 + 2.300000 0.816616 1.657017 5.51e-10 4.05e-11 + 2.400000 0.794546 1.635684 5.15e-10 3.71e-11 + 2.500000 0.774227 1.611978 5.14e-10 3.44e-11 + 2.600000 0.756013 1.586033 4.88e-10 3.16e-11 + 2.700000 0.740246 1.558005 4.89e-10 2.93e-11 + 2.800000 0.727247 1.528067 4.90e-10 2.73e-11 + 2.900000 0.717301 1.496412 4.79e-10 2.54e-11 + 3.000000 0.710636 1.463257 4.70e-10 2.36e-11 + 3.100000 0.707412 1.428839 9.20e-08 4.46e-10 + 3.200000 0.707710 1.393422 1.09e-07 5.62e-10 + 3.300000 0.711520 1.357297 5.27e-10 1.53e-11 + 3.400000 0.718750 1.320780 4.47e-10 1.41e-11 + 3.500000 0.729227 1.284218 4.49e-10 1.32e-11 + 3.600000 0.742712 1.247990 4.72e-10 1.26e-11 + 3.700000 0.758914 1.212503 4.83e-10 1.20e-11 + 3.800000 0.777506 1.178194 4.61e-10 1.13e-11 + 3.900000 0.798144 1.145528 4.83e-10 1.07e-11 + 4.000000 0.820474 1.114988 4.63e-10 9.99e-12 + 4.100000 0.844149 1.087071 4.86e-10 9.55e-12 + 4.200000 0.868832 1.062273 4.87e-10 8.65e-12 + 4.300000 0.894204 1.041074 4.18e-10 8.16e-12 + 4.400000 0.919964 1.023913 7.04e-12 4.13e-12 + 4.500000 0.945834 1.011173 1.24e-09 1.30e-11 + 4.600000 0.971557 1.003150 2.19e-08 6.19e-10 + 4.700000 0.996898 1.000038 1.43e-07 2.28e-09 + 4.800000 1.021640 1.001916 1.99e-07 1.27e-09 + 4.900000 1.045589 1.008736 6.84e-10 3.85e-11 + 5.000000 1.068565 1.020331 7.31e-10 3.42e-11 + 5.100000 1.090408 1.036429 7.07e-10 2.95e-11 + 5.200000 1.110972 1.056667 7.11e-10 2.61e-11 + 5.300000 1.130127 1.080617 7.73e-10 2.25e-11 + 5.400000 1.147757 1.107807 7.36e-10 1.98e-11 + 5.500000 1.163759 1.137743 7.37e-10 1.71e-11 + 5.600000 1.178042 1.169929 7.67e-10 1.46e-11 + 5.700000 1.190528 1.203875 8.07e-10 1.21e-11 + 5.800000 1.201149 1.239112 7.52e-10 1.06e-11 + 5.900000 1.209851 1.275195 8.14e-10 8.47e-12 + 6.000000 1.216587 1.311711 7.93e-10 7.30e-12 + 6.100000 1.221325 1.348272 7.60e-10 6.06e-12 + 6.200000 1.224039 1.384525 2.32e-07 1.19e-09 + 6.300000 1.224716 1.420146 1.87e-07 9.24e-10 + 6.400000 1.223353 1.454836 2.45e-07 1.21e-09 + 6.500000 1.219956 1.488328 2.34e-07 1.12e-09 + 6.600000 1.214543 1.520375 2.43e-07 1.12e-09 + 6.700000 1.207142 1.550758 8.17e-10 9.47e-11 + 6.800000 1.197789 1.579276 7.68e-10 8.41e-11 + 6.900000 1.186534 1.605752 8.06e-10 7.42e-11 + 7.000000 1.173436 1.630027 7.70e-10 6.59e-11 ------------------------------------------------------ Final Solver Statistics: Internal solver steps = 2271 (attempted = 3401) Total number of error test failures = 0 - Total RHS evals: Fe = 14917, Fi = 51629 - Total mass matrix setups = 13777 - Total mass matrix solves = 68814 + Total RHS evals: Fe = 13787, Fi = 50499 + Total mass matrix setups = 12646 + Total mass matrix solves = 64284 Total mass times evals = 2271 Total number of Jacobian evaluations = 0 Total linear solver setups = 0 Total number of Nonlinear iterations = 36712 Total number of Nonlinear convergence failures = 1130 - Errors: u = 0.000128202, v = 7.56396e-05, total = 0.000105255 + Errors: u = 7.56688e-08, v = 4.52391e-10, total = 5.35069e-08 diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_0_5.out b/examples/arkode/CXX_serial/ark_kpr_Mt_0_5.out index 0e4c7017ec..7f9417757d 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_0_5.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_0_5.out @@ -12,117 +12,117 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: t u v uerr verr ------------------------------------------------------ -3.000000 0.710636 1.363407 0.00e+00 0.00e+00 - -2.900000 0.717388 1.327299 8.73e-05 3.66e-04 - -2.800000 0.728314 1.288641 1.07e-03 1.71e-03 - -2.700000 0.741339 1.252148 1.09e-03 1.89e-03 - -2.600000 0.755772 1.218919 2.41e-04 5.19e-04 - -2.500000 0.775163 1.183340 9.36e-04 5.22e-04 - -2.400000 0.796592 1.149044 2.05e-03 1.84e-03 - -2.300000 0.817654 1.120075 1.04e-03 1.22e-04 - -2.200000 0.843176 1.090371 3.09e-03 1.19e-03 - -2.100000 0.868704 1.064378 4.08e-03 1.83e-03 - -2.000000 0.893196 1.042908 3.29e-03 1.46e-03 - -1.900000 0.916762 1.026017 1.15e-03 4.82e-04 - -1.800000 0.945436 1.012933 3.95e-03 5.90e-05 - -1.700000 0.980666 1.004097 1.34e-02 6.16e-05 - -1.600000 0.998761 1.000587 6.09e-03 3.73e-04 - -1.500000 1.017448 1.000988 8.25e-05 2.63e-04 - -1.400000 1.042940 1.007750 1.32e-03 5.01e-04 - -1.300000 1.071766 1.020789 6.99e-03 2.73e-03 - -1.200000 1.096158 1.037591 9.34e-03 4.17e-03 - -1.100000 1.116122 1.057371 8.51e-03 4.38e-03 - -1.000000 1.133776 1.080322 6.77e-03 3.97e-03 - -0.900000 1.150174 1.106624 5.27e-03 3.59e-03 - -0.800000 1.165496 1.136147 4.31e-03 3.61e-03 - -0.700000 1.179450 1.168433 3.69e-03 4.05e-03 - -0.600000 1.191803 1.202813 3.25e-03 4.75e-03 - -0.500000 1.202130 1.238472 2.63e-03 5.36e-03 - -0.400000 1.210436 1.274789 1.91e-03 5.70e-03 - -0.300000 1.216680 1.310633 1.09e-03 5.08e-03 - -0.200000 1.221032 1.345104 3.63e-04 2.97e-03 - -0.100000 1.223727 1.378032 2.80e-06 4.33e-04 - 0.000000 1.224604 1.412721 1.41e-04 1.49e-03 - 0.100000 1.223128 1.449128 5.97e-04 4.77e-05 - 0.200000 1.219267 1.485113 1.40e-03 2.32e-03 - 0.300000 1.213399 1.519147 2.19e-03 4.05e-03 - 0.400000 1.206050 1.550292 2.47e-03 4.52e-03 - 0.500000 1.197696 1.577986 1.80e-03 3.37e-03 - 0.600000 1.188182 1.602312 3.75e-04 8.61e-04 - 0.700000 1.175839 1.625020 7.53e-05 1.08e-03 - 0.800000 1.159254 1.648147 1.93e-03 2.94e-04 - 0.900000 1.140173 1.669602 4.73e-03 1.27e-03 - 1.000000 1.120421 1.687986 6.59e-03 2.32e-03 - 1.100000 1.101290 1.702694 6.32e-03 2.34e-03 - 1.200000 1.083051 1.713755 3.77e-03 1.43e-03 - 1.300000 1.064474 1.721636 3.03e-04 1.38e-04 - 1.400000 1.041492 1.727466 1.33e-04 3.79e-04 - 1.500000 1.013536 1.731237 3.99e-03 9.08e-05 - 1.600000 0.984457 1.731961 8.22e-03 3.28e-05 - 1.700000 0.957111 1.729388 1.01e-02 2.55e-04 - 1.800000 0.932874 1.723796 8.61e-03 6.88e-04 - 1.900000 0.911325 1.715739 4.29e-03 7.40e-04 - 2.000000 0.890114 1.705753 2.11e-04 8.67e-05 - 2.100000 0.864107 1.692643 5.18e-04 5.41e-04 - 2.200000 0.835391 1.675464 4.70e-03 3.93e-04 - 2.300000 0.808511 1.654919 8.10e-03 2.10e-03 - 2.400000 0.785914 1.632068 8.63e-03 3.62e-03 - 2.500000 0.768154 1.608069 6.07e-03 3.91e-03 - 2.600000 0.754531 1.584376 1.48e-03 1.66e-03 - 2.700000 0.740261 1.559180 1.56e-05 1.18e-03 - 2.800000 0.724434 1.524972 2.81e-03 3.09e-03 - 2.900000 0.715918 1.492839 1.38e-03 3.57e-03 - 3.000000 0.710611 1.463290 2.53e-05 3.29e-05 - 3.100000 0.707311 1.424683 1.01e-04 4.16e-03 - 3.200000 0.708518 1.392506 8.09e-04 9.17e-04 - 3.300000 0.711954 1.355294 4.34e-04 2.00e-03 - 3.400000 0.721526 1.317145 2.78e-03 3.63e-03 - 3.500000 0.729040 1.285553 1.87e-04 1.33e-03 - 3.600000 0.746590 1.243533 3.88e-03 4.46e-03 - 3.700000 0.761014 1.212342 2.10e-03 1.61e-04 - 3.800000 0.779555 1.175901 2.05e-03 2.29e-03 - 3.900000 0.803501 1.142951 5.36e-03 2.58e-03 - 4.000000 0.819925 1.115851 5.49e-04 8.63e-04 - 4.100000 0.850182 1.084064 6.03e-03 3.01e-03 - 4.200000 0.870689 1.062493 1.86e-03 2.20e-04 - 4.300000 0.897346 1.039678 3.14e-03 1.40e-03 - 4.400000 0.925196 1.023112 5.23e-03 8.01e-04 - 4.500000 0.945438 1.011315 3.96e-04 1.43e-04 - 4.600000 0.975016 1.003205 3.46e-03 5.53e-05 - 4.700000 1.000787 1.000237 3.89e-03 1.98e-04 - 4.800000 1.023771 1.002064 2.13e-03 1.48e-04 - 4.900000 1.049731 1.010069 4.14e-03 1.33e-03 - 5.000000 1.069597 1.020192 1.03e-03 1.39e-04 - 5.100000 1.094382 1.038873 3.97e-03 2.44e-03 - 5.200000 1.111245 1.056062 2.73e-04 6.05e-04 - 5.300000 1.133607 1.083908 3.48e-03 3.29e-03 - 5.400000 1.147625 1.106806 1.32e-04 1.00e-03 - 5.500000 1.166537 1.141480 2.78e-03 3.74e-03 - 5.600000 1.177807 1.168831 2.35e-04 1.10e-03 - 5.700000 1.192487 1.207635 1.96e-03 3.76e-03 - 5.800000 1.201013 1.238372 1.36e-04 7.40e-04 - 5.900000 1.211002 1.278614 1.15e-03 3.42e-03 - 6.000000 1.216618 1.311855 3.03e-05 1.45e-04 - 6.100000 1.221705 1.351089 3.80e-04 2.82e-03 - 6.200000 1.224097 1.385673 5.79e-05 1.15e-03 - 6.300000 1.224433 1.422213 2.83e-04 2.07e-03 - 6.400000 1.223202 1.456776 1.51e-04 1.94e-03 - 6.500000 1.219174 1.489612 7.82e-04 1.28e-03 - 6.600000 1.213915 1.522834 6.29e-04 2.46e-03 - 6.700000 1.206078 1.551321 1.06e-03 5.63e-04 - 6.800000 1.196415 1.581959 1.37e-03 2.68e-03 - 6.900000 1.185452 1.605738 1.08e-03 1.44e-05 - 7.000000 1.171096 1.632645 2.34e-03 2.62e-03 + -2.900000 0.717299 1.326933 2.17e-06 2.61e-08 + -2.800000 0.727242 1.290353 5.02e-06 4.87e-08 + -2.700000 0.740244 1.254041 2.34e-06 1.64e-08 + -2.600000 0.756012 1.218400 1.45e-06 5.75e-08 + -2.500000 0.774224 1.183861 3.66e-06 4.59e-08 + -2.400000 0.794544 1.150885 1.97e-06 5.84e-08 + -2.300000 0.816613 1.119953 3.48e-06 1.01e-07 + -2.200000 0.840087 1.091560 2.43e-06 1.14e-09 + -2.100000 0.864618 1.066204 7.08e-06 2.30e-09 + -2.000000 0.889895 1.044367 7.59e-06 3.97e-08 + -1.900000 0.915607 1.026499 1.06e-05 1.44e-07 + -1.800000 0.941492 1.012991 4.02e-06 4.95e-07 + -1.700000 0.967257 1.004158 4.11e-06 4.82e-07 + -1.600000 0.992683 1.000213 9.89e-06 6.54e-07 + -1.500000 1.017558 1.001251 2.75e-05 1.04e-06 + -1.400000 1.041689 1.007247 6.33e-05 1.54e-06 + -1.300000 1.064815 1.018056 3.81e-05 1.54e-06 + -1.200000 1.086836 1.033420 1.52e-05 1.52e-06 + -1.100000 1.107689 1.052990 8.03e-05 2.09e-06 + -1.000000 1.127096 1.076348 8.61e-05 2.22e-06 + -0.900000 1.144923 1.103027 1.91e-05 1.84e-06 + -0.800000 1.161242 1.132537 5.54e-05 2.09e-06 + -0.700000 1.175875 1.164378 1.11e-04 2.44e-06 + -0.600000 1.188617 1.198062 5.95e-05 2.11e-06 + -0.500000 1.199513 1.233114 1.68e-05 1.88e-06 + -0.400000 1.208606 1.269084 8.23e-05 2.98e-06 + -0.300000 1.215709 1.305554 1.16e-04 3.26e-06 + -0.200000 1.220692 1.342134 2.30e-05 2.71e-06 + -0.100000 1.223796 1.378462 7.12e-05 3.08e-06 + 0.000000 1.224877 1.414210 1.32e-04 3.54e-06 + 0.100000 1.223793 1.449077 6.82e-05 3.15e-06 + 0.200000 1.220698 1.482788 2.92e-05 3.17e-06 + 0.300000 1.215709 1.515093 1.16e-04 4.03e-06 + 0.400000 1.208659 1.545770 1.35e-04 4.24e-06 + 0.500000 1.199523 1.574616 2.67e-05 3.55e-06 + 0.600000 1.188625 1.601447 6.77e-05 3.55e-06 + 0.700000 1.175888 1.626102 1.24e-04 3.24e-06 + 0.800000 1.161245 1.648438 5.90e-05 2.46e-06 + 0.900000 1.144927 1.668329 2.33e-05 1.85e-06 + 1.000000 1.127103 1.685665 9.32e-05 1.66e-06 + 1.100000 1.107692 1.700354 8.25e-05 1.18e-06 + 1.200000 1.086835 1.712319 1.40e-05 5.65e-07 + 1.300000 1.064818 1.721499 4.17e-05 2.90e-07 + 1.400000 1.041691 1.727845 6.55e-05 2.56e-09 + 1.500000 1.017558 1.731328 2.73e-05 4.16e-07 + 1.600000 0.992682 1.731928 8.66e-06 7.34e-07 + 1.700000 0.967276 1.729644 2.38e-05 1.04e-06 + 1.800000 0.941500 1.724486 1.27e-05 1.33e-06 + 1.900000 0.915618 1.716480 6.40e-07 1.48e-06 + 2.000000 0.889865 1.705668 3.74e-05 1.97e-06 + 2.100000 0.864463 1.692105 1.63e-04 2.89e-06 + 2.200000 0.839771 1.675861 3.18e-04 3.84e-06 + 2.300000 0.816292 1.657021 3.24e-04 3.84e-06 + 2.400000 0.794423 1.635687 1.23e-04 2.71e-06 + 2.500000 0.774078 1.611980 1.50e-04 2.70e-06 + 2.600000 0.755825 1.586036 1.88e-04 3.00e-06 + 2.700000 0.740043 1.558009 2.03e-04 3.71e-06 + 2.800000 0.727119 1.528070 1.28e-04 3.62e-06 + 2.900000 0.717266 1.496415 3.55e-05 3.11e-06 + 3.000000 0.710497 1.463260 1.40e-04 3.72e-06 + 3.100000 0.707393 1.428842 1.94e-05 3.00e-06 + 3.200000 0.707605 1.393426 1.04e-04 3.48e-06 + 3.300000 0.711478 1.357300 4.12e-05 3.10e-06 + 3.400000 0.718691 1.320783 5.83e-05 3.23e-06 + 3.500000 0.729151 1.284222 7.60e-05 3.36e-06 + 3.600000 0.742697 1.247993 1.45e-05 2.83e-06 + 3.700000 0.758850 1.212506 6.40e-05 2.82e-06 + 3.800000 0.777488 1.178197 1.79e-05 2.37e-06 + 3.900000 0.798113 1.145530 3.15e-05 2.20e-06 + 4.000000 0.820445 1.114990 2.97e-05 1.96e-06 + 4.100000 0.844142 1.087072 7.54e-06 1.64e-06 + 4.200000 0.868812 1.062275 1.99e-05 1.45e-06 + 4.300000 0.894201 1.041075 2.88e-06 1.19e-06 + 4.400000 0.919960 1.023914 3.54e-06 9.65e-07 + 4.500000 0.945847 1.011173 1.29e-05 6.70e-07 + 4.600000 0.971568 1.003150 1.10e-05 4.18e-07 + 4.700000 0.996908 1.000039 9.91e-06 1.68e-07 + 4.800000 1.021690 1.001916 4.99e-05 3.06e-07 + 4.900000 1.045717 1.008735 1.28e-04 9.66e-07 + 5.000000 1.068798 1.020329 2.33e-04 1.82e-06 + 5.100000 1.090687 1.036427 2.79e-04 2.26e-06 + 5.200000 1.111265 1.056665 2.93e-04 2.47e-06 + 5.300000 1.130409 1.080614 2.82e-04 2.48e-06 + 5.400000 1.148027 1.107804 2.70e-04 2.45e-06 + 5.500000 1.164021 1.137741 2.62e-04 2.42e-06 + 5.600000 1.178250 1.169926 2.08e-04 2.55e-06 + 5.700000 1.190798 1.203872 2.71e-04 2.75e-06 + 5.800000 1.201390 1.239109 2.40e-04 2.93e-06 + 5.900000 1.210030 1.275192 1.79e-04 2.93e-06 + 6.000000 1.216691 1.311708 1.03e-04 2.78e-06 + 6.100000 1.221360 1.348269 3.51e-05 2.63e-06 + 6.200000 1.224072 1.384523 3.32e-05 2.86e-06 + 6.300000 1.224817 1.420142 1.01e-04 3.52e-06 + 6.400000 1.223526 1.454832 1.73e-04 4.16e-06 + 6.500000 1.220166 1.488323 2.09e-04 4.52e-06 + 6.600000 1.214751 1.520371 2.07e-04 4.43e-06 + 6.700000 1.207326 1.550753 1.84e-04 4.55e-06 + 6.800000 1.197850 1.579273 6.10e-05 3.22e-06 + 6.900000 1.186555 1.605750 2.16e-05 2.46e-06 + 7.000000 1.173507 1.630024 7.15e-05 2.08e-06 ------------------------------------------------------ Final Solver Statistics: - Internal solver steps = 149 (attempted = 150) - Total number of error test failures = 0 - Total RHS evals: Fe = 1299, Fi = 4690 - Total mass matrix setups = 1249 - Total mass matrix solves = 2644 - Total mass times evals = 3540 - Total number of Jacobian evaluations = 183 - Total linear solver setups = 183 - Total number of Nonlinear iterations = 3391 - Total number of Nonlinear convergence failures = 174 - Errors: u = 0.00385864, v = 0.00235449, total = 0.0031963 + Internal solver steps = 144 (attempted = 146) + Total number of error test failures = 1 + Total RHS evals: Fe = 1265, Fi = 4680 + Total mass matrix setups = 1121 + Total mass matrix solves = 2428 + Total mass times evals = 3559 + Total number of Jacobian evaluations = 204 + Total linear solver setups = 214 + Total number of Nonlinear iterations = 3415 + Total number of Nonlinear convergence failures = 203 + Errors: u = 0.000119634, v = 2.45689e-06, total = 8.46118e-05 diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_1_-3_0_-10_0.out b/examples/arkode/CXX_serial/ark_kpr_Mt_1_-3_0_-10_0.out index b3ee50ac25..848d98ebc4 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_1_-3_0_-10_0.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_1_-3_0_-10_0.out @@ -18,6 +18,6 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: h = 3.125e-02, error = 1.482e-07, order = 2.90 h = 1.562e-02, error = 1.929e-08, order = 2.94 h = 7.812e-03, error = 2.467e-09, order = 2.97 - h = 3.906e-03, error = 3.121e-10, order = 2.98 + h = 3.906e-03, error = 3.124e-10, order = 2.98 ----------------------------------------------------- Order: max = 2.98, avg = 2.89, overall = 2.89 [SUCCESS] diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_1_-5.out b/examples/arkode/CXX_serial/ark_kpr_Mt_1_-5.out index 0dd082d2db..5c1b0cbb31 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_1_-5.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_1_-5.out @@ -13,11 +13,11 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: ----------------------------------------------------- h = 5.000e-01, error = 1.725e-05 h = 2.500e-01, error = 2.900e-06, order = 2.57 - h = 1.250e-01, error = 3.630e-07, order = 3.00 - h = 6.250e-02, error = 2.784e-08, order = 3.70 - h = 3.125e-02, error = 1.198e-09, order = 4.54 - h = 1.562e-02, error = 4.518e-11, order = 4.73 - h = 7.812e-03, error = 1.355e-11, order = 1.74 - h = 3.906e-03, error = 1.389e-10, order = -3.36 + h = 1.250e-01, error = 3.629e-07, order = 3.00 + h = 6.250e-02, error = 2.782e-08, order = 3.71 + h = 3.125e-02, error = 1.209e-09, order = 4.52 + h = 1.562e-02, error = 3.841e-11, order = 4.98 + h = 7.812e-03, error = 5.907e-11, order = -0.62 + h = 3.906e-03, error = 5.812e-10, order = -3.30 ----------------------------------------------------- - Order: max = 4.73, avg = 2.42, overall = 2.98 [SUCCESS] + Order: max = 4.98, avg = 2.12, overall = 2.69 [SUCCESS] diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_1_4.out b/examples/arkode/CXX_serial/ark_kpr_Mt_1_4.out index f50c73b72e..8f2cfc2057 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_1_4.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_1_4.out @@ -12,117 +12,117 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: t u v uerr verr ------------------------------------------------------ -3.000000 0.710636 1.363407 0.00e+00 0.00e+00 - -2.900000 0.717208 1.327305 9.30e-05 3.72e-04 - -2.800000 0.727268 1.290371 2.03e-05 1.72e-05 - -2.700000 0.740425 1.253644 1.79e-04 3.98e-04 - -2.600000 0.755801 1.218831 2.12e-04 4.31e-04 - -2.500000 0.774699 1.183143 4.72e-04 7.18e-04 - -2.400000 0.794073 1.151533 4.73e-04 6.47e-04 - -2.300000 0.817175 1.119339 5.59e-04 6.14e-04 - -2.200000 0.839499 1.092138 5.90e-04 5.78e-04 - -2.100000 0.864212 1.066598 4.13e-04 3.94e-04 - -2.000000 0.889032 1.044976 8.71e-04 6.09e-04 - -1.900000 0.914718 1.026973 9.00e-04 4.74e-04 - -1.800000 0.940179 1.013455 1.31e-03 4.63e-04 - -1.700000 0.968083 1.004047 8.31e-04 1.12e-04 - -1.600000 0.993909 1.000388 1.24e-03 1.75e-04 - -1.500000 1.017654 1.001477 1.23e-04 2.25e-04 - -1.400000 1.040934 1.007085 6.92e-04 1.64e-04 - -1.300000 1.063961 1.017604 8.15e-04 4.54e-04 - -1.200000 1.086272 1.033016 5.49e-04 4.06e-04 - -1.100000 1.107659 1.053203 4.94e-05 2.11e-04 - -1.000000 1.127623 1.077435 6.13e-04 1.08e-03 - -0.900000 1.144846 1.102917 5.76e-05 1.13e-04 - -0.800000 1.161002 1.132205 1.85e-04 3.34e-04 - -0.700000 1.176043 1.165234 2.79e-04 8.53e-04 - -0.600000 1.188410 1.197657 1.47e-04 4.07e-04 - -0.500000 1.199588 1.233521 9.12e-05 4.05e-04 - -0.400000 1.208528 1.269280 4.29e-06 1.93e-04 - -0.300000 1.215451 1.304558 1.42e-04 9.99e-04 - -0.200000 1.220755 1.343310 8.63e-05 1.17e-03 - -0.100000 1.223670 1.377830 5.45e-05 6.35e-04 - 0.000000 1.224746 1.413828 1.30e-06 3.86e-04 - 0.100000 1.223656 1.450033 6.83e-05 9.53e-04 - 0.200000 1.220713 1.482092 4.42e-05 6.99e-04 - 0.300000 1.215653 1.514717 5.94e-05 3.81e-04 - 0.400000 1.208303 1.546650 2.21e-04 8.76e-04 - 0.500000 1.199626 1.574073 1.30e-04 5.46e-04 - 0.600000 1.188765 1.600906 2.08e-04 5.44e-04 - 0.700000 1.175362 1.626884 4.02e-04 7.79e-04 - 0.800000 1.160968 1.648722 2.18e-04 2.81e-04 - 0.900000 1.145114 1.667998 2.10e-04 3.33e-04 - 1.000000 1.127514 1.685113 5.04e-04 5.53e-04 - 1.100000 1.108159 1.699899 5.49e-04 4.56e-04 - 1.200000 1.087142 1.712119 3.22e-04 2.01e-04 - 1.300000 1.064531 1.721612 2.45e-04 1.13e-04 - 1.400000 1.040958 1.728047 6.67e-04 2.01e-04 - 1.500000 1.016725 1.731456 8.05e-04 1.29e-04 - 1.600000 0.991983 1.731941 6.91e-04 1.35e-05 - 1.700000 0.966874 1.729586 3.79e-04 5.72e-05 - 1.800000 0.940784 1.724279 7.04e-04 2.06e-04 - 1.900000 0.915877 1.716442 2.59e-04 3.71e-05 - 2.000000 0.890471 1.705877 5.68e-04 2.10e-04 - 2.100000 0.863219 1.691310 1.41e-03 7.92e-04 - 2.200000 0.840201 1.675797 1.12e-04 5.96e-05 - 2.300000 0.816737 1.657004 1.21e-04 1.31e-05 - 2.400000 0.793668 1.634786 8.78e-04 8.98e-04 - 2.500000 0.774939 1.612776 7.11e-04 7.98e-04 - 2.600000 0.755378 1.585094 6.35e-04 9.39e-04 - 2.700000 0.739812 1.557192 4.34e-04 8.13e-04 - 2.800000 0.727481 1.528628 2.34e-04 5.61e-04 - 2.900000 0.717491 1.496927 1.90e-04 5.15e-04 - 3.000000 0.710508 1.462255 1.29e-04 1.00e-03 - 3.100000 0.707466 1.429783 5.39e-05 9.44e-04 - 3.200000 0.707793 1.392653 8.38e-05 7.69e-04 - 3.300000 0.711356 1.358368 1.64e-04 1.07e-03 - 3.400000 0.719043 1.319780 2.93e-04 9.99e-04 - 3.500000 0.728867 1.285263 3.60e-04 1.04e-03 - 3.600000 0.743163 1.247040 4.51e-04 9.50e-04 - 3.700000 0.759125 1.212182 2.12e-04 3.21e-04 - 3.800000 0.777005 1.178985 5.01e-04 7.90e-04 - 3.900000 0.797903 1.145840 2.41e-04 3.12e-04 - 4.000000 0.821085 1.114325 6.11e-04 6.63e-04 - 4.100000 0.844766 1.086520 6.17e-04 5.50e-04 - 4.200000 0.869296 1.061916 4.64e-04 3.57e-04 - 4.300000 0.894280 1.041111 7.58e-05 3.77e-05 - 4.400000 0.919226 1.024310 7.38e-04 3.97e-04 - 4.500000 0.947241 1.010826 1.41e-03 3.47e-04 - 4.600000 0.972517 1.003182 9.60e-04 3.27e-05 - 4.700000 0.996899 1.000222 6.87e-07 1.84e-04 - 4.800000 1.020790 1.001834 8.50e-04 8.23e-05 - 4.900000 1.044488 1.008269 1.10e-03 4.67e-04 - 5.000000 1.067577 1.019650 9.88e-04 6.81e-04 - 5.100000 1.089592 1.035682 8.16e-04 7.47e-04 - 5.200000 1.110689 1.056427 2.83e-04 2.40e-04 - 5.300000 1.130590 1.081510 4.63e-04 8.94e-04 - 5.400000 1.148014 1.108349 2.57e-04 5.43e-04 - 5.500000 1.163471 1.137100 2.88e-04 6.43e-04 - 5.600000 1.178297 1.170732 2.55e-04 8.03e-04 - 5.700000 1.190803 1.204950 2.75e-04 1.08e-03 - 5.800000 1.201254 1.239702 1.04e-04 5.91e-04 - 5.900000 1.209788 1.274961 6.34e-05 2.35e-04 - 6.000000 1.216453 1.310771 1.35e-04 9.40e-04 - 6.100000 1.221238 1.347205 8.70e-05 1.07e-03 - 6.200000 1.224075 1.385740 3.64e-05 1.21e-03 - 6.300000 1.224694 1.421145 2.19e-05 9.99e-04 - 6.400000 1.223290 1.455612 6.29e-05 7.75e-04 - 6.500000 1.219880 1.488778 7.64e-05 4.50e-04 - 6.600000 1.214417 1.521008 1.26e-04 6.32e-04 - 6.700000 1.206981 1.551430 1.61e-04 6.72e-04 - 6.800000 1.197968 1.578698 1.79e-04 5.78e-04 - 6.900000 1.186755 1.605158 2.21e-04 5.94e-04 - 7.000000 1.173344 1.630149 9.14e-05 1.23e-04 + -2.900000 0.717303 1.326933 1.41e-06 9.00e-08 + -2.800000 0.727250 1.290353 3.05e-06 3.67e-07 + -2.700000 0.740247 1.254042 1.58e-06 3.07e-07 + -2.600000 0.756016 1.218400 3.34e-06 3.18e-07 + -2.500000 0.774229 1.183863 1.87e-06 1.42e-06 + -2.400000 0.794549 1.150887 2.92e-06 1.67e-06 + -2.300000 0.816618 1.119956 2.05e-06 3.01e-06 + -2.200000 0.840090 1.091564 8.04e-07 3.49e-06 + -2.100000 0.864626 1.066208 5.07e-07 4.62e-06 + -2.000000 0.889905 1.044373 2.49e-06 5.91e-06 + -1.900000 0.915619 1.026506 1.67e-06 6.92e-06 + -1.800000 0.941488 1.013000 1.28e-07 8.31e-06 + -1.700000 0.967252 1.004167 7.11e-07 7.62e-06 + -1.600000 0.992671 1.000220 1.97e-06 6.97e-06 + -1.500000 1.017528 1.001258 2.21e-06 6.34e-06 + -1.400000 1.041624 1.007259 1.57e-06 1.01e-05 + -1.300000 1.064775 1.018068 1.63e-06 1.00e-05 + -1.200000 1.086819 1.033433 1.64e-06 1.08e-05 + -1.100000 1.107607 1.053004 1.91e-06 1.16e-05 + -1.000000 1.127008 1.076363 2.23e-06 1.36e-05 + -0.900000 1.144902 1.103043 1.90e-06 1.35e-05 + -0.800000 1.161180 1.132551 6.58e-06 1.21e-05 + -0.700000 1.175761 1.164391 2.88e-06 1.06e-05 + -0.600000 1.188555 1.198075 1.66e-06 1.09e-05 + -0.500000 1.199494 1.233127 2.39e-06 1.14e-05 + -0.400000 1.208523 1.269100 1.54e-06 1.29e-05 + -0.300000 1.215593 1.305570 2.94e-07 1.28e-05 + -0.200000 1.220668 1.342149 8.50e-07 1.20e-05 + -0.100000 1.223723 1.378476 2.01e-06 1.09e-05 + 0.000000 1.224741 1.414224 3.73e-06 1.05e-05 + 0.100000 1.223723 1.449092 1.20e-06 1.21e-05 + 0.200000 1.220668 1.482803 1.21e-06 1.17e-05 + 0.300000 1.215591 1.515108 2.74e-06 1.08e-05 + 0.400000 1.208522 1.545785 1.90e-06 1.03e-05 + 0.500000 1.199492 1.574629 3.97e-06 1.02e-05 + 0.600000 1.188555 1.601458 1.74e-06 8.35e-06 + 0.700000 1.175761 1.626112 2.87e-06 7.30e-06 + 0.800000 1.161184 1.648447 2.00e-06 6.59e-06 + 0.900000 1.144903 1.668335 8.98e-07 4.56e-06 + 1.000000 1.127005 1.685670 5.32e-06 4.04e-06 + 1.100000 1.107608 1.700357 8.68e-07 2.08e-06 + 1.200000 1.086818 1.712321 2.45e-06 1.14e-06 + 1.300000 1.064776 1.721498 4.33e-07 5.31e-07 + 1.400000 1.041624 1.727843 1.76e-06 1.91e-06 + 1.500000 1.017530 1.731324 3.22e-07 3.31e-06 + 1.600000 0.992672 1.731923 7.91e-07 5.08e-06 + 1.700000 0.967252 1.729637 7.00e-07 6.26e-06 + 1.800000 0.941487 1.724472 2.93e-07 1.28e-05 + 1.900000 0.915617 1.716467 4.48e-08 1.16e-05 + 2.000000 0.889904 1.705655 1.90e-06 1.08e-05 + 2.100000 0.864611 1.692092 1.40e-05 9.99e-06 + 2.200000 0.840090 1.675847 1.09e-06 9.68e-06 + 2.300000 0.816618 1.657006 2.22e-06 1.06e-05 + 2.400000 0.794547 1.635674 1.39e-06 1.03e-05 + 2.500000 0.774228 1.611967 3.25e-07 1.09e-05 + 2.600000 0.756014 1.586021 1.04e-06 1.22e-05 + 2.700000 0.740245 1.557992 7.23e-07 1.32e-05 + 2.800000 0.727249 1.528053 1.66e-06 1.38e-05 + 2.900000 0.717302 1.496399 8.11e-07 1.32e-05 + 3.000000 0.710637 1.463243 6.86e-07 1.39e-05 + 3.100000 0.707415 1.428826 2.59e-06 1.25e-05 + 3.200000 0.707710 1.393410 6.94e-07 1.21e-05 + 3.300000 0.711521 1.357285 1.53e-06 1.14e-05 + 3.400000 0.718751 1.320770 1.60e-06 1.01e-05 + 3.500000 0.729226 1.284209 5.55e-07 9.40e-06 + 3.600000 0.742716 1.247982 3.92e-06 8.60e-06 + 3.700000 0.758914 1.212497 4.97e-07 5.99e-06 + 3.800000 0.777505 1.178189 1.74e-06 5.18e-06 + 3.900000 0.798150 1.145523 5.73e-06 4.63e-06 + 4.000000 0.820475 1.114985 1.79e-07 2.61e-06 + 4.100000 0.844150 1.087070 2.82e-07 1.21e-06 + 4.200000 0.868833 1.062273 5.41e-07 1.95e-07 + 4.300000 0.894211 1.041074 7.05e-06 7.71e-07 + 4.400000 0.919971 1.023914 6.81e-06 1.43e-06 + 4.500000 0.945834 1.011175 5.80e-08 2.53e-06 + 4.600000 0.971556 1.003152 1.08e-06 2.89e-06 + 4.700000 0.996895 1.000042 2.64e-06 3.95e-06 + 4.800000 1.021638 1.001920 2.63e-06 4.28e-06 + 4.900000 1.045585 1.008740 3.46e-06 4.07e-06 + 5.000000 1.068562 1.020337 3.07e-06 5.68e-06 + 5.100000 1.090405 1.036435 2.52e-06 6.24e-06 + 5.200000 1.110969 1.056675 2.42e-06 7.46e-06 + 5.300000 1.130132 1.080627 4.44e-06 1.01e-05 + 5.400000 1.147758 1.107819 5.47e-07 1.21e-05 + 5.500000 1.163763 1.137757 3.73e-06 1.39e-05 + 5.600000 1.178041 1.169944 1.24e-06 1.55e-05 + 5.700000 1.190526 1.203890 2.00e-06 1.57e-05 + 5.800000 1.201147 1.239128 1.86e-06 1.64e-05 + 5.900000 1.209851 1.275211 1.54e-07 1.56e-05 + 6.000000 1.216587 1.311725 4.24e-07 1.49e-05 + 6.100000 1.221324 1.348286 9.63e-07 1.37e-05 + 6.200000 1.224037 1.384538 2.29e-06 1.25e-05 + 6.300000 1.224713 1.420159 3.01e-06 1.36e-05 + 6.400000 1.223352 1.454851 1.10e-06 1.45e-05 + 6.500000 1.219953 1.488343 3.87e-06 1.52e-05 + 6.600000 1.214543 1.520390 4.21e-07 1.50e-05 + 6.700000 1.207142 1.550771 1.08e-07 1.28e-05 + 6.800000 1.197791 1.579287 1.50e-06 1.09e-05 + 6.900000 1.186533 1.605761 3.49e-07 9.24e-06 + 7.000000 1.173440 1.630034 3.90e-06 7.57e-06 ------------------------------------------------------ Final Solver Statistics: - Internal solver steps = 286 (attempted = 289) + Internal solver steps = 284 (attempted = 287) Total number of error test failures = 3 - Total RHS evals: Fe = 0, Fi = 5808 - Total mass matrix setups = 1448 - Total mass matrix solves = 1734 - Total mass times evals = 4646 - Total number of Jacobian evaluations = 154 - Total linear solver setups = 167 - Total number of Nonlinear iterations = 4360 - Total number of Nonlinear convergence failures = 153 - Errors: u = 0.000511077, v = 0.000617033, total = 0.000566538 + Total RHS evals: Fe = 0, Fi = 5758 + Total mass matrix setups = 1438 + Total mass matrix solves = 1438 + Total mass times evals = 4604 + Total number of Jacobian evaluations = 152 + Total linear solver setups = 166 + Total number of Nonlinear iterations = 4320 + Total number of Nonlinear convergence failures = 151 + Errors: u = 2.75875e-06, v = 9.68052e-06, total = 7.1177e-06 diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_2_4_0_-10_0.out b/examples/arkode/CXX_serial/ark_kpr_Mt_2_4_0_-10_0.out index 0cb940ef35..54a56620ba 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_2_4_0_-10_0.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_2_4_0_-10_0.out @@ -116,8 +116,8 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: Final Solver Statistics: Internal solver steps = 165 (attempted = 168) Total number of error test failures = 3 - Total RHS evals: Fe = 1008, Fi = 0 - Total mass matrix setups = 676 - Total mass matrix solves = 1008 + Total RHS evals: Fe = 840, Fi = 0 + Total mass matrix setups = 672 + Total mass matrix solves = 840 Total mass times evals = 165 Errors: u = 3.7533e-06, v = 2.61601e-07, total = 2.66042e-06 diff --git a/examples/arkode/CXX_serial/ark_kpr_Mt_2_8_0_-10.out b/examples/arkode/CXX_serial/ark_kpr_Mt_2_8_0_-10.out index 8de30f8bb8..09b1fd9f98 100644 --- a/examples/arkode/CXX_serial/ark_kpr_Mt_2_8_0_-10.out +++ b/examples/arkode/CXX_serial/ark_kpr_Mt_2_8_0_-10.out @@ -11,113 +11,113 @@ Nonlinear Kvaerno-Prothero-Robinson test problem with mass matrix: t u v uerr verr ------------------------------------------------------ -3.000000 0.710636 1.363407 0.00e+00 0.00e+00 - -2.900000 0.718045 1.326475 7.44e-04 4.58e-04 - -2.800000 0.728085 1.289925 8.38e-04 4.28e-04 - -2.700000 0.741158 1.253650 9.13e-04 3.92e-04 - -2.600000 0.756981 1.218051 9.68e-04 3.49e-04 - -2.500000 0.775232 1.183562 1.00e-03 3.00e-04 - -2.400000 0.795569 1.150641 1.02e-03 2.45e-04 - -2.300000 0.817640 1.119769 1.02e-03 1.84e-04 - -2.200000 0.841097 1.091440 1.01e-03 1.20e-04 - -2.100000 0.865605 1.066152 9.79e-04 5.20e-05 - -2.000000 0.890841 1.044384 9.38e-04 1.73e-05 - -1.900000 0.916505 1.026585 8.87e-04 8.65e-05 - -1.800000 0.942316 1.013145 8.29e-04 1.54e-04 - -1.700000 0.968017 1.004376 7.65e-04 2.17e-04 - -1.600000 0.993371 1.000487 6.98e-04 2.74e-04 - -1.500000 1.018160 1.001576 6.29e-04 3.24e-04 - -1.400000 1.042187 1.007615 5.62e-04 3.66e-04 - -1.300000 1.065272 1.018458 4.95e-04 4.00e-04 - -1.200000 1.087252 1.033847 4.32e-04 4.25e-04 - -1.100000 1.107980 1.053435 3.71e-04 4.43e-04 - -1.000000 1.127323 1.076803 3.13e-04 4.53e-04 - -0.900000 1.145162 1.103486 2.58e-04 4.57e-04 - -0.800000 1.161392 1.132995 2.06e-04 4.56e-04 - -0.700000 1.175919 1.164832 1.55e-04 4.51e-04 - -0.600000 1.188664 1.198507 1.07e-04 4.43e-04 - -0.500000 1.199556 1.233548 5.93e-05 4.32e-04 - -0.400000 1.208537 1.269506 1.25e-05 4.19e-04 - -0.300000 1.215560 1.305961 3.40e-05 4.04e-04 - -0.200000 1.220588 1.342524 8.09e-05 3.87e-04 - -0.100000 1.223596 1.378834 1.28e-04 3.69e-04 - 0.000000 1.224568 1.414564 1.77e-04 3.50e-04 - 0.100000 1.223499 1.449410 2.26e-04 3.30e-04 - 0.200000 1.220392 1.483100 2.77e-04 3.09e-04 - 0.300000 1.215265 1.515385 3.29e-04 2.87e-04 - 0.400000 1.208143 1.546038 3.81e-04 2.64e-04 - 0.500000 1.199061 1.574859 4.35e-04 2.39e-04 - 0.600000 1.188067 1.601664 4.90e-04 2.14e-04 - 0.700000 1.175220 1.626292 5.44e-04 1.87e-04 - 0.800000 1.160588 1.648599 5.98e-04 1.59e-04 - 0.900000 1.144254 1.668459 6.50e-04 1.29e-04 - 1.000000 1.126309 1.685764 7.01e-04 9.76e-05 - 1.100000 1.106861 1.700420 7.49e-04 6.49e-05 - 1.200000 1.086028 1.712351 7.92e-04 3.09e-05 - 1.300000 1.063946 1.721494 8.31e-04 4.52e-06 - 1.400000 1.040763 1.727804 8.63e-04 4.11e-05 - 1.500000 1.016643 1.731249 8.87e-04 7.87e-05 - 1.600000 0.991770 1.731811 9.03e-04 1.17e-04 - 1.700000 0.966344 1.729487 9.09e-04 1.56e-04 - 1.800000 0.940584 1.724289 9.03e-04 1.95e-04 - 1.900000 0.914733 1.716245 8.85e-04 2.34e-04 - 2.000000 0.889050 1.705393 8.52e-04 2.73e-04 - 2.100000 0.863821 1.691792 8.05e-04 3.11e-04 - 2.200000 0.839347 1.675510 7.42e-04 3.47e-04 - 2.300000 0.815954 1.656637 6.62e-04 3.80e-04 - 2.400000 0.793979 1.635273 5.67e-04 4.12e-04 - 2.500000 0.773771 1.611538 4.56e-04 4.40e-04 - 2.600000 0.755681 1.585570 3.32e-04 4.64e-04 - 2.700000 0.740050 1.557522 1.96e-04 4.83e-04 - 2.800000 0.727196 1.527569 5.13e-05 4.97e-04 - 2.900000 0.717399 1.495906 9.79e-05 5.06e-04 - 3.000000 0.710883 1.462748 2.47e-04 5.09e-04 - 3.100000 0.707805 1.428334 3.92e-04 5.05e-04 - 3.200000 0.708238 1.392928 5.29e-04 4.94e-04 - 3.300000 0.712172 1.356819 6.53e-04 4.77e-04 - 3.400000 0.719510 1.320326 7.61e-04 4.53e-04 - 3.500000 0.730078 1.283796 8.52e-04 4.22e-04 - 3.600000 0.743635 1.247605 9.23e-04 3.85e-04 - 3.700000 0.759889 1.212162 9.76e-04 3.41e-04 - 3.800000 0.778515 1.177904 1.01e-03 2.91e-04 - 3.900000 0.799168 1.145293 1.02e-03 2.35e-04 - 4.000000 0.821496 1.114814 1.02e-03 1.74e-04 - 4.100000 0.845154 1.086962 1.00e-03 1.09e-04 - 4.200000 0.869806 1.062233 9.73e-04 4.04e-05 - 4.300000 0.895134 1.041103 9.30e-04 2.90e-05 - 4.400000 0.920842 1.024011 8.78e-04 9.80e-05 - 4.500000 0.946652 1.011337 8.18e-04 1.65e-04 - 4.600000 0.972311 1.003376 7.54e-04 2.27e-04 - 4.700000 0.997584 1.000322 6.86e-04 2.83e-04 - 4.800000 1.022259 1.002248 6.18e-04 3.32e-04 - 4.900000 1.046139 1.009108 5.50e-04 3.73e-04 - 5.000000 1.069050 1.020736 4.85e-04 4.05e-04 - 5.100000 1.090829 1.036858 4.21e-04 4.29e-04 - 5.200000 1.111333 1.057112 3.61e-04 4.45e-04 - 5.300000 1.130431 1.081071 3.04e-04 4.54e-04 - 5.400000 1.148006 1.108264 2.49e-04 4.57e-04 - 5.500000 1.163956 1.138199 1.97e-04 4.56e-04 - 5.600000 1.178189 1.170379 1.47e-04 4.50e-04 - 5.700000 1.190627 1.204316 9.87e-05 4.41e-04 - 5.800000 1.201201 1.239542 5.14e-05 4.30e-04 - 5.900000 1.209856 1.275612 4.71e-06 4.16e-04 - 6.000000 1.216546 1.312111 4.19e-05 4.01e-04 - 6.100000 1.221236 1.348656 8.88e-05 3.84e-04 - 6.200000 1.223902 1.384891 1.36e-04 3.66e-04 - 6.300000 1.224531 1.420493 1.85e-04 3.47e-04 - 6.400000 1.223118 1.455163 2.35e-04 3.27e-04 - 6.500000 1.219671 1.488633 2.85e-04 3.06e-04 - 6.600000 1.214206 1.520659 3.37e-04 2.83e-04 - 6.700000 1.206751 1.551018 3.90e-04 2.60e-04 - 6.800000 1.197345 1.579511 4.44e-04 2.35e-04 - 6.900000 1.186035 1.605962 4.99e-04 2.09e-04 - 7.000000 1.172883 1.630209 5.53e-04 1.82e-04 + -2.900000 0.717301 1.326933 4.07e-08 3.12e-09 + -2.800000 0.727247 1.290353 3.42e-08 2.79e-09 + -2.700000 0.740246 1.254042 2.54e-08 2.29e-09 + -2.600000 0.756013 1.218400 1.63e-08 1.73e-09 + -2.500000 0.774227 1.183861 8.20e-09 1.12e-09 + -2.400000 0.794546 1.150885 1.46e-09 4.54e-10 + -2.300000 0.816616 1.119953 3.85e-09 2.91e-10 + -2.200000 0.840089 1.091560 7.86e-09 1.15e-09 + -2.100000 0.864625 1.066204 1.08e-08 2.15e-09 + -2.000000 0.889903 1.044367 1.29e-08 3.28e-09 + -1.900000 0.915617 1.026499 1.44e-08 4.47e-09 + -1.800000 0.941488 1.012992 1.53e-08 5.61e-09 + -1.700000 0.967253 1.004159 1.58e-08 6.53e-09 + -1.600000 0.992673 1.000213 1.58e-08 7.07e-09 + -1.500000 1.017531 1.001252 1.55e-08 7.11e-09 + -1.400000 1.041625 1.007249 1.48e-08 6.62e-09 + -1.300000 1.064777 1.018058 1.40e-08 5.67e-09 + -1.200000 1.086821 1.033422 1.30e-08 4.42e-09 + -1.100000 1.107609 1.052992 1.21e-08 3.06e-09 + -1.000000 1.127010 1.076350 1.13e-08 1.77e-09 + -0.900000 1.144904 1.103029 1.06e-08 6.58e-10 + -0.800000 1.161186 1.132539 1.00e-08 2.11e-10 + -0.700000 1.175764 1.164381 9.60e-09 8.29e-10 + -0.600000 1.188557 1.198064 9.28e-09 1.22e-09 + -0.500000 1.199496 1.233116 9.06e-09 1.44e-09 + -0.400000 1.208524 1.269087 8.91e-09 1.52e-09 + -0.300000 1.215594 1.305557 8.81e-09 1.51e-09 + -0.200000 1.220669 1.342137 8.75e-09 1.43e-09 + -0.100000 1.223725 1.378465 8.72e-09 1.33e-09 + 0.000000 1.224745 1.414214 8.70e-09 1.21e-09 + 0.100000 1.223725 1.449080 8.70e-09 1.09e-09 + 0.200000 1.220669 1.482791 8.71e-09 9.72e-10 + 0.300000 1.215594 1.515097 8.74e-09 8.62e-10 + 0.400000 1.208524 1.545774 8.78e-09 7.62e-10 + 0.500000 1.199496 1.574619 8.83e-09 6.73e-10 + 0.600000 1.188557 1.601450 8.91e-09 5.94e-10 + 0.700000 1.175764 1.626105 9.01e-09 5.23e-10 + 0.800000 1.161186 1.648441 9.14e-09 4.60e-10 + 0.900000 1.144904 1.668331 9.30e-09 4.04e-10 + 1.000000 1.127010 1.685666 9.50e-09 3.53e-10 + 1.100000 1.107609 1.700355 9.75e-09 3.06e-10 + 1.200000 1.086821 1.712320 1.00e-08 2.63e-10 + 1.300000 1.064777 1.721499 1.04e-08 2.23e-10 + 1.400000 1.041625 1.727845 1.07e-08 1.85e-10 + 1.500000 1.017531 1.731328 1.11e-08 1.52e-10 + 1.600000 0.992673 1.731928 1.14e-08 1.24e-10 + 1.700000 0.967253 1.729643 1.16e-08 1.06e-10 + 1.800000 0.941488 1.724485 1.16e-08 1.01e-10 + 1.900000 0.915617 1.716479 1.13e-08 1.16e-10 + 2.000000 0.889903 1.705666 1.05e-08 1.63e-10 + 2.100000 0.864625 1.692102 8.92e-09 2.52e-10 + 2.200000 0.840089 1.675857 6.33e-09 3.98e-10 + 2.300000 0.816616 1.657017 2.42e-09 6.17e-10 + 2.400000 0.794546 1.635684 3.04e-09 9.19e-10 + 2.500000 0.774227 1.611978 1.02e-08 1.31e-09 + 2.600000 0.756013 1.586033 1.88e-08 1.79e-09 + 2.700000 0.740246 1.558005 2.85e-08 2.31e-09 + 2.800000 0.727247 1.528067 3.83e-08 2.85e-09 + 2.900000 0.717301 1.496412 4.71e-08 3.33e-09 + 3.000000 0.710636 1.463257 5.36e-08 3.70e-09 + 3.100000 0.707413 1.428839 5.66e-08 3.88e-09 + 3.200000 0.707709 1.393422 5.57e-08 3.86e-09 + 3.300000 0.711520 1.357297 5.10e-08 3.64e-09 + 3.400000 0.718750 1.320780 4.34e-08 3.27e-09 + 3.500000 0.729227 1.284218 3.41e-08 2.78e-09 + 3.600000 0.742712 1.247990 2.43e-08 2.23e-09 + 3.700000 0.758914 1.212503 1.50e-08 1.64e-09 + 3.800000 0.777506 1.178194 7.03e-09 1.01e-09 + 3.900000 0.798144 1.145528 4.85e-10 3.38e-10 + 4.000000 0.820474 1.114988 4.60e-09 4.26e-10 + 4.100000 0.844149 1.087071 8.42e-09 1.31e-09 + 4.200000 0.868832 1.062273 1.12e-08 2.33e-09 + 4.300000 0.894204 1.041074 1.32e-08 3.48e-09 + 4.400000 0.919964 1.023913 1.46e-08 4.67e-09 + 4.500000 0.945834 1.011173 1.54e-08 5.78e-09 + 4.600000 0.971557 1.003150 1.58e-08 6.65e-09 + 4.700000 0.996898 1.000038 1.58e-08 7.12e-09 + 4.800000 1.021641 1.001916 1.54e-08 7.06e-09 + 4.900000 1.045589 1.008736 1.47e-08 6.49e-09 + 5.000000 1.068565 1.020331 1.38e-08 5.47e-09 + 5.100000 1.090408 1.036429 1.29e-08 4.19e-09 + 5.200000 1.110972 1.056667 1.20e-08 2.84e-09 + 5.300000 1.130127 1.080617 1.12e-08 1.57e-09 + 5.400000 1.147757 1.107807 1.05e-08 4.94e-10 + 5.500000 1.163759 1.137743 9.95e-09 3.32e-10 + 5.600000 1.178042 1.169929 9.54e-09 9.10e-10 + 5.700000 1.190528 1.203875 9.24e-09 1.27e-09 + 5.800000 1.201149 1.239112 9.03e-09 1.46e-09 + 5.900000 1.209851 1.275195 8.89e-09 1.52e-09 + 6.000000 1.216587 1.311711 8.80e-09 1.50e-09 + 6.100000 1.221325 1.348272 8.75e-09 1.42e-09 + 6.200000 1.224039 1.384525 8.72e-09 1.31e-09 + 6.300000 1.224716 1.420146 8.70e-09 1.19e-09 + 6.400000 1.223353 1.454836 8.70e-09 1.07e-09 + 6.500000 1.219956 1.488328 8.72e-09 9.53e-10 + 6.600000 1.214544 1.520375 8.74e-09 8.44e-10 + 6.700000 1.207142 1.550758 8.78e-09 7.47e-10 + 6.800000 1.197789 1.579276 8.84e-09 6.59e-10 + 6.900000 1.186534 1.605752 8.92e-09 5.81e-10 + 7.000000 1.173436 1.630027 9.03e-09 5.12e-10 ------------------------------------------------------ Final Solver Statistics: Internal solver steps = 103 (attempted = 103) Total number of error test failures = 0 Total RHS evals: Fe = 1742, Fi = 0 - Total mass matrix setups = 1539 - Total mass matrix solves = 1845 + Total mass matrix setups = 1439 + Total mass matrix solves = 1742 Total mass times evals = 103 - Errors: u = 0.000634856, v = 0.000337591, total = 0.000508434 + Errors: u = 1.83418e-08, v = 2.86413e-09, total = 1.31268e-08 diff --git a/examples/arkode/CXX_serial/ark_pendulum.cpp b/examples/arkode/CXX_serial/ark_pendulum.cpp index d56ee752b8..a0a0cf3090 100644 --- a/examples/arkode/CXX_serial/ark_pendulum.cpp +++ b/examples/arkode/CXX_serial/ark_pendulum.cpp @@ -209,6 +209,9 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKStepSetFixedStep")) return 1; } + flag = ARKStepSetNonlinConvCoef(arkode_mem, SUN_RCONST(0.01)); + if (check_flag(flag, "ARKStepSetNonlinConvCoef")) return 1; + /* --------------- * * Advance in Time * * --------------- */ diff --git a/examples/arkode/CXX_serial/ark_pendulum.out b/examples/arkode/CXX_serial/ark_pendulum.out index dca1a58ccb..94c4259cfd 100644 --- a/examples/arkode/CXX_serial/ark_pendulum.out +++ b/examples/arkode/CXX_serial/ark_pendulum.out @@ -7,29 +7,29 @@ Nonlinear Pendulum problem: step t u v e e err --------------------------------------------------------------------------------------------------------------------------- 0 0.000000000000000e+00 1.500000000000000e+00 1.000000000000000e+00 5.846976941318602e-01 0.000000000000000e+00 - 1000 1.226511879534299e+00 3.458488320982976e-01 2.123384535074106e+00 5.846976941318555e-01 -4.773959005888173e-15 - 2000 2.398784336118560e+00 -6.416442371616857e-01 1.959343228667432e+00 5.846976941318377e-01 -2.253752739989068e-14 - 3000 3.618483293504332e+00 -1.718124366999066e+00 4.706406225355917e-01 5.846976941318435e-01 -1.676436767183986e-14 - 4000 4.580865391430372e+00 -1.411700239944070e+00 -1.146421559917496e+00 5.846976941318369e-01 -2.331468351712829e-14 - 5000 5.877850661141863e+00 -2.026377125271683e-01 -2.170219947005763e+00 5.846976941318408e-01 -1.942890293094024e-14 - 6000 7.079795692175875e+00 8.320973704310155e-01 -1.811622127832077e+00 5.846976941318234e-01 -3.685940441755520e-14 - 7000 8.313428698722841e+00 1.777791699609239e+00 -9.412012907795819e-02 5.846976941318288e-01 -3.141931159689193e-14 - 8000 9.289846347799413e+00 1.192220279192671e+00 1.444463648145965e+00 5.846976941318289e-01 -3.130828929442941e-14 + 1000 1.225851562364904e+00 3.464109129286753e-01 2.123155979647627e+00 5.846976941318590e-01 -1.221245327087672e-15 + 2000 2.418923205034655e+00 -6.603311992497419e-01 1.946233242793910e+00 5.846976941317269e-01 -1.333377852574813e-13 + 3000 3.660149066899992e+00 -1.735668411457896e+00 3.986787133040775e-01 5.846976941317225e-01 -1.377786773559819e-13 + 4000 4.623294832907320e+00 -1.372538839057398e+00 -1.205491805789652e+00 5.846976941317235e-01 -1.367794766338193e-13 + 5000 5.934005658137125e+00 -1.564401075076330e-01 -2.180300444219520e+00 5.846976941317296e-01 -1.306732499983809e-13 + 6000 7.123567932980419e+00 8.747899699484564e-01 -1.774266316025390e+00 5.846976941316223e-01 -2.379207941771710e-13 + 7000 8.350624078669346e+00 1.780060261145096e+00 -2.794469129917746e-02 5.846976941316284e-01 -2.318145675417327e-13 + 8000 9.285790680382140e+00 1.196242389800009e+00 1.439620221946003e+00 5.846976941316235e-01 -2.366995488500834e-13 --------------------------------------------------------------------------------------------------------------------------- Final Solver Statistics: - Internal solver steps = 8518 (attempted = 8528) + Internal solver steps = 8552 (attempted = 8562) Total number of error test failures = 10 - Total RHS evals: Fe = 0, Fi = 50909 - Total number of Newton iterations = 25332 - Total number of linear solver convergence failures = 5 - Total linear solver setups = 459 - Total number of Jacobian evaluations = 146 + Total RHS evals: Fe = 0, Fi = 52696 + Total number of Newton iterations = 27018 + Total number of linear solver convergence failures = 11 + Total linear solver setups = 471 + Total number of Jacobian evaluations = 150 Total RHS evals for setting up the linear system = 0 - Total Relaxation Fn evals = 25494 - Total Relaxation Jac evals = 25494 + Total Relaxation Fn evals = 25424 + Total Relaxation Jac evals = 25424 Total Relaxation fails = 0 Total Relaxation bound fails = 0 Total Relaxation NLS fails = 0 - Total Relaxation NLS iters = 8438 + Total Relaxation NLS iters = 8300 diff --git a/examples/arkode/CXX_superludist/ark_brusselator1D_FEM_sludist.out b/examples/arkode/CXX_superludist/ark_brusselator1D_FEM_sludist.out index 1cf56e4da4..61563dca16 100644 --- a/examples/arkode/CXX_superludist/ark_brusselator1D_FEM_sludist.out +++ b/examples/arkode/CXX_superludist/ark_brusselator1D_FEM_sludist.out @@ -12,68 +12,68 @@ 0.300000 0.648532 3.334867 1.999989 0.400000 0.654362 3.323350 1.999989 0.500000 0.660542 3.311172 1.999988 - 0.600000 0.667093 3.298310 1.999988 - 0.700000 0.674031 3.284739 1.999988 + 0.600000 0.667093 3.298309 1.999988 + 0.700000 0.674031 3.284739 1.999989 0.800000 0.681370 3.270442 1.999988 0.900000 0.689121 3.255404 1.999988 - 1.000000 0.697285 3.239620 1.999988 - 1.100000 0.705854 3.223093 1.999987 + 1.000000 0.697284 3.239620 1.999988 + 1.100000 0.705853 3.223093 1.999987 1.200000 0.714805 3.205842 1.999987 - 1.300000 0.724099 3.187902 1.999987 - 1.400000 0.733671 3.169332 1.999987 - 1.500000 0.743429 3.150211 1.999987 - 1.600000 0.753249 3.130653 1.999987 - 1.700000 0.762974 3.110800 1.999986 - 1.800000 0.772412 3.090827 1.999986 - 1.900000 0.781337 3.070944 1.999986 - 2.000000 0.789501 3.051388 1.999986 - 2.100000 0.796639 3.032420 1.999986 - 2.200000 0.802490 3.014317 1.999986 - 2.300000 0.806810 2.997358 1.999986 - 2.400000 0.809386 2.981818 1.999986 - 2.500000 0.810060 2.967949 1.999986 - 2.600000 0.808729 2.955977 1.999986 - 2.700000 0.805360 2.946085 1.999986 - 2.800000 0.799989 2.938410 1.999986 - 2.900000 0.792711 2.933039 1.999986 - 3.000000 0.783680 2.930010 1.999986 - 3.100000 0.773095 2.929307 1.999986 - 3.200000 0.761187 2.930873 1.999986 - 3.300000 0.748207 2.934612 1.999987 - 3.400000 0.734416 2.940393 1.999987 - 3.500000 0.720073 2.948062 1.999987 + 1.300000 0.724098 3.187903 1.999987 + 1.400000 0.733670 3.169332 1.999987 + 1.500000 0.743428 3.150212 1.999987 + 1.600000 0.753248 3.130655 1.999987 + 1.700000 0.762974 3.110801 1.999986 + 1.800000 0.772411 3.090829 1.999986 + 1.900000 0.781336 3.070946 1.999986 + 2.000000 0.789499 3.051390 1.999986 + 2.100000 0.796638 3.032422 1.999986 + 2.200000 0.802489 3.014319 1.999986 + 2.300000 0.806808 2.997360 1.999986 + 2.400000 0.809386 2.981819 1.999986 + 2.500000 0.810059 2.967951 1.999986 + 2.600000 0.808728 2.955979 1.999986 + 2.700000 0.805361 2.946086 1.999986 + 2.800000 0.799988 2.938411 1.999986 + 2.900000 0.792711 2.933041 1.999986 + 3.000000 0.783681 2.930010 1.999986 + 3.100000 0.773096 2.929307 1.999986 + 3.200000 0.761187 2.930874 1.999986 + 3.300000 0.748207 2.934613 1.999987 + 3.400000 0.734416 2.940394 1.999987 + 3.500000 0.720074 2.948062 1.999987 3.600000 0.705429 2.957444 1.999987 - 3.700000 0.690714 2.968354 1.999988 + 3.700000 0.690715 2.968354 1.999988 3.800000 0.676141 2.980600 1.999988 - 3.900000 0.661891 2.993989 1.999988 - 4.000000 0.648122 3.008331 1.999989 - 4.100000 0.634961 3.023445 1.999989 + 3.900000 0.661892 2.993989 1.999988 + 4.000000 0.648123 3.008331 1.999989 + 4.100000 0.634962 3.023445 1.999989 4.200000 0.622506 3.039157 1.999989 4.300000 0.610828 3.055308 1.999989 - 4.400000 0.599972 3.071752 1.999989 + 4.400000 0.599972 3.071751 1.999989 4.500000 0.589962 3.088356 1.999990 4.600000 0.580801 3.105007 1.999990 - 4.700000 0.572477 3.121603 1.999990 - 4.800000 0.564964 3.138059 1.999990 + 4.700000 0.572477 3.121602 1.999990 + 4.800000 0.564964 3.138058 1.999990 4.900000 0.558227 3.154303 1.999990 - 5.000000 0.552224 3.170278 1.999990 + 5.000000 0.552224 3.170277 1.999990 5.100000 0.546907 3.185935 1.999991 - 5.200000 0.542228 3.201239 1.999991 - 5.300000 0.538137 3.216162 1.999991 - 5.400000 0.534585 3.230683 1.999991 + 5.200000 0.542229 3.201239 1.999991 + 5.300000 0.538138 3.216162 1.999991 + 5.400000 0.534586 3.230682 1.999991 5.500000 0.531525 3.244788 1.999991 - 5.600000 0.528910 3.258469 1.999991 - 5.700000 0.526699 3.271720 1.999991 + 5.600000 0.528910 3.258468 1.999991 + 5.700000 0.526699 3.271719 1.999991 5.800000 0.524852 3.284539 1.999991 5.900000 0.523334 3.296928 1.999991 - 6.000000 0.522111 3.308889 1.999991 - 6.100000 0.521154 3.320427 1.999991 + 6.000000 0.522112 3.308889 1.999991 + 6.100000 0.521154 3.320426 1.999991 6.200000 0.520436 3.331545 1.999991 - 6.300000 0.519932 3.342251 1.999991 + 6.300000 0.519932 3.342250 1.999991 6.400000 0.519621 3.352549 1.999991 - 6.500000 0.519484 3.362447 1.999991 - 6.600000 0.519503 3.371950 1.999991 - 6.700000 0.519664 3.381065 1.999991 + 6.500000 0.519484 3.362446 1.999991 + 6.600000 0.519503 3.371949 1.999991 + 6.700000 0.519664 3.381064 1.999991 6.800000 0.519953 3.389797 1.999991 6.900000 0.520358 3.398153 1.999991 7.000000 0.520869 3.406139 1.999991 @@ -86,37 +86,37 @@ 7.700000 0.526775 3.452091 1.999991 7.800000 0.527887 3.457288 1.999991 7.900000 0.529055 3.462154 1.999991 - 8.000000 0.530276 3.466693 1.999991 - 8.100000 0.531549 3.470907 1.999991 + 8.000000 0.530276 3.466692 1.999991 + 8.100000 0.531549 3.470906 1.999991 8.200000 0.532872 3.474798 1.999991 8.300000 0.534244 3.478370 1.999991 8.400000 0.535665 3.481625 1.999991 - 8.500000 0.537133 3.484563 1.999991 + 8.500000 0.537133 3.484564 1.999991 8.600000 0.538649 3.487188 1.999991 8.700000 0.540213 3.489499 1.999991 - 8.800000 0.541825 3.491497 1.999991 - 8.900000 0.543486 3.493184 1.999991 + 8.800000 0.541825 3.491498 1.999991 + 8.900000 0.543486 3.493185 1.999991 9.000000 0.545196 3.494560 1.999991 9.100000 0.546957 3.495624 1.999991 9.200000 0.548771 3.496375 1.999991 9.300000 0.550638 3.496814 1.999990 - 9.400000 0.552562 3.496938 1.999990 + 9.400000 0.552561 3.496938 1.999990 9.500000 0.554543 3.496746 1.999990 - 9.600000 0.556585 3.496235 1.999990 + 9.600000 0.556585 3.496236 1.999990 9.700000 0.558691 3.495404 1.999990 - 9.800000 0.560864 3.494247 1.999990 + 9.800000 0.560864 3.494248 1.999990 9.900000 0.563108 3.492763 1.999990 10.000000 0.565426 3.490945 1.999990 ---------------------------------------------- Final Solver Statistics: Internal solver steps = 95 (attempted = 95) - Total RHS evals: Fe = 0, Fi = 1605 + Total RHS evals: Fe = 0, Fi = 1596 Total mass matrix setups = 1 - Total mass matrix solves = 288 - Total mass times evals = 1697 + Total mass matrix solves = 193 + Total mass times evals = 1688 Total linear solver setups = 31 Total number of Jacobian evaluations = 11 - Total number of Newton iterations = 1127 + Total number of Newton iterations = 1118 Total number of nonlinear solver convergence failures = 10 Total number of error test failures = 0 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 9aae281556..f20e4c97e0 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid.cpp +++ b/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid.cpp @@ -358,6 +358,7 @@ int main(int argc, char* argv[]) 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 // Timing variables double t1 = 0.0; @@ -559,9 +560,11 @@ int main(int argc, char* argv[]) // Set adaptive stepping (XBraid with temporal refinement) options if (udata->x_refine) { - // Use I controller - flag = ARKStepSetAdaptivityMethod(arkode_mem, ARK_ADAPT_I, 1, 0, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + // Use I controller with default parameters + C = SUNAdaptController_I(ctx); + if (check_flag((void*) C, "SUNAdaptController_I", 0)) return 1; + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; // Set the step size reduction factor limit (1 / refinement factor limit) flag = ARKStepSetMinReduction(arkode_mem, ONE / udata->x_rfactor_limit); @@ -741,15 +744,16 @@ int main(int argc, char* argv[]) 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 - 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 - SUNContext_Free(&ctx); // Free context - flag = MPI_Finalize(); // Finalize MPI + braid_Destroy(core); // Free braid memory + ARKBraid_Free(&app); // Free interface memory + (void) SUNAdaptController_Destroy(C); // Free time adaptivity controller + SUNContext_Free(&ctx); // Free context + flag = MPI_Finalize(); // Finalize MPI return 0; } diff --git a/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid_--np_2_1_2_--x_print_level_0.out b/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid_--np_2_1_2_--x_print_level_0.out index bd7bba7149..978c7d9928 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid_--np_2_1_2_--x_print_level_0.out +++ b/examples/arkode/CXX_xbraid/ark_heat2D_hypre_pfmg_xbraid_--np_2_1_2_--x_print_level_0.out @@ -45,13 +45,13 @@ output = 1 --------------------------------- - Max error = 3.297223456216303e-03 + Max error = 3.297223495382084e-03 Final max integrator statistics: Steps = 1780 Step attempts = 1780 Error test fails = 450 - RHS evals = 14240 + RHS evals = 12460 NLS iters = 5340 NLS fails = 0 LS iters = 30510 diff --git a/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid.cpp b/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid.cpp index 938562ce40..a9d90df9bd 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid.cpp +++ b/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid.cpp @@ -315,6 +315,7 @@ int main(int argc, char* argv[]) 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 // Timing variables double t1 = 0.0; @@ -506,9 +507,11 @@ int main(int argc, char* argv[]) // Set adaptive stepping (XBraid with temporal refinement) options if (udata->x_refine) { - // Use I controller - flag = ARKStepSetAdaptivityMethod(arkode_mem, ARK_ADAPT_I, 1, 0, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + // Use I controller with default parameters + C = SUNAdaptController_I(ctx); + if (check_flag((void*) C, "SUNAdaptController_I", 0)) return 1; + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; // Set the step size reduction factor limit (1 / refinement factor limit) flag = ARKStepSetMinReduction(arkode_mem, ONE / udata->x_rfactor_limit); @@ -688,15 +691,16 @@ int main(int argc, char* argv[]) 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 - 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 - SUNContext_Free(&ctx); // Free context - flag = MPI_Finalize(); // Finalize MPI + braid_Destroy(core); // Free braid memory + ARKBraid_Free(&app); // Free interface memory + (void) SUNAdaptController_Destroy(C); // Free time adaptivity controller + SUNContext_Free(&ctx); // Free context + flag = MPI_Finalize(); // Finalize MPI return 0; } diff --git a/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid_--np_2_1_2_--x_print_level_0.out b/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid_--np_2_1_2_--x_print_level_0.out index 4e2d372699..744747849a 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid_--np_2_1_2_--x_print_level_0.out +++ b/examples/arkode/CXX_xbraid/ark_heat2D_p_xbraid_--np_2_1_2_--x_print_level_0.out @@ -42,24 +42,24 @@ output = 1 --------------------------------- - Max error = 3.297223517807257e-03 + Max error = 3.297223330406052e-03 Final max integrator statistics: Steps = 1780 Step attempts = 1780 Error test fails = 450 - RHS evals = 14240 + RHS evals = 12460 NLS iters = 5340 NLS fails = 0 - LS iters = 189634 + LS iters = 188622 LS fails = 0 LS setups = 1780 - LS RHS evals = 189634 - Jv products = 189634 + LS RHS evals = 188622 + Jv products = 188622 Avg NLS iters per step attempt = 3.000000 - Avg LS iters per NLS iter = 35.511985 + Avg LS iters per NLS iter = 35.322472 Preconditioner setups = 1780 - Preconditioner solves = 189634 + Preconditioner solves = 188622 diff --git a/examples/arkode/CXX_xbraid/ark_heat2D_xbraid.cpp b/examples/arkode/CXX_xbraid/ark_heat2D_xbraid.cpp index 5e4a0b9104..1b146d8a80 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_xbraid.cpp +++ b/examples/arkode/CXX_xbraid/ark_heat2D_xbraid.cpp @@ -239,14 +239,15 @@ static int check_flag(void *flagvalue, const string funcname, int opt); int main(int argc, char* argv[]) { - int flag; // reusable error-checking flag - UserData *udata = NULL; // user data structure - 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 + int flag; // reusable error-checking flag + UserData *udata = NULL; // user data structure + 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 // Timing variables chrono::time_point t1; @@ -444,9 +445,11 @@ int main(int argc, char* argv[]) // Set adaptive stepping (XBraid with temporal refinement) options if (udata->x_refine) { - // Use I controller - flag = ARKStepSetAdaptivityMethod(arkode_mem, ARK_ADAPT_I, 1, 0, NULL); - if (check_flag(&flag, "ARKStepSetAdaptivityMethod", 1)) return 1; + // Use I controller with default parameters + C = SUNAdaptController_I(ctx); + if (check_flag((void*) C, "SUNAdaptController_I", 0)) return 1; + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; // Set the step size reduction factor limit (1 / refinement factor limit) flag = ARKStepSetMinReduction(arkode_mem, ONE / udata->x_rfactor_limit); @@ -626,15 +629,16 @@ int main(int argc, char* argv[]) 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 - SUNContext_Free(&ctx); // Free context - flag = MPI_Finalize(); // Finalize MPI + braid_Destroy(core); // Free braid memory + ARKBraid_Free(&app); // Free interface memory + (void) SUNAdaptController_Destroy(C); // Free time adaptivity controller + SUNContext_Free(&ctx); // Free context + flag = MPI_Finalize(); // Finalize MPI return 0; } diff --git a/examples/arkode/CXX_xbraid/ark_heat2D_xbraid_--x_print_level_0.out b/examples/arkode/CXX_xbraid/ark_heat2D_xbraid_--x_print_level_0.out index f9de301b00..90b4dedf7a 100644 --- a/examples/arkode/CXX_xbraid/ark_heat2D_xbraid_--x_print_level_0.out +++ b/examples/arkode/CXX_xbraid/ark_heat2D_xbraid_--x_print_level_0.out @@ -37,24 +37,24 @@ output = 1 --------------------------------- - Max error = 3.297223770518998e-03 + Max error = 3.297223425028251e-03 Final max integrator statistics: Steps = 895 Step attempts = 895 Error test fails = 324 - RHS evals = 7160 + RHS evals = 6265 NLS iters = 2685 NLS fails = 0 - LS iters = 98385 + LS iters = 97779 LS fails = 0 LS setups = 895 - LS RHS evals = 98385 - Jv products = 98385 + LS RHS evals = 97779 + Jv products = 97779 Avg NLS iters per step attempt = 3.000000 - Avg LS iters per NLS iter = 36.642458 + Avg LS iters per NLS iter = 36.416760 Preconditioner setups = 895 - Preconditioner solves = 98385 + Preconditioner solves = 97779 diff --git a/examples/arkode/C_manyvector/ark_brusselator1D_manyvec.out b/examples/arkode/C_manyvector/ark_brusselator1D_manyvec.out index ab197185fe..6366fd534c 100644 --- a/examples/arkode/C_manyvector/ark_brusselator1D_manyvec.out +++ b/examples/arkode/C_manyvector/ark_brusselator1D_manyvec.out @@ -32,7 +32,7 @@ 2.300000 1.178983 2.282911 1.999977 2.400000 1.156873 2.248486 1.999978 2.500000 1.128176 2.220852 1.999978 - 2.600000 1.094311 2.199774 1.999979 + 2.600000 1.094311 2.199774 1.999978 2.700000 1.056614 2.184957 1.999979 2.800000 1.016284 2.176069 1.999980 2.900000 0.974366 2.172745 1.999981 @@ -64,7 +64,7 @@ 5.500000 0.354771 2.869085 1.999993 5.600000 0.349641 2.900573 1.999993 5.700000 0.345224 2.931786 1.999993 - 5.800000 0.341455 2.962716 1.999994 + 5.800000 0.341455 2.962716 1.999993 5.900000 0.338270 2.993362 1.999994 6.000000 0.335614 3.023721 1.999994 6.100000 0.333434 3.053792 1.999994 @@ -82,9 +82,9 @@ 7.300000 0.331130 3.392178 1.999994 7.400000 0.332202 3.418486 1.999994 7.500000 0.333401 3.444494 1.999994 - 7.600000 0.334721 3.470197 1.999994 - 7.700000 0.336154 3.495592 1.999994 - 7.800000 0.337695 3.520673 1.999994 + 7.600000 0.334721 3.470197 1.999993 + 7.700000 0.336154 3.495592 1.999993 + 7.800000 0.337695 3.520673 1.999993 7.900000 0.339341 3.545436 1.999993 8.000000 0.341088 3.569873 1.999993 8.100000 0.342934 3.593980 1.999993 @@ -100,18 +100,18 @@ 9.100000 0.366830 3.814901 1.999993 9.200000 0.369812 3.834729 1.999993 9.300000 0.372919 3.854085 1.999993 - 9.400000 0.376159 3.872952 1.999993 - 9.500000 0.379540 3.891308 1.999993 - 9.600000 0.383069 3.909132 1.999993 + 9.400000 0.376159 3.872952 1.999992 + 9.500000 0.379540 3.891308 1.999992 + 9.600000 0.383069 3.909132 1.999992 9.700000 0.386758 3.926398 1.999992 - 9.800000 0.390617 3.943079 1.999992 - 9.900000 0.394659 3.959146 1.999992 - 10.000000 0.398900 3.974566 1.999992 + 9.800000 0.390617 3.943079 1.999993 + 9.900000 0.394659 3.959146 1.999993 + 10.000000 0.398900 3.974566 1.999993 ---------------------------------------------- Final Solver Statistics: Internal solver steps = 395 (attempted = 422) - Total RHS evals: Fe = 2535, Fi = 7165 + Total RHS evals: Fe = 2508, Fi = 7138 Total linear solver setups = 0 Total linear iterations = 15143 Total linear convergence failures = 0 diff --git a/examples/arkode/C_openmp/ark_brusselator1D_omp.out b/examples/arkode/C_openmp/ark_brusselator1D_omp.out index 1c209cc20f..9d254eaac0 100644 --- a/examples/arkode/C_openmp/ark_brusselator1D_omp.out +++ b/examples/arkode/C_openmp/ark_brusselator1D_omp.out @@ -9,102 +9,102 @@ t ||u||_rms ||v||_rms ||w||_rms ---------------------------------------------- 0.100000 0.673914 3.377329 1.999987 - 0.200000 0.684316 3.356619 1.999987 + 0.200000 0.684316 3.356619 1.999986 0.300000 0.695306 3.334633 1.999986 0.400000 0.706918 3.311313 1.999986 0.500000 0.719185 3.286601 1.999986 0.600000 0.732137 3.260442 1.999986 0.700000 0.745798 3.232787 1.999985 0.800000 0.760185 3.203596 1.999985 - 0.900000 0.775303 3.172839 1.999985 + 0.900000 0.775302 3.172839 1.999985 1.000000 0.791135 3.140510 1.999984 1.100000 0.807648 3.106624 1.999984 1.200000 0.824771 3.071233 1.999984 1.300000 0.842402 3.034426 1.999983 1.400000 0.860384 2.996350 1.999983 - 1.500000 0.878514 2.957206 1.999983 + 1.500000 0.878514 2.957207 1.999983 1.600000 0.896525 2.917266 1.999982 1.700000 0.914089 2.876873 1.999982 1.800000 0.930823 2.836438 1.999982 1.900000 0.946292 2.796446 1.999982 - 2.000000 0.960033 2.757430 1.999981 - 2.100000 0.971576 2.719962 1.999981 - 2.200000 0.980475 2.684623 1.999981 + 2.000000 0.960034 2.757430 1.999981 + 2.100000 0.971577 2.719961 1.999981 + 2.200000 0.980476 2.684622 1.999981 2.300000 0.986338 2.651980 1.999981 - 2.400000 0.988852 2.622560 1.999981 - 2.500000 0.987815 2.596818 1.999981 - 2.600000 0.983141 2.575128 1.999981 - 2.700000 0.974858 2.557766 1.999981 - 2.800000 0.963114 2.544903 1.999981 - 2.900000 0.948154 2.536611 1.999981 - 3.000000 0.930299 2.532868 1.999982 - 3.100000 0.909930 2.533567 1.999982 - 3.200000 0.887464 2.538529 1.999983 - 3.300000 0.863335 2.547515 1.999983 - 3.400000 0.837978 2.560241 1.999983 + 2.400000 0.988853 2.622559 1.999981 + 2.500000 0.987816 2.596818 1.999981 + 2.600000 0.983141 2.575127 1.999981 + 2.700000 0.974859 2.557765 1.999981 + 2.800000 0.963115 2.544902 1.999981 + 2.900000 0.948155 2.536610 1.999981 + 3.000000 0.930300 2.532867 1.999982 + 3.100000 0.909931 2.533566 1.999982 + 3.200000 0.887464 2.538528 1.999983 + 3.300000 0.863335 2.547514 1.999983 + 3.400000 0.837978 2.560240 1.999983 3.500000 0.811818 2.576391 1.999984 3.600000 0.785255 2.595624 1.999984 - 3.700000 0.758659 2.617587 1.999985 - 3.800000 0.732363 2.641922 1.999986 + 3.700000 0.758658 2.617586 1.999985 + 3.800000 0.732363 2.641921 1.999986 3.900000 0.706662 2.668274 1.999986 4.000000 0.681809 2.696300 1.999986 - 4.100000 0.658012 2.725670 1.999987 + 4.100000 0.658011 2.725670 1.999987 4.200000 0.635435 2.756075 1.999987 - 4.300000 0.614205 2.787228 1.999988 + 4.300000 0.614204 2.787228 1.999988 4.400000 0.594404 2.818869 1.999988 4.500000 0.576082 2.850764 1.999989 - 4.600000 0.559255 2.882710 1.999989 + 4.600000 0.559254 2.882710 1.999989 4.700000 0.543909 2.914529 1.999989 4.800000 0.530011 2.946071 1.999990 - 4.900000 0.517506 2.977209 1.999990 + 4.900000 0.517506 2.977210 1.999990 5.000000 0.506326 3.007843 1.999990 - 5.100000 0.496394 3.037889 1.999990 - 5.200000 0.487626 3.067283 1.999990 + 5.100000 0.496393 3.037889 1.999990 + 5.200000 0.487625 3.067283 1.999990 5.300000 0.479935 3.095976 1.999991 5.400000 0.473237 3.123932 1.999991 - 5.500000 0.467445 3.151125 1.999991 + 5.500000 0.467445 3.151126 1.999991 5.600000 0.462480 3.177540 1.999991 5.700000 0.458264 3.203165 1.999991 5.800000 0.454726 3.227997 1.999991 - 5.900000 0.451800 3.252035 1.999991 + 5.900000 0.451799 3.252035 1.999991 6.000000 0.449425 3.275283 1.999991 - 6.100000 0.447546 3.297744 1.999991 + 6.100000 0.447546 3.297745 1.999991 6.200000 0.446115 3.319428 1.999991 - 6.300000 0.445086 3.340340 1.999991 - 6.400000 0.444419 3.360491 1.999991 - 6.500000 0.444079 3.379890 1.999991 + 6.300000 0.445085 3.340341 1.999991 + 6.400000 0.444419 3.360492 1.999991 + 6.500000 0.444079 3.379891 1.999991 6.600000 0.444034 3.398547 1.999991 6.700000 0.444257 3.416470 1.999991 6.800000 0.444722 3.433669 1.999991 6.900000 0.445409 3.450154 1.999991 - 7.000000 0.446297 3.465934 1.999991 + 7.000000 0.446297 3.465935 1.999991 7.100000 0.447370 3.481018 1.999991 - 7.200000 0.448614 3.495414 1.999991 + 7.200000 0.448614 3.495415 1.999991 7.300000 0.450016 3.509131 1.999991 7.400000 0.451564 3.522176 1.999991 7.500000 0.453249 3.534557 1.999991 7.600000 0.455064 3.546280 1.999991 7.700000 0.457000 3.557353 1.999991 7.800000 0.459052 3.567781 1.999991 - 7.900000 0.461216 3.577571 1.999991 - 8.000000 0.463486 3.586728 1.999991 + 7.900000 0.461215 3.577572 1.999991 + 8.000000 0.463486 3.586729 1.999991 8.100000 0.465860 3.595257 1.999991 8.200000 0.468335 3.603162 1.999991 8.300000 0.470909 3.610447 1.999991 8.400000 0.473582 3.617116 1.999991 - 8.500000 0.476352 3.623171 1.999991 + 8.500000 0.476352 3.623172 1.999991 8.600000 0.479220 3.628616 1.999991 8.700000 0.482186 3.633451 1.999991 8.800000 0.485250 3.637679 1.999990 8.900000 0.488416 3.641299 1.999990 - 9.000000 0.491684 3.644311 1.999990 - 9.100000 0.495058 3.646715 1.999990 - 9.200000 0.498540 3.648509 1.999990 - 9.300000 0.502134 3.649691 1.999990 - 9.400000 0.505844 3.650257 1.999990 - 9.500000 0.509675 3.650202 1.999990 - 9.600000 0.513632 3.649521 1.999990 - 9.700000 0.517722 3.648209 1.999990 + 9.000000 0.491684 3.644312 1.999990 + 9.100000 0.495058 3.646716 1.999990 + 9.200000 0.498539 3.648510 1.999990 + 9.300000 0.502133 3.649691 1.999990 + 9.400000 0.505843 3.650257 1.999990 + 9.500000 0.509674 3.650202 1.999990 + 9.600000 0.513632 3.649522 1.999990 + 9.700000 0.517722 3.648210 1.999990 9.800000 0.521951 3.646257 1.999990 9.900000 0.526326 3.643656 1.999990 10.000000 0.530857 3.640396 1.999990 diff --git a/examples/arkode/C_openmpdev/ark_heat1D_adapt_ompdev.c b/examples/arkode/C_openmpdev/ark_heat1D_adapt_ompdev.c index 82b50d1a4d..bdadafc89b 100644 --- a/examples/arkode/C_openmpdev/ark_heat1D_adapt_ompdev.c +++ b/examples/arkode/C_openmpdev/ark_heat1D_adapt_ompdev.c @@ -121,6 +121,7 @@ int main() { N_Vector yt = NULL; /* empty vector for swapping */ SUNLinearSolver LS = NULL; /* empty linear solver object */ void *arkode_mem = NULL; /* empty ARKode memory structure */ + SUNAdaptController C = NULL; /* empty controller object */ FILE *XFID, *UFID; realtype t, olddt, newdt; realtype *xnew_host = NULL; @@ -189,6 +190,12 @@ int main() { flag = ARKStepSetPredictorMethod(arkode_mem, 0); /* Set predictor method */ if (check_flag(&flag, "ARKStepSetPredictorMethod", 1)) return 1; + /* Specify I-controller with default parameters */ + C = SUNAdaptController_I(ctx); + if (check_flag((void *)C, "SUNAdaptController_I", 0)) return 1; + flag = ARKStepSetAdaptController(arkode_mem, C); + if (check_flag(&flag, "ARKStepSetAdaptController", 1)) return 1; + /* Specify linearly implicit RHS, with time-dependent Jacobian */ flag = ARKStepSetLinear(arkode_mem, 1); if (check_flag(&flag, "ARKStepSetLinear", 1)) return 1; @@ -315,6 +322,7 @@ int main() { free(udata); ARKStepFree(&arkode_mem); /* Free integrator memory */ SUNLinSolFree(LS); /* Free linear solver */ + (void) SUNAdaptController_Destroy(C); /* Free time adaptivity controller */ SUNContext_Free(&ctx); /* Free context */ return 0; diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.c b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.c index 7c8bba1278..8143a128c0 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.c +++ b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.c @@ -246,6 +246,10 @@ int main(int argc, char *argv[]) mukeep, mlkeep, ZERO, flocal, NULL); if(check_flag(&flag, "ARKBBDPrecInit", 1, my_pe)) MPI_Abort(comm, 1); + /* Tighten nonlinear solver tolerance */ + flag = ARKStepSetNonlinConvCoef(arkode_mem, SUN_RCONST(0.01)); + if(check_flag(&flag, "ARKStepSetNonlinConvCoef", 1, my_pe)) MPI_Abort(comm, 1); + /* Print heading */ if (my_pe == 0) PrintIntro(npes, mudq, mldq, mukeep, mlkeep); diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out index 5d53186f79..df7478fcae 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out +++ b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out @@ -7,68 +7,68 @@ Preconditioner type is: jpre = SUN_PREC_LEFT -t = 7.20e+03 no. steps = 979 stepsize = 3.07e+00 +t = 7.20e+03 no. steps = 980 stepsize = 3.07e+00 At bottom left: c1, c2 = 1.047e+04 2.527e+11 At top right: c1, c2 = 1.119e+04 2.700e+11 -t = 1.44e+04 no. steps = 2738 stepsize = 6.94e+00 +t = 1.44e+04 no. steps = 2730 stepsize = 6.90e+00 At bottom left: c1, c2 = 6.659e+06 2.582e+11 At top right: c1, c2 = 7.301e+06 2.833e+11 -t = 2.16e+04 no. steps = 3535 stepsize = 1.05e+01 +t = 2.16e+04 no. steps = 3533 stepsize = 1.04e+01 At bottom left: c1, c2 = 2.665e+07 2.993e+11 At top right: c1, c2 = 2.931e+07 3.313e+11 -t = 2.88e+04 no. steps = 4683 stepsize = 4.46e+00 +t = 2.88e+04 no. steps = 4681 stepsize = 4.32e+00 At bottom left: c1, c2 = 8.702e+06 3.380e+11 At top right: c1, c2 = 9.650e+06 3.751e+11 -t = 3.60e+04 no. steps = 5959 stepsize = 2.55e+00 +t = 3.60e+04 no. steps = 5975 stepsize = 2.55e+00 At bottom left: c1, c2 = 1.404e+04 3.387e+11 At top right: c1, c2 = 1.561e+04 3.765e+11 -t = 4.32e+04 no. steps = 7152 stepsize = 3.93e+02 -At bottom left: c1, c2 = -1.202e-09 3.382e+11 -At top right: c1, c2 = 1.624e-07 3.804e+11 +t = 4.32e+04 no. steps = 7163 stepsize = 4.64e+02 +At bottom left: c1, c2 = 2.125e-08 3.382e+11 +At top right: c1, c2 = 4.245e-08 3.804e+11 -t = 5.04e+04 no. steps = 7171 stepsize = 3.76e+02 -At bottom left: c1, c2 = 5.092e-08 3.358e+11 -At top right: c1, c2 = -4.835e-07 3.864e+11 +t = 5.04e+04 no. steps = 7179 stepsize = 4.64e+02 +At bottom left: c1, c2 = -4.072e-07 3.358e+11 +At top right: c1, c2 = 4.005e-11 3.864e+11 -t = 5.76e+04 no. steps = 7188 stepsize = 2.94e+02 -At bottom left: c1, c2 = -3.248e-10 3.320e+11 -At top right: c1, c2 = 7.269e-08 3.909e+11 +t = 5.76e+04 no. steps = 7195 stepsize = 3.44e+02 +At bottom left: c1, c2 = 3.487e-08 3.320e+11 +At top right: c1, c2 = 3.658e-18 3.909e+11 -t = 6.48e+04 no. steps = 7212 stepsize = 5.52e+02 -At bottom left: c1, c2 = -1.079e-09 3.313e+11 -At top right: c1, c2 = -2.660e-07 3.963e+11 +t = 6.48e+04 no. steps = 7210 stepsize = 5.15e+02 +At bottom left: c1, c2 = 2.253e-07 3.313e+11 +At top right: c1, c2 = -2.680e-19 3.963e+11 -t = 7.20e+04 no. steps = 7225 stepsize = 5.52e+02 -At bottom left: c1, c2 = 4.318e-08 3.330e+11 -At top right: c1, c2 = -4.973e-07 4.039e+11 +t = 7.20e+04 no. steps = 7224 stepsize = 5.15e+02 +At bottom left: c1, c2 = 8.966e-08 3.330e+11 +At top right: c1, c2 = -1.036e-18 4.039e+11 -t = 7.92e+04 no. steps = 7238 stepsize = 5.52e+02 -At bottom left: c1, c2 = -1.398e-08 3.334e+11 -At top right: c1, c2 = 7.657e-08 4.120e+11 +t = 7.92e+04 no. steps = 7238 stepsize = 5.15e+02 +At bottom left: c1, c2 = 2.038e-08 3.334e+11 +At top right: c1, c2 = -2.330e-18 4.120e+11 -t = 8.64e+04 no. steps = 7252 stepsize = 5.52e+02 -At bottom left: c1, c2 = 1.764e-07 3.352e+11 -At top right: c1, c2 = -4.190e-08 4.163e+11 +t = 8.64e+04 no. steps = 7252 stepsize = 5.15e+02 +At bottom left: c1, c2 = -3.746e-21 3.352e+11 +At top right: c1, c2 = -2.537e-27 4.163e+11 Final Statistics: -lenrw = 3901 leniw = 267 +lenrw = 3902 leniw = 267 lenrwls = 2455 leniwls = 126 nst = 7252 nfe = 0 -nfe = 76109 nfels = 82856 -nni = 39711 nli = 82856 -nsetups = 437 netf = 27 -npe = 121 nps = 120385 +nfe = 76929 nfels = 102816 +nni = 40521 nli = 102816 +nsetups = 439 netf = 29 +npe = 122 nps = 140398 ncfn = 0 ncfl = 0 In ARKBBDPRE: real/integer local work space sizes = 1300, 192 - no. flocal evals. = 2662 + no. flocal evals. = 2684 ------------------------------------------------------------------- @@ -76,11 +76,11 @@ In ARKBBDPRE: real/integer local work space sizes = 1300, 192 Preconditioner type is: jpre = SUN_PREC_RIGHT -t = 7.20e+03 no. steps = 981 stepsize = 3.07e+00 +t = 7.20e+03 no. steps = 980 stepsize = 3.07e+00 At bottom left: c1, c2 = 1.047e+04 2.527e+11 At top right: c1, c2 = 1.119e+04 2.700e+11 -t = 1.44e+04 no. steps = 2731 stepsize = 6.90e+00 +t = 1.44e+04 no. steps = 2730 stepsize = 6.90e+00 At bottom left: c1, c2 = 6.659e+06 2.582e+11 At top right: c1, c2 = 7.301e+06 2.833e+11 @@ -88,53 +88,53 @@ t = 2.16e+04 no. steps = 3533 stepsize = 1.04e+01 At bottom left: c1, c2 = 2.665e+07 2.993e+11 At top right: c1, c2 = 2.931e+07 3.313e+11 -t = 2.88e+04 no. steps = 4692 stepsize = 3.80e+00 +t = 2.88e+04 no. steps = 4705 stepsize = 3.57e+00 At bottom left: c1, c2 = 8.702e+06 3.380e+11 At top right: c1, c2 = 9.650e+06 3.751e+11 -t = 3.60e+04 no. steps = 6087 stepsize = 2.55e+00 +t = 3.60e+04 no. steps = 6160 stepsize = 2.56e+00 At bottom left: c1, c2 = 1.404e+04 3.387e+11 At top right: c1, c2 = 1.561e+04 3.765e+11 -t = 4.32e+04 no. steps = 7275 stepsize = 4.76e+02 -At bottom left: c1, c2 = 1.722e-10 3.382e+11 -At top right: c1, c2 = 1.593e-09 3.804e+11 +t = 4.32e+04 no. steps = 7347 stepsize = 4.30e+02 +At bottom left: c1, c2 = 4.255e-12 3.382e+11 +At top right: c1, c2 = -2.358e-07 3.804e+11 -t = 5.04e+04 no. steps = 7291 stepsize = 3.75e+02 -At bottom left: c1, c2 = 1.309e-09 3.358e+11 -At top right: c1, c2 = -1.367e-09 3.864e+11 +t = 5.04e+04 no. steps = 7364 stepsize = 4.81e+02 +At bottom left: c1, c2 = -1.312e-17 3.358e+11 +At top right: c1, c2 = 2.130e-11 3.864e+11 -t = 5.76e+04 no. steps = 7308 stepsize = 2.92e+02 -At bottom left: c1, c2 = -2.110e-07 3.320e+11 -At top right: c1, c2 = -3.069e-07 3.909e+11 +t = 5.76e+04 no. steps = 7380 stepsize = 2.39e+02 +At bottom left: c1, c2 = -6.762e-21 3.320e+11 +At top right: c1, c2 = -4.330e-12 3.909e+11 -t = 6.48e+04 no. steps = 7323 stepsize = 4.87e+02 -At bottom left: c1, c2 = 2.224e-07 3.313e+11 -At top right: c1, c2 = 2.684e-07 3.963e+11 +t = 6.48e+04 no. steps = 7393 stepsize = 6.42e+02 +At bottom left: c1, c2 = -3.898e-25 3.313e+11 +At top right: c1, c2 = -4.918e-07 3.963e+11 -t = 7.20e+04 no. steps = 7338 stepsize = 4.87e+02 -At bottom left: c1, c2 = 6.820e-08 3.330e+11 -At top right: c1, c2 = -2.132e-06 4.039e+11 +t = 7.20e+04 no. steps = 7405 stepsize = 6.42e+02 +At bottom left: c1, c2 = 5.173e-25 3.330e+11 +At top right: c1, c2 = -1.031e-06 4.039e+11 -t = 7.92e+04 no. steps = 7353 stepsize = 4.87e+02 -At bottom left: c1, c2 = 1.134e-09 3.334e+11 -At top right: c1, c2 = -2.341e-07 4.120e+11 +t = 7.92e+04 no. steps = 7416 stepsize = 6.42e+02 +At bottom left: c1, c2 = 5.441e-26 3.334e+11 +At top right: c1, c2 = -1.290e-06 4.120e+11 -t = 8.64e+04 no. steps = 7364 stepsize = 7.33e+02 -At bottom left: c1, c2 = 4.331e-07 3.352e+11 -At top right: c1, c2 = -6.607e-08 4.163e+11 +t = 8.64e+04 no. steps = 7427 stepsize = 6.42e+02 +At bottom left: c1, c2 = 1.538e-27 3.352e+11 +At top right: c1, c2 = -5.134e-07 4.163e+11 Final Statistics: -lenrw = 3901 leniw = 272 +lenrw = 3902 leniw = 272 lenrwls = 2455 leniwls = 126 -nst = 7364 nfe = 0 -nfe = 77457 nfels = 101131 -nni = 40469 nli = 101131 -nsetups = 457 netf = 33 -npe = 124 nps = 138172 -ncfn = 0 ncfl = 0 +nst = 7427 nfe = 0 +nfe = 78794 nfels = 111450 +nni = 41511 nli = 111450 +nsetups = 453 netf = 29 +npe = 125 nps = 149218 +ncfn = 0 ncfl = 38 In ARKBBDPRE: real/integer local work space sizes = 1300, 192 - no. flocal evals. = 2728 + no. flocal evals. = 2750 diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_p.c b/examples/arkode/C_parallel/ark_diurnal_kry_p.c index 1946966c76..b17ed5f283 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_p.c +++ b/examples/arkode/C_parallel/ark_diurnal_kry_p.c @@ -262,6 +262,10 @@ int main(int argc, char *argv[]) flag = ARKStepSetPreconditioner(arkode_mem, Precond, PSolve); if (check_flag(&flag, "ARKStepSetPreconditioner", 1, my_pe)) MPI_Abort(comm, 1); + /* Tighten nonlinear solver tolerance */ + flag = ARKStepSetNonlinConvCoef(arkode_mem, SUN_RCONST(0.01)); + if(check_flag(&flag, "ARKStepSetNonlinConvCoef", 1, my_pe)) MPI_Abort(comm, 1); + /* Print heading */ if (my_pe == 0) printf("\n2-species diurnal advection-diffusion problem\n\n"); diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_p.out b/examples/arkode/C_parallel/ark_diurnal_kry_p.out index 97f07c3221..a2db3d9006 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_p.out +++ b/examples/arkode/C_parallel/ark_diurnal_kry_p.out @@ -1,63 +1,63 @@ 2-species diurnal advection-diffusion problem -t = 7.20e+03 no. steps = 979 stepsize = 3.07e+00 +t = 7.20e+03 no. steps = 980 stepsize = 3.07e+00 At bottom left: c1, c2 = 1.047e+04 2.527e+11 At top right: c1, c2 = 1.119e+04 2.700e+11 -t = 1.44e+04 no. steps = 2733 stepsize = 6.92e+00 +t = 1.44e+04 no. steps = 2730 stepsize = 6.90e+00 At bottom left: c1, c2 = 6.659e+06 2.582e+11 At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 3533 stepsize = 1.04e+01 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 -t = 2.88e+04 no. steps = 4559 stepsize = 4.56e+00 +t = 2.88e+04 no. steps = 4695 stepsize = 3.50e+00 At bottom left: c1, c2 = 8.702e+06 3.380e+11 At top right: c1, c2 = 9.650e+06 3.751e+11 -t = 3.60e+04 no. steps = 5822 stepsize = 2.55e+00 +t = 3.60e+04 no. steps = 6172 stepsize = 2.55e+00 At bottom left: c1, c2 = 1.404e+04 3.387e+11 At top right: c1, c2 = 1.561e+04 3.765e+11 -t = 4.32e+04 no. steps = 7012 stepsize = 4.38e+02 -At bottom left: c1, c2 = -2.534e-08 3.382e+11 -At top right: c1, c2 = 2.458e-08 3.804e+11 +t = 4.32e+04 no. steps = 7361 stepsize = 5.00e+02 +At bottom left: c1, c2 = 3.855e-13 3.382e+11 +At top right: c1, c2 = -1.439e-12 3.804e+11 -t = 5.04e+04 no. steps = 7031 stepsize = 3.01e+02 -At bottom left: c1, c2 = 6.320e-07 3.358e+11 -At top right: c1, c2 = -7.802e-07 3.864e+11 +t = 5.04e+04 no. steps = 7379 stepsize = 3.71e+02 +At bottom left: c1, c2 = -4.407e-14 3.358e+11 +At top right: c1, c2 = 1.551e-13 3.864e+11 -t = 5.76e+04 no. steps = 7052 stepsize = 2.39e+02 -At bottom left: c1, c2 = -2.953e-15 3.320e+11 -At top right: c1, c2 = -6.467e-15 3.909e+11 +t = 5.76e+04 no. steps = 7394 stepsize = 1.90e+02 +At bottom left: c1, c2 = 2.370e-12 3.320e+11 +At top right: c1, c2 = -4.013e-12 3.909e+11 -t = 6.48e+04 no. steps = 7067 stepsize = 6.00e+02 -At bottom left: c1, c2 = -2.940e-18 3.313e+11 -At top right: c1, c2 = -9.232e-17 3.963e+11 +t = 6.48e+04 no. steps = 7409 stepsize = 5.59e+02 +At bottom left: c1, c2 = 1.301e-12 3.313e+11 +At top right: c1, c2 = -4.849e-12 3.963e+11 -t = 7.20e+04 no. steps = 7079 stepsize = 6.00e+02 -At bottom left: c1, c2 = 2.299e-17 3.330e+11 -At top right: c1, c2 = -1.240e-16 4.039e+11 +t = 7.20e+04 no. steps = 7421 stepsize = 5.59e+02 +At bottom left: c1, c2 = -1.797e-23 3.330e+11 +At top right: c1, c2 = -3.890e-22 4.039e+11 -t = 7.92e+04 no. steps = 7091 stepsize = 6.00e+02 -At bottom left: c1, c2 = 2.598e-17 3.334e+11 -At top right: c1, c2 = -6.124e-17 4.120e+11 +t = 7.92e+04 no. steps = 7434 stepsize = 5.59e+02 +At bottom left: c1, c2 = -2.819e-27 3.334e+11 +At top right: c1, c2 = -1.209e-25 4.120e+11 -t = 8.64e+04 no. steps = 7103 stepsize = 6.00e+02 -At bottom left: c1, c2 = 1.059e-27 3.352e+11 -At top right: c1, c2 = 1.567e-26 4.163e+11 +t = 8.64e+04 no. steps = 7447 stepsize = 5.59e+02 +At bottom left: c1, c2 = -2.334e-27 3.352e+11 +At top right: c1, c2 = -8.983e-26 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 3301 leniw = 243 +lenrw = 3302 leniw = 243 lenrwls = 2455 leniwls = 126 -nst = 7103 nfe = 0 -nfi = 74602 nfels = 87206 -nni = 38944 nli = 87206 -nsetups = 431 netf = 28 -npe = 120 nps = 123894 -ncfn = 0 ncfl = 0 +nst = 7447 nfe = 0 +nfi = 79041 nfels = 108536 +nni = 41643 nli = 108536 +nsetups = 456 netf = 32 +npe = 125 nps = 147035 +ncfn = 0 ncfl = 83 diff --git a/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out b/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out index 411f0a09fc..ffb0e71104 100644 --- a/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out +++ b/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out @@ -2,62 +2,61 @@ 2-species diurnal advection-diffusion problem t = 7.20e+03 no. steps = 979 stepsize = 3.07e+00 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.119e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.119e+04 2.700e+11 -t = 1.44e+04 no. steps = 2733 stepsize = 6.92e+00 +t = 1.44e+04 no. steps = 2733 stepsize = 6.93e+00 At bottom left: c1, c2 = 6.659e+06 2.582e+11 At top right: c1, c2 = 7.301e+06 2.833e+11 -t = 2.16e+04 no. steps = 3533 stepsize = 1.04e+01 +t = 2.16e+04 no. steps = 3532 stepsize = 1.04e+01 At bottom left: c1, c2 = 2.665e+07 2.993e+11 At top right: c1, c2 = 2.931e+07 3.313e+11 -t = 2.88e+04 no. steps = 4558 stepsize = 3.77e+00 +t = 2.88e+04 no. steps = 4588 stepsize = 4.86e+00 At bottom left: c1, c2 = 8.702e+06 3.380e+11 At top right: c1, c2 = 9.650e+06 3.751e+11 -t = 3.60e+04 no. steps = 5961 stepsize = 2.55e+00 +t = 3.60e+04 no. steps = 5824 stepsize = 2.55e+00 At bottom left: c1, c2 = 1.404e+04 3.387e+11 At top right: c1, c2 = 1.561e+04 3.765e+11 -t = 4.32e+04 no. steps = 7161 stepsize = 5.16e+02 -At bottom left: c1, c2 = 4.611e-12 3.382e+11 -At top right: c1, c2 = -1.475e-11 3.804e+11 +t = 4.32e+04 no. steps = 7026 stepsize = 5.12e+02 +At bottom left: c1, c2 = 1.334e-12 3.382e+11 +At top right: c1, c2 = -4.825e-12 3.804e+11 -t = 5.04e+04 no. steps = 7175 stepsize = 5.05e+02 -At bottom left: c1, c2 = 1.182e-11 3.358e+11 -At top right: c1, c2 = -2.617e-11 3.864e+11 +t = 5.04e+04 no. steps = 7041 stepsize = 5.36e+02 +At bottom left: c1, c2 = 1.415e-13 3.358e+11 +At top right: c1, c2 = -1.712e-12 3.864e+11 -t = 5.76e+04 no. steps = 7190 stepsize = 2.44e+02 -At bottom left: c1, c2 = -1.051e-11 3.320e+11 -At top right: c1, c2 = -9.200e-11 3.909e+11 +t = 5.76e+04 no. steps = 7055 stepsize = 2.34e+02 +At bottom left: c1, c2 = -2.533e-12 3.320e+11 +At top right: c1, c2 = -5.401e-12 3.909e+11 -t = 6.48e+04 no. steps = 7203 stepsize = 6.40e+02 -At bottom left: c1, c2 = 1.286e-10 3.313e+11 -At top right: c1, c2 = -4.357e-10 3.963e+11 +t = 6.48e+04 no. steps = 7068 stepsize = 6.40e+02 +At bottom left: c1, c2 = -4.169e-12 3.313e+11 +At top right: c1, c2 = 1.665e-11 3.963e+11 -t = 7.20e+04 no. steps = 7215 stepsize = 6.40e+02 -At bottom left: c1, c2 = -1.814e-11 3.330e+11 -At top right: c1, c2 = -9.120e-11 4.039e+11 +t = 7.20e+04 no. steps = 7080 stepsize = 6.40e+02 +At bottom left: c1, c2 = -3.839e-12 3.330e+11 +At top right: c1, c2 = -3.434e-11 4.039e+11 -t = 7.92e+04 no. steps = 7226 stepsize = 6.40e+02 -At bottom left: c1, c2 = -1.291e-21 3.334e+11 -At top right: c1, c2 = -1.937e-20 4.120e+11 +t = 7.92e+04 no. steps = 7091 stepsize = 6.40e+02 +At bottom left: c1, c2 = 2.289e-26 3.334e+11 +At top right: c1, c2 = 4.220e-25 4.120e+11 -t = 8.64e+04 no. steps = 7237 stepsize = 6.40e+02 -At bottom left: c1, c2 = -3.534e-21 3.352e+11 -At top right: c1, c2 = -4.442e-20 4.163e+11 +t = 8.64e+04 no. steps = 7102 stepsize = 6.40e+02 +At bottom left: c1, c2 = -5.225e-26 3.352e+11 +At top right: c1, c2 = -5.452e-25 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 3301 leniw = 243 +lenrw = 3302 leniw = 243 lenrwls = 2455 leniwls = 126 -nst = 7237 nfe = 0 -nfi = 75881 nfels = 88695 -nni = 39568 nli = 88695 -nsetups = 431 netf = 25 -npe = 121 nps = 126028 +nst = 7102 nfe = 0 +nfi = 74579 nfels = 87090 +nni = 38921 nli = 87090 +nsetups = 429 netf = 29 +npe = 119 nps = 123765 ncfn = 0 ncfl = 0 - diff --git a/examples/arkode/C_petsc/ark_petsc_ex25.c b/examples/arkode/C_petsc/ark_petsc_ex25.c index 9c144a9782..2d88255774 100644 --- a/examples/arkode/C_petsc/ark_petsc_ex25.c +++ b/examples/arkode/C_petsc/ark_petsc_ex25.c @@ -74,6 +74,7 @@ int main(int argc, char **argv) N_Vector nvecx; /* SUNDIALS N_Vector wrapper of X */ SUNNonlinearSolver NLS; /* SUNDIALS nonlinear solver */ SUNContext ctx; /* SUNDIALS context */ + SUNAdaptController C; /* SUNDIALS controller object */ /* PETSc data structures */ SNES snes; /* nonlinear solver */ @@ -205,8 +206,10 @@ int main(int argc, char **argv) ierr = ARKStepSetNonlinearSolver(arkode_mem,NLS); if (check_retval(&ierr,"ARKStepSetNonlinearSolver",1)) return 1; - ierr = ARKStepSetAdaptivityMethod(arkode_mem,2,1,0,NULL); - if (check_retval(&ierr,"ARKStepSetAdaptivity",1)) return 1; + C = SUNAdaptController_I(ctx); + if (check_retval((void *)C, "SUNAdaptController_I", 0)) return 1; + ierr = ARKStepSetAdaptController(arkode_mem, C); + if (check_retval(&ierr, "ARKStepSetAdaptController", 1)) return 1; ierr = ARKStepSetInitStep(arkode_mem,dt); if (check_retval(&ierr,"ARKStepSetInitStep",1)) return 1; @@ -251,6 +254,7 @@ int main(int argc, char **argv) N_VDestroy(nvecx); /* Free x nvector */ SUNNonlinSolFree(NLS); /* Free nonlinear solver */ ARKStepFree(&arkode_mem); /* Free integrator memory */ + (void) SUNAdaptController_Destroy(C); /* Free time adaptivity controller */ /* Free petsc data structures */ ierr = MatDestroy(&J);CHKERRQ(ierr); diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec.out b/examples/arkode/C_serial/ark_KrylovDemo_prec.out index 3a63a46785..79d7c4a86f 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec.out @@ -190,18 +190,18 @@ Species 6 297691 307208 319252 319264 307245 297749 297229 297691 298276 298276 297692 297231 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.46e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.43e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2024 nni = 1386 hu = 1.28e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.25e-02 -t = 1.00e+00 nst = 154 nfe = 0 nfi = 2489 nni = 1716 hu = 6.84e-02 +t = 1.00e+00 nst = 153 nfe = 0 nfi = 2474 nni = 1706 hu = 6.52e-02 c values at t = 1: Species 1 -1.58851 1.59924 1.62152 1.64764 1.67036 1.68149 +1.58851 1.59924 1.62152 1.64765 1.67036 1.68149 1.58533 1.59503 1.61548 1.63952 1.66033 1.67036 -1.57757 1.58547 1.60239 1.62235 1.63952 1.64764 +1.57757 1.58547 1.60239 1.62235 1.63952 1.64765 1.5682 1.57412 1.58706 1.60239 1.61548 1.62152 1.56048 1.56463 1.57412 1.58547 1.59503 1.59924 1.55733 1.56048 1.5682 1.57757 1.58533 1.58851 @@ -210,7 +210,7 @@ Species 2 1.59067 1.60141 1.62371 1.64987 1.67261 1.68375 1.58748 1.5972 1.61766 1.64173 1.66257 1.67261 1.57971 1.58763 1.60457 1.62454 1.64173 1.64987 -1.57034 1.57626 1.58921 1.60457 1.61766 1.62371 +1.57034 1.57626 1.58922 1.60457 1.61766 1.62371 1.56261 1.56676 1.57626 1.58763 1.5972 1.60141 1.55945 1.56261 1.57034 1.57971 1.58748 1.59067 @@ -223,34 +223,34 @@ Species 3 1.56146 1.56462 1.57236 1.58174 1.58951 1.5927 Species 4 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 Species 5 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 Species 6 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 -t = 2.00e+00 nst = 165 nfe = 0 nfi = 2661 nni = 1833 hu = 4.14e-02 +t = 2.00e+00 nst = 164 nfe = 0 nfi = 2647 nni = 1824 hu = 1.58e-01 -t = 3.00e+00 nst = 177 nfe = 0 nfi = 2848 nni = 1960 hu = 1.08e-01 +t = 3.00e+00 nst = 170 nfe = 0 nfi = 2737 nni = 1884 hu = 1.58e-01 -t = 4.00e+00 nst = 187 nfe = 0 nfi = 3013 nni = 2073 hu = 1.23e-01 +t = 4.00e+00 nst = 176 nfe = 0 nfi = 2843 nni = 1955 hu = 1.85e-01 c values at t = 4: @@ -280,33 +280,33 @@ Species 3 Species 4 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 -t = 5.00e+00 nst = 198 nfe = 0 nfi = 3179 nni = 2182 hu = 9.99e-02 +t = 5.00e+00 nst = 181 nfe = 0 nfi = 2911 nni = 1998 hu = 2.46e-01 -t = 6.00e+00 nst = 207 nfe = 0 nfi = 3336 nni = 2284 hu = 9.66e-02 +t = 6.00e+00 nst = 184 nfe = 0 nfi = 2950 nni = 2022 hu = 3.05e-01 -t = 7.00e+00 nst = 216 nfe = 0 nfi = 3477 nni = 2375 hu = 1.51e-01 +t = 7.00e+00 nst = 186 nfe = 0 nfi = 2975 nni = 2037 hu = 4.87e-01 c values at t = 7: @@ -335,34 +335,34 @@ Species 3 1.16363 1.16614 1.17231 1.1798 1.18601 1.18854 Species 4 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 Species 5 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 Species 6 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 -t = 8.00e+00 nst = 232 nfe = 0 nfi = 3780 nni = 2567 hu = 1.06e-01 +t = 8.00e+00 nst = 188 nfe = 0 nfi = 3003 nni = 2055 hu = 7.64e-01 -t = 9.00e+00 nst = 249 nfe = 0 nfi = 4075 nni = 2742 hu = 8.61e-02 +t = 9.00e+00 nst = 189 nfe = 0 nfi = 3015 nni = 2062 hu = 7.64e-01 -t = 1.00e+01 nst = 266 nfe = 0 nfi = 4394 nni = 2941 hu = 8.37e-02 +t = 1.00e+01 nst = 190 nfe = 0 nfi = 3030 nni = 2072 hu = 1.57e+00 c values at t = 10: @@ -391,51 +391,51 @@ Species 3 1.16347 1.16598 1.17215 1.17964 1.18585 1.18838 Species 4 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Species 5 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Species 6 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Final statistics for this run: - ARKStep real workspace length = 3557 + ARKStep real workspace length = 3558 ARKStep integer workspace length = 131 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 266 + Number of steps = 190 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4394 - Number of f-s (SPGMR) = 8980 - Number of f-s (TOTAL) = 8980 - Number of setups = 121 - Number of nonlinear iterations = 2941 - Number of linear iterations = 8980 - Number of preconditioner evaluations = 121 - Number of preconditioner solves = 11819 - Number of error test failures = 23 - Number of nonlinear conv. failures = 17 - Number of linear convergence failures = 509 - Average Krylov subspace dimension = 3.053 + Number of f-s (implicit) = 3030 + Number of f-s (SPGMR) = 6097 + Number of f-s (TOTAL) = 6097 + Number of setups = 38 + Number of nonlinear iterations = 2072 + Number of linear iterations = 6097 + Number of preconditioner evaluations = 38 + Number of preconditioner solves = 8080 + Number of error test failures = 1 + Number of nonlinear conv. failures = 0 + Number of linear convergence failures = 182 + Average Krylov subspace dimension = 2.943 ---------------------------------------------------------------------------- @@ -459,52 +459,52 @@ t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.51e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.46e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.43e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2024 nni = 1386 hu = 1.28e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.25e-02 -t = 1.00e+00 nst = 154 nfe = 0 nfi = 2491 nni = 1718 hu = 7.60e-02 +t = 1.00e+00 nst = 153 nfe = 0 nfi = 2474 nni = 1706 hu = 6.52e-02 -t = 2.00e+00 nst = 169 nfe = 0 nfi = 2746 nni = 1896 hu = 8.04e-02 +t = 2.00e+00 nst = 164 nfe = 0 nfi = 2647 nni = 1824 hu = 1.58e-01 -t = 3.00e+00 nst = 181 nfe = 0 nfi = 2950 nni = 2036 hu = 1.01e-01 +t = 3.00e+00 nst = 170 nfe = 0 nfi = 2737 nni = 1884 hu = 1.58e-01 -t = 4.00e+00 nst = 189 nfe = 0 nfi = 3073 nni = 2119 hu = 1.33e-01 +t = 4.00e+00 nst = 176 nfe = 0 nfi = 2843 nni = 1955 hu = 1.85e-01 -t = 5.00e+00 nst = 199 nfe = 0 nfi = 3242 nni = 2227 hu = 9.38e-02 +t = 5.00e+00 nst = 181 nfe = 0 nfi = 2911 nni = 1998 hu = 2.46e-01 -t = 6.00e+00 nst = 211 nfe = 0 nfi = 3442 nni = 2352 hu = 1.13e-01 +t = 6.00e+00 nst = 184 nfe = 0 nfi = 2950 nni = 2022 hu = 3.05e-01 -t = 7.00e+00 nst = 220 nfe = 0 nfi = 3612 nni = 2457 hu = 1.07e-01 +t = 7.00e+00 nst = 186 nfe = 0 nfi = 2975 nni = 2037 hu = 4.86e-01 -t = 8.00e+00 nst = 229 nfe = 0 nfi = 3747 nni = 2537 hu = 1.33e-01 +t = 8.00e+00 nst = 188 nfe = 0 nfi = 3003 nni = 2055 hu = 7.64e-01 -t = 9.00e+00 nst = 239 nfe = 0 nfi = 3897 nni = 2622 hu = 8.98e-02 +t = 9.00e+00 nst = 189 nfe = 0 nfi = 3015 nni = 2062 hu = 7.64e-01 -t = 1.00e+01 nst = 251 nfe = 0 nfi = 4101 nni = 2746 hu = 7.09e-02 +t = 1.00e+01 nst = 190 nfe = 0 nfi = 3030 nni = 2072 hu = 1.57e+00 Final statistics for this run: - ARKStep real workspace length = 3557 + ARKStep real workspace length = 3558 ARKStep integer workspace length = 136 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 251 + Number of steps = 190 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4101 - Number of f-s (SPGMR) = 8880 - Number of f-s (TOTAL) = 8880 - Number of setups = 91 - Number of nonlinear iterations = 2746 - Number of linear iterations = 8880 - Number of preconditioner evaluations = 91 - Number of preconditioner solves = 11537 - Number of error test failures = 18 - Number of nonlinear conv. failures = 13 - Number of linear convergence failures = 597 - Average Krylov subspace dimension = 3.234 + Number of f-s (implicit) = 3030 + Number of f-s (SPGMR) = 6096 + Number of f-s (TOTAL) = 6096 + Number of setups = 38 + Number of nonlinear iterations = 2072 + Number of linear iterations = 6096 + Number of preconditioner evaluations = 38 + Number of preconditioner solves = 8079 + Number of error test failures = 1 + Number of nonlinear conv. failures = 0 + Number of linear convergence failures = 182 + Average Krylov subspace dimension = 2.942 ---------------------------------------------------------------------------- @@ -526,54 +526,54 @@ t = 1.00e-05 nst = 27 nfe = 0 nfi = 407 nni = 269 hu = 4.79e-07 t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 -t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.50e-03 +t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.49e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.42e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1799 nni = 1231 hu = 3.79e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.23e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2028 nni = 1390 hu = 1.32e-02 -t = 1.00e+00 nst = 166 nfe = 0 nfi = 2714 nni = 1875 hu = 2.40e-02 +t = 1.00e+00 nst = 164 nfe = 0 nfi = 2669 nni = 1844 hu = 4.98e-02 -t = 2.00e+00 nst = 214 nfe = 0 nfi = 3550 nni = 2460 hu = 2.34e-02 +t = 2.00e+00 nst = 213 nfe = 0 nfi = 3526 nni = 2444 hu = 2.37e-02 -t = 3.00e+00 nst = 249 nfe = 0 nfi = 4111 nni = 2846 hu = 3.57e-02 +t = 3.00e+00 nst = 248 nfe = 0 nfi = 4087 nni = 2830 hu = 3.53e-02 -t = 4.00e+00 nst = 272 nfe = 0 nfi = 4472 nni = 3092 hu = 5.08e-02 +t = 4.00e+00 nst = 272 nfe = 0 nfi = 4465 nni = 3088 hu = 3.22e-02 -t = 5.00e+00 nst = 297 nfe = 0 nfi = 4851 nni = 3346 hu = 5.14e-02 +t = 5.00e+00 nst = 299 nfe = 0 nfi = 4876 nni = 3363 hu = 3.94e-02 -t = 6.00e+00 nst = 315 nfe = 0 nfi = 5117 nni = 3522 hu = 6.88e-02 +t = 6.00e+00 nst = 316 nfe = 0 nfi = 5130 nni = 3532 hu = 6.86e-02 -t = 7.00e+00 nst = 328 nfe = 0 nfi = 5302 nni = 3642 hu = 8.22e-02 +t = 7.00e+00 nst = 329 nfe = 0 nfi = 5315 nni = 3652 hu = 8.22e-02 -t = 8.00e+00 nst = 338 nfe = 0 nfi = 5441 nni = 3731 hu = 8.52e-02 +t = 8.00e+00 nst = 339 nfe = 0 nfi = 5455 nni = 3742 hu = 1.18e-01 -t = 9.00e+00 nst = 349 nfe = 0 nfi = 5592 nni = 3827 hu = 1.11e-01 +t = 9.00e+00 nst = 345 nfe = 0 nfi = 5536 nni = 3793 hu = 2.11e-01 -t = 1.00e+01 nst = 359 nfe = 0 nfi = 5722 nni = 3907 hu = 1.35e-01 +t = 1.00e+01 nst = 349 nfe = 0 nfi = 5589 nni = 3826 hu = 2.80e-01 Final statistics for this run: - ARKStep real workspace length = 3557 + ARKStep real workspace length = 3558 ARKStep integer workspace length = 141 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 359 + Number of steps = 349 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 5722 - Number of f-s (SPGMR) = 12904 - Number of f-s (TOTAL) = 12904 - Number of setups = 253 - Number of nonlinear iterations = 3907 - Number of linear iterations = 12904 - Number of preconditioner evaluations = 253 - Number of preconditioner solves = 16594 + Number of f-s (implicit) = 5589 + Number of f-s (SPGMR) = 12378 + Number of f-s (TOTAL) = 12378 + Number of setups = 244 + Number of nonlinear iterations = 3826 + Number of linear iterations = 12378 + Number of preconditioner evaluations = 244 + Number of preconditioner solves = 15957 Number of error test failures = 0 - Number of nonlinear conv. failures = 117 - Number of linear convergence failures = 1072 - Average Krylov subspace dimension = 3.303 + Number of nonlinear conv. failures = 113 + Number of linear convergence failures = 977 + Average Krylov subspace dimension = 3.235 ---------------------------------------------------------------------------- @@ -595,54 +595,54 @@ t = 1.00e-05 nst = 27 nfe = 0 nfi = 407 nni = 269 hu = 4.79e-07 t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 -t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.50e-03 +t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.49e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.42e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1799 nni = 1231 hu = 3.79e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.23e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2028 nni = 1390 hu = 1.32e-02 -t = 1.00e+00 nst = 166 nfe = 0 nfi = 2714 nni = 1875 hu = 2.40e-02 +t = 1.00e+00 nst = 164 nfe = 0 nfi = 2669 nni = 1844 hu = 4.98e-02 -t = 2.00e+00 nst = 214 nfe = 0 nfi = 3556 nni = 2465 hu = 2.34e-02 +t = 2.00e+00 nst = 213 nfe = 0 nfi = 3526 nni = 2444 hu = 2.37e-02 -t = 3.00e+00 nst = 249 nfe = 0 nfi = 4117 nni = 2851 hu = 3.57e-02 +t = 3.00e+00 nst = 248 nfe = 0 nfi = 4087 nni = 2830 hu = 3.53e-02 -t = 4.00e+00 nst = 272 nfe = 0 nfi = 4478 nni = 3097 hu = 5.08e-02 +t = 4.00e+00 nst = 272 nfe = 0 nfi = 4465 nni = 3088 hu = 3.22e-02 -t = 5.00e+00 nst = 297 nfe = 0 nfi = 4857 nni = 3351 hu = 5.14e-02 +t = 5.00e+00 nst = 299 nfe = 0 nfi = 4876 nni = 3363 hu = 3.94e-02 -t = 6.00e+00 nst = 315 nfe = 0 nfi = 5123 nni = 3527 hu = 6.89e-02 +t = 6.00e+00 nst = 316 nfe = 0 nfi = 5130 nni = 3532 hu = 6.86e-02 -t = 7.00e+00 nst = 328 nfe = 0 nfi = 5308 nni = 3647 hu = 9.31e-02 +t = 7.00e+00 nst = 329 nfe = 0 nfi = 5315 nni = 3652 hu = 8.22e-02 -t = 8.00e+00 nst = 339 nfe = 0 nfi = 5464 nni = 3748 hu = 9.70e-02 +t = 8.00e+00 nst = 339 nfe = 0 nfi = 5455 nni = 3742 hu = 1.19e-01 -t = 9.00e+00 nst = 349 nfe = 0 nfi = 5598 nni = 3832 hu = 1.12e-01 +t = 9.00e+00 nst = 345 nfe = 0 nfi = 5536 nni = 3793 hu = 2.11e-01 -t = 1.00e+01 nst = 359 nfe = 0 nfi = 5728 nni = 3912 hu = 1.31e-01 +t = 1.00e+01 nst = 349 nfe = 0 nfi = 5589 nni = 3826 hu = 2.80e-01 Final statistics for this run: - ARKStep real workspace length = 3557 - ARKStep integer workspace length = 146 + ARKStep real workspace length = 3558 + ARKStep integer workspace length = 146 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 359 + Number of steps = 349 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 5728 - Number of f-s (SPGMR) = 12934 - Number of f-s (TOTAL) = 12934 - Number of setups = 254 - Number of nonlinear iterations = 3912 - Number of linear iterations = 12934 - Number of preconditioner evaluations = 254 - Number of preconditioner solves = 16627 + Number of f-s (implicit) = 5589 + Number of f-s (SPGMR) = 12378 + Number of f-s (TOTAL) = 12378 + Number of setups = 244 + Number of nonlinear iterations = 3826 + Number of linear iterations = 12378 + Number of preconditioner evaluations = 244 + Number of preconditioner solves = 15957 Number of error test failures = 0 - Number of nonlinear conv. failures = 118 - Number of linear convergence failures = 1076 - Average Krylov subspace dimension = 3.306 + Number of nonlinear conv. failures = 113 + Number of linear convergence failures = 976 + Average Krylov subspace dimension = 3.235 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out b/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out index 58b34e703d..79d7c4a86f 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out @@ -190,18 +190,18 @@ Species 6 297691 307208 319252 319264 307245 297749 297229 297691 298276 298276 297692 297231 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.46e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.43e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2024 nni = 1386 hu = 1.28e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.25e-02 -t = 1.00e+00 nst = 154 nfe = 0 nfi = 2489 nni = 1716 hu = 6.84e-02 +t = 1.00e+00 nst = 153 nfe = 0 nfi = 2474 nni = 1706 hu = 6.52e-02 c values at t = 1: Species 1 -1.58851 1.59924 1.62152 1.64764 1.67036 1.68149 +1.58851 1.59924 1.62152 1.64765 1.67036 1.68149 1.58533 1.59503 1.61548 1.63952 1.66033 1.67036 -1.57757 1.58547 1.60239 1.62235 1.63952 1.64764 +1.57757 1.58547 1.60239 1.62235 1.63952 1.64765 1.5682 1.57412 1.58706 1.60239 1.61548 1.62152 1.56048 1.56463 1.57412 1.58547 1.59503 1.59924 1.55733 1.56048 1.5682 1.57757 1.58533 1.58851 @@ -210,7 +210,7 @@ Species 2 1.59067 1.60141 1.62371 1.64987 1.67261 1.68375 1.58748 1.5972 1.61766 1.64173 1.66257 1.67261 1.57971 1.58763 1.60457 1.62454 1.64173 1.64987 -1.57034 1.57626 1.58921 1.60457 1.61766 1.62371 +1.57034 1.57626 1.58922 1.60457 1.61766 1.62371 1.56261 1.56676 1.57626 1.58763 1.5972 1.60141 1.55945 1.56261 1.57034 1.57971 1.58748 1.59067 @@ -223,34 +223,34 @@ Species 3 1.56146 1.56462 1.57236 1.58174 1.58951 1.5927 Species 4 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 Species 5 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 Species 6 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 -t = 2.00e+00 nst = 165 nfe = 0 nfi = 2661 nni = 1833 hu = 4.14e-02 +t = 2.00e+00 nst = 164 nfe = 0 nfi = 2647 nni = 1824 hu = 1.58e-01 -t = 3.00e+00 nst = 177 nfe = 0 nfi = 2848 nni = 1960 hu = 1.08e-01 +t = 3.00e+00 nst = 170 nfe = 0 nfi = 2737 nni = 1884 hu = 1.58e-01 -t = 4.00e+00 nst = 187 nfe = 0 nfi = 3013 nni = 2073 hu = 1.23e-01 +t = 4.00e+00 nst = 176 nfe = 0 nfi = 2843 nni = 1955 hu = 1.85e-01 c values at t = 4: @@ -280,33 +280,33 @@ Species 3 Species 4 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 -t = 5.00e+00 nst = 198 nfe = 0 nfi = 3179 nni = 2182 hu = 9.99e-02 +t = 5.00e+00 nst = 181 nfe = 0 nfi = 2911 nni = 1998 hu = 2.46e-01 -t = 6.00e+00 nst = 207 nfe = 0 nfi = 3336 nni = 2284 hu = 9.66e-02 +t = 6.00e+00 nst = 184 nfe = 0 nfi = 2950 nni = 2022 hu = 3.05e-01 -t = 7.00e+00 nst = 216 nfe = 0 nfi = 3477 nni = 2375 hu = 1.51e-01 +t = 7.00e+00 nst = 186 nfe = 0 nfi = 2975 nni = 2037 hu = 4.87e-01 c values at t = 7: @@ -335,34 +335,34 @@ Species 3 1.16363 1.16614 1.17231 1.1798 1.18601 1.18854 Species 4 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 Species 5 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 Species 6 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 -t = 8.00e+00 nst = 232 nfe = 0 nfi = 3780 nni = 2567 hu = 1.06e-01 +t = 8.00e+00 nst = 188 nfe = 0 nfi = 3003 nni = 2055 hu = 7.64e-01 -t = 9.00e+00 nst = 249 nfe = 0 nfi = 4075 nni = 2742 hu = 8.61e-02 +t = 9.00e+00 nst = 189 nfe = 0 nfi = 3015 nni = 2062 hu = 7.64e-01 -t = 1.00e+01 nst = 266 nfe = 0 nfi = 4394 nni = 2941 hu = 8.37e-02 +t = 1.00e+01 nst = 190 nfe = 0 nfi = 3030 nni = 2072 hu = 1.57e+00 c values at t = 10: @@ -391,51 +391,51 @@ Species 3 1.16347 1.16598 1.17215 1.17964 1.18585 1.18838 Species 4 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Species 5 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Species 6 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Final statistics for this run: - ARKStep real workspace length = 3557 + ARKStep real workspace length = 3558 ARKStep integer workspace length = 131 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 266 + Number of steps = 190 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4394 - Number of f-s (SPGMR) = 8980 - Number of f-s (TOTAL) = 8980 - Number of setups = 121 - Number of nonlinear iterations = 2941 - Number of linear iterations = 8980 - Number of preconditioner evaluations = 121 - Number of preconditioner solves = 11819 - Number of error test failures = 23 - Number of nonlinear conv. failures = 17 - Number of linear convergence failures = 509 - Average Krylov subspace dimension = 3.053 + Number of f-s (implicit) = 3030 + Number of f-s (SPGMR) = 6097 + Number of f-s (TOTAL) = 6097 + Number of setups = 38 + Number of nonlinear iterations = 2072 + Number of linear iterations = 6097 + Number of preconditioner evaluations = 38 + Number of preconditioner solves = 8080 + Number of error test failures = 1 + Number of nonlinear conv. failures = 0 + Number of linear convergence failures = 182 + Average Krylov subspace dimension = 2.943 ---------------------------------------------------------------------------- @@ -459,52 +459,52 @@ t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.51e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.46e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.43e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2024 nni = 1386 hu = 1.28e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.25e-02 -t = 1.00e+00 nst = 154 nfe = 0 nfi = 2491 nni = 1718 hu = 7.60e-02 +t = 1.00e+00 nst = 153 nfe = 0 nfi = 2474 nni = 1706 hu = 6.52e-02 -t = 2.00e+00 nst = 169 nfe = 0 nfi = 2746 nni = 1896 hu = 8.04e-02 +t = 2.00e+00 nst = 164 nfe = 0 nfi = 2647 nni = 1824 hu = 1.58e-01 -t = 3.00e+00 nst = 181 nfe = 0 nfi = 2950 nni = 2036 hu = 1.01e-01 +t = 3.00e+00 nst = 170 nfe = 0 nfi = 2737 nni = 1884 hu = 1.58e-01 -t = 4.00e+00 nst = 189 nfe = 0 nfi = 3073 nni = 2119 hu = 1.33e-01 +t = 4.00e+00 nst = 176 nfe = 0 nfi = 2843 nni = 1955 hu = 1.85e-01 -t = 5.00e+00 nst = 199 nfe = 0 nfi = 3242 nni = 2227 hu = 9.38e-02 +t = 5.00e+00 nst = 181 nfe = 0 nfi = 2911 nni = 1998 hu = 2.46e-01 -t = 6.00e+00 nst = 211 nfe = 0 nfi = 3442 nni = 2352 hu = 1.13e-01 +t = 6.00e+00 nst = 184 nfe = 0 nfi = 2950 nni = 2022 hu = 3.05e-01 -t = 7.00e+00 nst = 220 nfe = 0 nfi = 3612 nni = 2457 hu = 1.07e-01 +t = 7.00e+00 nst = 186 nfe = 0 nfi = 2975 nni = 2037 hu = 4.86e-01 -t = 8.00e+00 nst = 229 nfe = 0 nfi = 3747 nni = 2537 hu = 1.33e-01 +t = 8.00e+00 nst = 188 nfe = 0 nfi = 3003 nni = 2055 hu = 7.64e-01 -t = 9.00e+00 nst = 239 nfe = 0 nfi = 3897 nni = 2622 hu = 8.98e-02 +t = 9.00e+00 nst = 189 nfe = 0 nfi = 3015 nni = 2062 hu = 7.64e-01 -t = 1.00e+01 nst = 251 nfe = 0 nfi = 4101 nni = 2746 hu = 7.09e-02 +t = 1.00e+01 nst = 190 nfe = 0 nfi = 3030 nni = 2072 hu = 1.57e+00 Final statistics for this run: - ARKStep real workspace length = 3557 - ARKStep integer workspace length = 136 + ARKStep real workspace length = 3558 + ARKStep integer workspace length = 136 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 251 + Number of steps = 190 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4101 - Number of f-s (SPGMR) = 8880 - Number of f-s (TOTAL) = 8880 - Number of setups = 91 - Number of nonlinear iterations = 2746 - Number of linear iterations = 8880 - Number of preconditioner evaluations = 91 - Number of preconditioner solves = 11537 - Number of error test failures = 18 - Number of nonlinear conv. failures = 13 - Number of linear convergence failures = 597 - Average Krylov subspace dimension = 3.234 + Number of f-s (implicit) = 3030 + Number of f-s (SPGMR) = 6096 + Number of f-s (TOTAL) = 6096 + Number of setups = 38 + Number of nonlinear iterations = 2072 + Number of linear iterations = 6096 + Number of preconditioner evaluations = 38 + Number of preconditioner solves = 8079 + Number of error test failures = 1 + Number of nonlinear conv. failures = 0 + Number of linear convergence failures = 182 + Average Krylov subspace dimension = 2.942 ---------------------------------------------------------------------------- @@ -526,54 +526,54 @@ t = 1.00e-05 nst = 27 nfe = 0 nfi = 407 nni = 269 hu = 4.79e-07 t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 -t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.50e-03 +t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.49e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.42e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1799 nni = 1231 hu = 3.79e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.23e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2028 nni = 1390 hu = 1.32e-02 -t = 1.00e+00 nst = 166 nfe = 0 nfi = 2714 nni = 1875 hu = 2.40e-02 +t = 1.00e+00 nst = 164 nfe = 0 nfi = 2669 nni = 1844 hu = 4.98e-02 -t = 2.00e+00 nst = 214 nfe = 0 nfi = 3550 nni = 2460 hu = 2.34e-02 +t = 2.00e+00 nst = 213 nfe = 0 nfi = 3526 nni = 2444 hu = 2.37e-02 -t = 3.00e+00 nst = 249 nfe = 0 nfi = 4111 nni = 2846 hu = 3.57e-02 +t = 3.00e+00 nst = 248 nfe = 0 nfi = 4087 nni = 2830 hu = 3.53e-02 -t = 4.00e+00 nst = 272 nfe = 0 nfi = 4472 nni = 3092 hu = 5.08e-02 +t = 4.00e+00 nst = 272 nfe = 0 nfi = 4465 nni = 3088 hu = 3.22e-02 -t = 5.00e+00 nst = 297 nfe = 0 nfi = 4851 nni = 3346 hu = 5.14e-02 +t = 5.00e+00 nst = 299 nfe = 0 nfi = 4876 nni = 3363 hu = 3.94e-02 -t = 6.00e+00 nst = 315 nfe = 0 nfi = 5117 nni = 3522 hu = 6.88e-02 +t = 6.00e+00 nst = 316 nfe = 0 nfi = 5130 nni = 3532 hu = 6.86e-02 -t = 7.00e+00 nst = 328 nfe = 0 nfi = 5302 nni = 3642 hu = 8.22e-02 +t = 7.00e+00 nst = 329 nfe = 0 nfi = 5315 nni = 3652 hu = 8.22e-02 -t = 8.00e+00 nst = 338 nfe = 0 nfi = 5441 nni = 3731 hu = 8.52e-02 +t = 8.00e+00 nst = 339 nfe = 0 nfi = 5455 nni = 3742 hu = 1.18e-01 -t = 9.00e+00 nst = 349 nfe = 0 nfi = 5592 nni = 3827 hu = 1.11e-01 +t = 9.00e+00 nst = 345 nfe = 0 nfi = 5536 nni = 3793 hu = 2.11e-01 -t = 1.00e+01 nst = 359 nfe = 0 nfi = 5722 nni = 3907 hu = 1.35e-01 +t = 1.00e+01 nst = 349 nfe = 0 nfi = 5589 nni = 3826 hu = 2.80e-01 Final statistics for this run: - ARKStep real workspace length = 3557 - ARKStep integer workspace length = 141 + ARKStep real workspace length = 3558 + ARKStep integer workspace length = 141 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 359 + Number of steps = 349 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 5722 - Number of f-s (SPGMR) = 12904 - Number of f-s (TOTAL) = 12904 - Number of setups = 253 - Number of nonlinear iterations = 3907 - Number of linear iterations = 12904 - Number of preconditioner evaluations = 253 - Number of preconditioner solves = 16594 + Number of f-s (implicit) = 5589 + Number of f-s (SPGMR) = 12378 + Number of f-s (TOTAL) = 12378 + Number of setups = 244 + Number of nonlinear iterations = 3826 + Number of linear iterations = 12378 + Number of preconditioner evaluations = 244 + Number of preconditioner solves = 15957 Number of error test failures = 0 - Number of nonlinear conv. failures = 117 - Number of linear convergence failures = 1072 - Average Krylov subspace dimension = 3.303 + Number of nonlinear conv. failures = 113 + Number of linear convergence failures = 977 + Average Krylov subspace dimension = 3.235 ---------------------------------------------------------------------------- @@ -595,54 +595,54 @@ t = 1.00e-05 nst = 27 nfe = 0 nfi = 407 nni = 269 hu = 4.79e-07 t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 -t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.50e-03 +t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.49e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.42e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1799 nni = 1231 hu = 3.79e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.23e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2028 nni = 1390 hu = 1.32e-02 -t = 1.00e+00 nst = 166 nfe = 0 nfi = 2714 nni = 1875 hu = 2.40e-02 +t = 1.00e+00 nst = 164 nfe = 0 nfi = 2669 nni = 1844 hu = 4.98e-02 -t = 2.00e+00 nst = 214 nfe = 0 nfi = 3556 nni = 2465 hu = 2.34e-02 +t = 2.00e+00 nst = 213 nfe = 0 nfi = 3526 nni = 2444 hu = 2.37e-02 -t = 3.00e+00 nst = 249 nfe = 0 nfi = 4117 nni = 2851 hu = 3.57e-02 +t = 3.00e+00 nst = 248 nfe = 0 nfi = 4087 nni = 2830 hu = 3.53e-02 -t = 4.00e+00 nst = 272 nfe = 0 nfi = 4478 nni = 3097 hu = 5.08e-02 +t = 4.00e+00 nst = 272 nfe = 0 nfi = 4465 nni = 3088 hu = 3.22e-02 -t = 5.00e+00 nst = 297 nfe = 0 nfi = 4857 nni = 3351 hu = 5.14e-02 +t = 5.00e+00 nst = 299 nfe = 0 nfi = 4876 nni = 3363 hu = 3.94e-02 -t = 6.00e+00 nst = 315 nfe = 0 nfi = 5123 nni = 3527 hu = 6.89e-02 +t = 6.00e+00 nst = 316 nfe = 0 nfi = 5130 nni = 3532 hu = 6.86e-02 -t = 7.00e+00 nst = 328 nfe = 0 nfi = 5308 nni = 3647 hu = 9.31e-02 +t = 7.00e+00 nst = 329 nfe = 0 nfi = 5315 nni = 3652 hu = 8.22e-02 -t = 8.00e+00 nst = 339 nfe = 0 nfi = 5464 nni = 3748 hu = 9.70e-02 +t = 8.00e+00 nst = 339 nfe = 0 nfi = 5455 nni = 3742 hu = 1.19e-01 -t = 9.00e+00 nst = 349 nfe = 0 nfi = 5598 nni = 3832 hu = 1.12e-01 +t = 9.00e+00 nst = 345 nfe = 0 nfi = 5536 nni = 3793 hu = 2.11e-01 -t = 1.00e+01 nst = 359 nfe = 0 nfi = 5728 nni = 3912 hu = 1.31e-01 +t = 1.00e+01 nst = 349 nfe = 0 nfi = 5589 nni = 3826 hu = 2.80e-01 Final statistics for this run: - ARKStep real workspace length = 3557 - ARKStep integer workspace length = 146 + ARKStep real workspace length = 3558 + ARKStep integer workspace length = 146 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 359 + Number of steps = 349 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 5728 - Number of f-s (SPGMR) = 12934 - Number of f-s (TOTAL) = 12934 - Number of setups = 254 - Number of nonlinear iterations = 3912 - Number of linear iterations = 12934 - Number of preconditioner evaluations = 254 - Number of preconditioner solves = 16627 + Number of f-s (implicit) = 5589 + Number of f-s (SPGMR) = 12378 + Number of f-s (TOTAL) = 12378 + Number of setups = 244 + Number of nonlinear iterations = 3826 + Number of linear iterations = 12378 + Number of preconditioner evaluations = 244 + Number of preconditioner solves = 15957 Number of error test failures = 0 - Number of nonlinear conv. failures = 118 - Number of linear convergence failures = 1076 - Average Krylov subspace dimension = 3.306 + Number of nonlinear conv. failures = 113 + Number of linear convergence failures = 976 + Average Krylov subspace dimension = 3.235 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out b/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out index 1af6fb8046..79d7c4a86f 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out @@ -190,18 +190,18 @@ Species 6 297691 307208 319252 319264 307245 297749 297229 297691 298276 298276 297692 297231 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.46e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.43e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2024 nni = 1386 hu = 1.28e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.25e-02 -t = 1.00e+00 nst = 154 nfe = 0 nfi = 2489 nni = 1716 hu = 6.84e-02 +t = 1.00e+00 nst = 153 nfe = 0 nfi = 2474 nni = 1706 hu = 6.52e-02 c values at t = 1: Species 1 -1.58851 1.59924 1.62152 1.64764 1.67036 1.68149 +1.58851 1.59924 1.62152 1.64765 1.67036 1.68149 1.58533 1.59503 1.61548 1.63952 1.66033 1.67036 -1.57757 1.58547 1.60239 1.62235 1.63952 1.64764 +1.57757 1.58547 1.60239 1.62235 1.63952 1.64765 1.5682 1.57412 1.58706 1.60239 1.61548 1.62152 1.56048 1.56463 1.57412 1.58547 1.59503 1.59924 1.55733 1.56048 1.5682 1.57757 1.58533 1.58851 @@ -210,7 +210,7 @@ Species 2 1.59067 1.60141 1.62371 1.64987 1.67261 1.68375 1.58748 1.5972 1.61766 1.64173 1.66257 1.67261 1.57971 1.58763 1.60457 1.62454 1.64173 1.64987 -1.57034 1.57626 1.58921 1.60457 1.61766 1.62371 +1.57034 1.57626 1.58922 1.60457 1.61766 1.62371 1.56261 1.56676 1.57626 1.58763 1.5972 1.60141 1.55945 1.56261 1.57034 1.57971 1.58748 1.59067 @@ -223,34 +223,34 @@ Species 3 1.56146 1.56462 1.57236 1.58174 1.58951 1.5927 Species 4 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 Species 5 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 Species 6 -47718.3 48040.3 48709 49493.5 50175.5 50509.4 +47718.4 48040.3 48709 49493.5 50175.5 50509.4 47622.8 47914 48527.8 49249.6 49874.4 50175.5 -47389.7 47627 48134.9 48734.2 49249.6 49493.5 -47108.5 47286 47674.6 48134.9 48527.8 48709 -46876.6 47001.2 47286 47627 47914 48040.3 -46781.9 46876.6 47108.5 47389.7 47622.8 47718.3 +47389.7 47627 48135 48734.2 49249.6 49493.5 +47108.5 47286.1 47674.6 48135 48527.8 48709 +46876.6 47001.1 47286.1 47627 47914 48040.3 +46781.9 46876.6 47108.5 47389.7 47622.8 47718.4 -t = 2.00e+00 nst = 165 nfe = 0 nfi = 2661 nni = 1833 hu = 4.14e-02 +t = 2.00e+00 nst = 164 nfe = 0 nfi = 2647 nni = 1824 hu = 1.58e-01 -t = 3.00e+00 nst = 177 nfe = 0 nfi = 2848 nni = 1960 hu = 1.08e-01 +t = 3.00e+00 nst = 170 nfe = 0 nfi = 2737 nni = 1884 hu = 1.58e-01 -t = 4.00e+00 nst = 187 nfe = 0 nfi = 3013 nni = 2073 hu = 1.23e-01 +t = 4.00e+00 nst = 176 nfe = 0 nfi = 2843 nni = 1955 hu = 1.85e-01 c values at t = 4: @@ -280,33 +280,33 @@ Species 3 Species 4 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 35860.6 36110.2 36632.4 37246.4 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35784.2 36010.4 36490.4 37056.3 37545.4 37779.5 35597.2 35782 36180.5 36651.6 37056.3 37246.4 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35371.4 35510.3 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.3 35782 36010.4 36110.2 +35109.8 35185.4 35371.4 35597.2 35784.2 35860.6 -t = 5.00e+00 nst = 198 nfe = 0 nfi = 3179 nni = 2182 hu = 9.99e-02 +t = 5.00e+00 nst = 181 nfe = 0 nfi = 2911 nni = 1998 hu = 2.46e-01 -t = 6.00e+00 nst = 207 nfe = 0 nfi = 3336 nni = 2284 hu = 9.66e-02 +t = 6.00e+00 nst = 184 nfe = 0 nfi = 2950 nni = 2022 hu = 3.05e-01 -t = 7.00e+00 nst = 216 nfe = 0 nfi = 3477 nni = 2375 hu = 1.51e-01 +t = 7.00e+00 nst = 186 nfe = 0 nfi = 2975 nni = 2037 hu = 4.87e-01 c values at t = 7: @@ -335,34 +335,34 @@ Species 3 1.16363 1.16614 1.17231 1.1798 1.18601 1.18854 Species 4 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 Species 5 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 Species 6 -35656.3 35903.1 36424.2 37033.8 37564.6 37822.3 -35578.4 35804.9 36281.3 36845.5 37330.9 37564.6 -35393.9 35575.9 35974.4 36441.4 36845.5 37033.8 -35167.5 35307.4 35610.6 35974.4 36281.3 36424.2 -34984.3 35080.2 35307.4 35575.9 35804.9 35903.1 -34907.5 34984.3 35167.5 35393.9 35578.4 35656.3 +35655.3 35903.6 36423.2 37034.1 37564.4 37822.3 +35579.3 35804.3 36281.9 36844.9 37331.5 37564.4 +35393.1 35577 35973.5 36442.3 36844.9 37034.1 +35168.4 35306.6 35611.5 35973.5 36281.9 36423.2 +34983.3 35081.1 35306.6 35577 35804.3 35903.6 +34907.9 34983.3 35168.4 35393.1 35579.3 35655.3 -t = 8.00e+00 nst = 232 nfe = 0 nfi = 3780 nni = 2567 hu = 1.06e-01 +t = 8.00e+00 nst = 188 nfe = 0 nfi = 3003 nni = 2055 hu = 7.64e-01 -t = 9.00e+00 nst = 249 nfe = 0 nfi = 4075 nni = 2742 hu = 8.61e-02 +t = 9.00e+00 nst = 189 nfe = 0 nfi = 3015 nni = 2062 hu = 7.64e-01 -t = 1.00e+01 nst = 266 nfe = 0 nfi = 4394 nni = 2941 hu = 8.37e-02 +t = 1.00e+01 nst = 190 nfe = 0 nfi = 3030 nni = 2072 hu = 1.57e+00 c values at t = 10: @@ -391,51 +391,51 @@ Species 3 1.16347 1.16598 1.17215 1.17964 1.18585 1.18838 Species 4 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Species 5 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Species 6 -35650.6 35898.8 36418.4 37029.2 37559.5 37817.3 +35650.6 35898.8 36418.3 37029.2 37559.5 37817.3 35574.5 35799.5 36277.1 36840 37326.6 37559.5 -35388.4 35572.3 35968.8 36437.5 36840 37029.2 -35163.7 35302 35606.7 35968.8 36277.1 36418.4 -34978.6 35076.5 35302 35572.3 35799.5 35898.8 +35388.4 35572.3 35968.7 36437.4 36840 37029.2 +35163.7 35301.9 35606.7 35968.7 36277.1 36418.3 +34978.6 35076.5 35301.9 35572.3 35799.5 35898.8 34903.3 34978.6 35163.7 35388.4 35574.5 35650.6 Final statistics for this run: - ARKStep real workspace length = 3557 - ARKStep integer workspace length = 131 + ARKStep real workspace length = 3558 + ARKStep integer workspace length = 131 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 266 + Number of steps = 190 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4394 - Number of f-s (SPGMR) = 8980 - Number of f-s (TOTAL) = 8980 - Number of setups = 121 - Number of nonlinear iterations = 2941 - Number of linear iterations = 8980 - Number of preconditioner evaluations = 121 - Number of preconditioner solves = 11819 - Number of error test failures = 23 - Number of nonlinear conv. failures = 17 - Number of linear convergence failures = 509 - Average Krylov subspace dimension = 3.053 + Number of f-s (implicit) = 3030 + Number of f-s (SPGMR) = 6097 + Number of f-s (TOTAL) = 6097 + Number of setups = 38 + Number of nonlinear iterations = 2072 + Number of linear iterations = 6097 + Number of preconditioner evaluations = 38 + Number of preconditioner solves = 8080 + Number of error test failures = 1 + Number of nonlinear conv. failures = 0 + Number of linear convergence failures = 182 + Average Krylov subspace dimension = 2.943 ---------------------------------------------------------------------------- @@ -459,52 +459,52 @@ t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.51e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.46e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.43e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2024 nni = 1386 hu = 1.28e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.25e-02 -t = 1.00e+00 nst = 154 nfe = 0 nfi = 2491 nni = 1718 hu = 7.60e-02 +t = 1.00e+00 nst = 153 nfe = 0 nfi = 2474 nni = 1706 hu = 6.52e-02 -t = 2.00e+00 nst = 169 nfe = 0 nfi = 2746 nni = 1896 hu = 8.04e-02 +t = 2.00e+00 nst = 164 nfe = 0 nfi = 2647 nni = 1824 hu = 1.58e-01 -t = 3.00e+00 nst = 181 nfe = 0 nfi = 2950 nni = 2036 hu = 1.01e-01 +t = 3.00e+00 nst = 170 nfe = 0 nfi = 2737 nni = 1884 hu = 1.58e-01 -t = 4.00e+00 nst = 189 nfe = 0 nfi = 3073 nni = 2119 hu = 1.33e-01 +t = 4.00e+00 nst = 176 nfe = 0 nfi = 2843 nni = 1955 hu = 1.85e-01 -t = 5.00e+00 nst = 199 nfe = 0 nfi = 3242 nni = 2227 hu = 9.38e-02 +t = 5.00e+00 nst = 181 nfe = 0 nfi = 2911 nni = 1998 hu = 2.46e-01 -t = 6.00e+00 nst = 211 nfe = 0 nfi = 3442 nni = 2352 hu = 1.13e-01 +t = 6.00e+00 nst = 184 nfe = 0 nfi = 2950 nni = 2022 hu = 3.05e-01 -t = 7.00e+00 nst = 220 nfe = 0 nfi = 3612 nni = 2457 hu = 1.07e-01 +t = 7.00e+00 nst = 186 nfe = 0 nfi = 2975 nni = 2037 hu = 4.86e-01 -t = 8.00e+00 nst = 229 nfe = 0 nfi = 3747 nni = 2537 hu = 1.33e-01 +t = 8.00e+00 nst = 188 nfe = 0 nfi = 3003 nni = 2055 hu = 7.64e-01 -t = 9.00e+00 nst = 239 nfe = 0 nfi = 3897 nni = 2622 hu = 8.98e-02 +t = 9.00e+00 nst = 189 nfe = 0 nfi = 3015 nni = 2062 hu = 7.64e-01 -t = 1.00e+01 nst = 251 nfe = 0 nfi = 4101 nni = 2746 hu = 7.09e-02 +t = 1.00e+01 nst = 190 nfe = 0 nfi = 3030 nni = 2072 hu = 1.57e+00 Final statistics for this run: - ARKStep real workspace length = 3557 - ARKStep integer workspace length = 136 + ARKStep real workspace length = 3558 + ARKStep integer workspace length = 136 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 251 + Number of steps = 190 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4101 - Number of f-s (SPGMR) = 8880 - Number of f-s (TOTAL) = 8880 - Number of setups = 91 - Number of nonlinear iterations = 2746 - Number of linear iterations = 8880 - Number of preconditioner evaluations = 91 - Number of preconditioner solves = 11537 - Number of error test failures = 18 - Number of nonlinear conv. failures = 13 - Number of linear convergence failures = 597 - Average Krylov subspace dimension = 3.234 + Number of f-s (implicit) = 3030 + Number of f-s (SPGMR) = 6096 + Number of f-s (TOTAL) = 6096 + Number of setups = 38 + Number of nonlinear iterations = 2072 + Number of linear iterations = 6096 + Number of preconditioner evaluations = 38 + Number of preconditioner solves = 8079 + Number of error test failures = 1 + Number of nonlinear conv. failures = 0 + Number of linear convergence failures = 182 + Average Krylov subspace dimension = 2.942 ---------------------------------------------------------------------------- @@ -526,54 +526,54 @@ t = 1.00e-05 nst = 27 nfe = 0 nfi = 407 nni = 269 hu = 4.79e-07 t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 -t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.50e-03 +t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.49e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.42e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1799 nni = 1231 hu = 3.79e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.23e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2028 nni = 1390 hu = 1.32e-02 -t = 1.00e+00 nst = 166 nfe = 0 nfi = 2714 nni = 1875 hu = 2.40e-02 +t = 1.00e+00 nst = 164 nfe = 0 nfi = 2669 nni = 1844 hu = 4.98e-02 -t = 2.00e+00 nst = 214 nfe = 0 nfi = 3550 nni = 2460 hu = 2.34e-02 +t = 2.00e+00 nst = 213 nfe = 0 nfi = 3526 nni = 2444 hu = 2.37e-02 -t = 3.00e+00 nst = 249 nfe = 0 nfi = 4111 nni = 2846 hu = 3.57e-02 +t = 3.00e+00 nst = 248 nfe = 0 nfi = 4087 nni = 2830 hu = 3.53e-02 -t = 4.00e+00 nst = 272 nfe = 0 nfi = 4472 nni = 3092 hu = 5.08e-02 +t = 4.00e+00 nst = 272 nfe = 0 nfi = 4465 nni = 3088 hu = 3.22e-02 -t = 5.00e+00 nst = 297 nfe = 0 nfi = 4851 nni = 3346 hu = 5.14e-02 +t = 5.00e+00 nst = 299 nfe = 0 nfi = 4876 nni = 3363 hu = 3.94e-02 -t = 6.00e+00 nst = 315 nfe = 0 nfi = 5117 nni = 3522 hu = 6.88e-02 +t = 6.00e+00 nst = 316 nfe = 0 nfi = 5130 nni = 3532 hu = 6.86e-02 -t = 7.00e+00 nst = 328 nfe = 0 nfi = 5302 nni = 3642 hu = 8.22e-02 +t = 7.00e+00 nst = 329 nfe = 0 nfi = 5315 nni = 3652 hu = 8.22e-02 -t = 8.00e+00 nst = 338 nfe = 0 nfi = 5441 nni = 3731 hu = 8.52e-02 +t = 8.00e+00 nst = 339 nfe = 0 nfi = 5455 nni = 3742 hu = 1.18e-01 -t = 9.00e+00 nst = 349 nfe = 0 nfi = 5592 nni = 3827 hu = 1.11e-01 +t = 9.00e+00 nst = 345 nfe = 0 nfi = 5536 nni = 3793 hu = 2.11e-01 -t = 1.00e+01 nst = 359 nfe = 0 nfi = 5722 nni = 3907 hu = 1.35e-01 +t = 1.00e+01 nst = 349 nfe = 0 nfi = 5589 nni = 3826 hu = 2.80e-01 Final statistics for this run: - ARKStep real workspace length = 3557 - ARKStep integer workspace length = 141 + ARKStep real workspace length = 3558 + ARKStep integer workspace length = 141 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 359 + Number of steps = 349 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 5722 - Number of f-s (SPGMR) = 12904 - Number of f-s (TOTAL) = 12904 - Number of setups = 253 - Number of nonlinear iterations = 3907 - Number of linear iterations = 12904 - Number of preconditioner evaluations = 253 - Number of preconditioner solves = 16594 + Number of f-s (implicit) = 5589 + Number of f-s (SPGMR) = 12378 + Number of f-s (TOTAL) = 12378 + Number of setups = 244 + Number of nonlinear iterations = 3826 + Number of linear iterations = 12378 + Number of preconditioner evaluations = 244 + Number of preconditioner solves = 15957 Number of error test failures = 0 - Number of nonlinear conv. failures = 117 - Number of linear convergence failures = 1072 - Average Krylov subspace dimension = 3.303 + Number of nonlinear conv. failures = 113 + Number of linear convergence failures = 977 + Average Krylov subspace dimension = 3.235 ---------------------------------------------------------------------------- @@ -595,54 +595,54 @@ t = 1.00e-05 nst = 27 nfe = 0 nfi = 407 nni = 269 hu = 4.79e-07 t = 1.00e-04 nst = 106 nfe = 0 nfi = 1688 nni = 1155 hu = 1.70e-05 -t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.50e-03 +t = 1.00e-03 nst = 110 nfe = 0 nfi = 1750 nni = 1197 hu = 1.49e-03 -t = 1.00e-02 nst = 113 nfe = 0 nfi = 1797 nni = 1229 hu = 3.42e-03 +t = 1.00e-02 nst = 113 nfe = 0 nfi = 1799 nni = 1231 hu = 3.79e-03 -t = 1.00e-01 nst = 127 nfe = 0 nfi = 2023 nni = 1385 hu = 1.23e-02 +t = 1.00e-01 nst = 127 nfe = 0 nfi = 2028 nni = 1390 hu = 1.32e-02 -t = 1.00e+00 nst = 166 nfe = 0 nfi = 2714 nni = 1875 hu = 2.40e-02 +t = 1.00e+00 nst = 164 nfe = 0 nfi = 2669 nni = 1844 hu = 4.98e-02 -t = 2.00e+00 nst = 214 nfe = 0 nfi = 3556 nni = 2465 hu = 2.34e-02 +t = 2.00e+00 nst = 213 nfe = 0 nfi = 3526 nni = 2444 hu = 2.37e-02 -t = 3.00e+00 nst = 249 nfe = 0 nfi = 4117 nni = 2851 hu = 3.57e-02 +t = 3.00e+00 nst = 248 nfe = 0 nfi = 4087 nni = 2830 hu = 3.53e-02 -t = 4.00e+00 nst = 272 nfe = 0 nfi = 4478 nni = 3097 hu = 5.08e-02 +t = 4.00e+00 nst = 272 nfe = 0 nfi = 4465 nni = 3088 hu = 3.22e-02 -t = 5.00e+00 nst = 297 nfe = 0 nfi = 4857 nni = 3351 hu = 5.14e-02 +t = 5.00e+00 nst = 299 nfe = 0 nfi = 4876 nni = 3363 hu = 3.94e-02 -t = 6.00e+00 nst = 315 nfe = 0 nfi = 5123 nni = 3527 hu = 6.89e-02 +t = 6.00e+00 nst = 316 nfe = 0 nfi = 5130 nni = 3532 hu = 6.86e-02 -t = 7.00e+00 nst = 328 nfe = 0 nfi = 5308 nni = 3647 hu = 9.31e-02 +t = 7.00e+00 nst = 329 nfe = 0 nfi = 5315 nni = 3652 hu = 8.22e-02 -t = 8.00e+00 nst = 339 nfe = 0 nfi = 5464 nni = 3748 hu = 9.70e-02 +t = 8.00e+00 nst = 339 nfe = 0 nfi = 5455 nni = 3742 hu = 1.19e-01 -t = 9.00e+00 nst = 349 nfe = 0 nfi = 5598 nni = 3832 hu = 1.12e-01 +t = 9.00e+00 nst = 345 nfe = 0 nfi = 5536 nni = 3793 hu = 2.11e-01 -t = 1.00e+01 nst = 359 nfe = 0 nfi = 5728 nni = 3912 hu = 1.31e-01 +t = 1.00e+01 nst = 349 nfe = 0 nfi = 5589 nni = 3826 hu = 2.80e-01 Final statistics for this run: - ARKStep real workspace length = 3557 - ARKStep integer workspace length = 146 + ARKStep real workspace length = 3558 + ARKStep integer workspace length = 146 ARKLS real workspace length = 2647 ARKLS integer workspace length = 42 - Number of steps = 359 + Number of steps = 349 Number of f-s (explicit) = 0 - Number of f-s (implicit) = 5728 - Number of f-s (SPGMR) = 12934 - Number of f-s (TOTAL) = 12934 - Number of setups = 254 - Number of nonlinear iterations = 3912 - Number of linear iterations = 12934 - Number of preconditioner evaluations = 254 - Number of preconditioner solves = 16627 + Number of f-s (implicit) = 5589 + Number of f-s (SPGMR) = 12378 + Number of f-s (TOTAL) = 12378 + Number of setups = 244 + Number of nonlinear iterations = 3826 + Number of linear iterations = 12378 + Number of preconditioner evaluations = 244 + Number of preconditioner solves = 15957 Number of error test failures = 0 - Number of nonlinear conv. failures = 118 - Number of linear convergence failures = 1076 - Average Krylov subspace dimension = 3.306 + Number of nonlinear conv. failures = 113 + Number of linear convergence failures = 976 + Average Krylov subspace dimension = 3.235 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_brusselator1D.out b/examples/arkode/C_serial/ark_brusselator1D.out index abe61d1f47..fed3032856 100644 --- a/examples/arkode/C_serial/ark_brusselator1D.out +++ b/examples/arkode/C_serial/ark_brusselator1D.out @@ -8,102 +8,102 @@ t ||u||_rms ||v||_rms ||w||_rms ---------------------------------------------- 0.100000 0.673914 3.377329 1.999987 - 0.200000 0.684316 3.356619 1.999987 + 0.200000 0.684316 3.356619 1.999986 0.300000 0.695306 3.334633 1.999986 0.400000 0.706918 3.311313 1.999986 0.500000 0.719185 3.286601 1.999986 0.600000 0.732137 3.260442 1.999986 0.700000 0.745798 3.232787 1.999985 0.800000 0.760185 3.203596 1.999985 - 0.900000 0.775303 3.172839 1.999985 + 0.900000 0.775302 3.172839 1.999985 1.000000 0.791135 3.140510 1.999984 1.100000 0.807648 3.106624 1.999984 1.200000 0.824771 3.071233 1.999984 1.300000 0.842402 3.034426 1.999983 1.400000 0.860384 2.996350 1.999983 - 1.500000 0.878514 2.957206 1.999983 + 1.500000 0.878514 2.957207 1.999983 1.600000 0.896525 2.917266 1.999982 1.700000 0.914089 2.876873 1.999982 1.800000 0.930823 2.836438 1.999982 1.900000 0.946292 2.796446 1.999982 - 2.000000 0.960033 2.757430 1.999981 - 2.100000 0.971576 2.719962 1.999981 - 2.200000 0.980475 2.684623 1.999981 + 2.000000 0.960034 2.757430 1.999981 + 2.100000 0.971577 2.719961 1.999981 + 2.200000 0.980476 2.684622 1.999981 2.300000 0.986338 2.651980 1.999981 - 2.400000 0.988852 2.622560 1.999981 - 2.500000 0.987815 2.596818 1.999981 - 2.600000 0.983141 2.575128 1.999981 - 2.700000 0.974858 2.557766 1.999981 - 2.800000 0.963114 2.544903 1.999981 - 2.900000 0.948154 2.536611 1.999981 - 3.000000 0.930299 2.532868 1.999982 - 3.100000 0.909930 2.533567 1.999982 - 3.200000 0.887464 2.538529 1.999983 - 3.300000 0.863335 2.547515 1.999983 - 3.400000 0.837978 2.560241 1.999983 + 2.400000 0.988853 2.622559 1.999981 + 2.500000 0.987816 2.596818 1.999981 + 2.600000 0.983141 2.575127 1.999981 + 2.700000 0.974859 2.557765 1.999981 + 2.800000 0.963115 2.544902 1.999981 + 2.900000 0.948155 2.536610 1.999981 + 3.000000 0.930300 2.532867 1.999982 + 3.100000 0.909931 2.533566 1.999982 + 3.200000 0.887464 2.538528 1.999983 + 3.300000 0.863335 2.547514 1.999983 + 3.400000 0.837978 2.560240 1.999983 3.500000 0.811818 2.576391 1.999984 3.600000 0.785255 2.595624 1.999984 - 3.700000 0.758659 2.617587 1.999985 - 3.800000 0.732363 2.641922 1.999986 + 3.700000 0.758658 2.617586 1.999985 + 3.800000 0.732363 2.641921 1.999986 3.900000 0.706662 2.668274 1.999986 4.000000 0.681809 2.696300 1.999986 - 4.100000 0.658012 2.725670 1.999987 + 4.100000 0.658011 2.725670 1.999987 4.200000 0.635435 2.756075 1.999987 - 4.300000 0.614205 2.787228 1.999988 + 4.300000 0.614204 2.787228 1.999988 4.400000 0.594404 2.818869 1.999988 4.500000 0.576082 2.850764 1.999989 - 4.600000 0.559255 2.882710 1.999989 + 4.600000 0.559254 2.882710 1.999989 4.700000 0.543909 2.914529 1.999989 4.800000 0.530011 2.946071 1.999990 - 4.900000 0.517506 2.977209 1.999990 + 4.900000 0.517506 2.977210 1.999990 5.000000 0.506326 3.007843 1.999990 - 5.100000 0.496394 3.037889 1.999990 - 5.200000 0.487626 3.067283 1.999990 + 5.100000 0.496393 3.037889 1.999990 + 5.200000 0.487625 3.067283 1.999990 5.300000 0.479935 3.095976 1.999991 5.400000 0.473237 3.123932 1.999991 - 5.500000 0.467445 3.151125 1.999991 + 5.500000 0.467445 3.151126 1.999991 5.600000 0.462480 3.177540 1.999991 5.700000 0.458264 3.203165 1.999991 5.800000 0.454726 3.227997 1.999991 - 5.900000 0.451800 3.252035 1.999991 + 5.900000 0.451799 3.252035 1.999991 6.000000 0.449425 3.275283 1.999991 - 6.100000 0.447546 3.297744 1.999991 + 6.100000 0.447546 3.297745 1.999991 6.200000 0.446115 3.319428 1.999991 - 6.300000 0.445086 3.340340 1.999991 - 6.400000 0.444419 3.360491 1.999991 - 6.500000 0.444079 3.379890 1.999991 + 6.300000 0.445085 3.340341 1.999991 + 6.400000 0.444419 3.360492 1.999991 + 6.500000 0.444079 3.379891 1.999991 6.600000 0.444034 3.398547 1.999991 6.700000 0.444257 3.416470 1.999991 6.800000 0.444722 3.433669 1.999991 6.900000 0.445409 3.450154 1.999991 - 7.000000 0.446297 3.465934 1.999991 + 7.000000 0.446297 3.465935 1.999991 7.100000 0.447370 3.481018 1.999991 - 7.200000 0.448614 3.495414 1.999991 + 7.200000 0.448614 3.495415 1.999991 7.300000 0.450016 3.509131 1.999991 7.400000 0.451564 3.522176 1.999991 7.500000 0.453249 3.534557 1.999991 7.600000 0.455064 3.546280 1.999991 7.700000 0.457000 3.557353 1.999991 7.800000 0.459052 3.567781 1.999991 - 7.900000 0.461216 3.577571 1.999991 - 8.000000 0.463486 3.586728 1.999991 + 7.900000 0.461215 3.577572 1.999991 + 8.000000 0.463486 3.586729 1.999991 8.100000 0.465860 3.595257 1.999991 8.200000 0.468335 3.603162 1.999991 8.300000 0.470909 3.610447 1.999991 8.400000 0.473582 3.617116 1.999991 - 8.500000 0.476352 3.623171 1.999991 + 8.500000 0.476352 3.623172 1.999991 8.600000 0.479220 3.628616 1.999991 8.700000 0.482186 3.633451 1.999991 8.800000 0.485250 3.637679 1.999990 8.900000 0.488416 3.641299 1.999990 - 9.000000 0.491684 3.644311 1.999990 - 9.100000 0.495058 3.646715 1.999990 - 9.200000 0.498540 3.648509 1.999990 - 9.300000 0.502134 3.649691 1.999990 - 9.400000 0.505844 3.650257 1.999990 - 9.500000 0.509675 3.650202 1.999990 - 9.600000 0.513632 3.649521 1.999990 - 9.700000 0.517722 3.648209 1.999990 + 9.000000 0.491684 3.644312 1.999990 + 9.100000 0.495058 3.646716 1.999990 + 9.200000 0.498539 3.648510 1.999990 + 9.300000 0.502133 3.649691 1.999990 + 9.400000 0.505843 3.650257 1.999990 + 9.500000 0.509674 3.650202 1.999990 + 9.600000 0.513632 3.649522 1.999990 + 9.700000 0.517722 3.648210 1.999990 9.800000 0.521951 3.646257 1.999990 9.900000 0.526326 3.643656 1.999990 10.000000 0.530857 3.640396 1.999990 diff --git a/examples/arkode/C_serial/ark_brusselator1D_FEM_slu.out b/examples/arkode/C_serial/ark_brusselator1D_FEM_slu.out index 28851a7ed1..863032a717 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_FEM_slu.out +++ b/examples/arkode/C_serial/ark_brusselator1D_FEM_slu.out @@ -13,68 +13,68 @@ 0.300000 0.648532 3.334867 1.999989 0.400000 0.654362 3.323350 1.999989 0.500000 0.660542 3.311172 1.999988 - 0.600000 0.667093 3.298310 1.999988 - 0.700000 0.674031 3.284739 1.999988 + 0.600000 0.667093 3.298309 1.999988 + 0.700000 0.674031 3.284739 1.999989 0.800000 0.681370 3.270442 1.999988 0.900000 0.689121 3.255404 1.999988 - 1.000000 0.697285 3.239620 1.999988 - 1.100000 0.705854 3.223093 1.999987 + 1.000000 0.697284 3.239620 1.999988 + 1.100000 0.705853 3.223093 1.999987 1.200000 0.714805 3.205842 1.999987 - 1.300000 0.724099 3.187902 1.999987 - 1.400000 0.733671 3.169332 1.999987 - 1.500000 0.743429 3.150211 1.999987 - 1.600000 0.753249 3.130653 1.999987 - 1.700000 0.762974 3.110800 1.999986 - 1.800000 0.772412 3.090827 1.999986 - 1.900000 0.781337 3.070944 1.999986 - 2.000000 0.789501 3.051388 1.999986 - 2.100000 0.796639 3.032420 1.999986 - 2.200000 0.802490 3.014317 1.999986 - 2.300000 0.806810 2.997358 1.999986 - 2.400000 0.809386 2.981818 1.999986 - 2.500000 0.810060 2.967949 1.999986 - 2.600000 0.808729 2.955977 1.999986 - 2.700000 0.805360 2.946085 1.999986 - 2.800000 0.799989 2.938410 1.999986 - 2.900000 0.792711 2.933039 1.999986 - 3.000000 0.783680 2.930010 1.999986 - 3.100000 0.773095 2.929307 1.999986 - 3.200000 0.761187 2.930873 1.999986 - 3.300000 0.748207 2.934612 1.999987 - 3.400000 0.734416 2.940393 1.999987 - 3.500000 0.720073 2.948062 1.999987 + 1.300000 0.724098 3.187903 1.999987 + 1.400000 0.733670 3.169332 1.999987 + 1.500000 0.743428 3.150212 1.999987 + 1.600000 0.753248 3.130655 1.999987 + 1.700000 0.762974 3.110801 1.999986 + 1.800000 0.772411 3.090829 1.999986 + 1.900000 0.781336 3.070946 1.999986 + 2.000000 0.789499 3.051390 1.999986 + 2.100000 0.796638 3.032422 1.999986 + 2.200000 0.802489 3.014319 1.999986 + 2.300000 0.806808 2.997360 1.999986 + 2.400000 0.809386 2.981819 1.999986 + 2.500000 0.810059 2.967951 1.999986 + 2.600000 0.808728 2.955979 1.999986 + 2.700000 0.805361 2.946086 1.999986 + 2.800000 0.799988 2.938411 1.999986 + 2.900000 0.792711 2.933041 1.999986 + 3.000000 0.783681 2.930010 1.999986 + 3.100000 0.773096 2.929307 1.999986 + 3.200000 0.761187 2.930874 1.999986 + 3.300000 0.748207 2.934613 1.999987 + 3.400000 0.734416 2.940394 1.999987 + 3.500000 0.720074 2.948062 1.999987 3.600000 0.705429 2.957444 1.999987 - 3.700000 0.690714 2.968354 1.999988 + 3.700000 0.690715 2.968354 1.999988 3.800000 0.676141 2.980600 1.999988 - 3.900000 0.661891 2.993989 1.999988 - 4.000000 0.648122 3.008331 1.999989 - 4.100000 0.634961 3.023445 1.999989 + 3.900000 0.661892 2.993989 1.999988 + 4.000000 0.648123 3.008331 1.999989 + 4.100000 0.634962 3.023445 1.999989 4.200000 0.622506 3.039157 1.999989 4.300000 0.610828 3.055308 1.999989 - 4.400000 0.599972 3.071752 1.999989 + 4.400000 0.599972 3.071751 1.999989 4.500000 0.589962 3.088356 1.999990 4.600000 0.580801 3.105007 1.999990 - 4.700000 0.572477 3.121603 1.999990 - 4.800000 0.564964 3.138059 1.999990 + 4.700000 0.572477 3.121602 1.999990 + 4.800000 0.564964 3.138058 1.999990 4.900000 0.558227 3.154303 1.999990 - 5.000000 0.552224 3.170278 1.999990 + 5.000000 0.552224 3.170277 1.999990 5.100000 0.546907 3.185935 1.999991 - 5.200000 0.542228 3.201239 1.999991 - 5.300000 0.538137 3.216162 1.999991 - 5.400000 0.534585 3.230683 1.999991 + 5.200000 0.542229 3.201239 1.999991 + 5.300000 0.538138 3.216162 1.999991 + 5.400000 0.534586 3.230682 1.999991 5.500000 0.531525 3.244788 1.999991 - 5.600000 0.528910 3.258469 1.999991 - 5.700000 0.526699 3.271720 1.999991 + 5.600000 0.528910 3.258468 1.999991 + 5.700000 0.526699 3.271719 1.999991 5.800000 0.524852 3.284539 1.999991 5.900000 0.523334 3.296928 1.999991 - 6.000000 0.522111 3.308889 1.999991 - 6.100000 0.521154 3.320427 1.999991 + 6.000000 0.522112 3.308889 1.999991 + 6.100000 0.521154 3.320426 1.999991 6.200000 0.520436 3.331545 1.999991 - 6.300000 0.519932 3.342251 1.999991 + 6.300000 0.519932 3.342250 1.999991 6.400000 0.519621 3.352549 1.999991 - 6.500000 0.519484 3.362447 1.999991 - 6.600000 0.519503 3.371950 1.999991 - 6.700000 0.519664 3.381065 1.999991 + 6.500000 0.519484 3.362446 1.999991 + 6.600000 0.519503 3.371949 1.999991 + 6.700000 0.519664 3.381064 1.999991 6.800000 0.519953 3.389797 1.999991 6.900000 0.520358 3.398153 1.999991 7.000000 0.520869 3.406139 1.999991 @@ -87,37 +87,37 @@ 7.700000 0.526775 3.452091 1.999991 7.800000 0.527887 3.457288 1.999991 7.900000 0.529055 3.462154 1.999991 - 8.000000 0.530276 3.466693 1.999991 - 8.100000 0.531549 3.470907 1.999991 + 8.000000 0.530276 3.466692 1.999991 + 8.100000 0.531549 3.470906 1.999991 8.200000 0.532872 3.474798 1.999991 8.300000 0.534244 3.478370 1.999991 8.400000 0.535665 3.481625 1.999991 - 8.500000 0.537133 3.484563 1.999991 + 8.500000 0.537133 3.484564 1.999991 8.600000 0.538649 3.487188 1.999991 8.700000 0.540213 3.489499 1.999991 - 8.800000 0.541825 3.491497 1.999991 - 8.900000 0.543486 3.493184 1.999991 + 8.800000 0.541825 3.491498 1.999991 + 8.900000 0.543486 3.493185 1.999991 9.000000 0.545196 3.494560 1.999991 9.100000 0.546957 3.495624 1.999991 9.200000 0.548771 3.496375 1.999991 9.300000 0.550638 3.496814 1.999990 - 9.400000 0.552562 3.496938 1.999990 + 9.400000 0.552561 3.496938 1.999990 9.500000 0.554543 3.496746 1.999990 - 9.600000 0.556585 3.496235 1.999990 + 9.600000 0.556585 3.496236 1.999990 9.700000 0.558691 3.495404 1.999990 - 9.800000 0.560864 3.494247 1.999990 + 9.800000 0.560864 3.494248 1.999990 9.900000 0.563108 3.492763 1.999990 10.000000 0.565426 3.490945 1.999990 ---------------------------------------------- Final Solver Statistics: Internal solver steps = 95 (attempted = 95) - Total RHS evals: Fe = 0, Fi = 1605 + Total RHS evals: Fe = 0, Fi = 1596 Total mass matrix setups = 1 - Total mass matrix solves = 288 - Total mass times evals = 1697 + Total mass matrix solves = 193 + Total mass times evals = 1688 Total linear solver setups = 31 Total number of Jacobian evaluations = 11 - Total number of Newton iterations = 1127 + Total number of Newton iterations = 1118 Total number of nonlinear solver convergence failures = 10 Total number of error test failures = 0 diff --git a/examples/arkode/C_serial/ark_brusselator1D_imexmri_0_0.001.out b/examples/arkode/C_serial/ark_brusselator1D_imexmri_0_0.001.out index 6dd1721d1b..cadd7e5310 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_imexmri_0_0.001.out +++ b/examples/arkode/C_serial/ark_brusselator1D_imexmri_0_0.001.out @@ -30,7 +30,7 @@ Final Solver Statistics: Slow Steps: nsts = 10001 Fast Steps: nstf = 120012 - Total RHS evals: Fs = 30004, Ff = 994988 + Total RHS evals: Fs = 30004, Ff = 864983 Fast Newton iters = 504937 Fast Newton conv fails = 0 Fast Jacobian evals = 2308 diff --git a/examples/arkode/C_serial/ark_brusselator1D_imexmri_2_0.001.out b/examples/arkode/C_serial/ark_brusselator1D_imexmri_2_0.001.out index 1fa9294fa1..d8f1801e46 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_imexmri_2_0.001.out +++ b/examples/arkode/C_serial/ark_brusselator1D_imexmri_2_0.001.out @@ -30,7 +30,7 @@ Final Solver Statistics: Slow Steps: nsts = 10001 Fast Steps: nstf = 120012 - Total RHS evals: Fs = 68887, Ff = 400041 + Total RHS evals: Fs = 68887, Ff = 360046 Slow Newton iters = 38883 Slow Newton conv fails = 0 Slow Jacobian evals = 501 diff --git a/examples/arkode/C_serial/ark_brusselator1D_imexmri_3_0.001.out b/examples/arkode/C_serial/ark_brusselator1D_imexmri_3_0.001.out index 89fe3e2cc0..0e3c13961a 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_imexmri_3_0.001.out +++ b/examples/arkode/C_serial/ark_brusselator1D_imexmri_3_0.001.out @@ -30,7 +30,7 @@ Final Solver Statistics: Slow Steps: nsts = 10001 Fast Steps: nstf = 120012 - Total RHS evals: Fs = 68887, Ff = 1000128 + Total RHS evals: Fs = 68887, Ff = 840121 Slow Newton iters = 38883 Slow Newton conv fails = 0 Slow Jacobian evals = 501 diff --git a/examples/arkode/C_serial/ark_brusselator1D_imexmri_4_0.001.out b/examples/arkode/C_serial/ark_brusselator1D_imexmri_4_0.001.out index 65c7a6f99b..7059273d48 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_imexmri_4_0.001.out +++ b/examples/arkode/C_serial/ark_brusselator1D_imexmri_4_0.001.out @@ -30,7 +30,7 @@ Final Solver Statistics: Slow Steps: nsts = 10001 Fast Steps: nstf = 110011 - Total RHS evals: Fse = 40005, Fsi = 78888, Ff = 370038 + Total RHS evals: Fse = 40005, Fsi = 78888, Ff = 330043 Slow Newton iters = 38883 Slow Newton conv fails = 0 Slow Jacobian evals = 501 diff --git a/examples/arkode/C_serial/ark_brusselator1D_imexmri_5_0.001.out b/examples/arkode/C_serial/ark_brusselator1D_imexmri_5_0.001.out index cc8fb37508..827c560b02 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_imexmri_5_0.001.out +++ b/examples/arkode/C_serial/ark_brusselator1D_imexmri_5_0.001.out @@ -30,7 +30,7 @@ Final Solver Statistics: Slow Steps: nsts = 10001 Fast Steps: nstf = 110011 - Total RHS evals: Fse = 40005, Fsi = 78888, Ff = 1174341 + Total RHS evals: Fse = 40005, Fsi = 78888, Ff = 1024335 Slow Newton iters = 38883 Slow Newton conv fails = 0 Slow Jacobian evals = 501 diff --git a/examples/arkode/C_serial/ark_brusselator1D_imexmri_6_0.001.out b/examples/arkode/C_serial/ark_brusselator1D_imexmri_6_0.001.out index b567a7e624..79287bd749 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_imexmri_6_0.001.out +++ b/examples/arkode/C_serial/ark_brusselator1D_imexmri_6_0.001.out @@ -30,7 +30,7 @@ Final Solver Statistics: Slow Steps: nsts = 10001 Fast Steps: nstf = 130013 - Total RHS evals: Fse = 60007, Fsi = 118894, Ff = 580059 + Total RHS evals: Fse = 60007, Fsi = 118894, Ff = 520062 Slow Newton iters = 58887 Slow Newton conv fails = 0 Slow Jacobian evals = 501 diff --git a/examples/arkode/C_serial/ark_brusselator1D_imexmri_7_0.001.out b/examples/arkode/C_serial/ark_brusselator1D_imexmri_7_0.001.out index 0ebb4a0a14..c8dd757582 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_imexmri_7_0.001.out +++ b/examples/arkode/C_serial/ark_brusselator1D_imexmri_7_0.001.out @@ -30,7 +30,7 @@ Final Solver Statistics: Slow Steps: nsts = 10001 Fast Steps: nstf = 130013 - Total RHS evals: Fse = 60007, Fsi = 118894, Ff = 1946003 + Total RHS evals: Fse = 60007, Fsi = 118894, Ff = 1936011 Slow Newton iters = 58887 Slow Newton conv fails = 0 Slow Jacobian evals = 501 diff --git a/examples/arkode/C_serial/ark_brusselator1D_klu.out b/examples/arkode/C_serial/ark_brusselator1D_klu.out index 7e6bc33063..453cd212f8 100644 --- a/examples/arkode/C_serial/ark_brusselator1D_klu.out +++ b/examples/arkode/C_serial/ark_brusselator1D_klu.out @@ -8,14 +8,14 @@ t ||u||_rms ||v||_rms ||w||_rms ---------------------------------------------- 1.000000 0.791135 3.140510 1.999984 - 2.000000 0.960033 2.757430 1.999981 - 3.000000 0.930299 2.532868 1.999982 + 2.000000 0.960034 2.757430 1.999981 + 3.000000 0.930300 2.532867 1.999982 4.000000 0.681809 2.696300 1.999986 5.000000 0.506326 3.007843 1.999990 6.000000 0.449425 3.275283 1.999991 - 7.000000 0.446297 3.465934 1.999991 - 8.000000 0.463486 3.586728 1.999991 - 9.000000 0.491684 3.644311 1.999990 + 7.000000 0.446297 3.465935 1.999991 + 8.000000 0.463486 3.586729 1.999991 + 9.000000 0.491684 3.644312 1.999990 10.000000 0.530857 3.640396 1.999990 ---------------------------------------------- diff --git a/examples/arkode/C_serial/ark_brusselator_1D_mri.out b/examples/arkode/C_serial/ark_brusselator_1D_mri.out index 2c61e45ad1..b1968f6e9d 100644 --- a/examples/arkode/C_serial/ark_brusselator_1D_mri.out +++ b/examples/arkode/C_serial/ark_brusselator_1D_mri.out @@ -16,18 +16,18 @@ 0.700000 1.351462 3.164033 3.499995 0.800000 1.423123 3.067751 3.499995 0.900000 1.497639 2.964524 3.499995 - 1.000000 1.568626 2.859012 3.499995 + 1.000000 1.568626 2.859013 3.499995 1.100000 1.628547 2.756573 3.499994 1.200000 1.671110 2.661914 3.499994 - 1.300000 1.693135 2.578240 3.499994 + 1.300000 1.693135 2.578241 3.499994 1.400000 1.694728 2.507261 3.499994 - 1.500000 1.678186 2.449677 3.499994 + 1.500000 1.678185 2.449678 3.499994 1.600000 1.646706 2.405676 3.499994 1.700000 1.603527 2.375228 3.499994 1.800000 1.551521 2.358213 3.499995 1.900000 1.493097 2.354426 3.499995 2.000000 1.430225 2.363536 3.499995 - 2.100000 1.364513 2.385031 3.499995 + 2.100000 1.364513 2.385032 3.499995 2.200000 1.297276 2.418172 3.499995 2.300000 1.229586 2.461974 3.499996 2.400000 1.162306 2.515228 3.499996 @@ -37,14 +37,14 @@ 2.800000 0.908402 2.794764 3.499997 2.900000 0.850317 2.874565 3.499997 3.000000 0.794740 2.956151 3.499997 - 3.100000 0.741797 3.038762 3.499998 + 3.100000 0.741798 3.038762 3.499998 3.200000 0.691633 3.121815 3.499998 3.300000 0.644408 3.204867 3.499998 3.400000 0.600305 3.287588 3.499998 3.500000 0.559517 3.369729 3.499998 3.600000 0.522228 3.451100 3.499998 3.700000 0.488593 3.531554 3.499998 - 3.800000 0.458712 3.610979 3.499998 + 3.800000 0.458713 3.610979 3.499998 3.900000 0.432611 3.689292 3.499999 4.000000 0.410222 3.766440 3.499999 4.100000 0.391383 3.842396 3.499999 @@ -60,7 +60,7 @@ 5.100000 0.331684 4.544600 3.499999 5.200000 0.332605 4.610297 3.499999 5.300000 0.334109 4.675326 3.499999 - 5.400000 0.336121 4.739695 3.499999 + 5.400000 0.336121 4.739694 3.499999 5.500000 0.338588 4.803402 3.499999 5.600000 0.341472 4.866439 3.499999 5.700000 0.344747 4.928787 3.499999 @@ -86,33 +86,33 @@ 7.700000 0.571996 5.870367 3.499998 7.800000 0.615233 5.869891 3.499998 7.900000 0.674190 5.850430 3.499998 - 8.000000 0.760486 5.800612 3.499997 - 8.100000 0.900806 5.696886 3.499997 - 8.200000 1.168701 5.483555 3.499996 - 8.300000 1.788983 5.030862 3.499994 - 8.400000 2.907583 4.325491 3.499991 - 8.500000 3.613526 3.702356 3.499989 - 8.600000 3.894341 3.130135 3.499987 - 8.700000 4.022608 2.516756 3.499987 - 8.800000 4.111043 1.781192 3.499986 - 8.900000 4.178068 1.047217 3.499985 - 9.000000 3.999350 0.887627 3.499986 - 9.100000 3.670986 0.942791 3.499987 - 9.200000 3.345964 1.020200 3.499988 - 9.300000 3.043896 1.105109 3.499990 - 9.400000 2.764752 1.196143 3.499990 - 9.500000 2.506590 1.293161 3.499991 - 9.600000 2.267456 1.396103 3.499992 - 9.700000 2.045656 1.504786 3.499993 - 9.800000 1.839810 1.618829 3.499994 - 9.900000 1.648872 1.737602 3.499994 - 10.000000 1.472127 1.860205 3.499995 + 8.000000 0.760485 5.800612 3.499997 + 8.100000 0.900804 5.696888 3.499997 + 8.200000 1.168696 5.483559 3.499996 + 8.300000 1.788966 5.030873 3.499994 + 8.400000 2.907564 4.325501 3.499991 + 8.500000 3.613521 3.702362 3.499989 + 8.600000 3.894340 3.130139 3.499987 + 8.700000 4.022609 2.516760 3.499987 + 8.800000 4.111045 1.781195 3.499986 + 8.900000 4.178071 1.047218 3.499985 + 9.000000 3.999353 0.887627 3.499986 + 9.100000 3.670989 0.942790 3.499987 + 9.200000 3.345967 1.020198 3.499988 + 9.300000 3.043900 1.105107 3.499990 + 9.400000 2.764755 1.196140 3.499990 + 9.500000 2.506593 1.293158 3.499991 + 9.600000 2.267459 1.396100 3.499992 + 9.700000 2.045658 1.504783 3.499993 + 9.800000 1.839812 1.618826 3.499994 + 9.900000 1.648874 1.737600 3.499994 + 10.000000 1.472129 1.860203 3.499995 ---------------------------------------------- Final Solver Statistics: Slow Steps: nsts = 1001 Fast Steps: nstf = 3171 (attempted = 3171) - Total RHS evals: Fs = 3004, Ff = 34684 + Total RHS evals: Fs = 3004, Ff = 30611 Total number of fast error test failures = 0 Total linear solver setups = 3118 Total RHS evals for setting up the linear system = 0 diff --git a/examples/arkode/C_serial/ark_brusselator_fp.out b/examples/arkode/C_serial/ark_brusselator_fp.out index 041ebe3d2a..ed5ca0e6f3 100644 --- a/examples/arkode/C_serial/ark_brusselator_fp.out +++ b/examples/arkode/C_serial/ark_brusselator_fp.out @@ -9,8 +9,8 @@ Brusselator ODE test problem, fixed-point solver: 1.000000 1.897255 1.274939 2.997155 2.000000 0.346125 2.366448 2.999481 3.000000 0.147442 2.862061 2.999781 - 4.000000 0.140733 3.226731 2.999788 - 5.000000 0.142659 3.583206 2.999788 + 4.000000 0.140733 3.226731 2.999780 + 5.000000 0.142659 3.583206 2.999789 6.000000 0.145095 3.936910 2.999782 7.000000 0.147720 4.287893 2.999780 8.000000 0.150542 4.635957 2.999775 @@ -20,7 +20,7 @@ Brusselator ODE test problem, fixed-point solver: Final Solver Statistics: Internal solver steps = 729 (attempted = 730) - Total RHS evals: Fe = 4383, Fi = 18793 + Total RHS evals: Fe = 4382, Fi = 18792 Total number of fixed-point iterations = 14410 Total number of nonlinear solver convergence failures = 0 Total number of error test failures = 1 diff --git a/examples/arkode/C_serial/ark_brusselator_fp_1.out b/examples/arkode/C_serial/ark_brusselator_fp_1.out index 041ebe3d2a..ed5ca0e6f3 100644 --- a/examples/arkode/C_serial/ark_brusselator_fp_1.out +++ b/examples/arkode/C_serial/ark_brusselator_fp_1.out @@ -9,8 +9,8 @@ Brusselator ODE test problem, fixed-point solver: 1.000000 1.897255 1.274939 2.997155 2.000000 0.346125 2.366448 2.999481 3.000000 0.147442 2.862061 2.999781 - 4.000000 0.140733 3.226731 2.999788 - 5.000000 0.142659 3.583206 2.999788 + 4.000000 0.140733 3.226731 2.999780 + 5.000000 0.142659 3.583206 2.999789 6.000000 0.145095 3.936910 2.999782 7.000000 0.147720 4.287893 2.999780 8.000000 0.150542 4.635957 2.999775 @@ -20,7 +20,7 @@ Brusselator ODE test problem, fixed-point solver: Final Solver Statistics: Internal solver steps = 729 (attempted = 730) - Total RHS evals: Fe = 4383, Fi = 18793 + Total RHS evals: Fe = 4382, Fi = 18792 Total number of fixed-point iterations = 14410 Total number of nonlinear solver convergence failures = 0 Total number of error test failures = 1 diff --git a/examples/arkode/C_serial/ark_brusselator_mri.out b/examples/arkode/C_serial/ark_brusselator_mri.out index 7cfb07b9cf..602c2e4177 100644 --- a/examples/arkode/C_serial/ark_brusselator_mri.out +++ b/examples/arkode/C_serial/ark_brusselator_mri.out @@ -31,4 +31,4 @@ Brusselator ODE test problem: Final Solver Statistics: Steps: nsts = 81, nstf = 2187 - Total RHS evals: Fs = 244, Ff = 8831 + Total RHS evals: Fs = 244, Ff = 6581 diff --git a/examples/arkode/C_serial/ark_conserved_exp_entropy_ark.c b/examples/arkode/C_serial/ark_conserved_exp_entropy_ark.c index 9064c56987..359f458f17 100644 --- a/examples/arkode/C_serial/ark_conserved_exp_entropy_ark.c +++ b/examples/arkode/C_serial/ark_conserved_exp_entropy_ark.c @@ -264,6 +264,10 @@ int main(int argc, char* argv[]) flag = ARKStepSetTableName(arkode_mem, "ARKODE_ARK2_DIRK_3_1_2", "ARKODE_ERK_NONE"); if (check_flag(flag, "ARKStepSetTableName")) return 1; + + /* Tighten nonlinear solver tolerance */ + flag = ARKStepSetNonlinConvCoef(arkode_mem, SUN_RCONST(0.01)); + if (check_flag(flag, "ARKStepSetNonlinConvCoef")) return 1; } if (fixed_h > SUN_RCONST(0.0)) diff --git a/examples/arkode/C_serial/ark_conserved_exp_entropy_ark_1_0.out b/examples/arkode/C_serial/ark_conserved_exp_entropy_ark_1_0.out index 05f6b3f4ce..76cfdd2a7e 100644 --- a/examples/arkode/C_serial/ark_conserved_exp_entropy_ark_1_0.out +++ b/examples/arkode/C_serial/ark_conserved_exp_entropy_ark_1_0.out @@ -8,18 +8,18 @@ Conserved Exponential Entropy problem: step t u v e delta e ------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e+00 5.000000e-01 4.367003e+00 0.000000e+00 - 40 6.911091e-01 -1.121528e+00 1.396547e+00 4.367003e+00 -1.776357e-15 - 80 1.946408e+00 -6.526227e+00 1.473742e+00 4.367003e+00 4.440892e-15 + 40 7.671134e-01 -1.432143e+00 1.417843e+00 4.367003e+00 5.329071e-15 + 80 2.733674e+00 -9.963899e+00 1.474066e+00 4.367003e+00 8.881784e-15 ------------------------------------------------------------------------------- Final Solver Statistics: - Internal solver steps = 99 (attempted = 124) + Internal solver steps = 86 (attempted = 86) Total number of error test failures = 0 - Total RHS evals: Fe = 722, Fi = 0 - Total Relaxation Fn evals = 622 - Total Relaxation Jac evals = 1019 - Total Relaxation fails = 25 + Total RHS evals: Fe = 432, Fi = 0 + Total Relaxation Fn evals = 266 + Total Relaxation Jac evals = 524 + Total Relaxation fails = 0 Total Relaxation bound fails = 0 - Total Relaxation NLS fails = 25 - Total Relaxation NLS iters = 399 + Total Relaxation NLS fails = 0 + Total Relaxation NLS iters = 94 diff --git a/examples/arkode/C_serial/ark_conserved_exp_entropy_ark_1_1.out b/examples/arkode/C_serial/ark_conserved_exp_entropy_ark_1_1.out index 77742dc2bd..8ab099ceb4 100644 --- a/examples/arkode/C_serial/ark_conserved_exp_entropy_ark_1_1.out +++ b/examples/arkode/C_serial/ark_conserved_exp_entropy_ark_1_1.out @@ -8,46 +8,40 @@ Conserved Exponential Entropy problem: step t u v e delta e ------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e+00 5.000000e-01 4.367003e+00 0.000000e+00 - 40 4.754706e-02 9.164641e-01 6.241023e-01 4.367003e+00 8.881784e-16 - 80 8.098591e-02 8.514226e-01 7.050883e-01 4.367003e+00 0.000000e+00 - 120 1.285350e-01 7.498036e-01 8.111164e-01 4.367003e+00 1.776357e-15 - 160 1.711613e-01 6.495637e-01 8.970255e-01 4.367003e+00 8.881784e-16 - 200 2.117650e-01 5.461535e-01 9.709320e-01 4.367003e+00 5.329071e-15 - 240 2.453290e-01 4.549914e-01 1.026344e+00 4.367003e+00 0.000000e+00 - 280 2.845614e-01 3.421715e-01 1.084852e+00 4.367003e+00 1.776357e-15 - 320 3.187813e-01 2.385199e-01 1.130639e+00 4.367003e+00 1.776357e-15 - 360 3.470183e-01 1.495118e-01 1.164942e+00 4.367003e+00 4.440892e-15 - 400 3.679487e-01 8.161060e-02 1.188444e+00 4.367003e+00 1.776357e-15 - 440 3.849834e-01 2.519301e-02 1.206417e+00 4.367003e+00 7.105427e-15 - 480 3.919101e-01 1.965927e-03 1.213438e+00 4.367003e+00 3.552714e-15 - 520 3.949458e-01 -8.265002e-03 1.216465e+00 4.367003e+00 2.664535e-15 - 560 4.054406e-01 -4.387006e-02 1.226690e+00 4.367003e+00 -1.776357e-15 - 600 4.224627e-01 -1.023806e-01 1.242516e+00 4.367003e+00 0.000000e+00 - 640 4.483804e-01 -1.931947e-01 1.264884e+00 4.367003e+00 -1.776357e-15 - 680 4.858087e-01 -3.277677e-01 1.293760e+00 4.367003e+00 1.776357e-15 - 720 5.292378e-01 -4.885049e-01 1.322678e+00 4.367003e+00 -4.440892e-15 - 760 5.861685e-01 -7.057075e-01 1.354092e+00 4.367003e+00 -6.217249e-15 - 800 6.559300e-01 -9.802131e-01 1.384235e+00 4.367003e+00 -2.664535e-15 - 840 7.351394e-01 -1.300674e+00 1.409682e+00 4.367003e+00 8.881784e-16 - 880 8.653344e-01 -1.841818e+00 1.437100e+00 4.367003e+00 -8.881784e-16 - 920 1.014019e+00 -2.473635e+00 1.454590e+00 4.367003e+00 8.881784e-16 - 960 1.342023e+00 -3.891227e+00 1.469390e+00 4.367003e+00 3.552714e-15 - 1000 2.028294e+00 -6.883726e+00 1.473842e+00 4.367003e+00 5.329071e-15 + 40 4.817852e-02 9.152845e-01 6.256803e-01 4.367003e+00 3.552714e-15 + 80 9.764003e-02 8.170556e-01 7.434499e-01 4.367003e+00 7.105427e-15 + 120 1.471282e-01 7.071386e-01 8.496481e-01 4.367003e+00 8.881784e-15 + 160 1.965497e-01 5.857982e-01 9.441311e-01 4.367003e+00 8.881784e-15 + 200 2.457811e-01 4.537292e-01 1.027056e+00 4.367003e+00 2.753353e-14 + 240 2.947183e-01 3.119036e-01 1.098939e+00 4.367003e+00 4.440892e-14 + 280 3.389142e-01 1.753685e-01 1.155408e+00 4.367003e+00 4.973799e-14 + 320 3.715233e-01 6.985629e-02 1.192300e+00 4.367003e+00 4.618528e-14 + 360 3.897050e-01 9.378019e-03 1.211221e+00 4.367003e+00 4.973799e-14 + 400 3.941218e-01 -5.484616e-03 1.215646e+00 4.367003e+00 6.306067e-14 + 440 4.041300e-01 -3.940365e-02 1.225433e+00 4.367003e+00 5.861978e-14 + 480 4.249355e-01 -1.109566e-01 1.244738e+00 4.367003e+00 6.394885e-14 + 520 4.567105e-01 -2.228060e-01 1.271650e+00 4.367003e+00 7.283063e-14 + 560 5.018939e-01 -3.867565e-01 1.305016e+00 4.367003e+00 8.082424e-14 + 600 5.637002e-01 -6.191770e-01 1.342503e+00 4.367003e+00 8.526513e-14 + 640 6.475411e-01 -9.467796e-01 1.381034e+00 4.367003e+00 9.148238e-14 + 680 7.633005e-01 -1.416410e+00 1.416925e+00 4.367003e+00 9.769963e-14 + 720 9.297484e-01 -2.114173e+00 1.446041e+00 4.367003e+00 1.039169e-13 + 760 1.217690e+00 -3.351631e+00 1.466024e+00 4.367003e+00 1.145750e-13 + 800 2.256864e+00 -7.881740e+00 1.473991e+00 4.367003e+00 1.207923e-13 ------------------------------------------------------------------------------- Final Solver Statistics: - Internal solver steps = 1024 (attempted = 1376) - Total number of error test failures = 86 - Total RHS evals: Fe = 0, Fi = 9934 - Total number of Newton iterations = 5803 - Total number of linear solver convergence failures = 37 - Total linear solver setups = 844 - Total number of Jacobian evaluations = 304 + Internal solver steps = 814 (attempted = 832) + Total number of error test failures = 3 + Total RHS evals: Fe = 0, Fi = 6827 + Total number of Newton iterations = 4347 + Total number of linear solver convergence failures = 117 + Total linear solver setups = 195 + Total number of Jacobian evaluations = 136 Total RHS evals for setting up the linear system = 0 - Total Relaxation Fn evals = 7023 - Total Relaxation Jac evals = 8651 - Total Relaxation fails = 266 - Total Relaxation bound fails = 14 - Total Relaxation NLS fails = 252 - Total Relaxation NLS iters = 4523 - + Total Relaxation Fn evals = 2689 + Total Relaxation Jac evals = 3521 + Total Relaxation fails = 15 + Total Relaxation bound fails = 15 + Total Relaxation NLS fails = 0 + Total Relaxation NLS iters = 1025 diff --git a/examples/arkode/C_serial/ark_conserved_exp_entropy_erk_1.out b/examples/arkode/C_serial/ark_conserved_exp_entropy_erk_1.out index 9e1649f48e..e39d0b1160 100644 --- a/examples/arkode/C_serial/ark_conserved_exp_entropy_erk_1.out +++ b/examples/arkode/C_serial/ark_conserved_exp_entropy_erk_1.out @@ -8,18 +8,18 @@ Conserved Exponential Entropy problem: step t u v e delta e ------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e+00 5.000000e-01 4.367003e+00 0.000000e+00 - 40 6.759227e-01 -1.060311e+00 1.391445e+00 4.367003e+00 -1.776357e-15 - 80 1.694830e+00 -5.428257e+00 1.473071e+00 4.367003e+00 -8.881784e-16 + 40 6.829631e-01 -1.088653e+00 1.393849e+00 4.367003e+00 7.993606e-15 + 80 3.316326e+00 -1.250833e+01 1.474076e+00 4.367003e+00 1.332268e-14 ------------------------------------------------------------------------------- Final Solver Statistics: - Internal solver steps = 95 (attempted = 121) + Internal solver steps = 83 (attempted = 85) Total number of error test failures = 2 - Total RHS evals = 582 - Total Relaxation Fn evals = 608 - Total Relaxation Jac evals = 995 - Total Relaxation fails = 24 + Total RHS evals = 425 + Total Relaxation Fn evals = 267 + Total Relaxation Jac evals = 522 + Total Relaxation fails = 0 Total Relaxation bound fails = 0 - Total Relaxation NLS fails = 24 - Total Relaxation NLS iters = 390 + Total Relaxation NLS fails = 0 + Total Relaxation NLS iters = 97 diff --git a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out index 943d2875e7..f7c3c21208 100644 --- a/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out +++ b/examples/arkode/C_serial/ark_damped_harmonic_symplectic.out @@ -22,5 +22,5 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 0.0009908169824406335 Current step size = 0.001 -f1 RHS fn evals = 125665 -f2 RHS fn evals = 125665 +f1 RHS fn evals = 125664 +f2 RHS fn evals = 125664 diff --git a/examples/arkode/C_serial/ark_dissipated_exp_entropy.c b/examples/arkode/C_serial/ark_dissipated_exp_entropy.c index 76da27a0c1..dbb62ec83e 100644 --- a/examples/arkode/C_serial/ark_dissipated_exp_entropy.c +++ b/examples/arkode/C_serial/ark_dissipated_exp_entropy.c @@ -244,6 +244,10 @@ int main(int argc, char* argv[]) flag = ARKStepSetTableName(arkode_mem, "ARKODE_ARK2_DIRK_3_1_2", "ARKODE_ERK_NONE"); if (check_flag(flag, "ARKStepSetTableName")) return 1; + + /* Tighten nonlinear solver tolerance */ + flag = ARKStepSetNonlinConvCoef(arkode_mem, SUN_RCONST(0.01)); + if (check_flag(flag, "ARKStepSetNonlinConvCoef")) return 1; } if (fixed_h > SUN_RCONST(0.0)) diff --git a/examples/arkode/C_serial/ark_dissipated_exp_entropy_1_0.out b/examples/arkode/C_serial/ark_dissipated_exp_entropy_1_0.out index 90df8380be..35872dff8b 100644 --- a/examples/arkode/C_serial/ark_dissipated_exp_entropy_1_0.out +++ b/examples/arkode/C_serial/ark_dissipated_exp_entropy_1_0.out @@ -16,11 +16,11 @@ Dissipated Exponential Entropy problem: Final Solver Statistics: Internal solver steps = 130 (attempted = 130) Total number of error test failures = 0 - Total RHS evals: Fe = 783, Fi = 0 - Total Relaxation Fn evals = 392 - Total Relaxation Jac evals = 782 + Total RHS evals: Fe = 652, Fi = 0 + Total Relaxation Fn evals = 391 + Total Relaxation Jac evals = 781 Total Relaxation fails = 0 Total Relaxation bound fails = 0 Total Relaxation NLS fails = 0 - Total Relaxation NLS iters = 132 + Total Relaxation NLS iters = 131 diff --git a/examples/arkode/C_serial/ark_dissipated_exp_entropy_1_1.out b/examples/arkode/C_serial/ark_dissipated_exp_entropy_1_1.out index 49be4a5967..176dffd2b8 100644 --- a/examples/arkode/C_serial/ark_dissipated_exp_entropy_1_1.out +++ b/examples/arkode/C_serial/ark_dissipated_exp_entropy_1_1.out @@ -8,52 +8,51 @@ Dissipated Exponential Entropy problem: step t u e u_err delta e ------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e+00 2.718282e+00 0.000000e+00 0.000000e+00 - 40 5.532834e-02 8.598921e-01 2.362906e+00 1.272595e+00 -3.553760e-01 - 80 1.097061e-01 7.390122e-01 2.093866e+00 1.072757e+00 -6.244157e-01 - 120 1.621192e-01 6.348810e-01 1.886798e+00 8.980007e-01 -8.314842e-01 - 160 2.128767e-01 5.434247e-01 1.721894e+00 7.425986e-01 -9.963881e-01 - 200 2.816359e-01 4.315291e-01 1.539610e+00 5.501251e-01 -1.178672e+00 - 240 3.484648e-01 3.335947e-01 1.395977e+00 3.796434e-01 -1.322305e+00 - 280 4.133160e-01 2.469303e-01 1.280090e+00 2.272780e-01 -1.438192e+00 - 320 4.764552e-01 1.692067e-01 1.184365e+00 8.948479e-02 -1.533917e+00 - 360 5.342836e-01 1.029604e-01 1.108447e+00 -2.878187e-02 -1.609834e+00 - 400 5.805889e-01 5.290718e-02 1.054332e+00 -1.186227e-01 -1.663950e+00 - 440 6.131438e-01 1.915938e-02 1.019344e+00 -1.794246e-01 -1.698938e+00 - 480 6.301872e-01 1.935497e-03 1.001937e+00 -2.105255e-01 -1.716344e+00 - 520 6.350100e-01 -2.884950e-03 9.971192e-01 -2.192380e-01 -1.721163e+00 - 560 6.468882e-01 -1.465940e-02 9.854475e-01 -2.405343e-01 -1.732834e+00 - 600 6.693569e-01 -3.655950e-02 9.641007e-01 -2.802015e-01 -1.754181e+00 - 640 7.021244e-01 -6.766195e-02 9.345763e-01 -3.366619e-01 -1.783705e+00 - 680 7.450858e-01 -1.070275e-01 8.985009e-01 -4.083288e-01 -1.819781e+00 - 720 8.015384e-01 -1.565058e-01 8.551265e-01 -4.987252e-01 -1.863155e+00 - 760 8.754911e-01 -2.178256e-01 8.042657e-01 -6.112329e-01 -1.914016e+00 - 800 9.627556e-01 -2.856560e-01 7.515211e-01 -7.362769e-01 -1.966761e+00 - 840 1.068726e+00 -3.622828e-01 6.960855e-01 -8.782493e-01 -2.022196e+00 - 880 1.205356e+00 -4.531342e-01 6.356328e-01 -1.047503e+00 -2.082649e+00 - 920 1.360691e+00 -5.472947e-01 5.785127e-01 -1.223917e+00 -2.139769e+00 - 960 1.555080e+00 -6.538651e-01 5.200319e-01 -1.424719e+00 -2.198250e+00 - 1000 1.799105e+00 -7.733362e-01 4.614709e-01 -1.651150e+00 -2.256811e+00 - 1040 2.083363e+00 -8.965948e-01 4.079565e-01 -1.886097e+00 -2.310325e+00 - 1080 2.428941e+00 -1.028483e+00 3.575490e-01 -2.138850e+00 -2.360733e+00 - 1120 2.880022e+00 -1.178008e+00 3.078913e-01 -2.426922e+00 -2.410391e+00 - 1160 3.423853e+00 -1.332822e+00 2.637319e-01 -2.726684e+00 -2.454550e+00 - 1200 4.082008e+00 -1.492878e+00 2.247249e-01 -3.037999e+00 -2.493557e+00 - 1240 4.890808e+00 -1.659881e+00 1.901617e-01 -3.364145e+00 -2.528120e+00 + 40 5.537896e-02 8.597725e-01 2.362623e+00 1.272399e+00 -3.556587e-01 + 80 1.099922e-01 7.384132e-01 2.092612e+00 1.071758e+00 -6.256694e-01 + 120 1.627168e-01 6.337541e-01 1.884673e+00 8.960967e-01 -8.336092e-01 + 160 2.138163e-01 5.418080e-01 1.719112e+00 7.398360e-01 -9.991696e-01 + 200 2.785993e-01 4.362152e-01 1.546842e+00 5.582361e-01 -1.171440e+00 + 240 3.461651e-01 3.368102e-01 1.400473e+00 3.852698e-01 -1.317809e+00 + 280 4.117847e-01 2.488924e-01 1.282604e+00 2.307427e-01 -1.435678e+00 + 320 4.756921e-01 1.701108e-01 1.185436e+00 9.109375e-02 -1.532846e+00 + 360 5.336712e-01 1.036393e-01 1.109200e+00 -2.756595e-02 -1.609081e+00 + 400 5.801378e-01 5.338279e-02 1.054833e+00 -1.177670e-01 -1.663448e+00 + 440 6.128657e-01 1.944281e-02 1.019633e+00 -1.789132e-01 -1.698649e+00 + 480 6.300899e-01 2.032891e-03 1.002035e+00 -2.103494e-01 -1.716247e+00 + 520 6.349961e-01 -2.871232e-03 9.971329e-01 -2.192131e-01 -1.721149e+00 + 560 6.468398e-01 -1.461180e-02 9.854944e-01 -2.404481e-01 -1.732787e+00 + 600 6.694857e-01 -3.668376e-02 9.639809e-01 -2.804267e-01 -1.754301e+00 + 640 7.021782e-01 -6.771235e-02 9.345293e-01 -3.367534e-01 -1.783753e+00 + 680 7.458296e-01 -1.076957e-01 8.979008e-01 -4.095471e-01 -1.820381e+00 + 720 8.007409e-01 -1.558236e-01 8.557101e-01 -4.974764e-01 -1.862572e+00 + 760 8.752295e-01 -2.176153e-01 8.044349e-01 -6.108460e-01 -1.913847e+00 + 800 9.636774e-01 -2.863486e-01 7.510007e-01 -7.375568e-01 -1.967281e+00 + 840 1.066491e+00 -3.607260e-01 6.971700e-01 -8.753575e-01 -2.021112e+00 + 880 1.204472e+00 -4.525718e-01 6.359904e-01 -1.046452e+00 -2.082291e+00 + 920 1.362583e+00 -5.483883e-01 5.778804e-01 -1.225972e+00 -2.140401e+00 + 960 1.551610e+00 -6.520589e-01 5.209720e-01 -1.421306e+00 -2.197310e+00 + 1000 1.797284e+00 -7.724956e-01 4.618590e-01 -1.649553e+00 -2.256423e+00 + 1040 2.083087e+00 -8.964821e-01 4.080024e-01 -1.885881e+00 -2.310279e+00 + 1080 2.422755e+00 -1.026269e+00 3.583415e-01 -2.134596e+00 -2.359940e+00 + 1120 2.874633e+00 -1.176348e+00 3.084029e-01 -2.423715e+00 -2.409879e+00 + 1160 3.418118e+00 -1.331309e+00 2.641313e-01 -2.723747e+00 -2.454151e+00 + 1200 4.078701e+00 -1.492135e+00 2.248921e-01 -3.036550e+00 -2.493390e+00 + 1240 4.884676e+00 -1.658714e+00 1.903836e-01 -3.361862e+00 -2.527898e+00 ------------------------------------------------------------------------------- Final Solver Statistics: - Internal solver steps = 1244 (attempted = 1246) - Total number of error test failures = 2 - Total RHS evals: Fe = 0, Fi = 9633 - Total number of Newton iterations = 5892 - Total number of linear solver convergence failures = 81 - Total linear solver setups = 149 - Total number of Jacobian evaluations = 93 + Internal solver steps = 1245 (attempted = 1246) + Total number of error test failures = 1 + Total RHS evals: Fe = 0, Fi = 10907 + Total number of Newton iterations = 7168 + Total number of linear solver convergence failures = 111 + Total linear solver setups = 179 + Total number of Jacobian evaluations = 125 Total RHS evals for setting up the linear system = 0 - Total Relaxation Fn evals = 3773 - Total Relaxation Jac evals = 5019 + Total Relaxation Fn evals = 4403 + Total Relaxation Jac evals = 5649 Total Relaxation fails = 0 Total Relaxation bound fails = 0 Total Relaxation NLS fails = 0 - Total Relaxation NLS iters = 1281 - + Total Relaxation NLS iters = 1911 diff --git a/examples/arkode/C_serial/ark_harmonic_symplectic.out b/examples/arkode/C_serial/ark_harmonic_symplectic.out index 60e081223b..6033ea1668 100644 --- a/examples/arkode/C_serial/ark_harmonic_symplectic.out +++ b/examples/arkode/C_serial/ark_harmonic_symplectic.out @@ -22,5 +22,5 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 0.0003981633971861239 Current step size = 0.001 -f1 RHS fn evals = 25153 -f2 RHS fn evals = 25153 +f1 RHS fn evals = 25152 +f2 RHS fn evals = 25152 diff --git a/examples/arkode/C_serial/ark_heat1D.out b/examples/arkode/C_serial/ark_heat1D.out index 2f33b506c3..4b1068888c 100644 --- a/examples/arkode/C_serial/ark_heat1D.out +++ b/examples/arkode/C_serial/ark_heat1D.out @@ -18,12 +18,12 @@ ------------------------- Final Solver Statistics: - Internal solver steps = 191 (attempted = 191) - Total RHS evals: Fe = 0, Fi = 1913 + Internal solver steps = 190 (attempted = 190) + Total RHS evals: Fe = 0, Fi = 1903 Total linear solver setups = 0 - Total linear iterations = 18265 - Total number of Jacobian-vector products = 18265 + Total linear iterations = 17826 + Total number of Jacobian-vector products = 17826 Total number of linear solver convergence failures = 0 - Total number of Newton iterations = 955 + Total number of Newton iterations = 950 Total number of nonlinear solver convergence failures = 0 Total number of error test failures = 0 diff --git a/examples/arkode/C_serial/ark_heat1D_adapt.out b/examples/arkode/C_serial/ark_heat1D_adapt.out index 4eb02c8a18..8135e3df32 100644 --- a/examples/arkode/C_serial/ark_heat1D_adapt.out +++ b/examples/arkode/C_serial/ark_heat1D_adapt.out @@ -6,154 +6,135 @@ ---------------------------------------------------------------------------------------- 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 21 0 0 1 3.629021901461023e-12 7.505751048377368e-09 2.979166031180459e-12 21 5 5 - 2 7.505751048377368e-09 1.501150209675474e-07 6.164657920191316e-09 21 5 5 - 3 1.501150209675474e-07 3.002300419350948e-06 1.293969127944767e-07 21 5 10 - 4 3.002300419350948e-06 6.004600838701896e-05 2.593514282990854e-06 21 5 10 - 5 6.004600838701896e-05 2.853823712852094e-04 5.166758334560010e-05 21 5 20 - 6 2.853823712852094e-04 2.575255578901065e-04 2.798555766932917e-04 21 5 25 - 7 2.575255578901065e-04 4.094541218029253e-04 4.794249606742115e-04 21 5 25 - 8 4.094541218029253e-04 4.094541218029253e-04 7.863858593533243e-04 21 5 29 - 9 4.094541218029253e-04 6.522910582302937e-04 1.082809153607867e-03 21 5 29 - 10 6.522910582302937e-04 5.699097250687579e-04 1.606859000290955e-03 23 5 40 - 11 5.699097250687579e-04 1.007836408495680e-03 2.005669608336064e-03 23 5 35 - 12 1.007836408495680e-03 1.007836408495680e-03 2.683041089905320e-03 23 5 40 - 13 1.007836408495680e-03 8.453991987969423e-04 3.678394954727681e-03 25 5 40 - 14 8.453991987969423e-04 1.990429430223850e-03 4.265068071685453e-03 25 5 34 - 15 1.990429430223850e-03 1.990429430223850e-03 5.574933877447707e-03 25 5 41 - 16 1.990429430223850e-03 3.606540539819520e-03 6.798364735960519e-03 25 5 35 - 17 4.980839747684550e-04 4.980839747684550e-04 6.927003506629248e-03 27 15 180 - 18 4.980839747684550e-04 4.980839747684550e-04 7.441563625964739e-03 29 5 30 - 19 4.980839747684550e-04 1.668131272315291e-03 7.722574952892512e-03 29 5 29 - 20 1.668131272315291e-03 3.659992327983156e-03 8.637136102347247e-03 29 5 44 - 21 3.659992327983156e-03 7.226886812998415e-03 1.050785838365518e-02 29 5 65 - 22 2.276503454413033e-04 2.223970105833804e-04 1.033577924663066e-02 32 20 250 - 23 2.223970105833804e-04 4.397896042992326e-04 1.092271235598801e-02 34 5 24 - 24 4.397896042992326e-04 1.023105619938674e-03 1.113382898409555e-02 34 5 33 - 25 1.023105619938674e-03 1.023105619938674e-03 1.161589583401345e-02 34 5 36 - 26 1.023105619938674e-03 3.930141141574615e-03 1.208588377404162e-02 34 5 38 - 27 3.930141141574615e-03 3.871064201787735e-03 1.378515153788083e-02 34 5 84 - 28 3.871064201787735e-03 1.255329001281564e-02 1.530995222029954e-02 34 5 59 - 29 1.601537140384145e-03 1.457835824294224e-03 1.581392684966786e-02 36 15 234 - 30 1.457835824294224e-03 3.743501735515000e-03 1.633976217518591e-02 36 5 29 - 31 2.870420514795557e-03 2.465672685089582e-03 1.732506340515539e-02 38 10 143 - 32 5.515562262925350e-04 5.470070369949626e-04 1.714361637592621e-02 40 15 253 - 33 5.470070369949626e-04 9.932912795468831e-04 1.731823052548390e-02 40 5 43 - 34 9.932912795468831e-04 2.851877222558192e-03 1.763020341932926e-02 40 5 47 - 35 2.851877222558192e-03 8.592060762682407e-03 1.849017614042958e-02 40 5 96 - 36 1.753358828184278e-03 1.753358828184278e-03 1.899364054123662e-02 40 15 259 - 37 1.753358828184278e-03 8.066441335477586e-03 1.947884133485359e-02 40 5 60 - 38 6.367831766622205e-04 6.367831766622205e-04 1.897985914604649e-02 44 15 269 - 39 6.367831766622205e-04 1.262468320666752e-03 1.914535124132059e-02 44 5 47 - 40 1.262468320666752e-03 3.587735441717919e-03 1.946692075971101e-02 44 5 62 - 41 2.843421467160759e-03 2.408215671837289e-03 1.976846530535780e-02 46 10 199 - 42 2.408215671837289e-03 4.077980222533944e-03 2.031687522001488e-02 46 5 72 - 43 4.077980222533944e-03 1.071890797618786e-02 2.118660808690947e-02 46 5 88 - 44 1.071890797618786e-02 1.071890797618786e-02 2.316134512731487e-02 46 5 105 - 45 2.694639841378283e-03 2.650454280532623e-03 2.346008222533597e-02 48 10 208 - 46 5.834157269803085e-04 5.834157269803085e-04 2.328708620673918e-02 50 15 268 - 47 5.834157269803085e-04 1.193846932419712e-03 2.337621483760628e-02 50 5 55 - 48 1.193846932419712e-03 3.258366515093616e-03 2.355525946951272e-02 50 5 66 - 49 3.258366515093616e-03 6.418173913904015e-03 2.402308335632452e-02 50 5 104 - 50 3.844477373368192e-03 3.844477373368192e-03 2.453874392666302e-02 50 10 210 - 51 3.844477373368192e-03 1.778266602162782e-02 2.501810350379247e-02 50 5 91 - 52 4.165560835571891e-03 4.165560835571891e-03 2.549975323954108e-02 50 10 209 - 53 4.165560835571891e-03 4.165560835571891e-03 2.594523957554863e-02 50 5 105 - 54 4.165560835571891e-03 1.187099370779400e-02 2.635751897001287e-02 50 5 103 - 55 7.990286205672150e-03 7.990286205672150e-03 2.706496621836213e-02 50 10 210 - 56 7.990286205672150e-03 7.366258582155646e-03 2.767656709536814e-02 50 5 105 - 57 3.192957423660317e-03 2.690992361017143e-03 2.898705700684332e-02 54 10 210 - 58 2.690992361017143e-03 4.595411828908103e-03 2.916901398660043e-02 54 5 103 - 59 4.595411828908103e-03 1.148959244582437e-02 2.946060998170889e-02 54 5 105 - 60 3.392951963605576e-03 3.392951963605576e-03 2.934282134054850e-02 56 10 210 - 61 3.392951963605576e-03 1.266181052388950e-02 2.953044118771774e-02 56 5 75 - 62 1.266181052388950e-02 2.070977380726893e-02 3.014157400043279e-02 56 5 105 - 63 4.582873894130091e-03 4.582873894130091e-03 2.988631128376999e-02 58 10 210 - 64 4.582873894130091e-03 9.607054797980071e-03 2.957561272951538e-02 60 5 105 - 65 9.607054797980071e-03 1.949020745582244e-02 2.989673188100094e-02 60 5 105 - 66 1.054807485438376e-02 1.054807485438376e-02 3.019699587646915e-02 60 10 210 - 67 2.168783293816825e-03 2.168783293816825e-03 3.025284168346583e-02 60 10 210 - 68 2.168783293816825e-03 2.168783293816825e-03 3.030686555035694e-02 60 5 104 - 69 2.168783293816825e-03 9.519769922039302e-03 3.035913346641964e-02 60 5 79 - 70 9.519769922039302e-03 3.689745921797256e-02 3.056948236696047e-02 60 5 105 - 71 5.027376845883330e-03 5.027376845883330e-03 3.066924792565106e-02 60 10 210 - 72 5.027376845883330e-03 1.680323823916145e-02 3.076207689001887e-02 60 5 84 - 73 1.190695511366464e-02 1.190695511366464e-02 3.095765596831891e-02 60 10 210 - 74 8.824020991017463e-03 8.824020991017463e-03 3.108370439289872e-02 60 10 210 - 75 8.824020991017463e-03 7.492138529693538e-03 3.119630288799381e-02 60 5 105 - 76 7.492138529693538e-03 1.126027020832041e-02 3.128267383642943e-02 60 5 105 - 77 7.641572371714925e-03 7.641572371714925e-03 3.136324481005783e-02 60 10 210 - 78 7.641572371714925e-03 1.384651466179487e-02 3.143706333937704e-02 60 5 105 - 79 1.384651466179487e-02 1.168352852310369e-02 3.155622058156962e-02 60 5 105 - 80 7.186697995423493e-03 6.679717823882544e-03 3.161160219834706e-02 60 10 210 - 81 6.679717823882544e-03 6.679717823882544e-03 3.165979180134944e-02 60 5 105 - 82 6.679717823882544e-03 1.036597822978498e-02 3.170495968309999e-02 60 5 105 - 83 1.036597822978498e-02 2.078683878676566e-02 3.176988825989206e-02 60 5 105 - 84 9.416934538800317e-03 9.416934538800317e-03 3.182402943647551e-02 60 10 210 - 85 9.416934538800317e-03 2.931003455946657e-02 3.187416014076831e-02 60 5 105 - 86 2.931003455946657e-02 2.522099385522949e-02 3.200899311332644e-02 60 5 105 - 87 9.855600599572635e-04 8.688271778628972e-04 3.201326296052575e-02 60 20 384 - 88 8.688271778628972e-04 1.468146563475753e-03 3.201682378904077e-02 60 5 52 - 89 1.468146563475753e-03 4.343969048002700e-03 3.202279095225564e-02 60 5 74 - 90 4.343969048002700e-03 1.055819789459882e-02 3.204011973102326e-02 60 5 105 - 91 1.055819789459882e-02 2.209065533222391e-02 3.208023614326307e-02 60 5 105 - 92 2.386319631553004e-03 2.386319631553004e-03 3.208893412153121e-02 60 10 201 - 93 2.386319631553004e-03 1.364130552312118e-02 3.209750202157599e-02 60 5 55 - 94 1.364130552312118e-02 3.804643259996037e-02 3.214413129385055e-02 60 5 105 - 95 1.350012470133744e-02 1.350012470133744e-02 3.218665147855618e-02 60 10 210 - 96 9.639737373424729e-03 9.639737373424729e-03 3.221511600193919e-02 60 10 210 - 97 9.639737373424729e-03 1.590630674910340e-02 3.224203283811158e-02 60 5 105 - 98 9.367414453891131e-03 9.367414453891131e-03 3.226685525508665e-02 60 10 210 - 99 9.367414453891131e-03 9.367414453891131e-03 3.229047473304966e-02 60 5 105 - 100 9.367414453891131e-03 9.367414453891131e-03 3.231292205847536e-02 60 5 105 - 101 9.367414453891131e-03 9.367414453891131e-03 3.233430846708617e-02 60 5 105 - 102 9.367414453891131e-03 1.668718345780916e-02 3.235467947113296e-02 60 5 105 - 103 5.906021531128903e-03 5.906021531128903e-03 3.236703325098769e-02 60 10 210 - 104 5.906021531128903e-03 2.471346837871190e-02 3.237901834705667e-02 60 5 96 - 105 2.471346837871190e-02 2.201998950790008e-02 3.242549498508623e-02 60 5 105 - 106 3.894024974675171e-04 3.761680700537104e-04 3.242617044596968e-02 60 20 349 - 107 3.761680700537104e-04 7.748843143493643e-04 3.242683007682674e-02 60 5 46 - 108 7.748843143493643e-04 1.939359550616336e-03 3.242818962548284e-02 60 5 48 - 109 1.939359550616336e-03 3.113184611872983e-03 3.243157178567092e-02 60 5 97 - 110 3.113184611872983e-03 1.134238283346586e-02 3.243693386177211e-02 60 5 56 - 111 1.134238283346586e-02 1.796931919942777e-02 3.245578846135799e-02 60 5 105 - 112 1.796931919942777e-02 1.796931919942777e-02 3.248360322275518e-02 60 5 105 - 113 8.830774846120172e-03 8.830774846120172e-03 3.249636376759852e-02 60 10 210 - 114 8.830774846120172e-03 1.498507899698427e-02 3.250861147195047e-02 60 5 105 - 115 1.498507899698427e-02 2.400192116112091e-02 3.252822783037751e-02 60 5 105 - 116 1.834491808739763e-02 1.623377394364994e-02 3.255035322145888e-02 60 10 210 - 117 3.788212246854621e-03 3.773941147494160e-03 3.255469746916730e-02 60 15 315 - 118 3.773941147494160e-03 7.682030983754903e-03 3.255893334479040e-02 60 5 102 - 119 7.682030983754903e-03 2.180723185927965e-02 3.256732024800101e-02 60 5 105 - 120 2.180723185927965e-02 2.180723185927965e-02 3.258952126393384e-02 60 5 105 - 121 7.835737782770146e-03 7.835737782770146e-03 3.259691115681246e-02 60 10 210 - 122 7.835737782770146e-03 7.835737782770146e-03 3.260403532591830e-02 60 5 105 - 123 7.835737782770146e-03 1.521701267403009e-02 3.261090627152081e-02 60 5 105 - 124 1.521701267403009e-02 1.453434366415250e-02 3.262350907909189e-02 60 5 105 - 125 8.703052343239644e-03 8.703052343239644e-03 3.263033111822743e-02 60 10 210 - 126 8.703052343239644e-03 1.579670548089376e-02 3.263681960135667e-02 60 5 105 - 127 1.579670548089376e-02 1.579670548089376e-02 3.264798736584679e-02 60 5 105 - 128 1.579670548089376e-02 1.579670548089376e-02 3.265832267481519e-02 60 5 105 - 129 1.579670548089376e-02 1.579670548089376e-02 3.266783834117996e-02 60 5 105 - 130 1.579670548089376e-02 1.579670548089376e-02 3.267678702878758e-02 60 5 105 - 131 1.579670548089376e-02 1.579670548089376e-02 3.268496551666714e-02 60 5 105 - 132 1.579670548089376e-02 1.579670548089376e-02 3.269259030998119e-02 60 5 105 - 133 1.579670548089376e-02 1.579670548089376e-02 3.269967993118440e-02 60 5 105 - 134 9.442981671750042e-03 9.442981671750042e-03 3.270354813120258e-02 60 10 210 - 135 9.442981671750042e-03 1.498194099824085e-02 3.270736206011246e-02 60 5 105 - 136 1.498194099824085e-02 1.498194099824085e-02 3.271299843859180e-02 60 5 105 - 137 1.498194099824085e-02 1.498194099824085e-02 3.271824887923226e-02 60 5 105 - 138 1.498194099824085e-02 1.498194099824085e-02 3.272312899128821e-02 60 5 105 - 139 1.498194099824085e-02 1.498194099824085e-02 3.272766675941034e-02 60 5 105 - 140 1.498194099824085e-02 2.323511524381186e-02 3.273188003348305e-02 60 5 105 - 141 2.323511524381186e-02 2.323511524381186e-02 3.273782698896385e-02 60 5 105 - 142 2.323511524381186e-02 2.323511524381186e-02 3.274312637533745e-02 60 5 105 - 143 2.323511524381186e-02 2.042949136658555e-02 3.274788476870443e-02 60 5 105 - 144 2.042949136658555e-02 2.042949136658555e-02 3.275161072878752e-02 60 5 105 - 145 2.042949136658555e-02 1.314912365010589e-02 3.275500884737036e-02 60 5 105 - 146 1.314912365010589e-02 1.314912365010589e-02 3.275701308437982e-02 60 5 105 + 2 7.505751048377368e-09 1.501150209675474e-07 6.164657920190889e-09 21 5 5 + 3 1.501150209675474e-07 3.002300419350948e-06 1.293969127943737e-07 21 5 10 + 4 3.002300419350948e-06 6.004600838701896e-05 2.593514282988711e-06 21 5 10 + 5 6.004600838701896e-05 2.853823679832573e-04 5.166758334555005e-05 21 5 20 + 6 2.853823679832573e-04 2.575255434332890e-04 2.798555740976005e-04 21 5 25 + 7 2.575255434332890e-04 4.094541134469988e-04 4.794249470975060e-04 21 5 25 + 8 4.094541134469988e-04 4.094541134469988e-04 7.863858401326194e-04 21 5 29 + 9 4.094541134469988e-04 6.522908622655267e-04 1.082809129037782e-03 21 5 29 + 10 6.522908622655267e-04 5.699096897079724e-04 1.606858836596097e-03 23 5 40 + 11 5.699096897079724e-04 1.007836116841849e-03 2.005669425160000e-03 23 5 35 + 12 1.007836116841849e-03 1.007836116841849e-03 2.683040723903781e-03 23 5 40 + 13 1.007836116841849e-03 8.453991367856834e-04 3.678394364905319e-03 25 5 40 + 14 8.453991367856834e-04 1.990429632970147e-03 4.265067457277110e-03 25 5 34 + 15 1.990429632970147e-03 1.990429632970147e-03 5.574933430469675e-03 25 5 41 + 16 1.990429632970147e-03 3.606542084539227e-03 6.798364394830465e-03 25 5 35 + 17 4.980841065373463e-04 4.980841065373463e-04 6.927003185856736e-03 27 15 180 + 18 4.980841065373463e-04 4.980841065373463e-04 7.441563969778088e-03 29 5 30 + 19 4.980841065373463e-04 1.669338950987901e-03 7.722575172690612e-03 29 5 29 + 20 1.669338950987901e-03 3.660363409600048e-03 8.637783681073969e-03 29 5 44 + 21 3.660363409600048e-03 7.228866504893484e-03 1.050862732430420e-02 29 5 66 + 22 2.277066494413550e-04 2.223939246469188e-04 1.033655098852881e-02 32 20 250 + 23 2.223939246469188e-04 4.398048897676356e-04 1.092351423512213e-02 34 5 24 + 24 4.398048897676356e-04 1.023058876200847e-03 1.113462885573467e-02 34 5 33 + 25 1.023058876200847e-03 1.023058876200847e-03 1.161665279683433e-02 34 5 36 + 26 1.023058876200847e-03 3.919845082560766e-03 1.208659994169145e-02 34 5 38 + 27 3.919845082560766e-03 3.863020439217562e-03 1.378155752244160e-02 34 5 81 + 28 3.863020439217562e-03 1.257825200903444e-02 1.530364032030464e-02 34 5 59 + 29 1.533031872906549e-03 1.436302440195315e-03 1.578270750227194e-02 36 15 221 + 30 1.436302440195315e-03 3.755629101798260e-03 1.630186567569052e-02 36 5 31 + 31 2.870300468364886e-03 2.460481648357659e-03 1.728893354958566e-02 38 10 144 + 32 5.484132002743671e-04 5.448534872232822e-04 1.710787102567137e-02 40 15 251 + 33 5.448534872232822e-04 9.911472786863407e-04 1.728222131772621e-02 40 5 43 + 34 9.911472786863407e-04 2.853828564040550e-03 1.759429056441933e-02 40 5 47 + 35 2.853828564040550e-03 8.346188420319504e-03 1.845696364866320e-02 40 5 98 + 36 4.184969207140296e-03 4.184969207140296e-03 1.963139612674647e-02 40 10 209 + 37 7.891664187375526e-04 7.780072216640708e-04 1.916618790361855e-02 44 15 270 + 38 7.780072216640708e-04 1.432006588296146e-03 1.936507264204106e-02 44 5 51 + 39 1.432006588296146e-03 1.432006588296146e-03 1.933721559864914e-02 46 5 63 + 40 1.432006588296146e-03 2.920150155413109e-03 1.967900635018854e-02 46 5 59 + 41 2.920150155413109e-03 8.021410496618760e-03 2.034576732622878e-02 46 5 91 + 42 8.021410496618760e-03 8.021410496618760e-03 2.198707476731612e-02 46 5 105 + 43 8.021410496618760e-03 8.021410496618760e-03 2.338592734070328e-02 46 5 105 + 44 7.749248836531081e-04 7.712524403928612e-04 2.311665583789623e-02 50 15 273 + 45 7.712524403928612e-04 1.454207673515780e-03 2.323643927854141e-02 50 5 59 + 46 1.454207673515780e-03 3.893553595468784e-03 2.345743682946040e-02 50 5 75 + 47 3.893553595468784e-03 8.577785831996225e-03 2.401981148625224e-02 50 5 105 + 48 3.583582798475919e-03 3.583582798475919e-03 2.450182832136591e-02 50 10 210 + 49 3.583582798475919e-03 1.225842385200837e-02 2.495216274153317e-02 50 5 88 + 50 4.962462241849634e-03 4.962462241849634e-03 2.552759545114530e-02 50 10 208 + 51 4.962462241849634e-03 1.668087632819629e-02 2.605197291673569e-02 50 5 95 + 52 4.505316812294505e-03 4.505316812294505e-03 2.648793970156092e-02 50 10 201 + 53 4.505316812294505e-03 2.222468245231715e-02 2.688916611820219e-02 50 5 101 + 54 4.746858164506530e-03 4.746858164506530e-03 2.727761588174917e-02 50 15 298 + 55 4.746858164506530e-03 4.349218756600245e-03 2.848305395101498e-02 52 5 105 + 56 4.349218756600245e-03 4.349218756600245e-03 2.902306824658978e-02 54 5 105 + 57 4.349218756600245e-03 1.066724741463221e-02 2.931026262297523e-02 54 5 105 + 58 6.268748418325634e-03 6.268748418325634e-03 2.936878001655390e-02 56 10 210 + 59 6.268748418325634e-03 1.161381148923531e-02 2.970425918866458e-02 56 5 105 + 60 1.161381148923531e-02 1.028179098818762e-02 2.979356337650783e-02 58 5 105 + 61 1.028179098818762e-02 1.028179098818762e-02 2.969467522937706e-02 60 5 105 + 62 1.028179098818762e-02 3.106655738625877e-02 3.001826469123505e-02 60 5 105 + 63 1.471496945828350e-02 1.469024921725142e-02 3.039908149974539e-02 60 10 210 + 64 1.085599032570171e-02 1.085599032570171e-02 3.063067318046183e-02 60 10 210 + 65 1.085599032570171e-02 1.085599032570171e-02 3.082863809383847e-02 60 5 105 + 66 1.085599032570171e-02 1.085599032570171e-02 3.099902977389579e-02 60 5 105 + 67 7.618142079252098e-03 7.618142079252098e-03 3.110458948722743e-02 60 10 210 + 68 7.618142079252098e-03 3.289115457484437e-02 3.120052296435948e-02 60 5 105 + 69 3.289115457484437e-02 2.984967095026484e-02 3.153119483133013e-02 60 5 105 + 70 7.462417737566209e-03 7.462417737566209e-03 3.159027055714576e-02 60 6 126 + 71 7.462417737566209e-03 1.532601802900749e-02 3.164512521044466e-02 60 5 105 + 72 5.317294174445867e-03 5.317294174445867e-03 3.168191671045904e-02 60 10 210 + 73 5.317294174445867e-03 1.637705260014558e-02 3.171694897858042e-02 60 5 105 + 74 1.637705260014558e-02 5.597209894014091e-02 3.181506419526589e-02 60 5 105 + 75 9.763057448204533e-03 9.763057448204533e-03 3.186752063019930e-02 60 10 210 + 76 9.763057448204533e-03 3.404927513904092e-02 3.191613054349100e-02 60 5 105 + 77 3.404927513904092e-02 2.968548341756130e-02 3.206067821894520e-02 60 5 105 + 78 1.178500969634106e-02 1.178500969634106e-02 3.210368406300197e-02 60 10 210 + 79 1.178500969634106e-02 2.585117047072884e-02 3.214367493868805e-02 60 5 105 + 80 1.411007380226322e-02 1.411007380226322e-02 3.218801588316333e-02 60 10 210 + 81 1.411007380226322e-02 1.411007380226322e-02 3.222893682105193e-02 60 5 105 + 82 1.411007380226322e-02 1.401864440990195e-02 3.226656117886238e-02 60 5 105 + 83 1.401864440990195e-02 1.401864440990195e-02 3.230147951662023e-02 60 5 105 + 84 1.401864440990195e-02 1.303768352877046e-02 3.233369732860109e-02 60 5 105 + 85 7.810676399949200e-03 7.810676399949200e-03 3.235074731143681e-02 60 10 210 + 86 7.810676399949200e-03 7.810676399949200e-03 3.236714343315446e-02 60 5 105 + 87 7.810676399949200e-03 1.411979073878545e-02 3.238290227600748e-02 60 5 105 + 88 1.411979073878545e-02 3.418255178001077e-02 3.240986169975903e-02 60 5 105 + 89 1.683729734872759e-02 1.683729734872759e-02 3.243961052649499e-02 60 10 210 + 90 5.293743003823701e-03 5.293743003823701e-03 3.244847429329385e-02 60 10 210 + 91 5.293743003823701e-03 8.291768498653825e-03 3.245709535299850e-02 60 5 105 + 92 8.291768498653825e-03 1.880612123267676e-02 3.247017621575291e-02 60 5 105 + 93 1.173402792581162e-02 1.173402792581162e-02 3.248779528914644e-02 60 10 209 + 94 1.173402792581162e-02 1.173402792581162e-02 3.250442716997714e-02 60 5 105 + 95 1.173402792581162e-02 3.281754406804230e-02 3.252013886269631e-02 60 5 105 + 96 6.424707662957514e-03 6.424707662957514e-03 3.252836644102348e-02 60 10 197 + 97 6.424707662957514e-03 4.714988041054190e-02 3.253634036181408e-02 60 5 72 + 98 4.714988041054191e-03 4.714988041054191e-03 3.254203651909890e-02 60 10 171 + 99 4.714988041054191e-03 4.282144720721703e-02 3.254760362002126e-02 60 5 56 + 100 4.282144720721703e-02 3.592705003681280e-02 3.259281046463217e-02 60 5 105 + 101 7.349314806790228e-03 7.349314806790228e-03 3.259965013816767e-02 60 15 315 + 102 7.349314806790228e-03 3.112322123785429e-02 3.260625388050781e-02 60 5 96 + 103 3.112322123785429e-02 3.112322123785429e-02 3.263174602069833e-02 60 5 105 + 104 6.839739280813347e-03 6.839739280813347e-03 3.263685222363544e-02 60 15 315 + 105 6.839739280813347e-03 3.638819250655535e-02 3.264179137178386e-02 60 5 77 + 106 3.638819250655535e-02 3.638819250655535e-02 3.266544357612065e-02 60 5 105 + 107 1.812430795718352e-02 1.812430795718352e-02 3.267571852602801e-02 60 10 210 + 108 3.325944651421952e-03 3.325944651421952e-03 3.267751436841327e-02 60 15 315 + 109 3.325944651421952e-03 1.705033487710399e-02 3.267928353707002e-02 60 5 79 + 110 4.262583719275997e-03 4.262583719275997e-03 3.268151038658581e-02 60 6 118 + 111 4.262583719275997e-03 1.551192985487607e-02 3.268369082817933e-02 60 5 87 + 112 1.551192985487607e-02 2.477145186640316e-02 3.269122491441458e-02 60 5 105 + 113 1.660178108793211e-02 1.660178108793211e-02 3.269867454817608e-02 60 10 210 + 114 1.660178108793211e-02 1.660178108793211e-02 3.270557188991038e-02 60 5 105 + 115 1.660178108793211e-02 1.660178108793211e-02 3.271192363723516e-02 60 5 105 + 116 1.660178108793211e-02 3.371605679577483e-02 3.271779428194488e-02 60 5 105 + 117 1.522144924734310e-02 1.522144924734310e-02 3.272271516928414e-02 60 10 210 + 118 1.522144924734310e-02 1.396058321278275e-02 3.272735805276025e-02 60 5 105 + 119 1.396058321278275e-02 2.708386296373138e-02 3.273131056482627e-02 60 5 105 + 120 1.784278714797101e-02 1.559390397930733e-02 3.273593683845105e-02 60 10 210 + 121 1.108547745869386e-02 1.108547745869386e-02 3.273862071549129e-02 60 10 210 + 122 1.108547745869386e-02 3.935975276857615e-02 3.274118608200519e-02 60 5 105 + 123 9.839938192144036e-03 9.839938192144036e-03 3.274329592751463e-02 60 6 126 + 124 9.839938192144036e-03 3.408840272553354e-02 3.274535508616430e-02 60 5 105 + 125 2.571312978993083e-02 2.384800532128622e-02 3.274985374478378e-02 60 10 210 + 126 2.384800532128622e-02 1.550804686753758e-02 3.275393582150888e-02 60 5 105 + 127 1.550804686753758e-02 1.550804686753758e-02 3.275635661747035e-02 60 5 105 ---------------------------------------------------------------------------------------- Final solver statistics: - Total number of time steps = 146 - Total nonlinear iterations = 980 - Total linear iterations = 17015 + Total number of time steps = 127 + Total nonlinear iterations = 868 + Total linear iterations = 15028 diff --git a/examples/arkode/C_serial/ark_kepler.out b/examples/arkode/C_serial/ark_kepler.out index dd1e2f7f21..1ed58346ac 100644 --- a/examples/arkode/C_serial/ark_kepler.out +++ b/examples/arkode/C_serial/ark_kepler.out @@ -72,5 +72,5 @@ Inequality constraint fails = 0 Initial step size = 0.01 Last step size = 0.009999999998981926 Current step size = 0.01 -f1 RHS fn evals = 40001 -f2 RHS fn evals = 40001 +f1 RHS fn evals = 40000 +f2 RHS fn evals = 40000 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out index 36873efa02..845e6dbb9b 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_adapt.out @@ -72,7 +72,7 @@ Inequality constraint fails = 0 Initial step size = 1.836231979046091e-06 Last step size = 0.2400202274108805 Current step size = 0.2400202274108805 -Explicit RHS fn evals = 2564 +Explicit RHS fn evals = 2125 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out index 617c413a32..a53c7f1542 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_ERK_--step-mode_fixed_--count-orbits.out @@ -135,7 +135,7 @@ Initial step size = 0.01 Last step size = 0.009999999998981926 Current step size = 0.01 Root fn evals = 10288 -Explicit RHS fn evals = 60001 +Explicit RHS fn evals = 50000 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out index c63591e498..4ac4c1c821 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--count-orbits_--use-compensated-sums.out @@ -135,5 +135,5 @@ Initial step size = 0.01 Last step size = 0.01 Current step size = 0.01 Root fn evals = 10297 -f1 RHS fn evals = 40032 -f2 RHS fn evals = 40032 +f1 RHS fn evals = 40031 +f2 RHS fn evals = 40031 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out index 3a5b411e29..d32b06fb11 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_EULER_1_1_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -f1 RHS fn evals = 50002 -f2 RHS fn evals = 50002 +f1 RHS fn evals = 50001 +f2 RHS fn evals = 50001 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.0005 Last step size = 0.0004999999432868658 Current step size = 0.0005 -f1 RHS fn evals = 100001 -f2 RHS fn evals = 100001 +f1 RHS fn evals = 100000 +f2 RHS fn evals = 100000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.00025 Last step size = 0.0002499998522722533 Current step size = 0.00025 -f1 RHS fn evals = 200001 -f2 RHS fn evals = 200001 +f1 RHS fn evals = 200000 +f2 RHS fn evals = 200000 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.000125 Last step size = 3.183586727573126e-10 Current step size = 0.000125 -f1 RHS fn evals = 400002 -f2 RHS fn evals = 400002 +f1 RHS fn evals = 400001 +f2 RHS fn evals = 400001 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 6.25e-05 Last step size = 7.503473398173804e-10 Current step size = 6.25e-05 -f1 RHS fn evals = 800002 -f2 RHS fn evals = 800002 +f1 RHS fn evals = 800001 +f2 RHS fn evals = 800001 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 3.125e-05 Last step size = 9.66345226061093e-10 Current step size = 3.125e-05 -f1 RHS fn evals = 1600002 -f2 RHS fn evals = 1600002 +f1 RHS fn evals = 1600001 +f2 RHS fn evals = 1600001 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 1.5625e-05 Last step size = 1.562198162474714e-05 Current step size = 1.5625e-05 -f1 RHS fn evals = 3200001 -f2 RHS fn evals = 3200001 +f1 RHS fn evals = 3200000 +f2 RHS fn evals = 3200000 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 7.8125e-06 Last step size = 7.805897645596353e-06 Current step size = 7.8125e-06 -f1 RHS fn evals = 6400001 -f2 RHS fn evals = 6400001 +f1 RHS fn evals = 6400000 +f2 RHS fn evals = 6400000 Order of accuracy wrt solution: expected = 1, max = 1.6317, avg = 1.0843, overall = 1.0418 Order of accuracy wrt Hamiltonian: expected = 1, max = 0.9999, avg = 0.9979, overall = 0.9983 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out index 7a3cc7e234..f6270cd29f 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -f1 RHS fn evals = 100003 -f2 RHS fn evals = 100003 +f1 RHS fn evals = 100002 +f2 RHS fn evals = 100002 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.0005 Last step size = 0.0004999999432868658 Current step size = 0.0005 -f1 RHS fn evals = 200001 -f2 RHS fn evals = 200001 +f1 RHS fn evals = 200000 +f2 RHS fn evals = 200000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.00025 Last step size = 0.0002499998522722533 Current step size = 0.00025 -f1 RHS fn evals = 400001 -f2 RHS fn evals = 400001 +f1 RHS fn evals = 400000 +f2 RHS fn evals = 400000 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.000125 Last step size = 3.183586727573126e-10 Current step size = 0.000125 -f1 RHS fn evals = 800003 -f2 RHS fn evals = 800003 +f1 RHS fn evals = 800002 +f2 RHS fn evals = 800002 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 6.25e-05 Last step size = 7.503473398173804e-10 Current step size = 6.25e-05 -f1 RHS fn evals = 1600003 -f2 RHS fn evals = 1600003 +f1 RHS fn evals = 1600002 +f2 RHS fn evals = 1600002 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 3.125e-05 Last step size = 9.66345226061093e-10 Current step size = 3.125e-05 -f1 RHS fn evals = 3200003 -f2 RHS fn evals = 3200003 +f1 RHS fn evals = 3200002 +f2 RHS fn evals = 3200002 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 1.5625e-05 Last step size = 1.562198162474714e-05 Current step size = 1.5625e-05 -f1 RHS fn evals = 6400001 -f2 RHS fn evals = 6400001 +f1 RHS fn evals = 6400000 +f2 RHS fn evals = 6400000 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 7.8125e-06 Last step size = 7.805897645596353e-06 Current step size = 7.8125e-06 -f1 RHS fn evals = 12800001 -f2 RHS fn evals = 12800001 +f1 RHS fn evals = 12800000 +f2 RHS fn evals = 12800000 Order of accuracy wrt solution: expected = 2, max = 2.0097, avg = 1.8616, overall = 1.9108 Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0636, avg = 2.0087, overall = 2.0051 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out index 3749e79c62..588a1cd511 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_2_2_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -f1 RHS fn evals = 100003 -f2 RHS fn evals = 100003 +f1 RHS fn evals = 100002 +f2 RHS fn evals = 100002 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.0005 Last step size = 0.0004999999432868658 Current step size = 0.0005 -f1 RHS fn evals = 200001 -f2 RHS fn evals = 200001 +f1 RHS fn evals = 200000 +f2 RHS fn evals = 200000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.00025 Last step size = 0.0002499998522722533 Current step size = 0.00025 -f1 RHS fn evals = 400001 -f2 RHS fn evals = 400001 +f1 RHS fn evals = 400000 +f2 RHS fn evals = 400000 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.000125 Last step size = 3.183586727573126e-10 Current step size = 0.000125 -f1 RHS fn evals = 800003 -f2 RHS fn evals = 800003 +f1 RHS fn evals = 800002 +f2 RHS fn evals = 800002 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 6.25e-05 Last step size = 7.503473398173804e-10 Current step size = 6.25e-05 -f1 RHS fn evals = 1600003 -f2 RHS fn evals = 1600003 +f1 RHS fn evals = 1600002 +f2 RHS fn evals = 1600002 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 3.125e-05 Last step size = 9.66345226061093e-10 Current step size = 3.125e-05 -f1 RHS fn evals = 3200003 -f2 RHS fn evals = 3200003 +f1 RHS fn evals = 3200002 +f2 RHS fn evals = 3200002 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 1.5625e-05 Last step size = 1.562198162474714e-05 Current step size = 1.5625e-05 -f1 RHS fn evals = 6400001 -f2 RHS fn evals = 6400001 +f1 RHS fn evals = 6400000 +f2 RHS fn evals = 6400000 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 7.8125e-06 Last step size = 7.805897645596353e-06 Current step size = 7.8125e-06 -f1 RHS fn evals = 12800001 -f2 RHS fn evals = 12800001 +f1 RHS fn evals = 12800000 +f2 RHS fn evals = 12800000 Order of accuracy wrt solution: expected = 2, max = 2.0069, avg = 1.8941, overall = 1.9322 Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0006, avg = 1.9998, overall = 1.9999 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out index 369230aab9..defe328ece 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_3_3_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.1 Last step size = 0.0999999999995608 Current step size = 0.1 -f1 RHS fn evals = 1501 -f2 RHS fn evals = 1501 +f1 RHS fn evals = 1500 +f2 RHS fn evals = 1500 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.05 Last step size = 0.05 Current step size = 0.05 -f1 RHS fn evals = 3001 -f2 RHS fn evals = 3001 +f1 RHS fn evals = 3000 +f2 RHS fn evals = 3000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.025 Last step size = 1.769251412042648e-12 Current step size = 0.025 -f1 RHS fn evals = 6004 -f2 RHS fn evals = 6004 +f1 RHS fn evals = 6003 +f2 RHS fn evals = 6003 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.0125 Last step size = 0.01249999999719619 Current step size = 0.0125 -f1 RHS fn evals = 12001 -f2 RHS fn evals = 12001 +f1 RHS fn evals = 12000 +f2 RHS fn evals = 12000 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 0.00625 Last step size = 0.006249999992917305 Current step size = 0.00625 -f1 RHS fn evals = 24001 -f2 RHS fn evals = 24001 +f1 RHS fn evals = 24000 +f2 RHS fn evals = 24000 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 0.003125 Last step size = 1.124078607972478e-11 Current step size = 0.003125 -f1 RHS fn evals = 48004 -f2 RHS fn evals = 48004 +f1 RHS fn evals = 48003 +f2 RHS fn evals = 48003 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 0.0015625 Last step size = 2.835776058418557e-11 Current step size = 0.0015625 -f1 RHS fn evals = 96004 -f2 RHS fn evals = 96004 +f1 RHS fn evals = 96003 +f2 RHS fn evals = 96003 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 0.00078125 Last step size = 0.0007812499550681189 Current step size = 0.00078125 -f1 RHS fn evals = 192001 -f2 RHS fn evals = 192001 +f1 RHS fn evals = 192000 +f2 RHS fn evals = 192000 Order of accuracy wrt solution: expected = 3, max = 3.9687, avg = 3.7860, overall = 3.8206 Order of accuracy wrt Hamiltonian: expected = 3, max = 3.1635, avg = 3.0431, overall = 3.0566 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out index 0984d2b7c2..f87244403c 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_4_4_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.1 Last step size = 0.0999999999995608 Current step size = 0.1 -f1 RHS fn evals = 2001 -f2 RHS fn evals = 2001 +f1 RHS fn evals = 2000 +f2 RHS fn evals = 2000 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.05 Last step size = 0.05 Current step size = 0.05 -f1 RHS fn evals = 4001 -f2 RHS fn evals = 4001 +f1 RHS fn evals = 4000 +f2 RHS fn evals = 4000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.025 Last step size = 1.769251412042648e-12 Current step size = 0.025 -f1 RHS fn evals = 8005 -f2 RHS fn evals = 8005 +f1 RHS fn evals = 8004 +f2 RHS fn evals = 8004 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.0125 Last step size = 0.01249999999719619 Current step size = 0.0125 -f1 RHS fn evals = 16001 -f2 RHS fn evals = 16001 +f1 RHS fn evals = 16000 +f2 RHS fn evals = 16000 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 0.00625 Last step size = 0.006249999992917305 Current step size = 0.00625 -f1 RHS fn evals = 32001 -f2 RHS fn evals = 32001 +f1 RHS fn evals = 32000 +f2 RHS fn evals = 32000 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 0.003125 Last step size = 1.124078607972478e-11 Current step size = 0.003125 -f1 RHS fn evals = 64005 -f2 RHS fn evals = 64005 +f1 RHS fn evals = 64004 +f2 RHS fn evals = 64004 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 0.0015625 Last step size = 2.835776058418557e-11 Current step size = 0.0015625 -f1 RHS fn evals = 128005 -f2 RHS fn evals = 128005 +f1 RHS fn evals = 128004 +f2 RHS fn evals = 128004 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 0.00078125 Last step size = 0.0007812499550681189 Current step size = 0.00078125 -f1 RHS fn evals = 256001 -f2 RHS fn evals = 256001 +f1 RHS fn evals = 256000 +f2 RHS fn evals = 256000 Order of accuracy wrt solution: expected = 4, max = 3.9974, avg = 3.5943, overall = 3.7564 Order of accuracy wrt Hamiltonian: expected = 4, max = 4.2742, avg = 3.8327, overall = 3.8935 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out index a421b8dc9b..78f14dd179 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_MCLACHLAN_5_6_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.1 Last step size = 0.0999999999995608 Current step size = 0.1 -f1 RHS fn evals = 3001 -f2 RHS fn evals = 3001 +f1 RHS fn evals = 3000 +f2 RHS fn evals = 3000 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.05 Last step size = 0.05 Current step size = 0.05 -f1 RHS fn evals = 6001 -f2 RHS fn evals = 6001 +f1 RHS fn evals = 6000 +f2 RHS fn evals = 6000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.025 Last step size = 1.769251412042648e-12 Current step size = 0.025 -f1 RHS fn evals = 12007 -f2 RHS fn evals = 12007 +f1 RHS fn evals = 12006 +f2 RHS fn evals = 12006 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.0125 Last step size = 0.01249999999719619 Current step size = 0.0125 -f1 RHS fn evals = 24001 -f2 RHS fn evals = 24001 +f1 RHS fn evals = 24000 +f2 RHS fn evals = 24000 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 0.00625 Last step size = 0.006249999992917305 Current step size = 0.00625 -f1 RHS fn evals = 48001 -f2 RHS fn evals = 48001 +f1 RHS fn evals = 48000 +f2 RHS fn evals = 48000 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 0.003125 Last step size = 1.124078607972478e-11 Current step size = 0.003125 -f1 RHS fn evals = 96007 -f2 RHS fn evals = 96007 +f1 RHS fn evals = 96006 +f2 RHS fn evals = 96006 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 0.0015625 Last step size = 2.835776058418557e-11 Current step size = 0.0015625 -f1 RHS fn evals = 192007 -f2 RHS fn evals = 192007 +f1 RHS fn evals = 192006 +f2 RHS fn evals = 192006 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 0.00078125 Last step size = 0.0007812499550681189 Current step size = 0.00078125 -f1 RHS fn evals = 384001 -f2 RHS fn evals = 384001 +f1 RHS fn evals = 384000 +f2 RHS fn evals = 384000 Order of accuracy wrt solution: expected = 5, max = 5.9898, avg = 3.4143, overall = 3.7927 Order of accuracy wrt Hamiltonian: expected = 5, max = 5.8607, avg = 3.9728, overall = 4.4560 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out index b32d0a4fa9..1289fd72b9 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_PSEUDO_LEAPFROG_2_2_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -f1 RHS fn evals = 100003 -f2 RHS fn evals = 100003 +f1 RHS fn evals = 100002 +f2 RHS fn evals = 100002 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.0005 Last step size = 0.0004999999432868658 Current step size = 0.0005 -f1 RHS fn evals = 200001 -f2 RHS fn evals = 200001 +f1 RHS fn evals = 200000 +f2 RHS fn evals = 200000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.00025 Last step size = 0.0002499998522722533 Current step size = 0.00025 -f1 RHS fn evals = 400001 -f2 RHS fn evals = 400001 +f1 RHS fn evals = 400000 +f2 RHS fn evals = 400000 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.000125 Last step size = 3.183586727573126e-10 Current step size = 0.000125 -f1 RHS fn evals = 800003 -f2 RHS fn evals = 800003 +f1 RHS fn evals = 800002 +f2 RHS fn evals = 800002 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 6.25e-05 Last step size = 7.503473398173804e-10 Current step size = 6.25e-05 -f1 RHS fn evals = 1600003 -f2 RHS fn evals = 1600003 +f1 RHS fn evals = 1600002 +f2 RHS fn evals = 1600002 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 3.125e-05 Last step size = 9.66345226061093e-10 Current step size = 3.125e-05 -f1 RHS fn evals = 3200003 -f2 RHS fn evals = 3200003 +f1 RHS fn evals = 3200002 +f2 RHS fn evals = 3200002 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 1.5625e-05 Last step size = 1.562198162474714e-05 Current step size = 1.5625e-05 -f1 RHS fn evals = 6400001 -f2 RHS fn evals = 6400001 +f1 RHS fn evals = 6400000 +f2 RHS fn evals = 6400000 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 7.8125e-06 Last step size = 7.805897645596353e-06 Current step size = 7.8125e-06 -f1 RHS fn evals = 12800001 -f2 RHS fn evals = 12800001 +f1 RHS fn evals = 12800000 +f2 RHS fn evals = 12800000 Order of accuracy wrt solution: expected = 2, max = 2.0019, avg = 1.9630, overall = 1.9766 Order of accuracy wrt Hamiltonian: expected = 2, max = 2.0012, avg = 2.0000, overall = 2.0001 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out index 28a629e3c0..eca72a0654 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_RUTH_3_3_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.1 Last step size = 0.0999999999995608 Current step size = 0.1 -f1 RHS fn evals = 1501 -f2 RHS fn evals = 1501 +f1 RHS fn evals = 1500 +f2 RHS fn evals = 1500 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.05 Last step size = 0.05 Current step size = 0.05 -f1 RHS fn evals = 3001 -f2 RHS fn evals = 3001 +f1 RHS fn evals = 3000 +f2 RHS fn evals = 3000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.025 Last step size = 1.769251412042648e-12 Current step size = 0.025 -f1 RHS fn evals = 6004 -f2 RHS fn evals = 6004 +f1 RHS fn evals = 6003 +f2 RHS fn evals = 6003 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.0125 Last step size = 0.01249999999719619 Current step size = 0.0125 -f1 RHS fn evals = 12001 -f2 RHS fn evals = 12001 +f1 RHS fn evals = 12000 +f2 RHS fn evals = 12000 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 0.00625 Last step size = 0.006249999992917305 Current step size = 0.00625 -f1 RHS fn evals = 24001 -f2 RHS fn evals = 24001 +f1 RHS fn evals = 24000 +f2 RHS fn evals = 24000 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 0.003125 Last step size = 1.124078607972478e-11 Current step size = 0.003125 -f1 RHS fn evals = 48004 -f2 RHS fn evals = 48004 +f1 RHS fn evals = 48003 +f2 RHS fn evals = 48003 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 0.0015625 Last step size = 2.835776058418557e-11 Current step size = 0.0015625 -f1 RHS fn evals = 96004 -f2 RHS fn evals = 96004 +f1 RHS fn evals = 96003 +f2 RHS fn evals = 96003 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 0.00078125 Last step size = 0.0007812499550681189 Current step size = 0.00078125 -f1 RHS fn evals = 192001 -f2 RHS fn evals = 192001 +f1 RHS fn evals = 192000 +f2 RHS fn evals = 192000 Order of accuracy wrt solution: expected = 3, max = 4.0232, avg = 3.9269, overall = 3.9563 Order of accuracy wrt Hamiltonian: expected = 3, max = 5.1799, avg = 3.3283, overall = 3.1911 diff --git a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out index d01c6cbeef..f2651ffd39 100644 --- a/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out +++ b/examples/arkode/C_serial/ark_kepler_--stepper_SPRK_--step-mode_fixed_--method_ARKODE_SPRK_YOSHIDA_6_8_--tf_50_--check-order_--nout_1.out @@ -23,7 +23,7 @@ Inequality constraint fails = 0 Initial step size = 0.001 Last step size = 2.582822844487962e-11 Current step size = 0.001 -Explicit RHS fn evals = 400009 +Explicit RHS fn evals = 400008 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 @@ -54,8 +54,8 @@ Inequality constraint fails = 0 Initial step size = 0.1 Last step size = 0.0999999999995608 Current step size = 0.1 -f1 RHS fn evals = 4001 -f2 RHS fn evals = 4001 +f1 RHS fn evals = 4000 +f2 RHS fn evals = 4000 Begin Kepler Problem @@ -82,8 +82,8 @@ Inequality constraint fails = 0 Initial step size = 0.05 Last step size = 0.05 Current step size = 0.05 -f1 RHS fn evals = 8001 -f2 RHS fn evals = 8001 +f1 RHS fn evals = 8000 +f2 RHS fn evals = 8000 Begin Kepler Problem @@ -110,8 +110,8 @@ Inequality constraint fails = 0 Initial step size = 0.025 Last step size = 1.769251412042648e-12 Current step size = 0.025 -f1 RHS fn evals = 16009 -f2 RHS fn evals = 16009 +f1 RHS fn evals = 16008 +f2 RHS fn evals = 16008 Begin Kepler Problem @@ -138,8 +138,8 @@ Inequality constraint fails = 0 Initial step size = 0.0125 Last step size = 0.01249999999719619 Current step size = 0.0125 -f1 RHS fn evals = 32001 -f2 RHS fn evals = 32001 +f1 RHS fn evals = 32000 +f2 RHS fn evals = 32000 Begin Kepler Problem @@ -166,8 +166,8 @@ Inequality constraint fails = 0 Initial step size = 0.00625 Last step size = 0.006249999992917305 Current step size = 0.00625 -f1 RHS fn evals = 64001 -f2 RHS fn evals = 64001 +f1 RHS fn evals = 64000 +f2 RHS fn evals = 64000 Begin Kepler Problem @@ -194,8 +194,8 @@ Inequality constraint fails = 0 Initial step size = 0.003125 Last step size = 1.124078607972478e-11 Current step size = 0.003125 -f1 RHS fn evals = 128009 -f2 RHS fn evals = 128009 +f1 RHS fn evals = 128008 +f2 RHS fn evals = 128008 Begin Kepler Problem @@ -222,8 +222,8 @@ Inequality constraint fails = 0 Initial step size = 0.0015625 Last step size = 2.835776058418557e-11 Current step size = 0.0015625 -f1 RHS fn evals = 256009 -f2 RHS fn evals = 256009 +f1 RHS fn evals = 256008 +f2 RHS fn evals = 256008 Begin Kepler Problem @@ -250,8 +250,8 @@ Inequality constraint fails = 0 Initial step size = 0.00078125 Last step size = 0.0007812499550681189 Current step size = 0.00078125 -f1 RHS fn evals = 512001 -f2 RHS fn evals = 512001 +f1 RHS fn evals = 512000 +f2 RHS fn evals = 512000 Order of accuracy wrt solution: expected = 6, max = 5.9959, avg = 3.9792, overall = 4.5039 Order of accuracy wrt Hamiltonian: expected = 6, max = 6.2667, avg = 4.6429, overall = 4.9135 diff --git a/examples/arkode/C_serial/ark_kpr_mri.out b/examples/arkode/C_serial/ark_kpr_mri.out index 5f8ee0f5d8..e551c2cee3 100644 --- a/examples/arkode/C_serial/ark_kpr_mri.out +++ b/examples/arkode/C_serial/ark_kpr_mri.out @@ -66,4 +66,4 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 501, nstf = 50601 u error = 7.941e-07, v error = 8.255e-08, total error = 5.646e-07 - Total RHS evals: Fs = 1504, Ff = 152306 + Total RHS evals: Fs = 1504, Ff = 151853 diff --git a/examples/arkode/C_serial/ark_kpr_mri_0_0.002.out b/examples/arkode/C_serial/ark_kpr_mri_0_0.002.out index 4957509c74..ef1ab12278 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_0_0.002.out +++ b/examples/arkode/C_serial/ark_kpr_mri_0_0.002.out @@ -65,5 +65,5 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 2501, nstf = 252601 - u error = 4.670e-09, v error = 5.638e-10, total error = 3.327e-09 - Total RHS evals: Fs = 7504, Ff = 760306 + u error = 4.671e-09, v error = 5.638e-10, total error = 3.327e-09 + Total RHS evals: Fs = 7504, Ff = 757853 diff --git a/examples/arkode/C_serial/ark_kpr_mri_1_0.002.out b/examples/arkode/C_serial/ark_kpr_mri_1_0.002.out index 40ed2fe4b3..2cb8b8d4ff 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_1_0.002.out +++ b/examples/arkode/C_serial/ark_kpr_mri_1_0.002.out @@ -66,4 +66,4 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 2501, nstf = 252601 u error = 3.156e-13, v error = 1.909e-12, total error = 1.368e-12 - Total RHS evals: Fs = 5003, Ff = 760306 + Total RHS evals: Fs = 5003, Ff = 757853 diff --git a/examples/arkode/C_serial/ark_kpr_mri_3_0.01.out b/examples/arkode/C_serial/ark_kpr_mri_3_0.01.out index bb74cbef2d..9504b4c524 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_3_0.01.out +++ b/examples/arkode/C_serial/ark_kpr_mri_3_0.01.out @@ -65,4 +65,4 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 501, nstf = 50601 u error = 5.052e-05, v error = 7.684e-04, total error = 5.445e-04 - Total RHS evals: Fs = 1504, Ff = 152306 + Total RHS evals: Fs = 1504, Ff = 151853 diff --git a/examples/arkode/C_serial/ark_kpr_mri_4_0.002.out b/examples/arkode/C_serial/ark_kpr_mri_4_0.002.out index 5177842335..9f53b0e3b4 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_4_0.002.out +++ b/examples/arkode/C_serial/ark_kpr_mri_4_0.002.out @@ -66,7 +66,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 2501, nstf = 250100 u error = 3.482e-06, v error = 9.535e-04, total error = 6.742e-04 - Total RHS evals: Fs = 7143, Ff = 755303 + Total RHS evals: Fs = 7143, Ff = 750350 Slow Newton iters = 4641 Slow Newton conv fails = 0 Slow Jacobian evals = 126 diff --git a/examples/arkode/C_serial/ark_kpr_mri_5_0.002.out b/examples/arkode/C_serial/ark_kpr_mri_5_0.002.out index 654cb30f41..1a38aa16e6 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_5_0.002.out +++ b/examples/arkode/C_serial/ark_kpr_mri_5_0.002.out @@ -23,47 +23,47 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 1.000000 1.127010 1.691839 1.33e-10 6.94e-11 1.100000 1.107609 1.000489 1.23e-10 7.12e-11 1.200000 1.086821 1.677552 1.12e-10 7.21e-11 - 1.300000 1.064777 1.277775 9.90e-11 7.21e-11 + 1.300000 1.064777 1.277775 9.89e-11 7.21e-11 1.400000 1.041625 1.342455 8.49e-11 7.13e-11 1.500000 1.017531 1.642940 6.94e-11 6.96e-11 1.600000 0.992673 1.012112 5.24e-11 6.69e-11 1.700000 0.967253 1.714058 3.37e-11 6.34e-11 1.800000 0.941488 1.183867 1.32e-11 5.89e-11 - 1.900000 0.915617 1.437465 9.12e-12 5.33e-11 + 1.900000 0.915617 1.437465 9.11e-12 5.33e-11 2.000000 0.889903 1.577082 3.33e-11 4.69e-11 - 2.100000 0.864625 1.056467 5.94e-11 3.62e-11 - 2.200000 0.840089 1.730920 8.72e-11 3.20e-11 - 2.300000 0.816616 1.101047 1.16e-10 1.85e-11 - 2.400000 0.794546 1.525051 1.47e-10 1.05e-11 - 2.500000 0.774227 1.496993 1.78e-10 1.19e-12 - 2.600000 0.756013 1.126857 2.08e-10 1.60e-11 - 2.700000 0.740246 1.727536 2.36e-10 2.55e-11 - 2.800000 0.727247 1.038393 2.62e-10 4.36e-11 - 2.900000 0.717301 1.600759 2.83e-10 5.41e-11 - 3.000000 0.710636 1.406380 2.99e-10 6.92e-11 - 3.100000 0.707412 1.214353 3.07e-10 8.37e-11 - 3.200000 0.707709 1.704026 3.08e-10 9.30e-11 + 2.100000 0.864625 1.056467 5.94e-11 3.57e-11 + 2.200000 0.840089 1.730920 8.72e-11 3.22e-11 + 2.300000 0.816616 1.101047 1.16e-10 1.97e-11 + 2.400000 0.794546 1.525051 1.47e-10 7.75e-12 + 2.500000 0.774227 1.496993 1.78e-10 2.45e-12 + 2.600000 0.756013 1.126857 2.08e-10 1.99e-11 + 2.700000 0.740246 1.727536 2.36e-10 2.32e-11 + 2.800000 0.727247 1.038393 2.62e-10 4.19e-11 + 2.900000 0.717301 1.600759 2.83e-10 5.92e-11 + 3.000000 0.710636 1.406380 2.99e-10 6.19e-11 + 3.100000 0.707412 1.214353 3.07e-10 9.20e-11 + 3.200000 0.707709 1.704026 3.08e-10 8.71e-11 3.300000 0.711520 1.004391 3.02e-10 1.08e-10 - 3.400000 0.718750 1.661225 2.88e-10 1.14e-10 - 3.500000 0.729227 1.310102 2.68e-10 1.23e-10 - 3.600000 0.742712 1.310080 2.43e-10 1.28e-10 - 3.700000 0.758914 1.661237 2.15e-10 1.29e-10 - 3.800000 0.777506 1.004387 1.85e-10 1.34e-10 - 3.900000 0.798144 1.704019 1.54e-10 1.28e-10 - 4.000000 0.820474 1.214374 1.24e-10 1.28e-10 - 4.100000 0.844149 1.406358 9.39e-11 1.22e-10 - 4.200000 0.868832 1.600774 6.55e-11 1.14e-10 - 4.300000 0.894204 1.038382 3.88e-11 1.10e-10 - 4.400000 0.919964 1.727533 1.40e-11 9.70e-11 - 4.500000 0.945834 1.126875 8.93e-12 9.14e-11 - 4.600000 0.971557 1.496974 3.00e-11 7.93e-11 - 4.700000 0.996898 1.525070 4.92e-11 6.88e-11 - 4.800000 1.021641 1.101030 6.67e-11 6.10e-11 - 4.900000 1.045589 1.730922 8.26e-11 4.65e-11 - 5.000000 1.068565 1.056480 9.70e-11 4.02e-11 + 3.400000 0.718750 1.661225 2.88e-10 1.19e-10 + 3.500000 0.729227 1.310102 2.68e-10 1.13e-10 + 3.600000 0.742712 1.310080 2.43e-10 1.41e-10 + 3.700000 0.758914 1.661237 2.15e-10 1.18e-10 + 3.800000 0.777506 1.004387 1.85e-10 1.38e-10 + 3.900000 0.798144 1.704019 1.54e-10 1.31e-10 + 4.000000 0.820474 1.214374 1.24e-10 1.16e-10 + 4.100000 0.844149 1.406358 9.39e-11 1.38e-10 + 4.200000 0.868832 1.600774 6.55e-11 9.88e-11 + 4.300000 0.894204 1.038382 3.88e-11 1.20e-10 + 4.400000 0.919964 1.727533 1.40e-11 9.58e-11 + 4.500000 0.945834 1.126875 8.93e-12 8.01e-11 + 4.600000 0.971557 1.496974 3.00e-11 9.82e-11 + 4.700000 0.996898 1.525070 4.92e-11 4.94e-11 + 4.800000 1.021641 1.101030 6.67e-11 7.79e-11 + 4.900000 1.045589 1.730922 8.26e-11 3.90e-11 + 5.000000 1.068565 1.056480 9.70e-11 3.19e-11 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 2501, nstf = 250100 - u error = 1.665e-10, v error = 7.685e-11, total error = 1.296e-10 - Total RHS evals: Fs = 12506, Ff = 1002903 + u error = 1.665e-10, v error = 7.714e-11, total error = 1.297e-10 + Total RHS evals: Fs = 12506, Ff = 1000450 diff --git a/examples/arkode/C_serial/ark_kpr_mri_6_0.005.out b/examples/arkode/C_serial/ark_kpr_mri_6_0.005.out index b89492c708..7929d73e39 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_6_0.005.out +++ b/examples/arkode/C_serial/ark_kpr_mri_6_0.005.out @@ -33,10 +33,10 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 2.000000 0.889903 1.577082 1.50e-09 1.98e-09 2.100000 0.864625 1.056467 2.68e-09 1.66e-09 2.200000 0.840089 1.730920 3.94e-09 1.30e-09 - 2.300000 0.816616 1.101047 5.27e-09 8.99e-10 - 2.400000 0.794546 1.525051 6.65e-09 4.49e-10 - 2.500000 0.774227 1.496993 8.05e-09 4.16e-11 - 2.600000 0.756013 1.126857 9.42e-09 5.71e-10 + 2.300000 0.816616 1.101047 5.27e-09 9.00e-10 + 2.400000 0.794546 1.525051 6.65e-09 4.47e-10 + 2.500000 0.774227 1.496993 8.05e-09 3.94e-11 + 2.600000 0.756013 1.126857 9.42e-09 5.73e-10 2.700000 0.740246 1.727536 1.07e-08 1.13e-09 2.800000 0.727247 1.038393 1.19e-08 1.71e-09 2.900000 0.717301 1.600759 1.29e-08 2.31e-09 @@ -44,13 +44,13 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 3.100000 0.707412 1.214353 1.40e-08 3.46e-09 3.200000 0.707709 1.704026 1.40e-08 3.98e-09 3.300000 0.711520 1.004391 1.37e-08 4.45e-09 - 3.400000 0.718750 1.661225 1.31e-08 4.84e-09 + 3.400000 0.718750 1.661225 1.31e-08 4.85e-09 3.500000 0.729227 1.310102 1.22e-08 5.15e-09 - 3.600000 0.742712 1.310080 1.11e-08 5.37e-09 - 3.700000 0.758914 1.661237 9.81e-09 5.50e-09 + 3.600000 0.742712 1.310080 1.11e-08 5.38e-09 + 3.700000 0.758914 1.661237 9.81e-09 5.49e-09 3.800000 0.777506 1.004387 8.45e-09 5.53e-09 3.900000 0.798144 1.704019 7.04e-09 5.47e-09 - 4.000000 0.820474 1.214374 5.64e-09 5.34e-09 + 4.000000 0.820474 1.214374 5.64e-09 5.33e-09 4.100000 0.844149 1.406358 4.29e-09 5.13e-09 4.200000 0.868832 1.600774 3.00e-09 4.86e-09 4.300000 0.894204 1.038382 1.78e-09 4.54e-09 @@ -58,7 +58,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 4.500000 0.945834 1.126875 3.93e-10 3.79e-09 4.600000 0.971557 1.496974 1.35e-09 3.38e-09 4.700000 0.996898 1.525070 2.23e-09 2.94e-09 - 4.800000 1.021641 1.101030 3.02e-09 2.50e-09 + 4.800000 1.021641 1.101030 3.02e-09 2.51e-09 4.900000 1.045589 1.730922 3.75e-09 2.06e-09 5.000000 1.068565 1.056480 4.40e-09 1.61e-09 ------------------------------------------------------ @@ -66,4 +66,4 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 1001, nstf = 100100 u error = 7.569e-09, v error = 3.238e-09, total error = 5.821e-09 - Total RHS evals: Fs = 5006, Ff = 301303 + Total RHS evals: Fs = 5006, Ff = 300350 diff --git a/examples/arkode/C_serial/ark_kpr_mri_7_0.001.out b/examples/arkode/C_serial/ark_kpr_mri_7_0.001.out index c635bf99a5..460bf53318 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_7_0.001.out +++ b/examples/arkode/C_serial/ark_kpr_mri_7_0.001.out @@ -66,7 +66,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 u error = 3.803e-10, v error = 3.943e-10, total error = 3.874e-10 - Total RHS evals: Fs = 45313, Ff = 1550001 + Total RHS evals: Fs = 45313, Ff = 1530050 Slow Newton iters = 30312 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/C_serial/ark_kpr_mri_7_0.001_-100_100_0.5_1.out b/examples/arkode/C_serial/ark_kpr_mri_7_0.001_-100_100_0.5_1.out index d70f3bcd8a..38dc23acf1 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_7_0.001_-100_100_0.5_1.out +++ b/examples/arkode/C_serial/ark_kpr_mri_7_0.001_-100_100_0.5_1.out @@ -27,7 +27,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 1.400000 1.041625 1.342455 1.95e-10 3.59e-10 1.500000 1.017531 1.642940 1.58e-10 3.46e-10 1.600000 0.992673 1.012112 1.21e-10 3.37e-10 - 1.700000 0.967253 1.714058 7.80e-11 3.14e-10 + 1.700000 0.967253 1.714058 7.81e-11 3.14e-10 1.800000 0.941488 1.183867 3.34e-11 2.95e-10 1.900000 0.915617 1.437465 1.78e-11 2.65e-10 2.000000 0.889903 1.577082 7.23e-11 2.30e-10 @@ -51,7 +51,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 3.800000 0.777506 1.004387 4.21e-10 6.69e-10 3.900000 0.798144 1.704019 3.62e-10 6.66e-10 4.000000 0.820474 1.214374 2.84e-10 6.45e-10 - 4.100000 0.844149 1.406358 3.44e-10 6.14e-10 + 4.100000 0.844149 1.406358 3.43e-10 6.14e-10 4.200000 0.868832 1.600774 1.51e-10 5.74e-10 4.300000 0.894204 1.038382 9.08e-11 5.56e-10 4.400000 0.919964 1.727533 4.15e-11 5.08e-10 @@ -66,7 +66,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 u error = 3.764e-10, v error = 3.952e-10, total error = 3.859e-10 - Total RHS evals: Fs = 35313, Ff = 1550001 + Total RHS evals: Fs = 35313, Ff = 1530050 Slow Newton iters = 30312 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/C_serial/ark_kpr_mri_8_0.001.out b/examples/arkode/C_serial/ark_kpr_mri_8_0.001.out index 094d1b1024..f96e203514 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_8_0.001.out +++ b/examples/arkode/C_serial/ark_kpr_mri_8_0.001.out @@ -25,17 +25,17 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 1.200000 1.086821 1.677552 1.17e-10 1.57e-10 1.300000 1.064777 1.277775 1.10e-10 1.55e-10 1.400000 1.041625 1.342455 9.08e-11 1.53e-10 - 1.500000 1.017531 1.642940 6.97e-11 1.52e-10 + 1.500000 1.017531 1.642940 6.96e-11 1.52e-10 1.600000 0.992673 1.012112 5.33e-11 1.42e-10 1.700000 0.967253 1.714058 3.20e-11 1.38e-10 1.800000 0.941488 1.183867 1.63e-11 1.24e-10 1.900000 0.915617 1.437465 1.06e-11 1.13e-10 2.000000 0.889903 1.577082 3.61e-11 9.93e-11 2.100000 0.864625 1.056467 6.56e-11 7.88e-11 - 2.200000 0.840089 1.730920 9.96e-11 6.38e-11 + 2.200000 0.840089 1.730920 9.97e-11 6.38e-11 2.300000 0.816616 1.101047 1.27e-10 3.80e-11 2.400000 0.794546 1.525051 1.59e-10 1.69e-11 - 2.500000 0.774227 1.496993 1.88e-10 9.37e-12 + 2.500000 0.774227 1.496993 1.88e-10 9.36e-12 2.600000 0.756013 1.126857 2.24e-10 3.98e-11 2.700000 0.740246 1.727536 2.59e-10 6.53e-11 2.800000 0.727247 1.038393 2.83e-10 1.00e-10 @@ -52,12 +52,12 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 3.900000 0.798144 1.704019 1.58e-10 2.78e-10 4.000000 0.820474 1.214374 1.33e-10 2.73e-10 4.100000 0.844149 1.406358 9.74e-11 2.68e-10 - 4.200000 0.868832 1.600774 6.65e-11 2.60e-10 + 4.200000 0.868832 1.600774 6.64e-11 2.60e-10 4.300000 0.894204 1.038382 3.79e-11 2.21e-10 - 4.400000 0.919964 1.727533 9.38e-12 2.25e-10 + 4.400000 0.919964 1.727533 9.36e-12 2.25e-10 4.500000 0.945834 1.126875 1.03e-11 1.82e-10 4.600000 0.971557 1.496974 3.35e-11 1.74e-10 - 4.700000 0.996898 1.525070 5.02e-11 1.52e-10 + 4.700000 0.996898 1.525070 5.03e-11 1.52e-10 4.800000 1.021641 1.101030 7.16e-11 1.11e-10 4.900000 1.045589 1.730922 9.30e-11 1.12e-10 5.000000 1.068565 1.056480 1.05e-10 6.39e-11 @@ -66,7 +66,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 u error = 1.795e-10, v error = 1.678e-10, total error = 1.737e-10 - Total RHS evals: Fse = 20001, Fsi = 50342, Ff = 1550001 + Total RHS evals: Fse = 20001, Fsi = 50342, Ff = 1530050 Slow Newton iters = 30341 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/C_serial/ark_kpr_mri_8_0.001_-100_100_0.5_1.out b/examples/arkode/C_serial/ark_kpr_mri_8_0.001_-100_100_0.5_1.out index 2d69932a6a..f9d68539de 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_8_0.001_-100_100_0.5_1.out +++ b/examples/arkode/C_serial/ark_kpr_mri_8_0.001_-100_100_0.5_1.out @@ -54,8 +54,8 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 4.100000 0.844149 1.406358 9.48e-11 2.67e-10 4.200000 0.868832 1.600774 6.42e-11 2.59e-10 4.300000 0.894204 1.038382 3.58e-11 2.20e-10 - 4.400000 0.919964 1.727533 9.15e-12 2.25e-10 - 4.500000 0.945834 1.126875 1.30e-11 1.82e-10 + 4.400000 0.919964 1.727533 9.16e-12 2.25e-10 + 4.500000 0.945834 1.126875 1.29e-11 1.82e-10 4.600000 0.971557 1.496974 3.55e-11 1.73e-10 4.700000 0.996898 1.525070 5.41e-11 1.52e-10 4.800000 1.021641 1.101030 7.39e-11 1.11e-10 @@ -66,7 +66,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 u error = 1.860e-10, v error = 1.672e-10, total error = 1.769e-10 - Total RHS evals: Fse = 20001, Fsi = 35342, Ff = 1550001 + Total RHS evals: Fse = 20001, Fsi = 35342, Ff = 1530050 Slow Newton iters = 30341 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/C_serial/ark_kpr_mri_9_0.001.out b/examples/arkode/C_serial/ark_kpr_mri_9_0.001.out index 0d0c029141..8da07cba27 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_9_0.001.out +++ b/examples/arkode/C_serial/ark_kpr_mri_9_0.001.out @@ -11,62 +11,62 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: t u v uerr verr ------------------------------------------------------ 0.000000 1.224745 1.732051 0.00e+00 0.00e+00 - 0.100000 1.223725 1.077464 1.63e-11 6.37e-13 + 0.100000 1.223725 1.077464 1.63e-11 6.38e-13 0.200000 1.220669 1.551800 1.60e-11 6.83e-13 0.300000 1.215594 1.467737 1.52e-11 9.61e-13 - 0.400000 1.208524 1.154583 1.51e-11 9.21e-13 - 0.500000 1.199496 1.721908 1.60e-11 1.72e-12 + 0.400000 1.208524 1.154583 1.51e-11 9.22e-13 + 0.500000 1.199496 1.721908 1.60e-11 1.73e-12 0.600000 1.188557 1.023517 1.48e-11 3.43e-12 0.700000 1.175764 1.622751 1.36e-11 2.17e-12 0.800000 1.161186 1.374632 1.23e-11 2.77e-12 - 0.900000 1.144904 1.245763 1.13e-11 3.12e-12 - 1.000000 1.127010 1.691839 1.30e-11 2.17e-12 - 1.100000 1.107609 1.000489 1.11e-11 1.99e-12 - 1.200000 1.086821 1.677552 9.53e-12 2.46e-12 - 1.300000 1.064777 1.277775 7.58e-12 8.15e-14 - 1.400000 1.041625 1.342455 5.18e-12 6.19e-13 - 1.500000 1.017531 1.642940 6.00e-12 2.62e-12 - 1.600000 0.992673 1.012112 3.78e-12 1.37e-12 - 1.700000 0.967253 1.714058 3.29e-12 3.05e-12 - 1.800000 0.941488 1.183867 2.33e-13 3.64e-13 - 1.900000 0.915617 1.437465 3.31e-12 1.16e-12 - 2.000000 0.889903 1.577082 6.58e-12 1.93e-12 - 2.100000 0.864625 1.056467 7.90e-12 1.61e-12 - 2.200000 0.840089 1.730920 6.75e-12 2.46e-12 - 2.300000 0.816616 1.101047 1.18e-11 1.79e-12 - 2.400000 0.794546 1.525051 1.53e-11 5.67e-13 - 2.500000 0.774227 1.496993 1.85e-11 6.68e-14 - 2.600000 0.756013 1.126857 2.18e-11 2.74e-12 - 2.700000 0.740246 1.727536 2.05e-11 7.31e-13 - 2.800000 0.727247 1.038393 2.46e-11 4.05e-12 - 2.900000 0.717301 1.600759 2.68e-11 9.31e-13 - 3.000000 0.710636 1.406380 2.78e-11 2.59e-12 - 3.100000 0.707412 1.214353 2.85e-11 4.24e-12 - 3.200000 0.707709 1.704026 2.85e-11 1.49e-12 - 3.300000 0.711520 1.004391 2.77e-11 6.31e-12 - 3.400000 0.718750 1.661225 2.60e-11 2.42e-12 - 3.500000 0.729227 1.310102 2.41e-11 4.83e-12 - 3.600000 0.742712 1.310080 2.08e-11 5.02e-12 - 3.700000 0.758914 1.661237 1.99e-11 2.84e-12 - 3.800000 0.777506 1.004387 1.62e-11 7.00e-12 - 3.900000 0.798144 1.704019 1.39e-11 2.46e-12 - 4.000000 0.820474 1.214374 1.04e-11 5.40e-12 - 4.100000 0.844149 1.406358 6.45e-12 8.29e-12 - 4.200000 0.868832 1.600774 3.62e-12 1.13e-11 - 4.300000 0.894204 1.038382 1.62e-12 2.54e-13 - 4.400000 0.919964 1.727533 2.31e-12 1.24e-11 - 4.500000 0.945834 1.126875 2.27e-12 7.51e-13 - 4.600000 0.971557 1.496974 5.17e-12 6.90e-12 - 4.700000 0.996898 1.525070 8.51e-12 6.90e-12 - 4.800000 1.021641 1.101030 8.53e-12 1.57e-12 - 4.900000 1.045589 1.730922 6.09e-12 9.55e-12 - 5.000000 1.068565 1.056480 9.98e-12 3.37e-12 + 0.900000 1.144904 1.245763 1.12e-11 3.13e-12 + 1.000000 1.127010 1.691839 1.31e-11 2.17e-12 + 1.100000 1.107609 1.000489 1.11e-11 2.12e-12 + 1.200000 1.086821 1.677552 9.50e-12 1.93e-12 + 1.300000 1.064777 1.277775 7.58e-12 1.91e-12 + 1.400000 1.041625 1.342455 5.18e-12 2.57e-12 + 1.500000 1.017531 1.642940 6.04e-12 5.82e-12 + 1.600000 0.992673 1.012112 3.77e-12 3.35e-12 + 1.700000 0.967253 1.714058 3.32e-12 2.74e-12 + 1.800000 0.941488 1.183867 2.38e-13 3.75e-12 + 1.900000 0.915617 1.437465 3.30e-12 5.77e-12 + 2.000000 0.889903 1.577082 6.57e-12 8.88e-12 + 2.100000 0.864625 1.056467 7.88e-12 7.37e-12 + 2.200000 0.840089 1.730920 6.75e-12 4.53e-12 + 2.300000 0.816616 1.101047 1.18e-11 3.00e-12 + 2.400000 0.794546 1.525051 1.53e-11 8.93e-12 + 2.500000 0.774227 1.496993 1.85e-11 1.08e-11 + 2.600000 0.756013 1.126857 2.18e-11 1.35e-11 + 2.700000 0.740246 1.727536 2.05e-11 6.87e-12 + 2.800000 0.727247 1.038393 2.46e-11 7.76e-13 + 2.900000 0.717301 1.600759 2.68e-11 1.11e-11 + 3.000000 0.710636 1.406380 2.78e-11 1.14e-11 + 3.100000 0.707412 1.214353 2.85e-11 2.04e-11 + 3.200000 0.707709 1.704026 2.85e-11 9.74e-12 + 3.300000 0.711520 1.004391 2.77e-11 7.12e-12 + 3.400000 0.718750 1.661225 2.60e-11 1.06e-11 + 3.500000 0.729227 1.310102 2.41e-11 1.14e-11 + 3.600000 0.742712 1.310080 2.08e-11 2.60e-11 + 3.700000 0.758914 1.661237 1.99e-11 1.39e-11 + 3.800000 0.777506 1.004387 1.62e-11 1.43e-11 + 3.900000 0.798144 1.704019 1.39e-11 5.96e-12 + 4.000000 0.820474 1.214374 1.04e-11 1.12e-11 + 4.100000 0.844149 1.406358 6.45e-12 2.95e-11 + 4.200000 0.868832 1.600774 3.65e-12 5.01e-12 + 4.300000 0.894204 1.038382 1.63e-12 9.96e-12 + 4.400000 0.919964 1.727533 2.33e-12 1.06e-11 + 4.500000 0.945834 1.126875 2.28e-12 5.45e-12 + 4.600000 0.971557 1.496974 5.15e-12 1.52e-11 + 4.700000 0.996898 1.525070 8.52e-12 7.66e-13 + 4.800000 1.021641 1.101030 8.55e-12 1.92e-12 + 4.900000 1.045589 1.730922 6.11e-12 8.80e-12 + 5.000000 1.068565 1.056480 9.97e-12 3.37e-12 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 - u error = 1.532e-11, v error = 4.194e-12, total error = 1.123e-11 - Total RHS evals: Fse = 30001, Fsi = 82555, Ff = 2070001 + u error = 1.532e-11, v error = 9.496e-12, total error = 1.274e-11 + Total RHS evals: Fse = 30001, Fsi = 82555, Ff = 2040050 Slow Newton iters = 52554 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/C_serial/ark_kpr_mri_9_0.001_-100_100_0.5_1.out b/examples/arkode/C_serial/ark_kpr_mri_9_0.001_-100_100_0.5_1.out index 3ca62f46fd..a227a0db6a 100644 --- a/examples/arkode/C_serial/ark_kpr_mri_9_0.001_-100_100_0.5_1.out +++ b/examples/arkode/C_serial/ark_kpr_mri_9_0.001_-100_100_0.5_1.out @@ -11,7 +11,7 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: t u v uerr verr ------------------------------------------------------ 0.000000 1.224745 1.732051 0.00e+00 0.00e+00 - 0.100000 1.223725 1.077464 1.63e-11 6.37e-13 + 0.100000 1.223725 1.077464 1.64e-11 6.38e-13 0.200000 1.220669 1.551800 1.61e-11 6.85e-13 0.300000 1.215594 1.467737 1.58e-11 9.70e-13 0.400000 1.208524 1.154583 1.55e-11 9.37e-13 @@ -19,54 +19,54 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: 0.600000 1.188557 1.023517 1.50e-11 3.45e-12 0.700000 1.175764 1.622751 1.40e-11 2.20e-12 0.800000 1.161186 1.374632 1.20e-11 2.83e-12 - 0.900000 1.144904 1.245763 1.22e-11 3.18e-12 + 0.900000 1.144904 1.245763 1.23e-11 3.18e-12 1.000000 1.127010 1.691839 1.28e-11 2.23e-12 - 1.100000 1.107609 1.000489 1.13e-11 1.92e-12 - 1.200000 1.086821 1.677552 9.93e-12 2.55e-12 - 1.300000 1.064777 1.277775 7.67e-12 1.72e-13 - 1.400000 1.041625 1.342455 6.64e-12 7.05e-13 - 1.500000 1.017531 1.642940 6.42e-12 2.73e-12 - 1.600000 0.992673 1.012112 4.49e-12 1.25e-12 - 1.700000 0.967253 1.714058 3.11e-12 3.19e-12 - 1.800000 0.941488 1.183867 5.46e-14 2.23e-13 - 1.900000 0.915617 1.437465 1.89e-12 1.29e-12 - 2.000000 0.889903 1.577082 4.66e-12 2.09e-12 - 2.100000 0.864625 1.056467 6.54e-12 1.44e-12 - 2.200000 0.840089 1.730920 7.40e-12 2.63e-12 - 2.300000 0.816616 1.101047 1.16e-11 1.62e-12 - 2.400000 0.794546 1.525051 1.48e-11 7.29e-13 - 2.500000 0.774227 1.496993 1.92e-11 2.39e-13 - 2.600000 0.756013 1.126857 2.04e-11 2.58e-12 - 2.700000 0.740246 1.727536 2.11e-11 8.85e-13 - 2.800000 0.727247 1.038393 2.44e-11 3.90e-12 - 2.900000 0.717301 1.600759 2.66e-11 7.90e-13 - 3.000000 0.710636 1.406380 2.78e-11 2.46e-12 - 3.100000 0.707412 1.214353 2.84e-11 4.12e-12 - 3.200000 0.707709 1.704026 2.84e-11 1.38e-12 - 3.300000 0.711520 1.004391 2.77e-11 6.21e-12 - 3.400000 0.718750 1.661225 2.61e-11 2.34e-12 - 3.500000 0.729227 1.310102 2.42e-11 4.77e-12 - 3.600000 0.742712 1.310080 2.16e-11 4.95e-12 - 3.700000 0.758914 1.661237 1.99e-11 2.79e-12 - 3.800000 0.777506 1.004387 1.67e-11 6.97e-12 - 3.900000 0.798144 1.704019 1.39e-11 2.45e-12 - 4.000000 0.820474 1.214374 1.05e-11 5.41e-12 - 4.100000 0.844149 1.406358 7.58e-12 8.30e-12 - 4.200000 0.868832 1.600774 5.05e-12 1.14e-11 - 4.300000 0.894204 1.038382 2.82e-12 3.26e-13 - 4.400000 0.919964 1.727533 1.81e-12 1.24e-11 - 4.500000 0.945834 1.126875 1.90e-12 8.41e-13 - 4.600000 0.971557 1.496974 3.74e-12 6.99e-12 - 4.700000 0.996898 1.525070 5.90e-12 7.03e-12 - 4.800000 1.021641 1.101030 7.15e-12 1.43e-12 - 4.900000 1.045589 1.730922 6.82e-12 9.68e-12 - 5.000000 1.068565 1.056480 9.36e-12 3.23e-12 + 1.100000 1.107609 1.000489 1.13e-11 2.05e-12 + 1.200000 1.086821 1.677552 9.92e-12 2.03e-12 + 1.300000 1.064777 1.277775 7.66e-12 2.00e-12 + 1.400000 1.041625 1.342455 6.65e-12 2.48e-12 + 1.500000 1.017531 1.642940 6.42e-12 5.92e-12 + 1.600000 0.992673 1.012112 4.49e-12 3.23e-12 + 1.700000 0.967253 1.714058 3.11e-12 2.87e-12 + 1.800000 0.941488 1.183867 5.85e-14 3.89e-12 + 1.900000 0.915617 1.437465 1.88e-12 5.63e-12 + 2.000000 0.889903 1.577082 4.65e-12 9.04e-12 + 2.100000 0.864625 1.056467 6.53e-12 7.20e-12 + 2.200000 0.840089 1.730920 7.39e-12 4.70e-12 + 2.300000 0.816616 1.101047 1.16e-11 3.16e-12 + 2.400000 0.794546 1.525051 1.48e-11 8.77e-12 + 2.500000 0.774227 1.496993 1.92e-11 1.10e-11 + 2.600000 0.756013 1.126857 2.04e-11 1.34e-11 + 2.700000 0.740246 1.727536 2.11e-11 7.02e-12 + 2.800000 0.727247 1.038393 2.44e-11 6.36e-13 + 2.900000 0.717301 1.600759 2.66e-11 1.09e-11 + 3.000000 0.710636 1.406380 2.78e-11 1.16e-11 + 3.100000 0.707412 1.214353 2.84e-11 2.03e-11 + 3.200000 0.707709 1.704026 2.84e-11 9.85e-12 + 3.300000 0.711520 1.004391 2.77e-11 7.02e-12 + 3.400000 0.718750 1.661225 2.61e-11 1.05e-11 + 3.500000 0.729227 1.310102 2.42e-11 1.14e-11 + 3.600000 0.742712 1.310080 2.16e-11 2.60e-11 + 3.700000 0.758914 1.661237 1.99e-11 1.39e-11 + 3.800000 0.777506 1.004387 1.67e-11 1.43e-11 + 3.900000 0.798144 1.704019 1.39e-11 5.96e-12 + 4.000000 0.820474 1.214374 1.05e-11 1.12e-11 + 4.100000 0.844149 1.406358 7.58e-12 2.96e-11 + 4.200000 0.868832 1.600774 5.04e-12 4.97e-12 + 4.300000 0.894204 1.038382 2.82e-12 1.00e-11 + 4.400000 0.919964 1.727533 1.81e-12 1.06e-11 + 4.500000 0.945834 1.126875 1.89e-12 5.36e-12 + 4.600000 0.971557 1.496974 3.73e-12 1.53e-11 + 4.700000 0.996898 1.525070 5.90e-12 8.98e-13 + 4.800000 1.021641 1.101030 7.16e-12 2.06e-12 + 4.900000 1.045589 1.730922 6.81e-12 8.94e-12 + 5.000000 1.068565 1.056480 9.34e-12 3.23e-12 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 - u error = 1.533e-11, v error = 4.203e-12, total error = 1.124e-11 - Total RHS evals: Fse = 30001, Fsi = 57555, Ff = 2070001 + u error = 1.533e-11, v error = 9.500e-12, total error = 1.275e-11 + Total RHS evals: Fse = 30001, Fsi = 57555, Ff = 2040050 Slow Newton iters = 52554 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/C_serial/ark_onewaycouple_mri.out b/examples/arkode/C_serial/ark_onewaycouple_mri.out index 99d72a08ca..3769f0e775 100644 --- a/examples/arkode/C_serial/ark_onewaycouple_mri.out +++ b/examples/arkode/C_serial/ark_onewaycouple_mri.out @@ -20,4 +20,4 @@ One way coupling ODE test problem: Final Solver Statistics: Steps: nsts = 1000, nstf = 12000 - Total RHS evals: Fs = 3001, Ff = 49002 + Total RHS evals: Fs = 3001, Ff = 36010 diff --git a/examples/arkode/C_serial/ark_reaction_diffusion_mri.out b/examples/arkode/C_serial/ark_reaction_diffusion_mri.out index 52fcbe0fad..f8cd47dfdc 100644 --- a/examples/arkode/C_serial/ark_reaction_diffusion_mri.out +++ b/examples/arkode/C_serial/ark_reaction_diffusion_mri.out @@ -68,7 +68,7 @@ Inequality constraint fails = 0 Initial step size = 2e-05 Last step size = 9.999999998289147e-06 Current step size = 2e-05 -Explicit RHS fn evals = 615207 +Explicit RHS fn evals = 459183 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 diff --git a/examples/arkode/C_serial/ark_robertson.out b/examples/arkode/C_serial/ark_robertson.out index 1aea595ee5..f4774b096c 100644 --- a/examples/arkode/C_serial/ark_robertson.out +++ b/examples/arkode/C_serial/ark_robertson.out @@ -4,127 +4,127 @@ Robertson ODE test problem: t u v w -------------------------------------------------- 0.000e+00 1.00000e+00 0.00000e+00 0.00000e+00 - 1.000e+09 2.08324e-06 8.34276e-12 9.99998e-01 - 2.000e+09 1.04164e-06 4.17283e-12 9.99999e-01 - 3.000e+09 6.94437e-07 2.78375e-12 9.99999e-01 - 4.000e+09 5.20830e-07 2.05394e-12 9.99999e-01 - 5.000e+09 4.16667e-07 1.66756e-12 1.00000e+00 - 6.000e+09 3.47220e-07 1.38545e-12 1.00000e+00 - 7.000e+09 2.97617e-07 1.17655e-12 1.00000e+00 - 8.000e+09 2.60409e-07 1.02537e-12 1.00000e+00 - 9.000e+09 2.31480e-07 9.41190e-13 1.00000e+00 - 1.000e+10 2.08335e-07 8.36764e-13 1.00000e+00 - 1.100e+10 1.89395e-07 7.64332e-13 1.00000e+00 - 1.200e+10 1.73606e-07 6.70149e-13 1.00000e+00 - 1.300e+10 1.60258e-07 6.41057e-13 1.00000e+00 - 1.400e+10 1.48808e-07 6.17193e-13 1.00000e+00 - 1.500e+10 1.38890e-07 5.48220e-13 1.00000e+00 - 1.600e+10 1.30203e-07 4.86507e-13 1.00000e+00 - 1.700e+10 1.22547e-07 4.67931e-13 1.00000e+00 - 1.800e+10 1.15742e-07 4.70245e-13 1.00000e+00 - 1.900e+10 1.09647e-07 4.55585e-13 1.00000e+00 - 2.000e+10 1.04167e-07 4.24475e-13 1.00000e+00 - 2.100e+10 9.92072e-08 3.90746e-13 1.00000e+00 - 2.200e+10 9.46966e-08 3.68978e-13 1.00000e+00 - 2.300e+10 9.05806e-08 3.58503e-13 1.00000e+00 - 2.400e+10 8.68057e-08 3.53926e-13 1.00000e+00 - 2.500e+10 8.33309e-08 3.44650e-13 1.00000e+00 - 2.600e+10 8.01259e-08 3.30901e-13 1.00000e+00 - 2.700e+10 7.71607e-08 3.13931e-13 1.00000e+00 - 2.800e+10 7.44057e-08 2.95253e-13 1.00000e+00 - 2.900e+10 7.18388e-08 2.78961e-13 1.00000e+00 - 3.000e+10 6.94438e-08 2.67061e-13 1.00000e+00 - 3.100e+10 6.72046e-08 2.60762e-13 1.00000e+00 - 3.200e+10 6.51052e-08 2.61201e-13 1.00000e+00 - 3.300e+10 6.31308e-08 2.61658e-13 1.00000e+00 - 3.400e+10 6.12720e-08 2.57843e-13 1.00000e+00 - 3.500e+10 5.95204e-08 2.50778e-13 1.00000e+00 - 3.600e+10 5.78677e-08 2.41487e-13 1.00000e+00 - 3.700e+10 5.63054e-08 2.30992e-13 1.00000e+00 - 3.800e+10 5.48254e-08 2.20317e-13 1.00000e+00 - 3.900e+10 5.34196e-08 2.10724e-13 1.00000e+00 - 4.000e+10 5.20833e-08 2.03599e-13 1.00000e+00 - 4.100e+10 5.08123e-08 1.98476e-13 1.00000e+00 - 4.200e+10 4.96023e-08 1.94720e-13 1.00000e+00 - 4.300e+10 4.84493e-08 1.91698e-13 1.00000e+00 - 4.400e+10 4.73490e-08 1.88774e-13 1.00000e+00 - 4.500e+10 4.62972e-08 1.85299e-13 1.00000e+00 - 4.600e+10 4.52907e-08 1.78904e-13 1.00000e+00 - 4.700e+10 4.43271e-08 1.74761e-13 1.00000e+00 - 4.800e+10 4.34036e-08 1.75489e-13 1.00000e+00 - 4.900e+10 4.25178e-08 1.67760e-13 1.00000e+00 - 5.000e+10 4.16674e-08 1.68504e-13 1.00000e+00 - 5.100e+10 4.08503e-08 1.72673e-13 1.00000e+00 - 5.200e+10 4.00645e-08 1.71906e-13 1.00000e+00 - 5.300e+10 3.93085e-08 1.67608e-13 1.00000e+00 - 5.400e+10 3.85807e-08 1.61181e-13 1.00000e+00 - 5.500e+10 3.78794e-08 1.54027e-13 1.00000e+00 - 5.600e+10 3.72030e-08 1.47521e-13 1.00000e+00 - 5.700e+10 3.65500e-08 1.42263e-13 1.00000e+00 - 5.800e+10 3.59194e-08 1.38124e-13 1.00000e+00 - 5.900e+10 3.53102e-08 1.34960e-13 1.00000e+00 - 6.000e+10 3.47215e-08 1.32628e-13 1.00000e+00 - 6.100e+10 3.41523e-08 1.30983e-13 1.00000e+00 - 6.200e+10 3.36017e-08 1.29882e-13 1.00000e+00 - 6.300e+10 3.30688e-08 1.29180e-13 1.00000e+00 - 6.400e+10 3.25525e-08 1.28734e-13 1.00000e+00 - 6.500e+10 3.20519e-08 1.28399e-13 1.00000e+00 - 6.600e+10 3.15661e-08 1.28511e-13 1.00000e+00 - 6.700e+10 3.10945e-08 1.29667e-13 1.00000e+00 - 6.800e+10 3.06366e-08 1.31575e-13 1.00000e+00 - 6.900e+10 3.01919e-08 1.33923e-13 1.00000e+00 - 7.000e+10 2.97600e-08 1.36404e-13 1.00000e+00 - 7.100e+10 2.93405e-08 1.38706e-13 1.00000e+00 - 7.200e+10 2.89328e-08 1.40520e-13 1.00000e+00 - 7.300e+10 2.85365e-08 1.41536e-13 1.00000e+00 - 7.400e+10 2.81511e-08 1.41445e-13 1.00000e+00 - 7.500e+10 2.77762e-08 1.39937e-13 1.00000e+00 - 7.600e+10 2.74113e-08 1.36702e-13 1.00000e+00 - 7.700e+10 2.70559e-08 1.31431e-13 1.00000e+00 - 7.800e+10 2.67096e-08 1.23813e-13 1.00000e+00 - 7.900e+10 2.63719e-08 1.13538e-13 1.00000e+00 - 8.000e+10 2.60423e-08 1.00933e-13 1.00000e+00 - 8.100e+10 2.57208e-08 9.31863e-14 1.00000e+00 - 8.200e+10 2.54071e-08 9.21249e-14 1.00000e+00 - 8.300e+10 2.51010e-08 9.73996e-14 1.00000e+00 - 8.400e+10 2.48022e-08 1.03740e-13 1.00000e+00 - 8.500e+10 2.45104e-08 1.01400e-13 1.00000e+00 - 8.600e+10 2.42254e-08 9.65651e-14 1.00000e+00 - 8.700e+10 2.39469e-08 9.61320e-14 1.00000e+00 - 8.800e+10 2.36747e-08 9.68559e-14 1.00000e+00 - 8.900e+10 2.34087e-08 9.44562e-14 1.00000e+00 - 9.000e+10 2.31485e-08 9.00151e-14 1.00000e+00 - 9.100e+10 2.28941e-08 8.46151e-14 1.00000e+00 - 9.200e+10 2.26453e-08 7.93387e-14 1.00000e+00 - 9.300e+10 2.24018e-08 7.52684e-14 1.00000e+00 - 9.400e+10 2.21635e-08 7.34866e-14 1.00000e+00 - 9.500e+10 2.19303e-08 7.50757e-14 1.00000e+00 - 9.600e+10 2.17019e-08 8.11182e-14 1.00000e+00 - 9.700e+10 2.14781e-08 9.01508e-14 1.00000e+00 - 9.800e+10 2.12589e-08 9.22475e-14 1.00000e+00 - 9.900e+10 2.10442e-08 8.92813e-14 1.00000e+00 - 1.000e+11 2.08338e-08 8.47365e-14 1.00000e+00 + 1.000e+09 2.08319e-06 8.28673e-12 9.99998e-01 + 2.000e+09 1.04165e-06 4.16315e-12 9.99999e-01 + 3.000e+09 6.94436e-07 2.79812e-12 9.99999e-01 + 4.000e+09 5.20822e-07 2.09671e-12 9.99999e-01 + 5.000e+09 4.16653e-07 1.65358e-12 1.00000e+00 + 6.000e+09 3.47215e-07 1.38790e-12 1.00000e+00 + 7.000e+09 2.97617e-07 1.19569e-12 1.00000e+00 + 8.000e+09 2.60418e-07 1.03823e-12 1.00000e+00 + 9.000e+09 2.31478e-07 9.17074e-13 1.00000e+00 + 1.000e+10 2.08331e-07 8.40189e-13 1.00000e+00 + 1.100e+10 1.89393e-07 7.61696e-13 1.00000e+00 + 1.200e+10 1.73605e-07 6.83245e-13 1.00000e+00 + 1.300e+10 1.60257e-07 6.52283e-13 1.00000e+00 + 1.400e+10 1.48808e-07 6.03096e-13 1.00000e+00 + 1.500e+10 1.38890e-07 5.53757e-13 1.00000e+00 + 1.600e+10 1.30208e-07 5.02107e-13 1.00000e+00 + 1.700e+10 1.22550e-07 5.05848e-13 1.00000e+00 + 1.800e+10 1.15741e-07 4.81445e-13 1.00000e+00 + 1.900e+10 1.09650e-07 4.30685e-13 1.00000e+00 + 2.000e+10 1.04164e-07 4.00365e-13 1.00000e+00 + 2.100e+10 9.92051e-08 3.87356e-13 1.00000e+00 + 2.200e+10 9.46982e-08 3.79643e-13 1.00000e+00 + 2.300e+10 9.05793e-08 3.59181e-13 1.00000e+00 + 2.400e+10 8.68052e-08 3.35291e-13 1.00000e+00 + 2.500e+10 8.33344e-08 3.30550e-13 1.00000e+00 + 2.600e+10 8.01274e-08 3.33613e-13 1.00000e+00 + 2.700e+10 7.71569e-08 3.13668e-13 1.00000e+00 + 2.800e+10 7.44011e-08 2.86383e-13 1.00000e+00 + 2.900e+10 7.18380e-08 2.67839e-13 1.00000e+00 + 3.000e+10 6.94456e-08 2.74115e-13 1.00000e+00 + 3.100e+10 6.72046e-08 2.89954e-13 1.00000e+00 + 3.200e+10 6.51032e-08 2.82625e-13 1.00000e+00 + 3.300e+10 6.31303e-08 2.63498e-13 1.00000e+00 + 3.400e+10 6.12746e-08 2.44356e-13 1.00000e+00 + 3.500e+10 5.95249e-08 2.36979e-13 1.00000e+00 + 3.600e+10 5.78710e-08 2.38699e-13 1.00000e+00 + 3.700e+10 5.63063e-08 2.34238e-13 1.00000e+00 + 3.800e+10 5.48245e-08 2.25989e-13 1.00000e+00 + 3.900e+10 5.34192e-08 2.16535e-13 1.00000e+00 + 4.000e+10 5.20842e-08 2.08459e-13 1.00000e+00 + 4.100e+10 5.08134e-08 2.01687e-13 1.00000e+00 + 4.200e+10 4.96024e-08 1.93815e-13 1.00000e+00 + 4.300e+10 4.84479e-08 1.85739e-13 1.00000e+00 + 4.400e+10 4.73465e-08 1.78395e-13 1.00000e+00 + 4.500e+10 4.62947e-08 1.72720e-13 1.00000e+00 + 4.600e+10 4.52893e-08 1.69648e-13 1.00000e+00 + 4.700e+10 4.43267e-08 1.70114e-13 1.00000e+00 + 4.800e+10 4.34036e-08 1.74964e-13 1.00000e+00 + 4.900e+10 4.25175e-08 1.78828e-13 1.00000e+00 + 5.000e+10 4.16666e-08 1.78796e-13 1.00000e+00 + 5.100e+10 4.08492e-08 1.75793e-13 1.00000e+00 + 5.200e+10 4.00636e-08 1.70743e-13 1.00000e+00 + 5.300e+10 3.93079e-08 1.64571e-13 1.00000e+00 + 5.400e+10 3.85805e-08 1.58202e-13 1.00000e+00 + 5.500e+10 3.78794e-08 1.52559e-13 1.00000e+00 + 5.600e+10 3.72031e-08 1.48433e-13 1.00000e+00 + 5.700e+10 3.65504e-08 1.45182e-13 1.00000e+00 + 5.800e+10 3.59202e-08 1.42852e-13 1.00000e+00 + 5.900e+10 3.53114e-08 1.42011e-13 1.00000e+00 + 6.000e+10 3.47228e-08 1.43770e-13 1.00000e+00 + 6.100e+10 3.41536e-08 1.42505e-13 1.00000e+00 + 6.200e+10 3.36028e-08 1.31615e-13 1.00000e+00 + 6.300e+10 3.30693e-08 1.21361e-13 1.00000e+00 + 6.400e+10 3.25524e-08 1.16679e-13 1.00000e+00 + 6.500e+10 3.20514e-08 1.16007e-13 1.00000e+00 + 6.600e+10 3.15658e-08 1.17783e-13 1.00000e+00 + 6.700e+10 3.10947e-08 1.20445e-13 1.00000e+00 + 6.800e+10 3.06376e-08 1.22430e-13 1.00000e+00 + 6.900e+10 3.01937e-08 1.22179e-13 1.00000e+00 + 7.000e+10 2.97624e-08 1.18554e-13 1.00000e+00 + 7.100e+10 2.93432e-08 1.19564e-13 1.00000e+00 + 7.200e+10 2.89357e-08 1.20819e-13 1.00000e+00 + 7.300e+10 2.85393e-08 1.12238e-13 1.00000e+00 + 7.400e+10 2.81536e-08 1.08409e-13 1.00000e+00 + 7.500e+10 2.77782e-08 1.11242e-13 1.00000e+00 + 7.600e+10 2.74127e-08 1.08952e-13 1.00000e+00 + 7.700e+10 2.70567e-08 1.02106e-13 1.00000e+00 + 7.800e+10 2.67098e-08 1.03189e-13 1.00000e+00 + 7.900e+10 2.63717e-08 1.10597e-13 1.00000e+00 + 8.000e+10 2.60421e-08 1.05448e-13 1.00000e+00 + 8.100e+10 2.57206e-08 1.03702e-13 1.00000e+00 + 8.200e+10 2.54069e-08 1.04168e-13 1.00000e+00 + 8.300e+10 2.51008e-08 1.00603e-13 1.00000e+00 + 8.400e+10 2.48020e-08 9.77251e-14 1.00000e+00 + 8.500e+10 2.45102e-08 9.82338e-14 1.00000e+00 + 8.600e+10 2.42252e-08 9.64282e-14 1.00000e+00 + 8.700e+10 2.39467e-08 9.59624e-14 1.00000e+00 + 8.800e+10 2.36746e-08 9.45243e-14 1.00000e+00 + 8.900e+10 2.34086e-08 9.10474e-14 1.00000e+00 + 9.000e+10 2.31485e-08 9.02954e-14 1.00000e+00 + 9.100e+10 2.28941e-08 9.57143e-14 1.00000e+00 + 9.200e+10 2.26452e-08 1.00341e-13 1.00000e+00 + 9.300e+10 2.24017e-08 1.03006e-13 1.00000e+00 + 9.400e+10 2.21634e-08 1.03573e-13 1.00000e+00 + 9.500e+10 2.19301e-08 1.01905e-13 1.00000e+00 + 9.600e+10 2.17016e-08 9.78643e-14 1.00000e+00 + 9.700e+10 2.14779e-08 9.13138e-14 1.00000e+00 + 9.800e+10 2.12588e-08 8.23720e-14 1.00000e+00 + 9.900e+10 2.10440e-08 7.45584e-14 1.00000e+00 + 1.000e+11 2.08334e-08 6.88517e-14 1.00000e+00 -------------------------------------------------- Final Statistics: -Current time = 100509725868.0247 -Steps = 990 -Step attempts = 1170 +Current time = 115949571244.6344 +Steps = 740 +Step attempts = 784 Stability limited steps = 0 -Accuracy limited steps = 1167 -Error test fails = 177 -NLS step fails = 3 +Accuracy limited steps = 779 +Error test fails = 39 +NLS step fails = 5 Inequality constraint fails = 0 Initial step size = 1e-08 -Last step size = 4072648616.470474 -Current step size = 4072648616.470474 +Last step size = 18264803707.2694 +Current step size = 18264803707.2694 Explicit RHS fn evals = 0 -Implicit RHS fn evals = 33161 -NLS iters = 27313 +Implicit RHS fn evals = 25084 +NLS iters = 21171 NLS fails = 46 -NLS iters per step = 27.58888888888889 -LS setups = 517 -Jac fn evals = 56 +NLS iters per step = 28.60945945945946 +LS setups = 208 +Jac fn evals = 52 LS RHS fn evals = 0 Prec setup evals = 0 Prec solves = 0 @@ -133,5 +133,5 @@ LS fails = 0 Jac-times setups = 0 Jac-times evals = 0 LS iters per NLS iter = 0 -Jac evals per NLS iter = 0.002050305715227181 +Jac evals per NLS iter = 0.002456190071323981 Prec evals per NLS iter = 0 diff --git a/examples/arkode/C_serial/ark_robertson_constraints.out b/examples/arkode/C_serial/ark_robertson_constraints.out index e28ffe18c9..a5abcd3dfd 100644 --- a/examples/arkode/C_serial/ark_robertson_constraints.out +++ b/examples/arkode/C_serial/ark_robertson_constraints.out @@ -4,116 +4,116 @@ Robertson ODE test problem: t u v w -------------------------------------------------- 0.000e+00 1.00000e+00 0.00000e+00 0.00000e+00 - 1.000e+09 2.07857e-06 -1.09385e-10 9.99998e-01 - 2.000e+09 1.04202e-06 4.21741e-12 9.99999e-01 - 3.000e+09 6.94597e-07 2.66732e-12 9.99999e-01 - 4.000e+09 5.20918e-07 2.08504e-12 9.99999e-01 - 5.000e+09 4.16721e-07 1.50113e-12 1.00000e+00 - 6.000e+09 3.47261e-07 3.09313e-12 1.00000e+00 - 7.000e+09 2.97649e-07 1.12013e-12 1.00000e+00 - 8.000e+09 2.60438e-07 1.30410e-12 1.00000e+00 - 9.000e+09 2.31501e-07 6.01213e-15 1.00000e+00 - 1.000e+10 2.08348e-07 8.07940e-13 1.00000e+00 - 1.100e+10 1.89407e-07 5.27220e-13 1.00000e+00 - 1.200e+10 1.73622e-07 5.67013e-13 1.00000e+00 - 1.300e+10 1.60265e-07 6.62046e-13 1.00000e+00 - 1.400e+10 1.48820e-07 -1.96317e-12 1.00000e+00 - 1.500e+10 1.38895e-07 1.17103e-12 1.00000e+00 - 1.600e+10 1.30214e-07 3.98260e-13 1.00000e+00 - 1.700e+10 1.22554e-07 6.36369e-13 1.00000e+00 - 1.800e+10 1.15747e-07 -6.66047e-13 1.00000e+00 - 1.900e+10 1.09653e-07 4.39347e-13 1.00000e+00 - 2.000e+10 1.04171e-07 3.61443e-13 1.00000e+00 - 2.100e+10 9.92098e-08 5.00251e-13 1.00000e+00 - 2.200e+10 9.47001e-08 4.91884e-13 1.00000e+00 - 2.300e+10 9.05822e-08 8.71476e-13 1.00000e+00 - 2.400e+10 8.68083e-08 3.63347e-13 1.00000e+00 - 2.500e+10 8.33363e-08 -4.58969e-15 1.00000e+00 - 2.600e+10 8.01306e-08 3.78826e-13 1.00000e+00 - 2.700e+10 7.71624e-08 6.09154e-13 1.00000e+00 - 2.800e+10 7.44070e-08 2.04226e-13 1.00000e+00 - 2.900e+10 7.18410e-08 3.71843e-13 1.00000e+00 - 3.000e+10 6.94465e-08 4.86116e-14 1.00000e+00 - 3.100e+10 6.72060e-08 2.63403e-13 1.00000e+00 - 3.200e+10 6.51057e-08 3.32928e-13 1.00000e+00 - 3.300e+10 6.31329e-08 2.79447e-13 1.00000e+00 - 3.400e+10 6.12760e-08 2.69539e-13 1.00000e+00 - 3.500e+10 5.95252e-08 2.37903e-13 1.00000e+00 - 3.600e+10 5.78717e-08 2.27549e-13 1.00000e+00 - 3.700e+10 5.63075e-08 2.16412e-13 1.00000e+00 - 3.800e+10 5.48258e-08 2.20845e-13 1.00000e+00 - 3.900e+10 5.34200e-08 1.80732e-13 1.00000e+00 - 4.000e+10 5.20844e-08 2.07741e-13 1.00000e+00 - 4.100e+10 5.08141e-08 2.02952e-13 1.00000e+00 - 4.200e+10 4.96042e-08 1.74303e-13 1.00000e+00 - 4.300e+10 4.84505e-08 2.18218e-13 1.00000e+00 - 4.400e+10 4.73494e-08 1.66929e-13 1.00000e+00 - 4.500e+10 4.62972e-08 1.38049e-13 1.00000e+00 - 4.600e+10 4.52908e-08 1.08118e-13 1.00000e+00 - 4.700e+10 4.43271e-08 1.76051e-13 1.00000e+00 - 4.800e+10 4.34036e-08 1.70607e-13 1.00000e+00 - 4.900e+10 4.25178e-08 1.81842e-13 1.00000e+00 - 5.000e+10 4.16676e-08 -1.13757e-14 1.00000e+00 - 5.100e+10 4.08507e-08 -2.05065e-13 1.00000e+00 - 5.200e+10 4.00651e-08 -1.78624e-13 1.00000e+00 - 5.300e+10 3.93089e-08 1.41307e-13 1.00000e+00 - 5.400e+10 3.85809e-08 1.37592e-13 1.00000e+00 - 5.500e+10 3.78794e-08 1.22696e-13 1.00000e+00 - 5.600e+10 3.72032e-08 -1.10452e-13 1.00000e+00 - 5.700e+10 3.65501e-08 3.36533e-13 1.00000e+00 - 5.800e+10 3.59205e-08 -2.61161e-13 1.00000e+00 - 5.900e+10 3.53190e-08 -7.59722e-12 1.00000e+00 - 6.000e+10 3.47227e-08 1.85374e-13 1.00000e+00 - 6.100e+10 3.41536e-08 9.39629e-14 1.00000e+00 - 6.200e+10 3.36021e-08 7.25389e-13 1.00000e+00 - 6.300e+10 3.30696e-08 -1.63630e-13 1.00000e+00 - 6.400e+10 3.25554e-08 -2.65856e-12 1.00000e+00 - 6.500e+10 3.20517e-08 1.30711e-13 1.00000e+00 - 6.600e+10 3.15661e-08 1.26194e-13 1.00000e+00 - 6.700e+10 3.10950e-08 1.40543e-13 1.00000e+00 - 6.800e+10 3.06377e-08 1.09899e-13 1.00000e+00 - 6.900e+10 3.01937e-08 1.22297e-13 1.00000e+00 - 7.000e+10 2.97623e-08 1.43754e-13 1.00000e+00 - 7.100e+10 2.93432e-08 9.00254e-14 1.00000e+00 - 7.200e+10 2.89356e-08 1.09983e-13 1.00000e+00 - 7.300e+10 2.85392e-08 1.07976e-13 1.00000e+00 - 7.400e+10 2.81535e-08 1.10593e-13 1.00000e+00 - 7.500e+10 2.77782e-08 1.05388e-13 1.00000e+00 - 7.600e+10 2.74134e-08 -6.45069e-13 1.00000e+00 - 7.700e+10 2.70583e-08 -1.58650e-12 1.00000e+00 - 7.800e+10 2.67111e-08 -1.22796e-12 1.00000e+00 - 7.900e+10 2.63717e-08 8.74686e-14 1.00000e+00 - 8.000e+10 2.60420e-08 9.65943e-14 1.00000e+00 - 8.100e+10 2.57204e-08 1.41528e-13 1.00000e+00 - 8.200e+10 2.54068e-08 1.61138e-13 1.00000e+00 - 8.300e+10 2.51008e-08 -4.32908e-15 1.00000e+00 - 8.400e+10 2.48019e-08 6.26448e-14 1.00000e+00 - 8.500e+10 2.45101e-08 1.00567e-13 1.00000e+00 - 8.600e+10 2.42251e-08 9.76438e-14 1.00000e+00 - 8.700e+10 2.39466e-08 1.01689e-13 1.00000e+00 - 8.800e+10 2.36745e-08 1.26632e-13 1.00000e+00 - 8.900e+10 2.34085e-08 1.35620e-13 1.00000e+00 - 9.000e+10 2.31484e-08 8.73805e-14 1.00000e+00 - 9.100e+10 2.28938e-08 3.36553e-13 1.00000e+00 - 9.200e+10 2.26446e-08 7.21253e-13 1.00000e+00 - 9.300e+10 2.24013e-08 5.28310e-13 1.00000e+00 - 9.400e+10 2.21668e-08 -3.34767e-12 1.00000e+00 - 9.500e+10 2.19300e-08 1.72230e-13 1.00000e+00 - 9.600e+10 2.17016e-08 7.81589e-14 1.00000e+00 - 9.700e+10 2.14779e-08 1.07435e-13 1.00000e+00 - 9.800e+10 2.12602e-08 -1.41747e-12 1.00000e+00 - 9.900e+10 2.10435e-08 6.16285e-13 1.00000e+00 - 1.000e+11 2.08336e-08 8.08491e-14 1.00000e+00 + 1.000e+09 2.08372e-06 1.28623e-11 9.99998e-01 + 2.000e+09 1.04177e-06 4.17962e-12 9.99999e-01 + 3.000e+09 6.94491e-07 1.08662e-12 9.99999e-01 + 4.000e+09 5.20859e-07 2.11202e-12 9.99999e-01 + 5.000e+09 4.16681e-07 2.67597e-12 1.00000e+00 + 6.000e+09 3.47234e-07 1.32035e-12 1.00000e+00 + 7.000e+09 2.97625e-07 9.17289e-13 1.00000e+00 + 8.000e+09 2.60423e-07 1.34317e-12 1.00000e+00 + 9.000e+09 2.31483e-07 1.77831e-13 1.00000e+00 + 1.000e+10 2.08336e-07 8.66411e-14 1.00000e+00 + 1.100e+10 1.89400e-07 -1.20076e-12 1.00000e+00 + 1.200e+10 1.73615e-07 6.95917e-13 1.00000e+00 + 1.300e+10 1.60260e-07 6.35488e-13 1.00000e+00 + 1.400e+10 1.48812e-07 6.62922e-13 1.00000e+00 + 1.500e+10 1.38889e-07 9.89014e-13 1.00000e+00 + 1.600e+10 1.30210e-07 4.44922e-13 1.00000e+00 + 1.700e+10 1.22549e-07 1.72526e-12 1.00000e+00 + 1.800e+10 1.15739e-07 3.90984e-12 1.00000e+00 + 1.900e+10 1.09651e-07 4.44476e-13 1.00000e+00 + 2.000e+10 1.04167e-07 1.31808e-12 1.00000e+00 + 2.100e+10 9.92075e-08 7.65928e-13 1.00000e+00 + 2.200e+10 9.46989e-08 -1.16031e-13 1.00000e+00 + 2.300e+10 9.05834e-08 -2.00950e-12 1.00000e+00 + 2.400e+10 8.68068e-08 3.52748e-13 1.00000e+00 + 2.500e+10 8.33341e-08 4.86598e-13 1.00000e+00 + 2.600e+10 8.01289e-08 5.62896e-13 1.00000e+00 + 2.700e+10 7.71612e-08 6.08319e-13 1.00000e+00 + 2.800e+10 7.44056e-08 4.14818e-13 1.00000e+00 + 2.900e+10 7.18402e-08 6.98424e-14 1.00000e+00 + 3.000e+10 6.94449e-08 6.23385e-13 1.00000e+00 + 3.100e+10 6.72051e-08 2.68162e-13 1.00000e+00 + 3.200e+10 6.51049e-08 2.53517e-13 1.00000e+00 + 3.300e+10 6.31320e-08 2.53703e-13 1.00000e+00 + 3.400e+10 6.12751e-08 2.53682e-13 1.00000e+00 + 3.500e+10 5.95243e-08 2.90151e-13 1.00000e+00 + 3.600e+10 5.78709e-08 2.74982e-13 1.00000e+00 + 3.700e+10 5.63068e-08 2.31075e-13 1.00000e+00 + 3.800e+10 5.48248e-08 4.05480e-13 1.00000e+00 + 3.900e+10 5.34193e-08 2.94098e-13 1.00000e+00 + 4.000e+10 5.20839e-08 1.94391e-13 1.00000e+00 + 4.100e+10 5.08135e-08 2.15900e-13 1.00000e+00 + 4.200e+10 4.96037e-08 1.41126e-13 1.00000e+00 + 4.300e+10 4.84501e-08 1.79785e-13 1.00000e+00 + 4.400e+10 4.73464e-08 2.69369e-12 1.00000e+00 + 4.500e+10 4.62850e-08 1.18598e-11 1.00000e+00 + 4.600e+10 4.52825e-08 7.90431e-12 1.00000e+00 + 4.700e+10 4.43266e-08 1.76122e-13 1.00000e+00 + 4.800e+10 4.34029e-08 2.26422e-13 1.00000e+00 + 4.900e+10 4.25172e-08 1.84214e-13 1.00000e+00 + 5.000e+10 4.16669e-08 1.23287e-13 1.00000e+00 + 5.100e+10 4.08543e-08 -4.28961e-12 1.00000e+00 + 5.200e+10 4.00729e-08 -8.50417e-12 1.00000e+00 + 5.300e+10 3.93110e-08 -2.57802e-12 1.00000e+00 + 5.400e+10 3.85804e-08 1.47943e-13 1.00000e+00 + 5.500e+10 3.78772e-08 1.86930e-12 1.00000e+00 + 5.600e+10 3.72025e-08 1.31732e-13 1.00000e+00 + 5.700e+10 3.65494e-08 5.66584e-13 1.00000e+00 + 5.800e+10 3.59196e-08 1.78679e-13 1.00000e+00 + 5.900e+10 3.53112e-08 -1.92694e-13 1.00000e+00 + 6.000e+10 3.47222e-08 2.42813e-13 1.00000e+00 + 6.100e+10 3.41531e-08 1.50415e-13 1.00000e+00 + 6.200e+10 3.36022e-08 1.34708e-13 1.00000e+00 + 6.300e+10 3.30690e-08 -7.92804e-16 1.00000e+00 + 6.400e+10 3.25522e-08 1.27438e-13 1.00000e+00 + 6.500e+10 3.20515e-08 3.49793e-14 1.00000e+00 + 6.600e+10 3.15669e-08 -1.02211e-12 1.00000e+00 + 6.700e+10 3.10946e-08 1.41439e-13 1.00000e+00 + 6.800e+10 3.06374e-08 7.27249e-14 1.00000e+00 + 6.900e+10 3.01894e-08 4.00333e-12 1.00000e+00 + 7.000e+10 2.97602e-08 1.87205e-12 1.00000e+00 + 7.100e+10 2.93428e-08 1.30225e-13 1.00000e+00 + 7.200e+10 2.89354e-08 1.31656e-14 1.00000e+00 + 7.300e+10 2.85437e-08 -4.70269e-12 1.00000e+00 + 7.400e+10 2.81625e-08 -9.20849e-12 1.00000e+00 + 7.500e+10 2.77780e-08 -5.78693e-14 1.00000e+00 + 7.600e+10 2.74119e-08 5.68095e-13 1.00000e+00 + 7.700e+10 2.70563e-08 1.53510e-13 1.00000e+00 + 7.800e+10 2.67092e-08 3.61374e-13 1.00000e+00 + 7.900e+10 2.63714e-08 9.53870e-14 1.00000e+00 + 8.000e+10 2.60417e-08 1.04868e-13 1.00000e+00 + 8.100e+10 2.57202e-08 9.19696e-14 1.00000e+00 + 8.200e+10 2.54065e-08 1.04617e-13 1.00000e+00 + 8.300e+10 2.51004e-08 1.17459e-13 1.00000e+00 + 8.400e+10 2.48017e-08 4.24962e-14 1.00000e+00 + 8.500e+10 2.45107e-08 -7.68506e-13 1.00000e+00 + 8.600e+10 2.42268e-08 -1.88041e-12 1.00000e+00 + 8.700e+10 2.39489e-08 -2.44492e-12 1.00000e+00 + 8.800e+10 2.36760e-08 -1.61373e-12 1.00000e+00 + 8.900e+10 2.34086e-08 -2.03789e-13 1.00000e+00 + 9.000e+10 2.31474e-08 8.50587e-13 1.00000e+00 + 9.100e+10 2.28938e-08 1.36755e-13 1.00000e+00 + 9.200e+10 2.26451e-08 -2.32772e-14 1.00000e+00 + 9.300e+10 2.24015e-08 8.00906e-14 1.00000e+00 + 9.400e+10 2.21631e-08 8.59755e-14 1.00000e+00 + 9.500e+10 2.19305e-08 -5.14361e-13 1.00000e+00 + 9.600e+10 2.17023e-08 -7.48165e-13 1.00000e+00 + 9.700e+10 2.14796e-08 -1.80243e-12 1.00000e+00 + 9.800e+10 2.12586e-08 5.56097e-14 1.00000e+00 + 9.900e+10 2.10438e-08 1.05420e-13 1.00000e+00 + 1.000e+11 2.08333e-08 9.66856e-14 1.00000e+00 -------------------------------------------------- Final Solver Statistics: - Internal solver steps = 372 (attempted = 563) - Total RHS evals: Fe = 0, Fi = 14565 - Total linear solver setups = 581 + Internal solver steps = 353 (attempted = 519) + Total RHS evals: Fe = 0, Fi = 13780 + Total linear solver setups = 545 Total RHS evals for setting up the linear system = 0 - Total number of Jacobian evaluations = 391 - Total number of Newton iterations = 12497 - Total number of nonlinear solver convergence failures = 376 - Total number of error test failures = 1 - Total number of constraint test failures = 14 - Total number of failed steps from solver failure = 176 + Total number of Jacobian evaluations = 366 + Total number of Newton iterations = 11842 + Total number of nonlinear solver convergence failures = 363 + Total number of error test failures = 0 + Total number of constraint test failures = 2 + Total number of failed steps from solver failure = 164 diff --git a/examples/arkode/C_serial/ark_robertson_root.out b/examples/arkode/C_serial/ark_robertson_root.out index 236a53d64b..f67f8d34a9 100644 --- a/examples/arkode/C_serial/ark_robertson_root.out +++ b/examples/arkode/C_serial/ark_robertson_root.out @@ -7,27 +7,27 @@ Robertson ODE test problem (with rootfinding): 2.64019e-01 9.89965e-01 3.47058e-05 1.00000e-02 rootsfound[] = 0 1 4.00000e+00 9.05519e-01 2.24048e-05 9.44589e-02 - 4.00000e+01 7.15827e-01 9.18557e-06 2.84164e-01 - 4.00000e+02 4.50519e-01 3.22289e-06 5.49478e-01 - 4.00000e+03 1.83202e-01 8.94239e-07 8.16797e-01 - 4.00000e+04 3.89834e-02 1.62177e-07 9.61016e-01 - 4.00000e+05 4.93828e-03 1.98499e-08 9.95062e-01 - 4.00000e+06 5.16810e-04 2.06836e-09 9.99483e-01 - 2.07955e+07 1.00000e-04 4.00913e-10 9.99900e-01 + 4.00000e+01 7.15827e-01 9.18550e-06 2.84164e-01 + 4.00000e+02 4.50519e-01 3.22290e-06 5.49478e-01 + 4.00000e+03 1.83202e-01 8.94213e-07 8.16797e-01 + 4.00000e+04 3.89834e-02 1.62170e-07 9.61016e-01 + 4.00000e+05 4.93828e-03 1.98505e-08 9.95062e-01 + 4.00000e+06 5.16811e-04 2.06833e-09 9.99483e-01 + 2.07956e+07 1.00000e-04 4.00054e-10 9.99900e-01 rootsfound[] = -1 0 - 4.00000e+08 5.20777e-06 2.07144e-11 9.99995e-01 - 4.00000e+09 5.20870e-07 2.07803e-12 9.99999e-01 - 4.00000e+10 5.20800e-08 4.22489e-13 1.00000e+00 + 4.00000e+08 5.20672e-06 2.05159e-11 9.99995e-01 + 4.00000e+09 5.20802e-07 1.54856e-12 9.99999e-01 + 4.00000e+10 5.20846e-08 2.09189e-13 1.00000e+00 ----------------------------------------------------- Final Solver Statistics: - Internal solver steps = 1070 (attempted = 1298) - Total RHS evals: Fe = 0, Fi = 36412 - Total linear solver setups = 590 + Internal solver steps = 748 (attempted = 813) + Total RHS evals: Fe = 0, Fi = 25698 + Total linear solver setups = 263 Total RHS evals for setting up the linear system = 0 - Total number of Jacobian evaluations = 66 - Total number of Newton iterations = 29962 - Total root-function g evals = 1104 - Total number of nonlinear solver convergence failures = 55 - Total number of error test failures = 213 - Total number of failed steps from solver failure = 15 + Total number of Jacobian evaluations = 65 + Total number of Newton iterations = 21684 + Total root-function g evals = 776 + Total number of nonlinear solver convergence failures = 59 + Total number of error test failures = 47 + Total number of failed steps from solver failure = 18 diff --git a/examples/arkode/C_serial/ark_twowaycouple_mri.out b/examples/arkode/C_serial/ark_twowaycouple_mri.out index ef4f3fa787..8aee3f02b7 100644 --- a/examples/arkode/C_serial/ark_twowaycouple_mri.out +++ b/examples/arkode/C_serial/ark_twowaycouple_mri.out @@ -30,4 +30,4 @@ Two way coupling ODE test problem: Final Solver Statistics: Steps: nsts = 2001, nstf = 102051 - Total RHS evals: Fs = 6004, Ff = 410207 + Total RHS evals: Fs = 6004, Ff = 306173 diff --git a/examples/arkode/F2003_custom/ark_analytic_complex_f2003.out b/examples/arkode/F2003_custom/ark_analytic_complex_f2003.out index 32bd53e57b..a783d31eef 100644 --- a/examples/arkode/F2003_custom/ark_analytic_complex_f2003.out +++ b/examples/arkode/F2003_custom/ark_analytic_complex_f2003.out @@ -20,7 +20,7 @@ Final Solver Statistics: Internal solver steps = 664, (attempted = 664) - Total RHS evals = 3987 + Total RHS evals = 3323 Total number of error test failures = 0 Error: max = 7.87E-04, rms = 4.99E-04 diff --git a/examples/arkode/F2003_custom/ark_brusselator1D_f2003.out b/examples/arkode/F2003_custom/ark_brusselator1D_f2003.out index 11c3e92817..a0a5d2c6e9 100644 --- a/examples/arkode/F2003_custom/ark_brusselator1D_f2003.out +++ b/examples/arkode/F2003_custom/ark_brusselator1D_f2003.out @@ -6,7 +6,7 @@ reltol = 1.0E-06, abstol = 1.0E-10 t ||u||_rms ||v||_rms ||w||_rms ---------------------------------------------- - 0.100000 0.675713 3.378369 1.999987 + 0.100000 0.675713 3.378369 1.999986 0.200000 0.688538 3.357681 1.999986 0.300000 0.702687 3.334519 1.999986 0.400000 0.718330 3.308631 1.999986 @@ -110,7 +110,7 @@ Final Solver Statistics: Internal solver steps = 407, (attempted = 504) - Total RHS evals: Fe = 3027, Fi = 8587 + Total RHS evals: Fe = 2930, Fi = 8490 Total linear solver setups = 269 Total RHS evals for setting up the linear system = 0 Total number of Jacobian evaluations = 30 diff --git a/examples/arkode/F2003_serial/ark_analytic_f2003.f90 b/examples/arkode/F2003_serial/ark_analytic_f2003.f90 index 9de6e47616..1477c35d14 100644 --- a/examples/arkode/F2003_serial/ark_analytic_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_analytic_f2003.f90 @@ -101,6 +101,8 @@ program main use fsunmatrix_dense_mod ! Fortran interface to dense SUNMatrix use fsunlinsol_dense_mod ! Fortran interface to dense SUNLinearSolver use fsundials_context_mod ! Fortran interface to SUNContext + use fsundials_adaptcontroller_mod ! Fortran interface to the generic SUNAdaptController + use fsunadaptcontroller_soderlind_mod ! Fortran interface to Soderlind controller use ode_mod ! ODE functions !======= Declarations ========= @@ -114,17 +116,16 @@ program main real(c_double) :: dtout ! output time interval real(c_double) :: tout ! output time real(c_double) :: tcur(1) ! current time - integer(c_int) :: imethod, idefault, pq ! time step adaptivity parameters - real(c_double) :: adapt_params(3) ! time step adaptivity parameters integer(c_int) :: ierr ! error flag from C functions integer(c_int) :: nout ! number of outputs integer(c_int) :: outstep ! output loop counter - type(N_Vector), pointer :: sunvec_y ! sundials vector - type(SUNMatrix), pointer :: sunmat_A ! sundials matrix - type(SUNLinearSolver), pointer :: sunls ! sundials linear solver - type(c_ptr) :: arkode_mem ! ARKODE memory - real(c_double), pointer :: yvec(:) ! underlying vector + type(N_Vector), pointer :: sunvec_y ! sundials vector + type(SUNMatrix), pointer :: sunmat_A ! sundials matrix + type(SUNLinearSolver), pointer :: sunls ! sundials linear solver + type(SUNAdaptController), pointer :: sunCtrl ! time step controller + type(c_ptr) :: arkode_mem ! ARKODE memory + real(c_double), pointer :: yvec(:) ! underlying vector !======= Internals ============ @@ -183,12 +184,20 @@ program main stop 1 end if - imethod = 4 - idefault = 1 - pq = 0 - ierr = FARKStepSetAdaptivityMethod(arkode_mem, imethod, idefault, pq, adapt_params) + sunCtrl => FSUNAdaptController_ImpGus(ctx) + if (.not. associated(sunCtrl)) then + print *, 'ERROR: sunCtrl = NULL' + stop 1 + end if + ierr = FARKStepSetAdaptController(arkode_mem, sunCtrl) + if (ierr /= 0) then + write(*,*) 'Error in FARKStepSetAdaptController, ierr = ', ierr, '; halting' + stop 1 + end if + + ierr = FARKStepSetNonlinConvCoef(arkode_mem, 0.01d0) if (ierr /= 0) then - write(*,*) 'Error in FARKStepSetAdaptivityMethod, ierr = ', ierr, '; halting' + write(*,*) 'Error in FARKStepSetNonlinConvCoef, ierr = ', ierr, '; halting' stop 1 end if @@ -222,6 +231,7 @@ program main call FN_VDestroy(sunvec_y) call FSUNMatDestroy(sunmat_A) ierr = FSUNLinSolFree(sunls) + ierr = FSUNAdaptController_Destroy(sunCtrl) ierr = FSUNContext_Free(ctx) end program main diff --git a/examples/arkode/F2003_serial/ark_analytic_f2003.out b/examples/arkode/F2003_serial/ark_analytic_f2003.out index fa22d69806..c5c64ac439 100644 --- a/examples/arkode/F2003_serial/ark_analytic_f2003.out +++ b/examples/arkode/F2003_serial/ark_analytic_f2003.out @@ -16,15 +16,15 @@ 1.00000E+01 1.47113E+00 General Solver Stats: - Total internal steps taken = 412 - Total internal steps attempts = 416 - Total rhs function calls = 4944 - Num lin solver setup calls = 38 - Num error test failures = 4 + Total internal steps taken = 419 + Total internal steps attempts = 424 + Total rhs function calls = 5090 + Num lin solver setup calls = 43 + Num error test failures = 5 First internal step size = 6.10352E-12 - Last internal step size = 7.85712E-02 - Next internal step size = 7.85712E-02 - Current internal time = 1.00544E+01 - Num nonlinear solver iters = 2861 - Num nonlinear solver fails = 3 + Last internal step size = 6.85164E-02 + Next internal step size = 6.85164E-02 + Current internal time = 1.00642E+01 + Num nonlinear solver iters = 2967 + Num nonlinear solver fails = 4 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.out index af17291b06..9bdbea5dcb 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.out @@ -1,66 +1,66 @@ Multirate nonlinear Kvaerno-Prothero-Robinson test problem: time domain: (0.00, 5.00] - hs = 0.0100 - hf = 0.0001 - G = -100.0000 - w = 100.0000 - e = 0.5000 + hs = 0.1000E-01 + hf = 0.1000E-03 + G = -0.1000E+03 + w = 0.1000E+03 + e = 0.5000E+00 solver: exp-3/exp-3 (standard MIS) t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223726 1.077464 0.85E-06 0.88E-08 - 0.200000 1.220670 1.551800 0.84E-06 0.20E-07 - 0.300000 1.215595 1.467737 0.83E-06 0.31E-07 - 0.400000 1.208525 1.154583 0.82E-06 0.40E-07 - 0.500000 1.199497 1.721908 0.80E-06 0.48E-07 - 0.600000 1.188558 1.023517 0.78E-06 0.56E-07 - 0.700000 1.175765 1.622751 0.75E-06 0.62E-07 - 0.800000 1.161187 1.374632 0.72E-06 0.67E-07 - 0.900000 1.144905 1.245763 0.68E-06 0.71E-07 - 1.000000 1.127010 1.691839 0.64E-06 0.74E-07 - 1.100000 1.107610 1.000490 0.59E-06 0.76E-07 - 1.200000 1.086821 1.677552 0.53E-06 0.77E-07 - 1.300000 1.064777 1.277775 0.47E-06 0.78E-07 - 1.400000 1.041626 1.342455 0.41E-06 0.77E-07 - 1.500000 1.017531 1.642940 0.33E-06 0.75E-07 - 1.600000 0.992674 1.012112 0.25E-06 0.73E-07 - 1.700000 0.967253 1.714058 0.16E-06 0.69E-07 - 1.800000 0.941488 1.183867 0.63E-07 0.65E-07 - 1.900000 0.915617 1.437465 0.43E-07 0.59E-07 - 2.000000 0.889902 1.577082 0.16E-06 0.52E-07 - 2.100000 0.864625 1.056467 0.28E-06 0.45E-07 - 2.200000 0.840089 1.730920 0.42E-06 0.36E-07 - 2.300000 0.816616 1.101047 0.56E-06 0.26E-07 - 2.400000 0.794545 1.525051 0.70E-06 0.14E-07 - 2.500000 0.774227 1.496993 0.85E-06 0.21E-08 - 2.600000 0.756012 1.126857 0.99E-06 0.11E-07 - 2.700000 0.740245 1.727536 0.11E-05 0.25E-07 - 2.800000 0.727246 1.038393 0.13E-05 0.40E-07 - 2.900000 0.717300 1.600759 0.14E-05 0.55E-07 - 3.000000 0.710635 1.406379 0.14E-05 0.70E-07 - 3.100000 0.707411 1.214353 0.15E-05 0.85E-07 - 3.200000 0.707708 1.704026 0.15E-05 0.99E-07 - 3.300000 0.711518 1.004391 0.14E-05 0.11E-06 - 3.400000 0.718748 1.661225 0.14E-05 0.12E-06 - 3.500000 0.729225 1.310102 0.13E-05 0.13E-06 - 3.600000 0.742711 1.310080 0.12E-05 0.14E-06 - 3.700000 0.758913 1.661237 0.10E-05 0.14E-06 - 3.800000 0.777505 1.004387 0.88E-06 0.14E-06 - 3.900000 0.798143 1.704018 0.73E-06 0.14E-06 - 4.000000 0.820474 1.214374 0.59E-06 0.14E-06 - 4.100000 0.844149 1.406358 0.45E-06 0.13E-06 - 4.200000 0.868832 1.600774 0.31E-06 0.13E-06 - 4.300000 0.894204 1.038382 0.18E-06 0.12E-06 - 4.400000 0.919964 1.727533 0.66E-07 0.11E-06 - 4.500000 0.945834 1.126875 0.43E-07 0.99E-07 - 4.600000 0.971558 1.496973 0.14E-06 0.89E-07 - 4.700000 0.996898 1.525070 0.23E-06 0.78E-07 - 4.800000 1.021641 1.101030 0.32E-06 0.66E-07 - 4.900000 1.045589 1.730922 0.39E-06 0.55E-07 - 5.000000 1.068565 1.056480 0.46E-06 0.44E-07 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223726 1.077464 0.85E-06 0.88E-08 + 0.200000 1.220670 1.551800 0.84E-06 0.20E-07 + 0.300000 1.215595 1.467737 0.83E-06 0.31E-07 + 0.400000 1.208525 1.154583 0.82E-06 0.40E-07 + 0.500000 1.199497 1.721908 0.80E-06 0.48E-07 + 0.600000 1.188558 1.023517 0.78E-06 0.56E-07 + 0.700000 1.175765 1.622751 0.75E-06 0.62E-07 + 0.800000 1.161187 1.374632 0.72E-06 0.67E-07 + 0.900000 1.144905 1.245763 0.68E-06 0.71E-07 + 1.000000 1.127010 1.691839 0.64E-06 0.74E-07 + 1.100000 1.107610 1.000490 0.59E-06 0.76E-07 + 1.200000 1.086821 1.677552 0.53E-06 0.77E-07 + 1.300000 1.064777 1.277775 0.47E-06 0.78E-07 + 1.400000 1.041626 1.342455 0.41E-06 0.77E-07 + 1.500000 1.017531 1.642940 0.33E-06 0.75E-07 + 1.600000 0.992674 1.012112 0.25E-06 0.73E-07 + 1.700000 0.967253 1.714058 0.16E-06 0.69E-07 + 1.800000 0.941488 1.183867 0.63E-07 0.65E-07 + 1.900000 0.915617 1.437465 0.43E-07 0.59E-07 + 2.000000 0.889902 1.577082 0.16E-06 0.52E-07 + 2.100000 0.864625 1.056467 0.28E-06 0.45E-07 + 2.200000 0.840089 1.730920 0.42E-06 0.36E-07 + 2.300000 0.816616 1.101047 0.56E-06 0.26E-07 + 2.400000 0.794545 1.525051 0.70E-06 0.14E-07 + 2.500000 0.774227 1.496993 0.85E-06 0.21E-08 + 2.600000 0.756012 1.126857 0.99E-06 0.11E-07 + 2.700000 0.740245 1.727536 0.11E-05 0.25E-07 + 2.800000 0.727246 1.038393 0.13E-05 0.40E-07 + 2.900000 0.717300 1.600759 0.14E-05 0.55E-07 + 3.000000 0.710635 1.406379 0.14E-05 0.70E-07 + 3.100000 0.707411 1.214353 0.15E-05 0.85E-07 + 3.200000 0.707708 1.704026 0.15E-05 0.99E-07 + 3.300000 0.711518 1.004391 0.14E-05 0.11E-06 + 3.400000 0.718748 1.661225 0.14E-05 0.12E-06 + 3.500000 0.729225 1.310102 0.13E-05 0.13E-06 + 3.600000 0.742711 1.310080 0.12E-05 0.14E-06 + 3.700000 0.758913 1.661237 0.10E-05 0.14E-06 + 3.800000 0.777505 1.004387 0.88E-06 0.14E-06 + 3.900000 0.798143 1.704018 0.73E-06 0.14E-06 + 4.000000 0.820474 1.214374 0.59E-06 0.14E-06 + 4.100000 0.844149 1.406358 0.45E-06 0.13E-06 + 4.200000 0.868832 1.600774 0.31E-06 0.13E-06 + 4.300000 0.894204 1.038382 0.18E-06 0.12E-06 + 4.400000 0.919964 1.727533 0.66E-07 0.11E-06 + 4.500000 0.945834 1.126875 0.43E-07 0.99E-07 + 4.600000 0.971558 1.496973 0.14E-06 0.89E-07 + 4.700000 0.996898 1.525070 0.23E-06 0.78E-07 + 4.800000 1.021641 1.101030 0.32E-06 0.66E-07 + 4.900000 1.045589 1.730922 0.39E-06 0.55E-07 + 5.000000 1.068565 1.056480 0.46E-06 0.44E-07 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 501, nstf = 50601 - u error = 0.794E-06, v error = 0.825E-07, total error = 0.565E-06 - Total RHS evals: Fs = 1504, Ff = 152306 + u error = 0.794E-06, v error = 0.825E-07, total error = 0.565E-06 + Total RHS evals: Fs = 1504, Ff = 151853 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_0_0.002.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_0_0.002.out index 5f383b5beb..c5001c9ed2 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_0_0.002.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_0_0.002.out @@ -8,59 +8,59 @@ solver: exp-3/exp-3 (standard MIS) t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223725 1.077464 0.50E-08 0.63E-10 - 0.200000 1.220669 1.551800 0.50E-08 0.14E-09 - 0.300000 1.215594 1.467737 0.49E-08 0.21E-09 - 0.400000 1.208524 1.154583 0.48E-08 0.28E-09 - 0.500000 1.199496 1.721908 0.47E-08 0.33E-09 - 0.600000 1.188557 1.023517 0.46E-08 0.38E-09 - 0.700000 1.175764 1.622751 0.44E-08 0.42E-09 - 0.800000 1.161186 1.374632 0.42E-08 0.46E-09 - 0.900000 1.144904 1.245763 0.40E-08 0.49E-09 - 1.000000 1.127010 1.691839 0.37E-08 0.51E-09 - 1.100000 1.107609 1.000489 0.34E-08 0.52E-09 - 1.200000 1.086821 1.677552 0.31E-08 0.53E-09 - 1.300000 1.064777 1.277775 0.28E-08 0.53E-09 - 1.400000 1.041625 1.342455 0.24E-08 0.52E-09 - 1.500000 1.017531 1.642940 0.19E-08 0.51E-09 - 1.600000 0.992673 1.012112 0.15E-08 0.49E-09 - 1.700000 0.967253 1.714058 0.93E-09 0.47E-09 - 1.800000 0.941488 1.183867 0.35E-09 0.44E-09 - 1.900000 0.915617 1.437465 0.27E-09 0.40E-09 - 2.000000 0.889903 1.577082 0.96E-09 0.36E-09 - 2.100000 0.864625 1.056467 0.17E-08 0.30E-09 - 2.200000 0.840089 1.730920 0.25E-08 0.24E-09 - 2.300000 0.816616 1.101047 0.33E-08 0.17E-09 - 2.400000 0.794546 1.525051 0.42E-08 0.93E-10 - 2.500000 0.774227 1.496993 0.50E-08 0.88E-11 - 2.600000 0.756013 1.126857 0.59E-08 0.80E-10 - 2.700000 0.740246 1.727536 0.67E-08 0.18E-09 - 2.800000 0.727247 1.038393 0.74E-08 0.28E-09 - 2.900000 0.717301 1.600759 0.80E-08 0.38E-09 - 3.000000 0.710636 1.406380 0.84E-08 0.49E-09 - 3.100000 0.707412 1.214353 0.86E-08 0.58E-09 - 3.200000 0.707709 1.704026 0.86E-08 0.68E-09 - 3.300000 0.711520 1.004391 0.85E-08 0.76E-09 - 3.400000 0.718750 1.661225 0.81E-08 0.83E-09 - 3.500000 0.729227 1.310102 0.75E-08 0.89E-09 - 3.600000 0.742712 1.310080 0.68E-08 0.93E-09 - 3.700000 0.758914 1.661237 0.60E-08 0.96E-09 - 3.800000 0.777506 1.004387 0.52E-08 0.96E-09 - 3.900000 0.798144 1.704019 0.43E-08 0.96E-09 - 4.000000 0.820474 1.214374 0.34E-08 0.93E-09 - 4.100000 0.844149 1.406358 0.26E-08 0.90E-09 - 4.200000 0.868832 1.600774 0.18E-08 0.86E-09 - 4.300000 0.894204 1.038382 0.11E-08 0.80E-09 - 4.400000 0.919964 1.727533 0.37E-09 0.74E-09 - 4.500000 0.945834 1.126875 0.27E-09 0.67E-09 - 4.600000 0.971557 1.496974 0.86E-09 0.60E-09 - 4.700000 0.996898 1.525070 0.14E-08 0.53E-09 - 4.800000 1.021641 1.101030 0.19E-08 0.45E-09 - 4.900000 1.045589 1.730922 0.23E-08 0.37E-09 - 5.000000 1.068565 1.056480 0.27E-08 0.29E-09 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223725 1.077464 0.50E-08 0.63E-10 + 0.200000 1.220669 1.551800 0.50E-08 0.14E-09 + 0.300000 1.215594 1.467737 0.49E-08 0.21E-09 + 0.400000 1.208524 1.154583 0.48E-08 0.28E-09 + 0.500000 1.199496 1.721908 0.47E-08 0.33E-09 + 0.600000 1.188557 1.023517 0.46E-08 0.38E-09 + 0.700000 1.175764 1.622751 0.44E-08 0.42E-09 + 0.800000 1.161186 1.374632 0.42E-08 0.46E-09 + 0.900000 1.144904 1.245763 0.40E-08 0.49E-09 + 1.000000 1.127010 1.691839 0.37E-08 0.51E-09 + 1.100000 1.107609 1.000489 0.34E-08 0.52E-09 + 1.200000 1.086821 1.677552 0.31E-08 0.53E-09 + 1.300000 1.064777 1.277775 0.28E-08 0.53E-09 + 1.400000 1.041625 1.342455 0.24E-08 0.52E-09 + 1.500000 1.017531 1.642940 0.19E-08 0.51E-09 + 1.600000 0.992673 1.012112 0.15E-08 0.49E-09 + 1.700000 0.967253 1.714058 0.93E-09 0.47E-09 + 1.800000 0.941488 1.183867 0.35E-09 0.44E-09 + 1.900000 0.915617 1.437465 0.27E-09 0.40E-09 + 2.000000 0.889903 1.577082 0.96E-09 0.36E-09 + 2.100000 0.864625 1.056467 0.17E-08 0.30E-09 + 2.200000 0.840089 1.730920 0.25E-08 0.24E-09 + 2.300000 0.816616 1.101047 0.33E-08 0.17E-09 + 2.400000 0.794546 1.525051 0.42E-08 0.93E-10 + 2.500000 0.774227 1.496993 0.50E-08 0.88E-11 + 2.600000 0.756013 1.126857 0.59E-08 0.80E-10 + 2.700000 0.740246 1.727536 0.67E-08 0.18E-09 + 2.800000 0.727247 1.038393 0.74E-08 0.28E-09 + 2.900000 0.717301 1.600759 0.80E-08 0.38E-09 + 3.000000 0.710636 1.406380 0.84E-08 0.49E-09 + 3.100000 0.707412 1.214353 0.86E-08 0.58E-09 + 3.200000 0.707709 1.704026 0.86E-08 0.68E-09 + 3.300000 0.711520 1.004391 0.85E-08 0.76E-09 + 3.400000 0.718750 1.661225 0.81E-08 0.83E-09 + 3.500000 0.729227 1.310102 0.75E-08 0.89E-09 + 3.600000 0.742712 1.310080 0.68E-08 0.93E-09 + 3.700000 0.758914 1.661237 0.60E-08 0.96E-09 + 3.800000 0.777506 1.004387 0.52E-08 0.96E-09 + 3.900000 0.798144 1.704019 0.43E-08 0.96E-09 + 4.000000 0.820474 1.214374 0.34E-08 0.93E-09 + 4.100000 0.844149 1.406358 0.26E-08 0.90E-09 + 4.200000 0.868832 1.600774 0.18E-08 0.86E-09 + 4.300000 0.894204 1.038382 0.11E-08 0.80E-09 + 4.400000 0.919964 1.727533 0.37E-09 0.74E-09 + 4.500000 0.945834 1.126875 0.27E-09 0.67E-09 + 4.600000 0.971557 1.496974 0.86E-09 0.60E-09 + 4.700000 0.996898 1.525070 0.14E-08 0.53E-09 + 4.800000 1.021641 1.101030 0.19E-08 0.45E-09 + 4.900000 1.045589 1.730922 0.23E-08 0.37E-09 + 5.000000 1.068565 1.056480 0.27E-08 0.29E-09 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 2501, nstf = 252601 - u error = 0.467E-08, v error = 0.564E-09, total error = 0.333E-08 - Total RHS evals: Fs = 7504, Ff = 760306 + u error = 0.467E-08, v error = 0.564E-09, total error = 0.333E-08 + Total RHS evals: Fs = 7504, Ff = 757853 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_1_0.002.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_1_0.002.out index d0dcc20c8d..c84e3cde4b 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_1_0.002.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_1_0.002.out @@ -8,59 +8,59 @@ solver: none/exp-3 (no slow, explicit fast) t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223725 1.077464 0.51E-12 0.19E-12 - 0.200000 1.220669 1.551800 0.36E-12 0.49E-13 - 0.300000 1.215594 1.467737 0.20E-12 0.25E-12 - 0.400000 1.208524 1.154583 0.95E-13 0.56E-12 - 0.500000 1.199496 1.721908 0.21E-12 0.43E-13 - 0.600000 1.188557 1.023517 0.47E-12 0.61E-12 - 0.700000 1.175764 1.622751 0.36E-12 0.32E-13 - 0.800000 1.161186 1.374632 0.31E-12 0.22E-12 - 0.900000 1.144904 1.245763 0.20E-12 0.37E-12 - 1.000000 1.127010 1.691839 0.13E-12 0.13E-12 - 1.100000 1.107609 1.000489 0.35E-12 0.31E-11 - 1.200000 1.086821 1.677552 0.37E-12 0.73E-13 - 1.300000 1.064777 1.277775 0.38E-12 0.16E-11 - 1.400000 1.041625 1.342455 0.29E-12 0.12E-11 - 1.500000 1.017531 1.642940 0.59E-13 0.24E-12 - 1.600000 0.992673 1.012112 0.20E-12 0.25E-11 - 1.700000 0.967253 1.714058 0.34E-12 0.72E-12 - 1.800000 0.941488 1.183867 0.45E-12 0.16E-11 - 1.900000 0.915617 1.437465 0.34E-12 0.38E-12 - 2.000000 0.889903 1.577082 0.35E-13 0.32E-12 - 2.100000 0.864625 1.056467 0.95E-13 0.36E-11 - 2.200000 0.840089 1.730920 0.28E-12 0.98E-12 - 2.300000 0.816616 1.101047 0.53E-12 0.31E-11 - 2.400000 0.794546 1.525051 0.35E-12 0.14E-12 - 2.500000 0.774227 1.496993 0.17E-12 0.15E-12 - 2.600000 0.756013 1.126857 0.56E-13 0.28E-11 - 2.700000 0.740246 1.727536 0.23E-12 0.16E-11 - 2.800000 0.727247 1.038393 0.49E-12 0.33E-11 - 2.900000 0.717301 1.600759 0.38E-12 0.90E-12 - 3.000000 0.710636 1.406380 0.27E-12 0.37E-12 - 3.100000 0.707412 1.214353 0.18E-12 0.19E-11 - 3.200000 0.707709 1.704026 0.17E-12 0.19E-11 - 3.300000 0.711520 1.004391 0.40E-12 0.36E-11 - 3.400000 0.718750 1.661225 0.39E-12 0.17E-11 - 3.500000 0.729227 1.310102 0.36E-12 0.82E-12 - 3.600000 0.742712 1.310080 0.28E-12 0.92E-12 - 3.700000 0.758914 1.661237 0.98E-13 0.20E-11 - 3.800000 0.777506 1.004387 0.26E-12 0.38E-11 - 3.900000 0.798144 1.704019 0.37E-12 0.23E-11 - 4.000000 0.820474 1.214374 0.44E-12 0.15E-11 - 4.100000 0.844149 1.406358 0.34E-12 0.18E-13 - 4.200000 0.868832 1.600774 0.67E-15 0.17E-11 - 4.300000 0.894204 1.038382 0.11E-12 0.36E-11 - 4.400000 0.919964 1.727533 0.33E-12 0.28E-11 - 4.500000 0.945834 1.126875 0.50E-12 0.24E-11 - 4.600000 0.971557 1.496974 0.38E-12 0.91E-12 - 4.700000 0.996898 1.525070 0.11E-12 0.13E-11 - 4.800000 1.021641 1.101030 0.31E-13 0.30E-11 - 4.900000 1.045589 1.730922 0.28E-12 0.30E-11 - 5.000000 1.068565 1.056480 0.50E-12 0.34E-11 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223725 1.077464 0.51E-12 0.19E-12 + 0.200000 1.220669 1.551800 0.36E-12 0.49E-13 + 0.300000 1.215594 1.467737 0.20E-12 0.25E-12 + 0.400000 1.208524 1.154583 0.95E-13 0.56E-12 + 0.500000 1.199496 1.721908 0.21E-12 0.43E-13 + 0.600000 1.188557 1.023517 0.47E-12 0.61E-12 + 0.700000 1.175764 1.622751 0.36E-12 0.32E-13 + 0.800000 1.161186 1.374632 0.31E-12 0.22E-12 + 0.900000 1.144904 1.245763 0.20E-12 0.37E-12 + 1.000000 1.127010 1.691839 0.13E-12 0.13E-12 + 1.100000 1.107609 1.000489 0.35E-12 0.31E-11 + 1.200000 1.086821 1.677552 0.37E-12 0.73E-13 + 1.300000 1.064777 1.277775 0.38E-12 0.16E-11 + 1.400000 1.041625 1.342455 0.29E-12 0.12E-11 + 1.500000 1.017531 1.642940 0.59E-13 0.24E-12 + 1.600000 0.992673 1.012112 0.20E-12 0.25E-11 + 1.700000 0.967253 1.714058 0.34E-12 0.72E-12 + 1.800000 0.941488 1.183867 0.45E-12 0.16E-11 + 1.900000 0.915617 1.437465 0.34E-12 0.38E-12 + 2.000000 0.889903 1.577082 0.35E-13 0.32E-12 + 2.100000 0.864625 1.056467 0.95E-13 0.36E-11 + 2.200000 0.840089 1.730920 0.28E-12 0.98E-12 + 2.300000 0.816616 1.101047 0.53E-12 0.31E-11 + 2.400000 0.794546 1.525051 0.35E-12 0.14E-12 + 2.500000 0.774227 1.496993 0.17E-12 0.15E-12 + 2.600000 0.756013 1.126857 0.56E-13 0.28E-11 + 2.700000 0.740246 1.727536 0.23E-12 0.16E-11 + 2.800000 0.727247 1.038393 0.49E-12 0.33E-11 + 2.900000 0.717301 1.600759 0.38E-12 0.90E-12 + 3.000000 0.710636 1.406380 0.27E-12 0.37E-12 + 3.100000 0.707412 1.214353 0.18E-12 0.19E-11 + 3.200000 0.707709 1.704026 0.17E-12 0.19E-11 + 3.300000 0.711520 1.004391 0.40E-12 0.36E-11 + 3.400000 0.718750 1.661225 0.39E-12 0.17E-11 + 3.500000 0.729227 1.310102 0.36E-12 0.82E-12 + 3.600000 0.742712 1.310080 0.28E-12 0.92E-12 + 3.700000 0.758914 1.661237 0.98E-13 0.20E-11 + 3.800000 0.777506 1.004387 0.26E-12 0.38E-11 + 3.900000 0.798144 1.704019 0.37E-12 0.23E-11 + 4.000000 0.820474 1.214374 0.44E-12 0.15E-11 + 4.100000 0.844149 1.406358 0.34E-12 0.18E-13 + 4.200000 0.868832 1.600774 0.67E-15 0.17E-11 + 4.300000 0.894204 1.038382 0.11E-12 0.36E-11 + 4.400000 0.919964 1.727533 0.33E-12 0.28E-11 + 4.500000 0.945834 1.126875 0.50E-12 0.24E-11 + 4.600000 0.971557 1.496974 0.38E-12 0.91E-12 + 4.700000 0.996898 1.525070 0.11E-12 0.13E-11 + 4.800000 1.021641 1.101030 0.31E-13 0.30E-11 + 4.900000 1.045589 1.730922 0.28E-12 0.30E-11 + 5.000000 1.068565 1.056480 0.50E-12 0.34E-11 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 2501, nstf = 252601 - u error = 0.316E-12, v error = 0.191E-11, total error = 0.137E-11 - Total RHS evals: Fs = 5003, Ff = 760306 + u error = 0.316E-12, v error = 0.191E-11, total error = 0.137E-11 + Total RHS evals: Fs = 5003, Ff = 757853 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_3_0.01.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_3_0.01.out index c77af2546d..fb98664760 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_3_0.01.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_3_0.01.out @@ -8,59 +8,59 @@ solver: exp-3/none (explicit slow, no fast) t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223763 1.078830 0.38E-04 0.14E-02 - 0.200000 1.220621 1.551459 0.48E-04 0.34E-03 - 0.300000 1.215670 1.468283 0.77E-04 0.55E-03 - 0.400000 1.208470 1.153553 0.54E-04 0.10E-02 - 0.500000 1.199503 1.721912 0.72E-05 0.45E-05 - 0.600000 1.188562 1.024685 0.52E-05 0.12E-02 - 0.700000 1.175722 1.622394 0.42E-04 0.36E-03 - 0.800000 1.161273 1.375492 0.87E-04 0.86E-03 - 0.900000 1.144848 1.244851 0.56E-04 0.91E-03 - 1.000000 1.127033 1.692049 0.23E-04 0.21E-03 - 1.100000 1.107588 1.000787 0.21E-04 0.30E-03 - 1.200000 1.086786 1.677292 0.34E-04 0.26E-03 - 1.300000 1.064866 1.278796 0.89E-04 0.10E-02 - 1.400000 1.041569 1.341623 0.57E-04 0.83E-03 - 1.500000 1.017571 1.643329 0.41E-04 0.39E-03 - 1.600000 0.992634 1.011394 0.39E-04 0.72E-03 - 1.700000 0.967229 1.714025 0.24E-04 0.33E-04 - 1.800000 0.941564 1.184983 0.76E-04 0.11E-02 - 1.900000 0.915563 1.436882 0.55E-04 0.58E-03 - 2.000000 0.889959 1.577469 0.57E-04 0.39E-03 - 2.100000 0.864576 1.055284 0.50E-04 0.12E-02 - 2.200000 0.840077 1.730958 0.12E-04 0.37E-04 - 2.300000 0.816664 1.102379 0.48E-04 0.13E-02 - 2.400000 0.794495 1.524701 0.51E-04 0.35E-03 - 2.500000 0.774298 1.497468 0.71E-04 0.47E-03 - 2.600000 0.755958 1.125772 0.55E-04 0.11E-02 - 2.700000 0.740246 1.727533 0.49E-06 0.36E-05 - 2.800000 0.727261 1.039718 0.14E-04 0.13E-02 - 2.900000 0.717255 1.600423 0.46E-04 0.34E-03 - 3.000000 0.710718 1.407151 0.82E-04 0.77E-03 - 3.100000 0.707355 1.213428 0.58E-04 0.92E-03 - 3.200000 0.707725 1.704161 0.15E-04 0.13E-03 - 3.300000 0.711504 1.005042 0.15E-04 0.65E-03 - 3.400000 0.718710 1.660915 0.39E-04 0.31E-03 - 3.500000 0.729315 1.311097 0.88E-04 0.10E-02 - 3.600000 0.742653 1.309213 0.59E-04 0.87E-03 - 3.700000 0.758947 1.661594 0.33E-04 0.36E-03 - 3.800000 0.777471 1.003977 0.35E-04 0.41E-03 - 3.900000 0.798115 1.703919 0.29E-04 0.10E-03 - 4.000000 0.820556 1.215451 0.82E-04 0.11E-02 - 4.100000 0.844093 1.405680 0.57E-04 0.68E-03 - 4.200000 0.868883 1.601174 0.51E-04 0.40E-03 - 4.300000 0.894157 1.037277 0.47E-04 0.11E-02 - 4.400000 0.919948 1.727576 0.16E-04 0.42E-04 - 4.500000 0.945893 1.128134 0.59E-04 0.13E-02 - 4.600000 0.971505 1.496571 0.52E-04 0.40E-03 - 4.700000 0.996965 1.525489 0.67E-04 0.42E-03 - 4.800000 1.021588 1.099882 0.52E-04 0.11E-02 - 4.900000 1.045586 1.730924 0.28E-05 0.26E-05 - 5.000000 1.068592 1.057870 0.27E-04 0.14E-02 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223763 1.078830 0.38E-04 0.14E-02 + 0.200000 1.220621 1.551459 0.48E-04 0.34E-03 + 0.300000 1.215670 1.468283 0.77E-04 0.55E-03 + 0.400000 1.208470 1.153553 0.54E-04 0.10E-02 + 0.500000 1.199503 1.721912 0.72E-05 0.45E-05 + 0.600000 1.188562 1.024685 0.52E-05 0.12E-02 + 0.700000 1.175722 1.622394 0.42E-04 0.36E-03 + 0.800000 1.161273 1.375492 0.87E-04 0.86E-03 + 0.900000 1.144848 1.244851 0.56E-04 0.91E-03 + 1.000000 1.127033 1.692049 0.23E-04 0.21E-03 + 1.100000 1.107588 1.000787 0.21E-04 0.30E-03 + 1.200000 1.086786 1.677292 0.34E-04 0.26E-03 + 1.300000 1.064866 1.278796 0.89E-04 0.10E-02 + 1.400000 1.041569 1.341623 0.57E-04 0.83E-03 + 1.500000 1.017571 1.643329 0.41E-04 0.39E-03 + 1.600000 0.992634 1.011394 0.39E-04 0.72E-03 + 1.700000 0.967229 1.714025 0.24E-04 0.33E-04 + 1.800000 0.941564 1.184983 0.76E-04 0.11E-02 + 1.900000 0.915563 1.436882 0.55E-04 0.58E-03 + 2.000000 0.889959 1.577469 0.57E-04 0.39E-03 + 2.100000 0.864576 1.055284 0.50E-04 0.12E-02 + 2.200000 0.840077 1.730958 0.12E-04 0.37E-04 + 2.300000 0.816664 1.102379 0.48E-04 0.13E-02 + 2.400000 0.794495 1.524701 0.51E-04 0.35E-03 + 2.500000 0.774298 1.497468 0.71E-04 0.47E-03 + 2.600000 0.755958 1.125772 0.55E-04 0.11E-02 + 2.700000 0.740246 1.727533 0.49E-06 0.36E-05 + 2.800000 0.727261 1.039718 0.14E-04 0.13E-02 + 2.900000 0.717255 1.600423 0.46E-04 0.34E-03 + 3.000000 0.710718 1.407151 0.82E-04 0.77E-03 + 3.100000 0.707355 1.213428 0.58E-04 0.92E-03 + 3.200000 0.707725 1.704161 0.15E-04 0.13E-03 + 3.300000 0.711504 1.005042 0.15E-04 0.65E-03 + 3.400000 0.718710 1.660915 0.39E-04 0.31E-03 + 3.500000 0.729315 1.311097 0.88E-04 0.10E-02 + 3.600000 0.742653 1.309213 0.59E-04 0.87E-03 + 3.700000 0.758947 1.661594 0.33E-04 0.36E-03 + 3.800000 0.777471 1.003977 0.35E-04 0.41E-03 + 3.900000 0.798115 1.703919 0.29E-04 0.10E-03 + 4.000000 0.820556 1.215451 0.82E-04 0.11E-02 + 4.100000 0.844093 1.405680 0.57E-04 0.68E-03 + 4.200000 0.868883 1.601174 0.51E-04 0.40E-03 + 4.300000 0.894157 1.037277 0.47E-04 0.11E-02 + 4.400000 0.919948 1.727576 0.16E-04 0.42E-04 + 4.500000 0.945893 1.128134 0.59E-04 0.13E-02 + 4.600000 0.971505 1.496571 0.52E-04 0.40E-03 + 4.700000 0.996965 1.525489 0.67E-04 0.42E-03 + 4.800000 1.021588 1.099882 0.52E-04 0.11E-02 + 4.900000 1.045586 1.730924 0.28E-05 0.26E-05 + 5.000000 1.068592 1.057870 0.27E-04 0.14E-02 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 501, nstf = 50601 - u error = 0.505E-04, v error = 0.768E-03, total error = 0.545E-03 - Total RHS evals: Fs = 1504, Ff = 152306 + u error = 0.505E-04, v error = 0.768E-03, total error = 0.545E-03 + Total RHS evals: Fs = 1504, Ff = 151853 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_4_0.002.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_4_0.002.out index 973afbc8c9..22fca6299a 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_4_0.002.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_4_0.002.out @@ -9,62 +9,62 @@ reltol: 0.4000E-05 abstol: 0.1000E-10 t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223734 1.079428 0.94E-05 0.20E-02 - 0.200000 1.220669 1.551975 0.32E-06 0.17E-03 - 0.300000 1.215599 1.468008 0.55E-05 0.27E-03 - 0.400000 1.208526 1.155919 0.22E-05 0.13E-02 - 0.500000 1.199497 1.721561 0.88E-06 0.35E-03 - 0.600000 1.188564 1.025537 0.74E-05 0.20E-02 - 0.700000 1.175763 1.622485 0.12E-05 0.27E-03 - 0.800000 1.161186 1.374900 0.25E-06 0.27E-03 - 0.900000 1.144904 1.246450 0.11E-06 0.69E-03 - 1.000000 1.127010 1.691322 0.54E-06 0.52E-03 - 1.100000 1.107615 1.002500 0.54E-05 0.20E-02 - 1.200000 1.086818 1.677003 0.21E-05 0.55E-03 - 1.300000 1.064782 1.278198 0.55E-05 0.42E-03 - 1.400000 1.041624 1.342655 0.14E-05 0.20E-03 - 1.500000 1.017531 1.642375 0.74E-06 0.56E-03 - 1.600000 0.992677 1.013911 0.34E-05 0.18E-02 - 1.700000 0.967249 1.713353 0.35E-05 0.71E-03 - 1.800000 0.941493 1.184579 0.54E-05 0.71E-03 - 1.900000 0.915615 1.437305 0.24E-05 0.16E-03 - 2.000000 0.889904 1.576564 0.13E-05 0.52E-03 - 2.100000 0.864627 1.057868 0.15E-05 0.14E-02 - 2.200000 0.840087 1.730117 0.24E-05 0.80E-03 - 2.300000 0.816622 1.102136 0.58E-05 0.11E-02 - 2.400000 0.794543 1.524625 0.31E-05 0.43E-03 - 2.500000 0.774230 1.496597 0.22E-05 0.40E-03 - 2.600000 0.756013 1.127800 0.77E-07 0.94E-03 - 2.700000 0.740244 1.726696 0.18E-05 0.84E-03 - 2.800000 0.727253 1.039861 0.53E-05 0.15E-02 - 2.900000 0.717298 1.600138 0.32E-05 0.62E-03 - 3.000000 0.710633 1.406200 0.30E-05 0.18E-03 - 3.100000 0.707411 1.214845 0.12E-05 0.49E-03 - 3.200000 0.707708 1.703196 0.12E-05 0.83E-03 - 3.300000 0.711524 1.006102 0.44E-05 0.17E-02 - 3.400000 0.718746 1.660466 0.34E-05 0.76E-03 - 3.500000 0.729231 1.310194 0.41E-05 0.93E-04 - 3.600000 0.742710 1.310190 0.22E-05 0.11E-03 - 3.700000 0.758913 1.660462 0.47E-06 0.77E-03 - 3.800000 0.777509 1.006087 0.31E-05 0.17E-02 - 3.900000 0.798140 1.703188 0.39E-05 0.83E-03 - 4.000000 0.820479 1.214819 0.46E-05 0.45E-03 - 4.100000 0.844147 1.406163 0.28E-05 0.20E-03 - 4.200000 0.868833 1.600102 0.42E-06 0.67E-03 - 4.300000 0.894205 1.039813 0.15E-05 0.14E-02 - 4.400000 0.919961 1.726651 0.28E-05 0.88E-03 - 4.500000 0.945839 1.127737 0.53E-05 0.86E-03 - 4.600000 0.971554 1.496541 0.33E-05 0.43E-03 - 4.700000 0.996899 1.524547 0.14E-05 0.52E-03 - 4.800000 1.021641 1.102066 0.86E-07 0.10E-02 - 4.900000 1.045587 1.730025 0.20E-05 0.90E-03 - 5.000000 1.068570 1.057773 0.53E-05 0.13E-02 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223734 1.079428 0.94E-05 0.20E-02 + 0.200000 1.220669 1.551975 0.32E-06 0.17E-03 + 0.300000 1.215599 1.468008 0.55E-05 0.27E-03 + 0.400000 1.208526 1.155919 0.22E-05 0.13E-02 + 0.500000 1.199497 1.721561 0.88E-06 0.35E-03 + 0.600000 1.188564 1.025537 0.74E-05 0.20E-02 + 0.700000 1.175763 1.622485 0.12E-05 0.27E-03 + 0.800000 1.161186 1.374900 0.25E-06 0.27E-03 + 0.900000 1.144904 1.246450 0.11E-06 0.69E-03 + 1.000000 1.127010 1.691322 0.54E-06 0.52E-03 + 1.100000 1.107615 1.002500 0.54E-05 0.20E-02 + 1.200000 1.086818 1.677003 0.21E-05 0.55E-03 + 1.300000 1.064782 1.278198 0.55E-05 0.42E-03 + 1.400000 1.041624 1.342655 0.14E-05 0.20E-03 + 1.500000 1.017531 1.642375 0.74E-06 0.56E-03 + 1.600000 0.992677 1.013911 0.34E-05 0.18E-02 + 1.700000 0.967249 1.713353 0.35E-05 0.71E-03 + 1.800000 0.941493 1.184579 0.54E-05 0.71E-03 + 1.900000 0.915615 1.437305 0.24E-05 0.16E-03 + 2.000000 0.889904 1.576564 0.13E-05 0.52E-03 + 2.100000 0.864627 1.057868 0.15E-05 0.14E-02 + 2.200000 0.840087 1.730117 0.24E-05 0.80E-03 + 2.300000 0.816622 1.102136 0.58E-05 0.11E-02 + 2.400000 0.794543 1.524625 0.31E-05 0.43E-03 + 2.500000 0.774230 1.496597 0.22E-05 0.40E-03 + 2.600000 0.756013 1.127800 0.77E-07 0.94E-03 + 2.700000 0.740244 1.726696 0.18E-05 0.84E-03 + 2.800000 0.727253 1.039861 0.53E-05 0.15E-02 + 2.900000 0.717298 1.600138 0.32E-05 0.62E-03 + 3.000000 0.710633 1.406200 0.30E-05 0.18E-03 + 3.100000 0.707411 1.214845 0.12E-05 0.49E-03 + 3.200000 0.707708 1.703196 0.12E-05 0.83E-03 + 3.300000 0.711524 1.006102 0.44E-05 0.17E-02 + 3.400000 0.718746 1.660466 0.34E-05 0.76E-03 + 3.500000 0.729231 1.310194 0.41E-05 0.93E-04 + 3.600000 0.742710 1.310190 0.22E-05 0.11E-03 + 3.700000 0.758913 1.660462 0.47E-06 0.77E-03 + 3.800000 0.777509 1.006087 0.31E-05 0.17E-02 + 3.900000 0.798140 1.703188 0.39E-05 0.83E-03 + 4.000000 0.820479 1.214819 0.46E-05 0.45E-03 + 4.100000 0.844147 1.406163 0.28E-05 0.20E-03 + 4.200000 0.868833 1.600102 0.42E-06 0.67E-03 + 4.300000 0.894205 1.039813 0.15E-05 0.14E-02 + 4.400000 0.919961 1.726651 0.28E-05 0.88E-03 + 4.500000 0.945839 1.127737 0.53E-05 0.86E-03 + 4.600000 0.971554 1.496541 0.33E-05 0.43E-03 + 4.700000 0.996899 1.524547 0.14E-05 0.52E-03 + 4.800000 1.021641 1.102066 0.86E-07 0.10E-02 + 4.900000 1.045587 1.730025 0.20E-05 0.90E-03 + 5.000000 1.068570 1.057773 0.53E-05 0.13E-02 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 2501, nstf = 250100 - u error = 0.348E-05, v error = 0.953E-03, total error = 0.674E-03 - Total RHS evals: Fs = 7143, Ff = 755303 + u error = 0.348E-05, v error = 0.953E-03, total error = 0.674E-03 + Total RHS evals: Fs = 7143, Ff = 750350 Slow Newton iters = 4641 Slow Newton conv fails = 0 Slow Jacobian evals = 126 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_5_0.002.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_5_0.002.out index 8cac37fa66..48dd3ab5e5 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_5_0.002.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_5_0.002.out @@ -8,59 +8,59 @@ solver: exp-4/exp-4 (MRI-GARK-ERK45a / ERK-4-4) t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223725 1.077464 0.18E-09 0.11E-10 - 0.200000 1.220669 1.551800 0.18E-09 0.21E-10 - 0.300000 1.215594 1.467737 0.17E-09 0.31E-10 - 0.400000 1.208524 1.154583 0.17E-09 0.39E-10 - 0.500000 1.199496 1.721908 0.17E-09 0.47E-10 - 0.600000 1.188557 1.023517 0.16E-09 0.53E-10 - 0.700000 1.175764 1.622751 0.16E-09 0.59E-10 - 0.800000 1.161186 1.374632 0.15E-09 0.63E-10 - 0.900000 1.144904 1.245763 0.14E-09 0.66E-10 - 1.000000 1.127010 1.691839 0.13E-09 0.69E-10 - 1.100000 1.107609 1.000489 0.12E-09 0.71E-10 - 1.200000 1.086821 1.677552 0.11E-09 0.72E-10 - 1.300000 1.064777 1.277775 0.99E-10 0.72E-10 - 1.400000 1.041625 1.342455 0.85E-10 0.71E-10 - 1.500000 1.017531 1.642940 0.69E-10 0.70E-10 - 1.600000 0.992673 1.012112 0.52E-10 0.67E-10 - 1.700000 0.967253 1.714058 0.34E-10 0.63E-10 - 1.800000 0.941488 1.183867 0.13E-10 0.59E-10 - 1.900000 0.915617 1.437465 0.91E-11 0.53E-10 - 2.000000 0.889903 1.577082 0.33E-10 0.47E-10 - 2.100000 0.864625 1.056467 0.59E-10 0.36E-10 - 2.200000 0.840089 1.730920 0.87E-10 0.32E-10 - 2.300000 0.816616 1.101047 0.12E-09 0.19E-10 - 2.400000 0.794546 1.525051 0.15E-09 0.11E-10 - 2.500000 0.774227 1.496993 0.18E-09 0.12E-11 - 2.600000 0.756013 1.126857 0.21E-09 0.16E-10 - 2.700000 0.740246 1.727536 0.24E-09 0.25E-10 - 2.800000 0.727247 1.038393 0.26E-09 0.44E-10 - 2.900000 0.717301 1.600759 0.28E-09 0.54E-10 - 3.000000 0.710636 1.406380 0.30E-09 0.69E-10 - 3.100000 0.707412 1.214353 0.31E-09 0.84E-10 - 3.200000 0.707709 1.704026 0.31E-09 0.93E-10 - 3.300000 0.711520 1.004391 0.30E-09 0.11E-09 - 3.400000 0.718750 1.661225 0.29E-09 0.11E-09 - 3.500000 0.729227 1.310102 0.27E-09 0.12E-09 - 3.600000 0.742712 1.310080 0.24E-09 0.13E-09 - 3.700000 0.758914 1.661237 0.22E-09 0.13E-09 - 3.800000 0.777506 1.004387 0.19E-09 0.13E-09 - 3.900000 0.798144 1.704019 0.15E-09 0.13E-09 - 4.000000 0.820474 1.214374 0.12E-09 0.13E-09 - 4.100000 0.844149 1.406358 0.94E-10 0.12E-09 - 4.200000 0.868832 1.600774 0.65E-10 0.11E-09 - 4.300000 0.894204 1.038382 0.39E-10 0.11E-09 - 4.400000 0.919964 1.727533 0.14E-10 0.97E-10 - 4.500000 0.945834 1.126875 0.89E-11 0.91E-10 - 4.600000 0.971557 1.496974 0.30E-10 0.79E-10 - 4.700000 0.996898 1.525070 0.49E-10 0.69E-10 - 4.800000 1.021641 1.101030 0.67E-10 0.61E-10 - 4.900000 1.045589 1.730922 0.83E-10 0.47E-10 - 5.000000 1.068565 1.056480 0.97E-10 0.40E-10 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223725 1.077464 0.18E-09 0.11E-10 + 0.200000 1.220669 1.551800 0.18E-09 0.21E-10 + 0.300000 1.215594 1.467737 0.17E-09 0.31E-10 + 0.400000 1.208524 1.154583 0.17E-09 0.39E-10 + 0.500000 1.199496 1.721908 0.17E-09 0.47E-10 + 0.600000 1.188557 1.023517 0.16E-09 0.53E-10 + 0.700000 1.175764 1.622751 0.16E-09 0.59E-10 + 0.800000 1.161186 1.374632 0.15E-09 0.63E-10 + 0.900000 1.144904 1.245763 0.14E-09 0.66E-10 + 1.000000 1.127010 1.691839 0.13E-09 0.69E-10 + 1.100000 1.107609 1.000489 0.12E-09 0.71E-10 + 1.200000 1.086821 1.677552 0.11E-09 0.72E-10 + 1.300000 1.064777 1.277775 0.99E-10 0.72E-10 + 1.400000 1.041625 1.342455 0.85E-10 0.71E-10 + 1.500000 1.017531 1.642940 0.69E-10 0.70E-10 + 1.600000 0.992673 1.012112 0.52E-10 0.67E-10 + 1.700000 0.967253 1.714058 0.34E-10 0.63E-10 + 1.800000 0.941488 1.183867 0.13E-10 0.59E-10 + 1.900000 0.915617 1.437465 0.91E-11 0.53E-10 + 2.000000 0.889903 1.577082 0.33E-10 0.47E-10 + 2.100000 0.864625 1.056467 0.59E-10 0.36E-10 + 2.200000 0.840089 1.730920 0.87E-10 0.32E-10 + 2.300000 0.816616 1.101047 0.12E-09 0.20E-10 + 2.400000 0.794546 1.525051 0.15E-09 0.78E-11 + 2.500000 0.774227 1.496993 0.18E-09 0.25E-11 + 2.600000 0.756013 1.126857 0.21E-09 0.20E-10 + 2.700000 0.740246 1.727536 0.24E-09 0.23E-10 + 2.800000 0.727247 1.038393 0.26E-09 0.42E-10 + 2.900000 0.717301 1.600759 0.28E-09 0.59E-10 + 3.000000 0.710636 1.406380 0.30E-09 0.62E-10 + 3.100000 0.707412 1.214353 0.31E-09 0.92E-10 + 3.200000 0.707709 1.704026 0.31E-09 0.87E-10 + 3.300000 0.711520 1.004391 0.30E-09 0.11E-09 + 3.400000 0.718750 1.661225 0.29E-09 0.12E-09 + 3.500000 0.729227 1.310102 0.27E-09 0.11E-09 + 3.600000 0.742712 1.310080 0.24E-09 0.14E-09 + 3.700000 0.758914 1.661237 0.22E-09 0.12E-09 + 3.800000 0.777506 1.004387 0.19E-09 0.14E-09 + 3.900000 0.798144 1.704019 0.15E-09 0.13E-09 + 4.000000 0.820474 1.214374 0.12E-09 0.12E-09 + 4.100000 0.844149 1.406358 0.94E-10 0.14E-09 + 4.200000 0.868832 1.600774 0.65E-10 0.99E-10 + 4.300000 0.894204 1.038382 0.39E-10 0.12E-09 + 4.400000 0.919964 1.727533 0.14E-10 0.96E-10 + 4.500000 0.945834 1.126875 0.89E-11 0.80E-10 + 4.600000 0.971557 1.496974 0.30E-10 0.98E-10 + 4.700000 0.996898 1.525070 0.49E-10 0.49E-10 + 4.800000 1.021641 1.101030 0.67E-10 0.78E-10 + 4.900000 1.045589 1.730922 0.83E-10 0.39E-10 + 5.000000 1.068565 1.056480 0.97E-10 0.32E-10 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 2501, nstf = 250100 - u error = 0.166E-09, v error = 0.768E-10, total error = 0.130E-09 - Total RHS evals: Fs = 12506, Ff = 1002903 + u error = 0.166E-09, v error = 0.771E-10, total error = 0.130E-09 + Total RHS evals: Fs = 12506, Ff = 1000450 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_6_0.005.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_6_0.005.out index 865cfee2de..fa764c5633 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_6_0.005.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_6_0.005.out @@ -8,59 +8,59 @@ solver: exp-4/exp-3 (MRI-GARK-ERK45a / ERK-3-3) t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223725 1.077464 0.81E-08 0.46E-09 - 0.200000 1.220669 1.551800 0.80E-08 0.90E-09 - 0.300000 1.215594 1.467737 0.79E-08 0.13E-08 - 0.400000 1.208524 1.154583 0.78E-08 0.17E-08 - 0.500000 1.199496 1.721908 0.76E-08 0.20E-08 - 0.600000 1.188557 1.023517 0.74E-08 0.22E-08 - 0.700000 1.175764 1.622751 0.71E-08 0.25E-08 - 0.800000 1.161186 1.374632 0.68E-08 0.27E-08 - 0.900000 1.144904 1.245763 0.65E-08 0.28E-08 - 1.000000 1.127010 1.691839 0.61E-08 0.29E-08 - 1.100000 1.107609 1.000489 0.56E-08 0.30E-08 - 1.200000 1.086821 1.677552 0.51E-08 0.30E-08 - 1.300000 1.064777 1.277775 0.45E-08 0.30E-08 - 1.400000 1.041625 1.342455 0.39E-08 0.30E-08 - 1.500000 1.017531 1.642940 0.32E-08 0.29E-08 - 1.600000 0.992673 1.012112 0.24E-08 0.28E-08 - 1.700000 0.967253 1.714058 0.15E-08 0.27E-08 - 1.800000 0.941488 1.183867 0.61E-09 0.25E-08 - 1.900000 0.915617 1.437465 0.40E-09 0.23E-08 - 2.000000 0.889903 1.577082 0.15E-08 0.20E-08 - 2.100000 0.864625 1.056467 0.27E-08 0.17E-08 - 2.200000 0.840089 1.730920 0.39E-08 0.13E-08 - 2.300000 0.816616 1.101047 0.53E-08 0.90E-09 - 2.400000 0.794546 1.525051 0.67E-08 0.45E-09 - 2.500000 0.774227 1.496993 0.80E-08 0.42E-10 - 2.600000 0.756013 1.126857 0.94E-08 0.57E-09 - 2.700000 0.740246 1.727536 0.11E-07 0.11E-08 - 2.800000 0.727247 1.038393 0.12E-07 0.17E-08 - 2.900000 0.717301 1.600759 0.13E-07 0.23E-08 - 3.000000 0.710636 1.406380 0.14E-07 0.29E-08 - 3.100000 0.707412 1.214353 0.14E-07 0.35E-08 - 3.200000 0.707709 1.704026 0.14E-07 0.40E-08 - 3.300000 0.711520 1.004391 0.14E-07 0.44E-08 - 3.400000 0.718750 1.661225 0.13E-07 0.48E-08 - 3.500000 0.729227 1.310102 0.12E-07 0.52E-08 - 3.600000 0.742712 1.310080 0.11E-07 0.54E-08 - 3.700000 0.758914 1.661237 0.98E-08 0.55E-08 - 3.800000 0.777506 1.004387 0.84E-08 0.55E-08 - 3.900000 0.798144 1.704019 0.70E-08 0.55E-08 - 4.000000 0.820474 1.214374 0.56E-08 0.53E-08 - 4.100000 0.844149 1.406358 0.43E-08 0.51E-08 - 4.200000 0.868832 1.600774 0.30E-08 0.49E-08 - 4.300000 0.894204 1.038382 0.18E-08 0.45E-08 - 4.400000 0.919964 1.727533 0.65E-09 0.42E-08 - 4.500000 0.945834 1.126875 0.39E-09 0.38E-08 - 4.600000 0.971557 1.496974 0.14E-08 0.34E-08 - 4.700000 0.996898 1.525070 0.22E-08 0.29E-08 - 4.800000 1.021641 1.101030 0.30E-08 0.25E-08 - 4.900000 1.045589 1.730922 0.37E-08 0.21E-08 - 5.000000 1.068565 1.056480 0.44E-08 0.16E-08 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223725 1.077464 0.81E-08 0.46E-09 + 0.200000 1.220669 1.551800 0.80E-08 0.90E-09 + 0.300000 1.215594 1.467737 0.79E-08 0.13E-08 + 0.400000 1.208524 1.154583 0.78E-08 0.17E-08 + 0.500000 1.199496 1.721908 0.76E-08 0.20E-08 + 0.600000 1.188557 1.023517 0.74E-08 0.22E-08 + 0.700000 1.175764 1.622751 0.71E-08 0.25E-08 + 0.800000 1.161186 1.374632 0.68E-08 0.27E-08 + 0.900000 1.144904 1.245763 0.65E-08 0.28E-08 + 1.000000 1.127010 1.691839 0.61E-08 0.29E-08 + 1.100000 1.107609 1.000489 0.56E-08 0.30E-08 + 1.200000 1.086821 1.677552 0.51E-08 0.30E-08 + 1.300000 1.064777 1.277775 0.45E-08 0.30E-08 + 1.400000 1.041625 1.342455 0.39E-08 0.30E-08 + 1.500000 1.017531 1.642940 0.32E-08 0.29E-08 + 1.600000 0.992673 1.012112 0.24E-08 0.28E-08 + 1.700000 0.967253 1.714058 0.15E-08 0.27E-08 + 1.800000 0.941488 1.183867 0.61E-09 0.25E-08 + 1.900000 0.915617 1.437465 0.40E-09 0.23E-08 + 2.000000 0.889903 1.577082 0.15E-08 0.20E-08 + 2.100000 0.864625 1.056467 0.27E-08 0.17E-08 + 2.200000 0.840089 1.730920 0.39E-08 0.13E-08 + 2.300000 0.816616 1.101047 0.53E-08 0.90E-09 + 2.400000 0.794546 1.525051 0.67E-08 0.45E-09 + 2.500000 0.774227 1.496993 0.80E-08 0.39E-10 + 2.600000 0.756013 1.126857 0.94E-08 0.57E-09 + 2.700000 0.740246 1.727536 0.11E-07 0.11E-08 + 2.800000 0.727247 1.038393 0.12E-07 0.17E-08 + 2.900000 0.717301 1.600759 0.13E-07 0.23E-08 + 3.000000 0.710636 1.406380 0.14E-07 0.29E-08 + 3.100000 0.707412 1.214353 0.14E-07 0.35E-08 + 3.200000 0.707709 1.704026 0.14E-07 0.40E-08 + 3.300000 0.711520 1.004391 0.14E-07 0.44E-08 + 3.400000 0.718750 1.661225 0.13E-07 0.48E-08 + 3.500000 0.729227 1.310102 0.12E-07 0.52E-08 + 3.600000 0.742712 1.310080 0.11E-07 0.54E-08 + 3.700000 0.758914 1.661237 0.98E-08 0.55E-08 + 3.800000 0.777506 1.004387 0.84E-08 0.55E-08 + 3.900000 0.798144 1.704019 0.70E-08 0.55E-08 + 4.000000 0.820474 1.214374 0.56E-08 0.53E-08 + 4.100000 0.844149 1.406358 0.43E-08 0.51E-08 + 4.200000 0.868832 1.600774 0.30E-08 0.49E-08 + 4.300000 0.894204 1.038382 0.18E-08 0.45E-08 + 4.400000 0.919964 1.727533 0.65E-09 0.42E-08 + 4.500000 0.945834 1.126875 0.39E-09 0.38E-08 + 4.600000 0.971557 1.496974 0.14E-08 0.34E-08 + 4.700000 0.996898 1.525070 0.22E-08 0.29E-08 + 4.800000 1.021641 1.101030 0.30E-08 0.25E-08 + 4.900000 1.045589 1.730922 0.37E-08 0.21E-08 + 5.000000 1.068565 1.056480 0.44E-08 0.16E-08 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 1001, nstf = 100100 - u error = 0.757E-08, v error = 0.324E-08, total error = 0.582E-08 - Total RHS evals: Fs = 5006, Ff = 301303 + u error = 0.757E-08, v error = 0.324E-08, total error = 0.582E-08 + Total RHS evals: Fs = 5006, Ff = 300350 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_7_0.001.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_7_0.001.out index 003c14af6c..925d9c3474 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_7_0.001.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_7_0.001.out @@ -9,62 +9,62 @@ reltol: 0.1000E-08 abstol: 0.1000E-10 t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223725 1.077464 0.40E-09 0.57E-10 - 0.200000 1.220669 1.551800 0.41E-09 0.11E-09 - 0.300000 1.215594 1.467737 0.39E-09 0.16E-09 - 0.400000 1.208524 1.154583 0.39E-09 0.20E-09 - 0.500000 1.199496 1.721908 0.38E-09 0.24E-09 - 0.600000 1.188557 1.023517 0.38E-09 0.27E-09 - 0.700000 1.175764 1.622751 0.35E-09 0.30E-09 - 0.800000 1.161186 1.374632 0.34E-09 0.32E-09 - 0.900000 1.144904 1.245763 0.32E-09 0.34E-09 - 1.000000 1.127010 1.691839 0.30E-09 0.36E-09 - 1.100000 1.107609 1.000489 0.28E-09 0.37E-09 - 1.200000 1.086821 1.677552 0.25E-09 0.37E-09 - 1.300000 1.064777 1.277775 0.23E-09 0.37E-09 - 1.400000 1.041625 1.342455 0.20E-09 0.36E-09 - 1.500000 1.017531 1.642940 0.16E-09 0.35E-09 - 1.600000 0.992673 1.012112 0.12E-09 0.34E-09 - 1.700000 0.967253 1.714058 0.78E-10 0.32E-09 - 1.800000 0.941488 1.183867 0.35E-10 0.30E-09 - 1.900000 0.915617 1.437465 0.17E-10 0.27E-09 - 2.000000 0.889903 1.577082 0.70E-10 0.23E-09 - 2.100000 0.864625 1.056467 0.13E-09 0.20E-09 - 2.200000 0.840089 1.730920 0.20E-09 0.15E-09 - 2.300000 0.816616 1.101047 0.26E-09 0.10E-09 - 2.400000 0.794546 1.525051 0.33E-09 0.45E-10 - 2.500000 0.774227 1.496993 0.40E-09 0.20E-10 - 2.600000 0.756013 1.126857 0.47E-09 0.82E-10 - 2.700000 0.740246 1.727536 0.54E-09 0.15E-09 - 2.800000 0.727247 1.038393 0.59E-09 0.22E-09 - 2.900000 0.717301 1.600759 0.75E-09 0.30E-09 - 3.000000 0.710636 1.406380 0.67E-09 0.37E-09 - 3.100000 0.707412 1.214353 0.69E-09 0.43E-09 - 3.200000 0.707709 1.704026 0.70E-09 0.50E-09 - 3.300000 0.711520 1.004391 0.68E-09 0.55E-09 - 3.400000 0.718750 1.661225 0.65E-09 0.60E-09 - 3.500000 0.729227 1.310102 0.60E-09 0.63E-09 - 3.600000 0.742712 1.310080 0.55E-09 0.65E-09 - 3.700000 0.758914 1.661237 0.50E-09 0.68E-09 - 3.800000 0.777506 1.004387 0.42E-09 0.67E-09 - 3.900000 0.798144 1.704019 0.35E-09 0.67E-09 - 4.000000 0.820474 1.214374 0.29E-09 0.65E-09 - 4.100000 0.844149 1.406358 0.26E-09 0.62E-09 - 4.200000 0.868832 1.600774 0.15E-09 0.58E-09 - 4.300000 0.894204 1.038382 0.92E-10 0.56E-09 - 4.400000 0.919964 1.727533 0.36E-10 0.49E-09 - 4.500000 0.945834 1.126875 0.14E-10 0.47E-09 - 4.600000 0.971557 1.496974 0.63E-10 0.40E-09 - 4.700000 0.996898 1.525070 0.10E-09 0.35E-09 - 4.800000 1.021641 1.101030 0.15E-09 0.31E-09 - 4.900000 1.045589 1.730922 0.19E-09 0.23E-09 - 5.000000 1.068565 1.056480 0.39E-10 0.21E-09 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223725 1.077464 0.40E-09 0.57E-10 + 0.200000 1.220669 1.551800 0.41E-09 0.11E-09 + 0.300000 1.215594 1.467737 0.39E-09 0.16E-09 + 0.400000 1.208524 1.154583 0.39E-09 0.20E-09 + 0.500000 1.199496 1.721908 0.38E-09 0.24E-09 + 0.600000 1.188557 1.023517 0.38E-09 0.27E-09 + 0.700000 1.175764 1.622751 0.35E-09 0.30E-09 + 0.800000 1.161186 1.374632 0.34E-09 0.32E-09 + 0.900000 1.144904 1.245763 0.32E-09 0.34E-09 + 1.000000 1.127010 1.691839 0.30E-09 0.36E-09 + 1.100000 1.107609 1.000489 0.28E-09 0.37E-09 + 1.200000 1.086821 1.677552 0.25E-09 0.37E-09 + 1.300000 1.064777 1.277775 0.23E-09 0.37E-09 + 1.400000 1.041625 1.342455 0.20E-09 0.36E-09 + 1.500000 1.017531 1.642940 0.16E-09 0.35E-09 + 1.600000 0.992673 1.012112 0.12E-09 0.34E-09 + 1.700000 0.967253 1.714058 0.78E-10 0.32E-09 + 1.800000 0.941488 1.183867 0.35E-10 0.30E-09 + 1.900000 0.915617 1.437465 0.17E-10 0.27E-09 + 2.000000 0.889903 1.577082 0.70E-10 0.23E-09 + 2.100000 0.864625 1.056467 0.13E-09 0.20E-09 + 2.200000 0.840089 1.730920 0.20E-09 0.15E-09 + 2.300000 0.816616 1.101047 0.26E-09 0.10E-09 + 2.400000 0.794546 1.525051 0.33E-09 0.45E-10 + 2.500000 0.774227 1.496993 0.40E-09 0.20E-10 + 2.600000 0.756013 1.126857 0.47E-09 0.82E-10 + 2.700000 0.740246 1.727536 0.54E-09 0.15E-09 + 2.800000 0.727247 1.038393 0.59E-09 0.22E-09 + 2.900000 0.717301 1.600759 0.75E-09 0.30E-09 + 3.000000 0.710636 1.406380 0.67E-09 0.37E-09 + 3.100000 0.707412 1.214353 0.69E-09 0.43E-09 + 3.200000 0.707709 1.704026 0.70E-09 0.50E-09 + 3.300000 0.711520 1.004391 0.68E-09 0.55E-09 + 3.400000 0.718750 1.661225 0.65E-09 0.60E-09 + 3.500000 0.729227 1.310102 0.60E-09 0.63E-09 + 3.600000 0.742712 1.310080 0.55E-09 0.65E-09 + 3.700000 0.758914 1.661237 0.50E-09 0.68E-09 + 3.800000 0.777506 1.004387 0.42E-09 0.67E-09 + 3.900000 0.798144 1.704019 0.35E-09 0.67E-09 + 4.000000 0.820474 1.214374 0.29E-09 0.65E-09 + 4.100000 0.844149 1.406358 0.26E-09 0.62E-09 + 4.200000 0.868832 1.600774 0.15E-09 0.58E-09 + 4.300000 0.894204 1.038382 0.92E-10 0.56E-09 + 4.400000 0.919964 1.727533 0.36E-10 0.49E-09 + 4.500000 0.945834 1.126875 0.14E-10 0.47E-09 + 4.600000 0.971557 1.496974 0.63E-10 0.40E-09 + 4.700000 0.996898 1.525070 0.10E-09 0.35E-09 + 4.800000 1.021641 1.101030 0.15E-09 0.31E-09 + 4.900000 1.045589 1.730922 0.19E-09 0.23E-09 + 5.000000 1.068565 1.056480 0.39E-10 0.21E-09 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 - u error = 0.380E-09, v error = 0.394E-09, total error = 0.387E-09 - Total RHS evals: Fs = 45313, Ff = 1550001 + u error = 0.380E-09, v error = 0.394E-09, total error = 0.387E-09 + Total RHS evals: Fs = 45313, Ff = 1530050 Slow Newton iters = 30312 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_8_0.001.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_8_0.001.out index f008ab179f..bd101638aa 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_8_0.001.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_8_0.001.out @@ -9,62 +9,62 @@ reltol: 0.1000E-08 abstol: 0.1000E-10 t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223725 1.077464 0.28E-09 0.26E-10 - 0.200000 1.220669 1.551800 0.18E-09 0.48E-10 - 0.300000 1.215594 1.467737 0.19E-09 0.69E-10 - 0.400000 1.208524 1.154583 0.18E-09 0.88E-10 - 0.500000 1.199496 1.721908 0.18E-09 0.10E-09 - 0.600000 1.188557 1.023517 0.17E-09 0.12E-09 - 0.700000 1.175764 1.622751 0.17E-09 0.13E-09 - 0.800000 1.161186 1.374632 0.16E-09 0.14E-09 - 0.900000 1.144904 1.245763 0.15E-09 0.15E-09 - 1.000000 1.127010 1.691839 0.14E-09 0.15E-09 - 1.100000 1.107609 1.000489 0.13E-09 0.15E-09 - 1.200000 1.086821 1.677552 0.12E-09 0.16E-09 - 1.300000 1.064777 1.277775 0.11E-09 0.15E-09 - 1.400000 1.041625 1.342455 0.91E-10 0.15E-09 - 1.500000 1.017531 1.642940 0.70E-10 0.15E-09 - 1.600000 0.992673 1.012112 0.53E-10 0.14E-09 - 1.700000 0.967253 1.714058 0.32E-10 0.14E-09 - 1.800000 0.941488 1.183867 0.16E-10 0.12E-09 - 1.900000 0.915617 1.437465 0.11E-10 0.11E-09 - 2.000000 0.889903 1.577082 0.36E-10 0.99E-10 - 2.100000 0.864625 1.056467 0.66E-10 0.79E-10 - 2.200000 0.840089 1.730920 0.10E-09 0.64E-10 - 2.300000 0.816616 1.101047 0.13E-09 0.38E-10 - 2.400000 0.794546 1.525051 0.16E-09 0.17E-10 - 2.500000 0.774227 1.496993 0.19E-09 0.94E-11 - 2.600000 0.756013 1.126857 0.22E-09 0.40E-10 - 2.700000 0.740246 1.727536 0.26E-09 0.65E-10 - 2.800000 0.727247 1.038393 0.28E-09 0.10E-09 - 2.900000 0.717301 1.600759 0.30E-09 0.13E-09 - 3.000000 0.710636 1.406380 0.32E-09 0.16E-09 - 3.100000 0.707412 1.214353 0.33E-09 0.19E-09 - 3.200000 0.707709 1.704026 0.33E-09 0.21E-09 - 3.300000 0.711520 1.004391 0.32E-09 0.24E-09 - 3.400000 0.718750 1.661225 0.30E-09 0.25E-09 - 3.500000 0.729227 1.310102 0.29E-09 0.27E-09 - 3.600000 0.742712 1.310080 0.26E-09 0.28E-09 - 3.700000 0.758914 1.661237 0.22E-09 0.28E-09 - 3.800000 0.777506 1.004387 0.19E-09 0.29E-09 - 3.900000 0.798144 1.704019 0.16E-09 0.28E-09 - 4.000000 0.820474 1.214374 0.13E-09 0.27E-09 - 4.100000 0.844149 1.406358 0.97E-10 0.27E-09 - 4.200000 0.868832 1.600774 0.66E-10 0.26E-09 - 4.300000 0.894204 1.038382 0.38E-10 0.22E-09 - 4.400000 0.919964 1.727533 0.94E-11 0.23E-09 - 4.500000 0.945834 1.126875 0.10E-10 0.18E-09 - 4.600000 0.971557 1.496974 0.33E-10 0.17E-09 - 4.700000 0.996898 1.525070 0.50E-10 0.15E-09 - 4.800000 1.021641 1.101030 0.72E-10 0.11E-09 - 4.900000 1.045589 1.730922 0.93E-10 0.11E-09 - 5.000000 1.068565 1.056480 0.11E-09 0.64E-10 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223725 1.077464 0.28E-09 0.26E-10 + 0.200000 1.220669 1.551800 0.18E-09 0.48E-10 + 0.300000 1.215594 1.467737 0.19E-09 0.69E-10 + 0.400000 1.208524 1.154583 0.18E-09 0.88E-10 + 0.500000 1.199496 1.721908 0.18E-09 0.10E-09 + 0.600000 1.188557 1.023517 0.17E-09 0.12E-09 + 0.700000 1.175764 1.622751 0.17E-09 0.13E-09 + 0.800000 1.161186 1.374632 0.16E-09 0.14E-09 + 0.900000 1.144904 1.245763 0.15E-09 0.15E-09 + 1.000000 1.127010 1.691839 0.14E-09 0.15E-09 + 1.100000 1.107609 1.000489 0.13E-09 0.15E-09 + 1.200000 1.086821 1.677552 0.12E-09 0.16E-09 + 1.300000 1.064777 1.277775 0.11E-09 0.15E-09 + 1.400000 1.041625 1.342455 0.91E-10 0.15E-09 + 1.500000 1.017531 1.642940 0.70E-10 0.15E-09 + 1.600000 0.992673 1.012112 0.53E-10 0.14E-09 + 1.700000 0.967253 1.714058 0.32E-10 0.14E-09 + 1.800000 0.941488 1.183867 0.16E-10 0.12E-09 + 1.900000 0.915617 1.437465 0.11E-10 0.11E-09 + 2.000000 0.889903 1.577082 0.36E-10 0.99E-10 + 2.100000 0.864625 1.056467 0.66E-10 0.79E-10 + 2.200000 0.840089 1.730920 0.10E-09 0.64E-10 + 2.300000 0.816616 1.101047 0.13E-09 0.38E-10 + 2.400000 0.794546 1.525051 0.16E-09 0.17E-10 + 2.500000 0.774227 1.496993 0.19E-09 0.94E-11 + 2.600000 0.756013 1.126857 0.22E-09 0.40E-10 + 2.700000 0.740246 1.727536 0.26E-09 0.65E-10 + 2.800000 0.727247 1.038393 0.28E-09 0.10E-09 + 2.900000 0.717301 1.600759 0.30E-09 0.13E-09 + 3.000000 0.710636 1.406380 0.32E-09 0.16E-09 + 3.100000 0.707412 1.214353 0.33E-09 0.19E-09 + 3.200000 0.707709 1.704026 0.33E-09 0.21E-09 + 3.300000 0.711520 1.004391 0.32E-09 0.24E-09 + 3.400000 0.718750 1.661225 0.30E-09 0.25E-09 + 3.500000 0.729227 1.310102 0.29E-09 0.27E-09 + 3.600000 0.742712 1.310080 0.26E-09 0.28E-09 + 3.700000 0.758914 1.661237 0.22E-09 0.28E-09 + 3.800000 0.777506 1.004387 0.19E-09 0.29E-09 + 3.900000 0.798144 1.704019 0.16E-09 0.28E-09 + 4.000000 0.820474 1.214374 0.13E-09 0.27E-09 + 4.100000 0.844149 1.406358 0.97E-10 0.27E-09 + 4.200000 0.868832 1.600774 0.66E-10 0.26E-09 + 4.300000 0.894204 1.038382 0.38E-10 0.22E-09 + 4.400000 0.919964 1.727533 0.94E-11 0.23E-09 + 4.500000 0.945834 1.126875 0.10E-10 0.18E-09 + 4.600000 0.971557 1.496974 0.34E-10 0.17E-09 + 4.700000 0.996898 1.525070 0.50E-10 0.15E-09 + 4.800000 1.021641 1.101030 0.72E-10 0.11E-09 + 4.900000 1.045589 1.730922 0.93E-10 0.11E-09 + 5.000000 1.068565 1.056480 0.11E-09 0.64E-10 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 - u error = 0.179E-09, v error = 0.168E-09, total error = 0.174E-09 - Total RHS evals: Fse = 20001, Fsi = 50342, Ff = 1550001 + u error = 0.179E-09, v error = 0.168E-09, total error = 0.174E-09 + Total RHS evals: Fse = 20001, Fsi = 50342, Ff = 1530050 Slow Newton iters = 30341 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_9_0.001.out b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_9_0.001.out index 0c898eea9d..6e504b619b 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003_9_0.001.out +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003_9_0.001.out @@ -9,62 +9,62 @@ reltol: 0.1000E-11 abstol: 0.1000E-13 t u v uerr verr ------------------------------------------------------ - 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 - 0.100000 1.223725 1.077464 0.16E-10 0.64E-12 - 0.200000 1.220669 1.551800 0.16E-10 0.68E-12 - 0.300000 1.215594 1.467737 0.15E-10 0.96E-12 - 0.400000 1.208524 1.154583 0.15E-10 0.92E-12 - 0.500000 1.199496 1.721908 0.16E-10 0.17E-11 - 0.600000 1.188557 1.023517 0.15E-10 0.34E-11 - 0.700000 1.175764 1.622751 0.14E-10 0.22E-11 - 0.800000 1.161186 1.374632 0.12E-10 0.28E-11 - 0.900000 1.144904 1.245763 0.11E-10 0.31E-11 - 1.000000 1.127010 1.691839 0.13E-10 0.22E-11 - 1.100000 1.107609 1.000489 0.11E-10 0.20E-11 - 1.200000 1.086821 1.677552 0.95E-11 0.25E-11 - 1.300000 1.064777 1.277775 0.76E-11 0.81E-13 - 1.400000 1.041625 1.342455 0.52E-11 0.62E-12 - 1.500000 1.017531 1.642940 0.60E-11 0.26E-11 - 1.600000 0.992673 1.012112 0.38E-11 0.14E-11 - 1.700000 0.967253 1.714058 0.33E-11 0.30E-11 - 1.800000 0.941488 1.183867 0.23E-12 0.36E-12 - 1.900000 0.915617 1.437465 0.33E-11 0.12E-11 - 2.000000 0.889903 1.577082 0.66E-11 0.19E-11 - 2.100000 0.864625 1.056467 0.79E-11 0.16E-11 - 2.200000 0.840089 1.730920 0.67E-11 0.25E-11 - 2.300000 0.816616 1.101047 0.12E-10 0.18E-11 - 2.400000 0.794546 1.525051 0.15E-10 0.57E-12 - 2.500000 0.774227 1.496993 0.18E-10 0.67E-13 - 2.600000 0.756013 1.126857 0.22E-10 0.27E-11 - 2.700000 0.740246 1.727536 0.20E-10 0.73E-12 - 2.800000 0.727247 1.038393 0.25E-10 0.40E-11 - 2.900000 0.717301 1.600759 0.27E-10 0.93E-12 - 3.000000 0.710636 1.406380 0.28E-10 0.26E-11 - 3.100000 0.707412 1.214353 0.29E-10 0.42E-11 - 3.200000 0.707709 1.704026 0.28E-10 0.15E-11 - 3.300000 0.711520 1.004391 0.28E-10 0.63E-11 - 3.400000 0.718750 1.661225 0.26E-10 0.24E-11 - 3.500000 0.729227 1.310102 0.24E-10 0.48E-11 - 3.600000 0.742712 1.310080 0.21E-10 0.50E-11 - 3.700000 0.758914 1.661237 0.20E-10 0.28E-11 - 3.800000 0.777506 1.004387 0.16E-10 0.70E-11 - 3.900000 0.798144 1.704019 0.14E-10 0.25E-11 - 4.000000 0.820474 1.214374 0.10E-10 0.54E-11 - 4.100000 0.844149 1.406358 0.65E-11 0.83E-11 - 4.200000 0.868832 1.600774 0.36E-11 0.11E-10 - 4.300000 0.894204 1.038382 0.16E-11 0.25E-12 - 4.400000 0.919964 1.727533 0.23E-11 0.12E-10 - 4.500000 0.945834 1.126875 0.23E-11 0.75E-12 - 4.600000 0.971557 1.496974 0.52E-11 0.69E-11 - 4.700000 0.996898 1.525070 0.85E-11 0.69E-11 - 4.800000 1.021641 1.101030 0.85E-11 0.16E-11 - 4.900000 1.045589 1.730922 0.61E-11 0.95E-11 - 5.000000 1.068565 1.056480 0.10E-10 0.34E-11 + 0.000000 1.224745 1.732051 0.00E+00 0.00E+00 + 0.100000 1.223725 1.077464 0.16E-10 0.64E-12 + 0.200000 1.220669 1.551800 0.16E-10 0.68E-12 + 0.300000 1.215594 1.467737 0.15E-10 0.96E-12 + 0.400000 1.208524 1.154583 0.15E-10 0.92E-12 + 0.500000 1.199496 1.721908 0.16E-10 0.17E-11 + 0.600000 1.188557 1.023517 0.15E-10 0.34E-11 + 0.700000 1.175764 1.622751 0.14E-10 0.22E-11 + 0.800000 1.161186 1.374632 0.12E-10 0.28E-11 + 0.900000 1.144904 1.245763 0.11E-10 0.31E-11 + 1.000000 1.127010 1.691839 0.13E-10 0.22E-11 + 1.100000 1.107609 1.000489 0.11E-10 0.21E-11 + 1.200000 1.086821 1.677552 0.95E-11 0.19E-11 + 1.300000 1.064777 1.277775 0.76E-11 0.19E-11 + 1.400000 1.041625 1.342455 0.52E-11 0.26E-11 + 1.500000 1.017531 1.642940 0.60E-11 0.58E-11 + 1.600000 0.992673 1.012112 0.38E-11 0.34E-11 + 1.700000 0.967253 1.714058 0.33E-11 0.27E-11 + 1.800000 0.941488 1.183867 0.24E-12 0.38E-11 + 1.900000 0.915617 1.437465 0.33E-11 0.58E-11 + 2.000000 0.889903 1.577082 0.66E-11 0.89E-11 + 2.100000 0.864625 1.056467 0.79E-11 0.74E-11 + 2.200000 0.840089 1.730920 0.67E-11 0.45E-11 + 2.300000 0.816616 1.101047 0.12E-10 0.30E-11 + 2.400000 0.794546 1.525051 0.15E-10 0.89E-11 + 2.500000 0.774227 1.496993 0.18E-10 0.11E-10 + 2.600000 0.756013 1.126857 0.22E-10 0.14E-10 + 2.700000 0.740246 1.727536 0.20E-10 0.69E-11 + 2.800000 0.727247 1.038393 0.25E-10 0.78E-12 + 2.900000 0.717301 1.600759 0.27E-10 0.11E-10 + 3.000000 0.710636 1.406380 0.28E-10 0.11E-10 + 3.100000 0.707412 1.214353 0.29E-10 0.20E-10 + 3.200000 0.707709 1.704026 0.28E-10 0.97E-11 + 3.300000 0.711520 1.004391 0.28E-10 0.71E-11 + 3.400000 0.718750 1.661225 0.26E-10 0.11E-10 + 3.500000 0.729227 1.310102 0.24E-10 0.11E-10 + 3.600000 0.742712 1.310080 0.21E-10 0.26E-10 + 3.700000 0.758914 1.661237 0.20E-10 0.14E-10 + 3.800000 0.777506 1.004387 0.16E-10 0.14E-10 + 3.900000 0.798144 1.704019 0.14E-10 0.60E-11 + 4.000000 0.820474 1.214374 0.10E-10 0.11E-10 + 4.100000 0.844149 1.406358 0.65E-11 0.30E-10 + 4.200000 0.868832 1.600774 0.36E-11 0.50E-11 + 4.300000 0.894204 1.038382 0.16E-11 0.10E-10 + 4.400000 0.919964 1.727533 0.23E-11 0.11E-10 + 4.500000 0.945834 1.126875 0.23E-11 0.55E-11 + 4.600000 0.971557 1.496974 0.52E-11 0.15E-10 + 4.700000 0.996898 1.525070 0.85E-11 0.77E-12 + 4.800000 1.021641 1.101030 0.85E-11 0.19E-11 + 4.900000 1.045589 1.730922 0.61E-11 0.88E-11 + 5.000000 1.068565 1.056480 0.10E-10 0.34E-11 ------------------------------------------------------ Final Solver Statistics: Steps: nsts = 5000, nstf = 510000 - u error = 0.153E-10, v error = 0.419E-11, total error = 0.112E-10 - Total RHS evals: Fse = 30001, Fsi = 82555, Ff = 2070001 + u error = 0.153E-10, v error = 0.950E-11, total error = 0.127E-10 + Total RHS evals: Fse = 30001, Fsi = 82555, Ff = 2040050 Slow Newton iters = 52554 Slow Newton conv fails = 0 Slow Jacobian evals = 250 diff --git a/examples/arkode/F77_parallel/CMakeLists.txt b/examples/arkode/F77_parallel/CMakeLists.txt deleted file mode 100644 index b0bc877a68..0000000000 --- a/examples/arkode/F77_parallel/CMakeLists.txt +++ /dev/null @@ -1,143 +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 -# --------------------------------------------------------------- -# CMakeLists.txt file for the FARKODE parallel examples -# --------------------------------------------------------------- - -# Example lists are tuples "name\;nodes\;tasks\;type" where the -# type is develop for examples excluded from 'make test' in releases - -# Examples using SUNDIALS linear solvers -set(FARKODE_examples - "fark_diag_non_p\;1\;4\;develop" - "fark_diag_kry_bbd_p\;1\;4\;develop" - ) - -# Auxiliary files to install -set(ARKODE_extras - ) - -if(MPI_Fortran_COMPILER) - # use MPI wrapper as the compiler - set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER}) -else() - # add MPI_INCLUDE_PATH to include directories - include_directories(${MPI_INCLUDE_PATH}) -endif() - -# Specify libraries to link against -set(ARKODE_LIB sundials_arkode) -set(NVECP_LIB sundials_nvecparallel) -set(FNVECP_LIB sundials_fnvecparallel) - -# Only static FCMIX libraries are available -set(FARKODE_LIB sundials_farkode${_STATIC_LIB_SUFFIX}) - -# Set-up linker flags and link libraries -set(SUNDIALS_LIBS ${FARKODE_LIB} ${ARKODE_LIB} ${FNVECP_LIB} ${NVECP_LIB} ${EXE_EXTRA_LINK_LIBS}) - - -# Add the build and install targets for each ARKODE example -foreach(example_tuple ${FARKODE_examples}) - - list(GET example_tuple 0 example) - list(GET example_tuple 1 number_of_nodes) - list(GET example_tuple 2 number_of_tasks) - list(GET example_tuple 3 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - MPI_NPROCS ${number_of_tasks} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS}) - - if(NOT MPI_Fortran_COMPILER) - target_link_libraries(${example} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARIES}) - endif() - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_parallel) - endif() - -endforeach(example_tuple ${FARKODE_examples}) - - -# create Makfile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) - - # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_parallel) - - # Install the extra files - foreach(extrafile ${ARKODE_extras}) - install(FILES ${extrafile} DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_parallel) - endforeach() - - # Prepare substitution variables for Makefile and/or CMakeLists templates - set(SOLVER "ARKODE") - set(SOLVER_LIB "sundials_arkode") - set(SOLVER_FLIB "sundials_farkode") - - examples2string(FARKODE_examples EXAMPLES) - - # Regardless of the platform we're on, we will generate and install - # CMakeLists.txt file for building the examples. This file can then - # be used as a template for the user's own programs. - - # generate CMakelists.txt in the binary directory - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/cmakelists_parallel_F77_ex.in - ${PROJECT_BINARY_DIR}/examples/arkode/F77_parallel/CMakeLists.txt - @ONLY - ) - - # install CMakelists.txt - install( - FILES ${PROJECT_BINARY_DIR}/examples/arkode/F77_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_parallel - ) - - # On UNIX-type platforms, we also generate and install a makefile for - # building the examples. This makefile can then be used as a template - # for the user's own programs. - - if(UNIX) - # generate Makefile and place it in the binary dir - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/makefile_parallel_F77_ex.in - ${PROJECT_BINARY_DIR}/examples/arkode/F77_parallel/Makefile_ex - @ONLY - ) - # install the configured Makefile_ex as Makefile - install( - FILES ${PROJECT_BINARY_DIR}/examples/arkode/F77_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_parallel - RENAME Makefile - ) - endif() - - # add test_install target - sundials_add_test_install(arkode F77_parallel) - -endif() diff --git a/examples/arkode/F77_parallel/README b/examples/arkode/F77_parallel/README deleted file mode 100644 index 59f1612df4..0000000000 --- a/examples/arkode/F77_parallel/README +++ /dev/null @@ -1,47 +0,0 @@ -List of parallel ARKode F77 examples - - fark_diag_non_p : diagonal ODE example - non-stiff case (ERK) - fark_diag_kry_bbd_p : diagonal ODE example - stiff case (DIRK/SPGMR/FARKBBD) - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/F77_parallel/fark_diag_kry_bbd_p.f b/examples/arkode/F77_parallel/fark_diag_kry_bbd_p.f deleted file mode 100644 index c4f50a8a80..0000000000 --- a/examples/arkode/F77_parallel/fark_diag_kry_bbd_p.f +++ /dev/null @@ -1,373 +0,0 @@ -C ---------------------------------------------------------------- -C Programmer(s): Daniel R. Reynolds @ SMU -C ---------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C ---------------------------------------------------------------- -C Diagonal ODE example. Stiff case, with diagonal preconditioner. -C Uses FARKODE interfaces and FARKBBD interfaces. -C Solves problem twice -- with left and right preconditioning. -C -C Note that this problem should only work with SUNDIALS configured -C to use 'realtype' as 'double' and 'sunindextype' as '64bit' -C ---------------------------------------------------------------- -C -C Include MPI-Fortran header file for MPI_COMM_WORLD, MPI types. - - IMPLICIT NONE -C - INCLUDE "mpif.h" -C - INTEGER*8 NLOCAL - PARAMETER (NLOCAL=10) -C - INTEGER*4 NOUT, MYPE, IER, NPES, METH, IATOL, ITASK, IPRE, IGS - INTEGER*4 LLENRW, LLENIW, LNST, LNST_ATT, LNFE, LNFI, LNSETUP - INTEGER*4 LNETF, LNNI, LNCF, LLENRWLS, LLENIWLS, LNPE, LNPS, LNLI - INTEGER*4 LNCFL, JOUT - INTEGER*8 NEQ, I, IPAR(3), IOUT(35), MUDQ, MLDQ, MU, ML, NST - INTEGER*8 NST_ATT, NFE, NFI, NPSET, NPE, NPS, NNI, NLI, NCFN, NCFL - INTEGER*8 NETF, LENRW, LENIW, LENRWLS, LENIWLS, LENRWBBD, LENIWBBD - INTEGER*8 NGEBBD - DOUBLE PRECISION Y(1024), ROUT(6), RPAR(1) - DOUBLE PRECISION ALPHA, TOUT, ERMAX, AVDIM - DOUBLE PRECISION ATOL, ERRI, RTOL, GERMAX, DTOUT, T -C - DATA ATOL/1.0D-10/, RTOL/1.0D-5/, DTOUT/0.1D0/, NOUT/10/ - DATA LLENRW/1/, LLENIW/2/, LNST/3/, LNST_ATT/6/, LNFE/7/, LNFI/8/, - 1 LNSETUP/9/, LNETF/10/, LNNI/11/, LNCF/12/, LLENRWLS/14/, - 1 LLENIWLS/15/, LNPE/21/, LNPS/22/, LNLI/23/, LNCFL/24/ -C -C Get NPES and MYPE. Requires initialization of MPI. - CALL MPI_INIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,5) IER - 5 FORMAT(///' MPI_ERROR: MPI_INIT returned IER = ', I5) - STOP - ENDIF - CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NPES, IER) - IF (IER .NE. 0) THEN - WRITE(6,6) IER - 6 FORMAT(///' MPI_ERROR: MPI_COMM_SIZE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - CALL MPI_COMM_RANK(MPI_COMM_WORLD, MYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,7) IER - 7 FORMAT(///' MPI_ERROR: MPI_COMM_RANK returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Set input arguments. - NEQ = NPES * NLOCAL - T = 0.0D0 - METH = 0 - IATOL = 1 - ITASK = 1 - IPRE = 1 - IGS = 1 -C Set parameter alpha - ALPHA = 10.0D0 -C -C Load IPAR and RPAR - IPAR(1) = NLOCAL - IPAR(2) = MYPE - IPAR(3) = NEQ - RPAR(1) = ALPHA -C - DO I = 1, NLOCAL - Y(I) = 1.0D0 - ENDDO -C - IF (MYPE .EQ. 0) THEN - WRITE(6,15) NEQ, NLOCAL, ALPHA, RTOL, ATOL, NPES - 15 FORMAT('Diagonal test problem:'// - & ' NEQ = ', I3, / - & ' NLOCAL = ', I3, / - & ' parameter alpha = ', F8.3/ - & ' ydot_i = -alpha*i * y_i (i = 1,...,NEQ)'/ - & ' RTOL, ATOL = ', 2E10.1/ - & ' Method is DIRK/NEWTON/SPGMR'/ - & ' Precond is band-block-diagonal, using ARKBBDPRE' - & /' Number of processors = ', I3/) - ENDIF -C - CALL FNVINITP(MPI_COMM_WORLD, 4, NLOCAL, NEQ, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITP returned IER = ', I5) - CALL MPI_FINALIZE(IER) - STOP - ENDIF -C -C initialize SPGMR linear solver module - call FSUNSPGMRINIT(4, IPRE, 0, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRINIT IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - call FSUNSPGMRSETGSTYPE(4, IGS, IER) - IF (IER .NE. 0) THEN - WRITE(6,27) IER - 27 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETGSTYPE IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - CALL FARKMALLOC(T, Y, METH, IATOL, RTOL, ATOL, - & IOUT, ROUT, IPAR, RPAR, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FARKMALLOC returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C attach linear solver module to ARKLs interface - CALL FARKLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - 32 FORMAT(///' SUNDIALS_ERROR: FARKLSINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C initialize BBD preconditioner (build diagonal preconditioner) - MUDQ = 0 - MLDQ = 0 - MU = 0 - ML = 0 - CALL FARKBBDINIT(NLOCAL, MUDQ, MLDQ, MU, ML, 0.0D0, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FARKBBDINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - IF (MYPE .EQ. 0) WRITE(6,38) - 38 FORMAT(/'Preconditioning on left'/) -C -C Looping point for cases IPRE = 1 and 2. -C - 40 CONTINUE -C -C Loop through tout values, call solver, print output, test for failure. - TOUT = DTOUT - DO 60 JOUT = 1, NOUT -C - CALL FARKODE(TOUT, T, Y, ITASK, IER) -C - IF (MYPE .EQ. 0) WRITE(6,45) T, IOUT(LNST), IOUT(LNST_ATT), - & IOUT(LNFE), IOUT(LNFI) - 45 FORMAT(' t = ', E10.2, 5X, 'no. steps = ', I5, - & ' no. attempts = ', I5,' no. fe-s = ', I5, - & ' no. fi-s = ', I5) -C - IF (IER .NE. 0) THEN - WRITE(6,50) IER, IOUT(16) - 50 FORMAT(///' SUNDIALS_ERROR: FARKODE returned IER = ', I5, /, - & ' Linear Solver returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - TOUT = TOUT + DTOUT - 60 CONTINUE -C -C Get max. absolute error in the local vector. - ERMAX = 0.0D0 - DO 65 I = 1, NLOCAL - ERRI = Y(I) - EXP(-ALPHA * (MYPE * NLOCAL + I) * T) - ERMAX = MAX(ERMAX, ABS(ERRI)) - 65 CONTINUE -C Get global max. error from MPI_REDUCE call. - CALL MPI_REDUCE(ERMAX, GERMAX, 1, MPI_DOUBLE_PRECISION, MPI_MAX, - & 0, MPI_COMM_WORLD, IER) - IF (IER .NE. 0) THEN - WRITE(6,70) IER - 70 FORMAT(///' MPI_ERROR: MPI_REDUCE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - IF (MYPE .EQ. 0) WRITE(6,75) GERMAX - 75 FORMAT(/'Max. absolute error is', E10.2/) -C -C Print final statistics. - IF (MYPE .EQ. 0) THEN - NST = IOUT(LNST) - NST_ATT = IOUT(LNST_ATT) - NFE = IOUT(LNFE) - NFI = IOUT(LNFI) - NPSET = IOUT(LNSETUP) - NPE = IOUT(LNPE) - NPS = IOUT(LNPS) - NNI = IOUT(LNNI) - NLI = IOUT(LNLI) - AVDIM = DBLE(NLI) / DBLE(NNI) - NCFN = IOUT(LNCF) - NCFL = IOUT(LNCFL) - NETF = IOUT(LNETF) - LENRW = IOUT(LLENRW) - LENIW = IOUT(LLENIW) - LENRWLS = IOUT(LLENRWLS) - LENIWLS = IOUT(LLENIWLS) - WRITE(6,80) NST, NST_ATT, NFE, NFI, NPSET, NPE, NPS, NNI, NLI, - & AVDIM, NCFN, NCFL, NETF, LENRW, LENIW, LENRWLS, LENIWLS - 80 FORMAT(/'Final statistics:'// - & ' number of steps = ', I5/ - & ' number of steps att. = ', I5/ - & ' number of fe evals. = ', I5/ - & ' number of fi evals. = ', I5/ - & ' number of prec. setups = ', I5/ - & ' number of prec. evals. = ', I5/ - & ' number of prec. solves = ', I5/ - & ' number of nonl. iters. = ', I5/ - & ' number of lin. iters. = ', I5/ - & ' average Krylov subspace dimension (NLI/NNI) = ',F8.4/ - & ' number of conv. failures.. nonlinear = ', I3, - & ' linear = ', I3/ - & ' number of error test failures = ', I3/ - & ' main solver real/int workspace sizes = ',2I5/ - & ' linear solver real/int workspace sizes = ',2I5) - CALL FARKBBDOPT(LENRWBBD, LENIWBBD, NGEBBD) - WRITE(6,82) LENRWBBD, LENIWBBD, NGEBBD - 82 FORMAT('In ARKBBDPRE:'/ - & ' real/int local workspace = ', 2I5/ - & ' number of g evals. = ', I5) - ENDIF -C -C If IPRE = 1, re-initialize T, Y, and the solver, and loop for -C case IPRE = 2. Otherwise jump to final block. - IF (IPRE .EQ. 2) GO TO 99 -C - T = 0.0D0 - DO I = 1, NLOCAL - Y(I) = 1.0D0 - ENDDO -C - CALL FARKREINIT(T, Y, METH, IATOL, RTOL, ATOL, IER) - IF (IER .NE. 0) THEN - WRITE(6,91) IER - 91 FORMAT(///' SUNDIALS_ERROR: FARKREINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - IPRE = 2 -C - CALL FARKBBDREINIT(MUDQ, MLDQ, 0.0D0, IER) - IF (IER .NE. 0) THEN - WRITE(6,92) IER - 92 FORMAT(///' SUNDIALS_ERROR: FARKBBDREINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - CALL FSUNSPGMRSETPRECTYPE(4, IPRE, IER) - IF (IER .NE. 0) THEN - WRITE(6,93) IER - 93 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETPRECTYPE IER =',I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - IF (MYPE .EQ. 0) WRITE(6,95) - 95 FORMAT(//60('-')///'Preconditioning on right'/) - GO TO 40 -C -C Free the memory and finalize MPI. - 99 CALL FARKFREE - CALL MPI_FINALIZE(IER) -C - STOP - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FARKIFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Routine for right-hand side function fi - IMPLICIT NONE -C - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - INTEGER*8 MYPE, I, NLOCAL - DOUBLE PRECISION ALPHA -C - NLOCAL = IPAR(1) - MYPE = IPAR(2) - ALPHA = RPAR(1) -C - DO I = 1, NLOCAL - YDOT(I) = -ALPHA * (MYPE * NLOCAL + I) * Y(I) - ENDDO -C - IER = 0 -C - RETURN - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FARKEFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Routine for right-hand side function fe - IMPLICIT NONE -C - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - INTEGER*8 I, NLOCAL -C - NLOCAL = IPAR(1) -C - DO I = 1, NLOCAL - YDOT(I) = 0.D0 - ENDDO -C - IER = 0 -C - RETURN - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FARKGLOCFN(NLOC, T, YLOC, GLOC, IPAR, RPAR, IER) -C Routine to define local approximate function g, here the same as fi. - IMPLICIT NONE -C - INTEGER*8 NLOC, IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, YLOC(*), GLOC(*), RPAR(*) -C - CALL FARKIFUN(T, YLOC, GLOC, IPAR, RPAR, IER) -C - RETURN - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FARKCOMMFN(NLOC, T, YLOC, IPAR, RPAR, IER) -C Routine to perform communication required for evaluation of g. - INTEGER*8 NLOC, IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, YLOC(*), RPAR(*) - IER = 0 - RETURN - END diff --git a/examples/arkode/F77_parallel/fark_diag_kry_bbd_p.out b/examples/arkode/F77_parallel/fark_diag_kry_bbd_p.out deleted file mode 100644 index 88991b3bf9..0000000000 --- a/examples/arkode/F77_parallel/fark_diag_kry_bbd_p.out +++ /dev/null @@ -1,87 +0,0 @@ -Diagonal test problem: - - NEQ = 40 - NLOCAL = 10 - parameter alpha = 10.000 - ydot_i = -alpha*i * y_i (i = 1,...,NEQ) - RTOL, ATOL = 0.1E-04 0.1E-09 - Method is DIRK/NEWTON/SPGMR - Precond is band-block-diagonal, using ARKBBDPRE - Number of processors = 4 - - -Preconditioning on left - - t = 0.10E+00 no. steps = 173 no. attempts = 173 no. fe-s = 0 no. fi-s = 1846 - t = 0.20E+00 no. steps = 221 no. attempts = 221 no. fe-s = 0 no. fi-s = 2362 - t = 0.30E+00 no. steps = 248 no. attempts = 248 no. fe-s = 0 no. fi-s = 2650 - t = 0.40E+00 no. steps = 266 no. attempts = 266 no. fe-s = 0 no. fi-s = 2848 - t = 0.50E+00 no. steps = 281 no. attempts = 281 no. fe-s = 0 no. fi-s = 3007 - t = 0.60E+00 no. steps = 291 no. attempts = 291 no. fe-s = 0 no. fi-s = 3116 - t = 0.70E+00 no. steps = 300 no. attempts = 300 no. fe-s = 0 no. fi-s = 3215 - t = 0.80E+00 no. steps = 306 no. attempts = 306 no. fe-s = 0 no. fi-s = 3275 - t = 0.90E+00 no. steps = 312 no. attempts = 312 no. fe-s = 0 no. fi-s = 3335 - t = 0.10E+01 no. steps = 319 no. attempts = 319 no. fe-s = 0 no. fi-s = 3410 - -Max. absolute error is 0.76E-10 - - -Final statistics: - - number of steps = 319 - number of steps att. = 319 - number of fe evals. = 0 - number of fi evals. = 3410 - number of prec. setups = 25 - number of prec. evals. = 6 - number of prec. solves = 3380 - number of nonl. iters. = 1812 - number of lin. iters. = 1785 - average Krylov subspace dimension (NLI/NNI) = 0.9851 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 0 - main solver real/int workspace sizes = 861 265 - linear solver real/int workspace sizes = 535 126 -In ARKBBDPRE: - real/int local workspace = 160 72 - number of g evals. = 12 - - ------------------------------------------------------------- - - -Preconditioning on right - - t = 0.10E+00 no. steps = 173 no. attempts = 173 no. fe-s = 0 no. fi-s = 1846 - t = 0.20E+00 no. steps = 221 no. attempts = 221 no. fe-s = 0 no. fi-s = 2362 - t = 0.30E+00 no. steps = 248 no. attempts = 248 no. fe-s = 0 no. fi-s = 2650 - t = 0.40E+00 no. steps = 266 no. attempts = 266 no. fe-s = 0 no. fi-s = 2848 - t = 0.50E+00 no. steps = 281 no. attempts = 281 no. fe-s = 0 no. fi-s = 3007 - t = 0.60E+00 no. steps = 291 no. attempts = 291 no. fe-s = 0 no. fi-s = 3116 - t = 0.70E+00 no. steps = 300 no. attempts = 300 no. fe-s = 0 no. fi-s = 3215 - t = 0.80E+00 no. steps = 306 no. attempts = 306 no. fe-s = 0 no. fi-s = 3275 - t = 0.90E+00 no. steps = 312 no. attempts = 312 no. fe-s = 0 no. fi-s = 3335 - t = 0.10E+01 no. steps = 319 no. attempts = 319 no. fe-s = 0 no. fi-s = 3410 - -Max. absolute error is 0.76E-10 - - -Final statistics: - - number of steps = 319 - number of steps att. = 319 - number of fe evals. = 0 - number of fi evals. = 3410 - number of prec. setups = 25 - number of prec. evals. = 6 - number of prec. solves = 3380 - number of nonl. iters. = 1812 - number of lin. iters. = 1785 - average Krylov subspace dimension (NLI/NNI) = 0.9851 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 0 - main solver real/int workspace sizes = 861 270 - linear solver real/int workspace sizes = 535 126 -In ARKBBDPRE: - real/int local workspace = 160 72 - number of g evals. = 12 diff --git a/examples/arkode/F77_parallel/fark_diag_non_p.f b/examples/arkode/F77_parallel/fark_diag_non_p.f deleted file mode 100644 index 22f5fbfada..0000000000 --- a/examples/arkode/F77_parallel/fark_diag_non_p.f +++ /dev/null @@ -1,231 +0,0 @@ -C ---------------------------------------------------------------- -C Programmer(s): Daniel R. Reynolds @ SMU -C ---------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C ---------------------------------------------------------------- -C Diagonal ODE example. Nonstiff case: alpha = 10/NEQ. -C ---------------------------------------------------------------- -C -C Include MPI-Fortran header file for MPI_COMM_WORLD, MPI types. -C - IMPLICIT NONE -C - INCLUDE "mpif.h" - INTEGER*8 NLOCAL - PARAMETER (NLOCAL=2) -C - INTEGER*4 IER, MYPE, NPES, NOUT, LNST, LNST_ATT, LNFE, LNFI, LNNI - INTEGER*4 LNCF, LNETF, METH, IATOL, ITASK, JOUT - INTEGER*8 NEQ, I, NST, NST_ATT, NFE, NFI, NNI, NCFN, NETF - INTEGER*8 IOUT(35), IPAR(2) - DOUBLE PRECISION Y(128), ROUT(6), RPAR(1) - DOUBLE PRECISION ATOL, RTOL, DTOUT, T, ALPHA, TOUT - DOUBLE PRECISION ERMAX, ERRI, GERMAX -C - DATA ATOL/1.0D-10/, RTOL/1.0D-5/, DTOUT/0.1D0/, NOUT/10/ - DATA LNST/3/, LNST_ATT/6/, LNFE/7/, LNFI/8/, LNNI/11/, LNCF/12/, - 1 LNETF/10/ -C -C Get NPES and MYPE. Requires initialization of MPI. - CALL MPI_INIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,5) IER - 5 FORMAT(///' MPI_ERROR: MPI_INIT returned IER = ', I5) - STOP - ENDIF - CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NPES, IER) - IF (IER .NE. 0) THEN - WRITE(6,6) IER - 6 FORMAT(///' MPI_ERROR: MPI_COMM_SIZE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - CALL MPI_COMM_RANK(MPI_COMM_WORLD, MYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,7) IER - 7 FORMAT(///' MPI_ERROR: MPI_COMM_RANK returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Set input arguments. - NEQ = NPES * NLOCAL - T = 0.0D0 - METH = 1 - IATOL = 1 - ITASK = 1 -c Set parameter ALPHA - ALPHA = 10.0D0 / NEQ -C -C Load IPAR and RPAR - IPAR(1) = NLOCAL - IPAR(2) = MYPE - RPAR(1) = ALPHA -C - DO 10 I = 1, NLOCAL - 10 Y(I) = 1.0D0 -C - IF (MYPE .EQ. 0) THEN - WRITE(6,11) NEQ, NLOCAL, ALPHA - 11 FORMAT('Diagonal test problem:'//' NEQ = ', I3, / - 1 ' NLOCAL = ', I3, / - 2 ' parameter alpha = ', F8.3) - WRITE(6,12) - 12 FORMAT(' ydot_i = -alpha*i * y_i (i = 1,...,NEQ)') - WRITE(6,13) RTOL, ATOL - 13 FORMAT(' RTOL, ATOL = ', 2E10.1) - WRITE(6,14) - 14 FORMAT(' Method is ERK') - WRITE(6,15) NPES - 15 FORMAT(' Number of processors = ', I3//) - ENDIF -C - CALL FNVINITP(MPI_COMM_WORLD, 4, NLOCAL, NEQ, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITP returned IER = ', I5) - CALL MPI_FINALIZE(IER) - STOP - ENDIF -C - CALL FARKMALLOC(T, Y, METH, IATOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FARKMALLOC returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Loop through tout values, call solver, print output, test for failure. - TOUT = DTOUT - DO 70 JOUT = 1, NOUT -C - CALL FARKODE(TOUT, T, Y, ITASK, IER) -C - IF (MYPE .EQ. 0) WRITE(6,40) T, IOUT(LNST), IOUT(LNST_ATT), - & IOUT(LNFE), IOUT(LNFI) - 40 FORMAT(' t = ', D10.2, 5X, 'steps = ', I5, - & ' (attempted = ', I5, '), fe = ', I5, - & ' fi = ', I5) -C - IF (IER .NE. 0) THEN - WRITE(6,60) IER, IOUT(16) - 60 FORMAT(///' SUNDIALS_ERROR: FARKODE returned IER = ', I5, /, - & ' Linear Solver returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - TOUT = TOUT + DTOUT - 70 CONTINUE -C -C Get max. absolute error in the local vector. - ERMAX = 0.0D0 - DO 75 I = 1, NLOCAL - ERRI = Y(I) - EXP(-ALPHA * (MYPE * NLOCAL + I) * T) - ERMAX = MAX(ERMAX, ABS(ERRI)) - 75 CONTINUE -C Get global max. error from MPI_REDUCE call. - CALL MPI_REDUCE(ERMAX, GERMAX, 1, MPI_DOUBLE_PRECISION, MPI_MAX, - 1 0, MPI_COMM_WORLD, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - 80 FORMAT(///' MPI_ERROR: MPI_REDUCE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - IF (MYPE .EQ. 0) WRITE(6,85) GERMAX - 85 FORMAT(/'Max. absolute error is ', E10.2/) -C -C Print final statistics. - NST = IOUT(LNST) - NST_ATT = IOUT(LNST_ATT) - NFE = IOUT(LNFE) - NFI = IOUT(LNFI) - NNI = IOUT(LNNI) - NCFN = IOUT(LNCF) - NETF = IOUT(LNETF) - IF (MYPE .EQ. 0) WRITE (6,90) NST, NST_ATT, NFE, NFI, NNI, NCFN, - & NETF - 90 FORMAT(/'Final statistics:'// - & ' number of steps = ', I5/ - & ' number of step attempts = ', I5/ - & ' number of fe evals. = ', I5/ - & ' number of fi evals. = ', I5/ - & ' number of nonlinear iters. = ', I5/ - & ' number of nonlinear conv. failures = ', I3/ - & ' number of error test failures = ', I3) -C -C Free the memory and finalize MPI. - CALL FARKFREE - CALL MPI_FINALIZE(IER) - IF (IER .NE. 0) THEN - WRITE(6,95) IER - 95 FORMAT(///' MPI_ERROR: MPI_FINALIZE returned IER = ', I5) - STOP - ENDIF -C - STOP - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FARKIFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Routine for right-hand side function fi -C - IMPLICIT NONE -C - INTEGER*4 IER - INTEGER*8 IPAR(*) - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - INTEGER*8 NLOCAL, I -C - NLOCAL = IPAR(1) -C - DO I = 1, NLOCAL - YDOT(I) = 0.D0 - ENDDO -C - IER = 0 -C - RETURN - END -C ------------------------------------------------------------------------ -C - SUBROUTINE FARKEFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Routine for right-hand side function fe -C - IMPLICIT NONE -C - INTEGER*4 IER - INTEGER*8 IPAR(*) - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - INTEGER*8 MYPE - INTEGER*8 NLOCAL, I - DOUBLE PRECISION ALPHA -C - NLOCAL = IPAR(1) - MYPE = IPAR(2) - ALPHA = RPAR(1) -C - DO I = 1, NLOCAL - YDOT(I) = -ALPHA * (MYPE * NLOCAL + I) * Y(I) - ENDDO -C - IER = 0 -C - RETURN - END diff --git a/examples/arkode/F77_parallel/fark_diag_non_p.out b/examples/arkode/F77_parallel/fark_diag_non_p.out deleted file mode 100644 index ea79d61fe3..0000000000 --- a/examples/arkode/F77_parallel/fark_diag_non_p.out +++ /dev/null @@ -1,34 +0,0 @@ -Diagonal test problem: - - NEQ = 8 - NLOCAL = 2 - parameter alpha = 1.250 - ydot_i = -alpha*i * y_i (i = 1,...,NEQ) - RTOL, ATOL = 0.1E-04 0.1E-09 - Method is ERK - Number of processors = 4 - - - t = 0.10D+00 steps = 12 (attempted = 12), fe = 75 fi = 0 - t = 0.20D+00 steps = 21 (attempted = 21), fe = 129 fi = 0 - t = 0.30D+00 steps = 31 (attempted = 31), fe = 189 fi = 0 - t = 0.40D+00 steps = 40 (attempted = 40), fe = 243 fi = 0 - t = 0.50D+00 steps = 50 (attempted = 50), fe = 303 fi = 0 - t = 0.60D+00 steps = 59 (attempted = 59), fe = 357 fi = 0 - t = 0.70D+00 steps = 69 (attempted = 69), fe = 417 fi = 0 - t = 0.80D+00 steps = 78 (attempted = 78), fe = 471 fi = 0 - t = 0.90D+00 steps = 88 (attempted = 88), fe = 531 fi = 0 - t = 0.10D+01 steps = 97 (attempted = 97), fe = 585 fi = 0 - -Max. absolute error is 0.22E-08 - - -Final statistics: - - number of steps = 97 - number of step attempts = 97 - number of fe evals. = 585 - number of fi evals. = 0 - number of nonlinear iters. = 0 - number of nonlinear conv. failures = 0 - number of error test failures = 0 diff --git a/examples/arkode/F77_serial/CMakeLists.txt b/examples/arkode/F77_serial/CMakeLists.txt deleted file mode 100644 index 674e4e85ae..0000000000 --- a/examples/arkode/F77_serial/CMakeLists.txt +++ /dev/null @@ -1,294 +0,0 @@ -# --------------------------------------------------------------- -# Programmer(s): Daniel R. Reynolds @ SMU -# David J. Gardner @ 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 -# --------------------------------------------------------------- -# CMakeLists.txt file for the FARKODE F77 serial examples -# --------------------------------------------------------------- - -# Example lists are tuples "name\;type" where the type is -# 'develop' for examples excluded from 'make test' in releases - -# Examples using SUNDIALS linear solvers -set(FARKODE_examples - "fark_diurnal_kry_bp\;develop" - ) - -# Examples using LAPACK linear solvers -set(FARKODE_examples_BL - "fark_roberts_dnsL\;develop" - ) - -# Add sparse solvers examples for 64-bit indextype configurations only, -# not compatible with 32-bit indextype -if(SUNDIALS_INDEX_SIZE MATCHES "64") - - # Examples using KLU linear solver - set(FARKODE_examples_KLU - ) - - # Examples using SuperLU_MT linear solver - set(FARKODE_examples_SUPERLUMT - ) - -endif() - -# Auxiliary files to install -set(ARKODE_extras - ) - -# Specify libraries to link against -set(ARKODE_LIB sundials_arkode) -set(NVECS_LIB sundials_nvecserial) -set(FNVECS_LIB sundials_fnvecserial) - -# Only static FCMIX libraries are available -set(FARKODE_LIB sundials_farkode${_STATIC_LIB_SUFFIX}) - -# Set-up linker flags and link libraries -set(SUNDIALS_LIBS ${FARKODE_LIB} ${ARKODE_LIB} ${FNVECS_LIB} ${NVECS_LIB} ${EXE_EXTRA_LINK_LIBS}) - - -# Add the build and install targets for each FARKODE example -foreach(example_tuple ${FARKODE_examples}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial) - endif() - -endforeach(example_tuple ${FARKODE_examples}) - - -# Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) - - # Sundials LAPACK linear solver modules - set(SUNLINSOLLAPACK_LIBS - sundials_sunlinsollapackband - sundials_sunlinsollapackdense - sundials_fsunlinsollapackband - sundials_fsunlinsollapackdense) - - # LAPACK libraries - list(APPEND SUNLINSOLLAPACK_LIBS ${LAPACK_LIBRARIES}) - - foreach(example_tuple ${FARKODE_examples_BL}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLLAPACK_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial) - endif() - - endforeach(example_tuple ${FARKODE_examples_BL}) - -endif() - - -# Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) - - # Sundials KLU linear solver module - set(SUNLINSOLKLU_LIBS - sundials_sunlinsolklu - sundials_fsunlinsolklu) - - # KLU libraries - list(APPEND SUNLINSOLKLU_LIBS) - - foreach(example_tuple ${FARKODE_examples_KLU}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLKLU_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial) - endif() - - endforeach(example_tuple ${FARKODE_examples_KLU}) - -endif() - - -# Add the build and install targets for each SuperLU_MT example (if needed) -if(BUILD_SUNLINSOL_SUPERLUMT) - - # Sundials SuperLU_MT linear solver module - set(SUNLINSOLSLUMT_LIBS - sundials_sunlinsolsuperlumt - sundials_fsunlinsolsuperlumt) - - # SuperLU_MT libraries - list(APPEND SUNLINSOLSLUMT_LIBS ${SUPERLUMT_LIBRARIES}) - - foreach(example_tuple ${FARKODE_examples_SUPERLUMT}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLSLUMT_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial) - endif() - - endforeach(example_tuple ${FARKODE_examples_SUPERLUMT}) - -endif() - - -# create Makfile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) - - # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial) - - # Install the extra files - foreach(extrafile ${ARKODE_extras}) - install(FILES ${extrafile} DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial) - endforeach() - - # Prepare substitution variables for Makefile and/or CMakeLists templates - set(SOLVER "ARKODE") - set(SOLVER_LIB "sundials_arkode") - set(SOLVER_FLIB "sundials_farkode") - - examples2string(FARKODE_examples EXAMPLES) - - if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) - examples2string(FARKODE_examples_BL EXAMPLES_BL) - else() - set(EXAMPLES_BL "") - endif() - - if(BUILD_SUNLINSOL_KLU) - examples2string(FARKODE_examples_KLU EXAMPLES_KLU) - else() - set(EXAMPLES_KLU "") - endif() - - if(BUILD_SUNLINSOL_SUPERLUMT) - examples2string(FARKODE_examples_SUPERLUMT EXAMPLES_SLUMT) - else() - set(EXAMPLES_SLUMT "") - endif() - - # Regardless of the platform we're on, we will generate and install - # CMakeLists.txt file for building the examples. This file can then - # be used as a template for the user's own programs. - - # generate CMakelists.txt in the binary directory - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/cmakelists_serial_F77_ex.in - ${PROJECT_BINARY_DIR}/examples/arkode/F77_serial/CMakeLists.txt - @ONLY - ) - - # install CMakelists.txt - install( - FILES ${PROJECT_BINARY_DIR}/examples/arkode/F77_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial - ) - - # On UNIX-type platforms, we also generate and install a makefile for - # building the examples. This makefile can then be used as a template - # for the user's own programs. - - if(UNIX) - # generate Makefile and place it in the binary dir - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/makefile_serial_F77_ex.in - ${PROJECT_BINARY_DIR}/examples/arkode/F77_serial/Makefile_ex - @ONLY - ) - # install the configured Makefile_ex as Makefile - install( - FILES ${PROJECT_BINARY_DIR}/examples/arkode/F77_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial - RENAME Makefile - ) - endif() - - # add test_install target - sundials_add_test_install(arkode F77_serial) - -endif() diff --git a/examples/arkode/F77_serial/README b/examples/arkode/F77_serial/README deleted file mode 100644 index 37cc60c260..0000000000 --- a/examples/arkode/F77_serial/README +++ /dev/null @@ -1,47 +0,0 @@ -List of serial ARKODE F77 examples - - fark_diurnal_kry_bp : kinetics-transport example (DIRK/SPGMR/FARKBP) - fark_roberts_dnsL : chemical kinetics example (DIRK/DENSE lapack) - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/F77_serial/fark_diurnal_kry_bp.f b/examples/arkode/F77_serial/fark_diurnal_kry_bp.f deleted file mode 100644 index 11725b79e6..0000000000 --- a/examples/arkode/F77_serial/fark_diurnal_kry_bp.f +++ /dev/null @@ -1,413 +0,0 @@ -C ---------------------------------------------------------------- -C Programmer(s): Daniel R. Reynolds @ SMU -C ---------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C ---------------------------------------------------------------- -C FARKODE Example Problem: 2D kinetics-transport, -C precond. Krylov solver. -C -C An ODE system is generated from the following 2-species diurnal -C kinetics advection-diffusion PDE system in 2 space dimensions: -C -C dc(i)/dt = Kh*(d/dx)**2 c(i) + V*dc(i)/dx + (d/dy)(Kv(y)*dc(i)/dy) -C + Ri(c1,c2,t) for i = 1,2, where -C R1(c1,c2,t) = -q1*c1*c3 - q2*c1*c2 + 2*q3(t)*c3 + q4(t)*c2 , -C R2(c1,c2,t) = q1*c1*c3 - q2*c1*c2 - q4(t)*c2 , -C Kv(y) = Kv0*exp(y/5) , -C Kh, V, Kv0, q1, q2, and c3 are constants, and q3(t) and q4(t) -C vary diurnally. -C -C The problem is posed on the square -C 0 .le. x .le. 20, 30 .le. y .le. 50 (all in km), -C with homogeneous Neumann boundary conditions, and for time t in -C 0 .le. t .le. 86400 sec (1 day). -C -C The PDE system is treated by central differences on a uniform -C 10 x 10 mesh, with simple polynomial initial profiles. -C The problem is solved with ARKODE, with the DIRK/GMRES method and -C using the FARKBP banded preconditioner. -C -C Note that this problem should only work with SUNDIALS configured -C to use 'realtype' as 'double' and 'sunindextype' as '64bit' -C -C The second and third dimensions of U here must match the values of -C MX and MY, for consistency with the output statements below. -C ---------------------------------------------------------------- -C - IMPLICIT NONE - INTEGER*4 MX, MY - PARAMETER (MX=10, MY=10) - INTEGER*8 NEQ - PARAMETER (NEQ=2*MX*MY) -C - INTEGER*4 LNST, LNST_ATT, LNFE, LNFI, LNSETUP, LNNI, LNCF, LNPE - INTEGER*4 LNLI, LNPS, LNCFL, LH, LNETF, LLENRW, LLENIW, LLENRWLS - INTEGER*4 LLENIWLS, METH, IATOL, ITASK, IER, MAXL, JPRETYPE - INTEGER*4 IGSTYPE, JOUT - INTEGER*8 IOUT(35), IPAR(4), NST, NST_ATT, NFE, NFI, NPSET, NPE - INTEGER*8 NPS, NNI, NLI, NCFN, NCFL, NETF, MU, ML, LENRW, LENIW - INTEGER*8 LENRWLS, LENIWLS, LENRWBP, LENIWBP, NFEBP, MXSTEPS - DOUBLE PRECISION ATOL, AVDIM, DELT, FLOOR, RTOL, T, TOUT, TWOHR - DOUBLE PRECISION ROUT(6), U(2,MX,MY), RPAR(12) -C - DATA TWOHR/7200.0D0/, RTOL/1.0D-5/, FLOOR/100.0D0/, - 1 JPRETYPE/1/, IGSTYPE/1/, MAXL/0/, DELT/0.0D0/, MXSTEPS/10000/ - DATA LLENRW/1/, LLENIW/2/, LNST/3/, LNST_ATT/6/, LNFE/7/, LNFI/8/, - 1 LNETF/10/, LNCF/12/, LNNI/11/, LNSETUP/9/, LLENRWLS/14/, - 1 LLENIWLS/15/, LNPE/21/, LNLI/23/, LNPS/22/, LNCFL/24/ - DATA LH/2/ -C -C Load IPAR, RPAR, and initial values - CALL INITKX(MX, MY, U, IPAR, RPAR) -C -C Set other input arguments. - T = 0.0D0 - METH = 0 - IATOL = 1 - ATOL = RTOL * FLOOR - ITASK = 1 -C - WRITE(6,10) NEQ - 10 FORMAT('Krylov example problem:'// - 1 ' Kinetics-transport, NEQ = ', I4/) -C -C Initialize vector specification - CALL FNVINITS(4, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF -C -C initialize SPGMR linear solver module - call FSUNSPGMRINIT(4, JPRETYPE, MAXL, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRINIT IER = ', I5) - STOP - ENDIF - call FSUNSPGMRSETGSTYPE(4, IGSTYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,27) IER - 27 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETGSTYPE IER = ', I5) - STOP - ENDIF -C -C Initialize ARKODE - CALL FARKMALLOC(T, U, METH, IATOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FARKMALLOC returned IER = ', I5) - STOP - ENDIF -C - CALL FARKSETIIN('MAX_NSTEPS', MXSTEPS, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FARKSETIIN returned IER = ', I5) - STOP - ENDIF -C -C attach matrix and linear solver modules to ARKLs interface - CALL FARKLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FARKLSINIT returned IER = ',I5) - CALL FARKFREE - STOP - ENDIF -C -C Initialize band preconditioner - MU = 2 - ML = 2 - CALL FARKBPINIT(NEQ, MU, ML, IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FARKBPINIT returned IER = ', I5) - CALL FARKFREE - STOP - ENDIF -C -C Loop over output points, call FARKODE, print sample solution values. - TOUT = TWOHR - DO 70 JOUT = 1, 12 -C - CALL FARKODE(TOUT, T, U, ITASK, IER) -C - WRITE(6,50) T, IOUT(LNST), IOUT(LNST_ATT), ROUT(LH) - 50 FORMAT(/' t = ', E14.6, 5X, 'no. steps = ', I5, - 1 ' no. att. steps = ', I5, ' stepsize = ', E14.6) - WRITE(6,55) U(1,1,1), U(1,5,5), U(1,10,10), - 1 U(2,1,1), U(2,5,5), U(2,10,10) - 55 FORMAT(' c1 (bot.left/middle/top rt.) = ', 3E14.6/ - 1 ' c2 (bot.left/middle/top rt.) = ', 3E14.6) -C - IF (IER .NE. 0) THEN - WRITE(6,60) IER, IOUT(16) - 60 FORMAT(///' SUNDIALS_ERROR: FARKODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FARKFREE - STOP - ENDIF -C - TOUT = TOUT + TWOHR - 70 CONTINUE - -C Print final statistics. - NST = IOUT(LNST) - NST_ATT = IOUT(LNST_ATT) - NFE = IOUT(LNFE) - NFI = IOUT(LNFI) - NPSET = IOUT(LNSETUP) - NPE = IOUT(LNPE) - NPS = IOUT(LNPS) - NNI = IOUT(LNNI) - NLI = IOUT(LNLI) - AVDIM = DBLE(NLI) / DBLE(NNI) - NCFN = IOUT(LNCF) - NCFL = IOUT(LNCFL) - NETF = IOUT(LNETF) - LENRW = IOUT(LLENRW) - LENIW = IOUT(LLENIW) - LENRWLS = IOUT(LLENRWLS) - LENIWLS = IOUT(LLENIWLS) - WRITE(6,80) NST, NST_ATT, NFE, NFI, NPSET, NPE, NPS, NNI, NLI, - 1 AVDIM, NCFN, NCFL, NETF, LENRW, LENIW, LENRWLS, LENIWLS - 80 FORMAT(//'Final statistics:'// - & ' number of steps = ', I6/ - & ' number of step att. = ', I6/ - & ' number of fe evals. = ', I6/ - & ' number of fi evals. = ', I6/ - & ' number of prec. setups = ', I6/ - & ' number of prec. evals. = ', I6/ - & ' number of prec. solves = ', I6/ - & ' number of nonl. iters. = ', I6/ - & ' number of lin. iters. = ', I6/ - & ' average Krylov subspace dimension (NLI/NNI) = ', E14.6/ - & ' number of conv. failures.. nonlinear =', I3, - & ' linear = ', I3/ - & ' number of error test failures = ', I3/ - & ' main solver real/int workspace sizes = ',2I5/ - & ' linear solver real/int workspace sizes = ',2I5) - CALL FARKBPOPT(LENRWBP, LENIWBP, NFEBP) - WRITE(6,82) LENRWBP, LENIWBP, NFEBP - 82 FORMAT('In ARKBANDPRE:'/ - & ' real/int workspace sizes = ', 2I5/ - & ' number of f evaluations = ', I5) -C - CALL FARKFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE INITKX(MX, MY, U0, IPAR, RPAR) -C Routine to set problem constants and initial values -C - IMPLICIT NONE -C - INTEGER*4 MX, MY - INTEGER*8 IPAR(*), NEQ - DOUBLE PRECISION RPAR(*) -C - INTEGER*8 MM, JY, JX - DOUBLE PRECISION U0 - DIMENSION U0(2,MX,MY) - DOUBLE PRECISION Q1, Q2, Q3, Q4, A3, A4, OM, C3, DY, HDCO - DOUBLE PRECISION VDCO, HACO, X, Y - DOUBLE PRECISION CX, CY, DKH, DKV0, DX, HALFDA, PI, VEL -C - DATA DKH/4.0D-6/, VEL/0.001D0/, DKV0/1.0D-8/, HALFDA/4.32D4/, - 1 PI/3.1415926535898D0/ -C -C Problem constants - MM = MX * MY - NEQ = 2 * MM - Q1 = 1.63D-16 - Q2 = 4.66D-16 - Q3 = 0.D0 - Q4 = 0.D0 - A3 = 22.62D0 - A4 = 7.601D0 - OM = PI / HALFDA - C3 = 3.7D16 - DX = 20.0D0 / (MX - 1.0D0) - DY = 20.0D0 / (MY - 1.0D0) - HDCO = DKH / DX**2 - HACO = VEL / (2.0D0 * DX) - VDCO = (1.0D0 / DY**2) * DKV0 -C Load constants in IPAR and RPAR - IPAR(1) = MX - IPAR(2) = MY - IPAR(3) = MM - IPAR(4) = NEQ -C - RPAR(1) = Q1 - RPAR(2) = Q2 - RPAR(3) = Q3 - RPAR(4) = Q4 - RPAR(5) = A3 - RPAR(6) = A4 - RPAR(7) = OM - RPAR(8) = C3 - RPAR(9) = DY - RPAR(10) = HDCO - RPAR(11) = VDCO - RPAR(12) = HACO -C -C Set initial profiles. - DO 20 JY = 1, MY - Y = 30.0D0 + (JY - 1.0D0) * DY - CY = (0.1D0 * (Y - 40.0D0))**2 - CY = 1.0D0 - CY + 0.5D0 * CY**2 - DO 10 JX = 1, MX - X = (JX - 1.0D0) * DX - CX = (0.1D0 * (X - 10.0D0))**2 - CX = 1.0D0 - CX + 0.5D0 * CX**2 - U0(1,JX,JY) = 1.0D6 * CX * CY - U0(2,JX,JY) = 1.0D12 * CX * CY - 10 CONTINUE - 20 CONTINUE -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FARKIFUN(T, U, UDOT, IPAR, RPAR, IER) -C Routine for right-hand side function fi - IMPLICIT NONE -C - INTEGER*4 IER - INTEGER*8 IPAR(*) - DOUBLE PRECISION T, U(2,*), UDOT(2,*), RPAR(*) -C - INTEGER*4 ILEFT, IRIGHT - INTEGER*8 MX, MY, MM, JY, JX, IBLOK0, IDN, IUP, IBLOK - DOUBLE PRECISION Q1,Q2,Q3,Q4, A3, A4, OM, C3, DY, HDCO, VDCO, HACO - DOUBLE PRECISION C1, C2, C1DN, C2DN, C1UP, C2UP, C1LT, C2LT - DOUBLE PRECISION C1RT, C2RT, CYDN, CYUP, HORD1, HORD2, HORAD1 - DOUBLE PRECISION HORAD2, QQ1, QQ2, QQ3, QQ4, RKIN1, RKIN2, S - DOUBLE PRECISION VERTD1, VERTD2, YDN, YUP -C -C Extract constants from IPAR and RPAR - MX = IPAR(1) - MY = IPAR(2) - MM = IPAR(3) -C - Q1 = RPAR(1) - Q2 = RPAR(2) - Q3 = RPAR(3) - Q4 = RPAR(4) - A3 = RPAR(5) - A4 = RPAR(6) - OM = RPAR(7) - C3 = RPAR(8) - DY = RPAR(9) - HDCO = RPAR(10) - VDCO = RPAR(11) - HACO = RPAR(12) -C -C Set diurnal rate coefficients. - S = SIN(OM * T) - IF (S .GT. 0.0D0) THEN - Q3 = EXP(-A3 / S) - Q4 = EXP(-A4 / S) - ELSE - Q3 = 0.0D0 - Q4 = 0.0D0 - ENDIF -C -C Loop over all grid points. - DO 20 JY = 1, MY - YDN = 30.0D0 + (JY - 1.5D0) * DY - YUP = YDN + DY - CYDN = VDCO * EXP(0.2D0 * YDN) - CYUP = VDCO * EXP(0.2D0 * YUP) - IBLOK0 = (JY - 1) * MX - IDN = -MX - IF (JY .EQ. 1) IDN = MX - IUP = MX - IF (JY .EQ. MY) IUP = -MX - DO 10 JX = 1, MX - IBLOK = IBLOK0 + JX - C1 = U(1,IBLOK) - C2 = U(2,IBLOK) -C Set kinetic rate terms. - QQ1 = Q1 * C1 * C3 - QQ2 = Q2 * C1 * C2 - QQ3 = Q3 * C3 - QQ4 = Q4 * C2 - RKIN1 = -QQ1 - QQ2 + 2.0D0 * QQ3 + QQ4 - RKIN2 = QQ1 - QQ2 - QQ4 -C Set vertical diffusion terms. - C1DN = U(1,IBLOK + IDN) - C2DN = U(2,IBLOK + IDN) - C1UP = U(1,IBLOK + IUP) - C2UP = U(2,IBLOK + IUP) - VERTD1 = CYUP * (C1UP - C1) - CYDN * (C1 - C1DN) - VERTD2 = CYUP * (C2UP - C2) - CYDN * (C2 - C2DN) -C Set horizontal diffusion and advection terms. - ILEFT = -1 - IF (JX .EQ. 1) ILEFT = 1 - IRIGHT = 1 - IF (JX .EQ. MX) IRIGHT = -1 - C1LT = U(1,IBLOK + ILEFT) - C2LT = U(2,IBLOK + ILEFT) - C1RT = U(1,IBLOK + IRIGHT) - C2RT = U(2,IBLOK + IRIGHT) - HORD1 = HDCO * (C1RT - 2.0D0 * C1 + C1LT) - HORD2 = HDCO * (C2RT - 2.0D0 * C2 + C2LT) - HORAD1 = HACO * (C1RT - C1LT) - HORAD2 = HACO * (C2RT - C2LT) -C Load all terms into UDOT. - UDOT(1,IBLOK) = VERTD1 + HORD1 + HORAD1 + RKIN1 - UDOT(2,IBLOK) = VERTD2 + HORD2 + HORAD2 + RKIN2 - 10 CONTINUE - 20 CONTINUE -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FARKEFUN(T, U, UDOT, IPAR, RPAR, IER) -C Routine for right-hand side function fe - IMPLICIT NONE -C - INTEGER*4 IER - INTEGER*8 IPAR(*) - DOUBLE PRECISION T, U(2,*), UDOT(2,*), RPAR(*) -C - INTEGER*8 MX, MY, JY, JX, IBLOK0, IBLOK -C -C Extract constants from IPAR - MX = IPAR(1) - MY = IPAR(2) -C -C Loop over all grid points, setting UDOT to zero - DO 20 JY = 1, MY - IBLOK0 = (JY - 1) * MX - DO 10 JX = 1, MX - IBLOK = IBLOK0 + JX - UDOT(1,IBLOK) = 0.D0 - UDOT(2,IBLOK) = 0.D0 - 10 CONTINUE - 20 CONTINUE -C - IER = 0 -C - RETURN - END diff --git a/examples/arkode/F77_serial/fark_diurnal_kry_bp.out b/examples/arkode/F77_serial/fark_diurnal_kry_bp.out deleted file mode 100644 index dd807ac51b..0000000000 --- a/examples/arkode/F77_serial/fark_diurnal_kry_bp.out +++ /dev/null @@ -1,73 +0,0 @@ -Krylov example problem: - - Kinetics-transport, NEQ = 200 - - - t = 0.720000E+04 no. steps = 987 no. att. steps = 989 stepsize = 0.306506E+01 - c1 (bot.left/middle/top rt.) = 0.104683E+05 0.296369E+05 0.111853E+05 - c2 (bot.left/middle/top rt.) = 0.252673E+12 0.715366E+12 0.269977E+12 - - t = 0.144000E+05 no. steps = 2737 no. att. steps = 2739 stepsize = 0.689853E+01 - c1 (bot.left/middle/top rt.) = 0.665902E+07 0.531590E+07 0.730081E+07 - c2 (bot.left/middle/top rt.) = 0.258191E+12 0.205675E+12 0.283286E+12 - - t = 0.216000E+05 no. steps = 3539 no. att. steps = 3541 stepsize = 0.104022E+02 - c1 (bot.left/middle/top rt.) = 0.266497E+08 0.103652E+08 0.293077E+08 - c2 (bot.left/middle/top rt.) = 0.299279E+12 0.102829E+12 0.331344E+12 - - t = 0.288000E+05 no. steps = 4697 no. att. steps = 4722 stepsize = 0.477171E+01 - c1 (bot.left/middle/top rt.) = 0.870214E+07 0.129200E+08 0.965006E+07 - c2 (bot.left/middle/top rt.) = 0.338037E+12 0.502942E+12 0.375097E+12 - - t = 0.360000E+05 no. steps = 5937 no. att. steps = 5962 stepsize = 0.255709E+01 - c1 (bot.left/middle/top rt.) = 0.140404E+05 0.202886E+05 0.156091E+05 - c2 (bot.left/middle/top rt.) = 0.338679E+12 0.489399E+12 0.376518E+12 - - t = 0.432000E+05 no. steps = 7127 no. att. steps = 7152 stepsize = 0.283066E+03 - c1 (bot.left/middle/top rt.) = 0.537446E-07 -0.895486E-05 0.770364E-06 - c2 (bot.left/middle/top rt.) = 0.338234E+12 0.135516E+12 0.380354E+12 - - t = 0.504000E+05 no. steps = 7153 no. att. steps = 7179 stepsize = 0.409586E+03 - c1 (bot.left/middle/top rt.) = 0.943663E-06 -0.118550E-03 0.177095E-04 - c2 (bot.left/middle/top rt.) = 0.335818E+12 0.493035E+12 0.386446E+12 - - t = 0.576000E+05 no. steps = 7171 no. att. steps = 7198 stepsize = 0.290889E+03 - c1 (bot.left/middle/top rt.) = -0.560472E-07 0.428395E-05 0.972997E-07 - c2 (bot.left/middle/top rt.) = 0.332033E+12 0.964976E+12 0.390901E+12 - - t = 0.648000E+05 no. steps = 7185 no. att. steps = 7212 stepsize = 0.645241E+03 - c1 (bot.left/middle/top rt.) = 0.188431E-15 -0.337015E-12 0.808647E-11 - c2 (bot.left/middle/top rt.) = 0.331304E+12 0.892178E+12 0.396344E+12 - - t = 0.720000E+05 no. steps = 7196 no. att. steps = 7223 stepsize = 0.645241E+03 - c1 (bot.left/middle/top rt.) = 0.494923E-16 0.207489E-11 -0.201885E-12 - c2 (bot.left/middle/top rt.) = 0.332974E+12 0.618628E+12 0.403886E+12 - - t = 0.792000E+05 no. steps = 7207 no. att. steps = 7234 stepsize = 0.645241E+03 - c1 (bot.left/middle/top rt.) = 0.656506E-16 -0.343161E-11 -0.863757E-11 - c2 (bot.left/middle/top rt.) = 0.333443E+12 0.666905E+12 0.412027E+12 - - t = 0.864000E+05 no. steps = 7218 no. att. steps = 7245 stepsize = 0.645241E+03 - c1 (bot.left/middle/top rt.) = 0.577960E-15 0.707844E-12 0.151082E-11 - c2 (bot.left/middle/top rt.) = 0.335180E+12 0.910620E+12 0.416253E+12 - - -Final statistics: - - number of steps = 7218 - number of step att. = 7245 - number of fe evals. = 0 - number of fi evals. = 75812 - number of prec. setups = 441 - number of prec. evals. = 120 - number of prec. solves = 110062 - number of nonl. iters. = 39584 - number of lin. iters. = 73470 - average Krylov subspace dimension (NLI/NNI) = 0.185605E+01 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 27 - main solver real/int workspace sizes = 3701 131 - linear solver real/int workspace sizes = 2455 42 -In ARKBANDPRE: - real/int workspace sizes = 2800 622 - number of f evaluations = 600 diff --git a/examples/arkode/F77_serial/fark_roberts_dnsL.f b/examples/arkode/F77_serial/fark_roberts_dnsL.f deleted file mode 100644 index 1dd337dbe7..0000000000 --- a/examples/arkode/F77_serial/fark_roberts_dnsL.f +++ /dev/null @@ -1,329 +0,0 @@ -C ---------------------------------------------------------------- -C Programmer(s): Daniel R. Reynolds @ SMU -C ---------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C ---------------------------------------------------------------- -C FARKODE Example Problem: Robertson kinetics, Lapack linear solver -C with dense user Jacobian. -C -C The following is a simple example problem, with the coding -C needed for its solution by ARKODE. The problem is from chemical -C kinetics, and consists of the following three rate equations: -C -C dy1/dt = -.04*y1 + 1.e4*y2*y3 -C dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2 -C dy3/dt = 3.e7*y2**2 -C -C on the interval from t = 0.0 to t = 4.e10, with initial -C conditions: -C -C y1 = 1.0, y2 = y3 = 0. -C -C The problem is stiff. While integrating the system, we also -C employ the root finding feature to find the points at which -C y1 = 1.e-4 or at which y3 = 0.01. The following coding solves -C this problem with ARKODE, using the Fortran/C interface routine -C package. This solution uses the DIRK method and a user-supplied -C Jacobian routine, and prints results at t = .4, 4., ..., 4.e10. -C It uses ITOL = 2 and ATOL much smaller for y2 than y1 or y3 -C because y2 has much smaller values. At the end of the run, -C various counters of interest are printed. -C -C Note that this problem should only work with SUNDIALS configured -C to use 'realtype' as 'double' and 'sunindextype' as '32bit' -C ---------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 IER, LNST, LNST_ATT, LNFE, LNFI, LNSETUP, LNNI, LNCF - INTEGER*4 LNETF, LNJE, LNGE, METH, ITOL, ITASK, JOUT, NOUT - INTEGER*4 IERROOT, INFO(2) - INTEGER*4 I - INTEGER*8 NEQ, IOUT(35), IPAR, MXSTEPS, MXNLI, PRED, MXETF - DOUBLE PRECISION RTOL, T, T0, TOUT, H0, NLCONV - DOUBLE PRECISION Y(3), ATOL(3), ROUT(6), RPAR -C - DATA LNST/3/, LNST_ATT/6/, LNFE/7/, LNFI/8/, LNETF/10/, LNCF/12/, - 1 LNNI/11/, LNSETUP/9/, LNGE/13/, LNJE/18/ -C - NEQ = 3 - MXSTEPS = 10000 - MXNLI = 8 - PRED = 1 - MXETF = 20 - T0 = 0.0D0 - Y(1) = 1.0D0 - Y(2) = 0.0D0 - Y(3) = 0.0D0 - METH = 0 - ITOL = 2 - RTOL = 1.0D-4 - ATOL(1) = 1.0D-8 - ATOL(2) = 1.0D-11 - ATOL(3) = 1.0D-8 - H0 = 1.0D-4 * RTOL - NLCONV = 1.0D-7 - TOUT = 0.4D0 - ITASK = 1 - JOUT = 0 - NOUT = 12 -C - WRITE(6,10) NEQ - 10 FORMAT('Dense example problem:'// - 1 ' Robertson kinetics, NEQ = ', I2//) -C - CALL FNVINITS(4, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF -C -C initialize dense matrix module - call FSUNDENSEMATINIT(4, NEQ, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNDENSEMATINIT IER = ', I5) - STOP - ENDIF -C -C initialize LAPACK dense linear solver module - call FSUNLAPACKDENSEINIT(4, IER) - IF (IER .NE. 0) THEN - WRITE(6,28) IER - 28 FORMAT(///' SUNDIALS_ERROR: FSUNLAPACKDENSEINIT IER = ', I5) - STOP - ENDIF -C - CALL FARKMALLOC(T0, Y, METH, ITOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FARKMALLOC returned IER = ', I5) - STOP - ENDIF -C - CALL FARKSETRIN('INIT_STEP', H0, IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - 32 FORMAT(///' SUNDIALS_ERROR: FARKSETRIN returned IER = ', I5) - STOP - ENDIF -C - CALL FARKSETRIN('NLCONV_COEF', NLCONV, IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - STOP - ENDIF -C - CALL FARKSETIIN('MAX_NSTEPS', MXSTEPS, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FARKSETIIN returned IER = ', I5) - STOP - ENDIF -C - CALL FARKSETIIN('MAX_NITERS', MXNLI, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - STOP - ENDIF -C - CALL FARKSETIIN('PREDICT_METHOD', PRED, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - STOP - ENDIF -C - CALL FARKSETIIN('MAX_ERRFAIL', MXETF, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - STOP - ENDIF -c - CALL FARKROOTINIT(2, IER) - IF (IER .NE. 0) THEN - WRITE(6,38) IER - 38 FORMAT(///' SUNDIALS_ERROR: FARKROOTINIT returned IER = ', I5) - CALL FARKFREE - STOP - ENDIF -C -C attach matrix and linear solver modules to ARKLs interface - CALL FARKLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FARKLSINIT returned IER = ',I5) - CALL FARKFREE - STOP - ENDIF -C - CALL FARKDENSESETJAC(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FARKDENSESETJAC returned IER = ',I5) - CALL FARKFREE - STOP - ENDIF -C - DO WHILE(JOUT .LT. NOUT) -C - CALL FARKODE(TOUT, T, Y, ITASK, IER) -C - WRITE(6,50) T, Y(1), Y(2), Y(3) - 50 FORMAT('At t = ', E12.4, ' y = ', 3E14.6) -C - IF (IER .LT. 0) THEN - WRITE(6,60) IER, IOUT(16) - 60 FORMAT(///' SUNDIALS_ERROR: FARKODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FARKROOTFREE - CALL FARKFREE - STOP - ENDIF -C - IF (IER .EQ. 2) THEN - CALL FARKROOTINFO(2, INFO, IERROOT) - IF (IERROOT .LT. 0) THEN - WRITE(6,65) IERROOT - 65 FORMAT(///' SUNDIALS_ERROR: FARKROOTINFO returned IER = ', - 1 I5) - CALL FARKROOTFREE - CALL FARKFREE - STOP - ENDIF - WRITE(6,70) (INFO(I), I = 1, 2) - 70 FORMAT(5X, 'Above is a root, INFO() = ', 2I3) - ENDIF -C - IF (IER .EQ. 0) THEN - TOUT = TOUT * 10.0D0 - JOUT = JOUT + 1 - ENDIF -C - ENDDO -C - CALL FARKDKY(T, 1, Y, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - 80 FORMAT(///' SUNDIALS_ERROR: FARKDKY returned IER = ', I4) - CALL FARKROOTFREE - CALL FARKFREE - STOP - ENDIF - WRITE(6,85) Y(1), Y(2), Y(3) - 85 FORMAT(/'Final value of ydot = ', 3E14.6) -C - WRITE(6,90) IOUT(LNST), IOUT(LNST_ATT), IOUT(LNFE), IOUT(LNFI), - 1 IOUT(LNJE), IOUT(LNSETUP), IOUT(LNNI), IOUT(LNCF), - 2 IOUT(LNETF), IOUT(LNGE) - 90 FORMAT(//'Final statistics:'// - 1 ' No. steps = ', I4, ', attempted = ', I4/ - 2 ' No. fe-s = ', I4, ', No. fi-s = ',I5/ - 3 ' No. J-s = ', I4, ', No. LU-s = ', I4/ - 4 ' No. nonlinear iterations = ', I5/ - 5 ' No. nonlinear convergence failures = ', I4/ - 6 ' No. error test failures = ', I4/ - 7 ' No. root function evals = ', I4) -C - CALL FARKROOTFREE - CALL FARKFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE FARKIFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Fortran routine for right-hand side function, fi - IMPLICIT NONE -C - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - YDOT(1) = -0.04D0 * Y(1) + 1.0D4 * Y(2) * Y(3) - YDOT(3) = 3.0D7 * Y(2) * Y(2) - YDOT(2) = -YDOT(1) - YDOT(3) -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FARKEFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Fortran routine for right-hand side function, fe - IMPLICIT NONE -C - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - YDOT(1) = 0.D0 - YDOT(3) = 0.D0 - YDOT(2) = 0.D0 -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FARKROOTFN(T, Y, G, IPAR, RPAR, IER) -C Fortran routine for root finding - IMPLICIT NONE -C - DOUBLE PRECISION T, Y(*), G(*), RPAR(*) - INTEGER*8 IPAR(*) - INTEGER*4 IER -C - G(1) = Y(1) - 1.0D-4 - G(2) = Y(3) - 1.0D-2 -C - IER = 0 - - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FARKDJAC(N, T, Y, FY, JAC, H, IPAR, RPAR, - 1 V1, V2, V3, IER) -C Fortran routine for dense user-supplied Jacobian. - IMPLICIT NONE -C - INTEGER*4 IER, N - INTEGER*8 IPAR(*) - DOUBLE PRECISION T, Y(*), FY(*), JAC(N,*), H, RPAR(*) - DOUBLE PRECISION V1(*), V2(*), V3(*) -C - DOUBLE PRECISION Y1, Y2, Y3 -C - Y1 = Y(1) - Y2 = Y(2) - Y3 = Y(3) - JAC(1,1) = -0.04D0 - JAC(1,2) = 1.0D4 * Y3 - JAC(1,3) = 1.0D4 * Y2 - JAC(2,1) = 0.04D0 - JAC(2,2) = -1.0D4 * Y3 - 6.0D7 * Y2 - JAC(2,3) = -1.0D4 * Y2 - JAC(3,3) = 0.0D0 - JAC(3,2) = 6.0D7 * Y2 - JAC(3,3) = 0.0D0 -C - IER = 0 -C - RETURN - END diff --git a/examples/arkode/F77_serial/fark_roberts_dnsL.out b/examples/arkode/F77_serial/fark_roberts_dnsL.out deleted file mode 100644 index 9d9525afe6..0000000000 --- a/examples/arkode/F77_serial/fark_roberts_dnsL.out +++ /dev/null @@ -1,34 +0,0 @@ -Dense example problem: - - Robertson kinetics, NEQ = 3 - - -At t = 0.2640E+00 y = 0.989965E+00 0.347057E-04 0.100000E-01 - Above is a root, INFO() = 0 1 -At t = 0.4000E+00 y = 0.985172E+00 0.338640E-04 0.147940E-01 -At t = 0.4000E+01 y = 0.905519E+00 0.224048E-04 0.944589E-01 -At t = 0.4000E+02 y = 0.715827E+00 0.918557E-05 0.284164E+00 -At t = 0.4000E+03 y = 0.450519E+00 0.322290E-05 0.549478E+00 -At t = 0.4000E+04 y = 0.183202E+00 0.894236E-06 0.816797E+00 -At t = 0.4000E+05 y = 0.389834E-01 0.162176E-06 0.961016E+00 -At t = 0.4000E+06 y = 0.493820E-02 0.198485E-07 0.995062E+00 -At t = 0.4000E+07 y = 0.516810E-03 0.206832E-08 0.999483E+00 -At t = 0.2080E+08 y = 0.100000E-03 0.399393E-09 0.999900E+00 - Above is a root, INFO() = -1 0 -At t = 0.4000E+08 y = 0.520314E-04 0.208160E-09 0.999948E+00 -At t = 0.4000E+09 y = 0.520776E-05 0.204359E-10 0.999995E+00 -At t = 0.4000E+10 y = 0.520930E-06 0.207751E-11 0.999999E+00 -At t = 0.4000E+11 y = 0.520789E-07 -0.201843E-12 0.100000E+01 - -Final value of ydot = -0.129983E-17 -0.281328E-22 0.129985E-17 - - -Final statistics: - - No. steps = 996, attempted = 1227 - No. fe-s = 0, No. fi-s = 34120 - No. J-s = 68, No. LU-s = 597 - No. nonlinear iterations = 28031 - No. nonlinear convergence failures = 17 - No. error test failures = 214 - No. root function evals = 1026 diff --git a/examples/arkode/F90_parallel/CMakeLists.txt b/examples/arkode/F90_parallel/CMakeLists.txt deleted file mode 100644 index a4d890237b..0000000000 --- a/examples/arkode/F90_parallel/CMakeLists.txt +++ /dev/null @@ -1,145 +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 -# --------------------------------------------------------------- -# CMakeLists.txt file for the ARKODE parallel F90 examples -# --------------------------------------------------------------- - -# Example lists are tuples "name\;nodes\;tasks\;type" where the -# type is develop for examples excluded from 'make test' in releases - -# Examples using SUNDIALS linear solvers -if(SUNDIALS_PRECISION MATCHES "double") - # The fark_heat2D only supports double precision - set(FARKODE_examples - "fark_heat2D\;1\;2\;develop" - ) - # Auxiliary files to install - set(FARKODE_extras - plot_heat2D.py - ) -endif() - -if(MPI_Fortran_COMPILER) - # use MPI wrapper as the compiler - set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER}) -else() - # add MPI_INCLUDE_PATH to include directories - include_directories(${MPI_INCLUDE_PATH}) -endif() - -# Specify libraries to link against -set(ARKODE_LIB sundials_arkode) -set(NVECP_LIB sundials_nvecparallel) -set(FNVECP_LIB sundials_fnvecparallel) - -# Only static FCMIX libraries are available -set(FARKODE_LIB sundials_farkode${_STATIC_LIB_SUFFIX}) - -# Set-up linker flags and link libraries -set(SUNDIALS_LIBS ${FARKODE_LIB} ${ARKODE_LIB} ${FNVECP_LIB} ${NVECP_LIB} ${EXE_EXTRA_LINK_LIBS}) - -# Add the build and install targets for each ARKODE example -foreach(example_tuple ${FARKODE_examples}) - - list(GET example_tuple 0 example) - list(GET example_tuple 1 number_of_nodes) - list(GET example_tuple 2 number_of_tasks) - list(GET example_tuple 3 example_type) - - # example source files - add_executable(${example} ${example}.f90) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - - # add example to regression tests - sundials_add_test(${example} ${example} - MPI_NPROCS ${number_of_tasks} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS}) - - if(NOT MPI_Fortran_COMPILER) - target_link_libraries(${example} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARIES}) - endif() - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_parallel) - endif() - -endforeach(example_tuple ${FARKODE_examples}) - - -# create Makfile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) - - # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_parallel) - - # Install the extra files - foreach(extrafile ${FARKODE_extras}) - install(FILES ${extrafile} DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_parallel) - endforeach() - - # Prepare substitution variables for Makefile and/or CMakeLists templates - set(SOLVER "ARKODE") - set(SOLVER_LIB "sundials_arkode") - set(SOLVER_FLIB "sundials_farkode") - - examples2string(FARKODE_examples EXAMPLES) - - # Regardless of the platform we're on, we will generate and install - # CMakeLists.txt file for building the examples. This file can then - # be used as a template for the user's own programs. - - # generate CMakelists.txt in the binary directory - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/cmakelists_parallel_F90_ex.in - ${PROJECT_BINARY_DIR}/examples/arkode/F90_parallel/CMakeLists.txt - @ONLY - ) - - # install CMakelists.txt - install( - FILES ${PROJECT_BINARY_DIR}/examples/arkode/F90_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_parallel - ) - - # On UNIX-type platforms, we also generate and install a makefile for - # building the examples. This makefile can then be used as a template - # for the user's own programs. - - if(UNIX) - # generate Makefile and place it in the binary dir - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/makefile_parallel_F90_ex.in - ${PROJECT_BINARY_DIR}/examples/arkode/F90_parallel/Makefile_ex - @ONLY - ) - # install the configured Makefile_ex as Makefile - install( - FILES ${PROJECT_BINARY_DIR}/examples/arkode/F90_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_parallel - RENAME Makefile - ) - endif() - - # add test_install target - sundials_add_test_install(arkode F90_parallel) - -endif() diff --git a/examples/arkode/F90_parallel/README b/examples/arkode/F90_parallel/README deleted file mode 100644 index 388b44115e..0000000000 --- a/examples/arkode/F90_parallel/README +++ /dev/null @@ -1,52 +0,0 @@ -List of parallel ARKODE F90 examples - - fark_heat2D : 2-D diffusion (PCG with Jacobi preconditioner) - -Sample results: - - The example output was produced by running with 2 MPI processes: - - mpiexec -n 2 ./fark_heat2D - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/F90_parallel/fark_heat2D.f90 b/examples/arkode/F90_parallel/fark_heat2D.f90 deleted file mode 100644 index 78b7ed0cf6..0000000000 --- a/examples/arkode/F90_parallel/fark_heat2D.f90 +++ /dev/null @@ -1,871 +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 -!----------------------------------------------------------------- -! Example problem: -! -! The following test simulates a simple anisotropic 2D heat -! equation, -! u_t = kx*u_xx + ky*u_yy + h, -! for t in [0, 10], (x,y) in [0, 1]^2, with initial conditions -! u(0,x,y) = 0, -! stationary boundary conditions, i.e. -! u_t(t,0,y) = u_t(t,1,y) = u_t(t,x,0) = u_t(t,x,1) = 0, -! and a heat source of the form -! h(x,y) = sin(pi*x)*sin(2*pi*y). -! -! Under this setup, the problem has an analytical solution: -! u(t,x,y) = a(t)*sin(pi*x)*sin(2*pi*y), where -! a(t) = (1 - exp(-(kx+4*ky)*pi^2*t)) / ((kx+4*ky)*pi^2). -! -! The spatial derivatives are computed using second-order -! centered differences, with the data distributed over nx*ny -! points on a uniform spatial grid. -! -! The spatial grid parameters nx and ny, the parameters kx and ky, -! as well as the desired relative and absolute solver tolerances, -! are provided in the input file input_heat2D.txt. -! -! This program solves the problem with a DIRK method. This -! employs a Newton iteration with the PCG iterative linear solver, -! which itself uses a Jacobi preconditioner. The example uses the -! built-in finite-difference Jacobian-vector product routine, but -! supplies both the RHS and preconditioner setup/solve functions. -! -! 20 outputs are printed at equal intervals, and run statistics -! are printed at the end. -!----------------------------------------------------------------- - -!----------------------------------------------------------------- -! Main driver program -!----------------------------------------------------------------- -module UserData - !--------------------------------------------------------------- - ! Description: - ! Module containing problem-defining parameters, as well as - ! data buffers for MPI exchanges with neighboring processes. - ! Also contains routines to: - ! (a) initialize the module - ! (b) perform exchanges - ! (c) free module data. - !--------------------------------------------------------------- - implicit none - include "sundials/sundials_fconfig.h" - save - - integer*8 :: nx ! global number of x grid points - integer*8 :: ny ! global number of y grid points - integer*8 :: is ! global x indices of this subdomain - integer*8 :: ie - integer*8 :: js ! global y indices of this subdomain - integer*8 :: je - integer*8 :: nxl ! local number of x grid points - integer*8 :: nyl ! local number of y grid points - real*8 :: dx ! x-directional mesh spacing - real*8 :: dy ! y-directional mesh spacing - real*8 :: kx ! x-directional diffusion coefficient - real*8 :: ky ! y-directional diffusion coefficient - real(kind=REALTYPE), dimension(:,:), allocatable :: h ! heat source vector - real(kind=REALTYPE), dimension(:,:), allocatable :: d ! inverse of Jacobian diagonal - integer :: comm ! communicator object - integer :: myid ! MPI process ID - integer :: nprocs ! total number of MPI processes - logical :: HaveNbor(2,2) ! flags denoting neighbor on boundary - real(kind=REALTYPE), dimension(:), allocatable :: Erecv ! receive buffers for neighbor exchange - real(kind=REALTYPE), dimension(:), allocatable :: Wrecv - real(kind=REALTYPE), dimension(:), allocatable :: Nrecv - real(kind=REALTYPE), dimension(:), allocatable :: Srecv - real(kind=REALTYPE), dimension(:), allocatable :: Esend ! send buffers for neighbor exchange - real(kind=REALTYPE), dimension(:), allocatable :: Wsend - real(kind=REALTYPE), dimension(:), allocatable :: Nsend - real(kind=REALTYPE), dimension(:), allocatable :: Ssend - -contains - - !--------------------------------------------------------------- - ! Initialize memory allocated within Userdata (set to defaults) - !--------------------------------------------------------------- - subroutine InitUserData() - implicit none - include "mpif.h" - nx = 0 - ny = 0 - is = 0 - ie = 0 - js = 0 - je = 0 - nxl = 0 - nyl = 0 - dx = 0.d0 - dy = 0.d0 - kx = 0.d0 - ky = 0.d0 - if (allocated(h)) deallocate(h) - if (allocated(d)) deallocate(d) - comm = MPI_COMM_WORLD - myid = 0 - nprocs = 0 - HaveNbor = .false. - if (allocated(Erecv)) deallocate(Erecv) - if (allocated(Wrecv)) deallocate(Wrecv) - if (allocated(Nrecv)) deallocate(Nrecv) - if (allocated(Srecv)) deallocate(Srecv) - if (allocated(Esend)) deallocate(Esend) - if (allocated(Wsend)) deallocate(Wsend) - if (allocated(Nsend)) deallocate(Nsend) - if (allocated(Ssend)) deallocate(Ssend) - end subroutine InitUserData - !--------------------------------------------------------------- - - - !--------------------------------------------------------------- - ! Set up parallel decomposition - !--------------------------------------------------------------- - subroutine SetupDecomp(ierr) - ! declarations - implicit none - include "mpif.h" - integer, intent(out) :: ierr - integer :: dims(2), periods(2), coords(2) - - ! internals - - ! check that this has not been called before - if (allocated(h) .or. allocated(d)) then - write(0,*) "SetupDecomp warning: parallel decomposition already set up" - ierr = 1 - return - end if - - ! get suggested parallel decomposition - dims = (/0, 0/) - call MPI_Comm_size(MPI_COMM_WORLD, nprocs, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Comm_size = " , ierr - return - end if - call MPI_Dims_create(nprocs, 2, dims, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Dims_create = " , ierr - return - end if - - ! set up 2D Cartesian communicator - periods = (/0, 0/) - call MPI_Cart_create(MPI_COMM_WORLD, 2, dims, periods, 0, comm, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Cart_create = " , ierr - return - end if - call MPI_Comm_rank(comm, myid, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Comm_rank = " , ierr - return - end if - - ! determine local extents - call MPI_Cart_get(comm, 2, dims, periods, coords, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Cart_get = " , ierr - return - end if - is = nx*coords(1)/dims(1) + 1 - ie = nx*(coords(1)+1)/dims(1) - js = ny*coords(2)/dims(2) + 1 - je = ny*(coords(2)+1)/dims(2) - nxl = ie-is+1 - nyl = je-js+1 - - ! determine if I have neighbors, and allocate exchange buffers - HaveNbor(1,1) = (is /= 1) - HaveNbor(1,2) = (ie /= nx) - HaveNbor(2,1) = (js /= 1) - HaveNbor(2,2) = (je /= ny) - if (HaveNbor(1,1)) then - allocate(Wrecv(nyl)) - allocate(Wsend(nyl)) - endif - if (HaveNbor(1,2)) then - allocate(Erecv(nyl)) - allocate(Esend(nyl)) - endif - if (HaveNbor(2,1)) then - allocate(Srecv(nxl)) - allocate(Ssend(nxl)) - endif - if (HaveNbor(2,2)) then - allocate(Nrecv(nxl)) - allocate(Nsend(nxl)) - endif - - ! allocate temporary vectors - allocate(h(nxl,nyl)) ! Create vector for heat source - allocate(d(nxl,nyl)) ! Create vector for Jacobian diagonal - - ierr = 0 ! return with success flag - return - end subroutine SetupDecomp - !--------------------------------------------------------------- - - - !--------------------------------------------------------------- - ! Perform neighbor exchange - !--------------------------------------------------------------- - subroutine Exchange(y, ierr) - ! declarations - implicit none - include "mpif.h" - real(kind=REALTYPE), intent(in) :: y(nxl,nyl) - integer, intent(out) :: ierr - integer :: reqSW, reqSE, reqSS, reqSN, reqRW, reqRE, reqRS, reqRN; - integer :: stat(MPI_STATUS_SIZE) - integer*8 :: i - integer :: ipW, ipE, ipS, ipN - integer :: coords(2), dims(2), periods(2), nbcoords(2) - - ! internals - - ! MPI neighborhood information - call MPI_Cart_get(comm, 2, dims, periods, coords, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Cart_get = ", ierr - return - endif - if (HaveNbor(1,1)) then - nbcoords = (/ coords(1)-1, coords(2) /) - call MPI_Cart_rank(comm, nbcoords, ipW, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Cart_rank = ", ierr - return - endif - endif - if (HaveNbor(1,2)) then - nbcoords = (/ coords(1)+1, coords(2) /) - call MPI_Cart_rank(comm, nbcoords, ipE, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Cart_rank = ", ierr - return - endif - endif - if (HaveNbor(2,1)) then - nbcoords = (/ coords(1), coords(2)-1 /) - call MPI_Cart_rank(comm, nbcoords, ipS, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Cart_rank = ", ierr - return - endif - endif - if (HaveNbor(2,2)) then - nbcoords = (/ coords(1), coords(2)+1 /) - call MPI_Cart_rank(comm, nbcoords, ipN, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Cart_rank = ", ierr - return - endif - endif - - ! open Irecv buffers - if (HaveNbor(1,1)) then - call MPI_Irecv(Wrecv, nyl, MPI_DOUBLE_PRECISION, ipW, & - MPI_ANY_TAG, comm, reqRW, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Irecv = ", ierr - return - endif - endif - if (HaveNbor(1,2)) then - call MPI_Irecv(Erecv, nyl, MPI_DOUBLE_PRECISION, ipE, & - MPI_ANY_TAG, comm, reqRE, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Irecv = ", ierr - return - endif - endif - if (HaveNbor(2,1)) then - call MPI_Irecv(Srecv, nxl, MPI_DOUBLE_PRECISION, ipS, & - MPI_ANY_TAG, comm, reqRS, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Irecv = ", ierr - return - endif - endif - if (HaveNbor(2,2)) then - call MPI_Irecv(Nrecv, nxl, MPI_DOUBLE_PRECISION, ipN, & - MPI_ANY_TAG, comm, reqRN, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Irecv = ", ierr - return - endif - endif - - ! send data - if (HaveNbor(1,1)) then - do i=1,nyl - Wsend(i) = y(1,i) - enddo - call MPI_Isend(Wsend, nyl, MPI_DOUBLE_PRECISION, ipW, 0, & - comm, reqSW, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Isend = ", ierr - return - endif - endif - if (HaveNbor(1,2)) then - do i=1,nyl - Esend(i) = y(nxl,i) - enddo - call MPI_Isend(Esend, nyl, MPI_DOUBLE_PRECISION, ipE, 1, & - comm, reqSE, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Isend = ", ierr - return - endif - endif - if (HaveNbor(2,1)) then - do i=1,nxl - Ssend(i) = y(i,1) - enddo - call MPI_Isend(Ssend, nxl, MPI_DOUBLE_PRECISION, ipS, 2, & - comm, reqSS, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Isend = ", ierr - return - endif - endif - if (HaveNbor(2,2)) then - do i=1,nxl - Nsend(i) = y(i,nyl) - enddo - call MPI_Isend(Nsend, nxl, MPI_DOUBLE_PRECISION, ipN, 3, & - comm, reqSN, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Isend = ", ierr - return - endif - endif - - ! wait for messages to finish - if (HaveNbor(1,1)) then - call MPI_Wait(reqRW, stat, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Wait = ", ierr - return - endif - call MPI_Wait(reqSW, stat, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Wait = ", ierr - return - endif - endif - if (HaveNbor(1,2)) then - call MPI_Wait(reqRE, stat, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Wait = ", ierr - return - endif - call MPI_Wait(reqSE, stat, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Wait = ", ierr - return - endif - endif - if (HaveNbor(2,1)) then - call MPI_Wait(reqRS, stat, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Wait = ", ierr - return - endif - call MPI_Wait(reqSS, stat, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Wait = ", ierr - return - endif - endif - if (HaveNbor(2,2)) then - call MPI_Wait(reqRN, stat, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Wait = ", ierr - return - endif - call MPI_Wait(reqSN, stat, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Wait = ", ierr - return - endif - endif - - ierr = 0 ! return with success flag - return - end subroutine Exchange - !--------------------------------------------------------------- - - - !--------------------------------------------------------------- - ! Free memory allocated within Userdata - !--------------------------------------------------------------- - subroutine FreeUserData(ierr) - implicit none - integer, intent(out) :: ierr - if (allocated(h)) deallocate(h) - if (allocated(d)) deallocate(d) - if (allocated(Wrecv)) deallocate(Wrecv) - if (allocated(Wsend)) deallocate(Wsend) - if (allocated(Erecv)) deallocate(Erecv) - if (allocated(Esend)) deallocate(Esend) - if (allocated(Srecv)) deallocate(Srecv) - if (allocated(Ssend)) deallocate(Ssend) - if (allocated(Nrecv)) deallocate(Nrecv) - if (allocated(Nsend)) deallocate(Nsend) - ierr = 0 ! return with success flag - return - end subroutine FreeUserData - !--------------------------------------------------------------- - - - !--------------------------------------------------------------- - ! RMS norm function for parallel array data - !--------------------------------------------------------------- - subroutine PRMS(y,yrms,ierr) - ! declarations - implicit none - include "mpif.h" - integer, intent(out) :: ierr - real(kind=REALTYPE), intent(in) :: y(nxl,nyl) - real(kind=REALTYPE), intent(out) :: yrms - real(kind=REALTYPE) :: lsum, gsum - - ! internals - lsum = sum(y**2) - call MPI_Allreduce(lsum, gsum, 1, MPI_DOUBLE_PRECISION, & - MPI_SUM, comm, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Allreduce = ", ierr - call MPI_Finalize(ierr) - endif - yrms = sqrt(gsum/nx/ny) - - ierr = 0 ! return with success flag - return - end subroutine PRMS - !--------------------------------------------------------------- - -end module UserData -!----------------------------------------------------------------- - - -!----------------------------------------------------------------- -! Main driver program -!----------------------------------------------------------------- -program driver - - ! inclusions - use UserData - implicit none - include "mpif.h" - - ! Declarations - ! general problem parameters - real*8, parameter :: pi = 3.1415926535897932d0 - integer, parameter :: Nt = 20 ! total number of output times - integer*8, parameter :: nx_ = 60 ! spatial mesh size - integer*8, parameter :: ny_ = 120 - integer, parameter :: PCGpretype = 1 ! enable preconditioner - integer, parameter :: PCGmaxl = 20 ! max num. PCG iterations - real(kind=REALTYPE), parameter :: T0 = 0.d0 ! initial time - real(kind=REALTYPE), parameter :: Tf = 0.3d0 ! final time - real(kind=REALTYPE), parameter :: rtol = 1.d-5 ! relative and absolute tolerances - real(kind=REALTYPE), parameter :: atol = 1.d-10 - real(kind=REALTYPE), parameter :: kx_ = 0.5d0 ! heat conductivity coefficients - real(kind=REALTYPE), parameter :: ky_ = 0.75d0 - real(kind=REALTYPE), parameter :: nlscoef = 1.d-7 ! nonlinear solver tolerance factor - - ! solution vector and other local variables - real(kind=REALTYPE), allocatable :: y(:,:) - real(kind=REALTYPE) :: rout(6), rpar, t, dTout, tout, urms - integer*8 :: iout(35), ipar, N, Ntot, i, j - integer :: flag, ioutput - logical :: outproc - character*100 :: outname - - ! initialize MPI - call MPI_Init(flag) - if (flag /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Init = ", flag - stop - end if - call MPI_Comm_rank(MPI_COMM_WORLD, myid, flag) - if (flag /= MPI_SUCCESS) then - write(0,*) "Error in MPI_Comm_rank = ", flag - call MPI_Finalize(flag) - end if - - ! Initialize UserData module - call InitUserData() - nx = nx_ - ny = ny_ - kx = kx_ - ky = ky_ - dx = 1.d0/(nx-1) ! x mesh spacing - dy = 1.d0/(ny-1) ! x mesh spacing - - ! Set up parallel decomposition (computes local mesh sizes) - call SetupDecomp(flag) - if (flag /= MPI_SUCCESS) then - write(0,*) "Error in SetupDecomp = ", flag - call MPI_Finalize(flag) - end if - - ! Initial problem output - outproc = (myid == 0) - if (outproc) then - write(6,*) " " - write(6,*) "2D Heat PDE test problem:"; - write(6,'(A,i4)') " nprocs = " , nprocs - write(6,'(A,i4)') " nx = ", nx - write(6,'(A,i4)') " ny = ", ny - write(6,'(A,f5.2)') " kx = ", kx - write(6,'(A,f5.2)') " ky = ", ky - write(6,'(A,es9.2)') " rtol = ", rtol - write(6,'(A,es9.2)') " atol = ", atol - write(6,'(A,i4)') " nxl (proc 0) = ", nxl - write(6,'(A,i4)') " nyl (proc 0) = ", nyl - write(6,*) " " - endif - - ! Initialize data structures - N = nxl*nyl - Ntot = nx*ny - call FNVInitP(comm, 4, N, Ntot, flag) - if (flag /= MPI_SUCCESS) then - write(0,*) "Error in FNVInitP = ", flag - call MPI_Finalize(flag) - end if - allocate(y(nxl,nyl)) ! Create parallel vector for solution - y = 0.d0 ! Set initial conditions - - ! initialize PCG linear solver module - call FSunPCGInit(4, PCGpretype, PCGmaxl, flag) - if (flag /= MPI_SUCCESS) then - write(0,*) "Error in FSunPCGInit = ", flag - call MPI_Finalize(flag) - end if - - ! Create the solver memory to use DIRK integrator, scalar tolerances - call FARKMalloc(T0, y, 0, 1, rtol, atol, iout, rout, ipar, rpar, flag) - if (flag /= MPI_SUCCESS) then - write(0,*) "Error in FARKMalloc = ", flag - call MPI_Finalize(flag) - end if - - ! fill in the heat source array - do j=1,nyl - do i=1,nxl - h(i,j) = sin(pi*(is+i-2)*dx) * sin(2.d0*pi*(js+j-2)*dy) - enddo - enddo - - ! set integrator options - call FARKSetRin("NLCONV_COEF", nlscoef, flag) - if (flag < 0) then - write(0,*) "Error in FARKSetRin = ", flag - call MPI_Finalize(flag) - end if - call FARKSetIin("PREDICT_METHOD", 1_8, flag) - if (flag < 0) then - write(0,*) "Error in FARKSetIin = ", flag - call MPI_Finalize(flag) - end if - - - ! attach linear solver module to ARKLs interface - call FARKLsInit(flag) - if (flag < 0) then - write(0,*) "Error in FARKLsInit = ", flag - call MPI_Finalize(flag) - end if - call FARKLsSetPrec(1, flag) ! Signal user-supplied preconditioner - if (flag < 0) then - write(0,*) "Error in FARKLsSetPrec = ", flag - call MPI_Finalize(flag) - end if - - ! specify that the problem is linearly implicit, but that Jacobian does not depend on time - call FARKSetIin("LINEAR", 0_8, flag) - if (flag < 0) then - write(0,*) "Error in FARKSetIin = ", flag - call MPI_Finalize(flag) - end if - - ! Each processor outputs subdomain information - write(outname,'(16Hheat2d_subdomain,f4.3,4H.txt)') myid/1000.0 - open(100, file=outname) - write(100,'(6(i9,1x))') nx, ny, is, ie, js, je - close(100) - - ! Open output streams for results, access data array - write(outname,'(6Hheat2d,f4.3,4H.txt)') myid/1000.0 - open(101, file=outname) - - ! Output initial condition to disk - do j=1,nyl - do i=1,nxl - write(101,'(es25.16)',advance='no') y(i,j) - enddo - enddo - write(101,*) " " - - ! Main time-stepping loop: calls ARKode to perform the integration, then - ! prints results. Stops when the final time has been reached - t = T0 - dTout = (Tf-T0)/Nt - tout = T0+dTout - call PRMS(y, urms, flag) - if (outproc) then - write(6,*) " t ||u||_rms" - write(6,*) " ----------------------" - write(6,'(2(2x,f10.6))') t, urms - endif - do ioutput=1,Nt - - call FARKode(tout, t, y, 1, flag) ! call integrator - if (flag < 0) then - write(0,*) "Error in FARKode = ", flag - exit - end if - - call PRMS(y, urms, flag) - if (outproc) & - write(6,'(2(2x,f10.6))') t, urms ! print solution stats - if (flag >= 0) then ! successful solve: update output time - tout = min(tout + dTout, Tf) - else ! unsuccessful solve: break - if (outproc) & - write(0,*) "Solver failure, stopping integration" - exit - endif - - ! output results to disk - do j=1,nyl - do i=1,nxl - write(101,'(es25.16)',advance='no') y(i,j) - enddo - enddo - write(101,*) " " - - enddo - if (outproc) then - write(6,*) " ----------------------" - endif - close(101) - - ! Print some final statistics - if (outproc) then - write(6,*) " " - write(6,*) "Final Solver Statistics:" - write(6,'(2(A,i6),A)') " Internal solver steps = ", iout(3), & - " (attempted = ", iout(6), ")" - write(6,'(A,i6,A,i6)') " Total RHS evals: Fe = ", iout(7), ", Fi = ", iout(8) - write(6,'(A,i6)') " Total linear solver setups = ", iout(9) - write(6,'(A,i6)') " Total linear iterations = ", iout(23) - write(6,'(A,i6)') " Total number of Jacobian-vector products = ", iout(20) - write(6,'(A,i6)') " Total number of Preconditioner setups = ", iout(21) - write(6,'(A,i6)') " Total number of Preconditioner solves = ", iout(22) - write(6,'(A,i6)') " Total number of linear solver convergence failures = ", & - iout(24) - write(6,'(A,i6)') " Total number of Newton iterations = ", iout(11) - write(6,'(A,i6)') " Total number of nonlinear solver convergence failures = ", & - iout(12) - write(6,'(A,i6)') " Total number of error test failures = ", iout(10) - endif - - ! Clean up and return with successful completion - if (allocated(y)) deallocate(y) ! free solution - call FreeUserData(flag) ! free user data - call FARKFree() ! free integrator memory - call MPI_Barrier(comm, flag) - call MPI_Finalize(flag) ! Finalize MPI - -end program driver -!----------------------------------------------------------------- - - - -!----------------------------------------------------------------- -! Functions called by the solver -!----------------------------------------------------------------- - - -subroutine farkifun(t, y, ydot, ipar, rpar, ierr) -!----------------------------------------------------------------- -! f routine to compute the ODE RHS function f(t,y). -!----------------------------------------------------------------- - ! declarations - use UserData - implicit none - include "mpif.h" - real(kind=REALTYPE), intent(in) :: t, rpar - real(kind=REALTYPE), intent(in) :: y(nxl,nyl) - real(kind=REALTYPE), intent(out) :: ydot(nxl,nyl) - integer*8, intent(in) :: ipar - real(kind=REALTYPE) :: c1, c2, c3 - integer, intent(out) :: ierr - integer*8 :: i, j - - ! internals - - ! Initialize ydot to zero - ydot = 0.d0 - - ! Exchange boundary data with neighbors - call Exchange(y, ierr) - if (ierr /= MPI_SUCCESS) then - write(0,*) "Error in Exchange = " , ierr - return - end if - - ! iterate over subdomain interior, computing approximation to RHS - c1 = kx/dx/dx - c2 = ky/dy/dy - c3 = -2.d0*(c1 + c2) - do j=2,nyl-1 - do i=2,nxl-1 - ydot(i,j) = c1*(y(i-1,j)+y(i+1,j)) + c2*(y(i,j-1)+y(i,j+1)) + c3*y(i,j) - enddo - enddo - - ! iterate over subdomain boundaries (if not at overall domain boundary) - if (HaveNbor(1,1)) then ! West face - i=1 - do j=2,nyl-1 - ydot(i,j) = c1*(Wrecv(j)+y(i+1,j)) + c2*(y(i,j-1)+y(i,j+1)) + c3*y(i,j) - enddo - endif - if (HaveNbor(1,2)) then ! East face - i=nxl - do j=2,nyl-1 - ydot(i,j) = c1*(y(i-1,j)+Erecv(j)) + c2*(y(i,j-1)+y(i,j+1)) + c3*y(i,j) - enddo - endif - if (HaveNbor(2,1)) then ! South face - j=1 - do i=2,nxl-1 - ydot(i,j) = c1*(y(i-1,j)+y(i+1,j)) + c2*(Srecv(i)+y(i,j+1)) + c3*y(i,j) - enddo - endif - if (HaveNbor(2,2)) then ! West face - j=nyl - do i=2,nxl-1 - ydot(i,j) = c1*(y(i-1,j)+y(i+1,j)) + c2*(y(i,j-1)+Nrecv(i)) + c3*y(i,j) - enddo - endif - if (HaveNbor(1,1) .and. HaveNbor(2,1)) then ! South-West corner - i=1 - j=1 - ydot(i,j) = c1*(Wrecv(j)+y(i+1,j)) + c2*(Srecv(i)+y(i,j+1)) + c3*y(i,j) - endif - if (HaveNbor(1,1) .and. HaveNbor(2,2)) then ! North-West corner - i=1 - j=nyl - ydot(i,j) = c1*(Wrecv(j)+y(i+1,j)) + c2*(y(i,j-1)+Nrecv(i)) + c3*y(i,j) - endif - if (HaveNbor(1,2) .and. HaveNbor(2,1)) then ! South-East corner - i=nxl - j=1 - ydot(i,j) = c1*(y(i-1,j)+Erecv(j)) + c2*(Srecv(i)+y(i,j+1)) + c3*y(i,j) - endif - if (HaveNbor(1,2) .and. HaveNbor(2,2)) then ! North-East corner - i=nxl - j=nyl - ydot(i,j) = c1*(y(i-1,j)+Erecv(j)) + c2*(y(i,j-1)+Nrecv(i)) + c3*y(i,j) - endif - - ydot = ydot + h ! add in heat source - - ierr = 0 ! Return with success - return -end subroutine farkifun -!----------------------------------------------------------------- - - -subroutine farkefun(t, y, ydot, ipar, rpar, ierr) -!----------------------------------------------------------------- -! Explicit portion of f routine (empty) -!----------------------------------------------------------------- - ! declarations - use UserData - implicit none - real(kind=REALTYPE), intent(in) :: t, rpar - integer*8, intent(in) :: ipar - real(kind=REALTYPE), intent(in) :: y(nxl,nyl) - real(kind=REALTYPE), intent(out) :: ydot(nxl,nyl) - integer, intent(out) :: ierr - - ! internals - - ! Initialize ydot to zero and return with success - ydot = 0.d0 - ierr = 0 - return -end subroutine farkefun -!----------------------------------------------------------------- - - -subroutine farkpset(t, y, fy, jok, jcur, gamma, hcur, ipar, & - rpar, ierr) -!----------------------------------------------------------------- -! Preconditioner setup routine (fills inverse of Jacobian diagonal) -!----------------------------------------------------------------- - ! declarations - use UserData - implicit none - real(kind=REALTYPE), intent(in) :: t, gamma, hcur, rpar - real(kind=REALTYPE), intent(in) :: y(nxl,nyl), fy(nxl,nyl) - integer*8, intent(in) :: ipar - integer, intent(in) :: jok - integer, intent(out) :: jcur, ierr - real(kind=REALTYPE) :: c - - ! internals - c = 1.d0 + gamma*2.d0*(kx/dx/dx + ky/dy/dy) - - ! set all entries of d to the inverse of the diagonal values in interior - ! (since boundary RHS is 0, set boundary diagonals to the same) - d = 1.d0/c - - jcur = 1 ! update jcur flag - ierr = 0 ! Return with success - return -end subroutine farkpset - - -subroutine farkpsol(t, y, fy, r, z, gamma, delta, lr, & - ipar, rpar, ierr) -!----------------------------------------------------------------- -! Preconditioner solve routine -!----------------------------------------------------------------- - ! declarations - use UserData - implicit none - real(kind=REALTYPE), intent(in) :: t, gamma, delta, rpar - integer*8, intent(in) :: ipar - real(kind=REALTYPE), intent(in) :: y(nxl,nyl), fy(nxl,nyl), r(nxl,nyl) - real(kind=REALTYPE), intent(out) :: z(nxl,nyl) - integer, intent(in) :: lr - integer, intent(out) :: ierr - - ! internals - z = r*d ! perform Jacobi iteration (whole array operation) - ierr = 0 ! Return with success - return -end subroutine farkpsol -!----------------------------------------------------------------- - diff --git a/examples/arkode/F90_parallel/fark_heat2D.out b/examples/arkode/F90_parallel/fark_heat2D.out deleted file mode 100644 index 66a8223921..0000000000 --- a/examples/arkode/F90_parallel/fark_heat2D.out +++ /dev/null @@ -1,49 +0,0 @@ - - 2D Heat PDE test problem: - nprocs = 2 - nx = 60 - ny = 120 - kx = 0.50 - ky = 0.75 - rtol = 1.00E-05 - atol = 1.00E-10 - nxl (proc 0) = 30 - nyl (proc 0) = 120 - - t ||u||_rms - ---------------------- - 0.000000 0.000000 - 0.015000 0.005780 - 0.030000 0.009224 - 0.045000 0.011275 - 0.060000 0.012497 - 0.075000 0.013224 - 0.090000 0.013658 - 0.105000 0.013916 - 0.120000 0.014070 - 0.135000 0.014162 - 0.150000 0.014216 - 0.165000 0.014249 - 0.180000 0.014268 - 0.195000 0.014280 - 0.210000 0.014287 - 0.225000 0.014291 - 0.240000 0.014293 - 0.255000 0.014295 - 0.270000 0.014295 - 0.285000 0.014296 - 0.300000 0.014296 - ---------------------- - - Final Solver Statistics: - Internal solver steps = 57 (attempted = 59) - Total RHS evals: Fe = 0, Fi = 594 - Total linear solver setups = 20 - Total linear iterations = 5177 - Total number of Jacobian-vector products = 5177 - Total number of Preconditioner setups = 20 - Total number of Preconditioner solves = 5424 - Total number of linear solver convergence failures = 247 - Total number of Newton iterations = 295 - Total number of nonlinear solver convergence failures = 0 - Total number of error test failures = 2 diff --git a/examples/arkode/F90_parallel/plot_heat2D.py b/examples/arkode/F90_parallel/plot_heat2D.py deleted file mode 100755 index 70c3e1adb1..0000000000 --- a/examples/arkode/F90_parallel/plot_heat2D.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env python -# ---------------------------------------------------------------- -# 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 -# ---------------------------------------------------------------- -# matplotlib-based plotting script for heat2D.cpp example - -# imports -import sys -import numpy as np -from pylab import * -from mpl_toolkits.mplot3d import Axes3D -from matplotlib import cm -import matplotlib.pyplot as plt - -# determine the number of MPI processes used -nprocs=1 -for i in range(1000): - sname = 'heat2d_subdomain.' + repr(i).zfill(3) + '.txt' - try: - f = open(sname,'r') - f.close() - except IOError: - nprocs = i - break - -# load subdomain information, store in table -subdomains = np.zeros((nprocs,4), dtype=np.int) -for i in range(nprocs): - sname = 'heat2d_subdomain.' + repr(i).zfill(3) + '.txt' - subd = np.loadtxt(sname, dtype=np.int) - if (i == 0): - nx = subd[0] - ny = subd[1] - else: - if ((subd[0] != nx) or (subd[1] != ny)): - sys.exit("error: subdomain files incompatible (clean up and re-run test)") - subdomains[i,:] = subd[2:6] - -# load first processor's data, and determine total number of time steps -data = np.loadtxt('heat2d.000.txt', dtype=np.double) -nt = np.shape(data)[0] - -# create empty array for all solution data -results = np.zeros((nt,ny,nx)) - -# insert first processor's data into results array -istart = subdomains[0,0]-1 -iend = subdomains[0,1]-1 -jstart = subdomains[0,2]-1 -jend = subdomains[0,3]-1 -nxl = iend-istart+1 -nyl = jend-jstart+1 -for i in range(nt): - results[i,jstart:jend+1,istart:iend+1] = np.reshape(data[i,:], (nyl,nxl)) - -# iterate over remaining data files, inserting into output -if (nprocs > 1): - for isub in range(1,nprocs): - data = np.loadtxt('heat2d.' + repr(isub).zfill(3) + '.txt', dtype=np.double) - # check that subdomain has correct number of time steps - if (np.shape(data)[0] != nt): - sys.exit('error: subdomain ' + isub + ' has an incorrect number of time steps') - istart = subdomains[isub,0]-1 - iend = subdomains[isub,1]-1 - jstart = subdomains[isub,2]-1 - jend = subdomains[isub,3]-1 - nxl = iend-istart+1 - nyl = jend-jstart+1 - for i in range(nt): - results[i,jstart:jend+1,istart:iend+1] = np.reshape(data[i,:], (nyl,nxl)) - -# determine extents of plots -maxtemp = 1.1*results.max() -mintemp = 0.9*results.min() - -# generate plots of results -kx = 0.5 -ky = 0.75 -kprod = (kx+4.0*ky)*np.pi**2 -dt = 0.015 -for tstep in range(nt): - - # set string constants for output plots, current time, mesh size - pname = 'heat2d_surf.' + repr(tstep).zfill(3) + '.png' - cname = 'heat2d_err.' + repr(tstep).zfill(3) + '.png' - tstr = repr(tstep) - nxstr = repr(nx) - nystr = repr(ny) - - # set x and y meshgrid objects - xspan = np.linspace(0.0, 1.0, nx) - yspan = np.linspace(0.0, 1.0, ny) - X,Y = np.meshgrid(xspan,yspan) - - # plot current solution as a surface, and save to disk - fig = plt.figure(1) - ax = fig.add_subplot(111, projection='3d') - ax.plot_surface(X, Y, results[tstep,:,:], rstride=1, cstride=1, - cmap=cm.jet, linewidth=0, antialiased=True, shade=True) - ax.set_xlabel('x') - ax.set_ylabel('y') - ax.set_zlim((mintemp, maxtemp)) - ax.view_init(20,45) - title('u(x,y) at output ' + tstr + ', mesh = ' + nxstr + 'x' + nystr) - savefig(pname) - plt.close() - - # plot error in current solution (as a contour, and save to disk) - t = tstep*dt; - at = (1.0 - np.exp(-t*kprod))/kprod - utrue = at*np.sin(np.pi*X)*np.sin(2.0*np.pi*Y); - uerr = np.abs(utrue - results[tstep,:,:]) - plt.contourf(xspan,yspan,uerr,15, cmap=plt.cm.jet) - plt.colorbar() - plt.xlabel('x') - plt.ylabel('y') - plt.title('Error at output ' + tstr + ', mesh = ' + nxstr + 'x' + nystr) - plt.savefig(cname) - plt.close() - - - - -##### end of script ##### diff --git a/examples/arkode/F90_serial/CMakeLists.txt b/examples/arkode/F90_serial/CMakeLists.txt deleted file mode 100644 index a58ee78fbf..0000000000 --- a/examples/arkode/F90_serial/CMakeLists.txt +++ /dev/null @@ -1,300 +0,0 @@ -# --------------------------------------------------------------- -# Programmer(s): Daniel R. Reynolds @ SMU -# David J. Gardner @ 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 -# --------------------------------------------------------------- -# CMakeLists.txt file for the FARKODE F90 serial examples -# --------------------------------------------------------------- - -# Example lists are tuples "name\;type" where the type is -# 'develop' for examples excluded from 'make test' in releases - -# Examples using SUNDIALS linear solvers -set(FARKODE_examples - "ark_bruss\;develop" - ) - -# Examples using LAPACK linear solvers -set(FARKODE_examples_BL - ) - -# Add sparse solvers examples for 64-bit indextype configurations only, -# not compatible with 32-bit indextype -if(SUNDIALS_INDEX_SIZE MATCHES "64") - - # Examples using KLU linear solver - set(FARKODE_examples_KLU - "ark_bruss1D_FEM_klu\;develop" - ) - - # Examples using SuperLU_MT linear solver - set(FARKODE_examples_SUPERLUMT - ) - -endif() - -# Auxiliary files to install -set(ARKODE_extras - plot_sol.py - plot_brusselator1D_FEM.py - ) - -# Specify libraries to link against -set(ARKODE_LIB sundials_arkode) -set(NVECS_LIB sundials_nvecserial) -set(FNVECS_LIB sundials_fnvecserial) - -# Only static FCMIX libraries are available -set(FARKODE_LIB sundials_farkode${_STATIC_LIB_SUFFIX}) - -# Set-up linker flags and link libraries -set(SUNDIALS_LIBS ${FARKODE_LIB} ${ARKODE_LIB} ${FNVECS_LIB} ${NVECS_LIB} ${EXE_EXTRA_LINK_LIBS}) - - -# Add the build and install targets for each example -foreach(example_tuple ${FARKODE_examples}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f90) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial) - endif() - -endforeach(example_tuple ${FARKODE_examples}) - - -# Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) - - # Sundials LAPACK linear solver modules - set(SUNLINSOLLAPACK_LIBS - sundials_sunlinsollapackband - sundials_sunlinsollapackdense - sundials_fsunlinsollapackband - sundials_fsunlinsollapackdense) - - # LAPACK libraries - list(APPEND SUNLINSOLLAPACK_LIBS ${LAPACK_LIBRARIES}) - - foreach(example_tuple ${FARKODE_examples_BL}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f90) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLLAPACK_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial) - endif() - - endforeach(example_tuple ${FARKODE_examples_BL}) - -endif() - - -# Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) - - # Sundials KLU linear solver module - set(SUNLINSOLKLU_LIBS - sundials_sunlinsolklu - sundials_fsunlinsolklu) - - # KLU libraries - list(APPEND SUNLINSOLKLU_LIBS) - - foreach(example_tuple ${FARKODE_examples_KLU}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f90) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLKLU_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial) - endif() - - endforeach(example_tuple ${FARKODE_examples_KLU}) - -endif() - - -# Add the build and install targets for each SuperLU_MT example (if needed) -if(BUILD_SUNLINSOL_SUPERLUMT) - - # Sundials SuperLU_MT linear solver module - set(SUNLINSOLSLUMT_LIBS - sundials_sunlinsolsuperlumt - sundials_fsunlinsolsuperlumt) - - # SuperLU_MT libraries - list(APPEND SUNLINSOLSLUMT_LIBS ${SUPERLUMT_LIBRARIES}) - - foreach(example_tuple ${FARKODE_examples_SUPERLUMT}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f90) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLSLUMT_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f90 ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial) - endif() - - endforeach(example_tuple ${FARKODE_examples_SUPERLUMT}) - -endif() - - -# create Makfile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) - - # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial) - - # Install the extra files - foreach(extrafile ${ARKODE_extras}) - install(FILES ${extrafile} DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial) - endforeach() - - # Prepare substitution variables for Makefile and/or CMakeLists templates - set(SOLVER "ARKODE") - set(SOLVER_LIB "sundials_arkode") - set(SOLVER_FLIB "sundials_farkode") - - examples2string(FARKODE_examples EXAMPLES) - - if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) - examples2string(FARKODE_examples_BL EXAMPLES_BL) - else() - set(EXAMPLES_BL "") - endif() - - if(BUILD_SUNLINSOL_KLU) - examples2string(FARKODE_examples_KLU EXAMPLES_KLU) - else() - set(EXAMPLES_KLU "") - endif() - - if(BUILD_SUNLINSOL_SUPERLUMT) - examples2string(FARKODE_examples_SUPERLUMT EXAMPLES_SLUMT) - else() - set(EXAMPLES_SLUMT "") - endif() - - # Regardless of the platform we're on, we will generate and install - # CMakeLists.txt file for building the examples. This file can then - # be used as a template for the user's own programs. - - # generate CMakelists.txt in the binary directory - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/cmakelists_serial_F90_ex.in - ${PROJECT_BINARY_DIR}/examples/arkode/F90_serial/CMakeLists.txt - @ONLY - ) - - # install CMakelists.txt - install( - FILES ${PROJECT_BINARY_DIR}/examples/arkode/F90_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial - ) - - # On UNIX-type platforms, we also generate and install a makefile for - # building the examples. This makefile can then be used as a template - # for the user's own programs. - - if(UNIX) - # generate Makefile and place it in the binary dir - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/makefile_serial_F90_ex.in - ${PROJECT_BINARY_DIR}/examples/arkode/F90_serial/Makefile_ex - @ONLY - ) - # install the configured Makefile_ex as Makefile - install( - FILES ${PROJECT_BINARY_DIR}/examples/arkode/F90_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial - RENAME Makefile - ) - endif() - - # add test_install target - sundials_add_test_install(arkode F90_serial) - -endif() diff --git a/examples/arkode/F90_serial/README b/examples/arkode/F90_serial/README deleted file mode 100644 index 6f9fa7bb57..0000000000 --- a/examples/arkode/F90_serial/README +++ /dev/null @@ -1,48 +0,0 @@ -List of serial ARKODE F90 examples - - ark_bruss : chemical kinetics example (DIRK/DENSE) - ark_bruss1D_FEM_klu : stiff chemical kinetics PDE, with FEM - spatial discretization and CSR Jacobian (DIRK/KLU) - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/arkode/F90_serial/ark_bruss.f90 b/examples/arkode/F90_serial/ark_bruss.f90 deleted file mode 100644 index a5e989745d..0000000000 --- a/examples/arkode/F90_serial/ark_bruss.f90 +++ /dev/null @@ -1,304 +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 -!----------------------------------------------------------------- -! Example problem: -! -! The following test simulates a brusselator problem from chemical -! kinetics. This is an ODE system with 3 components, Y = [u,v,w], -! satisfying the equations, -! du/dt = a - (w+1)*u + v*u^2 -! dv/dt = w*u - v*u^2 -! dw/dt = (b-w)/ep - w*u -! for t in the interval [0.0, 10.0], with initial conditions -! Y0 = [u0,v0,w0]. We use the initial conditions and parameters -! u0=3.9, v0=1.1, w0=2.8, a=1.2, b=2.5, ep=1.0e-5 -! Here, all three solution components exhibit a rapid transient -! change during the first 0.2 time units, followed by a slow and -! smooth evolution. -! -! This program solves a the Fortran ODE test problem using the -! FARKODE interface for the ARKode ODE solver module. -! -! This program uses the IMEX ARK solver; here the -! implicit systems are solved with a modified Newton iteration -! with the SUNDENSE linear solver. The Jacobian routine and -! right-hand side routines are supplied. -! -! Output is printed 10 times throughout the defined time interval. -! Run statistics (optional outputs) are printed at the end. -!----------------------------------------------------------------- - -!----------------------------------------------------------------- -! Main driver program -!----------------------------------------------------------------- -program driver - ! Declarations - implicit none - include "sundials/sundials_fconfig.h" - - ! general problem variables - integer*8, parameter :: NEQ=3 - real(kind=REALTYPE), parameter :: T0=0.d0, Tf=10.d0 - real(kind=REALTYPE) :: dTout, Tout, Tcur, rtol, atol, rout(6) - integer :: it, Nt, ier - integer*8 :: iout(35) - real(kind=REALTYPE), dimension(NEQ) :: y - - ! real/integer parameters to pass through to supplied functions - ! ipar(1) -> unused - ! rpar(1) -> "a" parameter - ! rpar(2) -> "b" parameter - ! rpar(3) -> "ep" parameter - integer*8 :: ipar - real(kind=REALTYPE) :: rpar(3) - - ! solver parameters - integer :: adapt_method - integer*8 :: order - real(kind=REALTYPE) :: nlscoef, adapt_params - - !----------------------- - ! set some solver parameters - order = 3 ! 3rd order method - adapt_method = 0 ! PID-controller - nlscoef = 1.d-2 ! Newton solver tolerance coefficient - - ! time-stepping information - dTout = (Tf-T0)/10.d0 ! output time interval - Nt = Tf/dTout + 0.5 ! number of outputs - - ! set initial conditions, problem parameters - y(1) = 3.9d0 ! u0 - y(2) = 1.1d0 ! v0 - y(3) = 2.8d0 ! w0 - rpar(1) = 1.2d0 ! a - rpar(2) = 2.5d0 ! b - rpar(3) = 1.d-5 ! ep - - ! set tolerances according to problem specifications - atol = 1.d-10 - rtol = 1.d-6 - - ! initialize vector module - call FNVInitS(4, NEQ, ier) - if (ier < 0) then - write(0,*) 'Error in FNVInitS = ',ier - stop - endif - - ! initialize dense matrix and dense linear solver modules - call FSunDenseMatInit(4, NEQ, NEQ, ier) - call FSunDenseLinSolInit(4, ier) - - ! initialize ARKode solver to use IMEX integrator, scalar tolerances - call FARKMalloc(T0, y, 2, 1, rtol, atol, & - iout, rout, ipar, rpar, ier) - if (ier < 0) then - write(0,*) 'Error in FARKMalloc = ',ier - stop - endif - - ! set integrator options - call FARKSetIin('ORDER', order, ier) - if (ier < 0) then - write(0,*) 'Error in FARKSetIin = ',ier - stop - endif - call FARKSetRin('NLCONV_COEF', nlscoef, ier) - if (ier < 0) then - write(0,*) 'Error in FARKSetIin = ',ier - stop - endif - adapt_params = 0.d0 - call FARKSetAdaptivityMethod(adapt_method, 1, 0, adapt_params, ier) - if (ier < 0) then - write(0,*) 'Error in FARKSetAdaptMethod = ',ier - stop - endif - - ! attach matrix and linear solver modules to ARKLs interface - call FARKLsInit(ier) - if (ier < 0) then - write(0,*) 'Error in FARKLsInit = ',ier - stop - endif - - ! notify ARKLs module of user-supplied Jacobian construction routine - call FARKDenseSetJac(1, ier) - if (ier < 0) then - write(0,*) 'Error in FARKDenseSetJac = ',ier - stop - endif - - ! Open output stream for results, output comment line - open(100, file='solution.txt') - write(100,*) '# t u v w' - - ! output initial condition to disk - write(100,'(3x,4(es23.16,1x))') T0, y - - ! loop over time outputs - Tout = T0 - Tcur = T0 - print *, ' t u v w' - print *, ' ----------------------------------------------------' - print '(3x,4(es12.5,1x))', Tcur, y - do it = 1,Nt - - Tout = min(Tout + dTout, Tf) ! set next output time - call FARKode(Tout, Tcur, y, 1, ier) ! call solver - if (ier < 0) then - print *, 'Error at step ',it,', FARKode return flag =',ier - exit - end if - - ! output current solution - print '(3x,4(es12.5,1x))', Tcur, y - write(100,'(3x,4(es23.16,1x))') Tcur, y - - end do - print *, ' ----------------------------------------------------' - close(100) - - ! output solver statistics - print *, ' ' - print *, 'Final Solver Statistics:' - print '(2(A,i7),A)', ' Internal solver steps =', iout(3), & - ' (attempted =', iout(6), ')' - print '(2(A,i7))', ' Total RHS evals: Fe =', iout(7), & - ', Fi =', iout(8) - print '(A,i7)', ' Total linear solver setups =', iout(9) - print '(A,i7)', ' Total RHS evals for setting up the linear system =', iout(17) - print '(A,i7)', ' Total number of Jacobian evaluations =', iout(18) - print '(A,i7)', ' Total number of Newton iterations =', iout(11) - print '(A,i7)', ' Total number of nonlinear solver convergence failures =', iout(12) - print '(A,i7)', ' Total number of error test failures =', iout(10) - print *, ' ' - - ! clean up - call FARKFree() - -end program driver -!----------------------------------------------------------------- - -!----------------------------------------------------------------- -! Required subroutines for FARKODE interface -!----------------------------------------------------------------- - -subroutine farkifun(t, y, ydot, ipar, rpar, ier) -!----------------------------------------------------------------- -! Implicit portion of the right-hand side of the ODE system -!----------------------------------------------------------------- - - ! Declarations - implicit none - include "sundials/sundials_fconfig.h" - - ! Arguments - real(kind=REALTYPE), intent(in) :: t, rpar(3) - integer*8, intent(in) :: ipar(1) - real(kind=REALTYPE), intent(in) :: y(3) - real(kind=REALTYPE), intent(out) :: ydot(3) - integer, intent(out) :: ier - - ! temporary variables - real*8 :: u, v, w, a, b, ep - - ! set temporary values - a = rpar(1) - b = rpar(2) - ep = rpar(3) - u = y(1) - v = y(2) - w = y(3) - - ! fill implicit RHS, set success flag - ydot(1) = 0.d0 - ydot(2) = 0.d0 - ydot(3) = (b-w)/ep - ier = 0 - -end subroutine farkifun -!----------------------------------------------------------------- - -subroutine farkefun(t, y, ydot, ipar, rpar, ier) -!----------------------------------------------------------------- -! Explicit portion of the right-hand side of the ODE system -!----------------------------------------------------------------- - - ! Declarations - implicit none - include "sundials/sundials_fconfig.h" - - ! Arguments - real(kind=REALTYPE), intent(in) :: t, rpar(3) - integer*8, intent(in) :: ipar(1) - real(kind=REALTYPE), intent(in) :: y(3) - real(kind=REALTYPE), intent(out) :: ydot(3) - integer, intent(out) :: ier - - ! temporary variables - real*8 :: u, v, w, a, b, ep - - ! set temporary values - a = rpar(1) - b = rpar(2) - ep = rpar(3) - u = y(1) - v = y(2) - w = y(3) - - ! fill explicit RHS, set success flag - ydot(1) = a - (w+1.d0)*u + v*u*u - ydot(2) = w*u - v*u*u - ydot(3) = -w*u - ier = 0 - -end subroutine farkefun -!----------------------------------------------------------------- - -subroutine farkdjac(neq,t,y,fy,DJac,h,ipar,rpar,wk1,wk2,wk3,ier) -!----------------------------------------------------------------- -! Jacobian computation routine -!----------------------------------------------------------------- - - ! Declarations - implicit none - include "sundials/sundials_fconfig.h" - - ! Arguments - real(kind=REALTYPE), intent(in) :: t, h, rpar(3) - integer*8, intent(in) :: ipar(1) - integer*8, intent(in) :: neq - integer, intent(out) :: ier - real(kind=REALTYPE), intent(in), dimension(neq) :: y, fy, wk1, wk2, wk3 - real(kind=REALTYPE), intent(out) :: DJac(neq,neq) - - ! temporary variables - real*8 :: u, v, w, a, b, ep - - ! set temporary values - a = rpar(1) - b = rpar(2) - ep = rpar(3) - u = y(1) - v = y(2) - w = y(3) - - ! fill implicit Jacobian, set success flag - DJac = 0.d0 - DJac(3,3) = -1.d0/ep - ier = 0 - -end subroutine farkdjac -!----------------------------------------------------------------- diff --git a/examples/arkode/F90_serial/ark_bruss.out b/examples/arkode/F90_serial/ark_bruss.out deleted file mode 100644 index cc65b446ea..0000000000 --- a/examples/arkode/F90_serial/ark_bruss.out +++ /dev/null @@ -1,25 +0,0 @@ - t u v w - ---------------------------------------------------- - 0.00000E+00 3.90000E+00 1.10000E+00 2.80000E+00 - 1.00000E+00 2.07527E+00 1.05960E+00 2.49993E+00 - 2.00000E+00 1.10046E+00 1.72361E+00 2.49996E+00 - 3.00000E+00 7.89620E-01 2.32667E+00 2.50000E+00 - 4.00000E+00 8.11773E-01 2.72558E+00 2.49996E+00 - 5.00000E+00 1.18700E+00 2.59554E+00 2.49998E+00 - 6.00000E+00 1.88731E+00 1.49410E+00 2.49996E+00 - 7.00000E+00 1.32327E+00 1.61902E+00 2.50001E+00 - 8.00000E+00 9.21787E-01 2.13022E+00 2.50000E+00 - 9.00000E+00 8.49543E-01 2.53947E+00 2.49995E+00 - 1.00000E+01 1.06497E+00 2.59595E+00 2.49994E+00 - ---------------------------------------------------- - - Final Solver Statistics: - Internal solver steps = 905 (attempted = 934) - Total RHS evals: Fe = 3739, Fi = 7529 - Total linear solver setups = 158 - Total RHS evals for setting up the linear system = 0 - Total number of Jacobian evaluations = 28 - Total number of Newton iterations = 3790 - Total number of nonlinear solver convergence failures = 0 - Total number of error test failures = 29 - diff --git a/examples/arkode/F90_serial/ark_bruss1D_FEM_klu.f90 b/examples/arkode/F90_serial/ark_bruss1D_FEM_klu.f90 deleted file mode 100644 index 2c54b42ec7..0000000000 --- a/examples/arkode/F90_serial/ark_bruss1D_FEM_klu.f90 +++ /dev/null @@ -1,1161 +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 -!----------------------------------------------------------------- -! Example problem: -! -! The following test simulates a brusselator problem from chemical -! kinetics. This is a PDE system with 3 components, Y = [u,v,w], -! satisfying the equations, -! du/dt = du*u_xx + a - (w+1)*u + v*u^2 -! dv/dt = dv*v_xx + w*u - v*u^2 -! dw/dt = dw*w_xx + (b-w)/ep - w*u -! for t in the interval [0, 10], x in [0, 10], with initial -! conditions -! u(0,x) = a + 0.1*sin(pi*x), -! v(0,x) = b/a + 0.1*sin(pi*x), -! w(0,x) = b + 0.1*sin(pi*x), -! and with stationary boundary conditions, i.e. -! u_t(t,0) = u_t(t,1) = 0, -! v_t(t,0) = v_t(t,1) = 0, -! w_t(t,0) = w_t(t,1) = 0. -! -! Here, we use a piecewise linear Galerkin finite element -! discretization in space, where all element-wise integrals are -! computed using 3-node Gaussian quadrature (since we will have -! quartic polynomials in the reaction terms for the u_t and v_t -! equations (including the test function)). The time derivative -! terms in this system will include a mass matrix, giving rise to -! an ODE system of the form -! M y_t = L y + R(y), -! where M is the 3x3 block mass matrix for each component, L is -! the 3x3 block Laplace operator for each component, and R(y) is -! comprised of the nonlinear reaction terms for each component. -! Since it it highly inefficient to rewrite this system as -! y_t = M^{-1}(L y + R(y)), -! we solve this system using FARKODE, with a user-supplied mass -! matrix. We therefore provide functions to evaluate the ODE RHS -! f(t,y) = L y + R(y), -! its Jacobian -! J(t,y) = L + dR/dy, -! and the mass matrix, M. -! -! We use N=201 spatial nodes, with parameters -! a=0.6, b=2.0, du=0.025, dv=0.025, dw=0.025, ep=1.d-5 -! -! This program solves the problem with the DIRK method, using a -! Newton iteration with the SUNKLU sparse linear solvers for both -! the system and mass matrices. These matrices are stored in -! compressed-sparse-row format. -! -! Output is printed 10 times throughout the defined time interval. -! Run statistics (optional outputs) are printed at the end. -!----------------------------------------------------------------- - - -! user data structure -module UserData - implicit none - include "sundials/sundials_fconfig.h" - save - - integer*8 :: N ! number of intervals - real*8, allocatable :: x(:) ! mesh node locations - real*8 :: a ! constant forcing on u - real*8 :: b ! steady-state value of w - real*8 :: du ! diffusion coeff for u - real*8 :: dv ! diffusion coeff for v - real*8 :: dw ! diffusion coeff for w - real*8 :: ep ! stiffness parameter - -contains - - ! function that maps 2D data into 1D address space - ! (0-based since CSR matrix will be sent to C solver) - integer(kind=8) function idx(ix,ivar) - integer :: ivar, ix - idx = 3*(ix-1) + ivar - 1 - end function idx - -end module UserData - - -! finite element basis functions -module FEM - -contains - - ! left/right basis functions - double precision function ChiL(xl,xr,x) - double precision :: xl, xr, x - ChiL = (xr-x)/(xr-xl) - end function ChiL - - double precision function ChiR(xl,xr,x) - double precision :: xl, xr, x - ChiR = (x-xl)/(xr-xl) - end function ChiR - - ! derivatives of left/right basis functions - double precision function ChiL_x(xl,xr) - double precision :: xl, xr - ChiL_x = 1.d0/(xl-xr) - end function ChiL_X - - double precision function ChiR_x(xl,xr) - double precision :: xl, xr - ChiR_x = 1.d0/(xr-xl) - end function ChiR_x - - ! FEM output evaluation routines: value and derivative - double precision function Eval(ul,ur,xl,xr,x) - double precision :: ul, ur, xl, xr, x - Eval = ul*ChiL(xl,xr,x) + ur*ChiR(xl,xr,x) - end function Eval - - double precision function Eval_x(ul,ur,xl,xr) - double precision :: ul, ur, xl, xr - Eval_x = ul*ChiL_x(xl,xr) + ur*ChiR_x(xl,xr) - end function Eval_x - -end module FEM - - -! quadrature data -module Quadrature - -contains - - ! nodes - double precision function X1(xl,xr) - double precision :: xl, xr - X1 = 0.5d0*(xl+xr) - 0.5d0*(xr-xl)*0.774596669241483377035853079956d0 - end function X1 - - double precision function X2(xl,xr) - double precision :: xl, xr - X2 = 0.5d0*(xl+xr) - end function X2 - - double precision function X3(xl,xr) - double precision :: xl, xr - X3 = 0.5d0*(xl+xr) + 0.5d0*(xr-xl)*0.774596669241483377035853079956d0 - end function X3 - - ! quadrature - double precision function Quad(f1,f2,f3,xl,xr) - real*8 :: f1, f2, f3, xl, xr - real*8, parameter :: wt1=0.55555555555555555555555555555556d0 - real*8, parameter :: wt2=0.88888888888888888888888888888889d0 - real*8, parameter :: wt3=0.55555555555555555555555555555556d0 - Quad = 0.5d0*(xr-xl)*(wt1*f1 + wt2*f2 + wt3*f3) - end function Quad - -end module Quadrature -!----------------------------------------------------------------- - - - - -!----------------------------------------------------------------- -! Main driver program -!----------------------------------------------------------------- -program driver - - ! inclusions - use UserData - implicit none - - ! Declarations - ! general problem variables - real(kind=REALTYPE), parameter :: T0=0.d0, Tf=10.d0 - real(kind=REALTYPE) :: rtol, atol, rout(6), Tout, Tcur - real*8 :: dTout, pi, h, z - integer :: i, it, Nt, ier, ordering, sparsetype, time_dep - integer*8 :: iout(35), NEQ, nnz, Iinput - real(kind=REALTYPE), allocatable :: y(:,:), umask(:,:) - real(kind=REALTYPE), allocatable :: vmask(:,:), wmask(:,:) - - ! dummy real/integer parameters to pass through to supplied functions - integer*8 :: ipar - real(kind=REALTYPE) :: rpar - - !----------------------- - - ! set problem parameters (in UserData structure) - N = 201 ! number of intervals - a = 0.6d0 ! constant forcing on u - b = 2.d0 ! steady-state value of w - du = 2.5d-2 ! diffusion coeff for u - dv = 2.5d-2 ! diffusion coeff for v - dw = 2.5d-2 ! diffusion coeff for w - ep = 1.d-5 ! stiffness parameter - - ! set overall problem size, allocate solution/mask/temporary arrays - NEQ = 3*N - allocate(y(3,N), umask(3,N), vmask(3,N), wmask(3,N)) - - ! allocate and set up spatial mesh; this [arbitrarily] clusters - ! more intervals near the end points of the interval - allocate(x(N)) ! mesh node locations - pi = 4.d0*atan(1.d0) - h = 10.d0/(N-1) - do i=1,N - z = -5.d0 + h*(i-1) - x(i) = 0.5d0/atan(5.d0)*atan(z) + 0.5d0 - enddo - - ! output mesh to disk - open(200, file='bruss_FEM_mesh.txt') - do i=1,N - write(200,*) x(i) - enddo - close(200) - - ! time-stepping information - dTout = (Tf-T0)/10.d0 - Nt = Tf/dTout + 0.5 - - ! set initial conditions - do i=1,N - y(1,i) = a + 0.1d0*sin(pi*x(i)) ! u0 - y(2,i) = b/a + 0.1d0*sin(pi*x(i)) ! v0 - y(3,i) = b + 0.1d0*sin(pi*x(i)) ! w0 - enddo - - ! set mask values for each solution component - umask = 0.d0 - vmask = 0.d0 - wmask = 0.d0 - do i=1,N - umask(1,i) = 1.d0 - vmask(2,i) = 1.d0 - wmask(3,i) = 1.d0 - enddo - - ! set tolerances according to problem specifications - atol = 1.d-11 - rtol = 1.d-6 - - ! initialize vector module - call FNVInitS(4, NEQ, ier) - - ! initialize system and mass matrix modules - nnz = 15*NEQ ! integer number of nonzeros - ordering = 0 ! AMD - sparsetype = 1 ! CSR - call FSunSparseMatInit(4, NEQ, NEQ, nnz, sparsetype, ier) - call FSunSparseMassMatInit(NEQ, NEQ, nnz, sparsetype, ier) - - ! initialize KLU system and mass solvers - call FSunKLUInit(4, ier) - call FSunMassKLUInit(ier) - - ! initialize ARKode solver - ipar = 0 - rpar = 0.0 - iout = 0 - rout = 0.0 - call FARKMalloc(T0, y, 0, 1, rtol, atol, & - iout, rout, ipar, rpar, ier) - - ! set optional inputs - Iinput = 1 - call FARKSetIin('IMPLICIT', Iinput, ier) - Iinput = 1000 - call FARKSetIin('MAX_NSTEPS', Iinput, ier) - call FARKSetResTolerance(1, atol, ier) - - ! attach matrix and linear solver objects to ARKLs interfaces - time_dep = 0 - call FARKLsInit(ier) - call FARKSparseSetJac(ier) - call FARKLsMassInit(time_dep, ier) - call FARKSparseSetMass(ier) - - ! Open output stream for results - open(501, file='bruss_FEM_u.txt') - open(502, file='bruss_FEM_v.txt') - open(503, file='bruss_FEM_w.txt') - - ! output initial condition to disk - write(501,*) ( y(1,i), i=1,N ) - write(502,*) ( y(2,i), i=1,N ) - write(503,*) ( y(3,i), i=1,N ) - - ! output solver parameters to screen - call FARKWriteParameters(ier) - - ! loop over time outputs - Tout = T0 - Tcur = T0 - print *, ' t ||u||_rms ||v||_rms ||w||_rms' - print *, ' ----------------------------------------------------' - print '(3x,4(es12.5,1x))', Tcur, sqrt(sum(y*y*umask)/N), & - sqrt(sum(y*y*vmask)/N), sqrt(sum(y*y*wmask)/N) - do it = 1,Nt - - ! set next output time - Tout = min(Tout + dTout, Tf) - - ! set next output time - call FARKSetRin('STOP_TIME', Tout, ier) - - ! call solver - call FARKode(Tout, Tcur, y, 1, ier) - if (ier < 0) then - write(0,*) 'Solver failure, stopping integration' - stop - end if - - ! output current solution information - print '(3x,4(es12.5,1x))', Tcur, sqrt(sum(y*y*umask)/N), & - sqrt(sum(y*y*vmask)/N), sqrt(sum(y*y*wmask)/N) - - ! output current results to disk - write(501,*) ( y(1,i), i=1,N ) - write(502,*) ( y(2,i), i=1,N ) - write(503,*) ( y(3,i), i=1,N ) - - end do - print *, ' ----------------------------------------------------' - - ! close solution output files - close(501) - close(502) - close(503) - - ! output solver statistics - print *, ' ' - print *, 'Final Solver Statistics:' - print *, ' Internal solver steps = ', iout(3),' (attempted =', iout(6), ')' - print *, ' Total RHS evals: Fe = ', iout(7),' Fi = ', iout(8) - print *, ' Total linear solver setups = ', iout(9) - print *, ' Total RHS evals for setting up the linear system = ', iout(17) - print *, ' Total number of Jacobian evaluations = ', iout(18) - print *, ' Total number of nonlinear iterations = ', iout(11) - print *, ' Total number of nonlinear solver convergence failures = ',iout(12) - print *, ' Total number of error test failures = ', iout(10) - print *, ' Total number of mass matrix evaluations = ', iout(28) - print *, ' ' - - ! clean up - deallocate(y, umask, vmask, wmask, x) - call FARKFree() - -end program driver -!----------------------------------------------------------------- - - - - -!----------------------------------------------------------------- -! User-supplied subroutines for FARKODE interface -!----------------------------------------------------------------- - - -subroutine FARKIFun(t, y, ydot, ipar, rpar, ier) -!----------------------------------------------------------------- -! Right-hand side of the ODE system -!----------------------------------------------------------------- - use UserData - use FEM - use Quadrature - - ! Declarations - implicit none - - ! Arguments - real(kind=REALTYPE), intent(in) :: t, rpar(1) - integer*8, intent(in) :: ipar(1) - integer, intent(out) :: ier - real(kind=REALTYPE), intent(in) :: y(3,N) - real(kind=REALTYPE), intent(out) :: ydot(3,N) - - ! Local data - integer :: ix - logical :: left, right - real*8 :: ul, ur, vl, vr, wl, wr, xl, xr, u, v, w, f1, f2, f3 - - ! clear out rhs - ydot = 0.d0 - - ! iterate over intervals, filling in rhs function - do ix=1,N-1 - - ! set booleans to determine whether equations exist on the left/right */ - left = .true. - right = .true. - if (ix==1) left = .false. - if (ix==(N-1)) right = .false. - - ! set nodal value shortcuts (interval index aligns with left node) - ul = y(1,ix) - vl = y(2,ix) - wl = y(3,ix) - ur = y(1,ix+1) - vr = y(2,ix+1) - wr = y(3,ix+1) - - ! set mesh shortcuts - xl = x(ix) - xr = x(ix+1) - - ! left test function - if (left) then - - ! u -- reaction - u = Eval(ul, ur, xl, xr, X1(xl,xr)) - v = Eval(vl, vr, xl, xr, X1(xl,xr)) - w = Eval(wl, wr, xl, xr, X1(xl,xr)) - f1 = (a - (w+1.d0)*u + v*u*u) * ChiL(xl,xr,X1(xl,xr)) - u = Eval(ul, ur, xl, xr, X2(xl,xr)) - v = Eval(vl, vr, xl, xr, X2(xl,xr)) - w = Eval(wl, wr, xl, xr, X2(xl,xr)) - f2 = (a - (w+1.d0)*u + v*u*u) * ChiL(xl,xr,X2(xl,xr)) - u = Eval(ul, ur, xl, xr, X3(xl,xr)) - v = Eval(vl, vr, xl, xr, X3(xl,xr)) - w = Eval(wl, wr, xl, xr, X3(xl,xr)) - f3 = (a - (w+1.d0)*u + v*u*u) * ChiL(xl,xr,X3(xl,xr)) - ydot(1,ix) = ydot(1,ix) + Quad(f1,f2,f3,xl,xr) - - ! u -- diffusion - f1 = -du * Eval_x(ul,ur,xl,xr) * ChiL_x(xl,xr) - ydot(1,ix) = ydot(1,ix) + Quad(f1,f1,f1,xl,xr) - - ! v -- reaction - u = Eval(ul, ur, xl, xr, X1(xl,xr)) - v = Eval(vl, vr, xl, xr, X1(xl,xr)) - w = Eval(wl, wr, xl, xr, X1(xl,xr)) - f1 = (w*u - v*u*u) * ChiL(xl,xr,X1(xl,xr)) - u = Eval(ul, ur, xl, xr, X2(xl,xr)) - v = Eval(vl, vr, xl, xr, X2(xl,xr)) - w = Eval(wl, wr, xl, xr, X2(xl,xr)) - f2 = (w*u - v*u*u) * ChiL(xl,xr,X2(xl,xr)) - u = Eval(ul, ur, xl, xr, X3(xl,xr)) - v = Eval(vl, vr, xl, xr, X3(xl,xr)) - w = Eval(wl, wr, xl, xr, X3(xl,xr)) - f3 = (w*u - v*u*u) * ChiL(xl,xr,X3(xl,xr)) - ydot(2,ix) = ydot(2,ix) + Quad(f1,f2,f3,xl,xr) - - ! v -- diffusion - f1 = -dv * Eval_x(vl,vr,xl,xr) * ChiL_x(xl,xr) - ydot(2,ix) = ydot(2,ix) + Quad(f1,f1,f1,xl,xr) - - ! w -- reaction - u = Eval(ul, ur, xl, xr, X1(xl,xr)) - v = Eval(vl, vr, xl, xr, X1(xl,xr)) - w = Eval(wl, wr, xl, xr, X1(xl,xr)) - f1 = ((b-w)/ep - w*u) * ChiL(xl,xr,X1(xl,xr)) - u = Eval(ul, ur, xl, xr, X2(xl,xr)) - v = Eval(vl, vr, xl, xr, X2(xl,xr)) - w = Eval(wl, wr, xl, xr, X2(xl,xr)) - f2 = ((b-w)/ep - w*u) * ChiL(xl,xr,X2(xl,xr)) - u = Eval(ul, ur, xl, xr, X3(xl,xr)) - v = Eval(vl, vr, xl, xr, X3(xl,xr)) - w = Eval(wl, wr, xl, xr, X3(xl,xr)) - f3 = ((b-w)/ep - w*u) * ChiL(xl,xr,X3(xl,xr)) - ydot(3,ix) = ydot(3,ix) + Quad(f1,f2,f3,xl,xr) - - ! w -- diffusion - f1 = -dw * Eval_x(wl,wr,xl,xr) * ChiL_x(xl,xr) - ydot(3,ix) = ydot(3,ix) + Quad(f1,f1,f1,xl,xr) - - end if - - ! right test function - if (right) then - - ! u -- reaction - u = Eval(ul, ur, xl, xr, X1(xl,xr)) - v = Eval(vl, vr, xl, xr, X1(xl,xr)) - w = Eval(wl, wr, xl, xr, X1(xl,xr)) - f1 = (a - (w+1.d0)*u + v*u*u) * ChiR(xl,xr,X1(xl,xr)) - u = Eval(ul, ur, xl, xr, X2(xl,xr)) - v = Eval(vl, vr, xl, xr, X2(xl,xr)) - w = Eval(wl, wr, xl, xr, X2(xl,xr)) - f2 = (a - (w+1.d0)*u + v*u*u) * ChiR(xl,xr,X2(xl,xr)) - u = Eval(ul, ur, xl, xr, X3(xl,xr)) - v = Eval(vl, vr, xl, xr, X3(xl,xr)) - w = Eval(wl, wr, xl, xr, X3(xl,xr)) - f3 = (a - (w+1.d0)*u + v*u*u) * ChiR(xl,xr,X3(xl,xr)) - ydot(1,ix+1) = ydot(1,ix+1) + Quad(f1,f2,f3,xl,xr) - - ! u -- diffusion - f1 = -du * Eval_x(ul,ur,xl,xr) * ChiR_x(xl,xr) - ydot(1,ix+1) = ydot(1,ix+1) + Quad(f1,f1,f1,xl,xr) - - ! v -- reaction - u = Eval(ul, ur, xl, xr, X1(xl,xr)) - v = Eval(vl, vr, xl, xr, X1(xl,xr)) - w = Eval(wl, wr, xl, xr, X1(xl,xr)) - f1 = (w*u - v*u*u) * ChiR(xl,xr,X1(xl,xr)) - u = Eval(ul, ur, xl, xr, X2(xl,xr)) - v = Eval(vl, vr, xl, xr, X2(xl,xr)) - w = Eval(wl, wr, xl, xr, X2(xl,xr)) - f2 = (w*u - v*u*u) * ChiR(xl,xr,X2(xl,xr)) - u = Eval(ul, ur, xl, xr, X3(xl,xr)) - v = Eval(vl, vr, xl, xr, X3(xl,xr)) - w = Eval(wl, wr, xl, xr, X3(xl,xr)) - f3 = (w*u - v*u*u) * ChiR(xl,xr,X3(xl,xr)) - ydot(2,ix+1) = ydot(2,ix+1) + Quad(f1,f2,f3,xl,xr) - - ! v -- diffusion - f1 = -dv * Eval_x(vl,vr,xl,xr) * ChiR_x(xl,xr) - ydot(2,ix+1) = ydot(2,ix+1) + Quad(f1,f1,f1,xl,xr) - - ! w -- reaction - u = Eval(ul, ur, xl, xr, X1(xl,xr)) - v = Eval(vl, vr, xl, xr, X1(xl,xr)) - w = Eval(wl, wr, xl, xr, X1(xl,xr)) - f1 = ((b-w)/ep - w*u) * ChiR(xl,xr,X1(xl,xr)) - u = Eval(ul, ur, xl, xr, X2(xl,xr)) - v = Eval(vl, vr, xl, xr, X2(xl,xr)) - w = Eval(wl, wr, xl, xr, X2(xl,xr)) - f2 = ((b-w)/ep - w*u) * ChiR(xl,xr,X2(xl,xr)) - u = Eval(ul, ur, xl, xr, X3(xl,xr)) - v = Eval(vl, vr, xl, xr, X3(xl,xr)) - w = Eval(wl, wr, xl, xr, X3(xl,xr)) - f3 = ((b-w)/ep - w*u) * ChiR(xl,xr,X3(xl,xr)) - ydot(3,ix+1) = ydot(3,ix+1) + Quad(f1,f2,f3,xl,xr) - - ! w -- diffusion - f1 = -dw * Eval_x(wl,wr,xl,xr) * ChiR_x(xl,xr) - ydot(3,ix+1) = ydot(3,ix+1) + Quad(f1,f1,f1,xl,xr) - - endif - - enddo - ier = 0 - - return - -end subroutine farkifun -!----------------------------------------------------------------- - - - -subroutine farkefun(t, y, ydot, ipar, rpar, ier) -!----------------------------------------------------------------- -! (unused) Explicit portion of the ODE right-hand function -!----------------------------------------------------------------- - use UserData - - ! Declarations - implicit none - - ! Arguments - real(kind=REALTYPE), intent(in) :: t, rpar(1) - integer*8, intent(in) :: ipar(1) - real(kind=REALTYPE), intent(in) :: y(3,N) - real(kind=REALTYPE), intent(out) :: ydot(3,N) - integer, intent(out) :: ier - - ! return with success (since fully implicit) - ydot = 0.d0 - ier = 0 - -end subroutine farkefun -!----------------------------------------------------------------- - - - -subroutine farkspjac(t, y, fy, neq, nnz, Jdata, Jcolvals, & - Jrowptrs, h, ipar, rpar, wk1, wk2, wk3, ier) -!----------------------------------------------------------------- -! Jacobian computation routine -- CSR format -!----------------------------------------------------------------- - use UserData - use Quadrature - use FEM - - ! Declarations - implicit none - - ! Arguments - real(kind=REALTYPE), intent(in) :: t, h, rpar(1) - real(kind=REALTYPE), intent(in), dimension(3,N) :: y, fy, wk1, wk2, wk3 - real(kind=REALTYPE), intent(out) :: Jdata(nnz) - integer*8, intent(in) :: ipar(1), neq, nnz - integer(kind=SUNINDEXTYPE), intent(out) :: Jcolvals(nnz) - integer(kind=SUNINDEXTYPE), intent(out) :: Jrowptrs(neq+1) - integer, intent(out) :: ier - - ! Local data - integer :: ix, nz, Nint - real*8 :: ul, uc, ur, vl, vc, vr, wl, wc, wr, xl, xc, xr - real*8 :: u1, u2, u3, v1, v2, v3, w1, w2, w3 - real*8 :: f1, f2, f3, df1, df2, df3, dQdf1, dQdf2, dQdf3 - real*8 :: ChiL1, ChiL2, ChiL3, ChiR1, ChiR2, ChiR3 - real*8, dimension(3,-1:1) :: Ju, Jv, Jw - - ! check that vector/matrix dimensions match up - if ((3*N /= neq) .or. (nnz < 27*(N-2))) then - ier = 1 - return - endif - - ! set integer*4 version of N for call to idx() - Nint = N - - ! clear out Jacobian matrix data - Jdata = 0.d0 - nz = 0 - - ! Dirichlet boundary at left - Jrowptrs(idx(1,1)+1) = nz - Jrowptrs(idx(1,2)+1) = nz - Jrowptrs(idx(1,3)+1) = nz - - ! iterate through nodes, filling in matrix by rows - do ix=2,N-1 - - ! set nodal value shortcuts (interval index aligns with left node) - xl = x(ix-1) - ul = y(1,ix-1) - vl = y(2,ix-1) - wl = y(3,ix-1) - xc = x(ix) - uc = y(1,ix) - vc = y(2,ix) - wc = y(3,ix) - xr = x(ix+1) - ur = y(1,ix+1) - vr = y(2,ix+1) - wr = y(3,ix+1) - - ! compute entries of all Jacobian rows at node ix - Ju = 0.d0 - Jv = 0.d0 - Jw = 0.d0 - - ! first compute dependence on values to left and center - - ! evaluate relevant variables in left subinterval - u1 = Eval(ul, uc, xl, xc, X1(xl,xc)) - v1 = Eval(vl, vc, xl, xc, X1(xl,xc)) - w1 = Eval(wl, wc, xl, xc, X1(xl,xc)) - u2 = Eval(ul, uc, xl, xc, X2(xl,xc)) - v2 = Eval(vl, vc, xl, xc, X2(xl,xc)) - w2 = Eval(wl, wc, xl, xc, X2(xl,xc)) - u3 = Eval(ul, uc, xl, xc, X3(xl,xc)) - v3 = Eval(vl, vc, xl, xc, X3(xl,xc)) - w3 = Eval(wl, wc, xl, xc, X3(xl,xc)) - - dQdf1 = Quad(1.d0, 0.d0, 0.d0, xl, xc) - dQdf2 = Quad(0.d0, 1.d0, 0.d0, xl, xc) - dQdf3 = Quad(0.d0, 0.d0, 1.d0, xl, xc) - - ChiL1 = ChiL(xl, xc, X1(xl,xc)) - ChiL2 = ChiL(xl, xc, X2(xl,xc)) - ChiL3 = ChiL(xl, xc, X3(xl,xc)) - ChiR1 = ChiR(xl, xc, X1(xl,xc)) - ChiR2 = ChiR(xl, xc, X2(xl,xc)) - ChiR3 = ChiR(xl, xc, X3(xl,xc)) - - - ! compute diffusion Jacobian components - - ! L_u = -du * u_x * ChiR_x - ! dL_u/dul - Ju(1,-1) = (-du) * Quad(1.d0,1.d0,1.d0,xl,xc) * ChiL_x(xl,xc) * ChiR_x(xl,xc) - ! dL_u/duc - Ju(1,0) = (-du) * Quad(1.d0,1.d0,1.d0,xl,xc) * ChiR_x(xl,xc) * ChiR_x(xl,xc) - - ! L_v = -dv * v_x * ChiR_x - ! dL_v/dvl - Jv(2,-1) = (-dv) * Quad(1.d0,1.d0,1.d0,xl,xc) * ChiL_x(xl,xc) * ChiR_x(xl,xc) - ! dL_v/dvc - Jv(2,0) = (-dv) * Quad(1.d0,1.d0,1.d0,xl,xc) * ChiR_x(xl,xc) * ChiR_x(xl,xc) - - ! L_w = -dw * w_x * ChiR_x - ! dL_w/dwl - Jw(3,-1) = (-dw) * Quad(1.d0,1.d0,1.d0,xl,xc) * ChiL_x(xl,xc) * ChiR_x(xl,xc) - ! dL_w/dwc - Jw(3,0) = (-dw) * Quad(1.d0,1.d0,1.d0,xl,xc) * ChiR_x(xl,xc) * ChiR_x(xl,xc) - - - ! compute reaction Jacobian components - - ! R_u = (a - (w+1.d0)*u + v*u*u) - ! dR_u/dul - df1 = (-(w1+1.d0) + 2.d0*v1*u1) * ChiL1 * ChiR1 - df2 = (-(w2+1.d0) + 2.d0*v2*u2) * ChiL2 * ChiR2 - df3 = (-(w3+1.d0) + 2.d0*v3*u3) * ChiL3 * ChiR3 - Ju(1,-1) = Ju(1,-1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/duc - df1 = (-(w1+1.d0) + 2.d0*v1*u1) * ChiR1 * ChiR1 - df2 = (-(w2+1.d0) + 2.d0*v2*u2) * ChiR2 * ChiR2 - df3 = (-(w3+1.d0) + 2.d0*v3*u3) * ChiR3 * ChiR3 - Ju(1,0) = Ju(1,0)+ dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dvl - df1 = (u1*u1) * ChiL1 * ChiR1 - df2 = (u2*u2) * ChiL2 * ChiR2 - df3 = (u3*u3) * ChiL3 * ChiR3 - Ju(2,-1) = Ju(2,-1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dvc - df1 = (u1*u1) * ChiR1 * ChiR1 - df2 = (u2*u2) * ChiR2 * ChiR2 - df3 = (u3*u3) * ChiR3 * ChiR3 - Ju(2,0) = Ju(2,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dwl - df1 = (-u1) * ChiL1 * ChiR1 - df2 = (-u2) * ChiL2 * ChiR2 - df3 = (-u3) * ChiL3 * ChiR3 - Ju(3,-1) = Ju(3,-1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dwc - df1 = (-u1) * ChiR1 * ChiR1 - df2 = (-u2) * ChiR2 * ChiR2 - df3 = (-u3) * ChiR3 * ChiR3 - Ju(3,0) = Ju(3,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - - ! R_v = (w*u - v*u*u) - ! dR_v/dul - df1 = (w1 - 2.d0*v1*u1) * ChiL1 * ChiR1 - df2 = (w2 - 2.d0*v2*u2) * ChiL2 * ChiR2 - df3 = (w3 - 2.d0*v3*u3) * ChiL3 * ChiR3 - Jv(1,-1) = Jv(1,-1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/duc - df1 = (w1 - 2.d0*v1*u1) * ChiR1 * ChiR1 - df2 = (w2 - 2.d0*v2*u2) * ChiR2 * ChiR2 - df3 = (w3 - 2.d0*v3*u3) * ChiR3 * ChiR3 - Jv(1,0) = Jv(1,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dvl - df1 = (-u1*u1) * ChiL1 * ChiR1 - df2 = (-u2*u2) * ChiL2 * ChiR2 - df3 = (-u3*u3) * ChiL3 * ChiR3 - Jv(2,-1) = Jv(2,-1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dvc - df1 = (-u1*u1) * ChiR1 * ChiR1 - df2 = (-u2*u2) * ChiR2 * ChiR2 - df3 = (-u3*u3) * ChiR3 * ChiR3 - Jv(2,0) = Jv(2,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dwl - df1 = (u1) * ChiL1 * ChiR1 - df2 = (u2) * ChiL2 * ChiR2 - df3 = (u3) * ChiL3 * ChiR3 - Jv(3,-1) = Jv(3,-1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dwc - df1 = (u1) * ChiR1 * ChiR1 - df2 = (u2) * ChiR2 * ChiR2 - df3 = (u3) * ChiR3 * ChiR3 - Jv(3,0) = Jv(3,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - - ! R_w = ((b-w)/ep - w*u) - ! dR_w/dul - df1 = (-w1) * ChiL1 * ChiR1 - df2 = (-w2) * ChiL2 * ChiR2 - df3 = (-w3) * ChiL3 * ChiR3 - Jw(1,-1) = Jw(1,-1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_w/duc - df1 = (-w1) * ChiR1 * ChiR1 - df2 = (-w2) * ChiR2 * ChiR2 - df3 = (-w3) * ChiR3 * ChiR3 - Jw(1,0) = Jw(1,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_w/dwl - df1 = (-1.d0/ep - u1) * ChiL1 * ChiR1 - df2 = (-1.d0/ep - u2) * ChiL2 * ChiR2 - df3 = (-1.d0/ep - u3) * ChiL3 * ChiR3 - Jw(3,-1) = Jw(3,-1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_w/dwc - df1 = (-1.d0/ep - u1) * ChiR1 * ChiR1 - df2 = (-1.d0/ep - u2) * ChiR2 * ChiR2 - df3 = (-1.d0/ep - u3) * ChiR3 * ChiR3 - Jw(3,0) = Jw(3,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - - ! second compute dependence on values to center and right - - ! evaluate relevant variables in right subinterval - u1 = Eval(uc, ur, xc, xr, X1(xc,xr)) - v1 = Eval(vc, vr, xc, xr, X1(xc,xr)) - w1 = Eval(wc, wr, xc, xr, X1(xc,xr)) - u2 = Eval(uc, ur, xc, xr, X2(xc,xr)) - v2 = Eval(vc, vr, xc, xr, X2(xc,xr)) - w2 = Eval(wc, wr, xc, xr, X2(xc,xr)) - u3 = Eval(uc, ur, xc, xr, X3(xc,xr)) - v3 = Eval(vc, vr, xc, xr, X3(xc,xr)) - w3 = Eval(wc, wr, xc, xr, X3(xc,xr)) - - dQdf1 = Quad(1.d0, 0.d0, 0.d0, xc, xr) - dQdf2 = Quad(0.d0, 1.d0, 0.d0, xc, xr) - dQdf3 = Quad(0.d0, 0.d0, 1.d0, xc, xr) - - ChiL1 = ChiL(xc, xr, X1(xc,xr)) - ChiL2 = ChiL(xc, xr, X2(xc,xr)) - ChiL3 = ChiL(xc, xr, X3(xc,xr)) - ChiR1 = ChiR(xc, xr, X1(xc,xr)) - ChiR2 = ChiR(xc, xr, X2(xc,xr)) - ChiR3 = ChiR(xc, xr, X3(xc,xr)) - - - ! compute diffusion Jacobian components - - ! L_u = -du * u_x * ChiL_x - ! dL_u/duc - Ju(1,0) = Ju(1,0) + (-du) * Quad(1.d0,1.d0,1.d0,xc,xr) * ChiL_x(xc,xr) * ChiL_x(xc,xr) - - ! dL_u/dur - Ju(1,1) = Ju(1,1) + (-du) * Quad(1.d0,1.d0,1.d0,xc,xr) * ChiL_x(xc,xr) * ChiR_x(xc,xr) - - ! L_v = -dv * v_x * ChiL_x - ! dL_v/dvc - Jv(2,0) = Jv(2,0) + (-dv) * Quad(1.d0,1.d0,1.d0,xc,xr) * ChiL_x(xc,xr) * ChiL_x(xc,xr) - - ! dL_v/dvr - Jv(2,1) = Jv(2,1) + (-dv) * Quad(1.d0,1.d0,1.d0,xc,xr) * ChiL_x(xc,xr) * ChiR_x(xc,xr) - - ! L_w = -dw * w_x * ChiL_x - ! dL_w/dwc - Jw(3,0) = Jw(3,0) + (-dw) * Quad(1.d0,1.d0,1.d0,xc,xr) * ChiL_x(xc,xr) * ChiL_x(xc,xr) - - ! dL_w/dwr - Jw(3,1) = Jw(3,1) + (-dw) * Quad(1.d0,1.d0,1.d0,xc,xr) * ChiL_x(xc,xr) * ChiR_x(xc,xr) - - - ! compute reaction Jacobian components - - ! R_u = (a - (w+1.d0)*u + v*u*u) - ! dR_u/duc - df1 = (-(w1+1.d0) + 2.d0*v1*u1) * ChiL1 * ChiL1 - df2 = (-(w2+1.d0) + 2.d0*v2*u2) * ChiL2 * ChiL2 - df3 = (-(w3+1.d0) + 2.d0*v3*u3) * ChiL3 * ChiL3 - Ju(1,0) = Ju(1,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dur - df1 = (-(w1+1.d0) + 2.d0*v1*u1) * ChiL1 * ChiR1 - df2 = (-(w2+1.d0) + 2.d0*v2*u2) * ChiL2 * ChiR2 - df3 = (-(w3+1.d0) + 2.d0*v3*u3) * ChiL3 * ChiR3 - Ju(1,1) = Ju(1,1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dvc - df1 = (u1*u1) * ChiL1 * ChiL1 - df2 = (u2*u2) * ChiL2 * ChiL2 - df3 = (u3*u3) * ChiL3 * ChiL3 - Ju(2,0) = Ju(2,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dvr - df1 = (u1*u1) * ChiL1 * ChiR1 - df2 = (u2*u2) * ChiL2 * ChiR2 - df3 = (u3*u3) * ChiL3 * ChiR3 - Ju(2,1) = Ju(2,1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dwc - df1 = (-u1) * ChiL1 * ChiL1 - df2 = (-u2) * ChiL2 * ChiL2 - df3 = (-u3) * ChiL3 * ChiL3 - Ju(3,0) = Ju(3,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_u/dwr - df1 = (-u1) * ChiL1 * ChiR1 - df2 = (-u2) * ChiL2 * ChiR2 - df3 = (-u3) * ChiL3 * ChiR3 - Ju(3,1) = Ju(3,1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - - ! R_v = (w*u - v*u*u) - ! dR_v/duc - df1 = (w1 - 2.d0*v1*u1) * ChiL1 * ChiL1 - df2 = (w2 - 2.d0*v2*u2) * ChiL2 * ChiL2 - df3 = (w3 - 2.d0*v3*u3) * ChiL3 * ChiL3 - Jv(1,0) = Jv(1,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dur - df1 = (w1 - 2.d0*v1*u1) * ChiL1 * ChiR1 - df2 = (w2 - 2.d0*v2*u2) * ChiL2 * ChiR2 - df3 = (w3 - 2.d0*v3*u3) * ChiL3 * ChiR3 - Jv(1,1) = Jv(1,1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dvc - df1 = (-u1*u1) * ChiL1 * ChiL1 - df2 = (-u2*u2) * ChiL2 * ChiL2 - df3 = (-u3*u3) * ChiL3 * ChiL3 - Jv(2,0) = Jv(2,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dvr - df1 = (-u1*u1) * ChiL1 * ChiR1 - df2 = (-u2*u2) * ChiL2 * ChiR2 - df3 = (-u3*u3) * ChiL3 * ChiR3 - Jv(2,1) = Jv(2,1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dwc - df1 = (u1) * ChiL1 * ChiL1 - df2 = (u2) * ChiL2 * ChiL2 - df3 = (u3) * ChiL3 * ChiL3 - Jv(3,0) = Jv(3,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_v/dwr - df1 = (u1) * ChiL1 * ChiR1 - df2 = (u2) * ChiL2 * ChiR2 - df3 = (u3) * ChiL3 * ChiR3 - Jv(3,1) = Jv(3,1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - - ! R_w = ((b-w)/ep - w*u) - ! dR_w/duc - df1 = (-w1) * ChiL1 * ChiL1 - df2 = (-w2) * ChiL2 * ChiL2 - df3 = (-w3) * ChiL3 * ChiL3 - Jw(1,0) = Jw(1,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_w/dur - df1 = (-w1) * ChiL1 * ChiR1 - df2 = (-w2) * ChiL2 * ChiR2 - df3 = (-w3) * ChiL3 * ChiR3 - Jw(1,1) = Jw(1,1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_w/dwc - df1 = (-1.d0/ep - u1) * ChiL1 * ChiL1 - df2 = (-1.d0/ep - u2) * ChiL2 * ChiL2 - df3 = (-1.d0/ep - u3) * ChiL3 * ChiL3 - Jw(3,0) = Jw(3,0) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - ! dR_w/dwr - df1 = (-1.d0/ep - u1) * ChiL1 * ChiR1 - df2 = (-1.d0/ep - u2) * ChiL2 * ChiR2 - df3 = (-1.d0/ep - u3) * ChiL3 * ChiR3 - Jw(3,1) = Jw(3,1) + dQdf1*df1 + dQdf2*df2 + dQdf3*df3 - - - ! insert Jacobian entries into CSR matrix structure - - ! Ju row - Jrowptrs(idx(ix,1)+1) = nz - - Jdata(nz+1:nz+3) = (/ Ju(1,-1), Ju(2,-1), Ju(3,-1) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix-1,1), idx(ix-1,2), idx(ix-1,3) /) - nz = nz+3 - - Jdata(nz+1:nz+3) = (/ Ju(1,0), Ju(2,0), Ju(3,0) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix,1), idx(ix,2), idx(ix,3) /) - nz = nz+3 - - Jdata(nz+1:nz+3) = (/ Ju(1,1), Ju(2,1), Ju(3,1) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix+1,1), idx(ix+1,2), idx(ix+1,3) /) - nz = nz+3 - - ! Jv row - Jrowptrs(idx(ix,2)+1) = nz - - Jdata(nz+1:nz+3) = (/ Jv(1,-1), Jv(2,-1), Jv(3,-1) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix-1,1), idx(ix-1,2), idx(ix-1,3) /) - nz = nz+3 - - Jdata(nz+1:nz+3) = (/ Jv(1,0), Jv(2,0), Jv(3,0) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix,1), idx(ix,2), idx(ix,3) /) - nz = nz+3 - - Jdata(nz+1:nz+3) = (/ Jv(1,1), Jv(2,1), Jv(3,1) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix+1,1), idx(ix+1,2), idx(ix+1,3) /) - nz = nz+3 - - ! Jw row - Jrowptrs(idx(ix,3)+1) = nz - - Jdata(nz+1:nz+3) = (/ Jw(1,-1), Jw(2,-1), Jw(3,-1) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix-1,1), idx(ix-1,2), idx(ix-1,3) /) - nz = nz+3 - - Jdata(nz+1:nz+3) = (/ Jw(1,0), Jw(2,0), Jw(3,0) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix,1), idx(ix,2), idx(ix,3) /) - nz = nz+3 - - Jdata(nz+1:nz+3) = (/ Jw(1,1), Jw(2,1), Jw(3,1) /) - Jcolvals(nz+1:nz+3) = (/ idx(ix+1,1), idx(ix+1,2), idx(ix+1,3) /) - nz = nz+3 - - enddo - - ! Dirichlet boundary at right - Jrowptrs(idx(Nint,1)+1) = nz - Jrowptrs(idx(Nint,2)+1) = nz - Jrowptrs(idx(Nint,3)+1) = nz - - ! signal end of data in CSR matrix - Jrowptrs(idx(Nint,3)+2) = nz - - ier = 0 - return - -end subroutine farkspjac -!----------------------------------------------------------------- - - - -subroutine farkspmass(t, neq, nnz, Mdata, Mcolvals, Mrowptrs, & - ipar, rpar, wk1, wk2, wk3, ier) -!----------------------------------------------------------------- -! Mass matrix computation routine -!----------------------------------------------------------------- - use UserData - use Quadrature - use FEM - - ! Declarations - implicit none - - ! Arguments - real(kind=REALTYPE), intent(in) :: t, rpar(1) - real(kind=REALTYPE), intent(in), dimension(3,N) :: wk1, wk2, wk3 - real(kind=REALTYPE), intent(out) :: Mdata(nnz) - integer*8, intent(in) :: ipar(1), neq, nnz - integer(kind=SUNINDEXTYPE), intent(out) :: Mcolvals(nnz) - integer(kind=SUNINDEXTYPE), intent(out) :: Mrowptrs(neq+1) - integer, intent(out) :: ier - - ! Local data - integer :: ix, nz, Nint - real*8 :: xl, xc, xr, Ml, Mc, Mr, ChiL1, ChiL2, ChiL3, ChiR1, ChiR2, ChiR3 - logical :: left, right - - ! check that vector/matrix dimensions match up - if ((3*N /= neq) .or. (nnz /= 15*neq)) then - ier = 1 - return - endif - - ! set integer*4 version of N for call to idx() - Nint = N - - ! clear out Jacobian matrix data - Mdata = 0.d0 - nz = 0 - - ! iterate through nodes, filling in matrix by rows - do ix=1,N - - ! set booleans to determine whether intervals exist on the left/right */ - left = .true. - right = .true. - if (ix==1) left = .false. - if (ix==N) right = .false. - - ! set nodal value shortcuts (interval index aligns with left node) - if (left) then - xl = x(ix-1) - endif - xc = x(ix) - if (right) then - xr = x(ix+1) - endif - - ! compute entries of all mass matrix rows at node ix - Ml = 0.d0 - Mc = 0.d0 - Mr = 0.d0 - - ! first compute dependence on values to left and center - if (left) then - - ChiL1 = ChiL(xl, xc, X1(xl,xc)) - ChiL2 = ChiL(xl, xc, X2(xl,xc)) - ChiL3 = ChiL(xl, xc, X3(xl,xc)) - ChiR1 = ChiR(xl, xc, X1(xl,xc)) - ChiR2 = ChiR(xl, xc, X2(xl,xc)) - ChiR3 = ChiR(xl, xc, X3(xl,xc)) - - Ml = Ml + Quad(ChiL1*ChiR1, ChiL2*ChiR2, ChiL3*ChiR3, xl, xc) - Mc = Mc + Quad(ChiR1*ChiR1, ChiR2*ChiR2, ChiR3*ChiR3, xl, xc) - - endif - - ! second compute dependence on values to center and right - if (right) then - - ChiL1 = ChiL(xc, xr, X1(xc,xr)) - ChiL2 = ChiL(xc, xr, X2(xc,xr)) - ChiL3 = ChiL(xc, xr, X3(xc,xr)) - ChiR1 = ChiR(xc, xr, X1(xc,xr)) - ChiR2 = ChiR(xc, xr, X2(xc,xr)) - ChiR3 = ChiR(xc, xr, X3(xc,xr)) - - Mc = Mc + Quad(ChiL1*ChiL1, ChiL2*ChiL2, ChiL3*ChiL3, xc, xr) - Mr = Mr + Quad(ChiL1*ChiR1, ChiL2*ChiR2, ChiL3*ChiR3, xc, xr) - - endif - - - ! insert mass matrix entries into CSR matrix structure - - ! u row - Mrowptrs(idx(ix,1)+1) = nz - if (left) then - nz = nz+1 - Mdata(nz) = Ml - Mcolvals(nz) = idx(ix-1,1) - endif - nz = nz+1 - Mdata(nz) = Mc - Mcolvals(nz) = idx(ix,1) - if (right) then - nz = nz+1 - Mdata(nz) = Mr - Mcolvals(nz) = idx(ix+1,1) - endif - - ! v row - Mrowptrs(idx(ix,2)+1) = nz - if (left) then - nz = nz+1 - Mdata(nz) = Ml - Mcolvals(nz) = idx(ix-1,2) - endif - nz = nz+1 - Mdata(nz) = Mc - Mcolvals(nz) = idx(ix,2) - if (right) then - nz = nz+1 - Mdata(nz) = Mr - Mcolvals(nz) = idx(ix+1,2) - endif - - ! w row - Mrowptrs(idx(ix,3)+1) = nz - if (left) then - nz = nz+1 - Mdata(nz) = Ml - Mcolvals(nz) = idx(ix-1,3) - endif - nz = nz+1 - Mdata(nz) = Mc - Mcolvals(nz) = idx(ix,3) - if (right) then - nz = nz+1 - Mdata(nz) = Mr - Mcolvals(nz) = idx(ix+1,3) - endif - - enddo - - ! signal end of data in CSR matrix - Mrowptrs(idx(Nint,3)+2) = nz - - ier = 0 - return - -end subroutine farkspmass -!----------------------------------------------------------------- diff --git a/examples/arkode/F90_serial/ark_bruss1D_FEM_klu.out b/examples/arkode/F90_serial/ark_bruss1D_FEM_klu.out deleted file mode 100644 index e3ad641b77..0000000000 --- a/examples/arkode/F90_serial/ark_bruss1D_FEM_klu.out +++ /dev/null @@ -1,59 +0,0 @@ -ARKode solver parameters: - Solver relative tolerance = 1e-06 - Solver absolute tolerance = 1e-11 - Absolute residual tolerance = 1e-11 - - Maximum step increase (first step) = 10000 - Step reduction factor on multiple error fails = 0.3 - Minimum error fails before above factor is used = 2 - Step reduction factor on nonlinear convergence failure = 0.25 - Explicit safety factor = 0.5 - Time step adaptivity method 0 - Safety factor = 0.96 - Bias factor = 1.5 - Growth factor = 20 - Step growth lower bound = 1 - Step growth upper bound = 1.5 - k1 = 0.58 - k2 = 0.21 - k3 = 0.1 - Default explicit stability function - Maximum number of error test failures = 7 - Maximum number of convergence test failures = 10 -ARKStep time step module parameters: - Method order 4 - Implicit integrator - Implicit predictor method = 0 - Implicit solver tolerance coefficient = 0.1 - Maximum number of nonlinear corrections = 3 - Nonlinear convergence rate constant = 0.3 - Nonlinear divergence tolerance = 2.3 - Gamma factor LSetup tolerance = 0.2 - Number of steps between LSetup calls = 20 - - t ||u||_rms ||v||_rms ||w||_rms - ---------------------------------------------------- - 0.00000E+00 6.32978E-01 3.36571E+00 2.03247E+00 - 1.00000E+00 6.97285E-01 3.23962E+00 1.99999E+00 - 2.00000E+00 7.89501E-01 3.05139E+00 1.99999E+00 - 3.00000E+00 7.83681E-01 2.93001E+00 1.99999E+00 - 4.00000E+00 6.48122E-01 3.00833E+00 1.99999E+00 - 5.00000E+00 5.52223E-01 3.17028E+00 1.99999E+00 - 6.00000E+00 5.22111E-01 3.30889E+00 1.99999E+00 - 7.00000E+00 5.20869E-01 3.40614E+00 1.99999E+00 - 8.00000E+00 5.30276E-01 3.46669E+00 1.99999E+00 - 9.00000E+00 5.45196E-01 3.49456E+00 1.99999E+00 - 1.00000E+01 5.65426E-01 3.49094E+00 1.99999E+00 - ---------------------------------------------------- - - Final Solver Statistics: - Internal solver steps = 104 (attempted = 104 ) - Total RHS evals: Fe = 0 Fi = 1732 - Total linear solver setups = 48 - Total RHS evals for setting up the linear system = 0 - Total number of Jacobian evaluations = 11 - Total number of nonlinear iterations = 1209 - Total number of nonlinear solver convergence failures = 0 - Total number of error test failures = 0 - Total number of mass matrix evaluations = 1 - diff --git a/examples/arkode/F90_serial/plot_brusselator1D_FEM.py b/examples/arkode/F90_serial/plot_brusselator1D_FEM.py deleted file mode 100755 index 19be9cbdda..0000000000 --- a/examples/arkode/F90_serial/plot_brusselator1D_FEM.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python -# ------------------------------------------------------------ -# 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 -# ------------------------------------------------------------ -# matplotlib-based plotting script for brusselator1D.c example - -# imports -import sys -import pylab as plt -import numpy as np - -# load mesh data file -mesh = np.loadtxt('bruss_FEM_mesh.txt', dtype=np.double) - -# load solution data files -udata = np.loadtxt('bruss_FEM_u.txt', dtype=np.double) -vdata = np.loadtxt('bruss_FEM_v.txt', dtype=np.double) -wdata = np.loadtxt('bruss_FEM_w.txt', dtype=np.double) - -# determine number of time steps, mesh size -nt,nx = np.shape(udata) - -# determine min/max values -umin = 0.9*udata.min() -umax = 1.1*udata.max() -vmin = 0.9*vdata.min() -vmax = 1.1*vdata.max() -wmin = 0.9*wdata.min() -wmax = 1.1*wdata.max() -minval = np.array([umin, vmin, wmin]).min() -maxval = np.array([umax, vmax, wmax]).max() - -# plot the mesh -plt.figure(1) -plt.plot(mesh,0.0*mesh,'o') -plt.xlabel('x') -plt.title('FEM mesh') -plt.savefig('brusselator1D_FEM_mesh.png') - -# generate plots of results -for tstep in range(nt): - - # set string constants for output plots, current time, mesh size - pname = 'brusselator1D_FEM.' + repr(tstep).zfill(3) + '.png' - tstr = repr(tstep) - nxstr = repr(nx) - - # plot current solution and save to disk - plt.figure(1) - plt.plot(mesh,udata[tstep,:],label="u") - plt.plot(mesh,vdata[tstep,:],label="v") - plt.plot(mesh,wdata[tstep,:],label="w") - plt.xlabel('x') - plt.ylabel('solution') - plt.title('Solutions at output ' + tstr + ', mesh = ' + nxstr) - plt.axis((0.0, 1.0, minval, maxval)) - plt.grid() - plt.legend(loc='upper right', shadow=True) - plt.savefig(pname) - plt.close() - - -##### end of script ##### diff --git a/examples/arkode/F90_serial/plot_sol.py b/examples/arkode/F90_serial/plot_sol.py deleted file mode 100755 index 1175383218..0000000000 --- a/examples/arkode/F90_serial/plot_sol.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python -# ---------------------------------------------------------------- -# 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 -# ---------------------------------------------------------------- -# matplotlib-based plotting script for ODE examples - -# imports -import sys -import pylab as plt -import numpy as np - -# load solution data file -data = np.loadtxt('solution.txt', dtype=np.double) - -# determine number of time steps, number of fields -nt,nv = np.shape(data) - -# extract time array -times = data[:,0] - -# parse comment line to determine solution names -f = open('solution.txt', 'r') -commentline = f.readline() -commentsplit = commentline.split() -names = commentsplit[2:] - -# create plot -plt.figure() - -# add curves to figure -for i in range(nv-1): - plt.plot(times,data[:,i+1],label=names[i]) -plt.xlabel('t') -if (nv > 2): - plt.ylabel('solutions') -else: - plt.ylabel('solution') -plt.legend(loc='upper right', shadow=True) -plt.grid() -plt.savefig('solution.png') - - - - -##### end of script ##### diff --git a/examples/cvode/fcmix_parallel/CMakeLists.txt b/examples/cvode/fcmix_parallel/CMakeLists.txt deleted file mode 100644 index f99db2eee2..0000000000 --- a/examples/cvode/fcmix_parallel/CMakeLists.txt +++ /dev/null @@ -1,140 +0,0 @@ -# --------------------------------------------------------------- -# Programmer(s): 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 -# --------------------------------------------------------------- -# CMakeLists.txt file for the FCVODE parallel examples -# --------------------------------------------------------------- - -# Example lists are tuples "name\;nodes\;tasks\;type" where the -# type is develop for examples excluded from 'make test' in releases - -# Examples using SUNDIALS linear solvers -set(FCVODE_examples - "fcvDiag_non_p\;1\;2\;develop" - "fcvDiag_kry_bbd_p\;1\;2\;develop" - "fcvDiag_kry_p\;1\;2\;develop" - ) - -if(MPI_Fortran_COMPILER) - # use MPI wrapper as the compiler - set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER}) -else() - # add MPI_INCLUDE_PATH to include directories - include_directories(${MPI_INCLUDE_PATH}) -endif() - -# Specify libraries to link againstx -set(FNVECP_LIB sundials_fnvecparallel) - -# Only static FCMIX libraries are available -set(FCVODE_LIB sundials_fcvode${_STATIC_LIB_SUFFIX}) - -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) - list(APPEND FCVODE_LIB sundials_cvode_fused_stubs) -endif() - -# Set-up linker flags and link libraries -set(SUNDIALS_LIBS ${FCVODE_LIB} ${FNVECP_LIB}) - -# Add the build and install targets for each example -foreach(example_tuple ${FCVODE_examples}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 number_of_nodes) - list(GET example_tuple 2 number_of_tasks) - list(GET example_tuple 3 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - MPI_NPROCS ${number_of_tasks} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${EXE_EXTRA_LINK_LIBS}) - - if(NOT MPI_Fortran_COMPILER) - target_link_libraries(${example} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARIES}) - endif() - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_parallel) - endif() - -endforeach(example_tuple ${FCVODE_examples}) - - -# create Makfile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) - - # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_parallel) - - # Prepare substitution variables for Makefile and/or CMakeLists templates - set(SOLVER "CVODE") - set(SOLVER_LIB "sundials_cvode") - set(SOLVER_FLIB "sundials_fcvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) - set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") - endif() - - examples2string(FCVODE_examples EXAMPLES) - - # Regardless of the platform we're on, we will generate and install - # CMakeLists.txt file for building the examples. This file can then - # be used as a template for the user's own programs. - - # generate CMakelists.txt in the binary directory - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/cmakelists_parallel_F77_ex.in - ${PROJECT_BINARY_DIR}/examples/cvode/fcmix_parallel/CMakeLists.txt - @ONLY - ) - - # install CMakelists.txt - install( - FILES ${PROJECT_BINARY_DIR}/examples/cvode/fcmix_parallel/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_parallel - ) - - # On UNIX-type platforms, we also generate and install a makefile for - # building the examples. This makefile can then be used as a template - # for the user's own programs. - - if(UNIX) - # generate Makefile and place it in the binary dir - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/makefile_parallel_F77_ex.in - ${PROJECT_BINARY_DIR}/examples/cvode/fcmix_parallel/Makefile_ex - @ONLY - ) - # install the configured Makefile_ex as Makefile - install( - FILES ${PROJECT_BINARY_DIR}/examples/cvode/fcmix_parallel/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_parallel - RENAME Makefile - ) - endif() - - # add test_install target - sundials_add_test_install(cvode fcmix_parallel) - -endif() diff --git a/examples/cvode/fcmix_parallel/README b/examples/cvode/fcmix_parallel/README deleted file mode 100644 index 14e08e7c87..0000000000 --- a/examples/cvode/fcmix_parallel/README +++ /dev/null @@ -1,48 +0,0 @@ -List of parallel CVODE FCMIX examples - - fcvDiag_non_p : diagonal ODE example - non-stiff case (ADAMS/FIXEDPOINT) - fcvDiag_kry_bbd_p : diagonal ODE example - stiff case (BDF/SPGMR/FCVBBD) - fcvDiag_kry_p : diagonal ODE example - stiff case (BDF/SPGMR) - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p.f b/examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p.f deleted file mode 100644 index c4ea341376..0000000000 --- a/examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p.f +++ /dev/null @@ -1,336 +0,0 @@ -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C Diagonal ODE example. Stiff case, with diagonal preconditioner. -C Uses FCVODE interfaces and FCVBBD interfaces. -C Solves problem twice -- with left and right preconditioning. -C -------------------------------------------------------------------- -C -C Include MPI-Fortran header file for MPI_COMM_WORLD, MPI types. - - IMPLICIT NONE -C - INCLUDE "mpif.h" -C -C The following declaration specification should match C type long int. - INTEGER*8 NLOCAL, NEQ, I, IOUT(25), IPAR(2), MUDQ, MLDQ, MU, ML - PARAMETER (NLOCAL=10) -C - INTEGER*4 NOUT, LNST, LNFE, LNSETUP, LNNI, LNCF, LNETF, LNPE - INTEGER*4 LNLI, LNPS, LNCFL, MYPE, IER, NPES, METH - INTEGER*4 LLENRW, LLENIW, LLENRWLS, LLENIWLS - INTEGER*4 IATOL, ITASK, IPRE, IGS, JOUT -C The following declaration specification should match C type long int. - INTEGER*8 LENRWBBD, LENIWBBD, NGEBBD - INTEGER*8 NST, NFE, NPSET, NPE, NPS, NNI, NLI, NCFN, NCFL, NETF - INTEGER*8 LENRW, LENIW, LENRWLS, LENIWLS - DOUBLE PRECISION Y(1024), ROUT(10), RPAR(1) - DOUBLE PRECISION ALPHA, TOUT, ERMAX, AVDIM - DOUBLE PRECISION ATOL, ERRI, RTOL, GERMAX, DTOUT, T -C - DATA ATOL/1.0D-10/, RTOL/1.0D-5/, DTOUT/0.1D0/, NOUT/10/ - DATA LLENRW/1/, LLENIW/2/, LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, - 1 LNNI/7/, LNSETUP/8/, LLENRWLS/13/, LLENIWLS/14/, - 1 LNPE/20/, LNLI/22/, LNPS/21/, LNCFL/23/ -C -C Get NPES and MYPE. Requires initialization of MPI. - CALL MPI_INIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,5) IER - 5 FORMAT(///' MPI_ERROR: MPI_INIT returned IER = ', I5) - STOP - ENDIF - CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NPES, IER) - IF (IER .NE. 0) THEN - WRITE(6,6) IER - 6 FORMAT(///' MPI_ERROR: MPI_COMM_SIZE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - CALL MPI_COMM_RANK(MPI_COMM_WORLD, MYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,7) IER - 7 FORMAT(///' MPI_ERROR: MPI_COMM_RANK returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Set input arguments. - NEQ = NPES * NLOCAL - T = 0.0D0 - METH = 2 - IATOL = 1 - ITASK = 1 - IPRE = 1 - IGS = 1 -C Set parameter alpha - ALPHA = 10.0D0 -C -C Load IPAR and RPAR - IPAR(1) = NLOCAL - IPAR(2) = MYPE - RPAR(1) = ALPHA -C - DO I = 1, NLOCAL - Y(I) = 1.0D0 - ENDDO -C - IF (MYPE .EQ. 0) THEN - WRITE(6,15) NEQ, ALPHA, RTOL, ATOL, NPES - 15 FORMAT('Diagonal test problem:'//' NEQ = ', I3, / - & ' parameter alpha = ', F8.3/ - & ' ydot_i = -alpha*i * y_i (i = 1,...,NEQ)'/ - & ' RTOL, ATOL = ', 2E10.1/ - & ' Method is BDF/NEWTON/SPGMR'/ - & ' Preconditioner is band-block-diagonal, using CVBBDPRE' - & /' Number of processors = ', I3/) - ENDIF -C - CALL FNVINITP(MPI_COMM_WORLD, 1, NLOCAL, NEQ, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITP returned IER = ', I5) - CALL MPI_FINALIZE(IER) - STOP - ENDIF -C -C initialize SPGMR linear solver module - call FSUNSPGMRINIT(1, IPRE, 0, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRINIT IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - call FSUNSPGMRSETGSTYPE(1, IGS, IER) - IF (IER .NE. 0) THEN - WRITE(6,27) IER - 27 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETGSTYPE IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - CALL FCVMALLOC(T, Y, METH, IATOL, RTOL, ATOL, - & IOUT, ROUT, IPAR, RPAR, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C attach linear solver module to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - 32 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - MUDQ = 0 - MLDQ = 0 - MU = 0 - ML = 0 - CALL FCVBBDINIT(NLOCAL, MUDQ, MLDQ, MU, ML, 0.0D0, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FCVBBDINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - IF (MYPE .EQ. 0) WRITE(6,38) - 38 FORMAT(/'Preconditioning on left'/) -C -C Looping point for cases IPRE = 1 and 2. -C - 40 CONTINUE -C -C Loop through tout values, call solver, print output, test for failure. - TOUT = DTOUT - DO 60 JOUT = 1, NOUT -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - IF (MYPE .EQ. 0) WRITE(6,45) T, IOUT(LNST), IOUT(LNFE) - 45 FORMAT(' t = ', E10.2, 5X, 'no. steps = ', I5, - & ' no. f-s = ', I5) -C - IF (IER .NE. 0) THEN - WRITE(6,50) IER, IOUT(15) - 50 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - & ' Linear Solver returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - TOUT = TOUT + DTOUT - 60 CONTINUE -C -C Get max. absolute error in the local vector. - ERMAX = 0.0D0 - DO 65 I = 1, NLOCAL - ERRI = Y(I) - EXP(-ALPHA * (MYPE * NLOCAL + I) * T) - ERMAX = MAX(ERMAX, ABS(ERRI)) - 65 CONTINUE -C Get global max. error from MPI_REDUCE call. - CALL MPI_REDUCE(ERMAX, GERMAX, 1, MPI_DOUBLE_PRECISION, MPI_MAX, - & 0, MPI_COMM_WORLD, IER) - IF (IER .NE. 0) THEN - WRITE(6,70) IER - 70 FORMAT(///' MPI_ERROR: MPI_REDUCE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - IF (MYPE .EQ. 0) WRITE(6,75) GERMAX - 75 FORMAT(/'Max. absolute error is', E10.2/) -C -C Print final statistics. - IF (MYPE .EQ. 0) THEN - NST = IOUT(LNST) - NFE = IOUT(LNFE) - NPSET = IOUT(LNSETUP) - NPE = IOUT(LNPE) - NPS = IOUT(LNPS) - NNI = IOUT(LNNI) - NLI = IOUT(LNLI) - AVDIM = DBLE(NLI) / DBLE(NNI) - NCFN = IOUT(LNCF) - NCFL = IOUT(LNCFL) - NETF = IOUT(LNETF) - LENRW = IOUT(LLENRW) - LENIW = IOUT(LLENIW) - LENRWLS = IOUT(LLENRWLS) - LENIWLS = IOUT(LLENIWLS) - WRITE(6,80) NST, NFE, NPSET, NPE, NPS, NNI, NLI, AVDIM, NCFN, - & NCFL, NETF, LENRW, LENIW, LENRWLS, LENIWLS - 80 FORMAT(/'Final statistics:'// - & ' number of steps = ', I5, 4X, - & ' number of f evals. = ', I5/ - & ' number of prec. setups = ', I5/ - & ' number of prec. evals. = ', I5, 4X, - & ' number of prec. solves = ', I5/ - & ' number of nonl. iters. = ', I5, 4X, - & ' number of lin. iters. = ', I5/ - & ' average Krylov subspace dimension (NLI/NNI) = ',F8.4/ - & ' number of conv. failures.. nonlinear = ', I3, - & ' linear = ', I3/ - & ' number of error test failures = ', I3/ - & ' main solver real/int workspace sizes = ',2I5/ - & ' linear solver real/int workspace sizes = ',2I5) - CALL FCVBBDOPT(LENRWBBD, LENIWBBD, NGEBBD) - WRITE(6,82) LENRWBBD, LENIWBBD, NGEBBD - 82 FORMAT('In CVBBDPRE:'/ - & ' real/int local workspace = ', 2I5/ - & ' number of g evals. = ', I5) - ENDIF -C -C If IPRE = 1, re-initialize T, Y, and the solver, and loop for -C case IPRE = 2. Otherwise jump to final block. - IF (IPRE .EQ. 2) GO TO 99 -C - T = 0.0D0 - DO I = 1, NLOCAL - Y(I) = 1.0D0 - ENDDO -C - CALL FCVREINIT(T, Y, IATOL, RTOL, ATOL, IER) - IF (IER .NE. 0) THEN - WRITE(6,91) IER - 91 FORMAT(///' SUNDIALS_ERROR: FCVREINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - IPRE = 2 -C - CALL FCVBBDREINIT(MUDQ, MLDQ, 0.0D0, IER) - IF (IER .NE. 0) THEN - WRITE(6,92) IER - 92 FORMAT(///' SUNDIALS_ERROR: FCVBBDREINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - CALL FSUNSPGMRSETPRECTYPE(1, IPRE, IER) - IF (IER .NE. 0) THEN - WRITE(6,93) IER - 93 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETPRECTYPE IER = ',I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - IF (MYPE .EQ. 0) WRITE(6,95) - 95 FORMAT(//60('-')///'Preconditioning on right'/) - GO TO 40 -C -C Free the memory and finalize MPI. - 99 CALL FCVFREE - CALL MPI_FINALIZE(IER) -C - STOP - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FCVFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Routine for right-hand side function f - IMPLICIT NONE -C -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*), MYPE, I, NLOCAL - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) - DOUBLE PRECISION ALPHA -C - NLOCAL = IPAR(1) - MYPE = IPAR(2) - ALPHA = RPAR(1) -C - DO I = 1, NLOCAL - YDOT(I) = -ALPHA * (MYPE * NLOCAL + I) * Y(I) - ENDDO -C - IER = 0 -C - RETURN - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FCVGLOCFN(NLOC, T, YLOC, GLOC, IPAR, RPAR, IER) -C Routine to define local approximate function g, here the same as f. - IMPLICIT NONE -C -C The following declaration specification should match C type long int. - INTEGER*8 NLOC, IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, YLOC(*), GLOC(*), RPAR(*) -C - CALL FCVFUN(T, YLOC, GLOC, IPAR, RPAR, IER) -C - RETURN - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FCVCOMMFN(NLOC, T, YLOC, IPAR, RPAR, IER) -C Routine to perform communication required for evaluation of g. - INTEGER*8 NLOC, IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, YLOC(*), RPAR(*) - IER = 0 - RETURN - END diff --git a/examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p.out b/examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p.out deleted file mode 100644 index fd707e5064..0000000000 --- a/examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p.out +++ /dev/null @@ -1,76 +0,0 @@ -Diagonal test problem: - - NEQ = 20 - parameter alpha = 10.000 - ydot_i = -alpha*i * y_i (i = 1,...,NEQ) - RTOL, ATOL = 0.1E-04 0.1E-09 - Method is BDF/NEWTON/SPGMR - Preconditioner is band-block-diagonal, using CVBBDPRE - Number of processors = 2 - - -Preconditioning on left - - t = 0.10E+00 no. steps = 174 no. f-s = 213 - t = 0.20E+00 no. steps = 222 no. f-s = 262 - t = 0.30E+00 no. steps = 247 no. f-s = 288 - t = 0.40E+00 no. steps = 265 no. f-s = 307 - t = 0.50E+00 no. steps = 278 no. f-s = 321 - t = 0.60E+00 no. steps = 290 no. f-s = 333 - t = 0.70E+00 no. steps = 300 no. f-s = 344 - t = 0.80E+00 no. steps = 307 no. f-s = 351 - t = 0.90E+00 no. steps = 312 no. f-s = 357 - t = 0.10E+01 no. steps = 317 no. f-s = 362 - -Max. absolute error is 0.90E-08 - - -Final statistics: - - number of steps = 317 number of f evals. = 362 - number of prec. setups = 33 - number of prec. evals. = 6 number of prec. solves = 644 - number of nonl. iters. = 359 number of lin. iters. = 322 - average Krylov subspace dimension (NLI/NNI) = 0.8969 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 5 - main solver real/int workspace sizes = 349 92 - linear solver real/int workspace sizes = 294 78 -In CVBBDPRE: - real/int local workspace = 100 60 - number of g evals. = 12 - - ------------------------------------------------------------- - - -Preconditioning on right - - t = 0.10E+00 no. steps = 174 no. f-s = 213 - t = 0.20E+00 no. steps = 222 no. f-s = 262 - t = 0.30E+00 no. steps = 247 no. f-s = 288 - t = 0.40E+00 no. steps = 265 no. f-s = 307 - t = 0.50E+00 no. steps = 278 no. f-s = 321 - t = 0.60E+00 no. steps = 290 no. f-s = 333 - t = 0.70E+00 no. steps = 300 no. f-s = 344 - t = 0.80E+00 no. steps = 307 no. f-s = 351 - t = 0.90E+00 no. steps = 312 no. f-s = 357 - t = 0.10E+01 no. steps = 317 no. f-s = 362 - -Max. absolute error is 0.90E-08 - - -Final statistics: - - number of steps = 317 number of f evals. = 362 - number of prec. setups = 33 - number of prec. evals. = 6 number of prec. solves = 644 - number of nonl. iters. = 359 number of lin. iters. = 322 - average Krylov subspace dimension (NLI/NNI) = 0.8969 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 5 - main solver real/int workspace sizes = 349 92 - linear solver real/int workspace sizes = 294 78 -In CVBBDPRE: - real/int local workspace = 100 60 - number of g evals. = 12 diff --git a/examples/cvode/fcmix_parallel/fcvDiag_kry_p.f b/examples/cvode/fcmix_parallel/fcvDiag_kry_p.f deleted file mode 100644 index fa9ac18023..0000000000 --- a/examples/cvode/fcmix_parallel/fcvDiag_kry_p.f +++ /dev/null @@ -1,376 +0,0 @@ -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C Diagonal ODE example. Stiff case, with BDF/SPGMR, diagonal -C preconditioner. Solved with preconditioning on left, then with -C preconditioning on right. -C -------------------------------------------------------------------- -C -C Include MPI-Fortran header file for MPI_COMM_WORLD, MPI types. - - IMPLICIT NONE -C - INCLUDE "mpif.h" -C -C The following declaration specification should match C type long int. - INTEGER*8 NLOCAL, NEQ, I, IOUT(25), IPAR(2) - PARAMETER (NLOCAL=10) -C - INTEGER*4 LNST, LNFE, LNSETUP, LNNI, LNCF, LNETF, LNPE, LNLI, LNPS - INTEGER*4 LNCFL, NOUT, MYPE, NPES, IER, METH, IATOL - INTEGER*4 ITASK, IPRE, IGS, JOUT - INTEGER*8 NST, NFE, NPSET, NPE, NPS, NNI, NLI - INTEGER*8 NCFL, NETF, NCFN - DOUBLE PRECISION Y(1024), ROUT(10), RPAR(1) - DOUBLE PRECISION ATOL, DTOUT, T, ALPHA, RTOL, TOUT, ERMAX, ERRI - DOUBLE PRECISION GERMAX, AVDIM -C - DATA ATOL/1.0D-10/, RTOL/1.0D-5/, DTOUT/0.1D0/, NOUT/10/ - DATA LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, LNNI/7/, LNSETUP/8/, - 1 LNPE/20/, LNLI/22/, LNPS/21/, LNCFL/23/ -C -C Get NPES and MYPE. Requires initialization of MPI. - CALL MPI_INIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,5) IER - 5 FORMAT(///' MPI_ERROR: MPI_INIT returned IER = ', I5) - STOP - ENDIF - CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NPES, IER) - IF (IER .NE. 0) THEN - WRITE(6,6) IER - 6 FORMAT(///' MPI_ERROR: MPI_COMM_SIZE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - CALL MPI_COMM_RANK(MPI_COMM_WORLD, MYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,7) IER - 7 FORMAT(///' MPI_ERROR: MPI_COMM_RANK returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Set input arguments. - NEQ = NPES * NLOCAL - T = 0.0D0 - METH = 2 - IATOL = 1 - ITASK = 1 - IPRE = 1 - IGS = 1 -C Set parameter alpha - ALPHA = 10.0D0 -C -C Load IPAR and RPAR - IPAR(1) = NLOCAL - IPAR(2) = MYPE - RPAR(1) = ALPHA -C -C Do remaining initializations for first case: IPRE = 1 (prec. on left). -C - DO 10 I = 1, NLOCAL - 10 Y(I) = 1.0D0 -C - IF (MYPE .EQ. 0) THEN - WRITE(6,11) NEQ, ALPHA - 11 FORMAT('Diagonal test problem:'//' NEQ = ', I3, - 1 ' parameter alpha = ', F8.3) - WRITE(6,12) - 12 FORMAT(' ydot_i = -alpha*i * y_i (i = 1,...,NEQ)') - WRITE(6,13) RTOL, ATOL - 13 FORMAT(' RTOL, ATOL = ', 2E10.1) - WRITE(6,14) - 14 FORMAT(' Method is BDF/NEWTON/SPGMR'/ - 1 ' Diagonal preconditioner uses approximate Jacobian') - WRITE(6,15) NPES - 15 FORMAT(' Number of processors = ', I3) - WRITE(6,16) - 16 FORMAT(//'Preconditioning on left'/) - ENDIF -C - CALL FNVINITP(MPI_COMM_WORLD, 1, NLOCAL, NEQ, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITP returned IER = ', I5) - CALL MPI_FINALIZE(IER) - STOP - ENDIF -C -C initialize SPGMR linear solver module - call FSUNSPGMRINIT(1, IPRE, 0, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRINIT IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - call FSUNSPGMRSETGSTYPE(1, IGS, IER) - IF (IER .NE. 0) THEN - WRITE(6,27) IER - 27 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETGSTYPE IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - CALL FCVMALLOC(T, Y, METH, IATOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C attach linear solver module to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - 32 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C attach preconditioner to CVLs interface - CALL FCVLSSETPREC(1, IER) -C -C Loop through tout values, call solver, print output, test for failure. - TOUT = DTOUT - DO 70 JOUT = 1, NOUT -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - IF (MYPE .EQ. 0) WRITE(6,40) T, IOUT(LNST), IOUT(LNFE) - 40 FORMAT(' t = ', E10.2, 5X, 'no. steps = ', I5, - & ' no. f-s = ', I5) -C - IF (IER .NE. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - & ' Linear Solver returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - TOUT = TOUT + DTOUT - 70 CONTINUE -C -C Get max. absolute error in the local vector. - ERMAX = 0.0D0 - DO 75 I = 1, NLOCAL - ERRI = Y(I) - EXP(-ALPHA * (MYPE * NLOCAL + I) * T) - 75 ERMAX = MAX(ERMAX, ABS(ERRI)) -C Get global max. error from MPI_REDUCE call. - CALL MPI_REDUCE(ERMAX, GERMAX, 1, MPI_DOUBLE_PRECISION, MPI_MAX, - 1 0, MPI_COMM_WORLD, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - 80 FORMAT(///' MPI_ERROR: MPI_REDUCE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - IF (MYPE .EQ. 0) WRITE(6,85) GERMAX - 85 FORMAT(/'Max. absolute error is ', E10.2/) -C -C Print final statistics. - NST = IOUT(LNST) - NFE = IOUT(LNFE) - NPSET = IOUT(LNSETUP) - NPE = IOUT(LNPE) - NPS = IOUT(LNPS) - NNI = IOUT(LNNI) - NLI = IOUT(LNLI) - AVDIM = DBLE(NLI) / DBLE(NNI) - NCFN = IOUT(LNCF) - NCFL = IOUT(LNCFL) - NETF = IOUT(LNETF) - IF (MYPE .EQ. 0) - 1 WRITE (6,90) NST, NFE, NPSET, NPE, NPS, NNI, NLI, AVDIM, NCFN, - & NCFL, NETF - 90 FORMAT(/'Final statistics:'// - & ' number of steps = ', I5, 5X, - & 'number of f evals. =', I5/ - & ' number of prec. setups = ', I5/ - & ' number of prec. evals. = ', I5, 5X, - & 'number of prec. solves = ', I5/ - & ' number of nonl. iters. = ', I5, 5X, - & 'number of lin. iters. = ', I5/ - & ' average Krylov subspace dimension (NLI/NNI) = ', F8.4/ - & ' number of conv. failures.. nonlinear = ', I3, - & ' linear = ', I3/ - & ' number of error test failures = ', I3) -C -C Re-initialize to run second case: IPRE = 2 (prec. on right). - IPRE = 2 - T = 0.0D0 - DO 110 I = 1, NLOCAL - 110 Y(I) = 1.0D0 -C - IF (MYPE .EQ. 0) WRITE(6,111) - 111 FORMAT(//60('-')///'Preconditioning on right'/) -C - CALL FCVREINIT(T, Y, IATOL, RTOL, ATOL, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,130) IER - 130 FORMAT(///' SUNDIALS_ERROR: FCVREINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - CALL FSUNSPGMRSETPRECTYPE(1, IPRE, IER) - IF (IER .NE. 0) THEN - WRITE(6,140) IER - 140 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETPRECTYPE IER = ',I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Loop through tout values, call solver, print output, test for failure. - TOUT = DTOUT - DO 170 JOUT = 1, NOUT -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - IF (MYPE .EQ. 0) WRITE(6,40) T, IOUT(LNST), IOUT(LNFE) -C - IF (IER .NE. 0) THEN - WRITE(6,60) IER - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - TOUT = TOUT + DTOUT - 170 CONTINUE -C -C Get max. absolute error in the local vector. - ERMAX = 0.0D0 - DO 175 I = 1, NLOCAL - ERRI = Y(I) - EXP(-ALPHA * (MYPE * NLOCAL + I) * T) - 175 ERMAX = MAX(ERMAX, ABS(ERRI)) -C Get global max. error from MPI_REDUCE call. - CALL MPI_REDUCE(ERMAX, GERMAX, 1, MPI_DOUBLE_PRECISION, MPI_MAX, - 1 0, MPI_COMM_WORLD, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - IF (MYPE .EQ. 0) WRITE(6,85) GERMAX -C -C Print final statistics. - NST = IOUT(LNST) - NFE = IOUT(LNFE) - NPSET = IOUT(LNSETUP) - NPE = IOUT(LNPE) - NPS = IOUT(LNPS) - NNI = IOUT(LNNI) - NLI = IOUT(LNLI) - AVDIM = DBLE(NLI) / DBLE(NNI) - NCFN = IOUT(LNCF) - NCFL = IOUT(LNCFL) - NETF = IOUT(LNETF) - IF (MYPE .EQ. 0) - 1 WRITE (6,90) NST, NFE, NPSET, NPE, NPS, NNI, NLI, AVDIM, NCFN, - & NCFL, NETF -C -C Free the memory and finalize MPI. - CALL FCVFREE - CALL MPI_FINALIZE(IER) - IF (IER .NE. 0) THEN - WRITE(6,195) IER - 195 FORMAT(///' MPI_ERROR: MPI_FINALIZE returned IER = ', I5) - STOP - ENDIF -C - STOP - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FCVFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Routine for right-hand side function f - IMPLICIT NONE -C -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*), MYPE, I, NLOCAL - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) - DOUBLE PRECISION ALPHA -C - NLOCAL = IPAR(1) - MYPE = IPAR(2) - ALPHA = RPAR(1) -C - DO I = 1, NLOCAL - YDOT(I) = -ALPHA * (MYPE * NLOCAL + I) * Y(I) - ENDDO -C - IER = 0 -C - RETURN - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FCVPSOL(T, Y, FY, R, Z, GAMMA, DELTA, LR, - & IPAR, RPAR, IER) -C Routine to solve preconditioner linear system -C This routine uses a diagonal preconditioner P = I - gamma*J, -C where J is a diagonal approximation to the true Jacobian, given by: -C J = diag(0, 0, 0, -4*alpha, ..., -N*alpha). -C The vector r is copied to z, and the inverse of P (restricted to the -C local vector segment) is applied to the vector z. - IMPLICIT NONE -C -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*), NLOCAL, I, MYPE, ISTART, IBASE - INTEGER*4 IER, LR - DOUBLE PRECISION T, Y(*), FY(*), R(*), Z(*) - DOUBLE PRECISION GAMMA, DELTA, RPAR(*) - DOUBLE PRECISION PSUBI, ALPHA -C - NLOCAL = IPAR(1) - MYPE = IPAR(2) - ALPHA = RPAR(1) -C - DO I = 1, NLOCAL - Z(I) = R(I) - ENDDO -C - IBASE = MYPE * NLOCAL - ISTART = MAX(1, 4 - IBASE) - DO I = ISTART, NLOCAL - PSUBI = 1.0D0 + GAMMA * ALPHA * (IBASE + I) - Z(I) = Z(I) / PSUBI - ENDDO -C - RETURN - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FCVPSET(T, Y, FY, JOK, JCUR, GAMMA, H, - & IPAR, RPAR, IER) -C Empty subroutine. Not needed for the preconditioner, but required -C by the FCVODE module. - INTEGER*4 IER, JOK, JCUR - DOUBLE PRECISION T, Y(*), FY(*), GAMMA, H -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - DOUBLE PRECISION RPAR(*) - - IER = 0 - RETURN - END diff --git a/examples/cvode/fcmix_parallel/fcvDiag_kry_p.out b/examples/cvode/fcmix_parallel/fcvDiag_kry_p.out deleted file mode 100644 index 342ab32155..0000000000 --- a/examples/cvode/fcmix_parallel/fcvDiag_kry_p.out +++ /dev/null @@ -1,65 +0,0 @@ -Diagonal test problem: - - NEQ = 20 parameter alpha = 10.000 - ydot_i = -alpha*i * y_i (i = 1,...,NEQ) - RTOL, ATOL = 0.1E-04 0.1E-09 - Method is BDF/NEWTON/SPGMR - Diagonal preconditioner uses approximate Jacobian - Number of processors = 2 - - -Preconditioning on left - - t = 0.10E+00 no. steps = 174 no. f-s = 213 - t = 0.20E+00 no. steps = 222 no. f-s = 262 - t = 0.30E+00 no. steps = 247 no. f-s = 288 - t = 0.40E+00 no. steps = 265 no. f-s = 307 - t = 0.50E+00 no. steps = 279 no. f-s = 322 - t = 0.60E+00 no. steps = 290 no. f-s = 333 - t = 0.70E+00 no. steps = 300 no. f-s = 344 - t = 0.80E+00 no. steps = 307 no. f-s = 351 - t = 0.90E+00 no. steps = 312 no. f-s = 357 - t = 0.10E+01 no. steps = 317 no. f-s = 362 - -Max. absolute error is 0.76E-08 - - -Final statistics: - - number of steps = 317 number of f evals. = 362 - number of prec. setups = 33 - number of prec. evals. = 6 number of prec. solves = 649 - number of nonl. iters. = 359 number of lin. iters. = 327 - average Krylov subspace dimension (NLI/NNI) = 0.9109 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 5 - - ------------------------------------------------------------- - - -Preconditioning on right - - t = 0.10E+00 no. steps = 174 no. f-s = 213 - t = 0.20E+00 no. steps = 222 no. f-s = 262 - t = 0.30E+00 no. steps = 247 no. f-s = 288 - t = 0.40E+00 no. steps = 265 no. f-s = 307 - t = 0.50E+00 no. steps = 279 no. f-s = 322 - t = 0.60E+00 no. steps = 290 no. f-s = 333 - t = 0.70E+00 no. steps = 300 no. f-s = 344 - t = 0.80E+00 no. steps = 307 no. f-s = 351 - t = 0.90E+00 no. steps = 312 no. f-s = 357 - t = 0.10E+01 no. steps = 317 no. f-s = 362 - -Max. absolute error is 0.77E-08 - - -Final statistics: - - number of steps = 317 number of f evals. = 362 - number of prec. setups = 33 - number of prec. evals. = 6 number of prec. solves = 649 - number of nonl. iters. = 359 number of lin. iters. = 327 - average Krylov subspace dimension (NLI/NNI) = 0.9109 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 5 diff --git a/examples/cvode/fcmix_parallel/fcvDiag_non_p.f b/examples/cvode/fcmix_parallel/fcvDiag_non_p.f deleted file mode 100644 index 95e7432dc5..0000000000 --- a/examples/cvode/fcmix_parallel/fcvDiag_non_p.f +++ /dev/null @@ -1,217 +0,0 @@ -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C Diagonal ODE example. Nonstiff case: alpha = 10/NEQ. -C -------------------------------------------------------------------- -C -C Include MPI-Fortran header file for MPI_COMM_WORLD, MPI types. -C - IMPLICIT NONE -C - INCLUDE "mpif.h" -C -C The following declaration specification should match C type long int. - INTEGER*8 NLOCAL, NEQ, I, IOUT(25), IPAR(2) - PARAMETER (NLOCAL=2) -C - INTEGER*4 IER, MYPE, NPES, NOUT, LNST, LNFE, LNNI, LNCF, LNETF - INTEGER*4 METH, IATOL, ITASK, JOUT - INTEGER*8 NST, NFE, NNI, NCFN, NETF - DOUBLE PRECISION Y(128), ROUT(10), RPAR(1) - DOUBLE PRECISION ATOL, RTOL, DTOUT, T, ALPHA, TOUT - DOUBLE PRECISION ERMAX, ERRI, GERMAX -C - DATA ATOL/1.0D-10/, RTOL/1.0D-5/, DTOUT/0.1D0/, NOUT/10/ - DATA LNST/3/, LNFE/4/, LNNI/7/, LNCF/6/, LNETF/5/ -C -C Get NPES and MYPE. Requires initialization of MPI. - CALL MPI_INIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,5) IER - 5 FORMAT(///' MPI_ERROR: MPI_INIT returned IER = ', I5) - STOP - ENDIF - CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NPES, IER) - IF (IER .NE. 0) THEN - WRITE(6,6) IER - 6 FORMAT(///' MPI_ERROR: MPI_COMM_SIZE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - CALL MPI_COMM_RANK(MPI_COMM_WORLD, MYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,7) IER - 7 FORMAT(///' MPI_ERROR: MPI_COMM_RANK returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Set input arguments. - NEQ = NPES * NLOCAL - T = 0.0D0 - METH = 1 - IATOL = 1 - ITASK = 1 -c Set parameter ALPHA - ALPHA = 10.0D0 / NEQ -C -C Load IPAR and RPAR - IPAR(1) = NLOCAL - IPAR(2) = MYPE - RPAR(1) = ALPHA -C - DO 10 I = 1, NLOCAL - 10 Y(I) = 1.0D0 -C - IF (MYPE .EQ. 0) THEN - WRITE(6,11) NEQ, ALPHA - 11 FORMAT('Diagonal test problem:'//' NEQ = ', I3, / - 1 ' parameter alpha = ', F8.3) - WRITE(6,12) - 12 FORMAT(' ydot_i = -alpha*i * y_i (i = 1,...,NEQ)') - WRITE(6,13) RTOL, ATOL - 13 FORMAT(' RTOL, ATOL = ', 2E10.1) - WRITE(6,14) - 14 FORMAT(' Method is ADAMS/FIXEDPOINT') - WRITE(6,15) NPES - 15 FORMAT(' Number of processors = ', I3//) - ENDIF -C - CALL FNVINITP(MPI_COMM_WORLD, 1, NLOCAL, NEQ, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITP returned IER = ', I5) - CALL MPI_FINALIZE(IER) - STOP - ENDIF -C - CALL FCVMALLOC(T, Y, METH, IATOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Create Fixed Point Solver - CALL FSUNFIXEDPOINTINIT(1, 0, IER) -C - IF (IER .NE. 0) THEN - WRITE(6,31) IER - 31 FORMAT( - 1 ///' SUNDIALS_ERROR: FSUNFIXEDPOINTINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Attach Fixed Point Solver - CALL FCVNLSINIT(IER) -C - IF (IER .NE. 0) THEN - WRITE(6,32) IER - 32 FORMAT(///' SUNDIALS_ERROR: FCVNLSINIT returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C -C Loop through tout values, call solver, print output, test for failure. - TOUT = DTOUT - DO 70 JOUT = 1, NOUT -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - IF (MYPE .EQ. 0) WRITE(6,40) T, IOUT(LNST), IOUT(LNFE) - 40 FORMAT(' t = ', D10.2, 5X, 'no. steps = ', I5, - & ' no. f-s = ', I5) -C - IF (IER .NE. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - & ' Linear Solver returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF -C - TOUT = TOUT + DTOUT - 70 CONTINUE -C -C Get max. absolute error in the local vector. - ERMAX = 0.0D0 - DO 75 I = 1, NLOCAL - ERRI = Y(I) - EXP(-ALPHA * (MYPE * NLOCAL + I) * T) - ERMAX = MAX(ERMAX, ABS(ERRI)) - 75 CONTINUE -C Get global max. error from MPI_REDUCE call. - CALL MPI_REDUCE(ERMAX, GERMAX, 1, MPI_DOUBLE_PRECISION, MPI_MAX, - 1 0, MPI_COMM_WORLD, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - 80 FORMAT(///' MPI_ERROR: MPI_REDUCE returned IER = ', I5) - CALL MPI_ABORT(MPI_COMM_WORLD, 1, IER) - STOP - ENDIF - IF (MYPE .EQ. 0) WRITE(6,85) GERMAX - 85 FORMAT(/'Max. absolute error is ', E10.2/) -C -C Print final statistics. - NST = IOUT(LNST) - NFE = IOUT(LNFE) - NNI = IOUT(LNNI) - NCFN = IOUT(LNCF) - NETF = IOUT(LNETF) - IF (MYPE .EQ. 0) WRITE (6,90) NST, NFE, NNI, NCFN, NETF - 90 FORMAT(/'Final statistics:'// - & ' number of steps = ', I5, 5X, /, - & ' number of f evals. = ', I5/ - & ' number of nonlinear iters. = ', I5/ - & ' number of nonlinear conv. failures = ', I3/ - & ' number of error test failures = ', I3) -C -C Free the memory and finalize MPI. - CALL FCVFREE - CALL MPI_FINALIZE(IER) - IF (IER .NE. 0) THEN - WRITE(6,95) IER - 95 FORMAT(///' MPI_ERROR: MPI_FINALIZE returned IER = ', I5) - STOP - ENDIF -C - STOP - END -C -C ------------------------------------------------------------------------ -C - SUBROUTINE FCVFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Routine for right-hand side function f -C - IMPLICIT NONE -C -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*), MYPE, I, NLOCAL - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) - DOUBLE PRECISION ALPHA -C - NLOCAL = IPAR(1) - MYPE = IPAR(2) - ALPHA = RPAR(1) -C - DO I = 1, NLOCAL - YDOT(I) = -ALPHA * (MYPE * NLOCAL + I) * Y(I) - ENDDO -C - IER = 0 -C - RETURN - END diff --git a/examples/cvode/fcmix_parallel/fcvDiag_non_p.out b/examples/cvode/fcmix_parallel/fcvDiag_non_p.out deleted file mode 100644 index 9215a2b642..0000000000 --- a/examples/cvode/fcmix_parallel/fcvDiag_non_p.out +++ /dev/null @@ -1,31 +0,0 @@ -Diagonal test problem: - - NEQ = 4 - parameter alpha = 2.500 - ydot_i = -alpha*i * y_i (i = 1,...,NEQ) - RTOL, ATOL = 0.1E-04 0.1E-09 - Method is ADAMS/FIXEDPOINT - Number of processors = 2 - - - t = 0.10D+00 no. steps = 15 no. f-s = 32 - t = 0.20D+00 no. steps = 22 no. f-s = 39 - t = 0.30D+00 no. steps = 30 no. f-s = 47 - t = 0.40D+00 no. steps = 38 no. f-s = 55 - t = 0.50D+00 no. steps = 46 no. f-s = 63 - t = 0.60D+00 no. steps = 54 no. f-s = 71 - t = 0.70D+00 no. steps = 61 no. f-s = 78 - t = 0.80D+00 no. steps = 69 no. f-s = 86 - t = 0.90D+00 no. steps = 77 no. f-s = 94 - t = 0.10D+01 no. steps = 85 no. f-s = 102 - -Max. absolute error is 0.33E-07 - - -Final statistics: - - number of steps = 85 - number of f evals. = 102 - number of nonlinear iters. = 99 - number of nonlinear conv. failures = 0 - number of error test failures = 3 diff --git a/examples/cvode/fcmix_serial/CMakeLists.txt b/examples/cvode/fcmix_serial/CMakeLists.txt deleted file mode 100644 index 91a39cbecf..0000000000 --- a/examples/cvode/fcmix_serial/CMakeLists.txt +++ /dev/null @@ -1,288 +0,0 @@ -# --------------------------------------------------------------- -# Programmer(s): Radu Serban @ LLNL -# David J. Gardner @ 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 -# --------------------------------------------------------------- -# CMakeLists.txt file for the FCVODE serial examples -# --------------------------------------------------------------- - -# Example lists are tuples "name\;type" where the type is -# 'develop' for examples excluded from 'make test' in releases - -# Examples using SUNDIALS linear solvers -set(FCVODE_examples - "fcvAdvDiff_bnd\;develop" - "fcvDiurnal_kry_bp\;develop" - "fcvDiurnal_kry\;develop" - "fcvRoberts_dns\;develop" - "fcvRoberts_dns_constraints\;develop" - ) - -# Examples using LAPACK linear solvers -set(FCVODE_examples_BL - "fcvRoberts_dnsL\;develop" - ) - -# Add sparse solvers examples for 64-bit indextype configurations only, -# not compatible with 32-bit indextype -if(SUNDIALS_INDEX_SIZE MATCHES "64") - - # Examples using KLU linear solver - set(FCVODE_examples_KLU - "fcvRoberts_klu\;develop" - ) - - # Examples using SuperLU_MT linear solver - set(FCVODE_examples_SUPERLUMT - "fcvRoberts_sps\;develop" - ) - -endif() - -# Specify libraries to link against -set(FNVECS_LIB sundials_fnvecserial) - -# Only static FCMIX libraries are available -set(FCVODE_LIB sundials_fcvode${_STATIC_LIB_SUFFIX}) - -if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) - list(APPEND FCVODE_LIB sundials_cvode_fused_stubs) -endif() - -# Set-up linker flags and link libraries -set(SUNDIALS_LIBS ${FCVODE_LIB} ${FNVECS_LIB}) - -# Add the build and install targets for each example -foreach(example_tuple ${FCVODE_examples}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${EXE_EXTRA_LINK_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_serial) - endif() - -endforeach(example_tuple ${FCVODE_examples}) - - -# Add the build and install targets for each LAPACK example (if needed) -if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) - - set(SUNLINSOLLAPACK_LIBS - sundials_sunlinsollapackband - sundials_sunlinsollapackdense - sundials_fsunlinsollapackband - sundials_fsunlinsollapackdense) - - # LAPACK libraries - list(APPEND SUNLINSOLLAPACK_LIBS ${LAPACK_LIBRARIES}) - - foreach(example_tuple ${FCVODE_examples_BL}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLLAPACK_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_serial) - endif() - - endforeach(example_tuple ${FCVODE_examples_BL}) - -endif() - - -# Add the build and install targets for each KLU example (if needed) -if(BUILD_SUNLINSOL_KLU) - - set(SUNLINSOLKLU_LIBS - sundials_sunlinsolklu - sundials_fsunlinsolklu) - - # KLU libraries - list(APPEND SUNLINSOLKLU_LIBS) - - foreach(example_tuple ${FCVODE_examples_KLU}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLKLU_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_serial) - endif() - - endforeach(example_tuple ${FCVODE_examples_KLU}) - -endif() - - -# Add the build and install targets for each SuperLU_MT example (if needed) -if(BUILD_SUNLINSOL_SUPERLUMT) - - set(SUNLINSOLSLUMT_LIBS - sundials_sunlinsolsuperlumt - sundials_fsunlinsolsuperlumt) - - foreach(example_tuple ${FCVODE_examples_SUPERLUMT}) - - # parse the example tuple - list(GET example_tuple 0 example) - list(GET example_tuple 1 example_type) - - # example source files - add_executable(${example} ${example}.f) - - set_target_properties(${example} PROPERTIES FOLDER "Examples") - - # add example to regression tests - sundials_add_test(${example} ${example} - ANSWER_DIR ${CMAKE_CURRENT_SOURCE_DIR} - ANSWER_FILE ${example}.out - EXAMPLE_TYPE ${example_type}) - - # libraries to link against - target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLSLUMT_LIBS}) - - # install example source and out files - if(EXAMPLES_INSTALL) - install(FILES ${example}.f ${example}.out - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_serial) - endif() - - endforeach(example_tuple ${FCVODE_examples_SUPERLUMT}) - -endif() - -# create Makfile and CMakeLists.txt for examples -if(EXAMPLES_INSTALL) - - # Install the README file - install(FILES README DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_serial) - - # Prepare substitution variables for Makefile and/or CMakeLists templates - set(SOLVER "CVODE") - set(SOLVER_LIB "sundials_cvode") - set(SOLVER_FLIB "sundials_fcvode") - if(SUNDIALS_BUILD_PACKAGE_FUSED_KERNELS) - set(LIBS "-lsundials_cvode_fused_stubs ${LIBS}") - endif() - - examples2string(FCVODE_examples EXAMPLES) - - if(BUILD_SUNLINSOL_LAPACKBAND AND BUILD_SUNLINSOL_LAPACKDENSE) - examples2string(FCVODE_examples_BL EXAMPLES_BL) - else() - set(EXAMPLES_BL "") - endif() - - if(BUILD_SUNLINSOL_KLU) - examples2string(FCVODE_examples_KLU EXAMPLES_KLU) - else() - set(EXAMPLES_KLU "") - endif() - - if(BUILD_SUNLINSOL_SUPERLUMT) - examples2string(FCVODE_examples_SUPERLUMT EXAMPLES_SLUMT) - else() - set(EXAMPLES_SLUMT "") - endif() - - # Regardless of the platform we're on, we will generate and install - # CMakeLists.txt file for building the examples. This file can then - # be used as a template for the user's own programs. - - # generate CMakelists.txt in the binary directory - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/cmakelists_serial_F77_ex.in - ${PROJECT_BINARY_DIR}/examples/cvode/fcmix_serial/CMakeLists.txt - @ONLY - ) - - # install CMakelists.txt - install( - FILES ${PROJECT_BINARY_DIR}/examples/cvode/fcmix_serial/CMakeLists.txt - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_serial - ) - - # On UNIX-type platforms, we also generate and install a makefile for - # building the examples. This makefile can then be used as a template - # for the user's own programs. - - if(UNIX) - # generate Makefile and place it in the binary dir - configure_file( - ${PROJECT_SOURCE_DIR}/examples/templates/makefile_serial_F77_ex.in - ${PROJECT_BINARY_DIR}/examples/cvode/fcmix_serial/Makefile_ex - @ONLY - ) - # install the configured Makefile_ex as Makefile - install( - FILES ${PROJECT_BINARY_DIR}/examples/cvode/fcmix_serial/Makefile_ex - DESTINATION ${EXAMPLES_INSTALL_PATH}/cvode/fcmix_serial - RENAME Makefile - ) - endif() - - # add test_install target - sundials_add_test_install(cvode fcmix_serial) - -endif() diff --git a/examples/cvode/fcmix_serial/README b/examples/cvode/fcmix_serial/README deleted file mode 100644 index a1c5bb387a..0000000000 --- a/examples/cvode/fcmix_serial/README +++ /dev/null @@ -1,52 +0,0 @@ -List of serial CVODE FCMIX examples - - fcvAdvDiff_bnd : advection-diffusion example (BDF/BAND) - fcvDiurnal_kry_bp : kinetics-transport example (BDF/SPGMR/FCVBP) - fcvDiurnal_kry : kinetics-transport example (BDF/SPGMR/User Prec) - fcvRoberts_dns : chemical kinetics example (BDF/DENSE) - fcvRoberts_dnsL : chemical kinetics example (BDF/DENSE lapack) - fcvRoberts_klu : dense kinetics example with KLU sparse linear solver - fcvRoberts_sps : dense kinetics example with SuperLUMT sparse solver - - -The following CMake command was used to configure SUNDIALS: - - cmake \ --DCMAKE_BUILD_TYPE=DEBUG \ --DBUILD_ARKODE=ON \ --DBUILD_CVODE=ON \ --DBUILD_CVODES=ON \ --DBUILD_IDA=ON \ --DBUILD_IDAS=ON \ --DBUILD_KINSOL=ON \ --DCMAKE_INSTALL_PREFIX=/home/user1/sundials/build/install \ --DEXAMPLES_INSTALL_PATH=/home/user1/sundials/build/install/examples \ --DBUILD_SHARED_LIBS=OFF \ --DBUILD_STATIC_LIBS=ON \ --DEXAMPLES_ENABLE_C=ON \ --DEXAMPLES_ENABLE_CXX=ON \ --DEXAMPLES_INSTALL=ON \ --DENABLE_MPI=ON \ --DENABLE_LAPACK=ON \ --DENABLE_KLU=ON \ --DKLU_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/include \ --DKLU_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/suitesparse/4.5.3/lib \ --DENABLE_HYPRE=ON \ --DHYPRE_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/hypre/2.11.1/include \ --DHYPRE_LIBRARY=/usr/casc/sundials/apps/rh6/hypre/2.11.1/lib/libHYPRE.a \ --DENABLE_OPENMP=ON \ --DENABLE_PTHREAD=ON \ --DENABLE_SUPERLUMT=ON \ --DSUPERLUMT_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/SRC \ --DSUPERLUMT_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/superlu_mt/SuperLU_MT_3.1/lib \ --DSUPERLUMT_THREAD_TYPE=Pthread \ --DENABLE_PETSC=ON \ --DPETSC_INCLUDE_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/include \ --DPETSC_LIBRARY_DIR=/usr/casc/sundials/apps/rh6/petsc/3.7.2/lib \ -../sundials - - System Architecture: x86_64 - Processor Type: Intel(R) Xeon(R) CPU E31230 @ 3.20GHz - Operating System: Red Hat 6.8 - C/Fortran Compilers: gcc/gfortran v4.4.7 - MPI: Open MPI v1.8.8 diff --git a/examples/cvode/fcmix_serial/fcvAdvDiff_bnd.f b/examples/cvode/fcmix_serial/fcvAdvDiff_bnd.f deleted file mode 100644 index 532caac99d..0000000000 --- a/examples/cvode/fcmix_serial/fcvAdvDiff_bnd.f +++ /dev/null @@ -1,316 +0,0 @@ -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C FCVODE Example Problem: Advection-diffusion, band linear solver -C with banded user Jacobian. -C -C The following is a simple example problem with a banded -C Jacobian. The problem is the semi-discrete form of the -C advection-diffusion equation in 2D: -C du/dt = d^2 u / dx^2 + .5 du/dx + d^2 u / dy^2 -C on the rectangle 0 <= x <= 2, 0 <= y <= 1, and the time -C interval 0 <= t <= 1. Homogeneous Dirichlet boundary conditions -C are posed, and the initial condition is the following: -C u(x,y,t=0) = x(2-x)y(1-y)exp(5xy) . -C The PDE is discretized on a uniform MX+2 by MY+2 grid with -C central differencing, and with boundary values eliminated, -C leaving an ODE system of size NEQ = MX*MY. -C This program solves this problem with CVODE, using the Fortran/C -C interface routine package. This solution uses the BDF method, -C a user-supplied banded Jacobian routine, and scalar relative and -C absolute tolerances. It prints results at t = .1, .2, ..., 1.0. -C At the end of the run, various counters of interest are printed. -C -------------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 MX, MY, MXMY - PARAMETER (MX=10, MY=5) - PARAMETER (MXMY=MX*MY) -C - DOUBLE PRECISION XMAX, YMAX - DATA XMAX/2.0D0/, YMAX/1.0D0/ -C - INTEGER*4 LNST, LNFE, LNSETUP, LNNI, LNCF, LNETF, LNJE - INTEGER*4 IER, METH, IATOL, ITASK, JOUT -C The following declaration specification should match C type long int. - INTEGER*8 NEQ, IOUT(25), IPAR(2), MU, ML - DOUBLE PRECISION RTOL, ATOL, T0, T, TOUT, DTOUT, UNORM - DOUBLE PRECISION U(MXMY), ROUT(10), RPAR(5) -C - DATA LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, LNNI/7/, LNSETUP/8/, - 1 LNJE/17/ -C - CALL INITBX(XMAX, YMAX, MX, MY, U, IPAR, RPAR) -C - NEQ = MX*MY - T0 = 0.0D0 - METH = 2 - IATOL = 1 - RTOL = 0.0D0 - ATOL = 1.0D-5 - MU = MY - ML = MY - DTOUT = 0.1D0 - ITASK = 1 -C - WRITE(6,10) NEQ - 10 FORMAT('Band example problem:'// - 1 ' Advection-diffusion, NEQ = ', I2//) -C - CALL FNVINITS(1, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF -C -C initialize banded matrix module - call FSUNBANDMATINIT(1, NEQ, MU, ML, MU+ML, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNBANDEMATINIT IER = ', I5) - STOP - ENDIF -C -C initialize banded linear solver module - call FSUNBANDLINSOLINIT(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,28) IER - 28 FORMAT(///' SUNDIALS_ERROR: FSUNBANDLINSOLINIT IER = ', I5) - STOP - ENDIF -C - CALL FCVMALLOC(T0, U, METH, IATOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - STOP - ENDIF -C -C attach matrix and linear solver modules to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ',I5) - CALL FCVFREE - STOP - ENDIF -C - CALL FCVBANDSETJAC(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FCVDENSESETJAC returned IER = ',I5) - CALL FCVFREE - STOP - ENDIF -C - CALL MAXNORM(NEQ, U, UNORM) - WRITE(6,48) T0, UNORM - 48 FORMAT(' At t = ', F6.2, ' max.norm(u) = ', E14.6) -C - TOUT = DTOUT - DO 70 JOUT = 1, 10 -C - CALL FCVODE(TOUT, T, U, ITASK, IER) -C - CALL MAXNORM(NEQ, U, UNORM) - WRITE(6,50) T, UNORM, IOUT(LNST) - 50 FORMAT(' At t = ', F6.2, ' max.norm(u) = ', E14.6, - 1 ' NST = ', I4) -C - IF (IER .NE. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF -C - TOUT = TOUT + DTOUT - 70 CONTINUE -C - WRITE(6,80) IOUT(LNST), IOUT(LNFE), IOUT(LNJE), IOUT(LNSETUP), - 1 IOUT(LNNI), IOUT(LNCF), IOUT(LNETF) - 80 FORMAT(//'Final statistics:'// - 1 ' No. steps = ', I4, ' No. f-s = ', I4, - 2 ' No. J-s = ', I4, ' No. LU-s = ', I4/ - 3 ' No. nonlinear iterations = ', I4/ - 4 ' No. nonlinear convergence failures = ', I4/ - 5 ' No. error test failures = ', I4) -C - CALL FCVFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE INITBX(XMAX, YMAX, MX, MY, U0, IPAR, RPAR) -C Load IPAR and RPAR with problem constants and U0 with initial values - IMPLICIT NONE -C -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*) - INTEGER*4 MX, MY - DOUBLE PRECISION XMAX, YMAX, U0(MY,MX), RPAR(*) -C - INTEGER*4 I, J - DOUBLE PRECISION DX, DY, X, Y, HDCOEF, HACOEF, VDCOEF -C -C Problem constants - DX = XMAX / (MX + 1) - DY = YMAX / (MY + 1) - HDCOEF = 1.0D0 / (DX * DX) - HACOEF = 0.5D0 / (2.0D0 * DX) - VDCOEF = 1.0D0 / (DY * DY) -C Load constants in IPAR and RPAR - IPAR(1) = MX - IPAR(2) = MY - RPAR(1) = DX - RPAR(2) = DY - RPAR(3) = HDCOEF - RPAR(4) = HACOEF - RPAR(5) = VDCOEF -C -C Loop over grid and load initial values. - DO 20 I = 1, MX - X = I * DX - DO 10 J = 1, MY - Y = J * DY - U0(J,I) = X * (XMAX - X) * Y * (YMAX - Y) * - * EXP(5.0D0 * X * Y) - 10 CONTINUE - 20 CONTINUE -C - RETURN - END - - SUBROUTINE MAXNORM(N, U, UNORM) -C Compute max-norm of array U - IMPLICIT NONE -C - INTEGER*8 I, N - DOUBLE PRECISION U(*), UNORM, TEMP -C - TEMP = 0.0D0 - DO 10 I = 1, N - TEMP = MAX(ABS(U(I)), TEMP) - 10 CONTINUE - UNORM = TEMP - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVFUN(T, U, UDOT, IPAR, RPAR, IER) -C Right-hand side routine - IMPLICIT NONE -C - DOUBLE PRECISION T, U(*), UDOT(*), RPAR(*) -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*) - INTEGER*4 IER -C - INTEGER*4 I, MX, IOFF, MY, J, IJ - DOUBLE PRECISION UIJ, UDN, UUP, ULT, URT, HDIFF, HADV, VDIFF - DOUBLE PRECISION DX, DY, HDCOEF, HACOEF, VDCOEF -C -C Extract constants from IPAR and RPAR - MX = IPAR(1) - MY = IPAR(2) - DX = RPAR(1) - DY = RPAR(2) - HDCOEF = RPAR(3) - HACOEF = RPAR(4) - VDCOEF = RPAR(5) -C -C Loop over all grid points. - DO 20 I = 1, MX - IOFF = (I - 1) * MY - DO 10 J = 1, MY -C -C Extract u at x_i, y_j and four neighboring points. - IJ = J + IOFF - UIJ = U(IJ) - UDN = 0.0D0 - IF (J .NE. 1) UDN = U(IJ - 1) - UUP = 0.0D0 - IF (J .NE. MY) UUP = U(IJ + 1) - ULT = 0.0D0 - IF (I .NE. 1) ULT = U(IJ - MY) - URT = 0.0D0 - IF (I .NE. MX) URT = U(IJ + MY) -C -C Set diffusion and advection terms and load into UDOT. - HDIFF = HDCOEF * (ULT - 2.0D0 * UIJ + URT) - HADV = HACOEF * (URT - ULT) - VDIFF = VDCOEF * (UUP - 2.0D0 * UIJ + UDN) - UDOT(IJ) = HDIFF + HADV + VDIFF - 10 CONTINUE - 20 CONTINUE -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVBJAC(N, MU, ML, MDIM, T, U, FU, - 1 BJAC, H, IPAR, RPAR, V1, V2, V3, IER) -C Load banded Jacobian - IMPLICIT NONE -C -C The following declaration specification should match C type long int. - INTEGER*8 N, MU, ML, MDIM, IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, U(*), FU(*), BJAC(MDIM,*), H, RPAR(*) - DOUBLE PRECISION V1(*), V2(*), V3(*) -C - INTEGER*4 MBAND, MX, MY - INTEGER*4 I, J, K, IOFF, MU1, MU2 - DOUBLE PRECISION DX, DY, HDCOEF, HACOEF, VDCOEF -C -C Extract constants from IPAR and RPAR - MX = IPAR(1) - MY = IPAR(2) - DX = RPAR(1) - DY = RPAR(2) - HDCOEF = RPAR(3) - HACOEF = RPAR(4) - VDCOEF = RPAR(5) -C - MU1 = MU + 1 - MU2 = MU + 2 - MBAND = MU + 1 + ML -C -C Loop over all grid points. - DO 20 I = 1, MX - IOFF = (I - 1) * MY - DO 10 J = 1, MY - K = J + IOFF -C -C Set Jacobian elements in column k of Jb. - BJAC(MU1,K) = -2.0D0 * (VDCOEF + HDCOEF) - IF (I .NE. 1) BJAC(1,K) = HDCOEF + HACOEF - IF (I .NE. MX) BJAC(MBAND,K) = HDCOEF - HACOEF - IF (J .NE. 1) BJAC(MU,K) = VDCOEF - IF (J .NE. MY) BJAC(MU2,K) = VDCOEF -C - 10 CONTINUE - 20 CONTINUE -C - IER = 0 -C - RETURN - END diff --git a/examples/cvode/fcmix_serial/fcvAdvDiff_bnd.out b/examples/cvode/fcmix_serial/fcvAdvDiff_bnd.out deleted file mode 100644 index 98819b8833..0000000000 --- a/examples/cvode/fcmix_serial/fcvAdvDiff_bnd.out +++ /dev/null @@ -1,24 +0,0 @@ -Band example problem: - - Advection-diffusion, NEQ = 50 - - - At t = 0.00 max.norm(u) = 0.895472E+02 - At t = 0.10 max.norm(u) = 0.413289E+01 NST = 85 - At t = 0.20 max.norm(u) = 0.103929E+01 NST = 103 - At t = 0.30 max.norm(u) = 0.297983E+00 NST = 113 - At t = 0.40 max.norm(u) = 0.876577E-01 NST = 120 - At t = 0.50 max.norm(u) = 0.262564E-01 NST = 126 - At t = 0.60 max.norm(u) = 0.783042E-02 NST = 130 - At t = 0.70 max.norm(u) = 0.232939E-02 NST = 134 - At t = 0.80 max.norm(u) = 0.695343E-03 NST = 137 - At t = 0.90 max.norm(u) = 0.211598E-03 NST = 140 - At t = 1.00 max.norm(u) = 0.655685E-04 NST = 142 - - -Final statistics: - - No. steps = 142 No. f-s = 173 No. J-s = 3 No. LU-s = 23 - No. nonlinear iterations = 170 - No. nonlinear convergence failures = 0 - No. error test failures = 3 diff --git a/examples/cvode/fcmix_serial/fcvDiurnal_kry.f b/examples/cvode/fcmix_serial/fcvDiurnal_kry.f deleted file mode 100644 index 56a7c78930..0000000000 --- a/examples/cvode/fcmix_serial/fcvDiurnal_kry.f +++ /dev/null @@ -1,1028 +0,0 @@ -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C FCVODE Example Problem: 2D kinetics-transport, precond. Krylov -C solver. -C -C An ODE system is generated from the following 2-species diurnal -C kinetics advection-diffusion PDE system in 2 space dimensions: -C -C dc(i)/dt = Kh*(d/dx)**2 c(i) + V*dc(i)/dx + (d/dy)(Kv(y)*dc(i)/dy) -C + Ri(c1,c2,t) for i = 1,2, where -C R1(c1,c2,t) = -q1*c1*c3 - q2*c1*c2 + 2*q3(t)*c3 + q4(t)*c2 , -C R2(c1,c2,t) = q1*c1*c3 - q2*c1*c2 - q4(t)*c2 , -C Kv(y) = Kv0*exp(y/5) , -C Kh, V, Kv0, q1, q2, and c3 are constants, and q3(t) and q4(t) -C vary diurnally. -C -C The problem is posed on the square -C 0 .le. x .le. 20, 30 .le. y .le. 50 (all in km), -C with homogeneous Neumann boundary conditions, and for time t -C in 0 .le. t .le. 86400 sec (1 day). -C -C The PDE system is treated by central differences on a uniform -C 10 x 10 mesh, with simple polynomial initial profiles. -C The problem is solved with CVODE, with the BDF/GMRES method and -C the block-diagonal part of the Jacobian as a left -C preconditioner. -C -C Note: this program includes modified (64-bit integer) versions -C of the dense linear solver routines DGEFA and DGESL from LINPACK, -C and BLAS routines DCOPY and DSCAL. -C -C The second and third dimensions of U here must match the values -C of MX and MY, for consistency with the output statements below. -C -------------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 MX, MY - PARAMETER (MX=10, MY=10) - INTEGER*4 LENIPAR, LENRPAR - PARAMETER (LENIPAR=6+2*MX*MY, LENRPAR=12+8*MX*MY) -C - INTEGER*4 METH,IATOL,ITASK,IER,LNCFL,LNPS - INTEGER*4 LNST,LNFE,LNSETUP,LNNI,LNCF,LQ,LH,LNPE,LNLI,LNETF - INTEGER*4 JOUT,JPRETYPE,IGSTYPE,MAXL -C The following declaration specification should match C type long int. - INTEGER*8 NEQ, IOUT(25), IPAR(LENIPAR) - INTEGER*4 NST,NFE,NPSET,NPE,NPS,NNI,NETF - INTEGER*4 NLI,NCFN,NCFL - DOUBLE PRECISION ATOL,AVDIM,T,TOUT,TWOHR,RTOL,FLOOR,DELT - DOUBLE PRECISION U(2,MX,MY),ROUT(10),RPAR(LENRPAR) -C - DATA TWOHR/7200.0D0/, RTOL/1.0D-5/, FLOOR/100.0D0/, - & JPRETYPE/1/, IGSTYPE/1/, MAXL/0/, DELT/0.0D0/ - DATA LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, LNNI/7/, LNSETUP/8/, - & LQ/9/, LNPE/20/, LNLI/22/, LNPS/21/, LNCFL/23/ - DATA LH/2/ -C -C Load problem constants into IPAR, RPAR, and set initial values - CALL INITKX(MX, MY, U, IPAR, RPAR) -C -C Set other input arguments. - NEQ = 2*MX*MY - T = 0.0D0 - METH = 2 - IATOL = 1 - ATOL = RTOL * FLOOR - ITASK = 1 -C - WRITE(6,10) NEQ - 10 FORMAT('Krylov example problem:'// - & ' Kinetics-transport, NEQ = ', I4/) -C -C Initialize vector specification - CALL FNVINITS(1, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF -C -C Initialize SPGMR linear solver module - call FSUNSPGMRINIT(1, JPRETYPE, MAXL, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRINIT IER = ', I5) - STOP - ENDIF - call FSUNSPGMRSETGSTYPE(1, IGSTYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,27) IER - 27 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETGSTYPE IER = ', I5) - STOP - ENDIF -C -C Initialize CVODE - CALL FCVMALLOC(T, U, METH, IATOL, RTOL, ATOL, - & IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - STOP - ENDIF -C -C attach linear solver module to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ',I5) - CALL FCVFREE - STOP - ENDIF -C -C attach preconditioner to CVLs interface - CALL FCVLSSETPREC(1, IER) -C -C Loop over output points, call FCVODE, print sample solution values. - TOUT = TWOHR - DO JOUT = 1, 12 -C - CALL FCVODE(TOUT, T, U, ITASK, IER) -C - WRITE(6,50) T, IOUT(LNST), IOUT(LQ), ROUT(LH) - 50 FORMAT(/' t = ', E11.3, 3X, 'nst = ', I5, - & ' q = ', I2, ' h = ', E14.6) - WRITE(6,55) U(1,1,1), U(1,5,5), U(1,10,10), - & U(2,1,1), U(2,5,5), U(2,10,10) - 55 FORMAT(' c1 (bot.left/middle/top rt.) = ', 3E14.6/ - & ' c2 (bot.left/middle/top rt.) = ', 3E14.6) -C - IF (IER .NE. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - & ' Linear Solver returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF -C - TOUT = TOUT + TWOHR -C - ENDDO - -C Print final statistics. - NST = IOUT(LNST) - NFE = IOUT(LNFE) - NPSET = IOUT(LNSETUP) - NPE = IOUT(LNPE) - NPS = IOUT(LNPS) - NNI = IOUT(LNNI) - NLI = IOUT(LNLI) - AVDIM = DBLE(NLI) / DBLE(NNI) - NCFN = IOUT(LNCF) - NCFL = IOUT(LNCFL) - NETF = IOUT(LNETF) - WRITE(6,80) NST, NFE, NPSET, NPE, NPS, NNI, NLI, AVDIM, NCFN, - & NCFL, NETF - 80 FORMAT(//'Final statistics:'// - & ' number of steps = ', I5, 5X, - & ' number of f evals. =', I5/ - & ' number of prec. setups = ', I5/ - & ' number of prec. evals. = ', I5, 5X, - & ' number of prec. solves = ', I5/ - & ' number of nonl. iters. = ', I5, 5X, - & ' number of lin. iters. = ', I5/ - & ' average Krylov subspace dimension (NLI/NNI) = ', E14.6/ - & ' number of conv. failures.. nonlinear = ', I3, - & ' linear = ', I3/ - & ' number of error test failures = ', I3) -C - CALL FCVFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE INITKX(MX, MY, U0, IPAR, RPAR) -C Routine to set problem constants and initial values -C - IMPLICIT NONE -C - INTEGER*4 MX, MY -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*) - DOUBLE PRECISION RPAR(*) -C - INTEGER*4 MM, JY, JX, P_IPP, P_BD, P_P - DOUBLE PRECISION U0 - DIMENSION U0(2,MX,MY) - DOUBLE PRECISION Q1, Q2, Q3, Q4, A3, A4, OM, C3, DY, HDCO - DOUBLE PRECISION VDCO, HACO, X, Y - DOUBLE PRECISION CX, CY, DKH, DKV0, DX, HALFDA, PI, VEL -C - DATA DKH/4.0D-6/, VEL/0.001D0/, DKV0/1.0D-8/, HALFDA/4.32D4/, - 1 PI/3.1415926535898D0/ -C -C Problem constants - MM = MX * MY - Q1 = 1.63D-16 - Q2 = 4.66D-16 - Q3 = 0.0D0 - Q4 = 0.0D0 - A3 = 22.62D0 - A4 = 7.601D0 - OM = PI / HALFDA - C3 = 3.7D16 - DX = 20.0D0 / (MX - 1.0D0) - DY = 20.0D0 / (MY - 1.0D0) - HDCO = DKH / DX**2 - HACO = VEL / (2.0D0 * DX) - VDCO = (1.0D0 / DY**2) * DKV0 -C -C Load constants in IPAR and RPAR - IPAR(1) = MX - IPAR(2) = MY - IPAR(3) = MM -C - RPAR(1) = Q1 - RPAR(2) = Q2 - RPAR(3) = Q3 - RPAR(4) = Q4 - RPAR(5) = A3 - RPAR(6) = A4 - RPAR(7) = OM - RPAR(8) = C3 - RPAR(9) = DY - RPAR(10) = HDCO - RPAR(11) = VDCO - RPAR(12) = HACO -C -C Pointers into IPAR and RPAR - P_IPP = 7 - P_BD = 13 - P_P = P_BD + 4*MM -C - IPAR(4) = P_IPP - IPAR(5) = P_BD - IPAR(6) = P_P -C -C Set initial profiles. - DO JY = 1, MY - Y = 30.0D0 + (JY - 1.0D0) * DY - CY = (0.1D0 * (Y - 40.0D0))**2 - CY = 1.0D0 - CY + 0.5D0 * CY**2 - DO JX = 1, MX - X = (JX - 1.0D0) * DX - CX = (0.1D0 * (X - 10.0D0))**2 - CX = 1.0D0 - CX + 0.5D0 * CX**2 - U0(1,JX,JY) = 1.0D6 * CX * CY - U0(2,JX,JY) = 1.0D12 * CX * CY - ENDDO - ENDDO -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVFUN(T, U, UDOT, IPAR, RPAR, IER) -C Routine for right-hand side function f -C - IMPLICIT NONE -C - DOUBLE PRECISION T, U(2,*), UDOT(2,*), RPAR(*) -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*) - INTEGER*4 IER -C - INTEGER*4 ILEFT, IRIGHT - INTEGER*4 JX, JY, MX, MY, MM, IBLOK0, IBLOK, IDN, IUP - DOUBLE PRECISION Q1, Q2, Q3, Q4, A3, A4, OM, C3, DY, HDCO - DOUBLE PRECISION VDCO, HACO - DOUBLE PRECISION C1, C2, C1DN, C2DN, C1UP, C2UP, C1LT, C2LT - DOUBLE PRECISION C1RT, C2RT, CYDN, CYUP, HORD1, HORD2, HORAD1 - DOUBLE PRECISION HORAD2, QQ1, QQ2, QQ3, QQ4, RKIN1, RKIN2, S - DOUBLE PRECISION VERTD1, VERTD2, YDN, YUP -C -C Extract constants from IPAR and RPAR - MX = IPAR(1) - MY = IPAR(2) - MM = IPAR(3) -C - Q1 = RPAR(1) - Q2 = RPAR(2) - Q3 = RPAR(3) - Q4 = RPAR(4) - A3 = RPAR(5) - A4 = RPAR(6) - OM = RPAR(7) - C3 = RPAR(8) - DY = RPAR(9) - HDCO = RPAR(10) - VDCO = RPAR(11) - HACO = RPAR(12) -C -C Set diurnal rate coefficients. - S = SIN(OM * T) - IF (S .GT. 0.0D0) THEN - Q3 = EXP(-A3 / S) - Q4 = EXP(-A4 / S) - ELSE - Q3 = 0.0D0 - Q4 = 0.0D0 - ENDIF - RPAR(3) = Q3 - RPAR(4) = Q4 -C -C Loop over all grid points. - DO JY = 1, MY - YDN = 30.0D0 + (JY - 1.5D0) * DY - YUP = YDN + DY - CYDN = VDCO * EXP(0.2D0 * YDN) - CYUP = VDCO * EXP(0.2D0 * YUP) - IBLOK0 = (JY - 1) * MX - IDN = -MX - IF (JY .EQ. 1) IDN = MX - IUP = MX - IF (JY .EQ. MY) IUP = -MX - DO JX = 1, MX - IBLOK = IBLOK0 + JX - C1 = U(1,IBLOK) - C2 = U(2,IBLOK) -C Set kinetic rate terms. - QQ1 = Q1 * C1 * C3 - QQ2 = Q2 * C1 * C2 - QQ3 = Q3 * C3 - QQ4 = Q4 * C2 - RKIN1 = -QQ1 - QQ2 + 2.0D0 * QQ3 + QQ4 - RKIN2 = QQ1 - QQ2 - QQ4 -C Set vertical diffusion terms. - C1DN = U(1,IBLOK + IDN) - C2DN = U(2,IBLOK + IDN) - C1UP = U(1,IBLOK + IUP) - C2UP = U(2,IBLOK + IUP) - VERTD1 = CYUP * (C1UP - C1) - CYDN * (C1 - C1DN) - VERTD2 = CYUP * (C2UP - C2) - CYDN * (C2 - C2DN) -C Set horizontal diffusion and advection terms. - ILEFT = -1 - IF (JX .EQ. 1) ILEFT = 1 - IRIGHT = 1 - IF (JX .EQ. MX) IRIGHT = -1 - C1LT = U(1,IBLOK + ILEFT) - C2LT = U(2,IBLOK + ILEFT) - C1RT = U(1,IBLOK + IRIGHT) - C2RT = U(2,IBLOK + IRIGHT) - HORD1 = HDCO * (C1RT - 2.0D0 * C1 + C1LT) - HORD2 = HDCO * (C2RT - 2.0D0 * C2 + C2LT) - HORAD1 = HACO * (C1RT - C1LT) - HORAD2 = HACO * (C2RT - C2LT) -C Load all terms into UDOT. - UDOT(1,IBLOK) = VERTD1 + HORD1 + HORAD1 + RKIN1 - UDOT(2,IBLOK) = VERTD2 + HORD2 + HORAD2 + RKIN2 - ENDDO - ENDDO -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVPSET(T, U, FU, JOK, JCUR, GAMMA, H, - & IPAR, RPAR, IER) -C Routine to set and preprocess block-diagonal preconditioner. -C Note: The dimensions in /BDJ/ below assume at most 100 mesh points. -C - IMPLICIT NONE -C - INTEGER*4 IER, JOK, JCUR - DOUBLE PRECISION T, U(2,*), FU(*), GAMMA, H -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*) - DOUBLE PRECISION RPAR(*) -C - INTEGER*4 MX, MY, MM, P_IPP, P_BD, P_P - DOUBLE PRECISION Q1, Q2, Q3, Q4, C3, DY, HDCO, VDCO -C - IER = 0 -C -C Extract constants from IPAR and RPAR - MX = IPAR(1) - MY = IPAR(2) - MM = IPAR(3) -C - Q1 = RPAR(1) - Q2 = RPAR(2) - Q3 = RPAR(3) - Q4 = RPAR(4) - C3 = RPAR(8) - DY = RPAR(9) - HDCO = RPAR(10) - VDCO = RPAR(11) -C -C Extract pointers into IPAR and RPAR - P_IPP = IPAR(4) - P_BD = IPAR(5) - P_P = IPAR(6) -C -C If needed, recompute BD -C - IF (JOK .EQ. 1) THEN -C JOK = 1. Reuse saved BD - JCUR = 0 - ELSE -C JOK = 0. Compute diagonal Jacobian blocks. -C (using q4 value computed on last FCVFUN call). - CALL PREC_JAC(MX, MY, MM, U, RPAR(P_BD), - & Q1, Q2, Q3, Q4, C3, DY, HDCO, VDCO) - JCUR = 1 - ENDIF -C -C Copy BD to P - CALL DCOPY(4*MM, RPAR(P_BD), 1, RPAR(P_P), 1) -C -C Scale P by -GAMMA - CALL DSCAL(4*MM, -GAMMA, RPAR(P_P), 1) -C -C Perform LU decomposition - CALL PREC_LU(MM, RPAR(P_P), IPAR(P_IPP), IER) -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVPSOL(T, U, FU, R, Z, GAMMA, DELTA, LR, - & IPAR, RPAR, IER) -C Routine to solve preconditioner linear system. -C - IMPLICIT NONE -C - INTEGER*4 IER, LR -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*) - DOUBLE PRECISION T, U(*), FU(*), R(*), Z(2,*) - DOUBLE PRECISION GAMMA, DELTA, RPAR(*) -C - INTEGER*4 MM, P_IPP, P_P -C - IER = 0 -C -C Extract constants from IPAR and RPAR - MM = IPAR(3) -C -C Extract pointers into IPAR and RPAR - P_IPP = IPAR(4) - P_P = IPAR(6) -C -C Copy RHS into Z - CALL DCOPY(2*MM, R, 1, Z, 1) -C -C Solve the block-diagonal system Px = r using LU factors stored in P -C and pivot data in IPP, and return the solution in Z. - CALL PREC_SOL(MM, RPAR(P_P), IPAR(P_IPP), Z) - - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE PREC_JAC(MX, MY, MM, U, BD, - & Q1, Q2, Q3, Q4, C3, DY, HDCO, VDCO) -C Routine to compute diagonal Jacobian blocks -C - IMPLICIT NONE -C - INTEGER*4 MX, MY, MM - DOUBLE PRECISION U(2,*), BD(2,2,MM) - DOUBLE PRECISION Q1, Q2, Q3, Q4, C3, DY, HDCO, VDCO -C - INTEGER*4 JY, JX, IBLOK, IBLOK0 - DOUBLE PRECISION C1, C2, CYDN, CYUP, DIAG, YDN, YUP -C - DO JY = 1, MY - YDN = 30.0D0 + (JY - 1.5D0) * DY - YUP = YDN + DY - CYDN = VDCO * EXP(0.2D0 * YDN) - CYUP = VDCO * EXP(0.2D0 * YUP) - DIAG = -(CYDN + CYUP + 2.0D0 * HDCO) - IBLOK0 = (JY - 1) * MX - DO JX = 1, MX - IBLOK = IBLOK0 + JX - C1 = U(1,IBLOK) - C2 = U(2,IBLOK) - BD(1,1,IBLOK) = (-Q1 * C3 - Q2 * C2) + DIAG - BD(1,2,IBLOK) = -Q2 * C1 + Q4 - BD(2,1,IBLOK) = Q1 * C3 - Q2 * C2 - BD(2,2,IBLOK) = (-Q2 * C1 - Q4) + DIAG - ENDDO - ENDDO - - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE PREC_LU(MM, P, IPP, IER) -C Routine to perform LU decomposition on (P+I) -C - IMPLICIT NONE -C - INTEGER*4 IER - INTEGER*4 MM - INTEGER*8 IPP(2,MM) - DOUBLE PRECISION P(2,2,MM) -C - INTEGER*4 I -C -C Add identity matrix and do LU decompositions on blocks, in place. - DO I = 1, MM - P(1,1,I) = P(1,1,I) + 1.0D0 - P(2,2,I) = P(2,2,I) + 1.0D0 - CALL DGEFA(P(1,1,I), 2, 2, IPP(1,I), IER) - IF (IER .NE. 0) RETURN - ENDDO -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE PREC_SOL(MM, P, IPP, Z) -C Routine for backsolve -C - IMPLICIT NONE -C - INTEGER*4 MM - INTEGER*8 IPP(2,MM) - DOUBLE PRECISION P(2,2,MM), Z(2,MM) -C - INTEGER*4 I -C - DO I = 1, MM - CALL DGESL(P(1,1,I), 2, 2, IPP(1,I), Z(1,I), 0) - ENDDO - - RETURN - END - -C ---------------------------------------------------------------- - - subroutine dgefa(a, lda, n, ipvt, info) -c - implicit none -c - integer info, idamax, j, k, kp1, l, nm1, n - integer*4 lda - integer*8 ipvt(1) - double precision a(lda,1), t -c -c dgefa factors a double precision matrix by gaussian elimination. -c -c dgefa is usually called by dgeco, but it can be called -c directly with a saving in time if rcond is not needed. -c (time for dgeco) = (1 + 9/n)*(time for dgefa) . -c -c on entry -c -c a double precision(lda, n) -c the matrix to be factored. -c -c lda integer -c the leading dimension of the array a . -c -c n integer -c the order of the matrix a . -c -c on return -c -c a an upper triangular matrix and the multipliers -c which were used to obtain it. -c the factorization can be written a = l*u where -c l is a product of permutation and unit lower -c triangular matrices and u is upper triangular. -c -c ipvt integer(n) -c an integer vector of pivot indices. -c -c info integer -c = 0 normal value. -c = k if u(k,k) .eq. 0.0 . this is not an error -c condition for this subroutine, but it does -c indicate that dgesl or dgedi will divide by zero -c if called. employ rcond in dgeco for a reliable -c indication of singularity. -c -c linpack. this version dated 08/14/78 . -c cleve moler, university of new mexico, argonne national lab. -c -c subroutines and functions -c -c blas daxpy,dscal,idamax -c -c internal variables -c -c gaussian elimination with partial pivoting -c - info = 0 - nm1 = n - 1 - if (nm1 .lt. 1) go to 70 - do 60 k = 1, nm1 - kp1 = k + 1 -c -c find l = pivot index -c - l = idamax(n - k + 1, a(k,k), 1) + k - 1 - ipvt(k) = l -c -c zero pivot implies this column already triangularized -c - if (a(l,k) .eq. 0.0d0) go to 40 -c -c interchange if necessary -c - if (l .eq. k) go to 10 - t = a(l,k) - a(l,k) = a(k,k) - a(k,k) = t - 10 continue -c -c compute multipliers -c - t = -1.0d0 / a(k,k) - call dscal(n - k, t, a(k + 1,k), 1) -c -c row elimination with column indexing -c - do 30 j = kp1, n - t = a(l,j) - if (l .eq. k) go to 20 - a(l,j) = a(k,j) - a(k,j) = t - 20 continue - call daxpy(n - k, t, a(k + 1,k), 1, a(k + 1,j), 1) - 30 continue - go to 50 - 40 continue - info = k - 50 continue - 60 continue - 70 continue - ipvt(n) = n - if (a(n,n) .eq. 0.0d0) info = n - return - end - -C ---------------------------------------------------------------- - - subroutine dgesl(a, lda, n, ipvt, b, job) -c - implicit none -c - integer lda, n, job, k, kb, l, nm1 - integer*8 ipvt(1) - double precision a(lda,1), b(1), ddot, t -c -c dgesl solves the double precision system -c a * x = b or trans(a) * x = b -c using the factors computed by dgeco or dgefa. -c -c on entry -c -c a double precision(lda, n) -c the output from dgeco or dgefa. -c -c lda integer -c the leading dimension of the array a . -c -c n integer -c the order of the matrix a . -c -c ipvt integer(n) -c the pivot vector from dgeco or dgefa. -c -c b double precision(n) -c the right hand side vector. -c -c job integer -c = 0 to solve a*x = b , -c = nonzero to solve trans(a)*x = b where -c trans(a) is the transpose. -c -c on return -c -c b the solution vector x . -c -c error condition -c -c a division by zero will occur if the input factor contains a -c zero on the diagonal. technically this indicates singularity -c but it is often caused by improper arguments or improper -c setting of lda . it will not occur if the subroutines are -c called correctly and if dgeco has set rcond .gt. 0.0 -c or dgefa has set info .eq. 0 . -c -c to compute inverse(a) * c where c is a matrix -c with p columns -c call dgeco(a,lda,n,ipvt,rcond,z) -c if (rcond is too small) go to ... -c do 10 j = 1, p -c call dgesl(a,lda,n,ipvt,c(1,j),0) -c 10 continue -c -c linpack. this version dated 08/14/78 . -c cleve moler, university of new mexico, argonne national lab. -c -c subroutines and functions -c -c blas daxpy,ddot -c -c internal variables -c - nm1 = n - 1 - if (job .ne. 0) go to 50 -c -c job = 0 , solve a * x = b -c first solve l*y = b -c - if (nm1 .lt. 1) go to 30 - do 20 k = 1, nm1 - l = ipvt(k) - t = b(l) - if (l .eq. k) go to 10 - b(l) = b(k) - b(k) = t - 10 continue - call daxpy(n - k, t, a(k + 1,k), 1, b(k + 1), 1) - 20 continue - 30 continue -c -c now solve u*x = y -c - do 40 kb = 1, n - k = n + 1 - kb - b(k) = b(k) / a(k,k) - t = -b(k) - call daxpy(k - 1, t, a(1,k), 1, b(1), 1) - 40 continue - go to 100 - 50 continue -c -c job = nonzero, solve trans(a) * x = b -c first solve trans(u)*y = b -c - do 60 k = 1, n - t = ddot(k - 1, a(1,k), 1, b(1), 1) - b(k) = (b(k) - t) / a(k,k) - 60 continue -c -c now solve trans(l)*x = y -c - if (nm1 .lt. 1) go to 90 - do 80 kb = 1, nm1 - k = n - kb - b(k) = b(k) + ddot(n - k, a(k + 1,k), 1, b(k + 1), 1) - l = ipvt(k) - if (l .eq. k) go to 70 - t = b(l) - b(l) = b(k) - b(k) = t - 70 continue - 80 continue - 90 continue - 100 continue - return - end - -C ---------------------------------------------------------------- - - subroutine daxpy(n, da, dx, incx, dy, incy) -c -c constant times a vector plus a vector. -c uses unrolled loops for increments equal to one. -c jack dongarra, linpack, 3/11/78. -c - implicit none -c - integer i, incx, incy, ix, iy, m, mp1 - integer*4 n - double precision dx(1), dy(1), da -c - if (n .le. 0) return - if (da .eq. 0.0d0) return - if (incx .eq. 1 .and. incy .eq. 1) go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if (incx .lt. 0) ix = (-n + 1) * incx + 1 - if (incy .lt. 0) iy = (-n + 1) * incy + 1 - do 10 i = 1, n - dy(iy) = dy(iy) + da * dx(ix) - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n, 4) - if ( m .eq. 0 ) go to 40 - do 30 i = 1, m - dy(i) = dy(i) + da * dx(i) - 30 continue - if ( n .lt. 4 ) return - 40 mp1 = m + 1 - do 50 i = mp1, n, 4 - dy(i) = dy(i) + da * dx(i) - dy(i + 1) = dy(i + 1) + da * dx(i + 1) - dy(i + 2) = dy(i + 2) + da * dx(i + 2) - dy(i + 3) = dy(i + 3) + da * dx(i + 3) - 50 continue - return - end -C ---------------------------------------------------------------- - - subroutine dscal(n, da, dx, incx) -c -c scales a vector by a constant. -c uses unrolled loops for increment equal to one. -c jack dongarra, linpack, 3/11/78. -c - implicit none -c - integer i, incx, m, mp1, nincx - integer*4 n - double precision da, dx(1) -c - if (n.le.0) return - if (incx .eq. 1) go to 20 -c -c code for increment not equal to 1 -c - nincx = n * incx - do 10 i = 1, nincx, incx - dx(i) = da * dx(i) - 10 continue - return -c -c code for increment equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n, 5) - if ( m .eq. 0 ) go to 40 - do 30 i = 1, m - dx(i) = da * dx(i) - 30 continue - if ( n .lt. 5 ) return - 40 mp1 = m + 1 - do 50 i = mp1, n, 5 - dx(i) = da * dx(i) - dx(i + 1) = da * dx(i + 1) - dx(i + 2) = da * dx(i + 2) - dx(i + 3) = da * dx(i + 3) - dx(i + 4) = da * dx(i + 4) - 50 continue - return - end - -C ---------------------------------------------------------------- - - double precision function ddot(n, dx, incx, dy, incy) -c -c forms the dot product of two vectors. -c uses unrolled loops for increments equal to one. -c jack dongarra, linpack, 3/11/78. -c - implicit none -c - integer i, incx, incy, ix, iy, m, mp1 - integer*4 n - double precision dx(1), dy(1), dtemp -c - ddot = 0.0d0 - dtemp = 0.0d0 - if (n .le. 0) return - if (incx .eq. 1 .and. incy .eq. 1) go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if (incx .lt. 0) ix = (-n + 1) * incx + 1 - if (incy .lt. 0) iy = (-n + 1) * incy + 1 - do 10 i = 1, n - dtemp = dtemp + dx(ix) * dy(iy) - ix = ix + incx - iy = iy + incy - 10 continue - ddot = dtemp - return -c -c code for both increments equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n, 5) - if ( m .eq. 0 ) go to 40 - do 30 i = 1,m - dtemp = dtemp + dx(i) * dy(i) - 30 continue - if ( n .lt. 5 ) go to 60 - 40 mp1 = m + 1 - do 50 i = mp1, n, 5 - dtemp = dtemp + dx(i) * dy(i) + dx(i + 1) * dy(i + 1) + - * dx(i + 2) * dy(i + 2) + dx(i + 3) * dy(i + 3) + - * dx(i + 4) * dy(i + 4) - 50 continue - 60 ddot = dtemp - return - end - -C ---------------------------------------------------------------- - - integer function idamax(n, dx, incx) -c -c finds the index of element having max. absolute value. -c jack dongarra, linpack, 3/11/78. -c - implicit none -c - integer i, incx, ix - integer*4 n - double precision dx(1), dmax -c - idamax = 0 - if (n .lt. 1) return - idamax = 1 - if (n .eq. 1) return - if (incx .eq. 1) go to 20 -c -c code for increment not equal to 1 -c - ix = 1 - dmax = abs(dx(1)) - ix = ix + incx - do 10 i = 2, n - if (abs(dx(ix)) .le. dmax) go to 5 - idamax = i - dmax = abs(dx(ix)) - 5 ix = ix + incx - 10 continue - return -c -c code for increment equal to 1 -c - 20 dmax = abs(dx(1)) - do 30 i = 2, n - if (abs(dx(i)) .le. dmax) go to 30 - idamax = i - dmax = abs(dx(i)) - 30 continue - return - end - -C ---------------------------------------------------------------- - - subroutine dcopy(n, dx, incx, dy, incy) -c -c copies a vector, x, to a vector, y. -c uses unrolled loops for increments equal to one. -c jack dongarra, linpack, 3/11/78. -c - implicit none -c - integer i, incx, incy, ix, iy, m, mp1 - integer*4 n - double precision dx(1), dy(1) -c - if (n .le. 0) return - if (incx .eq. 1 .and. incy .eq. 1) go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if (incx .lt. 0) ix = (-n + 1) * incx + 1 - if (incy .lt. 0) iy = (-n + 1) * incy + 1 - do 10 i = 1, n - dy(iy) = dx(ix) - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n, 7) - if ( m .eq. 0 ) go to 40 - do 30 i = 1, m - dy(i) = dx(i) - 30 continue - if ( n .lt. 7 ) return - 40 mp1 = m + 1 - do 50 i = mp1, n, 7 - dy(i) = dx(i) - dy(i + 1) = dx(i + 1) - dy(i + 2) = dx(i + 2) - dy(i + 3) = dx(i + 3) - dy(i + 4) = dx(i + 4) - dy(i + 5) = dx(i + 5) - dy(i + 6) = dx(i + 6) - 50 continue - return - end diff --git a/examples/cvode/fcmix_serial/fcvDiurnal_kry.out b/examples/cvode/fcmix_serial/fcvDiurnal_kry.out deleted file mode 100644 index 2afa39a024..0000000000 --- a/examples/cvode/fcmix_serial/fcvDiurnal_kry.out +++ /dev/null @@ -1,63 +0,0 @@ -Krylov example problem: - - Kinetics-transport, NEQ = 200 - - - t = 0.720E+04 nst = 219 q = 5 h = 0.158696E+03 - c1 (bot.left/middle/top rt.) = 0.104683E+05 0.296373E+05 0.111853E+05 - c2 (bot.left/middle/top rt.) = 0.252672E+12 0.715376E+12 0.269977E+12 - - t = 0.144E+05 nst = 251 q = 5 h = 0.377205E+03 - c1 (bot.left/middle/top rt.) = 0.665902E+07 0.531602E+07 0.730081E+07 - c2 (bot.left/middle/top rt.) = 0.258192E+12 0.205680E+12 0.283286E+12 - - t = 0.216E+05 nst = 277 q = 5 h = 0.274584E+03 - c1 (bot.left/middle/top rt.) = 0.266498E+08 0.103636E+08 0.293077E+08 - c2 (bot.left/middle/top rt.) = 0.299279E+12 0.102810E+12 0.331344E+12 - - t = 0.288E+05 nst = 307 q = 4 h = 0.201171E+03 - c1 (bot.left/middle/top rt.) = 0.870209E+07 0.129197E+08 0.965002E+07 - c2 (bot.left/middle/top rt.) = 0.338035E+12 0.502929E+12 0.375096E+12 - - t = 0.360E+05 nst = 336 q = 5 h = 0.101863E+03 - c1 (bot.left/middle/top rt.) = 0.140404E+05 0.202903E+05 0.156090E+05 - c2 (bot.left/middle/top rt.) = 0.338677E+12 0.489443E+12 0.376516E+12 - - t = 0.432E+05 nst = 385 q = 4 h = 0.456580E+03 - c1 (bot.left/middle/top rt.) = 0.522615E-07 -0.607462E-05 0.871309E-07 - c2 (bot.left/middle/top rt.) = 0.338233E+12 0.135487E+12 0.380352E+12 - - t = 0.504E+05 nst = 403 q = 4 h = 0.277279E+03 - c1 (bot.left/middle/top rt.) = -0.266960E-07 -0.450968E-05 -0.267202E-07 - c2 (bot.left/middle/top rt.) = 0.335816E+12 0.493033E+12 0.386445E+12 - - t = 0.576E+05 nst = 419 q = 5 h = 0.344023E+03 - c1 (bot.left/middle/top rt.) = -0.114670E-08 -0.587145E-07 -0.219472E-08 - c2 (bot.left/middle/top rt.) = 0.332031E+12 0.964981E+12 0.390900E+12 - - t = 0.648E+05 nst = 431 q = 5 h = 0.949533E+03 - c1 (bot.left/middle/top rt.) = 0.379212E-09 0.190141E-07 0.719619E-09 - c2 (bot.left/middle/top rt.) = 0.331303E+12 0.892184E+12 0.396342E+12 - - t = 0.720E+05 nst = 441 q = 5 h = 0.700864E+03 - c1 (bot.left/middle/top rt.) = -0.187184E-10 -0.936079E-09 -0.355015E-10 - c2 (bot.left/middle/top rt.) = 0.332972E+12 0.618617E+12 0.403885E+12 - - t = 0.792E+05 nst = 451 q = 5 h = 0.700864E+03 - c1 (bot.left/middle/top rt.) = 0.136509E-12 0.673869E-11 0.258515E-12 - c2 (bot.left/middle/top rt.) = 0.333441E+12 0.666904E+12 0.412026E+12 - - t = 0.864E+05 nst = 461 q = 5 h = 0.700864E+03 - c1 (bot.left/middle/top rt.) = 0.414351E-13 0.207247E-11 0.786247E-13 - c2 (bot.left/middle/top rt.) = 0.335178E+12 0.910668E+12 0.416250E+12 - - -Final statistics: - - number of steps = 461 number of f evals. = 597 - number of prec. setups = 78 - number of prec. evals. = 8 number of prec. solves = 1176 - number of nonl. iters. = 594 number of lin. iters. = 636 - average Krylov subspace dimension (NLI/NNI) = 0.107071E+01 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 27 diff --git a/examples/cvode/fcmix_serial/fcvDiurnal_kry_bp.f b/examples/cvode/fcmix_serial/fcvDiurnal_kry_bp.f deleted file mode 100644 index 037f968a80..0000000000 --- a/examples/cvode/fcmix_serial/fcvDiurnal_kry_bp.f +++ /dev/null @@ -1,374 +0,0 @@ -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C FCVODE Example Problem: 2D kinetics-transport, precond. Krylov -C solver. -C -C An ODE system is generated from the following 2-species diurnal -C kinetics advection-diffusion PDE system in 2 space dimensions: -C -C dc(i)/dt = Kh*(d/dx)**2 c(i) + V*dc(i)/dx + (d/dy)(Kv(y)*dc(i)/dy) -C + Ri(c1,c2,t) for i = 1,2, where -C R1(c1,c2,t) = -q1*c1*c3 - q2*c1*c2 + 2*q3(t)*c3 + q4(t)*c2 , -C R2(c1,c2,t) = q1*c1*c3 - q2*c1*c2 - q4(t)*c2 , -C Kv(y) = Kv0*exp(y/5) , -C Kh, V, Kv0, q1, q2, and c3 are constants, and q3(t) and q4(t) -C vary diurnally. -C -C The problem is posed on the square -C 0 .le. x .le. 20, 30 .le. y .le. 50 (all in km), -C with homogeneous Neumann boundary conditions, and for time t -C in 0 .le. t .le. 86400 sec (1 day). -C -C The PDE system is treated by central differences on a uniform -C 10 x 10 mesh, with simple polynomial initial profiles. -C The problem is solved with CVODE, with the BDF/GMRES method and -C using the FCVBP banded preconditioner. -C -C The second and third dimensions of U here must match the values -C of MX and MY, for consistency with the output statements below. -C -------------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 MX, MY - PARAMETER (MX=10, MY=10) -C - INTEGER*4 LNST, LNFE, LNSETUP, LNNI, LNCF, LNPE, LNLI, LNPS - INTEGER*4 LNCFL, LH, LQ, METH, IATOL, ITASK - INTEGER*4 LNETF, IER, MAXL, JPRETYPE, IGSTYPE, JOUT - INTEGER*4 LLENRW, LLENIW, LLENRWLS, LLENIWLS -C The following declaration specification should match C type long int. - INTEGER*8 NEQ, IOUT(25), IPAR(4) - INTEGER*4 NST, NFE, NPSET, NPE, NPS, NNI - INTEGER*4 NLI, NCFN, NCFL, NETF - INTEGER*4 LENRW, LENIW, LENRWLS, LENIWLS -C The following declaration specification should match C type long int. - INTEGER*8 MU, ML, LENRWBP, LENIWBP, NFEBP - DOUBLE PRECISION ATOL, AVDIM, DELT, FLOOR, RTOL, T, TOUT, TWOHR - DOUBLE PRECISION ROUT(10), U(2,MX,MY), RPAR(12) -C - DATA TWOHR/7200.0D0/, RTOL/1.0D-5/, FLOOR/100.0D0/, - 1 JPRETYPE/1/, IGSTYPE/1/, MAXL/0/, DELT/0.0D0/ - DATA LLENRW/1/, LLENIW/2/, LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, - 1 LNNI/7/, LNSETUP/8/, LQ/9/, LLENRWLS/13/, LLENIWLS/14/, - 1 LNPE/20/, LNLI/22/, LNPS/21/, LNCFL/23/ - DATA LH/2/ -C -C Load problem constants into IPAR, RPAR, and set initial values - CALL INITKX(MX, MY, U, IPAR, RPAR) -C -C Set other input arguments. - NEQ = 2*MX*MY - T = 0.0D0 - METH = 2 - IATOL = 1 - ATOL = RTOL * FLOOR - ITASK = 1 -C - WRITE(6,10) NEQ - 10 FORMAT('Krylov example problem:'// - 1 ' Kinetics-transport, NEQ = ', I4/) -C -C Initialize vector specification - CALL FNVINITS(1, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF -C -C Initialize SPGMR linear solver module - call FSUNSPGMRINIT(1, JPRETYPE, MAXL, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRINIT IER = ', I5) - STOP - ENDIF - call FSUNSPGMRSETGSTYPE(1, IGSTYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,27) IER - 27 FORMAT(///' SUNDIALS_ERROR: FSUNSPGMRSETGSTYPE IER = ', I5) - STOP - ENDIF -C -C Initialize CVODE - CALL FCVMALLOC(T, U, METH, IATOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - STOP - ENDIF -C -C attach linear solver module to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ',I5) - CALL FCVFREE - STOP - ENDIF -C -C Initialize band preconditioner - MU = 2 - ML = 2 - CALL FCVBPINIT(NEQ, MU, ML, IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FCVBPINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF -C -C Loop over output points, call FCVODE, print sample solution values. - TOUT = TWOHR - DO 70 JOUT = 1, 12 -C - CALL FCVODE(TOUT, T, U, ITASK, IER) -C - WRITE(6,50) T, IOUT(LNST), IOUT(LQ), ROUT(LH) - 50 FORMAT(/' t = ', E14.6, 5X, 'no. steps = ', I5, - 1 ' order = ', I3, ' stepsize = ', E14.6) - WRITE(6,55) U(1,1,1), U(1,5,5), U(1,10,10), - 1 U(2,1,1), U(2,5,5), U(2,10,10) - 55 FORMAT(' c1 (bot.left/middle/top rt.) = ', 3E14.6/ - 1 ' c2 (bot.left/middle/top rt.) = ', 3E14.6) -C - IF (IER .NE. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF -C - TOUT = TOUT + TWOHR - 70 CONTINUE - -C Print final statistics. - NST = IOUT(LNST) - NFE = IOUT(LNFE) - NPSET = IOUT(LNSETUP) - NPE = IOUT(LNPE) - NPS = IOUT(LNPS) - NNI = IOUT(LNNI) - NLI = IOUT(LNLI) - AVDIM = DBLE(NLI) / DBLE(NNI) - NCFN = IOUT(LNCF) - NCFL = IOUT(LNCFL) - NETF = IOUT(LNETF) - LENRW = IOUT(LLENRW) - LENIW = IOUT(LLENIW) - LENRWLS = IOUT(LLENRWLS) - LENIWLS = IOUT(LLENIWLS) - WRITE(6,80) NST, NFE, NPSET, NPE, NPS, NNI, NLI, AVDIM, NCFN, - 1 NCFL, NETF, LENRW, LENIW, LENRWLS, LENIWLS - 80 FORMAT(//'Final statistics:'// - & ' number of steps = ', I5, 4X, - & ' number of f evals. = ', I5/ - & ' number of prec. setups = ', I5/ - & ' number of prec. evals. = ', I5, 4X, - & ' number of prec. solves = ', I5/ - & ' number of nonl. iters. = ', I5, 4X, - & ' number of lin. iters. = ', I5/ - & ' average Krylov subspace dimension (NLI/NNI) = ', E14.6/ - & ' number of conv. failures.. nonlinear =', I3, - & ' linear = ', I3/ - & ' number of error test failures = ', I3/ - & ' main solver real/int workspace sizes = ',2I7/ - & ' linear solver real/int workspace sizes = ',2I5) - CALL FCVBPOPT(LENRWBP, LENIWBP, NFEBP) - WRITE(6,82) LENRWBP, LENIWBP, NFEBP - 82 FORMAT('In CVBANDPRE:'/ - & ' real/int workspace sizes = ', 2I7/ - & ' number of f evaluations = ', I5) -C - CALL FCVFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE INITKX(MX, MY, U0, IPAR, RPAR) -C Routine to set problem constants and initial values -C - IMPLICIT NONE -C - INTEGER*4 MX, MY -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*) - DOUBLE PRECISION RPAR(*) -C - INTEGER*8 MM, JY, JX, NEQ - DOUBLE PRECISION U0 - DIMENSION U0(2,MX,MY) - DOUBLE PRECISION Q1, Q2, Q3, Q4, A3, A4, OM, C3, DY, HDCO - DOUBLE PRECISION VDCO, HACO, X, Y - DOUBLE PRECISION CX, CY, DKH, DKV0, DX, HALFDA, PI, VEL -C - DATA DKH/4.0D-6/, VEL/0.001D0/, DKV0/1.0D-8/, HALFDA/4.32D4/, - 1 PI/3.1415926535898D0/ -C -C Problem constants - MM = MX * MY - NEQ = 2 * MM - Q1 = 1.63D-16 - Q2 = 4.66D-16 - Q3 = 0.0D0 - Q4 = 0.0D0 - A3 = 22.62D0 - A4 = 7.601D0 - OM = PI / HALFDA - C3 = 3.7D16 - DX = 20.0D0 / (MX - 1.0D0) - DY = 20.0D0 / (MY - 1.0D0) - HDCO = DKH / DX**2 - HACO = VEL / (2.0D0 * DX) - VDCO = (1.0D0 / DY**2) * DKV0 -C -C Load constants in IPAR and RPAR - IPAR(1) = MX - IPAR(2) = MY - IPAR(3) = MM - IPAR(4) = NEQ -C - RPAR(1) = Q1 - RPAR(2) = Q2 - RPAR(3) = Q3 - RPAR(4) = Q4 - RPAR(5) = A3 - RPAR(6) = A4 - RPAR(7) = OM - RPAR(8) = C3 - RPAR(9) = DY - RPAR(10) = HDCO - RPAR(11) = VDCO - RPAR(12) = HACO -C -C Set initial profiles. - DO 20 JY = 1, MY - Y = 30.0D0 + (JY - 1.0D0) * DY - CY = (0.1D0 * (Y - 40.0D0))**2 - CY = 1.0D0 - CY + 0.5D0 * CY**2 - DO 10 JX = 1, MX - X = (JX - 1.0D0) * DX - CX = (0.1D0 * (X - 10.0D0))**2 - CX = 1.0D0 - CX + 0.5D0 * CX**2 - U0(1,JX,JY) = 1.0D6 * CX * CY - U0(2,JX,JY) = 1.0D12 * CX * CY - 10 CONTINUE - 20 CONTINUE -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVFUN(T, U, UDOT, IPAR, RPAR, IER) -C Routine for right-hand side function f -C - IMPLICIT NONE -C -C The following declaration specification should match C type long int. - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, U(2,*), UDOT(2,*), RPAR(*) -C - INTEGER*4 ILEFT, IRIGHT - INTEGER*8 MX, MY, MM, JY, JX, IBLOK0, IDN, IUP, IBLOK - DOUBLE PRECISION Q1,Q2,Q3,Q4, A3, A4, OM, C3, DY, HDCO, VDCO, HACO - DOUBLE PRECISION C1, C2, C1DN, C2DN, C1UP, C2UP, C1LT, C2LT - DOUBLE PRECISION C1RT, C2RT, CYDN, CYUP, HORD1, HORD2, HORAD1 - DOUBLE PRECISION HORAD2, QQ1, QQ2, QQ3, QQ4, RKIN1, RKIN2, S - DOUBLE PRECISION VERTD1, VERTD2, YDN, YUP -C -C Extract constants from IPAR and RPAR - MX = IPAR(1) - MY = IPAR(2) - MM = IPAR(3) -C - Q1 = RPAR(1) - Q2 = RPAR(2) - Q3 = RPAR(3) - Q4 = RPAR(4) - A3 = RPAR(5) - A4 = RPAR(6) - OM = RPAR(7) - C3 = RPAR(8) - DY = RPAR(9) - HDCO = RPAR(10) - VDCO = RPAR(11) - HACO = RPAR(12) -C -C Set diurnal rate coefficients. - S = SIN(OM * T) - IF (S .GT. 0.0D0) THEN - Q3 = EXP(-A3 / S) - Q4 = EXP(-A4 / S) - ELSE - Q3 = 0.0D0 - Q4 = 0.0D0 - ENDIF -C -C Loop over all grid points. - DO 20 JY = 1, MY - YDN = 30.0D0 + (JY - 1.5D0) * DY - YUP = YDN + DY - CYDN = VDCO * EXP(0.2D0 * YDN) - CYUP = VDCO * EXP(0.2D0 * YUP) - IBLOK0 = (JY - 1) * MX - IDN = -MX - IF (JY .EQ. 1) IDN = MX - IUP = MX - IF (JY .EQ. MY) IUP = -MX - DO 10 JX = 1, MX - IBLOK = IBLOK0 + JX - C1 = U(1,IBLOK) - C2 = U(2,IBLOK) -C Set kinetic rate terms. - QQ1 = Q1 * C1 * C3 - QQ2 = Q2 * C1 * C2 - QQ3 = Q3 * C3 - QQ4 = Q4 * C2 - RKIN1 = -QQ1 - QQ2 + 2.0D0 * QQ3 + QQ4 - RKIN2 = QQ1 - QQ2 - QQ4 -C Set vertical diffusion terms. - C1DN = U(1,IBLOK + IDN) - C2DN = U(2,IBLOK + IDN) - C1UP = U(1,IBLOK + IUP) - C2UP = U(2,IBLOK + IUP) - VERTD1 = CYUP * (C1UP - C1) - CYDN * (C1 - C1DN) - VERTD2 = CYUP * (C2UP - C2) - CYDN * (C2 - C2DN) -C Set horizontal diffusion and advection terms. - ILEFT = -1 - IF (JX .EQ. 1) ILEFT = 1 - IRIGHT = 1 - IF (JX .EQ. MX) IRIGHT = -1 - C1LT = U(1,IBLOK + ILEFT) - C2LT = U(2,IBLOK + ILEFT) - C1RT = U(1,IBLOK + IRIGHT) - C2RT = U(2,IBLOK + IRIGHT) - HORD1 = HDCO * (C1RT - 2.0D0 * C1 + C1LT) - HORD2 = HDCO * (C2RT - 2.0D0 * C2 + C2LT) - HORAD1 = HACO * (C1RT - C1LT) - HORAD2 = HACO * (C2RT - C2LT) -C Load all terms into UDOT. - UDOT(1,IBLOK) = VERTD1 + HORD1 + HORAD1 + RKIN1 - UDOT(2,IBLOK) = VERTD2 + HORD2 + HORAD2 + RKIN2 - 10 CONTINUE - 20 CONTINUE -C - IER = 0 -C - RETURN - END diff --git a/examples/cvode/fcmix_serial/fcvDiurnal_kry_bp.out b/examples/cvode/fcmix_serial/fcvDiurnal_kry_bp.out deleted file mode 100644 index 9227652d19..0000000000 --- a/examples/cvode/fcmix_serial/fcvDiurnal_kry_bp.out +++ /dev/null @@ -1,68 +0,0 @@ -Krylov example problem: - - Kinetics-transport, NEQ = 200 - - - t = 0.720000E+04 no. steps = 190 order = 5 stepsize = 0.160965E+03 - c1 (bot.left/middle/top rt.) = 0.104683E+05 0.296373E+05 0.111853E+05 - c2 (bot.left/middle/top rt.) = 0.252672E+12 0.715377E+12 0.269977E+12 - - t = 0.144000E+05 no. steps = 221 order = 5 stepsize = 0.382687E+03 - c1 (bot.left/middle/top rt.) = 0.665902E+07 0.531602E+07 0.730081E+07 - c2 (bot.left/middle/top rt.) = 0.258192E+12 0.205680E+12 0.283286E+12 - - t = 0.216000E+05 no. steps = 246 order = 5 stepsize = 0.278111E+03 - c1 (bot.left/middle/top rt.) = 0.266497E+08 0.103640E+08 0.293077E+08 - c2 (bot.left/middle/top rt.) = 0.299279E+12 0.102815E+12 0.331344E+12 - - t = 0.288000E+05 no. steps = 298 order = 3 stepsize = 0.132506E+03 - c1 (bot.left/middle/top rt.) = 0.870208E+07 0.129196E+08 0.965000E+07 - c2 (bot.left/middle/top rt.) = 0.338035E+12 0.502926E+12 0.375095E+12 - - t = 0.360000E+05 no. steps = 341 order = 4 stepsize = 0.631280E+02 - c1 (bot.left/middle/top rt.) = 0.140403E+05 0.202899E+05 0.156090E+05 - c2 (bot.left/middle/top rt.) = 0.338677E+12 0.489433E+12 0.376516E+12 - - t = 0.432000E+05 no. steps = 402 order = 4 stepsize = 0.448032E+03 - c1 (bot.left/middle/top rt.) = 0.191468E-06 -0.613018E-05 0.439513E-06 - c2 (bot.left/middle/top rt.) = 0.338232E+12 0.135498E+12 0.380352E+12 - - t = 0.504000E+05 no. steps = 422 order = 4 stepsize = 0.317295E+03 - c1 (bot.left/middle/top rt.) = -0.774603E-10 -0.307315E-07 -0.351244E-10 - c2 (bot.left/middle/top rt.) = 0.335816E+12 0.493029E+12 0.386444E+12 - - t = 0.576000E+05 no. steps = 436 order = 5 stepsize = 0.358251E+03 - c1 (bot.left/middle/top rt.) = 0.180088E-10 0.717698E-08 0.858836E-11 - c2 (bot.left/middle/top rt.) = 0.332031E+12 0.964978E+12 0.390899E+12 - - t = 0.648000E+05 no. steps = 449 order = 5 stepsize = 0.594794E+03 - c1 (bot.left/middle/top rt.) = -0.284457E-13 -0.106311E-10 -0.138218E-13 - c2 (bot.left/middle/top rt.) = 0.331302E+12 0.892183E+12 0.396341E+12 - - t = 0.720000E+05 no. steps = 461 order = 5 stepsize = 0.594794E+03 - c1 (bot.left/middle/top rt.) = 0.271046E-15 0.101114E-12 0.130660E-15 - c2 (bot.left/middle/top rt.) = 0.332972E+12 0.618623E+12 0.403884E+12 - - t = 0.792000E+05 no. steps = 473 order = 5 stepsize = 0.594794E+03 - c1 (bot.left/middle/top rt.) = 0.569757E-15 0.205829E-12 0.268970E-15 - c2 (bot.left/middle/top rt.) = 0.333441E+12 0.666892E+12 0.412025E+12 - - t = 0.864000E+05 no. steps = 485 order = 5 stepsize = 0.594794E+03 - c1 (bot.left/middle/top rt.) = 0.270665E-15 0.189895E-16 0.215568E-14 - c2 (bot.left/middle/top rt.) = 0.335178E+12 0.910637E+12 0.416250E+12 - - -Final statistics: - - number of steps = 485 number of f evals. = 616 - number of prec. setups = 85 - number of prec. evals. = 9 number of prec. solves = 1134 - number of nonl. iters. = 613 number of lin. iters. = 597 - average Krylov subspace dimension (NLI/NNI) = 0.973899E+00 - number of conv. failures.. nonlinear = 0 linear = 0 - number of error test failures = 28 - main solver real/int workspace sizes = 2689 53 - linear solver real/int workspace sizes = 2454 42 -In CVBANDPRE: - real/int workspace sizes = 2800 622 - number of f evaluations = 45 diff --git a/examples/cvode/fcmix_serial/fcvRoberts_dns.f b/examples/cvode/fcmix_serial/fcvRoberts_dns.f deleted file mode 100644 index c55caa7dc0..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_dns.f +++ /dev/null @@ -1,270 +0,0 @@ -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C FCVODE Example Problem: Robertson kinetics, direct linear solver -C with dense user Jacobian. -C -C The following is a simple example problem, with the coding -C needed for its solution by CVODE. The problem is from chemical -C kinetics, and consists of the following three rate equations: -C -C dy1/dt = -.04*y1 + 1.e4*y2*y3 -C dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2 -C dy3/dt = 3.e7*y2**2 -C -C on the interval from t = 0.0 to t = 4.e10, with initial -C conditions: -C -C y1 = 1.0, y2 = y3 = 0. -C -C The problem is stiff. While integrating the system, we also -C enable the root finding feature to find the points at which -C y1 = 1.e-4 or at which y3 = 0.01. The following coding solves -C this problem with CVODE, using the Fortran/C interface routine -C package. This solution uses the BDF method and a user-supplied -C Jacobian routine, and prints results at t = .4, 4., ..., 4.e10. -C It uses ITOL = 2 and ATOL much smaller for y2 than y1 or y3 -C because y2 has much smaller values. At the end of the run, -C various counters of interest are printed. -C -------------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 IER, LNST, LNFE, LNSETUP, LNNI, LNCF, LNETF, LNJE, LNGE - INTEGER*4 METH, ITOL, ITASK, JOUT, NOUT, IERROOT - INTEGER*4 INFO(2) - INTEGER*4 I -C The following declaration specification should match C type long int - INTEGER*8 NEQ, IPAR, IOUT(25) - DOUBLE PRECISION RTOL, T, T0, TOUT - DOUBLE PRECISION Y(3), ATOL(3), ROUT(10), RPAR -C - DATA LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, LNNI/7/, LNSETUP/8/, - 1 LNGE/12/, LNJE/17/ -C - NEQ = 3 - T0 = 0.0D0 - Y(1) = 1.0D0 - Y(2) = 0.0D0 - Y(3) = 0.0D0 - METH = 2 - ITOL = 2 - RTOL = 1.0D-4 - ATOL(1) = 1.0D-8 - ATOL(2) = 1.0D-14 - ATOL(3) = 1.0D-6 - TOUT = 0.4D0 - ITASK = 1 - JOUT = 0 - NOUT = 12 -C - WRITE(6,10) NEQ - 10 FORMAT('Dense example problem:'// - 1 ' Robertson kinetics, NEQ = ', I2//) - -C create serial vector - CALL FNVINITS(1, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF - -C initialize dense matrix module - CALL FSUNDENSEMATINIT(1, NEQ, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNDENSEMATINIT returned IER = ', - 1 I5) - STOP - ENDIF - -C initialize dense linear solver module - CALL FSUNDENSELINSOLINIT(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,28) IER - 28 FORMAT(///' SUNDIALS_ERROR: FSUNDENSELINSOLINIT returned IER = ' - 1 , I5) - STOP - ENDIF - -C Call FCVMALLOC to create the solver memory and specify the -C Backward Differentiation Formula - CALL FCVMALLOC(T0, Y, METH, ITOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - STOP - ENDIF - -C Call FCVROOTINIT to specify the root function g with 2 components - CALL FCVROOTINIT(2, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FCVROOTINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C attach the matrix and linear solver modules to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C indicate a dense Jacobian function is provided - CALL FCVDENSESETJAC(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FCVDENSESETJAC returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - - DO WHILE(JOUT .LT. NOUT) -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - WRITE(6,50) T, Y(1), Y(2), Y(3) - 50 FORMAT('At t = ', E12.4, ' y = ', 3E14.6) -C - IF (IER .LT. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF -C - IF (IER .EQ. 2) THEN - CALL FCVROOTINFO(2, INFO, IERROOT) - IF (IERROOT .LT. 0) THEN - WRITE(6,65) IERROOT - 65 FORMAT(///' SUNDIALS_ERROR: FCVROOTINFO returned IER = ', - 1 I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,70) (INFO(I), I = 1, 2) - 70 FORMAT(5X, 'Above is a root, INFO() = ', 2I3) - ENDIF -C - IF (IER .EQ. 0) THEN - TOUT = TOUT * 10.0D0 - JOUT = JOUT + 1 - ENDIF -C - ENDDO -C - CALL FCVDKY(T, 1, Y, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - 80 FORMAT(///' SUNDIALS_ERROR: FCVDKY returned IER = ', I4) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,85) Y(1), Y(2), Y(3) - 85 FORMAT(/'Final value of ydot = ', 3E14.6) -C - WRITE(6,90) IOUT(LNST), IOUT(LNFE), IOUT(LNJE), IOUT(LNSETUP), - 1 IOUT(LNNI), IOUT(LNCF), IOUT(LNETF), IOUT(LNGE) - 90 FORMAT(//'Final statistics:'// - 1 ' No. steps = ', I4, ' No. f-s = ', I4, - 2 ' No. J-s = ', I4, ' No. LU-s = ', I4/ - 3 ' No. nonlinear iterations = ', I4/ - 4 ' No. nonlinear convergence failures = ', I4/ - 5 ' No. error test failures = ', I4/ - 6 ' No. root function evals = ', I4) -C - CALL FCVROOTFREE - CALL FCVFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Fortran routine for right-hand side function - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - YDOT(1) = -0.04D0 * Y(1) + 1.0D4 * Y(2) * Y(3) - YDOT(3) = 3.0D7 * Y(2) * Y(2) - YDOT(2) = -YDOT(1) - YDOT(3) -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVROOTFN(T, Y, G, IPAR, RPAR, IER) -C Fortran routine for root finding - IMPLICIT NONE -C - DOUBLE PRECISION T, Y(*), G(*), RPAR(*) -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER -C - G(1) = Y(1) - 1.0D-4 - G(2) = Y(3) - 1.0D-2 -C - IER = 0 - - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVDJAC(N, T, Y, FY, JAC, H, IPAR, RPAR, - 1 V1, V2, V3, IER) -C Fortran routine for dense user-supplied Jacobian - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 N, IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), FY(*), JAC(N,*), H, RPAR(*) - DOUBLE PRECISION V1(*), V2(*), V3(*) -C - DOUBLE PRECISION Y1, Y2, Y3 -C - Y1 = Y(1) - Y2 = Y(2) - Y3 = Y(3) - JAC(1,1) = -0.04D0 - JAC(1,2) = 1.0D4 * Y3 - JAC(1,3) = 1.0D4 * Y2 - JAC(2,1) = 0.04D0 - JAC(2,2) = -1.0D4 * Y3 - 6.0D7 * Y2 - JAC(2,3) = -1.0D4 * Y2 - JAC(3,3) = 0.0D0 - JAC(3,2) = 6.0D7 * Y2 - JAC(3,3) = 0.0D0 -C - IER = 0 -C - RETURN - END diff --git a/examples/cvode/fcmix_serial/fcvRoberts_dns.out b/examples/cvode/fcmix_serial/fcvRoberts_dns.out deleted file mode 100644 index 22d163cf9f..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_dns.out +++ /dev/null @@ -1,32 +0,0 @@ -Dense example problem: - - Robertson kinetics, NEQ = 3 - - -At t = 0.2639E+00 y = 0.989965E+00 0.347056E-04 0.100000E-01 - Above is a root, INFO() = 0 1 -At t = 0.4000E+00 y = 0.985164E+00 0.338624E-04 0.148020E-01 -At t = 0.4000E+01 y = 0.905510E+00 0.224034E-04 0.944679E-01 -At t = 0.4000E+02 y = 0.715802E+00 0.918504E-05 0.284189E+00 -At t = 0.4000E+03 y = 0.450536E+00 0.322327E-05 0.549461E+00 -At t = 0.4000E+04 y = 0.183230E+00 0.894438E-06 0.816769E+00 -At t = 0.4000E+05 y = 0.389890E-01 0.162201E-06 0.961011E+00 -At t = 0.4000E+06 y = 0.493638E-02 0.198422E-07 0.995064E+00 -At t = 0.4000E+07 y = 0.516809E-03 0.206829E-08 0.999483E+00 -At t = 0.2079E+08 y = 0.100000E-03 0.400040E-09 0.999900E+00 - Above is a root, INFO() = -1 0 -At t = 0.4000E+08 y = 0.520244E-04 0.208108E-09 0.999948E+00 -At t = 0.4000E+09 y = 0.520106E-05 0.208044E-10 0.999995E+00 -At t = 0.4000E+10 y = 0.525860E-06 0.210344E-11 0.999999E+00 -At t = 0.4000E+11 y = 0.693451E-07 0.277380E-12 0.100000E+01 - -Final value of ydot = -0.276733E-18 -0.110693E-23 0.276734E-18 - - -Final statistics: - - No. steps = 542 No. f-s = 754 No. J-s = 11 No. LU-s = 107 - No. nonlinear iterations = 751 - No. nonlinear convergence failures = 0 - No. error test failures = 22 - No. root function evals = 570 diff --git a/examples/cvode/fcmix_serial/fcvRoberts_dnsL.f b/examples/cvode/fcmix_serial/fcvRoberts_dnsL.f deleted file mode 100644 index b952682760..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_dnsL.f +++ /dev/null @@ -1,273 +0,0 @@ -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C FCVODE Example Problem: Robertson kinetics, Lapack linear solver -C with dense user Jacobian. -C -C The following is a simple example problem, with the coding -C needed for its solution by CVODE. The problem is from chemical -C kinetics, and consists of the following three rate equations: -C -C dy1/dt = -.04*y1 + 1.e4*y2*y3 -C dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2 -C dy3/dt = 3.e7*y2**2 -C -C on the interval from t = 0.0 to t = 4.e10, with initial -C conditions: -C -C y1 = 1.0, y2 = y3 = 0. -C -C The problem is stiff. While integrating the system, we also -C enable the root finding feature to find the points at which -C y1 = 1.e-4 or at which y3 = 0.01. The following coding solves -C this problem with CVODE, using the Fortran/C interface routine -C package. This solution uses the BDF method and a user-supplied -C Jacobian routine, and prints results at t = .4, 4., ..., 4.e10. -C It uses ITOL = 2 and ATOL much smaller for y2 than y1 or y3 -C because y2 has much smaller values. At the end of the run, -C various counters of interest are printed. -C -C Note that this problem should only work with SUNDIALS configured -C to use 'realtype' as 'double' and 'sunindextype' as '32bit' -C -------------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 IER, LNST, LNFE, LNSETUP, LNNI, LNCF, LNETF, LNJE, LNGE - INTEGER*4 METH, ITOL, ITASK, JOUT, NOUT, IERROOT - INTEGER*4 INFO(2) - INTEGER*4 I -C The following declaration specification should match C type long int. - INTEGER*8 NEQ, IPAR, IOUT(25) - DOUBLE PRECISION RTOL, T, T0, TOUT - DOUBLE PRECISION Y(3), ATOL(3), ROUT(10), RPAR -C - DATA LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, LNNI/7/, LNSETUP/8/, - 1 LNGE/12/, LNJE/17/ -C - NEQ = 3 - T0 = 0.0D0 - Y(1) = 1.0D0 - Y(2) = 0.0D0 - Y(3) = 0.0D0 - METH = 2 - ITOL = 2 - RTOL = 1.0D-4 - ATOL(1) = 1.0D-8 - ATOL(2) = 1.0D-14 - ATOL(3) = 1.0D-6 - TOUT = 0.4D0 - ITASK = 1 - JOUT = 0 - NOUT = 12 -C - WRITE(6,10) NEQ - 10 FORMAT('Dense example problem:'// - 1 ' Robertson kinetics, NEQ = ', I2//) - -C create serial vector - CALL FNVINITS(1, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF - -C initialize dense matrix module - CALL FSUNDENSEMATINIT(1, NEQ, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNDENSEMATINIT returned IER = ', - 1 I5) - STOP - ENDIF - -C initialize LAPACK dense linear solver module - CALL FSUNLAPACKDENSEINIT(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,28) IER - 28 FORMAT(///' SUNDIALS_ERROR: FSUNLAPACKDENSEINIT returned IER = ' - 1 , I5) - STOP - ENDIF - -C Call FCVMALLOC to create the solver memory and specify the -C Backward Differentiation Formula - CALL FCVMALLOC(T0, Y, METH, ITOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - STOP - ENDIF - -C Call FCVROOTINIT to specify the root function g with 2 components - CALL FCVROOTINIT(2, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FCVROOTINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C attach the matrix and linear solver modules to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C indicate a dense Jacobian function is provided - CALL FCVDENSESETJAC(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FCVDENSESETJAC returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - - DO WHILE(JOUT .LT. NOUT) -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - WRITE(6,50) T, Y(1), Y(2), Y(3) - 50 FORMAT('At t = ', E12.4, ' y = ', 3E14.6) -C - IF (IER .LT. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF -C - IF (IER .EQ. 2) THEN - CALL FCVROOTINFO(2, INFO, IERROOT) - IF (IERROOT .LT. 0) THEN - WRITE(6,65) IERROOT - 65 FORMAT(///' SUNDIALS_ERROR: FCVROOTINFO returned IER = ', - 1 I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,70) (INFO(I), I = 1, 2) - 70 FORMAT(5X, 'Above is a root, INFO() = ', 2I3) - ENDIF -C - IF (IER .EQ. 0) THEN - TOUT = TOUT * 10.0D0 - JOUT = JOUT + 1 - ENDIF -C - ENDDO -C - CALL FCVDKY(T, 1, Y, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - 80 FORMAT(///' SUNDIALS_ERROR: FCVDKY returned IER = ', I4) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,85) Y(1), Y(2), Y(3) - 85 FORMAT(/'Final value of ydot = ', 3E14.6) -C - WRITE(6,90) IOUT(LNST), IOUT(LNFE), IOUT(LNJE), IOUT(LNSETUP), - 1 IOUT(LNNI), IOUT(LNCF), IOUT(LNETF), IOUT(LNGE) - 90 FORMAT(//'Final statistics:'// - 1 ' No. steps = ', I4, ' No. f-s = ', I4, - 2 ' No. J-s = ', I4, ' No. LU-s = ', I4/ - 3 ' No. nonlinear iterations = ', I4/ - 4 ' No. nonlinear convergence failures = ', I4/ - 5 ' No. error test failures = ', I4/ - 6 ' No. root function evals = ', I4) -C - CALL FCVROOTFREE - CALL FCVFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Fortran routine for right-hand side function - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - YDOT(1) = -0.04D0 * Y(1) + 1.0D4 * Y(2) * Y(3) - YDOT(3) = 3.0D7 * Y(2) * Y(2) - YDOT(2) = -YDOT(1) - YDOT(3) -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVROOTFN(T, Y, G, IPAR, RPAR, IER) -C Fortran routine for root finding - IMPLICIT NONE -C - DOUBLE PRECISION T, Y(*), G(*), RPAR(*) -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER -C - G(1) = Y(1) - 1.0D-4 - G(2) = Y(3) - 1.0D-2 -C - IER = 0 - - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVDJAC(N, T, Y, FY, JAC, H, IPAR, RPAR, - 1 V1, V2, V3, IER) -C Fortran routine for dense user-supplied Jacobian - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 N, IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), FY(*), JAC(N,*), H, RPAR(*) - DOUBLE PRECISION V1(*), V2(*), V3(*) -C - DOUBLE PRECISION Y1, Y2, Y3 -C - Y1 = Y(1) - Y2 = Y(2) - Y3 = Y(3) - JAC(1,1) = -0.04D0 - JAC(1,2) = 1.0D4 * Y3 - JAC(1,3) = 1.0D4 * Y2 - JAC(2,1) = 0.04D0 - JAC(2,2) = -1.0D4 * Y3 - 6.0D7 * Y2 - JAC(2,3) = -1.0D4 * Y2 - JAC(3,3) = 0.0D0 - JAC(3,2) = 6.0D7 * Y2 - JAC(3,3) = 0.0D0 -C - IER = 0 -C - RETURN - END diff --git a/examples/cvode/fcmix_serial/fcvRoberts_dnsL.out b/examples/cvode/fcmix_serial/fcvRoberts_dnsL.out deleted file mode 100644 index 22d163cf9f..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_dnsL.out +++ /dev/null @@ -1,32 +0,0 @@ -Dense example problem: - - Robertson kinetics, NEQ = 3 - - -At t = 0.2639E+00 y = 0.989965E+00 0.347056E-04 0.100000E-01 - Above is a root, INFO() = 0 1 -At t = 0.4000E+00 y = 0.985164E+00 0.338624E-04 0.148020E-01 -At t = 0.4000E+01 y = 0.905510E+00 0.224034E-04 0.944679E-01 -At t = 0.4000E+02 y = 0.715802E+00 0.918504E-05 0.284189E+00 -At t = 0.4000E+03 y = 0.450536E+00 0.322327E-05 0.549461E+00 -At t = 0.4000E+04 y = 0.183230E+00 0.894438E-06 0.816769E+00 -At t = 0.4000E+05 y = 0.389890E-01 0.162201E-06 0.961011E+00 -At t = 0.4000E+06 y = 0.493638E-02 0.198422E-07 0.995064E+00 -At t = 0.4000E+07 y = 0.516809E-03 0.206829E-08 0.999483E+00 -At t = 0.2079E+08 y = 0.100000E-03 0.400040E-09 0.999900E+00 - Above is a root, INFO() = -1 0 -At t = 0.4000E+08 y = 0.520244E-04 0.208108E-09 0.999948E+00 -At t = 0.4000E+09 y = 0.520106E-05 0.208044E-10 0.999995E+00 -At t = 0.4000E+10 y = 0.525860E-06 0.210344E-11 0.999999E+00 -At t = 0.4000E+11 y = 0.693451E-07 0.277380E-12 0.100000E+01 - -Final value of ydot = -0.276733E-18 -0.110693E-23 0.276734E-18 - - -Final statistics: - - No. steps = 542 No. f-s = 754 No. J-s = 11 No. LU-s = 107 - No. nonlinear iterations = 751 - No. nonlinear convergence failures = 0 - No. error test failures = 22 - No. root function evals = 570 diff --git a/examples/cvode/fcmix_serial/fcvRoberts_dns_constraints.f b/examples/cvode/fcmix_serial/fcvRoberts_dns_constraints.f deleted file mode 100644 index 7b4073971b..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_dns_constraints.f +++ /dev/null @@ -1,288 +0,0 @@ -C -------------------------------------------------------------------- -C Programmer(s): Jimmy Almgren-Bell @ LLNL -C Based on prior version by: Scott D. Cohen, Alan C. Hindmarsh and -C Radu Serban @ LLNL -C -------------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C -------------------------------------------------------------------- -C FCVODE Example Problem: Robertson kinetics, direct linear solver -C with dense user Jacobian. -C -C The following is a simple example problem, with the coding -C needed for its solution by CVODE. The problem is from chemical -C kinetics, and consists of the following three rate equations: -C -C dy1/dt = -.04*y1 + 1.e4*y2*y3 -C dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2 -C dy3/dt = 3.e7*y2**2 -C -C on the interval from t = 0.0 to t = 4.e10, with initial -C conditions: -C -C y1 = 1.0, y2 = y3 = 0. -C -C The problem is stiff. While integrating the system, we also -C enable the root finding feature to find the points at which -C y1 = 1.e-4 or at which y3 = 0.01. The following coding solves -C this problem with CVODE, using the Fortran/C interface routine -C package. This solution uses the BDF method and a user-supplied -C Jacobian routine, and prints results at t = .4, 4., ..., 4.e10. -C It uses ITOL = 2 and ATOL much smaller for y2 than y1 or y3 -C because y2 has much smaller values. The constraint y_i >= 0 -C is posed for all components. At the end of the run, -C various counters of interest are printed. -C -------------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 IER, LNST, LNFE, LNSETUP, LNNI, LNCF, LNETF, LNJE, LNGE - INTEGER*4 METH, ITOL, ITASK, JOUT, NOUT, IERROOT - INTEGER*4 INFO(2) - INTEGER*4 I - DOUBLE PRECISION CONSTR(3) -C The following declaration specification should match C type long int - INTEGER*8 NEQ, IPAR, IOUT(25) - DOUBLE PRECISION RTOL, T, T0, TOUT - DOUBLE PRECISION Y(3), ATOL(3), ROUT(10), RPAR -C - DATA LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, LNNI/7/, LNSETUP/8/, - 1 LNGE/12/, LNJE/17/ -C - NEQ = 3 - T0 = 0.0D0 - Y(1) = 1.0D0 - Y(2) = 0.0D0 - Y(3) = 0.0D0 - METH = 2 - ITOL = 2 - RTOL = 1.0D-4 - ATOL(1) = 1.0D-6 - ATOL(2) = 1.0D-11 - ATOL(3) = 1.0D-5 - TOUT = 0.4D0 - ITASK = 1 - JOUT = 0 - NOUT = 12 - CONSTR(1) = 1.0D0 - CONSTR(2) = 1.0D0 - CONSTR(3) = 1.0D0 -C - WRITE(6,10) NEQ - 10 FORMAT('Dense example problem:'// - 1 ' Robertson kinetics, NEQ = ', I2//) - -C create serial vector - CALL FNVINITS(1, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF - -C initialize dense matrix module - CALL FSUNDENSEMATINIT(1, NEQ, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNDENSEMATINIT returned IER = ', - 1 I5) - STOP - ENDIF - -C initialize dense linear solver module - CALL FSUNDENSELINSOLINIT(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,28) IER - 28 FORMAT(///' SUNDIALS_ERROR: FSUNDENSELINSOLINIT returned IER = ' - 1 , I5) - STOP - ENDIF - -C Call FCVMALLOC to create the solver memory and specify the -C Backward Differentiation Formula - CALL FCVMALLOC(T0, Y, METH, ITOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - STOP - ENDIF - -C Call FCVROOTINIT to specify the root function g with 2 components - CALL FCVROOTINIT(2, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FCVROOTINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C attach the matrix and linear solver modules to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C indicate a dense Jacobian function is provided - CALL FCVDENSESETJAC(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FCVDENSESETJAC returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C initialize constraints - CALL FCVSETVIN("CONSTR_VEC", CONSTR, IER) - IF (IER .NE. 0) THEN - WRITE(6,50) IER - 50 FORMAT(///' SUNDIALS_ERROR: FCVSETVIN return IER = ', I5) - CALL FCVFREE - STOP - ENDIF - - DO WHILE(JOUT .LT. NOUT) -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - WRITE(6,55) T, Y(1), Y(2), Y(3) - 55 FORMAT('At t = ', E12.4, ' y = ', 3E14.6) -C - IF (IER .LT. 0) THEN - WRITE(6,65) IER, IOUT(15) - 65 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF -C - IF (IER .EQ. 2) THEN - CALL FCVROOTINFO(2, INFO, IERROOT) - IF (IERROOT .LT. 0) THEN - WRITE(6,70) IERROOT - 70 FORMAT(///' SUNDIALS_ERROR: FCVROOTINFO returned IER = ', - 1 I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,75) (INFO(I), I = 1, 2) - 75 FORMAT(5X, 'Above is a root, INFO() = ', 2I3) - ENDIF -C - IF (IER .EQ. 0) THEN - TOUT = TOUT * 10.0D0 - JOUT = JOUT + 1 - ENDIF -C - ENDDO -C - CALL FCVDKY(T, 1, Y, IER) - IF (IER .NE. 0) THEN - WRITE(6,85) IER - 85 FORMAT(///' SUNDIALS_ERROR: FCVDKY returned IER = ', I4) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,90) Y(1), Y(2), Y(3) - 90 FORMAT(/'Final value of ydot = ', 3E14.6) -C - WRITE(6,95) IOUT(LNST), IOUT(LNFE), IOUT(LNJE), IOUT(LNSETUP), - 1 IOUT(LNNI), IOUT(LNCF), IOUT(LNETF), IOUT(LNGE) - 95 FORMAT(//'Final statistics:'// - 1 ' No. steps = ', I4, ' No. f-s = ', I4, - 2 ' No. J-s = ', I4, ' No. LU-s = ', I4/ - 3 ' No. nonlinear iterations = ', I4/ - 4 ' No. nonlinear convergence failures = ', I4/ - 5 ' No. error test failures = ', I4/ - 6 ' No. root function evals = ', I4) -C - CALL FCVROOTFREE - CALL FCVFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Fortran routine for right-hand side function - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - YDOT(1) = -0.04D0 * Y(1) + 1.0D4 * Y(2) * Y(3) - YDOT(3) = 3.0D7 * Y(2) * Y(2) - YDOT(2) = -YDOT(1) - YDOT(3) -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVROOTFN(T, Y, G, IPAR, RPAR, IER) -C Fortran routine for root finding - IMPLICIT NONE -C - DOUBLE PRECISION T, Y(*), G(*), RPAR(*) -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER -C - G(1) = Y(1) - 1.0D-4 - G(2) = Y(3) - 1.0D-2 -C - IER = 0 - - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVDJAC(N, T, Y, FY, JAC, H, IPAR, RPAR, - 1 V1, V2, V3, IER) -C Fortran routine for dense user-supplied Jacobian - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 N, IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), FY(*), JAC(N,*), H, RPAR(*) - DOUBLE PRECISION V1(*), V2(*), V3(*) -C - DOUBLE PRECISION Y1, Y2, Y3 -C - Y1 = Y(1) - Y2 = Y(2) - Y3 = Y(3) - JAC(1,1) = -0.04D0 - JAC(1,2) = 1.0D4 * Y3 - JAC(1,3) = 1.0D4 * Y2 - JAC(2,1) = 0.04D0 - JAC(2,2) = -1.0D4 * Y3 - 6.0D7 * Y2 - JAC(2,3) = -1.0D4 * Y2 - JAC(3,3) = 0.0D0 - JAC(3,2) = 6.0D7 * Y2 - JAC(3,3) = 0.0D0 -C - IER = 0 -C - RETURN - END diff --git a/examples/cvode/fcmix_serial/fcvRoberts_dns_constraints.out b/examples/cvode/fcmix_serial/fcvRoberts_dns_constraints.out deleted file mode 100644 index fc19df9cd5..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_dns_constraints.out +++ /dev/null @@ -1,32 +0,0 @@ -Dense example problem: - - Robertson kinetics, NEQ = 3 - - -At t = 0.2639E+00 y = 0.989965E+00 0.347056E-04 0.100000E-01 - Above is a root, INFO() = 0 1 -At t = 0.4000E+00 y = 0.985165E+00 0.338627E-04 0.148011E-01 -At t = 0.4000E+01 y = 0.905528E+00 0.224062E-04 0.944493E-01 -At t = 0.4000E+02 y = 0.715866E+00 0.918722E-05 0.284125E+00 -At t = 0.4000E+03 y = 0.450547E+00 0.322302E-05 0.549450E+00 -At t = 0.4000E+04 y = 0.183226E+00 0.894390E-06 0.816773E+00 -At t = 0.4000E+05 y = 0.389863E-01 0.162191E-06 0.961014E+00 -At t = 0.4000E+06 y = 0.493403E-02 0.198330E-07 0.995066E+00 -At t = 0.4000E+07 y = 0.516524E-03 0.206719E-08 0.999483E+00 -At t = 0.1980E+08 y = 0.100000E-03 0.400071E-09 0.999900E+00 - Above is a root, INFO() = -1 0 -At t = 0.4000E+08 y = 0.477176E-04 0.190880E-09 0.999952E+00 -At t = 0.4000E+09 y = 0.360970E-05 0.144391E-10 0.999996E+00 -At t = 0.4000E+10 y = 0.889920E-06 0.355968E-11 0.999999E+00 -At t = 0.4000E+11 y = 0.635210E-07 0.254084E-12 0.100000E+01 - -Final value of ydot = -0.115031E-17 -0.460125E-23 0.272393E-17 - - -Final statistics: - - No. steps = 399 No. f-s = 567 No. J-s = 12 No. LU-s = 98 - No. nonlinear iterations = 564 - No. nonlinear convergence failures = 2 - No. error test failures = 15 - No. root function evals = 429 diff --git a/examples/cvode/fcmix_serial/fcvRoberts_klu.f b/examples/cvode/fcmix_serial/fcvRoberts_klu.f deleted file mode 100644 index de37f6a2c4..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_klu.f +++ /dev/null @@ -1,345 +0,0 @@ -C ---------------------------------------------------------------- -C Programmer(s): Ting Yan @ SMU -C Based on cvRoberts_klu.c and modified to Fortran 77 -C ---------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C ---------------------------------------------------------------- -C FCVODE Example Problem: Robertson kinetics -C -C The following is a simple example problem, with the coding -C needed for its solution by CVODE. The problem is from chemical -C kinetics, and consists of the following three rate equations: -C -C dy1/dt = -.04*y1 + 1.e4*y2*y3 -C dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2 -C dy3/dt = 3.e7*y2**2 -C -C on the interval from t = 0.0 to t = 4.e10, with initial -C conditions: -C -C y1 = 1.0, y2 = y3 = 0. -C -C The problem is stiff. While integrating the system, we also -C enable the root finding feature to find the points at which -C y1 = 1.e-4 or at which y3 = 0.01. The following coding solves -C this problem with CVODE, using the Fortran/C interface routine -C package. This solution uses the BDF method, Newton iteration with -C the the KLU sparse direct linear solver, and a user-supplied -C Jacobian routine. -C It uses a scalar relative tolerance and a vector absolute -C tolerance. Output is printed in decades from t = .4 to t = 4.e10. -C Run statistics (optional outputs) are printed at the end. -C ---------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 IER, LNST, LNFE, LNSETUP, LNNI, LNCF, LNETF, LNJE, LNGE - INTEGER*4 METH, ITOL, ITASK, JOUT, NOUT, IERROOT - INTEGER*4 INFO(2) - INTEGER*4 I -C The following declaration specification should match C type long int - INTEGER*8 NEQ, IPAR, IOUT(22), IVAL, MXNLI, MXETF, NNZ - INTEGER*4 SPARSETYPE - DOUBLE PRECISION RTOL, T, T0, TOUT, H0, NLCONV - DOUBLE PRECISION Y(3), ATOL(3), ROUT(6), RPAR -C - DATA LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, LNNI/7/, LNSETUP/8/, - 1 LNGE/12/, LNJE/17/ -C -C Problem constants -C number of equations - NEQ = 3 -C initial time - T0 = 0.0D0 -C initial y components - Y(1) = 1.0D0 - Y(2) = 0.0D0 - Y(3) = 0.0D0 -C basic integration method, 2 for BDF - METH = 2 -C type for absolute tolerance, 2 for array - ITOL = 2 -C scalar relative tolerance - RTOL = 1.0D-4 -C vector absolute tolerance components - ATOL(1) = 1.0D-6 - ATOL(2) = 1.0D-12 - ATOL(3) = 1.0D-4 -C first output time - TOUT = 0.4D0 -C call CVODE in normal mode - ITASK = 1 - JOUT = 0 -C number of output times - NOUT = 12 -C - WRITE(6, 10) NEQ - 10 FORMAT('Klu example problem:'// - 1 ' Robertson kinetics, NEQ = ', I2//) - -C create serial vector - CALL FNVINITS(1, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF - -C initialize sparse matrix module -C maximum number of nonzeros in the sparse Jac - NNZ = NEQ * NEQ -C CSC - SPARSETYPE = 0 - CALL FSUNSPARSEMATINIT(1, NEQ, NEQ, NNZ, SPARSETYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNSPARSEMATINIT returned IER = ', - 1 I5) - STOP - ENDIF - -C initialize KLU sparse direct linear solver module - CALL FSUNKLUINIT(1, IER) - IF (IER .NE. 0) THEN - WRITE(6,28) IER - 28 FORMAT(///' SUNDIALS_ERROR: FSUNKLUINIT returned IER = ', I5) - STOP - ENDIF - -C Call FCVMALLOC to create the solver memory and specify the -C Backward Differentiation Formula - CALL FCVMALLOC(T0, Y, METH, ITOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - STOP - ENDIF - -C Set the FCVODE input -C max no. of internal steps before t_out - IVAL = 1000 - CALL FCVSETIIN('MAX_NSTEPS', IVAL, IER) - IF (IER .NE. 0) THEN - WRITE(6,31) IER - 31 FORMAT(///' SUNDIALS_ERROR: FCVSETIIN returned IER = ', I5) - STOP - ENDIF - -C max no. of error test failures - MXETF = 20 - CALL FCVSETIIN('MAX_ERRFAIL', MXETF, IER) - IF (IER .NE. 0) THEN - WRITE(6,31) IER - STOP - ENDIF - -C initial step size - H0 = 1.0D-4 * RTOL - CALL FCVSETRIN('INIT_STEP', H0, IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - 32 FORMAT(///' SUNDIALS_ERROR: FCVSETRIN returned IER = ', I5) - STOP - ENDIF - -C coefficient in the nonlinear convergence test - NLCONV = 1.0D-4 - CALL FCVSETRIN('NLCONV_COEF', NLCONV, IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - STOP - ENDIF - -C Call FCVROOTINIT to specify the root function g with 2 components - CALL FCVROOTINIT(2, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FCVROOTINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C attach the matrix and linear solver modules to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C indicate a sparse Jacobian function is provided - CALL FCVSPARSESETJAC(IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FCVSPARSESETJAC returned IER = ', - 1 I5) - CALL FCVFREE - STOP - ENDIF - -C In loop, call FCVODE, print results, and test for error. - DO WHILE(JOUT .LT. NOUT) -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - WRITE(6,50) T, Y(1), Y(2), Y(3) - 50 FORMAT('At t = ', E12.4, ' y = ', 3E14.6) -C - IF (IER .LT. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF -C - IF (IER .EQ. 2) THEN - CALL FCVROOTINFO(2, INFO, IERROOT) - IF (IERROOT .LT. 0) THEN - WRITE(6,65) IERROOT - 65 FORMAT(///' SUNDIALS_ERROR: FCVROOTINFO returned IER = ', - 1 I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,70) (INFO(I), I = 1, 2) - 70 FORMAT(5X, 'Above is a root, INFO() = ', 2I3) - ENDIF -C - IF (IER .EQ. 0) THEN - TOUT = TOUT * 10.0D0 - JOUT = JOUT + 1 - ENDIF -C - ENDDO - -C obtain a derivative of the solution - CALL FCVDKY(T, 1, Y, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - 80 FORMAT(///' SUNDIALS_ERROR: FCVDKY returned IER = ', I4) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,85) Y(1), Y(2), Y(3) - 85 FORMAT(/'Final value of ydot = ', 3E14.6) - -C output run statistics - WRITE(6,90) IOUT(LNST), IOUT(LNFE), IOUT(LNJE), IOUT(LNSETUP), - 1 IOUT(LNNI), IOUT(LNCF), IOUT(LNETF), IOUT(LNGE) - 90 FORMAT(//'Final statistics:'// - 1 ' No. steps = ', I4, ' No. f-s = ', I4, - 2 ' No. J-s = ', I4, ' No. LU-s = ', I4/ - 3 ' No. nonlinear iterations = ', I4/ - 4 ' No. nonlinear convergence failures = ', I4/ - 5 ' No. error test failures = ', I4/ - 6 ' No. root function evals = ', I4) -C - CALL FCVROOTFREE - CALL FCVFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Fortran routine for right-hand side function - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - YDOT(1) = -0.04D0 * Y(1) + 1.0D4 * Y(2) * Y(3) - YDOT(3) = 3.0D7 * Y(2) * Y(2) - YDOT(2) = -YDOT(1) - YDOT(3) -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVROOTFN(T, Y, G, IPAR, RPAR, IER) -C Fortran routine for root finding - IMPLICIT NONE -C - DOUBLE PRECISION T, Y(*), G(*), RPAR(*) -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER -C - G(1) = Y(1) - 1.0D-4 - G(2) = Y(3) - 1.0D-2 -C - IER = 0 - - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVSPJAC(T, Y, FY, N, NNZ, JDATA, JRVALS, - 1 JCPTRS, H, IPAR, RPAR, WK1, WK2, WK3, IER) -C Fortran routine for user-supplied CSC format Jacobian - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 N, NNZ, IPAR(*) - INTEGER*8 JRVALS(NNZ), JCPTRS(N+1) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), FY(*), H, RPAR(*) - DOUBLE PRECISION JDATA(NNZ) - DOUBLE PRECISION WK1(*), WK2(*), WK3(*) -C - DOUBLE PRECISION Y1, Y2, Y3 -C - Y1 = Y(1) - Y2 = Y(2) - Y3 = Y(3) - JCPTRS(1) = 0 - JCPTRS(2) = 3 - JCPTRS(3) = 6 - JCPTRS(4) = 9 - - JDATA(1) = -0.04D0 - JRVALS(1) = 0 - JDATA(2) = 0.04D0 - JRVALS(2) = 1 - JDATA(3) = 0.0D0 - JRVALS(3) = 2 - - JDATA(4) = 1.0D4 * Y3 - JRVALS(4) = 0 - JDATA(5) = -1.0D4 * Y3 - 6.0D7 * Y2 - JRVALS(5) = 1 - JDATA(6) = 6.0D7 * Y2 - JRVALS(6) = 2 - - JDATA(7) = 1.0D4 * Y2 - JRVALS(7) = 0 - JDATA(8) = -1.0D4 * Y2 - JRVALS(8) = 1 - JDATA(9) = 0.0D0 - JRVALS(9) = 2 -C - IER = 0 -C - RETURN - END diff --git a/examples/cvode/fcmix_serial/fcvRoberts_klu.out b/examples/cvode/fcmix_serial/fcvRoberts_klu.out deleted file mode 100644 index ce95e335aa..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_klu.out +++ /dev/null @@ -1,32 +0,0 @@ -Klu example problem: - - Robertson kinetics, NEQ = 3 - - -At t = 0.2636E+00 y = 0.989965E+00 0.347052E-04 0.100000E-01 - Above is a root, INFO() = 0 1 -At t = 0.4000E+00 y = 0.985144E+00 0.338588E-04 0.148222E-01 -At t = 0.4000E+01 y = 0.905426E+00 0.223942E-04 0.945515E-01 -At t = 0.4000E+02 y = 0.715830E+00 0.918572E-05 0.284160E+00 -At t = 0.4000E+03 y = 0.450560E+00 0.322342E-05 0.549437E+00 -At t = 0.4000E+04 y = 0.183240E+00 0.894461E-06 0.816759E+00 -At t = 0.4000E+05 y = 0.389806E-01 0.162165E-06 0.961019E+00 -At t = 0.4000E+06 y = 0.493776E-02 0.198479E-07 0.995062E+00 -At t = 0.4000E+07 y = 0.515949E-03 0.206485E-08 0.999484E+00 -At t = 0.2082E+08 y = 0.100000E-03 0.400040E-09 0.999900E+00 - Above is a root, INFO() = -1 0 -At t = 0.4000E+08 y = 0.514789E-04 0.205926E-09 0.999949E+00 -At t = 0.4000E+09 y = 0.542638E-05 0.217056E-10 0.999995E+00 -At t = 0.4000E+10 y = 0.464797E-06 0.185919E-11 0.100000E+01 -At t = 0.4000E+11 y = 0.486207E-07 0.194483E-12 0.100000E+01 - -Final value of ydot = -0.876832E-18 -0.350733E-23 0.876835E-18 - - -Final statistics: - - No. steps = 317 No. f-s = 941 No. J-s = 40 No. LU-s = 117 - No. nonlinear iterations = 940 - No. nonlinear convergence failures = 2 - No. error test failures = 11 - No. root function evals = 356 diff --git a/examples/cvode/fcmix_serial/fcvRoberts_sps.f b/examples/cvode/fcmix_serial/fcvRoberts_sps.f deleted file mode 100644 index e2a9818d5a..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_sps.f +++ /dev/null @@ -1,355 +0,0 @@ -C ---------------------------------------------------------------- -C Programmer(s): Ting Yan @ SMU -C Based on cvRoberts_sps.c and modified to Fortran 77 -C ---------------------------------------------------------------- -C SUNDIALS Copyright Start -C Copyright (c) 2002-2023, Lawrence Livermore National Security -C and Southern Methodist University. -C All rights reserved. -C -C See the top-level LICENSE and NOTICE files for details. -C -C SPDX-License-Identifier: BSD-3-Clause -C SUNDIALS Copyright End -C ---------------------------------------------------------------- -C FCVODE Example Problem: Robertson kinetics -C -C The following is a simple example problem, with the coding -C needed for its solution by CVODE. The problem is from chemical -C kinetics, and consists of the following three rate equations: -C -C dy1/dt = -.04*y1 + 1.e4*y2*y3 -C dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2 -C dy3/dt = 3.e7*y2**2 -C -C on the interval from t = 0.0 to t = 4.e10, with initial -C conditions: -C -C y1 = 1.0, y2 = y3 = 0. -C -C The problem is stiff. While integrating the system, we also -C enable the root finding feature to find the points at which -C y1 = 1.e-4 or at which y3 = 0.01. The following coding solves -C this problem with CVODE, using the Fortran/C interface routine -C package. This solution uses the BDF method, Newton iteration with -C the the SUPERLUMT sparse direct linear solver, and a user-supplied -C Jacobian routine. -C It uses a scalar relative tolerance and a vector absolute -C tolerance. Output is printed in decades from t = .4 to t = 4.e10. -C Run statistics (optional outputs) are printed at the end. -C ---------------------------------------------------------------- -C - IMPLICIT NONE -C - INTEGER*4 IER, LNST, LNFE, LNSETUP, LNNI, LNCF, LNETF, LNJE, LNGE - INTEGER*4 METH, ITOL, ITASK, JOUT, NOUT, IERROOT - INTEGER*4 INFO(2) - INTEGER*4 I -C The following declaration specification should match C type long int - INTEGER*8 NEQ, IPAR, IOUT(25), IVAL, MXNLI, MXETF, NNZ - INTEGER*4 SPARSETYPE, NTHREADS - DOUBLE PRECISION RTOL, T, T0, TOUT, H0, NLCONV - DOUBLE PRECISION Y(3), ATOL(3), ROUT(10), RPAR -C - DATA LNST/3/, LNFE/4/, LNETF/5/, LNCF/6/, LNNI/7/, LNSETUP/8/, - 1 LNGE/12/, LNJE/17/ -C -C Problem constants -C number of equations - NEQ = 3 -C initial time - T0 = 0.0D0 -C initial y components - Y(1) = 1.0D0 - Y(2) = 0.0D0 - Y(3) = 0.0D0 -C basic integration method, 2 for BDF - METH = 2 -C type for absolute tolerance, 2 for array - ITOL = 2 -C scalar relative tolerance - RTOL = 1.0D-4 -C vector absolute tolerance components - ATOL(1) = 1.0D-8 - ATOL(2) = 1.0D-14 - ATOL(3) = 1.0D-6 -C first output time - TOUT = 0.4D0 -C call CVODE in normal mode - ITASK = 1 - JOUT = 0 -C number of output times - NOUT = 12 -C - WRITE(6, 10) NEQ - 10 FORMAT('Superlu_mt example problem:'// - 1 ' Robertson kinetics, NEQ = ', I2//) - -C create serial vector - CALL FNVINITS(1, NEQ, IER) - IF (IER .NE. 0) THEN - WRITE(6,20) IER - 20 FORMAT(///' SUNDIALS_ERROR: FNVINITS returned IER = ', I5) - STOP - ENDIF - -C initialize sparse matrix module -C maximum number of nonzeros in the sparse Jac - NNZ = NEQ * NEQ -C CSC - SPARSETYPE = 0 - CALL FSUNSPARSEMATINIT(1, NEQ, NEQ, NNZ, SPARSETYPE, IER) - IF (IER .NE. 0) THEN - WRITE(6,25) IER - 25 FORMAT(///' SUNDIALS_ERROR: FSUNSPARSEMATINIT returned IER = ', - 1 I5) - STOP - ENDIF - -C initialize KLU sparse direct linear solver module -C number of threads to use in factorization - NTHREADS = 1 - CALL FSUNSUPERLUMTINIT(1, NTHREADS, IER) - IF (IER .NE. 0) THEN - WRITE(6,28) IER - 28 FORMAT(///' SUNDIALS_ERROR: FSUNKLUINIT returned IER = ', I5) - STOP - ENDIF - -C Call FCVMALLOC to create the solver memory and specify the -C Backward Differentiation Formula - CALL FCVMALLOC(T0, Y, METH, ITOL, RTOL, ATOL, - 1 IOUT, ROUT, IPAR, RPAR, IER) - IF (IER .NE. 0) THEN - WRITE(6,30) IER - 30 FORMAT(///' SUNDIALS_ERROR: FCVMALLOC returned IER = ', I5) - STOP - ENDIF - -C Set the FCVODE input -C max no. of internal steps before t_out - IVAL = 900000 - CALL FCVSETIIN('MAX_NSTEPS', IVAL, IER) - IF (IER .NE. 0) THEN - WRITE(6,31) IER - 31 FORMAT(///' SUNDIALS_ERROR: FCVSETIIN returned IER = ', I5) - STOP - ENDIF - -C max no. of iterations - MXNLI = 8 - CALL FCVSETIIN('MAX_NITERS', MXNLI, IER) - IF (IER .NE. 0) THEN - WRITE(6, 31) IER - STOP - ENDIF - -C max no. of error test failures - MXETF = 20 - CALL FCVSETIIN('MAX_ERRFAIL', MXETF, IER) - IF (IER .NE. 0) THEN - WRITE(6,31) IER - STOP - ENDIF - -C initial step size - H0 = 1.0D-4 * RTOL - CALL FCVSETRIN('INIT_STEP', H0, IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - 32 FORMAT(///' SUNDIALS_ERROR: FCVSETRIN returned IER = ', I5) - STOP - ENDIF - -C coefficient in the nonlinear convergence test - NLCONV = 1.0D-7 - CALL FCVSETRIN('NLCONV_COEF', NLCONV, IER) - IF (IER .NE. 0) THEN - WRITE(6,32) IER - STOP - ENDIF - -C Call FCVROOTINIT to specify the root function g with 2 components - CALL FCVROOTINIT(2, IER) - IF (IER .NE. 0) THEN - WRITE(6,35) IER - 35 FORMAT(///' SUNDIALS_ERROR: FCVROOTINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C attach the matrix and linear solver modules to CVLs interface - CALL FCVLSINIT(IER) - IF (IER .NE. 0) THEN - WRITE(6,40) IER - 40 FORMAT(///' SUNDIALS_ERROR: FCVLSINIT returned IER = ', I5) - CALL FCVFREE - STOP - ENDIF - -C indicate a sparse Jacobian function is provided - CALL FCVSPARSESETJAC(IER) - IF (IER .NE. 0) THEN - WRITE(6,45) IER - 45 FORMAT(///' SUNDIALS_ERROR: FCVSPARSESETJAC returned IER = ', - 1 I5) - CALL FCVFREE - STOP - ENDIF - -C In loop, call FCVODE, print results, and test for error. - DO WHILE(JOUT .LT. NOUT) -C - CALL FCVODE(TOUT, T, Y, ITASK, IER) -C - WRITE(6,50) T, Y(1), Y(2), Y(3) - 50 FORMAT('At t = ', E12.4, ' y = ', 3E14.6) -C - IF (IER .LT. 0) THEN - WRITE(6,60) IER, IOUT(15) - 60 FORMAT(///' SUNDIALS_ERROR: FCVODE returned IER = ', I5, /, - 1 ' Linear Solver returned IER = ', I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF -C - IF (IER .EQ. 2) THEN - CALL FCVROOTINFO(2, INFO, IERROOT) - IF (IERROOT .LT. 0) THEN - WRITE(6,65) IERROOT - 65 FORMAT(///' SUNDIALS_ERROR: FCVROOTINFO returned IER = ', - 1 I5) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,70) (INFO(I), I = 1, 2) - 70 FORMAT(5X, 'Above is a root, INFO() = ', 2I3) - ENDIF -C - IF (IER .EQ. 0) THEN - TOUT = TOUT * 10.0D0 - JOUT = JOUT + 1 - ENDIF -C - ENDDO - -C obtain a derivative of the solution - CALL FCVDKY(T, 1, Y, IER) - IF (IER .NE. 0) THEN - WRITE(6,80) IER - 80 FORMAT(///' SUNDIALS_ERROR: FCVDKY returned IER = ', I4) - CALL FCVROOTFREE - CALL FCVFREE - STOP - ENDIF - WRITE(6,85) Y(1), Y(2), Y(3) - 85 FORMAT(/'Final value of ydot = ', 3E14.6) - -C output run statistics - WRITE(6,90) IOUT(LNST), IOUT(LNFE), IOUT(LNJE), IOUT(LNSETUP), - 1 IOUT(LNNI), IOUT(LNCF), IOUT(LNETF), IOUT(LNGE) - 90 FORMAT(//'Final statistics:'// - 1 ' No. steps = ', I4, ' No. f-s = ', I4, - 2 ' No. J-s = ', I4, ' No. LU-s = ', I4/ - 3 ' No. nonlinear iterations = ', I4/ - 4 ' No. nonlinear convergence failures = ', I4/ - 5 ' No. error test failures = ', I4/ - 6 ' No. root function evals = ', I4) -C - CALL FCVROOTFREE - CALL FCVFREE -C - STOP - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVFUN(T, Y, YDOT, IPAR, RPAR, IER) -C Fortran routine for right-hand side function - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), YDOT(*), RPAR(*) -C - YDOT(1) = -0.04D0 * Y(1) + 1.0D4 * Y(2) * Y(3) - YDOT(3) = 3.0D7 * Y(2) * Y(2) - YDOT(2) = -YDOT(1) - YDOT(3) -C - IER = 0 -C - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVROOTFN(T, Y, G, IPAR, RPAR, IER) -C Fortran routine for root finding - IMPLICIT NONE -C - DOUBLE PRECISION T, Y(*), G(*), RPAR(*) -C The following declaration specification should match C type long int - INTEGER*8 IPAR(*) - INTEGER*4 IER -C - G(1) = Y(1) - 1.0D-4 - G(2) = Y(3) - 1.0D-2 -C - IER = 0 - - RETURN - END - -C ---------------------------------------------------------------- - - SUBROUTINE FCVSPJAC(T, Y, FY, N, NNZ, JDATA, JRVALS, - 1 JCPTRS, H, IPAR, RPAR, WK1, WK2, WK3, IER) -C Fortran routine for user-supplied CSC format Jacobian - IMPLICIT NONE -C -C The following declaration specification should match C type long int - INTEGER*8 N, NNZ, IPAR(*) - INTEGER*8 JRVALS(NNZ), JCPTRS(N+1) - INTEGER*4 IER - DOUBLE PRECISION T, Y(*), FY(*), H, RPAR(*) - DOUBLE PRECISION JDATA(NNZ) - DOUBLE PRECISION WK1(*), WK2(*), WK3(*) -C - DOUBLE PRECISION Y1, Y2, Y3 -C - Y1 = Y(1) - Y2 = Y(2) - Y3 = Y(3) - JCPTRS(1) = 0 - JCPTRS(2) = 3 - JCPTRS(3) = 6 - JCPTRS(4) = 9 - - JDATA(1) = -0.04D0 - JRVALS(1) = 0 - JDATA(2) = 0.04D0 - JRVALS(2) = 1 - JDATA(3) = 0.0D0 - JRVALS(3) = 2 - - JDATA(4) = 1.0D4 * Y3 - JRVALS(4) = 0 - JDATA(5) = -1.0D4 * Y3 - 6.0D7 * Y2 - JRVALS(5) = 1 - JDATA(6) = 6.0D7 * Y2 - JRVALS(6) = 2 - - JDATA(7) = 1.0D4 * Y2 - JRVALS(7) = 0 - JDATA(8) = -1.0D4 * Y2 - JRVALS(8) = 1 - JDATA(9) = 0.0D0 - JRVALS(9) = 2 -C - IER = 0 -C - RETURN - END diff --git a/examples/cvode/fcmix_serial/fcvRoberts_sps.out b/examples/cvode/fcmix_serial/fcvRoberts_sps.out deleted file mode 100644 index 613fe9b2de..0000000000 --- a/examples/cvode/fcmix_serial/fcvRoberts_sps.out +++ /dev/null @@ -1,32 +0,0 @@ -Superlu_mt example problem: - - Robertson kinetics, NEQ = 3 - - -At t = 0.2640E+00 y = 0.989965E+00 0.347056E-04 0.100000E-01 - Above is a root, INFO() = 0 1 -At t = 0.4000E+00 y = 0.985172E+00 0.338640E-04 0.147938E-01 -At t = 0.4000E+01 y = 0.905507E+00 0.224034E-04 0.944710E-01 -At t = 0.4000E+02 y = 0.715840E+00 0.918606E-05 0.284150E+00 -At t = 0.4000E+03 y = 0.450575E+00 0.322362E-05 0.549422E+00 -At t = 0.4000E+04 y = 0.183242E+00 0.894472E-06 0.816757E+00 -At t = 0.4000E+05 y = 0.389931E-01 0.162219E-06 0.961007E+00 -At t = 0.4000E+06 y = 0.493709E-02 0.198451E-07 0.995063E+00 -At t = 0.4000E+07 y = 0.516765E-03 0.206812E-08 0.999483E+00 -At t = 0.2078E+08 y = 0.100000E-03 0.400040E-09 0.999900E+00 - Above is a root, INFO() = -1 0 -At t = 0.4000E+08 y = 0.519865E-04 0.207957E-09 0.999948E+00 -At t = 0.4000E+09 y = 0.519161E-05 0.207666E-10 0.999995E+00 -At t = 0.4000E+10 y = 0.520292E-06 0.208117E-11 0.999999E+00 -At t = 0.4000E+11 y = 0.590048E-07 0.236019E-12 0.100000E+01 - -Final value of ydot = -0.166627E-17 -0.666508E-23 0.166628E-17 - - -Final statistics: - - No. steps = 364 No. f-s = 2056 No. J-s = 18 No. LU-s = 98 - No. nonlinear iterations = 2055 - No. nonlinear convergence failures = 0 - No. error test failures = 13 - No. root function evals = 394 diff --git a/examples/cvode/ginkgo/CMakeLists.txt b/examples/cvode/ginkgo/CMakeLists.txt index c993e377c4..6c876d691c 100644 --- a/examples/cvode/ginkgo/CMakeLists.txt +++ b/examples/cvode/ginkgo/CMakeLists.txt @@ -20,7 +20,7 @@ set(cpu_gpu_examples sundials_add_examples_ginkgo(cpu_gpu_examples TARGETS sundials_cvode - BACKENDS REF OMP CUDA HIP) + BACKENDS REF OMP CUDA HIP DPCPP) # Examples that only support CPU Ginkgo backends set(cpu_examples @@ -39,6 +39,9 @@ if(EXAMPLES_INSTALL) if(SUNDIALS_GINKGO_BACKENDS MATCHES "HIP") list(APPEND vectors nvechip) endif() + if(SUNDIALS_GINKGO_BACKENDS MATCHES "DPCPP") + list(APPEND vectors nvecsycl) + endif() if((SUNDIALS_GINKGO_BACKENDS MATCHES "OMP") OR (SUNDIALS_GINKGO_BACKENDS MATCHES "REF")) list(APPEND vectors nvecserial) diff --git a/examples/cvode/ginkgo/cv_heat2D_ginkgo.DPCPP.out b/examples/cvode/ginkgo/cv_heat2D_ginkgo.DPCPP.out new file mode 100644 index 0000000000..a843e62f28 --- /dev/null +++ b/examples/cvode/ginkgo/cv_heat2D_ginkgo.DPCPP.out @@ -0,0 +1,77 @@ + +2D Heat problem: + ---------------------------- + kx = 1 + ky = 1 + tf = 1 + xu = 1 + yu = 1 + nx = 64 + ny = 64 + dx = 0.015873 + dy = 0.015873 + ---------------------------- + rtol = 0.0001 + atol = 1e-08 + ---------------------------- + lin iters = 20 + eps lin = 0 + ---------------------------- + output = 0 + ---------------------------- + + t ||u||_rms max error + ----------------------------------------------------------------------- + 0.000000000000000e+00 1.273091462283009e+00 0.000000000000000e+00 + 5.000000000000000e-02 1.265953031236337e+00 5.779434661301597e-04 + 1.000000000000000e-01 1.245126467995815e+00 8.596410825743028e-04 + 1.500000000000000e-01 1.212971698816507e+00 1.027071183737238e-03 + 2.000000000000000e-01 1.173149707911348e+00 1.049506292939650e-03 + 2.500000000000000e-01 1.129970993609124e+00 7.767258516966358e-04 + 3.000000000000000e-01 1.088067923761304e+00 3.857233565973672e-04 + 3.500000000000000e-01 1.051569245238569e+00 2.296842605538085e-04 + 4.000000000000000e-01 1.023519508142414e+00 1.160865021105906e-04 + 4.500000000000000e-01 1.005965995289331e+00 3.382124480899584e-05 + 4.999999999999999e-01 9.999934385586851e-01 6.776957530241212e-05 + 5.499999999999999e-01 1.005920028619227e+00 1.074298825753939e-04 + 6.000000000000000e-01 1.023439646225216e+00 1.256532195708093e-04 + 6.500000000000000e-01 1.051474380012092e+00 4.493207354094864e-05 + 7.000000000000001e-01 1.087965937316374e+00 8.048432853913212e-05 + 7.500000000000001e-01 1.129792873621271e+00 2.390181284921411e-04 + 8.000000000000002e-01 1.172918427971992e+00 4.322892993839922e-04 + 8.500000000000002e-01 1.212840417005807e+00 6.887143222911174e-04 + 9.000000000000002e-01 1.245177171528506e+00 9.911108446238881e-04 + 9.500000000000003e-01 1.266240637720725e+00 1.309517693130591e-03 + 1.000000000000000e+00 1.273471195699113e+00 1.189685923645323e-03 + ----------------------------------------------------------------------- + +Final integrator statistics: +Current time = 1 +Steps = 41 +Error test fails = 0 +NLS step fails = 0 +Initial step size = 0.002110117778857815 +Last step size = 0.02437232616233551 +Current step size = 0.02437232616233551 +Last method order = 3 +Current method order = 3 +Stab. lim. order reductions = 0 +RHS fn evals = 52 +NLS iters = 49 +NLS fails = 0 +NLS iters per step = 1.195121951219512 +LS setups = 7 +Jac fn evals = 1 +LS RHS fn evals = 0 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 873 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 0 +LS iters per NLS iter = 17.81632653061224 +Jac evals per NLS iter = 0.02040816326530612 +Prec evals per NLS iter = 0 +Root fn evals = 0 + +Max error = 1.189685923645323e-03 diff --git a/examples/cvode/ginkgo/cv_heat2D_ginkgo.HIP.out b/examples/cvode/ginkgo/cv_heat2D_ginkgo.HIP.out new file mode 100644 index 0000000000..4022dba817 --- /dev/null +++ b/examples/cvode/ginkgo/cv_heat2D_ginkgo.HIP.out @@ -0,0 +1,77 @@ + +2D Heat problem: + ---------------------------- + kx = 1 + ky = 1 + tf = 1 + xu = 1 + yu = 1 + nx = 64 + ny = 64 + dx = 0.015873 + dy = 0.015873 + ---------------------------- + rtol = 0.0001 + atol = 1e-08 + ---------------------------- + lin iters = 20 + eps lin = 0 + ---------------------------- + output = 0 + ---------------------------- + + t ||u||_rms max error + ----------------------------------------------------------------------- + 0.000000000000000e+00 1.273091462283009e+00 0.000000000000000e+00 + 5.000000000000000e-02 1.265953031236678e+00 5.779434664550109e-04 + 1.000000000000000e-01 1.245126468025294e+00 8.596397006188639e-04 + 1.500000000000000e-01 1.212971692633635e+00 1.027175433592653e-03 + 2.000000000000000e-01 1.173149607363054e+00 1.048511182224932e-03 + 2.500000000000000e-01 1.129971118809724e+00 7.777031646749588e-04 + 3.000000000000000e-01 1.088068652479702e+00 3.867786296469777e-04 + 3.500000000000000e-01 1.051569453796381e+00 2.291655197173004e-04 + 4.000000000000000e-01 1.023519691519509e+00 1.152507676536185e-04 + 4.500000000000000e-01 1.005966466128100e+00 3.464712602863074e-05 + 4.999999999999999e-01 9.999941074735683e-01 6.549023902890916e-05 + 5.499999999999999e-01 1.005920139252285e+00 1.085862394125670e-04 + 6.000000000000000e-01 1.023440066617863e+00 1.253667245226797e-04 + 6.500000000000000e-01 1.051474489311814e+00 4.368064039983466e-05 + 7.000000000000001e-01 1.087966430721224e+00 8.251704806849780e-05 + 7.500000000000001e-01 1.129793211633907e+00 2.403035068856418e-04 + 8.000000000000002e-01 1.172918720617323e+00 4.322501964297842e-04 + 8.500000000000002e-01 1.212839862652567e+00 6.883283219258907e-04 + 9.000000000000002e-01 1.245175128903723e+00 9.857170108882318e-04 + 9.500000000000003e-01 1.266235911062742e+00 1.301833676780495e-03 + 1.000000000000000e+00 1.273469281873646e+00 1.183015268845011e-03 + ----------------------------------------------------------------------- + +Final integrator statistics: +Current time = 1 +Steps = 41 +Error test fails = 0 +NLS step fails = 0 +Initial step size = 0.002110117764420172 +Last step size = 0.02782878040979117 +Current step size = 0.02782878040979117 +Last method order = 3 +Current method order = 3 +Stab. lim. order reductions = 0 +RHS fn evals = 52 +NLS iters = 49 +NLS fails = 0 +NLS iters per step = 1.195121951219512 +LS setups = 7 +Jac fn evals = 1 +LS RHS fn evals = 0 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 875 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 0 +LS iters per NLS iter = 17.85714285714286 +Jac evals per NLS iter = 0.02040816326530612 +Prec evals per NLS iter = 0 +Root fn evals = 0 + +Max error = 1.183015268845011e-03 diff --git a/examples/cvode/ginkgo/cv_heat2D_ginkgo.cpp b/examples/cvode/ginkgo/cv_heat2D_ginkgo.cpp index 2671c77934..e979d60459 100644 --- a/examples/cvode/ginkgo/cv_heat2D_ginkgo.cpp +++ b/examples/cvode/ginkgo/cv_heat2D_ginkgo.cpp @@ -38,8 +38,9 @@ * The spatial derivatives are computed using second-order centered differences, * with the data distributed over nx * ny points on a uniform spatial grid. The * problem is advanced in time with BDF methods using an inexact Newton method - * paired with the CG linear solver from Ginkgo. Several command line options are - * available to change the problem parameters and CVODE settings. Use the flag + * paired with the CG linear solver from Ginkgo. Several command line options + * are available to change the problem parameters and CVODE settings. Use the + * flag * --help for more information. * ---------------------------------------------------------------------------*/ @@ -53,19 +54,23 @@ #if defined(USE_CUDA) #include -#define HIP_OR_CUDA(a, b) b +#define HIP_OR_CUDA_OR_SYCL(a, b, c) b constexpr auto N_VNew = N_VNew_Cuda; #elif defined(USE_HIP) #include -#define HIP_OR_CUDA(a, b) a +#define HIP_OR_CUDA_OR_SYCL(a, b, c) a constexpr auto N_VNew = N_VNew_Hip; +#elif defined(USE_DPCPP) +#include +#define HIP_OR_CUDA_OR_SYCL(a, b, c) c +constexpr auto N_VNew = N_VNew_Sycl; #elif defined(USE_OMP) #include -#define HIP_OR_CUDA(a, b) +#define HIP_OR_CUDA_OR_SYCL(a, b, c) constexpr auto N_VNew = N_VNew_Serial; #else #include -#define HIP_OR_CUDA(a, b) +#define HIP_OR_CUDA_OR_SYCL(a, b, c) constexpr auto N_VNew = N_VNew_Serial; #endif @@ -73,7 +78,8 @@ using GkoMatrixType = gko::matrix::Csr; using GkoSolverType = gko::solver::Cg; using SUNGkoMatrixType = sundials::ginkgo::Matrix; -using SUNGkoSolverType = sundials::ginkgo::LinearSolver; +using SUNGkoSolverType = + sundials::ginkgo::LinearSolver; // ----------------------------------------------------------------------------- // Functions provided to the SUNDIALS integrator @@ -83,7 +89,8 @@ using SUNGkoSolverType = sundials::ginkgo::LinearSolverget_queue(), sunctx); +#else N_Vector u = N_VNew(udata.nodes, sunctx); +#endif if (check_ptr(u, "N_VNew")) return 1; // Set initial condition @@ -120,34 +151,26 @@ int main(int argc, char* argv[]) N_Vector e = N_VClone(u); if (check_ptr(e, "N_VClone")) return 1; - // --------------------------------------- - // Create Ginkgo matrix and linear solver - // --------------------------------------- - -#if defined(USE_CUDA) - auto gko_exec{gko::CudaExecutor::create(0, gko::OmpExecutor::create(), false, gko::allocation_mode::device)}; -#elif defined(USE_HIP) - auto gko_exec{gko::HipExecutor::create(0, gko::OmpExecutor::create(), false, gko::allocation_mode::device)}; -#elif defined(USE_OMP) - auto gko_exec{gko::OmpExecutor::create()}; -#else - auto gko_exec{gko::ReferenceExecutor::create()}; -#endif - auto gko_matrix_dim = gko::dim<2>(udata.nodes, udata.nodes); auto gko_matrix_nnz{(5 * (udata.nx - 2) + 2) * (udata.ny - 2) + 2 * udata.nx}; - auto gko_matrix = gko::share(GkoMatrixType::create(gko_exec, gko_matrix_dim, gko_matrix_nnz)); + auto gko_matrix = + gko::share(GkoMatrixType::create(gko_exec, gko_matrix_dim, gko_matrix_nnz)); SUNGkoMatrixType A{gko_matrix, sunctx}; // Use default stopping criteria - auto crit{sundials::ginkgo::DefaultStop::build().with_max_iters(static_cast(udata.liniters)).on(gko_exec)}; + auto crit{sundials::ginkgo::DefaultStop::build() + .with_max_iters(static_cast(udata.liniters)) + .on(gko_exec)}; // Use Jacobi preconditioner - auto precon{gko::preconditioner::Jacobi::build().on(gko_exec)}; + auto precon{ + gko::preconditioner::Jacobi::build().on(gko_exec)}; - auto gko_solver_factory = gko::share( - GkoSolverType::build().with_criteria(std::move(crit)).with_preconditioner(std::move(precon)).on(gko_exec)); + auto gko_solver_factory = gko::share(GkoSolverType::build() + .with_criteria(std::move(crit)) + .with_preconditioner(std::move(precon)) + .on(gko_exec)); SUNGkoSolverType LS{gko_solver_factory, sunctx}; @@ -206,7 +229,8 @@ int main(int argc, char* argv[]) flag = WriteOutput(t, u, e, udata); if (check_flag(flag, "WriteOutput")) return 1; - for (int iout = 0; iout < udata.nout; iout++) { + for (int iout = 0; iout < udata.nout; iout++) + { // Evolve in time flag = CVode(cvode_mem, tout, u, &t, CV_NORMAL); if (check_flag(flag, "CVode")) break; @@ -239,13 +263,15 @@ int main(int argc, char* argv[]) sunrealtype maxerr = N_VMaxNorm(e); - std::cout << std::scientific << std::setprecision(std::numeric_limits::digits10) + std::cout << std::scientific + << std::setprecision(std::numeric_limits::digits10) << "\nMax error = " << maxerr << std::endl; // -------------------- // Clean up and return // -------------------- + udata.exec = nullptr; CVodeFree(&cvode_mem); // Free integrator memory N_VDestroy(u); // Free vectors N_VDestroy(e); @@ -259,15 +285,19 @@ int main(int argc, char* argv[]) #if defined(USE_CUDA) || defined(USE_HIP) // GPU kernel to compute the ODE RHS function f(t,y). -__global__ void f_kernel(const sunindextype nx, const sunindextype ny, const sunrealtype dx, const sunrealtype dy, - const sunrealtype cx, const sunrealtype cy, const sunrealtype cc, const sunrealtype bx, - const sunrealtype by, const sunrealtype sin_t_cos_t, const sunrealtype cos_sqr_t, - sunrealtype* uarray, sunrealtype* farray) +__global__ void f_kernel(const sunindextype nx, const sunindextype ny, + const sunrealtype dx, const sunrealtype dy, + const sunrealtype cx, const sunrealtype cy, + const sunrealtype cc, const sunrealtype bx, + const sunrealtype by, const sunrealtype sin_t_cos_t, + const sunrealtype cos_sqr_t, sunrealtype* uarray, + sunrealtype* farray) { const sunindextype i = blockIdx.x * blockDim.x + threadIdx.x; const sunindextype j = blockIdx.y * blockDim.y + threadIdx.y; - if (i > 0 && i < nx - 1 && j > 0 && j < ny - 1) { + if (i > 0 && i < nx - 1 && j > 0 && j < ny - 1) + { auto x = i * dx; auto y = j * dy; @@ -284,7 +314,8 @@ __global__ void f_kernel(const sunindextype nx, const sunindextype ny, const sun auto idx_e = (i + 1) + j * nx; auto idx_w = (i - 1) + j * nx; - farray[idx_c] = cc * uarray[idx_c] + cx * (uarray[idx_w] + uarray[idx_e]) + cy * (uarray[idx_s] + uarray[idx_n]) - + farray[idx_c] = cc * uarray[idx_c] + cx * (uarray[idx_w] + uarray[idx_e]) + + cy * (uarray[idx_s] + uarray[idx_n]) - TWO * PI * sin_sqr_x * sin_sqr_y * sin_t_cos_t - bx * (cos_sqr_x - sin_sqr_x) * sin_sqr_y * cos_sqr_t - by * (cos_sqr_y - sin_sqr_y) * sin_sqr_x * cos_sqr_t; @@ -328,14 +359,67 @@ int f(sunrealtype t, N_Vector u, N_Vector f, void* user_data) if (check_ptr(farray, "N_VGetDeviceArrayPointer")) return -1; dim3 threads_per_block{16, 16}; - const auto nbx{(static_cast(nx) + threads_per_block.x - 1) / threads_per_block.x}; - const auto nby{(static_cast(ny) + threads_per_block.y - 1) / threads_per_block.y}; + const auto nbx{(static_cast(nx) + threads_per_block.x - 1) / + threads_per_block.x}; + const auto nby{(static_cast(ny) + threads_per_block.y - 1) / + threads_per_block.y}; dim3 num_blocks{nbx, nby}; - f_kernel<<>>(nx, ny, dx, dy, cx, cy, cc, bx, by, sin_t_cos_t, cos_sqr_t, uarray, farray); + f_kernel<<>>(nx, ny, dx, dy, cx, cy, cc, bx, + by, sin_t_cos_t, cos_sqr_t, + uarray, farray); - HIP_OR_CUDA(hipDeviceSynchronize();, cudaDeviceSynchronize();); + HIP_OR_CUDA_OR_SYCL(hipDeviceSynchronize(), cudaDeviceSynchronize(), ); +#elif defined(USE_DPCPP) + // Access device data arrays + sunrealtype* uarray = N_VGetDeviceArrayPointer(u); + if (check_ptr(uarray, "N_VGetDeviceArrayPointer")) return -1; + + sunrealtype* farray = N_VGetDeviceArrayPointer(f); + if (check_ptr(farray, "N_VGetDeviceArrayPointer")) return -1; + + std::dynamic_pointer_cast(udata->exec) + ->get_queue() + ->submit( + [&](sycl::handler& cgh) + { + cgh.parallel_for(sycl::range<2>(ny, nx), + [=](sycl::id<2> id) + { + const sunindextype i = id[1]; + const sunindextype j = id[0]; + if (i > 0 && i < nx - 1 && j > 0 && j < ny - 1) + { + auto x = i * dx; + auto y = j * dy; + + auto sin_sqr_x = sin(PI * x) * sin(PI * x); + auto sin_sqr_y = sin(PI * y) * sin(PI * y); + + auto cos_sqr_x = cos(PI * x) * cos(PI * x); + auto cos_sqr_y = cos(PI * y) * cos(PI * y); + + // center, north, south, east, and west indices + auto idx_c = i + j * nx; + auto idx_n = i + (j + 1) * nx; + auto idx_s = i + (j - 1) * nx; + auto idx_e = (i + 1) + j * nx; + auto idx_w = (i - 1) + j * nx; + + farray[idx_c] = + cc * uarray[idx_c] + + cx * (uarray[idx_w] + uarray[idx_e]) + + cy * (uarray[idx_s] + uarray[idx_n]) - + TWO * PI * sin_sqr_x * sin_sqr_y * sin_t_cos_t - + bx * (cos_sqr_x - sin_sqr_x) * sin_sqr_y * + cos_sqr_t - + by * (cos_sqr_y - sin_sqr_y) * sin_sqr_x * + cos_sqr_t; + } + }); + }); + udata->exec->synchronize(); #else // Access host data arrays @@ -346,8 +430,10 @@ int f(sunrealtype t, N_Vector u, N_Vector f, void* user_data) if (check_ptr(farray, "N_VGetArrayPointer")) return -1; // Iterate over domain interior and fill the RHS vector - for (sunindextype j = 1; j < ny - 1; j++) { - for (sunindextype i = 1; i < nx - 1; i++) { + for (sunindextype j = 1; j < ny - 1; j++) + { + for (sunindextype i = 1; i < nx - 1; i++) + { auto x = i * dx; auto y = j * dy; @@ -364,7 +450,8 @@ int f(sunrealtype t, N_Vector u, N_Vector f, void* user_data) auto idx_e = (i + 1) + j * nx; auto idx_w = (i - 1) + j * nx; - farray[idx_c] = cc * uarray[idx_c] + cx * (uarray[idx_w] + uarray[idx_e]) + cy * (uarray[idx_s] + uarray[idx_n]) - + farray[idx_c] = cc * uarray[idx_c] + cx * (uarray[idx_w] + uarray[idx_e]) + + cy * (uarray[idx_s] + uarray[idx_n]) - TWO * PI * sin_sqr_x * sin_sqr_y * sin_t_cos_t - bx * (cos_sqr_x - sin_sqr_x) * sin_sqr_y * cos_sqr_t - by * (cos_sqr_y - sin_sqr_y) * sin_sqr_x * cos_sqr_t; @@ -380,12 +467,14 @@ int f(sunrealtype t, N_Vector u, N_Vector f, void* user_data) #if defined(USE_CUDA) || defined(USE_HIP) // GPU kernel to fill southern (j = 0) and northern (j = nx - 1) boundary // entries including the corners. -__global__ void J_sn_kernel(const sunindextype nx, const sunindextype ny, sunindextype* row_ptrs, - sunindextype* col_idxs, sunrealtype* mat_data) +__global__ void J_sn_kernel(const sunindextype nx, const sunindextype ny, + sunindextype* row_ptrs, sunindextype* col_idxs, + sunrealtype* mat_data) { const sunindextype i = blockIdx.x * blockDim.x + threadIdx.x; - if (i >= 0 && i < nx) { + if (i >= 0 && i < nx) + { // Southern face mat_data[i] = ZERO; col_idxs[i] = i; @@ -404,12 +493,14 @@ __global__ void J_sn_kernel(const sunindextype nx, const sunindextype ny, sunind // GPU kernel to fill western (i = 0) and eastern (i = nx - 1) boundary entries // excluding the corners (set by J_sn_kernel). -__global__ void J_we_kernel(const sunindextype nx, const sunrealtype ny, sunindextype* row_ptrs, sunindextype* col_idxs, +__global__ void J_we_kernel(const sunindextype nx, const sunrealtype ny, + sunindextype* row_ptrs, sunindextype* col_idxs, sunrealtype* mat_data) { const sunindextype j = blockIdx.x * blockDim.x + threadIdx.x; - if (j > 0 && j < ny - 1) { + if (j > 0 && j < ny - 1) + { // Western face auto col = j * nx; auto idx = (5 * (nx - 2) + 2) * (j - 1) + nx; @@ -427,13 +518,16 @@ __global__ void J_we_kernel(const sunindextype nx, const sunrealtype ny, suninde } // GPU kernel to compute the ODE RHS Jacobian function df/dy(t,y). -__global__ void J_kernel(const sunindextype nx, const sunindextype ny, const sunrealtype cx, const sunrealtype cy, - const sunrealtype cc, sunindextype* row_ptrs, sunindextype* col_idxs, sunrealtype* mat_data) +__global__ void J_kernel(const sunindextype nx, const sunindextype ny, + const sunrealtype cx, const sunrealtype cy, + const sunrealtype cc, sunindextype* row_ptrs, + sunindextype* col_idxs, sunrealtype* mat_data) { const sunindextype i = blockIdx.x * blockDim.x + threadIdx.x; const sunindextype j = blockIdx.y * blockDim.y + threadIdx.y; - if (i > 0 && i < nx - 1 && j > 0 && j < ny - 1) { + if (i > 0 && i < nx - 1 && j > 0 && j < ny - 1) + { auto row = i + j * nx; auto col_s = row - nx; auto col_w = row - 1; @@ -467,7 +561,8 @@ __global__ void J_kernel(const sunindextype nx, const sunindextype ny, const sun // J routine to compute the ODE RHS Jacobian function df/dy(t,y). This // explicitly set boundary entries to zero so J(t,y) has the same sparsity // pattern as A = I - gamma * J(t,y). -int J(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) +int J(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, + N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { // Access problem data auto udata = static_cast(user_data); @@ -492,35 +587,141 @@ int J(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, N_Ve #if defined(USE_CUDA) || defined(USE_HIP) unsigned threads_per_block_bx = 16; - unsigned num_blocks_bx = ((nx + threads_per_block_bx - 1) / threads_per_block_bx); + unsigned num_blocks_bx = + ((nx + threads_per_block_bx - 1) / threads_per_block_bx); - J_sn_kernel<<>>(nx, ny, row_ptrs, col_idxs, mat_data); + J_sn_kernel<<>>(nx, ny, row_ptrs, + col_idxs, mat_data); unsigned threads_per_block_by = 16; - unsigned num_blocks_by = ((ny + threads_per_block_by - 1) / threads_per_block_by); + unsigned num_blocks_by = + ((ny + threads_per_block_by - 1) / threads_per_block_by); - J_we_kernel<<>>(nx, ny, row_ptrs, col_idxs, mat_data); + J_we_kernel<<>>(nx, ny, row_ptrs, + col_idxs, mat_data); dim3 threads_per_block_i{16, 16}; - const auto nbx{(static_cast(nx) + threads_per_block_i.x - 1) / threads_per_block_i.x}; - const auto nby{(static_cast(ny) + threads_per_block_i.y - 1) / threads_per_block_i.y}; + const auto nbx{(static_cast(nx) + threads_per_block_i.x - 1) / + threads_per_block_i.x}; + const auto nby{(static_cast(ny) + threads_per_block_i.y - 1) / + threads_per_block_i.y}; dim3 num_blocks_i{nbx, nby}; - J_kernel<<>>(nx, ny, cx, cy, cc, row_ptrs, col_idxs, mat_data); - - HIP_OR_CUDA(hipDeviceSynchronize();, cudaDeviceSynchronize();); - + J_kernel<<>>(nx, ny, cx, cy, cc, row_ptrs, + col_idxs, mat_data); + + HIP_OR_CUDA_OR_SYCL(hipDeviceSynchronize(), cudaDeviceSynchronize(), ); +#elif defined(USE_DPCPP) + auto queue = + std::dynamic_pointer_cast(udata->exec)->get_queue(); + // J_sn_kernel + queue->submit( + [&](sycl::handler& cgh) + { + cgh.parallel_for(nx, + [=](sycl::id<1> id) + { + const sunindextype i = id[0]; + + // Southern face + mat_data[i] = ZERO; + col_idxs[i] = i; + row_ptrs[i] = i; + + // Northern face + auto col = i + (ny - 1) * nx; + auto idx = (5 * (nx - 2) + 2) * (ny - 2) + nx + i; + mat_data[idx] = ZERO; + col_idxs[idx] = col; + row_ptrs[col] = idx; + + if (i == nx - 1) + row_ptrs[nx * ny] = (5 * (nx - 2) + 2) * (ny - 2) + + 2 * nx; + }); + }); + // J_we_kernel + queue->submit( + [&](sycl::handler& cgh) + { + cgh.parallel_for(ny, + [=](sycl::id<1> id) + { + const sunindextype j = id[0]; + if (j > 0 && j < ny - 1) + { + // Western face + auto col = j * nx; + auto idx = (5 * (nx - 2) + 2) * (j - 1) + nx; + mat_data[idx] = ZERO; + col_idxs[idx] = col; + row_ptrs[col] = idx; + + // Eastern face + col = (nx - 1) + j * nx; + idx = (5 * (nx - 2) + 2) * (j - 1) + nx + 1 + + 5 * (nx - 2); + mat_data[idx] = ZERO; + col_idxs[idx] = col; + row_ptrs[col] = idx; + } + }); + }); + // J_kernel + queue->submit( + [&](sycl::handler& cgh) + { + cgh.parallel_for(sycl::range<2>(ny, nx), + [=](sycl::id<2> id) + { + const sunindextype i = id[1]; + const sunindextype j = id[0]; + + if (i > 0 && i < nx - 1 && j > 0 && j < ny - 1) + { + auto row = i + j * nx; + auto col_s = row - nx; + auto col_w = row - 1; + auto col_c = row; + auto col_e = row + 1; + auto col_n = row + nx; + + // Number of non-zero entries from preceding rows + auto prior_nnz = (5 * (nx - 2) + 2) * (j - 1) + nx; + + // Starting index for this row + auto idx = prior_nnz + 1 + 5 * (i - 1); + + mat_data[idx] = cy; + mat_data[idx + 1] = cx; + mat_data[idx + 2] = cc; + mat_data[idx + 3] = cx; + mat_data[idx + 4] = cy; + + col_idxs[idx] = col_s; + col_idxs[idx + 1] = col_w; + col_idxs[idx + 2] = col_c; + col_idxs[idx + 3] = col_e; + col_idxs[idx + 4] = col_n; + + row_ptrs[row] = idx; + } + }); + }); + udata->exec->synchronize(); #else // Fill southern boundary entries (j = 0) - for (sunindextype i = 0; i < nx; i++) { + for (sunindextype i = 0; i < nx; i++) + { mat_data[i] = ZERO; col_idxs[i] = i; row_ptrs[i] = i; } // Fill western boundary entries (i = 0) - for (sunindextype j = 1; j < ny - 1; j++) { + for (sunindextype j = 1; j < ny - 1; j++) + { auto col = j * nx; auto idx = (5 * (nx - 2) + 2) * (j - 1) + nx; mat_data[idx] = ZERO; @@ -529,7 +730,8 @@ int J(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, N_Ve } // Fill eastern boundary entries (i = nx - 1) - for (sunindextype j = 1; j < ny - 1; j++) { + for (sunindextype j = 1; j < ny - 1; j++) + { auto col = (nx - 1) + j * nx; auto idx = (5 * (nx - 2) + 2) * (j - 1) + nx + 1 + 5 * (nx - 2); mat_data[idx] = ZERO; @@ -538,7 +740,8 @@ int J(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, N_Ve } // Fill northern boundary entries (j = ny - 1) - for (sunindextype i = 0; i < nx; i++) { + for (sunindextype i = 0; i < nx; i++) + { auto col = i + (ny - 1) * nx; auto idx = (5 * (nx - 2) + 2) * (ny - 2) + nx + i; mat_data[idx] = ZERO; @@ -548,8 +751,10 @@ int J(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, N_Ve row_ptrs[nx * ny] = (5 * (nx - 2) + 2) * (ny - 2) + 2 * nx; // Fill interior entries - for (sunindextype j = 1; j < ny - 1; j++) { - for (sunindextype i = 1; i < nx - 1; i++) { + for (sunindextype j = 1; j < ny - 1; j++) + { + for (sunindextype i = 1; i < nx - 1; i++) + { auto row = i + j * nx; auto col_s = row - nx; auto col_w = row - 1; diff --git a/examples/cvode/ginkgo/cv_heat2D_ginkgo.hpp b/examples/cvode/ginkgo/cv_heat2D_ginkgo.hpp index bc459c68d1..a363985c7b 100644 --- a/examples/cvode/ginkgo/cv_heat2D_ginkgo.hpp +++ b/examples/cvode/ginkgo/cv_heat2D_ginkgo.hpp @@ -15,24 +15,30 @@ * See cv_heat2D_ginkgo.cpp for more information. * ---------------------------------------------------------------------------*/ +#include #include -#include -#include #include +#include +#include #include -#include +#include #include // SUNDIALS types -#include #include +#include #if defined(USE_CUDA) #include #elif defined(USE_HIP) #include +#elif defined(USE_DPCPP) +#include #endif +// Ginkgo Type +#include + // Common utility functions #include @@ -72,19 +78,22 @@ struct UserData sunrealtype dy = yu / (ny - 1); // Integrator settings - sunrealtype rtol = SUN_RCONST(1.0e-4); // relative tolerance - sunrealtype atol = SUN_RCONST(1.0e-8); // absolute tolerance - int maxsteps = 0; // max number of steps between outputs + sunrealtype rtol = SUN_RCONST(1.0e-4); // relative tolerance + sunrealtype atol = SUN_RCONST(1.0e-8); // absolute tolerance + int maxsteps = 0; // max number of steps between outputs // Linear solver settings - int liniters = 20; // number of linear iterations - sunrealtype epslin = ZERO; // linear solver tolerance factor + int liniters = 20; // number of linear iterations + sunrealtype epslin = ZERO; // linear solver tolerance factor // Ouput variables - bool output = false; // write solution to disk - int nout = 20; // number of output times - std::ofstream uout; // output file stream - std::ofstream eout; // error file stream + bool output = false; // write solution to disk + int nout = 20; // number of output times + std::ofstream uout; // output file stream + std::ofstream eout; // error file stream + + // Ginkgo executor for synchronization on sycl + std::shared_ptr exec; }; // ----------------------------------------------------------------------------- @@ -93,11 +102,9 @@ struct UserData #if defined(USE_CUDA) || defined(USE_HIP) // GPU kernel to compute the ODE RHS function f(t,y). -__global__ -void solution_kernel(const sunindextype nx, const sunindextype ny, - const sunrealtype dx, const sunrealtype dy, - const sunrealtype cos_sqr_t, - sunrealtype* uarray) +__global__ void solution_kernel(const sunindextype nx, const sunindextype ny, + const sunrealtype dx, const sunrealtype dy, + const sunrealtype cos_sqr_t, sunrealtype* uarray) { const sunindextype i = blockIdx.x * blockDim.x + threadIdx.x; const sunindextype j = blockIdx.y * blockDim.y + threadIdx.y; @@ -110,14 +117,14 @@ void solution_kernel(const sunindextype nx, const sunindextype ny, auto sin_sqr_x = sin(PI * x) * sin(PI * x); auto sin_sqr_y = sin(PI * y) * sin(PI * y); - auto idx = i + j * nx; + auto idx = i + j * nx; uarray[idx] = sin_sqr_x * sin_sqr_y * cos_sqr_t + ONE; } } #endif // Compute the exact solution -int Solution(sunrealtype t, N_Vector u, UserData &udata) +int Solution(sunrealtype t, N_Vector u, UserData& udata) { // Access problem data and set shortcuts const auto nx = udata.nx; @@ -133,22 +140,49 @@ int Solution(sunrealtype t, N_Vector u, UserData &udata) #if defined(USE_CUDA) || defined(USE_HIP) - sunrealtype *uarray = N_VGetDeviceArrayPointer(u); + sunrealtype* uarray = N_VGetDeviceArrayPointer(u); if (check_ptr(uarray, "N_VGetDeviceArrayPointer")) return -1; dim3 threads_per_block{16, 16}; - const auto nbx{(static_cast(nx) + threads_per_block.x - 1) - / threads_per_block.x}; - const auto nby{(static_cast(ny) + threads_per_block.y - 1) - / threads_per_block.y}; + const auto nbx{(static_cast(nx) + threads_per_block.x - 1) / + threads_per_block.x}; + const auto nby{(static_cast(ny) + threads_per_block.y - 1) / + threads_per_block.y}; dim3 num_blocks{nbx, nby}; - solution_kernel<<>> - (nx, ny, dx, dy, cos_sqr_t, uarray); - + solution_kernel<<>>(nx, ny, dx, dy, cos_sqr_t, + uarray); +#elif defined(USE_DPCPP) + sunrealtype* uarray = N_VGetDeviceArrayPointer(u); + if (check_ptr(uarray, "N_VGetDeviceArrayPointer")) return -1; + std::dynamic_pointer_cast(udata.exec) + ->get_queue() + ->submit( + [&](sycl::handler& cgh) + { + cgh.parallel_for(sycl::range<2>(ny, nx), + [=](sycl::id<2> id) + { + const sunindextype i = id[1]; + const sunindextype j = id[0]; + + if (i > 0 && i < nx - 1 && j > 0 && j < ny - 1) + { + auto x = i * dx; + auto y = j * dy; + + auto sin_sqr_x = sin(PI * x) * sin(PI * x); + auto sin_sqr_y = sin(PI * y) * sin(PI * y); + + auto idx = i + j * nx; + uarray[idx] = sin_sqr_x * sin_sqr_y * cos_sqr_t + + ONE; + } + }); + }); #else - sunrealtype *uarray = N_VGetArrayPointer(u); + sunrealtype* uarray = N_VGetArrayPointer(u); if (check_ptr(uarray, "N_VGetArrayPointer")) return -1; for (sunindextype j = 1; j < ny - 1; j++) @@ -161,18 +195,18 @@ int Solution(sunrealtype t, N_Vector u, UserData &udata) auto sin_sqr_x = sin(PI * x) * sin(PI * x); auto sin_sqr_y = sin(PI * y) * sin(PI * y); - auto idx = i + j * nx; + auto idx = i + j * nx; uarray[idx] = sin_sqr_x * sin_sqr_y * cos_sqr_t + ONE; } } #endif - + udata.exec->synchronize(); return 0; } // Compute the solution error -int SolutionError(sunrealtype t, N_Vector u, N_Vector e, UserData &udata) +int SolutionError(sunrealtype t, N_Vector u, N_Vector e, UserData& udata) { // Compute true solution int flag = Solution(t, e, udata); @@ -188,29 +222,28 @@ int SolutionError(sunrealtype t, N_Vector u, N_Vector e, UserData &udata) // Print command line options void InputHelp() { - std::cout - << std::endl - << "Command line options:\n" - << " --nx : number of x mesh points\n" - << " --nx : number of y mesh points\n" - << " --xu : x upper bound\n" - << " --yu : y upper bound\n" - << " --kx : x diffusion coefficient\n" - << " --kx : y diffusion coefficient\n" - << " --tf