Include <stdexcept> header to use std::logic_error()

And some minor stylistic changes.
This commit is contained in:
Håkon Hægland committed 2021-09-23 13:13:23 +02:00
1 parent 16bbc338ab
commit 7a394df43f
2 files changed
+3 -2

No files matched your search

@@ -33,8 +33,8 @@
namespace Opm::Pybind {
class PyBlackOilSimulator
{
using TypeTag = Opm::Properties::TTag::EclFlowProblem;
private:
using TypeTag = Opm::Properties::TTag::EclFlowProblem;
using Simulator = Opm::GetPropType<TypeTag, Opm::Properties::Simulator>;
public:
+2 -1
View File
@@ -28,6 +28,7 @@
// NOTE: EXIT_SUCCESS, EXIT_FAILURE is defined in cstdlib
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <string>
#include <opm/simulators/flow/python/PyBlackOilSimulator.hpp>
@@ -56,7 +57,7 @@ const Opm::FlowMainEbos<typename Opm::Pybind::PyBlackOilSimulator::TypeTag>&
PyBlackOilSimulator::getFlowMainEbos() const
{
if (this->mainEbos_) {
return *(this->mainEbos_.get());
return *this->mainEbos_;
}
else {
throw std::runtime_error("BlackOilSimulator not initialized: "