-
Notifications
You must be signed in to change notification settings - Fork 98
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
[operators] add SparseBlockOperator #889
Conversation
Windows CI finished unexpectedly fast, @renefritze. |
@@ -79,6 +79,15 @@ def action_BlockOperator(self, op): | |||
else: | |||
return sps.bmat(mat_blocks, format=format) | |||
|
|||
@match_class(SparseBlockOperator) | |||
def action_SparseBlockOperator(self, op): | |||
format = self.format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop line
def apply_adjoint(self, V, mu=None): | ||
assert V in self.range | ||
|
||
V_blocks = [None for j in range(self.num_source_blocks)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> U_blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, I am not completely sure we need this in pyMOR ATM. In particular, I do not really see the practical benefit in having a sparse implementation. Also, there might be alternatives. In particular, one could extend __init__
or a have a dedicated factory method so that one can pass the blocks in some sparse format. Also, what I dislike about this approach is that it adds another incompatible type of blocked Operator
I will have to special-case for in algorithms which somehow work with the block structure. I would really prefer an approach, where only the interal storage format is changed, like with NumpyMatrixOperator
, maybe making blocks
a property that always returns an array, or at least let SparseBlockOperator
derive from BlockOperator
.
We might also consider adding this to the playground
. We didn't put anything there for quite a while.
It seems that pydata/sparse supports |
This has been lying around for ages, without me requiring it anymore. Should we drop/delete this and start anew once someone needs this? |
No description provided.