Substantial edits to Eclipse3DProperties

* Removed all references to state, need to fix initPORV
* Made TransMult return raw pointer const GridProperty over shared pointer.
* Moved getDirectionProperty and hasDirectionProperty out of API
** Removed tests as these methods are no longer public
* Moved grid properties stuff to new class
* Removed use of deck in SatfuncInitializers, moved to TableManager
* Removed shared_ptr for several members of EclipseState and 3DProperties
* Moved region-property from EclipseState to Eclipse3DProperties
* Moved initGridopts from EclipseState to Eclipse3DProperties
* Made several Eclipse3DProperties methods private
* Postprocessors take raw pointers, not shared_ptr---these will be phased out
* Fixed return reference instead of copy several places
** GridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
* Removed obsolete tests
This commit is contained in:
Pål Grønås Drange
2016-03-08 17:07:42 +01:00
parent 49a1c17eb8
commit e48b64c41d
41 changed files with 3611 additions and 1916 deletions

View File

@@ -64,14 +64,86 @@ std::shared_ptr<const Opm::Deck> createSingleRecordDeck() {
}
std::shared_ptr<const Opm::Deck> createSingleRecordDeckWithVd() {
const char *deckData =
"RUNSPEC\n"
"ENDSCALE\n"
"2* 1 2 /\n"
"PROPS\n"
"TABDIMS\n"
" 2 /\n"
"\n"
"SWFN\n"
"0.22 .0 7.0 \n"
"0.3 .0 4.0 \n"
"0.5 .24 2.5 \n"
"0.8 .65 1.0 \n"
"0.9 .83 .5 \n"
"1.0 1.00 .0 /\n"
"/\n"
"IMPTVD\n"
"3000.0 6*0.1 0.31 1*0.1\n"
"9000.0 6*0.1 0.32 1*0.1/\n"
"ENPTVD\n"
"3000.0 0.20 0.20 1.0 0.0 0.04 1.0 0.18 0.22\n"
"9000.0 0.22 0.22 1.0 0.0 0.04 1.0 0.18 0.22 /";
Opm::ParserPtr parser(new Opm::Parser);
Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext()));
return deck;
}
std::shared_ptr<const Opm::Deck> createSingleRecordDeckWithVd() {
const char *deckData =
"RUNSPEC\n"
"ENDSCALE\n"
"2* 1 2 /\n"
"PROPS\n"
"TABDIMS\n"
" 2 /\n"
"\n"
"SWFN\n"
"0.22 .0 7.0 \n"
"0.3 .0 4.0 \n"
"0.5 .24 2.5 \n"
"0.8 .65 1.0 \n"
"0.9 .83 .5 \n"
"1.0 1.00 .0 /\n"
"/\n"
"IMPTVD\n"
"3000.0 6*0.1 0.31 1*0.1\n"
"9000.0 6*0.1 0.32 1*0.1/\n"
"ENPTVD\n"
"3000.0 0.20 0.20 1.0 0.0 0.04 1.0 0.18 0.22\n"
"9000.0 0.22 0.22 1.0 0.0 0.04 1.0 0.18 0.22 /";
Opm::ParserPtr parser(new Opm::Parser);
Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseMode()));
return deck;
}
BOOST_AUTO_TEST_CASE( CreateTables ) {
std::shared_ptr<const Opm::Deck> deck = createSingleRecordDeck();
Opm::TableManager tables(*deck);
auto tabdims = tables.getTabdims();
BOOST_CHECK_EQUAL( tabdims->getNumSatTables() , 2 );
BOOST_CHECK( !tables.useImptvd() );
BOOST_CHECK( !tables.useEnptvd() );
}
BOOST_AUTO_TEST_CASE( CreateTablesWithVd ) {
std::shared_ptr<const Opm::Deck> deck = createSingleRecordDeckWithVd();
Opm::TableManager tables(*deck);
auto tabdims = tables.getTabdims();
BOOST_CHECK_EQUAL( tabdims->getNumSatTables() , 2 );
BOOST_CHECK( tables.useImptvd() );
BOOST_CHECK( tables.useEnptvd() );
}
/*****************************************************************/