Merged from upstream/opm-parser-integrate
This commit is contained in:
commit
3c74e4bb9e
@ -165,9 +165,9 @@ list (APPEND TEST_SOURCE_FILES
|
||||
tests/test_param.cpp
|
||||
tests/test_blackoilfluid.cpp
|
||||
tests/test_shadow.cpp
|
||||
tests/test_units.cpp
|
||||
tests/test_blackoilstate.cpp
|
||||
tests/test_parser.cpp
|
||||
tests/test_units.cpp
|
||||
tests/test_blackoilstate.cpp
|
||||
tests/test_wellsmanager.cpp
|
||||
tests/test_wellcontrols.cpp
|
||||
)
|
||||
|
@ -4,4 +4,4 @@ Description: Open Porous Media Initiative Core Library
|
||||
Version: 1.1
|
||||
Label: 2013.10
|
||||
Maintainer: atgeirr@sintef.no
|
||||
Depends: dune-common (>= 2.2) dune-istl (>= 2.2)
|
||||
Depends: dune-common (>= 2.2) dune-istl (>= 2.2) opm-parser
|
||||
|
@ -39,9 +39,6 @@ struct WellControls;
|
||||
bool
|
||||
well_controls_equal(const struct WellControls *ctrls1, const struct WellControls *ctrls2);
|
||||
|
||||
//int
|
||||
//well_controls_reserve(int nctrl, int nphases, struct WellControls *ctrl);
|
||||
|
||||
struct WellControls *
|
||||
well_controls_create(void);
|
||||
|
||||
@ -52,9 +49,6 @@ well_controls_destroy(struct WellControls *ctrl);
|
||||
int
|
||||
well_controls_get_num(const struct WellControls *ctrl);
|
||||
|
||||
int
|
||||
well_controls_get_cpty(const struct WellControls *ctrl);
|
||||
|
||||
int
|
||||
well_controls_get_current( const struct WellControls * ctrl);
|
||||
|
||||
|
@ -183,11 +183,6 @@ int well_controls_get_num(const struct WellControls *ctrl) {
|
||||
}
|
||||
|
||||
|
||||
int well_controls_get_cpty(const struct WellControls *ctrl) {
|
||||
return ctrl->cpty;
|
||||
}
|
||||
|
||||
|
||||
int well_controls_get_current( const struct WellControls * ctrl) {
|
||||
return ctrl->current;
|
||||
}
|
||||
|
@ -552,7 +552,22 @@ wells_equal(const struct Wells *W1, const struct Wells *W2)
|
||||
}
|
||||
|
||||
for (int i=0; i<W1->number_of_wells; i++) {
|
||||
are_equal = are_equal && (strcmp(W1->name[i], W2->name[i]) == 0);
|
||||
if (are_equal) {
|
||||
/*
|
||||
The name attribute can be NULL. The comparison is as
|
||||
follows:
|
||||
|
||||
1. If both names are different from NULL a normal
|
||||
strcmp() is performed.
|
||||
2. If both names are NULL they compare as equal.
|
||||
3. If one name is NULL and the other is not NULL
|
||||
they are regarded as different.
|
||||
*/
|
||||
if (W1->name[i] && W2->name[i])
|
||||
are_equal = are_equal && (strcmp(W1->name[i], W2->name[i]) == 0);
|
||||
else
|
||||
are_equal = are_equal && (W1->name[i] == W2->name[i]);
|
||||
}
|
||||
are_equal = are_equal && (W1->type[i] == W2->type[i]);
|
||||
are_equal = are_equal && (W1->depth_ref[i] == W2->depth_ref[i]);
|
||||
are_equal = are_equal && (well_controls_equal(W1->ctrls[i], W2->ctrls[i]));
|
||||
|
@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(CreateParser)
|
||||
{
|
||||
const std::string filename1 = "testBlackoilState1.DATA";
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::DeckConstPtr deck = parser->parse( filename1 );
|
||||
Opm::DeckConstPtr deck = parser->parseFile( filename1 );
|
||||
|
||||
BOOST_CHECK_EQUAL( 5U , deck->size() );
|
||||
Opm::DeckItemConstPtr actnum = deck->getKeyword("ACTNUM")->getRecord(0)->getItem(0);
|
||||
|
Loading…
Reference in New Issue
Block a user