Merge branch 'master' into fix_gjf_bugs
This commit is contained in:
@ -7,7 +7,7 @@ set(ALL_PACKAGES ASPHERE CLASS2 COLLOID CORESHELL DIPOLE
|
|||||||
PYTHON QEQ REPLICA RIGID SHOCK SRD VORONOI
|
PYTHON QEQ REPLICA RIGID SHOCK SRD VORONOI
|
||||||
USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD
|
USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD
|
||||||
USER-DRUDE USER-FEP USER-MEAMC USER-MESO
|
USER-DRUDE USER-FEP USER-MEAMC USER-MESO
|
||||||
USER-MISC USER-MOFFF USER-OMP USER-PLUMED USER-PHONON USER-REAXC
|
USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REAXC
|
||||||
USER-SPH USER-SMD USER-UEF USER-YAFF)
|
USER-SPH USER-SMD USER-UEF USER-YAFF)
|
||||||
|
|
||||||
foreach(PKG ${ALL_PACKAGES})
|
foreach(PKG ${ALL_PACKAGES})
|
||||||
|
|||||||
@ -500,11 +500,18 @@ void PPPMTIP4P::find_M(int i, int &iH1, int &iH2, double *xM)
|
|||||||
// since local atoms are in lambda coordinates, but ghosts are not.
|
// since local atoms are in lambda coordinates, but ghosts are not.
|
||||||
|
|
||||||
int *sametag = atom->sametag;
|
int *sametag = atom->sametag;
|
||||||
double xo[3],xh1[3],xh2[3];
|
double xo[3],xh1[3],xh2[3],xm[3];
|
||||||
|
const int nlocal = atom->nlocal;
|
||||||
|
|
||||||
domain->lamda2x(x[i],xo);
|
for (int ii = 0; ii < 3; ++ii) {
|
||||||
domain->lamda2x(x[iH1],xh1);
|
xo[ii] = x[i][ii];
|
||||||
domain->lamda2x(x[iH2],xh2);
|
xh1[ii] = x[iH1][ii];
|
||||||
|
xh2[ii] = x[iH2][ii];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i < nlocal) domain->lamda2x(x[i],xo);
|
||||||
|
if (iH1 < nlocal) domain->lamda2x(x[iH1],xh1);
|
||||||
|
if (iH2 < nlocal) domain->lamda2x(x[iH2],xh2);
|
||||||
|
|
||||||
double delx = xo[0] - xh1[0];
|
double delx = xo[0] - xh1[0];
|
||||||
double dely = xo[1] - xh1[1];
|
double dely = xo[1] - xh1[1];
|
||||||
@ -513,6 +520,8 @@ void PPPMTIP4P::find_M(int i, int &iH1, int &iH2, double *xM)
|
|||||||
double rsq;
|
double rsq;
|
||||||
int closest = iH1;
|
int closest = iH1;
|
||||||
|
|
||||||
|
// no need to run lamda2x() here -> ghost atoms
|
||||||
|
|
||||||
while (sametag[iH1] >= 0) {
|
while (sametag[iH1] >= 0) {
|
||||||
iH1 = sametag[iH1];
|
iH1 = sametag[iH1];
|
||||||
delx = xo[0] - x[iH1][0];
|
delx = xo[0] - x[iH1][0];
|
||||||
@ -561,13 +570,13 @@ void PPPMTIP4P::find_M(int i, int &iH1, int &iH2, double *xM)
|
|||||||
double dely2 = xh2[1] - xo[1];
|
double dely2 = xh2[1] - xo[1];
|
||||||
double delz2 = xh2[2] - xo[2];
|
double delz2 = xh2[2] - xo[2];
|
||||||
|
|
||||||
xM[0] = xo[0] + alpha * 0.5 * (delx1 + delx2);
|
xm[0] = xo[0] + alpha * 0.5 * (delx1 + delx2);
|
||||||
xM[1] = xo[1] + alpha * 0.5 * (dely1 + dely2);
|
xm[1] = xo[1] + alpha * 0.5 * (dely1 + dely2);
|
||||||
xM[2] = xo[2] + alpha * 0.5 * (delz1 + delz2);
|
xm[2] = xo[2] + alpha * 0.5 * (delz1 + delz2);
|
||||||
|
|
||||||
// ... and convert M to lamda space for PPPM
|
// ... and convert M to lamda space for PPPM
|
||||||
|
|
||||||
domain->x2lamda(xM,xM);
|
domain->x2lamda(xm,xM);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@ -12,14 +12,13 @@
|
|||||||
------------------------------------------------------------------------ */
|
------------------------------------------------------------------------ */
|
||||||
|
|
||||||
/* Single-processor "stub" versions of MPI routines */
|
/* Single-processor "stub" versions of MPI routines */
|
||||||
/* -I. in Makefile insures dummy mpi.h in this dir is included */
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <mpi.h>
|
#include "mpi.h"
|
||||||
#include "../version.h"
|
#include "../version.h"
|
||||||
|
|
||||||
/* data structure for double/int */
|
/* data structure for double/int */
|
||||||
|
|||||||
@ -48,7 +48,7 @@ using namespace MathSpecial;
|
|||||||
|
|
||||||
PPPMOMP::PPPMOMP(LAMMPS *lmp) : PPPM(lmp), ThrOMP(lmp, THR_KSPACE)
|
PPPMOMP::PPPMOMP(LAMMPS *lmp) : PPPM(lmp), ThrOMP(lmp, THR_KSPACE)
|
||||||
{
|
{
|
||||||
triclinic_support = 0;
|
triclinic_support = 1;
|
||||||
suffix_flag |= Suffix::OMP;
|
suffix_flag |= Suffix::OMP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -750,11 +750,18 @@ void PPPMTIP4POMP::find_M_thr(int i, int &iH1, int &iH2, dbl3_t &xM)
|
|||||||
// since local atoms are in lambda coordinates, but ghosts are not.
|
// since local atoms are in lambda coordinates, but ghosts are not.
|
||||||
|
|
||||||
int *sametag = atom->sametag;
|
int *sametag = atom->sametag;
|
||||||
double xo[3],xh1[3],xh2[3];
|
double xo[3],xh1[3],xh2[3],xm[3];
|
||||||
|
const int nlocal = atom->nlocal;
|
||||||
|
|
||||||
domain->lamda2x(x[i],xo);
|
for (int ii = 0; ii < 3; ++ii) {
|
||||||
domain->lamda2x(x[iH1],xh1);
|
xo[ii] = x[i][ii];
|
||||||
domain->lamda2x(x[iH2],xh2);
|
xh1[ii] = x[iH1][ii];
|
||||||
|
xh2[ii] = x[iH2][ii];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i < nlocal) domain->lamda2x(x[i],xo);
|
||||||
|
if (iH1 < nlocal) domain->lamda2x(x[iH1],xh1);
|
||||||
|
if (iH2 < nlocal) domain->lamda2x(x[iH2],xh2);
|
||||||
|
|
||||||
double delx = xo[0] - xh1[0];
|
double delx = xo[0] - xh1[0];
|
||||||
double dely = xo[1] - xh1[1];
|
double dely = xo[1] - xh1[1];
|
||||||
@ -763,6 +770,7 @@ void PPPMTIP4POMP::find_M_thr(int i, int &iH1, int &iH2, dbl3_t &xM)
|
|||||||
double rsq;
|
double rsq;
|
||||||
int closest = iH1;
|
int closest = iH1;
|
||||||
|
|
||||||
|
// no need to run lamda2x here -> ghost atoms
|
||||||
while (sametag[iH1] >= 0) {
|
while (sametag[iH1] >= 0) {
|
||||||
iH1 = sametag[iH1];
|
iH1 = sametag[iH1];
|
||||||
delx = xo[0] - x[iH1][0];
|
delx = xo[0] - x[iH1][0];
|
||||||
@ -811,13 +819,13 @@ void PPPMTIP4POMP::find_M_thr(int i, int &iH1, int &iH2, dbl3_t &xM)
|
|||||||
double dely2 = xh2[1] - xo[1];
|
double dely2 = xh2[1] - xo[1];
|
||||||
double delz2 = xh2[2] - xo[2];
|
double delz2 = xh2[2] - xo[2];
|
||||||
|
|
||||||
xM.x = xo[0] + alpha * 0.5 * (delx1 + delx2);
|
xm[0] = xo[0] + alpha * 0.5 * (delx1 + delx2);
|
||||||
xM.y = xo[1] + alpha * 0.5 * (dely1 + dely2);
|
xm[1] = xo[1] + alpha * 0.5 * (dely1 + dely2);
|
||||||
xM.z = xo[2] + alpha * 0.5 * (delz1 + delz2);
|
xm[2] = xo[2] + alpha * 0.5 * (delz1 + delz2);
|
||||||
|
|
||||||
// ... and convert M to lamda space for PPPM
|
// ... and convert M to lamda space for PPPM
|
||||||
|
|
||||||
domain->x2lamda((double *)&xM,(double *)&xM);
|
domain->x2lamda(xm,(double *)&xM);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "style_improper.h"
|
#include "style_improper.h"
|
||||||
#include "style_pair.h"
|
#include "style_pair.h"
|
||||||
#include "style_kspace.h"
|
#include "style_kspace.h"
|
||||||
|
#include "atom.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "pair.h"
|
#include "pair.h"
|
||||||
#include "pair_hybrid.h"
|
#include "pair_hybrid.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user