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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 782 - (show annotations)
Tue Jul 18 00:47:47 2006 UTC (12 years, 9 months ago) by bcumming
File MIME type: text/plain
File size: 2433 byte(s)
Large number of changes to Finley for meshing in MPI.

- optimisation and neatening up of rectcanglular mesh generation code
- first and second order 1D, 2D and 3D rectangular meshes are now
  available in finley and escript using MPI.
- reduced meshes now generated in MPI, and interpolation to and from 
  reduced data types now supported.  

1 /*
2 ************************************************************
3 * Copyright 2006 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: NodeFile */
16
17 /* scatters the NodeFile in into NodeFile out using index[0:in->numNodes-1]. */
18 /* index has to be between 0 and out->numNodes-1. */
19 /* coloring is choosen for the worst case */
20
21 /**************************************************************/
22
23 /* Author: gross@access.edu.au */
24 /* Version: $Id$ */
25
26 /**************************************************************/
27
28 #include "NodeFile.h"
29
30 /**************************************************************/
31
32 void Finley_NodeFile_scatter(index_t* index, Finley_NodeFile* in, Finley_NodeFile* out) {
33 dim_t i,j;
34 index_t k;
35 if (in->Id!=NULL) {
36 #pragma omp parallel for private(i,j,k) schedule(static)
37 for (i=0;i<in->numNodes;i++) {
38 k=index[i];
39 #ifdef PASO_MPI
40 out->Dom[k]=in->Dom[i];
41 #endif
42 out->Id[k]=in->Id[i];
43 out->Tag[k]=in->Tag[i];
44 out->degreeOfFreedom[k]=in->degreeOfFreedom[i];
45 out->reducedDegreeOfFreedom[k]=in->reducedDegreeOfFreedom[i];
46 out->toReduced[k]=in->toReduced[i];
47 for(j=0;j<in->numDim;j++) out->Coordinates[INDEX2(j,k,in->numDim)]=in->Coordinates[INDEX2(j,i,in->numDim)];
48 }
49 }
50 }
51 /*
52 * $Log$
53 * Revision 1.3 2005/09/15 03:44:23 jgs
54 * Merge of development branch dev-02 back to main trunk on 2005-09-15
55 *
56 * Revision 1.2.2.1 2005/09/07 06:26:20 gross
57 * the solver from finley are put into the standalone package paso now
58 *
59 * Revision 1.2 2005/07/08 04:07:55 jgs
60 * Merge of development branch back to main trunk on 2005-07-08
61 *
62 * Revision 1.1.1.1.2.1 2005/06/29 02:34:54 gross
63 * some changes towards 64 integers in finley
64 *
65 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
66 * initial import of project esys2
67 *
68 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
69 * Initial version of eys using boost-python.
70 *
71 *
72 */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26