Skip to content

Commit 883e499

Browse files
authored
Update README.md
1 parent 3ac6a3e commit 883e499

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ Use:
139139
stress = cutde.fullspace.strain_to_stress(strain, sm, nu)
140140
```
141141

142-
to convert from stress to strain assuming isotropic linear elasticity. `sm` is the shear modulus and `nu` is the Poisson ratio.
142+
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:
143+
144+
```
145+
strain_to_stress(strain_matrix.reshape((-1, 6)), mu, nu).reshape(strain_matrix.shape)
146+
```
143147

144148
## All pairs interactions matrix
145149

0 commit comments

Comments
 (0)