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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/esys2/finley/src/finleyC/ElementFile_gather.c revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC trunk/finley/src/ElementFile_gather.c revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1    
2  /* $Id$ */  /* $Id$ */
3    
4    /*******************************************************
5     *
6     *           Copyright 2003-2007 by ACceSS MNRF
7     *       Copyright 2007 by University of Queensland
8     *
9     *                http://esscc.uq.edu.au
10     *        Primary Business: Queensland, Australia
11     *  Licensed under the Open Software License version 3.0
12     *     http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15    
16  /**************************************************************/  /**************************************************************/
17    
18  /*   Finley: ElementFile */  /*   Finley: ElementFile */
# Line 9  Line 23 
23    
24  /**************************************************************/  /**************************************************************/
25    
 /*   Copyrights by ACcESS Australia 2003/04 */  
 /*   Author: gross@access.edu.au */  
 /*   Version: $Id$ */  
   
 /**************************************************************/  
   
 #include "Finley.h"  
26  #include "ElementFile.h"  #include "ElementFile.h"
27    
28  /**************************************************************/  /**************************************************************/
29    
30  void Finley_ElementFile_gather(int* index, Finley_ElementFile* in, Finley_ElementFile* out) {  void Finley_ElementFile_gather(index_t* index, Finley_ElementFile* in, Finley_ElementFile* out) {
31     maybelong e,k,j;     index_t k;
32     maybelong NN_in=in->ReferenceElement->Type->numNodes;     dim_t e,j;
33     maybelong NN_out=out->ReferenceElement->Type->numNodes;     dim_t NN_in=in->numNodes;
34       dim_t NN_out=out->numNodes;
35     if (in!=NULL) {     if (in!=NULL) {
36       /*OMP */       /*OMP */
37       #pragma omp parallel for private(e,k,j) schedule(static)       #pragma omp parallel for private(e,k,j) schedule(static)
# Line 31  void Finley_ElementFile_gather(int* inde Line 39  void Finley_ElementFile_gather(int* inde
39          k=index[e];          k=index[e];
40          out->Id[e]=in->Id[k];          out->Id[e]=in->Id[k];
41          out->Tag[e]=in->Tag[k];          out->Tag[e]=in->Tag[k];
42          out->Color[e]=in->Color[k]+out->numColors;          out->Owner[e]=in->Owner[k];
43            out->Color[e]=in->Color[k]+out->maxColor+1;
44          for(j=0;j<MIN(NN_out,NN_in);j++) out->Nodes[INDEX2(j,e,NN_out)]=in->Nodes[INDEX2(j,k,NN_in)];          for(j=0;j<MIN(NN_out,NN_in);j++) out->Nodes[INDEX2(j,e,NN_out)]=in->Nodes[INDEX2(j,k,NN_in)];
45       }       }
46       out->numColors+=in->numColors;       out->minColor=MIN(out->minColor,in->minColor+out->maxColor+1);
47         out->maxColor=MAX(out->maxColor,in->maxColor+out->maxColor+1);
48     }     }
49  }  }
 /*  
 * $Log$  
 * Revision 1.1  2004/10/26 06:53:57  jgs  
 * Initial revision  
 *  
 * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
 * Initial version of eys using boost-python.  
 *  
 *  
 */  

Legend:
Removed from v.82  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26