/[escript]/trunk/finley/src/Mesh_resolveNodeIds.c
ViewVC logotype

Diff of /trunk/finley/src/Mesh_resolveNodeIds.c

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

revision 730 by bcumming, Mon May 15 04:03:49 2006 UTC revision 782 by bcumming, Tue Jul 18 00:47:47 2006 UTC
# Line 35  void  Finley_Mesh_resolveNodeIds(Finley_ Line 35  void  Finley_Mesh_resolveNodeIds(Finley_
35    dim_t k,len,numDim,newNumNodes,n;    dim_t k,len,numDim,newNumNodes,n;
36    index_t min_id,max_id,min_id2,max_id2,*maskNodes=NULL,*maskElements=NULL,*index=NULL;    index_t min_id,max_id,min_id2,max_id2,*maskNodes=NULL,*maskElements=NULL,*index=NULL;
37    Finley_NodeFile *newNodeFile=NULL;    Finley_NodeFile *newNodeFile=NULL;
38    
39    Finley_resetError();    Finley_resetError();
40    numDim=Finley_Mesh_getDim(in);    numDim=Finley_Mesh_getDim(in);
41      
42    /*   find the minimum and maximum id used: */    /*   find the minimum and maximum id used: */
     
43    min_id=INDEX_T_MAX;    min_id=INDEX_T_MAX;
44    max_id=-INDEX_T_MAX;    max_id=-INDEX_T_MAX;
45    Finley_NodeFile_setIdRange(&min_id2,&max_id2,in->Nodes);    Finley_NodeFile_setIdRange(&min_id2,&max_id2,in->Nodes);
# Line 48  void  Finley_Mesh_resolveNodeIds(Finley_ Line 48  void  Finley_Mesh_resolveNodeIds(Finley_
48      goto clean;      goto clean;
49    }    }
50    
51    
52    max_id=MAX(max_id,max_id2);    max_id=MAX(max_id,max_id2);
53    min_id=MIN(min_id,min_id2);    min_id=MIN(min_id,min_id2);
54    Finley_ElementFile_setNodeRange(&min_id2,&max_id2,in->Elements);    Finley_ElementFile_setNodeRange(&min_id2,&max_id2,in->Elements);
# Line 67  void  Finley_Mesh_resolveNodeIds(Finley_ Line 68  void  Finley_Mesh_resolveNodeIds(Finley_
68    #endif    #endif
69        
70    /*  allocate a new node file used to gather existing node file: */    /*  allocate a new node file used to gather existing node file: */
71      
72    len=max_id-min_id+1;    len=max_id-min_id+1;
73  #ifndef PASO_MPI  #ifndef PASO_MPI
74    newNodeFile=Finley_NodeFile_alloc(numDim);    newNodeFile=Finley_NodeFile_alloc(numDim);
# Line 117  void  Finley_Mesh_resolveNodeIds(Finley_ Line 118  void  Finley_Mesh_resolveNodeIds(Finley_
118    if (! Finley_noError() ) goto clean;    if (! Finley_noError() ) goto clean;
119    
120    if (Finley_noError()) {    if (Finley_noError()) {
     
121        /*  scatter the nodefile in->nodes into newNodeFile using index; */        /*  scatter the nodefile in->nodes into newNodeFile using index; */
122        #pragma omp parallel for private(k) schedule(static)        #pragma omp parallel for private(k) schedule(static)
123        for (k=0;k<in->Nodes->numNodes;k++)        for (k=0;k<in->Nodes->numNodes;k++)
# Line 141  void  Finley_Mesh_resolveNodeIds(Finley_ Line 141  void  Finley_Mesh_resolveNodeIds(Finley_
141    
142        /*  relable nodes of the elements: */        /*  relable nodes of the elements: */
143        Finley_Mesh_relableElementNodes(maskElements,min_id,in);        Finley_Mesh_relableElementNodes(maskElements,min_id,in);
   
144    }    }
145    
146    /*  clean-up: */    /*  clean-up: */

Legend:
Removed from v.730  
changed lines
  Added in v.782

  ViewVC Help
Powered by ViewVC 1.1.26