Skip to content

Implement correct 2d JIT solve! #6

Merged
kks32 merged 4 commits into
geoelements:mainfrom
chahak13:2d
Jun 20, 2023
Merged

Implement correct 2d JIT solve! #6
kks32 merged 4 commits into
geoelements:mainfrom
chahak13:2d

Conversation

@chahak13

Copy link
Copy Markdown
Collaborator

We now have working 2D JIT solvers! Compared results on the uniaxial_stress

To correct the 2D JIT solve with correct volume computation, 2 major changes were made:

  1. The elements class constructor now takes the total number of elements as an argument along with number of elements in both directions. This is so that jnp.bincount can work correctly without having to pass a tracer value to its length parameter.
  2. Update the MPMExplicit flattening/unflattening to include the velocity_update parameter to make it work with JIT.

chahak13 added 4 commits June 14, 2023 18:27
To correct the 2D JIT solve with correct volume computation, 2 major
changes were made:
1. The elements class constructor now takes the total number of elements
as an argument along with number of elements in both directions. This is
so that `jnp.bincount` can work correctly without having to pass a
tracer value to its `length` parameter.
2. Update the `MPMExplicit` flattening/unflattening to include the
`velocity_update` parameter to make it work with JIT.
@kks32 kks32 marked this pull request as ready for review June 20, 2023 22:59
@kks32 kks32 merged commit 68e52e9 into geoelements:main Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants