Commit fd56124a authored by Rene Halver's avatar Rene Halver
Browse files

corrected remap call and logic for check if correct solver / tolerance combinations are set

parent cb8482b0
Loading
Loading
Loading
Loading
+8 −19
Original line number Diff line number Diff line
@@ -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;
  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 && 
          (