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

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

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

revision 1749 by gross, Wed Sep 3 07:25:01 2008 UTC revision 1804 by gross, Wed Sep 24 07:52:19 2008 UTC
# Line 23  Line 23 
23  #include "Mesh.h"  #include "Mesh.h"
24  #define UNUSED -1  #define UNUSED -1
25    
 #define BOUNDS_CHECK 1  
   
26  /**************************************************************/  /**************************************************************/
27    
28  void Mesh_createDOFMappingAndCoupling(Finley_Mesh* in, bool_t use_reduced_elements)  void Mesh_createDOFMappingAndCoupling(Finley_Mesh* in, bool_t use_reduced_elements)
# Line 267  void Finley_Mesh_createMappings(Finley_M Line 265  void Finley_Mesh_createMappings(Finley_M
265      #pragma omp parallel for private(i) schedule(static)      #pragma omp parallel for private(i) schedule(static)
266      for (i=0;i<mesh->Nodes->numNodes;++i) maskReducedNodes[i]=-1;      for (i=0;i<mesh->Nodes->numNodes;++i) maskReducedNodes[i]=-1;
267      Finley_Mesh_markNodes(maskReducedNodes,0,mesh,TRUE);      Finley_Mesh_markNodes(maskReducedNodes,0,mesh,TRUE);
268    
269      numReducedNodes=Finley_Util_packMask(mesh->Nodes->numNodes,maskReducedNodes,indexReducedNodes);      numReducedNodes=Finley_Util_packMask(mesh->Nodes->numNodes,maskReducedNodes,indexReducedNodes);
270      if (Finley_noError()) Finley_Mesh_createNodeFileMappings(mesh,numReducedNodes,indexReducedNodes,dof_distribution, node_distribution);      if (Finley_noError()) Finley_Mesh_createNodeFileMappings(mesh,numReducedNodes,indexReducedNodes,dof_distribution, node_distribution);
271    }    }
# Line 285  void Finley_Mesh_createNodeFileMappings( Line 284  void Finley_Mesh_createNodeFileMappings(
284    
285    mpiSize=in->Nodes->MPIInfo->size;    mpiSize=in->Nodes->MPIInfo->size;
286    myRank=in->Nodes->MPIInfo->rank;    myRank=in->Nodes->MPIInfo->rank;
287    
288    /* mark the nodes used by the reduced mesh */    /* mark the nodes used by the reduced mesh */
289    
290    reduced_dof_first_component=TMPMEMALLOC(mpiSize+1,index_t);    reduced_dof_first_component=TMPMEMALLOC(mpiSize+1,index_t);
# Line 380  void Finley_Mesh_createNodeFileMappings( Line 380  void Finley_Mesh_createNodeFileMappings(
380      #pragma omp parallel for private(i) schedule(static)      #pragma omp parallel for private(i) schedule(static)
381      for (i=0;i<numReducedNodes;++i) nodeMask[indexReducedNodes[i]]=i;      for (i=0;i<numReducedNodes;++i) nodeMask[indexReducedNodes[i]]=i;
382      in->Nodes->reducedNodesMapping=Finley_NodeMapping_alloc(in->Nodes->numNodes,nodeMask,UNUSED);      in->Nodes->reducedNodesMapping=Finley_NodeMapping_alloc(in->Nodes->numNodes,nodeMask,UNUSED);
   
383    }    }
384    TMPMEMFREE(nodeMask);    TMPMEMFREE(nodeMask);
385    /* ==== mapping between nodes and DOFs + DOF connector ========== */    /* ==== mapping between nodes and DOFs + DOF connector ========== */

Legend:
Removed from v.1749  
changed lines
  Added in v.1804

  ViewVC Help
Powered by ViewVC 1.1.26