mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merged from upstream/opm-parser-integrate
This commit is contained in:
commit
691148122c
@ -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]));
|
||||
|
Loading…
Reference in New Issue
Block a user