mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Enable the use of parallel dune-istl solvers.
As with opm-core we use boost::any to provide additional information about a parallel run. It is used to set a ParallelISTLInformation object and and fill it with the information obtained from a parallel Cpgrid. Note that the simulator currently compiles sucessfully. Still, we have to test the runs and do debugging.
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
#include <opm/core/linalg/LinearSolverFactory.hpp>
|
||||
#include <opm/autodiff/NewtonIterationBlackoilSimple.hpp>
|
||||
#include <opm/autodiff/NewtonIterationBlackoilCPR.hpp>
|
||||
#include <opm/autodiff/ExtractParallelGridInformationToISTL.hpp>
|
||||
|
||||
#include <opm/core/simulator/BlackoilState.hpp>
|
||||
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
||||
@@ -210,10 +211,13 @@ try
|
||||
|
||||
// Solver for Newton iterations.
|
||||
std::unique_ptr<NewtonIterationBlackoilInterface> fis_solver;
|
||||
|
||||
boost::any parallel_information;
|
||||
Opm::extractParallelGridInformationToISTL(parallel_information, *grid);
|
||||
if (param.getDefault("use_cpr", true)) {
|
||||
fis_solver.reset(new NewtonIterationBlackoilCPR(param));
|
||||
fis_solver.reset(new NewtonIterationBlackoilCPR(param, parallel_information));
|
||||
} else {
|
||||
fis_solver.reset(new NewtonIterationBlackoilSimple(param));
|
||||
fis_solver.reset(new NewtonIterationBlackoilSimple(param, parallel_information));
|
||||
}
|
||||
|
||||
// Write parameters used for later reference.
|
||||
|
||||
Reference in New Issue
Block a user