From 45758d723c9e73161fd53a26050f5e48a3d84dc7 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Fri, 25 Apr 2014 17:48:41 +0200 Subject: [PATCH] ECL problem: return the stem of the name of the deck file in the name() method this causes output files to have the expected names, e.g. "SPE9" or "NORNE" instead of "ECL"... --- ewoms/io/eclipsewriter.hh | 11 +++++------ tests/problems/eclproblem.hh | 9 +-------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/ewoms/io/eclipsewriter.hh b/ewoms/io/eclipsewriter.hh index 3c0963fe1..79f635c78 100644 --- a/ewoms/io/eclipsewriter.hh +++ b/ewoms/io/eclipsewriter.hh @@ -152,9 +152,6 @@ public: , vertexMapper_(gridView_) { reportStepIdx_ = 0; - - if (enableEclipseOutput_()) - EclipseWriterHelper::writeHeaders_(*this); } ~EclipseWriter() @@ -182,11 +179,13 @@ public: } /*! - * \brief Called when ever a new time step or a new grid must be - * written. + * \brief Called whenever a new time step must be written. */ void beginWrite(double t) - {} + { + if (enableEclipseOutput_() && reportStepIdx_ == 0) + EclipseWriterHelper::writeHeaders_(*this); + } /* * \brief Add a vertex-centered scalar field to the output. diff --git a/tests/problems/eclproblem.hh b/tests/problems/eclproblem.hh index dc4f020a3..0ada894ba 100644 --- a/tests/problems/eclproblem.hh +++ b/tests/problems/eclproblem.hh @@ -63,9 +63,6 @@ NEW_TYPE_TAG(EclBaseProblem, INHERITS_FROM(EclGridManager)); // The temperature inside the reservoir NEW_PROP_TAG(Temperature); -// The name of the simulation -NEW_PROP_TAG(SimulationName); - // Set the problem property SET_TYPE_PROP(EclBaseProblem, Problem, Ewoms::EclProblem); @@ -100,7 +97,6 @@ SET_BOOL_PROP(EclBaseProblem, EnablePartialRelinearization, true); // set the defaults for some problem specific properties SET_SCALAR_PROP(EclBaseProblem, Temperature, 293.15); -SET_STRING_PROP(EclBaseProblem, SimulationName, "ecl"); // The default for the end time of the simulation [s] // @@ -180,9 +176,6 @@ public: EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature, "The temperature [K] in the reservoir"); - EWOMS_REGISTER_PARAM(TypeTag, std::string, SimulationName, - "The name of the simulation used for the output " - "files"); } /*! @@ -284,7 +277,7 @@ public: * \copydoc FvBaseProblem::name */ std::string name() const - { return EWOMS_GET_PARAM(TypeTag, std::string, SimulationName); } + { return this->simulator().gridManager().caseName(); } /*! * \copydoc FvBaseMultiPhaseProblem::temperature