Template:CMI Example set grid values C: Difference between revisions
From CSDMS
Automated import of articles *** existing text overwritten *** |
Automated import of articles *** existing text overwritten *** |
||
Line 3: | Line 3: | ||
edu_csdms_models_Sedflux3D__get_data (self); | edu_csdms_models_Sedflux3D__get_data (self); | ||
edu_csdms_tools_Verbose_info (this->log, "Setting values.", _ex); | |||
", | |||
{ | { | ||
Line 13: | Line 11: | ||
double * vals_ptr = sidl_double__array_first (vals); | double * vals_ptr = sidl_double__array_first (vals); | ||
BMI_Set_double (this->state, long_var_name, vals_ptr, n_dim, shape); | BMI_Set_double (this->state, long_var_name, vals_ptr, n_dim, shape); | ||
g_free (shape); | g_free (shape); | ||
edu_csdms_tools_Verbose_info (this->log, "Set values.", _ex); | |||
} | } | ||
return; | return; | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 12:01, 6 February 2012
struct edu_csdms_models_Sedflux3D__data *this =
edu_csdms_models_Sedflux3D__get_data (self);
edu_csdms_tools_Verbose_info (this->log, "Setting values.", _ex);
{
int n_dim;
int * shape = BMI_Get_grid_shape (this->state, long_var_name,
&n_dim);
double * vals_ptr = sidl_double__array_first (vals);
BMI_Set_double (this->state, long_var_name, vals_ptr, n_dim, shape);
g_free (shape);
edu_csdms_tools_Verbose_info (this->log, "Set values.", _ex);
}
return;