/[escript]/branches/doubleplusgood/paso/src/SharedComponents.h
ViewVC logotype

Contents of /branches/doubleplusgood/paso/src/SharedComponents.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4257 - (show annotations)
Wed Feb 27 03:42:40 2013 UTC (6 years, 9 months ago) by jfenwick
File MIME type: text/plain
File size: 2656 byte(s)
Some simple experiments for c++ Finley

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
19 /* Paso: coupler */
20
21 /************************************************************************************/
22
23 /* Author: Lutz Gross, l.gross@uq.edu.au */
24
25 /************************************************************************************/
26
27 #ifndef INC_PASO_SHAREDCOMPONENTS
28 #define INC_PASO_SHAREDCOMPONENTS
29
30 #include "Common.h"
31 #include "esysUtils/Esys_MPI.h"
32
33 /************************************************************************************/
34
35 typedef struct Paso_SharedComponents {
36
37 dim_t local_length; /* local array length shared */
38
39 dim_t numNeighbors; /* number of processor sharing values with this processor */
40
41 index_t* offsetInShared; /* offsetInSharedInput[i] points to the first input value in array shared
42 for processor i. Has length numNeighbors+1 */
43
44 Esys_MPI_rank* neighbor; /* list of the processor sharing values with this processor */
45
46 index_t* shared; /* list of the (local) components which are shared with other
47 processors. Has length numSharedComponents */
48
49 dim_t numSharedComponents; /* = offsetInShared[numNeighbors] */
50
51 Esys_MPIInfo *mpi_info;
52 dim_t reference_counter;
53
54 } Paso_SharedComponents;
55
56
57
58 PASO_DLL_API
59 Paso_SharedComponents* Paso_SharedComponents_alloc(dim_t local_length,
60 dim_t numNeighbors,
61 Esys_MPI_rank* neighbor,
62 index_t* shared,
63 index_t* offsetInShared,
64 index_t m, index_t b,
65 Esys_MPIInfo *mpi_info);
66
67
68 PASO_DLL_API
69 Paso_SharedComponents* Paso_SharedComponents_getReference(Paso_SharedComponents*);
70
71 PASO_DLL_API
72 void Paso_SharedComponents_free(Paso_SharedComponents*);
73
74 #endif

  ViewVC Help
Powered by ViewVC 1.1.26