mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Implemented well_controls_add_new() with well_controls_iset_xxx() functions.
This commit is contained in:
parent
6098368d08
commit
2ee6331ac1
@ -209,14 +209,12 @@ well_controls_add_new(enum WellControlType type , double target , const double *
|
||||
return 0;
|
||||
}
|
||||
|
||||
ctrl->type [ctrl->num] = type ;
|
||||
ctrl->target[ctrl->num] = target;
|
||||
|
||||
if (distr != NULL) {
|
||||
int offset = ctrl->num * ctrl->number_of_phases;
|
||||
memcpy(&ctrl->distr[offset] , distr, ctrl->number_of_phases * sizeof * ctrl->distr);
|
||||
}
|
||||
well_controls_iset_type( ctrl , ctrl->num , type);
|
||||
well_controls_iset_target( ctrl , ctrl->num , target);
|
||||
|
||||
if (distr != NULL)
|
||||
well_controls_iset_distr( ctrl , ctrl->num , distr);
|
||||
|
||||
ctrl->num += 1;
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user