/[escript]/trunk-mpi-branch/finley/src/Mesh_prepareElementDistribution.c
ViewVC logotype

Contents of /trunk-mpi-branch/finley/src/Mesh_prepareElementDistribution.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 968 - (show annotations)
Tue Feb 13 22:56:57 2007 UTC (13 years, 3 months ago) by ksteube
File MIME type: text/plain
File size: 1374 byte(s)
Branch for MPI solution of implicit problems
1 #ifdef PASO_MPI
2 #include "Mesh.h"
3
4 /*
5 takes the ids for the elements in a mesh and updates to global values. After
6 sorting the elements are ordered [elements,faceElements,contactElements,points]
7 */
8
9 void Finley_Mesh_prepareElementDistribution( Finley_Mesh *in ){
10 int i;
11
12 if(!Finley_checkPtr(in) || !Finley_checkPtr(in->MPIInfo) ){
13 Finley_setError( MEMORY_ERROR, "Finley_Mesh_prepareElementDistribution() : mesh not initialised" );
14 return;
15 }
16
17 for( i=0; i<in->MPIInfo->size+1; i++ )
18 in->FaceElements->elementDistribution->vtxdist[i]+=in->Elements->elementDistribution->vtxdist[in->MPIInfo->size];
19 for( i=0; i<in->FaceElements->numElements; i++ )
20 in->FaceElements->Id[i] += in->Elements->elementDistribution->vtxdist[in->MPIInfo->size];
21
22 for( i=0; i<in->MPIInfo->size+1; i++ )
23 in->ContactElements->elementDistribution->vtxdist[i]+=in->FaceElements->elementDistribution->vtxdist[in->MPIInfo->size];
24 for( i=0; i<in->ContactElements->numElements; i++ )
25 in->ContactElements->Id[i] += in->FaceElements->elementDistribution->vtxdist[in->MPIInfo->size];
26
27 for( i=0; i<in->MPIInfo->size+1; i++ )
28 in->Points->elementDistribution->vtxdist[i]+=in->ContactElements->elementDistribution->vtxdist[in->MPIInfo->size];
29 for( i=0; i<in->Points->numElements; i++ )
30 in->Points->Id[i] += in->ContactElements->elementDistribution->vtxdist[in->MPIInfo->size];
31 }
32 #endif

  ViewVC Help
Powered by ViewVC 1.1.26