replace some numeric constants in Atom and AtomVec classes with enumerators
This commit is contained in:
@ -113,7 +113,7 @@ FixDeposit::FixDeposit(LAMMPS *lmp, int narg, char **arg) :
|
||||
ntype+onemols[i]->ntypes > atom->ntypes)
|
||||
error->all(FLERR,"Invalid atom type in fix deposit mol command");
|
||||
|
||||
if (atom->molecular == 2 && onemols != atom->avec->onemols)
|
||||
if (atom->molecular == Atom::TEMPLATE && onemols != atom->avec->onemols)
|
||||
error->all(FLERR,"Fix deposit molecule template ID must be same "
|
||||
"as atom_style template ID");
|
||||
onemols[i]->check_attributes(0);
|
||||
@ -543,7 +543,7 @@ void FixDeposit::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;
|
||||
}
|
||||
@ -613,7 +613,7 @@ void FixDeposit::pre_exchange()
|
||||
maxmol_all++;
|
||||
}
|
||||
}
|
||||
if (atom->map_style) {
|
||||
if (atom->map_style != Atom::MAP_NONE) {
|
||||
atom->map_init();
|
||||
atom->map_set();
|
||||
}
|
||||
|
||||
@ -264,8 +264,8 @@ void FixEvaporate::pre_exchange()
|
||||
// if mol ID > 0, delete any atom in molecule and decrement counters
|
||||
// if mol ID == 0, delete single iatom
|
||||
// logic with ndeltopo is to count # of deleted bonds,angles,etc
|
||||
// for atom->molecular = 1, do this for each deleted atom in molecule
|
||||
// for atom->molecular = 2, use Molecule counts for just 1st atom in mol
|
||||
// for atom->molecular = Atom::MOLECULAR, do this for each deleted atom in molecule
|
||||
// for atom->molecular = Atom::TEMPLATE, use Molecule counts for just 1st atom in mol
|
||||
|
||||
MPI_Allreduce(&me,&proc,1,MPI_INT,MPI_MAX,world);
|
||||
MPI_Bcast(&imolecule,1,MPI_LMP_TAGINT,proc,world);
|
||||
@ -275,7 +275,7 @@ void FixEvaporate::pre_exchange()
|
||||
mark[i] = 1;
|
||||
ndelone++;
|
||||
|
||||
if (molecular == 1) {
|
||||
if (molecular == Atom::MOLECULAR) {
|
||||
if (atom->avec->bonds_allow) {
|
||||
if (force->newton_bond) ndeltopo[0] += atom->num_bond[i];
|
||||
else {
|
||||
@ -312,7 +312,7 @@ void FixEvaporate::pre_exchange()
|
||||
}
|
||||
}
|
||||
|
||||
} else if (molecular == 2) {
|
||||
} else if (molecular == Atom::TEMPLATE) {
|
||||
if (molatom[i] == 0) {
|
||||
index = molindex[i];
|
||||
ndeltopo[0] += onemols[index]->nbonds;
|
||||
@ -376,7 +376,7 @@ void FixEvaporate::pre_exchange()
|
||||
atom->nimpropers -= all[3];
|
||||
}
|
||||
|
||||
if (ndel && atom->map_style) {
|
||||
if (ndel && (atom->map_style != Atom::MAP_NONE)) {
|
||||
atom->nghost = 0;
|
||||
atom->map_init();
|
||||
atom->map_set();
|
||||
|
||||
@ -92,8 +92,8 @@ FixGLD::FixGLD(LAMMPS *lmp, int narg, char **arg) :
|
||||
s_gld = NULL;
|
||||
grow_arrays(atom->nmax);
|
||||
// add callbacks to enable restarts
|
||||
atom->add_callback(0);
|
||||
atom->add_callback(1);
|
||||
atom->add_callback(Atom::GROW);
|
||||
atom->add_callback(Atom::RESTART);
|
||||
|
||||
// read in the Prony series coefficients
|
||||
int iarg = narg_min;
|
||||
@ -179,8 +179,8 @@ FixGLD::~FixGLD()
|
||||
memory->destroy(s_gld);
|
||||
|
||||
// remove callbacks to fix, so atom class stops calling it
|
||||
atom->delete_callback(id,0);
|
||||
atom->delete_callback(id,1);
|
||||
atom->delete_callback(id,Atom::GROW);
|
||||
atom->delete_callback(id,Atom::RESTART);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -139,8 +139,8 @@ FixTTM::FixTTM(LAMMPS *lmp, int narg, char **arg) :
|
||||
flangevin[i][2] = 0;
|
||||
}
|
||||
|
||||
atom->add_callback(0);
|
||||
atom->add_callback(1);
|
||||
atom->add_callback(Atom::GROW);
|
||||
atom->add_callback(Atom::RESTART);
|
||||
|
||||
// set initial electron temperatures from user input file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user