Capture some variables in FlowMainEbos.

Make Opm::FlowMainEbos capture the variables argc, argv, outputCout, and
outputFiles. Passing the variables to the constructor and saving them as
class variables in Opm::FlowMainEbos makes the implementation of the
Python interface simpler. For example, the step_init() method does not
need to ask Opm::Main about the values of the variables when it needs to
run execute() in FlowMainEbos.

Another advantage of this refactoring could be that less variables needs
to be passed around from Opm::Main, to flow_ebos_xxx.cpp, and then again
to FlowMainEbos.
This commit is contained in:
Håkon Hægland
2020-06-25 20:04:19 +02:00
parent 8158e64351
commit f9d47b7c68
12 changed files with 70 additions and 52 deletions

View File

@@ -100,8 +100,8 @@ namespace Opm {
# else
Dune::MPIHelper::instance(argc, argv);
# endif
Opm::FlowMainEbos<TypeTag> mainfunc;
return mainfunc.execute(argc, argv, outputCout, outputFiles);
Opm::FlowMainEbos<TypeTag> mainfunc(argc, argv, outputCout, outputFiles);
return mainfunc.execute();
}
}