From 15ce976dbaf05de7e048e1dc7096ffbeb264e2ae Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Apr 2021 16:32:27 -0400 Subject: [PATCH] simplify --- src/velocity.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/velocity.cpp b/src/velocity.cpp index e0c80baa91..30d479b0eb 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -578,13 +578,9 @@ void Velocity::scale(int /*narg*/, char **arg) int tflag = 0; if (temperature == nullptr) { - char **arg = new char*[3]; - arg[0] = (char *) "velocity_temp"; - arg[1] = group->names[igroup]; - arg[2] = (char *) "temp"; - temperature = new ComputeTemp(lmp,3,arg); + modify->add_compute(fmt::format("velocity_temp {} temp")); + temperature = modify->compute[modify->ncompute-1]; tflag = 1; - delete [] arg; } // initialize temperature computation