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

Saddle Operator #277

Open
lrsantos11 opened this issue Jun 23, 2023 · 4 comments
Open

Saddle Operator #277

lrsantos11 opened this issue Jun 23, 2023 · 4 comments

Comments

@lrsantos11
Copy link

Given operators opA, opM and opN, creates saddle point linear operator.

    SaddleOperator(opA, opM, opN; S = promote_type(storage_type.(opA, opM, opN)))

Creates saddle point linear operator:

    [ opM     opAᵀ ]
    [ opA     opN  ]

I'll contribute on this, using BlockDiagonalOperator as template.

"""
BlockDiagonalOperator(M1, M2, ..., Mn; S = promote_type(storage_type.(M1, M2, ..., Mn)))
Creates a block-diagonal linear operator:
[ M1 ]
[ M2 ]
[ ... ]
[ Mn ]
Change `S` to use LinearOperators on GPU.
"""

I already have implemented outside LO. Its a matter of just including, testing and PRing.

@dpo
Copy link
Member

dpo commented Jul 6, 2023

Looking forward to it! Thanks! More generally, SaddleOperator could be a special case of a BlockOperator.

@lrsantos11
Copy link
Author

@dpo It was nice to meet you at Seattle.
Regarding BlockOperator, do you think it should this be a super type of SaddleOperator, like
SaddleOperator <: BlockOperator?

@dpo
Copy link
Member

dpo commented Jul 7, 2023

It was great to (finally) meet you as well @lrsantos11 !

Now that I think of it, hcat and vcat already let us write K = [M A’ ; A N], so perhaps what you need is already there?!

@dpo
Copy link
Member

dpo commented Jul 11, 2023

@lrsantos11 The following already works

m, n = 5, 3
A = rand(m, n)
M = rand(m, m); M = M + M'
N = rand(n, n); N = N + N'
opA = LinearOperator(A)
opM = LinearOperator(M)
opN = LinearOperator(N)
K = [opM  opA ;
     opA' opN]

but it doesn’t let us specify that K is symmetric. We could add some logic to make that happen. But I think dedicated types BlockOperator and SaddleOperator are justified because they could have specific methods to retrieve individual blocks.

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

2 participants