Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions source/lmp/pppm_dplr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,13 @@ void PPPMDPLR::compute(int eflag, int vflag)
// to fully sum contribution in their 3d bricks
// remap from 3d decomposition to FFT decomposition

#if LAMMPS_VERSION_NUMBER>=20210831
gc->reverse_comm(GridComm::KSPACE,this,1,sizeof(FFT_SCALAR),REVERSE_RHO,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#else
gc->reverse_comm_kspace(this,1,sizeof(FFT_SCALAR),REVERSE_RHO,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#endif
brick2fft();

// compute potential gradient on my FFT grid and
Expand All @@ -124,21 +129,41 @@ void PPPMDPLR::compute(int eflag, int vflag)
// to fill ghost cells surrounding their 3d bricks

if (differentiation_flag == 1)
#if LAMMPS_VERSION_NUMBER>=20210831
gc->forward_comm(GridComm::KSPACE,this,1,sizeof(FFT_SCALAR),FORWARD_AD,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#else
gc->forward_comm_kspace(this,1,sizeof(FFT_SCALAR),FORWARD_AD,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#endif
else
#if LAMMPS_VERSION_NUMBER>=20210831
gc->forward_comm(GridComm::KSPACE,this,1,sizeof(FFT_SCALAR),FORWARD_IK,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#else
gc->forward_comm_kspace(this,3,sizeof(FFT_SCALAR),FORWARD_IK,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#endif

// extra per-atom energy/virial communication

if (evflag_atom) {
if (differentiation_flag == 1 && vflag_atom)
#if LAMMPS_VERSION_NUMBER>=20210831
gc->forward_comm(GridComm::KSPACE,this,6,sizeof(FFT_SCALAR),FORWARD_AD_PERATOM,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#else
gc->forward_comm_kspace(this,6,sizeof(FFT_SCALAR),FORWARD_AD_PERATOM,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#endif
else if (differentiation_flag == 0)
#if LAMMPS_VERSION_NUMBER>=20210831
gc->forward_comm(GridComm::KSPACE,this,7,sizeof(FFT_SCALAR),FORWARD_IK_PERATOM,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#else
gc->forward_comm_kspace(this,7,sizeof(FFT_SCALAR),FORWARD_IK_PERATOM,
gc_buf1,gc_buf2,MPI_FFT_SCALAR);
#endif
}

// calculate the force on my particles
Expand Down