diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 105f3f178..d5cf473bc 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -295,6 +295,7 @@ template class EclProblem : public GET_PROP_TYPE(TypeTag, BaseProblem) { typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType; + typedef typename GET_PROP_TYPE(TypeTag, Problem) Implementation; typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; @@ -352,7 +353,6 @@ class EclProblem : public GET_PROP_TYPE(TypeTag, BaseProblem) typedef typename GridView::template Codim<0>::Iterator ElementIterator; - struct RockParams { Scalar referencePressure; Scalar compressibility; @@ -379,6 +379,48 @@ public: "The frequencies of which time steps are serialized to disk"); } + /*! + * \copydoc FvBaseProblem::handlePositionalParameter + */ + static int handlePositionalParameter(std::string& errorMsg, + int argc OPM_UNUSED, + const char** argv, + int paramIdx, + int posParamIdx OPM_UNUSED) + { + typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta; + Dune::ParameterTree& tree = ParamsMeta::tree(); + + if (tree.hasKey("EclDeckFileName")) { + errorMsg = "File name of ECL specified multiple times"; + return 0; + } + + tree["EclDeckFileName"] = argv[paramIdx]; + return 1; + } + + /*! + * \copydoc FvBaseProblem::helpPreamble + */ + static std::string helpPreamble(int argc OPM_UNUSED, + const char **argv) + { + std::string desc = Implementation::briefDescription(); + if (!desc.empty()) + desc = desc + "\n"; + + return + "Usage: "+std::string(argv[0]) + " [OPTIONS] [ECL_DECK_FILENAME]\n" + + desc; + } + + /*! + * \copydoc FvBaseProblem::briefDescription + */ + static std::string briefDescription() + { return "ebos, the Ecl Black-Oil reservoir Simulator. A program to process ECL input files."; } + /*! * \copydoc Doxygen::defaultProblemConstructor */