/[escript]/trunk/finley/src/Mesh_glueFaces.cpp
ViewVC logotype

Diff of /trunk/finley/src/Mesh_glueFaces.cpp

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

revision 6619 by jfenwick, Tue Mar 7 06:50:34 2017 UTC revision 6620 by gross, Mon Aug 14 08:31:59 2017 UTC
# Line 94  void FinleyDomain::glueFaces(double safe Line 94  void FinleyDomain::glueFaces(double safe
94              newNumNodes++;              newNumNodes++;
95          }          }
96      }      }
97    
98      for (index_t n = 0; n < m_nodes->getNumNodes(); n++)      for (index_t n = 0; n < m_nodes->getNumNodes(); n++)
99          new_node_label[n] = new_node_mask[new_node_label[n]];          new_node_label[n] = new_node_mask[new_node_label[n]];
100    
101    
102      // allocate new node and element files      // allocate new node and element files
103      NodeFile* newNodeFile = new NodeFile(numDim, m_mpiInfo);      NodeFile* newNodeFile = new NodeFile(numDim, m_mpiInfo);
104      newNodeFile->allocTable(newNumNodes);      newNodeFile->allocTable(newNumNodes);
105        
106      ElementFile* newFaceElementsFile = new ElementFile(      ElementFile* newFaceElementsFile = new ElementFile(
107              m_faceElements->referenceElementSet, m_mpiInfo);              m_faceElements->referenceElementSet, m_mpiInfo);
108      newFaceElementsFile->allocTable(new_numFaceElements);      newFaceElementsFile->allocTable(new_numFaceElements);
109      // get the new nodes      // get the new nodes
110      newNodeFile->gather(&new_node_list[0], m_nodes);      newNodeFile->gather(&new_node_list[0], m_nodes);
111    
112      // they are the new nodes      // they are the new nodes
113      delete m_nodes;      delete m_nodes;
114      m_nodes = newNodeFile;      m_nodes = newNodeFile;
115      // get the face elements which are still in use      // get the face elements which are still in use
116      newFaceElementsFile->gather(&elem_mask[0], m_faceElements);      newFaceElementsFile->gather(&elem_mask[0], m_faceElements);
117        
118        
119      // they are the new face elements      // they are the new face elements
120      delete m_faceElements;      delete m_faceElements;
121      m_faceElements = newFaceElementsFile;      m_faceElements = newFaceElementsFile;
122    
123      // assign new node ids to elements      // assign new node ids to elements
124        
125    
126    
127      relabelElementNodes(new_node_label, 0);      relabelElementNodes(new_node_label, 0);
128      prepare(optimize);      prepare(optimize);
129      delete[] elem1;      delete[] elem1;

Legend:
Removed from v.6619  
changed lines
  Added in v.6620

  ViewVC Help
Powered by ViewVC 1.1.26