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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 /*
2 ************************************************************
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 */
12
13 /**************************************************************/
14
15 /* Finley: ElementFile */
16
17 /* copies element file in into element file out starting from offset */
18 /* the elements offset to in->numElements+offset-1 in out will be overwritten */
19
20 /**************************************************************/
21
22 /* Author: gross@access.edu.au */
23 /* Version: $Id$ */
24
25 /**************************************************************/
26
27 #include "ElementFile.h"
28
29 /****************************************************************************/
30
31
32 void Finley_ElementFile_copyTable(index_t offset,Finley_ElementFile* out,index_t node_offset, index_t idOffset,Finley_ElementFile* in) {
33 dim_t i,n;
34 dim_t NN=out->ReferenceElement->Type->numNodes;
35 if (in==NULL) return;
36 /* check dimension and file size */
37 if (out->ReferenceElement->Type->TypeId!=in->ReferenceElement->Type->TypeId) {
38 Finley_setError(TYPE_ERROR,"__FILE__: dimensions of element files don't match");
39 }
40 if (out->numElements<in->numElements+offset) {
41 Finley_setError(MEMORY_ERROR,"__FILE__: element table is too small.");
42 }
43 if (Finley_noError()) {
44 #pragma omp parallel for private(i,n) schedule(static)
45 for(n=0;n<in->numElements;n++) {
46 out->Id[offset+n]=in->Id[n]+idOffset;
47 out->Tag[offset+n]=in->Tag[n];
48 out->Color[offset+n]=in->Color[n]+out->maxColor+1;
49 for(i=0;i<NN;i++) out->Nodes[INDEX2(i,offset+n,NN)]=in->Nodes[INDEX2(i,n,in->ReferenceElement->Type->numNodes)]+node_offset;
50 }
51 out->minColor=MIN(out->minColor,in->minColor+out->maxColor+1);
52 out->maxColor=MAX(out->maxColor,in->maxColor+out->maxColor+1);
53 }
54 }
55 /*
56 * $Log$
57 * Revision 1.3 2005/09/15 03:44:22 jgs
58 * Merge of development branch dev-02 back to main trunk on 2005-09-15
59 *
60 * Revision 1.2.2.1 2005/09/07 06:26:18 gross
61 * the solver from finley are put into the standalone package paso now
62 *
63 * Revision 1.2 2005/07/08 04:07:49 jgs
64 * Merge of development branch back to main trunk on 2005-07-08
65 *
66 * Revision 1.1.1.1.2.2 2005/06/30 01:53:55 gross
67 * a bug in coloring fixed
68 *
69 * Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross
70 * some changes towards 64 integers in finley
71 *
72 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
73 * initial import of project esys2
74 *
75 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
76 * Initial version of eys using boost-python.
77 *
78 *
79 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26