Skip to content
Snippets Groups Projects
Commit b0291a78 authored by Christian Engwer's avatar Christian Engwer
Browse files

Merge branch 'feature/fix#34' into 'master'

[bugfix] make sure rows are also constructed

Closes #34

See merge request core/dune-istl!155
parents 2942f245 f2048a6b
No related branches found
No related tags found
No related merge requests found
......@@ -2149,6 +2149,9 @@ namespace Dune {
if (r)
DUNE_THROW(InvalidStateException,"Rows have already been allocated, cannot allocate a second time");
r = rowAllocator_.allocate(rows);
// initialize row entries
for(row_type* ri=r; ri!=r+rows; ++ri)
rowAllocator_.construct(ri, row_type());
}else{
r = 0;
}
......@@ -2163,8 +2166,6 @@ namespace Dune {
j_.reset(sizeAllocator_.allocate(allocationSize_),Deallocator(sizeAllocator_));
}else{
j_.reset();
for(row_type* ri=r; ri!=r+rows; ++ri)
rowAllocator_.construct(ri, row_type());
}
// Mark the matrix as not built.
......
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