mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Split constructor to reduce instantiation.
Without the split, certain combinations with Dune::Amg::SequentialInformation as template argument for Comm needlessly get instantiated.
This commit is contained in:
parent
3784ab9d77
commit
dcd5d21415
@ -60,12 +60,16 @@ namespace Amg
|
||||
PressureInverseOperator(Operator& op, const boost::property_tree::ptree& prm, const Comm& comm)
|
||||
: linsolver_()
|
||||
{
|
||||
if (op.category() == Dune::SolverCategory::overlapping) {
|
||||
linsolver_.reset(new Solver(op.getmat(), comm, prm, std::function<X()>()));
|
||||
} else {
|
||||
linsolver_.reset(new Solver(op.getmat(), prm, std::function<X()>()));
|
||||
}
|
||||
assert(op.category() == Dune::SolverCategory::overlapping);
|
||||
linsolver_.reset(new Solver(op.getmat(), comm, prm, std::function<X()>()));
|
||||
}
|
||||
PressureInverseOperator(Operator& op, const boost::property_tree::ptree& prm, const SequentialInformation&)
|
||||
: linsolver_()
|
||||
{
|
||||
assert(op.category() != Dune::SolverCategory::overlapping);
|
||||
linsolver_.reset(new Solver(op.getmat(), prm, std::function<X()>()));
|
||||
}
|
||||
|
||||
|
||||
Dune::SolverCategory::Category category() const override
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user