/[escript]/branches/trilinos_from_5897/dudley/src/ElementFile_copyTable.cpp
ViewVC logotype

Annotation of /branches/trilinos_from_5897/dudley/src/ElementFile_copyTable.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2548 - (hide annotations)
Mon Jul 20 06:20:06 2009 UTC (9 years, 10 months ago) by jfenwick
Original Path: trunk/finley/src/ElementFile_copyTable.c
File MIME type: text/plain
File size: 2028 byte(s)
Updating copyright notices
1 jgs 150
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4 jfenwick 2548 * Copyright (c) 2003-2009 by University of Queensland
5 ksteube 1811 * 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: ElementFile */
18    
19     /* copies element file in into element file out starting from offset */
20     /* the elements offset to in->numElements+offset-1 in out will be overwritten */
21    
22     /**************************************************************/
23    
24     #include "ElementFile.h"
25    
26     /****************************************************************************/
27    
28    
29 jgs 123 void Finley_ElementFile_copyTable(index_t offset,Finley_ElementFile* out,index_t node_offset, index_t idOffset,Finley_ElementFile* in) {
30     dim_t i,n;
31 ksteube 1312 dim_t NN=out->numNodes;
32 jgs 82 if (in==NULL) return;
33     if (out->ReferenceElement->Type->TypeId!=in->ReferenceElement->Type->TypeId) {
34 gross 964 Finley_setError(TYPE_ERROR,"Finley_ElementFile_copyTable: dimensions of element files don't match");
35 jgs 82 }
36 ksteube 1312 if (out->MPIInfo->comm!=in->MPIInfo->comm) {
37     Finley_setError(TYPE_ERROR,"Finley_ElementFile_copyTable: MPI communicators of element files don't match");
38 jgs 82 }
39 jgs 150 if (Finley_noError()) {
40 jgs 82 #pragma omp parallel for private(i,n) schedule(static)
41     for(n=0;n<in->numElements;n++) {
42 ksteube 1312 out->Owner[offset+n]=out->Owner[n];
43 jgs 82 out->Id[offset+n]=in->Id[n]+idOffset;
44     out->Tag[offset+n]=in->Tag[n];
45     for(i=0;i<NN;i++) out->Nodes[INDEX2(i,offset+n,NN)]=in->Nodes[INDEX2(i,n,in->ReferenceElement->Type->numNodes)]+node_offset;
46     }
47     }
48     }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26