Removed WellsManager constructor which takes an ole Eclipsegridparser instance.
This commit is contained in:
@@ -173,30 +173,6 @@ void check_controls_epoch1( struct WellControls ** ctrls) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Constructor_Works) {
|
||||
Opm::EclipseGridParser Deck("wells_manager_data.data");
|
||||
Opm::GridManager gridManager(Deck);
|
||||
|
||||
Deck.setCurrentEpoch(0);
|
||||
{
|
||||
Opm::WellsManager wellsManager(Deck, *gridManager.c_grid(), NULL);
|
||||
const Wells* wells = wellsManager.c_wells();
|
||||
wells_static_check( wells );
|
||||
check_controls_epoch0( wells->ctrls );
|
||||
}
|
||||
|
||||
|
||||
Deck.setCurrentEpoch(1);
|
||||
{
|
||||
Opm::WellsManager wellsManager(Deck, *gridManager.c_grid(), NULL);
|
||||
const Wells* wells = wellsManager.c_wells();
|
||||
|
||||
wells_static_check( wells );
|
||||
check_controls_epoch1( wells->ctrls );
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
||||
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
@@ -205,70 +181,16 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
||||
Opm::EclipseGridParser Deck("wells_manager_data.data");
|
||||
Opm::GridManager gridManager(Deck);
|
||||
|
||||
Deck.setCurrentEpoch(0);
|
||||
{
|
||||
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager oldWellsManager(Deck, *gridManager.c_grid(), NULL);
|
||||
|
||||
std::cout << "Checking new well structure, epoch 0" << std::endl;
|
||||
wells_static_check( wellsManager.c_wells() );
|
||||
|
||||
std::cout << "Checking old well structure, epoch 0" << std::endl;
|
||||
wells_static_check( oldWellsManager.c_wells() );
|
||||
|
||||
check_controls_epoch0( wellsManager.c_wells()->ctrls );
|
||||
|
||||
BOOST_CHECK(wells_equal(wellsManager.c_wells(), oldWellsManager.c_wells() , false));
|
||||
}
|
||||
|
||||
Deck.setCurrentEpoch(1);
|
||||
{
|
||||
Opm::WellsManager wellsManager(eclipseState, 1, *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager oldWellsManager(Deck, *gridManager.c_grid(), NULL);
|
||||
|
||||
std::cout << "Checking new well structure, epoch 1" << std::endl;
|
||||
wells_static_check( wellsManager.c_wells() );
|
||||
|
||||
std::cout << "Checking old well structure, epoch 1" << std::endl;
|
||||
wells_static_check( oldWellsManager.c_wells() );
|
||||
|
||||
check_controls_epoch1( wellsManager.c_wells()->ctrls );
|
||||
|
||||
BOOST_CHECK(wells_equal( wellsManager.c_wells(), oldWellsManager.c_wells(),false));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(New_Constructor_Works_ExpandedData) {
|
||||
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(parser->parseFile("wells_manager_data_expanded.data")));
|
||||
|
||||
Opm::EclipseGridParser Deck("wells_manager_data_expanded.data");
|
||||
Opm::GridManager gridManager(Deck);
|
||||
|
||||
Deck.setCurrentEpoch(0);
|
||||
{
|
||||
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager oldWellsManager(Deck, *gridManager.c_grid(), NULL);
|
||||
|
||||
BOOST_CHECK(wells_equal(wellsManager.c_wells(), oldWellsManager.c_wells(),false));
|
||||
}
|
||||
|
||||
Deck.setCurrentEpoch(1);
|
||||
{
|
||||
Opm::WellsManager wellsManager(eclipseState, 1, *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager oldWellsManager(Deck, *gridManager.c_grid(), NULL);
|
||||
|
||||
BOOST_CHECK(wells_equal( wellsManager.c_wells(), oldWellsManager.c_wells(), true));
|
||||
}
|
||||
|
||||
Deck.setCurrentEpoch(2);
|
||||
{
|
||||
Opm::WellsManager wellsManager(eclipseState, 2, *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager oldWellsManager(Deck, *gridManager.c_grid(), NULL);
|
||||
|
||||
BOOST_CHECK(wells_equal( wellsManager.c_wells(), oldWellsManager.c_wells(), true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,12 +199,11 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works_ExpandedData) {
|
||||
BOOST_AUTO_TEST_CASE(WellsEqual) {
|
||||
Opm::EclipseGridParser Deck("wells_manager_data.data");
|
||||
Opm::GridManager gridManager(Deck);
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(parser->parseFile("wells_manager_data.data")));
|
||||
|
||||
Deck.setCurrentEpoch(0);
|
||||
Opm::WellsManager wellsManager0(Deck, *gridManager.c_grid(), NULL);
|
||||
|
||||
Deck.setCurrentEpoch(1);
|
||||
Opm::WellsManager wellsManager1(Deck, *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager wellsManager1(eclipseState , 1 , *gridManager.c_grid(), NULL);
|
||||
|
||||
BOOST_CHECK( wells_equal( wellsManager0.c_wells() , wellsManager0.c_wells(),false) );
|
||||
BOOST_CHECK( !wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false) );
|
||||
@@ -293,11 +214,11 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
|
||||
Opm::EclipseGridParser Deck("wells_manager_data.data");
|
||||
Opm::GridManager gridManager(Deck);
|
||||
|
||||
Deck.setCurrentEpoch(0);
|
||||
Opm::WellsManager wellsManager0(Deck, *gridManager.c_grid(), NULL);
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(parser->parseFile("wells_manager_data.data")));
|
||||
|
||||
Deck.setCurrentEpoch(1);
|
||||
Opm::WellsManager wellsManager1(Deck, *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
|
||||
Opm::WellsManager wellsManager1(eclipseState , 1 , *gridManager.c_grid(), NULL);
|
||||
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user