From 883e4999f27b2c124e2a9df64e847db2f941d069 Mon Sep 17 00:00:00 2001 From: Ben Thompson Date: Wed, 19 Jun 2024 23:32:59 -0600 Subject: [PATCH] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a48be52..b4610e9 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,11 @@ Use: stress = cutde.fullspace.strain_to_stress(strain, sm, nu) ``` -to convert from stress to strain assuming isotropic linear elasticity. `sm` is the shear modulus and `nu` is the Poisson ratio. +to convert from stress to strain assuming isotropic linear elasticity. `sm` is the shear modulus and `nu` is the Poisson ratio. The `strain` array here is expected to have a shape `(N, 6)`. In case you have a matrix or other shaped array, this snippet might help: + +``` +strain_to_stress(strain_matrix.reshape((-1, 6)), mu, nu).reshape(strain_matrix.shape) +``` ## All pairs interactions matrix