mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Revert "Activate paralle istl solvers if there is more than one process computing."
This reverts commit 9598a990df
.
The commit slipped in by accident and should be part of a separate branch.
This commit is contained in:
parent
3329e48c57
commit
42fbe3b612
@ -24,8 +24,6 @@
|
||||
#include <opm/autodiff/AutoDiffHelpers.hpp>
|
||||
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
||||
|
||||
#include <boost/any.hpp>
|
||||
|
||||
struct UnstructuredGrid;
|
||||
struct Wells;
|
||||
|
||||
@ -62,8 +60,6 @@ namespace Opm {
|
||||
/// \param[in] rock_comp_props if non-null, rock compressibility properties
|
||||
/// \param[in] wells well structure
|
||||
/// \param[in] linsolver linear solver
|
||||
/// \param[in] anyComm A boost any parameter to use for passing information
|
||||
/// about the parallelization to the linear solver.
|
||||
FullyImplicitBlackoilSolver(const Grid& grid ,
|
||||
const BlackoilPropsAdInterface& fluid,
|
||||
const DerivedGeology& geo ,
|
||||
|
@ -29,22 +29,16 @@
|
||||
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/linalg/LinearSolverInterface.hpp>
|
||||
#include <opm/core/linalg/ParallelIstlInformation.hpp>
|
||||
#include <opm/core/props/rock/RockCompressibility.hpp>
|
||||
#include <opm/core/simulator/BlackoilState.hpp>
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
#include <opm/core/utility/Exceptions.hpp>
|
||||
#include <opm/core/well_controls.h>
|
||||
|
||||
#ifdef HAVE_DUNE_CORNERPOINT
|
||||
#include <dune/grid/CpGrid.hpp>
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <type_traits>
|
||||
//#include <fstream>
|
||||
|
||||
// A debugging utility.
|
||||
@ -1176,39 +1170,7 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
void resetAnyComm(boost::any&, const UnstructuredGrid&)
|
||||
{}
|
||||
|
||||
struct NullDeleter
|
||||
{
|
||||
void operator()(void*)
|
||||
{}
|
||||
};
|
||||
|
||||
#ifdef HAVE_DUNE_CORNERPOINT
|
||||
void resetAnyComm(boost::any& anyComm, const Dune::CpGrid& grid)
|
||||
{
|
||||
#if HAVE_MPI && DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
|
||||
if(grid.comm().size()>1)
|
||||
{
|
||||
NullDeleter null_delete;
|
||||
Dune::CpGrid mgrid=const_cast<Dune::CpGrid&>(grid);
|
||||
Dune::CpGrid::ParallelIndexSet* idx=&(mgrid.getCellIndexSet());
|
||||
Dune::CpGrid::RemoteIndices* ridx=&(mgrid.getCellRemoteIndices());
|
||||
anyComm=boost::any(Opm::ParallelISTLInformation(std::shared_ptr<Dune::CpGrid::ParallelIndexSet>(idx, null_delete),
|
||||
std::shared_ptr<Dune::CpGrid::RemoteIndices>(ridx, null_delete),
|
||||
grid.comm()));
|
||||
}
|
||||
#else
|
||||
(void*)(&anyComm);
|
||||
(void*)(&grid);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
@ -1224,15 +1186,12 @@ void resetAnyComm(boost::any& anyComm, const Dune::CpGrid& grid)
|
||||
// DUMP(total_residual);
|
||||
|
||||
const Eigen::SparseMatrix<double, Eigen::RowMajor> matr = total_residual.derivative()[0];
|
||||
boost::any anyComm;
|
||||
#if HAVE_MPI && DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
|
||||
resetAnyComm(anyComm, grid_);
|
||||
#endif
|
||||
|
||||
V dx(V::Zero(total_residual.size()));
|
||||
Opm::LinearSolverInterface::LinearSolverReport rep
|
||||
= linsolver_.solve(matr.rows(), matr.nonZeros(),
|
||||
matr.outerIndexPtr(), matr.innerIndexPtr(), matr.valuePtr(),
|
||||
total_residual.value().data(), dx.data(), anyComm);
|
||||
total_residual.value().data(), dx.data());
|
||||
/*
|
||||
std::ofstream filestream("matrix.out");
|
||||
filestream << matr;
|
||||
|
Loading…
Reference in New Issue
Block a user