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

@@ -85,8 +85,9 @@ int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFile
Dune::MPIHelper::instance(argc, argv);
#endif
Opm::FlowMainEbos<TTAG(EclFlowOilWaterProblem)> mainfunc;
return mainfunc.execute(argc, argv, outputCout, outputFiles);
Opm::FlowMainEbos<TTAG(EclFlowOilWaterProblem)>
mainfunc {argc, argv, outputCout, outputFiles};
return mainfunc.execute();
}
}