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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (show annotations)
Tue Oct 26 06:53:54 2004 UTC (15 years ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/ElementFile_scatter.c
File MIME type: text/plain
File size: 1920 byte(s)
Initial revision

1 /* $Id$ */
2 /**************************************************************/
3 /* */
4 /* Finley: ElementFile */
5 /* */
6 /* scatter the ElementFile in into the ElementFile out using index[0:out->numElements-1]. */
7 /* index has to be between 0 and in->numElements-1. */
8 /* a conservative assumtion on the coloring is made */
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 "ElementFile.h"
20
21 /**************************************************************/
22
23 void Finley_ElementFile_scatter(int* index, Finley_ElementFile* in, Finley_ElementFile* out) {
24 maybelong e,k,j;
25 if (in!=NULL) {
26 int NN_in=in->ReferenceElement->Type->numNodes;
27 int NN_out=out->ReferenceElement->Type->numNodes;
28 /*OMP */
29 #pragma omp parallel for private(e,k,j) schedule(static)
30 for (e=0;e<in->numElements;e++) {
31 k=index[e];
32 out->Id[k]=in->Id[e];
33 out->Tag[k]=in->Tag[e];
34 out->Color[k]=in->Color[e]+out->numColors;
35 for(j=0;j<MIN(NN_out,NN_in);j++) out->Nodes[INDEX2(j,k,NN_out)]=in->Nodes[INDEX2(j,e,NN_in)];
36 }
37 out->numColors+=in->numColors;
38 }
39 }
40 /*
41 * $Log$
42 * Revision 1.1 2004/10/26 06:53:57 jgs
43 * Initial revision
44 *
45 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
46 * Initial version of eys using boost-python.
47 *
48 *
49 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26