diff --git a/src/GPU/fix_npt_gpu.cpp b/src/GPU/fix_npt_gpu.cpp index 073d5dc6c1..3847f31a65 100644 --- a/src/GPU/fix_npt_gpu.cpp +++ b/src/GPU/fix_npt_gpu.cpp @@ -35,7 +35,7 @@ FixNPTGPU::FixNPTGPU(LAMMPS *lmp, int narg, char **arg) : // and thus its KE/temperature contribution should use group all id_temp = utils::strdup(std::string(id)+"_temp"); - modify->add_compute(id_temp+" all temp"); + modify->add_compute(std::string(id_temp)+" all temp"); tcomputeflag = 1; // create a new compute pressure style diff --git a/src/USER-OMP/fix_npt_omp.cpp b/src/USER-OMP/fix_npt_omp.cpp index 54328803f4..4037dd928e 100644 --- a/src/USER-OMP/fix_npt_omp.cpp +++ b/src/USER-OMP/fix_npt_omp.cpp @@ -34,7 +34,6 @@ FixNPTOMP::FixNPTOMP(LAMMPS *lmp, int narg, char **arg) : // compute group = all since pressure is always global (group all) // and thus its KE/temperature contribution should use group all - id_temp = utils::strdup(std::string(id)+"_temp"); modify->add_compute(std::string(id_temp)+" all temp"); tcomputeflag = 1;