mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use unique_ptr rather than shared_ptr.
This commit is contained in:
parent
226697ec6f
commit
fb99dd6fee
@ -61,13 +61,13 @@ namespace Amg
|
|||||||
: linsolver_()
|
: linsolver_()
|
||||||
{
|
{
|
||||||
assert(op.category() == Dune::SolverCategory::overlapping);
|
assert(op.category() == Dune::SolverCategory::overlapping);
|
||||||
linsolver_.reset(new Solver(op.getmat(), comm, prm, std::function<X()>()));
|
linsolver_ = std::make_unique<Solver>(op.getmat(), comm, prm, std::function<X()>());
|
||||||
}
|
}
|
||||||
PressureInverseOperator(Operator& op, const boost::property_tree::ptree& prm, const SequentialInformation&)
|
PressureInverseOperator(Operator& op, const boost::property_tree::ptree& prm, const SequentialInformation&)
|
||||||
: linsolver_()
|
: linsolver_()
|
||||||
{
|
{
|
||||||
assert(op.category() != Dune::SolverCategory::overlapping);
|
assert(op.category() != Dune::SolverCategory::overlapping);
|
||||||
linsolver_.reset(new Solver(op.getmat(), prm, std::function<X()>()));
|
linsolver_ = std::make_unique<Solver>(op.getmat(), prm, std::function<X()>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ namespace Amg
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<Solver> linsolver_;
|
std::unique_ptr<Solver> linsolver_;
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user