Skip to content
Snippets Groups Projects
Commit 7b8d189d authored by Markus Blatt's avatar Markus Blatt
Browse files

Create sparse matrix with contiguous memory for MatrixMarket.

The current behavior (allocating each row separately ) is rather
surprising and unnecessary as the matrix market file stores the
number of nonzeros anyway. Hence we now pass this number to
BCRSMatrix::SetSize to get the most efficient behavior
parent 90236d45
No related branches found
No related tags found
1 merge request!481Create sparse matrix with contiguous memory for MatrixMarket.
Pipeline #44551 passed
......@@ -1014,7 +1014,7 @@ namespace Dune
istr.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
matrix.setSize(blockrows, blockcols);
matrix.setSize(blockrows, blockcols, nnz);
matrix.setBuildMode(Dune::BCRSMatrix<T,A>::row_wise);
if(header.type==array_type)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment