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

And some minor stylistic changes.
This commit is contained in:
Håkon Hægland 2021-09-23 11:54:00 +02:00
parent 16bbc338ab
commit 7a394df43f
2 changed files with 3 additions and 2 deletions

View File

@ -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:

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: "