git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15109 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-06-06 23:21:39 +00:00
parent 1a52795e1d
commit 0f3e4182e8
67 changed files with 236 additions and 151 deletions

View File

@ -53,7 +53,16 @@ Lattice::Lattice(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
if (style == NONE) {
if (narg != 2) error->all(FLERR,"Illegal lattice command");
xlattice = ylattice = zlattice = force->numeric(FLERR,arg[1]);
// Domain defines a default lattice of style "none" with
// spacing 1.0 before the force class is initialized, so
// we have to fall back to using atof() in that case.
if (force)
xlattice = ylattice = zlattice = force->numeric(FLERR,arg[1]);
else
xlattice = ylattice = zlattice = atof(arg[1]);
if (xlattice <= 0.0) error->all(FLERR,"Illegal lattice command");
return;
}