Commit f6d91b3b authored by Jacob Gissinger's avatar Jacob Gissinger
Browse files

move domain/comm commands

parent cf83ce67
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -90,6 +90,18 @@ void ResetMolIDs::command(int narg, char **arg)

  lmp->init();

  // setup domain, communication
  // exchange will clear map, borders will reset
  // this is the map needed to lookup current global IDs for bond topology

  if (domain->triclinic) domain->x2lamda(atom->nlocal);
  domain->pbc();
  domain->reset_box();
  comm->setup();
  comm->exchange();
  comm->borders();
  if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);

  // reset molecule IDs

  reset(groupid);
@@ -132,18 +144,6 @@ void ResetMolIDs::reset(char *groupid)
    modify->add_compute(fmt::format("{} {} chunk/atom molecule compress yes",
                                    idchunk,groupid));

  // setup domain, communication
  // exchange will clear map, borders will reset
  // this is the map needed to lookup current global IDs for bond topology

  if (domain->triclinic) domain->x2lamda(atom->nlocal);
  domain->pbc();
  domain->reset_box();
  comm->setup();
  comm->exchange();
  comm->borders();
  if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);

  // invoke peratom method of compute fragment/atom
  // walks bond connectivity and assigns each atom a fragment ID
  // if singleflag = 0, atoms w/out bonds will be assigned fragID = 0