示例#1
0
void well_state_add_wellhead( well_state_type * well_state , const ecl_rsthead_type * header , const ecl_kw_type * iwel_kw , int well_nr , const char * grid_name , int grid_nr) {
  well_conn_type * wellhead = well_conn_alloc_wellhead( iwel_kw , header , well_nr );

  if (wellhead != NULL) {
    vector_safe_iset_owned_ref( well_state->index_wellhead , grid_nr , wellhead , well_conn_free__ );
    hash_insert_ref( well_state->name_wellhead , grid_name , wellhead );
  }

}
示例#2
0
static void validate_set_indexed_selection_set(validate_type * validate , int index , int argc , const char ** argv) {

  if (validate->indexed_selection_set == NULL)
    util_abort("%s: must call xxx_set_argc_minmax() first - aborting \n",__func__);

  if (index >= validate->argc_min)
    util_abort("%s: When not not setting argc_max selection set can only be applied to indices up to argc_min\n",__func__);

  vector_safe_iset_owned_ref( validate->indexed_selection_set , index , set_alloc(argc,argv) , set_free__ );
}
示例#3
0
static void validate_add_indexed_alternative(validate_type * validate , int index , const char * value) {
  set_type * set = validate_iget_selection_set( validate , index );

  if (!set) {
    vector_safe_iset_owned_ref( validate->indexed_selection_set , index , set_alloc(0,NULL) , set_free__ );
    set = vector_safe_iget( validate->indexed_selection_set , index);
  }

  set_add_key( set , value );
}