Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
abkein committed Jan 16, 2025
1 parent 77ef868 commit ab3876d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/compute_cluster_size_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,11 @@ void ComputeClusterSizeExt::compute_vector()
clstr.l_size = ns[2 * clidx + 1];
clstr.rearrange();
auto clatoms = clstr.atoms();
for (int i = 0; i < clstr.l_size; ++i) { peratom_size[clatoms[i]] = clstr.g_size; }
const auto clatoms = clstr.atoms();
for (int i = 0; i < clstr.l_size; ++i) {
if (clatoms[i] >= atom->nlocal) { error->one(FLERR, "{}/pre_exchange:{}: particle index exceeds nlocal", style, comm->me); }
peratom_size[clatoms[i]] = clstr.g_size;
}
if ((clstr.g_size < size_cutoff) && (clstr.g_size > 1)) { cbs_all[clstr.g_size].push_back(clidx); }
if (clstr.host == comm->me) {
if (clstr.g_size < size_cutoff) { dist_local[clstr.g_size] += 1; }
Expand Down
2 changes: 1 addition & 1 deletion src/fix_cluster_crush_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void FixClusterCrushDelete::pre_exchange()
if (update->ntimestep < next_step) { return; }
next_step = update->ntimestep + nevery;

if (compute_cluster_size->invoked_vector < update->ntimestep) { compute_cluster_size->compute_vector(); }
if (compute_cluster_size->invoked_vector != update->ntimestep) { compute_cluster_size->compute_vector(); }
const auto& cIDs_by_size = compute_cluster_size->get_cIDs_by_size();

if (nloc < atom->nlocal) {
Expand Down

0 comments on commit ab3876d

Please sign in to comment.