/[escript]/branches/domexper/dudley/src/NodeFile_copyTable.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/NodeFile_copyTable.c

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

trunk/finley/src/NodeFile_copyTable.c revision 616 by elspeth, Wed Mar 22 02:46:56 2006 UTC branches/domexper/dudley/src/NodeFile_copyTable.c revision 3086 by jfenwick, Thu Aug 5 05:07:58 2010 UTC
# Line 1  Line 1 
1  /*  
2   ************************************************************  /*******************************************************
3   *          Copyright 2006 by ACcESS MNRF                   *  *
4   *                                                          *  * Copyright (c) 2003-2010 by University of Queensland
5   *              http://www.access.edu.au                    *  * Earth Systems Science Computational Center (ESSCC)
6   *       Primary Business: Queensland, Australia            *  * http://www.uq.edu.au/esscc
7   *  Licensed under the Open Software License version 3.0    *  *
8   *     http://www.opensource.org/licenses/osl-3.0.php       *  * Primary Business: Queensland, Australia
9   *                                                          *  * Licensed under the Open Software License version 3.0
10   ************************************************************  * http://www.opensource.org/licenses/osl-3.0.php
11  */  *
12    *******************************************************/
13    
14    
15  /**************************************************************/  /**************************************************************/
16    
17  /*   Finley: Mesh: NodeFile */  /*   Dudley: Mesh: NodeFile */
18    
19  /* copies node file in into node file out starting from offset          */  /* copies node file in into node file out starting from offset          */
20  /* the nodes offset to in->numNodes+offset-1 in out will be overwritten */  /* the nodes offset to in->numNodes+offset-1 in out will be overwritten */
# Line 20  Line 22 
22    
23  /**************************************************************/  /**************************************************************/
24    
 /*   Author: gross@access.edu.au */  
 /*   Version: $Id$ */  
   
 /**************************************************************/  
   
25  #include "NodeFile.h"  #include "NodeFile.h"
26    
27  /**************************************************************/  /**************************************************************/
28    
29  void Finley_NodeFile_copyTable(int offset,Finley_NodeFile* out,int idOffset,int dofOffset,Finley_NodeFile* in) {  void Dudley_NodeFile_copyTable(int offset,Dudley_NodeFile* out,int idOffset,int dofOffset,Dudley_NodeFile* in) {
30      int i,n;      int i,n;
31      /* check dimension and file size */      /* check dimension and file size */
32      if (out->numDim!=in->numDim) {      if (out->numDim!=in->numDim) {
33          Finley_setError(TYPE_ERROR,"__FILE__: dimensions of node files don't match");          Dudley_setError(TYPE_ERROR,"Dudley_NodeFile_copyTable: dimensions of node files don't match");
34      }      }
35      if (out->numNodes<in->numNodes+offset) {      if (out->numNodes<in->numNodes+offset) {
36          Finley_setError(MEMORY_ERROR,"__FILE__: node table is too small.");          Dudley_setError(MEMORY_ERROR,"Dudley_NodeFile_copyTable: node table is too small.");
37      }      }
38      if (Finley_noError()) {      if (Dudley_noError()) {
39         #pragma omp parallel for private(i,n) schedule(static)         #pragma omp parallel for private(i,n) schedule(static)
40         for(n=0;n<in->numNodes;n++) {         for(n=0;n<in->numNodes;n++) {
41            out->Id[offset+n]=in->Id[n]+idOffset;            out->Id[offset+n]=in->Id[n]+idOffset;
42            out->Tag[offset+n]=in->Tag[n];            out->Tag[offset+n]=in->Tag[n];
43            out->degreeOfFreedom[offset+n]=in->degreeOfFreedom[n]+dofOffset;            out->globalDegreesOfFreedom[offset+n]=in->globalDegreesOfFreedom[n]+dofOffset;
           out->reducedDegreeOfFreedom[offset+n]=in->reducedDegreeOfFreedom[n]+dofOffset;  
           out->toReduced[offset+n]=in->toReduced[n]+dofOffset;  
44            for(i=0;i<out->numDim;i++) out->Coordinates[INDEX2(i,offset+n,out->numDim)]=in->Coordinates[INDEX2(i,n,in->numDim)];            for(i=0;i<out->numDim;i++) out->Coordinates[INDEX2(i,offset+n,out->numDim)]=in->Coordinates[INDEX2(i,n,in->numDim)];
45         }         }
46      }      }
47  }  }
 /*  
 * $Log$  
 * Revision 1.2  2005/09/15 03:44:23  jgs  
 * Merge of development branch dev-02 back to main trunk on 2005-09-15  
 *  
 * Revision 1.1.1.1.6.1  2005/09/07 06:26:20  gross  
 * the solver from finley are put into the standalone package paso now  
 *  
 * Revision 1.1.1.1  2004/10/26 06:53:57  jgs  
 * initial import of project esys2  
 *  
 * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
 * Initial version of eys using boost-python.  
 *  
 *  
 */  

Legend:
Removed from v.616  
changed lines
  Added in v.3086

  ViewVC Help
Powered by ViewVC 1.1.26