Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stefan Kesselheim
jax-md
Commits
873d1338
Commit
873d1338
authored
Feb 21, 2020
by
Sam Schoenholz
Browse files
Added utility to compute bulk modulus.
parent
9a953fd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
jax_md/quantity.py
View file @
873d1338
...
...
@@ -138,3 +138,7 @@ def pair_correlation(displacement_or_metric, rs, sigma):
def
box_size_at_number_density
(
particle_count
,
number_density
,
spatial_dimension
):
return
np
.
power
(
particle_count
/
number_density
,
1
/
spatial_dimension
)
def
bulk_modulus
(
elastic_tensor
):
return
np
.
einsum
(
'iijj->'
,
elastic_tensor
)
/
elastic_tensor
.
shape
[
0
]
**
2
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment