Conversation
shakedregev
left a comment
There was a problem hiding this comment.
Still need to test this. Looks good except for naming inconsistencies.
shakedregev
left a comment
There was a problem hiding this comment.
Approved pending fixes to variable names
|
It's impressive that there are such substantial speed gains on even a small system. This means that for real systems it's probably astronomical. I wonder if we can test that. |
There was a problem hiding this comment.
- CSR matrix implementation should remain in the
*.cppfile. - I would avoid using STL containers here because we want to prototype parallel implementations.
- Do not use existing COO matrix implementation in GridKit. If needed, port COO matrix from Re::Solve.
I made some other (mostly nitpicking) comments about the code.
nkoukpaizan
left a comment
There was a problem hiding this comment.
Excellent work!
I only have a few minor comments.
One last thing is that there are some calls to sysmodel.getJacobian().printMatrix() in examples/PowerElectronics that will no longer be effective. It would be good to update to print the CSR matrix instead. We can always updated again when we remove the temporary getCsrJacobian method.
113cdd6 to
51c0f46
Compare




Description
Jacobian assembly currently uses a COO matrix, and we sort and rebuild CSR row pointers each step for IDA. The overhead from this process can become a bottleneck as nnz grows. This change keeps the system Jacobian in CSR and preserves a COO→CSR mapping for direct CSR updates.
Closes #301
cc @nkoukpaizan
Proposed changes
PowerElectronicsModel.allocate()to populate CSR entries and preserve the mapping.CsrJacfor the solver configuration (PhasorDynamicsstill uses theJacfunction).Currently
PowerElectronicsonly.Checklist
-Wall -Wpedantic -Wconversion -Wextra.