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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 731 - (show annotations)
Mon May 15 04:09:52 2006 UTC (13 years, 6 months ago) by bcumming
File MIME type: text/plain
File size: 1140 byte(s)


1 /* created by Ben Cumming on 27/04/2006 */
2
3 #include "Distribution.h"
4
5 #ifdef PASO_MPI
6
7 /*
8 struct Finley_ElementDistribution
9 {
10 dim_t reference_counter;
11 Paso_MPIInfo *MPIInfo;
12 index_t numLocal;
13 index_t numInternal;
14 index_t numBoundary;
15 index_t numNeighbours;
16 index_t *neighbours;
17 };
18 */
19
20 Finley_ElementDistribution* Finley_ElementDistribution_alloc( Paso_MPIInfo *MPIInfo )
21 {
22 Finley_ElementDistribution *out = NULL;
23
24 out = MEMALLOC( 1, Finley_ElementDistribution );
25 if (Finley_checkPtr(out)) return NULL;
26
27 out->reference_counter = 0;
28
29 out->numLocal = 0;
30 out->numInternal = 0;
31 out->numBoundary = 0;
32 //out->numNeighbours = 0;
33 //out->neighbours = NULL;
34
35 out->reference_counter++;
36
37 return out;
38 }
39
40 void Finley_ElementDistribution_dealloc( Finley_ElementDistribution* in )
41 {
42 if( in && !(--in->reference_counter) )
43 {
44 Paso_MPIInfo_dealloc( in->MPIInfo );
45 //MEMFREE( in->neighbours );
46
47 MEMFREE( in );
48 }
49 }
50
51 Finley_ElementDistribution* Finley_ElementDistribution_getReference( Finley_ElementDistribution* in )
52 {
53 if( in )
54 in->reference_counter++;
55
56 return in;
57 }
58
59 #endif

  ViewVC Help
Powered by ViewVC 1.1.26