77
88
99def substitute_params_into_all_symbolic_expressions (
10- sym_exps : Dict , params : Dict [str , jnp . array ]
10+ sym_exps : Dict , params : Dict [str , Array ]
1111) -> Dict :
1212 """
1313 Substitute robot parameters into symbolic expressions.
@@ -43,11 +43,10 @@ def substitute_params_into_all_symbolic_expressions(
4343
4444 return exps
4545
46-
4746def substitute_params_into_single_symbolic_expression (
4847 sym_exp : sp .Expr ,
4948 params_syms : Dict [str , List [sp .Symbol ]],
50- params : Dict [str , jnp . array ],
49+ params : Dict [str , Array ],
5150) -> sp .Expr :
5251 """
5352 Substitute robot parameters into a single symbolic expression.
@@ -72,7 +71,6 @@ def substitute_params_into_single_symbolic_expression(
7271
7372 return sym_exp
7473
75-
7674def concatenate_params_syms (
7775 params_syms : Dict [str , Union [sp .Symbol , List [sp .Symbol ]]],
7876) -> List [sp .Symbol ]:
@@ -85,16 +83,17 @@ def concatenate_params_syms(
8583 params_syms_cat .append (params_sym )
8684 return params_syms_cat
8785
88-
8986def compute_strain_basis (
9087 strain_selector : Array ,
91- ) -> jnp . ndarray :
88+ ) -> Array :
9289 """
9390 Compute strain basis based on boolean strain selector.
9491 Args:
95- strain_selector: boolean array of shape (n_xi, ) specifying which strain components are active
92+ strain_selector (Array):
93+ boolean array of shape (n_xi, ) specifying which strain components are active
9694 Returns:
97- strain_basis: strain basis matrix of shape (n_xi, n_q) where n_q is the number of configuration variables
95+ strain_basis (Array):
96+ strain basis matrix of shape (n_xi, n_q) where n_q is the number of configuration variables
9897 and n_xi is the number of strains
9998 """
10099 n_q = strain_selector .sum ().item ()
@@ -106,7 +105,6 @@ def compute_strain_basis(
106105 strain_basis = strain_basis .at [i , j ].set (1.0 )
107106 return strain_basis
108107
109-
110108@jit
111109def compute_planar_stiffness_matrix (l : Array , A : Array , Ib : Array , E : Array , G : Array ) -> Array :
112110 """
0 commit comments