/[escript]/branches/doubleplusgood/dudley/src/ElementFile_gather.cpp
ViewVC logotype

Annotation of /branches/doubleplusgood/dudley/src/ElementFile_gather.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 616 - (hide annotations)
Wed Mar 22 02:46:56 2006 UTC (13 years, 1 month ago) by elspeth
Original Path: trunk/finley/src/ElementFile_gather.c
File MIME type: text/plain
File size: 2615 byte(s)
Copyright added to more source files.

1 jgs 150 /*
2 elspeth 616 ************************************************************
3     * Copyright 2006 by ACcESS MNRF *
4     * *
5     * http://www.access.edu.au *
6     * Primary Business: Queensland, Australia *
7     * Licensed under the Open Software License version 3.0 *
8     * http://www.opensource.org/licenses/osl-3.0.php *
9     * *
10     ************************************************************
11 jgs 150 */
12    
13 jgs 82 /**************************************************************/
14    
15     /* Finley: ElementFile */
16    
17     /* gathers the ElementFile out from the ElementFile in using index[0:out->numElements-1]. */
18     /* index has to be between 0 and in->numElements-1. */
19     /* a conservative assumtion on the coloring is made */
20    
21     /**************************************************************/
22    
23 jgs 150 /* Author: gross@access.edu.au */
24     /* Version: $Id$ */
25 jgs 82
26     /**************************************************************/
27    
28     #include "ElementFile.h"
29    
30     /**************************************************************/
31    
32 jgs 123 void Finley_ElementFile_gather(index_t* index, Finley_ElementFile* in, Finley_ElementFile* out) {
33     index_t k;
34     dim_t e,j;
35     dim_t NN_in=in->ReferenceElement->Type->numNodes;
36     dim_t NN_out=out->ReferenceElement->Type->numNodes;
37 jgs 82 if (in!=NULL) {
38     /*OMP */
39     #pragma omp parallel for private(e,k,j) schedule(static)
40     for (e=0;e<out->numElements;e++) {
41     k=index[e];
42     out->Id[e]=in->Id[k];
43     out->Tag[e]=in->Tag[k];
44 jgs 123 out->Color[e]=in->Color[k]+out->maxColor+1;
45 jgs 82 for(j=0;j<MIN(NN_out,NN_in);j++) out->Nodes[INDEX2(j,e,NN_out)]=in->Nodes[INDEX2(j,k,NN_in)];
46     }
47 jgs 123 out->minColor=MIN(out->minColor,in->minColor+out->maxColor+1);
48     out->maxColor=MAX(out->maxColor,in->maxColor+out->maxColor+1);
49 jgs 82 }
50     }
51     /*
52     * $Log$
53 jgs 150 * Revision 1.3 2005/09/15 03:44:22 jgs
54     * Merge of development branch dev-02 back to main trunk on 2005-09-15
55     *
56     * Revision 1.2.2.1 2005/09/07 06:26:18 gross
57     * the solver from finley are put into the standalone package paso now
58     *
59 jgs 123 * Revision 1.2 2005/07/08 04:07:49 jgs
60     * Merge of development branch back to main trunk on 2005-07-08
61 jgs 82 *
62 jgs 123 * Revision 1.1.1.1.2.2 2005/06/30 01:53:55 gross
63     * a bug in coloring fixed
64     *
65     * Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross
66     * some changes towards 64 integers in finley
67     *
68     * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
69     * initial import of project esys2
70     *
71 jgs 82 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
72     * Initial version of eys using boost-python.
73     *
74     *
75     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26