diff --git a/src/GrandBrownTown.cu b/src/GrandBrownTown.cu index fe55aad463b5b27ea6f095329ea14ed3917d498e..3f0fc8c823fe091e3f3b01fba2fa2f46487b7426 100644 --- a/src/GrandBrownTown.cu +++ b/src/GrandBrownTown.cu @@ -566,19 +566,20 @@ void GrandBrownTown::run() wkf_timer_start(timer0); wkf_timer_start(timerS); - if (fullLongRange == 0) - { - // cudaSetDevice(0); - internal->decompose(); - gpuErrchk(cudaDeviceSynchronize()); - #ifdef _OPENMP - omp_set_num_threads(4); - #endif - #pragma omp parallel for - for(int i = 0; i < numReplicas; ++i) - RBC[i]->updateParticleLists( (internal->getPos_d()[0])+i*(num+conf.num_rb_attached_particles), sys_d); - gpuErrchk(cudaDeviceSynchronize()); - } + //// Happens at step 1 later anyway! + // if (fullLongRange == 0) + // { + // // cudaSetDevice(0); + // internal->decompose(); + // gpuErrchk(cudaDeviceSynchronize()); + // #ifdef _OPENMP + // omp_set_num_threads(4); + // #endif + // #pragma omp parallel for + // for(int i = 0; i < numReplicas; ++i) + // RBC[i]->updateParticleLists( (internal->getPos_d()[0])+i*(num+conf.num_rb_attached_particles), sys_d); + // gpuErrchk(cudaDeviceSynchronize()); + // } float t; // simulation time @@ -643,7 +644,6 @@ void GrandBrownTown::run() switch (fullLongRange) { case 0: // [ N*log(N) ] interactions, + cutoff | decomposition - if (s % decompPeriod == 0) { // cudaSetDevice(0); internal -> decompose(); diff --git a/src/RigidBodyType.cu b/src/RigidBodyType.cu index 2137160943aaf63fa2345f48e0b115373a242704..45d91877ee4104b4f6be31e69d68a71c49e79d25 100644 --- a/src/RigidBodyType.cu +++ b/src/RigidBodyType.cu @@ -217,7 +217,7 @@ void RigidBodyType::initializeParticleLists() { // Build temporary id array of type j particles int tmp[conf->numPartsOfType[j]]; int currId = 0; - for (int aid = 0; aid < conf->num; ++aid) { + for (int aid = 0; aid < conf->num + conf->num_rb_attached_particles ; ++aid) { if (conf->type[aid] == j) tmp[currId++] = aid; }