SetupMSW() { Opm::ParseContext parse_context; Opm::ParserPtr parser(new Opm::Parser()); Opm::DeckConstPtr deck = parser->parseFile("msw.data", parse_context); Opm::EclipseStateConstPtr ecl_state(new Opm::EclipseState(*deck , parse_context)); // Create grid. const std::vector<double>& porv = ecl_state->get3DProperties().getDoubleGridProperty("PORV").getData(); std::unique_ptr<GridInit> grid_init(new GridInit(ecl_state, porv)); const Grid& grid = grid_init->grid(); // Create material law manager. std::vector<int> compressed_to_cartesianIdx; Opm::createGlobalCellArray(grid, compressed_to_cartesianIdx); std::shared_ptr<MaterialLawManager> material_law_manager(new MaterialLawManager()); material_law_manager->initFromDeck(deck, ecl_state, compressed_to_cartesianIdx); std::unique_ptr<FluidProps> fluidprops(new FluidProps(deck, ecl_state, material_law_manager, grid)); const size_t current_timestep = 0; // dummy_dynamic_list_econ_lmited const Opm::DynamicListEconLimited dummy_dynamic_list; // Create wells. Opm::WellsManager wells_manager(ecl_state, current_timestep, Opm::UgGridHelpers::numCells(grid), Opm::UgGridHelpers::globalCell(grid), Opm::UgGridHelpers::cartDims(grid), Opm::UgGridHelpers::dimensions(grid), Opm::UgGridHelpers::cell2Faces(grid), Opm::UgGridHelpers::beginFaceCentroids(grid), fluidprops->permeability(), dummy_dynamic_list, false // We need to pass the optionaly arguments // as we get the following error otherwise // with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11 // converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructor , std::vector<double>(), // null well_potentials std::unordered_set<std::string>()); const Wells* wells = wells_manager.c_wells(); const auto wells_ecl = ecl_state->getSchedule()->getWells(current_timestep); ms_wells.reset(new Opm::MultisegmentWells(wells, wells_ecl, current_timestep)); };
SetupMSW() { Opm::ParseContext parse_context; Opm::ParserPtr parser(new Opm::Parser()); Opm::DeckConstPtr deck = parser->parseFile("msw.data", parse_context); Opm::EclipseStateConstPtr ecl_state(new Opm::EclipseState(deck , parse_context)); // Create grid. const std::vector<double>& porv = ecl_state->get3DProperties().getDoubleGridProperty("PORV").getData(); std::unique_ptr<GridInit> grid_init(new GridInit(ecl_state, porv)); const Grid& grid = grid_init->grid(); // Create material law manager. std::vector<int> compressed_to_cartesianIdx; Opm::createGlobalCellArray(grid, compressed_to_cartesianIdx); std::shared_ptr<MaterialLawManager> material_law_manager(new MaterialLawManager()); material_law_manager->initFromDeck(deck, ecl_state, compressed_to_cartesianIdx); std::unique_ptr<FluidProps> fluidprops(new FluidProps(deck, ecl_state, material_law_manager, grid)); const size_t current_timestep = 0; // dummy_dynamic_list_econ_lmited const Opm::DynamicListEconLimited dummy_dynamic_list; // Create wells. Opm::WellsManager wells_manager(ecl_state, current_timestep, Opm::UgGridHelpers::numCells(grid), Opm::UgGridHelpers::globalCell(grid), Opm::UgGridHelpers::cartDims(grid), Opm::UgGridHelpers::dimensions(grid), Opm::UgGridHelpers::cell2Faces(grid), Opm::UgGridHelpers::beginFaceCentroids(grid), fluidprops->permeability(), dummy_dynamic_list, false); const Wells* wells = wells_manager.c_wells(); const auto wells_ecl = ecl_state->getSchedule()->getWells(current_timestep); ms_wells.reset(new Opm::MultisegmentWells(wells, wells_ecl, current_timestep)); };