コード例 #1
0
ファイル: ecl_sum_tstep.c プロジェクト: JacobStoren/ert
ecl_sum_tstep_type * ecl_sum_tstep_alloc_new( int report_step , int ministep , float sim_days , const ecl_smspec_type * smspec ) {
  ecl_sum_tstep_type * tstep = ecl_sum_tstep_alloc( report_step , ministep , smspec );
  const float_vector_type * default_data = ecl_smspec_get_params_default( smspec );
  float_vector_memcpy_data( tstep->data , default_data );

  ecl_sum_tstep_set_time_info_from_days( tstep , ecl_smspec_get_start_time( smspec ) , sim_days );
  ecl_sum_tstep_iset( tstep , ecl_smspec_get_time_index( smspec ) , sim_days );
  return tstep;
}
コード例 #2
0
ファイル: ecl_sum_tstep.c プロジェクト: JacobStoren/ert
void ecl_sum_tstep_set_from_node( ecl_sum_tstep_type * tstep , const smspec_node_type * smspec_node , float value) {
  int data_index = smspec_node_get_params_index( smspec_node );
  ecl_sum_tstep_iset( tstep , data_index , value);
}
コード例 #3
0
ファイル: ecl_sum_tstep.c プロジェクト: flikka/ert
void ecl_sum_tstep_ishift(ecl_sum_tstep_type * tstep, int index, float addend) {
  ecl_sum_tstep_iset(tstep, index, ecl_sum_tstep_iget(tstep, index) + addend);
}
コード例 #4
0
ファイル: ecl_sum_tstep.c プロジェクト: flikka/ert
void ecl_sum_tstep_iscale(ecl_sum_tstep_type * tstep, int index, float scalar) {
  ecl_sum_tstep_iset(tstep, index, ecl_sum_tstep_iget(tstep, index) * scalar);
}