/[escript]/branches/domexper/dudley/src/Mesh_createNodeFileMappings.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/Mesh_createNodeFileMappings.c

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

revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1552 by gross, Thu May 8 08:52:41 2008 UTC
# Line 32  void Mesh_createDOFMappingAndCoupling(Fi Line 32  void Mesh_createDOFMappingAndCoupling(Fi
32    Paso_MPI_rank myRank,p,p_min,p_max, *neighbor=NULL;    Paso_MPI_rank myRank,p,p_min,p_max, *neighbor=NULL;
33    Paso_SharedComponents *rcv_shcomp=NULL, *snd_shcomp=NULL;    Paso_SharedComponents *rcv_shcomp=NULL, *snd_shcomp=NULL;
34    Finley_NodeMapping *this_mapping=NULL;    Finley_NodeMapping *this_mapping=NULL;
35    Paso_Coupler* this_coupler=NULL;    Paso_Connector* this_connector=NULL;
36    Paso_Distribution* dof_distribution;    Paso_Distribution* dof_distribution;
37        
38    numNodes=in->Nodes->numNodes;    numNodes=in->Nodes->numNodes;
# Line 187  void Mesh_createDOFMappingAndCoupling(Fi Line 187  void Mesh_createDOFMappingAndCoupling(Fi
187      offsetInShared[numNeighbors]=lastn;      offsetInShared[numNeighbors]=lastn;
188      snd_shcomp=Paso_SharedComponents_alloc(numNeighbors,neighbor,shared,offsetInShared,1,0,dof_distribution->mpi_info);      snd_shcomp=Paso_SharedComponents_alloc(numNeighbors,neighbor,shared,offsetInShared,1,0,dof_distribution->mpi_info);
189    
190      if (Finley_noError()) this_coupler=Paso_Coupler_alloc(snd_shcomp,rcv_shcomp);      if (Finley_noError()) this_connector=Paso_Connector_alloc(snd_shcomp,rcv_shcomp);
191      /* assign new DOF labels to nodes */      /* assign new DOF labels to nodes */
192      Paso_SharedComponents_free(rcv_shcomp);      Paso_SharedComponents_free(rcv_shcomp);
193      Paso_SharedComponents_free(snd_shcomp);      Paso_SharedComponents_free(snd_shcomp);
# Line 200  void Mesh_createDOFMappingAndCoupling(Fi Line 200  void Mesh_createDOFMappingAndCoupling(Fi
200    if (Finley_noError()) {    if (Finley_noError()) {
201       if (use_reduced_elements) {       if (use_reduced_elements) {
202          in->Nodes->reducedDegreesOfFreedomMapping=this_mapping;          in->Nodes->reducedDegreesOfFreedomMapping=this_mapping;
203          in->Nodes->reducedDegreesOfFreedomCoupler=this_coupler;          in->Nodes->reducedDegreesOfFreedomConnector=this_connector;
204       } else {       } else {
205          in->Nodes->degreesOfFreedomMapping=this_mapping;          in->Nodes->degreesOfFreedomMapping=this_mapping;
206          in->Nodes->degreesOfFreedomCoupler=this_coupler;          in->Nodes->degreesOfFreedomConnector=this_connector;
207      }      }
208    } else {    } else {
209       Finley_NodeMapping_free(this_mapping);       Finley_NodeMapping_free(this_mapping);
210       Paso_Coupler_free(this_coupler);       Paso_Connector_free(this_connector);
211    
212    }    }
213  }  }
# Line 345  void Finley_Mesh_createNodeFileMappings( Line 345  void Finley_Mesh_createNodeFileMappings(
345    
346    }    }
347    TMPMEMFREE(nodeMask);    TMPMEMFREE(nodeMask);
348    /* ==== mapping between nodes and DOFs + DOF coupler ========== */    /* ==== mapping between nodes and DOFs + DOF connector ========== */
349    if ( Finley_noError()) Mesh_createDOFMappingAndCoupling(in,FALSE);    if ( Finley_noError()) Mesh_createDOFMappingAndCoupling(in,FALSE);
350    /* ==== mapping between nodes and reduced DOFs + reduced DOF coupler ========== */    /* ==== mapping between nodes and reduced DOFs + reduced DOF connector ========== */
351    if ( Finley_noError()) Mesh_createDOFMappingAndCoupling(in,TRUE);    if ( Finley_noError()) Mesh_createDOFMappingAndCoupling(in,TRUE);
352    
353    /* get the Ids for DOFs and reduced nodes */    /* get the Ids for DOFs and reduced nodes */
# Line 370  void Finley_Mesh_createNodeFileMappings( Line 370  void Finley_Mesh_createNodeFileMappings(
370      Paso_Distribution_free(in->Nodes->reducedNodesDistribution);      Paso_Distribution_free(in->Nodes->reducedNodesDistribution);
371      Paso_Distribution_free(in->Nodes->degreesOfFreedomDistribution);      Paso_Distribution_free(in->Nodes->degreesOfFreedomDistribution);
372      Paso_Distribution_free(in->Nodes->reducedDegreesOfFreedomDistribution);      Paso_Distribution_free(in->Nodes->reducedDegreesOfFreedomDistribution);
373      Paso_Coupler_free(in->Nodes->degreesOfFreedomCoupler);      Paso_Connector_free(in->Nodes->degreesOfFreedomConnector);
374      Paso_Coupler_free(in->Nodes->reducedDegreesOfFreedomCoupler);      Paso_Connector_free(in->Nodes->reducedDegreesOfFreedomConnector);
375      in->Nodes->nodesMapping=NULL;      in->Nodes->nodesMapping=NULL;
376      in->Nodes->reducedNodesMapping=NULL;      in->Nodes->reducedNodesMapping=NULL;
377      in->Nodes->degreesOfFreedomMapping=NULL;      in->Nodes->degreesOfFreedomMapping=NULL;
# Line 380  void Finley_Mesh_createNodeFileMappings( Line 380  void Finley_Mesh_createNodeFileMappings(
380      in->Nodes->reducedNodesDistribution=NULL;      in->Nodes->reducedNodesDistribution=NULL;
381      in->Nodes->degreesOfFreedomDistribution=NULL;      in->Nodes->degreesOfFreedomDistribution=NULL;
382      in->Nodes->reducedDegreesOfFreedomDistribution=NULL;      in->Nodes->reducedDegreesOfFreedomDistribution=NULL;
383      in->Nodes->degreesOfFreedomCoupler=NULL;      in->Nodes->degreesOfFreedomConnector=NULL;
384      in->Nodes->reducedDegreesOfFreedomCoupler=NULL;      in->Nodes->reducedDegreesOfFreedomConnector=NULL;
385    }    }
386  }  }
387    

Legend:
Removed from v.1388  
changed lines
  Added in v.1552

  ViewVC Help
Powered by ViewVC 1.1.26