Ejemplo n.º 1
0
int ne_test_gecm(int fileid)
{
  int i, j, iproc, error;
  int elem_ids[ECNTCM], elem_map_cnts[NECMAP], proc_ids[ECNTCM];
  int side_ids[ECNTCM], elem_map_ids[NECMAP];

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

  for(iproc=0; iproc < NPROCF; iproc++) {

    error = ex_get_cmap_params(fileid, NULL, NULL,
                               elem_map_ids, elem_map_cnts, iproc);

    if (error < 0) return error;

    for(i=0; i < NECMAP; i++) {
      error = ex_get_elem_cmap(fileid, elem_map_ids[i], elem_ids,
                               side_ids, proc_ids, iproc);

      if (error < 0) return error;

      for(j=0; j < ECNTCM; j++) {
        if (elem_ids[j] != 2*(j+1)) return -1;
        if (side_ids[j] != 3*(j+1)) return -1;
        if (proc_ids[j] != 4*(j+1)) return -1;
      }
    }
  }

  return 0;
}
Ejemplo n.º 2
0
int ne_test_gncm(int fileid)
{
  int i, j, iproc, error;
  int node_map_ids[NNCMAP], node_map_cnts[NNCMAP];
  int node_ids[NCNTCM], proc_ids[NCNTCM];

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

  for(iproc=0; iproc < NPROCF; iproc++) {

    error = ex_get_cmap_params(fileid, node_map_ids, node_map_cnts,
                               NULL, NULL, iproc);

    if (error < 0) return error;

    for(i=0; i < NNCMAP; i++) {
      error = ex_get_node_cmap(fileid, node_map_ids[i], node_ids,
                               proc_ids, iproc);

      if (error < 0) return error;

      for(j=0; j < NCNTCM; j++) {
        if (node_ids[j] != 2*(j+1)) return -1;
        if (proc_ids[j] != 3*(j+1)) return -1;
      }
    }
  }

  return 0;
}
Ejemplo n.º 3
0
int ne_get_cmap_params(int       neid,                /* NetCDF/Exodus file ID */
                       void_int *node_cmap_ids,       /* Nodal comm. map IDs */
                       void_int *node_cmap_node_cnts, /* Number of nodes in each map */
                       void_int *elem_cmap_ids,       /* Elemental comm. map IDs */
                       void_int *elem_cmap_elem_cnts, /* Number of elems in each map */
                       int       processor            /* This processor ID */
                       )
{
  return ex_get_cmap_params(neid, node_cmap_ids, node_cmap_node_cnts, elem_cmap_ids,
                            elem_cmap_elem_cnts, processor);
}