00001 /* 00002 exchange.h 00003 Igor Terentyev. 00004 ******************************************************************************** 00005 Function to compute allocated and exchange domains' coordinates. 00006 Domains are declared, not allocated. 00007 */ 00008 /*============================================================================*/ 00009 00010 #ifndef __EXCHANGE_H_ 00011 #define __EXCHANGE_H_ 00012 /*----------------------------------------------------------------------------*/ 00013 00014 #include "utils.h" 00015 #include "stencil.h" 00016 #include "rdomain.h" 00017 00018 /*----------------------------------------------------------------------------*/ 00019 /* 00020 Computes allocated and receive areas' global coordinates. 00021 Number of receive areas is given by ex_rcvn(...) function. 00022 Allocated area is a minimum cube containing the union of the computational 00023 and receive areas. 00024 In case the computational area is empty, all receive areas will be empty and 00025 allocated area will be as usual (I did it this way because it is useful 00026 to compute arrays that are not exchanged, e.g. density, bulk modulus). 00027 00028 int iarr : array number. 00029 STENCIL *sten : stencil pointer. 00030 RDOM *dom : input domain (declared/allocated memory). 00031 IPNT a_gs, a_ge : allocated domain global indices. 00032 IPNT r_gs[], r_ge[] : receive domains' global indices. 00033 00034 int return : error code. 00035 */ 00036 int ex_compute(int iarr, STENCIL *sten, RDOM *dom, 00037 IPNT a_gs, IPNT a_ge, IPNT r_gs[], IPNT r_ge[], 00038 int frcvempty[], FILE * stream); 00039 /*----------------------------------------------------------------------------*/ 00040 00041 #endif /*__EXCHANGE_H_*/