mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Change type of possibleFutureConnections to std::unordered_map<std::string, std::set<int>>
Now it contains the global ids of the perforated cells for each well instead of the coordinates ijk
This commit is contained in:
@@ -283,18 +283,18 @@ extractFaceTrans(const GridView& gridView) const
|
||||
template <class ElementMapper, class GridView, class Scalar>
|
||||
void
|
||||
GenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const Dune::PartitionMethod partitionMethod,
|
||||
const bool serialPartitioning,
|
||||
const bool enableDistributedWells,
|
||||
const double imbalanceTol,
|
||||
const bool loadBalancerSet,
|
||||
const std::vector<double>& faceTrans,
|
||||
const std::vector<Well>& wells,
|
||||
const std::unordered_map<std::string, std::set<std::array<int,3>>>& possibleFutureConnections,
|
||||
EclipseState& eclState1,
|
||||
FlowGenericVanguard::ParallelWellStruct& parallelWells)
|
||||
distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const Dune::PartitionMethod partitionMethod,
|
||||
const bool serialPartitioning,
|
||||
const bool enableDistributedWells,
|
||||
const double imbalanceTol,
|
||||
const bool loadBalancerSet,
|
||||
const std::vector<double>& faceTrans,
|
||||
const std::vector<Well>& wells,
|
||||
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
|
||||
EclipseState& eclState1,
|
||||
FlowGenericVanguard::ParallelWellStruct& parallelWells)
|
||||
{
|
||||
if (auto* eclState = dynamic_cast<ParallelEclipseState*>(&eclState1);
|
||||
eclState != nullptr)
|
||||
@@ -321,18 +321,18 @@ distributeGrid(const Dune::EdgeWeightMethod
|
||||
template <class ElementMapper, class GridView, class Scalar>
|
||||
void
|
||||
GenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const Dune::PartitionMethod partitionMethod,
|
||||
const bool serialPartitioning,
|
||||
const bool enableDistributedWells,
|
||||
const double imbalanceTol,
|
||||
const bool loadBalancerSet,
|
||||
const std::vector<double>& faceTrans,
|
||||
const std::vector<Well>& wells,
|
||||
const std::unordered_map<std::string, std::set<std::array<int,3>>>& possibleFutureConnections,
|
||||
ParallelEclipseState* eclState,
|
||||
FlowGenericVanguard::ParallelWellStruct& parallelWells)
|
||||
distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const Dune::PartitionMethod partitionMethod,
|
||||
const bool serialPartitioning,
|
||||
const bool enableDistributedWells,
|
||||
const double imbalanceTol,
|
||||
const bool loadBalancerSet,
|
||||
const std::vector<double>& faceTrans,
|
||||
const std::vector<Well>& wells,
|
||||
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
|
||||
ParallelEclipseState* eclState,
|
||||
FlowGenericVanguard::ParallelWellStruct& parallelWells)
|
||||
{
|
||||
OPM_TIMEBLOCK(gridDistribute);
|
||||
const auto isIORank = this->grid_->comm().rank() == 0;
|
||||
|
||||
@@ -165,31 +165,31 @@ protected:
|
||||
private:
|
||||
std::vector<double> extractFaceTrans(const GridView& gridView) const;
|
||||
|
||||
void distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const Dune::PartitionMethod partitionMethod,
|
||||
const bool serialPartitioning,
|
||||
const bool enableDistributedWells,
|
||||
const double imbalanceTol,
|
||||
const bool loadBalancerSet,
|
||||
const std::vector<double>& faceTrans,
|
||||
const std::vector<Well>& wells,
|
||||
const std::unordered_map<std::string, std::set<std::array<int,3>>>& possibleFutureConnections,
|
||||
EclipseState& eclState,
|
||||
FlowGenericVanguard::ParallelWellStruct& parallelWells);
|
||||
void distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const Dune::PartitionMethod partitionMethod,
|
||||
const bool serialPartitioning,
|
||||
const bool enableDistributedWells,
|
||||
const double imbalanceTol,
|
||||
const bool loadBalancerSet,
|
||||
const std::vector<double>& faceTrans,
|
||||
const std::vector<Well>& wells,
|
||||
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
|
||||
EclipseState& eclState,
|
||||
FlowGenericVanguard::ParallelWellStruct& parallelWells);
|
||||
|
||||
void distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const Dune::PartitionMethod partitionMethod,
|
||||
const bool serialPartitioning,
|
||||
const bool enableDistributedWells,
|
||||
const double imbalanceTol,
|
||||
const bool loadBalancerSet,
|
||||
const std::vector<double>& faceTrans,
|
||||
const std::vector<Well>& wells,
|
||||
const std::unordered_map<std::string, std::set<std::array<int,3>>>& possibleFutureConnections,
|
||||
ParallelEclipseState* eclState,
|
||||
FlowGenericVanguard::ParallelWellStruct& parallelWells);
|
||||
void distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const Dune::PartitionMethod partitionMethod,
|
||||
const bool serialPartitioning,
|
||||
const bool enableDistributedWells,
|
||||
const double imbalanceTol,
|
||||
const bool loadBalancerSet,
|
||||
const std::vector<double>& faceTrans,
|
||||
const std::vector<Well>& wells,
|
||||
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
|
||||
ParallelEclipseState* eclState,
|
||||
FlowGenericVanguard::ParallelWellStruct& parallelWells);
|
||||
|
||||
protected:
|
||||
virtual const std::string& zoltanParams() const = 0;
|
||||
|
||||
@@ -78,7 +78,7 @@ void BdaSolverInfo<Matrix,Vector>::
|
||||
prepare(const Grid& grid,
|
||||
const Dune::CartesianIndexMapper<Grid>& cartMapper,
|
||||
const std::vector<Well>& wellsForConn,
|
||||
const std::unordered_map<std::string, std::set<std::array<int,3>>>& possibleFutureConnections,
|
||||
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
|
||||
const std::vector<int>& cellPartition,
|
||||
const std::size_t nonzeroes,
|
||||
const bool useWellConn)
|
||||
@@ -241,13 +241,13 @@ using BM = Dune::BCRSMatrix<MatrixBlock<Scalar,Dim,Dim>>;
|
||||
template<class Scalar, int Dim>
|
||||
using BV = Dune::BlockVector<Dune::FieldVector<Scalar,Dim>>;
|
||||
|
||||
#define INSTANTIATE_GRID(T, Dim, Grid) \
|
||||
template void BdaSolverInfo<BM<T,Dim>,BV<T,Dim>>:: \
|
||||
prepare(const Grid&, \
|
||||
const Dune::CartesianIndexMapper<Grid>&, \
|
||||
const std::vector<Well>&, \
|
||||
const std::unordered_map<std::string, std::set<std::array<int,3>>>&, \
|
||||
const std::vector<int>&, \
|
||||
#define INSTANTIATE_GRID(T, Dim, Grid) \
|
||||
template void BdaSolverInfo<BM<T,Dim>,BV<T,Dim>>:: \
|
||||
prepare(const Grid&, \
|
||||
const Dune::CartesianIndexMapper<Grid>&, \
|
||||
const std::vector<Well>&, \
|
||||
const std::unordered_map<std::string, std::set<int>>&, \
|
||||
const std::vector<int>&, \
|
||||
const std::size_t, const bool);
|
||||
using PolyHedralGrid3D = Dune::PolyhedralGrid<3, 3>;
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
|
||||
@@ -60,7 +60,7 @@ struct BdaSolverInfo
|
||||
void prepare(const Grid& grid,
|
||||
const Dune::CartesianIndexMapper<Grid>& cartMapper,
|
||||
const std::vector<Well>& wellsForConn,
|
||||
const std::unordered_map<std::string, std::set<std::array<int,3>>>& possibleFutureConnections,
|
||||
const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
|
||||
const std::vector<int>& cellPartition,
|
||||
const std::size_t nonzeroes,
|
||||
const bool useWellConn);
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace detail
|
||||
/// \param useWellConn Boolean that is true when UseWellContribusion is true
|
||||
/// \param wellGraph Cell IDs of well cells stored in a graph.
|
||||
template<class Grid, class CartMapper, class W>
|
||||
void setWellConnections(const Grid& grid, const CartMapper& cartMapper, const W& wells, const std::unordered_map<std::string, std::set<std::array<int,3>>>& possibleFutureConnections, bool useWellConn, std::vector<std::set<int>>& wellGraph, int numJacobiBlocks)
|
||||
void setWellConnections(const Grid& grid, const CartMapper& cartMapper, const W& wells, const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections, bool useWellConn, std::vector<std::set<int>>& wellGraph, int numJacobiBlocks)
|
||||
{
|
||||
if ( grid.comm().size() > 1 || numJacobiBlocks > 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user