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

Added a method pad() that adds a dummy entry to each row that doesn't

contain any entries at all.  This is needed because currently BCRSMatrix
doesn't allow rows that are completely empty.

[[Imported from SVN: r1438]]
parent cb3746a2
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,15 @@ 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.
Finish editing this message first!
Please register or to comment