Replies: 1 comment 2 replies
-
Hi, do you mean something like this: K = LinearOperator(
T,
id.nvar + id.ncon,
id.nvar + id.ncon,
true,
true,
(res, v, α, β) ->
opK2_5prod!(res, id.nvar, fd.Q, D, fd.A, sqrtX1X2, tmp1, tmp2, δv, v, α, β, fd.uplo),
) (taken from https://github.com/JuliaSmoothOptimizers/RipQP.jl/blob/a44357fa457a0d6a38337e18c49fd4b72fdab3b5/src/iterations/solvers/augmented/K2_5Krylov.jl#L159)? If you want to modify the values of the vector Another option (maybe more advanced) is to write a subtype of LinearOperators.jl/src/DiagonalHessianApproximation.jl Lines 17 to 52 in 9cb279b |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Trying to write a matrix-free solver using LinearOperators.jl and Krylov.jl
However, from this: https://jso.dev/tutorials/introduction-to-linear-operators/
I'm seeing that you can only use functions that follow the 5-argument (and 3)
mul!
operation.But I would like to create a linear operator that is able to take in more variables such as:
In LinearMaps.jl it would be something like:
Then I could use CFunc in IterativeSolvers.jl.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions