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

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

  ViewVC Help
Powered by ViewVC 1.1.26