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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1028 - (show annotations)
Wed Mar 14 00:15:24 2007 UTC (12 years, 6 months ago) by gross
File MIME type: text/plain
File size: 1374 byte(s)
modifications to be compliant with _WIN32. The substitutes for asinh, acosh, atanh are still missing (erf will through an exception)
1 #include "Mesh.h"
2
3 /*
4 takes the ids for the elements in a mesh and updates to global values. After
5 sorting the elements are ordered [elements,faceElements,contactElements,points]
6 */
7
8 void Finley_Mesh_prepareElementDistribution( Finley_Mesh *in ){
9 #ifdef PASO_MPI
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 #endif
32 }

  ViewVC Help
Powered by ViewVC 1.1.26