Skip to content
Snippets Groups Projects
Commit 55d6576e authored by Oliver Sander's avatar Oliver Sander
Browse files

Remove an out-commented test for a way to build a BCRSMatrix that won't work anyway

The BCRSMatrix code clearly shows that you have to call endrowsizes before calling
addindex.  Therefore the third way to build a BCRSMatrix in the 'random' way is wrong
and should be removed from the test.
parent 955fbd56
No related branches found
No related tags found
No related merge requests found
......@@ -49,24 +49,11 @@ struct Builder<Dune::BCRSMatrix<B,A> >
/*{
Dune::BCRSMatrix<B,A> matrix( rows, cols, rows*maxNZCols, Dune::BCRSMatrix<B,A>::random );
for(int i=0; i<rows; ++i){
matrix.setrowsize(i,maxNZCols);
if(i<cols)
matrix.addindex(i,i);
if(i-1>=0)
matrix.addindex(i,i-1);
if(i+1<cols)
matrix.addindex(i,i+1);
}
for(int i=0; i<rows; ++i)
matrix.setrowsize(i,maxNZCols);
matrix.endrowsizes();
Dune::printmatrix(std::cout, matrix, "random", "row");
}
{
Dune::BCRSMatrix<B,A> matrix( rows, cols, Dune::BCRSMatrix<B,A>::random );
for(int i=0; i<rows; ++i){
matrix.setrowsize(i,maxNZCols);
if(i<cols)
matrix.addindex(i,i);
if(i-1>=0)
......
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