mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5148 from akva2/simulatorfullyimplicit_drop_ebos
SimulatorFullyImplicitBlackoilEbos: rename to SimulatorFullyImplicitBlackoil
This commit is contained in:
commit
0f5c638947
@ -51,7 +51,7 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
opm/simulators/flow/Main.cpp
|
||||
opm/simulators/flow/NonlinearSolver.cpp
|
||||
opm/simulators/flow/RSTConv.cpp
|
||||
opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.cpp
|
||||
opm/simulators/flow/SimulatorReportBanners.cpp
|
||||
opm/simulators/flow/SimulatorSerializer.cpp
|
||||
opm/simulators/flow/ValidationFunctions.cpp
|
||||
opm/simulators/flow/partitionCells.cpp
|
||||
@ -453,7 +453,8 @@ list (APPEND PUBLIC_HEADER_FILES
|
||||
opm/simulators/flow/Main.hpp
|
||||
opm/simulators/flow/NonlinearSolver.hpp
|
||||
opm/simulators/flow/RSTConv.hpp
|
||||
opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp
|
||||
opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp
|
||||
opm/simulators/flow/SimulatorReportBanners.hpp
|
||||
opm/simulators/flow/SimulatorSerializer.hpp
|
||||
opm/simulators/flow/KeywordValidation.hpp
|
||||
opm/simulators/flow/LogOutputHelper.hpp
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <flow/flow_ebos_blackoil_legacyassembly.hpp>
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
#include <opm/models/discretization/common/tpfalinearizer.hh>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
#include <opm/models/discretization/common/tpfalinearizer.hh>
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoilonephaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <opm/material/common/ResetLocale.hpp>
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
#include <opm/simulators/flow/Main.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
@ -23,7 +23,7 @@
|
||||
#define OPM_FLOW_MAIN_EBOS_HEADER_INCLUDED
|
||||
|
||||
#include <opm/simulators/flow/Banners.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp>
|
||||
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
@ -105,7 +105,7 @@ void handleExtraConvergenceOutput(SimulatorReport& report,
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
|
||||
using Simulator = SimulatorFullyImplicitBlackoilEbos<TypeTag>;
|
||||
using Simulator = SimulatorFullyImplicitBlackoil<TypeTag>;
|
||||
|
||||
FlowMainEbos(int argc, char **argv, bool output_cout, bool output_files )
|
||||
: argc_{argc}, argv_{argv},
|
||||
|
@ -19,8 +19,8 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_SIMULATORFULLYIMPLICITBLACKOILEBOS_HEADER_INCLUDED
|
||||
#define OPM_SIMULATORFULLYIMPLICITBLACKOILEBOS_HEADER_INCLUDED
|
||||
#ifndef OPM_SIMULATOR_FULLY_IMPLICIT_BLACKOIL_HEADER_INCLUDED
|
||||
#define OPM_SIMULATOR_FULLY_IMPLICIT_BLACKOIL_HEADER_INCLUDED
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
#include <opm/simulators/flow/ConvergenceOutputConfiguration.hpp>
|
||||
#include <opm/simulators/flow/ExtraConvergenceOutputThread.hpp>
|
||||
#include <opm/simulators/flow/NonlinearSolver.hpp>
|
||||
#include <opm/simulators/flow/SimulatorReportBanners.hpp>
|
||||
#include <opm/simulators/flow/SimulatorSerializer.hpp>
|
||||
#include <opm/simulators/timestepping/AdaptiveTimeStepping.hpp>
|
||||
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
||||
@ -145,14 +146,9 @@ struct LoadStep<TypeTag, TTag::EclFlowProblem>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void outputReportStep(const SimulatorTimer& timer);
|
||||
void outputTimestampFIP(const SimulatorTimer& timer,
|
||||
const std::string& title,
|
||||
const std::string& version);
|
||||
|
||||
/// a simulator for the blackoil model
|
||||
template<class TypeTag>
|
||||
class SimulatorFullyImplicitBlackoilEbos : private SerializableSim
|
||||
class SimulatorFullyImplicitBlackoil : private SerializableSim
|
||||
{
|
||||
public:
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
@ -198,7 +194,7 @@ public:
|
||||
/// \param[in] eclipse_state the object which represents an internalized ECL deck
|
||||
/// \param[in] output_writer
|
||||
/// \param[in] threshold_pressures_by_face if nonempty, threshold pressures that inhibit flow
|
||||
SimulatorFullyImplicitBlackoilEbos(Simulator& ebosSimulator)
|
||||
SimulatorFullyImplicitBlackoil(Simulator& ebosSimulator)
|
||||
: ebosSimulator_(ebosSimulator)
|
||||
, serializer_(*this,
|
||||
EclGenericVanguard::comm(),
|
||||
@ -221,7 +217,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
~SimulatorFullyImplicitBlackoilEbos()
|
||||
~SimulatorFullyImplicitBlackoil()
|
||||
{
|
||||
// Safe to call on all ranks, not just the I/O rank.
|
||||
this->endConvergenceOutputThread();
|
||||
@ -321,10 +317,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void updateTUNING(const Tuning& tuning) {
|
||||
void updateTUNING(const Tuning& tuning)
|
||||
{
|
||||
modelParam_.tolerance_mb_ = tuning.XXXMBE;
|
||||
if (terminalOutput_) {
|
||||
OpmLog::debug(fmt::format("Setting SimulatorFullyImplicitBlackoilEbos mass balance limit (XXXMBE) to {:.2e}", tuning.XXXMBE));
|
||||
OpmLog::debug(fmt::format("Setting SimulatorFullyImplicitBlackoil mass balance limit (XXXMBE) to {:.2e}", tuning.XXXMBE));
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,7 +347,7 @@ public:
|
||||
}
|
||||
|
||||
if (terminalOutput_) {
|
||||
outputReportStep(timer);
|
||||
details::outputReportStep(timer);
|
||||
}
|
||||
|
||||
// write the inital state at the report stage
|
||||
@ -670,4 +667,4 @@ protected:
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#endif // OPM_SIMULATOR_FULLY_IMPLICIT_BLACKOIL_EBOS_HPP
|
||||
#endif // OPM_SIMULATOR_FULLY_IMPLICIT_BLACKOIL_HEADER_INCLUDED
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
Copyright 2013, 2015, 2020 SINTEF Digital, Mathematics and Cybernetics.
|
||||
Copyright 2015 Andreas Lauser
|
||||
Copyright 2017 IRIS
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Units/Units.hpp>
|
||||
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
|
||||
|
||||
#include <boost/date_time.hpp>
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void outputReportStep(const SimulatorTimer& timer)
|
||||
{
|
||||
std::ostringstream stepMsg;
|
||||
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
||||
stepMsg.imbue(std::locale(std::locale::classic(), facet));
|
||||
stepMsg << "\nReport step " << std::setw(2) <<timer.currentStepNum()
|
||||
<< "/" << timer.numSteps()
|
||||
<< " at day " << (double)unit::convert::to(timer.simulationTimeElapsed(), unit::day)
|
||||
<< "/" << (double)unit::convert::to(timer.totalTime(), unit::day)
|
||||
<< ", date = " << timer.currentDateTime();
|
||||
OpmLog::info(stepMsg.str());
|
||||
}
|
||||
|
||||
void outputTimestampFIP(const SimulatorTimer& timer,
|
||||
const std::string& title,
|
||||
const std::string& version)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d %b %Y");
|
||||
ss.imbue(std::locale(std::locale::classic(), facet));
|
||||
ss << "\n **************************************************************************\n"
|
||||
<< " Balance at" << std::setw(10) << (double)unit::convert::to(timer.simulationTimeElapsed(), unit::day) << " Days"
|
||||
<< " *" << std::setw(30) << title << " *\n"
|
||||
<< " Report " << std::setw(4) << timer.reportStepNum() << " " << timer.currentDateTime()
|
||||
<< " * Flow version " << std::setw(11) << version << " *\n"
|
||||
<< " **************************************************************************\n";
|
||||
OpmLog::note(ss.str());
|
||||
}
|
||||
|
||||
} // namespace Opm
|
49
opm/simulators/flow/SimulatorReportBanners.cpp
Normal file
49
opm/simulators/flow/SimulatorReportBanners.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
Copyright 2013, 2015, 2020 SINTEF Digital, Mathematics and Cybernetics.
|
||||
Copyright 2015 Andreas Lauser
|
||||
Copyright 2017 IRIS
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <opm/simulators/flow/SimulatorReportBanners.hpp>
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Units/Units.hpp>
|
||||
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
|
||||
|
||||
#include <boost/date_time.hpp>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace Opm::details {
|
||||
|
||||
void outputReportStep(const SimulatorTimer& timer)
|
||||
{
|
||||
std::ostringstream stepMsg;
|
||||
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
||||
stepMsg.imbue(std::locale(std::locale::classic(), facet));
|
||||
stepMsg << "\nReport step " << std::setw(2) << timer.currentStepNum()
|
||||
<< "/" << timer.numSteps()
|
||||
<< " at day " << unit::convert::to(timer.simulationTimeElapsed(), unit::day)
|
||||
<< "/" << unit::convert::to(timer.totalTime(), unit::day)
|
||||
<< ", date = " << timer.currentDateTime();
|
||||
OpmLog::info(stepMsg.str());
|
||||
}
|
||||
|
||||
} // namespace Opm::details
|
33
opm/simulators/flow/SimulatorReportBanners.hpp
Normal file
33
opm/simulators/flow/SimulatorReportBanners.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
Copyright 2013, 2015, 2020 SINTEF Digital, Mathematics and Cybernetics.
|
||||
Copyright 2015 Andreas Lauser
|
||||
Copyright 2017 IRIS
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_SIMULATOR_REPORT_BANNERS_HEADER_INCLUDED
|
||||
#define OPM_SIMULATOR_REPORT_BANNERS_HEADER_INCLUDED
|
||||
|
||||
namespace Opm { class SimulatorTimer; }
|
||||
|
||||
namespace Opm::details {
|
||||
|
||||
void outputReportStep(const SimulatorTimer& timer);
|
||||
|
||||
} // namespace Opm::details
|
||||
|
||||
#endif // OPM_SIMULATOR_REPORT_BANNERS_HEADER_INCLUDED
|
Loading…
Reference in New Issue
Block a user