/[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 126 - (show annotations)
Fri Jul 22 03:53:08 2005 UTC (14 years, 1 month ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/ElementFile_markNodes.c
File MIME type: text/plain
File size: 2404 byte(s)
Merge of development branch back to main trunk on 2005-07-22

1 /* $Id$ */
2 /**************************************************************/
3
4 /* Finley: ElementFile */
5
6 /* mark the used nodes with offeset: */
7
8 /**************************************************************/
9
10 /* Copyrights by ACcESS Australia 2003 */
11 /* Author: gross@access.edu.au */
12 /* Version: $Id$ */
13
14 /**************************************************************/
15
16 #include "Finley.h"
17 #include "ElementFile.h"
18
19 /**************************************************************/
20
21 void Finley_ElementFile_markNodes(index_t* mask,index_t offset,Finley_ElementFile* in,bool_t useLinear) {
22 dim_t i,NN,NN2,e;
23 index_t color,*lin_node;
24 if (in!=NULL) {
25 index_t id[in->ReferenceElement->Type->numNodes];
26 for (i=0;i<in->ReferenceElement->Type->numNodes;i++) id[i]=i;
27 if (useLinear) {
28 NN=in->LinearReferenceElement->Type->numNodes;
29 lin_node=in->ReferenceElement->Type->linearNodes;
30 } else {
31 NN=in->ReferenceElement->Type->numNodes;
32 lin_node=id;
33 }
34 NN2=in->ReferenceElement->Type->numNodes;
35 if ((in->maxColor-in->minColor+1)*NN<in->numElements) {
36 #pragma omp parallel private(color)
37 {
38 for (color=in->minColor;color<=in->maxColor;color++) {
39 #pragma omp for private(e,i) schedule(static)
40 for (e=0;e<in->numElements;e++) {
41 if (in->Color[e]==color) {
42 for (i=0;i<NN;i++) mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
43 }
44 }
45 }
46 #pragma omp barrier
47 }
48 } else {
49 #pragma omp parallel for private(e,i) schedule(static)
50 for (e=0;e<in->numElements;e++) {
51 for (i=0;i<NN;i++) mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
52 }
53 }
54 }
55 }
56 /*
57 * $Log$
58 * Revision 1.3 2005/07/22 03:53:08 jgs
59 * Merge of development branch back to main trunk on 2005-07-22
60 *
61 * Revision 1.2 2005/07/08 04:07:50 jgs
62 * Merge of development branch back to main trunk on 2005-07-08
63 *
64 * Revision 1.1.1.1.2.2 2005/07/18 10:34:54 gross
65 * some informance improvements when reading meshes
66 *
67 * Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross
68 * some changes towards 64 integers in finley
69 *
70 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
71 * initial import of project esys2
72 *
73 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
74 * Initial version of eys using boost-python.
75 *
76 *
77 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26