mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
TransMult, Init, and SimConfig are references, applyModifierDeck takes reference, and EclipseState constructor too
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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()));
|
||||
{
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user