Add missing copymode to parent classes
This commit is contained in:
@ -237,15 +237,19 @@ void PairBuckCoulCutKokkos<DeviceType>::allocate()
|
|||||||
PairBuckCoulCut::allocate();
|
PairBuckCoulCut::allocate();
|
||||||
|
|
||||||
int n = atom->ntypes;
|
int n = atom->ntypes;
|
||||||
|
|
||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq");
|
memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq");
|
||||||
d_cutsq = k_cutsq.template view<DeviceType>();
|
d_cutsq = k_cutsq.template view<DeviceType>();
|
||||||
|
|
||||||
memory->destroy(cut_ljsq);
|
memory->destroy(cut_ljsq);
|
||||||
memoryKK->create_kokkos(k_cut_ljsq,cut_ljsq,n+1,n+1,"pair:cut_ljsq");
|
memoryKK->create_kokkos(k_cut_ljsq,cut_ljsq,n+1,n+1,"pair:cut_ljsq");
|
||||||
d_cut_ljsq = k_cut_ljsq.template view<DeviceType>();
|
d_cut_ljsq = k_cut_ljsq.template view<DeviceType>();
|
||||||
|
|
||||||
memory->destroy(cut_coulsq);
|
memory->destroy(cut_coulsq);
|
||||||
memoryKK->create_kokkos(k_cut_coulsq,cut_coulsq,n+1,n+1,"pair:cut_coulsq");
|
memoryKK->create_kokkos(k_cut_coulsq,cut_coulsq,n+1,n+1,"pair:cut_coulsq");
|
||||||
d_cut_coulsq = k_cut_coulsq.template view<DeviceType>();
|
d_cut_coulsq = k_cut_coulsq.template view<DeviceType>();
|
||||||
|
|
||||||
k_params = Kokkos::DualView<params_buck_coul**,Kokkos::LayoutRight,DeviceType>("PairBuckCoulCut::params",n+1,n+1);
|
k_params = Kokkos::DualView<params_buck_coul**,Kokkos::LayoutRight,DeviceType>("PairBuckCoulCut::params",n+1,n+1);
|
||||||
params = k_params.template view<DeviceType>();
|
params = k_params.template view<DeviceType>();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,6 +60,8 @@ PairLJCutCoulLong::PairLJCutCoulLong(LAMMPS *lmp) : Pair(lmp)
|
|||||||
|
|
||||||
PairLJCutCoulLong::~PairLJCutCoulLong()
|
PairLJCutCoulLong::~PairLJCutCoulLong()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
|
|||||||
@ -47,6 +47,8 @@ PairLJSDK::PairLJSDK(LAMMPS *lmp) : Pair(lmp)
|
|||||||
|
|
||||||
PairLJSDK::~PairLJSDK()
|
PairLJSDK::~PairLJSDK()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(lj_type);
|
memory->destroy(lj_type);
|
||||||
|
|||||||
@ -54,6 +54,8 @@ PairTableRX::PairTableRX(LAMMPS *lmp) : PairTable(lmp)
|
|||||||
|
|
||||||
PairTableRX::~PairTableRX()
|
PairTableRX::~PairTableRX()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
delete [] site1;
|
delete [] site1;
|
||||||
delete [] site2;
|
delete [] site2;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,6 +36,8 @@ PairCoulCut::PairCoulCut(LAMMPS *lmp) : Pair(lmp) {
|
|||||||
|
|
||||||
PairCoulCut::~PairCoulCut()
|
PairCoulCut::~PairCoulCut()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
|
|||||||
@ -46,6 +46,8 @@ PairLJCut::PairLJCut(LAMMPS *lmp) : Pair(lmp)
|
|||||||
|
|
||||||
PairLJCut::~PairLJCut()
|
PairLJCut::~PairLJCut()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
|
|||||||
@ -39,6 +39,8 @@ PairLJCutCoulCut::PairLJCutCoulCut(LAMMPS *lmp) : Pair(lmp)
|
|||||||
|
|
||||||
PairLJCutCoulCut::~PairLJCutCoulCut()
|
PairLJCutCoulCut::~PairLJCutCoulCut()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
|
|||||||
@ -36,6 +36,8 @@ PairMorse::PairMorse(LAMMPS *lmp) : Pair(lmp)
|
|||||||
|
|
||||||
PairMorse::~PairMorse()
|
PairMorse::~PairMorse()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
|
|||||||
@ -35,6 +35,8 @@ PairYukawa::PairYukawa(LAMMPS *lmp) : Pair(lmp)
|
|||||||
|
|
||||||
PairYukawa::~PairYukawa()
|
PairYukawa::~PairYukawa()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
|
|||||||
Reference in New Issue
Block a user