simplify by using utils::strdup() and reorder includes
This commit is contained in:
@ -12,10 +12,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nph_asphere.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -36,21 +35,15 @@ FixNPHAsphere::FixNPHAsphere(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
modify->add_compute(tcmd + " all temp/asphere");
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/asphere",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
modify->add_compute(pcmd + " all pressure " + std::string(id_temp));
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -12,10 +12,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_npt_asphere.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,21 +34,15 @@ FixNPTAsphere::FixNPTAsphere(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
modify->add_compute(tcmd + " all temp/asphere");
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/asphere",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
modify->add_compute(pcmd + " all pressure " + std::string(id_temp));
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -16,10 +16,11 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nve_asphere.h"
|
||||
#include "math_extra.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "error.h"
|
||||
#include "math_extra.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
@ -12,12 +12,10 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nvt_asphere.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,11 +33,8 @@ FixNVTAsphere::FixNVTAsphere(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
std::string cmd = id + std::string("_temp");
|
||||
id_temp = new char[cmd.size()+1];
|
||||
strcpy(id_temp,cmd.c_str());
|
||||
|
||||
cmd += fmt::format(" {} temp/asphere",group->names[igroup]);
|
||||
modify->add_compute(cmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/asphere",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nph_body.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -41,22 +41,15 @@ FixNPHBody::FixNPHBody(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
tcmd += fmt::format(" {} temp/body",group->names[igroup]);
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/body",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
modify->add_compute(pcmd + " all pressure " + std::string(id_temp));
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_npt_body.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -41,22 +41,15 @@ FixNPTBody::FixNPTBody(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
tcmd += fmt::format(" {} temp/body",group->names[igroup]);
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/body",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
modify->add_compute(pcmd + " all pressure " + std::string(id_temp));
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nvt_body.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -39,11 +39,8 @@ FixNVTBody::FixNVTBody(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
tcmd += fmt::format(" {} temp/body",group->names[igroup]);
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/body",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_npt_gpu.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -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(std::string(id_temp)+" all temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
|
||||
@ -11,11 +11,13 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nvt_gpu.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -33,7 +35,7 @@ FixNVTGPU::FixNVTGPU(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
id_temp = utils::strdup(std::string(id)+"_temp");
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
@ -38,17 +36,17 @@ FixNPHKokkos<DeviceType>::FixNPHKokkos(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
|
||||
|
||||
this->id_temp = utils::strdup(std::string(this->id)+"_temp");
|
||||
this->modify->add_compute(std::string(this->id_temp)+" all temp/kk");
|
||||
this->id_temp = utils::strdup(std::string(this->id) + "_temp");
|
||||
this->modify->add_compute(fmt::format("{} all temp/kk",this->id_temp));
|
||||
this->tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
this->id_press = utils::strdup(std::string(this->id)+"_press");
|
||||
this->modify->add_compute(std::string(this->id_press)
|
||||
+" all pressure "+this->id_temp);
|
||||
this->id_press = utils::strdup(std::string(this->id) + "_press");
|
||||
this->modify->add_compute(fmt::format("{} all pressure {}",
|
||||
this->id_press, this->id_temp));
|
||||
this->pcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
@ -38,17 +36,17 @@ FixNPTKokkos<DeviceType>::FixNPTKokkos(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
|
||||
|
||||
this->id_temp = utils::strdup(std::string(this->id)+"_temp");
|
||||
this->modify->add_compute(std::string(this->id_temp)+" all temp/kk");
|
||||
this->id_temp = utils::strdup(std::string(this->id) + "_temp");
|
||||
this->modify->add_compute(fmt::format("{} all temp/kk",this->id_temp));
|
||||
this->tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
this->id_press = utils::strdup(std::string(this->id)+"_press");
|
||||
this->modify->add_compute(std::string(this->id_press)
|
||||
+" all pressure "+this->id_temp);
|
||||
this->id_press = utils::strdup(std::string(this->id) + "_press");
|
||||
this->modify->add_compute(fmt::format("{} all pressure {}",
|
||||
this->id_press, this->id_temp));
|
||||
this->pcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ FixNVTKokkos<DeviceType>::FixNVTKokkos(LAMMPS *lmp, int narg, char **arg) :
|
||||
// id = fix-ID + temp
|
||||
|
||||
this->id_temp = utils::strdup(std::string(this->id)+"_temp");
|
||||
this->modify->add_compute(std::string(this->id_temp)+" all temp/kk");
|
||||
this->modify->add_compute(fmt::format("{} all temp/kk",this->id_temp));
|
||||
this->tcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -86,11 +86,8 @@ FixBondSwap::FixBondSwap(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp, compute group = fix group
|
||||
|
||||
std::string cmd = id + std::string("_temp");
|
||||
id_temp = new char[cmd.size()+1];
|
||||
strcpy(id_temp,cmd.c_str());
|
||||
|
||||
modify->add_compute(cmd + " all temp");
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tflag = 1;
|
||||
|
||||
// initialize atom list
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_rigid_nph.h"
|
||||
#include <cstring>
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -56,7 +56,7 @@ FixRigidNPH::FixRigidNPH(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(std::string(id_temp)+" all temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_rigid_nph_small.h"
|
||||
#include <cstring>
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -59,7 +59,7 @@ FixRigidNPHSmall::FixRigidNPHSmall(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(std::string(id_temp)+" all temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_rigid_npt.h"
|
||||
#include <cstring>
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -66,7 +66,7 @@ FixRigidNPT::FixRigidNPT(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(std::string(id_temp)+" all temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_rigid_npt_small.h"
|
||||
#include <cstring>
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -70,7 +70,7 @@ FixRigidNPTSmall::FixRigidNPTSmall(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(std::string(id_temp)+" all temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
|
||||
@ -121,7 +121,7 @@ FixNPHug::FixNPHug(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(std::string(id_temp)+" all temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
@ -135,7 +135,7 @@ FixNPHug::FixNPHug(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute potential energy compute
|
||||
|
||||
id_pe = utils::strdup(std::string(id)+"_pe");
|
||||
modify->add_compute(std::string(id_pe)+" all pe");
|
||||
modify->add_compute(fmt::format("{} all pe",id_pe));
|
||||
peflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -59,9 +59,7 @@ ComputePressureBocs::ComputePressureBocs(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
if (strcmp(arg[3],"NULL") == 0) id_temp = nullptr;
|
||||
else {
|
||||
int n = strlen(arg[3]) + 1;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,arg[3]);
|
||||
id_temp = utils::strdup(arg[3]);
|
||||
|
||||
int icompute = modify->find_compute(id_temp);
|
||||
if (icompute < 0)
|
||||
@ -446,7 +444,5 @@ void ComputePressureBocs::virial_compute(int n, int ndiag)
|
||||
void ComputePressureBocs::reset_extra_compute_fix(const char *id_new)
|
||||
{
|
||||
delete [] id_temp;
|
||||
int n = strlen(id_new) + 1;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id_new);
|
||||
id_temp = utils::strdup(id_new);
|
||||
}
|
||||
|
||||
@ -16,11 +16,6 @@
|
||||
|
||||
#include "fix_bocs.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
#include "atom.h"
|
||||
#include "citeme.h"
|
||||
#include "comm.h"
|
||||
@ -29,7 +24,6 @@
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "fix_deform.h"
|
||||
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "irregular.h"
|
||||
@ -40,6 +34,10 @@
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
@ -70,7 +68,8 @@ const int NUM_INPUT_DATA_COLUMNS = 2; // columns in the pressure correction
|
||||
|
||||
FixBocs::FixBocs(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
rfix(nullptr), id_dilate(nullptr), irregular(nullptr), id_temp(nullptr), id_press(nullptr),
|
||||
rfix(nullptr), id_dilate(nullptr), irregular(nullptr),
|
||||
id_temp(nullptr), id_press(nullptr),
|
||||
eta(nullptr), eta_dot(nullptr), eta_dotdot(nullptr),
|
||||
eta_mass(nullptr), etap(nullptr), etap_dot(nullptr), etap_dotdot(nullptr),
|
||||
etap_mass(nullptr)
|
||||
@ -403,38 +402,16 @@ FixBocs::FixBocs(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
|
||||
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp";
|
||||
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id)+"_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "PRESSURE/BOCS";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id)+"_press");
|
||||
modify->add_compute(fmt::format("{} all PRESSURE/BOCS {}",id_press,id_temp));
|
||||
pcomputeflag = 1;
|
||||
|
||||
/*~ MRD End of stuff copied from fix_npt.cpp~*/
|
||||
|
||||
@ -257,7 +257,6 @@ void FixRX::post_constructor()
|
||||
bool match;
|
||||
|
||||
char **tmpspecies = new char*[maxspecies];
|
||||
int tmpmaxstrlen = 0;
|
||||
for (int jj=0; jj < maxspecies; jj++)
|
||||
tmpspecies[jj] = nullptr;
|
||||
|
||||
@ -316,9 +315,7 @@ void FixRX::post_constructor()
|
||||
if (!match) {
|
||||
if (nUniqueSpecies+1>=maxspecies)
|
||||
error->all(FLERR,"Exceeded the maximum number of species permitted in fix rx.");
|
||||
tmpspecies[nUniqueSpecies] = new char[strlen(word)+1];
|
||||
strcpy(tmpspecies[nUniqueSpecies],word);
|
||||
tmpmaxstrlen = MAX(tmpmaxstrlen,(int)strlen(word));
|
||||
tmpspecies[nUniqueSpecies] = utils::strdup(word);
|
||||
nUniqueSpecies++;
|
||||
}
|
||||
word = strtok(nullptr, " \t\n\r\f");
|
||||
@ -335,61 +332,31 @@ void FixRX::post_constructor()
|
||||
id_fix_species = nullptr;
|
||||
id_fix_species_old = nullptr;
|
||||
|
||||
n = strlen(id) + strlen("_SPECIES") + 1;
|
||||
id_fix_species = new char[n];
|
||||
n = strlen(id) + strlen("_SPECIES_OLD") + 1;
|
||||
id_fix_species_old = new char[n];
|
||||
id_fix_species = utils::strdup(std::string(id)+"_SPECIES");
|
||||
id_fix_species_old = utils::strdup(std::string(id)+"_SPECIES_OLD");
|
||||
|
||||
strcpy(id_fix_species,id);
|
||||
strcat(id_fix_species,"_SPECIES");
|
||||
strcpy(id_fix_species_old,id);
|
||||
strcat(id_fix_species_old,"_SPECIES_OLD");
|
||||
|
||||
char **newarg = new char*[nspecies+5];
|
||||
char **newarg2 = new char*[nspecies+5];
|
||||
newarg[0] = id_fix_species;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "property/atom";
|
||||
newarg2[0] = id_fix_species_old;
|
||||
newarg2[1] = group->names[igroup];
|
||||
newarg2[2] = (char *) "property/atom";
|
||||
char *str1 = new char[tmpmaxstrlen+3];
|
||||
char *str2 = new char[tmpmaxstrlen+6];
|
||||
const std::string fmtstr = "{} {} property/atom ";
|
||||
auto newcmd1 = fmt::format(fmtstr,id_fix_species,group->names[igroup]);
|
||||
auto newcmd2 = fmt::format(fmtstr,id_fix_species_old,group->names[igroup]);
|
||||
for (int ii=0; ii<nspecies; ii++) {
|
||||
strcpy(str1,"d_");
|
||||
strcpy(str2,"d_");
|
||||
strcat(str1,tmpspecies[ii]);
|
||||
strcat(str2,tmpspecies[ii]);
|
||||
strcat(str2,"Old");
|
||||
newarg[ii+3] = new char[strlen(str1)+1];
|
||||
newarg2[ii+3] = new char[strlen(str2)+1];
|
||||
strcpy(newarg[ii+3],str1);
|
||||
strcpy(newarg2[ii+3],str2);
|
||||
newcmd1 += fmt::format(" d_{}",tmpspecies[ii]);
|
||||
newcmd2 += fmt::format(" d_{}Old",tmpspecies[ii]);
|
||||
}
|
||||
delete[] str1;
|
||||
delete[] str2;
|
||||
newarg[nspecies+3] = (char *) "ghost";
|
||||
newarg[nspecies+4] = (char *) "yes";
|
||||
newarg2[nspecies+3] = (char *) "ghost";
|
||||
newarg2[nspecies+4] = (char *) "yes";
|
||||
newcmd1 += " ghost yes";
|
||||
newcmd2 += " ghost yes";
|
||||
|
||||
modify->add_fix(nspecies+5,newarg,1);
|
||||
modify->add_fix(newcmd1);
|
||||
fix_species = (FixPropertyAtom *) modify->fix[modify->nfix-1];
|
||||
restartFlag = modify->fix[modify->nfix-1]->restart_reset;
|
||||
|
||||
modify->add_fix(nspecies+5,newarg2,1);
|
||||
modify->add_fix(newcmd2);
|
||||
fix_species_old = (FixPropertyAtom *) modify->fix[modify->nfix-1];
|
||||
|
||||
if (nspecies==0) error->all(FLERR,"There are no rx species specified.");
|
||||
|
||||
for (int jj=0;jj<nspecies;jj++) {
|
||||
delete[] tmpspecies[jj];
|
||||
delete[] newarg[jj+3];
|
||||
delete[] newarg2[jj+3];
|
||||
}
|
||||
|
||||
delete[] newarg;
|
||||
delete[] newarg2;
|
||||
delete[] tmpspecies;
|
||||
|
||||
read_file( kineticsFile );
|
||||
|
||||
@ -596,9 +596,7 @@ void PairExp6rx::coeff(int narg, char **arg)
|
||||
if (nspecies==0) error->all(FLERR,"There are no rx species specified.");
|
||||
read_file(arg[2]);
|
||||
|
||||
n = strlen(arg[3]) + 1;
|
||||
site1 = new char[n];
|
||||
strcpy(site1,arg[3]);
|
||||
site1 = utils::strdup(arg[3]);
|
||||
|
||||
int ispecies;
|
||||
for (ispecies = 0; ispecies < nspecies; ispecies++) {
|
||||
@ -607,9 +605,7 @@ void PairExp6rx::coeff(int narg, char **arg)
|
||||
if (ispecies == nspecies && strcmp(site1,"1fluid") != 0)
|
||||
error->all(FLERR,"Site1 name not recognized in pair coefficients");
|
||||
|
||||
n = strlen(arg[4]) + 1;
|
||||
site2 = new char[n];
|
||||
strcpy(site2,arg[4]);
|
||||
site2 = utils::strdup(arg[4]);
|
||||
|
||||
for (ispecies = 0; ispecies < nspecies; ispecies++) {
|
||||
if (strcmp(site2,&atom->dname[ispecies][0]) == 0) break;
|
||||
@ -806,17 +802,12 @@ void PairExp6rx::read_file(char *file)
|
||||
|
||||
params[nparams].ispecies = ispecies;
|
||||
|
||||
n = strlen(&atom->dname[ispecies][0]) + 1;
|
||||
params[nparams].name = new char[n];
|
||||
strcpy(params[nparams].name,&atom->dname[ispecies][0]);
|
||||
|
||||
n = strlen(words[1]) + 1;
|
||||
params[nparams].potential = new char[n];
|
||||
strcpy(params[nparams].potential,words[1]);
|
||||
params[nparams].name = utils::strdup(&atom->dname[ispecies][0]);
|
||||
params[nparams].potential = utils::strdup(words[1]);
|
||||
if (strcmp(params[nparams].potential,"exp6") == 0) {
|
||||
params[nparams].alpha = atof(words[2]);
|
||||
params[nparams].epsilon = atof(words[3]);
|
||||
params[nparams].rm = atof(words[4]);
|
||||
params[nparams].alpha = utils::numeric(FLERR,words[2],false,lmp);
|
||||
params[nparams].epsilon = utils::numeric(FLERR,words[3],false,lmp);
|
||||
params[nparams].rm = utils::numeric(FLERR,words[4],false,lmp);
|
||||
if (params[nparams].epsilon <= 0.0 || params[nparams].rm <= 0.0 ||
|
||||
params[nparams].alpha < 0.0)
|
||||
error->all(FLERR,"Illegal exp6/rx parameters. Rm and Epsilon must be greater than zero. Alpha cannot be negative.");
|
||||
@ -842,11 +833,9 @@ void PairExp6rx::read_file2(char *file)
|
||||
fp = nullptr;
|
||||
if (comm->me == 0) {
|
||||
fp = fopen(file,"r");
|
||||
if (fp == nullptr) {
|
||||
char str[128];
|
||||
snprintf(str,128,"Cannot open polynomial file %s",file);
|
||||
error->one(FLERR,str);
|
||||
}
|
||||
if (fp == nullptr)
|
||||
error->one(FLERR,fmt::format("Cannot open polynomial file {}: {}",
|
||||
file,utils::getsyserror()));
|
||||
}
|
||||
|
||||
// one set of params can span multiple lines
|
||||
|
||||
@ -387,14 +387,9 @@ void PairMultiLucyRX::coeff(int narg, char **arg)
|
||||
bcast_table(tb);
|
||||
|
||||
nspecies = atom->nspecies_dpd;
|
||||
int n;
|
||||
n = strlen(arg[4]) + 1;
|
||||
site1 = new char[n];
|
||||
strcpy(site1,arg[4]);
|
||||
|
||||
n = strlen(arg[5]) + 1;
|
||||
site2 = new char[n];
|
||||
strcpy(site2,arg[5]);
|
||||
site1 = utils::strdup(arg[4]);
|
||||
site2 = utils::strdup(arg[5]);
|
||||
|
||||
// set table cutoff
|
||||
|
||||
|
||||
@ -322,10 +322,8 @@ void PairTableRX::coeff(int narg, char **arg)
|
||||
|
||||
nspecies = atom->nspecies_dpd;
|
||||
if (nspecies==0) error->all(FLERR,"There are no rx species specified.");
|
||||
int n;
|
||||
n = strlen(arg[4]) + 1;
|
||||
site1 = new char[n];
|
||||
strcpy(site1,arg[4]);
|
||||
|
||||
site1 = utils::strdup(arg[4]);
|
||||
|
||||
int ispecies;
|
||||
for (ispecies = 0; ispecies < nspecies; ispecies++) {
|
||||
@ -334,9 +332,7 @@ void PairTableRX::coeff(int narg, char **arg)
|
||||
if (ispecies == nspecies && strcmp(site1,"1fluid") != 0)
|
||||
error->all(FLERR,"Site1 name not recognized in pair coefficients");
|
||||
|
||||
n = strlen(arg[5]) + 1;
|
||||
site2 = new char[n];
|
||||
strcpy(site2,arg[5]);
|
||||
site2 = utils::strdup(arg[5]);
|
||||
|
||||
for (ispecies = 0; ispecies < nspecies; ispecies++) {
|
||||
if (strcmp(site2,&atom->dname[ispecies][0]) == 0) break;
|
||||
|
||||
@ -13,15 +13,16 @@
|
||||
|
||||
#include "compute_temp_drude.h"
|
||||
|
||||
#include <cstring>
|
||||
#include "atom.h"
|
||||
#include "update.h"
|
||||
#include "force.h"
|
||||
#include "modify.h"
|
||||
#include "fix_drude.h"
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "comm.h"
|
||||
#include "fix_drude.h"
|
||||
#include "force.h"
|
||||
#include "modify.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -116,9 +117,7 @@ int ComputeTempDrude::modify_param(int narg, char **arg)
|
||||
if (strcmp(arg[0],"temp") == 0) {
|
||||
if (narg < 2) error->all(FLERR,"Illegal fix_modify command");
|
||||
delete [] id_temp;
|
||||
int n = strlen(arg[1]) + 1;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,arg[1]);
|
||||
id_temp = utils::strdup(arg[1]);
|
||||
|
||||
int icompute = modify->find_compute(id_temp);
|
||||
if (icompute < 0)
|
||||
|
||||
@ -16,23 +16,25 @@
|
||||
---------------------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_tgnh_drude.h"
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "fix_deform.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "irregular.h"
|
||||
#include "modify.h"
|
||||
#include "fix_deform.h"
|
||||
#include "compute.h"
|
||||
#include "kspace.h"
|
||||
#include "update.h"
|
||||
#include "respa.h"
|
||||
#include "domain.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
#include "neighbor.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -1428,9 +1430,7 @@ int FixTGNHDrude::modify_param(int narg, char **arg)
|
||||
tcomputeflag = 0;
|
||||
}
|
||||
delete [] id_temp;
|
||||
int n = strlen(arg[1]) + 1;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,arg[1]);
|
||||
id_temp = utils::strdup(arg[1]);
|
||||
|
||||
int icompute = modify->find_compute(arg[1]);
|
||||
if (icompute < 0)
|
||||
@ -1462,9 +1462,7 @@ int FixTGNHDrude::modify_param(int narg, char **arg)
|
||||
pcomputeflag = 0;
|
||||
}
|
||||
delete [] id_press;
|
||||
int n = strlen(arg[1]) + 1;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,arg[1]);
|
||||
id_press = utils::strdup(arg[1]);
|
||||
|
||||
int icompute = modify->find_compute(arg[1]);
|
||||
if (icompute < 0) error->all(FLERR,"Could not find fix_modify pressure ID");
|
||||
|
||||
@ -12,10 +12,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_tgnpt_drude.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,23 +34,15 @@ FixTGNPTDrude::FixTGNPTDrude(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp, tcmd.c_str());
|
||||
|
||||
tcmd += " all temp";
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press, pcmd.c_str());
|
||||
|
||||
pcmd += " all pressure " + std::string(id_temp);
|
||||
modify->add_compute(pcmd);
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -12,11 +12,12 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_tgnvt_drude.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,11 +35,7 @@ FixTGNVTDrude::FixTGNVTDrude(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp, tcmd.c_str());
|
||||
|
||||
tcmd += fmt::format(" {} temp", group->names[igroup]);
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -16,17 +16,18 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "compute_temp_region_eff.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "update.h"
|
||||
#include "force.h"
|
||||
#include "domain.h"
|
||||
#include "region.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "region.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -43,9 +44,7 @@ ComputeTempRegionEff::ComputeTempRegionEff(LAMMPS *lmp, int narg, char **arg) :
|
||||
iregion = domain->find_region(arg[3]);
|
||||
if (iregion == -1)
|
||||
error->all(FLERR,"Region ID for compute temp/region/eff does not exist");
|
||||
int n = strlen(arg[3]) + 1;
|
||||
idregion = new char[n];
|
||||
strcpy(idregion,arg[3]);
|
||||
idregion = utils::strdup(arg[3]);
|
||||
|
||||
scalar_flag = vector_flag = 1;
|
||||
size_vector = 6;
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nph_eff.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,35 +34,15 @@ FixNPHEff::FixNPHEff(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp/eff";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/eff",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_npt_eff.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,35 +34,15 @@ FixNPTEff::FixNPTEff(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp/eff";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/eff",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,11 +11,13 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nvt_eff.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -33,17 +35,8 @@ FixNVTEff::FixNVTEff(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "temp/eff";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/eff",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,19 +11,20 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "fix_nvt_sllod_eff.h"
|
||||
#include "math_extra.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "fix.h"
|
||||
#include "fix_deform.h"
|
||||
#include "compute.h"
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "math_extra.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -45,18 +46,9 @@ FixNVTSllodEff::FixNVTSllodEff(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "temp/deform/eff";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} tmp/deform/eff",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -15,18 +15,19 @@
|
||||
Contributing author: Andres Jaramillo-Botero
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <cmath>
|
||||
#include "fix_temp_rescale_eff.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "update.h"
|
||||
#include "comm.h"
|
||||
#include "modify.h"
|
||||
#include "compute.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -56,17 +57,9 @@ FixTempRescaleEff::FixTempRescaleEff(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp/eff
|
||||
// id = fix-ID + temp, compute group = fix group
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[6];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "temp/eff";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/eff",
|
||||
id_temp,group->names[igroup]));
|
||||
tflag = 1;
|
||||
|
||||
energy = 0.0;
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_npt_intel.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -25,44 +25,24 @@ FixNPTIntel::FixNPTIntel(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixNHIntel(lmp, narg, arg)
|
||||
{
|
||||
if (!tstat_flag)
|
||||
error->all(FLERR,"Temperature control must be used with fix npt/omp");
|
||||
error->all(FLERR,"Temperature control must be used with fix npt/intel");
|
||||
if (!pstat_flag)
|
||||
error->all(FLERR,"Pressure control must be used with fix npt/omp");
|
||||
error->all(FLERR,"Pressure control must be used with fix npt/intl");
|
||||
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
// compute group = all since pressure is always global (group all)
|
||||
// and thus its KE/temperature contribution should use group all
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,11 +11,13 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nvt_intel.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -26,25 +28,15 @@ FixNVTIntel::FixNVTIntel(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixNHIntel(lmp, narg, arg)
|
||||
{
|
||||
if (!tstat_flag)
|
||||
error->all(FLERR,"Temperature control must be used with fix nvt");
|
||||
error->all(FLERR,"Temperature control must be used with fix nvt/intel");
|
||||
if (pstat_flag)
|
||||
error->all(FLERR,"Pressure control can not be used with fix nvt");
|
||||
error->all(FLERR,"Pressure control can not be used with fix nvt/intel");
|
||||
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "temp";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -46,18 +46,9 @@ FixNVTSllodIntel::FixNVTSllodIntel(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "temp/deform";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/deform",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -17,22 +17,22 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_lb_fluid.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "memory.h"
|
||||
#include "modify.h"
|
||||
#include "random_mars.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include "comm.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "domain.h"
|
||||
#include "atom.h"
|
||||
#include "group.h"
|
||||
#include "random_mars.h"
|
||||
#include "update.h"
|
||||
#include "force.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
@ -131,24 +131,10 @@ FixNVTManifoldRattle::FixNVTManifoldRattle(LAMMPS *lmp, int narg, char **arg,
|
||||
}
|
||||
|
||||
// Create temperature compute:
|
||||
const char *fix_id = arg[1];
|
||||
int n = strlen(fix_id)+6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,fix_id);
|
||||
strcat(id_temp,"_temp");
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char*) "temp";
|
||||
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
int icompute = modify->find_compute(id_temp);
|
||||
if (icompute < 0) {
|
||||
error->all(FLERR,"Temperature ID for fix nvt/manifold/rattle "
|
||||
"does not exist");
|
||||
}
|
||||
temperature = modify->compute[icompute];
|
||||
if (temperature->tempbias) which = BIAS;
|
||||
else which = NOBIAS;
|
||||
@ -167,8 +153,6 @@ FixNVTManifoldRattle::FixNVTManifoldRattle(LAMMPS *lmp, int narg, char **arg,
|
||||
for (int ich = 0; ich < mtchain; ++ich) {
|
||||
eta[ich] = eta_dot[ich] = eta_dotdot[ich] = 0.0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -185,9 +169,6 @@ FixNVTManifoldRattle::~FixNVTManifoldRattle()
|
||||
if (id_temp) delete[] id_temp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int FixNVTManifoldRattle::setmask()
|
||||
{
|
||||
int mask = 0;
|
||||
@ -198,7 +179,6 @@ int FixNVTManifoldRattle::setmask()
|
||||
return mask;
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
Check that force modification happens before position and velocity update.
|
||||
Make sure respa is not used.
|
||||
@ -219,8 +199,6 @@ void FixNVTManifoldRattle::init()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FixNVTManifoldRattle::setup(int /*vflag*/)
|
||||
{
|
||||
compute_temp_target();
|
||||
@ -359,9 +337,6 @@ void FixNVTManifoldRattle::nh_v_temp()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Most of this logic is based on fix_nh:
|
||||
void FixNVTManifoldRattle::initial_integrate(int /*vflag*/)
|
||||
{
|
||||
@ -381,8 +356,6 @@ void FixNVTManifoldRattle::final_integrate()
|
||||
nhc_temp_integrate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
void FixNVTManifoldRattle::reset_dt()
|
||||
{
|
||||
@ -395,10 +368,6 @@ void FixNVTManifoldRattle::reset_dt()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
double FixNVTManifoldRattle::memory_usage()
|
||||
{
|
||||
double bytes = FixNVEManifoldRattle::memory_usage();
|
||||
|
||||
@ -23,14 +23,16 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_grem.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "update.h"
|
||||
#include "modify.h"
|
||||
#include "domain.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "modify.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -65,65 +67,28 @@ FixGrem::FixGrem(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
|
||||
|
||||
n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[5];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "PRESSURE/GREM";
|
||||
newarg[3] = id_temp;
|
||||
newarg[4] = id;
|
||||
modify->add_compute(5,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all PRESSURE/GREM {}",
|
||||
id_press, id_temp));
|
||||
|
||||
// create a new compute ke style
|
||||
// id = fix-ID + ke
|
||||
|
||||
n = strlen(id) + 8;
|
||||
id_ke = new char[n];
|
||||
strcpy(id_ke,id);
|
||||
strcat(id_ke,"_ke");
|
||||
|
||||
newarg = new char*[3];
|
||||
newarg[0] = id_ke;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "ke";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_ke = utils::strdup(std::string(id) + "_ke");
|
||||
modify->add_compute(fmt::format("{} all ke",id_temp));
|
||||
|
||||
// create a new compute pe style
|
||||
// id = fix-ID + pe
|
||||
|
||||
n = strlen(id) + 9;
|
||||
id_pe = new char[n];
|
||||
strcpy(id_pe,id);
|
||||
strcat(id_pe,"_pe");
|
||||
|
||||
newarg = new char*[3];
|
||||
newarg[0] = id_pe;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pe";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_pe = utils::strdup(std::string(id) + "_pe");
|
||||
modify->add_compute(fmt::format("{} all pe",id_temp));
|
||||
|
||||
int ifix = modify->find_fix(id_nh);
|
||||
if (ifix < 0)
|
||||
|
||||
@ -15,27 +15,28 @@
|
||||
Contributing authors:
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <cmath>
|
||||
#include "fix_npt_cauchy.h"
|
||||
#include "math_extra.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "irregular.h"
|
||||
#include "modify.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "fix_deform.h"
|
||||
#include "fix_store.h"
|
||||
#include "compute.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "irregular.h"
|
||||
#include "kspace.h"
|
||||
#include "update.h"
|
||||
#include "respa.h"
|
||||
#include "domain.h"
|
||||
#include "math_extra.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
#include "neighbor.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -53,7 +54,8 @@ enum{ISO,ANISO,TRICLINIC};
|
||||
|
||||
FixNPTCauchy::FixNPTCauchy(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
rfix(nullptr), id_dilate(nullptr), irregular(nullptr), id_temp(nullptr), id_press(nullptr),
|
||||
rfix(nullptr), id_dilate(nullptr), irregular(nullptr),
|
||||
id_temp(nullptr), id_press(nullptr),
|
||||
eta(nullptr), eta_dot(nullptr), eta_dotdot(nullptr),
|
||||
eta_mass(nullptr), etap(nullptr), etap_dot(nullptr), etap_dotdot(nullptr),
|
||||
etap_mass(nullptr), id_store(nullptr),init_store(nullptr)
|
||||
@ -604,36 +606,16 @@ FixNPTCauchy::FixNPTCauchy(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nph_asphere_omp.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,35 +34,15 @@ FixNPHAsphereOMP::FixNPHAsphereOMP(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp/asphere";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/asphere",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nph_omp.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,15 +34,15 @@ FixNPHOMP::FixNPHOMP(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");
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
id_press = utils::strdup(std::string(id)+"_press");
|
||||
modify->add_compute(std::string(id_press)+" all pressure "+id_temp);
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nph_sphere_omp.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,35 +34,15 @@ FixNPHSphereOMP::FixNPHSphereOMP(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp/sphere";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/sphere",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_npt_asphere_omp.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,35 +34,15 @@ FixNPTAsphereOMP::FixNPTAsphereOMP(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp/asphere";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/asphere",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_npt_omp.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,15 +34,15 @@ 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");
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
id_press = utils::strdup(std::string(id)+"_press");
|
||||
modify->add_compute(std::string(id_press)+" all pressure "+id_temp);
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_npt_sphere_omp.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -34,35 +34,15 @@ FixNPTSphereOMP::FixNPTSphereOMP(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp/sphere";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/sphere",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -33,17 +33,8 @@ FixNVTAsphereOMP::FixNVTAsphereOMP(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "temp/asphere";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/asphere",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -11,11 +11,13 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nvt_omp.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
@ -15,18 +15,21 @@
|
||||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_nvt_sllod_omp.h"
|
||||
#include <cstring>
|
||||
#include "math_extra.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "fix.h"
|
||||
#include "fix_deform.h"
|
||||
#include "compute.h"
|
||||
#include "error.h"
|
||||
#include "domain.h"
|
||||
#include "group.h"
|
||||
#include "math_extra.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "omp_compat.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -51,18 +54,9 @@ FixNVTSllodOMP::FixNVTSllodOMP(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "temp/deform";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/deform",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -82,7 +76,7 @@ void FixNVTSllodOMP::init()
|
||||
|
||||
int i;
|
||||
for (i = 0; i < modify->nfix; i++)
|
||||
if (strncmp(modify->fix[i]->style,"deform",6) == 0) {
|
||||
if (utils::strmatch(modify->fix[i]->style,"^deform")) {
|
||||
if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP)
|
||||
error->all(FLERR,"Using fix nvt/sllod/omp with inconsistent fix "
|
||||
"deform remap option");
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "fix_nvt_sphere_omp.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -33,17 +33,8 @@ FixNVTSphereOMP::FixNVTSphereOMP(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = group->names[igroup];
|
||||
newarg[2] = (char *) "temp/sphere";
|
||||
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/sphere",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_rigid_nph_omp.h"
|
||||
#include <cstring>
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -57,34 +57,15 @@ FixRigidNPHOMP::FixRigidNPHOMP(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_rigid_npt_omp.h"
|
||||
#include <cstring>
|
||||
#include "modify.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -69,34 +69,15 @@ FixRigidNPTOMP::FixRigidNPTOMP(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
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -18,9 +18,6 @@
|
||||
|
||||
#include "fix_qbmsst.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "update.h"
|
||||
@ -34,6 +31,9 @@
|
||||
#include "kspace.h"
|
||||
#include "math_const.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
using namespace MathConst;
|
||||
@ -204,45 +204,23 @@ FixQBMSST::FixQBMSST(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
// id = fix-ID + temp
|
||||
// compute group = all since pressure is always global (group all)
|
||||
// and thus its KE/temperature contribution should use group all
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = const_cast<char *>("all");
|
||||
newarg[2] = const_cast<char *>("temp");
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = const_cast<char *>("all");
|
||||
newarg[2] = const_cast<char *>("pressure");
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pflag = 1;
|
||||
|
||||
// create a new compute potential energy compute
|
||||
n = strlen(id) + 3;
|
||||
id_pe = new char[n];
|
||||
strcpy(id_pe,id);
|
||||
strcat(id_pe,"_pe");
|
||||
newarg = new char*[3];
|
||||
newarg[0] = id_pe;
|
||||
newarg[1] = (char*)"all";
|
||||
newarg[2] = (char*)"pe";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
|
||||
id_pe = utils::strdup(std::string(id) + "_pe");
|
||||
modify->add_compute(fmt::format("{} all pe",id_temp));
|
||||
peflag = 1;
|
||||
|
||||
// allocate qbmsst
|
||||
|
||||
@ -14,24 +14,26 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nh_uef.h"
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "comm.h"
|
||||
#include "citeme.h"
|
||||
#include "irregular.h"
|
||||
#include "modify.h"
|
||||
#include "comm.h"
|
||||
#include "compute.h"
|
||||
#include "update.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "output.h"
|
||||
#include "timer.h"
|
||||
#include "neighbor.h"
|
||||
#include "compute_pressure_uef.h"
|
||||
#include "compute_temp_uef.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "irregular.h"
|
||||
#include "modify.h"
|
||||
#include "neighbor.h"
|
||||
#include "output.h"
|
||||
#include "timer.h"
|
||||
#include "uef_utils.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -179,29 +181,12 @@ FixNHUef::FixNHUef(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
// Create temp and pressure computes for nh/uef
|
||||
|
||||
int n = strlen(id) + 6;
|
||||
id_temp = new char[n];
|
||||
strcpy(id_temp,id);
|
||||
strcat(id_temp,"_temp");
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "temp/uef";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/uef",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
n = strlen(id) + 7;
|
||||
id_press = new char[n];
|
||||
strcpy(id_press,id);
|
||||
strcat(id_press,"_press");
|
||||
newarg = new char*[4];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure/uef";
|
||||
newarg[3] = id_temp;
|
||||
modify->add_compute(4,newarg);
|
||||
delete [] newarg;
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure/uef {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
|
||||
nevery = 1;
|
||||
@ -214,8 +199,7 @@ FixNHUef::FixNHUef(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixNHUef::~FixNHUef()
|
||||
{
|
||||
delete uefbox;
|
||||
if (pcomputeflag && !pstat_flag)
|
||||
{
|
||||
if (pcomputeflag && !pstat_flag) {
|
||||
modify->delete_compute(id_press);
|
||||
delete [] id_press;
|
||||
}
|
||||
|
||||
@ -80,9 +80,7 @@ ComputeVoronoi::ComputeVoronoi(LAMMPS *lmp, int narg, char **arg) :
|
||||
else if (strcmp(arg[iarg], "radius") == 0) {
|
||||
if (iarg + 2 > narg || strstr(arg[iarg+1],"v_") != arg[iarg+1] )
|
||||
error->all(FLERR,"Illegal compute voronoi/atom command");
|
||||
int n = strlen(&arg[iarg+1][2]) + 1;
|
||||
radstr = new char[n];
|
||||
strcpy(radstr,&arg[iarg+1][2]);
|
||||
radstr = utils::strdup(&arg[iarg+1][2]);
|
||||
iarg += 2;
|
||||
}
|
||||
else if (strcmp(arg[iarg], "surface") == 0) {
|
||||
|
||||
@ -16,20 +16,20 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_box_relax.h"
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "domain.h"
|
||||
#include "update.h"
|
||||
#include "comm.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "kspace.h"
|
||||
#include "modify.h"
|
||||
#include "compute.h"
|
||||
#include "error.h"
|
||||
#include "math_extra.h"
|
||||
#include "modify.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -319,24 +319,17 @@ FixBoxRelax::FixBoxRelax(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
tcmd += " all temp";
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tflag = 1;
|
||||
|
||||
// create a new compute pressure style (virial only)
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
pcmd += " all pressure " + std::string(id_temp) + " virial";
|
||||
modify->add_compute(pcmd);
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {} virial",
|
||||
id_press, id_temp));
|
||||
pflag = 1;
|
||||
|
||||
dimension = domain->dimension;
|
||||
|
||||
@ -12,10 +12,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nph.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,23 +34,15 @@ FixNPH::FixNPH(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
tcmd += " all temp";
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
pcmd += " all pressure " + std::string(id_temp);
|
||||
modify->add_compute(pcmd);
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -12,10 +12,11 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nph_sphere.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,21 +36,15 @@ FixNPHSphere::FixNPHSphere(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
modify->add_compute(tcmd + " all temp/sphere");
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/sphere",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
modify->add_compute(pcmd + " all pressure " + std::string(id_temp));
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -12,10 +12,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_npt.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,23 +34,15 @@ FixNPT::FixNPT(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
tcmd += " all temp";
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
pcmd += " all pressure " + std::string(id_temp);
|
||||
modify->add_compute(pcmd);
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -12,10 +12,11 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_npt_sphere.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,21 +36,15 @@ FixNPTSphere::FixNPTSphere(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
modify->add_compute(tcmd + " all temp/sphere");
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp/sphere",id_temp));
|
||||
tcomputeflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
modify->add_compute(pcmd + " all pressure " + std::string(id_temp));
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -12,12 +12,12 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nve.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "update.h"
|
||||
#include "respa.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -27,7 +27,7 @@ using namespace FixConst;
|
||||
FixNVE::FixNVE(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
{
|
||||
if (strcmp(style,"nve/sphere") != 0 && narg < 3)
|
||||
if (!utils::strmatch(style,"^nve/sphere") && narg < 3)
|
||||
error->all(FLERR,"Illegal fix nve command");
|
||||
|
||||
dynamic_group_allow = 1;
|
||||
@ -53,7 +53,7 @@ void FixNVE::init()
|
||||
dtv = update->dt;
|
||||
dtf = 0.5 * update->dt * force->ftm2v;
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
}
|
||||
|
||||
|
||||
@ -12,12 +12,10 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nvt.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,11 +33,7 @@ FixNVT::FixNVT(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
tcmd += fmt::format(" {} temp",group->names[igroup]);
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -16,17 +16,18 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nvt_sllod.h"
|
||||
#include <cstring>
|
||||
#include "math_extra.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
#include "fix.h"
|
||||
#include "fix_deform.h"
|
||||
#include "compute.h"
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "math_extra.h"
|
||||
#include "modify.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -49,12 +50,9 @@ FixNVTSllod::FixNVTSllod(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
std::string cmd = id + std::string("_temp");
|
||||
id_temp = new char[cmd.size()+1];
|
||||
strcpy(id_temp,cmd.c_str());
|
||||
|
||||
cmd += fmt::format(" {} temp/deform",group->names[igroup]);
|
||||
modify->add_compute(cmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/deform",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -12,12 +12,10 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_nvt_sphere.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "error.h"
|
||||
#include "group.h"
|
||||
#include "modify.h"
|
||||
#include "error.h"
|
||||
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -35,11 +33,8 @@ FixNVTSphere::FixNVTSphere(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp
|
||||
|
||||
std::string cmd = id + std::string("_temp");
|
||||
id_temp = new char[cmd.size()+1];
|
||||
strcpy(id_temp,cmd.c_str());
|
||||
|
||||
cmd += fmt::format(" {} temp/sphere",group->names[igroup]);
|
||||
modify->add_compute(cmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp/sphere",
|
||||
id_temp,group->names[igroup]));
|
||||
tcomputeflag = 1;
|
||||
}
|
||||
|
||||
@ -12,19 +12,20 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_press_berendsen.h"
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "comm.h"
|
||||
#include "modify.h"
|
||||
#include "fix_deform.h"
|
||||
#include "compute.h"
|
||||
#include "kspace.h"
|
||||
#include "update.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "fix_deform.h"
|
||||
#include "force.h"
|
||||
#include "kspace.h"
|
||||
#include "modify.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -218,24 +219,16 @@ FixPressBerendsen::FixPressBerendsen(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
|
||||
|
||||
std::string tcmd = id + std::string("_temp");
|
||||
id_temp = new char[tcmd.size()+1];
|
||||
strcpy(id_temp,tcmd.c_str());
|
||||
|
||||
tcmd += " all temp";
|
||||
modify->add_compute(tcmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} all temp",id_temp));
|
||||
tflag = 1;
|
||||
|
||||
// create a new compute pressure style
|
||||
// id = fix-ID + press, compute group = all
|
||||
// pass id_temp as 4th arg to pressure constructor
|
||||
|
||||
std::string pcmd = id + std::string("_press");
|
||||
id_press = new char[pcmd.size()+1];
|
||||
strcpy(id_press,pcmd.c_str());
|
||||
|
||||
pcmd += " all pressure " + std::string(id_temp);
|
||||
modify->add_compute(pcmd);
|
||||
id_press = utils::strdup(std::string(id) + "_press");
|
||||
modify->add_compute(fmt::format("{} all pressure {}",id_press, id_temp));
|
||||
pflag = 1;
|
||||
|
||||
nrigid = 0;
|
||||
|
||||
@ -72,10 +72,8 @@ FixTempBerendsen::FixTempBerendsen(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp, compute group = fix group
|
||||
|
||||
std::string cmd = id + std::string("_temp");
|
||||
id_temp = utils::strdup(cmd);
|
||||
cmd += fmt::format(" {} temp",group->names[igroup]);
|
||||
modify->add_compute(cmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
tflag = 1;
|
||||
|
||||
energy = 0;
|
||||
|
||||
@ -81,10 +81,8 @@ FixTempCSLD::FixTempCSLD(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp, compute group = fix group
|
||||
|
||||
std::string cmd = id + std::string("_temp");
|
||||
id_temp = utils::strdup(cmd);
|
||||
cmd += fmt::format(" {} temp",group->names[igroup]);
|
||||
modify->add_compute(cmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
tflag = 1;
|
||||
|
||||
vhold = nullptr;
|
||||
|
||||
@ -81,10 +81,8 @@ FixTempCSVR::FixTempCSVR(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp style
|
||||
// id = fix-ID + temp, compute group = fix group
|
||||
|
||||
std::string cmd = id + std::string("_temp");
|
||||
id_temp = utils::strdup(cmd);
|
||||
cmd += fmt::format(" {} temp",group->names[igroup]);
|
||||
modify->add_compute(cmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
tflag = 1;
|
||||
|
||||
nmax = -1;
|
||||
|
||||
@ -68,10 +68,8 @@ FixTempRescale::FixTempRescale(LAMMPS *lmp, int narg, char **arg) :
|
||||
// create a new compute temp
|
||||
// id = fix-ID + temp, compute group = fix group
|
||||
|
||||
std::string cmd = id + std::string("_temp");
|
||||
id_temp = utils::strdup(cmd);
|
||||
cmd += fmt::format(" {} temp",group->names[igroup]);
|
||||
modify->add_compute(cmd);
|
||||
id_temp = utils::strdup(std::string(id) + "_temp");
|
||||
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
|
||||
tflag = 1;
|
||||
|
||||
energy = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user