universal-physics-tensor 9.0.0 → 11.0.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/README.md +21 -17
- package/bin/upt.mjs +13 -1
- package/data/atlas/atlas.json +79 -68
- package/data/atlas/atlas.jsonld +1 -1
- package/data/atlas/diffusion.json +24 -23
- package/data/atlas/oscillators.json +21 -16
- package/data/atlas/waves.json +36 -31
- package/data/atlas/witness-results.json +11 -11
- package/data/bridge-catalog.json +1192 -1636
- package/data/bridge-catalog.schema.json +390 -135
- package/data/quantities.json +53 -19
- package/data/schemas/atlas-record.v0.json +184 -46
- package/data/units.json +33 -4
- package/dist/atlas/applicability.d.ts.map +1 -1
- package/dist/atlas/applicability.js +35 -18
- package/dist/atlas/applicability.js.map +1 -1
- package/dist/atlas/association.js.map +1 -1
- package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
- package/dist/atlas/benchmark/backend-shapes.js +5 -1
- package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
- package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
- package/dist/atlas/benchmark/baselines.js +8 -0
- package/dist/atlas/benchmark/baselines.js.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts +12 -3
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.js +30 -21
- package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
- package/dist/atlas/benchmark/leakage.js.map +1 -1
- package/dist/atlas/benchmark/loader.js +2 -2
- package/dist/atlas/benchmark/loader.js.map +1 -1
- package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
- package/dist/atlas/benchmark/run-atlas.js +14 -2
- package/dist/atlas/benchmark/run-atlas.js.map +1 -1
- package/dist/atlas/benchmark/stats.d.ts +3 -3
- package/dist/atlas/benchmark/stats.d.ts.map +1 -1
- package/dist/atlas/benchmark/stats.js +16 -8
- package/dist/atlas/benchmark/stats.js.map +1 -1
- package/dist/atlas/benchmark/study.js.map +1 -1
- package/dist/atlas/benchmark/types.js.map +1 -1
- package/dist/atlas/bridge-record.d.ts +4 -4
- package/dist/atlas/bridge-record.d.ts.map +1 -1
- package/dist/atlas/bridge-record.js +6 -6
- package/dist/atlas/bridge-record.js.map +1 -1
- package/dist/atlas/catalog-formal-ref.d.ts +26 -3
- package/dist/atlas/catalog-formal-ref.d.ts.map +1 -1
- package/dist/atlas/catalog-formal-ref.js +52 -5
- package/dist/atlas/catalog-formal-ref.js.map +1 -1
- package/dist/atlas/chain-pipeline.d.ts +0 -11
- package/dist/atlas/chain-pipeline.d.ts.map +1 -1
- package/dist/atlas/chain-pipeline.js +12 -24
- package/dist/atlas/chain-pipeline.js.map +1 -1
- package/dist/atlas/composition-table.js.map +1 -1
- package/dist/atlas/conventions.js.map +1 -1
- package/dist/atlas/coverage.d.ts +2 -2
- package/dist/atlas/coverage.js.map +1 -1
- package/dist/atlas/derivation.js.map +1 -1
- package/dist/atlas/derive-evidence.d.ts +6 -4
- package/dist/atlas/derive-evidence.d.ts.map +1 -1
- package/dist/atlas/derive-evidence.js +7 -2
- package/dist/atlas/derive-evidence.js.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.js +8 -17
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
- package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges.js +27 -42
- package/dist/atlas/diffusion/bridges.js.map +1 -1
- package/dist/atlas/diffusion/dimensions.d.ts +6 -14
- package/dist/atlas/diffusion/dimensions.d.ts.map +1 -1
- package/dist/atlas/diffusion/dimensions.js +8 -16
- package/dist/atlas/diffusion/dimensions.js.map +1 -1
- package/dist/atlas/diffusion/index.d.ts +1 -1
- package/dist/atlas/diffusion/index.d.ts.map +1 -1
- package/dist/atlas/diffusion/index.js.map +1 -1
- package/dist/atlas/diffusion/models.d.ts +3 -3
- package/dist/atlas/diffusion/models.d.ts.map +1 -1
- package/dist/atlas/diffusion/models.js +5 -10
- package/dist/atlas/diffusion/models.js.map +1 -1
- package/dist/atlas/diffusion/numerics.d.ts +16 -4
- package/dist/atlas/diffusion/numerics.d.ts.map +1 -1
- package/dist/atlas/diffusion/numerics.js +38 -24
- package/dist/atlas/diffusion/numerics.js.map +1 -1
- package/dist/atlas/error-algebra.d.ts +6 -0
- package/dist/atlas/error-algebra.d.ts.map +1 -1
- package/dist/atlas/error-algebra.js +26 -0
- package/dist/atlas/error-algebra.js.map +1 -1
- package/dist/atlas/export.d.ts +18 -2
- package/dist/atlas/export.d.ts.map +1 -1
- package/dist/atlas/export.js +9 -3
- package/dist/atlas/export.js.map +1 -1
- package/dist/atlas/families.d.ts +19 -2
- package/dist/atlas/families.d.ts.map +1 -1
- package/dist/atlas/families.js +26 -3
- package/dist/atlas/families.js.map +1 -1
- package/dist/atlas/family.d.ts +27 -0
- package/dist/atlas/family.d.ts.map +1 -0
- package/dist/atlas/family.js +12 -0
- package/dist/atlas/family.js.map +1 -0
- package/dist/atlas/index.d.ts +3 -2
- package/dist/atlas/index.d.ts.map +1 -1
- package/dist/atlas/index.js +2 -1
- package/dist/atlas/index.js.map +1 -1
- package/dist/atlas/link-prediction.d.ts +107 -4
- package/dist/atlas/link-prediction.d.ts.map +1 -1
- package/dist/atlas/link-prediction.js +212 -66
- package/dist/atlas/link-prediction.js.map +1 -1
- package/dist/atlas/model.js.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.js +7 -12
- package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.js +6 -10
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.d.ts +3 -16
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.js +23 -36
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
- package/dist/atlas/oscillators/dimensions.d.ts +9 -21
- package/dist/atlas/oscillators/dimensions.d.ts.map +1 -1
- package/dist/atlas/oscillators/dimensions.js +9 -21
- package/dist/atlas/oscillators/dimensions.js.map +1 -1
- package/dist/atlas/oscillators/index.d.ts +1 -16
- package/dist/atlas/oscillators/index.d.ts.map +1 -1
- package/dist/atlas/oscillators/index.js.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.d.ts +2 -2
- package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.js +17 -15
- package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
- package/dist/atlas/oscillators/models.d.ts.map +1 -1
- package/dist/atlas/oscillators/models.js +2 -6
- package/dist/atlas/oscillators/models.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport.js.map +1 -1
- package/dist/atlas/oscillators/norms.js.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.d.ts +29 -6
- package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.js +60 -40
- package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
- package/dist/atlas/oscillators/phase-carriage.js.map +1 -1
- package/dist/atlas/oscillators/phase-translation.d.ts +0 -11
- package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -1
- package/dist/atlas/oscillators/phase-translation.js +3 -4
- package/dist/atlas/oscillators/phase-translation.js.map +1 -1
- package/dist/atlas/oscillators/position-translation.d.ts +68 -7
- package/dist/atlas/oscillators/position-translation.d.ts.map +1 -1
- package/dist/atlas/oscillators/position-translation.js +123 -12
- package/dist/atlas/oscillators/position-translation.js.map +1 -1
- package/dist/atlas/oscillators/rejections.d.ts +0 -2
- package/dist/atlas/oscillators/rejections.d.ts.map +1 -1
- package/dist/atlas/oscillators/rejections.js +0 -7
- package/dist/atlas/oscillators/rejections.js.map +1 -1
- package/dist/atlas/path-bound.js.map +1 -1
- package/dist/atlas/physjs-entries.generated.d.ts +25 -24
- package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
- package/dist/atlas/physjs-entries.generated.js +25 -24
- package/dist/atlas/physjs-entries.generated.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +107 -70
- package/dist/atlas/physjs-ref.d.ts.map +1 -1
- package/dist/atlas/physjs-ref.js +184 -101
- package/dist/atlas/physjs-ref.js.map +1 -1
- package/dist/atlas/physjs-reviewed.d.ts +31 -0
- package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
- package/dist/atlas/physjs-reviewed.js +194 -0
- package/dist/atlas/physjs-reviewed.js.map +1 -0
- package/dist/atlas/poster/associations.js.map +1 -1
- package/dist/atlas/poster/derivations.js.map +1 -1
- package/dist/atlas/poster/statements.d.ts +0 -19
- package/dist/atlas/poster/statements.d.ts.map +1 -1
- package/dist/atlas/poster/statements.js +1 -1
- package/dist/atlas/poster/statements.js.map +1 -1
- package/dist/atlas/proof-target.d.ts +1 -1
- package/dist/atlas/proof-target.js +1 -1
- package/dist/atlas/proof-target.js.map +1 -1
- package/dist/atlas/public.d.ts +2 -1
- package/dist/atlas/public.d.ts.map +1 -1
- package/dist/atlas/public.js +2 -1
- package/dist/atlas/public.js.map +1 -1
- package/dist/atlas/regime.d.ts +1 -1
- package/dist/atlas/regime.d.ts.map +1 -1
- package/dist/atlas/regime.js +1 -1
- package/dist/atlas/regime.js.map +1 -1
- package/dist/atlas/serialize.d.ts +18 -12
- package/dist/atlas/serialize.d.ts.map +1 -1
- package/dist/atlas/serialize.js +28 -18
- package/dist/atlas/serialize.js.map +1 -1
- package/dist/atlas/statement.js.map +1 -1
- package/dist/atlas/text-overlap.d.ts +23 -0
- package/dist/atlas/text-overlap.d.ts.map +1 -0
- package/dist/atlas/text-overlap.js +41 -0
- package/dist/atlas/text-overlap.js.map +1 -0
- package/dist/atlas/translation-registry.js.map +1 -1
- package/dist/atlas/translation.js.map +1 -1
- package/dist/atlas/types.d.ts +9 -2
- package/dist/atlas/types.d.ts.map +1 -1
- package/dist/atlas/types.js +1 -1
- 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 +2 -9
- 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 +32 -52
- package/dist/atlas/waves/bridges.js.map +1 -1
- package/dist/atlas/waves/index.d.ts +1 -1
- package/dist/atlas/waves/index.d.ts.map +1 -1
- package/dist/atlas/waves/index.js.map +1 -1
- package/dist/atlas/waves/models.d.ts +5 -6
- package/dist/atlas/waves/models.d.ts.map +1 -1
- package/dist/atlas/waves/models.js +7 -13
- package/dist/atlas/waves/models.js.map +1 -1
- package/dist/atlas/waves/numerics.d.ts.map +1 -1
- package/dist/atlas/waves/numerics.js +10 -3
- package/dist/atlas/waves/numerics.js.map +1 -1
- package/dist/atlas/witness-artifact.js.map +1 -1
- package/dist/atlas/witness-dominance.d.ts +4 -3
- package/dist/atlas/witness-dominance.d.ts.map +1 -1
- package/dist/atlas/witness-dominance.js +15 -5
- package/dist/atlas/witness-dominance.js.map +1 -1
- package/dist/atlas/witness-numeric.d.ts +38 -4
- package/dist/atlas/witness-numeric.d.ts.map +1 -1
- package/dist/atlas/witness-numeric.js +80 -2
- package/dist/atlas/witness-numeric.js.map +1 -1
- package/dist/atlas/witness-result.d.ts +7 -1
- package/dist/atlas/witness-result.d.ts.map +1 -1
- package/dist/atlas/witness-result.js.map +1 -1
- package/dist/atlas/witness-specs.d.ts.map +1 -1
- package/dist/atlas/witness-specs.js +19 -0
- package/dist/atlas/witness-specs.js.map +1 -1
- package/dist/atlas/witness-symbolic.d.ts +75 -3
- package/dist/atlas/witness-symbolic.d.ts.map +1 -1
- package/dist/atlas/witness-symbolic.js +116 -10
- package/dist/atlas/witness-symbolic.js.map +1 -1
- package/dist/atlas/witnesses/quantum-support.js.map +1 -1
- package/dist/bridges/caller-table.d.ts +1 -1
- package/dist/bridges/caller-table.d.ts.map +1 -1
- package/dist/bridges/caller-table.js.map +1 -1
- package/dist/bridges/carrier-sign.d.ts.map +1 -1
- package/dist/bridges/carrier-sign.js +8 -3
- package/dist/bridges/carrier-sign.js.map +1 -1
- package/dist/bridges/catalog-adapter.d.ts +12 -3
- package/dist/bridges/catalog-adapter.d.ts.map +1 -1
- package/dist/bridges/catalog-adapter.js +17 -9
- package/dist/bridges/catalog-adapter.js.map +1 -1
- package/dist/bridges/catalog-load.d.ts +12 -2
- package/dist/bridges/catalog-load.d.ts.map +1 -1
- package/dist/bridges/catalog-load.js +181 -13
- package/dist/bridges/catalog-load.js.map +1 -1
- package/dist/bridges/catalog-types.d.ts +74 -26
- package/dist/bridges/catalog-types.d.ts.map +1 -1
- package/dist/bridges/catalog-types.js +11 -1
- package/dist/bridges/catalog-types.js.map +1 -1
- package/dist/bridges/coefficient-statement.js +1 -5
- package/dist/bridges/coefficient-statement.js.map +1 -1
- 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 +1 -1
- package/dist/bridges/confrontations.js.map +1 -1
- package/dist/bridges/evaluation-errors.d.ts +46 -3
- package/dist/bridges/evaluation-errors.d.ts.map +1 -1
- package/dist/bridges/evaluation-errors.js +40 -4
- package/dist/bridges/evaluation-errors.js.map +1 -1
- package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
- package/dist/bridges/evaluator-inputs.js +7 -5
- package/dist/bridges/evaluator-inputs.js.map +1 -1
- package/dist/bridges/evaluators.d.ts +17 -2
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +76 -28
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/expr-parse.d.ts +38 -4
- package/dist/bridges/expr-parse.d.ts.map +1 -1
- package/dist/bridges/expr-parse.js +101 -12
- package/dist/bridges/expr-parse.js.map +1 -1
- package/dist/bridges/holds.d.ts +40 -4
- package/dist/bridges/holds.d.ts.map +1 -1
- package/dist/bridges/holds.js +128 -19
- package/dist/bridges/holds.js.map +1 -1
- package/dist/bridges/index.d.ts +15 -14
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +14 -15
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/input-contract.js.map +1 -1
- package/dist/bridges/membership.d.ts +5 -3
- package/dist/bridges/membership.d.ts.map +1 -1
- package/dist/bridges/membership.js +5 -6
- package/dist/bridges/membership.js.map +1 -1
- package/dist/bridges/notices.d.ts.map +1 -1
- package/dist/bridges/notices.js +5 -5
- package/dist/bridges/notices.js.map +1 -1
- package/dist/bridges/observations/types.js.map +1 -1
- package/dist/bridges/rejected.d.ts +11 -17
- package/dist/bridges/rejected.d.ts.map +1 -1
- package/dist/bridges/rejected.js +13 -68
- package/dist/bridges/rejected.js.map +1 -1
- package/dist/bridges/relation-eval.d.ts +6 -7
- package/dist/bridges/relation-eval.d.ts.map +1 -1
- package/dist/bridges/relation-eval.js +20 -50
- package/dist/bridges/relation-eval.js.map +1 -1
- package/dist/bridges/rhs-registry.js.map +1 -1
- package/dist/bridges/sensitivity.d.ts +11 -3
- package/dist/bridges/sensitivity.d.ts.map +1 -1
- package/dist/bridges/sensitivity.js +27 -13
- package/dist/bridges/sensitivity.js.map +1 -1
- package/dist/bridges/tensor-index.js.map +1 -1
- package/dist/bridges/types.d.ts +1 -7
- package/dist/bridges/types.d.ts.map +1 -1
- package/dist/bridges/types.js +1 -4
- package/dist/bridges/types.js.map +1 -1
- package/dist/bridges/validity.d.ts +33 -0
- package/dist/bridges/validity.d.ts.map +1 -0
- package/dist/bridges/validity.js +67 -0
- package/dist/bridges/validity.js.map +1 -0
- package/dist/canonical/canonical-equation.js.map +1 -1
- package/dist/canonical/dimensional-fields.js.map +1 -1
- package/dist/canonical/entries/_l1-build.js.map +1 -1
- package/dist/canonical/entries/atomic.js +1 -3
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
- package/dist/canonical/entries/condensed-matter.js +8 -9
- package/dist/canonical/entries/condensed-matter.js.map +1 -1
- package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
- package/dist/canonical/entries/dimensional-classics.js +5 -6
- package/dist/canonical/entries/dimensional-classics.js.map +1 -1
- package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
- package/dist/canonical/entries/electromagnetism.js +6 -12
- package/dist/canonical/entries/electromagnetism.js.map +1 -1
- package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
- package/dist/canonical/entries/fluids-waves.js +3 -7
- package/dist/canonical/entries/fluids-waves.js.map +1 -1
- package/dist/canonical/entries/mechanics.d.ts.map +1 -1
- package/dist/canonical/entries/mechanics.js +4 -6
- package/dist/canonical/entries/mechanics.js.map +1 -1
- package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
- package/dist/canonical/entries/nonmonomial.js +38 -39
- package/dist/canonical/entries/nonmonomial.js.map +1 -1
- package/dist/canonical/entries/relativity.d.ts.map +1 -1
- package/dist/canonical/entries/relativity.js +6 -6
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/statistical-mechanics.js +5 -5
- package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +6 -10
- package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
- package/dist/canonical/fixed-points.d.ts +94 -0
- package/dist/canonical/fixed-points.d.ts.map +1 -0
- package/dist/canonical/fixed-points.js +81 -0
- package/dist/canonical/fixed-points.js.map +1 -0
- package/dist/canonical/linkage.d.ts +29 -4
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +47 -64
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/normal-form.d.ts +0 -8
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +22 -23
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/registry.js.map +1 -1
- package/dist/canonical/residual.js.map +1 -1
- package/dist/canonical/seed-l-layer.d.ts +7 -1
- package/dist/canonical/seed-l-layer.d.ts.map +1 -1
- package/dist/canonical/seed-l-layer.js +7 -1
- package/dist/canonical/seed-l-layer.js.map +1 -1
- package/dist/canonical/structural.d.ts +42 -21
- package/dist/canonical/structural.d.ts.map +1 -1
- package/dist/canonical/structural.js +64 -23
- package/dist/canonical/structural.js.map +1 -1
- package/dist/cases/brownian-sphere.d.ts +3 -3
- package/dist/cases/brownian-sphere.d.ts.map +1 -1
- package/dist/cases/brownian-sphere.js +10 -9
- package/dist/cases/brownian-sphere.js.map +1 -1
- package/dist/cases/damped-resonator.d.ts.map +1 -1
- package/dist/cases/damped-resonator.js +8 -11
- package/dist/cases/damped-resonator.js.map +1 -1
- package/dist/cases/index.js.map +1 -1
- package/dist/cases/kepler-rv.d.ts +1 -1
- package/dist/cases/kepler-rv.d.ts.map +1 -1
- package/dist/cases/kepler-rv.js +3 -2
- package/dist/cases/kepler-rv.js.map +1 -1
- package/dist/cases/lumped-cooling.d.ts +8 -3
- package/dist/cases/lumped-cooling.d.ts.map +1 -1
- package/dist/cases/lumped-cooling.js +22 -24
- package/dist/cases/lumped-cooling.js.map +1 -1
- package/dist/cases/quadrature.d.ts +7 -9
- package/dist/cases/quadrature.d.ts.map +1 -1
- package/dist/cases/quadrature.js +28 -32
- package/dist/cases/quadrature.js.map +1 -1
- package/dist/cases/resistor-noise.js +7 -7
- package/dist/cases/resistor-noise.js.map +1 -1
- package/dist/cases/skin-depth.d.ts +0 -4
- package/dist/cases/skin-depth.d.ts.map +1 -1
- package/dist/cases/skin-depth.js +3 -7
- package/dist/cases/skin-depth.js.map +1 -1
- package/dist/cases/types.js.map +1 -1
- package/dist/cli/args.d.ts +30 -3
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +47 -9
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/bindings.d.ts +13 -0
- package/dist/cli/bindings.d.ts.map +1 -0
- package/dist/cli/bindings.js +33 -0
- package/dist/cli/bindings.js.map +1 -0
- package/dist/cli/closed-form-range.js.map +1 -1
- package/dist/cli/command.d.ts +8 -1
- package/dist/cli/command.d.ts.map +1 -1
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/_atlas-map.d.ts +2 -11
- package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-map.js +50 -35
- package/dist/cli/commands/_atlas-map.js.map +1 -1
- package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-route.js +6 -2
- package/dist/cli/commands/_atlas-route.js.map +1 -1
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +48 -14
- package/dist/cli/commands/_discovery-opts.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts.map +1 -1
- package/dist/cli/commands/atlas.js +9 -8
- 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 +20 -20
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/axes.d.ts.map +1 -1
- package/dist/cli/commands/axes.js +20 -1
- package/dist/cli/commands/axes.js.map +1 -1
- package/dist/cli/commands/candidates.d.ts.map +1 -1
- package/dist/cli/commands/candidates.js +16 -8
- package/dist/cli/commands/candidates.js.map +1 -1
- package/dist/cli/commands/canonical.js.map +1 -1
- package/dist/cli/commands/chain.js +1 -1
- package/dist/cli/commands/chain.js.map +1 -1
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +22 -20
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/connectors.js.map +1 -1
- package/dist/cli/commands/coverage.js.map +1 -1
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +60 -35
- 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 +20 -10
- 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 +14 -10
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +108 -58
- 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 +16 -8
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/frontier.js.map +1 -1
- package/dist/cli/commands/ground.d.ts.map +1 -1
- package/dist/cli/commands/ground.js +41 -10
- package/dist/cli/commands/ground.js.map +1 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +155 -92
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/metric.d.ts.map +1 -1
- package/dist/cli/commands/metric.js +58 -20
- package/dist/cli/commands/metric.js.map +1 -1
- package/dist/cli/commands/path.d.ts +10 -0
- package/dist/cli/commands/path.d.ts.map +1 -1
- package/dist/cli/commands/path.js +29 -7
- package/dist/cli/commands/path.js.map +1 -1
- package/dist/cli/commands/predict.js.map +1 -1
- package/dist/cli/commands/priority.js.map +1 -1
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +105 -38
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/recover.js +1 -1
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +5 -4
- package/dist/cli/commands/regime.d.ts.map +1 -1
- package/dist/cli/commands/regime.js +25 -26
- package/dist/cli/commands/regime.js.map +1 -1
- package/dist/cli/commands/retrieve.d.ts.map +1 -1
- package/dist/cli/commands/retrieve.js +23 -14
- package/dist/cli/commands/retrieve.js.map +1 -1
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/search.js +9 -4
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/symbolic.js +31 -36
- package/dist/cli/commands/symbolic.js.map +1 -1
- package/dist/cli/commands/testplan.d.ts.map +1 -1
- package/dist/cli/commands/testplan.js +5 -3
- package/dist/cli/commands/testplan.js.map +1 -1
- package/dist/cli/conventions.js.map +1 -1
- package/dist/cli/determination.js.map +1 -1
- package/dist/cli/errors.js.map +1 -1
- package/dist/cli/euler-guard.js.map +1 -1
- package/dist/cli/eval-numbers.js.map +1 -1
- package/dist/cli/expr-print.d.ts +28 -3
- package/dist/cli/expr-print.d.ts.map +1 -1
- package/dist/cli/expr-print.js +42 -22
- package/dist/cli/expr-print.js.map +1 -1
- package/dist/cli/flag-help.js.map +1 -1
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/library-defaults.d.ts +19 -0
- package/dist/cli/library-defaults.d.ts.map +1 -0
- package/dist/cli/library-defaults.js +22 -0
- package/dist/cli/library-defaults.js.map +1 -0
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +25 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/map-evidence.js.map +1 -1
- package/dist/cli/numeric-flag.d.ts +12 -0
- package/dist/cli/numeric-flag.d.ts.map +1 -0
- package/dist/cli/numeric-flag.js +44 -0
- package/dist/cli/numeric-flag.js.map +1 -0
- package/dist/cli/output.d.ts +23 -6
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +15 -0
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/published-url.js.map +1 -1
- package/dist/cli/record-reach.d.ts +6 -0
- package/dist/cli/record-reach.d.ts.map +1 -1
- package/dist/cli/record-reach.js +17 -11
- package/dist/cli/record-reach.js.map +1 -1
- package/dist/cli/record-tables.d.ts.map +1 -1
- package/dist/cli/record-tables.js +7 -6
- package/dist/cli/record-tables.js.map +1 -1
- package/dist/cli/record.d.ts +1 -5
- package/dist/cli/record.d.ts.map +1 -1
- package/dist/cli/record.js +40 -20
- package/dist/cli/record.js.map +1 -1
- package/dist/cli/search-index.d.ts +5 -0
- package/dist/cli/search-index.d.ts.map +1 -1
- package/dist/cli/search-index.js +19 -7
- package/dist/cli/search-index.js.map +1 -1
- package/dist/cli/statuses.d.ts +0 -2
- package/dist/cli/statuses.d.ts.map +1 -1
- package/dist/cli/statuses.js +0 -7
- package/dist/cli/statuses.js.map +1 -1
- package/dist/cli/stored-results.d.ts +7 -0
- package/dist/cli/stored-results.d.ts.map +1 -0
- package/dist/cli/stored-results.js +23 -0
- package/dist/cli/stored-results.js.map +1 -0
- package/dist/cli/top-level-help.js.map +1 -1
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +7 -5
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +49 -14
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +42 -17
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/adjudication.js.map +1 -1
- package/dist/composition/algebraic-equivalence.d.ts +43 -0
- package/dist/composition/algebraic-equivalence.d.ts.map +1 -0
- package/dist/composition/algebraic-equivalence.js +115 -0
- package/dist/composition/algebraic-equivalence.js.map +1 -0
- package/dist/composition/aliases.js.map +1 -1
- package/dist/composition/audit-coverage.d.ts +2 -0
- package/dist/composition/audit-coverage.d.ts.map +1 -1
- package/dist/composition/audit-coverage.js.map +1 -1
- package/dist/composition/axes.d.ts +6 -0
- package/dist/composition/axes.d.ts.map +1 -1
- package/dist/composition/axes.js +18 -6
- package/dist/composition/axes.js.map +1 -1
- package/dist/composition/axis-audit.d.ts +47 -20
- package/dist/composition/axis-audit.d.ts.map +1 -1
- package/dist/composition/axis-audit.js +82 -9
- package/dist/composition/axis-audit.js.map +1 -1
- package/dist/composition/bridge-analysis.d.ts +14 -15
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +148 -91
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/bridge-prediction.d.ts +5 -1
- package/dist/composition/bridge-prediction.d.ts.map +1 -1
- package/dist/composition/bridge-prediction.js +12 -16
- package/dist/composition/bridge-prediction.js.map +1 -1
- package/dist/composition/buckingham-filter.js.map +1 -1
- package/dist/composition/canonical-compare.d.ts +40 -0
- package/dist/composition/canonical-compare.d.ts.map +1 -1
- package/dist/composition/canonical-compare.js +134 -26
- package/dist/composition/canonical-compare.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +9 -10
- package/dist/composition/canonical-graph.d.ts.map +1 -1
- package/dist/composition/canonical-graph.js +33 -102
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-json.js +2 -2
- package/dist/composition/canonical-json.js.map +1 -1
- package/dist/composition/canonical-prefactors.js.map +1 -1
- package/dist/composition/catalog-graph.d.ts.map +1 -1
- package/dist/composition/catalog-graph.js +8 -25
- package/dist/composition/catalog-graph.js.map +1 -1
- package/dist/composition/chain-candidate.d.ts +10 -0
- package/dist/composition/chain-candidate.d.ts.map +1 -1
- package/dist/composition/chain-candidate.js +11 -2
- package/dist/composition/chain-candidate.js.map +1 -1
- package/dist/composition/chain-match.d.ts +6 -3
- package/dist/composition/chain-match.d.ts.map +1 -1
- package/dist/composition/chain-match.js +4 -1
- package/dist/composition/chain-match.js.map +1 -1
- package/dist/composition/chain-regime.js.map +1 -1
- package/dist/composition/chain-result.d.ts.map +1 -1
- package/dist/composition/chain-result.js +2 -14
- package/dist/composition/chain-result.js.map +1 -1
- package/dist/composition/compose-surface.js.map +1 -1
- package/dist/composition/compose-symbolic.d.ts.map +1 -1
- package/dist/composition/compose-symbolic.js +3 -2
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +166 -41
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/composition-recovery.d.ts.map +1 -1
- package/dist/composition/composition-recovery.js +4 -7
- package/dist/composition/composition-recovery.js.map +1 -1
- package/dist/composition/consequence.d.ts.map +1 -1
- package/dist/composition/consequence.js +15 -6
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/consistency.js.map +1 -1
- package/dist/composition/descriptor.d.ts +1 -1
- package/dist/composition/descriptor.d.ts.map +1 -1
- package/dist/composition/descriptor.js.map +1 -1
- package/dist/composition/dimension-adjacency.js.map +1 -1
- package/dist/composition/discovery.d.ts +77 -11
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +194 -80
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +40 -10
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +47 -12
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/enumerate.d.ts +2 -2
- package/dist/composition/enumerate.d.ts.map +1 -1
- package/dist/composition/enumerate.js +18 -3
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/evaluate-relation.d.ts +35 -11
- package/dist/composition/evaluate-relation.d.ts.map +1 -1
- package/dist/composition/evaluate-relation.js +60 -39
- package/dist/composition/evaluate-relation.js.map +1 -1
- package/dist/composition/explain.d.ts +5 -9
- package/dist/composition/explain.d.ts.map +1 -1
- package/dist/composition/explain.js +38 -18
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js +2 -11
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts +16 -0
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +24 -59
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.js.map +1 -1
- package/dist/composition/formula-shape.d.ts +28 -0
- package/dist/composition/formula-shape.d.ts.map +1 -1
- package/dist/composition/formula-shape.js +96 -2
- package/dist/composition/formula-shape.js.map +1 -1
- package/dist/composition/frontier-account.d.ts +3 -2
- package/dist/composition/frontier-account.d.ts.map +1 -1
- package/dist/composition/frontier-account.js +7 -3
- package/dist/composition/frontier-account.js.map +1 -1
- package/dist/composition/graph-structure.d.ts +98 -0
- package/dist/composition/graph-structure.d.ts.map +1 -0
- package/dist/composition/graph-structure.js +167 -0
- package/dist/composition/graph-structure.js.map +1 -0
- package/dist/composition/graph-viz-svg.d.ts.map +1 -1
- package/dist/composition/graph-viz-svg.js +1 -1
- package/dist/composition/graph-viz-svg.js.map +1 -1
- package/dist/composition/graph-viz.d.ts.map +1 -1
- package/dist/composition/graph-viz.js +8 -37
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/grounding.js.map +1 -1
- package/dist/composition/identifiability.d.ts +91 -4
- package/dist/composition/identifiability.d.ts.map +1 -1
- package/dist/composition/identifiability.js +363 -6
- package/dist/composition/identifiability.js.map +1 -1
- package/dist/composition/index.d.ts +14 -8
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +7 -5
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/mathts-quiet.d.ts +29 -0
- package/dist/composition/mathts-quiet.d.ts.map +1 -0
- package/dist/composition/mathts-quiet.js +57 -0
- package/dist/composition/mathts-quiet.js.map +1 -0
- package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
- package/dist/composition/mathts-scalar-symbols.js +20 -35
- package/dist/composition/mathts-scalar-symbols.js.map +1 -1
- package/dist/composition/not-composable-seeds.d.ts +3 -1
- package/dist/composition/not-composable-seeds.d.ts.map +1 -1
- package/dist/composition/not-composable-seeds.js +2 -0
- package/dist/composition/not-composable-seeds.js.map +1 -1
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.js.map +1 -1
- package/dist/composition/probe/corpus.d.ts +4 -2
- package/dist/composition/probe/corpus.d.ts.map +1 -1
- package/dist/composition/probe/corpus.js +20 -9
- package/dist/composition/probe/corpus.js.map +1 -1
- package/dist/composition/probe/dataset.d.ts +17 -0
- package/dist/composition/probe/dataset.d.ts.map +1 -1
- package/dist/composition/probe/dataset.js +95 -50
- package/dist/composition/probe/dataset.js.map +1 -1
- package/dist/composition/probe/experiment-design.d.ts +5 -1
- package/dist/composition/probe/experiment-design.d.ts.map +1 -1
- package/dist/composition/probe/experiment-design.js +44 -24
- package/dist/composition/probe/experiment-design.js.map +1 -1
- package/dist/composition/probe/expression-gaps.js.map +1 -1
- package/dist/composition/probe/falsify.d.ts +14 -3
- package/dist/composition/probe/falsify.d.ts.map +1 -1
- package/dist/composition/probe/falsify.js +16 -27
- package/dist/composition/probe/falsify.js.map +1 -1
- package/dist/composition/probe/fingerprint.js.map +1 -1
- package/dist/composition/probe/fit.d.ts +7 -1
- package/dist/composition/probe/fit.d.ts.map +1 -1
- package/dist/composition/probe/fit.js +48 -23
- package/dist/composition/probe/fit.js.map +1 -1
- package/dist/composition/probe/frontier.d.ts.map +1 -1
- package/dist/composition/probe/frontier.js +33 -15
- package/dist/composition/probe/frontier.js.map +1 -1
- package/dist/composition/probe/generator.d.ts +27 -1
- package/dist/composition/probe/generator.d.ts.map +1 -1
- package/dist/composition/probe/generator.js +53 -30
- package/dist/composition/probe/generator.js.map +1 -1
- package/dist/composition/probe/index.d.ts +18 -2
- package/dist/composition/probe/index.d.ts.map +1 -1
- package/dist/composition/probe/index.js +10 -2
- package/dist/composition/probe/index.js.map +1 -1
- package/dist/composition/probe/limits.d.ts +24 -1
- package/dist/composition/probe/limits.d.ts.map +1 -1
- package/dist/composition/probe/limits.js +53 -11
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/metadata.js.map +1 -1
- package/dist/composition/probe/pipeline.d.ts +5 -0
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +22 -9
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/power-law.d.ts +121 -0
- package/dist/composition/probe/power-law.d.ts.map +1 -0
- package/dist/composition/probe/power-law.js +255 -0
- package/dist/composition/probe/power-law.js.map +1 -0
- package/dist/composition/probe/problem.d.ts +12 -1
- package/dist/composition/probe/problem.d.ts.map +1 -1
- package/dist/composition/probe/problem.js +242 -48
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/report.js +1 -1
- package/dist/composition/probe/report.js.map +1 -1
- package/dist/composition/probe/residual.d.ts +6 -1
- package/dist/composition/probe/residual.d.ts.map +1 -1
- package/dist/composition/probe/residual.js +9 -7
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/run-manifest.js +2 -2
- package/dist/composition/probe/run-manifest.js.map +1 -1
- package/dist/composition/probe/scoring.d.ts +2 -1
- package/dist/composition/probe/scoring.d.ts.map +1 -1
- package/dist/composition/probe/scoring.js +21 -7
- package/dist/composition/probe/scoring.js.map +1 -1
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/probe/serialize.js.map +1 -1
- package/dist/composition/probe/structure.d.ts +82 -17
- package/dist/composition/probe/structure.d.ts.map +1 -1
- package/dist/composition/probe/structure.js +129 -55
- package/dist/composition/probe/structure.js.map +1 -1
- package/dist/composition/probe/study.d.ts +35 -12
- package/dist/composition/probe/study.d.ts.map +1 -1
- package/dist/composition/probe/study.js +241 -184
- package/dist/composition/probe/study.js.map +1 -1
- package/dist/composition/probe/t-tail.d.ts +17 -0
- package/dist/composition/probe/t-tail.d.ts.map +1 -0
- package/dist/composition/probe/t-tail.js +32 -0
- package/dist/composition/probe/t-tail.js.map +1 -0
- package/dist/composition/probe/types.d.ts +6 -1
- package/dist/composition/probe/types.d.ts.map +1 -1
- package/dist/composition/probe/types.js +2 -0
- package/dist/composition/probe/types.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +51 -13
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +110 -58
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantities.d.ts +0 -4
- package/dist/composition/quantities.d.ts.map +1 -1
- package/dist/composition/quantities.js +5 -5
- package/dist/composition/quantities.js.map +1 -1
- package/dist/composition/quantity-clusters.d.ts +48 -0
- package/dist/composition/quantity-clusters.d.ts.map +1 -0
- package/dist/composition/quantity-clusters.js +98 -0
- package/dist/composition/quantity-clusters.js.map +1 -0
- package/dist/composition/quantity.d.ts +18 -2
- package/dist/composition/quantity.d.ts.map +1 -1
- package/dist/composition/quantity.js +35 -6
- package/dist/composition/quantity.js.map +1 -1
- package/dist/composition/rational-exponent.d.ts +40 -0
- package/dist/composition/rational-exponent.d.ts.map +1 -0
- package/dist/composition/rational-exponent.js +65 -0
- package/dist/composition/rational-exponent.js.map +1 -0
- package/dist/composition/representative-values.d.ts +22 -0
- package/dist/composition/representative-values.d.ts.map +1 -1
- package/dist/composition/representative-values.js +23 -0
- package/dist/composition/representative-values.js.map +1 -1
- package/dist/composition/retrodiction.d.ts +16 -6
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +36 -10
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.js.map +1 -1
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +2 -2
- package/dist/composition/user-equation.js.map +1 -1
- package/dist/core/assignment.d.ts +19 -0
- package/dist/core/assignment.d.ts.map +1 -0
- package/dist/core/assignment.js +19 -0
- package/dist/core/assignment.js.map +1 -0
- package/dist/core/axes-registry.d.ts +8 -5
- package/dist/core/axes-registry.d.ts.map +1 -1
- package/dist/core/axes-registry.js.map +1 -1
- package/dist/core/cell.js.map +1 -1
- package/dist/core/compare.d.ts +32 -0
- package/dist/core/compare.d.ts.map +1 -0
- package/dist/core/compare.js +46 -0
- package/dist/core/compare.js.map +1 -0
- package/dist/core/constants.d.ts +35 -35
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +52 -37
- package/dist/core/constants.js.map +1 -1
- package/dist/core/data-file.d.ts +7 -0
- package/dist/core/data-file.d.ts.map +1 -1
- package/dist/core/data-file.js +17 -0
- package/dist/core/data-file.js.map +1 -1
- package/dist/core/flux-rules.js +1 -1
- package/dist/core/flux-rules.js.map +1 -1
- package/dist/core/format.d.ts +36 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/format.js +39 -0
- package/dist/core/format.js.map +1 -0
- package/dist/core/hash.d.ts +14 -0
- package/dist/core/hash.d.ts.map +1 -0
- package/dist/core/hash.js +17 -0
- package/dist/core/hash.js.map +1 -0
- package/dist/core/json-schema.d.ts +3 -1
- package/dist/core/json-schema.d.ts.map +1 -1
- package/dist/core/json-schema.js +41 -16
- package/dist/core/json-schema.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts +6 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/labeled-tensor.js +18 -16
- package/dist/core/labeled-tensor.js.map +1 -1
- package/dist/core/mathts-read.d.ts +25 -0
- package/dist/core/mathts-read.d.ts.map +1 -0
- package/dist/core/mathts-read.js +51 -0
- package/dist/core/mathts-read.js.map +1 -0
- package/dist/core/regime-registry.d.ts +6 -2
- package/dist/core/regime-registry.d.ts.map +1 -1
- package/dist/core/regime-registry.js.map +1 -1
- package/dist/core/regime-rule-install.js.map +1 -1
- package/dist/core/regimes-builtins.js.map +1 -1
- package/dist/core/tensor.d.ts +7 -4
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +64 -8
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts +5 -5
- package/dist/core/types.js.map +1 -1
- package/dist/core/universal-index.js.map +1 -1
- package/dist/diff/bridge-ast-gradient.d.ts +4 -5
- package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js +10 -6
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/diff/bridge-gradient.d.ts +43 -86
- package/dist/diff/bridge-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-gradient.js +40 -109
- package/dist/diff/bridge-gradient.js.map +1 -1
- package/dist/diff/bridge-specs.d.ts +16 -5
- package/dist/diff/bridge-specs.d.ts.map +1 -1
- package/dist/diff/bridge-specs.js +19 -4
- package/dist/diff/bridge-specs.js.map +1 -1
- package/dist/dimensional/algebra.d.ts +18 -0
- package/dist/dimensional/algebra.d.ts.map +1 -1
- package/dist/dimensional/algebra.js +41 -1
- package/dist/dimensional/algebra.js.map +1 -1
- package/dist/dimensional/ast-builders.d.ts +12 -4
- package/dist/dimensional/ast-builders.d.ts.map +1 -1
- package/dist/dimensional/ast-builders.js +17 -5
- package/dist/dimensional/ast-builders.js.map +1 -1
- package/dist/dimensional/ast-leaves.d.ts +81 -0
- package/dist/dimensional/ast-leaves.d.ts.map +1 -0
- package/dist/dimensional/ast-leaves.js +146 -0
- package/dist/dimensional/ast-leaves.js.map +1 -0
- package/dist/dimensional/ast-types.js.map +1 -1
- package/dist/dimensional/bridge-check.js.map +1 -1
- package/dist/dimensional/buckingham.d.ts.map +1 -1
- package/dist/dimensional/buckingham.js +15 -27
- package/dist/dimensional/buckingham.js.map +1 -1
- package/dist/dimensional/connection-validators.d.ts +2 -1
- package/dist/dimensional/connection-validators.d.ts.map +1 -1
- package/dist/dimensional/connection-validators.js.map +1 -1
- package/dist/dimensional/connection.js.map +1 -1
- package/dist/dimensional/constant-rows.d.ts.map +1 -1
- package/dist/dimensional/constant-rows.js +17 -13
- package/dist/dimensional/constant-rows.js.map +1 -1
- package/dist/dimensional/constants.d.ts +5 -6
- package/dist/dimensional/constants.d.ts.map +1 -1
- package/dist/dimensional/constants.js +5 -6
- package/dist/dimensional/constants.js.map +1 -1
- package/dist/dimensional/curvature-composite.js.map +1 -1
- package/dist/dimensional/curvature-invariants.js.map +1 -1
- package/dist/dimensional/curvature.js.map +1 -1
- package/dist/dimensional/dimension-inference.d.ts.map +1 -1
- package/dist/dimensional/dimension-inference.js +1 -2
- package/dist/dimensional/dimension-inference.js.map +1 -1
- package/dist/dimensional/dimension-spec.d.ts +13 -7
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/dimension-spec.js +49 -23
- package/dist/dimensional/dimension-spec.js.map +1 -1
- package/dist/dimensional/einstein-equation.js.map +1 -1
- package/dist/dimensional/errors.d.ts +4 -2
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/errors.js +3 -17
- package/dist/dimensional/errors.js.map +1 -1
- package/dist/dimensional/exact-scale.d.ts +0 -17
- package/dist/dimensional/exact-scale.d.ts.map +1 -1
- package/dist/dimensional/exact-scale.js +8 -8
- package/dist/dimensional/exact-scale.js.map +1 -1
- package/dist/dimensional/field-equation-helpers.js.map +1 -1
- package/dist/dimensional/formula-names.js.map +1 -1
- package/dist/dimensional/fresh-label.js.map +1 -1
- package/dist/dimensional/friedmann-equation.d.ts +3 -3
- package/dist/dimensional/friedmann-equation.js +3 -3
- package/dist/dimensional/friedmann-equation.js.map +1 -1
- package/dist/dimensional/gauge-field.d.ts +2 -3
- package/dist/dimensional/gauge-field.d.ts.map +1 -1
- package/dist/dimensional/gauge-field.js +2 -3
- package/dist/dimensional/gauge-field.js.map +1 -1
- package/dist/dimensional/hyphen-names.d.ts +12 -2
- package/dist/dimensional/hyphen-names.d.ts.map +1 -1
- package/dist/dimensional/hyphen-names.js +45 -12
- package/dist/dimensional/hyphen-names.js.map +1 -1
- package/dist/dimensional/killing-validators.js.map +1 -1
- package/dist/dimensional/klein-gordon-equation.js.map +1 -1
- package/dist/dimensional/metric-validators.d.ts +2 -1
- package/dist/dimensional/metric-validators.d.ts.map +1 -1
- package/dist/dimensional/metric-validators.js.map +1 -1
- package/dist/dimensional/metric.d.ts.map +1 -1
- package/dist/dimensional/metric.js +0 -1
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/natural-units.js.map +1 -1
- package/dist/dimensional/quantity-registry.d.ts +13 -0
- package/dist/dimensional/quantity-registry.d.ts.map +1 -1
- package/dist/dimensional/quantity-registry.js +14 -6
- package/dist/dimensional/quantity-registry.js.map +1 -1
- package/dist/dimensional/rg-flow.js.map +1 -1
- package/dist/dimensional/stress-energy-validators.js.map +1 -1
- package/dist/dimensional/symbolic-constants.d.ts +9 -0
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
- package/dist/dimensional/symbolic-constants.js +20 -3
- package/dist/dimensional/symbolic-constants.js.map +1 -1
- package/dist/dimensional/tensor-trace.js.map +1 -1
- package/dist/dimensional/tensor.js.map +1 -1
- package/dist/dimensional/types.d.ts +36 -0
- package/dist/dimensional/types.d.ts.map +1 -1
- package/dist/dimensional/types.js +45 -7
- package/dist/dimensional/types.js.map +1 -1
- package/dist/dimensional/unit-convention.d.ts +0 -2
- package/dist/dimensional/unit-convention.d.ts.map +1 -1
- package/dist/dimensional/unit-convention.js +2 -2
- package/dist/dimensional/unit-convention.js.map +1 -1
- package/dist/dimensional/unit-data.d.ts.map +1 -1
- package/dist/dimensional/unit-data.js +11 -7
- package/dist/dimensional/unit-data.js.map +1 -1
- package/dist/dimensional/units.d.ts.map +1 -1
- package/dist/dimensional/units.js +38 -20
- package/dist/dimensional/units.js.map +1 -1
- package/dist/dimensional/validator-registry.js.map +1 -1
- package/dist/dimensional/validator.d.ts +0 -16
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +65 -29
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/dimensional/weyl-validators.js.map +1 -1
- package/dist/index.d.ts +59 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -24
- package/dist/index.js.map +1 -1
- package/dist/numerical/bianchi-residual.js.map +1 -1
- package/dist/numerical/binding-value.d.ts +11 -6
- package/dist/numerical/binding-value.d.ts.map +1 -1
- package/dist/numerical/binding-value.js +126 -122
- package/dist/numerical/binding-value.js.map +1 -1
- package/dist/numerical/christoffel-flat.d.ts.map +1 -1
- package/dist/numerical/christoffel-flat.js +3 -2
- package/dist/numerical/christoffel-flat.js.map +1 -1
- package/dist/numerical/connection-lowering-helpers.js.map +1 -1
- package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/covariant-eikonal.js +36 -13
- package/dist/numerical/covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +9 -5
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/derivative-lowering.js.map +1 -1
- package/dist/numerical/einstein-equation.js.map +1 -1
- package/dist/numerical/engine-registry.js.map +1 -1
- package/dist/numerical/errors.d.ts +7 -3
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js +5 -8
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -1
- package/dist/numerical/evaluator-uncertainty.js +19 -2
- package/dist/numerical/evaluator-uncertainty.js.map +1 -1
- package/dist/numerical/finite-difference.d.ts +22 -0
- package/dist/numerical/finite-difference.d.ts.map +1 -0
- package/dist/numerical/finite-difference.js +27 -0
- package/dist/numerical/finite-difference.js.map +1 -0
- package/dist/numerical/formula-contract.d.ts +63 -7
- package/dist/numerical/formula-contract.d.ts.map +1 -1
- package/dist/numerical/formula-contract.js +61 -42
- package/dist/numerical/formula-contract.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts +8 -7
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js +58 -36
- 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 +5 -2
- package/dist/numerical/formula-mathts.js.map +1 -1
- package/dist/numerical/formula-registry.d.ts +13 -3
- package/dist/numerical/formula-registry.d.ts.map +1 -1
- package/dist/numerical/formula-registry.js +7 -2
- package/dist/numerical/formula-registry.js.map +1 -1
- package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
- package/dist/numerical/geodesic-integrator.js +22 -14
- package/dist/numerical/geodesic-integrator.js.map +1 -1
- package/dist/numerical/geometrized.d.ts.map +1 -1
- package/dist/numerical/geometrized.js +0 -1
- package/dist/numerical/geometrized.js.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +28 -27
- package/dist/numerical/gl4-integrator.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.js +41 -42
- package/dist/numerical/gl4-integrator.js.map +1 -1
- package/dist/numerical/grid-field.js.map +1 -1
- package/dist/numerical/index.js.map +1 -1
- package/dist/numerical/input-validation.d.ts +3 -6
- package/dist/numerical/input-validation.d.ts.map +1 -1
- package/dist/numerical/input-validation.js +4 -8
- package/dist/numerical/input-validation.js.map +1 -1
- package/dist/numerical/killing.d.ts +8 -5
- package/dist/numerical/killing.d.ts.map +1 -1
- package/dist/numerical/killing.js.map +1 -1
- package/dist/numerical/klein-gordon.js.map +1 -1
- package/dist/numerical/kretschmann.js.map +1 -1
- package/dist/numerical/lowering-utils.js.map +1 -1
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +7 -17
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js +16 -25
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.d.ts.map +1 -1
- package/dist/numerical/metric-inverse.js +83 -46
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/null-ic.js.map +1 -1
- package/dist/numerical/null-ray-integrator.d.ts +2 -1
- package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
- package/dist/numerical/null-ray-integrator.js +12 -12
- package/dist/numerical/null-ray-integrator.js.map +1 -1
- package/dist/numerical/painleve-gullstrand-metric.js +2 -2
- package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
- package/dist/numerical/pderiv.d.ts.map +1 -1
- package/dist/numerical/pderiv.js +9 -2
- package/dist/numerical/pderiv.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +0 -36
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +41 -87
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/quadrature.d.ts +5 -2
- package/dist/numerical/quadrature.d.ts.map +1 -1
- package/dist/numerical/quadrature.js +19 -4
- package/dist/numerical/quadrature.js.map +1 -1
- package/dist/numerical/rk4-trajectory.d.ts +10 -0
- package/dist/numerical/rk4-trajectory.d.ts.map +1 -0
- package/dist/numerical/rk4-trajectory.js +37 -0
- package/dist/numerical/rk4-trajectory.js.map +1 -0
- package/dist/numerical/schwarzschild.d.ts +14 -0
- package/dist/numerical/schwarzschild.d.ts.map +1 -0
- package/dist/numerical/schwarzschild.js +17 -0
- package/dist/numerical/schwarzschild.js.map +1 -0
- package/dist/numerical/spacetime-metrics.d.ts +25 -19
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
- package/dist/numerical/spacetime-metrics.js +180 -286
- package/dist/numerical/spacetime-metrics.js.map +1 -1
- package/dist/numerical/statistics.d.ts +24 -0
- package/dist/numerical/statistics.d.ts.map +1 -0
- package/dist/numerical/statistics.js +52 -0
- package/dist/numerical/statistics.js.map +1 -0
- package/dist/numerical/strides.js.map +1 -1
- package/dist/numerical/tensor-engine.d.ts +30 -5
- package/dist/numerical/tensor-engine.d.ts.map +1 -1
- package/dist/numerical/tensor-engine.js +12 -0
- package/dist/numerical/tensor-engine.js.map +1 -1
- package/dist/numerical/types.js.map +1 -1
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/dist/relations/category.js.map +1 -1
- package/dist/relations/composition-table.d.ts +4 -4
- package/dist/relations/composition-table.js +4 -4
- package/dist/relations/composition-table.js.map +1 -1
- package/dist/relations/conventions.js.map +1 -1
- package/dist/relations/domain-regimes.js.map +1 -1
- package/dist/relations/regime-registration.js.map +1 -1
- package/dist/relations/regime-vocabularies.js.map +1 -1
- package/dist/relations/regime.d.ts +28 -8
- package/dist/relations/regime.d.ts.map +1 -1
- package/dist/relations/regime.js +44 -15
- package/dist/relations/regime.js.map +1 -1
- package/dist/relations/types.d.ts +18 -5
- package/dist/relations/types.d.ts.map +1 -1
- package/dist/relations/types.js +5 -3
- package/dist/relations/types.js.map +1 -1
- package/package.json +16 -20
- package/dist/bridges/registry.d.ts +0 -60
- package/dist/bridges/registry.d.ts.map +0 -1
- package/dist/bridges/registry.js +0 -87
- package/dist/bridges/registry.js.map +0 -1
- package/dist/cli/poster-source.d.ts +0 -154
- package/dist/cli/poster-source.d.ts.map +0 -1
- package/dist/cli/poster-source.js +0 -184
- package/dist/cli/poster-source.js.map +0 -1
|
@@ -6,27 +6,43 @@
|
|
|
6
6
|
* node uses the same mostly-plus signature. The Kretschmann scalar does not
|
|
7
7
|
* depend on that choice.
|
|
8
8
|
*
|
|
9
|
-
* Schwarzschild Christoffel symbols are
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* Schwarzschild and Kerr Christoffel symbols are closed forms; the Kerr
|
|
10
|
+
* ones come from the analytic metric derivatives through the one Christoffel
|
|
11
|
+
* builder (`computeChristoffelTensor`). Riemann, Ricci and Kretschmann are
|
|
12
|
+
* the finite-difference curvature stack of `curvature-lowering-helpers.ts`
|
|
13
|
+
* (`christoffelAt`, `riemannUpperAt`, `lowerFirstIndex`) and
|
|
14
|
+
* `computeKretschmann`, checked in tests against the closed forms
|
|
15
|
+
* (Schwarzschild Kretschmann, flat-dust FLRW Ricci scalar, Kerr
|
|
16
|
+
* Kretschmann). The metric inverse is MathTS `inv`. Kerr geodesics in
|
|
17
|
+
* Boyer–Lindquist coordinates, including inclined ones, take their initial
|
|
18
|
+
* data from the Carter constant and are integrated with the second-order
|
|
19
|
+
* geodesic equation by `integrateGeodesic` (`geodesic-integrator.ts`).
|
|
20
|
+
* This module holds no curvature or geodesic arithmetic of its own.
|
|
15
21
|
*
|
|
16
22
|
* @module numerical/spacetime-metrics
|
|
17
23
|
* @internal
|
|
18
24
|
*/
|
|
19
|
-
import {
|
|
25
|
+
import { det, inv } from '@danielsimonjr/mathts-functions';
|
|
26
|
+
import { splitAssignment } from '../core/assignment.js';
|
|
27
|
+
import { relDiff, withinMixed } from '../core/compare.js';
|
|
28
|
+
import { numberFrom, numberMatrixFrom } from '../core/mathts-read.js';
|
|
20
29
|
import { C_SI, G_SI, M_SUN_SI } from '../core/constants.js';
|
|
21
|
-
import { DIMENSIONLESS, LENGTH, MASS, MASS_DENSITY, TIME, VELOCITY } from '../dimensional/types.js';
|
|
30
|
+
import { DIMENSIONLESS, GRAVITATIONAL_CONSTANT, LENGTH, MASS, MASS_DENSITY, TIME, VELOCITY } from '../dimensional/types.js';
|
|
31
|
+
import { UnitError } from '../dimensional/units.js';
|
|
22
32
|
import { readParameter } from './binding-value.js';
|
|
23
|
-
|
|
33
|
+
import { computeChristoffelTensor } from './connection-lowering-helpers.js';
|
|
34
|
+
import { christoffelAt, lowerFirstIndex, riemannUpperAt } from './curvature-lowering-helpers.js';
|
|
35
|
+
import { integrateGeodesic as integrateGeodesicRK4 } from './geodesic-integrator.js';
|
|
36
|
+
import { computeKretschmann } from './kretschmann.js';
|
|
37
|
+
import { MathTSEngine } from './mathts-engine.js';
|
|
38
|
+
import { schwarzschildRadius } from './schwarzschild.js';
|
|
39
|
+
/** The signature this module differentiates; `CurvatureReport.signature` is its type. */
|
|
24
40
|
export const METRIC_SIGNATURE = '(-,+,+,+)';
|
|
25
41
|
/**
|
|
26
42
|
* Printed with every curvature report. The line element and the canonical
|
|
27
43
|
* Einstein-equation metric node share this mostly-plus signature.
|
|
28
44
|
*/
|
|
29
|
-
|
|
45
|
+
const METRIC_SIGNATURE_NOTE = 'Line element signature (−,+,+,+), the same mostly-plus signature as the Schwarzschild fixture ' +
|
|
30
46
|
'and as the canonical Einstein-equation metric node. ' +
|
|
31
47
|
'The Kretschmann scalar does not depend on that choice.';
|
|
32
48
|
const Z = 1e-8;
|
|
@@ -36,145 +52,53 @@ function zeros(n) {
|
|
|
36
52
|
function mat4() {
|
|
37
53
|
return [zeros(4), zeros(4), zeros(4), zeros(4)];
|
|
38
54
|
}
|
|
55
|
+
/** The engine the curvature helpers carry their tensors on. */
|
|
56
|
+
const ENGINE = new MathTSEngine();
|
|
57
|
+
/**
|
|
58
|
+
* The metric inverse, MathTS `inv`. A singular metric is this module's error,
|
|
59
|
+
* decided by MathTS `det` before the inverse is asked for, so no error text is
|
|
60
|
+
* read. `inv` and `det` are typed over every MathTS matrix kind, so their
|
|
61
|
+
* results are read back as the number and the 4×4 number array they are for a
|
|
62
|
+
* number[][] input.
|
|
63
|
+
*/
|
|
39
64
|
function invert4(src) {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
out[j] = row[j];
|
|
44
|
-
out[4 + i] = 1;
|
|
45
|
-
return out;
|
|
46
|
-
});
|
|
47
|
-
for (let col = 0; col < 4; col++) {
|
|
48
|
-
let pivot = col;
|
|
49
|
-
for (let r = col + 1; r < 4; r++) {
|
|
50
|
-
if (Math.abs(a[r][col]) > Math.abs(a[pivot][col]))
|
|
51
|
-
pivot = r;
|
|
52
|
-
}
|
|
53
|
-
const tmp = a[col];
|
|
54
|
-
a[col] = a[pivot];
|
|
55
|
-
a[pivot] = tmp;
|
|
56
|
-
const div = a[col][col];
|
|
57
|
-
if (!Number.isFinite(div) || Math.abs(div) < 1e-18)
|
|
58
|
-
throw new Error('metric is singular at this point');
|
|
59
|
-
for (let j = 0; j < 8; j++)
|
|
60
|
-
a[col][j] = a[col][j] / div;
|
|
61
|
-
for (let r = 0; r < 4; r++) {
|
|
62
|
-
if (r === col)
|
|
63
|
-
continue;
|
|
64
|
-
const f = a[r][col];
|
|
65
|
-
for (let j = 0; j < 8; j++)
|
|
66
|
-
a[r][j] = a[r][j] - f * a[col][j];
|
|
67
|
-
}
|
|
65
|
+
const determinant = numberFrom('det', det(src));
|
|
66
|
+
if (!Number.isFinite(determinant) || determinant === 0) {
|
|
67
|
+
throw new MetricValueError('metric is singular at this point');
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return y;
|
|
75
|
-
}
|
|
76
|
-
/** 4th-order central difference of a matrix-valued function. */
|
|
77
|
-
function dMetric(g, x, mu, h) {
|
|
78
|
-
const at = (s) => g(shift(x, mu, s * h));
|
|
79
|
-
const a = at(-2);
|
|
80
|
-
const b = at(-1);
|
|
81
|
-
const c = at(1);
|
|
82
|
-
const d = at(2);
|
|
83
|
-
const out = mat4();
|
|
84
|
-
for (let i = 0; i < 4; i++) {
|
|
85
|
-
for (let j = 0; j < 4; j++) {
|
|
86
|
-
const av = a[i][j];
|
|
87
|
-
const bv = b[i][j];
|
|
88
|
-
const cv = c[i][j];
|
|
89
|
-
const dv = d[i][j];
|
|
90
|
-
// A component that does not change must not differentiate a huge constant
|
|
91
|
-
// (g_tt = −c²): the stencil cancels only up to a roundoff, and that
|
|
92
|
-
// roundoff divided by h is a fake Christoffel.
|
|
93
|
-
out[i][j] = av === bv && bv === cv && cv === dv ? 0 : (-dv + 8 * cv - 8 * bv + av) / (12 * h);
|
|
94
|
-
}
|
|
69
|
+
try {
|
|
70
|
+
return numberMatrixFrom('inv', inv(src), 4);
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
throw new Error('metric inverse is not a 4×4 matrix', { cause: error });
|
|
95
74
|
}
|
|
96
|
-
|
|
75
|
+
}
|
|
76
|
+
/** The nested-array closures the curvature helpers take, over a `MetricFn`. */
|
|
77
|
+
function closuresOf(g) {
|
|
78
|
+
const at = (x) => g([x[0], x[1], x[2], x[3]]);
|
|
79
|
+
return { gFn: at, gInverseFn: (x) => invert4(at(x)) };
|
|
97
80
|
}
|
|
98
81
|
function blankGamma() {
|
|
99
82
|
return [0, 1, 2, 3].map(() => mat4());
|
|
100
83
|
}
|
|
101
|
-
/**
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
function christoffelOf(g, x, steps) {
|
|
106
|
-
const gi = invert4(g(x));
|
|
107
|
-
const dg = [0, 1, 2, 3].map((mu) => dMetric(g, x, mu, steps[mu]));
|
|
108
|
-
const G = blankGamma();
|
|
109
|
-
for (let rho = 0; rho < 4; rho++) {
|
|
110
|
-
for (let mu = 0; mu < 4; mu++) {
|
|
111
|
-
for (let nu = mu; nu < 4; nu++) {
|
|
112
|
-
let s = 0;
|
|
113
|
-
for (let sigma = 0; sigma < 4; sigma++) {
|
|
114
|
-
s += gi[rho][sigma] * (dg[mu][nu][sigma] + dg[nu][mu][sigma] - dg[sigma][mu][nu]);
|
|
115
|
-
}
|
|
116
|
-
const v = 0.5 * s;
|
|
117
|
-
G[rho][mu][nu] = v;
|
|
118
|
-
G[rho][nu][mu] = v;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return G;
|
|
84
|
+
/** Γ^ρ_{μν}(x) by the finite-difference Christoffel of the curvature helpers. */
|
|
85
|
+
function christoffelOf(g, x) {
|
|
86
|
+
const { gFn, gInverseFn } = closuresOf(g);
|
|
87
|
+
return christoffelAt(x, gFn, gInverseFn, 4, ENGINE);
|
|
123
88
|
}
|
|
124
89
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
90
|
+
* Christoffel, Ricci, the Ricci scalar and the Kretschmann scalar at `x`:
|
|
91
|
+
* `christoffelAt` and `riemannUpperAt` (the finite-difference Γ and R^ρ_{σμν}
|
|
92
|
+
* of the curvature helpers), the Ricci contraction R_{σν} = R^ρ_{σρν}, and
|
|
93
|
+
* `computeKretschmann` over the lowered Riemann. Checked against the
|
|
94
|
+
* Schwarzschild Kretschmann closed form.
|
|
129
95
|
*/
|
|
130
|
-
function tensorsOf(g, x
|
|
96
|
+
function tensorsOf(g, x) {
|
|
97
|
+
const { gFn, gInverseFn } = closuresOf(g);
|
|
131
98
|
const g0 = g(x);
|
|
132
99
|
const gi = invert4(g0);
|
|
133
|
-
const gamma =
|
|
134
|
-
const
|
|
135
|
-
for (let mu = 0; mu < 4; mu++) {
|
|
136
|
-
const h = steps[mu];
|
|
137
|
-
const plus = christoffelOf(g, shift(x, mu, h), steps);
|
|
138
|
-
const minus = christoffelOf(g, shift(x, mu, -h), steps);
|
|
139
|
-
const d = blankGamma();
|
|
140
|
-
for (let rho = 0; rho < 4; rho++) {
|
|
141
|
-
for (let a = 0; a < 4; a++) {
|
|
142
|
-
for (let b = 0; b < 4; b++) {
|
|
143
|
-
d[rho][a][b] = (plus[rho][a][b] - minus[rho][a][b]) / (2 * h);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
partial.push(d);
|
|
148
|
-
}
|
|
149
|
-
const up = tensor4();
|
|
150
|
-
for (let rho = 0; rho < 4; rho++) {
|
|
151
|
-
for (let sigma = 0; sigma < 4; sigma++) {
|
|
152
|
-
for (let mu = 0; mu < 4; mu++) {
|
|
153
|
-
for (let nu = 0; nu < 4; nu++) {
|
|
154
|
-
let s = partial[mu][rho][nu][sigma] - partial[nu][rho][mu][sigma];
|
|
155
|
-
for (let lam = 0; lam < 4; lam++) {
|
|
156
|
-
s +=
|
|
157
|
-
gamma[rho][mu][lam] * gamma[lam][nu][sigma] -
|
|
158
|
-
gamma[rho][nu][lam] * gamma[lam][mu][sigma];
|
|
159
|
-
}
|
|
160
|
-
up[rho][sigma][mu][nu] = s;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
const lower = tensor4();
|
|
166
|
-
for (let a = 0; a < 4; a++) {
|
|
167
|
-
for (let b = 0; b < 4; b++) {
|
|
168
|
-
for (let c = 0; c < 4; c++) {
|
|
169
|
-
for (let d = 0; d < 4; d++) {
|
|
170
|
-
let s = 0;
|
|
171
|
-
for (let rho = 0; rho < 4; rho++)
|
|
172
|
-
s += g0[a][rho] * up[rho][b][c][d];
|
|
173
|
-
lower[a][b][c][d] = s;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
100
|
+
const gamma = christoffelAt(x, gFn, gInverseFn, 4, ENGINE);
|
|
101
|
+
const up = riemannUpperAt(x, gFn, gInverseFn, 4, ENGINE, gamma);
|
|
178
102
|
const ricci = mat4();
|
|
179
103
|
for (let sigma = 0; sigma < 4; sigma++) {
|
|
180
104
|
for (let nu = 0; nu < 4; nu++) {
|
|
@@ -189,26 +113,8 @@ function tensorsOf(g, x, steps) {
|
|
|
189
113
|
for (let b = 0; b < 4; b++)
|
|
190
114
|
ricciScalar += gi[a][b] * ricci[a][b];
|
|
191
115
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
for (let b = 0; b < 4; b++) {
|
|
195
|
-
for (let c = 0; c < 4; c++) {
|
|
196
|
-
for (let d = 0; d < 4; d++) {
|
|
197
|
-
let raised = 0;
|
|
198
|
-
for (let ap = 0; ap < 4; ap++) {
|
|
199
|
-
for (let bp = 0; bp < 4; bp++) {
|
|
200
|
-
for (let cp = 0; cp < 4; cp++) {
|
|
201
|
-
for (let dp = 0; dp < 4; dp++) {
|
|
202
|
-
raised += gi[a][ap] * gi[b][bp] * gi[c][cp] * gi[d][dp] * lower[ap][bp][cp][dp];
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
kretschmann += lower[a][b][c][d] * raised;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
116
|
+
const lower = lowerFirstIndex(up, g0.flat(), 4);
|
|
117
|
+
const kretschmann = computeKretschmann(lower, gi);
|
|
212
118
|
return { ricciScalar, kretschmann, ricci, christoffel: gamma };
|
|
213
119
|
}
|
|
214
120
|
function nonzeroMatrix(m, label) {
|
|
@@ -243,11 +149,8 @@ function nonzeroGamma(G) {
|
|
|
243
149
|
}
|
|
244
150
|
return out;
|
|
245
151
|
}
|
|
246
|
-
function stepsFor(x) {
|
|
247
|
-
return [Math.max(Math.abs(x[0]), 1) * 1e-4, Math.max(Math.abs(x[1]), 1) * 1e-4, 1e-4, 1e-4];
|
|
248
|
-
}
|
|
249
152
|
function schwarzschildMetric(M, c, G) {
|
|
250
|
-
const rs = (
|
|
153
|
+
const rs = schwarzschildRadius(M, G, c);
|
|
251
154
|
return (x) => {
|
|
252
155
|
const r = x[1];
|
|
253
156
|
const th = x[2];
|
|
@@ -337,10 +240,25 @@ export class MetricMassError extends Error {
|
|
|
337
240
|
this.name = 'MetricMassError';
|
|
338
241
|
}
|
|
339
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* A value the metric library refuses: a point inside the horizon or on a
|
|
245
|
+
* pole, a Kerr point inside the ring, an unknown or repeated parameter, a
|
|
246
|
+
* token that is not `key=value`, an orbit or geodesic start the closed forms
|
|
247
|
+
* do not admit, a Newton iteration that does not converge at the given
|
|
248
|
+
* point. The CLI maps this class to exit 1; any other class is a defect and
|
|
249
|
+
* is not converted.
|
|
250
|
+
* @internal
|
|
251
|
+
*/
|
|
252
|
+
export class MetricValueError extends Error {
|
|
253
|
+
constructor(message) {
|
|
254
|
+
super(message);
|
|
255
|
+
this.name = 'MetricValueError';
|
|
256
|
+
}
|
|
257
|
+
}
|
|
340
258
|
/** A mass that is not positive is not a source. */
|
|
341
259
|
function requirePositiveMass(M) {
|
|
342
260
|
if (!(M > 0))
|
|
343
|
-
throw new MetricMassError(`${M <= 0 ? 'a non-positive' : 'a non-finite'} mass is not a source: the metric needs a positive mass`);
|
|
261
|
+
throw new MetricMassError(`${M <= 0 ? 'a non-positive' : 'a non-finite'} mass (M = ${M} kg) is not a source: the metric needs a positive mass`);
|
|
344
262
|
}
|
|
345
263
|
/**
|
|
346
264
|
* The polar angle is a point of the spherical chart only on the open interval
|
|
@@ -350,14 +268,14 @@ function requirePositiveMass(M) {
|
|
|
350
268
|
*/
|
|
351
269
|
function requirePolarInterior(theta) {
|
|
352
270
|
if (!(theta > 0 && theta < Math.PI && Math.sin(theta) > 1e-9)) {
|
|
353
|
-
throw new
|
|
271
|
+
throw new MetricValueError(`θ must be strictly between 0 and π (got ${theta}): the poles are coordinate singularities of the spherical chart`);
|
|
354
272
|
}
|
|
355
273
|
}
|
|
356
274
|
/** SI dimension of each metric parameter. A bare number is already in that unit. */
|
|
357
275
|
const PARAM_DIM = {
|
|
358
276
|
M: MASS,
|
|
359
277
|
c: VELOCITY,
|
|
360
|
-
G:
|
|
278
|
+
G: GRAVITATIONAL_CONSTANT,
|
|
361
279
|
r: LENGTH,
|
|
362
280
|
a: LENGTH,
|
|
363
281
|
t: TIME,
|
|
@@ -371,17 +289,30 @@ const PARAM_DIM = {
|
|
|
371
289
|
rho: MASS_DENSITY,
|
|
372
290
|
};
|
|
373
291
|
/** Parse `key=value` pairs. A value is a number, a unit, or a constant expression. @internal */
|
|
374
|
-
|
|
292
|
+
function metricParams(pairs, defaults) {
|
|
375
293
|
const values = { ...defaults };
|
|
376
294
|
const notes = [];
|
|
295
|
+
const seen = new Set();
|
|
377
296
|
for (const pair of pairs) {
|
|
378
|
-
const
|
|
379
|
-
if (
|
|
380
|
-
throw new
|
|
381
|
-
const key =
|
|
297
|
+
const split = splitAssignment(pair);
|
|
298
|
+
if (split === null)
|
|
299
|
+
throw new MetricValueError(`'${pair}' must be key=value`);
|
|
300
|
+
const key = split.name;
|
|
382
301
|
if (!(key in defaults))
|
|
383
|
-
throw new
|
|
384
|
-
|
|
302
|
+
throw new MetricValueError(`unknown parameter '${key}' (expected ${Object.keys(defaults).join(', ')})`);
|
|
303
|
+
if (seen.has(key))
|
|
304
|
+
throw new MetricValueError(`'${key}' is given twice ('${pair}'); give one value per parameter`);
|
|
305
|
+
seen.add(key);
|
|
306
|
+
let read;
|
|
307
|
+
try {
|
|
308
|
+
read = readParameter(split.raw, PARAM_DIM[key] ?? DIMENSIONLESS);
|
|
309
|
+
}
|
|
310
|
+
catch (e) {
|
|
311
|
+
// The reader knows the text and the dimension it was given, not which parameter held them.
|
|
312
|
+
if (e instanceof UnitError)
|
|
313
|
+
throw new UnitError(`parameter ${key}: ${e.message}`);
|
|
314
|
+
throw e;
|
|
315
|
+
}
|
|
385
316
|
values[key] = read.value;
|
|
386
317
|
for (const note of read.notes)
|
|
387
318
|
if (!notes.includes(note))
|
|
@@ -405,7 +336,7 @@ export function curvatureReport(metric, pairs = []) {
|
|
|
405
336
|
return m;
|
|
406
337
|
};
|
|
407
338
|
const x = [p.t, p.r, p.theta, p.phi];
|
|
408
|
-
const t = tensorsOf(g, x
|
|
339
|
+
const t = tensorsOf(g, x);
|
|
409
340
|
return stateCurvature(pack('minkowski', p, x, t, { ricciScalar: 0, kretschmann: 0 }, [
|
|
410
341
|
'Minkowski in Cartesian-like coordinates (the angular part is not a sphere here; g_θθ = g_φφ = 1).',
|
|
411
342
|
...notes,
|
|
@@ -416,14 +347,14 @@ export function curvatureReport(metric, pairs = []) {
|
|
|
416
347
|
const { values: p, notes } = metricParams(pairs, { M: M_SUN_SI, c: C_SI, G: G_SI, r: Number.NaN, theta: Math.PI / 2, phi: 0, t: 0 });
|
|
417
348
|
requirePositiveMass(p.M);
|
|
418
349
|
requirePolarInterior(p.theta);
|
|
419
|
-
const rs = (
|
|
350
|
+
const rs = schwarzschildRadius(p.M, p.G, p.c);
|
|
420
351
|
if (Number.isNaN(p.r))
|
|
421
352
|
p.r = 10 * rs;
|
|
422
353
|
if (!(p.r > rs))
|
|
423
|
-
throw new
|
|
354
|
+
throw new MetricValueError(`r must be outside the horizon (r = ${p.r} m, r_s = ${rs} m)`);
|
|
424
355
|
const g = schwarzschildMetric(p.M, p.c, p.G);
|
|
425
356
|
const x = [p.t, p.r, p.theta, p.phi];
|
|
426
|
-
const t = tensorsOf(g, x
|
|
357
|
+
const t = tensorsOf(g, x);
|
|
427
358
|
const K = schwarzschildKretschmann(p.M, p.r, p.c, p.G);
|
|
428
359
|
return stateCurvature(pack('schwarzschild', p, x, t, { kretschmann: K, ricciScalar: 0, horizon_m: rs }, [
|
|
429
360
|
'Closed form: Kretschmann = 48 G² M² / (c⁴ r⁶), Ricci = 0.',
|
|
@@ -456,8 +387,8 @@ export function curvatureReport(metric, pairs = []) {
|
|
|
456
387
|
// Christoffel in the SI metric. Ricci and Kretschmann are computed at c = 1
|
|
457
388
|
// and divided by c² and c⁴: g_tt = −c² makes those scalars smaller than the
|
|
458
389
|
// roundoff of an SI finite difference.
|
|
459
|
-
const tSi = tensorsOf(g, x
|
|
460
|
-
const t1 = p.c === 1 ? tSi : tensorsOf(flrwMetric(p.a0, p.t0, p.n, p.k, 1), x
|
|
390
|
+
const tSi = tensorsOf(g, x);
|
|
391
|
+
const t1 = p.c === 1 ? tSi : tensorsOf(flrwMetric(p.a0, p.t0, p.n, p.k, 1), x);
|
|
461
392
|
const c2 = p.c * p.c;
|
|
462
393
|
const t = {
|
|
463
394
|
christoffel: tSi.christoffel,
|
|
@@ -502,12 +433,12 @@ export function curvatureReport(metric, pairs = []) {
|
|
|
502
433
|
if (Number.isNaN(p.r))
|
|
503
434
|
p.r = 10 * Mgeom;
|
|
504
435
|
if (!(p.r > 0))
|
|
505
|
-
throw new
|
|
436
|
+
throw new MetricValueError(`r must be positive and outside the singularity (got r = ${p.r} m)`);
|
|
506
437
|
if (Math.abs(p.a) >= p.r)
|
|
507
|
-
throw new
|
|
438
|
+
throw new MetricValueError('Kerr finite difference wants |a| < r and r outside the ring');
|
|
508
439
|
const g = kerrMetric(Mgeom, p.a);
|
|
509
440
|
const x = [p.t, p.r, p.theta, p.phi];
|
|
510
|
-
const t = tensorsOf(g, x
|
|
441
|
+
const t = tensorsOf(g, x);
|
|
511
442
|
const K = kerrKretschmann(Mgeom, p.r, p.a, p.theta);
|
|
512
443
|
const aOverM = p.a / Mgeom;
|
|
513
444
|
const kerrNotes = [
|
|
@@ -524,7 +455,6 @@ export function curvatureReport(metric, pairs = []) {
|
|
|
524
455
|
'Geodesics (--geodesic) use the Carter constant. θ = π/2 is an equatorial circular orbit. Any other θ is an inclined spherical orbit with that polar turning point. ISCO and photon radii are closed forms in r/M.',
|
|
525
456
|
]));
|
|
526
457
|
}
|
|
527
|
-
const relDiff = (got, want) => Math.abs(got - want) / Math.max(Math.abs(want), 1e-30);
|
|
528
458
|
/**
|
|
529
459
|
* The headline Ricci scalar is the closed form when the finite difference
|
|
530
460
|
* does not match it. A vacuum metric's finite-difference residual is not
|
|
@@ -540,14 +470,14 @@ function stateCurvature(report) {
|
|
|
540
470
|
ricci = [];
|
|
541
471
|
notes.push('Ricci is 0 for this vacuum metric. A finite-difference residual is not listed.');
|
|
542
472
|
}
|
|
543
|
-
else if (exactR !== undefined && relDiff(report.ricciScalar, exactR) > 1e-2) {
|
|
473
|
+
else if (exactR !== undefined && relDiff(report.ricciScalar, exactR, 1e-30) > 1e-2) {
|
|
544
474
|
ricciScalar = exactR;
|
|
545
475
|
ricci = [];
|
|
546
476
|
notes.push('Ricci scalar is the closed form. The finite-difference scalar, restored from a c = 1 difference by 1/c², does not match it when spatial curvature is present, so those components are not listed.');
|
|
547
477
|
}
|
|
548
478
|
const H2 = report.closedForm.H2;
|
|
549
479
|
const rhs = report.closedForm.friedmannRhs;
|
|
550
|
-
if (H2 !== undefined && rhs !== undefined && relDiff(H2, rhs) > 1e-6) {
|
|
480
|
+
if (H2 !== undefined && rhs !== undefined && relDiff(H2, rhs, 1e-30) > 1e-6) {
|
|
551
481
|
notes.push('H² and the Friedmann right-hand side differ, so this scale factor is not a solution of the Friedmann equation at the stated ρ, k and Λ. k is a curvature in 1/length²: k = 1 with c in m/s is a curvature radius of about a metre, not the dimensionless k = ±1 of geometrized cosmology.');
|
|
552
482
|
}
|
|
553
483
|
return { ...report, ricci, ricciScalar, notes };
|
|
@@ -589,52 +519,13 @@ export function schwarzschildCircularOrbit(opts) {
|
|
|
589
519
|
const ut = 1 / Math.sqrt(1 - (3 * rs) / (2 * r0));
|
|
590
520
|
const uphi = Omega * ut;
|
|
591
521
|
if (!(f > 0) || !Number.isFinite(ut))
|
|
592
|
-
throw new
|
|
593
|
-
//
|
|
594
|
-
//
|
|
595
|
-
// a floating-point step off θ = π/2 makes cot θ explode.
|
|
596
|
-
const gamma = (r) => {
|
|
597
|
-
const ff = 1 - rs / r;
|
|
598
|
-
const Gma = blankGamma();
|
|
599
|
-
const set = (rho, mu, nu, v) => {
|
|
600
|
-
Gma[rho][mu][nu] = v;
|
|
601
|
-
Gma[rho][nu][mu] = v;
|
|
602
|
-
};
|
|
603
|
-
set(0, 0, 1, rs / (2 * r * (r - rs)));
|
|
604
|
-
set(1, 0, 0, (rs * ff) / (2 * r * r));
|
|
605
|
-
set(1, 1, 1, -rs / (2 * r * (r - rs)));
|
|
606
|
-
set(1, 2, 2, -(r - rs));
|
|
607
|
-
set(1, 3, 3, -(r - rs));
|
|
608
|
-
set(2, 1, 2, 1 / r);
|
|
609
|
-
set(3, 1, 3, 1 / r);
|
|
610
|
-
return Gma;
|
|
611
|
-
};
|
|
612
|
-
// state: t, r, th, phi, ut, ur, uth, uphi
|
|
613
|
-
let y = [0, r0, Math.PI / 2, 0, ut, 0, 0, uphi];
|
|
614
|
-
const accel = (s) => {
|
|
615
|
-
const Gma = gamma(s[1]);
|
|
616
|
-
const u = [s[4], s[5], s[6], s[7]];
|
|
617
|
-
const du = [0, 0, 0, 0];
|
|
618
|
-
for (let rho = 0; rho < 4; rho++) {
|
|
619
|
-
let sum = 0;
|
|
620
|
-
for (let mu = 0; mu < 4; mu++) {
|
|
621
|
-
for (let nu = 0; nu < 4; nu++)
|
|
622
|
-
sum += Gma[rho][mu][nu] * u[mu] * u[nu];
|
|
623
|
-
}
|
|
624
|
-
du[rho] = -sum;
|
|
625
|
-
}
|
|
626
|
-
return [u[0], u[1], u[2], u[3], du[0], du[1], du[2], du[3]];
|
|
627
|
-
};
|
|
522
|
+
throw new MetricValueError('circular orbit needs r > 1.5 r_s');
|
|
523
|
+
// The closed-form Schwarzschild Christoffel symbols, polar terms included:
|
|
524
|
+
// with u^θ = 0 and θ = π/2 the polar terms stay zero to roundoff.
|
|
628
525
|
const period = (2 * Math.PI) / uphi;
|
|
629
526
|
const fraction = opts?.fraction ?? 0.02;
|
|
630
527
|
const steps = 400;
|
|
631
|
-
const
|
|
632
|
-
for (let n = 0; n < steps; n++) {
|
|
633
|
-
const sol = solveODESystem((_t, s) => accel(s), y, [0, h], { dt: h });
|
|
634
|
-
y = (sol.y[sol.y.length - 1] ?? y).slice();
|
|
635
|
-
y[2] = Math.PI / 2;
|
|
636
|
-
y[6] = 0;
|
|
637
|
-
}
|
|
528
|
+
const y = integrateWithChristoffel((r, theta) => schwarzschildChristoffel(M, r, theta), [0, r0, Math.PI / 2, 0, ut, 0, 0, uphi], period * fraction, steps);
|
|
638
529
|
return { r0, rEnd: y[1], phiAdvance: y[3], steps };
|
|
639
530
|
}
|
|
640
531
|
/**
|
|
@@ -646,7 +537,7 @@ export function schwarzschildCircularOrbit(opts) {
|
|
|
646
537
|
export function kerrIscoRadius(aOverM) {
|
|
647
538
|
const chi = aOverM;
|
|
648
539
|
if (!(Math.abs(chi) <= 1))
|
|
649
|
-
throw new
|
|
540
|
+
throw new MetricValueError('|a/M| must be at most 1');
|
|
650
541
|
const z1 = 1 + Math.cbrt(1 - chi * chi) * (Math.cbrt(1 + chi) + Math.cbrt(1 - chi));
|
|
651
542
|
const z2 = Math.sqrt(3 * chi * chi + z1 * z1);
|
|
652
543
|
const inner = Math.sqrt((3 - z1) * (3 + z1 + 2 * z2));
|
|
@@ -660,7 +551,7 @@ export function kerrIscoRadius(aOverM) {
|
|
|
660
551
|
export function kerrPhotonRadius(aOverM) {
|
|
661
552
|
const chi = aOverM;
|
|
662
553
|
if (!(Math.abs(chi) <= 1))
|
|
663
|
-
throw new
|
|
554
|
+
throw new MetricValueError('|a/M| must be at most 1');
|
|
664
555
|
return {
|
|
665
556
|
prograde: 2 * (1 + Math.cos((2 / 3) * Math.acos(-chi))),
|
|
666
557
|
retrograde: 2 * (1 + Math.cos((2 / 3) * Math.acos(chi))),
|
|
@@ -686,7 +577,7 @@ function equatorialCircular(M, a, r, prograde) {
|
|
|
686
577
|
const g0 = kerrMetric(M, a)([0, r, Math.PI / 2, 0]);
|
|
687
578
|
const norm = -(g0[0][0] + 2 * Omega * g0[0][3] + Omega * Omega * g0[3][3]);
|
|
688
579
|
if (!(norm > 0) || !Number.isFinite(Omega))
|
|
689
|
-
throw new
|
|
580
|
+
throw new MetricValueError('circular orbit is not timelike at this radius');
|
|
690
581
|
const ut = 1 / Math.sqrt(norm);
|
|
691
582
|
const uphi = Omega * ut;
|
|
692
583
|
return {
|
|
@@ -729,7 +620,7 @@ function solveSpherical(M, a, r, Q, mu2, prograde) {
|
|
|
729
620
|
const det = j11 * j22 - j12 * j21;
|
|
730
621
|
const scale = Math.max(1, Math.abs(j11), Math.abs(j12), Math.abs(j21), Math.abs(j22));
|
|
731
622
|
if (!Number.isFinite(det) || Math.abs(det) < 1e-18 * scale * scale)
|
|
732
|
-
throw new
|
|
623
|
+
throw new MetricValueError('spherical-orbit Jacobian is singular');
|
|
733
624
|
const stepE = (j22 * f1 - j12 * f2) / det;
|
|
734
625
|
const stepL = (-j21 * f1 + j11 * f2) / det;
|
|
735
626
|
E -= stepE;
|
|
@@ -743,7 +634,7 @@ function solveSpherical(M, a, r, Q, mu2, prograde) {
|
|
|
743
634
|
if (settled)
|
|
744
635
|
return { E, L: L * M };
|
|
745
636
|
}
|
|
746
|
-
throw new
|
|
637
|
+
throw new MetricValueError('spherical orbit did not converge');
|
|
747
638
|
}
|
|
748
639
|
/**
|
|
749
640
|
* Timelike spherical orbit at fixed r: R = R' = 0. `Q` is the Carter constant
|
|
@@ -754,7 +645,7 @@ export function kerrSphericalTimelike(opts) {
|
|
|
754
645
|
const M = opts?.M ?? 1;
|
|
755
646
|
const chi = opts?.aOverM ?? 0;
|
|
756
647
|
if (!(M > 0) || !(Math.abs(chi) <= 1))
|
|
757
|
-
throw new
|
|
648
|
+
throw new MetricValueError('spherical orbit wants M > 0 and |a/M| ≤ 1');
|
|
758
649
|
const a = chi * M;
|
|
759
650
|
const r = (opts?.rOverM ?? 10) * M;
|
|
760
651
|
const Q = opts?.Q ?? 0;
|
|
@@ -778,26 +669,26 @@ export function kerrSphericalPhoton(opts) {
|
|
|
778
669
|
const chi = opts?.aOverM ?? 0;
|
|
779
670
|
const rHat = opts?.rOverM;
|
|
780
671
|
if (!(M > 0) || !(Math.abs(chi) > 0 && Math.abs(chi) <= 1))
|
|
781
|
-
throw new
|
|
672
|
+
throw new MetricValueError('spherical photon orbit wants M > 0 and 0 < |a/M| ≤ 1');
|
|
782
673
|
if (rHat === undefined)
|
|
783
|
-
throw new
|
|
674
|
+
throw new MetricValueError('spherical photon orbit needs rOverM');
|
|
784
675
|
const ends = kerrPhotonRadius(chi);
|
|
785
676
|
const lo = Math.min(ends.prograde, ends.retrograde);
|
|
786
677
|
const hi = Math.max(ends.prograde, ends.retrograde);
|
|
787
678
|
if (!(rHat >= lo - 1e-9 && rHat <= hi + 1e-9)) {
|
|
788
|
-
throw new
|
|
679
|
+
throw new MetricValueError('spherical photon radius lies between the prograde and retrograde photon orbits');
|
|
789
680
|
}
|
|
790
681
|
const a = chi * M;
|
|
791
682
|
const r = rHat * M;
|
|
792
683
|
if (!(Math.abs(r - M) > 1e-9 * M))
|
|
793
|
-
throw new
|
|
684
|
+
throw new MetricValueError('extremal prograde photon orbit sits on the horizon');
|
|
794
685
|
const Delta = r * r - 2 * M * r + a * a;
|
|
795
686
|
const E = 1;
|
|
796
687
|
const L = E * ((r * r + a * a) / a - (2 * r * Delta) / (a * (r - M)));
|
|
797
688
|
const P = E * (r * r + a * a) - a * L;
|
|
798
689
|
const Q = (P * P) / Delta - (L - a * E) ** 2;
|
|
799
690
|
if (Q < -1e-8 * M * M)
|
|
800
|
-
throw new
|
|
691
|
+
throw new MetricValueError('no spherical photon orbit at this radius');
|
|
801
692
|
return { E, L, Q: Q < 0 ? 0 : Q };
|
|
802
693
|
}
|
|
803
694
|
/**
|
|
@@ -809,14 +700,14 @@ export function kerrTurningPointOrbit(opts) {
|
|
|
809
700
|
const M = opts.M ?? 1;
|
|
810
701
|
const chi = opts.aOverM ?? 0;
|
|
811
702
|
if (!(M > 0) || !(Math.abs(chi) <= 1))
|
|
812
|
-
throw new
|
|
703
|
+
throw new MetricValueError('turning-point orbit wants M > 0 and |a/M| ≤ 1');
|
|
813
704
|
const a = chi * M;
|
|
814
705
|
const r = (opts.rOverM ?? 10) * M;
|
|
815
706
|
const theta = opts.theta;
|
|
816
707
|
const s = Math.sin(theta);
|
|
817
708
|
const c = Math.cos(theta);
|
|
818
709
|
if (!(Math.abs(s) > 1e-3) || !(Math.abs(c) > 1e-4)) {
|
|
819
|
-
throw new
|
|
710
|
+
throw new MetricValueError('turning-point θ must sit off the equator and off the pole');
|
|
820
711
|
}
|
|
821
712
|
const seed = equatorialCircular(M, a, r, opts.prograde !== false);
|
|
822
713
|
let Q = seed.L * seed.L * c * c;
|
|
@@ -828,12 +719,12 @@ export function kerrTurningPointOrbit(opts) {
|
|
|
828
719
|
L = solved.L;
|
|
829
720
|
const next = c * c * (a * a * (1 - E * E) + (L * L) / (s * s));
|
|
830
721
|
if (!Number.isFinite(next) || next < 0)
|
|
831
|
-
throw new
|
|
832
|
-
if (
|
|
722
|
+
throw new MetricValueError('turning-point Carter constant left the physical range');
|
|
723
|
+
if (withinMixed(Q, next, 1e-9))
|
|
833
724
|
return { E, L, Q: next };
|
|
834
725
|
Q = next;
|
|
835
726
|
}
|
|
836
|
-
throw new
|
|
727
|
+
throw new MetricValueError('turning-point Carter constant did not converge');
|
|
837
728
|
}
|
|
838
729
|
function kerrMetricDerivatives(M, a, r, theta) {
|
|
839
730
|
const c = Math.cos(theta);
|
|
@@ -863,26 +754,15 @@ function kerrMetricDerivatives(M, a, r, theta) {
|
|
|
863
754
|
dth[3][3] = ((2 * s * c * A + s * s * dAt) * Sigma - s * s * A * dSt) / Sigma2;
|
|
864
755
|
return { dr, dth };
|
|
865
756
|
}
|
|
757
|
+
/**
|
|
758
|
+
* Γ^ρ_{μν} from a metric and its analytic partial derivatives, through the
|
|
759
|
+
* one Christoffel builder (`computeChristoffelTensor`). A `null` derivative
|
|
760
|
+
* is a coordinate the metric does not depend on.
|
|
761
|
+
*/
|
|
866
762
|
function christoffelFrom(g, dg) {
|
|
867
|
-
const
|
|
868
|
-
const
|
|
869
|
-
|
|
870
|
-
for (let mu = 0; mu < 4; mu++) {
|
|
871
|
-
for (let nu = mu; nu < 4; nu++) {
|
|
872
|
-
let s = 0;
|
|
873
|
-
for (let sigma = 0; sigma < 4; sigma++) {
|
|
874
|
-
const dmu = dg[mu]?.[nu][sigma] ?? 0;
|
|
875
|
-
const dnu = dg[nu]?.[mu][sigma] ?? 0;
|
|
876
|
-
const dsig = dg[sigma]?.[mu][nu] ?? 0;
|
|
877
|
-
s += gi[rho][sigma] * (dmu + dnu - dsig);
|
|
878
|
-
}
|
|
879
|
-
const v = 0.5 * s;
|
|
880
|
-
G[rho][mu][nu] = v;
|
|
881
|
-
G[rho][nu][mu] = v;
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
return G;
|
|
763
|
+
const gInverseFlat = invert4(g).flat();
|
|
764
|
+
const tensor = computeChristoffelTensor(gInverseFlat, (mu) => (dg[mu] ?? mat4()).flat(), 4, ENGINE);
|
|
765
|
+
return ENGINE.toNested(tensor);
|
|
886
766
|
}
|
|
887
767
|
function kerrChristoffel(M, a, r, theta) {
|
|
888
768
|
const partial = kerrMetricDerivatives(M, a, r, theta);
|
|
@@ -892,7 +772,7 @@ function kerrChristoffel(M, a, r, theta) {
|
|
|
892
772
|
export function kerrChristoffelFdGap(M, a, r, theta) {
|
|
893
773
|
const x = [0, r, theta, 0];
|
|
894
774
|
const analytic = kerrChristoffel(M, a, r, theta);
|
|
895
|
-
const fd = christoffelOf(kerrMetric(M, a), x
|
|
775
|
+
const fd = christoffelOf(kerrMetric(M, a), x);
|
|
896
776
|
let gap = 0;
|
|
897
777
|
for (let rho = 0; rho < 4; rho++) {
|
|
898
778
|
for (let mu = 0; mu < 4; mu++) {
|
|
@@ -942,18 +822,18 @@ function carterState(M, a, r, theta, E, L, Q, mu2, signR, signTheta, allowOffShe
|
|
|
942
822
|
const c = Math.cos(theta);
|
|
943
823
|
const s = Math.sin(theta);
|
|
944
824
|
if (!(Math.abs(s) > 1e-6))
|
|
945
|
-
throw new
|
|
825
|
+
throw new MetricValueError('Boyer–Lindquist geodesic wants θ away from the poles');
|
|
946
826
|
const Sigma = r * r + a * a * c * c;
|
|
947
827
|
const Delta = r * r - 2 * M * r + a * a;
|
|
948
828
|
if (!(Delta > 0))
|
|
949
|
-
throw new
|
|
829
|
+
throw new MetricValueError('geodesic start must be outside the horizon');
|
|
950
830
|
const R = radialPotential(M, a, r, E, L, Q, mu2);
|
|
951
831
|
const Theta = Q - c * c * (a * a * (mu2 - E * E) + (L * L) / (s * s));
|
|
952
832
|
const scale = Math.max(1, E * E, L * L, Math.abs(Q));
|
|
953
833
|
if (R < -1e-8 * scale && !allowOffShell)
|
|
954
|
-
throw new
|
|
834
|
+
throw new MetricValueError('radial potential is negative at the start');
|
|
955
835
|
if (Theta < -1e-8 * scale && !allowOffShell)
|
|
956
|
-
throw new
|
|
836
|
+
throw new MetricValueError('polar potential is negative at the start');
|
|
957
837
|
const g = kerrMetric(M, a)([0, r, theta, 0]);
|
|
958
838
|
const det = g[0][0] * g[3][3] - g[0][3] * g[0][3];
|
|
959
839
|
const ut = (g[3][3] * -E - g[0][3] * L) / det;
|
|
@@ -962,24 +842,38 @@ function carterState(M, a, r, theta, E, L, Q, mu2, signR, signTheta, allowOffShe
|
|
|
962
842
|
const uth = signTheta * Math.sqrt(Math.max(Theta, 0)) / Sigma;
|
|
963
843
|
return [0, r, theta, 0, ut, ur, uth, uphi];
|
|
964
844
|
}
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
845
|
+
/**
|
|
846
|
+
* The state `[t, r, θ, φ, u^t, u^r, u^θ, u^φ]` after `steps` RK4 steps of
|
|
847
|
+
* the second-order geodesic equation over an affine extent `tauEnd`, by
|
|
848
|
+
* `integrateGeodesic` of `geodesic-integrator.ts` with `gammaAt` packed into
|
|
849
|
+
* its flat layout `G[16·μ + 4·ν + ρ] = Γ^μ_{νρ}`.
|
|
850
|
+
*/
|
|
851
|
+
function integrateWithChristoffel(gammaAt, y0, tauEnd, steps) {
|
|
852
|
+
const christoffelFn = (x, out) => {
|
|
853
|
+
const flat = out ?? new Float64Array(64);
|
|
854
|
+
const gamma = gammaAt(x[1], x[2]);
|
|
855
|
+
for (let mu = 0; mu < 4; mu++) {
|
|
856
|
+
for (let nu = 0; nu < 4; nu++) {
|
|
857
|
+
for (let rho = 0; rho < 4; rho++)
|
|
858
|
+
flat[16 * mu + 4 * nu + rho] = gamma[mu][nu][rho];
|
|
859
|
+
}
|
|
976
860
|
}
|
|
977
|
-
return
|
|
861
|
+
return flat;
|
|
978
862
|
};
|
|
863
|
+
const result = integrateGeodesicRK4({
|
|
864
|
+
christoffelFn,
|
|
865
|
+
x0: [y0[0], y0[1], y0[2], y0[3]],
|
|
866
|
+
v0: [y0[4], y0[5], y0[6], y0[7]],
|
|
867
|
+
tauStart: 0,
|
|
868
|
+
tauEnd,
|
|
869
|
+
steps,
|
|
870
|
+
});
|
|
871
|
+
return [...result.xFinal, ...result.vFinal];
|
|
872
|
+
}
|
|
873
|
+
/** `fraction` of an orbit's angular period, from the start's angular rate. */
|
|
874
|
+
function orbitExtent(y0, fraction) {
|
|
979
875
|
const angular = Math.max(Math.abs(y0[7]), Math.abs(y0[6]), 1e-12);
|
|
980
|
-
|
|
981
|
-
const sol = solveODESystem((_t, s) => accel(s), y0.slice(), [0, steps * h], { dt: h });
|
|
982
|
-
return sol.y[sol.y.length - 1] ?? y0.slice();
|
|
876
|
+
return ((2 * Math.PI) / angular) * fraction;
|
|
983
877
|
}
|
|
984
878
|
function sampleOf(metric, a, y0, y1, steps, mu2) {
|
|
985
879
|
const start = conservedOf(metric, a, y0, mu2);
|
|
@@ -1015,7 +909,7 @@ export function kerrGeodesic(opts) {
|
|
|
1015
909
|
const M = opts.M ?? 1;
|
|
1016
910
|
const chi = opts.aOverM ?? 0;
|
|
1017
911
|
if (!(M > 0) || !(Math.abs(chi) <= 1))
|
|
1018
|
-
throw new
|
|
912
|
+
throw new MetricValueError('Kerr geodesic wants M > 0 and |a/M| ≤ 1');
|
|
1019
913
|
const a = chi * M;
|
|
1020
914
|
const r = (opts.rOverM ?? 10) * M;
|
|
1021
915
|
const theta = opts.theta ?? Math.PI / 2;
|
|
@@ -1024,7 +918,7 @@ export function kerrGeodesic(opts) {
|
|
|
1024
918
|
const fraction = opts.fraction ?? 0.01;
|
|
1025
919
|
const metric = kerrMetric(M, a);
|
|
1026
920
|
const y0 = carterState(M, a, r, theta, opts.E, opts.L, opts.Q, mu2, opts.signR ?? 1, opts.signTheta ?? 1, opts.allowOffShell === true);
|
|
1027
|
-
const y1 =
|
|
921
|
+
const y1 = integrateWithChristoffel((rr, th) => kerrChristoffel(M, a, rr, th), y0, orbitExtent(y0, fraction), steps);
|
|
1028
922
|
return sampleOf(metric, a, y0, y1, steps, mu2);
|
|
1029
923
|
}
|
|
1030
924
|
/**
|
|
@@ -1036,14 +930,14 @@ export function kerrGeodesic(opts) {
|
|
|
1036
930
|
export function schwarzschildGeodesic(opts) {
|
|
1037
931
|
const M = opts.M ?? 1;
|
|
1038
932
|
if (!(M > 0))
|
|
1039
|
-
throw new
|
|
933
|
+
throw new MetricValueError('Schwarzschild geodesic wants M > 0');
|
|
1040
934
|
const r = (opts.rOverM ?? 10) * M;
|
|
1041
935
|
const theta = opts.theta ?? Math.PI / 2;
|
|
1042
936
|
const steps = opts.steps ?? 80;
|
|
1043
937
|
const fraction = opts.fraction ?? 0.01;
|
|
1044
938
|
const metric = schwarzschildMetric(M, 1, 1);
|
|
1045
939
|
const y0 = carterState(M, 0, r, theta, opts.E, opts.L, opts.Q, 1, opts.signR ?? 1, opts.signTheta ?? 1, false);
|
|
1046
|
-
const y1 =
|
|
940
|
+
const y1 = integrateWithChristoffel((rr, th) => schwarzschildChristoffel(M, rr, th), y0, orbitExtent(y0, fraction), steps);
|
|
1047
941
|
return sampleOf(metric, 0, y0, y1, steps, 1);
|
|
1048
942
|
}
|
|
1049
943
|
/**
|
|
@@ -1057,7 +951,7 @@ export function kerrEquatorialCircular(opts) {
|
|
|
1057
951
|
const chi = opts?.aOverM ?? 0;
|
|
1058
952
|
const rOverM = opts?.rOverM ?? 10;
|
|
1059
953
|
if (!(M > 0) || !(Math.abs(chi) <= 1))
|
|
1060
|
-
throw new
|
|
954
|
+
throw new MetricValueError('|a/M| must be at most 1');
|
|
1061
955
|
const eq = equatorialCircular(M, chi * M, rOverM * M, opts?.prograde !== false);
|
|
1062
956
|
return kerrGeodesic({
|
|
1063
957
|
M,
|