/[escript]/branches/doubleplusgood/dudley/src/Mesh_distributeByRankOfDOF.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/dudley/src/Mesh_distributeByRankOfDOF.cpp

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

revision 4331 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4332 by jfenwick, Thu Mar 21 04:21:14 2013 UTC
# Line 34  void Dudley_Mesh_distributeByRankOfDOF(D Line 34  void Dudley_Mesh_distributeByRankOfDOF(D
34    
35      if (self == NULL)      if (self == NULL)
36      return;      return;
37      mpiRankOfDOF = TMPMEMALLOC(self->Nodes->numNodes, Esys_MPI_rank);      mpiRankOfDOF = new  Esys_MPI_rank[self->Nodes->numNodes];
38      if (!Dudley_checkPtr(mpiRankOfDOF))      if (!Dudley_checkPtr(mpiRankOfDOF))
39      {      {
40    
# Line 57  void Dudley_Mesh_distributeByRankOfDOF(D Line 57  void Dudley_Mesh_distributeByRankOfDOF(D
57      /* create a local labeling of the DOFs */      /* create a local labeling of the DOFs */
58      Dudley_NodeFile_setDOFRange(&min_dof_id, &max_dof_id, self->Nodes);      Dudley_NodeFile_setDOFRange(&min_dof_id, &max_dof_id, self->Nodes);
59      len = max_dof_id - min_dof_id + 1;      len = max_dof_id - min_dof_id + 1;
60      tmp_node_localDOF_mask = TMPMEMALLOC(len, index_t); /* local mask for used nodes */      tmp_node_localDOF_mask = new  index_t[len]; /* local mask for used nodes */
61      tmp_node_localDOF_map = TMPMEMALLOC(self->Nodes->numNodes, index_t);      tmp_node_localDOF_map = new  index_t[self->Nodes->numNodes];
62      if (!((Dudley_checkPtr(tmp_node_localDOF_mask) && Dudley_checkPtr(tmp_node_localDOF_map))))      if (!((Dudley_checkPtr(tmp_node_localDOF_mask) && Dudley_checkPtr(tmp_node_localDOF_map))))
63      {      {
64    
# Line 105  void Dudley_Mesh_distributeByRankOfDOF(D Line 105  void Dudley_Mesh_distributeByRankOfDOF(D
105          Dudley_Mesh_createColoring(self, tmp_node_localDOF_map);          Dudley_Mesh_createColoring(self, tmp_node_localDOF_map);
106    
107      }      }
108      TMPMEMFREE(tmp_node_localDOF_mask);      delete[] tmp_node_localDOF_mask;
109      TMPMEMFREE(tmp_node_localDOF_map);      delete[] tmp_node_localDOF_map;
110      }      }
111      TMPMEMFREE(mpiRankOfDOF);      delete[] mpiRankOfDOF;
112      return;      return;
113  }  }

Legend:
Removed from v.4331  
changed lines
  Added in v.4332

  ViewVC Help
Powered by ViewVC 1.1.26