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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (show annotations)
Tue Oct 26 06:53:54 2004 UTC (14 years, 7 months ago) by jgs
File MIME type: text/plain
File size: 1430 byte(s)
Initial revision

1 /* $Id$ */
2 /**************************************************************/
3
4 /* Finley: Mesh: NodeFile */
5
6 /* scatters the NodeFile in into NodeFile out using index[0:in->numNodes-1]. */
7 /* index has to be between 0 and out->numNodes-1. */
8 /* coloring is choosen for the worst case */
9
10 /**************************************************************/
11
12 /* Copyrights by ACcESS Australia 2003/04 */
13 /* Author: gross@access.edu.au */
14 /* Version: $Id$ */
15
16 /**************************************************************/
17
18 #include "Common.h"
19 #include "NodeFile.h"
20
21 /**************************************************************/
22
23 void Finley_NodeFile_scatter(maybelong* index, Finley_NodeFile* in, Finley_NodeFile* out) {
24 maybelong i,k,j;
25 if (in->Id!=NULL) {
26 #pragma omp parallel for private(i,j,k) schedule(static)
27 for (i=0;i<in->numNodes;i++) {
28 k=index[i];
29 out->Id[k]=in->Id[i];
30 out->Tag[k]=in->Tag[i];
31 out->degreeOfFreedom[k]=in->degreeOfFreedom[i];
32 out->reducedDegreeOfFreedom[k]=in->reducedDegreeOfFreedom[i];
33 out->toReduced[k]=in->toReduced[i];
34 for(j=0;j<in->numDim;j++) out->Coordinates[INDEX2(j,k,in->numDim)]=in->Coordinates[INDEX2(j,i,in->numDim)];
35 }
36 }
37 }
38 /*
39 * $Log$
40 * Revision 1.1 2004/10/26 06:53:57 jgs
41 * Initial revision
42 *
43 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
44 * Initial version of eys using boost-python.
45 *
46 *
47 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26