From b31dba1ec202bad0473be722242da0fbbdcfb62e Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 20 Feb 2025 15:43:37 +0100 Subject: [PATCH 01/57] paper template --- .gitignore | 4 ++-- paper.bib | 13 +++++++++++++ paper.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 paper.bib create mode 100644 paper.md diff --git a/.gitignore b/.gitignore index 0a9ff74a..e8693c92 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,6 @@ docs/contributing.md # environment. Manifest.toml -run -run/* +**/run* **/*.code-workspace +**/*.pb.gz diff --git a/paper.bib b/paper.bib new file mode 100644 index 00000000..f2487fa0 --- /dev/null +++ b/paper.bib @@ -0,0 +1,13 @@ +@article{bartel2024structure, + title={Structure-preserving numerical methods for {F}okker-{P}lanck + equations}, + author={Bartel, Hanna and Lampert, Joshua and Ranocha, Hendrik}, + journal={Proceedings in Applied Mathematics and Mechanics}, + pages={e202400007}, + year={2024}, + month={11}, + doi={10.1002/pamm.202400007}, + eprint={2404.07641}, + eprinttype={arxiv}, + eprintclass={math.NA} +} diff --git a/paper.md b/paper.md new file mode 100644 index 00000000..4d9de62d --- /dev/null +++ b/paper.md @@ -0,0 +1,51 @@ +--- +title: 'PositiveIntegrators.jl: A Julia library of positivity-preserving time integration methods' +tags: + - Julia + - TODO +authors: + - name: Stefan Kopecz + orcid: 0000-0003-0593-450X + affiliation: 1 + - name: Hendrik Ranocha + orcid: 0000-0002-3456-2277 + affiliation: 2 +affiliations: + - name: Institute of Mathematics, University of Kassel, Germany + index: 1 + - name: Institute of Mathematics, Johannes Gutenberg University Mainz, Germany + index: 2 +date: 20 February 2025 +bibliography: paper.bib +--- + +# Summary + +TODO + + +# Statement of need + +TODO + +@bartel2024structure + + +# Features + +TODO + + +# Related research and software + +TODO + + +# Acknowledgements + +Hendrik Ranocha was supported by +the German Research Foundation (Deutsche Forschungsgemeinschaft DFG, project number 513301895) and +the Daimler und Benz Stiftung (Daimler and Benz foundation, project number 32-10/22). + + +# References From f62075483465aabc4c85297417ee314ed7e3689d Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 20 Feb 2025 15:53:59 +0100 Subject: [PATCH 02/57] build paper draft --- .github/workflows/PaperDraft.yml | 29 +++++++++++++++++++++++++++++ paper.bib => paper/paper.bib | 0 paper.md => paper/paper.md | 0 3 files changed, 29 insertions(+) create mode 100644 .github/workflows/PaperDraft.yml rename paper.bib => paper/paper.bib (100%) rename paper.md => paper/paper.md (100%) diff --git a/.github/workflows/PaperDraft.yml b/.github/workflows/PaperDraft.yml new file mode 100644 index 00000000..ebf157f2 --- /dev/null +++ b/.github/workflows/PaperDraft.yml @@ -0,0 +1,29 @@ +name: Build JOSS paper draft PDF + +on: + push: + paths: + - paper/** + - .github/workflows/draft-pdf.yml + +jobs: + paper: + runs-on: ubuntu-latest + name: JOSS Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@v1 + with: + journal: joss + # This should be the path to the paper within your repo. + paper-path: paper/paper.md + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: paper + # This is the output path where Pandoc will write the compiled + # PDF. Note, this should be the same directory as the input + # paper.md + path: paper/paper.pdf diff --git a/paper.bib b/paper/paper.bib similarity index 100% rename from paper.bib rename to paper/paper.bib diff --git a/paper.md b/paper/paper.md similarity index 100% rename from paper.md rename to paper/paper.md From 5ce654c2a0d8c8ab2e85de4c628d1bc90203901b Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 20 Feb 2025 15:56:17 +0100 Subject: [PATCH 03/57] draft action at master --- .github/workflows/PaperDraft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PaperDraft.yml b/.github/workflows/PaperDraft.yml index ebf157f2..03226ff2 100644 --- a/.github/workflows/PaperDraft.yml +++ b/.github/workflows/PaperDraft.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Build draft PDF - uses: openjournals/openjournals-draft-action@v1 + uses: openjournals/openjournals-draft-action@master with: journal: joss # This should be the path to the paper within your repo. From ff973c59ff2acfd13e3439c9c1b8514fccad5bc5 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 20 Feb 2025 16:56:49 +0100 Subject: [PATCH 04/57] no CI when changing the paper --- .github/workflows/Documenter.yml | 3 +++ .github/workflows/Downgrade.yml | 3 +++ .github/workflows/PaperDraft-backup.yml | 33 +++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 .github/workflows/PaperDraft-backup.yml diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index d50d1d2a..127b8059 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -24,7 +24,10 @@ on: - '.github/workflows/TagBot.yml' - 'benchmark/**' - 'utils/**' +<<<<<<< HEAD - '.gitignore' +======= +>>>>>>> 08677f5 (no CI when changing the paper) - 'paper/**' workflow_dispatch: diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index da1bcdd6..50a2c415 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -6,7 +6,10 @@ on: - main paths-ignore: - 'paper/**' +<<<<<<< HEAD - '.gitignore' +======= +>>>>>>> 08677f5 (no CI when changing the paper) workflow_dispatch: # Cancel redundant CI tests automatically diff --git a/.github/workflows/PaperDraft-backup.yml b/.github/workflows/PaperDraft-backup.yml new file mode 100644 index 00000000..0b85bc71 --- /dev/null +++ b/.github/workflows/PaperDraft-backup.yml @@ -0,0 +1,33 @@ +name: Build JOSS paper draft PDF + +on: + push: + paths: + - paper/** + - .github/workflows/draft-pdf.yml + pull_request: + paths: + - paper/** + - .github/workflows/draft-pdf.yml + +jobs: + paper: + runs-on: ubuntu-latest + name: JOSS Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@master + with: + journal: joss + # This should be the path to the paper within your repo. + paper-path: paper/paper.md + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: paper + # This is the output path where Pandoc will write the compiled + # PDF. Note, this should be the same directory as the input + # paper.md + path: paper/paper.pdf From 16366375650d1680f1b8d4ea4a708068dfea5914 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 20 Feb 2025 19:55:03 +0100 Subject: [PATCH 05/57] build paper draft also on PR --- .github/workflows/PaperDraft.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/PaperDraft.yml b/.github/workflows/PaperDraft.yml index 03226ff2..0b85bc71 100644 --- a/.github/workflows/PaperDraft.yml +++ b/.github/workflows/PaperDraft.yml @@ -5,6 +5,10 @@ on: paths: - paper/** - .github/workflows/draft-pdf.yml + pull_request: + paths: + - paper/** + - .github/workflows/draft-pdf.yml jobs: paper: From 75c3c87e5bb0784e8e041d731c29a00a05fa6583 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 20 Feb 2025 20:06:37 +0100 Subject: [PATCH 06/57] ignore more CI --- .github/workflows/Documenter.yml | 4 ---- .github/workflows/Downgrade.yml | 3 --- 2 files changed, 7 deletions(-) diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index 127b8059..ac6bbd74 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -24,10 +24,6 @@ on: - '.github/workflows/TagBot.yml' - 'benchmark/**' - 'utils/**' -<<<<<<< HEAD - - '.gitignore' -======= ->>>>>>> 08677f5 (no CI when changing the paper) - 'paper/**' workflow_dispatch: diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index 50a2c415..da1bcdd6 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -6,10 +6,7 @@ on: - main paths-ignore: - 'paper/**' -<<<<<<< HEAD - '.gitignore' -======= ->>>>>>> 08677f5 (no CI when changing the paper) workflow_dispatch: # Cancel redundant CI tests automatically From 29fb5ae45f1a236b12d6cd934e9de60b961f253d Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 20 Feb 2025 20:37:08 +0100 Subject: [PATCH 07/57] update --- paper/paper.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 4d9de62d..ed556939 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -7,14 +7,19 @@ authors: - name: Stefan Kopecz orcid: 0000-0003-0593-450X affiliation: 1 + - name: Joshua Lampert + orcid: 0009-0007-0971-6709 + affiliation: 2 - name: Hendrik Ranocha orcid: 0000-0002-3456-2277 - affiliation: 2 + affiliation: 3 affiliations: - name: Institute of Mathematics, University of Kassel, Germany index: 1 - - name: Institute of Mathematics, Johannes Gutenberg University Mainz, Germany + - name: Institute of Mathematics, University of Hamburg, Germany index: 2 + - name: Institute of Mathematics, Johannes Gutenberg University Mainz, Germany + index: 3 date: 20 February 2025 bibliography: paper.bib --- From 9961c5bf216aaf9ad1ee826e354080fe11144904 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 21 Feb 2025 08:35:39 +0100 Subject: [PATCH 08/57] Update paper/paper.md Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index ed556939..e930ef2c 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -16,7 +16,7 @@ authors: affiliations: - name: Institute of Mathematics, University of Kassel, Germany index: 1 - - name: Institute of Mathematics, University of Hamburg, Germany + - name: Department of Mathematics, University of Hamburg, Germany index: 2 - name: Institute of Mathematics, Johannes Gutenberg University Mainz, Germany index: 3 From c5cb4f02197b85a4611dbc4dc5a9159600cee493 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 14:30:10 +0100 Subject: [PATCH 09/57] First draft summary paper.md --- paper/paper.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index e930ef2c..32145cff 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -26,8 +26,9 @@ bibliography: paper.bib # Summary -TODO +Many systems of ordinary differential equations that model real life applications possess positive solutions and it is quite natural to demand that numerical solutions of such systems should be positive as well. Unfortunately, positivty is a property that is not preserved by standard time integration schemes such as Runge--Kutta schemes, Rosenbrock methods or linear multistep methods, at least for orders greater than one. Therefore, various new, unconditionally positive schemes have been introduced in recent years. Unfortunately, these new methods are not freely available and therefore not applicable for most users and also not comparable within the scientific community. +Here we describe PostiveIntegrators.jl a julia package that provides efficient implementations of various positive time integration schemes and thus makes these methods usable and comparable. # Statement of need From 1049275f9d7132bd9d0b435b33efa5f5584cc05f Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 14:34:55 +0100 Subject: [PATCH 10/57] Update paper.md --- paper/paper.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 32145cff..3937beb3 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -26,9 +26,9 @@ bibliography: paper.bib # Summary -Many systems of ordinary differential equations that model real life applications possess positive solutions and it is quite natural to demand that numerical solutions of such systems should be positive as well. Unfortunately, positivty is a property that is not preserved by standard time integration schemes such as Runge--Kutta schemes, Rosenbrock methods or linear multistep methods, at least for orders greater than one. Therefore, various new, unconditionally positive schemes have been introduced in recent years. Unfortunately, these new methods are not freely available and therefore not applicable for most users and also not comparable within the scientific community. +Many systems of ordinary differential equations that model real life applications possess positive solutions and it is quite natural to demand that numerical solutions of such systems should be positive as well. Unfortunately, positivty is a property that is not preserved by standard time integration schemes such as Runge--Kutta schemes, Rosenbrock methods or linear multistep methods. Therefore, various new, unconditionally positive schemes have been introduced in recent years. Unfortunately, these new methods are not freely available and therefore not applicable for most users and also not comparable within the scientific community. -Here we describe PostiveIntegrators.jl a julia package that provides efficient implementations of various positive time integration schemes and thus makes these methods usable and comparable. +Here we describe `PostiveIntegrators.jl` a julia package that provides efficient implementations of various positive time integration schemes and thus makes these methods usable and comparable. # Statement of need From 43cb7d22ebf85a60ad0e4a22c1c18ebd6f8e19ac Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 15:19:05 +0100 Subject: [PATCH 11/57] additional references --- paper/paper.bib | 157 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) diff --git a/paper/paper.bib b/paper/paper.bib index f2487fa0..2ff2a89c 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -11,3 +11,160 @@ @article{bartel2024structure eprinttype={arxiv}, eprintclass={math.NA} } + +@article{burchard2003, +title = {A high-order conservative Patankar-type discretisation for stiff systems of production–destruction equations}, +journal = {Applied Numerical Mathematics}, +volume = {47}, +number = {1}, +pages = {1-30}, +year = {2003}, +issn = {0168-9274}, +doi = {https://doi.org/10.1016/S0168-9274(03)00101-6}, +url = {https://www.sciencedirect.com/science/article/pii/S0168927403001016}, +author = {Hans Burchard and Eric Deleersnijder and Andreas Meister}, +keywords = {Patankar-type schemes, Runge–Kutta methods, Unconditional positivity, Conservativity}, +} + +article{kopeczmeister2018order2, +title = {On order conditions for modified Patankar–Runge–Kutta schemes}, +journal = {Applied Numerical Mathematics}, +volume = {123}, +pages = {159-179}, +year = {2018}, +issn = {0168-9274}, +doi = {https://doi.org/10.1016/j.apnum.2017.09.004}, +url = {https://www.sciencedirect.com/science/article/pii/S0168927417301861}, +author = {S. Kopecz and A. Meister}, +keywords = {Patankar-type schemes, Runge–Kutta methods, Unconditional positivity, Conservativity}, +} + +@article {kopeczmeister2018order3, + AUTHOR = {Kopecz, Stefan and Meister, Andreas}, + TITLE = {Unconditionally positive and conservative third order modified + {P}atankar-{R}unge-{K}utta discretizations of + production-destruction systems}, + JOURNAL = {BIT}, + FJOURNAL = {BIT. Numerical Mathematics}, + VOLUME = {58}, + YEAR = {2018}, + NUMBER = {3}, + PAGES = {691--728}, + ISSN = {0006-3835,1572-9125}, + MRCLASS = {65L06 (65L05 65L20)}, + MRNUMBER = {3855688}, +MRREVIEWER = {Luigi\ Brugnano}, + DOI = {10.1007/s10543-018-0705-1}, + URL = {https://doi.org/10.1007/s10543-018-0705-1}, +} + +@article {kopeczmeister2019, + AUTHOR = {Kopecz, Stefan and Meister, Andreas}, + TITLE = {On the existence of three-stage third-order modified + {P}atankar-{R}unge-{K}utta schemes}, + JOURNAL = {Numer. Algorithms}, + FJOURNAL = {Numerical Algorithms}, + VOLUME = {81}, + YEAR = {2019}, + NUMBER = {4}, + PAGES = {1473--1484}, + ISSN = {1017-1398,1572-9265}, + MRCLASS = {65L06}, + MRNUMBER = {3987250}, + DOI = {10.1007/s11075-019-00680-3}, + URL = {https://doi.org/10.1007/s11075-019-00680-3}, +} + +@article {izgin2022stability1, + AUTHOR = {Izgin, Thomas and Kopecz, Stefan and Meister, Andreas}, + TITLE = {On {L}yapunov stability of positive and conservative time + integrators and application to second order modified + {P}atankar-{R}unge-{K}utta schemes}, + JOURNAL = {ESAIM Math. Model. Numer. Anal.}, + FJOURNAL = {ESAIM. Mathematical Modelling and Numerical Analysis}, + VOLUME = {56}, + YEAR = {2022}, + NUMBER = {3}, + PAGES = {1053--1080}, + ISSN = {2822-7840,2804-7214}, + MRCLASS = {65L05 (65L06 65L20)}, + MRNUMBER = {4420893}, +MRREVIEWER = {Qin\ Sheng}, + DOI = {10.1051/m2an/2022031}, + URL = {https://doi.org/10.1051/m2an/2022031}, +} + +@article {izgin2022stability2, + AUTHOR = {Izgin, Thomas and Kopecz, Stefan and Meister, Andreas}, + TITLE = {On the stability of unconditionally positive and linear + invariants preserving time integration schemes}, + JOURNAL = {SIAM J. Numer. Anal.}, + FJOURNAL = {SIAM Journal on Numerical Analysis}, + VOLUME = {60}, + YEAR = {2022}, + NUMBER = {6}, + PAGES = {3029--3051}, + ISSN = {0036-1429,1095-7170}, + MRCLASS = {65L05 (34D20 65L20)}, + MRNUMBER = {4509959}, +MRREVIEWER = {Lajos\ L\'oczi}, + DOI = {10.1137/22M1480318}, + URL = {https://doi.org/10.1137/22M1480318}, +} + +@article {huang2023, + AUTHOR = {Huang, Juntao and Izgin, Thomas and Kopecz, Stefan and + Meister, Andreas and Shu, Chi-Wang}, + TITLE = {On the stability of strong-stability-preserving modified + {P}atankar-{R}unge-{K}utta schemes}, + JOURNAL = {ESAIM Math. Model. Numer. Anal.}, + FJOURNAL = {ESAIM. Mathematical Modelling and Numerical Analysis}, + VOLUME = {57}, + YEAR = {2023}, + NUMBER = {2}, + PAGES = {1063--1086}, + ISSN = {2822-7840,2804-7214}, + MRCLASS = {65L05 (65L06 65L20)}, + MRNUMBER = {4574004}, +MRREVIEWER = {Raymond\ J.\ Spiteri}, + DOI = {10.1051/m2an/2023005}, + URL = {https://doi.org/10.1051/m2an/2023005}, +} + + +@article {huang2019order3, + AUTHOR = {Huang, Juntao and Zhao, Weifeng and Shu, Chi-Wang}, + TITLE = {A third-order unconditionally positivity-preserving scheme for + production-destruction equations with applications to + non-equilibrium flows}, + JOURNAL = {J. Sci. Comput.}, + FJOURNAL = {Journal of Scientific Computing}, + VOLUME = {79}, + YEAR = {2019}, + NUMBER = {2}, + PAGES = {1015--1056}, + ISSN = {0885-7474,1573-7691}, + MRCLASS = {65M06 (76Nxx 76V05)}, + MRNUMBER = {3969000}, + DOI = {10.1007/s10915-018-0881-9}, + URL = {https://doi.org/10.1007/s10915-018-0881-9}, +} + +@article {huang2019order2, + AUTHOR = {Huang, Juntao and Shu, Chi-Wang}, + TITLE = {Positivity-preserving time discretizations for + production-destruction equations with applications to + non-equilibrium flows}, + JOURNAL = {J. Sci. Comput.}, + FJOURNAL = {Journal of Scientific Computing}, + VOLUME = {78}, + YEAR = {2019}, + NUMBER = {3}, + PAGES = {1811--1839}, + ISSN = {0885-7474,1573-7691}, + MRCLASS = {65M06 (65L06 65M20 76V05)}, + MRNUMBER = {3934688}, +MRREVIEWER = {Qifeng\ Zhang}, + DOI = {10.1007/s10915-018-0852-1}, + URL = {https://doi.org/10.1007/s10915-018-0852-1}, +} From 8be7e1c7fbd3390710015a632f12602b9ab5f039 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 15:24:57 +0100 Subject: [PATCH 12/57] Update paper.md --- paper/paper.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paper/paper.md b/paper/paper.md index 3937beb3..6a7cf58b 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -46,6 +46,17 @@ TODO TODO +@burchard2003 +@kopeczmeister2018order2 +@kopeczmeister2018order3 +@huang2019order2 +@huang2019order3 + +@kopeczmeister2019 +@izgin2022stability1 +@izgin2022stability2 +@huang2023 + # Acknowledgements From 6baf8163dd67bef240a911caf039d678fe386a94 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 15:25:19 +0100 Subject: [PATCH 13/57] Update paper.bib --- paper/paper.bib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.bib b/paper/paper.bib index 2ff2a89c..040fca42 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -26,7 +26,7 @@ @article{burchard2003 keywords = {Patankar-type schemes, Runge–Kutta methods, Unconditional positivity, Conservativity}, } -article{kopeczmeister2018order2, +@article{kopeczmeister2018order2, title = {On order conditions for modified Patankar–Runge–Kutta schemes}, journal = {Applied Numerical Mathematics}, volume = {123}, From 2f43d490ca8ee1e0e2f2cec73db53bacbfe0fb96 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 15:31:07 +0100 Subject: [PATCH 14/57] added paper by torlo, oeffner, ranocha --- paper/paper.bib | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/paper/paper.bib b/paper/paper.bib index 040fca42..fc3ec02b 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -168,3 +168,18 @@ @article {huang2019order2 DOI = {10.1007/s10915-018-0852-1}, URL = {https://doi.org/10.1007/s10915-018-0852-1}, } + +@article {torlo2022, + AUTHOR = {Torlo, Davide and \"Offner, Philipp and Ranocha, Hendrik}, + TITLE = {Issues with positivity-preserving {P}atankar-type schemes}, + JOURNAL = {Appl. Numer. Math.}, + FJOURNAL = {Applied Numerical Mathematics. An IMACS Journal}, + VOLUME = {182}, + YEAR = {2022}, + PAGES = {117--147}, + ISSN = {0168-9274,1873-5460}, + MRCLASS = {65L06 (65L04)}, + MRNUMBER = {4469089}, + DOI = {10.1016/j.apnum.2022.07.014}, + URL = {https://doi.org/10.1016/j.apnum.2022.07.014}, +} From a36614db215119c6b41f722da843548b98154bf0 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 15:31:59 +0100 Subject: [PATCH 15/57] ref to paper by torlo, oeffner, ranocha --- paper/paper.md | 1 + 1 file changed, 1 insertion(+) diff --git a/paper/paper.md b/paper/paper.md index 6a7cf58b..f512c441 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -56,6 +56,7 @@ TODO @izgin2022stability1 @izgin2022stability2 @huang2023 +@torlo2022 # Acknowledgements From f85f54c5dbc72de9e8bad505154d507546c972f3 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 15:39:13 +0100 Subject: [PATCH 16/57] added paper benz, meister, zardo --- paper/paper.bib | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/paper/paper.bib b/paper/paper.bib index fc3ec02b..b45a5c89 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -183,3 +183,22 @@ @article {torlo2022 DOI = {10.1016/j.apnum.2022.07.014}, URL = {https://doi.org/10.1016/j.apnum.2022.07.014}, } + +@incollection {benz2009, + AUTHOR = {Benz, Joachim and Meister, Andreas and Zardo, Philipp Andrea}, + TITLE = {A conservative, positivity preserving scheme for + advection-diffusion-reaction equations in biochemical + applications}, + BOOKTITLE = {Hyperbolic problems: theory, numerics and applications}, + SERIES = {Proc. Sympos. Appl. Math.}, + VOLUME = {67, Part 2}, + PAGES = {399--408}, + PUBLISHER = {Amer. Math. Soc., Providence, RI}, + YEAR = {2009}, + ISBN = {978-0-8218-4730-5}, + MRCLASS = {65M06 (35K57 76B15 92E20)}, + MRNUMBER = {2605235}, +MRREVIEWER = {Laurent\ E.\ Gosse}, + DOI = {10.1090/psapm/067.2/2605235}, + URL = {https://doi.org/10.1090/psapm/067.2/2605235}, +} From 2f07d934dc57ef50e9b79c417f6553e68578434e Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 24 Feb 2025 15:40:59 +0100 Subject: [PATCH 17/57] ref to benz, meister, zardo --- paper/paper.md | 1 + 1 file changed, 1 insertion(+) diff --git a/paper/paper.md b/paper/paper.md index f512c441..1125f326 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -51,6 +51,7 @@ TODO @kopeczmeister2018order3 @huang2019order2 @huang2019order3 +@benz2009 @kopeczmeister2019 @izgin2022stability1 From 888df07fca3310e31375bf56854fb9a4cf86e02c Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 27 Feb 2025 08:38:15 +0100 Subject: [PATCH 18/57] fix rebase --- .github/workflows/Documenter.yml | 1 + .github/workflows/PaperDraft-backup.yml | 33 ------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 .github/workflows/PaperDraft-backup.yml diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index ac6bbd74..d50d1d2a 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -24,6 +24,7 @@ on: - '.github/workflows/TagBot.yml' - 'benchmark/**' - 'utils/**' + - '.gitignore' - 'paper/**' workflow_dispatch: diff --git a/.github/workflows/PaperDraft-backup.yml b/.github/workflows/PaperDraft-backup.yml deleted file mode 100644 index 0b85bc71..00000000 --- a/.github/workflows/PaperDraft-backup.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build JOSS paper draft PDF - -on: - push: - paths: - - paper/** - - .github/workflows/draft-pdf.yml - pull_request: - paths: - - paper/** - - .github/workflows/draft-pdf.yml - -jobs: - paper: - runs-on: ubuntu-latest - name: JOSS Paper Draft - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build draft PDF - uses: openjournals/openjournals-draft-action@master - with: - journal: joss - # This should be the path to the paper within your repo. - paper-path: paper/paper.md - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: paper - # This is the output path where Pandoc will write the compiled - # PDF. Note, this should be the same directory as the input - # paper.md - path: paper/paper.pdf From 83436d7895b33c05e460e02a1820fdacee7048d7 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 27 Feb 2025 08:52:21 +0100 Subject: [PATCH 19/57] fix typos --- paper/paper.bib | 248 ++++++++++++++++++++---------------------------- paper/paper.md | 9 +- 2 files changed, 110 insertions(+), 147 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index b45a5c89..057fda79 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -13,175 +13,137 @@ @article{bartel2024structure } @article{burchard2003, -title = {A high-order conservative Patankar-type discretisation for stiff systems of production–destruction equations}, -journal = {Applied Numerical Mathematics}, -volume = {47}, -number = {1}, -pages = {1-30}, -year = {2003}, -issn = {0168-9274}, -doi = {https://doi.org/10.1016/S0168-9274(03)00101-6}, -url = {https://www.sciencedirect.com/science/article/pii/S0168927403001016}, -author = {Hans Burchard and Eric Deleersnijder and Andreas Meister}, -keywords = {Patankar-type schemes, Runge–Kutta methods, Unconditional positivity, Conservativity}, + title={A high-order conservative {P}atankar-type discretisation for + stiff systems of production--destruction equations}, + author={Burchard, Hans and Deleersnijder, Eric and Meister, Andreas}, + journal={Applied Numerical Mathematics}, + volume={47}, + number={1}, + pages={1--30}, + year={2003}, + publisher={Elsevier}, + doi={10.1016/S0168-9274(03)00101-6} } @article{kopeczmeister2018order2, -title = {On order conditions for modified Patankar–Runge–Kutta schemes}, -journal = {Applied Numerical Mathematics}, -volume = {123}, -pages = {159-179}, -year = {2018}, -issn = {0168-9274}, -doi = {https://doi.org/10.1016/j.apnum.2017.09.004}, -url = {https://www.sciencedirect.com/science/article/pii/S0168927417301861}, -author = {S. Kopecz and A. Meister}, -keywords = {Patankar-type schemes, Runge–Kutta methods, Unconditional positivity, Conservativity}, + title={On order conditions for modified {P}atankar-{R}unge-{K}utta + schemes}, + author={Kopecz, Stefan and Meister, Andreas}, + journal={Applied Numerical Mathematics}, + volume={123}, + pages={159--179}, + year={2018}, + publisher={Elsevier}, + doi={10.1016/j.apnum.2017.09.004} } @article {kopeczmeister2018order3, - AUTHOR = {Kopecz, Stefan and Meister, Andreas}, - TITLE = {Unconditionally positive and conservative third order modified - {P}atankar-{R}unge-{K}utta discretizations of - production-destruction systems}, - JOURNAL = {BIT}, - FJOURNAL = {BIT. Numerical Mathematics}, - VOLUME = {58}, - YEAR = {2018}, - NUMBER = {3}, - PAGES = {691--728}, - ISSN = {0006-3835,1572-9125}, - MRCLASS = {65L06 (65L05 65L20)}, - MRNUMBER = {3855688}, -MRREVIEWER = {Luigi\ Brugnano}, - DOI = {10.1007/s10543-018-0705-1}, - URL = {https://doi.org/10.1007/s10543-018-0705-1}, + title={Unconditionally positive and conservative third order + modified {P}atankar-{R}unge-{K}utta discretizations of + production--destruction systems}, + author={Kopecz, Stefan and Meister, Andreas}, + journal={BIT Numerical Mathematics}, + volume={58}, + number={3}, + pages={691--728}, + year={2018}, + publisher={Springer}, + doi={10.1007/s10543-018-0705-1} } @article {kopeczmeister2019, - AUTHOR = {Kopecz, Stefan and Meister, Andreas}, - TITLE = {On the existence of three-stage third-order modified - {P}atankar-{R}unge-{K}utta schemes}, - JOURNAL = {Numer. Algorithms}, - FJOURNAL = {Numerical Algorithms}, - VOLUME = {81}, - YEAR = {2019}, - NUMBER = {4}, - PAGES = {1473--1484}, - ISSN = {1017-1398,1572-9265}, - MRCLASS = {65L06}, - MRNUMBER = {3987250}, - DOI = {10.1007/s11075-019-00680-3}, - URL = {https://doi.org/10.1007/s11075-019-00680-3}, + title={On the existence of three-stage third-order modified + {P}atankar-{R}unge-{K}utta schemes}, + author={Kopecz, Stefan and Meister, Andreas}, + journal={Numerical Algorithms}, + pages={1--12}, + year={2019}, + publisher={Springer}, + doi={10.1007/s11075-019-00680-3} } @article {izgin2022stability1, - AUTHOR = {Izgin, Thomas and Kopecz, Stefan and Meister, Andreas}, - TITLE = {On {L}yapunov stability of positive and conservative time - integrators and application to second order modified - {P}atankar-{R}unge-{K}utta schemes}, - JOURNAL = {ESAIM Math. Model. Numer. Anal.}, - FJOURNAL = {ESAIM. Mathematical Modelling and Numerical Analysis}, - VOLUME = {56}, - YEAR = {2022}, - NUMBER = {3}, - PAGES = {1053--1080}, - ISSN = {2822-7840,2804-7214}, - MRCLASS = {65L05 (65L06 65L20)}, - MRNUMBER = {4420893}, -MRREVIEWER = {Qin\ Sheng}, - DOI = {10.1051/m2an/2022031}, - URL = {https://doi.org/10.1051/m2an/2022031}, + title={On {L}yapunov stability of positive and conservative + time integrators and application to second order modified + {P}atankar-{R}unge-{K}utta schemes}, + author={Izgin, Thomas and Kopecz, Stefan and Meister, Andreas}, + journal={ESAIM: Mathematical Modelling and Numerical Analysis}, + volume={56}, + number={3}, + pages={1053--1080}, + year={2022}, + publisher={EDP Sciences}, + doi={10.1051/m2an/2022031}} } @article {izgin2022stability2, - AUTHOR = {Izgin, Thomas and Kopecz, Stefan and Meister, Andreas}, - TITLE = {On the stability of unconditionally positive and linear - invariants preserving time integration schemes}, - JOURNAL = {SIAM J. Numer. Anal.}, - FJOURNAL = {SIAM Journal on Numerical Analysis}, - VOLUME = {60}, - YEAR = {2022}, - NUMBER = {6}, - PAGES = {3029--3051}, - ISSN = {0036-1429,1095-7170}, - MRCLASS = {65L05 (34D20 65L20)}, - MRNUMBER = {4509959}, -MRREVIEWER = {Lajos\ L\'oczi}, - DOI = {10.1137/22M1480318}, - URL = {https://doi.org/10.1137/22M1480318}, + title={On the stability of unconditionally positive and linear invariants + preserving time integration schemes}, + author={Izgin, Thomas and Kopecz, Stefan and Meister, Andreas}, + journal={SIAM Journal on Numerical Analysis}, + volume={60}, + number={6}, + pages={3029--3051}, + year={2022}, + publisher={SIAM}, + doi={10.1137/22M1480318} } @article {huang2023, - AUTHOR = {Huang, Juntao and Izgin, Thomas and Kopecz, Stefan and - Meister, Andreas and Shu, Chi-Wang}, - TITLE = {On the stability of strong-stability-preserving modified - {P}atankar-{R}unge-{K}utta schemes}, - JOURNAL = {ESAIM Math. Model. Numer. Anal.}, - FJOURNAL = {ESAIM. Mathematical Modelling and Numerical Analysis}, - VOLUME = {57}, - YEAR = {2023}, - NUMBER = {2}, - PAGES = {1063--1086}, - ISSN = {2822-7840,2804-7214}, - MRCLASS = {65L05 (65L06 65L20)}, - MRNUMBER = {4574004}, -MRREVIEWER = {Raymond\ J.\ Spiteri}, - DOI = {10.1051/m2an/2023005}, - URL = {https://doi.org/10.1051/m2an/2023005}, + title={On the stability of strong-stability-preserving modified + {P}atankar-{R}unge-{K}utta schemes}, + author={Huang, Juntao and Izgin, Thomas and Kopecz, Stefan and + Meister, Andreas and Shu, Chi-Wang}, + journal={ESAIM: Mathematical Modelling and Numerical Analysis}, + volume={57}, + number={2}, + pages={1063--1086}, + year={2023}, + publisher={EDP Sciences}, + doi={10.1051/m2an/2023005} } @article {huang2019order3, - AUTHOR = {Huang, Juntao and Zhao, Weifeng and Shu, Chi-Wang}, - TITLE = {A third-order unconditionally positivity-preserving scheme for - production-destruction equations with applications to - non-equilibrium flows}, - JOURNAL = {J. Sci. Comput.}, - FJOURNAL = {Journal of Scientific Computing}, - VOLUME = {79}, - YEAR = {2019}, - NUMBER = {2}, - PAGES = {1015--1056}, - ISSN = {0885-7474,1573-7691}, - MRCLASS = {65M06 (76Nxx 76V05)}, - MRNUMBER = {3969000}, - DOI = {10.1007/s10915-018-0881-9}, - URL = {https://doi.org/10.1007/s10915-018-0881-9}, + title={A Third-Order Unconditionally Positivity-Preserving Scheme for + Production-Destruction Equations with Applications to + Non-equilibrium Flows}, + author={Huang, Juntao and Zhao, Weifeng and Shu, Chi-Wang}, + journal={Journal of Scientific Computing}, + volume={79}, + number={2}, + pages={1015--1056}, + year={2019}, + publisher={Springer}, + doi={10.1007/s10915-018-0881-9} } @article {huang2019order2, - AUTHOR = {Huang, Juntao and Shu, Chi-Wang}, - TITLE = {Positivity-preserving time discretizations for - production-destruction equations with applications to - non-equilibrium flows}, - JOURNAL = {J. Sci. Comput.}, - FJOURNAL = {Journal of Scientific Computing}, - VOLUME = {78}, - YEAR = {2019}, - NUMBER = {3}, - PAGES = {1811--1839}, - ISSN = {0885-7474,1573-7691}, - MRCLASS = {65M06 (65L06 65M20 76V05)}, - MRNUMBER = {3934688}, -MRREVIEWER = {Qifeng\ Zhang}, - DOI = {10.1007/s10915-018-0852-1}, - URL = {https://doi.org/10.1007/s10915-018-0852-1}, + title={Positivity-Preserving Time Discretizations for + Production-Destruction Equations with Applications to + Non-equilibrium Flows}, + author={Huang, Juntao and Shu, Chi-Wang}, + journal={Journal of Scientific Computing}, + volume={78}, + number={3}, + pages={1811--1839}, + year={2019}, + publisher={Springer}, + doi={10.1007/s10915-018-0852-1} } @article {torlo2022, - AUTHOR = {Torlo, Davide and \"Offner, Philipp and Ranocha, Hendrik}, - TITLE = {Issues with positivity-preserving {P}atankar-type schemes}, - JOURNAL = {Appl. Numer. Math.}, - FJOURNAL = {Applied Numerical Mathematics. An IMACS Journal}, - VOLUME = {182}, - YEAR = {2022}, - PAGES = {117--147}, - ISSN = {0168-9274,1873-5460}, - MRCLASS = {65L06 (65L04)}, - MRNUMBER = {4469089}, - DOI = {10.1016/j.apnum.2022.07.014}, - URL = {https://doi.org/10.1016/j.apnum.2022.07.014}, + title={Issues with Positivity-Preserving {P}atankar-type Schemes}, + author={Torlo, Davide and \"Offner, Philipp and Ranocha, Hendrik}, + journal={Applied Numerical Mathematics}, + year={2022}, + month={08}, + volume={182}, + pages={117--147}, + doi={10.1016/j.apnum.2022.07.014}, + eprint={2108.07347}, + eprinttype={arxiv}, + eprintclass={math.NA} } @incollection {benz2009, @@ -190,10 +152,10 @@ @incollection {benz2009 advection-diffusion-reaction equations in biochemical applications}, BOOKTITLE = {Hyperbolic problems: theory, numerics and applications}, - SERIES = {Proc. Sympos. Appl. Math.}, + SERIES = {Proceedings of Symposia in Applied Mathematics}, VOLUME = {67, Part 2}, PAGES = {399--408}, - PUBLISHER = {Amer. Math. Soc., Providence, RI}, + PUBLISHER = {American Mathematical Society, Providence, RI}, YEAR = {2009}, ISBN = {978-0-8218-4730-5}, MRCLASS = {65M06 (35K57 76B15 92E20)}, diff --git a/paper/paper.md b/paper/paper.md index 1125f326..97c6cab8 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -26,16 +26,15 @@ bibliography: paper.bib # Summary -Many systems of ordinary differential equations that model real life applications possess positive solutions and it is quite natural to demand that numerical solutions of such systems should be positive as well. Unfortunately, positivty is a property that is not preserved by standard time integration schemes such as Runge--Kutta schemes, Rosenbrock methods or linear multistep methods. Therefore, various new, unconditionally positive schemes have been introduced in recent years. Unfortunately, these new methods are not freely available and therefore not applicable for most users and also not comparable within the scientific community. +Many systems of ordinary differential equations that model real-life applications have positive solutions, and it is quite natural to require that numerical solutions of such systems also remain positive. Unfortunately, positivity is a property that standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. Consequently, various new, unconditionally positive schemes have been introduced in recent years. Unfortunately, these new methods are not widely available, making them inaccessible to most users and limiting their comparability within the scientific community. + +We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various positive time integration schemes, making these methods usable and comparable. -Here we describe `PostiveIntegrators.jl` a julia package that provides efficient implementations of various positive time integration schemes and thus makes these methods usable and comparable. # Statement of need TODO -@bartel2024structure - # Features @@ -59,6 +58,8 @@ TODO @huang2023 @torlo2022 +@bartel2024structure + # Acknowledgements From 69a1a709c1527d80b2fd99060b1968c651aae385 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 3 Mar 2025 10:16:52 +0100 Subject: [PATCH 20/57] Update paper.bib --- paper/paper.bib | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 057fda79..858a517b 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -146,21 +146,16 @@ @article {torlo2022 eprintclass={math.NA} } -@incollection {benz2009, - AUTHOR = {Benz, Joachim and Meister, Andreas and Zardo, Philipp Andrea}, - TITLE = {A conservative, positivity preserving scheme for - advection-diffusion-reaction equations in biochemical - applications}, - BOOKTITLE = {Hyperbolic problems: theory, numerics and applications}, - SERIES = {Proceedings of Symposia in Applied Mathematics}, - VOLUME = {67, Part 2}, - PAGES = {399--408}, - PUBLISHER = {American Mathematical Society, Providence, RI}, - YEAR = {2009}, - ISBN = {978-0-8218-4730-5}, - MRCLASS = {65M06 (35K57 76B15 92E20)}, - MRNUMBER = {2605235}, -MRREVIEWER = {Laurent\ E.\ Gosse}, - DOI = {10.1090/psapm/067.2/2605235}, - URL = {https://doi.org/10.1090/psapm/067.2/2605235}, +@inbook{benzmeister2015, + author="Meister, Andreas and Benz, Joachim", + editor="Freeden, Willi and Nashed, M. Zuhair and Sonar, Thomas", + title="Phosphorus Cycles in Lakes and Rivers: Modeling, Analysis, and Simulation", + bookTitle="Handbook of Geomathematics", + year="2015", + publisher="Springer Berlin Heidelberg", + address="Berlin, Heidelberg", + pages="1387--1416", + isbn="978-3-642-54551-1", + doi="10.1007/978-3-642-54551-1_23", + url="https://doi.org/10.1007/978-3-642-54551-1_23" } From 816b7d026e8990e562ba1a51834bd3afd2023e80 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 3 Mar 2025 10:17:23 +0100 Subject: [PATCH 21/57] Update paper.md --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 97c6cab8..0733486a 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -50,7 +50,7 @@ TODO @kopeczmeister2018order3 @huang2019order2 @huang2019order3 -@benz2009 +@benzmeister2015 @kopeczmeister2019 @izgin2022stability1 From 2a250aa1f2582e9a6410c706d14aa811b0b6fbe1 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 3 Mar 2025 11:33:32 +0100 Subject: [PATCH 22/57] Update paper.bib --- paper/paper.bib | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/paper/paper.bib b/paper/paper.bib index 858a517b..126a7c09 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -159,3 +159,20 @@ @inbook{benzmeister2015 doi="10.1007/978-3-642-54551-1_23", url="https://doi.org/10.1007/978-3-642-54551-1_23" } + +@article {izginoeffner2023, + AUTHOR = {Izgin, Thomas and \"Offner, Philipp}, + TITLE = {A study of the local dynamics of modified {P}atankar {D}e{C} + and higher order modified {P}atankar-{RK} methods}, + JOURNAL = {ESAIM Math. Model. Numer. Anal.}, + FJOURNAL = {ESAIM. Mathematical Modelling and Numerical Analysis}, + VOLUME = {57}, + YEAR = {2023}, + NUMBER = {4}, + PAGES = {2319--2348}, + ISSN = {2822-7840,2804-7214}, + MRCLASS = {65L05 (65L06 65L20)}, + MRNUMBER = {4612598}, + DOI = {10.1051/m2an/2023053}, + URL = {https://doi.org/10.1051/m2an/2023053}, +} From b0117d74f66ead50e1843213e0a91cabea64959c Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 3 Mar 2025 11:34:29 +0100 Subject: [PATCH 23/57] Update paper.md --- paper/paper.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 0733486a..38d526f9 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -43,20 +43,15 @@ TODO # Related research and software -TODO +The first order scheme `MPE` together with the first second order MPRK scheme were introduced in @burchard2003. Based on these, the family of `MPRK22` schemes was developed in @kopeczmeister2018order2. This also lead to the introduction of the `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. + +All aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPR22` in @huang2019order2 and the third order scheme `SSMPRK43` in @huang2019order3. + +The implemented schemes were originally introduced only for conservative production-destruction systems. An extension to non-conservative production-destrucion-systems was presented in @benzmeister2015. We implemented a modification of the algorithm suggested in @benzmeister2015, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. -@burchard2003 -@kopeczmeister2018order2 -@kopeczmeister2018order3 -@huang2019order2 -@huang2019order3 -@benzmeister2015 - -@kopeczmeister2019 -@izgin2022stability1 -@izgin2022stability2 -@huang2023 -@torlo2022 +Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the following papers: @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023 + +TODO @bartel2024structure From 094a8bc9738d2fb08fd8bf7aa658bfea4c8e3018 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 3 Mar 2025 11:36:57 +0100 Subject: [PATCH 24/57] Update paper.bib --- paper/paper.bib | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 126a7c09..f38a4397 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -164,8 +164,7 @@ @article {izginoeffner2023 AUTHOR = {Izgin, Thomas and \"Offner, Philipp}, TITLE = {A study of the local dynamics of modified {P}atankar {D}e{C} and higher order modified {P}atankar-{RK} methods}, - JOURNAL = {ESAIM Math. Model. Numer. Anal.}, - FJOURNAL = {ESAIM. Mathematical Modelling and Numerical Analysis}, + journal={ESAIM: Mathematical Modelling and Numerical Analysis}, VOLUME = {57}, YEAR = {2023}, NUMBER = {4}, From 9ac3808d490f256e021c5930e512649f0a4e1807 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 3 Mar 2025 11:38:09 +0100 Subject: [PATCH 25/57] Update paper.md --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 38d526f9..d8d7d283 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -47,7 +47,7 @@ The first order scheme `MPE` together with the first second order MPRK scheme we All aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPR22` in @huang2019order2 and the third order scheme `SSMPRK43` in @huang2019order3. -The implemented schemes were originally introduced only for conservative production-destruction systems. An extension to non-conservative production-destrucion-systems was presented in @benzmeister2015. We implemented a modification of the algorithm suggested in @benzmeister2015, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. +The implemented schemes were originally introduced only for conservative production-destruction systems. An extension to non-conservative production-destruction-systems was presented in @benzmeister2015. We implemented a modification of the algorithm suggested in @benzmeister2015, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the following papers: @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023 From fc31c140972ee7072a4f30044f9078b781d8e992 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Mon, 3 Mar 2025 11:41:51 +0100 Subject: [PATCH 26/57] Update paper.md --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index d8d7d283..2d9341b0 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -45,7 +45,7 @@ TODO The first order scheme `MPE` together with the first second order MPRK scheme were introduced in @burchard2003. Based on these, the family of `MPRK22` schemes was developed in @kopeczmeister2018order2. This also lead to the introduction of the `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. -All aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPR22` in @huang2019order2 and the third order scheme `SSMPRK43` in @huang2019order3. +All aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPRK22` in @huang2019order2 and the third order scheme `SSPMPRK43` in @huang2019order3. The implemented schemes were originally introduced only for conservative production-destruction systems. An extension to non-conservative production-destruction-systems was presented in @benzmeister2015. We implemented a modification of the algorithm suggested in @benzmeister2015, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. From c552457a6ef20a9309f0464f8b189d9a8e14e8c8 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Tue, 1 Apr 2025 14:09:39 +0200 Subject: [PATCH 27/57] Added reference and a short text on MPDeC. --- paper/paper.bib | 16 ++++++++++++++++ paper/paper.md | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index f38a4397..856b4f47 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -175,3 +175,19 @@ @article {izginoeffner2023 DOI = {10.1051/m2an/2023053}, URL = {https://doi.org/10.1051/m2an/2023053}, } + + +@article {OeffnerTorlo2020, + AUTHOR = {\"Offner, Philipp and Torlo, Davide}, + TITLE = {Arbitrary high-order, conservative and positivity preserving + {P}atankar-type deferred correction schemes}, + JOURNAL = {Applied Numerical Mathematics}, + VOLUME = {153}, + YEAR = {2020}, + PAGES = {15--34}, + ISSN = {0168-9274,1873-5460}, + MRCLASS = {65L06}, + MRNUMBER = {4064785}, + DOI = {10.1016/j.apnum.2020.01.025}, + URL = {https://doi.org/10.1016/j.apnum.2020.01.025}, +} \ No newline at end of file diff --git a/paper/paper.md b/paper/paper.md index 2d9341b0..489ad260 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -43,11 +43,14 @@ TODO # Related research and software -The first order scheme `MPE` together with the first second order MPRK scheme were introduced in @burchard2003. Based on these, the family of `MPRK22` schemes was developed in @kopeczmeister2018order2. This also lead to the introduction of the `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. + +The first MPRK schemes were introduced in @burchard2003. These are the first order scheme `MPE` and a second order scheme based on Heun's method. To avoid the restricion to Heun's method, the second order `MPRK22` schemes were developed in @kopeczmeister2018order2. The techniques developed therein, also enabled a generalization to third order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. All aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPRK22` in @huang2019order2 and the third order scheme `SSPMPRK43` in @huang2019order3. -The implemented schemes were originally introduced only for conservative production-destruction systems. An extension to non-conservative production-destruction-systems was presented in @benzmeister2015. We implemented a modification of the algorithm suggested in @benzmeister2015, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. +Starting from a low order scheme, the deferred correction approach can be used to increase the scheme's approximation order iteratively. In @OeffnerTorlo2020 deferred correction was combined with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes. + +All implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction-systems was presented in @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the following papers: @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023 From a5880209c3c2563b313ab1f2f03759afa7b85781 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Tue, 1 Apr 2025 14:10:57 +0200 Subject: [PATCH 28/57] corrected typo --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 489ad260..d8c3eaab 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -44,7 +44,7 @@ TODO # Related research and software -The first MPRK schemes were introduced in @burchard2003. These are the first order scheme `MPE` and a second order scheme based on Heun's method. To avoid the restricion to Heun's method, the second order `MPRK22` schemes were developed in @kopeczmeister2018order2. The techniques developed therein, also enabled a generalization to third order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. +The first MPRK schemes were introduced in @burchard2003. These are the first order scheme `MPE` and a second order scheme based on Heun's method. To avoid the restriction to Heun's method, the second order `MPRK22` schemes were developed in @kopeczmeister2018order2. The techniques developed therein, also enabled a generalization to third order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. All aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPRK22` in @huang2019order2 and the third order scheme `SSPMPRK43` in @huang2019order3. From 35ee35ce799c44c7712e646d1b44b912b481cbdc Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Tue, 1 Apr 2025 15:51:22 +0200 Subject: [PATCH 29/57] First thoughts on realted software --- paper/paper.bib | 16 ++++++++++++++++ paper/paper.md | 9 +++++++++ 2 files changed, 25 insertions(+) diff --git a/paper/paper.bib b/paper/paper.bib index 856b4f47..1bafba9e 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -190,4 +190,20 @@ @article {OeffnerTorlo2020 MRNUMBER = {4064785}, DOI = {10.1016/j.apnum.2020.01.025}, URL = {https://doi.org/10.1016/j.apnum.2020.01.025}, +} + +@article {Shampine2005, + AUTHOR = {Shampine, L. F. and Thompson, S. and Kierzenka, J. A. and + Byrne, G. D.}, + TITLE = {Non-negative solutions of {ODE}s}, + JOURNAL = {Applied Mathematics and Computation}, + VOLUME = {170}, + YEAR = {2005}, + NUMBER = {1}, + PAGES = {556--569}, + ISSN = {0096-3003,1873-5649}, + MRCLASS = {34C11}, + MRNUMBER = {2177561}, + DOI = {10.1016/j.amc.2004.12.011}, + URL = {https://doi.org/10.1016/j.amc.2004.12.011}, } \ No newline at end of file diff --git a/paper/paper.md b/paper/paper.md index d8c3eaab..b86584ca 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -54,6 +54,15 @@ All implemented schemes were originally introduced for conservative production-d Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the following papers: @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023 +Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library which offers MPRK schemes. + +A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of `Differentialequtions'jl` or the commercial package `Matlab` is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. + +Another possibility is to reduce the chosen time step size beyond accuracy considerations until a non-negative approximation is calculated. This can be achieved in `DifferentialEquations.jl` using the solver option `isoutofdomain`. + +Some papers on MPRK schemes offer supplementary codes. However, these are mainly small scripts for the reproduction of results shown in the papers and are not intended as software libraries. + + TODO @bartel2024structure From b64961827d684e189506b633212ffd57731fdc21 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Tue, 1 Apr 2025 16:04:31 +0200 Subject: [PATCH 30/57] First features --- paper/paper.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index b86584ca..7431624a 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -38,7 +38,11 @@ TODO # Features -TODO +- Production-destruction problems `PDSProblem` and `ConservativePDSProblem`, including conversions to standard ODEProblems from `DifferentialEquations.jl` +- Modified Patankar methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of Kopecz and Meister +- SSP MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu +- `MPDeC` methods of Öffner and Torlo +- Extensions of the above schemes for non-conservative and non-autonomous production-destruction systems, mostly using adaptive time stepping # Related research and software @@ -55,12 +59,10 @@ All implemented schemes were originally introduced for conservative production-d Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the following papers: @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023 Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library which offers MPRK schemes. - A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of `Differentialequtions'jl` or the commercial package `Matlab` is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. - Another possibility is to reduce the chosen time step size beyond accuracy considerations until a non-negative approximation is calculated. This can be achieved in `DifferentialEquations.jl` using the solver option `isoutofdomain`. -Some papers on MPRK schemes offer supplementary codes. However, these are mainly small scripts for the reproduction of results shown in the papers and are not intended as software libraries. +In addition, some papers on MPRK schemes offer supplementary codes. However, these are mainly small scripts for the reproduction of results shown in the papers and are not intended as software libraries. TODO From 133f32024c84e44106f8c16af94a6d67e355b295 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Tue, 1 Apr 2025 16:13:22 +0200 Subject: [PATCH 31/57] minor changes --- paper/paper.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 7431624a..237f61a2 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -47,6 +47,7 @@ TODO # Related research and software +## Research The first MPRK schemes were introduced in @burchard2003. These are the first order scheme `MPE` and a second order scheme based on Heun's method. To avoid the restriction to Heun's method, the second order `MPRK22` schemes were developed in @kopeczmeister2018order2. The techniques developed therein, also enabled a generalization to third order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. @@ -54,15 +55,17 @@ All aforementioned schemes were derived from the classical formulation of Runge- Starting from a low order scheme, the deferred correction approach can be used to increase the scheme's approximation order iteratively. In @OeffnerTorlo2020 deferred correction was combined with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes. -All implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction-systems was presented in @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. +The implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction-systems was presented in @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the following papers: @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023 +## Software + Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library which offers MPRK schemes. -A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of `Differentialequtions'jl` or the commercial package `Matlab` is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. +A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of `Differentialequtions.jl` or the commercial package `Matlab` is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. Another possibility is to reduce the chosen time step size beyond accuracy considerations until a non-negative approximation is calculated. This can be achieved in `DifferentialEquations.jl` using the solver option `isoutofdomain`. -In addition, some papers on MPRK schemes offer supplementary codes. However, these are mainly small scripts for the reproduction of results shown in the papers and are not intended as software libraries. +We also mention that some papers on MPRK schemes offer supplementary codes. However, these are mainly small scripts for the reproduction of results shown in the papers and are not intended as software libraries. TODO From a4ee226404d9481b88facb6e44b6fcfab9f7765a Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Wed, 2 Apr 2025 11:19:47 +0200 Subject: [PATCH 32/57] First draft statement of need --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 237f61a2..206e41e3 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -33,7 +33,7 @@ We introduce PositiveIntegrators.jl, a Julia package that provides efficient imp # Statement of need -TODO +Positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions of specific ordinary differential equations. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method. However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iterations poses a problem. Another strategy for preserving positivity used in existing open source or commercial packages is to set negative solution components that are accepted by the step size control to zero, which can have a negative impact on possible conservations properties of the ODE system. Other approaches in the literature are additional projections after the calculation of negative solutions or it is tried to reduce the time step until a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used, although the preservation of positivity is again subject to step size limitations. Other approaches, especially modified Patankar--Runge--Kutta methods, are not yet available in software packages. We make these methods available to make them usable for users and comparable for researchers. # Features From fc00f71e0bdbe42998242f29cf12b7535af32ec3 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Wed, 2 Apr 2025 11:50:57 +0200 Subject: [PATCH 33/57] revised features sectoin --- paper/paper.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 206e41e3..d0ae2352 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -38,12 +38,16 @@ Positivity-preserving time integration methods are helpful or even necessary to # Features -- Production-destruction problems `PDSProblem` and `ConservativePDSProblem`, including conversions to standard ODEProblems from `DifferentialEquations.jl` -- Modified Patankar methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of Kopecz and Meister -- SSP MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu -- `MPDeC` methods of Öffner and Torlo -- Extensions of the above schemes for non-conservative and non-autonomous production-destruction systems, mostly using adaptive time stepping +The package is fully compatible with `DifferentialEquations.jl` and therefore many features that are available there can be used directly. +It offers implementations of conservative and non-conservative production-destruction systems, including conversions to standard `ODEProblem`s from `DifferentialEquations.jl`. +Production-destruction systems are the building blocks for solving differential equations with MPRK schemes. +The package provides several MPRK methods to solve production-destruction systems: +- The MPRK methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of Kopecz and Meister are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. +- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. +- The `MPDeC` methods of Öffner and Torlo combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. + +In addition, the methods mentioned above have been extended so that non-conservative and non-autonomous production-destruction systems can be solved as well. Furthermore, adaptive step size control is available for most schemes. # Related research and software From 0c26a5b239e9537bff9b12f1f0fd10ca67f1d0b2 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Wed, 2 Apr 2025 15:14:41 +0200 Subject: [PATCH 34/57] restructured summary and statement of need --- paper/paper.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index d0ae2352..ecd2c318 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -26,28 +26,34 @@ bibliography: paper.bib # Summary -Many systems of ordinary differential equations that model real-life applications have positive solutions, and it is quite natural to require that numerical solutions of such systems also remain positive. Unfortunately, positivity is a property that standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. Consequently, various new, unconditionally positive schemes have been introduced in recent years. Unfortunately, these new methods are not widely available, making them inaccessible to most users and limiting their comparability within the scientific community. - -We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various positive time integration schemes, making these methods usable and comparable. +We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various modified Patankar--Runge--Kutta (MPRK) schemes, making these methods accessible for users and comparable for researchers. MPRK schemes are unconditionally positive time integration schemes for the the solution of positive differential equations. In addition, the numerical solutions preserve the conservation property when applied to a conservative system. +The package is fully compatible with `DifferentialEquations.jl`, which allows a direct comparison of MPRK and standard schemes. # Statement of need -Positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions of specific ordinary differential equations. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method. However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iterations poses a problem. Another strategy for preserving positivity used in existing open source or commercial packages is to set negative solution components that are accepted by the step size control to zero, which can have a negative impact on possible conservations properties of the ODE system. Other approaches in the literature are additional projections after the calculation of negative solutions or it is tried to reduce the time step until a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used, although the preservation of positivity is again subject to step size limitations. Other approaches, especially modified Patankar--Runge--Kutta methods, are not yet available in software packages. We make these methods available to make them usable for users and comparable for researchers. +Many systems of ordinary differential equations that model real-life applications have positive solutions, and it is quite natural to require that numerical solutions of such systems also remain positive. +For some of these systems unconditionally positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions. +Unfortunately, positivity is a property that almost all standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. +The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method. However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. +Another strategy for preserving positivity used in existing open source or commercial packages (Matlab) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Other approaches in the literature include additional projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used, but the preservation of positivity is again subject to step size limitations. + +Consequently, various new, unconditionally positive schemes, especially modified Patankar--Runge--Kutta (MPRK) methods, have been introduced in recent years. +Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. `PositiveIntegrators.jl` makes these methods available and thus usable and comparable. # Features -The package is fully compatible with `DifferentialEquations.jl` and therefore many features that are available there can be used directly. -It offers implementations of conservative and non-conservative production-destruction systems, including conversions to standard `ODEProblem`s from `DifferentialEquations.jl`. -Production-destruction systems are the building blocks for solving differential equations with MPRK schemes. +The package is fully compatible with `DifferentialEquations.jl` and therefore many features that are available there can be used directly. In particular, this allows a direct comparison of MPRK and standard schemes. +The package offers implementations of conservative as well as non-conservative production-destruction systems (PDS), which are the building blocks for solving differential equations with MPRK schemes. Furthermore, conversions of these PDS to standard `ODEProblem`s from `DifferentialEquations.jl` are provided. + +The package contains several MPRK methods: -The package provides several MPRK methods to solve production-destruction systems: - The MPRK methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of Kopecz and Meister are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. - The MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. - The `MPDeC` methods of Öffner and Torlo combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. -In addition, the methods mentioned above have been extended so that non-conservative and non-autonomous production-destruction systems can be solved as well. Furthermore, adaptive step size control is available for most schemes. +In addition, all implemented MPRK methods have been extended so that non-conservative and non-autonomous production-destruction systems can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. # Related research and software From 45c615d5a1b9f5054bf422ad1d573bc1fa369287 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Wed, 2 Apr 2025 15:37:09 +0200 Subject: [PATCH 35/57] minor changes --- paper/paper.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index ecd2c318..74b89b52 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -36,7 +36,7 @@ Many systems of ordinary differential equations that model real-life application For some of these systems unconditionally positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions. Unfortunately, positivity is a property that almost all standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method. However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. -Another strategy for preserving positivity used in existing open source or commercial packages (Matlab) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Other approaches in the literature include additional projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used, but the preservation of positivity is again subject to step size limitations. +Another strategy for preserving positivity used in existing open source or commercial packages (Matlab) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used to presere positivity, but this is again subject to step size limitations. Consequently, various new, unconditionally positive schemes, especially modified Patankar--Runge--Kutta (MPRK) methods, have been introduced in recent years. Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. `PositiveIntegrators.jl` makes these methods available and thus usable and comparable. @@ -45,7 +45,7 @@ Unfortunately, these new methods are not yet available in software packages, mak # Features The package is fully compatible with `DifferentialEquations.jl` and therefore many features that are available there can be used directly. In particular, this allows a direct comparison of MPRK and standard schemes. -The package offers implementations of conservative as well as non-conservative production-destruction systems (PDS), which are the building blocks for solving differential equations with MPRK schemes. Furthermore, conversions of these PDS to standard `ODEProblem`s from `DifferentialEquations.jl` are provided. +The package offers implementations of conservative as well as non-conservative production-destruction systems (PDS), which are the building blocks for the solution of differential equations with MPRK schemes. Furthermore, conversions of these PDS to standard `ODEProblem`s from `DifferentialEquations.jl` are provided. The package contains several MPRK methods: @@ -53,24 +53,20 @@ The package contains several MPRK methods: - The MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. - The `MPDeC` methods of Öffner and Torlo combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. -In addition, all implemented MPRK methods have been extended so that non-conservative and non-autonomous production-destruction systems can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. +In addition, all implemented MPRK methods have been extended so that non-conservative and non-autonomous PDS can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. # Related research and software -## Research - The first MPRK schemes were introduced in @burchard2003. These are the first order scheme `MPE` and a second order scheme based on Heun's method. To avoid the restriction to Heun's method, the second order `MPRK22` schemes were developed in @kopeczmeister2018order2. The techniques developed therein, also enabled a generalization to third order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. -All aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPRK22` in @huang2019order2 and the third order scheme `SSPMPRK43` in @huang2019order3. +The aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPRK22` in @huang2019order2 and the third order scheme `SSPMPRK43` in @huang2019order3. -Starting from a low order scheme, the deferred correction approach can be used to increase the scheme's approximation order iteratively. In @OeffnerTorlo2020 deferred correction was combined with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes. +Starting from a low order scheme, the deferred correction approach can be used to increase the scheme's approximation order iteratively. In @OeffnerTorlo2020 deferred correction was combined with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes for order 2 up to 10. The implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction-systems was presented in @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the following papers: @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023 -## Software - Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library which offers MPRK schemes. A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of `Differentialequtions.jl` or the commercial package `Matlab` is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. Another possibility is to reduce the chosen time step size beyond accuracy considerations until a non-negative approximation is calculated. This can be achieved in `DifferentialEquations.jl` using the solver option `isoutofdomain`. From b294e952faf5802966866ab1dcd2417fbba26c4d Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Wed, 2 Apr 2025 15:38:16 +0200 Subject: [PATCH 36/57] typo --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 74b89b52..3a4e8aba 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -36,7 +36,7 @@ Many systems of ordinary differential equations that model real-life application For some of these systems unconditionally positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions. Unfortunately, positivity is a property that almost all standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method. However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. -Another strategy for preserving positivity used in existing open source or commercial packages (Matlab) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used to presere positivity, but this is again subject to step size limitations. +Another strategy for preserving positivity used in existing open source or commercial packages (Matlab) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used to preserve positivity, but this is again subject to step size limitations. Consequently, various new, unconditionally positive schemes, especially modified Patankar--Runge--Kutta (MPRK) methods, have been introduced in recent years. Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. `PositiveIntegrators.jl` makes these methods available and thus usable and comparable. From c17b4fdbec9ef37b54018f4d6d09361de09a39f6 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Wed, 2 Apr 2025 15:42:50 +0200 Subject: [PATCH 37/57] minor changes --- paper/paper.md | 1 + 1 file changed, 1 insertion(+) diff --git a/paper/paper.md b/paper/paper.md index 3a4e8aba..8844131d 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -34,6 +34,7 @@ The package is fully compatible with `DifferentialEquations.jl`, which allows a Many systems of ordinary differential equations that model real-life applications have positive solutions, and it is quite natural to require that numerical solutions of such systems also remain positive. For some of these systems unconditionally positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions. + Unfortunately, positivity is a property that almost all standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method. However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. Another strategy for preserving positivity used in existing open source or commercial packages (Matlab) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used to preserve positivity, but this is again subject to step size limitations. From 4350564bace9093820dbf0bf7f7d1dd7580b96d9 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 2 Apr 2025 20:24:52 +0200 Subject: [PATCH 38/57] minor revisions --- paper/paper.bib | 47 ++++++++++++++++++++++++++++++++++++++++++++++- paper/paper.md | 35 ++++++++++++++++++----------------- 2 files changed, 64 insertions(+), 18 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 1bafba9e..17329518 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -206,4 +206,49 @@ @article {Shampine2005 MRNUMBER = {2177561}, DOI = {10.1016/j.amc.2004.12.011}, URL = {https://doi.org/10.1016/j.amc.2004.12.011}, -} \ No newline at end of file +} + +@article{rackauckas2017differentialequations, + title={{DifferentialEquations.jl} {--} {A} Performant and Feature-Rich + Ecosystem for Solving Differential Equations in {J}ulia}, + author={Rackauckas, Christopher and Nie, Qing}, + journal={Journal of Open Research Software}, + volume={5}, + number={1}, + pages={15}, + year={2017}, + publisher={Ubiquity Press}, + doi={10.5334/jors.151} +} + +@article{bezanson2017julia, + title={Julia: {A} Fresh Approach to Numerical Computing}, + author={Bezanson, Jeff and Edelman, Alan and Karpinski, Stefan and + Shah, Viral B}, + journal={SIAM Review}, + volume={59}, + number={1}, + pages={65--98}, + year={2017}, + publisher={SIAM}, + eprint={1411.1607}, + eprinttype={arxiv}, + eprintclass={cs.MS}, + doi={10.1137/141000671} +} + +@article{christ2023plots, + author={Christ, Simon and Schwabeneder, Daniel and Rackauckas, Christopher + and Borregaard, Michael Krabbe and Breloff, Thomas}, + title={Plots.jl --- a user extendable plotting {API} for the {J}ulia + programming language}, + journal={Journal of Open Research Software}, + volume={11}, + number={1}, + pages={5}, + year={2023}, + doi={10.5334/jors.431}, + eprint={2204.08775}, + eprinttype={arxiv}, + eprintclass={cs.GR} +} diff --git a/paper/paper.md b/paper/paper.md index 8844131d..48c23ee8 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -26,8 +26,8 @@ bibliography: paper.bib # Summary -We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various modified Patankar--Runge--Kutta (MPRK) schemes, making these methods accessible for users and comparable for researchers. MPRK schemes are unconditionally positive time integration schemes for the the solution of positive differential equations. In addition, the numerical solutions preserve the conservation property when applied to a conservative system. -The package is fully compatible with `DifferentialEquations.jl`, which allows a direct comparison of MPRK and standard schemes. +We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various modified Patankar--Runge--Kutta (MPRK) schemes, making these methods accessible for users and comparable for researchers. MPRK schemes are unconditionally positive time integration schemes for the solution of positive differential equations. In addition, the numerical solutions preserve the conservation property when applied to a conservative system. +The package is fully compatible with DifferentialEquations.jl, which allows a direct comparison of MPRK and standard schemes. # Statement of need @@ -36,17 +36,20 @@ Many systems of ordinary differential equations that model real-life application For some of these systems unconditionally positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions. Unfortunately, positivity is a property that almost all standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. -The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method. However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. -Another strategy for preserving positivity used in existing open source or commercial packages (Matlab) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, SSP Runge-Kutta methods can also be used to preserve positivity, but this is again subject to step size limitations. +The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method +(assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. +Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations. Consequently, various new, unconditionally positive schemes, especially modified Patankar--Runge--Kutta (MPRK) methods, have been introduced in recent years. -Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. `PositiveIntegrators.jl` makes these methods available and thus usable and comparable. +Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl makes these methods available and thus usable and comparable. # Features -The package is fully compatible with `DifferentialEquations.jl` and therefore many features that are available there can be used directly. In particular, this allows a direct comparison of MPRK and standard schemes. -The package offers implementations of conservative as well as non-conservative production-destruction systems (PDS), which are the building blocks for the solution of differential equations with MPRK schemes. Furthermore, conversions of these PDS to standard `ODEProblem`s from `DifferentialEquations.jl` are provided. +PositiveIntegrators.jl is written in Julia [@bezanson2017julia] and makes use of its strengths for scientific computing, e.g., ease of use and performance. +The package is fully compatible with DifferentialEquations.jl [@rackauckas2017differentialequations] and therefore many features that are available there can be used directly. In particular, this allows a direct comparison of MPRK and standard schemes. Moreover, it integrates well with the Julia ecosystem, e.g., by making it simple to visualize numerical solutions using dense output in Plots.jl [christ2023plots]. + +The package offers implementations of conservative as well as non-conservative production-destruction systems (PDS), which are the building blocks for the solution of differential equations with MPRK schemes. Furthermore, conversions of these PDS to standard `ODEProblem`s from DifferentialEquations.jl are provided. The package contains several MPRK methods: @@ -58,26 +61,24 @@ In addition, all implemented MPRK methods have been extended so that non-conserv # Related research and software -The first MPRK schemes were introduced in @burchard2003. These are the first order scheme `MPE` and a second order scheme based on Heun's method. To avoid the restriction to Heun's method, the second order `MPRK22` schemes were developed in @kopeczmeister2018order2. The techniques developed therein, also enabled a generalization to third order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes in @kopeczmeister2018order3. +The first MPRK schemes were introduced by @burchard2003. These are the first-order scheme `MPE` and a second-order scheme based on Heun's method. To avoid the restriction to Heun's method, the second-order `MPRK22` schemes were developed by @kopeczmeister2018order2. The techniques developed therein also enabled a generalization to third-order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes by @kopeczmeister2018order3. -The aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second order schemes `SSPMPRK22` in @huang2019order2 and the third order scheme `SSPMPRK43` in @huang2019order3. +The aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second-order schemes `SSPMPRK22` by @huang2019order2 and the third-order scheme `SSPMPRK43` by @huang2019order3. -Starting from a low order scheme, the deferred correction approach can be used to increase the scheme's approximation order iteratively. In @OeffnerTorlo2020 deferred correction was combined with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes for order 2 up to 10. +Starting from a low-order scheme, the deferred correction approach can be used to increase the scheme's approximation order iteratively. @OeffnerTorlo2020 combined deferred correction with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes for orders 2 up to 10. -The implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction-systems was presented in @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. +The implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction-systems was presented by @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. -Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the following papers: @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023 +Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023. Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library which offers MPRK schemes. -A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of `Differentialequtions.jl` or the commercial package `Matlab` is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. -Another possibility is to reduce the chosen time step size beyond accuracy considerations until a non-negative approximation is calculated. This can be achieved in `DifferentialEquations.jl` using the solver option `isoutofdomain`. +A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of Differentialequtions.jl or the commercial package MATLAB is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. +Another possibility is to reduce the chosen time step size beyond accuracy considerations until a non-negative approximation is calculated. This can be achieved in DifferentialEquations.jl using the solver option `isoutofdomain`. We also mention that some papers on MPRK schemes offer supplementary codes. However, these are mainly small scripts for the reproduction of results shown in the papers and are not intended as software libraries. -TODO - -@bartel2024structure +TODO: @bartel2024structure # Acknowledgements From 82be02f070b26dffbab2f7d7e8480300544f13a2 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 2 Apr 2025 20:30:59 +0200 Subject: [PATCH 39/57] additional references --- paper/paper.bib | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ paper/paper.md | 3 ++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/paper/paper.bib b/paper/paper.bib index 17329518..fb706b54 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -252,3 +252,52 @@ @article{christ2023plots eprinttype={arxiv}, eprintclass={cs.GR} } + +@article{nusslein2021positivity, + title={Positivity-Preserving Adaptive {R}unge-{K}utta Methods}, + author={N\"u{\ss}lein, Stephan and Ranocha, Hendrik and Ketcheson, David I}, + journal={Communications in Applied Mathematics and Computational Science}, + year={2021}, + month={11}, + doi={10.2140/camcos.2021.16.155}, + volume={16}, + number={2}, + pages={155--179}, + eprint={2005.06268}, + eprinttype={arxiv}, + eprintclass={math.NA} +} + +@article{sandu2001positive, + title={Positive numerical integration methods for chemical + kinetic systems}, + author={Sandu, Adrian}, + journal={Journal of Computational Physics}, + volume={170}, + number={2}, + pages={589--602}, + year={2001}, + publisher={Elsevier}, + doi={10.1006/jcph.2001.6750} +} + +@article{bolley1978conservation, + title={Conservation de la positivit{\'e} lors de la discr{\'e}tisation + des probl{\`e}mes d'{\'e}volution paraboliques}, + author={Bolley, Catherine and Crouzeix, Michel}, + journal={RAIRO. Analyse num{\'e}rique}, + volume={12}, + number={3}, + pages={237--245}, + year={1978}, + publisher={EDP Sciences} +} + +@book{gottlieb2011strong, + title={Strong stability preserving {R}unge-{K}utta and multistep time + discretizations}, + author={Gottlieb, Sigal and Ketcheson, David I and Shu, Chi-Wang}, + year={2011}, + publisher={World Scientific}, + address={Singapore} +} diff --git a/paper/paper.md b/paper/paper.md index 48c23ee8..0a1f9bd0 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -36,9 +36,10 @@ Many systems of ordinary differential equations that model real-life application For some of these systems unconditionally positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions. Unfortunately, positivity is a property that almost all standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. +In particular, higher-order general linear methods cannot preserve positivity unconditionally [@bolley1978conservation]. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method (assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. -Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps, if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations. +Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps [@sandu2001positive,@nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. Consequently, various new, unconditionally positive schemes, especially modified Patankar--Runge--Kutta (MPRK) methods, have been introduced in recent years. Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl makes these methods available and thus usable and comparable. From 7ac358de93a3f251342a79f71f3e217892119fad Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 2 Apr 2025 20:38:16 +0200 Subject: [PATCH 40/57] Sigal is no typo --- .typos.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .typos.toml diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..12ac8609 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +sigal = "sigal" From 96208172d39f9bdc214b8eceb16fafed708123aa Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 2 Apr 2025 20:40:28 +0200 Subject: [PATCH 41/57] fix citation --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 0a1f9bd0..4d814554 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -39,7 +39,7 @@ Unfortunately, positivity is a property that almost all standard time integratio In particular, higher-order general linear methods cannot preserve positivity unconditionally [@bolley1978conservation]. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method (assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. -Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps [@sandu2001positive,@nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. +Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. Consequently, various new, unconditionally positive schemes, especially modified Patankar--Runge--Kutta (MPRK) methods, have been introduced in recent years. Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl makes these methods available and thus usable and comparable. From fd79db15fae96f7caa0a8f0f1f9aadc14d1e33b7 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 2 Apr 2025 20:41:05 +0200 Subject: [PATCH 42/57] fix citation --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 4d814554..cc8bdac7 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -48,7 +48,7 @@ Unfortunately, these new methods are not yet available in software packages, mak # Features PositiveIntegrators.jl is written in Julia [@bezanson2017julia] and makes use of its strengths for scientific computing, e.g., ease of use and performance. -The package is fully compatible with DifferentialEquations.jl [@rackauckas2017differentialequations] and therefore many features that are available there can be used directly. In particular, this allows a direct comparison of MPRK and standard schemes. Moreover, it integrates well with the Julia ecosystem, e.g., by making it simple to visualize numerical solutions using dense output in Plots.jl [christ2023plots]. +The package is fully compatible with DifferentialEquations.jl [@rackauckas2017differentialequations] and therefore many features that are available there can be used directly. In particular, this allows a direct comparison of MPRK and standard schemes. Moreover, it integrates well with the Julia ecosystem, e.g., by making it simple to visualize numerical solutions using dense output in Plots.jl [@christ2023plots]. The package offers implementations of conservative as well as non-conservative production-destruction systems (PDS), which are the building blocks for the solution of differential equations with MPRK schemes. Furthermore, conversions of these PDS to standard `ODEProblem`s from DifferentialEquations.jl are provided. From 8d77367573b74b924a952fdd1a0eb93127a18dba Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Thu, 3 Apr 2025 14:40:25 +0200 Subject: [PATCH 43/57] Apply suggestions from code review Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- paper/paper.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index cc8bdac7..910ab09a 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -39,7 +39,7 @@ Unfortunately, positivity is a property that almost all standard time integratio In particular, higher-order general linear methods cannot preserve positivity unconditionally [@bolley1978conservation]. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method (assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. -Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections inbetween time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. +Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. Consequently, various new, unconditionally positive schemes, especially modified Patankar--Runge--Kutta (MPRK) methods, have been introduced in recent years. Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl makes these methods available and thus usable and comparable. @@ -64,11 +64,11 @@ In addition, all implemented MPRK methods have been extended so that non-conserv The first MPRK schemes were introduced by @burchard2003. These are the first-order scheme `MPE` and a second-order scheme based on Heun's method. To avoid the restriction to Heun's method, the second-order `MPRK22` schemes were developed by @kopeczmeister2018order2. The techniques developed therein also enabled a generalization to third-order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes by @kopeczmeister2018order3. -The aforementioned schemes were derived from the classical formulation of Runge-Kutta schemes. Using the Shu-Osher formulation instead lead to the introduction of the second-order schemes `SSPMPRK22` by @huang2019order2 and the third-order scheme `SSPMPRK43` by @huang2019order3. +The aforementioned schemes were derived from the classical formulation of Runge-Kutta methods. Using the Shu-Osher formulation instead lead to the introduction of the second-order schemes `SSPMPRK22` by @huang2019order2 and the third-order scheme `SSPMPRK43` by @huang2019order3. Starting from a low-order scheme, the deferred correction approach can be used to increase the scheme's approximation order iteratively. @OeffnerTorlo2020 combined deferred correction with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes for orders 2 up to 10. -The implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction-systems was presented by @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. +The implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction systems was presented by @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023. From 2bf926ed95430e5c7076aa07ecb238a4044a8977 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Thu, 3 Apr 2025 14:48:31 +0200 Subject: [PATCH 44/57] Additional comments from review --- paper/paper.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 910ab09a..2e34b271 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -54,21 +54,21 @@ The package offers implementations of conservative as well as non-conservative p The package contains several MPRK methods: -- The MPRK methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of Kopecz and Meister are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. -- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. -- The `MPDeC` methods of Öffner and Torlo combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. +- The MPRK methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of Kopecz and Meister @kopeczmeister2018order2, @kopeczmeister2018order3 are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. +- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu @huang2019order2, @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. +- The `MPDeC` methods of Öffner and Torlo @OeffnerTorlo2020 combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. In addition, all implemented MPRK methods have been extended so that non-conservative and non-autonomous PDS can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. # Related research and software -The first MPRK schemes were introduced by @burchard2003. These are the first-order scheme `MPE` and a second-order scheme based on Heun's method. To avoid the restriction to Heun's method, the second-order `MPRK22` schemes were developed by @kopeczmeister2018order2. The techniques developed therein also enabled a generalization to third-order schemes and thus the introduction of `MPRK43I` and `MPRK43II` schemes by @kopeczmeister2018order3. +The first MPRK method were introduced by @burchard2003. These are the first-order scheme `MPE` and a second-order scheme based on Heun's method. To avoid the restriction to Heun's method, the second-order `MPRK22` schemes were developed by @kopeczmeister2018order2. The techniques developed therein also enabled a generalization to third-order schemes and thus the introduction of `MPRK43I` and `MPRK43II` methods by @kopeczmeister2018order3. The aforementioned schemes were derived from the classical formulation of Runge-Kutta methods. Using the Shu-Osher formulation instead lead to the introduction of the second-order schemes `SSPMPRK22` by @huang2019order2 and the third-order scheme `SSPMPRK43` by @huang2019order3. -Starting from a low-order scheme, the deferred correction approach can be used to increase the scheme's approximation order iteratively. @OeffnerTorlo2020 combined deferred correction with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes for orders 2 up to 10. +Starting from a low-order method, the deferred correction approach can be used to increase the method's approximation order iteratively. @OeffnerTorlo2020 combined deferred correction with the MPRK idea to devise MPRK schemes of arbitrary order. These are implemented as `MPDeC` schemes for orders 2 up to 10. -The implemented schemes were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction systems was presented by @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. +The implemented methods were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction systems was presented by @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023. From c4cb37312a92999e17dbad1c206a7f7644e0aebd Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Thu, 3 Apr 2025 15:39:59 +0200 Subject: [PATCH 45/57] less focus on MPRK --- paper/paper.bib | 164 ++++++++++++++++++++++++++++++++++++++++++++++++ paper/paper.md | 16 ++--- 2 files changed, 173 insertions(+), 7 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index fb706b54..d740921b 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -301,3 +301,167 @@ @book{gottlieb2011strong publisher={World Scientific}, address={Singapore} } + +@article {Bruggeman2007, + AUTHOR = {Bruggeman, Jorn and Burchard, Hans and Kooi, Bob W. and + Sommeijer, Ben}, + TITLE = {A second-order, unconditionally positive, mass-conserving + integration scheme for biochemical systems}, + JOURNAL = {Applied Numerical Mathematics}, + VOLUME = {57}, + YEAR = {2007}, + NUMBER = {1}, + PAGES = {36--58}, + ISSN = {0168-9274,1873-5460}, + MRCLASS = {65L05 (92E20)}, + MRNUMBER = {2279505}, + DOI = {10.1016/j.apnum.2005.12.001}, + URL = {https://doi.org/10.1016/j.apnum.2005.12.001}, +} + +@article {Broekhuizen2008, + AUTHOR = {Broekhuizen, N. and Rickard, Graham J. and Bruggeman, J. and + Meister, A.}, + TITLE = {An improved and generalized second order, unconditionally + positive, mass conserving integration scheme for biochemical + systems}, + JOURNAL = {Applied Numerical Mathematics}, + VOLUME = {58}, + YEAR = {2008}, + NUMBER = {3}, + PAGES = {319--340}, + ISSN = {0168-9274,1873-5460}, + MRCLASS = {65L06 (92E20)}, + MRNUMBER = {2392690}, + DOI = {10.1016/j.apnum.2006.12.002}, + URL = {https://doi.org/10.1016/j.apnum.2006.12.002}, +} + +@article {Martiradonna2020, + AUTHOR = {Martiradonna, Angela and Colonna, Gianpiero and Diele, Fasma}, + TITLE = {{\it {G}e{C}o}: {G}eometric {C}onservative nonstandard schemes + for biochemical systems}, + JOURNAL = {Applied Numerical Mathematics}, + VOLUME = {155}, + YEAR = {2020}, + PAGES = {38--57}, + ISSN = {0168-9274,1873-5460}, + MRCLASS = {92C40 (65P10)}, + MRNUMBER = {4087156}, + DOI = {10.1016/j.apnum.2019.12.004}, + URL = {https://doi.org/10.1016/j.apnum.2019.12.004}, +} + +@article {Avila2021, + AUTHOR = {\'Avila, Andr\'es I. and Gonz\'alez, Galo Javier and Kopecz, + Stefan and Meister, Andreas}, + TITLE = {Extension of modified {P}atankar-{R}unge-{K}utta schemes to + nonautonomous production-destruction systems based on + {O}liver's approach}, + JOURNAL = {Journal of Computational and Applied Mathematics}, + VOLUME = {389}, + YEAR = {2021}, + PAGES = {Paper No. 113350, 13}, + ISSN = {0377-0427,1879-1778}, + MRCLASS = {65L06}, + MRNUMBER = {4194400}, + DOI = {10.1016/j.cam.2020.113350}, + URL = {https://doi.org/10.1016/j.cam.2020.113350}, +} + +@article {Avila2020, + AUTHOR = {\'Avila, Andr\'es I. and Kopecz, Stefan and Meister, Andreas}, + TITLE = {A comprehensive theory on generalized {BBKS} schemes}, + JOURNAL = {Applied Numerical Mathematics}, + VOLUME = {157}, + YEAR = {2020}, + PAGES = {19--37}, + ISSN = {0168-9274,1873-5460}, + MRCLASS = {65L06 (65L04 65L20)}, + MRNUMBER = {4109346}, + DOI = {10.1016/j.apnum.2020.05.027}, + URL = {https://doi.org/10.1016/j.apnum.2020.05.027}, +} + +@article {Formaggia2011, + AUTHOR = {Formaggia, L. and Scotti, A.}, + TITLE = {Positivity and conservation properties of some integration + schemes for mass action kinetics}, + JOURNAL = {SIAM Journal on Numerical Analysis}, + VOLUME = {49}, + YEAR = {2011}, + NUMBER = {3}, + PAGES = {1267--1288}, + ISSN = {0036-1429,1095-7170}, + MRCLASS = {65L04 (65L20 80A30 92E20)}, + MRNUMBER = {2812567}, + DOI = {10.1137/100789592}, + URL = {https://doi.org/10.1137/100789592}, +} + +@article {Izzo2025, + AUTHOR = {Izzo, Giuseppe and Messina, Eleonora and Pezzella, Mario and + Vecchio, Antonia}, + TITLE = {Modified {P}atankar linear multistep methods for + production-destruction systems}, + JOURNAL = {Journal of Scientific Computing}, + VOLUME = {102}, + YEAR = {2025}, + NUMBER = {3}, + PAGES = {Paper No. 87, 39}, + ISSN = {0885-7474,1573-7691}, + MRCLASS = {65L05 (65L06)}, + MRNUMBER = {4860303}, + DOI = {10.1007/s10915-025-02804-5}, + URL = {https://doi.org/10.1007/s10915-025-02804-5}, +} + +@article {Zhu2024, + AUTHOR = {Zhu, Fangyao and Huang, Juntao and Yang, Yang}, + TITLE = {Bound-preserving discontinuous {G}alerkin methods with + modified {P}atankar time integrations for chemical reacting + flows}, + JOURNAL = {Communications on Applied Mathematics and Computation}, + VOLUME = {6}, + YEAR = {2024}, + NUMBER = {1}, + PAGES = {190--217}, + ISSN = {2096-6385,2661-8893}, + MRCLASS = {65M15 (65M60 80A32)}, + MRNUMBER = {4710831}, + DOI = {10.1007/s42967-022-00231-z}, + URL = {https://doi.org/10.1007/s42967-022-00231-z}, +} + +@article {Blanes2022, + AUTHOR = {Blanes, Sergio and Iserles, Arieh and Macnamara, Shev}, + TITLE = {Positivity-preserving methods for ordinary differential + equations}, + JOURNAL = {ESAIM. Mathematical Modelling and Numerical Analysis}, + VOLUME = {56}, + YEAR = {2022}, + NUMBER = {6}, + PAGES = {1843--1870}, + ISSN = {2822-7840,2804-7214}, + MRCLASS = {65L05 (65L04 65P99)}, + MRNUMBER = {4467101}, + DOI = {10.1051/m2an/2022042}, + URL = {https://doi.org/10.1051/m2an/2022042}, +} + +@article {Izgin2025, + AUTHOR = {Izgin, Thomas and Ketcheson, David I. and Meister, Andreas}, + TITLE = {Order conditions for {R}unge--{K}utta-like methods with + solution-dependent coefficients}, + JOURNAL = {Communications in Applied Mathematics and Computational + Science}, + VOLUME = {20}, + YEAR = {2025}, + NUMBER = {1}, + PAGES = {29--66}, + ISSN = {1559-3940,2157-5452}, + MRCLASS = {65L06}, + MRNUMBER = {4873114}, + DOI = {10.2140/camcos.2025.20.29}, + URL = {https://doi.org/10.2140/camcos.2025.20.29}, +} \ No newline at end of file diff --git a/paper/paper.md b/paper/paper.md index 2e34b271..2e6dd287 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -26,8 +26,8 @@ bibliography: paper.bib # Summary -We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various modified Patankar--Runge--Kutta (MPRK) schemes, making these methods accessible for users and comparable for researchers. MPRK schemes are unconditionally positive time integration schemes for the solution of positive differential equations. In addition, the numerical solutions preserve the conservation property when applied to a conservative system. -The package is fully compatible with DifferentialEquations.jl, which allows a direct comparison of MPRK and standard schemes. +We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various time integration schemes for the solution of positive ordinary differential equations, making these methods accessible for users and comparable for researchers. Currently, the package provides MPRK, SSP-MPRK and MPDeC schemes, all of which are unconditionally positive and also preserve the conservation property when applied to a conservative system. +The package is fully compatible with DifferentialEquations.jl, which allows a direct comparison between the provided schemes and standard methods. # Statement of need @@ -41,8 +41,10 @@ The only standard scheme with which unconditional positivity can be achieved is (assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. -Consequently, various new, unconditionally positive schemes, especially modified Patankar--Runge--Kutta (MPRK) methods, have been introduced in recent years. -Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl makes these methods available and thus usable and comparable. +Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, @Izgin2025. +Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. + +Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl aims at making these methods available and thus usable and comparable. # Features @@ -52,17 +54,17 @@ The package is fully compatible with DifferentialEquations.jl [@rackauckas2017di The package offers implementations of conservative as well as non-conservative production-destruction systems (PDS), which are the building blocks for the solution of differential equations with MPRK schemes. Furthermore, conversions of these PDS to standard `ODEProblem`s from DifferentialEquations.jl are provided. -The package contains several MPRK methods: +Currently, the package contains the following methods: - The MPRK methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of Kopecz and Meister @kopeczmeister2018order2, @kopeczmeister2018order3 are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. - The MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu @huang2019order2, @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. - The `MPDeC` methods of Öffner and Torlo @OeffnerTorlo2020 combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. -In addition, all implemented MPRK methods have been extended so that non-conservative and non-autonomous PDS can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. +In addition, all implemented methods have been extended so that non-conservative and non-autonomous PDS can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. # Related research and software -The first MPRK method were introduced by @burchard2003. These are the first-order scheme `MPE` and a second-order scheme based on Heun's method. To avoid the restriction to Heun's method, the second-order `MPRK22` schemes were developed by @kopeczmeister2018order2. The techniques developed therein also enabled a generalization to third-order schemes and thus the introduction of `MPRK43I` and `MPRK43II` methods by @kopeczmeister2018order3. +The first MPRK methods were introduced by @burchard2003. These are the first-order scheme `MPE` and a second-order scheme based on Heun's method. To avoid the restriction to Heun's method, the second-order `MPRK22` schemes were developed by @kopeczmeister2018order2. The techniques developed therein also enabled a generalization to third-order schemes and thus the introduction of `MPRK43I` and `MPRK43II` methods by @kopeczmeister2018order3. The aforementioned schemes were derived from the classical formulation of Runge-Kutta methods. Using the Shu-Osher formulation instead lead to the introduction of the second-order schemes `SSPMPRK22` by @huang2019order2 and the third-order scheme `SSPMPRK43` by @huang2019order3. From 540cea84f47e718ae51a6047f29e73b6932dd997 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Thu, 3 Apr 2025 15:42:50 +0200 Subject: [PATCH 46/57] typo --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 2e6dd287..8a7c0ab9 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -41,7 +41,7 @@ The only standard scheme with which unconditional positivity can be achieved is (assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. -Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, @Izgin2025. +Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, @Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, @Izgin2025. Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl aims at making these methods available and thus usable and comparable. From e9514a15f86ca6ae3f83473bd378694f587c2c90 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Thu, 3 Apr 2025 16:02:34 +0200 Subject: [PATCH 47/57] cite Ortleb & Hundsdorfer 2017 --- paper/paper.bib | 15 +++++++++++++++ paper/paper.md | 3 +-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index d740921b..763ef5b3 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -464,4 +464,19 @@ @article {Izgin2025 MRNUMBER = {4873114}, DOI = {10.2140/camcos.2025.20.29}, URL = {https://doi.org/10.2140/camcos.2025.20.29}, +} + +@article{Ortleb2017, + author = {Ortleb, Sigrun and Hundsdorfer, Willem}, + title = {Patankar-type Runge-Kutta schemes for linear PDEs}, + journal = {AIP Conference Proceedings}, + volume = {1863}, + number = {1}, + pages = {320008}, + year = {2017}, + month = {07}, + issn = {0094-243X}, + doi = {10.1063/1.4992489}, + url = {https://doi.org/10.1063/1.4992489}, + eprint = {https://pubs.aip.org/aip/acp/article-pdf/doi/10.1063/1.4992489/13749027/320008\_1\_online.pdf}, } \ No newline at end of file diff --git a/paper/paper.md b/paper/paper.md index 8a7c0ab9..e3636df0 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -41,8 +41,7 @@ The only standard scheme with which unconditional positivity can be achieved is (assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. -Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, @Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, @Izgin2025. -Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. +Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @Ortleb2017, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, @Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, @Izgin2025. Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl aims at making these methods available and thus usable and comparable. From fe36fb94a0f4fe794047f14c962d87b47d8db68e Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Thu, 3 Apr 2025 16:07:15 +0200 Subject: [PATCH 48/57] minor change --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index e3636df0..c4dd447d 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -49,7 +49,7 @@ Unfortunately, these new methods are not yet available in software packages, mak # Features PositiveIntegrators.jl is written in Julia [@bezanson2017julia] and makes use of its strengths for scientific computing, e.g., ease of use and performance. -The package is fully compatible with DifferentialEquations.jl [@rackauckas2017differentialequations] and therefore many features that are available there can be used directly. In particular, this allows a direct comparison of MPRK and standard schemes. Moreover, it integrates well with the Julia ecosystem, e.g., by making it simple to visualize numerical solutions using dense output in Plots.jl [@christ2023plots]. +The package is fully compatible with DifferentialEquations.jl [@rackauckas2017differentialequations] and therefore many features that are available there can be used directly. In particular, this allows a direct comparison of the provided methods and standard schemes. Moreover, it integrates well with the Julia ecosystem, e.g., by making it simple to visualize numerical solutions using dense output in Plots.jl [@christ2023plots]. The package offers implementations of conservative as well as non-conservative production-destruction systems (PDS), which are the building blocks for the solution of differential equations with MPRK schemes. Furthermore, conversions of these PDS to standard `ODEProblem`s from DifferentialEquations.jl are provided. From 90f436e64ba55dac4ab6ab76b66adb4d7ad3f4be Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Thu, 3 Apr 2025 16:58:43 +0200 Subject: [PATCH 49/57] Update paper/paper.md Co-authored-by: Hendrik Ranocha --- paper/paper.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index c4dd447d..0b2de56b 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -55,9 +55,9 @@ The package offers implementations of conservative as well as non-conservative p Currently, the package contains the following methods: -- The MPRK methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of Kopecz and Meister @kopeczmeister2018order2, @kopeczmeister2018order3 are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. -- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of Huang, Zhao and Shu @huang2019order2, @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. -- The `MPDeC` methods of Öffner and Torlo @OeffnerTorlo2020 combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. +- The MPRK methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of @kopeczmeister2018order2 and @kopeczmeister2018order3 are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. +- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of @huang2019order2 and @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. +- The `MPDeC` methods of @OeffnerTorlo2020 combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. In addition, all implemented methods have been extended so that non-conservative and non-autonomous PDS can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. From 51fd725d5f18c2cd945e06f8e6d8f652b578e7e2 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 4 Apr 2025 12:22:22 +0200 Subject: [PATCH 50/57] minor revisions --- paper/paper.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 0b2de56b..14660be6 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -26,7 +26,7 @@ bibliography: paper.bib # Summary -We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various time integration schemes for the solution of positive ordinary differential equations, making these methods accessible for users and comparable for researchers. Currently, the package provides MPRK, SSP-MPRK and MPDeC schemes, all of which are unconditionally positive and also preserve the conservation property when applied to a conservative system. +We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various time integration schemes for the solution of positive ordinary differential equations, making these methods accessible for users and comparable for researchers. Currently, the package provides MPRK, SSP-MPRK, and MPDeC schemes, all of which are unconditionally positive and also preserve the conservation property when applied to a conservative system. The package is fully compatible with DifferentialEquations.jl, which allows a direct comparison between the provided schemes and standard methods. @@ -41,7 +41,7 @@ The only standard scheme with which unconditional positivity can be achieved is (assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. -Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @Ortleb2017, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, @Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, @Izgin2025. Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. +Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @Ortleb2017, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, @Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, and @Izgin2025. Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. Unfortunately, these new methods are not yet available in software packages, making them inaccessible to most users and limiting their comparability within the scientific community. PositiveIntegrators.jl aims at making these methods available and thus usable and comparable. @@ -55,7 +55,7 @@ The package offers implementations of conservative as well as non-conservative p Currently, the package contains the following methods: -- The MPRK methods `MPE`, `MPRK22`, `MPRK43I` and `MPRK43II` of @kopeczmeister2018order2 and @kopeczmeister2018order3 are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. +- The MPRK methods `MPE`, `MPRK22`, `MPRK43I`, and `MPRK43II` of @kopeczmeister2018order2 and @kopeczmeister2018order3 are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. - The MPRK methods `SSPMPRK22` and `SSPMPRK43` of @huang2019order2 and @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. - The `MPDeC` methods of @OeffnerTorlo2020 combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. @@ -71,7 +71,7 @@ Starting from a low-order method, the deferred correction approach can be used t The implemented methods were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction systems was presented by @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. -Readers interested in additional theoretical background and further properties of the implemented schemes are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023. +Readers interested in additional theoretical background, further properties of the implemented schemes, and some applications are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023, and @bartel2024structure. Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library which offers MPRK schemes. A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of Differentialequtions.jl or the commercial package MATLAB is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. @@ -80,12 +80,12 @@ Another possibility is to reduce the chosen time step size beyond accuracy consi We also mention that some papers on MPRK schemes offer supplementary codes. However, these are mainly small scripts for the reproduction of results shown in the papers and are not intended as software libraries. -TODO: @bartel2024structure - - # Acknowledgements -Hendrik Ranocha was supported by +JL acknowledges the support by the Deutsche Forschungsgemeinschaft (DFG) +within the Research Training Group GRK 2583 "Modeling, Simulation and +Optimization of Fluid Dynamic Applications". +HR was supported by the German Research Foundation (Deutsche Forschungsgemeinschaft DFG, project number 513301895) and the Daimler und Benz Stiftung (Daimler and Benz foundation, project number 32-10/22). From 961fb86f0131813d70cabdfc7f5f2deb4cf13993 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 4 Apr 2025 20:46:28 +0200 Subject: [PATCH 51/57] Apply suggestions from code review Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- paper/paper.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 14660be6..4357e4bd 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -39,7 +39,7 @@ Unfortunately, positivity is a property that almost all standard time integratio In particular, higher-order general linear methods cannot preserve positivity unconditionally [@bolley1978conservation]. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method (assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. -Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a non-negative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. +Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a nonnegative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @Ortleb2017, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, @Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, and @Izgin2025. Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. @@ -56,7 +56,7 @@ The package offers implementations of conservative as well as non-conservative p Currently, the package contains the following methods: - The MPRK methods `MPE`, `MPRK22`, `MPRK43I`, and `MPRK43II` of @kopeczmeister2018order2 and @kopeczmeister2018order3 are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. -- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of @huang2019order2 and @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second or third order. +- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of @huang2019order2 and @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second and third order, respectively. - The `MPDeC` methods of @OeffnerTorlo2020 combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. In addition, all implemented methods have been extended so that non-conservative and non-autonomous PDS can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. @@ -71,11 +71,11 @@ Starting from a low-order method, the deferred correction approach can be used t The implemented methods were originally introduced for conservative production-destruction systems only. An extension to non-conservative production-destruction systems was presented by @benzmeister2015. We implemented a modification of this algorithm, by treating the non-conservative production and destruction terms separately, weighting the destruction terms and leaving the production terms unweighted. -Readers interested in additional theoretical background, further properties of the implemented schemes, and some applications are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, @izginoeffner2023, and @bartel2024structure. +Readers interested in additional theoretical background, further properties of the implemented schemes, and some applications are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, and @izginoeffner2023. PositiveIntegrators.jl was successfully applied in the work of @bartel2024structure to solve Fokker-Planck equations, ensuring the positivity of the unknown quantities. Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library which offers MPRK schemes. -A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of Differentialequtions.jl or the commercial package MATLAB is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. -Another possibility is to reduce the chosen time step size beyond accuracy considerations until a non-negative approximation is calculated. This can be achieved in DifferentialEquations.jl using the solver option `isoutofdomain`. +A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of DifferentialEquations.jl or the commercial package MATLAB is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. +Another possibility is to reduce the chosen time step size beyond accuracy considerations until a nonnegative approximation is calculated. This can be achieved in DifferentialEquations.jl using the solver option `isoutofdomain`. We also mention that some papers on MPRK schemes offer supplementary codes. However, these are mainly small scripts for the reproduction of results shown in the papers and are not intended as software libraries. From 4ea5f25fbda45a73b349403ef380f33784e016a5 Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Tue, 22 Apr 2025 15:17:27 +0200 Subject: [PATCH 52/57] Added tags, updated date --- paper/paper.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 4357e4bd..c48a8d59 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -2,7 +2,11 @@ title: 'PositiveIntegrators.jl: A Julia library of positivity-preserving time integration methods' tags: - Julia - - TODO + - numerical analysis + - differential equations + - production-destruction systems + - ODE solvers + - positivity authors: - name: Stefan Kopecz orcid: 0000-0003-0593-450X @@ -20,7 +24,7 @@ affiliations: index: 2 - name: Institute of Mathematics, Johannes Gutenberg University Mainz, Germany index: 3 -date: 20 February 2025 +date: 23 April 2025 bibliography: paper.bib --- From 5677f49eb89beb019027e596c23d4b60231e6a1d Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 22 Apr 2025 15:49:53 +0200 Subject: [PATCH 53/57] Update paper/paper.md Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index c48a8d59..4aaa534a 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -77,7 +77,7 @@ The implemented methods were originally introduced for conservative production-d Readers interested in additional theoretical background, further properties of the implemented schemes, and some applications are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, and @izginoeffner2023. PositiveIntegrators.jl was successfully applied in the work of @bartel2024structure to solve Fokker-Planck equations, ensuring the positivity of the unknown quantities. -Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library which offers MPRK schemes. +Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library offering MPRK schemes. A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of DifferentialEquations.jl or the commercial package MATLAB is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. Another possibility is to reduce the chosen time step size beyond accuracy considerations until a nonnegative approximation is calculated. This can be achieved in DifferentialEquations.jl using the solver option `isoutofdomain`. From 65f604030540ec75f6eb3ece974dad92a0ba188c Mon Sep 17 00:00:00 2001 From: Stefan Kopecz Date: Wed, 23 Apr 2025 18:27:11 +0200 Subject: [PATCH 54/57] Added missing DOIs --- paper/paper.bib | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 763ef5b3..0b5dbaaf 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -290,7 +290,8 @@ @article{bolley1978conservation number={3}, pages={237--245}, year={1978}, - publisher={EDP Sciences} + publisher={EDP Sciences}, + doi = {10.1051/m2an/1978120302371} } @book{gottlieb2011strong, @@ -299,7 +300,8 @@ @book{gottlieb2011strong author={Gottlieb, Sigal and Ketcheson, David I and Shu, Chi-Wang}, year={2011}, publisher={World Scientific}, - address={Singapore} + address={Singapore}, + doi = {10.1142/7498} } @article {Bruggeman2007, @@ -479,4 +481,4 @@ @article{Ortleb2017 doi = {10.1063/1.4992489}, url = {https://doi.org/10.1063/1.4992489}, eprint = {https://pubs.aip.org/aip/acp/article-pdf/doi/10.1063/1.4992489/13749027/320008\_1\_online.pdf}, -} \ No newline at end of file +} From e277e789e10eb8abf8d3ae49a7073c4ee7b408d3 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Sat, 24 May 2025 10:07:18 +0200 Subject: [PATCH 55/57] suggestions of JOSS reviewers --- paper/paper.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 4aaa534a..577eb121 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -24,26 +24,28 @@ affiliations: index: 2 - name: Institute of Mathematics, Johannes Gutenberg University Mainz, Germany index: 3 -date: 23 April 2025 +date: 24 May 2025 bibliography: paper.bib --- # Summary -We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various time integration schemes for the solution of positive ordinary differential equations, making these methods accessible for users and comparable for researchers. Currently, the package provides MPRK, SSP-MPRK, and MPDeC schemes, all of which are unconditionally positive and also preserve the conservation property when applied to a conservative system. +We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various time integration schemes for the solution of positive ordinary differential equations, making these methods accessible for users and comparable for researchers. +Currently, the package provides the the unconditionally positivity-preserving MPRK, SSP-MPRK, and MPDeC schemes, which are also conservative when applied to a conservative system. The package is fully compatible with DifferentialEquations.jl, which allows a direct comparison between the provided schemes and standard methods. # Statement of need -Many systems of ordinary differential equations that model real-life applications have positive solutions, and it is quite natural to require that numerical solutions of such systems also remain positive. -For some of these systems unconditionally positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions. +Many systems of ordinary differential equations that model real-life applications have positive solutions. +For some of these systems unconditionally positivity-preserving time integration methods are helpful or even necessary to obtain meaningful solutions. -Unfortunately, positivity is a property that almost all standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods, do not preserve. +Unfortunately, positivity is not preserved in almost any of the standard time integration schemes, such as Runge–Kutta methods, Rosenbrock methods, or linear multistep methods. In particular, higher-order general linear methods cannot preserve positivity unconditionally [@bolley1978conservation]. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method -(assuming that the nonlinear systems are solved exactly). However, this is only first-order accurate and, in addition, the preservation of positivity within the nonlinear iteration process poses a problem. -Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a nonnegative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. +(assuming that the nonlinear systems are solved exactly). +However, this is only first-order accurate and the preservation of positivity within the nonlinear iteration process poses a problem. +Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a nonnegative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @Ortleb2017, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, @Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, and @Izgin2025. Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. @@ -60,7 +62,7 @@ The package offers implementations of conservative as well as non-conservative p Currently, the package contains the following methods: - The MPRK methods `MPE`, `MPRK22`, `MPRK43I`, and `MPRK43II` of @kopeczmeister2018order2 and @kopeczmeister2018order3 are based on the classical formulation of Runge--Kutta schemes and have accuracies from first to third order. -- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of @huang2019order2 and @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second and third order, respectively. +- The MPRK methods `SSPMPRK22` and `SSPMPRK43` of @huang2019order2 and @huang2019order3 are based on the SSP formulation of Runge--Kutta schemes and are of second and third order, respectively. - The `MPDeC` methods of @OeffnerTorlo2020 combine the deferred correction approach with the idea of MPRK schemes to obtain schemes of arbitrary order. In the package methods from second up to 10th order are implemented. In addition, all implemented methods have been extended so that non-conservative and non-autonomous PDS can be solved as well. Furthermore, adaptive step size control is available for almost all schemes. @@ -77,7 +79,7 @@ The implemented methods were originally introduced for conservative production-d Readers interested in additional theoretical background, further properties of the implemented schemes, and some applications are referred to the publications of @kopeczmeister2019, @izgin2022stability1, @izgin2022stability2, @huang2023, @torlo2022, and @izginoeffner2023. PositiveIntegrators.jl was successfully applied in the work of @bartel2024structure to solve Fokker-Planck equations, ensuring the positivity of the unknown quantities. -Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library offering MPRK schemes. +Existing software libraries do not have a strong focus on unconditional positivity and, to the authors' knowledge, there is no other software library offering MPRK schemes. A common strategy to obtain nonnegative solutions used in the `PositiveDomain` callback of DifferentialEquations.jl or the commercial package MATLAB is described by @Shampine2005. In this approach negative components of approximate solutions that have been accepted by the adaptive time stepping algorithm are set to zero. Another possibility is to reduce the chosen time step size beyond accuracy considerations until a nonnegative approximation is calculated. This can be achieved in DifferentialEquations.jl using the solver option `isoutofdomain`. From 09e44d4e6eb14665b0fe8156283bba1235efbe78 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Sat, 24 May 2025 10:12:36 +0200 Subject: [PATCH 56/57] comment on issues with nonlinear solvers --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 577eb121..6498b83f 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -44,7 +44,7 @@ Unfortunately, positivity is not preserved in almost any of the standard time in In particular, higher-order general linear methods cannot preserve positivity unconditionally [@bolley1978conservation]. The only standard scheme with which unconditional positivity can be achieved is the implicit Euler method (assuming that the nonlinear systems are solved exactly). -However, this is only first-order accurate and the preservation of positivity within the nonlinear iteration process poses a problem. +However, this is only first-order accurate and the preservation of positivity within the nonlinear iteration process poses a problem. For example, it may happen that the right-hand side of the differential equation is only defined for nonnegative values and would throw an error if a negative value is passed to it, e.g., in the case of a square root. Standard nonlinear solvers like Newton's method or fixed-point iterations will in general not only produce iterates that are nonnegative, causing the iteration to fail. Another strategy for preserving positivity used in existing open source or commercial packages (like MATLAB) is to set negative solution components that are accepted by the step size control to zero. Unfortunately, this can have a negative impact on possible conservation properties. Further approaches in the literature include projections in between time steps [@sandu2001positive; @nusslein2021positivity], if a negative solution was computed, or it is tried to reduce the time step size as long as a nonnegative solution is calculated. Finally, strong stability preserving (SSP) methods can also be used to preserve positivity, but this is again subject to step size limitations [@gottlieb2011strong]. Consequently, various new, unconditionally positive schemes have been introduced in recent years, see @burchard2003, @Bruggeman2007, @Broekhuizen2008, @Formaggia2011, @Ortleb2017, @kopeczmeister2018order2, @kopeczmeister2018order3, @huang2019order2, @huang2019order3, @OeffnerTorlo2020, @Martiradonna2020, @Avila2020, @Avila2021, @Blanes2022, @Zhu2024, @Izzo2025, and @Izgin2025. Among these, most of the literature is devoted to modified Patankar--Runge--Kutta (MPRK) methods. From 3e9c661fab259dbb8930e10549d267f27b1caa7e Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Sat, 24 May 2025 12:44:00 +0200 Subject: [PATCH 57/57] fix typo Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 6498b83f..e84c5c67 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -31,7 +31,7 @@ bibliography: paper.bib # Summary We introduce PositiveIntegrators.jl, a Julia package that provides efficient implementations of various time integration schemes for the solution of positive ordinary differential equations, making these methods accessible for users and comparable for researchers. -Currently, the package provides the the unconditionally positivity-preserving MPRK, SSP-MPRK, and MPDeC schemes, which are also conservative when applied to a conservative system. +Currently, the package provides the unconditionally positivity-preserving MPRK, SSP-MPRK, and MPDeC schemes, which are also conservative when applied to a conservative system. The package is fully compatible with DifferentialEquations.jl, which allows a direct comparison between the provided schemes and standard methods.