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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 787 - (show annotations)
Wed Jul 26 01:46:45 2006 UTC (13 years, 2 months ago) by bcumming
File MIME type: text/plain
File size: 925 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 /* created by Ben Cumming on 27/04/2006 */
2
3 #include "Distribution.h"
4
5 #ifdef PASO_MPI
6
7 Finley_ElementDistribution* Finley_ElementDistribution_alloc( Paso_MPIInfo *MPIInfo )
8 {
9 Finley_ElementDistribution *out = NULL;
10
11 out = MEMALLOC( 1, Finley_ElementDistribution );
12 if (Finley_checkPtr(out)) return NULL;
13
14 out->reference_counter = 0;
15
16 out->numLocal = 0;
17 out->numInternal = 0;
18 out->numBoundary = 0;
19 out->vtxdist = NULL;
20
21 out->MPIInfo = Paso_MPIInfo_getReference( MPIInfo );
22 out->reference_counter++;
23
24 return out;
25 }
26
27 void Finley_ElementDistribution_dealloc( Finley_ElementDistribution* in )
28 {
29 if( in && !(--in->reference_counter) )
30 {
31 Paso_MPIInfo_dealloc( in->MPIInfo );
32 MEMFREE( in->vtxdist );
33
34 MEMFREE( in );
35 }
36 }
37
38 Finley_ElementDistribution* Finley_ElementDistribution_getReference( Finley_ElementDistribution* in )
39 {
40 if( in )
41 in->reference_counter++;
42
43 return in;
44 }
45
46 #endif

  ViewVC Help
Powered by ViewVC 1.1.26