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

New initialization methods #89

Closed
dpo opened this issue Apr 18, 2024 · 5 comments
Closed

New initialization methods #89

dpo opened this issue Apr 18, 2024 · 5 comments

Comments

@dpo
Copy link
Member

dpo commented Apr 18, 2024

Internally, QRMumps stores its matrix in COO format. In NLPModels and NLSModels, we obtain Jacobians and Hessians in COO format. However, the only QRMumps.jl constructor that takes a matrix as argument requires it to be in CSC format.

I suggest adding two new constructors:

  1. One that takes in rows, cols and vals;
  2. One that takes in a SparseMatrixCOO.

In addition, when only vals changes (but rows and cols stay the same), is there a way to update the internal spmat structure instead of allocating a new one?

@amontoison
Copy link
Member

Yes, it's a good idea.
We should add these two constructors.

I implemented a routine qrm_update! to not allocate a new spmat:
https://jso.dev/QRMumps.jl/dev/api/#QRMumps.qrm_update!

@dpo
Copy link
Member Author

dpo commented Apr 20, 2024

I missed qrm_update!(). It would be great if it would also take vals or a SparseMatrixCOO.

@amontoison
Copy link
Member

Yes, I agree.
Temporary you can do spmat.val .= vals.

I would like to compile the recent release 3.1.0 with Yggdrasil + LBT before, but I haven't had much time to work on that recently.

@dpo
Copy link
Member Author

dpo commented Apr 21, 2024

Done in #91.

@dpo dpo closed this as completed Apr 21, 2024
@amontoison
Copy link
Member

I will tag a new release after #93.

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