Unverified Commit 9d0c3bc6 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

replace some numeric constants in Atom and AtomVec classes with enumerators

parent cdd9d693
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -23,8 +23,8 @@ using namespace LAMMPS_NS;

AtomVecDipole::AtomVecDipole(LAMMPS *lmp) : AtomVec(lmp)
{
  molecular = 0;
  mass_type = 1;
  molecular = Atom::ATOMIC;
  mass_type = PER_TYPE;

  atom->q_flag = atom->mu_flag = 1;

+1 −1
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ void FixGPU::init()
{
  // GPU package cannot be used with atom_style template

  if (atom->molecular == 2)
  if (atom->molecular == Atom::TEMPLATE)
    error->all(FLERR,"GPU package does not (yet) work with "
               "atom_style template");

+2 −2
Original line number Diff line number Diff line
@@ -179,9 +179,9 @@ void PairLJCutTIP4PLongGPU::init_style()
  if (force->angle == NULL)
    error->all(FLERR,"Must use an angle style with TIP4P potential");

  if (atom->map_style == 2)
  if (atom->map_style == Atom::MAP_HASH)
    error->all(FLERR,"GPU-accelerated lj/cut/tip4p/long currently"
        " requires map style 'array' (atom_modify map array)");
        " requires 'array' style atom map (atom_modify map array)");

  //PairLJCutCoulLong::init_style();
  // Repeat cutsq calculation because done after call to init_style
+3 −3
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) :
          ntype+onemols[i]->ntypes > atom->ntypes)
        error->all(FLERR,"Invalid atom type in fix pour mol command");

      if (atom->molecular == 2 && onemols != atom->avec->onemols)
      if (atom->molecular == Atom::TEMPLATE && onemols != atom->avec->onemols)
        error->all(FLERR,"Fix pour molecule template ID must be same "
                   "as atom style template ID");
      onemols[i]->check_attributes(0);
@@ -644,7 +644,7 @@ void FixPour::pre_exchange()
              atom->molecule[n] = maxmol_all+1;
            }
          }
          if (atom->molecular == 2) {
          if (atom->molecular == Atom::TEMPLATE) {
            atom->molindex[n] = 0;
            atom->molatom[n] = m;
          }
@@ -712,7 +712,7 @@ void FixPour::pre_exchange()
    }
    if (maxtag_all >= MAXTAGINT)
      error->all(FLERR,"New atom IDs exceed maximum allowed ID");
    if (atom->map_style) {
    if (atom->map_style != Atom::MAP_NONE) {
      atom->map_init();
      atom->map_set();
    }
+4 −4
Original line number Diff line number Diff line
@@ -409,8 +409,8 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :

  history_one = NULL;
  grow_arrays(atom->nmax);
  atom->add_callback(0);
  atom->add_callback(1);
  atom->add_callback(Atom::GROW);
  atom->add_callback(Atom::RESTART);

  nmax = 0;
  mass_rigid = NULL;
@@ -438,8 +438,8 @@ FixWallGran::~FixWallGran()
{
  // unregister callbacks to this fix from Atom class

  atom->delete_callback(id,0);
  atom->delete_callback(id,1);
  atom->delete_callback(id,Atom::GROW);
  atom->delete_callback(id,Atom::RESTART);

  // delete local storage

Loading