/[escript]/branches/domexper/dudley/src/Mesh_resolveNodeIds.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/Mesh_resolveNodeIds.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC revision 1739 by gross, Fri Aug 29 06:19:53 2008 UTC
# Line 68  void  Finley_Mesh_resolveNodeIds(Finley_ Line 68  void  Finley_Mesh_resolveNodeIds(Finley_
68    #ifdef Finley_TRACE    #ifdef Finley_TRACE
69    printf("Node id range used by elements is %d:%d\n",global_min_id,global_max_id);    printf("Node id range used by elements is %d:%d\n",global_min_id,global_max_id);
70    #endif    #endif
71      if (min_id>max_id) {
72         max_id=-1;
73         min_id=0;
74      }
75        
76    /* allocate mappings for new local node labeling to global node labeling (newLocalToGlobalNodeLabels)    /* allocate mappings for new local node labeling to global node labeling (newLocalToGlobalNodeLabels)
77       and global node labeling to the new local node labeling (globalToNewLocalNodeLabels[i-min_id] is the       and global node labeling to the new local node labeling (globalToNewLocalNodeLabels[i-min_id] is the
# Line 98  void  Finley_Mesh_resolveNodeIds(Finley_ Line 100  void  Finley_Mesh_resolveNodeIds(Finley_
100         /* invert the new labeling and shift the index newLocalToGlobalNodeLabels to global node ids */         /* invert the new labeling and shift the index newLocalToGlobalNodeLabels to global node ids */
101         #pragma omp parallel for private(n) schedule(static)         #pragma omp parallel for private(n) schedule(static)
102         for (n=0;n<newNumNodes;n++) {         for (n=0;n<newNumNodes;n++) {
103    #ifdef BOUNDS_CHECK
104           if (n >= len || n < 0) { printf("BOUNDS_CHECK %s %d n=%d\n", __FILE__, __LINE__, n); exit(1); }
105           if (newLocalToGlobalNodeLabels[n] >= len || newLocalToGlobalNodeLabels[n] < 0) { printf("BOUNDS_CHECK %s %d n=%d\n", __FILE__, __LINE__, n); exit(1); }
106    #endif
107                globalToNewLocalNodeLabels[newLocalToGlobalNodeLabels[n]]=n;                globalToNewLocalNodeLabels[newLocalToGlobalNodeLabels[n]]=n;
108                newLocalToGlobalNodeLabels[n]+=min_id;                newLocalToGlobalNodeLabels[n]+=min_id;
109          }          }

Legend:
Removed from v.1312  
changed lines
  Added in v.1739

  ViewVC Help
Powered by ViewVC 1.1.26