diff --git a/src/KOKKOS/angle_charmm_kokkos.cpp b/src/KOKKOS/angle_charmm_kokkos.cpp index e2a605b80260bfb8191c05dcf5eec74ca8024cff..346077e07119c4b3f5f45eb535f5ca698083ce30 100644 --- a/src/KOKKOS/angle_charmm_kokkos.cpp +++ b/src/KOKKOS/angle_charmm_kokkos.cpp @@ -64,7 +64,7 @@ void AngleCharmmKokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/angle_class2_kokkos.cpp b/src/KOKKOS/angle_class2_kokkos.cpp index 0232571bcc5f066be7a0ccebdbab2985b8857779..e851e9d500b10246571210a6c38daae5d472528a 100644 --- a/src/KOKKOS/angle_class2_kokkos.cpp +++ b/src/KOKKOS/angle_class2_kokkos.cpp @@ -64,7 +64,7 @@ void AngleClass2Kokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/angle_harmonic_kokkos.cpp b/src/KOKKOS/angle_harmonic_kokkos.cpp index 0d3110f9049c61f3f99b8213bfda590107f35f86..9fd237ddb3e90404aa9e9a979be2ccaba3953e6d 100644 --- a/src/KOKKOS/angle_harmonic_kokkos.cpp +++ b/src/KOKKOS/angle_harmonic_kokkos.cpp @@ -64,7 +64,7 @@ void AngleHarmonicKokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/bond_class2_kokkos.cpp b/src/KOKKOS/bond_class2_kokkos.cpp index 82dc3f382a65826d4666313620baa76ea3a3f21d..b01af92b5fddfdecf00ab2d00ec709a14c6a3741 100644 --- a/src/KOKKOS/bond_class2_kokkos.cpp +++ b/src/KOKKOS/bond_class2_kokkos.cpp @@ -60,7 +60,7 @@ void BondClass2Kokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index b10469b45e340406d207c62e09737b9e1acba7f6..cfc37bfa9f6e26afb65d97e985580d485bb65a91 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -69,7 +69,7 @@ void BondFENEKokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/bond_harmonic_kokkos.cpp b/src/KOKKOS/bond_harmonic_kokkos.cpp index aead60274734c6b6e65070a82d3b40f856f9fa66..408f59c5632b87c6177f41d7b623dbc852370eee 100644 --- a/src/KOKKOS/bond_harmonic_kokkos.cpp +++ b/src/KOKKOS/bond_harmonic_kokkos.cpp @@ -61,7 +61,7 @@ void BondHarmonicKokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/dihedral_charmm_kokkos.cpp b/src/KOKKOS/dihedral_charmm_kokkos.cpp index 0af9fc4e835305d526be3f64dc0c460cfec526ba..ee9e3d1244b0c4c22bddee191751471803c4a08e 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmm_kokkos.cpp @@ -69,7 +69,7 @@ void DihedralCharmmKokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // insure pair->ev_tally() will use 1-4 virial contribution diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index 9f7ef52cb085ca04795838cc87fdd27beac97a63..edfd1b3395ba909aec568fdd86d5867665efcad1 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -69,7 +69,7 @@ void DihedralClass2Kokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index 5406a6daafa108bceb0223a31129da776d954229..8e222ad86083e762df7e698be81b6e080d42fcbf 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -69,7 +69,7 @@ void DihedralOPLSKokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 60e21339849ed469b98c019209527baeb5e3f4c1..25bd2c732f6621278661e3fb891338a263992466 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -71,7 +71,7 @@ void ImproperClass2Kokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/improper_harmonic_kokkos.cpp b/src/KOKKOS/improper_harmonic_kokkos.cpp index cde7d60e8edd213f8a8d95e399437f43f3606dcc..9c99b35bd9ec374953985eeec173dcea58d40c76 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.cpp +++ b/src/KOKKOS/improper_harmonic_kokkos.cpp @@ -71,7 +71,7 @@ void ImproperHarmonicKokkos<DeviceType>::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp index afe2d14fcc15e67cc7420ed9383e3d220c1b3c0c..34fd4272267333e8333776b0739685c8192f20c8 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp @@ -92,7 +92,7 @@ void PairBuckCoulCutKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index fa05c99995dccc4cf4c06638292788a484101ca1..243bac5ab70805134d0c48d359ca7959f9db5054 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -111,7 +111,7 @@ void PairBuckCoulLongKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_buck_kokkos.cpp b/src/KOKKOS/pair_buck_kokkos.cpp index 02f767fa03baeca2e33a32b9bf1615627ea0cfe4..d8534f79005eec2ed926659e80e2eded9c7aefaa 100644 --- a/src/KOKKOS/pair_buck_kokkos.cpp +++ b/src/KOKKOS/pair_buck_kokkos.cpp @@ -81,7 +81,7 @@ void PairBuckKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_coul_cut_kokkos.cpp b/src/KOKKOS/pair_coul_cut_kokkos.cpp index a770d55be9e50c6a0ff7d32b73e8e31a51847a47..80ab01d91a52a77294852155cfe57494079456b3 100644 --- a/src/KOKKOS/pair_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_coul_cut_kokkos.cpp @@ -80,7 +80,7 @@ void PairCoulCutKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index e9314c2a0ad7086d5edadd4de2641ffd52e65d4d..dc85c39832cd0028c864f842b99f9047ae9bf25e 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -87,7 +87,7 @@ void PairCoulDebyeKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index 948a234a4ac56503ecdef29ff3d5a68505b3242c..f2063bdc08cf6a722c376aa4c64547cfcfbeb458 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -80,7 +80,7 @@ void PairCoulDSFKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index dcf4943104d349d9b52d63a2dd66b680b11c229f..7dbadf4834f27f1cca2c0ea2db956cf01bc104ad 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -104,7 +104,7 @@ void PairCoulLongKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index 55b19958a348b545446b37d4c32fcdd8715ef530..8049ba00310a1e932257e51a4e3fc51b077eae6f 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -75,7 +75,7 @@ void PairCoulWolfKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index 491ec10f6631b733c94c29d3deabffd433a50901..45c320bc516fcfd13816a6dfe809ec7296d035c5 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -74,7 +74,7 @@ void PairEAMAlloyKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 006db6abc2ba5394d05098d5ce960bc7c4b994f0..b9fa82740aeb0d59bba5e1c5d5d9f6e762292941 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -74,7 +74,7 @@ void PairEAMFSKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index 656dd11c62c9ceab881ba8e21ea1e92755842f04..e4128de72265b609e9d86723d8acc9100e446346 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -69,7 +69,7 @@ void PairEAMKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp index a4e0fa963d3f92eba02ef7a1b7f93660463441c0..c00b1fbae43684b720a655b6a53597d0bf3a7330 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp @@ -112,7 +112,7 @@ void PairLJCharmmCoulCharmmImplicitKokkos<DeviceType>::compute(int eflag_in, int if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp index 1e5509c39c6b238b22021f1371094c1b1c3c166f..c88c7db2e3f614a97b57d0db6b8d9d9992b70fb2 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp @@ -112,7 +112,7 @@ void PairLJCharmmCoulCharmmKokkos<DeviceType>::compute(int eflag_in, int vflag_i if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index 2f94c47baeb345ce75c2796b95168e1eb3f2e5ed..8ebc5f87f3beb0e1266e4c8039ae43f29e028c1f 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -112,7 +112,7 @@ void PairLJCharmmCoulLongKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp index 4283cfa981e276b0fd21c557e4ab3ec4da3669de..936eae79d518e1735243209916ffee90e71112e2 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp @@ -89,7 +89,7 @@ void PairLJClass2CoulCutKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index adbffff50ff5921d93b0b3c8fbc1bf8eacd341ce..268213cdbcbc66e9565efa7a1917104c28911fa1 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -97,7 +97,7 @@ void PairLJClass2CoulLongKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_class2_kokkos.cpp b/src/KOKKOS/pair_lj_class2_kokkos.cpp index c26aa4f467d3246403ebe6c1d8cc2ff64261662d..c899327d7c993802bf0655106aaa452f1e4726f6 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_kokkos.cpp @@ -89,7 +89,7 @@ void PairLJClass2Kokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp index e9f587d0ccf309902fcda93acb4e520c00b4717f..f4de48f176de8b9467075f0001cfe9fae555a503 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp @@ -89,7 +89,7 @@ void PairLJCutCoulCutKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp index 0af781affddb3e6f91b3be47ca332f6997aa54a3..ad51dd0a889dc2a74bfc5699df7de9daae94e2eb 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp @@ -93,7 +93,7 @@ void PairLJCutCoulDebyeKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index 5ddf035b62fefe1e7af5f5aca61afcaad1a6e59b..89f263113eca976e1327793575c5743202928b56 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -101,7 +101,7 @@ void PairLJCutCoulDSFKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index e3754cdb5d59a46460aefe69213ba4211e8e85f2..4de51ca8d2f5ef64e5ab864d4a5599a738d8609f 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -101,7 +101,7 @@ void PairLJCutCoulLongKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index 9a2a7e23a985e622ba36e5e602f56d8859990a08..ea78b73711423e8ec268a638aefda6c73814ddc9 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -89,7 +89,7 @@ void PairLJCutKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_expand_kokkos.cpp b/src/KOKKOS/pair_lj_expand_kokkos.cpp index cdede8bd52a5859a7c26fb37856f26cbcca9bbc3..6b62150632de7b1a563a6a6a1918a52d7017beb8 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_kokkos.cpp @@ -88,7 +88,7 @@ void PairLJExpandKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp index 0ca8375657b50137ad020e0e6a21877414ff1066..0c492131dd6dcaf83f415cb6d029052b2a04c567 100644 --- a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp @@ -103,7 +103,7 @@ void PairLJGromacsCoulGromacsKokkos<DeviceType>::compute(int eflag_in, int vflag if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp index e6606d30cff23673d5b0c08e34ab7934eff25eff..76d7abbe289e5dd2ce4b811cfc5ae888740e0375 100644 --- a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp @@ -100,7 +100,7 @@ void PairLJGromacsKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_lj_sdk_kokkos.cpp b/src/KOKKOS/pair_lj_sdk_kokkos.cpp index 2d74e37192ac7d72ceda9adf939ccc71da2bc7d2..41561c29889e6d991400e3249e22f578739c7509 100644 --- a/src/KOKKOS/pair_lj_sdk_kokkos.cpp +++ b/src/KOKKOS/pair_lj_sdk_kokkos.cpp @@ -88,7 +88,7 @@ void PairLJSDKKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_morse_kokkos.cpp b/src/KOKKOS/pair_morse_kokkos.cpp index e0685f13762cda8109ad544c700f261d4de6b1c3..3201fad215f5587b115402d1fe481c7f9f385180 100644 --- a/src/KOKKOS/pair_morse_kokkos.cpp +++ b/src/KOKKOS/pair_morse_kokkos.cpp @@ -93,7 +93,7 @@ void PairMorseKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index 6b2c1ca04bb277db1dd1e59a5238eaf345345738..a8950a0c79c542e3a98a91ceb5b094ceb0b5da1b 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -80,7 +80,7 @@ void PairSWKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index 93556635c203ecfc064bcc1e10c2863bdefbb257..7f763baae6fe7b40eb4830d243c0b714a6bcf2b1 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -86,7 +86,7 @@ void PairTableKokkos<DeviceType>::compute_style(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index 0f5e93979490ea5bc401155562b46ac692b26e45..75280c8f7c381c668fa0cd1d41c48917d166dfc1 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -164,7 +164,7 @@ void PairTersoffKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index 1f66da409d08a52029d2b4a7ee2bd3a63dcd33f6..d16a7fc4d79b5572552dcf8d955c7c2a4a7e6233 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -164,7 +164,7 @@ void PairTersoffMODKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index 264b769df311e93800ca509558f10ef57c3533d8..e9bae49fb77ca55530e280df9e391a58e7c85715 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -178,7 +178,7 @@ void PairTersoffZBLKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index 0e972d24640bba5f62a96c451d3084405305c86b..f81af0b149659994e68ccf93a25ddd6beb57b314 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -79,7 +79,7 @@ void PairVashishtaKokkos<DeviceType>::compute(int eflag_in, int vflag_in) if (neighflag == FULL) no_virial_fdotr_compute = 1; - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = vflag_fdotr = 0; // reallocate per-atom arrays if necessary diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 7b88563cbb2569fd5198ded0551f21ed6dbf89bf..c59bd89e51303784efef00d44be83c84b3960a7c 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -615,7 +615,7 @@ void PPPMKokkos<DeviceType>::compute(int eflag, int vflag) // set energy/virial flags // invoke allocate_peratom() if needed for first time - if (eflag || vflag) ev_setup(eflag,vflag); + if (eflag || vflag) ev_setup(eflag,vflag,0); else evflag = evflag_atom = eflag_global = vflag_global = eflag_atom = vflag_atom = 0; diff --git a/src/angle.cpp b/src/angle.cpp index 14433fc44d78eaf09d4594663ac72b4e7329fde9..1366c48865b5daa516b58bba254aa0171eaf3da0 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -76,7 +76,7 @@ void Angle::init() see integrate::ev_set() for values of eflag (0-3) and vflag (0-6) ------------------------------------------------------------------------- */ -void Angle::ev_setup(int eflag, int vflag) +void Angle::ev_setup(int eflag, int vflag, int alloc) { int i,n; @@ -94,25 +94,29 @@ void Angle::ev_setup(int eflag, int vflag) if (eflag_atom && atom->nmax > maxeatom) { maxeatom = atom->nmax; - memory->destroy(eatom); - memory->create(eatom,comm->nthreads*maxeatom,"angle:eatom"); + if (alloc) { + memory->destroy(eatom); + memory->create(eatom,comm->nthreads*maxeatom,"angle:eatom"); + } } if (vflag_atom && atom->nmax > maxvatom) { maxvatom = atom->nmax; - memory->destroy(vatom); - memory->create(vatom,comm->nthreads*maxvatom,6,"angle:vatom"); + if (alloc) { + memory->destroy(vatom); + memory->create(vatom,comm->nthreads*maxvatom,6,"angle:vatom"); + } } // zero accumulators if (eflag_global) energy = 0.0; if (vflag_global) for (i = 0; i < 6; i++) virial[i] = 0.0; - if (eflag_atom) { + if (eflag_atom && alloc) { n = atom->nlocal; if (force->newton_bond) n += atom->nghost; for (i = 0; i < n; i++) eatom[i] = 0.0; } - if (vflag_atom) { + if (vflag_atom && alloc) { n = atom->nlocal; if (force->newton_bond) n += atom->nghost; for (i = 0; i < n; i++) { diff --git a/src/angle.h b/src/angle.h index 8c8129bbbb313432beea11f46a6b6fcb20831e53..000c3fe916d84c1766eeb4dd09dbd082fba61387 100644 --- a/src/angle.h +++ b/src/angle.h @@ -58,7 +58,7 @@ class Angle : protected Pointers { int vflag_either,vflag_global,vflag_atom; int maxeatom,maxvatom; - void ev_setup(int, int); + void ev_setup(int, int, int alloc = 1); void ev_tally(int, int, int, int, int, double, double *, double *, double, double, double, double, double, double); }; diff --git a/src/bond.cpp b/src/bond.cpp index 8074d9767766c9524008ed4bd9c1794760daf720..5a33f107cf44ade599dff8b5a9a9b81f00d04386 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -79,7 +79,7 @@ void Bond::init() see integrate::ev_set() for values of eflag (0-3) and vflag (0-6) ------------------------------------------------------------------------- */ -void Bond::ev_setup(int eflag, int vflag) +void Bond::ev_setup(int eflag, int vflag, int alloc) { int i,n; @@ -97,25 +97,29 @@ void Bond::ev_setup(int eflag, int vflag) if (eflag_atom && atom->nmax > maxeatom) { maxeatom = atom->nmax; - memory->destroy(eatom); - memory->create(eatom,comm->nthreads*maxeatom,"bond:eatom"); + if (alloc) { + memory->destroy(eatom); + memory->create(eatom,comm->nthreads*maxeatom,"bond:eatom"); + } } if (vflag_atom && atom->nmax > maxvatom) { maxvatom = atom->nmax; - memory->destroy(vatom); - memory->create(vatom,comm->nthreads*maxvatom,6,"bond:vatom"); + if (alloc) { + memory->destroy(vatom); + memory->create(vatom,comm->nthreads*maxvatom,6,"bond:vatom"); + } } // zero accumulators if (eflag_global) energy = 0.0; if (vflag_global) for (i = 0; i < 6; i++) virial[i] = 0.0; - if (eflag_atom) { + if (eflag_atom && alloc) { n = atom->nlocal; if (force->newton_bond) n += atom->nghost; for (i = 0; i < n; i++) eatom[i] = 0.0; } - if (vflag_atom) { + if (vflag_atom && alloc) { n = atom->nlocal; if (force->newton_bond) n += atom->nghost; for (i = 0; i < n; i++) { diff --git a/src/bond.h b/src/bond.h index ffa1f5fb051f0732bce91d2c9800d8ef7452c96c..41604387a3f8e056a92e7b08a25007a062ca3021 100644 --- a/src/bond.h +++ b/src/bond.h @@ -60,7 +60,7 @@ class Bond : protected Pointers { int vflag_either,vflag_global,vflag_atom; int maxeatom,maxvatom; - void ev_setup(int, int); + void ev_setup(int, int, int alloc = 1); void ev_tally(int, int, int, int, double, double, double, double, double); }; diff --git a/src/dihedral.cpp b/src/dihedral.cpp index 4c941d7225c47e0094d950933caf30be80172496..f5c1c6c44c143604cec5ec3aa9b1bbd8ea03688d 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -76,7 +76,7 @@ void Dihedral::init() see integrate::ev_set() for values of eflag (0-3) and vflag (0-6) ------------------------------------------------------------------------- */ -void Dihedral::ev_setup(int eflag, int vflag) +void Dihedral::ev_setup(int eflag, int vflag, int alloc) { int i,n; @@ -94,25 +94,29 @@ void Dihedral::ev_setup(int eflag, int vflag) if (eflag_atom && atom->nmax > maxeatom) { maxeatom = atom->nmax; - memory->destroy(eatom); - memory->create(eatom,comm->nthreads*maxeatom,"dihedral:eatom"); + if (alloc) { + memory->destroy(eatom); + memory->create(eatom,comm->nthreads*maxeatom,"dihedral:eatom"); + } } if (vflag_atom && atom->nmax > maxvatom) { maxvatom = atom->nmax; - memory->destroy(vatom); - memory->create(vatom,comm->nthreads*maxvatom,6,"dihedral:vatom"); + if (alloc) { + memory->destroy(vatom); + memory->create(vatom,comm->nthreads*maxvatom,6,"dihedral:vatom"); + } } // zero accumulators if (eflag_global) energy = 0.0; if (vflag_global) for (i = 0; i < 6; i++) virial[i] = 0.0; - if (eflag_atom) { + if (eflag_atom && alloc) { n = atom->nlocal; if (force->newton_bond) n += atom->nghost; for (i = 0; i < n; i++) eatom[i] = 0.0; } - if (vflag_atom) { + if (vflag_atom && alloc) { n = atom->nlocal; if (force->newton_bond) n += atom->nghost; for (i = 0; i < n; i++) { diff --git a/src/dihedral.h b/src/dihedral.h index 5f3909244f8c4a9d09ae443c3037fd2bbd83ce35..d27810c4d6e79ede7d5875daced83861f2461346 100644 --- a/src/dihedral.h +++ b/src/dihedral.h @@ -56,7 +56,7 @@ class Dihedral : protected Pointers { int vflag_either,vflag_global,vflag_atom; int maxeatom,maxvatom; - void ev_setup(int, int); + void ev_setup(int, int, int alloc = 1); void ev_tally(int, int, int, int, int, int, double, double *, double *, double *, double, double, double, double, double, double, double, double, double); diff --git a/src/improper.cpp b/src/improper.cpp index e20d0d2666aa8cccd63efb75fbe4543b793fc204..089fc43aad09205a0e72aecaa886ef3b78a87d50 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -74,7 +74,7 @@ void Improper::init() see integrate::ev_set() for values of eflag (0-3) and vflag (0-6) ------------------------------------------------------------------------- */ -void Improper::ev_setup(int eflag, int vflag) +void Improper::ev_setup(int eflag, int vflag, int alloc) { int i,n; @@ -92,25 +92,29 @@ void Improper::ev_setup(int eflag, int vflag) if (eflag_atom && atom->nmax > maxeatom) { maxeatom = atom->nmax; - memory->destroy(eatom); - memory->create(eatom,comm->nthreads*maxeatom,"improper:eatom"); + if (alloc) { + memory->destroy(eatom); + memory->create(eatom,comm->nthreads*maxeatom,"improper:eatom"); + } } if (vflag_atom && atom->nmax > maxvatom) { maxvatom = atom->nmax; - memory->destroy(vatom); - memory->create(vatom,comm->nthreads*maxvatom,6,"improper:vatom"); + if (alloc) { + memory->destroy(vatom); + memory->create(vatom,comm->nthreads*maxvatom,6,"improper:vatom"); + } } // zero accumulators if (eflag_global) energy = 0.0; if (vflag_global) for (i = 0; i < 6; i++) virial[i] = 0.0; - if (eflag_atom) { + if (eflag_atom && alloc) { n = atom->nlocal; if (force->newton_bond) n += atom->nghost; for (i = 0; i < n; i++) eatom[i] = 0.0; } - if (vflag_atom) { + if (vflag_atom && alloc) { n = atom->nlocal; if (force->newton_bond) n += atom->nghost; for (i = 0; i < n; i++) { diff --git a/src/improper.h b/src/improper.h index be78b6acf9190dc56ab28f0f275a13eeaad64eca..df3c966cdc4704b5d91c03332274fabd0e3ab9b5 100644 --- a/src/improper.h +++ b/src/improper.h @@ -56,7 +56,7 @@ class Improper : protected Pointers { int vflag_either,vflag_global,vflag_atom; int maxeatom,maxvatom; - void ev_setup(int, int); + void ev_setup(int, int, int alloc = 1); void ev_tally(int, int, int, int, int, int, double, double *, double *, double *, double, double, double, double, double, double, double, double, double); diff --git a/src/kspace.cpp b/src/kspace.cpp index 48626346b185a76a712f20715f3471a16451b3a1..c2113cdf767c899d733ed9dc3d44162ff140563f 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -206,7 +206,7 @@ void KSpace::pair_check() see integrate::ev_set() for values of eflag (0-3) and vflag (0-6) ------------------------------------------------------------------------- */ -void KSpace::ev_setup(int eflag, int vflag) +void KSpace::ev_setup(int eflag, int vflag, int alloc) { int i,n; @@ -227,25 +227,29 @@ void KSpace::ev_setup(int eflag, int vflag) if (eflag_atom && atom->nmax > maxeatom) { maxeatom = atom->nmax; - memory->destroy(eatom); - memory->create(eatom,maxeatom,"kspace:eatom"); + if (alloc) { + memory->destroy(eatom); + memory->create(eatom,maxeatom,"kspace:eatom"); + } } if (vflag_atom && atom->nmax > maxvatom) { maxvatom = atom->nmax; - memory->destroy(vatom); - memory->create(vatom,maxvatom,6,"kspace:vatom"); + if (alloc) { + memory->destroy(vatom); + memory->create(vatom,maxvatom,6,"kspace:vatom"); + } } // zero accumulators if (eflag_global) energy = 0.0; if (vflag_global) for (i = 0; i < 6; i++) virial[i] = 0.0; - if (eflag_atom) { + if (eflag_atom && alloc) { n = atom->nlocal; if (tip4pflag) n += atom->nghost; for (i = 0; i < n; i++) eatom[i] = 0.0; } - if (vflag_atom) { + if (vflag_atom && alloc) { n = atom->nlocal; if (tip4pflag) n += atom->nghost; for (i = 0; i < n; i++) { diff --git a/src/kspace.h b/src/kspace.h index c81854e90a4e319f0463ab4d1604dab09923a538..ad29c214728f56eb0eec5739aeac18b076c752b9 100644 --- a/src/kspace.h +++ b/src/kspace.h @@ -197,7 +197,7 @@ class KSpace : protected Pointers { int kx_ewald,ky_ewald,kz_ewald; // kspace settings for Ewald sum void pair_check(); - void ev_setup(int, int); + void ev_setup(int, int, int alloc = 1); double estimate_table_accuracy(double, double); }; diff --git a/src/pair.cpp b/src/pair.cpp index 685280cfce8262952830306be1f225c3cc3c7f3f..d90ed8bb43a90e422dccf6b39a296b092d2e938f 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -749,7 +749,7 @@ void Pair::del_tally_callback(Compute *ptr) see integrate::ev_set() for values of eflag (0-3) and vflag (0-6) ------------------------------------------------------------------------- */ -void Pair::ev_setup(int eflag, int vflag) +void Pair::ev_setup(int eflag, int vflag, int alloc) { int i,n; @@ -767,13 +767,17 @@ void Pair::ev_setup(int eflag, int vflag) if (eflag_atom && atom->nmax > maxeatom) { maxeatom = atom->nmax; - memory->destroy(eatom); - memory->create(eatom,comm->nthreads*maxeatom,"pair:eatom"); + if (alloc) { + memory->destroy(eatom); + memory->create(eatom,comm->nthreads*maxeatom,"pair:eatom"); + } } if (vflag_atom && atom->nmax > maxvatom) { maxvatom = atom->nmax; - memory->destroy(vatom); - memory->create(vatom,comm->nthreads*maxvatom,6,"pair:vatom"); + if (alloc) { + memory->destroy(vatom); + memory->create(vatom,comm->nthreads*maxvatom,6,"pair:vatom"); + } } // zero accumulators @@ -782,12 +786,12 @@ void Pair::ev_setup(int eflag, int vflag) if (eflag_global) eng_vdwl = eng_coul = 0.0; if (vflag_global) for (i = 0; i < 6; i++) virial[i] = 0.0; - if (eflag_atom) { + if (eflag_atom && alloc) { n = atom->nlocal; if (force->newton) n += atom->nghost; for (i = 0; i < n; i++) eatom[i] = 0.0; } - if (vflag_atom) { + if (vflag_atom && alloc) { n = atom->nlocal; if (force->newton) n += atom->nghost; for (i = 0; i < n; i++) { diff --git a/src/pair.h b/src/pair.h index 16746a29a8798d15017ad3f28400d8bf8bf4e809..3f66c6095a8199b8b4530761af014854efce0914 100644 --- a/src/pair.h +++ b/src/pair.h @@ -221,7 +221,7 @@ class Pair : protected Pointers { int copymode; // if set, do not deallocate during destruction // required when classes are used as functors by Kokkos - virtual void ev_setup(int, int); + virtual void ev_setup(int, int, int alloc = 1); void ev_unset(); void ev_tally_full(int, double, double, double, double, double, double); void ev_tally_xyz_full(int, double, double,