Use pressure for guiding coarsening in flow_ebos, too.

For flow_legacy the first component a block is used, which is the
oil pressure. As flow_ebos uses different indices this commit
explicitly uses BlackoilIndices::pressureSwitchIdx to tell the AMG
at which index the pressure is stored.
This commit is contained in:
Markus Blatt
2017-05-22 12:09:58 +02:00
parent 5a6ace9063
commit 79799a5c5c
3 changed files with 11 additions and 6 deletions

View File

@@ -276,7 +276,7 @@ createEllipticPreconditionerPointer(const M& Ae, double relax,
/// \param relax The relaxation parameter for ILU0.
/// \param comm The object describing the parallelization information and communication.
// \param amgPtr The unique_ptr to be filled (return)
template <class Op, class P, class AMG >
template <class Op, class P, class AMG, int pressureIndex=0 >
inline void
createAMGPreconditionerPointer( Op& opA, const double relax, const P& comm, std::unique_ptr< AMG >& amgPtr )
{
@@ -284,7 +284,7 @@ createAMGPreconditionerPointer( Op& opA, const double relax, const P& comm, std:
typedef typename Op::matrix_type M;
// The coupling metric used in the AMG
typedef Dune::Amg::FirstDiagonal CouplingMetric;
typedef Dune::Amg::Diagonal<pressureIndex> CouplingMetric;
// The coupling criterion used in the AMG
typedef Dune::Amg::SymmetricCriterion<M, CouplingMetric> CritBase;