/[escript]/branches/trilinos_from_5897/dudley/src/ElementFile_gather.cpp
ViewVC logotype

Annotation of /branches/trilinos_from_5897/dudley/src/ElementFile_gather.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6009 - (hide annotations)
Wed Mar 2 04:13:26 2016 UTC (3 years, 2 months ago) by caltinay
File size: 1930 byte(s)
Much needed sync with trunk...

1 jgs 150
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 5863 * Copyright (c) 2003-2016 by The University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
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 jfenwick 4345 * Development until 2012 by Earth Systems Science Computational Center (SUCCESS)
12 jfenwick 4657 * Development 2012-2013 by School of Earth Sciences
13     * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 jfenwick 3981 *
15     *****************************************************************************/
16 ksteube 1312
17 caltinay 6009 /****************************************************************************/
18 jgs 82
19 jfenwick 4345 /* Dudley: Element File */
20 jgs 82
21 jfenwick 4345 /* gathers the Element File out from the Element File in using index[0:out->elements-1]. */
22     /* index has to be between 0 and in->elements-1. */
23     /* a conservative assumption on the coloring is made */
24 jgs 82
25 caltinay 6009 /****************************************************************************/
26 jgs 82
27     #include "ElementFile.h"
28    
29 caltinay 6009 namespace dudley {
30 jgs 82
31 caltinay 6009 void Dudley_ElementFile_gather(index_t* index, Dudley_ElementFile* in, Dudley_ElementFile* out)
32 jfenwick 3224 {
33     index_t k;
34     dim_t e, j;
35     dim_t NN_in = in->numNodes;
36     dim_t NN_out = out->numNodes;
37     if (in != NULL)
38     {
39     #pragma omp parallel for private(e,k,j) schedule(static)
40 caltinay 6009 for (e = 0; e < out->numElements; e++)
41     {
42     k = index[e];
43     out->Id[e] = in->Id[k];
44     out->Tag[e] = in->Tag[k];
45     out->Owner[e] = in->Owner[k];
46     out->Color[e] = in->Color[k] + out->maxColor + 1;
47     for (j = 0; j < std::min(NN_out, NN_in); j++)
48     out->Nodes[INDEX2(j, e, NN_out)] = in->Nodes[INDEX2(j, k, NN_in)];
49     }
50     out->minColor = std::min(out->minColor, in->minColor + out->maxColor + 1);
51     out->maxColor = std::max(out->maxColor, in->maxColor + out->maxColor + 1);
52 jfenwick 3224 }
53 jgs 82 }
54 caltinay 6009
55     } // namespace dudley
56    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26