Optimize flex by pinning nodes in empty cells.
This change introduces an optimization for flexcomp objects defined by a mesh. It identifies grid cells that do not contain any mesh vertices and marks them as empty. Nodes that are exclusively part of empty cells are pinned, preventing them from moving. Stiffness computations are skipped for empty cells, reducing computational cost. The total mass is now distributed only among the non-pinned nodes. PiperOrigin-RevId: 902565735 Change-Id: Id0a9a685536d5e18a3e42124a25ab08ff3a918f2
This commit is contained in:
committed by
Copybara-Service
parent
fa7b36d111
commit
508e581ba9
@@ -116,6 +116,11 @@ class mjCFlexcomp {
|
||||
std::string plugin_name;
|
||||
std::string plugin_instance_name;
|
||||
mjsPlugin plugin;
|
||||
|
||||
private:
|
||||
// identify empty cells and pin nodes exclusively in empty cells
|
||||
void MarkEmptyCells(mjCFlex* flex, const double* points, int npnt,
|
||||
const double minmax[6], int nx, int ny, int nz);
|
||||
};
|
||||
|
||||
#endif // MUJOCO_SRC_USER_USER_FLEXCOMP_H_
|
||||
|
||||
Reference in New Issue
Block a user