mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1581 from blattms/fix-issue-1574-and-more
Remove dead code.
This commit is contained in:
commit
1f7b8aa9d1
@ -155,20 +155,14 @@ namespace Opm
|
|||||||
const MILU_VARIANT ilu_milu = parameters_.ilu_milu_;
|
const MILU_VARIANT ilu_milu = parameters_.ilu_milu_;
|
||||||
if ( parameters_.use_cpr_ )
|
if ( parameters_.use_cpr_ )
|
||||||
{
|
{
|
||||||
using Matrix = typename MatrixOperator::matrix_type;
|
// We should never end up here as this code is
|
||||||
using CouplingMetric = Dune::Amg::Diagonal<pressureIndex>;
|
// only part of flow_legacy and if use_cpr_ is
|
||||||
using CritBase = Dune::Amg::SymmetricCriterion<Matrix, CouplingMetric>;
|
// true for flow_legacy then solver_approach=cpr
|
||||||
using Criterion = Dune::Amg::CoarsenCriterion<CritBase>;
|
// was specified and NewtonIterationBlackoilCPR
|
||||||
using AMG = typename ISTLUtility
|
// is used as a solve and not ISTLSolver.
|
||||||
::BlackoilAmgSelector< Matrix, Vector, Vector,POrComm, Criterion, pressureIndex >::AMG;
|
OPM_THROW(std::logic_error,
|
||||||
|
"This code path should bever be exectuded for parameters_.use_cpr_="
|
||||||
std::unique_ptr< AMG > amg;
|
<<parameters_.use_cpr_<<" in flow_legacy.");
|
||||||
// Construct preconditioner.
|
|
||||||
Criterion crit(15, 2000);
|
|
||||||
constructAMGPrecond<Criterion>( linearOperator, parallelInformation_arg, amg, opA, relax, ilu_milu );
|
|
||||||
|
|
||||||
// Solve.
|
|
||||||
solve(linearOperator, x, istlb, *sp, *amg, result);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -240,13 +234,6 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <class LinearOperator, class MatrixOperator, class POrComm, class AMG >
|
|
||||||
void
|
|
||||||
constructAMGPrecond(LinearOperator& /* linearOperator */, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >& opA, const double relax, const MILU_VARIANT milu) const
|
|
||||||
{
|
|
||||||
ISTLUtility::template createAMGPreconditionerPointer<pressureIndex>( *opA, relax, milu, comm, amg );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class MatrixOperator, class POrComm, class AMG >
|
template <class MatrixOperator, class POrComm, class AMG >
|
||||||
void
|
void
|
||||||
@ -257,23 +244,6 @@ namespace Opm
|
|||||||
milu, comm, amg );
|
milu, comm, amg );
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class C, class LinearOperator, class MatrixOperator, class POrComm, class AMG >
|
|
||||||
void
|
|
||||||
constructAMGPrecond(LinearOperator& /* linearOperator */, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >& opA, const double relax,
|
|
||||||
const MILU_VARIANT milu ) const
|
|
||||||
{
|
|
||||||
ISTLUtility::template createAMGPreconditionerPointer<C>( *opA, relax,
|
|
||||||
comm, amg, parameters_ );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class C, class MatrixOperator, class POrComm, class AMG >
|
|
||||||
void
|
|
||||||
constructAMGPrecond(MatrixOperator& opA, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >&, const double relax, const MILU_VARIANT milu ) const
|
|
||||||
{
|
|
||||||
ISTLUtility::template createAMGPreconditionerPointer<C>( opA, relax, milu,
|
|
||||||
comm, amg, parameters_ );
|
|
||||||
}
|
|
||||||
/// \brief Solve the system using the given preconditioner and scalar product.
|
/// \brief Solve the system using the given preconditioner and scalar product.
|
||||||
template <class Operator, class ScalarProd, class Precond>
|
template <class Operator, class ScalarProd, class Precond>
|
||||||
void solve(Operator& opA, Vector& x, Vector& istlb, ScalarProd& sp, Precond& precond, Dune::InverseOperatorResult& result) const
|
void solve(Operator& opA, Vector& x, Vector& istlb, ScalarProd& sp, Precond& precond, Dune::InverseOperatorResult& result) const
|
||||||
|
@ -548,15 +548,6 @@ namespace Detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class MatrixOperator, class POrComm, class AMG >
|
|
||||||
void
|
|
||||||
constructAMGPrecond(MatrixOperator& opA, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >&, const double relax,
|
|
||||||
const MILU_VARIANT milu) const
|
|
||||||
{
|
|
||||||
ISTLUtility::template createAMGPreconditionerPointer<pressureIndex>( opA, relax,
|
|
||||||
milu, comm, amg );
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class C, class LinearOperator, class MatrixOperator, class POrComm, class AMG >
|
template <class C, class LinearOperator, class MatrixOperator, class POrComm, class AMG >
|
||||||
void
|
void
|
||||||
constructAMGPrecond(LinearOperator& /* linearOperator */, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >& opA, const double relax,
|
constructAMGPrecond(LinearOperator& /* linearOperator */, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >& opA, const double relax,
|
||||||
@ -567,13 +558,6 @@ namespace Detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class C, class MatrixOperator, class POrComm, class AMG >
|
|
||||||
void
|
|
||||||
constructAMGPrecond(MatrixOperator& opA, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >&, const double relax, const MILU_VARIANT milu ) const
|
|
||||||
{
|
|
||||||
ISTLUtility::template createAMGPreconditionerPointer<C>( opA, relax, milu,
|
|
||||||
comm, amg, parameters_ );
|
|
||||||
}
|
|
||||||
/// \brief Solve the system using the given preconditioner and scalar product.
|
/// \brief Solve the system using the given preconditioner and scalar product.
|
||||||
template <class Operator, class ScalarProd, class Precond>
|
template <class Operator, class ScalarProd, class Precond>
|
||||||
void solve(Operator& opA, Vector& x, Vector& istlb, ScalarProd& sp, Precond& precond, Dune::InverseOperatorResult& result) const
|
void solve(Operator& opA, Vector& x, Vector& istlb, ScalarProd& sp, Precond& precond, Dune::InverseOperatorResult& result) const
|
||||||
|
Loading…
Reference in New Issue
Block a user