コード例 #1
0
ファイル: ert_run_context.c プロジェクト: chflo/ert
ert_run_context_type * ert_run_context_alloc_ENSEMBLE_EXPERIMENT(enkf_fs_type * fs , const bool_vector_type * iactive ,
                                                                 path_fmt_type * runpath_fmt ,
                                                                 subst_list_type * subst_list ,
                                                                 int iter) {

  ert_run_context_type * context = ert_run_context_alloc( iactive , ENSEMBLE_EXPERIMENT , fs , fs , NULL , iter);
  {
    stringlist_type * runpath_list = ert_run_context_alloc_runpath_list( iactive , runpath_fmt , subst_list , iter );
    for (int iens = 0; iens < bool_vector_size( iactive ); iens++) {
      if (bool_vector_iget( iactive , iens )) {
        run_arg_type * arg = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , iens , iter , stringlist_iget( runpath_list , iens));
        vector_append_owned_ref( context->run_args , arg , run_arg_free__);
      }
    }
    stringlist_free( runpath_list );
  }
  return context;
}
コード例 #2
0
ファイル: ert_run_context.c プロジェクト: chflo/ert
ert_run_context_type * ert_run_context_alloc_SMOOTHER_RUN(enkf_fs_type * simulate_fs , enkf_fs_type * target_update_fs ,
                                                          const bool_vector_type * iactive ,
                                                          path_fmt_type * runpath_fmt ,
                                                          subst_list_type * subst_list ,
                                                          int iter) {

  ert_run_context_type * context = ert_run_context_alloc( iactive , SMOOTHER_UPDATE , simulate_fs , simulate_fs , target_update_fs , iter);
  {
    stringlist_type * runpath_list = ert_run_context_alloc_runpath_list( iactive , runpath_fmt , subst_list , iter );
    for (int iens = 0; iens < bool_vector_size( iactive ); iens++) {
      if (bool_vector_iget( iactive , iens )) {
        run_arg_type * arg = run_arg_alloc_SMOOTHER_RUN( simulate_fs , target_update_fs , iens , iter , stringlist_iget( runpath_list , iens));
        vector_append_owned_ref( context->run_args , arg , run_arg_free__);
      }
    }
    stringlist_free( runpath_list );
  }
  return context;
}
コード例 #3
0
ファイル: ert_run_context.c プロジェクト: YingfangZhou/ert
ert_run_context_type * ert_run_context_alloc_ENKF_ASSIMILATION(enkf_fs_type * fs , 
                                                               const bool_vector_type * iactive , 
                                                               path_fmt_type * runpath_fmt , 
                                                               subst_list_type * subst_list ,
                                                               init_mode_type init_mode , 
                                                               state_enum init_state_parameter ,
                                                               state_enum init_state_dynamic   ,
                                                               int step1                       , 
                                                               int step2                       ,
                                                               int iter) {
  
  ert_run_context_type * context = ert_run_context_alloc( iactive , SMOOTHER_UPDATE , fs , fs , fs , init_mode , iter);
  {
    stringlist_type * runpath_list = ert_run_context_alloc_runpath_list( iactive , runpath_fmt , subst_list , iter );
    for (int iens = 0; iens < bool_vector_size( iactive ); iens++) {
      if (bool_vector_iget( iactive , iens )) {
        run_arg_type * arg = run_arg_alloc_ENKF_ASSIMILATION( fs , iens , init_state_parameter , init_state_dynamic , step1 , step2 , stringlist_iget( runpath_list , iens));
        vector_append_owned_ref( context->run_args , arg , run_arg_free__);
      }
    }
    stringlist_free( runpath_list );
  }
  return context;
}