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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 123 - (hide annotations)
Fri Jul 8 04:08:13 2005 UTC (14 years, 5 months ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/ElementFile_scatter.c
File MIME type: text/plain
File size: 2339 byte(s)
Merge of development branch back to main trunk on 2005-07-08

1 jgs 82 /* $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 jgs 123 void Finley_ElementFile_scatter(index_t* index, Finley_ElementFile* in, Finley_ElementFile* out) {
24     index_t k;
25     dim_t e,j;
26 jgs 82 if (in!=NULL) {
27 jgs 123 dim_t NN_in=in->ReferenceElement->Type->numNodes;
28     dim_t NN_out=out->ReferenceElement->Type->numNodes;
29 jgs 82 /*OMP */
30     #pragma omp parallel for private(e,k,j) schedule(static)
31     for (e=0;e<in->numElements;e++) {
32     k=index[e];
33     out->Id[k]=in->Id[e];
34     out->Tag[k]=in->Tag[e];
35 jgs 123 out->Color[k]=in->Color[e]+out->maxColor+1;
36 jgs 82 for(j=0;j<MIN(NN_out,NN_in);j++) out->Nodes[INDEX2(j,k,NN_out)]=in->Nodes[INDEX2(j,e,NN_in)];
37     }
38 jgs 123 out->minColor=MIN(out->minColor,in->minColor+out->maxColor+1);
39     out->maxColor=MAX(out->maxColor,in->maxColor+out->maxColor+1);
40 jgs 82 }
41     }
42     /*
43     * $Log$
44 jgs 123 * Revision 1.2 2005/07/08 04:07:50 jgs
45     * Merge of development branch back to main trunk on 2005-07-08
46 jgs 82 *
47 jgs 123 * 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:50 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 jgs 82 * 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