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

Annotation of /trunk/finley/src/ElementDistribution_allocTable.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 787 - (hide annotations)
Wed Jul 26 01:46:45 2006 UTC (13 years, 3 months ago) by bcumming
File MIME type: text/plain
File size: 653 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 bcumming 787 #ifdef PASO_MPI
2    
3     #include "Distribution.h"
4    
5     /* note that numElementsThis is the number of elements assigned to this process */
6     void Finley_ElementDistribution_allocTable( Finley_ElementDistribution *in, dim_t numElements, dim_t numElementsThis ){
7     index_t i;
8    
9     in->numLocal = numElements;
10     in->numBoundary = 0;
11     in->numInternal = 0;
12     in->vtxdist = MEMALLOC(in->MPIInfo->size+1,dim_t);
13     in->vtxdist[0] = 0;
14     if( in->MPIInfo->size>1 )
15     MPI_Allgather( &numElementsThis, 1, MPI_INT, in->vtxdist+1, 1, MPI_INT, in->MPIInfo->comm );
16     else
17     in->vtxdist[1] = numElements;
18     for( i=0; i<in->MPIInfo->size; i++ )
19     in->vtxdist[i+1] += in->vtxdist[i];
20     }
21    
22     #endif

  ViewVC Help
Powered by ViewVC 1.1.26