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

This commit is contained in:
sjplimp
2012-10-12 19:45:06 +00:00
parent 08a691bfed
commit fe2278f1b7
5 changed files with 23 additions and 11 deletions

View File

@ -300,7 +300,7 @@ void PPPM::init()
order--;
}
if (order == 0) error->all(FLERR,"PPPM order has been reduced to 0");
if (order == 1) error->all(FLERR,"PPPM order has been reduced to 1");
// adjust g_ewald

View File

@ -371,7 +371,6 @@ void PPPMDisp::init()
set_grid();
if (nx_pppm >= OFFSET || ny_pppm >= OFFSET || nz_pppm >= OFFSET)
error->all(FLERR,"PPPMDisp Coulomb grid is too large");
@ -396,7 +395,6 @@ void PPPMDisp::init()
if (nzlo_ghost > nzhi_in-nzlo_in+1) flag = 1;
if (nzhi_ghost > nzhi_in-nzlo_in+1) flag = 1;
int flag_all;
MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world);
@ -404,7 +402,8 @@ void PPPMDisp::init()
order--;
}
if (order == 0) error->all(FLERR,"Coulomb PPPMDisp order has been reduced to 0");
if (order == 1)
error->all(FLERR,"Coulomb PPPMDisp order has been reduced to 1");
// adjust g_ewald

View File

@ -127,10 +127,8 @@ int FixBalance::setmask()
void FixBalance::init()
{
// don't allow PPPM for now
if (force->kspace && strstr(force->kspace_style,"pppm"))
error->all(FLERR,"Cannot yet use fix balance with PPPM");
if (force->kspace) kspace_flag = 1;
else kspace_flag = 0;
}
/* ---------------------------------------------------------------------- */
@ -241,9 +239,9 @@ void FixBalance::rebalance()
if (irregular->migrate_check()) irregular->migrate_atoms();
if (domain->triclinic) domain->lamda2x(atom->nlocal);
// NOTE: still to be implemented
// check that new sub-domains are valid with KSpace constraints
// if (kspace_flag) force->kspace->check();
// invoke KSpace setup_grid() to adjust to new proc sub-domains
if (kspace_flag) force->kspace->setup_grid();
// pending triggers pre_neighbor() to compute final imbalance factor
// can only be done after atoms migrate in caller's comm->exchange()

View File

@ -39,6 +39,8 @@ KSpace::KSpace(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
order = 5;
gridflag = 0;
gewaldflag = 0;
minorder = 2;
overlap_allowed = 1;
order_6 = 5;
gridflag_6 = 0;
@ -315,6 +317,17 @@ void KSpace::modify_params(int narg, char **arg)
} else if (strcmp(arg[iarg],"order/disp") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command");
order_6 = atoi(arg[iarg+1]);
} else if (strcmp(arg[iarg],"minorder") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command");
minorder = atoi(arg[iarg+1]);
if (minorder < 2) error->all(FLERR,"Illegal kspace_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"overlap") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command");
if (strcmp(arg[iarg+1],"yes") == 0) overlap_allowed = 1;
else if (strcmp(arg[iarg+1],"no") == 0) overlap_allowed = 0;
else error->all(FLERR,"Illegal kspace_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"force") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command");
accuracy_absolute = atof(arg[iarg+1]);

View File

@ -66,6 +66,7 @@ class KSpace : protected Pointers {
virtual void init() = 0;
virtual void setup() = 0;
virtual void setup_grid() {};
virtual void compute(int, int) = 0;
virtual void compute_group_group(int, int, int) {};
@ -86,6 +87,7 @@ class KSpace : protected Pointers {
int gridflag,gridflag_6;
int gewaldflag,gewaldflag_6;
int order,order_6;
int minorder,overlap_allowed;
int differentiation_flag;
int slabflag;
int suffix_flag; // suffix compatibility flag