[MILU] Add dropped elements only to diagonal.

We did add the dropped matrix blocks to the diagonal blocks,
but this is not MILU where oone only modifies the diagonal.
With this patch we fix this behaviour and now only modify the
diagonal of the diagonal block.
This commit is contained in:
Markus Blatt
2018-06-14 22:26:33 +02:00
parent 397fc78405
commit e0a138e23c

View File

@@ -179,7 +179,15 @@ namespace Opm
if ( a_ik.index() != irow.index() )
OPM_THROW(std::logic_error, "Matrix is missing diagonal for row " << irow.index());
*a_ik -= sum_dropped;
int index = 0;
for(const auto& row: sum_dropped)
{
for(const auto& val: row)
{
(*a_ik)[index][index]-=val;
}
++index;
}
if ( diagonal )
{