Refactor flex stiffness storage to support variable sizes.
This change introduces `nflexstiffness` and `flex_stiffnessadr` to allow flex stiffness matrices to have sizes other than the fixed 21 per element. Higher-order flexes can now store larger stiffness matrices based on their number of nodes. The `flex_stiffnessadr` array provides the starting index for each flex's stiffness data within the `flex_stiffness` array. PiperOrigin-RevId: 899632263 Change-Id: Ie49182c46c3777acf0c6b492345edfcf62fb5e44
This commit is contained in:
committed by
Copybara-Service
parent
08bb6e66f1
commit
5724158593
@@ -1040,6 +1040,7 @@ struct mjModel_ {
|
||||
mjtSize nflexedge; // number of edges in all flexes
|
||||
mjtSize nflexelem; // number of elements in all flexes
|
||||
mjtSize nflexelemdata; // number of element vertex ids in all flexes
|
||||
mjtSize nflexstiffness; // number of stiffness parameters in all flexes
|
||||
mjtSize nflexelemedge; // number of element edge ids in all flexes
|
||||
mjtSize nflexshelldata; // number of shell fragment vertex ids in all flexes
|
||||
mjtSize nflexevpair; // number of element-vertex pairs in all flexes
|
||||
@@ -1323,6 +1324,7 @@ struct mjModel_ {
|
||||
int* flex_elemadr; // first element address (nflex x 1)
|
||||
int* flex_elemnum; // number of elements (nflex x 1)
|
||||
int* flex_elemdataadr; // first element vertex id address (nflex x 1)
|
||||
int* flex_stiffnessadr; // stiffness matrix address (nflex x 1)
|
||||
int* flex_elemedgeadr; // first element edge id address (nflex x 1)
|
||||
int* flex_shellnum; // number of shells (nflex x 1)
|
||||
int* flex_shelldataadr; // first shell data address (nflex x 1)
|
||||
@@ -1351,7 +1353,7 @@ struct mjModel_ {
|
||||
mjtNum* flexedge_invweight0; // edge inv. weight in qpos0 (nflexedge x 1)
|
||||
mjtNum* flex_radius; // radius around primitive element (nflex x 1)
|
||||
mjtNum* flex_size; // vertex bounding box half sizes in qpos0 (nflex x 3)
|
||||
mjtNum* flex_stiffness; // finite element stiffness matrix (nflexelem x 21)
|
||||
mjtNum* flex_stiffness; // finite element stiffness matrix (nflexstiffness x 1)
|
||||
mjtNum* flex_bending; // bending stiffness (nflexedge x 17)
|
||||
mjtNum* flex_damping; // Rayleigh's damping coefficient (nflex x 1)
|
||||
mjtNum* flex_edgestiffness; // edge stiffness (nflex x 1)
|
||||
|
||||
Reference in New Issue
Block a user