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

Contents of /branches/trilinos_from_5897/dudley/src/ElementFile_copyTable.cpp

Parent Directory Parent Directory | Revision Log Revision Log


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

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 by The 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 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 /*****************************************************************************
18
19 Dudley: ElementFile
20
21 copies element file in into element file out starting from offset
22 the elements offset to in->numElements+offset-1 in out will be overwritten
23
24 *****************************************************************************/
25
26 #include "ElementFile.h"
27
28 namespace dudley {
29
30 void Dudley_ElementFile_copyTable(index_t offset, Dudley_ElementFile* out,
31 index_t node_offset, index_t idOffset, Dudley_ElementFile* in)
32 {
33 dim_t i, n;
34 dim_t NN, NN_in;
35 if (in == NULL)
36 return;
37 NN = out->numNodes;
38 NN_in = in->numNodes;
39 if (NN_in > NN)
40 {
41 throw DudleyException("Dudley_ElementFile_copyTable: dimensions of element files don't match.");
42 }
43 if (out->MPIInfo->comm != in->MPIInfo->comm)
44 {
45 throw DudleyException("Dudley_ElementFile_copyTable: MPI communicators of element files don't match.");
46 }
47
48 #pragma omp parallel for private(i,n) schedule(static)
49 for (n = 0; n < in->numElements; n++)
50 {
51 out->Owner[offset + n] = out->Owner[n];
52 out->Id[offset + n] = in->Id[n] + idOffset;
53 out->Tag[offset + n] = in->Tag[n];
54 for (i = 0; i < NN; i++)
55 out->Nodes[INDEX2(i, offset + n, NN)] = in->Nodes[INDEX2(i, n, NN_in)] + node_offset;
56 }
57 }
58
59 } // namespace dudley
60

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26