git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8869 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2012-10-02 20:23:22 +00:00
parent 06e67b08df
commit 1adc4fee98
7 changed files with 349 additions and 350 deletions

View File

@ -84,14 +84,12 @@ void EwaldDisp::init()
nbox = -1;
bytes = 0.0;
if (!comm->me) { // output message
if (!comm->me) {
if (screen) fprintf(screen,"EwaldDisp initialization ...\n");
if (logfile) fprintf(logfile,"EwaldDisp initialization ...\n");
}
if (force->pair == NULL || force->pair->ewaldflag == 0)
error->all(FLERR,"KSpace style is incompatible with Pair style");
if (domain->dimension == 2) // check for errors
if (domain->dimension == 2)
error->all(FLERR,"Cannot use EwaldDisp with 2d simulation");
if (slabflag == 0 && domain->nonperiodic > 0)
error->all(FLERR,"Cannot use nonperiodic boundaries with EwaldDisp");

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
#ifdef KSPACE_CLASS
KSpaceStyle(pppm_disp,PPPM_disp)
KSpaceStyle(pppm/disp,PPPMDisp)
#else
@ -39,10 +39,10 @@ namespace LAMMPS_NS {
#define EWALD_MAXORDER 6
#define EWALD_FUNCS 3
class PPPM_disp : public KSpace {
class PPPMDisp : public KSpace {
public:
PPPM_disp(class LAMMPS *, int, char **);
virtual ~PPPM_disp();
PPPMDisp(class LAMMPS *, int, char **);
virtual ~PPPMDisp();
virtual void init();
virtual void setup();
virtual void compute(int, int);
@ -55,7 +55,6 @@ class PPPM_disp : public KSpace {
/* ----------------------------------------------------------------------
Variables needed for calculating the 1/r and 1/r^6 potential
------------------------------------------------------------------------- */
int function[EWALD_FUNCS];

View File

@ -41,22 +41,22 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */
PPPMDISPTIP4P::PPPMDISPTIP4P(LAMMPS *lmp, int narg, char **arg) :
PPPM_disp(lmp, narg, arg)
PPPMDispTIP4P::PPPMDispTIP4P(LAMMPS *lmp, int narg, char **arg) :
PPPMDisp(lmp, narg, arg)
{
tip4pflag = 1;
}
/* ---------------------------------------------------------------------- */
void PPPMDISPTIP4P::init()
void PPPMDispTIP4P::init()
{
// TIP4P PPPM requires newton on, b/c it computes forces on ghost atoms
if (force->newton == 0)
error->all(FLERR,"Kspace style pppm/disp/tip4p requires newton on");
PPPM_disp::init();
PPPMDisp::init();
}
/* ----------------------------------------------------------------------
@ -65,7 +65,7 @@ void PPPMDISPTIP4P::init()
store central grid pt indices in part2grid array
------------------------------------------------------------------------- */
void PPPMDISPTIP4P::particle_map_c(double delx, double dely, double delz,
void PPPMDispTIP4P::particle_map_c(double delx, double dely, double delz,
double sft, int** p2g, int nup, int nlow,
int nxlo, int nylo, int nzlo,
int nxhi, int nyhi, int nzhi)
@ -115,7 +115,7 @@ void PPPMDISPTIP4P::particle_map_c(double delx, double dely, double delz,
in global grid
------------------------------------------------------------------------- */
void PPPMDISPTIP4P::make_rho_c()
void PPPMDispTIP4P::make_rho_c()
{
int i,l,m,n,nx,ny,nz,mx,my,mz,iH1,iH2;
FFT_SCALAR dx,dy,dz,x0,y0,z0;
@ -172,7 +172,7 @@ void PPPMDISPTIP4P::make_rho_c()
for ik differentiation
------------------------------------------------------------------------- */
void PPPMDISPTIP4P::fieldforce_c_ik()
void PPPMDispTIP4P::fieldforce_c_ik()
{
int i,l,m,n,nx,ny,nz,mx,my,mz;
FFT_SCALAR dx,dy,dz,x0,y0,z0;
@ -260,7 +260,7 @@ void PPPMDISPTIP4P::fieldforce_c_ik()
for ad scheme
------------------------------------------------------------------------- */
void PPPMDISPTIP4P::fieldforce_c_ad()
void PPPMDispTIP4P::fieldforce_c_ad()
{
int i,l,m,n,nx,ny,nz,mx,my,mz;
FFT_SCALAR dx,dy,dz,x0,y0,z0,dx0,dy0,dz0;
@ -383,7 +383,7 @@ void PPPMDISPTIP4P::fieldforce_c_ad()
interpolate from grid to get electric field & force on my particles
------------------------------------------------------------------------- */
void PPPMDISPTIP4P::fieldforce_c_peratom()
void PPPMDispTIP4P::fieldforce_c_peratom()
{
int i,l,m,n,nx,ny,nz,mx,my,mz;
FFT_SCALAR dx,dy,dz,x0,y0,z0;
@ -490,7 +490,7 @@ void PPPMDISPTIP4P::fieldforce_c_peratom()
also return local indices iH1,iH2 of H atoms
------------------------------------------------------------------------- */
void PPPMDISPTIP4P::find_M(int i, int &iH1, int &iH2, double *xM)
void PPPMDispTIP4P::find_M(int i, int &iH1, int &iH2, double *xM)
{
iH1 = atom->map(atom->tag[i] + 1);
iH2 = atom->map(atom->tag[i] + 2);

View File

@ -13,7 +13,7 @@
#ifdef KSPACE_CLASS
KSpaceStyle(pppm_disp/tip4p,PPPMDISPTIP4P)
KSpaceStyle(pppm/disp/tip4p,PPPMDispTIP4P)
#else
@ -24,10 +24,10 @@ KSpaceStyle(pppm_disp/tip4p,PPPMDISPTIP4P)
namespace LAMMPS_NS {
class PPPMDISPTIP4P : public PPPM_disp {
class PPPMDispTIP4P : public PPPMDisp {
public:
PPPMDISPTIP4P(class LAMMPS *, int, char **);
virtual ~PPPMDISPTIP4P () {};
PPPMDispTIP4P(class LAMMPS *, int, char **);
virtual ~PPPMDispTIP4P () {};
void init();
protected:

View File

@ -24,15 +24,17 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
PPPMProxy::PPPMProxy(LAMMPS *lmp, int narg, char **arg) :
PPPM(lmp, narg, arg), ThrOMP(lmp, THR_KSPACE|THR_PROXY) { need_setup=1; }
PPPM(lmp, narg, arg), ThrOMP(lmp, THR_KSPACE|THR_PROXY)
{
proxyflag = 1;
need_setup=1;
}
/* ---------------------------------------------------------------------- */
void PPPMProxy::setup_proxy()
{
if (need_setup)
PPPM::setup();
if (need_setup) PPPM::setup();
need_setup = 0;
}

View File

@ -24,15 +24,17 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
PPPMTIP4PProxy::PPPMTIP4PProxy(LAMMPS *lmp, int narg, char **arg) :
PPPMTIP4P(lmp, narg, arg), ThrOMP(lmp, THR_KSPACE|THR_PROXY) { need_setup=1; }
PPPMTIP4P(lmp, narg, arg), ThrOMP(lmp, THR_KSPACE|THR_PROXY)
{
proxyflag = 1;
need_setup=1;
}
/* ---------------------------------------------------------------------- */
void PPPMTIP4PProxy::setup_proxy()
{
if (need_setup)
PPPMTIP4P::setup();
if (need_setup) PPPMTIP4P::setup();
need_setup=0;
}