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

Contents of /trunk-mpi-branch/finley/src/ElementFile_markNodes.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1223 - (show annotations)
Fri Aug 3 02:40:39 2007 UTC (12 years, 10 months ago) by gross
File MIME type: text/plain
File size: 1933 byte(s)
first attemt towards an improved MPI version.  

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,*id=NULL;
34 if (in!=NULL) {
35 id=TMPMEMALLOC(in->ReferenceElement->Type->numNodes, index_t);
36 if (! Finley_checkPtr(id) ){
37 for (i=0;i<in->ReferenceElement->Type->numNodes;i++) id[i]=i;
38 if (useLinear) {
39 NN=in->LinearReferenceElement->Type->numNodes;
40 lin_node=in->ReferenceElement->Type->linearNodes;
41 } else {
42 NN=in->ReferenceElement->Type->numNodes;
43 lin_node=id;
44 }
45 NN2=in->numNodes;
46 #pragma omp parallel for private(e,i) schedule(static)
47 for (e=0;e<in->numElements;e++) {
48 for (i=0;i<NN;i++) {
49 mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
50 }
51 }
52 TMPMEMFREE(id);
53 }
54 }
55 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26