mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
use std::make_unique where applicable
This commit is contained in:
@@ -122,7 +122,7 @@ scaleMatrixDRS(const Operator& op, std::size_t pressureEqnIndex, const Vector& w
|
||||
using Matrix = typename Operator::matrix_type;
|
||||
using Block = typename Matrix::block_type;
|
||||
using BlockVector = typename Vector::block_type;
|
||||
std::unique_ptr<Matrix> matrix(new Matrix(op.getmat()));
|
||||
auto matrix = std::make_unique<Matrix>(op.getmat());
|
||||
if (param.cpr_use_drs_) {
|
||||
const auto endi = matrix->end();
|
||||
for (auto i = matrix->begin(); i != endi; ++i) {
|
||||
|
||||
@@ -517,7 +517,7 @@ DenseMatrix transposeDenseMatrix(const DenseMatrix& M)
|
||||
const MILU_VARIANT ilu_milu = parameters_.ilu_milu_;
|
||||
const bool ilu_redblack = parameters_.ilu_redblack_;
|
||||
const bool ilu_reorder_spheres = parameters_.ilu_reorder_sphere_;
|
||||
std::unique_ptr<SeqPreconditioner> precond(new SeqPreconditioner(opA.getmat(), ilu_fillin, relax, ilu_milu, ilu_redblack, ilu_reorder_spheres));
|
||||
auto precond = std::make_unique<SeqPreconditioner>(opA.getmat(), ilu_fillin, relax, ilu_milu, ilu_redblack, ilu_reorder_spheres);
|
||||
return precond;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user