ESYS13
Revision_
|
00001 00002 /******************************************************* 00003 * 00004 * Copyright (c) 2003-2012 by University of Queensland 00005 * Earth Systems Science Computational Center (ESSCC) 00006 * http://www.uq.edu.au/esscc 00007 * 00008 * Primary Business: Queensland, Australia 00009 * Licensed under the Open Software License version 3.0 00010 * http://www.opensource.org/licenses/osl-3.0.php 00011 * 00012 *******************************************************/ 00013 00014 00015 /**************************************************************/ 00016 00017 /* Paso: coupler */ 00018 00019 /**************************************************************/ 00020 00021 /* Author: Lutz Gross, l.gross@uq.edu.au */ 00022 00023 /**************************************************************/ 00024 00025 #ifndef INC_PASO_SHAREDCOMPONENTS 00026 #define INC_PASO_SHAREDCOMPONENTS 00027 00028 #include "Common.h" 00029 #include "esysUtils/Esys_MPI.h" 00030 00031 /**************************************************************/ 00032 00033 typedef struct Paso_SharedComponents { 00034 00035 dim_t local_length; /* local array length shared */ 00036 00037 dim_t numNeighbors; /* number of processor sharing values with this processor */ 00038 00039 index_t* offsetInShared; /* offsetInSharedInput[i] points to the first input value in array shared 00040 for processor i. Has length numNeighbors+1 */ 00041 00042 Esys_MPI_rank* neighbor; /* list of the processor sharing values with this processor */ 00043 00044 index_t* shared; /* list of the (local) components which are shared with other 00045 processors. Has length numSharedComponents */ 00046 00047 dim_t numSharedComponents; /* = offsetInShared[numNeighbors] */ 00048 00049 Esys_MPIInfo *mpi_info; 00050 dim_t reference_counter; 00051 00052 } Paso_SharedComponents; 00053 00054 00055 00056 PASO_DLL_API 00057 Paso_SharedComponents* Paso_SharedComponents_alloc(dim_t local_length, 00058 dim_t numNeighbors, 00059 Esys_MPI_rank* neighbor, 00060 index_t* shared, 00061 index_t* offsetInShared, 00062 index_t m, index_t b, 00063 Esys_MPIInfo *mpi_info); 00064 00065 00066 PASO_DLL_API 00067 Paso_SharedComponents* Paso_SharedComponents_getReference(Paso_SharedComponents*); 00068 00069 PASO_DLL_API 00070 void Paso_SharedComponents_free(Paso_SharedComponents*); 00071 00072 #endif