+
Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Conversation

sritchie
Copy link
Member

@sritchie sritchie commented Mar 23, 2022

  • Port hamilton.cljc from scmutils #503:

    • Changes the default implementation of square and cube for differentials
      to use (expt <> 2) etc instead of (* <> <>).

      This is a big deal! For certain expressions there's a huge blowup when you
      square a big symbolic term, and taking the derivative of it TWICE is very
      messy.

      With this change, differentials use the chain rule to calculuate the
      derivative of $x^2$ as $2x*x'$, instead of using the product rule and
      achieving a SECOND differentiatation of the same form and another
      multiplication: $xx' + x'x$.

      Before a judicious simplify call I added, this change dropped the runtime
      of the sicmutils.sicm.ch3-test suite down by 6x. After the simplify change
      in sicmutils.examples.top the tests were still 40% faster in that
      namespace.

    • Fixes a bug where the RationalFunction cube implementation actually called
      square.

    • adds sicmutils.mechanics.lagrange/Lagrangian for building function
      signatures of Lagrangians.

    • adds the sicmutils.mechanics.time-evolution namespace

    • adds sicmutils.mechanics.lagrange/L-axisymmetric-top, more efficient than
      the version in sicmutils.examples.top

    • Fleshes out sicmutils.mechanics.hamilton:

      • New functions: H-state?, compatible-H-state?, state->p, momenta,
        P, literal-Hamiltonian-state, L-state->H-state, H-state->L-state,
        H-state->matrix, matrix->H-state, make-Hamiltonian, D-phase-space,
        Hamiltonian->Lagrangian-procedure, Hamiltonian->Lagrangian,
        flow-derivative, flow-transform, standard-map-inverse, F->K,
        J-func, T-func, canonical-H?, canonical-K?,
        linear-function->multiplier, Phi, Phi*, qp-canonical?,
        polar-canonical-inverse, two-particle-center-of-mass ,
        two-particle-center-of-mass-canonical, transpose-function,
        multiplicative-transpose, symplectic-two-form, canonical-transform?,
        J-matrix, symplectic?

      • F->CH moves to F->CT (F->CT is now an alias)

      • Legendre-transform-fn becomes Legendre-transform-procedure and gains
        more correctness tests, toggled on and off by the
        *validate-Legendre-transform?* dynamic variable.

Base automatically changed from sritchie/mechanics_2 to main March 23, 2022 17:39
@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2022

Codecov Report

Merging #503 (4246ba1) into main (7ea2eee) will decrease coverage by 0.12%.
The diff coverage is 79.88%.

@@            Coverage Diff             @@
##             main     #503      +/-   ##
==========================================
- Coverage   86.67%   86.54%   -0.13%     
==========================================
  Files         103      104       +1     
  Lines       14751    14981     +230     
  Branches      776      779       +3     
==========================================
+ Hits        12786    12966     +180     
- Misses       1189     1236      +47     
- Partials      776      779       +3     
Impacted Files Coverage Δ
src/sicmutils/rational_function.cljc 81.17% <0.00%> (ø)
src/sicmutils/mechanics/rotation.cljc 81.41% <28.57%> (ø)
src/sicmutils/calculus/covariant.cljc 85.46% <68.00%> (ø)
src/sicmutils/mechanics/time_evolution.cljc 71.42% <71.42%> (ø)
src/sicmutils/mechanics/hamilton.cljc 84.75% <81.75%> (-11.00%) ⬇️
src/sicmutils/mechanics/lagrange.cljc 99.02% <86.66%> (-0.64%) ⬇️
src/sicmutils/differential.cljc 93.06% <100.00%> (+0.02%) ⬆️
src/sicmutils/examples/top.cljc 66.66% <100.00%> (ø)
src/sicmutils/generic.cljc 84.06% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ea2eee...4246ba1. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载