From e192e5d7f1a94e797f114b6261eb82b332bf8e2a Mon Sep 17 00:00:00 2001 From: Maximilian Stolzle Date: Tue, 19 Nov 2024 11:13:13 -0500 Subject: [PATCH] Fix bug in specifying `D` --- examples/simulate_planar_pcs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/simulate_planar_pcs.py b/examples/simulate_planar_pcs.py index d34ffe0..53b6d00 100644 --- a/examples/simulate_planar_pcs.py +++ b/examples/simulate_planar_pcs.py @@ -36,10 +36,10 @@ "G": 1e3 * jnp.ones((num_segments,)), # Shear modulus [Pa] } params["D"] = 1e-3 * jnp.diag( - jnp.repeat( + (jnp.repeat( jnp.array([[1e0, 1e3, 1e3]]), num_segments, axis=0 - ).flatten(), -) * params["l"] + ) * params["l"][:, None]).flatten() +) # activate all strains (i.e. bending, shear, and axial) strain_selector = jnp.ones((3 * num_segments,), dtype=bool)