mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Pass sim start argument to SummaryState constructor
This commit is contained in:
@@ -18,8 +18,10 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <chrono>
|
||||
|
||||
#define BOOST_TEST_MODULE StoppedWellsTests
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
@@ -46,7 +48,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
||||
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
Opm::SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
double target_surfacerate_inj;
|
||||
double target_surfacerate_prod;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <chrono>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -44,7 +45,7 @@ BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
|
||||
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Runspec runspec(deck);
|
||||
const Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
SummaryState summaryState;
|
||||
SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
WellCollection collection;
|
||||
|
||||
@@ -83,7 +84,7 @@ BOOST_AUTO_TEST_CASE(EfficiencyFactor) {
|
||||
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Runspec runspec(deck);
|
||||
const Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
size_t timestep = 2;
|
||||
WellCollection collection;
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#define BOOST_TEST_MODULE WellModelTest
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
@@ -73,6 +75,7 @@ struct SetupTest {
|
||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, ecl_state->getInputGrid());
|
||||
const Opm::Runspec runspec (deck);
|
||||
schedule.reset( new Opm::Schedule(deck, ecl_state->getInputGrid(), eclipseProperties, runspec));
|
||||
summaryState.reset( new Opm::SummaryState(std::chrono::system_clock::from_time_t(schedule->getStartTime())));
|
||||
}
|
||||
|
||||
// Create grid.
|
||||
@@ -87,7 +90,7 @@ struct SetupTest {
|
||||
// Create wells.
|
||||
wells_manager.reset(new Opm::WellsManager(*ecl_state,
|
||||
*schedule,
|
||||
summaryState,
|
||||
*summaryState,
|
||||
current_timestep,
|
||||
Opm::UgGridHelpers::numCells(grid),
|
||||
Opm::UgGridHelpers::globalCell(grid),
|
||||
@@ -103,7 +106,7 @@ struct SetupTest {
|
||||
std::unique_ptr<const Opm::WellsManager> wells_manager;
|
||||
std::unique_ptr<const Opm::EclipseState> ecl_state;
|
||||
std::unique_ptr<const Opm::Schedule> schedule;
|
||||
Opm::SummaryState summaryState;
|
||||
std::unique_ptr<Opm::SummaryState> summaryState;
|
||||
int current_timestep;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#define BOOST_TEST_MODULE WellsGroupTest
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
@@ -50,8 +51,8 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
|
||||
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
SummaryState summaryState;
|
||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||
SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||
|
||||
auto wells = sched.getWells2atEnd();
|
||||
|
||||
@@ -89,7 +90,7 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
|
||||
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
for( const auto& grp_name : sched.groupNames() ) {
|
||||
const auto& group = sched.getGroup2(grp_name, 2);
|
||||
@@ -127,7 +128,7 @@ BOOST_AUTO_TEST_CASE(EfficiencyFactor) {
|
||||
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
for( const auto& grp_name : sched.groupNames() ) {
|
||||
const auto& group = sched.getGroup2(grp_name, 2);
|
||||
|
||||
@@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
Opm::SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
{
|
||||
Opm::WellsManager wellsManager(eclipseState, sched, summaryState, 0, *vanguard.c_grid());
|
||||
@@ -225,7 +225,7 @@ BOOST_AUTO_TEST_CASE(WellsEqual) {
|
||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
Opm::SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
|
||||
Opm::WellsManager wellsManager0(eclipseState, sched, summaryState, 0, *vanguard.c_grid());
|
||||
@@ -246,7 +246,7 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
|
||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
Opm::SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
|
||||
Opm::WellsManager wellsManager0(eclipseState, sched, summaryState, 0, *vanguard.c_grid());
|
||||
@@ -274,7 +274,7 @@ BOOST_AUTO_TEST_CASE(WellShutOK) {
|
||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
Opm::SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
Opm::WellsManager wellsManager2(eclipseState, sched, summaryState, 2, *vanguard.c_grid());
|
||||
|
||||
@@ -295,7 +295,7 @@ BOOST_AUTO_TEST_CASE(WellSTOPOK) {
|
||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec);
|
||||
Opm::SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
|
||||
|
||||
Opm::WellsManager wellsManager(eclipseState, sched, summaryState, 0, *vanguard.c_grid());
|
||||
@@ -319,7 +319,7 @@ BOOST_AUTO_TEST_CASE(removeWellWithNoPerforation) {
|
||||
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, inputGrid);
|
||||
const Opm::Runspec runspec (deck);
|
||||
Opm::Schedule sched(deck, inputGrid, eclipseProperties, runspec);
|
||||
Opm::SummaryState summaryState;
|
||||
Opm::SummaryState summaryState(std::chrono::system_clock::from_time_t(sched.getStartTime()));
|
||||
const auto eclipseGrid = Opm::UgGridHelpers::createEclipseGrid(*gridManager.c_grid(), inputGrid);
|
||||
sched.filterConnections(eclipseGrid);
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <opm/grid/GridManager.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
@@ -51,7 +52,7 @@ struct Setup
|
||||
, pu (Opm::phaseUsageFromDeck(es))
|
||||
, grid (es.getInputGrid())
|
||||
, sched(deck, es)
|
||||
, st()
|
||||
, st(std::chrono::system_clock::from_time_t(sched.getStartTime()))
|
||||
{}
|
||||
|
||||
Opm::EclipseState es;
|
||||
|
||||
Reference in New Issue
Block a user