fixed double definition, removed virial check for p3m and removed unused function definition Scafacos::pack...

This commit is contained in:
Rene Halver 2018-08-21 17:04:52 -06:00
parent fc7d9ff558
commit 3573970e4a
1 changed files with 10 additions and 19 deletions

View File

@ -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)