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

Improve reordering interface #940

Closed
upsj opened this issue Dec 17, 2021 Discussed in #939 · 3 comments · Fixed by #1059
Closed

Improve reordering interface #940

upsj opened this issue Dec 17, 2021 Discussed in #939 · 3 comments · Fixed by #1059
Milestone

Comments

@upsj
Copy link
Member

upsj commented Dec 17, 2021

As observed in #939, our reordering interface is easy to accidentally misuse.

Part of the issue is that Permutation violates the LinOp assumptions in some situations. A permutation matrix is square and, applied from the left (as LinOp::apply is intended), it permutes the rows of the input matrix. At the same time, Permutation allows column partitions and symmetric partitions with the same apply interface, even though they would be more correctly represented by a right_apply and conjugate_apply or however we want to call a Similarity Transformation, because with the plain LinOp interface, column permutations of non-square matrices are not possible at all, and symmetric permutations are not possible dimension-wise.

Related issue: #346

@Slaedr
Copy link
Contributor

Slaedr commented Jan 10, 2022

This is somewhat relevant here: the operation S1-1 A S2-1 S2 x = S1-1 b is needed for "batched scaled" batch solvers. Usually, the left matrix would be applied to both the matrix and the RHS vector, and could be done together. Therefore, for now I introduced a free function two_sided_system_transform(exec, left_op, right_op, mat, vec) to do this operation. I guess there might be a better name for it.

@upsj
Copy link
Member Author

upsj commented Mar 13, 2023

This was only partially closed by the aforementioned PR, the issues with the Permutation class and the overuse of apply for non-vector related operations remain (also related to #1169)

@upsj upsj reopened this Mar 13, 2023
@upsj
Copy link
Member Author

upsj commented Nov 13, 2023

Fixed by #1415

@upsj upsj closed this as completed Nov 13, 2023
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 a pull request may close this issue.

2 participants