From 1c8f427e8a4fbcbebb5504aeb1aa095f6337a339 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jan 2022 09:09:19 -0500 Subject: [PATCH] detect when MSM::setup() is called before proper initialization and error out --- src/KSPACE/msm.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index 9fd581618f..da4a2ad658 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -285,6 +285,11 @@ double MSM::estimate_total_error() void MSM::setup() { + // change_box may trigger MSM::setup() before MSM::init() was called + // error out and request full initialization. + + if (!delxinv) error->all(FLERR, "MSM must be fully initialized for this operation"); + double *prd; double a = cutoff;