/[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 82 - (show annotations)
Tue Oct 26 06:53:54 2004 UTC (14 years, 11 months ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/NodeFile_copyTable.c
File MIME type: text/plain
File size: 1846 byte(s)
Initial revision

1 /* $Id$ */
2 /**************************************************************/
3
4 /* Finley: Mesh: NodeFile */
5
6 /* copies node file in into node file out starting from offset */
7 /* the nodes offset to in->numNodes+offset-1 in out will be overwritten */
8
9
10 /**************************************************************/
11
12 /* Copyrights by ACcESS Australia 2003/04 */
13 /* Author: gross@access.edu.au */
14 /* Version: $Id$ */
15
16 /**************************************************************/
17
18 #include "Finley.h"
19 #include "NodeFile.h"
20
21 /**************************************************************/
22
23 void Finley_NodeFile_copyTable(int offset,Finley_NodeFile* out,int idOffset,int dofOffset,Finley_NodeFile* in) {
24 int i,n;
25 /* check dimension and file size */
26 if (out->numDim!=in->numDim) {
27 Finley_ErrorCode=TYPE_ERROR;
28 sprintf(Finley_ErrorMsg,"dimensions of node files don't match");
29 }
30 if (out->numNodes<in->numNodes+offset) {
31 Finley_ErrorCode=MEMORY_ERROR;
32 sprintf(Finley_ErrorMsg,"node table is too small.");
33 }
34 if (Finley_ErrorCode==NO_ERROR) {
35 #pragma omp parallel for private(i,n) schedule(static)
36 for(n=0;n<in->numNodes;n++) {
37 out->Id[offset+n]=in->Id[n]+idOffset;
38 out->Tag[offset+n]=in->Tag[n];
39 out->degreeOfFreedom[offset+n]=in->degreeOfFreedom[n]+dofOffset;
40 out->reducedDegreeOfFreedom[offset+n]=in->reducedDegreeOfFreedom[n]+dofOffset;
41 out->toReduced[offset+n]=in->toReduced[n]+dofOffset;
42 for(i=0;i<out->numDim;i++) out->Coordinates[INDEX2(i,offset+n,out->numDim)]=in->Coordinates[INDEX2(i,n,in->numDim)];
43 }
44 }
45 }
46 /*
47 * $Log$
48 * Revision 1.1 2004/10/26 06:53:57 jgs
49 * Initial revision
50 *
51 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
52 * Initial version of eys using boost-python.
53 *
54 *
55 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26