/[escript]/trunk/dudley/src/ElementFile_markNodes.cpp
ViewVC logotype

Contents of /trunk/dudley/src/ElementFile_markNodes.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4346 - (show annotations)
Tue Apr 2 04:46:45 2013 UTC (6 years, 4 months ago) by jfenwick
File size: 2094 byte(s)
Bringing the changes from doubleplusgood branch.
Can't merge directly because svn doesn't transfer changes to renamed files (mutter grumble).
1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15
16 /************************************************************************************/
17
18 /* Dudley: ElementFile */
19
20 /* mark the used nodes with offset: */
21
22 /************************************************************************************/
23
24 #include "ElementFile.h"
25
26 /************************************************************************************/
27
28 void Dudley_ElementFile_markNodes(index_t * mask, index_t offset, dim_t numNodes, Dudley_ElementFile * in,
29 bool_t useLinear)
30 {
31 dim_t i, NN, e;
32 if (in != NULL)
33 {
34 NN = in->numNodes;
35 #pragma omp parallel for private(e,i) schedule(static)
36 for (e = 0; e < in->numElements; e++)
37 {
38 for (i = 0; i < NN; i++)
39 {
40 mask[in->Nodes[INDEX2(i, e, NN)] - offset] = 1;
41 }
42 }
43 }
44 }
45
46 void Dudley_ElementFile_markDOFsConnectedToRange(index_t * mask, index_t offset, index_t marker, index_t firstDOF,
47 index_t lastDOF, index_t * dofIndex, Dudley_ElementFile * in,
48 bool_t useLinear)
49 {
50 dim_t i, NN, e, j;
51 index_t color;
52 register index_t k;
53
54 if (in != NULL)
55 {
56 NN = in->numNodes;
57 for (color = in->minColor; color <= in->maxColor; color++)
58 {
59 #pragma omp parallel for private(e,i,j,k) schedule(static)
60 for (e = 0; e < in->numElements; e++)
61 {
62 if (in->Color[e] == color)
63 {
64 for (i = 0; i < NN; i++)
65 {
66 k = dofIndex[in->Nodes[INDEX2(i, e, NN)]];
67 if ((firstDOF <= k) && (k < lastDOF))
68 {
69 for (j = 0; j < NN; j++)
70 mask[dofIndex[in->Nodes[INDEX2(j, e, NN)]] - offset] = marker;
71 break;
72 }
73 }
74 }
75 }
76 }
77 }
78 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/lapack2681/finley/src/ElementFile_markNodes.cpp:2682-2741 /branches/pasowrap/dudley/src/ElementFile_markNodes.cpp:3661-3674 /branches/py3_attempt2/dudley/src/ElementFile_markNodes.cpp:3871-3891 /branches/restext/finley/src/ElementFile_markNodes.cpp:2610-2624 /branches/ripleygmg_from_3668/dudley/src/ElementFile_markNodes.cpp:3669-3791 /branches/stage3.0/finley/src/ElementFile_markNodes.cpp:2569-2590 /branches/symbolic_from_3470/dudley/src/ElementFile_markNodes.cpp:3471-3974 /branches/symbolic_from_3470/ripley/test/python/dudley/src/ElementFile_markNodes.cpp:3517-3974 /release/3.0/finley/src/ElementFile_markNodes.cpp:2591-2601 /trunk/dudley/src/ElementFile_markNodes.cpp:4257-4344 /trunk/ripley/test/python/dudley/src/ElementFile_markNodes.cpp:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26