git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5627 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -130,7 +130,7 @@ void Ewald::init()
|
|||||||
|
|
||||||
// setup K-space resolution
|
// setup K-space resolution
|
||||||
|
|
||||||
g_ewald = (1.35 - 0.15*log(precision))/cutoff;
|
if (!gewaldflag) g_ewald = (1.35 - 0.15*log(precision))/cutoff;
|
||||||
gsqmx = -4.0*g_ewald*g_ewald*log(precision);
|
gsqmx = -4.0*g_ewald*g_ewald*log(precision);
|
||||||
|
|
||||||
if (comm->me == 0) {
|
if (comm->me == 0) {
|
||||||
|
|||||||
@ -64,7 +64,8 @@ void KSpace::modify_params(int narg, char **arg)
|
|||||||
if (slab_volfactor <= 1.0)
|
if (slab_volfactor <= 1.0)
|
||||||
error->all("Bad kspace_modify slab parameter");
|
error->all("Bad kspace_modify slab parameter");
|
||||||
if (slab_volfactor < 2.0 && comm->me == 0)
|
if (slab_volfactor < 2.0 && comm->me == 0)
|
||||||
error->warning("Kspace_modify slab param < 2.0 may cause unphysical behavior");
|
error->warning("Kspace_modify slab param < 2.0 may "
|
||||||
|
"cause unphysical behavior");
|
||||||
slabflag = 1;
|
slabflag = 1;
|
||||||
} else error->all("Illegal kspace_modify command");
|
} else error->all("Illegal kspace_modify command");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2817,7 +2817,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
|
|||||||
|
|
||||||
if (compute) {
|
if (compute) {
|
||||||
double *vec;
|
double *vec;
|
||||||
if (index) vec = &compute->array[0][index];
|
if (index) vec = &compute->array[0][index-1];
|
||||||
else vec = compute->vector;
|
else vec = compute->vector;
|
||||||
|
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|||||||
@ -397,10 +397,6 @@ void Velocity::set(int narg, char **arg)
|
|||||||
|
|
||||||
// check variables
|
// check variables
|
||||||
|
|
||||||
int dimension = domain->dimension;
|
|
||||||
if (dimension == 2 && zstyle)
|
|
||||||
error->all("Cannot set z velocity for 2d simulation");
|
|
||||||
|
|
||||||
if (xstr) {
|
if (xstr) {
|
||||||
xvar = input->variable->find(xstr);
|
xvar = input->variable->find(xstr);
|
||||||
if (xvar < 0) error->all("Variable name for velocity set does not exist");
|
if (xvar < 0) error->all("Variable name for velocity set does not exist");
|
||||||
@ -429,6 +425,15 @@ void Velocity::set(int narg, char **arg)
|
|||||||
varflag = EQUAL;
|
varflag = EQUAL;
|
||||||
else varflag = CONSTANT;
|
else varflag = CONSTANT;
|
||||||
|
|
||||||
|
// error check for 2d models
|
||||||
|
|
||||||
|
if (domain->dimension == 2) {
|
||||||
|
if (zstyle == CONSTANT && vz != 0.0)
|
||||||
|
error->all("Cannot set non-zero z velocity for 2d simulation");
|
||||||
|
if (zstyle == EQUAL || zstyle == ATOM)
|
||||||
|
error->all("Cannot set varaible z velocity for 2d simulation");
|
||||||
|
}
|
||||||
|
|
||||||
// allocate vfield array if necessary
|
// allocate vfield array if necessary
|
||||||
|
|
||||||
double **vfield = NULL;
|
double **vfield = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user