Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • iMSTK iMSTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 83
    • Issues 83
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • iMSTKiMSTK
  • iMSTKiMSTK
  • Issues
  • #287
Closed
Open
Issue created Mar 20, 2021 by Andrew Wilson@andrew.wilson🐘Contributor

Separate PBD constraint generation from PbdModel

It would probably be good to separate these and provide another class for generating constraints. One that can be subclassed and customized by a user without having to subclass PbdModel itself to customize. This would also nicely reduce the size of the PbdModel class.

It could serve as sort of a constraint generation policy. For example, right now we define constraint generation in a global matter with enums. If "enableConstraint" then it is assumed the user wants these constraints everywhere on the mesh. What happens when the mesh changes? Or is entirely replaced?

Ideally this almost functor like policy class would have two virtual functions.

  • One for a global change, called when initializing the first time or if the geometry of the model completely replaced.
  • The second for local change and local reinit. It would preserve the original constraint parameters and possibly remap the indices of the constraints if topology change occurred. Optionally no map is provided (this would be if buffering and removal was used such that indices do not change).

This way a user could provide a very custom constraint generation policy for custom applications (for instance in VESS there is a mask of vertices that don't even have constraints). Might be a nice way to deal with topology changes of the PbdModel.

Edited Mar 21, 2021 by Andrew Wilson
Assignee
Assign to
Time tracking