Ejemplo n.º 1
0
void enkf_main_init_case_from_existing(const enkf_main_type * enkf_main,
                                       enkf_fs_type * source_case_fs,
                                       int source_report_step,
                                       state_enum source_state,
                                       enkf_fs_type * target_case_fs ) {

    stringlist_type * param_list = ensemble_config_alloc_keylist_from_var_type( enkf_main_get_ensemble_config(enkf_main) , PARAMETER ); /* Select only paramters - will fail for GEN_DATA of type DYNAMIC_STATE. */
    int target_report_step  = 0;
    state_enum target_state = ANALYZED;
    bool_vector_type * iactive = bool_vector_alloc( 0 , true );

    enkf_main_copy_ensemble(enkf_main,
                            source_case_fs,
                            source_report_step,
                            source_state,
                            target_case_fs,
                            target_report_step,
                            target_state ,
                            iactive,
                            NULL,
                            param_list);


    enkf_fs_fsync(target_case_fs);

    bool_vector_free(iactive);
    stringlist_free(param_list);
}
Ejemplo n.º 2
0
void enkf_main_init_case_from_existing_custom(const enkf_main_type * enkf_main,
                                              enkf_fs_type * source_case_fs,
                                              int source_report_step,
                                              enkf_fs_type * target_case_fs,
                                              stringlist_type * node_list,
                                              bool_vector_type * iactive) {

  int target_report_step  = 0;

  enkf_main_copy_ensemble(enkf_main,
                          source_case_fs,
                          source_report_step,
                          target_case_fs,
                          target_report_step,
                          iactive,
                          NULL,
                          node_list);

  enkf_fs_fsync(target_case_fs);
}