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:
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user