/[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 471 - (show annotations)
Fri Jan 27 01:33:02 2006 UTC (13 years, 8 months ago) by jgs
File MIME type: text/plain
File size: 3504 byte(s)
reorganise finley src tree to remove inc dir and src/finley directory

1 /*
2 ******************************************************************************
3 * *
4 * COPYRIGHT ACcESS 2003,2004,2005 - All Rights Reserved *
5 * *
6 * This software is the property of ACcESS. No part of this code *
7 * may be copied in any form or by any means without the expressed written *
8 * consent of ACcESS. Copying, use or modification of this software *
9 * by any unauthorised person is illegal unless that person has a software *
10 * license agreement with ACcESS. *
11 * *
12 ******************************************************************************
13 */
14
15 /**************************************************************/
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 /* Author: gross@access.edu.au */
25 /* Version: $Id$ */
26
27 /**************************************************************/
28
29 #include "ElementFile.h"
30
31 /****************************************************************************/
32
33
34 void Finley_ElementFile_copyTable(index_t offset,Finley_ElementFile* out,index_t node_offset, index_t idOffset,Finley_ElementFile* in) {
35 dim_t i,n;
36 dim_t NN=out->ReferenceElement->Type->numNodes;
37 if (in==NULL) return;
38 /* check dimension and file size */
39 if (out->ReferenceElement->Type->TypeId!=in->ReferenceElement->Type->TypeId) {
40 Finley_setError(TYPE_ERROR,"__FILE__: dimensions of element files don't match");
41 }
42 if (out->numElements<in->numElements+offset) {
43 Finley_setError(MEMORY_ERROR,"__FILE__: element table is too small.");
44 }
45 if (Finley_noError()) {
46 #pragma omp parallel for private(i,n) schedule(static)
47 for(n=0;n<in->numElements;n++) {
48 out->Id[offset+n]=in->Id[n]+idOffset;
49 out->Tag[offset+n]=in->Tag[n];
50 out->Color[offset+n]=in->Color[n]+out->maxColor+1;
51 for(i=0;i<NN;i++) out->Nodes[INDEX2(i,offset+n,NN)]=in->Nodes[INDEX2(i,n,in->ReferenceElement->Type->numNodes)]+node_offset;
52 }
53 out->minColor=MIN(out->minColor,in->minColor+out->maxColor+1);
54 out->maxColor=MAX(out->maxColor,in->maxColor+out->maxColor+1);
55 }
56 }
57 /*
58 * $Log$
59 * Revision 1.3 2005/09/15 03:44:22 jgs
60 * Merge of development branch dev-02 back to main trunk on 2005-09-15
61 *
62 * Revision 1.2.2.1 2005/09/07 06:26:18 gross
63 * the solver from finley are put into the standalone package paso now
64 *
65 * Revision 1.2 2005/07/08 04:07:49 jgs
66 * Merge of development branch back to main trunk on 2005-07-08
67 *
68 * Revision 1.1.1.1.2.2 2005/06/30 01:53:55 gross
69 * a bug in coloring fixed
70 *
71 * Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross
72 * some changes towards 64 integers in finley
73 *
74 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
75 * initial import of project esys2
76 *
77 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
78 * Initial version of eys using boost-python.
79 *
80 *
81 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26