-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update loops to use jax calls and JIT some functions #27
base: main
Are you sure you want to change the base?
Conversation
|
||
Parameters | ||
---------- | ||
obj : diffmpm.node.Nodes, diffmpm.particle._ParticlesState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be vel in the docstring or obj in the function, same issue with all the functions.
Damping forces on the nodes. | ||
loc : ArrayLike | ||
Locations of all the nodes. Expected shape (nnodes, 1, ndim) | ||
initialized: bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no parameters initialized,data in this method.
diffmpm/particle.py
Outdated
initialized: bool | ||
`False` if particle property arrays like mass need to be initialized. | ||
If `True`, they are set to values from `data`. | ||
data: tuple | ||
Tuple of length 13 that sets arrays for mass, density, volume, | ||
velocity, acceleration, momentum, strain, stress, strain_rate, | ||
dstrain, f_ext, reference_loc and volumetric_strain_centroid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These parameters are not present in this method also docstring for init_vel can be added.
Parameters | ||
---------- | ||
state: | ||
Current state | ||
elements: diffmpm._ElementState | ||
Elements that the particles are present in, and are used to | ||
compute the particles' volumes. | ||
total_elements: int | ||
Total elements present in `elements`. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring not matching function arguments
initialized: Optional[bool] = None, | ||
volume: Optional[ArrayLike] = None, | ||
) -> Quad4NState: | ||
"""Initialize Linear1D. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Initialize Linear1D. | |
"""Initialize Quad4N. |
|
||
def init_state( | ||
self, | ||
nelements: int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nelements: int, | |
nelements: chex.ArrayDevice, |
self, | ||
nelements: int, | ||
total_elements: int, | ||
el_len: float, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
el_len: float, | |
el_len: chex.ArrayDevice, |
To make the imports easier from the materials subdir, also restructured other files. This moves `MPM` to a separate file so as to remove circular imports for materials module.
a83eaeb
to
fcec796
Compare
No description provided.