mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-13 17:32:03 -05:00
Merge pull request #1400 from andlaus/gridManager_to_vanguard
adapt to the gridManager() -> vanguard() change in ewoms
This commit is contained in:
16 files changed
+64
-64
No files matched your search
@@ -136,7 +136,7 @@ namespace Opm {
|
|||||||
const bool terminal_output
|
const bool terminal_output
|
||||||
)
|
)
|
||||||
: ebosSimulator_(ebosSimulator)
|
: ebosSimulator_(ebosSimulator)
|
||||||
, grid_(ebosSimulator_.gridManager().grid())
|
, grid_(ebosSimulator_.vanguard().grid())
|
||||||
, istlSolver_( dynamic_cast< const ISTLSolverType* > (&linsolver) )
|
, istlSolver_( dynamic_cast< const ISTLSolverType* > (&linsolver) )
|
||||||
, phaseUsage_(phaseUsageFromDeck(eclState()))
|
, phaseUsage_(phaseUsageFromDeck(eclState()))
|
||||||
, has_disgas_(FluidSystem::enableDissolvedGas())
|
, has_disgas_(FluidSystem::enableDissolvedGas())
|
||||||
@@ -161,7 +161,7 @@ namespace Opm {
|
|||||||
{ return grid_.comm().size() > 1; }
|
{ return grid_.comm().size() > 1; }
|
||||||
|
|
||||||
const EclipseState& eclState() const
|
const EclipseState& eclState() const
|
||||||
{ return ebosSimulator_.gridManager().eclState(); }
|
{ return ebosSimulator_.vanguard().eclState(); }
|
||||||
|
|
||||||
/// Called once before each time step.
|
/// Called once before each time step.
|
||||||
/// \param[in] timer simulation timer
|
/// \param[in] timer simulation timer
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ namespace Opm
|
|||||||
|
|
||||||
// gives a dummy dynamic_list_econ_limited
|
// gives a dummy dynamic_list_econ_limited
|
||||||
DynamicListEconLimited dummy_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(),
|
WellsManager wellsmanager(eclState(),
|
||||||
schedule(),
|
schedule(),
|
||||||
eclState().getInitConfig().getRestartStep(),
|
eclState().getInitConfig().getRestartStep(),
|
||||||
@@ -218,13 +218,13 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Grid& grid()
|
const Grid& grid()
|
||||||
{ return ebosSimulator_.gridManager().grid(); }
|
{ return ebosSimulator_.vanguard().grid(); }
|
||||||
|
|
||||||
const Schedule& schedule() const
|
const Schedule& schedule() const
|
||||||
{ return ebosSimulator_.gridManager().schedule(); }
|
{ return ebosSimulator_.vanguard().schedule(); }
|
||||||
|
|
||||||
const EclipseState& eclState() const
|
const EclipseState& eclState() const
|
||||||
{ return ebosSimulator_.gridManager().eclState(); }
|
{ return ebosSimulator_.vanguard().eclState(); }
|
||||||
|
|
||||||
bool isRestart() const {
|
bool isRestart() const {
|
||||||
const auto& initconfig = eclState().getInitConfig();
|
const auto& initconfig = eclState().getInitConfig();
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace Opm {
|
|||||||
const Wells* wells() const { return wells_manager_->c_wells(); }
|
const Wells* wells() const { return wells_manager_->c_wells(); }
|
||||||
|
|
||||||
const Schedule& schedule() const
|
const Schedule& schedule() const
|
||||||
{ return ebosSimulator_.gridManager().schedule(); }
|
{ return ebosSimulator_.vanguard().schedule(); }
|
||||||
|
|
||||||
void updateWellControls();
|
void updateWellControls();
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Opm {
|
|||||||
, has_solvent_(GET_PROP_VALUE(TypeTag, EnableSolvent))
|
, has_solvent_(GET_PROP_VALUE(TypeTag, EnableSolvent))
|
||||||
, has_polymer_(GET_PROP_VALUE(TypeTag, EnablePolymer))
|
, has_polymer_(GET_PROP_VALUE(TypeTag, EnablePolymer))
|
||||||
{
|
{
|
||||||
const auto& eclState = ebosSimulator_.gridManager().eclState();
|
const auto& eclState = ebosSimulator_.vanguard().eclState();
|
||||||
phase_usage_ = phaseUsageFromDeck(eclState);
|
phase_usage_ = phaseUsageFromDeck(eclState);
|
||||||
|
|
||||||
const auto& gridView = ebosSimulator_.gridView();
|
const auto& gridView = ebosSimulator_.gridView();
|
||||||
@@ -38,9 +38,9 @@ namespace Opm {
|
|||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
beginReportStep(const int timeStepIdx)
|
beginReportStep(const int timeStepIdx)
|
||||||
{
|
{
|
||||||
const Grid& grid = ebosSimulator_.gridManager().grid();
|
const Grid& grid = ebosSimulator_.vanguard().grid();
|
||||||
const auto& defunct_well_names = ebosSimulator_.gridManager().defunctWellNames();
|
const auto& defunct_well_names = ebosSimulator_.vanguard().defunctWellNames();
|
||||||
const auto& eclState = ebosSimulator_.gridManager().eclState();
|
const auto& eclState = ebosSimulator_.vanguard().eclState();
|
||||||
wells_ecl_ = schedule().getWells(timeStepIdx);
|
wells_ecl_ = schedule().getWells(timeStepIdx);
|
||||||
|
|
||||||
// Create wells and well state.
|
// Create wells and well state.
|
||||||
@@ -67,7 +67,7 @@ namespace Opm {
|
|||||||
size_t nc = number_of_cells_;
|
size_t nc = number_of_cells_;
|
||||||
std::vector<double> cellPressures(nc, 0.0);
|
std::vector<double> cellPressures(nc, 0.0);
|
||||||
ElementContext elemCtx(ebosSimulator_);
|
ElementContext elemCtx(ebosSimulator_);
|
||||||
const auto& gridView = ebosSimulator_.gridManager().gridView();
|
const auto& gridView = ebosSimulator_.vanguard().gridView();
|
||||||
const auto& elemEndIt = gridView.template end</*codim=*/0>();
|
const auto& elemEndIt = gridView.template end</*codim=*/0>();
|
||||||
for (auto elemIt = gridView.template begin</*codim=*/0>();
|
for (auto elemIt = gridView.template begin</*codim=*/0>();
|
||||||
elemIt != elemEndIt;
|
elemIt != elemEndIt;
|
||||||
@@ -531,7 +531,7 @@ namespace Opm {
|
|||||||
// checking NaN residuals
|
// checking NaN residuals
|
||||||
{
|
{
|
||||||
bool nan_residual_found = report.nan_residual_found;
|
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;
|
int value = nan_residual_found ? 1 : 0;
|
||||||
|
|
||||||
nan_residual_found = grid.comm().max(value);
|
nan_residual_found = grid.comm().max(value);
|
||||||
@@ -547,7 +547,7 @@ namespace Opm {
|
|||||||
// checking too large residuals
|
// checking too large residuals
|
||||||
{
|
{
|
||||||
bool too_large_residual_found = report.too_large_residual_found;
|
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;
|
int value = too_large_residual_found ? 1 : 0;
|
||||||
|
|
||||||
too_large_residual_found = grid.comm().max(value);
|
too_large_residual_found = grid.comm().max(value);
|
||||||
@@ -562,7 +562,7 @@ namespace Opm {
|
|||||||
// checking convergence
|
// checking convergence
|
||||||
bool converged_well = report.converged;
|
bool converged_well = report.converged;
|
||||||
{
|
{
|
||||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||||
int value = converged_well ? 1 : 0;
|
int value = converged_well ? 1 : 0;
|
||||||
|
|
||||||
converged_well = grid.comm().min(value);
|
converged_well = grid.comm().min(value);
|
||||||
@@ -979,7 +979,7 @@ namespace Opm {
|
|||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
computeAverageFormationFactor(std::vector<double>& B_avg) const
|
computeAverageFormationFactor(std::vector<double>& B_avg) const
|
||||||
{
|
{
|
||||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||||
const auto& gridView = grid.leafGridView();
|
const auto& gridView = grid.leafGridView();
|
||||||
ElementContext elemCtx(ebosSimulator_);
|
ElementContext elemCtx(ebosSimulator_);
|
||||||
const auto& elemEndIt = gridView.template end</*codim=*/0, Dune::Interior_Partition>();
|
const auto& elemEndIt = gridView.template end</*codim=*/0, Dune::Interior_Partition>();
|
||||||
@@ -1036,7 +1036,7 @@ namespace Opm {
|
|||||||
void
|
void
|
||||||
BlackoilWellModel<TypeTag>::extractLegacyCellPvtRegionIndex_()
|
BlackoilWellModel<TypeTag>::extractLegacyCellPvtRegionIndex_()
|
||||||
{
|
{
|
||||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||||
const auto& eclProblem = ebosSimulator_.problem();
|
const auto& eclProblem = ebosSimulator_.problem();
|
||||||
const unsigned numCells = grid.size(/*codim=*/0);
|
const unsigned numCells = grid.size(/*codim=*/0);
|
||||||
|
|
||||||
@@ -1081,7 +1081,7 @@ namespace Opm {
|
|||||||
void
|
void
|
||||||
BlackoilWellModel<TypeTag>::extractLegacyDepth_()
|
BlackoilWellModel<TypeTag>::extractLegacyDepth_()
|
||||||
{
|
{
|
||||||
const auto& grid = ebosSimulator_.gridManager().grid();
|
const auto& grid = ebosSimulator_.vanguard().grid();
|
||||||
const unsigned numCells = grid.size(/*codim=*/0);
|
const unsigned numCells = grid.size(/*codim=*/0);
|
||||||
|
|
||||||
depth_.resize(numCells);
|
depth_.resize(numCells);
|
||||||
|
|||||||
@@ -450,19 +450,19 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Deck& deck() const
|
const Deck& deck() const
|
||||||
{ return ebosSimulator_->gridManager().deck(); }
|
{ return ebosSimulator_->vanguard().deck(); }
|
||||||
|
|
||||||
Deck& deck()
|
Deck& deck()
|
||||||
{ return ebosSimulator_->gridManager().deck(); }
|
{ return ebosSimulator_->vanguard().deck(); }
|
||||||
|
|
||||||
const EclipseState& eclState() const
|
const EclipseState& eclState() const
|
||||||
{ return ebosSimulator_->gridManager().eclState(); }
|
{ return ebosSimulator_->vanguard().eclState(); }
|
||||||
|
|
||||||
EclipseState& eclState()
|
EclipseState& eclState()
|
||||||
{ return ebosSimulator_->gridManager().eclState(); }
|
{ return ebosSimulator_->vanguard().eclState(); }
|
||||||
|
|
||||||
const Schedule& schedule() const
|
const Schedule& schedule() const
|
||||||
{ return ebosSimulator_->gridManager().schedule(); }
|
{ return ebosSimulator_->vanguard().schedule(); }
|
||||||
|
|
||||||
// Extract messages from parser.
|
// Extract messages from parser.
|
||||||
// Writes to:
|
// Writes to:
|
||||||
@@ -653,7 +653,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
Grid& grid()
|
Grid& grid()
|
||||||
{ return ebosSimulator_->gridManager().grid(); }
|
{ return ebosSimulator_->vanguard().grid(); }
|
||||||
|
|
||||||
std::unique_ptr<EbosSimulator> ebosSimulator_;
|
std::unique_ptr<EbosSimulator> ebosSimulator_;
|
||||||
int mpi_rank_ = 0;
|
int mpi_rank_ = 0;
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ namespace Opm {
|
|||||||
|
|
||||||
// create map from cell to region
|
// create map from cell to region
|
||||||
// and set all attributes to zero
|
// 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);
|
const unsigned numCells = grid.size(/*codim=*/0);
|
||||||
std::vector<int> cell2region(numCells, -1);
|
std::vector<int> cell2region(numCells, -1);
|
||||||
for (const auto& reg : rmap_.activeRegions()) {
|
for (const auto& reg : rmap_.activeRegions()) {
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ public:
|
|||||||
const SimulatorReport& failureReport() const { return failureReport_; };
|
const SimulatorReport& failureReport() const { return failureReport_; };
|
||||||
|
|
||||||
const Grid& grid() const
|
const Grid& grid() const
|
||||||
{ return ebosSimulator_.gridManager().grid(); }
|
{ return ebosSimulator_.vanguard().grid(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -344,11 +344,11 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
const EclipseState& eclState() const
|
const EclipseState& eclState() const
|
||||||
{ return ebosSimulator_.gridManager().eclState(); }
|
{ return ebosSimulator_.vanguard().eclState(); }
|
||||||
|
|
||||||
|
|
||||||
const Schedule& schedule() const
|
const Schedule& schedule() const
|
||||||
{ return ebosSimulator_.gridManager().schedule(); }
|
{ return ebosSimulator_.vanguard().schedule(); }
|
||||||
|
|
||||||
|
|
||||||
// Data.
|
// Data.
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ namespace Opm {
|
|||||||
void flowEbosBlackoilSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosBlackoilSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowProblem) TypeTag;
|
typedef TTAG(EclFlowProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, GridManager) GridManager;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
GridManager::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
Vanguard::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------- Main program -----------------
|
// ----------------- Main program -----------------
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ namespace Opm {
|
|||||||
void flowEbosGasOilSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosGasOilSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowGasOilProblem) TypeTag;
|
typedef TTAG(EclFlowGasOilProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, GridManager) GridManager;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
GridManager::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
Vanguard::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ namespace Opm {
|
|||||||
void flowEbosOilWaterSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosOilWaterSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowOilWaterProblem) TypeTag;
|
typedef TTAG(EclFlowOilWaterProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, GridManager) GridManager;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
GridManager::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
Vanguard::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------- Main program -----------------
|
// ----------------- Main program -----------------
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ namespace Opm {
|
|||||||
void flowEbosPolymerSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosPolymerSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowPolymerProblem) TypeTag;
|
typedef TTAG(EclFlowPolymerProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, GridManager) GridManager;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
GridManager::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
Vanguard::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------- Main program -----------------
|
// ----------------- Main program -----------------
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ namespace Opm {
|
|||||||
void flowEbosSolventSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
void flowEbosSolventSetDeck(Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||||
{
|
{
|
||||||
typedef TTAG(EclFlowSolventProblem) TypeTag;
|
typedef TTAG(EclFlowSolventProblem) TypeTag;
|
||||||
typedef GET_PROP_TYPE(TypeTag, GridManager) GridManager;
|
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||||
|
|
||||||
GridManager::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
Vanguard::setExternalDeck(&deck, &eclState, &schedule, &summaryConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
|
|||||||
const auto es2 = Opm::Parser::parse(filename2);
|
const auto es2 = Opm::Parser::parse(filename2);
|
||||||
const auto& eg2 = es2.getInputGrid();
|
const auto& eg2 = es2.getInputGrid();
|
||||||
|
|
||||||
GridManager gridManager1(eg1);
|
GridManager vanguard1(eg1);
|
||||||
const UnstructuredGrid& grid1 = *gridManager1.c_grid();
|
const UnstructuredGrid& grid1 = *vanguard1.c_grid();
|
||||||
|
|
||||||
GridManager gridManager2(eg2);
|
GridManager vanguard2(eg2);
|
||||||
const UnstructuredGrid& grid2 = *gridManager2.c_grid();
|
const UnstructuredGrid& grid2 = *vanguard2.c_grid();
|
||||||
|
|
||||||
BlackoilState state1( UgGridHelpers::numCells( grid1 ) , UgGridHelpers::numFaces( grid1 ) , 3);
|
BlackoilState state1( UgGridHelpers::numCells( grid1 ) , UgGridHelpers::numFaces( grid1 ) , 3);
|
||||||
BlackoilState state2( UgGridHelpers::numCells( grid2 ) , UgGridHelpers::numFaces( grid2 ) , 3);
|
BlackoilState state2( UgGridHelpers::numCells( grid2 ) , UgGridHelpers::numFaces( grid2 ) , 3);
|
||||||
@@ -73,8 +73,8 @@ BOOST_AUTO_TEST_CASE(EqualsNumericalDifferenceReturnFalse) {
|
|||||||
std::vector<int> actnum = get_testBlackoilStateActnum();
|
std::vector<int> actnum = get_testBlackoilStateActnum();
|
||||||
eg.resetACTNUM(actnum.data());
|
eg.resetACTNUM(actnum.data());
|
||||||
|
|
||||||
GridManager gridManager(eg);
|
GridManager vanguard(eg);
|
||||||
const UnstructuredGrid& grid = *gridManager.c_grid();
|
const UnstructuredGrid& grid = *vanguard.c_grid();
|
||||||
|
|
||||||
BlackoilState state1( UgGridHelpers::numCells( grid ) , UgGridHelpers::numFaces( grid ) , 3);
|
BlackoilState state1( UgGridHelpers::numCells( grid ) , UgGridHelpers::numFaces( grid ) , 3);
|
||||||
BlackoilState state2( UgGridHelpers::numCells( grid ) , UgGridHelpers::numFaces( grid ) , 3);
|
BlackoilState state2( UgGridHelpers::numCells( grid ) , UgGridHelpers::numFaces( grid ) , 3);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
|||||||
Opm::Parser parser;
|
Opm::Parser parser;
|
||||||
Opm::Deck deck(parser.parseFile(filename , parseContext));
|
Opm::Deck deck(parser.parseFile(filename , parseContext));
|
||||||
Opm::EclipseState eclipseState(deck , parseContext);
|
Opm::EclipseState eclipseState(deck , parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager vanguard(eclipseState.getInputGrid());
|
||||||
const auto& grid = eclipseState.getInputGrid();
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
const TableManager table ( deck );
|
const TableManager table ( deck );
|
||||||
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
|||||||
|
|
||||||
// Both wells are open in the first schedule step
|
// Both wells are open in the first schedule step
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState , sched, 0, *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState , sched, 0, *vanguard.c_grid());
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
const struct WellControls* ctrls0 = wells->ctrls[0];
|
const struct WellControls* ctrls0 = wells->ctrls[0];
|
||||||
const struct WellControls* ctrls1 = wells->ctrls[1];
|
const struct WellControls* ctrls1 = wells->ctrls[1];
|
||||||
@@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
|||||||
|
|
||||||
// The injector is stopped
|
// The injector is stopped
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, sched, 1 , *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 1 , *vanguard.c_grid());
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
const struct WellControls* ctrls0 = wells->ctrls[0];
|
const struct WellControls* ctrls0 = wells->ctrls[0];
|
||||||
const struct WellControls* ctrls1 = wells->ctrls[1];
|
const struct WellControls* ctrls1 = wells->ctrls[1];
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ BOOST_AUTO_TEST_CASE(CreateSimulationConfig) {
|
|||||||
EclipseState state(*deck, parseContext);
|
EclipseState state(*deck, parseContext);
|
||||||
EclipseGridConstPtr eclipseGrid = state.getInputGrid();
|
EclipseGridConstPtr eclipseGrid = state.getInputGrid();
|
||||||
std::vector<double> porv = eclipseState->getDoubleGridProperty("PORV")->getData();
|
std::vector<double> porv = eclipseState->getDoubleGridProperty("PORV")->getData();
|
||||||
GridManager gridManager( eclipseState->getInputGrid(), porv );
|
GridManager vanguard( eclipseState->getInputGrid(), porv );
|
||||||
const Grid& grid = *(gridManager.c_grid());
|
const Grid& grid = *(vanguard.c_grid());
|
||||||
|
|
||||||
std::vector<double> threshold_pressures = thresholdPressures(parseContext, eclipseState, grid);
|
std::vector<double> threshold_pressures = thresholdPressures(parseContext, eclipseState, grid);
|
||||||
BOOST_CHECK( threshold_pressures.size() > 0 );
|
BOOST_CHECK( threshold_pressures.size() > 0 );
|
||||||
|
|||||||
+15
-15
@@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
|||||||
Opm::Deck deck = parser.parseFile(filename, parseContext);
|
Opm::Deck deck = parser.parseFile(filename, parseContext);
|
||||||
|
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager vanguard(eclipseState.getInputGrid());
|
||||||
const auto& grid = eclipseState.getInputGrid();
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
const Opm::TableManager table ( deck );
|
const Opm::TableManager table ( deck );
|
||||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
@@ -192,19 +192,19 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
|||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, sched, 0, *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 0, *vanguard.c_grid());
|
||||||
wells_static_check(wellsManager.c_wells());
|
wells_static_check(wellsManager.c_wells());
|
||||||
check_controls_epoch0(wellsManager.c_wells()->ctrls);
|
check_controls_epoch0(wellsManager.c_wells()->ctrls);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, sched, 1, *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 1, *vanguard.c_grid());
|
||||||
wells_static_check(wellsManager.c_wells());
|
wells_static_check(wellsManager.c_wells());
|
||||||
check_controls_epoch1(wellsManager.c_wells()->ctrls);
|
check_controls_epoch1(wellsManager.c_wells()->ctrls);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, sched, 3, *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 3, *vanguard.c_grid());
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
|
|
||||||
// There is 3 wells in total in the deck at the 3rd schedule step.
|
// There is 3 wells in total in the deck at the 3rd schedule step.
|
||||||
@@ -225,15 +225,15 @@ BOOST_AUTO_TEST_CASE(WellsEqual) {
|
|||||||
Opm::Parser parser;
|
Opm::Parser parser;
|
||||||
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager vanguard(eclipseState.getInputGrid());
|
||||||
const auto& grid = eclipseState.getInputGrid();
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
const Opm::TableManager table ( deck );
|
const Opm::TableManager table ( deck );
|
||||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
|
|
||||||
Opm::WellsManager wellsManager0(eclipseState, sched, 0, *gridManager.c_grid());
|
Opm::WellsManager wellsManager0(eclipseState, sched, 0, *vanguard.c_grid());
|
||||||
Opm::WellsManager wellsManager1(eclipseState, sched, 1, *gridManager.c_grid());
|
Opm::WellsManager wellsManager1(eclipseState, sched, 1, *vanguard.c_grid());
|
||||||
|
|
||||||
BOOST_CHECK(wells_equal( wellsManager0.c_wells() , wellsManager0.c_wells(),false));
|
BOOST_CHECK(wells_equal( wellsManager0.c_wells() , wellsManager0.c_wells(),false));
|
||||||
BOOST_CHECK(!wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false));
|
BOOST_CHECK(!wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false));
|
||||||
@@ -245,7 +245,7 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
|
|||||||
Opm::Parser parser;
|
Opm::Parser parser;
|
||||||
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager vanguard(eclipseState.getInputGrid());
|
||||||
const auto& grid = eclipseState.getInputGrid();
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
const Opm::TableManager table ( deck );
|
const Opm::TableManager table ( deck );
|
||||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
@@ -253,8 +253,8 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Opm::WellsManager wellsManager0(eclipseState, sched, 0, *gridManager.c_grid());
|
Opm::WellsManager wellsManager0(eclipseState, sched, 0, *vanguard.c_grid());
|
||||||
Opm::WellsManager wellsManager1(eclipseState, sched, 1, *gridManager.c_grid());
|
Opm::WellsManager wellsManager1(eclipseState, sched, 1, *vanguard.c_grid());
|
||||||
|
|
||||||
BOOST_CHECK(well_controls_equal( wellsManager0.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[0] , false));
|
BOOST_CHECK(well_controls_equal( wellsManager0.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[0] , false));
|
||||||
BOOST_CHECK(well_controls_equal( wellsManager0.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
|
BOOST_CHECK(well_controls_equal( wellsManager0.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
|
||||||
@@ -273,19 +273,19 @@ BOOST_AUTO_TEST_CASE(WellShutOK) {
|
|||||||
Opm::Parser parser;
|
Opm::Parser parser;
|
||||||
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager vanguard(eclipseState.getInputGrid());
|
||||||
const auto& grid = eclipseState.getInputGrid();
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
const Opm::TableManager table ( deck );
|
const Opm::TableManager table ( deck );
|
||||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
|
|
||||||
Opm::WellsManager wellsManager2(eclipseState, sched, 2, *gridManager.c_grid());
|
Opm::WellsManager wellsManager2(eclipseState, sched, 2, *vanguard.c_grid());
|
||||||
|
|
||||||
// Shut wells are not added to the deck. i.e number of wells should be 2-1
|
// Shut wells are not added to the deck. i.e number of wells should be 2-1
|
||||||
BOOST_CHECK(wellsManager2.c_wells()->number_of_wells == 1);
|
BOOST_CHECK(wellsManager2.c_wells()->number_of_wells == 1);
|
||||||
|
|
||||||
//BOOST_CHECK_NO_THROW( Opm::WellsManager wellsManager2(eclipseState , 2 , *gridManager.c_grid(), NULL));
|
//BOOST_CHECK_NO_THROW( Opm::WellsManager wellsManager2(eclipseState , 2 , *vanguard.c_grid(), NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(WellSTOPOK) {
|
BOOST_AUTO_TEST_CASE(WellSTOPOK) {
|
||||||
@@ -294,7 +294,7 @@ BOOST_AUTO_TEST_CASE(WellSTOPOK) {
|
|||||||
Opm::Parser parser;
|
Opm::Parser parser;
|
||||||
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager vanguard(eclipseState.getInputGrid());
|
||||||
const auto& grid = eclipseState.getInputGrid();
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
const Opm::TableManager table ( deck );
|
const Opm::TableManager table ( deck );
|
||||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
@@ -302,7 +302,7 @@ BOOST_AUTO_TEST_CASE(WellSTOPOK) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Opm::WellsManager wellsManager(eclipseState, sched, 0, *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 0, *vanguard.c_grid());
|
||||||
|
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
const struct WellControls* ctrls0 = wells->ctrls[0];
|
const struct WellControls* ctrls0 = wells->ctrls[0];
|
||||||
|
|||||||
Reference in new issue
Block a user