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

Contents of /trunk/finley/src/NodeDistribution_formCommBuffer.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 787 - (show annotations)
Wed Jul 26 01:46:45 2006 UTC (13 years, 3 months ago) by bcumming
File MIME type: text/plain
File size: 797 byte(s)
MPI update
Each element (normal elements, faceElements, ContactElements and points)
are now assigned a unique global id to streamline per-element
calculations and file IO of element data.



1 #include "Distribution.h"
2
3 #ifdef PASO_MPI
4
5 void Finley_NodeDistribution_formCommBuffer( Finley_NodeDistribution *in, Paso_CommBuffer *CommBuffer )
6 {
7 index_t *numForward=NULL, *numBackward=NULL;
8 index_t i;
9
10 numForward = MEMALLOC( in->numNeighbours, index_t );
11 numBackward = MEMALLOC( in->numNeighbours, index_t );
12
13 if( Finley_checkPtr(numForward) || Finley_checkPtr(numBackward) ){
14 MEMFREE( numForward );
15 MEMFREE( numBackward );
16 return;
17 }
18
19 for( i=0; i<in->numNeighbours; i++ ){
20 numForward[i] = in->edges[i]->numForward;
21 numBackward[i] = in->edges[i]->numBackward;
22 }
23
24 Paso_CommBuffer_allocTable( CommBuffer, FINLEY_INIT_ITEMSIZE, numForward, numBackward, in->numNeighbours, in->neighbours );
25
26 MEMFREE( numForward );
27 MEMFREE( numBackward );
28 }
29
30 #endif

  ViewVC Help
Powered by ViewVC 1.1.26