Commit 6666d866 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

deprecate old Dumux::start*() functions and add Dumux::start()

Currently, Dumux::startWithParameters() is just an alias for
Dumux::start(). startWithParameters() has not been deprecated, but all
files have been converted to use Dumux::start().

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7701 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 20f06c3a
......@@ -86,6 +86,7 @@ void printUsageGrid(const char *progname)
* \param argv The 'argv' argument of the main function
*/
template <class TypeTag>
DUMUX_DEPRECATED_MSG("Please use Dumux::start() instead")
int startFromDGF(int argc, char **argv)
{
#ifdef NDEBUG
......@@ -173,6 +174,7 @@ int startFromDGF(int argc, char **argv)
* \param argv The 'argv' argument of the main function
*/
template <class TypeTag>
DUMUX_DEPRECATED_MSG("Please use Dumux::start() instead")
int startWithGrid(const typename GET_PROP_TYPE(TypeTag, Grid) &grid,
int argc,
char **argv)
......@@ -550,7 +552,7 @@ bool inDebugger()
* \param usage Callback function for printing the usage message
*/
template <class TypeTag>
int startWithParameters(int argc,
int start(int argc,
char **argv,
void (*usage)(const char *, const std::string &))
{
......@@ -575,6 +577,28 @@ int startWithParameters(int argc,
return startWithParameters_<TypeTag>(argc, argv, usage);
}
/*!
* \ingroup Start
*
* \brief Provides a main function which reads in parameters from the
* command line and a parameter file.
*
* In this function only the differentiation between debugger
* or not is made.
*
* \tparam TypeTag The type tag of the problem which needs to be solved
*
* \param argc The number of command line arguments of the program
* \param argv The contents of the command line arguments of the program
* \param usage Callback function for printing the usage message
*/
template <class TypeTag>
int startWithParameters(int argc,
char **argv,
void (*usage)(const char *, const std::string &))
{ return start<TypeTag>(argc, argv, usage); }
} // namespace Dumux
#endif
......@@ -58,5 +58,5 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(OnePTestProblem) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
......@@ -59,5 +59,5 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(OnePTwoCOutflowProblem) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
......@@ -75,7 +75,7 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(LensProblem) TypeTag;
return Dumux::startWithParameters<TypeTag>(argc, argv, usage);
return Dumux::start<TypeTag>(argc, argv, usage);
}
......
......@@ -66,5 +66,5 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(InjectionProblem) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
......@@ -60,5 +60,5 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(WaterAirProblem) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
......@@ -65,7 +65,7 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(InjectionProblem2PNI) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
//! \cond INTERNAL
......
......@@ -61,6 +61,6 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(InfiltrationProblem) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
......@@ -64,5 +64,5 @@ int main(int argc, char** argv)
{
typedef TTAG(KuevetteProblem) ProblemTypeTag;
// typedef TTAG(ColumnProblem) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
......@@ -58,5 +58,5 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(ObstacleProblem) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
......@@ -58,5 +58,5 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
typedef TTAG(RichardsLensProblem) ProblemTypeTag;
return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage);
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment