static void * enkf_main_smoother_JOB__( void * self , int iter , const stringlist_type * args ) { enkf_main_type * enkf_main = enkf_main_safe_cast( self ); int ens_size = enkf_main_get_ensemble_size( enkf_main ); bool_vector_type * iactive = bool_vector_alloc( ens_size , true ); bool valid = true; const char * target_case; enkf_fs_type * target_fs = enkf_main_get_fs( enkf_main ); // Argument 0: Which case to write to. Default current case. if (stringlist_get_size(args)) { target_case = stringlist_iget( args , 0 ); if (strcmp( target_case , CURRENT_CASE_STRING) == 0) target_case = enkf_fs_get_case_name(target_fs); } else target_case = enkf_fs_get_case_name(target_fs); //Argument 1: Rerun. Default false. bool rerun = (stringlist_get_size(args) >= 2) ? stringlist_iget_as_bool(args, 1, &valid) : false; if (!valid) { fprintf(stderr, "** Warning: Function %s : Second argument must be a bool value. Exiting job\n", __func__); return NULL; } enkf_main_run_smoother( enkf_main , target_case , iactive , iter , rerun); bool_vector_free( iactive ); return NULL; }
void enkf_tui_run_smoother(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); int ens_size = enkf_main_get_ensemble_size( enkf_main ); bool_vector_type * iactive = bool_vector_alloc( ens_size , true ); enkf_main_run_smoother(enkf_main , "AUTO-SMOOTHER" , iactive , 0 , true ); bool_vector_free( iactive ); }
void * enkf_main_smoother_JOB( void * self , const stringlist_type * args ) { enkf_main_type * enkf_main = enkf_main_safe_cast( self ); int ens_size = enkf_main_get_ensemble_size( enkf_main ); bool_vector_type * iactive = bool_vector_alloc( 0 , true ); bool rerun = true; const char * target_case = stringlist_iget( args , 0 ); bool_vector_iset( iactive , ens_size - 1 , true ); enkf_main_run_smoother( enkf_main , target_case , rerun); return NULL; }
static void * enkf_main_smoother_JOB__( void * self , int iter , const stringlist_type * args ) { enkf_main_type * enkf_main = enkf_main_safe_cast( self ); int ens_size = enkf_main_get_ensemble_size( enkf_main ); bool_vector_type * iactive = bool_vector_alloc( ens_size , true ); bool valid = true; const char * target_case = stringlist_iget( args , 0 ); enkf_fs_type * source_fs = enkf_main_job_get_fs( enkf_main ); //Argument 2: Rerun. Default false. bool rerun = (stringlist_get_size(args) >= 2) ? stringlist_iget_as_bool(args, 1, &valid) : false; if (!valid) { fprintf(stderr, "** Warning: Function %s : Second argument must be a bool value. Exiting job\n", __func__); return NULL; } enkf_main_run_smoother( enkf_main , source_fs , target_case , iactive , iter , rerun); bool_vector_free( iactive ); return NULL; }
void enkf_tui_run_smoother(void * arg) { enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); enkf_main_run_smoother(enkf_main , "AUTO-SMOOTHER" , true ); }