Skip to content

Commit

Permalink
Fix rebasing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hakonhagland committed Oct 3, 2024
1 parent a33d25a commit 00a818a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 115 deletions.
109 changes: 0 additions & 109 deletions opm/input/eclipse/Schedule/ResCoup/ReservoirCouplingInfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,115 +30,6 @@

namespace Opm::ReservoirCoupling {

class MasterGroup
{
public:
MasterGroup() = default;

explicit MasterGroup(const std::string& name, const std::string& slave_name, const std::string& slave_group_name, double flow_limit_fraction) :
m_name{name},
m_slave_name{slave_name},
m_slave_group_name{slave_group_name},
m_flow_limit_fraction{flow_limit_fraction}
{}
static MasterGroup serializationTestObject();

const std::string name() const {
return this->m_name;
}
const std::string slaveName() const {
return this->m_slave_name;
}
const std::string slaveGroupName() const {
return this->m_slave_group_name;
}
double flowLimitFraction() const {
return this->m_flow_limit_fraction;
}
void name(const std::string& value) {
this->m_name = value;
}
void slaveName(const std::string& value) {
this->m_slave_name = value;
}
void slaveGroupName(const std::string& value) {
this->m_slave_group_name = value;
}
void flowLimitFraction(double value) {
this->m_flow_limit_fraction = value;
}
bool operator==(const MasterGroup& other) const;

template<class Serializer>
void serializeOp(Serializer& serializer)
{
serializer(m_name);
serializer(m_slave_name);
serializer(m_slave_group_name);
serializer(m_flow_limit_fraction);
}

private:
std::string m_name{};
std::string m_slave_name{};
std::string m_slave_group_name{};
double m_flow_limit_fraction{};
};

class Slave {
public:
Slave() = default;

explicit Slave(const std::string& name, const std::string& data_filename, const std::string& directory_path, unsigned int numprocs) :
m_name{name},
m_data_filename{data_filename},
m_directory_path{directory_path},
m_numprocs{numprocs}
{}
static Slave serializationTestObject();

const std::string& name() const {
return this->m_name;
}
const std::string& dataFilename() const {
return this->m_data_filename;
}
const std::string& directoryPath() const {
return this->m_directory_path;
}
unsigned int numprocs() const {
return this->m_numprocs;
}

void name(const std::string& value) {
this->m_name = value;
}
void dataFilename(const std::string& value) {
this->m_data_filename = value;
}
void directoryPath(const std::string& value) {
this->m_directory_path = value;
}
void numprocs(unsigned int value) {
this->m_numprocs = value;
}
bool operator==(const Slave& other) const;

template<class Serializer>
void serializeOp(Serializer& serializer)
{
serializer(m_name);
serializer(m_data_filename);
serializer(m_directory_path);
serializer(m_numprocs);
}
private:
std::string m_name{};
std::string m_data_filename{};
std::string m_directory_path{};
unsigned int m_numprocs{};
};

class CouplingInfo {
public:
CouplingInfo() = default;
Expand Down
8 changes: 2 additions & 6 deletions tests/parser/ReservoirCouplingTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ GRUPMAST
}

BOOST_AUTO_TEST_CASE(GRUPMAST_FAIL_MISSING_MASTER_GROUP) {
try {
std::string deck_string = R"(
SCHEDULE
Expand All @@ -221,11 +220,10 @@ GRUPMAST
/
)";

assertRaisesInputErrorException(deck_string, /*slave_mode=*/false, /*exception_string=*/"Problem with keyword GRUPMAST\nIn <memory string> line 10\nGroup 'D1_M': Not defined. Master groups should be defined in advance by using GRUPTREE before referenced in GRUPMAST.");
assertRaisesInputErrorException(deck_string, /*slave_mode=*/false, /*exception_string=*/"Problem with keyword GRUPMAST\nIn <memory string> line 9\nGroup 'D1_M': Not defined. Master groups should be defined in advance by using GRUPTREE before referenced in GRUPMAST.");
}

BOOST_AUTO_TEST_CASE(GRUPMAST_FAIL_SUBORDINATE_GROUPS) {
try {
std::string deck_string = R"(
SCHEDULE
Expand Down Expand Up @@ -254,11 +252,10 @@ GRUPMAST
/
)";

assertRaisesInputErrorException(deck_string, /*slave_mode=*/false, /*exception_string=*/"Problem with keyword GRUPMAST\nIn <memory string> line 22\nGroup 'FIELD' has subgroups: A master group cannot contain any wells or subordinate groups.");
assertRaisesInputErrorException(deck_string, /*slave_mode=*/false, /*exception_string=*/"Problem with keyword GRUPMAST\nIn <memory string> line 21\nGroup 'FIELD' has subgroups: A master group cannot contain any wells or subordinate groups.");
}

BOOST_AUTO_TEST_CASE(GRUPMAST_FAIL_SUBORDINATE_WELLS) {
try {
std::string deck_string = R"(
SCHEDULE
Expand Down Expand Up @@ -296,7 +293,6 @@ GRUPMAST
}

BOOST_AUTO_TEST_CASE(GRUPMAST_FAIL_MISSING_SLAVE) {
try {
std::string deck_string = R"(
SCHEDULE
Expand Down

0 comments on commit 00a818a

Please sign in to comment.