forked from lijiext/lammps
restore support for triclinic cells with pppm/intel by calling the corresponding functions in PPPM in that case
This commit is contained in:
parent
4e525f1d56
commit
924629538f
|
@ -60,7 +60,6 @@ enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM};
|
|||
PPPMIntel::PPPMIntel(LAMMPS *lmp) : PPPM(lmp)
|
||||
{
|
||||
suffix_flag |= Suffix::INTEL;
|
||||
triclinic_support = 0;
|
||||
|
||||
order = 7; //sets default stencil size to 7
|
||||
|
||||
|
@ -209,6 +208,12 @@ void PPPMIntel::compute_first(int eflag, int vflag)
|
|||
|
||||
// find grid points for all my particles
|
||||
// map my particle charge onto my local 3d density grid
|
||||
// optimized versions can only be used for orthogonal boxes
|
||||
|
||||
if (triclinic) {
|
||||
PPPM::particle_map();
|
||||
PPPM::make_rho();
|
||||
} else {
|
||||
|
||||
if (fix->precision() == FixIntel::PREC_MODE_MIXED) {
|
||||
particle_map<float,double>(fix->get_mixed_buffers());
|
||||
|
@ -220,6 +225,7 @@ void PPPMIntel::compute_first(int eflag, int vflag)
|
|||
particle_map<float,float>(fix->get_single_buffers());
|
||||
make_rho<float,float>(fix->get_single_buffers());
|
||||
}
|
||||
}
|
||||
|
||||
// all procs communicate density values from their ghost cells
|
||||
// to fully sum contribution in their 3d bricks
|
||||
|
@ -259,7 +265,11 @@ void PPPMIntel::compute_second(int /*eflag*/, int /*vflag*/)
|
|||
int i,j;
|
||||
|
||||
// calculate the force on my particles
|
||||
// optimized versions can only be used for orthogonal boxes
|
||||
|
||||
if (triclinic) {
|
||||
PPPM::fieldforce();
|
||||
} else {
|
||||
if (differentiation_flag == 1) {
|
||||
if (fix->precision() == FixIntel::PREC_MODE_MIXED)
|
||||
fieldforce_ad<float,double>(fix->get_mixed_buffers());
|
||||
|
@ -275,6 +285,7 @@ void PPPMIntel::compute_second(int /*eflag*/, int /*vflag*/)
|
|||
else
|
||||
fieldforce_ik<float,float>(fix->get_single_buffers());
|
||||
}
|
||||
}
|
||||
|
||||
// extra per-atom energy/virial communication
|
||||
|
||||
|
|
Loading…
Reference in New Issue