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

Contents of /trunk/finley/src/NodeFile_copyTable.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1312 - (show annotations)
Mon Sep 24 06:18:44 2007 UTC (11 years, 11 months ago) by ksteube
File MIME type: text/plain
File size: 1748 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

1
2 /* $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: Mesh: NodeFile */
19
20 /* copies node file in into node file out starting from offset */
21 /* the nodes offset to in->numNodes+offset-1 in out will be overwritten */
22
23
24 /**************************************************************/
25
26 #include "NodeFile.h"
27
28 /**************************************************************/
29
30 void Finley_NodeFile_copyTable(int offset,Finley_NodeFile* out,int idOffset,int dofOffset,Finley_NodeFile* in) {
31 int i,n;
32 /* check dimension and file size */
33 if (out->numDim!=in->numDim) {
34 Finley_setError(TYPE_ERROR,"Finley_NodeFile_copyTable: dimensions of node files don't match");
35 }
36 if (out->numNodes<in->numNodes+offset) {
37 Finley_setError(MEMORY_ERROR,"Finley_NodeFile_copyTable: node table is too small.");
38 }
39 if (Finley_noError()) {
40 #pragma omp parallel for private(i,n) schedule(static)
41 for(n=0;n<in->numNodes;n++) {
42 out->Id[offset+n]=in->Id[n]+idOffset;
43 out->Tag[offset+n]=in->Tag[n];
44 out->globalDegreesOfFreedom[offset+n]=in->globalDegreesOfFreedom[n]+dofOffset;
45 for(i=0;i<out->numDim;i++) out->Coordinates[INDEX2(i,offset+n,out->numDim)]=in->Coordinates[INDEX2(i,n,in->numDim)];
46 }
47 }
48 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26