ginkgo
ginkgo copied to clipboard
Adding a struct to `LinOp` that describes some generic Linear Operator properties.
Adding a struct to LinOp
that describes the properties of the linop might be useful, If required, the ConcreteLinop
can then have kernels checking/setting those properties. Some particular properties that come to mind now:
- lower triangular
- upper triangular
- symmetricity
- diagonal dominance
- positive definiteness
- orthogonality
- condition number estimate
- frobenius norm
- rank
If the user knows that the matrix has a certain property, which can be made use of, then they can even probably set it with gko::read
. Matrix market format has a header which mentions the properties in the header. That can also be used to set some of the properties.
We can probably even add properties common to many LinOp classes such as sorted_column_idxs
etc.
Migrated from #489
Zero matrix might be considered as one kind of properties.
Do you mean an additive identity ?
No, to make other LinOp know the input is zero. It's mainly used for Multigrid smoother (few iterations) to avoid first residual computation. But it can also be used to trigger different behavior of the Linop.