Some codes use a fixed sparsity pattern for a matrix instead of filtering small values. Using this routine, the matrix is filled to have the same pattern as the second matrix argument. Zeros of the sparsity pattern are left in, whereas values outside the sparsity are removed. This can faciliate conversion between formats.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(inout) | :: | mat | The matrix to modify. |
||
type(Matrix_ps), | intent(in) | :: | pattern | The matrix which defines the sparsity pattern. |