Unverified Commit 8e43a459 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Detect and error out on invalid kspace mesh settings. make coulomb and...

Detect and error out on invalid kspace mesh settings. make coulomb and dispersion settings consistent
parent 92f078cf
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -7097,6 +7097,18 @@ Self-explanatory. :dd

One or more GPUs must be used when Kokkos is compiled for CUDA. :dd

{Kspace_modify mesh parameter must be all zero or all positive} :dt

Valid kspace mesh parameters are >0. The code will try to auto-detect
suitable values when all three mesh sizes are set to zero (the default). :dd

{Kspace_modify mesh/disp parameter must be all zero or all positive} :dt

Valid kspace mesh/disp parameters are >0. The code will try to auto-detect
suitable values when all three mesh sizes are set to zero [and]
the required accuracy via {force/disp/real} as well as
{force/disp/kspace} is set. :dd

{Kspace style does not support compute group/group} :dt

Self-explanatory. :dd
+10 −2
Original line number Diff line number Diff line
@@ -443,7 +443,11 @@ void KSpace::modify_params(int narg, char **arg)
      nx_pppm = nx_msm_max = force->inumeric(FLERR,arg[iarg+1]);
      ny_pppm = ny_msm_max = force->inumeric(FLERR,arg[iarg+2]);
      nz_pppm = nz_msm_max = force->inumeric(FLERR,arg[iarg+3]);
      if (nx_pppm == 0 && ny_pppm == 0 && nz_pppm == 0) gridflag = 0;
      if (nx_pppm == 0 && ny_pppm == 0 && nz_pppm == 0)
        gridflag = 0;
      else if (nx_pppm <= 0 || ny_pppm <= 0 || nz_pppm <= 0)
        error->all(FLERR,"Kspace_modify mesh parameters must be all "
                   "zero or all positive");
      else gridflag = 1;
      iarg += 4;
    } else if (strcmp(arg[iarg],"mesh/disp") == 0) {
@@ -451,7 +455,11 @@ void KSpace::modify_params(int narg, char **arg)
      nx_pppm_6 = force->inumeric(FLERR,arg[iarg+1]);
      ny_pppm_6 = force->inumeric(FLERR,arg[iarg+2]);
      nz_pppm_6 = force->inumeric(FLERR,arg[iarg+3]);
      if (nx_pppm_6 == 0 || ny_pppm_6 == 0 || nz_pppm_6 == 0) gridflag_6 = 0;
      if (nx_pppm_6 == 0 && ny_pppm_6 == 0 && nz_pppm_6 == 0)
        gridflag_6 = 0;
      else if (nx_pppm_6 <= 0 || ny_pppm_6 <= 0 || nz_pppm_6 == 0)
        error->all(FLERR,"Kspace_modify mesh/disp parameters must be all "
                   "zero or all positive");
      else gridflag_6 = 1;
      iarg += 4;
    } else if (strcmp(arg[iarg],"order") == 0) {
+12 −0
Original line number Diff line number Diff line
@@ -251,6 +251,18 @@ E: Bad kspace_modify slab parameter

Kspace_modify value for the slab/volume keyword must be >= 2.0.

E: Kspace_modify mesh parameter must be all zero or all positive

Valid kspace mesh parameters are >0. The code will try to auto-detect
suitable values when all three mesh sizes are set to zero (the default).

E: Kspace_modify mesh/disp parameter must be all zero or all positive

Valid kspace mesh/disp parameters are >0. The code will try to auto-detect
suitable values when all three mesh sizes are set to zero [and]
the required accuracy via {force/disp/real} as well as
{force/disp/kspace} is set.

W: Kspace_modify slab param < 2.0 may cause unphysical behavior

The kspace_modify slab parameter should be larger to insure periodic