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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 616 - (hide annotations)
Wed Mar 22 02:46:56 2006 UTC (13 years, 10 months ago) by elspeth
File MIME type: text/plain
File size: 2530 byte(s)
Copyright added to more source files.

1 jgs 150 /*
2 elspeth 616 ************************************************************
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 jgs 150 */
12    
13 jgs 82 /**************************************************************/
14    
15     /* Finley: Mesh: NodeFile */
16    
17     /* copies node file in into node file out starting from offset */
18     /* the nodes offset to in->numNodes+offset-1 in out will be overwritten */
19    
20    
21     /**************************************************************/
22    
23     /* Author: gross@access.edu.au */
24     /* Version: $Id$ */
25    
26     /**************************************************************/
27    
28     #include "NodeFile.h"
29    
30     /**************************************************************/
31    
32     void Finley_NodeFile_copyTable(int offset,Finley_NodeFile* out,int idOffset,int dofOffset,Finley_NodeFile* in) {
33     int i,n;
34     /* check dimension and file size */
35     if (out->numDim!=in->numDim) {
36 jgs 150 Finley_setError(TYPE_ERROR,"__FILE__: dimensions of node files don't match");
37 jgs 82 }
38     if (out->numNodes<in->numNodes+offset) {
39 jgs 150 Finley_setError(MEMORY_ERROR,"__FILE__: node table is too small.");
40 jgs 82 }
41 jgs 150 if (Finley_noError()) {
42 jgs 82 #pragma omp parallel for private(i,n) schedule(static)
43     for(n=0;n<in->numNodes;n++) {
44     out->Id[offset+n]=in->Id[n]+idOffset;
45     out->Tag[offset+n]=in->Tag[n];
46     out->degreeOfFreedom[offset+n]=in->degreeOfFreedom[n]+dofOffset;
47     out->reducedDegreeOfFreedom[offset+n]=in->reducedDegreeOfFreedom[n]+dofOffset;
48     out->toReduced[offset+n]=in->toReduced[n]+dofOffset;
49     for(i=0;i<out->numDim;i++) out->Coordinates[INDEX2(i,offset+n,out->numDim)]=in->Coordinates[INDEX2(i,n,in->numDim)];
50     }
51     }
52     }
53     /*
54     * $Log$
55 jgs 150 * Revision 1.2 2005/09/15 03:44:23 jgs
56     * Merge of development branch dev-02 back to main trunk on 2005-09-15
57 jgs 82 *
58 jgs 150 * Revision 1.1.1.1.6.1 2005/09/07 06:26:20 gross
59     * the solver from finley are put into the standalone package paso now
60     *
61     * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
62     * initial import of project esys2
63     *
64 jgs 82 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
65     * Initial version of eys using boost-python.
66     *
67     *
68     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26