Beispiel #1
0
/*=============================================================================
 *     NS, SS & EB Global Parameter Routines
 *===========================================================================*/
int ne_get_ns_param_global(int       neid,          /* NetCDF/Exodus file ID */
                           void_int *ns_ids_glob,   /* Global IDs of node sets */
                           void_int *ns_n_cnt_glob, /* Count of nodes in node sets */
                           void_int *ns_df_cnt_glob /* Count of dist. factors in ns */
                           )
{
  return ex_get_ns_param_global(neid, ns_ids_glob, ns_n_cnt_glob, ns_df_cnt_glob);
}
int ne_test_gnsp(int fileid)
{

  int i, error;
  int global_ids[NNSG], global_n_cnts[NNSG], global_df_cnts[NNSG];

/*-----------------------------Execution Begins-----------------------------*/

  error = ex_get_ns_param_global(fileid, global_ids, global_n_cnts,
                                 global_df_cnts);

  if (error < 0) return error;

  for(i=0; i < NNSG; i++) {
    if (global_ids[i]     != 2*(i+1)) return -1;
    if (global_n_cnts[i]  != 3*(i+1)) return -1;
    if (global_df_cnts[i] != 1      ) return -1;
  }

  return 0;
}