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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 155 - (hide annotations)
Wed Nov 9 02:02:19 2005 UTC (13 years, 9 months ago) by jgs
Original Path: trunk/finley/src/finleyC/ElementFile_copyTable.c
File MIME type: text/plain
File size: 3504 byte(s)
move all directories from trunk/esys2 into trunk and remove esys2

1 jgs 150 /*
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 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 jgs 150 /* Author: gross@access.edu.au */
25     /* Version: $Id$ */
26 jgs 82
27     /**************************************************************/
28    
29     #include "ElementFile.h"
30    
31     /****************************************************************************/
32    
33    
34 jgs 123 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 jgs 82 if (in==NULL) return;
38     /* check dimension and file size */
39     if (out->ReferenceElement->Type->TypeId!=in->ReferenceElement->Type->TypeId) {
40 jgs 150 Finley_setError(TYPE_ERROR,"__FILE__: dimensions of element files don't match");
41 jgs 82 }
42     if (out->numElements<in->numElements+offset) {
43 jgs 150 Finley_setError(MEMORY_ERROR,"__FILE__: element table is too small.");
44 jgs 82 }
45 jgs 150 if (Finley_noError()) {
46 jgs 82 #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 jgs 123 out->Color[offset+n]=in->Color[n]+out->maxColor+1;
51 jgs 82 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 jgs 123 out->minColor=MIN(out->minColor,in->minColor+out->maxColor+1);
54     out->maxColor=MAX(out->maxColor,in->maxColor+out->maxColor+1);
55 jgs 82 }
56     }
57     /*
58     * $Log$
59 jgs 150 * 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 jgs 123 * Revision 1.2 2005/07/08 04:07:49 jgs
66     * Merge of development branch back to main trunk on 2005-07-08
67 jgs 82 *
68 jgs 123 * 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 jgs 82 * 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