mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Avoid negation in if clause
This commit is contained in:
parent
034b1840ae
commit
cda0c22d0f
@ -418,18 +418,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
const double relax = parameters_.ilu_relaxation_;
|
const double relax = parameters_.ilu_relaxation_;
|
||||||
if ( ! parameters_.use_cpr_ )
|
if ( parameters_.use_cpr_ )
|
||||||
{
|
|
||||||
typedef typename CPRSelectorType::AMG AMG;
|
|
||||||
std::unique_ptr< AMG > amg;
|
|
||||||
|
|
||||||
// Construct preconditioner.
|
|
||||||
constructAMGPrecond( linearOperator, parallelInformation_arg, amg, opA, relax );
|
|
||||||
|
|
||||||
// Solve.
|
|
||||||
solve(linearOperator, x, istlb, *sp, *amg, result);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
using Matrix = typename MatrixOperator::matrix_type;
|
using Matrix = typename MatrixOperator::matrix_type;
|
||||||
using CouplingMetric = Dune::Amg::Diagonal<pressureIndex>;
|
using CouplingMetric = Dune::Amg::Diagonal<pressureIndex>;
|
||||||
@ -443,6 +432,17 @@ namespace Opm
|
|||||||
Criterion crit(15, 2000);
|
Criterion crit(15, 2000);
|
||||||
constructAMGPrecond<Criterion>( linearOperator, parallelInformation_arg, amg, opA, relax );
|
constructAMGPrecond<Criterion>( linearOperator, parallelInformation_arg, amg, opA, relax );
|
||||||
|
|
||||||
|
// Solve.
|
||||||
|
solve(linearOperator, x, istlb, *sp, *amg, result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
typedef typename CPRSelectorType::AMG AMG;
|
||||||
|
std::unique_ptr< AMG > amg;
|
||||||
|
|
||||||
|
// Construct preconditioner.
|
||||||
|
constructAMGPrecond( linearOperator, parallelInformation_arg, amg, opA, relax );
|
||||||
|
|
||||||
// Solve.
|
// Solve.
|
||||||
solve(linearOperator, x, istlb, *sp, *amg, result);
|
solve(linearOperator, x, istlb, *sp, *amg, result);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user