diff-grok 1.1.0 → 1.3.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/LICENSE +1 -1
- package/README.MD +80 -31
- package/dist/index.d.ts +6 -0
- package/{index.js → dist/index.js} +2 -1
- package/dist/index.js.map +1 -0
- package/dist/src/examples/basic-use.d.ts +10 -0
- package/dist/src/examples/basic-use.js.map +1 -0
- package/dist/src/examples/check-methods.d.ts +1 -0
- package/{src → dist/src}/examples/check-methods.js +15 -3
- package/dist/src/examples/check-methods.js.map +1 -0
- package/dist/src/examples/corr-probs.d.ts +15 -0
- package/{src → dist/src}/examples/corr-probs.js +2 -2
- package/dist/src/examples/corr-probs.js.map +1 -0
- package/dist/src/examples/cyclic-model.d.ts +6 -0
- package/dist/src/examples/cyclic-model.js.map +1 -0
- package/dist/src/examples/e5.d.ts +15 -0
- package/dist/src/examples/e5.js.map +1 -0
- package/dist/src/examples/hires.d.ts +15 -0
- package/dist/src/examples/hires.js.map +1 -0
- package/dist/src/examples/index.d.ts +22 -0
- package/dist/src/examples/index.js.map +1 -0
- package/dist/src/examples/model-updates.d.ts +6 -0
- package/dist/src/examples/model-updates.js.map +1 -0
- package/dist/src/examples/orego.d.ts +15 -0
- package/dist/src/examples/orego.js.map +1 -0
- package/dist/src/examples/pipeline-use.d.ts +6 -0
- package/dist/src/examples/pipeline-use.js.map +1 -0
- package/dist/src/examples/pollution.d.ts +15 -0
- package/dist/src/examples/pollution.js.map +1 -0
- package/{src/examples/print-benchmark.ts → dist/src/examples/print-benchmark.d.ts} +8 -58
- package/dist/src/examples/print-benchmark.js.map +1 -0
- package/dist/src/examples/robertson.d.ts +15 -0
- package/{src → dist/src}/examples/robertson.js +2 -2
- package/dist/src/examples/robertson.js.map +1 -0
- package/dist/src/examples/scripting.d.ts +1 -0
- package/dist/src/examples/scripting.js.map +1 -0
- package/dist/src/examples/vdpol.d.ts +15 -0
- package/dist/src/examples/vdpol.js.map +1 -0
- package/dist/src/latex-export/examples/advanced-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/advanced-to-latex.js +41 -0
- package/dist/src/latex-export/examples/advanced-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/basic-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/basic-to-latex.js +17 -0
- package/dist/src/latex-export/examples/basic-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/bioreactor-to-latex-selective.d.ts +2 -0
- package/dist/src/latex-export/examples/bioreactor-to-latex-selective.js +145 -0
- package/dist/src/latex-export/examples/bioreactor-to-latex-selective.js.map +1 -0
- package/dist/src/latex-export/examples/chem-react-to-latex-no-cdot.d.ts +2 -0
- package/dist/src/latex-export/examples/chem-react-to-latex-no-cdot.js +41 -0
- package/dist/src/latex-export/examples/chem-react-to-latex-no-cdot.js.map +1 -0
- package/dist/src/latex-export/examples/energy-n-control-to-markdown.d.ts +2 -0
- package/dist/src/latex-export/examples/energy-n-control-to-markdown.js +58 -0
- package/dist/src/latex-export/examples/energy-n-control-to-markdown.js.map +1 -0
- package/dist/src/latex-export/examples/extended-to-markdown.d.ts +2 -0
- package/dist/src/latex-export/examples/extended-to-markdown.js +37 -0
- package/dist/src/latex-export/examples/extended-to-markdown.js.map +1 -0
- package/dist/src/latex-export/examples/fermentation-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/fermentation-to-latex.js +32 -0
- package/dist/src/latex-export/examples/fermentation-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/ga-production-to-markdown.d.ts +2 -0
- package/dist/src/latex-export/examples/ga-production-to-markdown.js +58 -0
- package/dist/src/latex-export/examples/ga-production-to-markdown.js.map +1 -0
- package/dist/src/latex-export/examples/nimotuzumab-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/nimotuzumab-to-latex.js +53 -0
- package/dist/src/latex-export/examples/nimotuzumab-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/pk-pd-to-markdown-minimal.d.ts +2 -0
- package/dist/src/latex-export/examples/pk-pd-to-markdown-minimal.js +50 -0
- package/dist/src/latex-export/examples/pk-pd-to-markdown-minimal.js.map +1 -0
- package/dist/src/latex-export/examples/pk-to-markdown.d.ts +2 -0
- package/dist/src/latex-export/examples/pk-to-markdown.js +35 -0
- package/dist/src/latex-export/examples/pk-to-markdown.js.map +1 -0
- package/dist/src/latex-export/examples/pollution-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/pollution-to-latex.js +141 -0
- package/dist/src/latex-export/examples/pollution-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/robertson-to-latex-no-meta.d.ts +2 -0
- package/dist/src/latex-export/examples/robertson-to-latex-no-meta.js +25 -0
- package/dist/src/latex-export/examples/robertson-to-latex-no-meta.js.map +1 -0
- package/dist/src/latex-export/generator/bracket-manager.d.ts +19 -0
- package/dist/src/latex-export/generator/bracket-manager.js +58 -0
- package/dist/src/latex-export/generator/bracket-manager.js.map +1 -0
- package/dist/src/latex-export/generator/document-builder.d.ts +13 -0
- package/dist/src/latex-export/generator/document-builder.js +433 -0
- package/dist/src/latex-export/generator/document-builder.js.map +1 -0
- package/dist/src/latex-export/generator/latex-generator.d.ts +23 -0
- package/dist/src/latex-export/generator/latex-generator.js +176 -0
- package/dist/src/latex-export/generator/latex-generator.js.map +1 -0
- package/dist/src/latex-export/index.d.ts +8 -0
- package/dist/src/latex-export/index.js +25 -0
- package/dist/src/latex-export/index.js.map +1 -0
- package/dist/src/latex-export/output/md-formatter.d.ts +16 -0
- package/dist/src/latex-export/output/md-formatter.js +27 -0
- package/dist/src/latex-export/output/md-formatter.js.map +1 -0
- package/dist/src/latex-export/output/tex-formatter.d.ts +5 -0
- package/dist/src/latex-export/output/tex-formatter.js +20 -0
- package/dist/src/latex-export/output/tex-formatter.js.map +1 -0
- package/dist/src/latex-export/parser/ast-parser.d.ts +7 -0
- package/dist/src/latex-export/parser/ast-parser.js +153 -0
- package/dist/src/latex-export/parser/ast-parser.js.map +1 -0
- package/dist/src/latex-export/parser/ivp-parser.d.ts +6 -0
- package/dist/src/latex-export/parser/ivp-parser.js +219 -0
- package/dist/src/latex-export/parser/ivp-parser.js.map +1 -0
- package/dist/src/latex-export/parser/line-joiner.d.ts +25 -0
- package/dist/src/latex-export/parser/line-joiner.js +80 -0
- package/dist/src/latex-export/parser/line-joiner.js.map +1 -0
- package/dist/src/latex-export/parser/tokenizer.d.ts +7 -0
- package/dist/src/latex-export/parser/tokenizer.js +143 -0
- package/dist/src/latex-export/parser/tokenizer.js.map +1 -0
- package/dist/src/latex-export/transformer/functions.d.ts +12 -0
- package/dist/src/latex-export/transformer/functions.js +47 -0
- package/dist/src/latex-export/transformer/functions.js.map +1 -0
- package/dist/src/latex-export/transformer/identifier.d.ts +23 -0
- package/dist/src/latex-export/transformer/identifier.js +194 -0
- package/dist/src/latex-export/transformer/identifier.js.map +1 -0
- package/dist/src/latex-export/transformer/operators.d.ts +9 -0
- package/dist/src/latex-export/transformer/operators.js +41 -0
- package/dist/src/latex-export/transformer/operators.js.map +1 -0
- package/dist/src/latex-export/types.d.ts +122 -0
- package/dist/src/latex-export/types.js +10 -0
- package/dist/src/latex-export/types.js.map +1 -0
- package/{src/pipeline/basic-pipeline-creator.ts → dist/src/pipeline/basic-pipeline-creator.d.ts} +11 -28
- package/dist/src/pipeline/basic-pipeline-creator.js.map +1 -0
- package/dist/src/pipeline/constants.d.ts +14 -0
- package/dist/src/pipeline/constants.js.map +1 -0
- package/dist/src/pipeline/index.d.ts +7 -0
- package/dist/src/pipeline/index.js.map +1 -0
- package/dist/src/pipeline/input.d.ts +3 -0
- package/dist/src/pipeline/input.js.map +1 -0
- package/dist/src/pipeline/loops-pipeline-creator.d.ts +124 -0
- package/dist/src/pipeline/loops-pipeline-creator.js.map +1 -0
- package/dist/src/pipeline/output.d.ts +10 -0
- package/{src → dist/src}/pipeline/output.js +1 -1
- package/dist/src/pipeline/output.js.map +1 -0
- package/dist/src/pipeline/pipeline-creator.d.ts +12 -0
- package/{src → dist/src}/pipeline/pipeline-creator.js +2 -0
- package/dist/src/pipeline/pipeline-creator.js.map +1 -0
- package/{src/pipeline/pipeline.ts → dist/src/pipeline/pipeline.d.ts} +10 -97
- package/dist/src/pipeline/pipeline.js.map +1 -0
- package/{src/pipeline/updates-pipeline-creator.ts → dist/src/pipeline/updates-pipeline-creator.d.ts} +15 -131
- package/dist/src/pipeline/updates-pipeline-creator.js.map +1 -0
- package/dist/src/scripting-tools/constants.d.ts +59 -0
- package/dist/src/scripting-tools/constants.js.map +1 -0
- package/dist/src/scripting-tools/index.d.ts +3 -0
- package/dist/src/scripting-tools/index.js.map +1 -0
- package/dist/src/scripting-tools/model-error.d.ts +10 -0
- package/{src → dist/src}/scripting-tools/model-error.js +2 -1
- package/dist/src/scripting-tools/model-error.js.map +1 -0
- package/dist/src/scripting-tools/scripting-tools.d.ts +277 -0
- package/{src → dist/src}/scripting-tools/scripting-tools.js +2 -4
- package/dist/src/scripting-tools/scripting-tools.js.map +1 -0
- package/dist/src/solver-tools/ab4-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/ab4-method.js +3 -3
- package/dist/src/solver-tools/ab4-method.js.map +1 -0
- package/dist/src/solver-tools/ab5-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/ab5-method.js +3 -3
- package/dist/src/solver-tools/ab5-method.js.map +1 -0
- package/dist/src/solver-tools/callbacks/callback-base.d.ts +8 -0
- package/dist/src/solver-tools/callbacks/callback-base.js.map +1 -0
- package/dist/src/solver-tools/callbacks/callback-tools.d.ts +6 -0
- package/dist/src/solver-tools/callbacks/callback-tools.js.map +1 -0
- package/dist/src/solver-tools/callbacks/iter-checker-callback.d.ts +12 -0
- package/{src → dist/src}/solver-tools/callbacks/iter-checker-callback.js +2 -0
- package/dist/src/solver-tools/callbacks/iter-checker-callback.js.map +1 -0
- package/dist/src/solver-tools/callbacks/time-checker-callback.d.ts +12 -0
- package/{src → dist/src}/solver-tools/callbacks/time-checker-callback.js +2 -2
- package/dist/src/solver-tools/callbacks/time-checker-callback.js.map +1 -0
- package/dist/src/solver-tools/cvode/common.d.ts +395 -0
- package/dist/src/solver-tools/cvode/common.js +483 -0
- package/dist/src/solver-tools/cvode/common.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode.d.ts +23 -0
- package/dist/src/solver-tools/cvode/cvode.js +1062 -0
- package/dist/src/solver-tools/cvode/cvode.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_adams.d.ts +22 -0
- package/dist/src/solver-tools/cvode/cvode_adams.js +124 -0
- package/dist/src/solver-tools/cvode/cvode_adams.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_bdf.d.ts +37 -0
- package/dist/src/solver-tools/cvode/cvode_bdf.js +153 -0
- package/dist/src/solver-tools/cvode/cvode_bdf.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_class.d.ts +116 -0
- package/dist/src/solver-tools/cvode/cvode_class.js +163 -0
- package/dist/src/solver-tools/cvode/cvode_class.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_hin.d.ts +24 -0
- package/dist/src/solver-tools/cvode/cvode_hin.js +119 -0
- package/dist/src/solver-tools/cvode/cvode_hin.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_io.d.ts +98 -0
- package/dist/src/solver-tools/cvode/cvode_io.js +202 -0
- package/dist/src/solver-tools/cvode/cvode_io.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_ls.d.ts +23 -0
- package/dist/src/solver-tools/cvode/cvode_ls.js +210 -0
- package/dist/src/solver-tools/cvode/cvode_ls.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_nls.d.ts +25 -0
- package/dist/src/solver-tools/cvode/cvode_nls.js +220 -0
- package/dist/src/solver-tools/cvode/cvode_nls.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_root.d.ts +64 -0
- package/dist/src/solver-tools/cvode/cvode_root.js +415 -0
- package/dist/src/solver-tools/cvode/cvode_root.js.map +1 -0
- package/dist/src/solver-tools/cvode/dense_linalg.d.ts +50 -0
- package/dist/src/solver-tools/cvode/dense_linalg.js +131 -0
- package/dist/src/solver-tools/cvode/dense_linalg.js.map +1 -0
- package/dist/src/solver-tools/cvode/index.d.ts +24 -0
- package/dist/src/solver-tools/cvode/index.js +26 -0
- package/dist/src/solver-tools/cvode/index.js.map +1 -0
- package/dist/src/solver-tools/cvode-method.d.ts +47 -0
- package/dist/src/solver-tools/cvode-method.js +114 -0
- package/dist/src/solver-tools/cvode-method.js.map +1 -0
- package/dist/src/solver-tools/index.d.ts +16 -0
- package/{src → dist/src}/solver-tools/index.js +1 -0
- package/dist/src/solver-tools/index.js.map +1 -0
- package/dist/src/solver-tools/lin-alg-tools.d.ts +6 -0
- package/dist/src/solver-tools/lin-alg-tools.js.map +1 -0
- package/dist/src/solver-tools/lsoda/blas.d.ts +59 -0
- package/{src → dist/src}/solver-tools/lsoda/blas.js +11 -0
- package/dist/src/solver-tools/lsoda/blas.js.map +1 -0
- package/dist/src/solver-tools/lsoda/cfode.d.ts +18 -0
- package/{src → dist/src}/solver-tools/lsoda/cfode.js +11 -0
- package/dist/src/solver-tools/lsoda/cfode.js.map +1 -0
- package/dist/src/solver-tools/lsoda/common.d.ts +85 -0
- package/dist/src/solver-tools/lsoda/common.js +96 -0
- package/dist/src/solver-tools/lsoda/common.js.map +1 -0
- package/dist/src/solver-tools/lsoda/corfailure.d.ts +18 -0
- package/{src → dist/src}/solver-tools/lsoda/corfailure.js +11 -0
- package/dist/src/solver-tools/lsoda/corfailure.js.map +1 -0
- package/dist/src/solver-tools/lsoda/correction.d.ts +23 -0
- package/{src → dist/src}/solver-tools/lsoda/correction.js +11 -0
- package/dist/src/solver-tools/lsoda/correction.js.map +1 -0
- package/dist/src/solver-tools/lsoda/dense.d.ts +47 -0
- package/{src → dist/src}/solver-tools/lsoda/dense.js +13 -0
- package/dist/src/solver-tools/lsoda/dense.js.map +1 -0
- package/dist/src/solver-tools/lsoda/index.d.ts +16 -0
- package/dist/src/solver-tools/lsoda/index.js +15 -0
- package/dist/src/solver-tools/lsoda/index.js.map +1 -0
- package/dist/src/solver-tools/lsoda/intdy.d.ts +19 -0
- package/{src → dist/src}/solver-tools/lsoda/intdy.js +11 -0
- package/dist/src/solver-tools/lsoda/intdy.js.map +1 -0
- package/dist/src/solver-tools/lsoda/lsoda.d.ts +66 -0
- package/{src → dist/src}/solver-tools/lsoda/lsoda.js +24 -5
- package/dist/src/solver-tools/lsoda/lsoda.js.map +1 -0
- package/dist/src/solver-tools/lsoda/methodswitch.d.ts +21 -0
- package/{src → dist/src}/solver-tools/lsoda/methodswitch.js +11 -0
- package/dist/src/solver-tools/lsoda/methodswitch.js.map +1 -0
- package/dist/src/solver-tools/lsoda/orderswitch.d.ts +21 -0
- package/{src → dist/src}/solver-tools/lsoda/orderswitch.js +11 -0
- package/dist/src/solver-tools/lsoda/orderswitch.js.map +1 -0
- package/dist/src/solver-tools/lsoda/prja.d.ts +18 -0
- package/{src → dist/src}/solver-tools/lsoda/prja.js +11 -0
- package/dist/src/solver-tools/lsoda/prja.js.map +1 -0
- package/dist/src/solver-tools/lsoda/scaleh.d.ts +16 -0
- package/{src → dist/src}/solver-tools/lsoda/scaleh.js +11 -0
- package/dist/src/solver-tools/lsoda/scaleh.js.map +1 -0
- package/dist/src/solver-tools/lsoda/solsy.d.ts +17 -0
- package/dist/src/solver-tools/lsoda/solsy.js +25 -0
- package/dist/src/solver-tools/lsoda/solsy.js.map +1 -0
- package/dist/src/solver-tools/lsoda/stoda.d.ts +19 -0
- package/{src → dist/src}/solver-tools/lsoda/stoda.js +11 -0
- package/dist/src/solver-tools/lsoda/stoda.js.map +1 -0
- package/dist/src/solver-tools/lsoda-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/lsoda-method.js +23 -9
- package/dist/src/solver-tools/lsoda-method.js.map +1 -0
- package/dist/src/solver-tools/mrt-method.d.ts +47 -0
- package/{src → dist/src}/solver-tools/mrt-method.js +2 -2
- package/dist/src/solver-tools/mrt-method.js.map +1 -0
- package/dist/src/solver-tools/rk3-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/rk3-method.js +2 -2
- package/dist/src/solver-tools/rk3-method.js.map +1 -0
- package/dist/src/solver-tools/rk4-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/rk4-method.js +2 -2
- package/dist/src/solver-tools/rk4-method.js.map +1 -0
- package/dist/src/solver-tools/rkdp-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/rkdp-method.js +2 -2
- package/dist/src/solver-tools/rkdp-method.js.map +1 -0
- package/dist/src/solver-tools/ros34prw-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/ros34prw-method.js +2 -2
- package/dist/src/solver-tools/ros34prw-method.js.map +1 -0
- package/dist/src/solver-tools/ros3prw-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/ros3prw-method.js +2 -2
- package/dist/src/solver-tools/ros3prw-method.js.map +1 -0
- package/{src/solver-tools/solver-defs.ts → dist/src/solver-tools/solver-defs.d.ts} +45 -84
- package/{src → dist/src}/solver-tools/solver-defs.js +1 -0
- package/dist/src/solver-tools/solver-defs.js.map +1 -0
- package/dist/src/worker-tools/index.d.ts +2 -0
- package/dist/src/worker-tools/index.js.map +1 -0
- package/{src/worker-tools/scripting.ts → dist/src/worker-tools/scripting.d.ts} +9 -91
- package/dist/src/worker-tools/scripting.js.map +1 -0
- package/dist/src/worker-tools/solving.d.ts +7 -0
- package/{src → dist/src}/worker-tools/solving.js +3 -1
- package/dist/src/worker-tools/solving.js.map +1 -0
- package/package.json +13 -12
- package/.claude/settings.local.json +0 -11
- package/.eslintrc.json +0 -45
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -22
- package/.github/scripts/bump-js-api-version.sh +0 -106
- package/.github/scripts/check-output.sh +0 -20
- package/.github/scripts/iac-cfn-deploy.sh +0 -90
- package/.github/scripts/slack_api_request.sh +0 -65
- package/.github/scripts/test_package.sh +0 -270
- package/.github/workflows/deploy-docs.yml +0 -15
- package/.github/workflows/libraries.yaml +0 -305
- package/.github/workflows/test.yaml +0 -19
- package/CLAUDE.md +0 -98
- package/CONTRIBUTING.md +0 -74
- package/eslintrc.json +0 -45
- 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/POLL.png +0 -0
- package/images/ROBER.png +0 -0
- package/images/VDP0L.png +0 -0
- package/images/VDPOL.png +0 -0
- package/images/acid-prod.gif +0 -0
- package/index.js.map +0 -1
- package/index.ts +0 -17
- package/jest.config.js +0 -13
- package/src/examples/basic-use.js.map +0 -1
- package/src/examples/basic-use.ts +0 -44
- package/src/examples/bioreactor.js +0 -125
- package/src/examples/bioreactor.js.map +0 -1
- package/src/examples/bioreactor.ts +0 -132
- package/src/examples/check-methods.js.map +0 -1
- package/src/examples/check-methods.ts +0 -81
- package/src/examples/corr-probs.js.map +0 -1
- package/src/examples/corr-probs.ts +0 -155
- package/src/examples/cyclic-model.js.map +0 -1
- package/src/examples/cyclic-model.ts +0 -112
- package/src/examples/e5.js.map +0 -1
- package/src/examples/e5.ts +0 -36
- package/src/examples/hires.js.map +0 -1
- package/src/examples/hires.ts +0 -40
- package/src/examples/index.js.map +0 -1
- package/src/examples/index.ts +0 -34
- package/src/examples/model-updates.js.map +0 -1
- package/src/examples/model-updates.ts +0 -122
- package/src/examples/orego.js.map +0 -1
- package/src/examples/orego.ts +0 -25
- package/src/examples/pipeline-use.js.map +0 -1
- package/src/examples/pipeline-use.ts +0 -98
- package/src/examples/pollution.js.map +0 -1
- package/src/examples/pollution.ts +0 -133
- package/src/examples/print-benchmark.js.map +0 -1
- package/src/examples/robertson.js.map +0 -1
- package/src/examples/robertson.ts +0 -19
- package/src/examples/scripting.js.map +0 -1
- package/src/examples/scripting.ts +0 -35
- package/src/examples/vdpol.js.map +0 -1
- package/src/examples/vdpol.ts +0 -17
- package/src/pipeline/basic-pipeline-creator.js.map +0 -1
- package/src/pipeline/constants.js.map +0 -1
- package/src/pipeline/constants.ts +0 -21
- package/src/pipeline/index.js.map +0 -1
- package/src/pipeline/index.ts +0 -7
- package/src/pipeline/input.js.map +0 -1
- package/src/pipeline/input.ts +0 -55
- package/src/pipeline/loops-pipeline-creator.js.map +0 -1
- package/src/pipeline/loops-pipeline-creator.ts +0 -252
- package/src/pipeline/output.js.map +0 -1
- package/src/pipeline/output.ts +0 -201
- package/src/pipeline/pipeline-creator.js.map +0 -1
- package/src/pipeline/pipeline-creator.ts +0 -20
- package/src/pipeline/pipeline.js.map +0 -1
- package/src/pipeline/updates-pipeline-creator.js.map +0 -1
- package/src/scripting-tools/constants.js.map +0 -1
- package/src/scripting-tools/constants.ts +0 -69
- package/src/scripting-tools/index.js.map +0 -1
- package/src/scripting-tools/index.ts +0 -8
- package/src/scripting-tools/model-error.js.map +0 -1
- package/src/scripting-tools/model-error.ts +0 -21
- package/src/scripting-tools/scripting-tools.js.map +0 -1
- package/src/scripting-tools/scripting-tools.ts +0 -1582
- package/src/solver-tools/ab4-method.js.map +0 -1
- package/src/solver-tools/ab4-method.ts +0 -395
- package/src/solver-tools/ab5-method.js.map +0 -1
- package/src/solver-tools/ab5-method.ts +0 -397
- package/src/solver-tools/callbacks/callback-base.js.map +0 -1
- package/src/solver-tools/callbacks/callback-base.ts +0 -12
- package/src/solver-tools/callbacks/callback-tools.js.map +0 -1
- package/src/solver-tools/callbacks/callback-tools.ts +0 -22
- package/src/solver-tools/callbacks/iter-checker-callback.js.map +0 -1
- package/src/solver-tools/callbacks/iter-checker-callback.ts +0 -25
- package/src/solver-tools/callbacks/time-checker-callback.js.map +0 -1
- package/src/solver-tools/callbacks/time-checker-callback.ts +0 -23
- package/src/solver-tools/index.js.map +0 -1
- package/src/solver-tools/index.ts +0 -15
- package/src/solver-tools/lin-alg-tools.js.map +0 -1
- package/src/solver-tools/lin-alg-tools.ts +0 -75
- package/src/solver-tools/lsoda/blas.js.map +0 -1
- package/src/solver-tools/lsoda/blas.ts +0 -267
- package/src/solver-tools/lsoda/cfode.js.map +0 -1
- package/src/solver-tools/lsoda/cfode.ts +0 -83
- package/src/solver-tools/lsoda/common.js +0 -94
- package/src/solver-tools/lsoda/common.js.map +0 -1
- package/src/solver-tools/lsoda/common.ts +0 -135
- package/src/solver-tools/lsoda/corfailure.js.map +0 -1
- package/src/solver-tools/lsoda/corfailure.ts +0 -30
- package/src/solver-tools/lsoda/correction.js.map +0 -1
- package/src/solver-tools/lsoda/correction.ts +0 -119
- package/src/solver-tools/lsoda/dense.js.map +0 -1
- package/src/solver-tools/lsoda/dense.ts +0 -129
- package/src/solver-tools/lsoda/index.js +0 -4
- package/src/solver-tools/lsoda/index.js.map +0 -1
- package/src/solver-tools/lsoda/index.ts +0 -5
- package/src/solver-tools/lsoda/intdy.js.map +0 -1
- package/src/solver-tools/lsoda/intdy.ts +0 -50
- package/src/solver-tools/lsoda/lsoda.js.map +0 -1
- package/src/solver-tools/lsoda/lsoda.ts +0 -632
- package/src/solver-tools/lsoda/methodswitch.js.map +0 -1
- package/src/solver-tools/lsoda/methodswitch.ts +0 -107
- package/src/solver-tools/lsoda/orderswitch.js.map +0 -1
- package/src/solver-tools/lsoda/orderswitch.ts +0 -95
- package/src/solver-tools/lsoda/prja.js.map +0 -1
- package/src/solver-tools/lsoda/prja.ts +0 -49
- package/src/solver-tools/lsoda/scaleh.js.map +0 -1
- package/src/solver-tools/lsoda/scaleh.ts +0 -33
- package/src/solver-tools/lsoda/solsy.js +0 -14
- package/src/solver-tools/lsoda/solsy.js.map +0 -1
- package/src/solver-tools/lsoda/solsy.ts +0 -18
- package/src/solver-tools/lsoda/stoda.js.map +0 -1
- package/src/solver-tools/lsoda/stoda.ts +0 -286
- package/src/solver-tools/lsoda-method.js.map +0 -1
- package/src/solver-tools/lsoda-method.ts +0 -136
- package/src/solver-tools/mrt-method.js.map +0 -1
- package/src/solver-tools/mrt-method.ts +0 -398
- package/src/solver-tools/rk3-method.js.map +0 -1
- package/src/solver-tools/rk3-method.ts +0 -257
- package/src/solver-tools/rk4-method.js.map +0 -1
- package/src/solver-tools/rk4-method.ts +0 -286
- package/src/solver-tools/rkdp-method.js.map +0 -1
- package/src/solver-tools/rkdp-method.ts +0 -300
- package/src/solver-tools/ros34prw-method.js.map +0 -1
- package/src/solver-tools/ros34prw-method.ts +0 -373
- package/src/solver-tools/ros3prw-method.js.map +0 -1
- package/src/solver-tools/ros3prw-method.ts +0 -342
- package/src/solver-tools/solver-defs.js.map +0 -1
- package/src/tests/correctness.test.js +0 -15
- package/src/tests/correctness.test.js.map +0 -1
- package/src/tests/correctness.test.ts +0 -16
- package/src/tests/lsoda-lib-correctness.test.js +0 -223
- package/src/tests/lsoda-lib-correctness.test.js.map +0 -1
- package/src/tests/lsoda-lib-correctness.test.ts +0 -283
- package/src/tests/lsoda-lib-performance.test.js +0 -95
- package/src/tests/lsoda-lib-performance.test.js.map +0 -1
- package/src/tests/lsoda-lib-performance.test.ts +0 -126
- package/src/tests/performance.test.js +0 -16
- package/src/tests/performance.test.js.map +0 -1
- package/src/tests/performance.test.ts +0 -17
- package/src/tests/pipeline.test.js +0 -10
- package/src/tests/pipeline.test.js.map +0 -1
- package/src/tests/pipeline.test.ts +0 -11
- package/src/tests/test-defs.js +0 -207
- package/src/tests/test-defs.js.map +0 -1
- package/src/tests/test-defs.ts +0 -225
- package/src/tests/test-utils.js +0 -28
- package/src/tests/test-utils.js.map +0 -1
- package/src/tests/test-utils.ts +0 -37
- package/src/worker-tools/index.js.map +0 -1
- package/src/worker-tools/index.ts +0 -2
- package/src/worker-tools/scripting.js.map +0 -1
- package/src/worker-tools/solving.js.map +0 -1
- package/src/worker-tools/solving.ts +0 -83
- package/tsconfig.json +0 -71
- package/typedoc.json +0 -8
- /package/{src → dist/src}/examples/basic-use.js +0 -0
- /package/{src → dist/src}/examples/cyclic-model.js +0 -0
- /package/{src → dist/src}/examples/e5.js +0 -0
- /package/{src → dist/src}/examples/hires.js +0 -0
- /package/{src → dist/src}/examples/index.js +0 -0
- /package/{src → dist/src}/examples/model-updates.js +0 -0
- /package/{src → dist/src}/examples/orego.js +0 -0
- /package/{src → dist/src}/examples/pipeline-use.js +0 -0
- /package/{src → dist/src}/examples/pollution.js +0 -0
- /package/{src → dist/src}/examples/print-benchmark.js +0 -0
- /package/{src → dist/src}/examples/scripting.js +0 -0
- /package/{src → dist/src}/examples/vdpol.js +0 -0
- /package/{src → dist/src}/pipeline/basic-pipeline-creator.js +0 -0
- /package/{src → dist/src}/pipeline/constants.js +0 -0
- /package/{src → dist/src}/pipeline/index.js +0 -0
- /package/{src → dist/src}/pipeline/input.js +0 -0
- /package/{src → dist/src}/pipeline/loops-pipeline-creator.js +0 -0
- /package/{src → dist/src}/pipeline/pipeline.js +0 -0
- /package/{src → dist/src}/pipeline/updates-pipeline-creator.js +0 -0
- /package/{src → dist/src}/scripting-tools/constants.js +0 -0
- /package/{src → dist/src}/scripting-tools/index.js +0 -0
- /package/{src → dist/src}/solver-tools/callbacks/callback-base.js +0 -0
- /package/{src → dist/src}/solver-tools/callbacks/callback-tools.js +0 -0
- /package/{src → dist/src}/solver-tools/lin-alg-tools.js +0 -0
- /package/{src → dist/src}/worker-tools/index.js +0 -0
- /package/{src → dist/src}/worker-tools/scripting.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ros3prw-method.js","sourceRoot":"","sources":["ros3prw-method.ts"],"names":[],"mappings":"AAAA;;;qDAGqD;AAErD,OAAO,EAAO,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EACpE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE7D,kDAAkD;AAClD,MAAM,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M,QAAQ,GAAG,KAAK,CAAe,GAAG,GAAG,CAAC,CAAC,CAAC;IAE9C,uBAAuB;IACvB,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAEnB,YAAY;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC;QAC1B,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAE7B,OAAO,QAAQ,CAAC;IAChB,8BAA8B;AAChC,CAAC,CAAC,UAAU"}
|
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
/* The ROS3PRw method implementation
|
|
2
|
-
|
|
3
|
-
References:
|
|
4
|
-
[1] https://doi.org/10.1016/j.cam.2015.03.010 */
|
|
5
|
-
|
|
6
|
-
import {ODEs, max, abs, SAFETY, PSHRNK, PSGROW, REDUCE_COEF, GROW_COEF,
|
|
7
|
-
ERR_CONTR, TINY, EPS, tDerivative, jacobian, ERROR_MSG} from './solver-defs';
|
|
8
|
-
import {Callback} from './callbacks/callback-base';
|
|
9
|
-
import {luDecomp, luSolve, solve1d2d} from './lin-alg-tools';
|
|
10
|
-
|
|
11
|
-
// The method specific constants (see Table 2 [1])
|
|
12
|
-
const GAMMA = 0.78867513459481287;
|
|
13
|
-
|
|
14
|
-
const GAMMA_21 = -2.3660254037844388;
|
|
15
|
-
const GAMMA_21_SCALED = GAMMA_21 / GAMMA;
|
|
16
|
-
const GAMMA_2 = GAMMA_21 + GAMMA;
|
|
17
|
-
|
|
18
|
-
const GAMMA_31 = -0.86791218280355165;
|
|
19
|
-
const GAMMA_31_SCALED = GAMMA_31 / GAMMA;
|
|
20
|
-
const GAMMA_32 = -0.87306695894642317;
|
|
21
|
-
const GAMMA_32_SCALED = GAMMA_32 / GAMMA;
|
|
22
|
-
const GAMMA_3 = GAMMA_31 + GAMMA_32 + GAMMA;
|
|
23
|
-
|
|
24
|
-
const ALPHA_21 = 2.3660254037844388;
|
|
25
|
-
const ALPHA_2 = ALPHA_21;
|
|
26
|
-
const ALPHA_31 = 0.5;
|
|
27
|
-
const ALPHA_32 = 0.76794919243112270;
|
|
28
|
-
const ALPHA_3 = ALPHA_31 + ALPHA_32;
|
|
29
|
-
|
|
30
|
-
const B_1 = 0.50544867840851759;
|
|
31
|
-
const B_2 = -0.11571687603637559;
|
|
32
|
-
const B_3 = 0.610268197627858;
|
|
33
|
-
|
|
34
|
-
const B_HAT_1 = 0.28973180237214197;
|
|
35
|
-
const B_HAT_2 = 0.10000000000000001;
|
|
36
|
-
const B_HAT_3 = 0.610268197627858;
|
|
37
|
-
|
|
38
|
-
const R_1 = B_1 - B_HAT_1;
|
|
39
|
-
const R_2 = B_2 - B_HAT_2;
|
|
40
|
-
const R_3 = B_3 - B_HAT_3;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/** Solve initial value problem using the ROS3PRw method
|
|
44
|
-
* @param odes initial value problem for ordinary differential equations
|
|
45
|
-
* @param callback computations control callback
|
|
46
|
-
* @returns solution of the problem
|
|
47
|
-
* @example
|
|
48
|
-
* // Example. Solve the following initial value problem using the ROS3PRw method:
|
|
49
|
-
* // dx/dt = x + y - t
|
|
50
|
-
* // dy/dt = x * y + t
|
|
51
|
-
* // x(0) = 1
|
|
52
|
-
* // y(0) = -1
|
|
53
|
-
* // on [0, 2] with the step 0.01.
|
|
54
|
-
* import { ODEs, ros3prw } from 'diff-grok';
|
|
55
|
-
*
|
|
56
|
-
* const task: ODEs = {
|
|
57
|
-
* name: 'Example', // name of your model
|
|
58
|
-
* arg: {
|
|
59
|
-
* name: 't', // name of the argument
|
|
60
|
-
* start: 0, // initial value of the argument
|
|
61
|
-
* finish: 2, // final value of the argument
|
|
62
|
-
* step: 0.01, // solution grid step
|
|
63
|
-
* },
|
|
64
|
-
* initial: [1, -1], // initial values
|
|
65
|
-
* func: (t: number, y: Float64Array, output: Float64Array) => { // right-hand side of the system
|
|
66
|
-
* output[0] = y[0] + y[1] - t; // 1-st equation
|
|
67
|
-
* output[1] = y[0] * y[1] + t; // 2-nd equation
|
|
68
|
-
* },
|
|
69
|
-
* tolerance: 1e-7, // tolerance
|
|
70
|
-
* solutionColNames: ['x', 'y'], // names of solution functions
|
|
71
|
-
* };
|
|
72
|
-
*
|
|
73
|
-
* try {
|
|
74
|
-
* // Solve the problem using the ROS3PRw method
|
|
75
|
-
* const solution = ros3prw(task);
|
|
76
|
-
*
|
|
77
|
-
* // Print a table with the results
|
|
78
|
-
* console.log(task.arg.name, task.solutionColNames[0], task.solutionColNames[1]);
|
|
79
|
-
* const length = solution[0].length;
|
|
80
|
-
* for (let i = 0; i < length; ++i)
|
|
81
|
-
* console.log(solution[0][i], solution[1][i], solution[2][i]);
|
|
82
|
-
* } catch (err) {
|
|
83
|
-
* console.log('Solver failed: ', err instanceof Error ? err.message : 'Unknown problem!');
|
|
84
|
-
* }
|
|
85
|
-
*/
|
|
86
|
-
export function ros3prw(odes: ODEs, callback?: Callback): Float64Array[] {
|
|
87
|
-
/** right-hand side of the IVP solved */
|
|
88
|
-
const f = odes.func;
|
|
89
|
-
|
|
90
|
-
// operating variables
|
|
91
|
-
const t0 = odes.arg.start;
|
|
92
|
-
const t1 = odes.arg.finish;
|
|
93
|
-
let h = odes.arg.step;
|
|
94
|
-
const hDataframe = h;
|
|
95
|
-
const tolerance = odes.tolerance;
|
|
96
|
-
|
|
97
|
-
/** number of solution dataframe rows */
|
|
98
|
-
const rowCount = Math.trunc((t1 - t0) / h) + 1;
|
|
99
|
-
|
|
100
|
-
/** dimension of the problem */
|
|
101
|
-
const dim = odes.initial.length;
|
|
102
|
-
const dimSquared = dim * dim;
|
|
103
|
-
|
|
104
|
-
/** independent variable values */
|
|
105
|
-
const tArr = new Float64Array(rowCount);
|
|
106
|
-
|
|
107
|
-
/** arrays of solution values */
|
|
108
|
-
const yArrs = Array<Float64Array>(dim);
|
|
109
|
-
|
|
110
|
-
for (let i = 0; i < dim; ++i)
|
|
111
|
-
yArrs[i] = new Float64Array(rowCount);
|
|
112
|
-
|
|
113
|
-
// method routine
|
|
114
|
-
let timeDataframe = t0 + hDataframe;
|
|
115
|
-
let t = t0;
|
|
116
|
-
let tPrev = t0;
|
|
117
|
-
let flag = true;
|
|
118
|
-
let index = 1;
|
|
119
|
-
let errmax = 0;
|
|
120
|
-
let hTemp = 0;
|
|
121
|
-
let tNew = 0;
|
|
122
|
-
let hNext = 0.0;
|
|
123
|
-
|
|
124
|
-
// 0 BUFFERS & TEMP STRUCTURES
|
|
125
|
-
|
|
126
|
-
/** identity matrix */
|
|
127
|
-
const I = new Float64Array(dim * dim);
|
|
128
|
-
|
|
129
|
-
// compute identity matrix
|
|
130
|
-
for (let i = 0; i < dim; ++i) {
|
|
131
|
-
for (let j = 0; j < dim; ++j)
|
|
132
|
-
I[j + i * dim] = (i === j) ? 1 : 0;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const y = new Float64Array(odes.initial);
|
|
136
|
-
const yPrev = new Float64Array(odes.initial);
|
|
137
|
-
const dydt = new Float64Array(dim);
|
|
138
|
-
const yScale = new Float64Array(dim);
|
|
139
|
-
const yTemp = new Float64Array(dim);
|
|
140
|
-
const yErr = new Float64Array(dim);
|
|
141
|
-
|
|
142
|
-
const W = new Float64Array(dimSquared);
|
|
143
|
-
|
|
144
|
-
const k1 = new Float64Array(dim);
|
|
145
|
-
const k2 = new Float64Array(dim);
|
|
146
|
-
const k3 = new Float64Array(dim);
|
|
147
|
-
const HT = new Float64Array(dim);
|
|
148
|
-
|
|
149
|
-
const f0Buf = new Float64Array(dim);
|
|
150
|
-
const f1Buf = new Float64Array(dim);
|
|
151
|
-
|
|
152
|
-
let hByGamma = 0;
|
|
153
|
-
const fBuf = new Float64Array(dim);
|
|
154
|
-
const kBuf = new Float64Array(dim);
|
|
155
|
-
|
|
156
|
-
const L = new Float64Array(dimSquared);
|
|
157
|
-
const U = new Float64Array(dimSquared);
|
|
158
|
-
const luBuf = new Float64Array(dim);
|
|
159
|
-
const bBuf = new Float64Array(dim);
|
|
160
|
-
const toUseLU = dim > 2;
|
|
161
|
-
|
|
162
|
-
// 1. SOLUTION AT THE POINT t0
|
|
163
|
-
tArr[0] = t0;
|
|
164
|
-
for (let i = 0; i < dim; ++i)
|
|
165
|
-
yArrs[i][0] = y[i];
|
|
166
|
-
|
|
167
|
-
// 2. COMPUTE NUMERICAL SOLUTION FOR THE POINTS FROM THE INTERVAL (t0, t1)
|
|
168
|
-
while (flag) {
|
|
169
|
-
// compute derivative
|
|
170
|
-
f(t, y, dydt);
|
|
171
|
-
|
|
172
|
-
// check whether to go on computations
|
|
173
|
-
if (callback)
|
|
174
|
-
callback.onIterationStart();
|
|
175
|
-
|
|
176
|
-
// compute scale vector
|
|
177
|
-
for (let i = 0; i < dim; ++i)
|
|
178
|
-
yScale[i] = abs(y[i]) + h * abs(dydt[i]) + TINY;
|
|
179
|
-
|
|
180
|
-
// check end point
|
|
181
|
-
if (t + h > t1) {
|
|
182
|
-
h = t1 - t;
|
|
183
|
-
flag = false;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// call of adaptive step the ROS3Pw [1] method
|
|
187
|
-
// computation of solution (y), time (t) and next step (hNext)
|
|
188
|
-
while (true) {
|
|
189
|
-
hByGamma = h * GAMMA;
|
|
190
|
-
|
|
191
|
-
// one stage of the ROS3Pw method
|
|
192
|
-
|
|
193
|
-
// 1) Jacobian & dF/dt matrices
|
|
194
|
-
jacobian(t, y, f, EPS, f0Buf, f1Buf, W);
|
|
195
|
-
tDerivative(t, y, f, EPS, f0Buf, f1Buf, HT);
|
|
196
|
-
|
|
197
|
-
// 2) W & LU-decomposition
|
|
198
|
-
for (let i = 0; i < dimSquared; ++i)
|
|
199
|
-
W[i] = I[i] - hByGamma * W[i];
|
|
200
|
-
|
|
201
|
-
if (toUseLU)
|
|
202
|
-
luDecomp(W, L, U, dim);
|
|
203
|
-
|
|
204
|
-
// 3) Scale dF/dt: HT = j * T
|
|
205
|
-
for (let i = 0; i < dim; ++i)
|
|
206
|
-
HT[i] *= h;
|
|
207
|
-
|
|
208
|
-
// 4) F1 = F(t, y) <-- Fbuf
|
|
209
|
-
f(t, y, fBuf);
|
|
210
|
-
|
|
211
|
-
// 5) k1 = W_inv * (F1 + gamma * HT)
|
|
212
|
-
for (let i = 0; i < dim; ++i)
|
|
213
|
-
bBuf[i] = fBuf[i] + GAMMA * HT[i];
|
|
214
|
-
|
|
215
|
-
if (toUseLU)
|
|
216
|
-
luSolve(L, U, bBuf, luBuf, k1, dim);
|
|
217
|
-
else
|
|
218
|
-
solve1d2d(W, bBuf, k1);
|
|
219
|
-
|
|
220
|
-
// 6) F2 = F(t + alpha2 * h, y + alpha21 * k1) <-- Fbuf
|
|
221
|
-
for (let i = 0; i < dim; ++i)
|
|
222
|
-
kBuf[i] = y[i] + ALPHA_21 * h * k1[i];
|
|
223
|
-
|
|
224
|
-
f(t + ALPHA_2 * h, kBuf, fBuf);
|
|
225
|
-
|
|
226
|
-
// 7) kBuf = gamma21 / gamma * k1
|
|
227
|
-
for (let i = 0; i < dim; ++i)
|
|
228
|
-
kBuf[i] = GAMMA_21_SCALED * k1[i];
|
|
229
|
-
|
|
230
|
-
// 8) k2 = W_inv * [Fbuf + kBuf + gamma2 * HT] - kBuf
|
|
231
|
-
for (let i = 0; i < dim; ++i)
|
|
232
|
-
bBuf[i] = fBuf[i] + kBuf[i] + GAMMA_2 * HT[i];
|
|
233
|
-
|
|
234
|
-
if (toUseLU)
|
|
235
|
-
luSolve(L, U, bBuf, luBuf, k2, dim);
|
|
236
|
-
else
|
|
237
|
-
solve1d2d(W, bBuf, k2);
|
|
238
|
-
|
|
239
|
-
for (let i = 0; i < dim; ++i)
|
|
240
|
-
k2[i] -= kBuf[i];
|
|
241
|
-
|
|
242
|
-
// 9) F3 = F(t + alpha3 * h, y + h * (alpha31 * k1 + alpha32 * k2)) <-- Fbuf
|
|
243
|
-
for (let i = 0; i < dim; ++i)
|
|
244
|
-
kBuf[i] = y[i] + h * (ALPHA_31 * k1[i] + ALPHA_32 * k2[i]);
|
|
245
|
-
|
|
246
|
-
f(t + ALPHA_3 * h, kBuf, fBuf);
|
|
247
|
-
|
|
248
|
-
// 10) kBuf = gamma31 / gamma * k1 + gamma32 / gamma * k2
|
|
249
|
-
for (let i = 0; i < dim; ++i)
|
|
250
|
-
kBuf[i] = GAMMA_31_SCALED * k1[i] + GAMMA_32_SCALED * k2[i];
|
|
251
|
-
|
|
252
|
-
// 11) k3 = W_inv * (F3 + kBuf + gamma3 * HT) - kBuf
|
|
253
|
-
for (let i = 0; i < dim; ++i)
|
|
254
|
-
bBuf[i] = fBuf[i] + kBuf[i] + GAMMA_3 * HT[i];
|
|
255
|
-
|
|
256
|
-
if (toUseLU)
|
|
257
|
-
luSolve(L, U, bBuf, luBuf, k3, dim);
|
|
258
|
-
else
|
|
259
|
-
solve1d2d(W, bBuf, k3);
|
|
260
|
-
|
|
261
|
-
for (let i = 0; i < dim; ++i)
|
|
262
|
-
k3[i] -= kBuf[i];
|
|
263
|
-
|
|
264
|
-
// 12) yNext = y + h * (b1 * k1 + b2 * k2 + b3 * k3) <-- yTemp
|
|
265
|
-
for (let i = 0; i < dim; ++i)
|
|
266
|
-
yTemp[i] = y[i] + h * (B_1 * k1[i] + B_2 * k2[i] + B_3 * k3[i]);
|
|
267
|
-
|
|
268
|
-
// 13) yErr = h * (r1 * k1 + r2 * k2 + r3 * k3)
|
|
269
|
-
for (let i = 0; i < dim; ++i)
|
|
270
|
-
yErr[i] = h * (R_1 * k1[i] + R_2 * k2[i] + R_3 * k3[i]);
|
|
271
|
-
|
|
272
|
-
// estimating error
|
|
273
|
-
errmax = 0;
|
|
274
|
-
for (let i = 0; i < dim; ++i)
|
|
275
|
-
errmax = max(errmax, abs(yErr[i] / yScale[i]));
|
|
276
|
-
errmax /= tolerance;
|
|
277
|
-
|
|
278
|
-
// processing the error obtained
|
|
279
|
-
if (errmax > 1) {
|
|
280
|
-
hTemp = SAFETY * h * errmax**PSHRNK;
|
|
281
|
-
h = max(hTemp, REDUCE_COEF * h);
|
|
282
|
-
tNew = t + h;
|
|
283
|
-
if (tNew == t)
|
|
284
|
-
throw new Error(ERROR_MSG.ROS3PRW_FAILS);
|
|
285
|
-
} else {
|
|
286
|
-
if (errmax > ERR_CONTR)
|
|
287
|
-
hNext = SAFETY * h * errmax**PSGROW;
|
|
288
|
-
else
|
|
289
|
-
hNext = GROW_COEF * h;
|
|
290
|
-
t = t + h;
|
|
291
|
-
|
|
292
|
-
for (let i = 0; i < dim; ++i)
|
|
293
|
-
y[i] = yTemp[i];
|
|
294
|
-
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
} // while (true)
|
|
298
|
-
|
|
299
|
-
// compute lineraly interpolated results and store them in dataframe
|
|
300
|
-
while (timeDataframe < t) {
|
|
301
|
-
const cLeft = (t - timeDataframe) / (t - tPrev);
|
|
302
|
-
const cRight = 1.0 - cLeft;
|
|
303
|
-
|
|
304
|
-
tArr[index] = timeDataframe;
|
|
305
|
-
|
|
306
|
-
for (let j = 0; j < dim; ++j)
|
|
307
|
-
yArrs[j][index] = cRight * y[j] + cLeft * yPrev[j];
|
|
308
|
-
|
|
309
|
-
timeDataframe += hDataframe;
|
|
310
|
-
++index;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
h = hNext;
|
|
314
|
-
tPrev = t;
|
|
315
|
-
|
|
316
|
-
for (let i = 0; i < dim; ++i)
|
|
317
|
-
yPrev[i] = y[i];
|
|
318
|
-
} // while (flag)
|
|
319
|
-
|
|
320
|
-
// perform final callback actions
|
|
321
|
-
if (callback)
|
|
322
|
-
callback.onComputationsCompleted();
|
|
323
|
-
|
|
324
|
-
// 3. solution at the point t1
|
|
325
|
-
tArr[rowCount - 1] = t1;
|
|
326
|
-
|
|
327
|
-
for (let i = 0; i < dim; ++i)
|
|
328
|
-
yArrs[i][rowCount - 1] = y[i];
|
|
329
|
-
|
|
330
|
-
// 4. prepare output
|
|
331
|
-
const solution = Array<Float64Array>(dim + 1);
|
|
332
|
-
|
|
333
|
-
// independent variable
|
|
334
|
-
solution[0] = tArr;
|
|
335
|
-
|
|
336
|
-
// functions
|
|
337
|
-
for (let i = 0; i < dim; ++i)
|
|
338
|
-
solution[i + 1] = yArrs[i];
|
|
339
|
-
|
|
340
|
-
return solution;
|
|
341
|
-
//return [tArr].concat(yArrs);
|
|
342
|
-
} // ros3prw
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solver-defs.js","sourceRoot":"","sources":["solver-defs.ts"],"names":[],"mappings":"AAAA,qBAAqB;AAmGrB,uBAAuB;AACvB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnD,uBAAuB;AACvB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7D,uBAAuB;AACvB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7D,gDAAgD;AAChD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC;AAC5B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC;AAC3B,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAC;AAC7B,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC,WAAW;AACX,MAA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C,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;QAErD,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;IACd,CAAC;AACH,CAAC;AAED;;EAEE;AACF,MAAM,CAAN,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,sEAAyD,CAAA;IACzD,uDAA0C,CAAA;IAC1C,yDAA4C,CAAA;IAC5C,qEAAwD,CAAA;IACxD,qEAAwD,CAAA;IACxD,qEAAwD,CAAA;IACxD,gEAAmD,CAAA;IACnD,iEAAoD,CAAA;IACpD,mDAAsC,CAAA;AACxC,CAAC,EAVW,SAAS,KAAT,SAAS,QAUpB;AAAA,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,GAAW;QACrB,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,mDAAgC,CAAA;IAChC,oCAAiB,CAAA;AACnB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Correctness tests
|
|
2
|
-
import { corrProbs } from '../../index';
|
|
3
|
-
import { getError } from './test-utils';
|
|
4
|
-
import { methods, MAX_MAD } from './test-defs';
|
|
5
|
-
methods.forEach((method, name) => {
|
|
6
|
-
describe(`${name}`, () => {
|
|
7
|
-
corrProbs.forEach((problem) => {
|
|
8
|
-
test(`${problem.odes.name}`, () => {
|
|
9
|
-
const error = getError(method, problem);
|
|
10
|
-
expect(error).toBeLessThan(MAX_MAD);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=correctness.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"correctness.test.js","sourceRoot":"","sources":["correctness.test.ts"],"names":[],"mappings":"AAAA,oBAAoB;AAEpB,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AACtC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,aAAa,CAAC;AAE7C,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;IAC/B,QAAQ,CAAC,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE;QACvB,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC5B,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE;gBAChC,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBACxC,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Correctness tests
|
|
2
|
-
|
|
3
|
-
import {corrProbs} from '../../index';
|
|
4
|
-
import {getError} from './test-utils';
|
|
5
|
-
import {methods, MAX_MAD} from './test-defs';
|
|
6
|
-
|
|
7
|
-
methods.forEach((method, name) => {
|
|
8
|
-
describe(`${name}`, () => {
|
|
9
|
-
corrProbs.forEach((problem) => {
|
|
10
|
-
test(`${problem.odes.name}`, () => {
|
|
11
|
-
const error = getError(method, problem);
|
|
12
|
-
expect(error).toBeLessThan(MAX_MAD);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { Lsoda } from '../solver-tools/lsoda';
|
|
2
|
-
import { corrProbs } from '../examples/corr-probs';
|
|
3
|
-
// ─── Robertson chemical kinetics (original test) ────────────────────────────
|
|
4
|
-
function fex(t, y, ydot) {
|
|
5
|
-
ydot[0] = 1.0e4 * y[1] * y[2] - 0.04 * y[0];
|
|
6
|
-
ydot[2] = 3.0e7 * y[1] * y[1];
|
|
7
|
-
ydot[1] = -(ydot[0] + ydot[2]);
|
|
8
|
-
return 0;
|
|
9
|
-
}
|
|
10
|
-
const expected = [
|
|
11
|
-
{ t: 4.0000e-01, y: [9.851712e-01, 3.386380e-05, 1.479493e-02] },
|
|
12
|
-
{ t: 4.0000e+00, y: [9.055333e-01, 2.240655e-05, 9.444430e-02] },
|
|
13
|
-
{ t: 4.0000e+01, y: [7.158403e-01, 9.186334e-06, 2.841505e-01] },
|
|
14
|
-
{ t: 4.0000e+02, y: [4.505250e-01, 3.222964e-06, 5.494717e-01] },
|
|
15
|
-
{ t: 4.0000e+03, y: [1.831976e-01, 8.941773e-07, 8.168015e-01] },
|
|
16
|
-
{ t: 4.0000e+04, y: [3.898729e-02, 1.621940e-07, 9.610125e-01] },
|
|
17
|
-
{ t: 4.0000e+05, y: [4.936362e-03, 1.984221e-08, 9.950636e-01] },
|
|
18
|
-
{ t: 4.0000e+06, y: [5.161833e-04, 2.065787e-09, 9.994838e-01] },
|
|
19
|
-
{ t: 4.0000e+07, y: [5.179804e-05, 2.072027e-10, 9.999482e-01] },
|
|
20
|
-
{ t: 4.0000e+08, y: [5.283675e-06, 2.113481e-11, 9.999947e-01] },
|
|
21
|
-
{ t: 4.0000e+09, y: [4.658667e-07, 1.863468e-12, 9.999995e-01] },
|
|
22
|
-
{ t: 4.0000e+10, y: [1.431100e-08, 5.724404e-14, 1.000000e+00] },
|
|
23
|
-
];
|
|
24
|
-
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
25
|
-
function relError(computed, reference) {
|
|
26
|
-
if (reference === 0)
|
|
27
|
-
return Math.abs(computed);
|
|
28
|
-
return Math.abs((computed - reference) / reference);
|
|
29
|
-
}
|
|
30
|
-
/** Wraps an ODEs func into an OdeFunction compatible with Lsoda (returns 0). */
|
|
31
|
-
function wrapFunc(ode) {
|
|
32
|
-
return (t, y, ydot) => {
|
|
33
|
-
ode.func(t, y, ydot);
|
|
34
|
-
return 0;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Solves an ODE problem and checks against the exact solution at the final time point.
|
|
39
|
-
* Uses combined absolute + relative tolerance: |computed - exact| < checkTol * |exact| + checkAbsTol.
|
|
40
|
-
*/
|
|
41
|
-
function solveAndCheck(ode, exactSolution, checkTol = 1e-3, checkAbsTol = 1e-6) {
|
|
42
|
-
const neq = ode.initial.length;
|
|
43
|
-
const tol = ode.tolerance;
|
|
44
|
-
const rtol = new Float64Array(neq).fill(tol);
|
|
45
|
-
const atol = new Float64Array(neq).fill(tol);
|
|
46
|
-
const solver = new Lsoda(wrapFunc(ode), neq, { rtol, atol, itask: 1 });
|
|
47
|
-
let y = [...ode.initial];
|
|
48
|
-
let t = ode.arg.start;
|
|
49
|
-
const step = ode.arg.step;
|
|
50
|
-
const finish = ode.arg.finish;
|
|
51
|
-
let tout = t + step;
|
|
52
|
-
while (tout <= finish + step / 2) {
|
|
53
|
-
const result = solver.solve(y, t, tout);
|
|
54
|
-
y = result.y;
|
|
55
|
-
t = result.t;
|
|
56
|
-
expect(solver.state).toBeGreaterThan(0);
|
|
57
|
-
tout += step;
|
|
58
|
-
}
|
|
59
|
-
// Check final solution against exact using combined abs + rel tolerance
|
|
60
|
-
const exact = exactSolution(t);
|
|
61
|
-
for (let j = 0; j < neq; j++) {
|
|
62
|
-
const absErr = Math.abs(y[j] - exact[j]);
|
|
63
|
-
const allowed = checkTol * Math.abs(exact[j]) + checkAbsTol;
|
|
64
|
-
expect(absErr).toBeLessThan(allowed);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
// ─── Tests ───────────────────────────────────────────────────────────────────
|
|
68
|
-
const nonStiffProbs = corrProbs.filter((p) => p.odes.name.startsWith('non-stiff'));
|
|
69
|
-
const stiffProbs = corrProbs.filter((p) => p.odes.name.startsWith('stiff'));
|
|
70
|
-
describe('LSODA LIB', () => {
|
|
71
|
-
it('should solve Robertson chemical kinetics with expected accuracy', () => {
|
|
72
|
-
const neq = 3;
|
|
73
|
-
const rtol = new Float64Array([1.0e-4, 1.0e-4, 1.0e-4]);
|
|
74
|
-
const atol = new Float64Array([1.0e-6, 1.0e-10, 1.0e-6]);
|
|
75
|
-
const solver = new Lsoda(fex, neq, {
|
|
76
|
-
rtol,
|
|
77
|
-
atol,
|
|
78
|
-
itask: 1,
|
|
79
|
-
});
|
|
80
|
-
let y = [1.0, 0.0, 0.0];
|
|
81
|
-
let t = 0.0;
|
|
82
|
-
let tout = 0.4;
|
|
83
|
-
for (let iout = 0; iout < 12; iout++) {
|
|
84
|
-
const result = solver.solve(y, t, tout);
|
|
85
|
-
y = result.y;
|
|
86
|
-
t = result.t;
|
|
87
|
-
expect(solver.state).toBeGreaterThan(0);
|
|
88
|
-
const exp = expected[iout];
|
|
89
|
-
for (let j = 0; j < 3; j++) {
|
|
90
|
-
const err = relError(y[j], exp.y[j]);
|
|
91
|
-
expect(err).toBeLessThanOrEqual(5e-3);
|
|
92
|
-
}
|
|
93
|
-
tout *= 10.0;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
describe('non-stiff problems', () => {
|
|
97
|
-
nonStiffProbs.forEach(({ odes, exact }) => {
|
|
98
|
-
it(`should solve ${odes.name} problem`, () => {
|
|
99
|
-
solveAndCheck(odes, exact);
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
describe('stiff problems', () => {
|
|
104
|
-
stiffProbs.forEach(({ odes, exact }) => {
|
|
105
|
-
it(`should solve ${odes.name} problem`, () => {
|
|
106
|
-
solveAndCheck(odes, exact);
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
// ─── Dense output tests ───────────────────────────────────────────────────
|
|
111
|
-
describe('dense output', () => {
|
|
112
|
-
// Helper: run Robertson to completion with dense output enabled
|
|
113
|
-
function solveRobertsonDense() {
|
|
114
|
-
const neq = 3;
|
|
115
|
-
const rtol = new Float64Array([1.0e-4, 1.0e-4, 1.0e-4]);
|
|
116
|
-
const atol = new Float64Array([1.0e-6, 1.0e-10, 1.0e-6]);
|
|
117
|
-
const solver = new Lsoda(fex, neq, { rtol, atol, itask: 1, dense: true });
|
|
118
|
-
let y = [1.0, 0.0, 0.0];
|
|
119
|
-
let t = 0.0;
|
|
120
|
-
let tout = 0.4;
|
|
121
|
-
for (let iout = 0; iout < 12; iout++) {
|
|
122
|
-
const result = solver.solve(y, t, tout);
|
|
123
|
-
y = result.y;
|
|
124
|
-
t = result.t;
|
|
125
|
-
tout *= 10.0;
|
|
126
|
-
}
|
|
127
|
-
return solver.getDenseOutput();
|
|
128
|
-
}
|
|
129
|
-
it('consistency: dense output should match direct solver results (Robertson)', () => {
|
|
130
|
-
const dense = solveRobertsonDense();
|
|
131
|
-
// Query dense output at the same tout points used in the reference test
|
|
132
|
-
const tPoints = Float64Array.from(expected.map((e) => e.t));
|
|
133
|
-
const results = dense.solveAtTimes(tPoints);
|
|
134
|
-
for (let i = 0; i < expected.length; i++) {
|
|
135
|
-
for (let j = 0; j < 3; j++) {
|
|
136
|
-
const err = relError(results[j][i], expected[i].y[j]);
|
|
137
|
-
expect(err).toBeLessThanOrEqual(5e-3);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
it('monotonicity: uniform query should have increasing t and finite y', () => {
|
|
142
|
-
const dense = solveRobertsonDense();
|
|
143
|
-
// Query at 1000 uniform points across the full range
|
|
144
|
-
const tMin = dense.tMin;
|
|
145
|
-
const tMax = dense.tMax;
|
|
146
|
-
const n = 1000;
|
|
147
|
-
const tArray = new Float64Array(n);
|
|
148
|
-
for (let i = 0; i < n; i++)
|
|
149
|
-
tArray[i] = tMin + (tMax - tMin) * i / (n - 1);
|
|
150
|
-
const results = dense.solveAtTimes(tArray);
|
|
151
|
-
expect(results.length).toBe(3);
|
|
152
|
-
for (let j = 0; j < 3; j++)
|
|
153
|
-
expect(results[j].length).toBe(n);
|
|
154
|
-
for (let i = 1; i < n; i++)
|
|
155
|
-
expect(tArray[i]).toBeGreaterThan(tArray[i - 1]);
|
|
156
|
-
for (let i = 0; i < n; i++) {
|
|
157
|
-
for (let j = 0; j < 3; j++)
|
|
158
|
-
expect(Number.isFinite(results[j][i])).toBe(true);
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
it('boundary: query at tMin and tMax should succeed', () => {
|
|
162
|
-
const dense = solveRobertsonDense();
|
|
163
|
-
const yMin = dense.evaluateAt(dense.tMin);
|
|
164
|
-
const yMax = dense.evaluateAt(dense.tMax);
|
|
165
|
-
expect(yMin.length).toBe(3);
|
|
166
|
-
expect(yMax.length).toBe(3);
|
|
167
|
-
for (let j = 0; j < 3; j++) {
|
|
168
|
-
expect(Number.isFinite(yMin[j])).toBe(true);
|
|
169
|
-
expect(Number.isFinite(yMax[j])).toBe(true);
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
it('solveOnGrid: should return correct grid dimensions and quality', () => {
|
|
173
|
-
const dense = solveRobertsonDense();
|
|
174
|
-
const { t, y } = dense.solveOnGrid(0, 4e10, 1e9);
|
|
175
|
-
expect(t.length).toBe(41);
|
|
176
|
-
expect(y.length).toBe(3);
|
|
177
|
-
for (let j = 0; j < 3; j++)
|
|
178
|
-
expect(y[j].length).toBe(41);
|
|
179
|
-
expect(t[0]).toBeCloseTo(0, 10);
|
|
180
|
-
expect(t[t.length - 1]).toBeCloseTo(4e10, 0);
|
|
181
|
-
// Check solution quality at a sampled point (t=4e10)
|
|
182
|
-
const refLast = expected[expected.length - 1].y;
|
|
183
|
-
for (let j = 0; j < 3; j++) {
|
|
184
|
-
const err = relError(y[j][t.length - 1], refLast[j]);
|
|
185
|
-
expect(err).toBeLessThanOrEqual(5e-3);
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
function denseExactCheck(ode, exactSolution, checkTol = 1e-3, checkAbsTol = 1e-6) {
|
|
189
|
-
const neq = ode.initial.length;
|
|
190
|
-
const tol = ode.tolerance;
|
|
191
|
-
const rtol = new Float64Array(neq).fill(tol);
|
|
192
|
-
const atol = new Float64Array(neq).fill(tol);
|
|
193
|
-
const solver = new Lsoda(wrapFunc(ode), neq, { rtol, atol, itask: 1, dense: true });
|
|
194
|
-
let y = [...ode.initial];
|
|
195
|
-
let t = ode.arg.start;
|
|
196
|
-
const finish = ode.arg.finish;
|
|
197
|
-
const result = solver.solve(y, t, finish);
|
|
198
|
-
y = result.y;
|
|
199
|
-
t = result.t;
|
|
200
|
-
const dense = solver.getDenseOutput();
|
|
201
|
-
// Query at 100 points and compare against exact solution
|
|
202
|
-
const nPts = 100;
|
|
203
|
-
const tArr = new Float64Array(nPts + 1);
|
|
204
|
-
for (let i = 0; i <= nPts; i++)
|
|
205
|
-
tArr[i] = ode.arg.start + (finish - ode.arg.start) * i / nPts;
|
|
206
|
-
const results = dense.solveAtTimes(tArr);
|
|
207
|
-
for (let i = 0; i < tArr.length; i++) {
|
|
208
|
-
const exact = exactSolution(tArr[i]);
|
|
209
|
-
for (let j = 0; j < neq; j++) {
|
|
210
|
-
const absErr = Math.abs(results[j][i] - exact[j]);
|
|
211
|
-
const allowed = checkTol * Math.abs(exact[j]) + checkAbsTol;
|
|
212
|
-
expect(absErr).toBeLessThan(allowed);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
corrProbs.forEach(({ odes, exact }) => {
|
|
217
|
-
it(`dense output on ${odes.name} problem should match exact solution`, () => {
|
|
218
|
-
denseExactCheck(odes, exact);
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
//# sourceMappingURL=lsoda-lib-correctness.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lsoda-lib-correctness.test.js","sourceRoot":"","sources":["lsoda-lib-correctness.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MA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