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

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

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

revision 782 by bcumming, Tue Jul 18 00:47:47 2006 UTC revision 787 by bcumming, Wed Jul 26 01:46:45 2006 UTC
# Line 1  Line 1 
1  /* created by Ben Cumming on 2/5/2006 */  /* created by Ben Cumming on 2/5/2006 */
2    
3    /* Add degrees of freedom to the forward and backward lists for the edge associated with
4       a neighbour sub-domain in a Finley_NodeDistribution */
5  #include "Distribution.h"  #include "Distribution.h"
6    
7  #ifdef PASO_MPI  #ifdef PASO_MPI
# Line 16  static index_t findInList( index_t val, Line 18  static index_t findInList( index_t val,
18    return -1;    return -1;
19  }  }
20    
21    /*
22        in :                    the NodeDistribution to update
23        domain :            the process rank of the domain for which to add
24                                the edge data
25        numForward :    the number of degrees of freedom that are being added
26                                    to the edge
27        indexLocal :    the local indices of the degrees of freedom to add                                      
28    */
29  void Finley_NodeDistribution_addForward( Finley_NodeDistribution *in, index_t domain, dim_t numForward, index_t* indexLocal  )  void Finley_NodeDistribution_addForward( Finley_NodeDistribution *in, index_t domain, dim_t numForward, index_t* indexLocal  )
30  {  {
31      index_t posDomain=0;      index_t posDomain=0;
# Line 66  void Finley_NodeDistribution_addForward( Line 76  void Finley_NodeDistribution_addForward(
76      }      }
77  }  }
78    
79    /*
80        see comments for Finley_NodeDistribtion_addForward
81    */
82  void Finley_NodeDistribution_addBackward( Finley_NodeDistribution *in, index_t domain, dim_t numBackward, index_t* indexLocal  )  void Finley_NodeDistribution_addBackward( Finley_NodeDistribution *in, index_t domain, dim_t numBackward, index_t* indexLocal  )
83  {  {
84      index_t posDomain=0;      index_t posDomain=0;
# Line 105  void Finley_NodeDistribution_addBackward Line 118  void Finley_NodeDistribution_addBackward
118        in->edges[posDomain] = Finley_NodeGhostEdge_alloc();        in->edges[posDomain] = Finley_NodeGhostEdge_alloc();
119        if( Finley_checkPtr(in->edges[posDomain]))        if( Finley_checkPtr(in->edges[posDomain]))
120        {        {
121          Finley_setError( MEMORY_ERROR, "Finley_NodeDistribution_addForward() : invalid pointer to ghost edge" );          Finley_setError( MEMORY_ERROR, "Finley_NodeDistribution_addBackward() : invalid pointer to ghost edge" );
122          return;          return;
123        }        }
124        Finley_NodeGhostEdge_allocTable( in->edges[posDomain], 0, numBackward );        Finley_NodeGhostEdge_allocTable( in->edges[posDomain], 0, numBackward );

Legend:
Removed from v.782  
changed lines
  Added in v.787

  ViewVC Help
Powered by ViewVC 1.1.26