diff --git a/CMakeLists.txt b/CMakeLists.txt index ea5c039b..a5a27ef7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,7 +100,7 @@ SET( LBPM_LIBS lbpm-wia ) # Add the src directories IF ( NOT ONLY_BUILD_DOCS ) BEGIN_PACKAGE_CONFIG( lbpm-wia ) - ADD_PACKAGE_SUBDIRECTORY( include ) + ADD_PACKAGE_SUBDIRECTORY( common ) IF ( USE_CUDA ) ADD_PACKAGE_SUBDIRECTORY( gpu ) ELSE() diff --git a/cmake/macros.cmake b/cmake/macros.cmake index 2756c025..cb15f757 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -474,6 +474,7 @@ MACRO( ADD_DISTCLEAN ) cpu gpu example + common ) ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution) IF (UNIX) diff --git a/include/Array.cpp b/common/Array.cpp similarity index 100% rename from include/Array.cpp rename to common/Array.cpp diff --git a/include/Array.h b/common/Array.h similarity index 100% rename from include/Array.h rename to common/Array.h diff --git a/common/Communication.cpp b/common/Communication.cpp new file mode 100644 index 00000000..e69de29b diff --git a/common/Communication.h b/common/Communication.h new file mode 100644 index 00000000..398270df --- /dev/null +++ b/common/Communication.h @@ -0,0 +1,146 @@ +#ifndef COMMUNICATION_H_INC +#define COMMUNICATION_H_INC + +// ********** COMMUNICTION ************************************** +/* + //.............................................................. + // Communication helper routines for MPI + //.............................................................. + */ + +using namespace std; + + +//*************************************************************************************** +inline void PackMeshData(int *list, int count, double *sendbuf, DoubleArray &Values){ + // Fill in the phase ID values from neighboring processors + // This packs up the values that need to be sent from one processor to another + int idx,n; + for (idx=0; idx