universal-physics-tensor 0.47.1 → 1.0.2
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 +21 -21
- package/README.md +405 -383
- package/bin/upt.mjs +7 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts +108 -0
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -0
- package/dist/atlas/benchmark/hybrid-retrieval.js +241 -0
- package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -0
- package/dist/atlas/catalog-formal-ref.d.ts +24 -0
- package/dist/atlas/catalog-formal-ref.d.ts.map +1 -0
- package/dist/atlas/catalog-formal-ref.js +36 -0
- package/dist/atlas/catalog-formal-ref.js.map +1 -0
- package/dist/atlas/chain-pipeline.d.ts +52 -0
- package/dist/atlas/chain-pipeline.d.ts.map +1 -0
- package/dist/atlas/chain-pipeline.js +176 -0
- package/dist/atlas/chain-pipeline.js.map +1 -0
- package/dist/atlas/composition-table.d.ts +11 -46
- package/dist/atlas/composition-table.d.ts.map +1 -1
- package/dist/atlas/composition-table.js +7 -124
- package/dist/atlas/composition-table.js.map +1 -1
- package/dist/atlas/conventions.d.ts +4 -58
- package/dist/atlas/conventions.d.ts.map +1 -1
- package/dist/atlas/conventions.js +3 -88
- package/dist/atlas/conventions.js.map +1 -1
- package/dist/atlas/derive-evidence.d.ts +50 -3
- package/dist/atlas/derive-evidence.d.ts.map +1 -1
- package/dist/atlas/derive-evidence.js +73 -4
- package/dist/atlas/derive-evidence.js.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.js +5 -1
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
- package/dist/atlas/index.d.ts +9 -7
- package/dist/atlas/index.d.ts.map +1 -1
- package/dist/atlas/index.js +6 -5
- package/dist/atlas/index.js.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.js +6 -0
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.d.ts +2 -0
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.js +11 -19
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.d.ts +93 -0
- package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -0
- package/dist/atlas/oscillators/limit-witnesses.js +152 -0
- package/dist/atlas/oscillators/limit-witnesses.js.map +1 -0
- package/dist/atlas/oscillators/models.d.ts +2 -1
- package/dist/atlas/oscillators/models.d.ts.map +1 -1
- package/dist/atlas/oscillators/models.js +4 -3
- package/dist/atlas/oscillators/models.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport-witness.d.ts +37 -0
- package/dist/atlas/oscillators/norm-transport-witness.d.ts.map +1 -0
- package/dist/atlas/oscillators/norm-transport-witness.js +58 -0
- package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -0
- package/dist/atlas/oscillators/norm-transport.d.ts +44 -0
- package/dist/atlas/oscillators/norm-transport.d.ts.map +1 -0
- package/dist/atlas/oscillators/norm-transport.js +66 -0
- package/dist/atlas/oscillators/norm-transport.js.map +1 -0
- package/dist/atlas/oscillators/norms.d.ts +11 -0
- package/dist/atlas/oscillators/norms.d.ts.map +1 -0
- package/dist/atlas/oscillators/norms.js +11 -0
- package/dist/atlas/oscillators/norms.js.map +1 -0
- package/dist/atlas/oscillators/pendulum-motion.d.ts +38 -0
- package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -0
- package/dist/atlas/oscillators/pendulum-motion.js +122 -0
- package/dist/atlas/oscillators/pendulum-motion.js.map +1 -0
- package/dist/atlas/oscillators/phase-carriage.d.ts +38 -0
- package/dist/atlas/oscillators/phase-carriage.d.ts.map +1 -0
- package/dist/atlas/oscillators/phase-carriage.js +96 -0
- package/dist/atlas/oscillators/phase-carriage.js.map +1 -0
- package/dist/atlas/oscillators/phase-translation.d.ts +46 -0
- package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -0
- package/dist/atlas/oscillators/phase-translation.js +178 -0
- package/dist/atlas/oscillators/phase-translation.js.map +1 -0
- package/dist/atlas/oscillators/position-translation.d.ts +59 -0
- package/dist/atlas/oscillators/position-translation.d.ts.map +1 -0
- package/dist/atlas/oscillators/position-translation.js +254 -0
- package/dist/atlas/oscillators/position-translation.js.map +1 -0
- package/dist/atlas/path-bound.d.ts +126 -9
- package/dist/atlas/path-bound.d.ts.map +1 -1
- package/dist/atlas/path-bound.js +372 -23
- package/dist/atlas/path-bound.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +141 -0
- package/dist/atlas/physjs-ref.d.ts.map +1 -0
- package/dist/atlas/physjs-ref.js +878 -0
- package/dist/atlas/physjs-ref.js.map +1 -0
- package/dist/atlas/proof-target.d.ts +32 -0
- package/dist/atlas/proof-target.d.ts.map +1 -0
- package/dist/atlas/proof-target.js +140 -0
- package/dist/atlas/proof-target.js.map +1 -0
- package/dist/atlas/regime.d.ts +12 -136
- package/dist/atlas/regime.d.ts.map +1 -1
- package/dist/atlas/regime.js +8 -254
- package/dist/atlas/regime.js.map +1 -1
- package/dist/atlas/serialize.d.ts.map +1 -1
- package/dist/atlas/serialize.js +25 -0
- package/dist/atlas/serialize.js.map +1 -1
- package/dist/atlas/translation-registry.d.ts +22 -0
- package/dist/atlas/translation-registry.d.ts.map +1 -0
- package/dist/atlas/translation-registry.js +31 -0
- package/dist/atlas/translation-registry.js.map +1 -0
- package/dist/atlas/translation.d.ts +116 -0
- package/dist/atlas/translation.d.ts.map +1 -0
- package/dist/atlas/translation.js +34 -0
- package/dist/atlas/translation.js.map +1 -0
- package/dist/atlas/types.d.ts +74 -240
- package/dist/atlas/types.d.ts.map +1 -1
- package/dist/atlas/types.js +5 -37
- package/dist/atlas/types.js.map +1 -1
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/waves/bridges-closure.js +4 -0
- package/dist/atlas/waves/bridges-closure.js.map +1 -1
- package/dist/atlas/waves/bridges.d.ts.map +1 -1
- package/dist/atlas/waves/bridges.js +3 -0
- package/dist/atlas/waves/bridges.js.map +1 -1
- package/dist/atlas/waves/models.js +1 -1
- package/dist/atlas/waves/models.js.map +1 -1
- package/dist/atlas/witness-dominance.d.ts +50 -0
- package/dist/atlas/witness-dominance.d.ts.map +1 -0
- package/dist/atlas/witness-dominance.js +86 -0
- package/dist/atlas/witness-dominance.js.map +1 -0
- package/dist/atlas/witness-specs.d.ts +30 -0
- package/dist/atlas/witness-specs.d.ts.map +1 -1
- package/dist/atlas/witness-specs.js +107 -0
- package/dist/atlas/witness-specs.js.map +1 -1
- package/dist/bridges/be53-yang-mills-confrontation.d.ts +81 -0
- package/dist/bridges/be53-yang-mills-confrontation.d.ts.map +1 -0
- package/dist/bridges/be53-yang-mills-confrontation.js +110 -0
- package/dist/bridges/be53-yang-mills-confrontation.js.map +1 -0
- package/dist/bridges/be63-chandrasekhar-mass.d.ts.map +1 -1
- package/dist/bridges/be63-chandrasekhar-mass.js +1 -3
- package/dist/bridges/be63-chandrasekhar-mass.js.map +1 -1
- package/dist/bridges/confrontation-coverage.d.ts +5 -61
- package/dist/bridges/confrontation-coverage.d.ts.map +1 -1
- package/dist/bridges/confrontation-coverage.js +5 -70
- package/dist/bridges/confrontation-coverage.js.map +1 -1
- package/dist/bridges/confrontations.d.ts +1 -1
- package/dist/bridges/confrontations.d.ts.map +1 -1
- package/dist/bridges/confrontations.js +291 -3
- package/dist/bridges/confrontations.js.map +1 -1
- package/dist/bridges/equations/be-13-einstein-trace.d.ts +2 -3
- package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -1
- package/dist/bridges/equations/be-13-einstein-trace.js +2 -3
- package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -1
- package/dist/bridges/equations/be-38-mond.d.ts +7 -5
- package/dist/bridges/equations/be-38-mond.d.ts.map +1 -1
- package/dist/bridges/equations/be-38-mond.js +7 -5
- package/dist/bridges/equations/be-38-mond.js.map +1 -1
- package/dist/bridges/equations/be-42-hawking-temperature.d.ts +3 -0
- package/dist/bridges/equations/be-42-hawking-temperature.d.ts.map +1 -1
- package/dist/bridges/equations/be-42-hawking-temperature.js +8 -1
- package/dist/bridges/equations/be-42-hawking-temperature.js.map +1 -1
- package/dist/bridges/equations/be-53-yang-mills-beta.d.ts +21 -0
- package/dist/bridges/equations/be-53-yang-mills-beta.d.ts.map +1 -1
- package/dist/bridges/equations/be-53-yang-mills-beta.js +12 -0
- package/dist/bridges/equations/be-53-yang-mills-beta.js.map +1 -1
- package/dist/bridges/evaluator-inputs.d.ts +21 -0
- package/dist/bridges/evaluator-inputs.d.ts.map +1 -0
- package/dist/bridges/evaluator-inputs.js +75 -0
- package/dist/bridges/evaluator-inputs.js.map +1 -0
- package/dist/bridges/evaluators.d.ts +46 -0
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +57 -16
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/gravitational-lensing.d.ts +1 -1
- package/dist/bridges/gravitational-lensing.js +1 -1
- package/dist/bridges/index.d.ts +3 -2
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +15 -14
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/observations/types.d.ts +110 -2
- package/dist/bridges/observations/types.d.ts.map +1 -1
- package/dist/bridges/observations/types.js +29 -0
- package/dist/bridges/observations/types.js.map +1 -1
- package/dist/bridges/perihelion-precession.d.ts +1 -1
- package/dist/bridges/perihelion-precession.js +1 -1
- package/dist/bridges/tensor-index.d.ts +39 -0
- package/dist/bridges/tensor-index.d.ts.map +1 -0
- package/dist/bridges/tensor-index.js +66 -0
- package/dist/bridges/tensor-index.js.map +1 -0
- package/dist/canonical/canonical-equation.d.ts +1 -1
- package/dist/canonical/canonical-equation.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.js +32 -10
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/dimensional-classics.js +2 -2
- package/dist/canonical/entries/dimensional-classics.js.map +1 -1
- package/dist/canonical/entries/mechanics.d.ts.map +1 -1
- package/dist/canonical/entries/mechanics.js +10 -6
- package/dist/canonical/entries/mechanics.js.map +1 -1
- package/dist/canonical/entries/relativity.d.ts.map +1 -1
- package/dist/canonical/entries/relativity.js +41 -8
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +5 -5
- package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +31 -28
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/normal-form.d.ts +17 -0
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +21 -4
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/structural.d.ts +84 -0
- package/dist/canonical/structural.d.ts.map +1 -0
- package/dist/canonical/structural.js +107 -0
- package/dist/canonical/structural.js.map +1 -0
- package/dist/cases/brownian-sphere.d.ts +68 -0
- package/dist/cases/brownian-sphere.d.ts.map +1 -0
- package/dist/cases/brownian-sphere.js +353 -0
- package/dist/cases/brownian-sphere.js.map +1 -0
- package/dist/cases/damped-resonator.d.ts +23 -0
- package/dist/cases/damped-resonator.d.ts.map +1 -0
- package/dist/cases/damped-resonator.js +224 -0
- package/dist/cases/damped-resonator.js.map +1 -0
- package/dist/cases/index.d.ts +11 -0
- package/dist/cases/index.d.ts.map +1 -0
- package/dist/cases/index.js +29 -0
- package/dist/cases/index.js.map +1 -0
- package/dist/cases/kepler-rv.d.ts +13 -0
- package/dist/cases/kepler-rv.d.ts.map +1 -0
- package/dist/cases/kepler-rv.js +168 -0
- package/dist/cases/kepler-rv.js.map +1 -0
- package/dist/cases/lumped-cooling.d.ts +46 -0
- package/dist/cases/lumped-cooling.d.ts.map +1 -0
- package/dist/cases/lumped-cooling.js +261 -0
- package/dist/cases/lumped-cooling.js.map +1 -0
- package/dist/cases/quadrature.d.ts +14 -0
- package/dist/cases/quadrature.d.ts.map +1 -0
- package/dist/cases/quadrature.js +41 -0
- package/dist/cases/quadrature.js.map +1 -0
- package/dist/cases/resistor-noise.d.ts +14 -0
- package/dist/cases/resistor-noise.d.ts.map +1 -0
- package/dist/cases/resistor-noise.js +210 -0
- package/dist/cases/resistor-noise.js.map +1 -0
- package/dist/cases/skin-depth.d.ts +21 -0
- package/dist/cases/skin-depth.d.ts.map +1 -0
- package/dist/cases/skin-depth.js +174 -0
- package/dist/cases/skin-depth.js.map +1 -0
- package/dist/cases/types.d.ts +115 -0
- package/dist/cases/types.d.ts.map +1 -0
- package/dist/cases/types.js +20 -0
- package/dist/cases/types.js.map +1 -0
- package/dist/cli/commands/_atlas-map.d.ts +409 -0
- package/dist/cli/commands/_atlas-map.d.ts.map +1 -0
- package/dist/cli/commands/_atlas-map.js +1014 -0
- package/dist/cli/commands/_atlas-map.js.map +1 -0
- package/dist/cli/commands/_atlas-route.d.ts +111 -0
- package/dist/cli/commands/_atlas-route.d.ts.map +1 -0
- package/dist/cli/commands/_atlas-route.js +140 -0
- package/dist/cli/commands/_atlas-route.js.map +1 -0
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +10 -1
- package/dist/cli/commands/_discovery-opts.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts +20 -0
- package/dist/cli/commands/atlas.d.ts.map +1 -1
- package/dist/cli/commands/atlas.js +333 -19
- package/dist/cli/commands/atlas.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +12 -3
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/axes.js +4 -4
- package/dist/cli/commands/candidates.d.ts.map +1 -1
- package/dist/cli/commands/candidates.js +3 -2
- package/dist/cli/commands/candidates.js.map +1 -1
- package/dist/cli/commands/canonical.d.ts.map +1 -1
- package/dist/cli/commands/canonical.js +39 -10
- package/dist/cli/commands/canonical.js.map +1 -1
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +210 -28
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/connectors.d.ts.map +1 -1
- package/dist/cli/commands/connectors.js +5 -4
- package/dist/cli/commands/connectors.js.map +1 -1
- package/dist/cli/commands/coverage.js +3 -3
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +22 -9
- package/dist/cli/commands/derive.js.map +1 -1
- package/dist/cli/commands/discover.d.ts.map +1 -1
- package/dist/cli/commands/discover.js +149 -32
- package/dist/cli/commands/discover.js.map +1 -1
- package/dist/cli/commands/eval.d.ts.map +1 -1
- package/dist/cli/commands/eval.js +87 -17
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts +30 -0
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +441 -25
- package/dist/cli/commands/evaluate.js.map +1 -1
- package/dist/cli/commands/explain.d.ts.map +1 -1
- package/dist/cli/commands/explain.js +38 -11
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/frontier.d.ts +3 -0
- package/dist/cli/commands/frontier.d.ts.map +1 -0
- package/dist/cli/commands/frontier.js +28 -0
- package/dist/cli/commands/frontier.js.map +1 -0
- package/dist/cli/commands/ground.d.ts.map +1 -1
- package/dist/cli/commands/ground.js +37 -12
- package/dist/cli/commands/ground.js.map +1 -1
- package/dist/cli/commands/index.d.ts +5 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +5 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/map.d.ts +8 -0
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +385 -57
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/metric.d.ts +3 -0
- package/dist/cli/commands/metric.d.ts.map +1 -0
- package/dist/cli/commands/metric.js +136 -0
- package/dist/cli/commands/metric.js.map +1 -0
- package/dist/cli/commands/path.d.ts +109 -1
- package/dist/cli/commands/path.d.ts.map +1 -1
- package/dist/cli/commands/path.js +1019 -109
- package/dist/cli/commands/path.js.map +1 -1
- package/dist/cli/commands/predict.d.ts.map +1 -1
- package/dist/cli/commands/predict.js +3 -2
- package/dist/cli/commands/predict.js.map +1 -1
- package/dist/cli/commands/priority.d.ts.map +1 -1
- package/dist/cli/commands/priority.js +3 -2
- package/dist/cli/commands/priority.js.map +1 -1
- package/dist/cli/commands/probe.d.ts +7 -0
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +234 -52
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/recover.d.ts.map +1 -1
- package/dist/cli/commands/recover.js +17 -6
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +1 -1
- package/dist/cli/commands/regime.d.ts.map +1 -1
- package/dist/cli/commands/regime.js +134 -33
- package/dist/cli/commands/regime.js.map +1 -1
- package/dist/cli/commands/retrieve.d.ts +3 -0
- package/dist/cli/commands/retrieve.d.ts.map +1 -0
- package/dist/cli/commands/retrieve.js +65 -0
- package/dist/cli/commands/retrieve.js.map +1 -0
- package/dist/cli/commands/search.d.ts +3 -0
- package/dist/cli/commands/search.d.ts.map +1 -0
- package/dist/cli/commands/search.js +70 -0
- package/dist/cli/commands/search.js.map +1 -0
- package/dist/cli/commands/symbolic.d.ts.map +1 -1
- package/dist/cli/commands/symbolic.js +107 -16
- package/dist/cli/commands/symbolic.js.map +1 -1
- package/dist/cli/commands/testplan.d.ts +3 -0
- package/dist/cli/commands/testplan.d.ts.map +1 -0
- package/dist/cli/commands/testplan.js +131 -0
- package/dist/cli/commands/testplan.js.map +1 -0
- package/dist/cli/conventions.d.ts +22 -0
- package/dist/cli/conventions.d.ts.map +1 -0
- package/dist/cli/conventions.js +48 -0
- package/dist/cli/conventions.js.map +1 -0
- package/dist/cli/euler-guard.d.ts +9 -0
- package/dist/cli/euler-guard.d.ts.map +1 -0
- package/dist/cli/euler-guard.js +11 -0
- package/dist/cli/euler-guard.js.map +1 -0
- package/dist/cli/eval-numbers.d.ts +26 -0
- package/dist/cli/eval-numbers.d.ts.map +1 -0
- package/dist/cli/eval-numbers.js +48 -0
- package/dist/cli/eval-numbers.js.map +1 -0
- package/dist/cli/expr-print.d.ts +25 -0
- package/dist/cli/expr-print.d.ts.map +1 -0
- package/dist/cli/expr-print.js +123 -0
- package/dist/cli/expr-print.js.map +1 -0
- package/dist/cli/graphs.d.ts +26 -0
- package/dist/cli/graphs.d.ts.map +1 -1
- package/dist/cli/graphs.js +19 -0
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/main.d.ts +4 -10
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +370 -167
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/map-evidence.d.ts +47 -0
- package/dist/cli/map-evidence.d.ts.map +1 -0
- package/dist/cli/map-evidence.js +53 -0
- package/dist/cli/map-evidence.js.map +1 -0
- package/dist/cli/output.d.ts +21 -1
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +5 -1
- package/dist/cli/output.js.map +1 -1
- package/dist/{composition → cli}/poster-source.d.ts +3 -2
- package/dist/cli/poster-source.d.ts.map +1 -0
- package/dist/{composition → cli}/poster-source.js +2 -1
- package/dist/cli/poster-source.js.map +1 -0
- package/dist/cli/record-reach.d.ts +44 -0
- package/dist/cli/record-reach.d.ts.map +1 -0
- package/dist/cli/record-reach.js +228 -0
- package/dist/cli/record-reach.js.map +1 -0
- package/dist/cli/record-tables.d.ts +38 -0
- package/dist/cli/record-tables.d.ts.map +1 -0
- package/dist/cli/record-tables.js +110 -0
- package/dist/cli/record-tables.js.map +1 -0
- package/dist/cli/record.d.ts +141 -0
- package/dist/cli/record.d.ts.map +1 -0
- package/dist/cli/record.js +612 -0
- package/dist/cli/record.js.map +1 -0
- package/dist/cli/search-index.d.ts +56 -0
- package/dist/cli/search-index.d.ts.map +1 -0
- package/dist/cli/search-index.js +190 -0
- package/dist/cli/search-index.js.map +1 -0
- package/dist/cli/statuses.d.ts +25 -0
- package/dist/cli/statuses.d.ts.map +1 -0
- package/dist/cli/statuses.js +276 -0
- package/dist/cli/statuses.js.map +1 -0
- package/dist/cli/version.d.ts +8 -0
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +32 -1
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +34 -16
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +32 -12
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/audit-coverage.d.ts +70 -0
- package/dist/composition/audit-coverage.d.ts.map +1 -0
- package/dist/composition/audit-coverage.js +80 -0
- package/dist/composition/audit-coverage.js.map +1 -0
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +2 -1
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/buckingham-filter.d.ts +34 -0
- package/dist/composition/buckingham-filter.d.ts.map +1 -0
- package/dist/composition/buckingham-filter.js +64 -0
- package/dist/composition/buckingham-filter.js.map +1 -0
- package/dist/composition/canonical-compare.d.ts +29 -16
- package/dist/composition/canonical-compare.d.ts.map +1 -1
- package/dist/composition/canonical-compare.js +355 -59
- package/dist/composition/canonical-compare.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +2 -2
- package/dist/composition/canonical-graph.js +3 -3
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-prefactors.d.ts +24 -1
- package/dist/composition/canonical-prefactors.d.ts.map +1 -1
- package/dist/composition/canonical-prefactors.js +97 -1
- package/dist/composition/canonical-prefactors.js.map +1 -1
- package/dist/composition/catalog-graph.d.ts +4 -4
- package/dist/composition/catalog-graph.d.ts.map +1 -1
- package/dist/composition/catalog-graph.js +6 -4
- package/dist/composition/catalog-graph.js.map +1 -1
- package/dist/composition/chain-candidate.d.ts +43 -0
- package/dist/composition/chain-candidate.d.ts.map +1 -0
- package/dist/composition/chain-candidate.js +56 -0
- package/dist/composition/chain-candidate.js.map +1 -0
- package/dist/composition/chain-match.d.ts +19 -0
- package/dist/composition/chain-match.d.ts.map +1 -0
- package/dist/composition/chain-match.js +10 -0
- package/dist/composition/chain-match.js.map +1 -0
- package/dist/composition/chain-regime.d.ts +34 -0
- package/dist/composition/chain-regime.d.ts.map +1 -0
- package/dist/composition/chain-regime.js +89 -0
- package/dist/composition/chain-regime.js.map +1 -0
- package/dist/composition/compose-symbolic.js +1 -1
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts +11 -0
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +30 -10
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/composition-recovery.d.ts +47 -0
- package/dist/composition/composition-recovery.d.ts.map +1 -0
- package/dist/composition/composition-recovery.js +77 -0
- package/dist/composition/composition-recovery.js.map +1 -0
- package/dist/composition/consequence.d.ts +39 -0
- package/dist/composition/consequence.d.ts.map +1 -1
- package/dist/composition/consequence.js +37 -0
- package/dist/composition/consequence.js.map +1 -1
- package/dist/{bridges → composition}/descriptor.d.ts +6 -3
- package/dist/composition/descriptor.d.ts.map +1 -0
- package/dist/{bridges → composition}/descriptor.js +7 -4
- package/dist/composition/descriptor.js.map +1 -0
- package/dist/composition/discovery.d.ts +20 -0
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +27 -5
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +1 -1
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/edges/_catalog-helpers.d.ts +4 -0
- package/dist/composition/edges/_catalog-helpers.d.ts.map +1 -1
- package/dist/composition/edges/_catalog-helpers.js +15 -0
- package/dist/composition/edges/_catalog-helpers.js.map +1 -1
- package/dist/composition/edges/calibration.d.ts +0 -9
- package/dist/composition/edges/calibration.d.ts.map +1 -1
- package/dist/composition/edges/calibration.js +85 -0
- package/dist/composition/edges/calibration.js.map +1 -1
- package/dist/composition/edges/catalog-condensed-matter.d.ts +0 -9
- package/dist/composition/edges/catalog-condensed-matter.d.ts.map +1 -1
- package/dist/composition/edges/catalog-condensed-matter.js +32 -1
- package/dist/composition/edges/catalog-condensed-matter.js.map +1 -1
- package/dist/composition/edges/catalog-fields.d.ts.map +1 -1
- package/dist/composition/edges/catalog-fields.js +2 -1
- package/dist/composition/edges/catalog-fields.js.map +1 -1
- package/dist/composition/edges/catalog-full.d.ts +4 -2
- package/dist/composition/edges/catalog-full.d.ts.map +1 -1
- package/dist/composition/edges/catalog-full.js +4 -2
- package/dist/composition/edges/catalog-full.js.map +1 -1
- package/dist/composition/edges/catalog-gravitation-cosmology.d.ts +0 -10
- package/dist/composition/edges/catalog-gravitation-cosmology.d.ts.map +1 -1
- package/dist/composition/edges/catalog-gravitation-cosmology.js +31 -1
- package/dist/composition/edges/catalog-gravitation-cosmology.js.map +1 -1
- package/dist/composition/edges/catalog-quantum.d.ts +0 -10
- package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
- package/dist/composition/edges/catalog-quantum.js +53 -17
- package/dist/composition/edges/catalog-quantum.js.map +1 -1
- package/dist/composition/edges/catalog-tranche.d.ts +0 -15
- package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
- package/dist/composition/edges/catalog-tranche.js +70 -16
- package/dist/composition/edges/catalog-tranche.js.map +1 -1
- package/dist/composition/edges/proved-seeds.d.ts +39 -0
- package/dist/composition/edges/proved-seeds.d.ts.map +1 -0
- package/dist/composition/edges/proved-seeds.js +197 -0
- package/dist/composition/edges/proved-seeds.js.map +1 -0
- package/dist/composition/enumerate.d.ts +20 -0
- package/dist/composition/enumerate.d.ts.map +1 -1
- package/dist/composition/enumerate.js +23 -0
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/expr-eval.d.ts +5 -4
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js +40 -6
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.js +1 -1
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.d.ts +2 -1
- package/dist/composition/expr-subst.d.ts.map +1 -1
- package/dist/composition/expr-subst.js +9 -2
- package/dist/composition/expr-subst.js.map +1 -1
- package/dist/composition/frontier-account.d.ts +78 -0
- package/dist/composition/frontier-account.d.ts.map +1 -0
- package/dist/composition/frontier-account.js +127 -0
- package/dist/composition/frontier-account.js.map +1 -0
- package/dist/composition/graph-viz.d.ts +7 -22
- package/dist/composition/graph-viz.d.ts.map +1 -1
- package/dist/composition/graph-viz.js +4 -27
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/grounding.d.ts +49 -0
- package/dist/composition/grounding.d.ts.map +1 -1
- package/dist/composition/grounding.js +38 -0
- package/dist/composition/grounding.js.map +1 -1
- package/dist/composition/index.d.ts +0 -2
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +1 -1
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/not-composable-seeds.d.ts +30 -0
- package/dist/composition/not-composable-seeds.d.ts.map +1 -0
- package/dist/composition/not-composable-seeds.js +90 -0
- package/dist/composition/not-composable-seeds.js.map +1 -0
- package/dist/composition/probe/expression-gaps.d.ts +27 -0
- package/dist/composition/probe/expression-gaps.d.ts.map +1 -0
- package/dist/composition/probe/expression-gaps.js +47 -0
- package/dist/composition/probe/expression-gaps.js.map +1 -0
- package/dist/composition/probe/frontier.d.ts +2 -1
- package/dist/composition/probe/frontier.d.ts.map +1 -1
- package/dist/composition/probe/frontier.js +3 -2
- package/dist/composition/probe/frontier.js.map +1 -1
- package/dist/composition/probe/index.d.ts +4 -1
- package/dist/composition/probe/index.d.ts.map +1 -1
- package/dist/composition/probe/index.js +3 -1
- package/dist/composition/probe/index.js.map +1 -1
- package/dist/composition/probe/pipeline.d.ts +2 -0
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +6 -2
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/problem.d.ts +7 -0
- package/dist/composition/probe/problem.d.ts.map +1 -1
- package/dist/composition/probe/problem.js +15 -5
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/search-budget.d.ts.map +1 -1
- package/dist/composition/probe/search-budget.js +6 -2
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/probe/study.d.ts +340 -0
- package/dist/composition/probe/study.d.ts.map +1 -0
- package/dist/composition/probe/study.js +1519 -0
- package/dist/composition/probe/study.js.map +1 -0
- package/dist/composition/proposed-bridges.js +1 -1
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantities/_dims.d.ts +6 -0
- package/dist/composition/quantities/_dims.d.ts.map +1 -1
- package/dist/composition/quantities/_dims.js +6 -0
- package/dist/composition/quantities/_dims.js.map +1 -1
- package/dist/composition/quantities/condensed-matter.d.ts +16 -0
- package/dist/composition/quantities/condensed-matter.d.ts.map +1 -1
- package/dist/composition/quantities/condensed-matter.js +43 -2
- package/dist/composition/quantities/condensed-matter.js.map +1 -1
- package/dist/composition/quantities/fields.d.ts +10 -0
- package/dist/composition/quantities/fields.d.ts.map +1 -1
- package/dist/composition/quantities/fields.js +37 -2
- package/dist/composition/quantities/fields.js.map +1 -1
- package/dist/composition/quantities/gravitation-cosmology.d.ts +4 -0
- package/dist/composition/quantities/gravitation-cosmology.d.ts.map +1 -1
- package/dist/composition/quantities/gravitation-cosmology.js +14 -0
- package/dist/composition/quantities/gravitation-cosmology.js.map +1 -1
- package/dist/composition/quantities/quantum.d.ts +2 -0
- package/dist/composition/quantities/quantum.d.ts.map +1 -1
- package/dist/composition/quantities/quantum.js +7 -0
- package/dist/composition/quantities/quantum.js.map +1 -1
- package/dist/composition/quantities.d.ts +4 -16
- package/dist/composition/quantities.d.ts.map +1 -1
- package/dist/composition/quantities.js +4 -16
- package/dist/composition/quantities.js.map +1 -1
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +6 -2
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.d.ts +1 -1
- package/dist/composition/uncertainty.d.ts.map +1 -1
- package/dist/composition/user-equation.d.ts +79 -8
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +224 -32
- package/dist/composition/user-equation.js.map +1 -1
- package/dist/core/constants.d.ts +17 -5
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +17 -5
- package/dist/core/constants.js.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +2 -1
- package/dist/core/types.js.map +1 -1
- package/dist/dimensional/curvature.d.ts +7 -56
- package/dist/dimensional/curvature.d.ts.map +1 -1
- package/dist/dimensional/curvature.js +7 -76
- package/dist/dimensional/curvature.js.map +1 -1
- package/dist/dimensional/dimension-spec.d.ts +7 -1
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/dimension-spec.js +131 -3
- package/dist/dimensional/dimension-spec.js.map +1 -1
- package/dist/dimensional/formula-names.d.ts +30 -0
- package/dist/dimensional/formula-names.d.ts.map +1 -0
- package/dist/dimensional/formula-names.js +37 -0
- package/dist/dimensional/formula-names.js.map +1 -0
- package/dist/dimensional/natural-units.d.ts +33 -0
- package/dist/dimensional/natural-units.d.ts.map +1 -0
- package/dist/dimensional/natural-units.js +58 -0
- package/dist/dimensional/natural-units.js.map +1 -0
- package/dist/{composition → dimensional}/symbolic-constants.d.ts +21 -2
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -0
- package/dist/dimensional/symbolic-constants.js +122 -0
- package/dist/dimensional/symbolic-constants.js.map +1 -0
- package/dist/dimensional/unit-convention.d.ts +30 -0
- package/dist/dimensional/unit-convention.d.ts.map +1 -0
- package/dist/dimensional/unit-convention.js +60 -0
- package/dist/dimensional/unit-convention.js.map +1 -0
- package/dist/dimensional/units.d.ts +43 -0
- package/dist/dimensional/units.d.ts.map +1 -0
- package/dist/dimensional/units.js +197 -0
- package/dist/dimensional/units.js.map +1 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/numerical/bianchi-residual.d.ts +55 -0
- package/dist/numerical/bianchi-residual.d.ts.map +1 -0
- package/dist/numerical/bianchi-residual.js +79 -0
- package/dist/numerical/bianchi-residual.js.map +1 -0
- package/dist/numerical/binding-value.d.ts +67 -0
- package/dist/numerical/binding-value.d.ts.map +1 -0
- package/dist/numerical/binding-value.js +349 -0
- package/dist/numerical/binding-value.js.map +1 -0
- package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/connection-lowering-helpers.js +13 -26
- package/dist/numerical/connection-lowering-helpers.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +9 -0
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/float64-engine.d.ts.map +1 -1
- package/dist/numerical/float64-engine.js +23 -16
- package/dist/numerical/float64-engine.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts +14 -0
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js +56 -9
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula-mathts.d.ts.map +1 -1
- package/dist/numerical/formula-mathts.js +75 -6
- package/dist/numerical/formula-mathts.js.map +1 -1
- package/dist/numerical/formula.d.ts +33 -0
- package/dist/numerical/formula.d.ts.map +1 -1
- package/dist/numerical/formula.js +75 -6
- package/dist/numerical/formula.js.map +1 -1
- package/dist/numerical/spacetime-metrics.d.ts +243 -0
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -0
- package/dist/numerical/spacetime-metrics.js +1056 -0
- package/dist/numerical/spacetime-metrics.js.map +1 -0
- package/dist/relations/category.d.ts +38 -0
- package/dist/relations/category.d.ts.map +1 -0
- package/dist/relations/category.js +23 -0
- package/dist/relations/category.js.map +1 -0
- package/dist/relations/composition-table.d.ts +61 -0
- package/dist/relations/composition-table.d.ts.map +1 -0
- package/dist/relations/composition-table.js +140 -0
- package/dist/relations/composition-table.js.map +1 -0
- package/dist/relations/conventions.d.ts +63 -0
- package/dist/relations/conventions.d.ts.map +1 -0
- package/dist/relations/conventions.js +93 -0
- package/dist/relations/conventions.js.map +1 -0
- package/dist/relations/regime.d.ts +159 -0
- package/dist/relations/regime.d.ts.map +1 -0
- package/dist/relations/regime.js +304 -0
- package/dist/relations/regime.js.map +1 -0
- package/dist/relations/types.d.ts +257 -0
- package/dist/relations/types.d.ts.map +1 -0
- package/dist/relations/types.js +35 -0
- package/dist/relations/types.js.map +1 -0
- package/package.json +166 -163
- package/dist/bridges/descriptor.d.ts.map +0 -1
- package/dist/bridges/descriptor.js.map +0 -1
- package/dist/composition/poster-source.d.ts.map +0 -1
- package/dist/composition/poster-source.js.map +0 -1
- package/dist/composition/symbolic-constants.d.ts.map +0 -1
- package/dist/composition/symbolic-constants.js +0 -65
- package/dist/composition/symbolic-constants.js.map +0 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pendulum and its linear oscillator, integrated and read off, for the
|
|
3
|
+
* witnesses of `ab-pendulum-linear`'s declared translations. Time is in units
|
|
4
|
+
* of T0 (ω0 = 2π); both motions are released from rest at θ0.
|
|
5
|
+
*
|
|
6
|
+
* Also the closed forms those translations are built from: θ0 recovered from
|
|
7
|
+
* the bound's ε, and the nome q of the pendulum's elliptic modulus.
|
|
8
|
+
*
|
|
9
|
+
* @module atlas/oscillators/pendulum-motion
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
import { agm, pendulumPeriodErrorAt } from './bridges-limits.js';
|
|
13
|
+
/** ω0² at T0 = 1. @internal */
|
|
14
|
+
export const W2 = (2 * Math.PI) ** 2;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const pendulumAccel = (x) => -W2 * Math.sin(x);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const linearAccel = (x) => -W2 * x;
|
|
19
|
+
/** One classical RK4 step of x″ = accel(x). @internal */
|
|
20
|
+
export function rk4Step(x, v, h, accel) {
|
|
21
|
+
const k1x = v;
|
|
22
|
+
const k1v = accel(x);
|
|
23
|
+
const k2x = v + 0.5 * h * k1v;
|
|
24
|
+
const k2v = accel(x + 0.5 * h * k1x);
|
|
25
|
+
const k3x = v + 0.5 * h * k2v;
|
|
26
|
+
const k3v = accel(x + 0.5 * h * k2x);
|
|
27
|
+
const k4x = v + h * k3v;
|
|
28
|
+
const k4v = accel(x + h * k3x);
|
|
29
|
+
return [x + (h / 6) * (k1x + 2 * k2x + 2 * k3x + k4x), v + (h / 6) * (k1v + 2 * k2v + 2 * k3v + k4v)];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The root in (0, h] of x(τ), the position one partial RK4 step of length τ
|
|
33
|
+
* from (x, v), by the secant method from the bracket (0, x) and (h, nx).
|
|
34
|
+
*
|
|
35
|
+
* The crossing is then located to the integrator's own truncation error,
|
|
36
|
+
* rather than to the O(h³) error of a straight line between the two steps.
|
|
37
|
+
* That truncation error is nearly the same for the pendulum and the linear
|
|
38
|
+
* oscillator at small θ0, so it cancels in their phase difference; the
|
|
39
|
+
* interpolation error does not.
|
|
40
|
+
*/
|
|
41
|
+
function refineCrossing(x, v, nx, h, accel) {
|
|
42
|
+
let a = 0;
|
|
43
|
+
let fa = x;
|
|
44
|
+
let b = h;
|
|
45
|
+
let fb = nx;
|
|
46
|
+
for (let k = 0; k < 50 && fb !== 0 && fb !== fa; k++) {
|
|
47
|
+
const c = b - (fb * (b - a)) / (fb - fa);
|
|
48
|
+
if (!(c >= -h && c <= 2 * h) || c === b)
|
|
49
|
+
break;
|
|
50
|
+
a = b;
|
|
51
|
+
fa = fb;
|
|
52
|
+
b = c;
|
|
53
|
+
fb = rk4Step(x, v, c, accel)[0];
|
|
54
|
+
}
|
|
55
|
+
return b;
|
|
56
|
+
}
|
|
57
|
+
/** Zero-crossing times of a release from rest at `theta0`, over `periods` of T0 = 1. @internal */
|
|
58
|
+
export function crossingTimes(accel, theta0, stepsPerPeriod, periods) {
|
|
59
|
+
const h = 1 / stepsPerPeriod;
|
|
60
|
+
const out = [];
|
|
61
|
+
let x = theta0;
|
|
62
|
+
let v = 0;
|
|
63
|
+
for (let i = 0; i < stepsPerPeriod * periods; i++) {
|
|
64
|
+
const [nx, nv] = rk4Step(x, v, h, accel);
|
|
65
|
+
if (nx === 0 || x > 0 !== nx > 0)
|
|
66
|
+
out.push(i * h + refineCrossing(x, v, nx, h, accel));
|
|
67
|
+
x = nx;
|
|
68
|
+
v = nv;
|
|
69
|
+
}
|
|
70
|
+
return out;
|
|
71
|
+
}
|
|
72
|
+
/** The phase at `t`, interpolated through the anchors (0, 0) and (c_k, π/2 + kπ). @internal */
|
|
73
|
+
export function phaseAt(crossings, t) {
|
|
74
|
+
let prevT = 0;
|
|
75
|
+
let prevPhase = 0;
|
|
76
|
+
for (let k = 0; k < crossings.length; k++) {
|
|
77
|
+
const c = crossings[k];
|
|
78
|
+
const phase = Math.PI / 2 + k * Math.PI;
|
|
79
|
+
if (t <= c)
|
|
80
|
+
return prevPhase + ((phase - prevPhase) * (t - prevT)) / (c - prevT);
|
|
81
|
+
prevT = c;
|
|
82
|
+
prevPhase = phase;
|
|
83
|
+
}
|
|
84
|
+
return Number.NaN;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* θ0 in [0, π) whose exact relative period error is `eps`, by bisection on the
|
|
88
|
+
* strictly increasing `pendulumPeriodErrorAt`.
|
|
89
|
+
*
|
|
90
|
+
* @returns NaN for a negative or non-finite `eps`.
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export function theta0OfPeriodError(eps) {
|
|
94
|
+
if (!Number.isFinite(eps) || eps < 0)
|
|
95
|
+
return Number.NaN;
|
|
96
|
+
if (eps === 0)
|
|
97
|
+
return 0;
|
|
98
|
+
let lo = 0;
|
|
99
|
+
let hi = Math.PI;
|
|
100
|
+
for (let i = 0; i < 200 && hi - lo > 0; i++) {
|
|
101
|
+
const mid = (lo + hi) / 2;
|
|
102
|
+
if (mid === lo || mid === hi)
|
|
103
|
+
break;
|
|
104
|
+
if (pendulumPeriodErrorAt({ theta0: mid }) < eps)
|
|
105
|
+
lo = mid;
|
|
106
|
+
else
|
|
107
|
+
hi = mid;
|
|
108
|
+
}
|
|
109
|
+
return (lo + hi) / 2;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The nome q = exp(−π K′/K) of the modulus k = sin(θ0/2), with
|
|
113
|
+
* K′/K = AGM(1, cos(θ0/2)) / AGM(1, sin(θ0/2)).
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
export function pendulumNome(theta0) {
|
|
117
|
+
const k = Math.sin(Math.abs(theta0) / 2);
|
|
118
|
+
if (k === 0)
|
|
119
|
+
return 0;
|
|
120
|
+
return Math.exp((-Math.PI * agm(1, Math.cos(theta0 / 2))) / agm(1, k));
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=pendulum-motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pendulum-motion.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/pendulum-motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,+BAA+B;AAC/B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AACrC,gBAAgB;AAChB,MAAM,CAAC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AAC;QAAE,OAAO,CAAC,CAAC;IACxB,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK,EAAE;YAAE,MAAM;QACpC,IAAI,qBAAqB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG;YAAE,EAAE,GAAG,GAAG,CAAC;;YACtD,EAAE,GAAG,GAAG,CAAC;IAChB,CAAC;IACD,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ab-spring-lc`'s declaration that its map carries the PHASE unchanged, so
|
|
3
|
+
* `ab-pendulum-linear`'s phase translation holds on the path
|
|
4
|
+
* pendulum → spring → LC.
|
|
5
|
+
*
|
|
6
|
+
* The bridge's composed map is q(t_LC) = (q0/x0)·x(t) with t_LC = t·ω_s/ω_LC.
|
|
7
|
+
* The charge is a fixed nonzero multiple of the displacement at the mapped
|
|
8
|
+
* time, so the two share every zero crossing and turning point, and the angle
|
|
9
|
+
* variable (0 at release from rest, 2π per period, uniform in time) of the
|
|
10
|
+
* circuit at t_LC equals the spring's at t. A phase error against the spring
|
|
11
|
+
* at t is therefore the same phase error against the circuit at t_LC: nothing
|
|
12
|
+
* is added and nothing truncated.
|
|
13
|
+
*
|
|
14
|
+
* This is a claim about the phase only. It says nothing about the position
|
|
15
|
+
* error — x and q are different quantities in different units, and a bound in
|
|
16
|
+
* rad on the angle does not become one on the charge — so `ab-spring-lc`
|
|
17
|
+
* declares no carriage for `position`.
|
|
18
|
+
*
|
|
19
|
+
* The witness W1φ integrates the two oscillators of W1a (m = 2, k = 8,
|
|
20
|
+
* x0 = 0.37 and L = 0.5, C = 0.25, q0 = −1.9: ω_s = 2, ω_LC = 2√2, and a
|
|
21
|
+
* NEGATIVE ratio q0/x0) by RK4 at the same step in physical time, and
|
|
22
|
+
* compares the circuit's phase at the mapped time with the spring's at every
|
|
23
|
+
* spring zero crossing. The angle variable of each motion is measured from its
|
|
24
|
+
* own release, so the sign of q0/x0 does not enter.
|
|
25
|
+
*
|
|
26
|
+
* @module atlas/oscillators/phase-carriage
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
import type { ObservableCarriage } from '../translation.js';
|
|
30
|
+
/**
|
|
31
|
+
* max over the spring's zero crossings c_k of |φ_LC(timeScale · c_k) − (π/2 + kπ)|,
|
|
32
|
+
* both integrated at `stepsPerSpringPeriod` steps of the spring's period.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare function measureCarriedPhaseError(stepsPerSpringPeriod: number, timeScale: number): number;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const SPRING_LC_PHASE_CARRIAGE: ObservableCarriage;
|
|
38
|
+
//# sourceMappingURL=phase-carriage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase-carriage.d.ts","sourceRoot":"","sources":["../../../src/atlas/oscillators/phase-carriage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAwB5D;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAUhG;AAWD,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,kBAsBtC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ab-spring-lc`'s declaration that its map carries the PHASE unchanged, so
|
|
3
|
+
* `ab-pendulum-linear`'s phase translation holds on the path
|
|
4
|
+
* pendulum → spring → LC.
|
|
5
|
+
*
|
|
6
|
+
* The bridge's composed map is q(t_LC) = (q0/x0)·x(t) with t_LC = t·ω_s/ω_LC.
|
|
7
|
+
* The charge is a fixed nonzero multiple of the displacement at the mapped
|
|
8
|
+
* time, so the two share every zero crossing and turning point, and the angle
|
|
9
|
+
* variable (0 at release from rest, 2π per period, uniform in time) of the
|
|
10
|
+
* circuit at t_LC equals the spring's at t. A phase error against the spring
|
|
11
|
+
* at t is therefore the same phase error against the circuit at t_LC: nothing
|
|
12
|
+
* is added and nothing truncated.
|
|
13
|
+
*
|
|
14
|
+
* This is a claim about the phase only. It says nothing about the position
|
|
15
|
+
* error — x and q are different quantities in different units, and a bound in
|
|
16
|
+
* rad on the angle does not become one on the charge — so `ab-spring-lc`
|
|
17
|
+
* declares no carriage for `position`.
|
|
18
|
+
*
|
|
19
|
+
* The witness W1φ integrates the two oscillators of W1a (m = 2, k = 8,
|
|
20
|
+
* x0 = 0.37 and L = 0.5, C = 0.25, q0 = −1.9: ω_s = 2, ω_LC = 2√2, and a
|
|
21
|
+
* NEGATIVE ratio q0/x0) by RK4 at the same step in physical time, and
|
|
22
|
+
* compares the circuit's phase at the mapped time with the spring's at every
|
|
23
|
+
* spring zero crossing. The angle variable of each motion is measured from its
|
|
24
|
+
* own release, so the sign of q0/x0 does not enter.
|
|
25
|
+
*
|
|
26
|
+
* @module atlas/oscillators/phase-carriage
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
import { phaseAt, rk4Step } from './pendulum-motion.js';
|
|
30
|
+
const [M, K, L, C, X0, Q0] = [2, 8, 0.5, 0.25, 0.37, -1.9];
|
|
31
|
+
const OMEGA_S = Math.sqrt(K / M);
|
|
32
|
+
const OMEGA_LC = Math.sqrt(1 / (L * C));
|
|
33
|
+
const SPRING_PERIODS = 20;
|
|
34
|
+
/** Zero crossings of u″ = −ω²u from rest at `u0`, stepping `h` in the oscillator's own time. */
|
|
35
|
+
function crossings(omega, u0, h, tEnd) {
|
|
36
|
+
const out = [];
|
|
37
|
+
let x = u0;
|
|
38
|
+
let v = 0;
|
|
39
|
+
const w2 = omega * omega;
|
|
40
|
+
for (let i = 0; i * h < tEnd; i++) {
|
|
41
|
+
const [nx, nv] = rk4Step(x, v, h, (s) => -w2 * s);
|
|
42
|
+
if (nx === 0 || x > 0 !== nx > 0)
|
|
43
|
+
out.push(i * h + (h * x) / (x - nx));
|
|
44
|
+
x = nx;
|
|
45
|
+
v = nv;
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* max over the spring's zero crossings c_k of |φ_LC(timeScale · c_k) − (π/2 + kπ)|,
|
|
51
|
+
* both integrated at `stepsPerSpringPeriod` steps of the spring's period.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export function measureCarriedPhaseError(stepsPerSpringPeriod, timeScale) {
|
|
55
|
+
const tSpring = SPRING_PERIODS * ((2 * Math.PI) / OMEGA_S);
|
|
56
|
+
const h = (2 * Math.PI) / OMEGA_S / stepsPerSpringPeriod;
|
|
57
|
+
const spring = crossings(OMEGA_S, X0, h, tSpring);
|
|
58
|
+
const lc = crossings(OMEGA_LC, Q0, h, tSpring * Math.max(1, timeScale) + 1);
|
|
59
|
+
let worst = 0;
|
|
60
|
+
for (let k = 0; k < spring.length; k++) {
|
|
61
|
+
worst = Math.max(worst, Math.abs(phaseAt(lc, timeScale * spring[k]) - (Math.PI / 2 + k * Math.PI)));
|
|
62
|
+
}
|
|
63
|
+
return worst;
|
|
64
|
+
}
|
|
65
|
+
const W1PHI = {
|
|
66
|
+
id: 'W1φ',
|
|
67
|
+
evaluate: (steps) => measureCarriedPhaseError(steps, OMEGA_S / OMEGA_LC),
|
|
68
|
+
target: 0,
|
|
69
|
+
coarseResolution: 100,
|
|
70
|
+
fineResolution: 400,
|
|
71
|
+
tolerance: 1e-6,
|
|
72
|
+
};
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const SPRING_LC_PHASE_CARRIAGE = {
|
|
75
|
+
bridgeId: 'ab-spring-lc',
|
|
76
|
+
observable: 'phase',
|
|
77
|
+
map: 'the circuit\'s angle variable at t_LC = t·ω_s/ω_LC is the spring\'s at t, because q(t_LC) = (q0/x0)·x(t)',
|
|
78
|
+
derivation: 'a fixed nonzero multiple of the displacement at the mapped time shares its zero crossings and turning points, so the ' +
|
|
79
|
+
'angle variable is the same function of the mapped time; a phase error against the spring at t is the same ' +
|
|
80
|
+
'error against the circuit at t_LC, exactly',
|
|
81
|
+
premises: [
|
|
82
|
+
'the circuit is released from rest: q(0) = q0, i(0) = 0 (either sign of q0/x0: each phase is measured from its own release)',
|
|
83
|
+
'lossless and unforced (the bridge\'s own side conditions)',
|
|
84
|
+
],
|
|
85
|
+
timeMap: 't is read on the spring\'s clock (the unit of T0); the circuit is read at t·ω_s/ω_LC, the same t when LC = m/k',
|
|
86
|
+
witnesses: [
|
|
87
|
+
{
|
|
88
|
+
id: 'W1φ',
|
|
89
|
+
kind: 'numeric',
|
|
90
|
+
test: 'tests/atlas/spring-lc-phase-carriage.test.ts',
|
|
91
|
+
tolerance: `RK4 circuit phase at the mapped time within 1e-6 rad of the spring's at every crossing over ${SPRING_PERIODS} spring periods (W1a's m = 2, k = 8, x0 = 0.37; L = 0.5, C = 0.25, q0 = −1.9)`,
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
checks: [W1PHI],
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=phase-carriage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase-carriage.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/phase-carriage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;AAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACxC,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,gGAAgG;AAChG,SAAS,SAAS,CAAC,KAAa,EAAE,EAAU,EAAE,CAAS,EAAE,IAAY;IACnE,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,EAAE,GAAG,KAAK,GAAG,KAAK,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,MA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SAAS,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACvG,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,KAAK,GAAuB;IAChC,EAAE,EAAE,KAAK;IACT,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;IACxE,MAAM,EAAE,CAAC;IACT,gBAAgB,EAAE,GAAG;IACrB,cAAc,EAAE,GAAG;IACnB,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAAuB;IAC1D,QAAQ,EAAE,cAAc;IACxB,UAAU,EAAE,OAAO;IACnB,GAAG,EAAE,0GAA0G;IAC/G,UAAU,EACR,uHAAuH;QACvH,4GAA4G;QAC5G,4CAA4C;IAC9C,QAAQ,EAAE;QACR,4HAA4H;QAC5H,2DAA2D;KAC5D;IACD,OAAO,EAAE,gHAAgH;IACzH,SAAS,EAAE;QACT;YACE,EAAE,EAAE,KAAK;YACT,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,8CAA8C;YACpD,SAAS,EAAE,+FAA+F,cAAc,+EAA+E;SACxM;KACF;IACD,MAAM,EAAE,CAAC,KAAK,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ab-pendulum-linear`'s declared translation from its bound's quantity, the
|
|
3
|
+
* relative period error, into the accumulated PHASE error.
|
|
4
|
+
*
|
|
5
|
+
* Both motions start from rest at θ0 at t = 0. The phase is the angle
|
|
6
|
+
* variable: 0 at release and advancing by 2π per period, uniformly in time,
|
|
7
|
+
* so the pendulum's is 2π t/T and the linear oscillator's 2π t/T0. With the
|
|
8
|
+
* bound's `ε = T/T0 − 1` (normalised by the reduced model's period),
|
|
9
|
+
*
|
|
10
|
+
* Δφ(t) = 2π t/T0 − 2π t/T = 2π (t/T0) · ε/(1 + ε),
|
|
11
|
+
*
|
|
12
|
+
* which reaches a tolerance Δ at `t* = Δ · T0 · (1 + ε)/(2π ε)`. Nothing is
|
|
13
|
+
* truncated: the map is exact in ε, and ε itself is the bound's closed form.
|
|
14
|
+
*
|
|
15
|
+
* It is NOT a bound on the pointwise position error |θ(t) − θ_lin(t)|: the
|
|
16
|
+
* pendulum's waveform carries a third harmonic of amplitude ≈ θ0³/192, which
|
|
17
|
+
* is not a phase, and the position error at a given phase error depends on
|
|
18
|
+
* where in the cycle the observation falls.
|
|
19
|
+
*
|
|
20
|
+
* The witness W7p integrates BOTH equations of motion and reads each phase off
|
|
21
|
+
* its zero crossings — crossing k is at phase π/2 + kπ by the symmetry of a
|
|
22
|
+
* release from rest, and the angle variable is linear in time between them —
|
|
23
|
+
* so it measures the drift without using ε or the elliptic integral. It runs
|
|
24
|
+
* at the fixture θ0 = 0.2 as the regression anchor, and again at the caller's
|
|
25
|
+
* point, bounded to 512 T0 of integration (`phasePointCheck`).
|
|
26
|
+
*
|
|
27
|
+
* @module atlas/oscillators/phase-translation
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
import type { ObservableTranslation } from '../translation.js';
|
|
31
|
+
/**
|
|
32
|
+
* The time, in units of T0, at which the MEASURED phase lead of the linear
|
|
33
|
+
* oscillator over the pendulum first reaches `tolerance` rad, both integrated
|
|
34
|
+
* by RK4 at `stepsPerPeriod` steps of T0.
|
|
35
|
+
*
|
|
36
|
+
* @returns NaN if the drift does not reach `tolerance` within 2^16 periods.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function measurePhaseHorizon(theta0: number, tolerance: number, stepsPerPeriod: number): number;
|
|
40
|
+
/** As `measurePhaseHorizon`, over exactly `periods` of T0; NaN if the drift does not reach `tolerance` in them. @internal */
|
|
41
|
+
export declare function measurePhaseHorizonWithin(theta0: number, tolerance: number, stepsPerPeriod: number, periods: number): number;
|
|
42
|
+
/** The point witness integrates at most this many periods of T0, so its cost is bounded. */
|
|
43
|
+
export declare const PHASE_POINT_MAX_PERIODS = 512;
|
|
44
|
+
/** @internal */
|
|
45
|
+
export declare const PENDULUM_PHASE_TRANSLATION: ObservableTranslation;
|
|
46
|
+
//# sourceMappingURL=phase-translation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase-translation.d.ts","sourceRoot":"","sources":["../../../src/atlas/oscillators/phase-translation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAM/D;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAMrG;AAED,6HAA6H;AAC7H,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAc5H;AAWD,4FAA4F;AAC5F,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAyD3C,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,qBA+CxC,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ab-pendulum-linear`'s declared translation from its bound's quantity, the
|
|
3
|
+
* relative period error, into the accumulated PHASE error.
|
|
4
|
+
*
|
|
5
|
+
* Both motions start from rest at θ0 at t = 0. The phase is the angle
|
|
6
|
+
* variable: 0 at release and advancing by 2π per period, uniformly in time,
|
|
7
|
+
* so the pendulum's is 2π t/T and the linear oscillator's 2π t/T0. With the
|
|
8
|
+
* bound's `ε = T/T0 − 1` (normalised by the reduced model's period),
|
|
9
|
+
*
|
|
10
|
+
* Δφ(t) = 2π t/T0 − 2π t/T = 2π (t/T0) · ε/(1 + ε),
|
|
11
|
+
*
|
|
12
|
+
* which reaches a tolerance Δ at `t* = Δ · T0 · (1 + ε)/(2π ε)`. Nothing is
|
|
13
|
+
* truncated: the map is exact in ε, and ε itself is the bound's closed form.
|
|
14
|
+
*
|
|
15
|
+
* It is NOT a bound on the pointwise position error |θ(t) − θ_lin(t)|: the
|
|
16
|
+
* pendulum's waveform carries a third harmonic of amplitude ≈ θ0³/192, which
|
|
17
|
+
* is not a phase, and the position error at a given phase error depends on
|
|
18
|
+
* where in the cycle the observation falls.
|
|
19
|
+
*
|
|
20
|
+
* The witness W7p integrates BOTH equations of motion and reads each phase off
|
|
21
|
+
* its zero crossings — crossing k is at phase π/2 + kπ by the symmetry of a
|
|
22
|
+
* release from rest, and the angle variable is linear in time between them —
|
|
23
|
+
* so it measures the drift without using ε or the elliptic integral. It runs
|
|
24
|
+
* at the fixture θ0 = 0.2 as the regression anchor, and again at the caller's
|
|
25
|
+
* point, bounded to 512 T0 of integration (`phasePointCheck`).
|
|
26
|
+
*
|
|
27
|
+
* @module atlas/oscillators/phase-translation
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
import { pendulumPeriodErrorAt } from './bridges-limits.js';
|
|
31
|
+
import { crossingTimes, linearAccel, pendulumAccel, phaseAt, theta0OfPeriodError } from './pendulum-motion.js';
|
|
32
|
+
const TWO_PI = 2 * Math.PI;
|
|
33
|
+
/**
|
|
34
|
+
* The time, in units of T0, at which the MEASURED phase lead of the linear
|
|
35
|
+
* oscillator over the pendulum first reaches `tolerance` rad, both integrated
|
|
36
|
+
* by RK4 at `stepsPerPeriod` steps of T0.
|
|
37
|
+
*
|
|
38
|
+
* @returns NaN if the drift does not reach `tolerance` within 2^16 periods.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export function measurePhaseHorizon(theta0, tolerance, stepsPerPeriod) {
|
|
42
|
+
for (let periods = 16; periods <= 2 ** 16; periods *= 2) {
|
|
43
|
+
const t = measurePhaseHorizonWithin(theta0, tolerance, stepsPerPeriod, periods);
|
|
44
|
+
if (!Number.isNaN(t))
|
|
45
|
+
return t;
|
|
46
|
+
}
|
|
47
|
+
return Number.NaN;
|
|
48
|
+
}
|
|
49
|
+
/** As `measurePhaseHorizon`, over exactly `periods` of T0; NaN if the drift does not reach `tolerance` in them. @internal */
|
|
50
|
+
export function measurePhaseHorizonWithin(theta0, tolerance, stepsPerPeriod, periods) {
|
|
51
|
+
const pend = crossingTimes(pendulumAccel, theta0, stepsPerPeriod, periods);
|
|
52
|
+
const lin = crossingTimes(linearAccel, theta0, stepsPerPeriod, periods);
|
|
53
|
+
let prevT = 0;
|
|
54
|
+
let prevDrift = 0;
|
|
55
|
+
for (let k = 0; k < pend.length; k++) {
|
|
56
|
+
const c = pend[k];
|
|
57
|
+
const drift = phaseAt(lin, c) - (Math.PI / 2 + k * Math.PI);
|
|
58
|
+
if (!Number.isFinite(drift))
|
|
59
|
+
break;
|
|
60
|
+
if (drift >= tolerance)
|
|
61
|
+
return prevT + ((tolerance - prevDrift) * (c - prevT)) / (drift - prevDrift);
|
|
62
|
+
prevT = c;
|
|
63
|
+
prevDrift = drift;
|
|
64
|
+
}
|
|
65
|
+
return Number.NaN;
|
|
66
|
+
}
|
|
67
|
+
/** `t* = Δ T0 (1+ε)/(2π ε)`; `Infinity` at ε = 0, where no phase accumulates. */
|
|
68
|
+
function phaseHorizon(eps, tolerance, T0) {
|
|
69
|
+
if (T0 === undefined || !Number.isFinite(T0) || T0 <= 0 || !Number.isFinite(eps) || eps < 0)
|
|
70
|
+
return Number.NaN;
|
|
71
|
+
return eps === 0 ? Infinity : (tolerance * T0 * (1 + eps)) / (TWO_PI * eps);
|
|
72
|
+
}
|
|
73
|
+
const W7P_THETA0 = 0.2;
|
|
74
|
+
const W7P_TOLERANCE = 1;
|
|
75
|
+
/** The point witness integrates at most this many periods of T0, so its cost is bounded. */
|
|
76
|
+
export const PHASE_POINT_MAX_PERIODS = 512;
|
|
77
|
+
/**
|
|
78
|
+
* The point witness measures the time to this much drift, or to the drift
|
|
79
|
+
* reached at the cap if less: the map is linear in t, so its slope is what is
|
|
80
|
+
* checked, whatever tolerance the caller asked about.
|
|
81
|
+
*/
|
|
82
|
+
const PHASE_POINT_DRIFT = 1;
|
|
83
|
+
/**
|
|
84
|
+
* Below this measured drift the rounding noise of the two motions' crossing
|
|
85
|
+
* times comes within a factor of ten of the witness tolerance. With the
|
|
86
|
+
* crossings located by `crossingTimes`' secant refinement, the fine error was
|
|
87
|
+
* measured at 800 steps per T0 as 1.5e-8 relative at 1.1e-5 rad of drift,
|
|
88
|
+
* 7.4e-9 at 7.2e-5 rad, 2.5e-9 at 2.0e-4 rad and 2.4e-10 to 9.2e-10 from
|
|
89
|
+
* 2e-2 rad up. With the straight-line crossings it replaced, the same error
|
|
90
|
+
* was 9.5e-6 relative at 2e-4 rad and 1.2e-7 at 2e-2 rad.
|
|
91
|
+
*/
|
|
92
|
+
const PHASE_POINT_MIN_DRIFT = 1e-4;
|
|
93
|
+
/**
|
|
94
|
+
* The (1+ε) control differs from the target by ε/(1+ε) relative, so it can be
|
|
95
|
+
* refuted only where ε exceeds this tolerance (θ0 above about 9e-4).
|
|
96
|
+
*/
|
|
97
|
+
const PHASE_POINT_RELATIVE_TOLERANCE = 5e-8;
|
|
98
|
+
/**
|
|
99
|
+
* W7p at the caller's θ0 (recovered from ε) instead of the fixture: the time
|
|
100
|
+
* the measured drift reaches min(1 rad, the drift at the cap), within
|
|
101
|
+
* PHASE_POINT_RELATIVE_TOLERANCE of the closed form. Its control is the same measurement against
|
|
102
|
+
* the horizon without the (1+ε) factor, which differs from the target by
|
|
103
|
+
* ε/(1+ε) relative — so the control can fail only where that exceeds the
|
|
104
|
+
* witness tolerance, and the caller is told when it does not.
|
|
105
|
+
*/
|
|
106
|
+
function phasePointCheck(eps) {
|
|
107
|
+
if (!Number.isFinite(eps) || eps <= 0)
|
|
108
|
+
return { unavailable: `no phase drift accumulates at ε = ${eps}` };
|
|
109
|
+
const theta0 = theta0OfPeriodError(eps);
|
|
110
|
+
const measured = Math.min(PHASE_POINT_DRIFT, (TWO_PI * PHASE_POINT_MAX_PERIODS * eps) / (1 + eps));
|
|
111
|
+
if (measured < PHASE_POINT_MIN_DRIFT) {
|
|
112
|
+
return {
|
|
113
|
+
unavailable: `the drift within ${PHASE_POINT_MAX_PERIODS} T0 at θ0 = ${Number(theta0.toPrecision(8))} is ${measured} rad, below the ` +
|
|
114
|
+
`${PHASE_POINT_MIN_DRIFT} rad this witness resolves; not run`,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const target = phaseHorizon(eps, measured, 1);
|
|
118
|
+
const periods = Math.ceil(target) + 2;
|
|
119
|
+
const evaluate = (stepsPerPeriod) => measurePhaseHorizonWithin(theta0, measured, stepsPerPeriod, periods);
|
|
120
|
+
const spec = { evaluate, coarseResolution: 200, fineResolution: 800, tolerance: PHASE_POINT_RELATIVE_TOLERANCE * target };
|
|
121
|
+
const capped = measured < PHASE_POINT_DRIFT ? ` (the drift reached in ${PHASE_POINT_MAX_PERIODS} T0)` : '';
|
|
122
|
+
return {
|
|
123
|
+
claim: `RK4-measured time to ${measured} rad${capped} of phase drift at θ0 = ${Number(theta0.toPrecision(8))} (recovered from ε) ` +
|
|
124
|
+
`within ${PHASE_POINT_RELATIVE_TOLERANCE} relative of t* = ${target} T0; 200 and 800 steps per T0, ${periods} T0 integrated`,
|
|
125
|
+
check: { id: 'W7p@point', ...spec, target },
|
|
126
|
+
control: { id: 'W7p@point-control', ...spec, target: measured / (TWO_PI * eps) },
|
|
127
|
+
controlClaim: 'the same measurement against the horizon without the (1+ε) factor, Δ T0/(2π ε)',
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const PENDULUM_PHASE_TRANSLATION = {
|
|
132
|
+
bridgeId: 'ab-pendulum-linear',
|
|
133
|
+
observable: 'phase',
|
|
134
|
+
unit: 'rad',
|
|
135
|
+
fromNorm: 'relative period error, normalized by the value of the reduced model',
|
|
136
|
+
errorKind: 'exact',
|
|
137
|
+
definition: 'the angle variable of each motion (0 at release from rest at θ0, 2π per period); the error is the ' +
|
|
138
|
+
"linear oscillator's lead over the pendulum, Δφ(t) = 2πt/T0 − 2πt/T",
|
|
139
|
+
derivation: 'with ε = T/T0 − 1, Δφ(t) = 2π (t/T0) ε/(1+ε), exact in ε; it reaches Δ at t* = Δ T0 (1+ε)/(2π ε). ' +
|
|
140
|
+
'ε/(1+ε) increases with ε, so the domain supremum of ε gives the shortest horizon over the domain',
|
|
141
|
+
premises: [
|
|
142
|
+
'both motions are released from rest at the same θ0 at t = 0',
|
|
143
|
+
'T0 = 2π √(ℓ/g) is the linear period, in the unit t is given in',
|
|
144
|
+
],
|
|
145
|
+
parameters: ['T0'],
|
|
146
|
+
timeUnit: 'the unit of T0',
|
|
147
|
+
errorAt: (eps, t, { T0 }) => {
|
|
148
|
+
if (T0 === undefined || !Number.isFinite(T0) || T0 <= 0 || !Number.isFinite(eps) || !Number.isFinite(t))
|
|
149
|
+
return Number.NaN;
|
|
150
|
+
return (TWO_PI * (t / T0) * eps) / (1 + eps);
|
|
151
|
+
},
|
|
152
|
+
horizonFor: (eps, tolerance, { T0 }) => phaseHorizon(eps, tolerance, T0),
|
|
153
|
+
boundary: 'inclusive: adequate iff t ≤ t*, i.e. Δφ(t) ≤ the tolerance',
|
|
154
|
+
notCovered: [
|
|
155
|
+
'the pointwise position error |θ(t) − θ_lin(t)| (the waveform carries a third harmonic ≈ θ0³/192 that is not a phase)',
|
|
156
|
+
'the amplitude',
|
|
157
|
+
],
|
|
158
|
+
witnesses: [
|
|
159
|
+
{
|
|
160
|
+
id: 'W7p',
|
|
161
|
+
kind: 'numeric',
|
|
162
|
+
test: 'tests/atlas/pendulum-phase-translation.test.ts',
|
|
163
|
+
tolerance: `RK4-measured time to ${W7P_TOLERANCE} rad of phase drift at θ0 = ${W7P_THETA0} within 1e-4 T0 of t*`,
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
checks: [
|
|
167
|
+
{
|
|
168
|
+
id: 'W7p',
|
|
169
|
+
evaluate: (stepsPerPeriod) => measurePhaseHorizon(W7P_THETA0, W7P_TOLERANCE, stepsPerPeriod),
|
|
170
|
+
target: phaseHorizon(pendulumPeriodErrorAt({ theta0: W7P_THETA0 }), W7P_TOLERANCE, 1),
|
|
171
|
+
coarseResolution: 50,
|
|
172
|
+
fineResolution: 200,
|
|
173
|
+
tolerance: 1e-4,
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
pointCheck: phasePointCheck,
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=phase-translation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase-translation.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/phase-translation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE/G,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAE3B;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,SAAiB,EAAE,cAAsB;IAC3F,KAAK,IAAI,OAAO,GAAG,EAAE,EAAE,OAAO,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC;QACxD,MAAM,CAAC,GAAG,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;QAChF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IAC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,EAAE,EAAE;YACpB,cAAc,EAAE,GAAG;YACnB,SAAS,EAAE,IAAI;SAChB;KACF;IACD,UAAU,EAAE,eAAe;CAC5B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ab-pendulum-linear`'s declared translation from its bound's quantity, the
|
|
3
|
+
* relative period error ε, into an UPPER BOUND on the pointwise position error
|
|
4
|
+
* |θ(t) − θ_lin(t)|, in rad.
|
|
5
|
+
*
|
|
6
|
+
* Both motions start from rest at θ0. The pendulum is θ(t) = F(φ), φ = 2πt/T,
|
|
7
|
+
* with the classical Fourier series of the elliptic solution
|
|
8
|
+
*
|
|
9
|
+
* F(φ) = Σ_{n≥0} (−1)ⁿ aₙ cos((2n+1)φ), aₙ = 8 q^{n+½} / ((2n+1)(1 + q^{2n+1})),
|
|
10
|
+
*
|
|
11
|
+
* q the nome of k = sin(θ0/2); F(0) = θ0 = Σ (−1)ⁿ aₙ. The linear motion is
|
|
12
|
+
* θ0 cos φ_lin, φ_lin = 2πt/T0. Splitting at θ0 cos φ,
|
|
13
|
+
*
|
|
14
|
+
* |θ − θ_lin| ≤ |F(φ) − θ0 cos φ| + θ0 |cos φ − cos φ_lin|
|
|
15
|
+
* ≤ 2 Σ_{n≥1} aₙ + 2θ0 |sin(Δφ/2)|,
|
|
16
|
+
*
|
|
17
|
+
* because F(φ) − θ0 cos φ = Σ_{n≥1} (−1)ⁿ aₙ (cos((2n+1)φ) − cos φ). With
|
|
18
|
+
* aₙ ≤ (8/3) q^{n+½} for n ≥ 1 the first term is at most
|
|
19
|
+
* W̄ = (16/3) q^{3/2}/(1 − q) ≈ θ0³/96, and Δφ = 2π(t/T0) ε/(1+ε) is the
|
|
20
|
+
* exact phase lead of `phase-translation.ts`. So
|
|
21
|
+
*
|
|
22
|
+
* B(t) = W̄ + 2θ0 sin(min(Δφ(t), π)/2)
|
|
23
|
+
*
|
|
24
|
+
* bounds the error at every t; the clamp at π keeps B non-decreasing in t and
|
|
25
|
+
* is still a bound, since |cos a − cos b| ≤ 2. It is rigorous GIVEN the
|
|
26
|
+
* Fourier series, which is quoted, not derived here. Witness W7xs checks the
|
|
27
|
+
* series against RK4 over one period at each θ0 of a grid across the domain;
|
|
28
|
+
* that is a check at those points, not a derivation.
|
|
29
|
+
*
|
|
30
|
+
* B is an upper bound, not the error: past its horizon the BOUND exceeds the
|
|
31
|
+
* tolerance, and the error may not. It is near-sharp where Δφ → π (the
|
|
32
|
+
* motions are in antiphase and the error reaches 2θ0), and the waveform term
|
|
33
|
+
* cannot be dropped: without W̄, RK4 finds the error above 2θ0 sin(Δφ/2) by
|
|
34
|
+
* about 3% (witness control).
|
|
35
|
+
*
|
|
36
|
+
* @module atlas/oscillators/position-translation
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
import type { ObservableTranslation } from '../translation.js';
|
|
40
|
+
import type { NumericWitnessSpec } from '../witness-numeric.js';
|
|
41
|
+
/** W̄ = (16/3) q^{3/2}/(1 − q): the bound on the waveform distortion |F(φ) − θ0 cos φ|. @internal */
|
|
42
|
+
export declare function waveformBound(theta0: number): number;
|
|
43
|
+
/** The pendulum's fundamental Fourier coefficient a₀ = 8√q/(1 + q). @internal */
|
|
44
|
+
export declare function fundamentalCoefficient(theta0: number): number;
|
|
45
|
+
/** The point witness integrates at most this many periods of T0. */
|
|
46
|
+
export declare const POSITION_POINT_MAX_PERIODS = 512;
|
|
47
|
+
/** a₀ measured by projecting one RK4 pendulum period onto cos φ (trapezoid, exact for a periodic integrand). */
|
|
48
|
+
export declare function measureFundamental(theta0: number, stepsPerPeriod: number): number;
|
|
49
|
+
/** The θ0 at which W7xs checks the Fourier series: a grid across the bridge's domain θ0 ≤ 0.5. @internal */
|
|
50
|
+
export declare const FOURIER_SERIES_THETA0S: readonly number[];
|
|
51
|
+
/**
|
|
52
|
+
* W7xs, or its control: the Fourier series against RK4 of the pendulum, at 200
|
|
53
|
+
* and 800 steps per period, within 1e-9 rad at every step and every grid θ0.
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
export declare function fourierSeriesCheck(id: string, variant?: 'plus' | 'minus'): NumericWitnessSpec;
|
|
57
|
+
/** @internal */
|
|
58
|
+
export declare const PENDULUM_POSITION_TRANSLATION: ObservableTranslation;
|
|
59
|
+
//# sourceMappingURL=position-translation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-translation.d.ts","sourceRoot":"","sources":["../../../src/atlas/oscillators/position-translation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAMhE,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG7D;AAsBD,oEAAoE;AACpE,eAAO,MAAM,0BAA0B,MAAM,CAAC;AA8C9C,gHAAgH;AAChH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAWjF;AAED,4GAA4G;AAC5G,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAoC,CAAC;AAmCzF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,GAAG,OAAgB,GAAG,kBAAkB,CASrG;AA6BD,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,qBAqD3C,CAAC"}
|