Replace flowMain() function with FlowMain class.

This commit is contained in:
Atgeirr Flø Rasmussen 2015-12-09 09:56:09 +01:00
parent 8e2cb4161a
commit abf5443f33
5 changed files with 14 additions and 5 deletions

View File

@ -37,5 +37,6 @@ main(int argc, char** argv)
typedef UnstructuredGrid Grid;
typedef Opm::SimulatorFullyImplicitBlackoil<Grid> Simulator;
return Opm::flowMain<Grid, Simulator>(argc, argv);
Opm::FlowMain<Grid, Simulator> mainfunc;
return mainfunc.execute(argc, argv);
}

View File

@ -37,5 +37,6 @@ main(int argc, char** argv)
typedef Dune::CpGrid Grid;
typedef Opm::SimulatorFullyImplicitBlackoil<Grid> Simulator;
return Opm::flowMain<Grid, Simulator>(argc, argv);
Opm::FlowMain<Grid, Simulator> mainfunc;
return mainfunc.execute(argc, argv);
}

View File

@ -37,5 +37,6 @@ main(int argc, char** argv)
typedef UnstructuredGrid Grid;
typedef Opm::SimulatorFullyImplicitBlackoilMultiSegment<Grid> Simulator;
return Opm::flowMain<Grid, Simulator>(argc, argv);
Opm::FlowMain<Grid, Simulator> mainfunc;
return mainfunc.execute(argc, argv);
}

View File

@ -37,5 +37,6 @@ main(int argc, char** argv)
typedef Dune::CpGrid Grid;
typedef Opm::SimulatorFullyImplicitBlackoilMultiSegment<Grid> Simulator;
return Opm::flowMain<Grid, Simulator>(argc, argv);
Opm::FlowMain<Grid, Simulator> mainfunc;
return mainfunc.execute(argc, argv);
}

View File

@ -119,7 +119,10 @@ namespace Opm
/// content of this function used to be in the main() function of
/// flow.cpp.
template <class Grid, class Simulator>
inline int flowMain(int argc, char** argv)
class FlowMain
{
public:
int execute(int argc, char** argv)
try {
using namespace Opm;
@ -443,6 +446,8 @@ namespace Opm
return EXIT_FAILURE;
}
}; // class FlowMain
} // namespace Opm