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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1253 - (show annotations)
Fri Aug 17 04:09:29 2007 UTC (12 years, 9 months ago) by gross
File MIME type: text/plain
File size: 1870 byte(s)
finally everthing for MPI is in the code. now testing is needed
1 /*
2 ************************************************************
3 * Copyright 2007 by ACcESS MNRF *
4 * *
5 * http://www.access.edu.au *
6 * Primary Business: Queensland, Australia *
7 * Licensed under the Open Software License version 3.0 *
8 * http://www.opensource.org/licenses/osl-3.0.php *
9 * *
10 ************************************************************
11 */
12
13 /**************************************************************/
14
15 /* Finley: Mesh: build up the mappings and distributions */
16 /* no distribution is happening */
17
18 /**************************************************************/
19
20 /* Author: gross@access.edu.au */
21 /* Version: $Id:$ */
22
23 /**************************************************************/
24
25 #include "Mesh.h"
26
27 /**************************************************************/
28
29 void Finley_Mesh_createMappings(Finley_Mesh* in, index_t *dof_first_component) {
30 dim_t i, numReducedNodes;
31 index_t *maskReducedNodes=NULL, *indexReducedNodes=NULL;
32
33 maskReducedNodes=TMPMEMALLOC(in->Nodes->numNodes,index_t);
34 indexReducedNodes=TMPMEMALLOC(in->Nodes->numNodes,index_t);
35 if (! ( Finley_checkPtr(maskReducedNodes) || Finley_checkPtr(indexReducedNodes) ) ) {
36
37
38 #pragma omp parallel for private(i) schedule(static)
39 for (i=0;i<in->Nodes->numNodes;++i) maskReducedNodes[i]=-1;
40
41 Finley_Mesh_markNodes(maskReducedNodes,0,in,TRUE);
42
43 numReducedNodes=Finley_Util_packMask(in->Nodes->numNodes,maskReducedNodes,indexReducedNodes);
44
45 Finley_Mesh_createNodeFileMappings(in,numReducedNodes,indexReducedNodes,dof_first_component);
46
47 }
48
49 TMPMEMFREE(maskReducedNodes);
50 TMPMEMFREE(indexReducedNodes);
51 }

  ViewVC Help
Powered by ViewVC 1.1.26