Added various other variants of MILU.

These versions are inspired by the ones used in SuperLU and the enums
to choose them have simuilar names, but without leading S (MILU_1-MILU_3).

The following variants are supported (chosen by the enum MILU_VARIANT):
ILU: plain ILU
MILU_1:  lump diagonal with dropped row entries.
MILU_2:  lump diagonal with the sum of the absolute values of the dropped row
         entries.
MILU_3: if diagonal is positive add sum of dropped row entrires. Otherwise substract them.
MILU_4: if diagonal is positive add sum of dropped row entrires. Otherwise do nothing
This commit is contained in:
Markus Blatt
2018-07-02 12:29:55 +02:00
parent 59b99d9ef9
commit 63058559bc
4 changed files with 170 additions and 57 deletions

View File

@@ -28,6 +28,7 @@
#include <opm/autodiff/CPRPreconditioner.hpp>
#include <opm/autodiff/NewtonIterationBlackoilInterface.hpp>
#include <opm/common/utility/parameters/ParameterGroup.hpp>
#include <opm/autodiff/ParallelOverlappingILU0.hpp>
#include <array>
#include <memory>
@@ -44,7 +45,7 @@ namespace Opm
int linear_solver_restart_;
int linear_solver_verbosity_;
int ilu_fillin_level_;
bool ilu_milu_;
Opm::MILU_VARIANT ilu_milu_;
bool newton_use_gmres_;
bool require_full_sparsity_pattern_;
bool ignoreConvergenceFailure_;
@@ -70,7 +71,8 @@ namespace Opm
linear_solver_use_amg_ = param.getDefault("linear_solver_use_amg", linear_solver_use_amg_ );
ilu_relaxation_ = param.getDefault("ilu_relaxation", ilu_relaxation_ );
ilu_fillin_level_ = param.getDefault("ilu_fillin_level", ilu_fillin_level_ );
ilu_milu_ = param.getDefault("ilu_milu", ilu_milu_);
std::string milu("ILU");
ilu_milu_ = convertString2Milu(param.getDefault("ilu_milu", milu));
// Check whether to use cpr approach
const std::string cprSolver = "cpr";
@@ -91,7 +93,7 @@ namespace Opm
linear_solver_use_amg_ = false;
ilu_fillin_level_ = 0;
ilu_relaxation_ = 0.9;
ilu_milu_ = false;
ilu_milu_ = MILU_VARIANT::ILU;
}
};