more doc page updates for general tri

This commit is contained in:
Steve Plimpton
2023-11-16 16:35:16 -07:00
parent fc5803188f
commit 4057ee3d62
5 changed files with 179 additions and 85 deletions

View File

@ -121,11 +121,6 @@ void CreateBox::command(int narg, char **arg)
double chi = utils::numeric(FLERR, arg[iarg + 5], false, lmp);
iarg += 6;
if (domain->dimension == 2) {
if (clo >= 0.0 || clo <= 0.0)
error->all(FLERR,"Create_box region clo/chi for 2d simulation must straddle 0.0");
}
// use lattice2box() to generate origin and ABC vectors
// origin = abc lo
// ABC vectors = hi in one dim - origin
@ -157,6 +152,12 @@ void CreateBox::command(int narg, char **arg)
cvec[1] = py - origin[1];
cvec[2] = pz - origin[2];
if (domain->dimension == 2) {
if (cvec[0] != 0.0 || cvec[1] != 0.0 || cvec[2] != 1.0 || origin[2] != -0.5)
error->all(FLERR,"Create_box C vector and/or origin is invalid "
"for 2d simulation with general triclinic box");
}
// define general triclinic box within Domain
domain->define_general_triclinic(avec,bvec,cvec,origin);