/[escript]/branches/domexper/dudley/src/ElementFile_markNodes.c
ViewVC logotype

Contents of /branches/domexper/dudley/src/ElementFile_markNodes.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3145 - (show annotations)
Fri Sep 3 01:25:52 2010 UTC (8 years, 9 months ago) by jfenwick
File MIME type: text/plain
File size: 2219 byte(s)
Removed linearNodes and subElementNodes from ReferenceElementInfo
1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 /**************************************************************/
16
17 /* Dudley: ElementFile */
18
19 /* mark the used nodes with offeset: */
20
21 /**************************************************************/
22
23 #include "ElementFile.h"
24
25 /**************************************************************/
26
27 void Dudley_ElementFile_markNodes(index_t* mask,index_t offset,dim_t numNodes,Dudley_ElementFile* in,bool_t useLinear) {
28 dim_t i,NN,NN2,e;
29 Dudley_ReferenceElement* refElement=NULL;
30
31 if (in!=NULL) {
32 refElement=Dudley_ReferenceElementSet_borrowReferenceElement(in->referenceElementSet, FALSE);
33 NN2=in->numNodes;
34 NN=refElement->numLinearNodes;
35 #pragma omp parallel for private(e,i) schedule(static)
36 for (e=0;e<in->numElements;e++) {
37 for (i=0;i<NN;i++) {
38 mask[in->Nodes[INDEX2(i,e,NN2)]-offset]=1;
39 }
40 }
41 }
42 }
43
44 void Dudley_ElementFile_markDOFsConnectedToRange(index_t* mask,index_t offset,index_t marker,index_t firstDOF,index_t lastDOF,index_t *dofIndex,Dudley_ElementFile*in ,bool_t useLinear)
45 {
46 dim_t i,NN,NN2,e,j;
47 index_t color;
48 Dudley_ReferenceElement* refElement=NULL;
49 register index_t k;
50
51 if (in!=NULL) {
52 refElement=Dudley_ReferenceElementSet_borrowReferenceElement(in->referenceElementSet, FALSE);
53 NN2=in->numNodes;
54 NN=refElement->numLinearNodes;
55 for (color=in->minColor;color<=in->maxColor;color++) {
56 #pragma omp parallel for private(e,i,j,k) schedule(static)
57 for (e=0;e<in->numElements;e++) {
58 if (in->Color[e]==color) {
59 for (i=0;i<NN;i++) {
60 k=dofIndex[in->Nodes[INDEX2(i,e,NN2)]];
61 if ( (firstDOF<=k) && (k<lastDOF) ) {
62 for (j=0;j<NN;j++) mask[dofIndex[in->Nodes[INDEX2(j,e,NN2)]]-offset]=marker;
63 break;
64 }
65 }
66 }
67 }
68 }
69 }
70 }
71

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26