mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
SimulatorReportSingle: pass argument as std::ostream
no reason for this to explicitly be an ostringstream
This commit is contained in:
@@ -17,15 +17,14 @@
|
|||||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include <config.h>
|
||||||
|
|
||||||
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
||||||
|
|
||||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||||
#include <opm/input/eclipse/Units/Units.hpp>
|
#include <opm/input/eclipse/Units/Units.hpp>
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <sstream>
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
@@ -59,7 +58,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SimulatorReportSingle::reportStep(std::ostringstream& ss) const
|
void SimulatorReportSingle::reportStep(std::ostream& ss) const
|
||||||
{
|
{
|
||||||
if (total_well_iterations != 0) {
|
if (total_well_iterations != 0) {
|
||||||
ss << fmt::format("Well its={:2}", total_well_iterations);
|
ss << fmt::format("Well its={:2}", total_well_iterations);
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace Opm
|
|||||||
/// Increment this report's times by those in sr.
|
/// Increment this report's times by those in sr.
|
||||||
void operator+=(const SimulatorReportSingle& sr);
|
void operator+=(const SimulatorReportSingle& sr);
|
||||||
/// Print a report suitable for a single simulation step.
|
/// Print a report suitable for a single simulation step.
|
||||||
void reportStep(std::ostringstream& os) const;
|
void reportStep(std::ostream& os) const;
|
||||||
/// Print a report suitable for the end of a fully implicit case, leaving out the pressure/transport time.
|
/// Print a report suitable for the end of a fully implicit case, leaving out the pressure/transport time.
|
||||||
void reportFullyImplicit(std::ostream& os, const SimulatorReportSingle* failedReport = nullptr) const;
|
void reportFullyImplicit(std::ostream& os, const SimulatorReportSingle* failedReport = nullptr) const;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user