mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
rename SimulatorFullyImplicitBlackoilEbos.cpp to SimulatorReportBanners
and add a header
This commit is contained in:
parent
2d70acb8eb
commit
cb14fff22a
@ -51,7 +51,7 @@ list (APPEND MAIN_SOURCE_FILES
|
|||||||
opm/simulators/flow/Main.cpp
|
opm/simulators/flow/Main.cpp
|
||||||
opm/simulators/flow/NonlinearSolver.cpp
|
opm/simulators/flow/NonlinearSolver.cpp
|
||||||
opm/simulators/flow/RSTConv.cpp
|
opm/simulators/flow/RSTConv.cpp
|
||||||
opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.cpp
|
opm/simulators/flow/SimulatorReportBanners.cpp
|
||||||
opm/simulators/flow/SimulatorSerializer.cpp
|
opm/simulators/flow/SimulatorSerializer.cpp
|
||||||
opm/simulators/flow/ValidationFunctions.cpp
|
opm/simulators/flow/ValidationFunctions.cpp
|
||||||
opm/simulators/flow/partitionCells.cpp
|
opm/simulators/flow/partitionCells.cpp
|
||||||
@ -454,6 +454,7 @@ list (APPEND PUBLIC_HEADER_FILES
|
|||||||
opm/simulators/flow/NonlinearSolver.hpp
|
opm/simulators/flow/NonlinearSolver.hpp
|
||||||
opm/simulators/flow/RSTConv.hpp
|
opm/simulators/flow/RSTConv.hpp
|
||||||
opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp
|
opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp
|
||||||
|
opm/simulators/flow/SimulatorReportBanners.hpp
|
||||||
opm/simulators/flow/SimulatorSerializer.hpp
|
opm/simulators/flow/SimulatorSerializer.hpp
|
||||||
opm/simulators/flow/KeywordValidation.hpp
|
opm/simulators/flow/KeywordValidation.hpp
|
||||||
opm/simulators/flow/LogOutputHelper.hpp
|
opm/simulators/flow/LogOutputHelper.hpp
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <opm/simulators/flow/ConvergenceOutputConfiguration.hpp>
|
#include <opm/simulators/flow/ConvergenceOutputConfiguration.hpp>
|
||||||
#include <opm/simulators/flow/ExtraConvergenceOutputThread.hpp>
|
#include <opm/simulators/flow/ExtraConvergenceOutputThread.hpp>
|
||||||
#include <opm/simulators/flow/NonlinearSolver.hpp>
|
#include <opm/simulators/flow/NonlinearSolver.hpp>
|
||||||
|
#include <opm/simulators/flow/SimulatorReportBanners.hpp>
|
||||||
#include <opm/simulators/flow/SimulatorSerializer.hpp>
|
#include <opm/simulators/flow/SimulatorSerializer.hpp>
|
||||||
#include <opm/simulators/timestepping/AdaptiveTimeStepping.hpp>
|
#include <opm/simulators/timestepping/AdaptiveTimeStepping.hpp>
|
||||||
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
||||||
@ -145,8 +146,6 @@ struct LoadStep<TypeTag, TTag::EclFlowProblem>
|
|||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
void outputReportStep(const SimulatorTimer& timer);
|
|
||||||
|
|
||||||
/// a simulator for the blackoil model
|
/// a simulator for the blackoil model
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
class SimulatorFullyImplicitBlackoilEbos : private SerializableSim
|
class SimulatorFullyImplicitBlackoilEbos : private SerializableSim
|
||||||
@ -347,7 +346,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (terminalOutput_) {
|
if (terminalOutput_) {
|
||||||
outputReportStep(timer);
|
details::outputReportStep(timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// write the inital state at the report stage
|
// write the inital state at the report stage
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include <opm/simulators/flow/SimulatorReportBanners.hpp>
|
||||||
|
|
||||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||||
|
|
||||||
@ -30,19 +31,19 @@
|
|||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm::details {
|
||||||
|
|
||||||
void outputReportStep(const SimulatorTimer& timer)
|
void outputReportStep(const SimulatorTimer& timer)
|
||||||
{
|
{
|
||||||
std::ostringstream stepMsg;
|
std::ostringstream stepMsg;
|
||||||
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
||||||
stepMsg.imbue(std::locale(std::locale::classic(), facet));
|
stepMsg.imbue(std::locale(std::locale::classic(), facet));
|
||||||
stepMsg << "\nReport step " << std::setw(2) <<timer.currentStepNum()
|
stepMsg << "\nReport step " << std::setw(2) << timer.currentStepNum()
|
||||||
<< "/" << timer.numSteps()
|
<< "/" << timer.numSteps()
|
||||||
<< " at day " << (double)unit::convert::to(timer.simulationTimeElapsed(), unit::day)
|
<< " at day " << unit::convert::to(timer.simulationTimeElapsed(), unit::day)
|
||||||
<< "/" << (double)unit::convert::to(timer.totalTime(), unit::day)
|
<< "/" << unit::convert::to(timer.totalTime(), unit::day)
|
||||||
<< ", date = " << timer.currentDateTime();
|
<< ", date = " << timer.currentDateTime();
|
||||||
OpmLog::info(stepMsg.str());
|
OpmLog::info(stepMsg.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // 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