mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-02 20:30:55 -06:00
Merge pull request #6806 from GitPaean/removing_filterConnections
remove the usage of Schedule::filterConnections()
This commit is contained in:
4 files changed
-41
No files matched your search
@@ -360,12 +360,6 @@ protected:
|
||||
}
|
||||
#endif
|
||||
|
||||
// removing some connection located in inactive grid cells
|
||||
void filterConnections_()
|
||||
{
|
||||
this->doFilterConnections_(this->schedule());
|
||||
}
|
||||
|
||||
// \Note: this globalTrans_ is used for domain decomposition and INIT file output.
|
||||
// It only contains trans_ due to permeability and does not contain thermalHalfTrans_,
|
||||
// diffusivity_ abd dispersivity_. The main reason is to reduce the memory usage for rank 0
|
||||
|
||||
@@ -325,7 +325,6 @@ protected:
|
||||
void callImplementationInit()
|
||||
{
|
||||
asImp_().createGrids_();
|
||||
asImp_().filterConnections_();
|
||||
std::string outputDir = Parameters::Get<Parameters::OutputDir>();
|
||||
bool enableEclCompatFile = !Parameters::Get<Parameters::EnableOpmRstFile>();
|
||||
asImp_().updateOutputDir_(outputDir, enableEclCompatFile);
|
||||
|
||||
@@ -600,37 +600,6 @@ void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::addLgrsUpdateLeafView
|
||||
grid.addLgrsUpdateLeafView(cells_per_dim_vec, startIJK_vec, endIJK_vec, lgrName_vec);
|
||||
};
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::
|
||||
doFilterConnections_(Schedule& schedule)
|
||||
{
|
||||
// We only filter if we hold the global grid. Otherwise the filtering
|
||||
// is done after load balancing as in the future the other processes
|
||||
// will hold an empty partition for the global grid and hence filtering
|
||||
// here would remove all well connections.
|
||||
if (this->equilGrid_ != nullptr) {
|
||||
ActiveGridCells activeCells(equilGrid().logicalCartesianSize(),
|
||||
equilGrid().globalCell().data(),
|
||||
equilGrid().size(0));
|
||||
|
||||
schedule.filterConnections(activeCells);
|
||||
}
|
||||
|
||||
#if HAVE_MPI
|
||||
try {
|
||||
// Broadcast another time to remove inactive peforations on
|
||||
// slave processors.
|
||||
eclBroadcast(FlowGenericVanguard::comm(), schedule);
|
||||
}
|
||||
catch (const std::exception& broadcast_error) {
|
||||
OpmLog::error(fmt::format("Distributing properties to all processes failed\n"
|
||||
"Internal error message: {}", broadcast_error.what()));
|
||||
MPI_Finalize();
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif // HAVE_MPI
|
||||
}
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
const Dune::CpGrid&
|
||||
GenericCpGridVanguard<ElementMapper,GridView,Scalar>::equilGrid() const
|
||||
|
||||
@@ -224,9 +224,6 @@ protected:
|
||||
virtual void allocTrans() = 0;
|
||||
virtual double getTransmissibility(unsigned I, unsigned J) const = 0;
|
||||
|
||||
// removing some connection located in inactive grid cells
|
||||
void doFilterConnections_(Schedule& schedule);
|
||||
|
||||
Scalar computeCellThickness(const Element& element) const;
|
||||
|
||||
std::unique_ptr<Dune::CpGrid> grid_;
|
||||
|
||||
Reference in new issue
Block a user