forked from lijiext/lammps
corrected remap call and logic for check if correct solver / tolerance combinations are set
This commit is contained in:
parent
cb8482b0e6
commit
fd56124a94
|
@ -222,25 +222,14 @@ void Scafacos::compute(int eflag, int vflag)
|
|||
// pack coords into xpbc and apply PBC
|
||||
memcpy(xpbc,&x[0][0],3*nlocal*sizeof(double));
|
||||
|
||||
// RENE: remove this section (see RENE below)
|
||||
|
||||
//int j = 0;
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (domain->xperiodic) domain->remap(&xpbc[3*i]);
|
||||
if (domain->yperiodic) domain->remap(&xpbc[3*i+1]);
|
||||
if (domain->zperiodic) domain->remap(&xpbc[3*i+2]);
|
||||
//j += 3;
|
||||
}
|
||||
|
||||
// RENE: I think the call to domain->remap needs to be this way
|
||||
// b/c the remap() method checks for PBC and does all 3 dims at once
|
||||
|
||||
int j = 0;
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
domain->remap(&xpbc[j]);
|
||||
j += 3;
|
||||
if (domain->xperiodic || domain -> yperiodic || domain -> zperiodic){
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
domain->remap(&xpbc[j]);
|
||||
j += 3;
|
||||
}
|
||||
}
|
||||
|
||||
// if simulation box has changed, call fcs_tune()
|
||||
|
||||
if (box_has_changed()) {
|
||||
|
@ -328,20 +317,20 @@ int Scafacos::modify_param(int narg, char **arg)
|
|||
tolerance_type != FCS_TOLERANCE_TYPE_ENERGY &&
|
||||
tolerance_type != FCS_TOLERANCE_TYPE_ENERGY_REL
|
||||
)
|
||||
) &&
|
||||
) ||
|
||||
(
|
||||
strcmp(method,"p2nfft") == 0 &&
|
||||
(
|
||||
tolerance_type != FCS_TOLERANCE_TYPE_FIELD &&
|
||||
tolerance_type != FCS_TOLERANCE_TYPE_POTENTIAL
|
||||
)
|
||||
) &&
|
||||
) ||
|
||||
(
|
||||
strcmp(method,"p3m") == 0 &&
|
||||
(
|
||||
tolerance_type != FCS_TOLERANCE_TYPE_FIELD
|
||||
)
|
||||
) &&
|
||||
) ||
|
||||
(
|
||||
strcmp(method,"ewald") == 0 &&
|
||||
(
|
||||
|
|
Loading…
Reference in New Issue