diff --git a/src/INTEL/pppm_disp_intel.cpp b/src/INTEL/pppm_disp_intel.cpp index fdff23fe5e..319d070e66 100644 --- a/src/INTEL/pppm_disp_intel.cpp +++ b/src/INTEL/pppm_disp_intel.cpp @@ -124,8 +124,7 @@ void PPPMDispIntel::init() _use_lrt = fix->lrt(); if (_use_lrt) - error->all(FLERR, - "LRT mode is currently not supported for pppm/disp/intel"); + error->all(FLERR, "LRT mode is currently not supported for pppm/disp/intel"); // For vectorization, we need some padding in the end @@ -142,19 +141,15 @@ void PPPMDispIntel::init() if (_use_table) { rho_points = 5000; memory->destroy(rho_lookup); - memory->create(rho_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER, - "pppmdispintel:rho_lookup"); + memory->create(rho_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,"pppmdispintel:rho_lookup"); memory->destroy(rho6_lookup); - memory->create(rho6_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER, - "pppmdispintel:rho6_lookup"); + memory->create(rho6_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,"pppmdispintel:rho6_lookup"); if (differentiation_flag == 1) { memory->destroy(drho_lookup); - memory->create(drho_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER, - "pppmdispintel:drho_lookup"); + memory->create(drho_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,"pppmdispintel:drho_lookup"); memory->destroy(drho6_lookup); - memory->create(drho6_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER, - "pppmdispintel:drho6_lookup"); + memory->create(drho6_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,"pppmdispintel:drho6_lookup"); } precompute_rho(); } diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index f76cab6f0f..912ae36f6f 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -138,7 +138,7 @@ PPPMKokkos::~PPPMKokkos() template void PPPMKokkos::init() { - if (me == 0) utils::logmesg(lmp,"PPPM initialization ...\n"); + if (me == 0) utils::logmesg(lmp,"PPPM Kokkos initialization ...\n"); // error check @@ -146,6 +146,10 @@ void PPPMKokkos::init() error->all(FLERR,"Cannot (yet) use PPPM Kokkos with 'kspace_modify diff ad'"); triclinic_check(); + + if (triclinic != domain->triclinic) + error->all(FLERR,"Must redefine kspace_style after changing to triclinic box"); + if (domain->triclinic && slabflag) error->all(FLERR,"Cannot (yet) use PPPM with triclinic box and slab correction"); if (domain->dimension == 2) diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 84a21b46e6..ffa34a7e14 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -242,12 +242,12 @@ void PPPMDisp::settings(int narg, char **arg) PPPMDisp::~PPPMDisp() { - delete [] factors; - delete [] B; + delete[] factors; + delete[] B; B = nullptr; - delete [] cii; + delete[] cii; cii = nullptr; - delete [] csumi; + delete[] csumi; csumi = nullptr; PPPMDisp::deallocate(); PPPMDisp::deallocate_peratom(); @@ -268,6 +268,9 @@ void PPPMDisp::init() triclinic_check(); + if (triclinic != domain->triclinic) + error->all(FLERR,"Must redefine kspace_style after changing to triclinic box"); + if (domain->dimension == 2) error->all(FLERR,"Cannot use PPPMDisp with 2d simulation"); if (comm->style != Comm::BRICK) @@ -1277,7 +1280,7 @@ void PPPMDisp::init_coeffs() int n = atom->ntypes; int converged; - delete [] B; + delete[] B; B = nullptr; // no mixing rule or arithmetic @@ -3352,10 +3355,10 @@ void PPPMDisp::calc_csum() int ntypes = atom->ntypes; int i,j,k; - delete [] cii; + delete[] cii; cii = new double[ntypes+1]; for (i = 0; i<=ntypes; i++) cii[i] = 0.0; - delete [] csumi; + delete[] csumi; csumi = new double[ntypes+1]; for (i = 0; i<=ntypes; i++) csumi[i] = 0.0; int *neach = new int[ntypes+1]; @@ -3447,8 +3450,8 @@ void PPPMDisp::calc_csum() } } - delete [] neach; - delete [] neach_all; + delete[] neach; + delete[] neach_all; } /* ---------------------------------------------------------------------- @@ -6538,9 +6541,9 @@ void PPPMDisp::fieldforce_none_ik() } } - delete [] ekx; - delete [] eky; - delete [] ekz; + delete[] ekx; + delete[] eky; + delete[] ekz; } /* ---------------------------------------------------------------------- @@ -6660,9 +6663,9 @@ void PPPMDisp::fieldforce_none_ad() } } - delete [] ekx; - delete [] eky; - delete [] ekz; + delete[] ekx; + delete[] eky; + delete[] ekz; } /* ---------------------------------------------------------------------- @@ -6756,13 +6759,13 @@ void PPPMDisp::fieldforce_none_peratom() } } - delete [] u_pa; - delete [] v0; - delete [] v1; - delete [] v2; - delete [] v3; - delete [] v4; - delete [] v5; + delete[] u_pa; + delete[] v0; + delete[] v1; + delete[] v2; + delete[] v3; + delete[] v4; + delete[] v5; } /* ----------------------------------------------------------------------