/[escript]/branches/trilinos_from_5897/dudley/src/ElementFile_relableNodes.cpp
ViewVC logotype

Diff of /branches/trilinos_from_5897/dudley/src/ElementFile_relableNodes.cpp

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

revision 6008 by caltinay, Fri Feb 5 03:37:49 2016 UTC revision 6009 by caltinay, Wed Mar 2 04:13:26 2016 UTC
# Line 14  Line 14 
14  *  *
15  *****************************************************************************/  *****************************************************************************/
16    
17  /************************************************************************************/  /****************************************************************************/
18    
19  /*   Dudley: ElementFile */  /*   Dudley: ElementFile */
20    
# Line 22  Line 22 
22  /*   assigns new node reference numbers to elements in element file in. */  /*   assigns new node reference numbers to elements in element file in. */
23  /*   if k is the old node, the new node is newNode[k-offset].           */  /*   if k is the old node, the new node is newNode[k-offset].           */
24    
25  /************************************************************************************/  /****************************************************************************/
   
 #define ESNEEDPYTHON  
 #include "esysUtils/first.h"  
26    
27  #include "ElementFile.h"  #include "ElementFile.h"
28    
29  /************************************************************************************/  namespace dudley {
30    
31  void Dudley_ElementFile_relableNodes(index_t * newNode, index_t offset, Dudley_ElementFile * in)  void Dudley_ElementFile_relableNodes(index_t* newNode, index_t offset, Dudley_ElementFile* in)
32  {  {
33      dim_t i, j, NN;      dim_t i, j, NN;
34    
35      if (in != NULL)      if (in != NULL)
36      {      {
37      NN = in->numNodes;          NN = in->numNodes;
38  #pragma omp parallel for private(j,i) schedule(static)  #pragma omp parallel for private(j,i) schedule(static)
39      for (j = 0; j < in->numElements; j++)          for (j = 0; j < in->numElements; j++)
40      {          {
41          for (i = 0; i < NN; i++)              for (i = 0; i < NN; i++)
42          {              {
43          in->Nodes[INDEX2(i, j, NN)] = newNode[in->Nodes[INDEX2(i, j, NN)] - offset];                  in->Nodes[INDEX2(i, j, NN)] = newNode[in->Nodes[INDEX2(i, j, NN)] - offset];
44          }              }
45      }          }
46      }      }
47  }  }
48    
49    } // namespace dudley
50    

Legend:
Removed from v.6008  
changed lines
  Added in v.6009

  ViewVC Help
Powered by ViewVC 1.1.26