git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15109 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user