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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 730 - (show annotations)
Mon May 15 04:03:49 2006 UTC (13 years, 3 months ago) by bcumming
File MIME type: text/plain
File size: 3212 byte(s)


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26