Added DELTATILT to box skew check

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8484 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
athomps 2012-07-10 20:32:47 +00:00
parent 98977d765c
commit 95e51c0cda
1 changed files with 4 additions and 3 deletions

View File

@ -42,6 +42,7 @@ using namespace MathConst;
#define SMALL 1.0e-4
#define DELTA 1
#define BONDSTRETCH 1.1
#define DELTATILT 0.1
enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp
@ -140,11 +141,11 @@ void Domain::set_initial_box()
if (triclinic) {
if (domain->dimension == 2 && (xz != 0.0 || yz != 0.0))
error->all(FLERR,"Cannot skew triclinic box in z for 2d simulation");
if (fabs(xy/(boxhi[0]-boxlo[0])) > 0.5)
if (fabs(xy/(boxhi[0]-boxlo[0])) > 0.5+DELTATILT)
error->all(FLERR,"Triclinic box skew is too large");
if (fabs(xz/(boxhi[0]-boxlo[0])) > 0.5)
if (fabs(xz/(boxhi[0]-boxlo[0])) > 0.5+DELTATILT)
error->all(FLERR,"Triclinic box skew is too large");
if (fabs(yz/(boxhi[1]-boxlo[1])) > 0.5)
if (fabs(yz/(boxhi[1]-boxlo[1])) > 0.5+DELTATILT)
error->all(FLERR,"Triclinic box skew is too large");
}