update membrane test

This commit is contained in:
James McClure
2022-01-12 09:48:04 -05:00
parent ec76dc9a3b
commit 0fb6fbfd7a
4 changed files with 16 additions and 22 deletions

View File

@@ -344,9 +344,10 @@ Membrane::~Membrane() {
}
int Membrane::D3Q19_MapSendRecv(const int Cqx, const int Cqy, const int Cqz,
int rank_q, int rank_Q, const int shift_x, const int shift_y, const int shift_z,
std::shared_ptr <Domain> Dm, const int *originalSendList, const int sendCount, const int recvCount,
int startSend, int startRecv,
const int shift_x, const int shift_y, const int shift_z,
const int sendCount, const int recvCount,
int rank_q, int rank_Q, int startSend, int startRecv,
std::shared_ptr <Domain> Dm, const int *originalSendList,
const DoubleArray &Distance, int *membraneSendList, int *membraneRecvList){
int sendtag = 2389;
@@ -414,8 +415,8 @@ int Membrane::D3Q19_MapSendRecv(const int Cqx, const int Cqy, const int Cqz,
int Membrane::Create(std::shared_ptr <Domain> Dm, DoubleArray &Distance, IntArray &Map){
int mlink = 0;
int i,j,k;
int n, idx, neighbor;
int i,j,k,n;
int idx, neighbor;
double dist, locdist;
/* go through the neighborlist structure */
/* count & cut the links */

View File

@@ -49,6 +49,7 @@ public:
*/
int Create(std::shared_ptr <Domain> Dm, DoubleArray &Distance, IntArray &Map);
void SendRecv(double *dist);
//......................................................................................
// Buffers to store data sent and recieved by this MPI process
double *sendbuf_x, *sendbuf_y, *sendbuf_z, *sendbuf_X, *sendbuf_Y, *sendbuf_Z;
@@ -82,9 +83,10 @@ private:
* @param d3q19_recvlist - device array with the saved list
* */
int D3Q19_MapSendRecv(const int Cqx, const int Cqy, const int Cqz,
int rank_q, int rank_Q, const int shift_x, const int shift_y, const int shift_z,
std::shared_ptr <Domain> Dm, const int *originalSendList, const int sendCount, const int recvCount,
int startSend, int startRecv,
const int shift_x, const int shift_y, const int shift_z,
const int sendCount, const int recvCount,
int rank_q, int rank_Q, int startSend, int startRecv,
std::shared_ptr <Domain> Dm, const int *originalSendList,
const DoubleArray &Distance, int *membraneSendList, int *membraneRecvList);
//......................................................................................
// MPI ranks for all 18 neighbors

View File

@@ -15,6 +15,6 @@ cmake -D CMAKE_C_COMPILER:PATH=/opt/arden/openmpi/3.1.2/bin/mpicc \
-D HDF5_DIRECTORY="/opt/arden/hdf5/1.8.12" \
-D USE_CUDA=0 \
-D USE_TIMER=0 \
~/Programs/LBPM
~/Programs/LBPM-WIA
# -D HDF5_LIB="/opt/arden/hdf5/1.8.12/lib/libhdf5.a"\

View File

@@ -119,6 +119,9 @@ int main(int argc, char **argv)
/* create a membrane data structure */
Membrane M(Dm, neighborList, Np);
int MembraneCount = M.Create(Dm, Distance, Map);
//......................device distributions.................................
int *NeighborList;
int *dvcMap;
@@ -159,19 +162,7 @@ int main(int argc, char **argv)
}
}
}
/* for (int idx=0; idx<Np; idx++){
n = TmpMap[idx];
// back out the 3D indices
k = n/(Nx*Ny);
j = (n-Nx*Ny*k)/Nx;
i = n-Nx*Ny*k-Nx*j;
for (int q=0; q<19; q++){
fq[q*Np+idx]=k*100.f+j*10.f+i*1.f+0.01*q;
}
}
if (rank==0) printf ("Setting up distributions \n");
*/
// Loop over the distributions for interior lattice sites
if (rank==0) printf ("Loop over distributions \n");