diff-grok 1.0.10 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +11 -0
- package/.claude/skills/license-updater/SKILL.md +149 -0
- package/.claude/skills/license-updater/references/compatibility.md +68 -0
- package/.claude/skills/license-updater/references/templates.md +151 -0
- package/.claude/skills/license-updater/scripts/generate_license_files.py +467 -0
- package/CLAUDE.md +104 -0
- package/LICENSE +1 -1
- package/README.MD +121 -27
- package/THIRD_PARTY_LICENSES +135 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/BasicModelPipelineCreator.html +4 -4
- package/docs/classes/Callback.html +5 -5
- package/docs/classes/CyclicModelPipelineCreator.html +4 -4
- package/docs/classes/IterCheckerCallback.html +5 -5
- package/docs/classes/PipelineCreator.html +4 -4
- package/docs/classes/TimeCheckerCallback.html +5 -5
- package/docs/classes/UpdatesModelPipelineCreator.html +4 -4
- package/docs/functions/ab4.html +8 -0
- package/docs/functions/ab5.html +8 -0
- package/docs/functions/applyPipeline.html +2 -2
- package/docs/functions/getCallback.html +2 -2
- package/docs/functions/getIVP.html +2 -2
- package/docs/functions/getInputVector.html +2 -2
- package/docs/functions/getIvp2WebWorker.html +2 -2
- package/docs/functions/getJScode.html +2 -2
- package/docs/functions/getOutputNames.html +2 -2
- package/docs/functions/getPipelineCreator.html +2 -2
- package/docs/functions/lsoda.html +8 -0
- package/docs/functions/mrt.html +2 -2
- package/docs/functions/printE5.html +2 -2
- package/docs/functions/printHires.html +2 -2
- package/docs/functions/printOrego.html +2 -2
- package/docs/functions/printPollution.html +2 -2
- package/docs/functions/printRobertson.html +2 -2
- package/docs/functions/printVdpol.html +2 -2
- package/docs/functions/rk3.html +8 -0
- package/docs/functions/rk4.html +8 -0
- package/docs/functions/rkdp.html +8 -0
- package/docs/functions/ros34prw.html +2 -2
- package/docs/functions/ros3prw.html +2 -2
- package/docs/functions/solveIvp.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +100 -15
- package/docs/media/E5.png +0 -0
- package/docs/media/HIRES.png +0 -0
- package/docs/media/OREGO.png +0 -0
- package/docs/media/POLL-full.png +0 -0
- package/docs/media/ROBER.png +0 -0
- package/docs/media/VDP0L.png +0 -0
- package/docs/media/cyclic-model.js +3 -1
- package/docs/media/cyclic-model.js.map +1 -1
- package/docs/media/cyclic-model.ts +3 -1
- package/docs/modules.html +1 -1
- package/docs/types/Arg.html +7 -7
- package/docs/types/DifEqs.html +4 -4
- package/docs/types/Func.html +2 -2
- package/docs/types/IVP.html +20 -20
- package/docs/types/IVP2WebWorker.html +7 -7
- package/docs/types/Input.html +4 -4
- package/docs/types/Loop.html +4 -4
- package/docs/types/ODEs.html +8 -8
- package/docs/types/Output.html +4 -4
- package/docs/types/Pipeline.html +4 -4
- package/docs/types/SolverOptions.html +5 -5
- package/docs/types/Update.html +5 -5
- package/docs/types/Wrapper.html +5 -5
- package/images/E5.png +0 -0
- package/images/HIRES.png +0 -0
- package/images/OREGO.png +0 -0
- package/images/POLL-full.png +0 -0
- package/images/ROBER.png +0 -0
- package/images/VDP0L.png +0 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/index.ts +2 -1
- package/jest.config.js +1 -0
- package/package.json +4 -2
- package/src/examples/check-methods.js +15 -3
- package/src/examples/check-methods.js.map +1 -1
- package/src/examples/check-methods.ts +18 -3
- package/src/examples/cyclic-model.js +3 -1
- package/src/examples/cyclic-model.js.map +1 -1
- package/src/examples/cyclic-model.ts +3 -1
- package/src/solver-tools/ab4-method.js +332 -0
- package/src/solver-tools/ab4-method.js.map +1 -0
- package/src/solver-tools/ab4-method.ts +395 -0
- package/src/solver-tools/ab5-method.js +334 -0
- package/src/solver-tools/ab5-method.js.map +1 -0
- package/src/solver-tools/ab5-method.ts +397 -0
- package/src/solver-tools/cvode/common.js +487 -0
- package/src/solver-tools/cvode/common.js.map +1 -0
- package/src/solver-tools/cvode/common.ts +549 -0
- package/src/solver-tools/cvode/cvode.js +1062 -0
- package/src/solver-tools/cvode/cvode.js.map +1 -0
- package/src/solver-tools/cvode/cvode.ts +1226 -0
- package/src/solver-tools/cvode/cvode_adams.js +124 -0
- package/src/solver-tools/cvode/cvode_adams.js.map +1 -0
- package/src/solver-tools/cvode/cvode_adams.ts +142 -0
- package/src/solver-tools/cvode/cvode_bdf.js +153 -0
- package/src/solver-tools/cvode/cvode_bdf.js.map +1 -0
- package/src/solver-tools/cvode/cvode_bdf.ts +164 -0
- package/src/solver-tools/cvode/cvode_class.js +158 -0
- package/src/solver-tools/cvode/cvode_class.js.map +1 -0
- package/src/solver-tools/cvode/cvode_class.ts +271 -0
- package/src/solver-tools/cvode/cvode_hin.js +119 -0
- package/src/solver-tools/cvode/cvode_hin.js.map +1 -0
- package/src/solver-tools/cvode/cvode_hin.ts +150 -0
- package/src/solver-tools/cvode/cvode_io.js +203 -0
- package/src/solver-tools/cvode/cvode_io.js.map +1 -0
- package/src/solver-tools/cvode/cvode_io.ts +258 -0
- package/src/solver-tools/cvode/cvode_ls.js +210 -0
- package/src/solver-tools/cvode/cvode_ls.js.map +1 -0
- package/src/solver-tools/cvode/cvode_ls.ts +249 -0
- package/src/solver-tools/cvode/cvode_nls.js +220 -0
- package/src/solver-tools/cvode/cvode_nls.js.map +1 -0
- package/src/solver-tools/cvode/cvode_nls.ts +259 -0
- package/src/solver-tools/cvode/cvode_root.js +415 -0
- package/src/solver-tools/cvode/cvode_root.js.map +1 -0
- package/src/solver-tools/cvode/cvode_root.ts +503 -0
- package/src/solver-tools/cvode/dense_linalg.js +131 -0
- package/src/solver-tools/cvode/dense_linalg.js.map +1 -0
- package/src/solver-tools/cvode/dense_linalg.ts +144 -0
- package/src/solver-tools/cvode/index.js +26 -0
- package/src/solver-tools/cvode/index.js.map +1 -0
- package/src/solver-tools/cvode/index.ts +64 -0
- package/src/solver-tools/cvode-method.js +114 -0
- package/src/solver-tools/cvode-method.js.map +1 -0
- package/src/solver-tools/cvode-method.ts +129 -0
- package/src/solver-tools/index.js +7 -0
- package/src/solver-tools/index.js.map +1 -1
- package/src/solver-tools/index.ts +7 -0
- package/src/solver-tools/lsoda/blas.js +257 -0
- package/src/solver-tools/lsoda/blas.js.map +1 -0
- package/src/solver-tools/lsoda/blas.ts +279 -0
- package/src/solver-tools/lsoda/cfode.js +84 -0
- package/src/solver-tools/lsoda/cfode.js.map +1 -0
- package/src/solver-tools/lsoda/cfode.ts +95 -0
- package/src/solver-tools/lsoda/common.js +94 -0
- package/src/solver-tools/lsoda/common.js.map +1 -0
- package/src/solver-tools/lsoda/common.ts +135 -0
- package/src/solver-tools/lsoda/corfailure.js +36 -0
- package/src/solver-tools/lsoda/corfailure.js.map +1 -0
- package/src/solver-tools/lsoda/corfailure.ts +42 -0
- package/src/solver-tools/lsoda/correction.js +112 -0
- package/src/solver-tools/lsoda/correction.js.map +1 -0
- package/src/solver-tools/lsoda/correction.ts +131 -0
- package/src/solver-tools/lsoda/dense.js +121 -0
- package/src/solver-tools/lsoda/dense.js.map +1 -0
- package/src/solver-tools/lsoda/dense.ts +141 -0
- package/src/solver-tools/lsoda/index.js +15 -0
- package/src/solver-tools/lsoda/index.js.map +1 -0
- package/src/solver-tools/lsoda/index.ts +17 -0
- package/src/solver-tools/lsoda/intdy.js +54 -0
- package/src/solver-tools/lsoda/intdy.js.map +1 -0
- package/src/solver-tools/lsoda/intdy.ts +62 -0
- package/src/solver-tools/lsoda/lsoda.js +578 -0
- package/src/solver-tools/lsoda/lsoda.js.map +1 -0
- package/src/solver-tools/lsoda/lsoda.ts +644 -0
- package/src/solver-tools/lsoda/methodswitch.js +108 -0
- package/src/solver-tools/lsoda/methodswitch.js.map +1 -0
- package/src/solver-tools/lsoda/methodswitch.ts +119 -0
- package/src/solver-tools/lsoda/orderswitch.js +97 -0
- package/src/solver-tools/lsoda/orderswitch.js.map +1 -0
- package/src/solver-tools/lsoda/orderswitch.ts +107 -0
- package/src/solver-tools/lsoda/prja.js +54 -0
- package/src/solver-tools/lsoda/prja.js.map +1 -0
- package/src/solver-tools/lsoda/prja.ts +61 -0
- package/src/solver-tools/lsoda/scaleh.js +41 -0
- package/src/solver-tools/lsoda/scaleh.js.map +1 -0
- package/src/solver-tools/lsoda/scaleh.ts +45 -0
- package/src/solver-tools/lsoda/solsy.js +25 -0
- package/src/solver-tools/lsoda/solsy.js.map +1 -0
- package/src/solver-tools/lsoda/solsy.ts +30 -0
- package/src/solver-tools/lsoda/stoda.js +270 -0
- package/src/solver-tools/lsoda/stoda.js.map +1 -0
- package/src/solver-tools/lsoda/stoda.ts +298 -0
- package/src/solver-tools/lsoda-method.js +134 -0
- package/src/solver-tools/lsoda-method.js.map +1 -0
- package/src/solver-tools/lsoda-method.ts +154 -0
- package/src/solver-tools/mrt-method.js +81 -18
- package/src/solver-tools/mrt-method.js.map +1 -1
- package/src/solver-tools/mrt-method.ts +111 -21
- package/src/solver-tools/rk3-method.js +210 -0
- package/src/solver-tools/rk3-method.js.map +1 -0
- package/src/solver-tools/rk3-method.ts +257 -0
- package/src/solver-tools/rk4-method.js +236 -0
- package/src/solver-tools/rk4-method.js.map +1 -0
- package/src/solver-tools/rk4-method.ts +286 -0
- package/src/solver-tools/rkdp-method.js +247 -0
- package/src/solver-tools/rkdp-method.js.map +1 -0
- package/src/solver-tools/rkdp-method.ts +300 -0
- package/src/solver-tools/ros34prw-method.js +1 -1
- package/src/solver-tools/ros34prw-method.js.map +1 -1
- package/src/solver-tools/ros34prw-method.ts +1 -1
- package/src/solver-tools/ros3prw-method.js +1 -1
- package/src/solver-tools/ros3prw-method.js.map +1 -1
- package/src/solver-tools/ros3prw-method.ts +1 -1
- package/src/solver-tools/solver-defs.js +7 -0
- package/src/solver-tools/solver-defs.js.map +1 -1
- package/src/solver-tools/solver-defs.ts +7 -0
- package/src/tests/correctness.test.js +6 -4
- package/src/tests/correctness.test.js.map +1 -1
- package/src/tests/correctness.test.ts +6 -4
- package/src/tests/cvode-lib-correctness.test.js +404 -0
- package/src/tests/cvode-lib-correctness.test.js.map +1 -0
- package/src/tests/cvode-lib-correctness.test.ts +505 -0
- package/src/tests/cvode-lib-performance.test.js +103 -0
- package/src/tests/cvode-lib-performance.test.js.map +1 -0
- package/src/tests/cvode-lib-performance.test.ts +128 -0
- package/src/tests/lsoda-lib-correctness.test.js +223 -0
- package/src/tests/lsoda-lib-correctness.test.js.map +1 -0
- package/src/tests/lsoda-lib-correctness.test.ts +283 -0
- package/src/tests/lsoda-lib-performance.test.js +95 -0
- package/src/tests/lsoda-lib-performance.test.js.map +1 -0
- package/src/tests/lsoda-lib-performance.test.ts +126 -0
- package/src/tests/performance.test.js +12 -8
- package/src/tests/performance.test.js.map +1 -1
- package/src/tests/performance.test.ts +12 -8
- package/src/tests/test-defs.js +20 -1
- package/src/tests/test-defs.js.map +1 -1
- package/src/tests/test-defs.ts +22 -1
- package/src/worker-tools/solving.js +15 -1
- package/src/worker-tools/solving.js.map +1 -1
- package/src/worker-tools/solving.ts +23 -1
package/docs/types/Wrapper.html
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Wrapper | diff-grok - v1.0
|
|
2
|
-
</div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">Wrapper</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#out">out</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#postproc">postproc</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#preproc">preproc</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/datagrok-ai/
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Wrapper | diff-grok - v1.1.0</title><meta name="description" content="Documentation for diff-grok"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">diff-grok - v1.1.0</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">Wrapper</a></li></ul><h1>Type Alias Wrapper</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Represents a wrapper for a single modeling step in a multi-stage simulation.</p>
|
|
2
|
+
</div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">Wrapper</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#out">out</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#postproc">postproc</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#preproc">preproc</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/datagrok-ai/diff-grok/blob/652d427344795ab429f0120033309f18670d3034/src/pipeline/pipeline.ts#L17">src/pipeline/pipeline.ts:17</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#out" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>out</span></a>
|
|
3
3
|
<a href="#postproc" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>postproc</span></a>
|
|
4
4
|
<a href="#preproc" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>preproc</span></a>
|
|
5
5
|
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="out"><span>out</span><a href="#out" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">out</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></div><div class="tsd-comment tsd-typography"><p>A script that generates the output of the step.</p>
|
|
6
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/datagrok-ai/
|
|
7
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/datagrok-ai/
|
|
8
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/datagrok-ai/
|
|
6
|
+
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/datagrok-ai/diff-grok/blob/652d427344795ab429f0120033309f18670d3034/src/pipeline/pipeline.ts#L19">src/pipeline/pipeline.ts:19</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="postproc"><span>postproc</span><a href="#postproc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">postproc</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></div><div class="tsd-comment tsd-typography"><p>A postprocessing script applied after the step is executed.</p>
|
|
7
|
+
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/datagrok-ai/diff-grok/blob/652d427344795ab429f0120033309f18670d3034/src/pipeline/pipeline.ts#L20">src/pipeline/pipeline.ts:20</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="preproc"><span>preproc</span><a href="#preproc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">preproc</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></div><div class="tsd-comment tsd-typography"><p>A preprocessing script for the step's inputs.</p>
|
|
8
|
+
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/datagrok-ai/diff-grok/blob/652d427344795ab429f0120033309f18670d3034/src/pipeline/pipeline.ts#L18">src/pipeline/pipeline.ts:18</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#out"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>out</span></a><a href="#postproc"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>postproc</span></a><a href="#preproc"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>preproc</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">diff-grok - v1.1.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
package/images/E5.png
ADDED
|
Binary file
|
package/images/HIRES.png
ADDED
|
Binary file
|
package/images/OREGO.png
ADDED
|
Binary file
|
|
Binary file
|
package/images/ROBER.png
ADDED
|
Binary file
|
package/images/VDP0L.png
ADDED
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { mrt, ros3prw, ros34prw, CallbackAction, DEFAULT_OPTIONS, getCallback, Callback, IterCheckerCallback, TimeCheckerCallback } from './src/solver-tools';
|
|
1
|
+
export { mrt, ros3prw, ros34prw, rk4, ab5, ab4, rkdp, rk3, lsoda, cvode, CallbackAction, DEFAULT_OPTIONS, getCallback, Callback, IterCheckerCallback, TimeCheckerCallback } from './src/solver-tools';
|
|
2
2
|
export { perfProbs, corrProbs, refPoints, printRobertson, printHires, printOrego, printE5, printVdpol, printPollution } from './src/examples';
|
|
3
3
|
export { DF_NAME, CONTROL_EXPR, MAX_LINE_CHART, getIVP, getScriptLines, getScriptParams, getJScode, SCRIPTING, BRACE_OPEN, BRACE_CLOSE, BRACKET_OPEN, BRACKET_CLOSE, ANNOT_SEPAR, CONTROL_SEP, STAGE_COL_NAME, ARG_INPUT_KEYS, DEFAULT_SOLVER_SETTINGS, ModelError, getFunc4worker } from './src/scripting-tools';
|
|
4
4
|
export { getIvp2WebWorker, solveIvp } from './src/worker-tools';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAChF,cAAc,EAAE,eAAe,EAC/B,WAAW,EAAgB,QAAQ,EAAE,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAE3G,OAAO,EAAC,SAAS,EAAE,SAAS,EAAe,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAC1F,OAAO,EAAE,UAAU,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,SAAS,EAC3E,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAChG,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,uBAAuB,EAAE,UAAU,EAChF,cAAc,EAA4B,MAAM,uBAAuB,CAAC;AAE1E,OAAO,EAAgB,gBAAgB,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAoB,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EACtF,yBAAyB,EAAE,cAAc,EAAE,kBAAkB,EAAE,0BAA0B,EACzF,2BAA2B,EAAC,MAAM,gBAAgB,CAAC"}
|
package/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {Func, ODEs, mrt, ros3prw, ros34prw,
|
|
1
|
+
export {Func, ODEs, mrt, ros3prw, ros34prw, rk4, ab5, ab4, rkdp, rk3, lsoda, cvode,
|
|
2
|
+
CallbackAction, DEFAULT_OPTIONS, SolverOptions,
|
|
2
3
|
getCallback, SolverMethod, Callback, IterCheckerCallback, TimeCheckerCallback} from './src/solver-tools';
|
|
3
4
|
|
|
4
5
|
export {perfProbs, corrProbs, CorrProblem, refPoints, printRobertson, printHires, printOrego,
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "1.0
|
|
11
|
+
"version": "1.2.0",
|
|
12
12
|
"description": "Tools for solving initial value problem for ordinary differential equations",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"initial value problem",
|
|
15
15
|
"ordinary differential equations",
|
|
16
|
-
"Rosenbrock-Wanner method"
|
|
16
|
+
"Rosenbrock-Wanner method",
|
|
17
|
+
"LSODA",
|
|
18
|
+
"CVODE"
|
|
17
19
|
],
|
|
18
20
|
"devDependencies": {
|
|
19
21
|
"@types/jest": "^29.0.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// A script for checking performance
|
|
2
|
-
import { corrProbs, mrt, ros3prw, ros34prw, perfProbs, refPoints } from '../../index';
|
|
2
|
+
import { corrProbs, mrt, ros3prw, ros34prw, rk4, ab5, ab4, rkdp, rk3, lsoda, cvode, perfProbs, refPoints } from '../../index';
|
|
3
3
|
/** Return numerical solution error: maximum absolute deviation between approximate & exact solutions */
|
|
4
4
|
function getError(method, corProb) {
|
|
5
5
|
let error = 0;
|
|
@@ -27,16 +27,28 @@ function getDeviationFromReferencePoint(solution, refPoint) {
|
|
|
27
27
|
}
|
|
28
28
|
return absolute;
|
|
29
29
|
} // getDeviationFromReferencePoint
|
|
30
|
-
const
|
|
30
|
+
const implicitMethods = new Map([
|
|
31
31
|
['MRT', mrt],
|
|
32
32
|
['ROS3PRw', ros3prw],
|
|
33
33
|
['ROS34PRw', ros34prw],
|
|
34
|
+
['LSODA', lsoda],
|
|
35
|
+
['CVODE', cvode],
|
|
36
|
+
]);
|
|
37
|
+
const methods = new Map([
|
|
38
|
+
...implicitMethods,
|
|
39
|
+
['RK4', rk4],
|
|
40
|
+
['AB5', ab5],
|
|
41
|
+
['AB4', ab4],
|
|
42
|
+
['RKDP', rkdp],
|
|
43
|
+
['RK3', rk3],
|
|
34
44
|
]);
|
|
35
45
|
console.log('Performance\n');
|
|
36
|
-
|
|
46
|
+
implicitMethods.forEach((method, name) => {
|
|
37
47
|
console.log(' ', name);
|
|
38
48
|
console.log(' PROBLEM TIME,MS ERR*');
|
|
39
49
|
perfProbs.forEach((odes, idx) => {
|
|
50
|
+
if (name === 'CVODE' && odes.name === 'E5')
|
|
51
|
+
return;
|
|
40
52
|
const start = Date.now();
|
|
41
53
|
const solution = method(odes);
|
|
42
54
|
const absErr = getDeviationFromReferencePoint(solution.slice(1), refPoints[idx]).toExponential(2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-methods.js","sourceRoot":"","sources":["check-methods.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,EAAO,SAAS,EAAe,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"check-methods.js","sourceRoot":"","sources":["check-methods.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// A script for checking performance
|
|
2
2
|
|
|
3
|
-
import {ODEs, corrProbs, CorrProblem, mrt, ros3prw, ros34prw,
|
|
3
|
+
import {ODEs, corrProbs, CorrProblem, mrt, ros3prw, ros34prw, rk4, ab5, ab4, rkdp, rk3, lsoda, cvode,
|
|
4
|
+
perfProbs, refPoints} from '../../index';
|
|
4
5
|
|
|
5
6
|
/** Return numerical solution error: maximum absolute deviation between approximate & exact solutions */
|
|
6
7
|
function getError(method: (odes: ODEs) => Float64Array[], corProb: CorrProblem): number {
|
|
@@ -40,20 +41,34 @@ function getDeviationFromReferencePoint(solution: Float64Array[], refPoint: Floa
|
|
|
40
41
|
return absolute;
|
|
41
42
|
} // getDeviationFromReferencePoint
|
|
42
43
|
|
|
43
|
-
const
|
|
44
|
+
const implicitMethods = new Map([
|
|
44
45
|
['MRT', mrt],
|
|
45
46
|
['ROS3PRw', ros3prw],
|
|
46
47
|
['ROS34PRw', ros34prw],
|
|
48
|
+
['LSODA', lsoda],
|
|
49
|
+
['CVODE', cvode],
|
|
50
|
+
]);
|
|
51
|
+
|
|
52
|
+
const methods = new Map([
|
|
53
|
+
...implicitMethods,
|
|
54
|
+
['RK4', rk4],
|
|
55
|
+
['AB5', ab5],
|
|
56
|
+
['AB4', ab4],
|
|
57
|
+
['RKDP', rkdp],
|
|
58
|
+
['RK3', rk3],
|
|
47
59
|
]);
|
|
48
60
|
|
|
49
61
|
console.log('Performance\n');
|
|
50
62
|
|
|
51
|
-
|
|
63
|
+
implicitMethods.forEach((method, name) => {
|
|
52
64
|
console.log(' ', name);
|
|
53
65
|
|
|
54
66
|
console.log(' PROBLEM TIME,MS ERR*');
|
|
55
67
|
|
|
56
68
|
perfProbs.forEach((odes, idx) => {
|
|
69
|
+
if (name === 'CVODE' && odes.name === 'E5')
|
|
70
|
+
return;
|
|
71
|
+
|
|
57
72
|
const start = Date.now();
|
|
58
73
|
const solution = method(odes);
|
|
59
74
|
const absErr = getDeviationFromReferencePoint(solution.slice(1), refPoints[idx]).toExponential(2);
|
|
@@ -45,7 +45,9 @@ const model = `#name: PK-PD
|
|
|
45
45
|
Kin = 0.2 {caption: Kin; category: Parameters; min: 0.1; max: 0.5} [The first-order production constant]
|
|
46
46
|
Kout = 0.2 {caption: Kout; category: Parameters; min: 0.1; max: 0.5} [The first-order dissipation rate constant]
|
|
47
47
|
|
|
48
|
-
#tolerance: 1e-9
|
|
48
|
+
#tolerance: 1e-9
|
|
49
|
+
|
|
50
|
+
#meta.solver: {method: 'rkdp'; maxTimeMs: 5000}`;
|
|
49
51
|
/** 2. Generate IVP-objects: for the main thread & for computations in webworkers */
|
|
50
52
|
const ivp = DGL.getIVP(model);
|
|
51
53
|
const ivpWW = DGL.getIvp2WebWorker(ivp);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cyclic-model.js","sourceRoot":"","sources":["cyclic-model.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B;;;;EAIE;AAEF,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,6BAA6B;AAC7B,MAAM,KAAK,GAAG
|
|
1
|
+
{"version":3,"file":"cyclic-model.js","sourceRoot":"","sources":["cyclic-model.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B;;;;EAIE;AAEF,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,6BAA6B;AAC7B,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAyCkC,CAAC;AAEjD,oFAAoF;AACpF,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,MAAM,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAExC,8BAA8B;AAC9B,IAAI,CAAC;IACH,gCAAgC;IAChC,MAAM,WAAW,GAAG,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC;IAEnC,wBAAwB;IACxB,MAAM,MAAM,GAAG;QACb,MAAM,EAAE,EAAE;QACV,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,EAAE;QACP,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,IAAI;QACR,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,IAAI;QACR,CAAC,EAAE,KAAK;QACR,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;KACZ,CAAC;IACF,MAAM,WAAW,GAAG,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEpD,yBAAyB;IACzB,MAAM,OAAO,GAAG,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAElD,8CAA8C;IAC9C,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAEjE,qBAAqB;IAErB,sBAAsB;IACtB,IAAI,IAAI,GAAG,WAAW,CAAC;IACvB,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,GAAG,aAAa,CAAC,CAAC;IAC5D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAElB,6BAA6B;IAC7B,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QAChC,IAAI,GAAG,EAAE,CAAC;QAEV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,EAAE,CAAC;YAC9B,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;QAE9C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -47,7 +47,9 @@ const model = `#name: PK-PD
|
|
|
47
47
|
Kin = 0.2 {caption: Kin; category: Parameters; min: 0.1; max: 0.5} [The first-order production constant]
|
|
48
48
|
Kout = 0.2 {caption: Kout; category: Parameters; min: 0.1; max: 0.5} [The first-order dissipation rate constant]
|
|
49
49
|
|
|
50
|
-
#tolerance: 1e-9
|
|
50
|
+
#tolerance: 1e-9
|
|
51
|
+
|
|
52
|
+
#meta.solver: {method: 'rkdp'; maxTimeMs: 5000}`;
|
|
51
53
|
|
|
52
54
|
/** 2. Generate IVP-objects: for the main thread & for computations in webworkers */
|
|
53
55
|
const ivp = DGL.getIVP(model);
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/* The Adams-Bashforth-Moulton predictor-corrector method of order 4 (AB4).
|
|
2
|
+
|
|
3
|
+
Uses the 4-step Adams-Bashforth formula as predictor and the 3-step
|
|
4
|
+
Adams-Moulton formula as corrector in PECE mode (Predict-Evaluate-
|
|
5
|
+
Correct-Evaluate), with Milne's device for local error estimation.
|
|
6
|
+
Bootstrapping is performed using the Runge-Kutta-Fehlberg 4(5) method.
|
|
7
|
+
|
|
8
|
+
References:
|
|
9
|
+
[1] E. Hairer, S.P. Norsett, G. Wanner, "Solving Ordinary Differential
|
|
10
|
+
Equations I: Nonstiff Problems", Springer, 2nd ed., 1993.
|
|
11
|
+
[2] L.F. Shampine, M.K. Gordon, "Computer Solution of Ordinary Differential
|
|
12
|
+
Equations: The Initial Value Problem", W.H. Freeman, 1975.
|
|
13
|
+
*/
|
|
14
|
+
import { max, abs, SAFETY, PSHRNK, PSGROW, REDUCE_COEF, GROW_COEF, ERR_CONTR, TINY, ERROR_MSG } from './solver-defs';
|
|
15
|
+
// Adams-Bashforth 4-step coefficients (pre-divided by 24)
|
|
16
|
+
// y_{n+1} = y_n + h * (AB0*f_n + AB1*f_{n-1} + AB2*f_{n-2} + AB3*f_{n-3})
|
|
17
|
+
const AB0 = 55.0 / 24.0;
|
|
18
|
+
const AB1 = -59.0 / 24.0;
|
|
19
|
+
const AB2 = 37.0 / 24.0;
|
|
20
|
+
const AB3 = -9.0 / 24.0;
|
|
21
|
+
// Adams-Moulton 3-step coefficients (pre-divided by 24)
|
|
22
|
+
// y_{n+1} = y_n + h * (AM_NEW*f_{n+1} + AM0*f_n + AM1*f_{n-1} + AM2*f_{n-2})
|
|
23
|
+
const AM_NEW = 9.0 / 24.0;
|
|
24
|
+
const AM0 = 19.0 / 24.0;
|
|
25
|
+
const AM1 = -5.0 / 24.0;
|
|
26
|
+
const AM2 = 1.0 / 24.0;
|
|
27
|
+
// Milne error estimation coefficient for the AB4-AM3 pair: 19/270
|
|
28
|
+
const MILNE = 19.0 / 270.0;
|
|
29
|
+
// Number of uniformly-spaced history points required for AB4
|
|
30
|
+
const HIST_LEN = 4;
|
|
31
|
+
// Fehlberg 4(5) Butcher tableau coefficients (used during bootstrap phase)
|
|
32
|
+
const C2 = 1.0 / 4.0;
|
|
33
|
+
const C3 = 3.0 / 8.0;
|
|
34
|
+
const C4 = 12.0 / 13.0;
|
|
35
|
+
const C6 = 1.0 / 2.0;
|
|
36
|
+
const A21 = 1.0 / 4.0;
|
|
37
|
+
const A31 = 3.0 / 32.0;
|
|
38
|
+
const A32 = 9.0 / 32.0;
|
|
39
|
+
const A41 = 1932.0 / 2197.0;
|
|
40
|
+
const A42 = -7200.0 / 2197.0;
|
|
41
|
+
const A43 = 7296.0 / 2197.0;
|
|
42
|
+
const A51 = 439.0 / 216.0;
|
|
43
|
+
const A52 = -8.0;
|
|
44
|
+
const A53 = 3680.0 / 513.0;
|
|
45
|
+
const A54 = -845.0 / 4104.0;
|
|
46
|
+
const A61 = -8.0 / 27.0;
|
|
47
|
+
const A62 = 2.0;
|
|
48
|
+
const A63 = -3544.0 / 2565.0;
|
|
49
|
+
const A64 = 1859.0 / 4104.0;
|
|
50
|
+
const A65 = -11.0 / 40.0;
|
|
51
|
+
const B1 = 25.0 / 216.0;
|
|
52
|
+
const B3 = 1408.0 / 2565.0;
|
|
53
|
+
const B4 = 2197.0 / 4104.0;
|
|
54
|
+
const B5 = -1.0 / 5.0;
|
|
55
|
+
const RKE1 = 1.0 / 360.0;
|
|
56
|
+
const RKE3 = -128.0 / 4275.0;
|
|
57
|
+
const RKE4 = -2197.0 / 75240.0;
|
|
58
|
+
const RKE5 = 1.0 / 50.0;
|
|
59
|
+
const RKE6 = 2.0 / 55.0;
|
|
60
|
+
/** Solve initial value problem using the Adams-Bashforth-Moulton predictor-corrector method of order 4
|
|
61
|
+
* @param odes initial value problem for ordinary differential equations
|
|
62
|
+
* @param callback computations control callback
|
|
63
|
+
* @returns solution of the problem
|
|
64
|
+
* @example
|
|
65
|
+
* // Example. Solve the following initial value problem using the AB4 method:
|
|
66
|
+
* // dx/dt = x + y - t
|
|
67
|
+
* // dy/dt = x * y + t
|
|
68
|
+
* // x(0) = 1
|
|
69
|
+
* // y(0) = -1
|
|
70
|
+
* // on [0, 2] with the step 0.01.
|
|
71
|
+
* import { ODEs, ab4 } from 'diff-grok';
|
|
72
|
+
*
|
|
73
|
+
* const task: ODEs = {
|
|
74
|
+
* name: 'Example', // name of your model
|
|
75
|
+
* arg: {
|
|
76
|
+
* name: 't', // name of the argument
|
|
77
|
+
* start: 0, // initial value of the argument
|
|
78
|
+
* finish: 2, // final value of the argument
|
|
79
|
+
* step: 0.01, // solution grid step
|
|
80
|
+
* },
|
|
81
|
+
* initial: [1, -1], // initial values
|
|
82
|
+
* func: (t: number, y: Float64Array, output: Float64Array) => { // right-hand side of the system
|
|
83
|
+
* output[0] = y[0] + y[1] - t; // 1-st equation
|
|
84
|
+
* output[1] = y[0] * y[1] + t; // 2-nd equation
|
|
85
|
+
* },
|
|
86
|
+
* tolerance: 1e-7, // tolerance
|
|
87
|
+
* solutionColNames: ['x', 'y'], // names of solution functions
|
|
88
|
+
* };
|
|
89
|
+
*
|
|
90
|
+
* try {
|
|
91
|
+
* // Solve the problem using the AB4 method
|
|
92
|
+
* const solution = ab4(task);
|
|
93
|
+
*
|
|
94
|
+
* // Print a table with the results
|
|
95
|
+
* console.log(task.arg.name, task.solutionColNames[0], task.solutionColNames[1]);
|
|
96
|
+
* const length = solution[0].length;
|
|
97
|
+
* for (let i = 0; i < length; ++i)
|
|
98
|
+
* console.log(solution[0][i], solution[1][i], solution[2][i]);
|
|
99
|
+
* } catch (err) {
|
|
100
|
+
* console.log('Solver failed: ', err instanceof Error ? err.message : 'Unknown problem!');
|
|
101
|
+
* }
|
|
102
|
+
*/
|
|
103
|
+
export function ab4(odes, callback) {
|
|
104
|
+
const f = odes.func;
|
|
105
|
+
// operating variables
|
|
106
|
+
const t0 = odes.arg.start;
|
|
107
|
+
const t1 = odes.arg.finish;
|
|
108
|
+
let h = odes.arg.step;
|
|
109
|
+
const hDataframe = h;
|
|
110
|
+
const hMax = hDataframe * 10;
|
|
111
|
+
const tolerance = odes.tolerance;
|
|
112
|
+
const rowCount = Math.trunc((t1 - t0) / h) + 1;
|
|
113
|
+
const dim = odes.initial.length;
|
|
114
|
+
// result arrays
|
|
115
|
+
const tArr = new Float64Array(rowCount);
|
|
116
|
+
const yArrs = Array(dim);
|
|
117
|
+
for (let i = 0; i < dim; ++i)
|
|
118
|
+
yArrs[i] = new Float64Array(rowCount);
|
|
119
|
+
// method routine
|
|
120
|
+
let timeDataframe = t0 + hDataframe;
|
|
121
|
+
let t = t0;
|
|
122
|
+
let tPrev = t0;
|
|
123
|
+
let hNext = 0.0;
|
|
124
|
+
let flag = true;
|
|
125
|
+
let index = 1;
|
|
126
|
+
let errmax = 0;
|
|
127
|
+
let hTemp = 0;
|
|
128
|
+
let tNew = 0;
|
|
129
|
+
// working buffers
|
|
130
|
+
const y = new Float64Array(odes.initial);
|
|
131
|
+
const yPrev = new Float64Array(odes.initial);
|
|
132
|
+
const dydt = new Float64Array(dim);
|
|
133
|
+
const yScale = new Float64Array(dim);
|
|
134
|
+
const yTemp = new Float64Array(dim);
|
|
135
|
+
const yErr = new Float64Array(dim);
|
|
136
|
+
// AB4-AM3 history: fBuf[0] = f(t_n, y_n), fBuf[3] = f(t_{n-3}, y_{n-3})
|
|
137
|
+
const fBuf = [];
|
|
138
|
+
for (let i = 0; i < HIST_LEN; ++i)
|
|
139
|
+
fBuf[i] = new Float64Array(dim);
|
|
140
|
+
let histCount = 0;
|
|
141
|
+
let lastH = 0;
|
|
142
|
+
// AB4-AM3 corrector buffers
|
|
143
|
+
const yCorr = new Float64Array(dim);
|
|
144
|
+
const fPred = new Float64Array(dim);
|
|
145
|
+
// RKF45 stage buffers (bootstrap)
|
|
146
|
+
const k1 = new Float64Array(dim);
|
|
147
|
+
const k2 = new Float64Array(dim);
|
|
148
|
+
const k3 = new Float64Array(dim);
|
|
149
|
+
const k4 = new Float64Array(dim);
|
|
150
|
+
const k5 = new Float64Array(dim);
|
|
151
|
+
const k6 = new Float64Array(dim);
|
|
152
|
+
// store initial f-value
|
|
153
|
+
f(t, y, fBuf[0]);
|
|
154
|
+
histCount = 1;
|
|
155
|
+
// 1. SOLUTION AT THE POINT t0
|
|
156
|
+
tArr[0] = t0;
|
|
157
|
+
for (let i = 0; i < dim; ++i)
|
|
158
|
+
yArrs[i][0] = y[i];
|
|
159
|
+
// 2. COMPUTE NUMERICAL SOLUTION FOR THE POINTS FROM THE INTERVAL (t0, t1)
|
|
160
|
+
while (flag) {
|
|
161
|
+
// compute derivative
|
|
162
|
+
f(t, y, dydt);
|
|
163
|
+
// check whether to go on computations
|
|
164
|
+
if (callback)
|
|
165
|
+
callback.onIterationStart();
|
|
166
|
+
// compute scale vector
|
|
167
|
+
for (let i = 0; i < dim; ++i)
|
|
168
|
+
yScale[i] = abs(y[i]) + h * abs(dydt[i]) + TINY;
|
|
169
|
+
// check end point
|
|
170
|
+
if (t + h > t1) {
|
|
171
|
+
h = t1 - t;
|
|
172
|
+
flag = false;
|
|
173
|
+
}
|
|
174
|
+
// if step size changed, history is invalid (AB4 needs uniform spacing)
|
|
175
|
+
if (histCount > 1 && h !== lastH) {
|
|
176
|
+
histCount = 1;
|
|
177
|
+
f(t, y, fBuf[0]);
|
|
178
|
+
}
|
|
179
|
+
// adaptive step loop
|
|
180
|
+
while (true) {
|
|
181
|
+
if (histCount < HIST_LEN) {
|
|
182
|
+
// BOOTSTRAP PHASE: RKF45 single step to build up history
|
|
183
|
+
// Stage 1: k1 = f(t, y)
|
|
184
|
+
f(t, y, k1);
|
|
185
|
+
// Stage 2: k2 = f(t + C2*h, y + h*A21*k1)
|
|
186
|
+
for (let i = 0; i < dim; ++i)
|
|
187
|
+
yTemp[i] = y[i] + h * A21 * k1[i];
|
|
188
|
+
f(t + C2 * h, yTemp, k2);
|
|
189
|
+
// Stage 3: k3 = f(t + C3*h, y + h*(A31*k1 + A32*k2))
|
|
190
|
+
for (let i = 0; i < dim; ++i)
|
|
191
|
+
yTemp[i] = y[i] + h * (A31 * k1[i] + A32 * k2[i]);
|
|
192
|
+
f(t + C3 * h, yTemp, k3);
|
|
193
|
+
// Stage 4: k4 = f(t + C4*h, y + h*(A41*k1 + A42*k2 + A43*k3))
|
|
194
|
+
for (let i = 0; i < dim; ++i)
|
|
195
|
+
yTemp[i] = y[i] + h * (A41 * k1[i] + A42 * k2[i] + A43 * k3[i]);
|
|
196
|
+
f(t + C4 * h, yTemp, k4);
|
|
197
|
+
// Stage 5: k5 = f(t + h, y + h*(A51*k1 + A52*k2 + A53*k3 + A54*k4))
|
|
198
|
+
for (let i = 0; i < dim; ++i)
|
|
199
|
+
yTemp[i] = y[i] + h * (A51 * k1[i] + A52 * k2[i] + A53 * k3[i] + A54 * k4[i]);
|
|
200
|
+
f(t + h, yTemp, k5);
|
|
201
|
+
// Stage 6: k6 = f(t + C6*h, y + h*(A61*k1 + A62*k2 + A63*k3 + A64*k4 + A65*k5))
|
|
202
|
+
for (let i = 0; i < dim; ++i)
|
|
203
|
+
yTemp[i] = y[i] + h * (A61 * k1[i] + A62 * k2[i] + A63 * k3[i] + A64 * k4[i] + A65 * k5[i]);
|
|
204
|
+
f(t + C6 * h, yTemp, k6);
|
|
205
|
+
// 4th-order solution
|
|
206
|
+
for (let i = 0; i < dim; ++i)
|
|
207
|
+
yTemp[i] = y[i] + h * (B1 * k1[i] + B3 * k3[i] + B4 * k4[i] + B5 * k5[i]);
|
|
208
|
+
// Error estimate: difference between 4th and 5th order solutions
|
|
209
|
+
for (let i = 0; i < dim; ++i)
|
|
210
|
+
yErr[i] = h * (RKE1 * k1[i] + RKE3 * k3[i] + RKE4 * k4[i] + RKE5 * k5[i] + RKE6 * k6[i]);
|
|
211
|
+
// estimating error
|
|
212
|
+
errmax = 0;
|
|
213
|
+
for (let i = 0; i < dim; ++i)
|
|
214
|
+
errmax = max(errmax, abs(yErr[i] / yScale[i]));
|
|
215
|
+
errmax /= tolerance;
|
|
216
|
+
// processing the error obtained
|
|
217
|
+
if (errmax > 1) {
|
|
218
|
+
hTemp = SAFETY * h * Math.pow(errmax, PSHRNK);
|
|
219
|
+
h = max(hTemp, REDUCE_COEF * h);
|
|
220
|
+
tNew = t + h;
|
|
221
|
+
if (tNew == t)
|
|
222
|
+
throw new Error(ERROR_MSG.AB4_FAILS);
|
|
223
|
+
// step size changed, reset history if needed
|
|
224
|
+
if (histCount > 1) {
|
|
225
|
+
histCount = 1;
|
|
226
|
+
f(t, y, fBuf[0]);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
// step accepted
|
|
231
|
+
t = t + h;
|
|
232
|
+
for (let i = 0; i < dim; ++i)
|
|
233
|
+
y[i] = yTemp[i];
|
|
234
|
+
// shift history and store new f-value
|
|
235
|
+
for (let j = Math.min(histCount, HIST_LEN - 1); j > 0; --j)
|
|
236
|
+
fBuf[j].set(fBuf[j - 1]);
|
|
237
|
+
f(t, y, fBuf[0]);
|
|
238
|
+
histCount++;
|
|
239
|
+
lastH = h;
|
|
240
|
+
// during bootstrap, keep h constant for uniform spacing
|
|
241
|
+
hNext = h;
|
|
242
|
+
if (hNext > hMax)
|
|
243
|
+
hNext = hMax;
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
// AB4-AM3 PHASE: Predictor-Corrector (PECE)
|
|
249
|
+
// Predict (Adams-Bashforth 4-step)
|
|
250
|
+
for (let i = 0; i < dim; ++i) {
|
|
251
|
+
yTemp[i] = y[i] + h * (AB0 * fBuf[0][i] + AB1 * fBuf[1][i] +
|
|
252
|
+
AB2 * fBuf[2][i] + AB3 * fBuf[3][i]);
|
|
253
|
+
}
|
|
254
|
+
// Evaluate f at predicted point
|
|
255
|
+
f(t + h, yTemp, fPred);
|
|
256
|
+
// Correct (Adams-Moulton 3-step)
|
|
257
|
+
for (let i = 0; i < dim; ++i) {
|
|
258
|
+
yCorr[i] = y[i] + h * (AM_NEW * fPred[i] + AM0 * fBuf[0][i] +
|
|
259
|
+
AM1 * fBuf[1][i] + AM2 * fBuf[2][i]);
|
|
260
|
+
}
|
|
261
|
+
// Error estimate (Milne's device)
|
|
262
|
+
for (let i = 0; i < dim; ++i)
|
|
263
|
+
yErr[i] = MILNE * (yCorr[i] - yTemp[i]);
|
|
264
|
+
// estimating error
|
|
265
|
+
errmax = 0;
|
|
266
|
+
for (let i = 0; i < dim; ++i)
|
|
267
|
+
errmax = max(errmax, abs(yErr[i] / yScale[i]));
|
|
268
|
+
errmax /= tolerance;
|
|
269
|
+
// processing the error obtained
|
|
270
|
+
if (errmax > 1) {
|
|
271
|
+
// step rejected: shrink step and re-bootstrap
|
|
272
|
+
hTemp = SAFETY * h * Math.pow(errmax, PSHRNK);
|
|
273
|
+
h = max(hTemp, REDUCE_COEF * h);
|
|
274
|
+
tNew = t + h;
|
|
275
|
+
if (tNew == t)
|
|
276
|
+
throw new Error(ERROR_MSG.AB4_FAILS);
|
|
277
|
+
histCount = 1;
|
|
278
|
+
f(t, y, fBuf[0]);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
if (errmax > ERR_CONTR)
|
|
282
|
+
hNext = SAFETY * h * Math.pow(errmax, PSGROW);
|
|
283
|
+
else
|
|
284
|
+
hNext = GROW_COEF * h;
|
|
285
|
+
if (hNext > hMax)
|
|
286
|
+
hNext = hMax;
|
|
287
|
+
t = t + h;
|
|
288
|
+
for (let i = 0; i < dim; ++i)
|
|
289
|
+
y[i] = yCorr[i];
|
|
290
|
+
// shift history and store f at corrected point (PECE final evaluate)
|
|
291
|
+
const recycled = fBuf[HIST_LEN - 1];
|
|
292
|
+
for (let j = HIST_LEN - 1; j > 0; --j)
|
|
293
|
+
fBuf[j] = fBuf[j - 1];
|
|
294
|
+
fBuf[0] = recycled;
|
|
295
|
+
f(t, y, fBuf[0]);
|
|
296
|
+
lastH = h;
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
} // while (true)
|
|
301
|
+
// compute linearly interpolated results and store them in dataframe
|
|
302
|
+
while (timeDataframe < t) {
|
|
303
|
+
const cLeft = (t - timeDataframe) / (t - tPrev);
|
|
304
|
+
const cRight = 1.0 - cLeft;
|
|
305
|
+
tArr[index] = timeDataframe;
|
|
306
|
+
for (let j = 0; j < dim; ++j)
|
|
307
|
+
yArrs[j][index] = cRight * y[j] + cLeft * yPrev[j];
|
|
308
|
+
timeDataframe += hDataframe;
|
|
309
|
+
++index;
|
|
310
|
+
}
|
|
311
|
+
h = hNext;
|
|
312
|
+
tPrev = t;
|
|
313
|
+
for (let i = 0; i < dim; ++i)
|
|
314
|
+
yPrev[i] = y[i];
|
|
315
|
+
} // while (flag)
|
|
316
|
+
// perform final callback actions
|
|
317
|
+
if (callback)
|
|
318
|
+
callback.onComputationsCompleted();
|
|
319
|
+
// 3. solution at the point t1
|
|
320
|
+
tArr[rowCount - 1] = t1;
|
|
321
|
+
for (let i = 0; i < dim; ++i)
|
|
322
|
+
yArrs[i][rowCount - 1] = y[i];
|
|
323
|
+
// 4. prepare output
|
|
324
|
+
const solution = Array(dim + 1);
|
|
325
|
+
// independent variable
|
|
326
|
+
solution[0] = tArr;
|
|
327
|
+
// functions
|
|
328
|
+
for (let i = 0; i < dim; ++i)
|
|
329
|
+
solution[i + 1] = yArrs[i];
|
|
330
|
+
return solution;
|
|
331
|
+
} // ab4
|
|
332
|
+
//# sourceMappingURL=ab4-method.js.map
|