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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 123 - (show annotations)
Fri Jul 8 04:08:13 2005 UTC (14 years, 9 months ago) by jgs
File MIME type: text/plain
File size: 1898 byte(s)
Merge of development branch back to main trunk on 2005-07-08

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(index_t* index, Finley_ElementFile* in, Finley_ElementFile* out) {
24 index_t k;
25 dim_t e,j;
26 dim_t NN_in=in->ReferenceElement->Type->numNodes;
27 dim_t NN_out=out->ReferenceElement->Type->numNodes;
28 if (in!=NULL) {
29 /*OMP */
30 #pragma omp parallel for private(e,k,j) schedule(static)
31 for (e=0;e<out->numElements;e++) {
32 k=index[e];
33 out->Id[e]=in->Id[k];
34 out->Tag[e]=in->Tag[k];
35 out->Color[e]=in->Color[k]+out->maxColor+1;
36 for(j=0;j<MIN(NN_out,NN_in);j++) out->Nodes[INDEX2(j,e,NN_out)]=in->Nodes[INDEX2(j,k,NN_in)];
37 }
38 out->minColor=MIN(out->minColor,in->minColor+out->maxColor+1);
39 out->maxColor=MAX(out->maxColor,in->maxColor+out->maxColor+1);
40 }
41 }
42 /*
43 * $Log$
44 * Revision 1.2 2005/07/08 04:07:49 jgs
45 * Merge of development branch back to main trunk on 2005-07-08
46 *
47 * Revision 1.1.1.1.2.2 2005/06/30 01:53:55 gross
48 * a bug in coloring fixed
49 *
50 * Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross
51 * some changes towards 64 integers in finley
52 *
53 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
54 * initial import of project esys2
55 *
56 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
57 * Initial version of eys using boost-python.
58 *
59 *
60 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26