From 620dd09509b9ec7cbecbe1c0acc971e242617f19 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Mar 2021 21:36:14 -0500 Subject: [PATCH] delete active fixes when unloading fix style plugin --- src/plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugin.cpp b/src/plugin.cpp index d2ea0943ad..0eece6793e 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -236,6 +236,10 @@ namespace LAMMPS_NS lmp->force->create_pair("none",0); } } + } else if (pstyle == "fix") { + for (int ifix = lmp->modify->find_fix_by_style(name); + ifix >= 0; ifix = lmp->modify->find_fix_by_style(name)) + lmp->modify->delete_fix(ifix); } // if reference count is down to zero, close DSO handle.