TransMult, Init, and SimConfig are references, applyModifierDeck takes reference, and EclipseState constructor too

This commit is contained in:
Pål Grønås Drange
2016-08-08 10:07:09 +02:00
parent ac11db635c
commit bd58792714
21 changed files with 51 additions and 50 deletions

View File

@@ -349,7 +349,7 @@ int main(int argc, char** argv) {
ParseContext parseContext;
std::cout << "Parsing input file ............: " << input_file << std::endl;
DeckConstPtr deck = parser->parseFile(input_file, parseContext);
std::shared_ptr<EclipseState> state = std::make_shared<EclipseState>( deck , parseContext );
std::shared_ptr<EclipseState> state = std::make_shared<EclipseState>( *deck , parseContext );
std::cout << "Loading eclipse INIT file .....: " << init_file << std::endl;
ecl_file_type * ecl_init = ecl_file_open( init_file.c_str() , 0 );

View File

@@ -103,7 +103,7 @@ try
ParseContext parseContext;
std::string deck_filename = param.get<std::string>("deck_filename");
deck = parser->parseFile(deck_filename , parseContext);
eclipseState.reset(new EclipseState(deck, parseContext));
eclipseState.reset(new EclipseState(*deck, parseContext));
// Grid init
grid.reset(new GridManager(eclipseState->getInputGrid()));

View File

@@ -115,7 +115,7 @@ try
std::string deck_filename = param.get<std::string>("deck_filename");
deck = parser->parseFile(deck_filename , parseContext);
eclipseState.reset( new EclipseState(deck, parseContext));
eclipseState.reset( new EclipseState(*deck, parseContext));
// Grid init
grid.reset(new GridManager(eclipseState->getInputGrid()));
{

View File

@@ -115,7 +115,7 @@ try
std::string deck_filename = param.get<std::string>("deck_filename");
Opm::ParseContext parseContext;
deck = parser->parseFile(deck_filename, parseContext);
eclipseState.reset(new EclipseState(deck , parseContext));
eclipseState.reset(new EclipseState(*deck , parseContext));
// Grid init
grid.reset(new GridManager(eclipseState->getInputGrid()));

View File

@@ -102,7 +102,7 @@ try
ParserPtr parser(new Opm::Parser());
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
deck = parser->parseFile(deck_filename , parseContext);
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
eclipseState.reset(new Opm::EclipseState(*deck , parseContext));
// Grid init
grid.reset(new GridManager(eclipseState->getInputGrid()));

View File

@@ -102,7 +102,8 @@ try
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
ParserPtr parser(new Opm::Parser());
deck = parser->parseFile(deck_filename , parseContext);
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
eclipseState.reset(new Opm::EclipseState(*deck , parseContext));
// Grid init
grid.reset(new GridManager(eclipseState->getInputGrid()));

View File

@@ -156,7 +156,7 @@ try
try {
deck = parser->parseFile(deck_filename , parseContext);
Opm::checkDeck(deck, parser);
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
eclipseState.reset(new Opm::EclipseState(*deck , parseContext));
}
catch (const std::invalid_argument& e) {
std::cerr << "Failed to create valid ECLIPSESTATE object. See logfile: " << logFile << std::endl;