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

Update constraint assembly #364

Open
wants to merge 6 commits into
base: update_tangent_application
Choose a base branch
from

Conversation

ddement
Copy link
Collaborator

@ddement ddement commented Feb 27, 2025

This is a series of commits which make three major changes to the way that constraints are assembled into the global system. The result is a significant improvement in performance, as highlighted in issue #363. The major changes are highlighted in the three main commits:

  1. The transpose of the constraints matrix is now done at constraint variable calculation time rather than trying to perform this operation on the sparse matrix itself.
  2. The components of the residual arising from multiplying lambda with the transposed constraint matrix are now computed at constraint variable calculation time rather than using a spgmv operation. Similarly, the non-transposed constraint matrix contributions are now multiplied by the tangent matrix at variable calculation time rather than using a spgemm algorithm.
  3. All of the work done in CalculateConstraintResidualGradient is now done in local stack memory, just copying to/from the global heap memory at the beginning and end.

The PR looks massive because Git is interpreting some of the structural changes as complete rewrites of those files. To understand the meaningful changes, look at calculate_constraint_residual_gradient.hpp, assemble_constraints_matrix.hpp, and assemble_constraints_residual.hpp.

@ddement ddement self-assigned this Feb 28, 2025
@ddement ddement force-pushed the update_constraint_assembly branch from b1f04ef to 6d728c2 Compare February 28, 2025 14:56
@ddement ddement force-pushed the update_constraint_assembly branch from 6d728c2 to e749b12 Compare February 28, 2025 15:11
@ddement ddement marked this pull request as ready for review February 28, 2025 15:50
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

Successfully merging this pull request may close these issues.

1 participant