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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 787 - (hide annotations)
Wed Jul 26 01:46:45 2006 UTC (13 years, 6 months ago) by bcumming
File MIME type: text/plain
File size: 679 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 782 #include "ElementFile.h"
2    
3 bcumming 787 /* created by Ben Cumming */
4    
5     /* determines the number of internal and boundary elements
6     in an ElementFile and updates the relevant elementDistribution
7     information. */
8    
9 bcumming 782 #ifdef PASO_MPI
10     void Finley_ElementFile_setDomainFlags( Finley_ElementFile *in )
11     {
12     int i, internal, boundary;
13    
14     internal = boundary = 0;
15    
16     for( i=0; i<in->numElements; i++ )
17     switch( in->Dom[i] ){
18     case ELEMENT_INTERNAL :
19     internal++;
20     break;
21     case ELEMENT_BOUNDARY :
22     boundary++;
23     break;
24     }
25     in->elementDistribution->numInternal = internal;
26     in->elementDistribution->numBoundary = boundary;
27     in->elementDistribution->numLocal = internal+boundary;
28     }
29     #endif
30    

  ViewVC Help
Powered by ViewVC 1.1.26