Commit 3573970e authored by Rene Halver's avatar Rene Halver
Browse files

fixed double definition, removed virial check for p3m and removed unused...

fixed double definition, removed virial check for p3m and removed unused function definition Scafacos::pack...
parent fc7d9ff5
Loading
Loading
Loading
Loading
+10 −19
Original line number Diff line number Diff line
@@ -198,13 +198,6 @@ void Scafacos::compute(int eflag, int vflag)
    vflag_global = 0;
  }

  // if simulation box has changed, call fcs_tune()

  if (box_has_changed()) {
    setup_handle();
    result = fcs_tune(fcs,nlocal,&x[0][0],q);
    check_result(result);
  }
  
  // grow xpbc, epot, efield if necessary

@@ -221,13 +214,11 @@ void Scafacos::compute(int eflag, int vflag)
  if (vflag_global)
  {
    fcs_set_compute_virial(fcs,1);
    if (strcmp(method,"p3m") == 0)
      error->all(FLERR,"ScaFaCoS p3m does not support computation of virial");
    //if (strcmp(method,"p3m") == 0)
    //  error->all(FLERR,"ScaFaCoS p3m does not support computation of virial");
  }

  // pack coords into xpbc and apply PBC

  double **x = atom->x;
  memcpy(xpbc,&x[0][0],3*nlocal*sizeof(double));

  int j = 0;
@@ -236,6 +227,14 @@ void Scafacos::compute(int eflag, int vflag)
    j += 3;
  }

  // if simulation box has changed, call fcs_tune()

  if (box_has_changed()) {
    setup_handle();
    result = fcs_tune(fcs,nlocal,xpbc,q);
    check_result(result);
  }

  // invoke ScaFaCoS solver

  result = fcs_run(fcs,nlocal,xpbc,q,&efield[0][0],epot);
@@ -278,14 +277,6 @@ void Scafacos::compute(int eflag, int vflag)
  MPI_Allreduce(&myeng,&energy,1,MPI_DOUBLE,MPI_SUM,world);
}

/* ----------------------------------------------------------------------
   pack local coords into xpbc, enforcing PBC
------------------------------------------------------------------------- */

void Scafacos::pack_coords()
{
}

/* ---------------------------------------------------------------------- */

int Scafacos::modify_param(int narg, char **arg)