Refactor flex strain constraints to be per-cell.
Each mjEQ_FLEXSTRAIN equality now represents a single cell within a flex. This allows for more efficient sparse Jacobian computation by only considering the degrees of freedom of the nodes within each specific cell. This change gives a speedup of about 10x on a 3x3x3 model. PiperOrigin-RevId: 902164069 Change-Id: I78eedf1d5cf39b8989fe9863c22d164922fc0efb
This commit is contained in:
committed by
Copybara-Service
parent
a9e61966b5
commit
3d45a33190
@@ -4888,8 +4888,11 @@ constraint type is only supported for dimension 3 flexes with trilinear or quadr
|
||||
:at:`flex`: :at-val:`string, required`
|
||||
Name of the flex whose strain is being constrained.
|
||||
|
||||
.. _equality-flexstrain-cell:
|
||||
|
||||
|
||||
:at:`cell`: :at-val:`int(3), optional`
|
||||
3D grid index (i, j, k) identifying the cell in the flex object. The grid size is specified in the :ref:`cellcount
|
||||
<deformable-flex-cellcount>` attribute.
|
||||
|
||||
|
||||
.. _tendon:
|
||||
|
||||
@@ -2062,6 +2062,9 @@
|
||||
.. grid-item::
|
||||
:ref:`flex<equality-flexstrain-flex>`
|
||||
|
||||
.. grid-item::
|
||||
:ref:`cell<equality-flexstrain-cell>`
|
||||
|
||||
.. grid-item::
|
||||
:ref:`active<equality-flexstrain-active>`
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ General
|
||||
|
||||
- Added :ref:`multi-cell support<body-flexcomp-cellnum>` for trilinear and quadratic flexes. Note that the implicit
|
||||
integrator uses a dense solver for the flex degrees of freedom, which can be slow for multi-cell flexes.
|
||||
- Refactored ``flexstrain`` equality constraints to be instantiated per cell instead of per flex object, reducing the
|
||||
number of degrees of freedom per constraint row. The equality can be associated with a specific cell with the new
|
||||
attribute ":ref:`cell <equality-flexstrain-cell>`
|
||||
|
||||
Version 3.7.0 (April 14, 2026)
|
||||
------------------------------
|
||||
|
||||
Reference in New Issue
Block a user