Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solver Performance #13

Open
nithinp7 opened this issue May 2, 2023 · 0 comments
Open

Solver Performance #13

nithinp7 opened this issue May 2, 2023 · 0 comments

Comments

@nithinp7
Copy link
Owner

nithinp7 commented May 2, 2023

While the solver implementation itself is not the current performance bottleneck, we expect it should be the bottleneck once collision detection performance is improved as mentioned in #11 . To this end, we have been interested in several lofty ideas for speeding up the solver implementation itself.

One of the proposed motivations for the projective dynamics framework was the Cholesky pre-factorization of the system matrix - this theoretically should yield an incredibly efficient global optimization step, since the system is already solved up-to a small back-substitution step. In practice however, the system matrix factorization has to be regularly updated according to the ever-changing system connectivity due to collisions and fractures.

One option is to use sparse-Cholesky rank-updates that carefully update the original factorization based on system rank-updates. To my knowledge, CHOLMOD by Dr. Timothy Davis is the only out-of-box tool that is capable of this. From a limited amount of digging so far, it seemed incredibly painful to set up, possibly requiring a Fortran compiler and very specific environment dependencies. This CMake-based CHOLMOD wrapper library seems promising to reduce some of the pain, but more investigation is needed to determine the viability of integrating it into Pies: https://github.com/sergiud/SuiteSparse.

Another option is to use the original Cholesky factorization of the system matrix as a precondition step for alternative, iterative techniques. Conjugate gradient descent, Chebyshev iterations, and alternating-direction method of multipliers have all been implemented with projective dynamics in the literature. Without knowing all the details, I suspect there is an elegant hybrid method to be discovered that combines:

  • preconditioning via precomputed Cholesky factorizations,
  • asynchronous precondition matrix factorization updates based on changing system connectivity,
  • and uses iterative methods to compute the actual solution to the system, preconditioned with the most up-to-date factorization available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant