| #
8a1df862
|
| 26-Mar-2025 |
Toby Isaac <toby.isaac@gmail.com> |
Mat: Improve the usability of constantdiagonal and diagonal matrices
Mat_ConstantDiagonal: Add MatConstantDiagonalGetConstant() and implement conjugate and transpose
Mat_Diagonal: Add missing setra
Mat: Improve the usability of constantdiagonal and diagonal matrices
Mat_ConstantDiagonal: Add MatConstantDiagonalGetConstant() and implement conjugate and transpose
Mat_Diagonal: Add missing setrandom, conjugate, and transpose methods
MatView: Don't print MatInfo for constantdiagonal or diagonal matrices
show more ...
|
| #
345a4b08
|
| 19-May-2023 |
Toby Isaac <toby.isaac@gmail.com> |
Add `MATDIAGONAL` and `PCMatSetApplyOperation()`
`MATDIAGONAL` (`MatCreateDiagonal()`) is an interface for manipulating a diagonal matrix as a `Vec`, in particular supporting no-copy modification of
Add `MATDIAGONAL` and `PCMatSetApplyOperation()`
`MATDIAGONAL` (`MatCreateDiagonal()`) is an interface for manipulating a diagonal matrix as a `Vec`, in particular supporting no-copy modification of the diagonal and inverse diagonal via `MatDiagonalGetDiagonal()`, `MatDiagonalRestoreDiagonal()`, `MatDiagonalGetInverseDiagonal()`, and `MatDiagonalRestoreInverseDiagonal`().
`PCMatSetApplyOperation()` and `PCMatGetApplyOperation()` support using all the linear operators currently defined by a `Mat` (`MatMult()`, `MatMultTranspose()`, `MatMultHermitianTranspose()`, `MatSolve()`, `MatSolveTranspose()`) as the operation of `PCApply()` for a `PCMAT`. The advantage over a `PCSHELL` is that the other operations (`PCApplyTranspose()`, `PCMatApply()`) are automatically inferred.
These tools help make it easier to route operations like `VecPointwiseMult()` and `VecPointwiseDivide()` through `KSPSolve()` to avoid handling diagonal matrices as a special case (a pattern that is going to be removed from `MATLMVM`).
show more ...
|