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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4348 - (show annotations)
Tue Apr 2 07:15:43 2013 UTC (6 years ago) by caltinay
File size: 2234 byte(s)
Reapply some of the spelling fixes that got lost....

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 * scatter the ElementFile in into the ElementFile out using index[0:out->numElements-1].
21 * index has to be between 0 and in->numElements-1.
22 * a conservative assumption on the coloring is made
23 *
24 ************************************************************************************/
25
26 #include "ElementFile.h"
27
28 /************************************************************************************/
29
30 void Dudley_ElementFile_scatter(index_t * index, Dudley_ElementFile * in, Dudley_ElementFile * out)
31 {
32 index_t k;
33 dim_t e, j;
34 if (in != NULL)
35 {
36 dim_t NN_in = in->numNodes;
37 dim_t NN_out = out->numNodes;
38 /*OMP */
39 #pragma omp parallel for private(e,k,j) schedule(static)
40 for (e = 0; e < in->numElements; e++)
41 {
42 k = index[e];
43 out->Owner[k] = in->Owner[e];
44 out->Id[k] = in->Id[e];
45 out->Tag[k] = in->Tag[e];
46 out->Color[k] = in->Color[e] + out->maxColor + 1;
47 for (j = 0; j < MIN(NN_out, NN_in); j++)
48 out->Nodes[INDEX2(j, k, NN_out)] = in->Nodes[INDEX2(j, e, NN_in)];
49 }
50 out->minColor = MIN(out->minColor, in->minColor + out->maxColor + 1);
51 out->maxColor = MAX(out->maxColor, in->maxColor + out->maxColor + 1);
52 }
53 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26