Add support for storing well names in "Wells" structure.

The well name must be passed as a parameter to add_well(), so update
callers accordingly.
This commit is contained in:
Bård Skaflestad 2012-06-18 10:15:53 +02:00
parent dec0e60bd4
commit 6fbf50827f
2 changed files with 3 additions and 1 deletions

View File

@ -100,6 +100,7 @@ struct Wells
double *WI; /** Well productivity index, same size and structure as well_cells. */
struct WellControls **ctrls; /** Well controls, one set of controls for each well. */
char **name; /** Well names. One string for each well. */
void *data; /** Internal management structure. */
};
@ -180,6 +181,7 @@ add_well(enum WellType type ,
const double *comp_frac,
const int *cells ,
const double *WI ,
const char *name ,
struct Wells *W );

View File

@ -425,7 +425,7 @@ namespace Opm
// We initialize all wells with a null component fraction,
// and must (for injection wells) overwrite it later.
int ok = add_well(well_data[w].type, well_data[w].reference_bhp_depth, w_num_perf,
comp_frac, &perf_cells[0], &perf_prodind[0], w_);
comp_frac, &perf_cells[0], &perf_prodind[0], well_names[w].c_str(), w_);
if (!ok) {
THROW("Failed adding well " << well_names[w] << " to Wells data structure.");
}