MatrixConversionModule Module

This module contains helper routines for converting an NTPoly matrix to data structures used in other programs.



Contents


Subroutines

public subroutine SnapMatrixToSparsityPattern(mat, pattern)

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.

Arguments

Type IntentOptional AttributesName
type(Matrix_ps), intent(inout) :: mat

The matrix to modify.

type(Matrix_ps), intent(in) :: pattern

The matrix which defines the sparsity pattern.