NVIDIA / NVIDIA/warp

[QUESTION] Understanding warp.fem.deformation_gradient behaviour in deformed configurations

Open
#579 2 comments 0 reactions 1 assignee View on GitHub

@gdaviet is already working on this.

Since Mar 18, 2025.

question
Dominant language
Python
Stars
7.1k
Forks
624
Avg merge
3d 17h
Merged PRs (30d)
5

Description

Hi,

I'm implementing corotational FEM structural dynamics using warp.fem, and I'd like to clarify how fem.deformation_gradient works in the context of a deformed configuration.

My base geometry is a 3D grid, and at each simulation step, I create a deformed geometry using:

deformed_geo = u_field.make_deformed_geometry() # u_field is the displacement field (vec3d)
deformed_domain = fem.Cells(deformed_geo)

Since u_field.dof_values stores relative displacements from the base configuration, I call make_deformed_geometry using the default relative=True parameter.

I then compute per-element rotation matrices using fem.interpolate:

# in each step:
fem.interpolate(
  element_rotation_matrix_integrand,
  domain=deformed_domain,
  quadrature=fem.RegularQuadrature(deformed_domain, 0),
  values={'Re': Re} # output array of wp.mat33 with one slot per element
)

Inside element_rotation_matrix_integrand, I call:

F = fem.deformation_gradient(domain, s)

I expected F to represent the deformation gradient relative to the reference configuration, but in my case, F is always a diagonal matrix with the diagonal entries corresponding to element dimensions.

I want to make sure that I correctly compute the deformation gradient relative to the base configuration while working with deformed geometries in warp.fem.

Would you be able to clarify how this should be handled? Am I using deformation_gradient wrong? Thanks in advance!

Regards,
Chris

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.