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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/esys2/finley/src/finleyC/ElementFile_markNodes.c revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC trunk/finley/src/finleyC/ElementFile_markNodes.c revision 155 by jgs, Wed Nov 9 02:02:19 2005 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
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 */  /*   Finley: ElementFile */
# Line 7  Line 20 
20    
21  /**************************************************************/  /**************************************************************/
22    
23  /*   Copyrights by ACcESS Australia 2003 */  /*  Copyrights by ACcESS Australia 2003,2004,2005 */
24  /*   Author: gross@access.edu.au */  /*  Author: gross@access.edu.au */
25  /*   Version: $Id$ */  /*  Version: $Id$ */
26    
27  /**************************************************************/  /**************************************************************/
28    
 #include "Finley.h"  
29  #include "ElementFile.h"  #include "ElementFile.h"
30    
31  /**************************************************************/  /**************************************************************/
32    
33  void Finley_ElementFile_markNodes(int* mask,int offset,Finley_ElementFile* in,int useLinear) {  void Finley_ElementFile_markNodes(index_t* mask,index_t offset,Finley_ElementFile* in,bool_t useLinear) {
34     int i,NN,NN2,e,color,*lin_node;     dim_t i,NN,NN2,e;
35       index_t color,*lin_node;
36     if (in!=NULL) {     if (in!=NULL) {
37       int id[in->ReferenceElement->Type->numNodes];       index_t id[in->ReferenceElement->Type->numNodes];
38       for (i=0;i<in->ReferenceElement->Type->numNodes;i++) id[i]=i;       for (i=0;i<in->ReferenceElement->Type->numNodes;i++) id[i]=i;
39       if (useLinear) {       if (useLinear) {
40          NN=in->LinearReferenceElement->Type->numNodes;          NN=in->LinearReferenceElement->Type->numNodes;
# Line 31  void Finley_ElementFile_markNodes(int* m Line 44  void Finley_ElementFile_markNodes(int* m
44          lin_node=id;          lin_node=id;
45       }       }
46       NN2=in->ReferenceElement->Type->numNodes;       NN2=in->ReferenceElement->Type->numNodes;
47       #pragma omp parallel private(color)       if ((in->maxColor-in->minColor+1)*NN<in->numElements) {
48       {          #pragma omp parallel private(color)
49          for (color=0;color<in->numColors;color++) {          {
50            #pragma omp for private(e,i) schedule(static)             for (color=in->minColor;color<=in->maxColor;color++) {
51            for (e=0;e<in->numElements;e++) {               #pragma omp for private(e,i) schedule(static)
52              if (in->Color[e]==color) {               for (e=0;e<in->numElements;e++) {
53                 for (i=0;i<NN;i++) mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;                 if (in->Color[e]==color) {
54              }                    for (i=0;i<NN;i++) mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
55            }                 }
56                 }
57               }
58               #pragma omp barrier
59          }          }
60          #pragma omp barrier        } else {
61       }          #pragma omp parallel for private(e,i) schedule(static)
62            for (e=0;e<in->numElements;e++) {
63               for (i=0;i<NN;i++) mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
64            }
65          }
66     }     }
67  }  }
68  /*  /*
69  * $Log$  * $Log$
70  * Revision 1.1  2004/10/26 06:53:57  jgs  * Revision 1.4  2005/09/15 03:44:22  jgs
71  * Initial revision  * 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  * Revision 1.1.1.1  2004/06/24 04:00:40  johng
92  * Initial version of eys using boost-python.  * Initial version of eys using boost-python.

Legend:
Removed from v.82  
changed lines
  Added in v.155

  ViewVC Help
Powered by ViewVC 1.1.26