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

Diff of /trunk/finley/src/NodeFile_scatter.c

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

trunk/esys2/finley/src/finleyC/NodeFile_scatter.c revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC trunk/finley/src/NodeFile_scatter.c revision 964 by gross, Tue Feb 13 05:10:26 2007 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
2     ************************************************************
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    */
12    
13  /**************************************************************/  /**************************************************************/
14    
15  /*   Finley: Mesh: NodeFile */  /*   Finley: Mesh: NodeFile */
# Line 9  Line 20 
20    
21  /**************************************************************/  /**************************************************************/
22    
 /*   Copyrights by ACcESS Australia 2003/04 */  
23  /*   Author: gross@access.edu.au */  /*   Author: gross@access.edu.au */
24  /*   Version: $Id$ */  /*   Version: $Id$ */
25    
26  /**************************************************************/  /**************************************************************/
27    
 #include "Common.h"  
28  #include "NodeFile.h"  #include "NodeFile.h"
29    
30  /**************************************************************/  /**************************************************************/
31    
32  void Finley_NodeFile_scatter(maybelong* index, Finley_NodeFile* in, Finley_NodeFile* out) {  void Finley_NodeFile_scatter(index_t* index, Finley_NodeFile* in, Finley_NodeFile* out) {
33     maybelong i,k,j;     dim_t i,j;
34       index_t k;
35     if (in->Id!=NULL) {     if (in->Id!=NULL) {
36       #pragma omp parallel for private(i,j,k) schedule(static)       #pragma omp parallel for private(i,j,k) schedule(static)
37       for (i=0;i<in->numNodes;i++) {       for (i=0;i<in->numNodes;i++) {
38          k=index[i];          k=index[i];
39    #ifdef PASO_MPI
40            out->Dom[k]=in->Dom[i];
41    #endif
42          out->Id[k]=in->Id[i];          out->Id[k]=in->Id[i];
43          out->Tag[k]=in->Tag[i];          out->Tag[k]=in->Tag[i];
44          out->degreeOfFreedom[k]=in->degreeOfFreedom[i];          out->degreeOfFreedom[k]=in->degreeOfFreedom[i];
         out->reducedDegreeOfFreedom[k]=in->reducedDegreeOfFreedom[i];  
         out->toReduced[k]=in->toReduced[i];  
45          for(j=0;j<in->numDim;j++) out->Coordinates[INDEX2(j,k,in->numDim)]=in->Coordinates[INDEX2(j,i,in->numDim)];          for(j=0;j<in->numDim;j++) out->Coordinates[INDEX2(j,k,in->numDim)]=in->Coordinates[INDEX2(j,i,in->numDim)];
46       }       }
47         out->isPrepared=FINLEY_UNPREPARED;
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.964

  ViewVC Help
Powered by ViewVC 1.1.26