[ANSYS, Inc. Logo] return to home search
next up previous contents index

7.5.9 Macros for Exchanging Data Between Compute Nodes

EXCHANGE_SVAR_MESSAGE and EXCHANGE_SVAR_FACE_MESSAGE can be used to exchange storage variables ( SV_...) between compute nodes. EXCHANGE_SVAR_MESSAGE exchanges cell data between compute nodes, while EXCHANGE_SVAR_FACE_MESSAGE exchanges face data. Note that compute nodes are `virtually' synchronized when an EXCHANGE macro is used; receiving compute nodes wait for data to be sent, before continuing.

/*  Compute Node Exchange Macros   */

EXCHANGE_SVAR_FACE_MESSAGE(domain, (SV_P, SV_NULL));
EXCHANGE_SVAR_MESSAGE(domain, (SV_P, SV_NULL));

EXCHANGE_SVAR_FACE_MESSAGE() is rarely needed in UDFs. You can exchange multiple storage variables between compute nodes. Storage variable names are separated by commas in the argument list and the list is ended by SV_NULL. For example, EXCHANGE_SVAR_MESSAGE(domain, (SV_P, SV_T, SV_NULL)) is used to exchange cell pressure and temperature variables. You can determine a storage variable name from the header file that contains the variable's definition statement. For example, suppose you want to exchange the cell pressure ( C_P) with an adjacent compute node. You can look at the header file that contains the definition of C_P (mem.h) and determine that the storage variable for cell pressure is SV_P. You will need to pass the storage variable to the exchange macro.


next up previous contents index Previous: 7.5.8 Message Passing Macros
Up: 7.5 Macros for Parallel
Next: 7.6 Limitations of Parallel
Release 12.0 © ANSYS, Inc. 2009-01-14