mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapt to the gridManager() -> vanguard() change in ewoms
This commit is contained in:
@@ -136,7 +136,7 @@ namespace Opm {
|
||||
const bool terminal_output
|
||||
)
|
||||
: ebosSimulator_(ebosSimulator)
|
||||
, grid_(ebosSimulator_.gridManager().grid())
|
||||
, grid_(ebosSimulator_.vanguard().grid())
|
||||
, istlSolver_( dynamic_cast< const ISTLSolverType* > (&linsolver) )
|
||||
, phaseUsage_(phaseUsageFromDeck(eclState()))
|
||||
, has_disgas_(FluidSystem::enableDissolvedGas())
|
||||
@@ -161,7 +161,7 @@ namespace Opm {
|
||||
{ return grid_.comm().size() > 1; }
|
||||
|
||||
const EclipseState& eclState() const
|
||||
{ return ebosSimulator_.gridManager().eclState(); }
|
||||
{ return ebosSimulator_.vanguard().eclState(); }
|
||||
|
||||
/// Called once before each time step.
|
||||
/// \param[in] timer simulation timer
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace Opm
|
||||
|
||||
// gives a dummy dynamic_list_econ_limited
|
||||
DynamicListEconLimited dummy_list_econ_limited;
|
||||
const auto& defunct_well_names = ebosSimulator_.gridManager().defunctWellNames();
|
||||
const auto& defunct_well_names = ebosSimulator_.vanguard().defunctWellNames();
|
||||
WellsManager wellsmanager(eclState(),
|
||||
schedule(),
|
||||
eclState().getInitConfig().getRestartStep(),
|
||||
@@ -218,13 +218,13 @@ namespace Opm
|
||||
}
|
||||
|
||||
const Grid& grid()
|
||||
{ return ebosSimulator_.gridManager().grid(); }
|
||||
{ return ebosSimulator_.vanguard().grid(); }
|
||||
|
||||
const Schedule& schedule() const
|
||||
{ return ebosSimulator_.gridManager().schedule(); }
|
||||
{ return ebosSimulator_.vanguard().schedule(); }
|
||||
|
||||
const EclipseState& eclState() const
|
||||
{ return ebosSimulator_.gridManager().eclState(); }
|
||||
{ return ebosSimulator_.vanguard().eclState(); }
|
||||
|
||||
bool isRestart() const {
|
||||
const auto& initconfig = eclState().getInitConfig();
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace Opm {
|
||||
const Wells* wells() const { return wells_manager_->c_wells(); }
|
||||
|
||||
const Schedule& schedule() const
|
||||
{ return ebosSimulator_.gridManager().schedule(); }
|
||||
{ return ebosSimulator_.vanguard().schedule(); }
|
||||
|
||||
void updateWellControls();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Opm {
|
||||
, has_solvent_(GET_PROP_VALUE(TypeTag, EnableSolvent))
|
||||
, has_polymer_(GET_PROP_VALUE(TypeTag, EnablePolymer))
|
||||
{
|
||||
const auto& eclState = ebosSimulator_.gridManager().eclState();
|
||||
const auto& eclState = ebosSimulator_.vanguard().eclState();
|
||||
phase_usage_ = phaseUsageFromDeck(eclState);
|
||||
|
||||
const auto& gridView = ebosSimulator_.gridView();
|
||||
@@ -38,9 +38,9 @@ namespace Opm {
|
||||
BlackoilWellModel<TypeTag>::
|
||||
beginReportStep(const int timeStepIdx)
|
||||
{
|
||||
const Grid& grid = ebosSimulator_.gridManager().grid();
|
||||
const auto& defunct_well_names = ebosSimulator_.gridManager().defunctWellNames();
|
||||
const auto& eclState = ebosSimulator_.gridManager().eclState();
|
||||
const Grid& grid = ebosSimulator_.vanguard().grid();
|
||||
const auto& defunct_well_names = ebosSimulator_.vanguard().defunctWellNames();
|
||||
const auto& eclState = ebosSimulator_.vanguard().eclState();
|
||||
wells_ecl_ = schedule().getWells(timeStepIdx);
|
||||
|
||||
// Create wells and well state.
|
||||
@@ -67,7 +67,7 @@ namespace Opm {
|
||||
size_t nc = number_of_cells_;
|
||||
std::vector<double> cellPressures(nc, 0.0);
|
||||
ElementContext elemCtx(ebosSimulator_);
|
||||
const auto& gridView = ebosSimulator_.gridManager().gridView();
|
||||
const auto& gridView = ebosSimulator_.vanguard().gridView();
|
||||
const auto& elemEndIt = gridView.template end</*codim=*/0>();
|
||||
for (auto elemIt = gridView.template begin</*codim=*/0>();
|
||||
elemIt != elemEndIt;
|
||||
@@ -531,7 +531,7 @@ namespace Opm {
|
||||
// checking NaN residuals
|
||||
{
|
||||
bool nan_residual_found = report.nan_residual_found;
|
||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
||||
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||
int value = nan_residual_found ? 1 : 0;
|
||||
|
||||
nan_residual_found = grid.comm().max(value);
|
||||
@@ -547,7 +547,7 @@ namespace Opm {
|
||||
// checking too large residuals
|
||||
{
|
||||
bool too_large_residual_found = report.too_large_residual_found;
|
||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
||||
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||
int value = too_large_residual_found ? 1 : 0;
|
||||
|
||||
too_large_residual_found = grid.comm().max(value);
|
||||
@@ -562,7 +562,7 @@ namespace Opm {
|
||||
// checking convergence
|
||||
bool converged_well = report.converged;
|
||||
{
|
||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
||||
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||
int value = converged_well ? 1 : 0;
|
||||
|
||||
converged_well = grid.comm().min(value);
|
||||
@@ -979,7 +979,7 @@ namespace Opm {
|
||||
BlackoilWellModel<TypeTag>::
|
||||
computeAverageFormationFactor(std::vector<double>& B_avg) const
|
||||
{
|
||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
||||
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||
const auto& gridView = grid.leafGridView();
|
||||
ElementContext elemCtx(ebosSimulator_);
|
||||
const auto& elemEndIt = gridView.template end</*codim=*/0, Dune::Interior_Partition>();
|
||||
@@ -1036,7 +1036,7 @@ namespace Opm {
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::extractLegacyCellPvtRegionIndex_()
|
||||
{
|
||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
||||
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||
const auto& eclProblem = ebosSimulator_.problem();
|
||||
const unsigned numCells = grid.size(/*codim=*/0);
|
||||
|
||||
@@ -1081,7 +1081,7 @@ namespace Opm {
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::extractLegacyDepth_()
|
||||
{
|
||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
||||
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||
const unsigned numCells = grid.size(/*codim=*/0);
|
||||
|
||||
depth_.resize(numCells);
|
||||
|
||||
@@ -450,19 +450,19 @@ namespace Opm
|
||||
}
|
||||
|
||||
const Deck& deck() const
|
||||
{ return ebosSimulator_->gridManager().deck(); }
|
||||
{ return ebosSimulator_->vanguard().deck(); }
|
||||
|
||||
Deck& deck()
|
||||
{ return ebosSimulator_->gridManager().deck(); }
|
||||
{ return ebosSimulator_->vanguard().deck(); }
|
||||
|
||||
const EclipseState& eclState() const
|
||||
{ return ebosSimulator_->gridManager().eclState(); }
|
||||
{ return ebosSimulator_->vanguard().eclState(); }
|
||||
|
||||
EclipseState& eclState()
|
||||
{ return ebosSimulator_->gridManager().eclState(); }
|
||||
{ return ebosSimulator_->vanguard().eclState(); }
|
||||
|
||||
const Schedule& schedule() const
|
||||
{ return ebosSimulator_->gridManager().schedule(); }
|
||||
{ return ebosSimulator_->vanguard().schedule(); }
|
||||
|
||||
// Extract messages from parser.
|
||||
// Writes to:
|
||||
@@ -653,7 +653,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
Grid& grid()
|
||||
{ return ebosSimulator_->gridManager().grid(); }
|
||||
{ return ebosSimulator_->vanguard().grid(); }
|
||||
|
||||
std::unique_ptr<EbosSimulator> ebosSimulator_;
|
||||
int mpi_rank_ = 0;
|
||||
|
||||
@@ -470,7 +470,7 @@ namespace Opm {
|
||||
|
||||
// create map from cell to region
|
||||
// and set all attributes to zero
|
||||
const auto& grid = simulator.gridManager().grid();
|
||||
const auto& grid = simulator.vanguard().grid();
|
||||
const unsigned numCells = grid.size(/*codim=*/0);
|
||||
std::vector<int> cell2region(numCells, -1);
|
||||
for (const auto& reg : rmap_.activeRegions()) {
|
||||
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
const SimulatorReport& failureReport() const { return failureReport_; };
|
||||
|
||||
const Grid& grid() const
|
||||
{ return ebosSimulator_.gridManager().grid(); }
|
||||
{ return ebosSimulator_.vanguard().grid(); }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -344,11 +344,11 @@ protected:
|
||||
}
|
||||
|
||||
const EclipseState& eclState() const
|
||||
{ return ebosSimulator_.gridManager().eclState(); }
|
||||
{ return ebosSimulator_.vanguard().eclState(); }
|
||||
|
||||
|
||||
const Schedule& schedule() const
|
||||
{ return ebosSimulator_.gridManager().schedule(); }
|
||||
{ return ebosSimulator_.vanguard().schedule(); }
|
||||
|
||||
|
||||
// Data.
|
||||
|
||||
Reference in New Issue
Block a user