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

BCRSMatrix does in fact allow empty rows. Only the consistency check in endrowsizes()

has to be adapted.

[[Imported from SVN: r656]]
parent 86c8541f
No related branches found
No related tags found
No related merge requests found
......@@ -824,8 +824,8 @@ namespace Dune {
size_type total=0;
for (size_type i=0; i<n; i++)
{
if (r[i].getsize()<=0)
DUNE_THROW(ISTLError,"rowsize must be positive");
if (r[i].getsize()<0)
DUNE_THROW(ISTLError,"rowsize must be nonnegative");
total += r[i].getsize();
}
......
......@@ -38,15 +38,6 @@ namespace Dune {
}
/** \brief Adds a dummy entry to each empty row
* \todo Remove this once BCRSMatrix allows empty rows
*/
void pad() {
for (int i=0; i<rows_; i++)
if (indices[i].size()==0)
add(i,0);
}
/** \brief Return the number of entries */
int size() const {
int entries = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment