Relinquish row/nnz control to linsys assembler.

Pass the scalar number of rows and non-zeros into .setSize() along
with the number of degrees of freedom per cell.  This allows the
assembler to impose block structure in an optimal way for each
particular type of linear system.
This commit is contained in:
Bård Skaflestad
2011-10-03 12:47:33 +02:00
parent d5010efdba
commit d9aa8888ea
2 changed files with 3 additions and 6 deletions

View File

@@ -55,11 +55,8 @@ namespace Opm {
sz_t m = g.number_of_cells;
sz_t nnz = g.number_of_cells + countConnections(g);
m *= DofPerCell;
nnz *= DofPerCell * DofPerCell;
sys.matrix().setSize(m, m, nnz);
sys.vector().setSize(m);
sys.matrix().setSize(DofPerCell, m, m, nnz);
sys.vector().setSize(DofPerCell, m);
}
template <class ReservoirState,

View File

@@ -197,7 +197,7 @@ namespace Opm {
finalizeStructure();
void
setSize(size_t m, size_t n, size_t nnz = 0);
setSize(size_t ndof, size_t m, size_t n, size_t nnz = 0);
const Matrix&
matrix();