void make_distribution_factors_on_ss2_field(void)
{
/* Made up distribution factors. */
float distfac_dof_tuple[] = {4., 3., 2., 1., 0.};
void *dofs = &distfac_dof_tuple[0];
/*
---------------------------------------------------------------------------
* DECLARE FIELD TEMPLATES
---------------------------------------------------------------------------
*/
saf_declare_field_tmpl(SAF_ALL, db,"distrib_factors_tmpl", SAF_ALGTYPE_SCALAR,
SAF_UNITY, SAF_NOT_APPLICABLE_QUANTITY, 1, NULL,
&distfac_ftmpl);
/*
---------------------------------------------------------------------------
* DECLARE AND WRITE FIELDS
* (dofs specified in write call)
---------------------------------------------------------------------------
*/
/* Declare the field. */
saf_declare_field(SAF_ALL, db, &distfac_ftmpl, "distribution factors",
&ss2, SAF_NOT_APPLICABLE_UNIT, SAF_SELF(db),
SAF_NODAL(&nodes, &edges), H5T_NATIVE_FLOAT, NULL,
SAF_INTERLEAVE_NONE, SAF_IDENTITY, NULL, &distfac);
/* Write the field. */
saf_write_field(SAF_ALL, &distfac, SAF_WHOLE_FIELD, 1,
H5I_INVALID_HID, &dofs, saf_file);
return;
}