mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
[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:
@@ -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 )
|
||||
{
|
||||
|
Reference in New Issue
Block a user