Function opensn::InitMatrixSparsity(Mat&, int64_t, int64_t)
Defined in File petsc_utils.h
Function Documentation
-
void opensn::InitMatrixSparsity(Mat &A, int64_t nodal_nnz_in_diag, int64_t nodal_nnz_off_diag)
Initializes the sparsity pattern of a matrix.
This is a macro for:
MatMPIAIJSetPreallocation(A,0,nodal_nnz_in_diag.data(), 0,nodal_nnz_off_diag.data()); MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE); MatSetOption(A, MAT_IGNORE_ZERO_ENTRIES, PETSC_TRUE); MatSetUp(A);