/[escript]/branches/RW_WIN32/finley/src/finleyC/ElementFile_markNodes.c
ViewVC logotype

Contents of /branches/RW_WIN32/finley/src/finleyC/ElementFile_markNodes.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 210 - (show annotations)
Wed Nov 23 09:54:02 2005 UTC (14 years, 11 months ago) by robwdcock
File MIME type: text/plain
File size: 3603 byte(s)
PARTIAL WIN32 BUILD SYSTEM AND PORT
+ All libraries now build under new build system. No unit test routines yet
+ Reversed some incorrect refactorings in Bruce.cpp

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 /* mark the used nodes with offeset: */
20
21 /**************************************************************/
22
23 /* Copyrights by ACcESS Australia 2003,2004,2005 */
24 /* Author: gross@access.edu.au */
25 /* Version: $Id$ */
26
27 /**************************************************************/
28
29 #include "ElementFile.h"
30
31 /**************************************************************/
32
33 void Finley_ElementFile_markNodes(index_t* mask,index_t offset,Finley_ElementFile* in,bool_t useLinear) {
34 dim_t i,NN,NN2,e;
35 index_t color,*lin_node;
36 if (in!=NULL) {
37 index_t *id = (in->ReferenceElement->Type->numNodes>0) ? TMPMEMALLOC(in->ReferenceElement->Type->numNodes,index_t) : (index_t*)NULL;
38
39 for (i=0;i<in->ReferenceElement->Type->numNodes;i++) id[i]=i;
40 if (useLinear) {
41 NN=in->LinearReferenceElement->Type->numNodes;
42 lin_node=in->ReferenceElement->Type->linearNodes;
43 } else {
44 NN=in->ReferenceElement->Type->numNodes;
45 lin_node=id;
46 }
47 NN2=in->ReferenceElement->Type->numNodes;
48 if ((in->maxColor-in->minColor+1)*NN<in->numElements) {
49 #pragma omp parallel private(color)
50 {
51 for (color=in->minColor;color<=in->maxColor;color++) {
52 #pragma omp for private(e,i) schedule(static)
53 for (e=0;e<in->numElements;e++) {
54 if (in->Color[e]==color) {
55 for (i=0;i<NN;i++) mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
56 }
57 }
58 }
59 #pragma omp barrier
60 }
61 } else {
62 #pragma omp parallel for private(e,i) schedule(static)
63 for (e=0;e<in->numElements;e++) {
64 for (i=0;i<NN;i++) mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
65 }
66 }
67 TMPMEMFREE(id);
68 }
69 }
70 /*
71 * $Log$
72 * Revision 1.4 2005/09/15 03:44:22 jgs
73 * Merge of development branch dev-02 back to main trunk on 2005-09-15
74 *
75 * Revision 1.3.2.1 2005/09/07 06:26:18 gross
76 * the solver from finley are put into the standalone package paso now
77 *
78 * Revision 1.3 2005/07/22 03:53:08 jgs
79 * Merge of development branch back to main trunk on 2005-07-22
80 *
81 * Revision 1.2 2005/07/08 04:07:50 jgs
82 * Merge of development branch back to main trunk on 2005-07-08
83 *
84 * Revision 1.1.1.1.2.2 2005/07/18 10:34:54 gross
85 * some informance improvements when reading meshes
86 *
87 * Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross
88 * some changes towards 64 integers in finley
89 *
90 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
91 * initial import of project esys2
92 *
93 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
94 * Initial version of eys using boost-python.
95 *
96 *
97 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26