support user-specified permutation in CHOLMOD factorizations #10844
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes the
cholfact
andldltfact
sparse factorizations (via CHOLMOD) to accept aperm
argument specifying a user-defined permutation instead of the default AMD permutation. It also changes the (undocumented) optionalβ
argument to a (documented)shift
keyword argument. Some of the code is consolidated a bit, and I switched to using the new-styleRef{Complex128}
instead ofPtr{Cdouble}
(which seems easy to misuse by passing only a single real number when CHOLMOD sometimes expects two) for a couple of ccalls.I included a couple of other keywords args for cholmod options I was experimenting with, but was unsure whether to document them. Passing
perm
and settinguserperm_only=false
causes CHOLMOD to try both the user-specified permutation and AMD and pick the better of the two, and passingpostorder=false
omits a post-ordering pass in CHOLMOD (that doesn't affect nnz but supposedly effects supernodal efficiency).cc @andreasnoack, who helped track down the relevant functionality (I needed it for teaching, in order to show the effect of different orderings).