1 |
/* |
2 |
************************************************************ |
3 |
* Copyright 2006 by ACcESS MNRF * |
4 |
* * |
5 |
* http://www.access.edu.au * |
6 |
* Primary Business: Queensland, Australia * |
7 |
* Licensed under the Open Software License version 3.0 * |
8 |
* http://www.opensource.org/licenses/osl-3.0.php * |
9 |
* * |
10 |
************************************************************ |
11 |
*/ |
12 |
|
13 |
/**************************************************************/ |
14 |
|
15 |
/* Finley: Mesh: NodeFile */ |
16 |
|
17 |
/* gathers the NodeFile out from the NodeFile in using index[0:out->numNodes-1]. */ |
18 |
/* index has to be between 0 and in->numNodes-1. */ |
19 |
|
20 |
/**************************************************************/ |
21 |
|
22 |
/* Author: gross@access.edu.au */ |
23 |
/* Version: $Id$ */ |
24 |
|
25 |
/**************************************************************/ |
26 |
|
27 |
#include "NodeFile.h" |
28 |
|
29 |
/**************************************************************/ |
30 |
|
31 |
void Finley_NodeFile_gather(int* index, Finley_NodeFile* in, Finley_NodeFile* out) { |
32 |
dim_t i,j; |
33 |
index_t k; |
34 |
if (in->Id!=NULL) { |
35 |
#pragma omp parallel for private(i,j,k) schedule(static) |
36 |
for (i=0;i<out->numNodes;i++) { |
37 |
k=index[i]; |
38 |
#ifdef PASO_MPI |
39 |
out->Dom[i]=in->Dom[k]; |
40 |
#endif |
41 |
out->Id[i]=in->Id[k]; |
42 |
out->Tag[i]=in->Tag[k]; |
43 |
out->degreeOfFreedom[i]=in->degreeOfFreedom[k]; |
44 |
out->reducedDegreeOfFreedom[i]=in->reducedDegreeOfFreedom[k]; |
45 |
out->toReduced[i]=in->toReduced[k]; |
46 |
for(j=0;j<in->numDim;j++) out->Coordinates[INDEX2(j,i,in->numDim)]=in->Coordinates[INDEX2(j,k,in->numDim)]; |
47 |
} |
48 |
} |
49 |
} |
50 |
/* |
51 |
* $Log$ |
52 |
* Revision 1.3 2005/09/15 03:44:23 jgs |
53 |
* Merge of development branch dev-02 back to main trunk on 2005-09-15 |
54 |
* |
55 |
* Revision 1.2.2.1 2005/09/07 06:26:20 gross |
56 |
* the solver from finley are put into the standalone package paso now |
57 |
* |
58 |
* Revision 1.2 2005/07/08 04:07:55 jgs |
59 |
* Merge of development branch back to main trunk on 2005-07-08 |
60 |
* |
61 |
* Revision 1.1.1.1.2.1 2005/06/29 02:34:54 gross |
62 |
* some changes towards 64 integers in finley |
63 |
* |
64 |
* Revision 1.1.1.1 2004/10/26 06:53:57 jgs |
65 |
* initial import of project esys2 |
66 |
* |
67 |
* Revision 1.1.1.1 2004/06/24 04:00:40 johng |
68 |
* Initial version of eys using boost-python. |
69 |
* |
70 |
* |
71 |
*/ |