From 4085deb5e35e354ad756fb7b63dacac1ac91b0ec Mon Sep 17 00:00:00 2001 From: Rex Zhe Li Date: Mon, 18 Jan 2021 23:37:08 -0500 Subject: [PATCH] save the work --- models/FreeLeeModel.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/models/FreeLeeModel.cpp b/models/FreeLeeModel.cpp index e9f1f5b5..4bdff0d0 100644 --- a/models/FreeLeeModel.cpp +++ b/models/FreeLeeModel.cpp @@ -243,20 +243,19 @@ void ScaLBL_FreeLeeModel::Create(){ } } } - //TODO The following check needs update! // check that TmpMap is valid for (int idx=0; idxLastExterior(); idx++){ auto n = TmpMap[idx]; - if (n > Nx*Ny*Nz){ + if (n > Nxh*Nyh*Nzh){ printf("Bad value! idx=%i \n", n); - TmpMap[idx] = Nx*Ny*Nz-1; + TmpMap[idx] = Nxh*Nyh*Nzh-1; } } for (int idx=ScaLBL_Comm->FirstInterior(); idxLastInterior(); idx++){ auto n = TmpMap[idx]; - if ( n > Nx*Ny*Nz ){ + if ( n > Nxh*Nyh*Nzh ){ printf("Bad value! idx=%i \n",n); - TmpMap[idx] = Nx*Ny*Nz-1; + TmpMap[idx] = Nxh*Nyh*Nzh-1; } } ScaLBL_CopyToDevice(dvcMap, TmpMap, sizeof(int)*Np);