Skip to content

Commit 939a3b5

Browse files
committed
Fix bad bug in potential_energy_fn
1 parent 2daa3b1 commit 939a3b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name = "jsrm" # Required
1717
#
1818
# For a discussion on single-sourcing the version, see
1919
# https://packaging.python.org/guides/single-sourcing-package-version/
20-
version = "0.0.13" # Required
20+
version = "0.0.14" # Required
2121

2222
# This is a one-line description or tagline of what your project does. This
2323
# corresponds to the "Summary" metadata field:

src/jsrm/systems/planar_pcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def potential_energy_fn(
417417
# compute the stiffness matrix
418418
K = stiffness_fn(params, B_xi, formulate_in_strain_space=True)
419419
# elastic energy
420-
U_K = (xi - xi_eq).T @ K @ (xi - xi_eq) # evaluate K(xi) = K @ xi
420+
U_K = 0.5 * (xi - xi_eq).T @ K @ (xi - xi_eq) # evaluate K(xi) = K @ xi
421421

422422
# gravitational potential energy
423423
params_for_lambdify = select_params_for_lambdify_fn(params)

0 commit comments

Comments
 (0)