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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 /* $Id$ */
2 /**************************************************************/
3
4 /* Finley: ElementFile */
5
6 /* gathers the ElementFile out from the ElementFile in 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 "Finley.h"
19 #include "ElementFile.h"
20
21 /**************************************************************/
22
23 void Finley_ElementFile_gather(int* index, Finley_ElementFile* in, Finley_ElementFile* out) {
24 maybelong e,k,j;
25 maybelong NN_in=in->ReferenceElement->Type->numNodes;
26 maybelong NN_out=out->ReferenceElement->Type->numNodes;
27 if (in!=NULL) {
28 /*OMP */
29 #pragma omp parallel for private(e,k,j) schedule(static)
30 for (e=0;e<out->numElements;e++) {
31 k=index[e];
32 out->Id[e]=in->Id[k];
33 out->Tag[e]=in->Tag[k];
34 out->Color[e]=in->Color[k]+out->numColors;
35 for(j=0;j<MIN(NN_out,NN_in);j++) out->Nodes[INDEX2(j,e,NN_out)]=in->Nodes[INDEX2(j,k,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