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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (hide annotations)
Thu Sep 25 23:11:13 2008 UTC (11 years, 2 months ago) by ksteube
Original Path: trunk/finley/src/NodeFile_copyTable.c
File MIME type: text/plain
File size: 1713 byte(s)
Copyright updated in all files

1 jgs 150
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4     * Copyright (c) 2003-2008 by University of Queensland
5     * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * 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 ksteube 1312
14 ksteube 1811
15 jgs 82 /**************************************************************/
16    
17     /* Finley: Mesh: NodeFile */
18    
19     /* 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 */
21    
22    
23     /**************************************************************/
24    
25     #include "NodeFile.h"
26    
27     /**************************************************************/
28    
29     void Finley_NodeFile_copyTable(int offset,Finley_NodeFile* out,int idOffset,int dofOffset,Finley_NodeFile* in) {
30     int i,n;
31     /* check dimension and file size */
32     if (out->numDim!=in->numDim) {
33 ksteube 1312 Finley_setError(TYPE_ERROR,"Finley_NodeFile_copyTable: dimensions of node files don't match");
34 jgs 82 }
35     if (out->numNodes<in->numNodes+offset) {
36 ksteube 1312 Finley_setError(MEMORY_ERROR,"Finley_NodeFile_copyTable: node table is too small.");
37 jgs 82 }
38 jgs 150 if (Finley_noError()) {
39 jgs 82 #pragma omp parallel for private(i,n) schedule(static)
40     for(n=0;n<in->numNodes;n++) {
41     out->Id[offset+n]=in->Id[n]+idOffset;
42     out->Tag[offset+n]=in->Tag[n];
43 ksteube 1312 out->globalDegreesOfFreedom[offset+n]=in->globalDegreesOfFreedom[n]+dofOffset;
44 jgs 82 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     }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26