mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-13 17:32:03 -05:00
Include <stdexcept> header to use std::logic_error()
And some minor stylistic changes.
This commit is contained in:
1 parent
16bbc338ab
commit
7a394df43f
2 files changed
+3
-2
No files matched your search
@@ -33,8 +33,8 @@
|
|||||||
namespace Opm::Pybind {
|
namespace Opm::Pybind {
|
||||||
class PyBlackOilSimulator
|
class PyBlackOilSimulator
|
||||||
{
|
{
|
||||||
using TypeTag = Opm::Properties::TTag::EclFlowProblem;
|
|
||||||
private:
|
private:
|
||||||
|
using TypeTag = Opm::Properties::TTag::EclFlowProblem;
|
||||||
using Simulator = Opm::GetPropType<TypeTag, Opm::Properties::Simulator>;
|
using Simulator = Opm::GetPropType<TypeTag, Opm::Properties::Simulator>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
// NOTE: EXIT_SUCCESS, EXIT_FAILURE is defined in cstdlib
|
// NOTE: EXIT_SUCCESS, EXIT_FAILURE is defined in cstdlib
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <opm/simulators/flow/python/PyBlackOilSimulator.hpp>
|
#include <opm/simulators/flow/python/PyBlackOilSimulator.hpp>
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ const Opm::FlowMainEbos<typename Opm::Pybind::PyBlackOilSimulator::TypeTag>&
|
|||||||
PyBlackOilSimulator::getFlowMainEbos() const
|
PyBlackOilSimulator::getFlowMainEbos() const
|
||||||
{
|
{
|
||||||
if (this->mainEbos_) {
|
if (this->mainEbos_) {
|
||||||
return *(this->mainEbos_.get());
|
return *this->mainEbos_;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw std::runtime_error("BlackOilSimulator not initialized: "
|
throw std::runtime_error("BlackOilSimulator not initialized: "
|
||||||
|
|||||||
Reference in new issue
Block a user