forked from lijiext/lammps
Updating MSM code to reflect changes allowing non-periodic boundaries.
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9247 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
27c6f67b93
commit
18c211af65
1605
src/KSPACE/msm.cpp
1605
src/KSPACE/msm.cpp
File diff suppressed because it is too large
Load Diff
|
@ -49,33 +49,40 @@ class MSM : public KSpace {
|
||||||
int *nx_msm,*ny_msm,*nz_msm;
|
int *nx_msm,*ny_msm,*nz_msm;
|
||||||
int *nxlo_in,*nylo_in,*nzlo_in;
|
int *nxlo_in,*nylo_in,*nzlo_in;
|
||||||
int *nxhi_in,*nyhi_in,*nzhi_in;
|
int *nxhi_in,*nyhi_in,*nzhi_in;
|
||||||
int *nxlo_in_d,*nylo_in_d,*nzlo_in_d;
|
|
||||||
int *nxhi_in_d,*nyhi_in_d,*nzhi_in_d;
|
|
||||||
int *nxlo_out,*nylo_out,*nzlo_out;
|
int *nxlo_out,*nylo_out,*nzlo_out;
|
||||||
int *nxhi_out,*nyhi_out,*nzhi_out;
|
int *nxhi_out,*nyhi_out,*nzhi_out;
|
||||||
int *ngrid;
|
int *ngrid;
|
||||||
|
int *alpha,*betax,*betay,*betaz;
|
||||||
int nxlo_direct,nxhi_direct,nylo_direct;
|
int nxlo_direct,nxhi_direct,nylo_direct;
|
||||||
int nyhi_direct,nzlo_direct,nzhi_direct;
|
int nyhi_direct,nzlo_direct,nzhi_direct;
|
||||||
int nmax_direct;
|
int nmax_direct;
|
||||||
int nlower,nupper;
|
int nlower,nupper;
|
||||||
int peratom_allocate_flag;
|
int peratom_allocate_flag;
|
||||||
int levels,cutlevel;
|
int levels;
|
||||||
|
|
||||||
|
MPI_Comm *world_levels;
|
||||||
|
|
||||||
double ****qgrid;
|
double ****qgrid;
|
||||||
double ****egrid;
|
double ****egrid;
|
||||||
double ****fxgrid,****fygrid,****fzgrid;
|
|
||||||
double ****v0grid,****v1grid,****v2grid;
|
double ****v0grid,****v1grid,****v2grid;
|
||||||
double ****v3grid,****v4grid,****v5grid;
|
double ****v3grid,****v4grid,****v5grid;
|
||||||
double **g_direct;
|
double **g_direct;
|
||||||
double **dgx_direct,**dgy_direct,**dgz_direct;
|
|
||||||
double **v0_direct,**v1_direct,**v2_direct;
|
double **v0_direct,**v1_direct,**v2_direct;
|
||||||
double **v3_direct,**v4_direct,**v5_direct;
|
double **v3_direct,**v4_direct,**v5_direct;
|
||||||
|
double *g_direct_top;
|
||||||
|
double *v0_direct_top,*v1_direct_top,*v2_direct_top;
|
||||||
|
double *v3_direct_top,*v4_direct_top,*v5_direct_top;
|
||||||
|
|
||||||
double **phi1d,**dphi1d;
|
double **phi1d,**dphi1d;
|
||||||
|
|
||||||
|
int procgrid[3]; // procs assigned in each dim of 3d grid
|
||||||
|
int myloc[3]; // which proc I am in each dim
|
||||||
|
int ***procneigh_levels; // my 6 neighboring procs, 0/1 = left/right
|
||||||
class CommGrid **cg;
|
class CommGrid **cg;
|
||||||
class CommGrid **cg_IK;
|
|
||||||
class CommGrid **cg_peratom;
|
class CommGrid **cg_peratom;
|
||||||
|
class CommGrid *cg_all;
|
||||||
|
class CommGrid *cg_peratom_all;
|
||||||
|
|
||||||
int current_level;
|
int current_level;
|
||||||
|
|
||||||
int **part2grid; // storage for particle -> grid mapping
|
int **part2grid; // storage for particle -> grid mapping
|
||||||
|
@ -84,6 +91,7 @@ class MSM : public KSpace {
|
||||||
double *boxlo;
|
double *boxlo;
|
||||||
|
|
||||||
void set_grid_global();
|
void set_grid_global();
|
||||||
|
void set_proc_grid(int);
|
||||||
void set_grid_local();
|
void set_grid_local();
|
||||||
void setup_grid();
|
void setup_grid();
|
||||||
double estimate_cutoff(double,double);
|
double estimate_cutoff(double,double);
|
||||||
|
@ -99,21 +107,21 @@ class MSM : public KSpace {
|
||||||
int factorable(int,int&,int&);
|
int factorable(int,int&,int&);
|
||||||
void particle_map();
|
void particle_map();
|
||||||
void make_rho();
|
void make_rho();
|
||||||
void grid_swap(int,double*** &);
|
|
||||||
void direct_ad(int);
|
|
||||||
void direct(int);
|
void direct(int);
|
||||||
|
void direct_top(int);
|
||||||
void direct_peratom(int);
|
void direct_peratom(int);
|
||||||
|
void direct_peratom_top(int);
|
||||||
void restriction(int);
|
void restriction(int);
|
||||||
void prolongation(int);
|
void prolongation(int);
|
||||||
void fieldforce_ad();
|
|
||||||
void fieldforce();
|
void fieldforce();
|
||||||
void fieldforce_peratom();
|
void fieldforce_peratom();
|
||||||
void compute_phis_and_dphis(const double &, const double &, const double &);
|
void compute_phis_and_dphis(const double &, const double &, const double &);
|
||||||
double compute_phi(const double &);
|
double compute_phi(const double &);
|
||||||
double compute_dphi(const double &);
|
double compute_dphi(const double &);
|
||||||
void get_g_direct();
|
void get_g_direct();
|
||||||
void get_dg_direct();
|
|
||||||
void get_virial_direct();
|
void get_virial_direct();
|
||||||
|
void get_g_direct_top(int);
|
||||||
|
void get_virial_direct_top(int);
|
||||||
|
|
||||||
// grid communication
|
// grid communication
|
||||||
void pack_forward(int, double *, int, int *);
|
void pack_forward(int, double *, int, int *);
|
||||||
|
@ -147,10 +155,6 @@ E: Kspace style requires atom attribute q
|
||||||
|
|
||||||
The atom style defined does not have these attributes.
|
The atom style defined does not have these attributes.
|
||||||
|
|
||||||
E: Cannot (yet) use nonperiodic boundaries with MSM
|
|
||||||
|
|
||||||
This feature is not yet supported.
|
|
||||||
|
|
||||||
E: Cannot use slab correction with MSM
|
E: Cannot use slab correction with MSM
|
||||||
|
|
||||||
Slab correction can only be used with Ewald and PPPM, not MSM.
|
Slab correction can only be used with Ewald and PPPM, not MSM.
|
||||||
|
@ -185,6 +189,11 @@ The global MSM grid is larger than OFFSET in one or more dimensions.
|
||||||
OFFSET is currently set to 16384. You likely need to decrease the
|
OFFSET is currently set to 16384. You likely need to decrease the
|
||||||
requested accuracy.
|
requested accuracy.
|
||||||
|
|
||||||
|
W: MSM mesh too small, increasing to 2 points in each direction
|
||||||
|
|
||||||
|
The global MSM grid is too small, so the number of grid points has been
|
||||||
|
increased
|
||||||
|
|
||||||
E: KSpace accuracy must be > 0
|
E: KSpace accuracy must be > 0
|
||||||
|
|
||||||
The kspace accuracy designated in the input must be greater than zero.
|
The kspace accuracy designated in the input must be greater than zero.
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "style_region.h"
|
#include "style_region.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "force.h"
|
#include "force.h"
|
||||||
|
#include "kspace.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
#include "fix.h"
|
#include "fix.h"
|
||||||
|
@ -399,6 +400,10 @@ void Domain::reset_box()
|
||||||
set_global_box();
|
set_global_box();
|
||||||
set_local_box();
|
set_local_box();
|
||||||
|
|
||||||
|
// if shrink-wrapped & kspace is defined (i.e. using MSM) call setup()
|
||||||
|
|
||||||
|
if (nonperiodic == 2 && force->kspace) force->kspace->setup();
|
||||||
|
|
||||||
// if shrink-wrapped & triclinic, re-convert to lamda coords for new box
|
// if shrink-wrapped & triclinic, re-convert to lamda coords for new box
|
||||||
// re-invoke pbc() b/c x2lamda result can be outside [0,1] due to roundoff
|
// re-invoke pbc() b/c x2lamda result can be outside [0,1] due to roundoff
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue