forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3489 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
288e35f2d2
commit
db40cbe7b7
|
@ -40,7 +40,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
// customize a new keyword by adding to this list:
|
||||
|
||||
// step, atoms, cpu, temp, press, pe, ke, etotal, enthalpy
|
||||
// step, atoms, cpu, dt, temp, press, pe, ke, etotal, enthalpy
|
||||
// evdwl, ecoul, epair, ebond, eangle, edihed, eimp, emol, elong, etail
|
||||
// vol, lx, ly, lz, xlo, xhi, ylo, yhi, zlo, zhi, xy, xz, yz
|
||||
// pxx, pyy, pzz, pxy, pxz, pyz
|
||||
|
@ -575,6 +575,8 @@ void Thermo::parse_fields(char *str)
|
|||
addfield("Atoms",&Thermo::compute_atoms,INT);
|
||||
} else if (strcmp(word,"cpu") == 0) {
|
||||
addfield("CPU",&Thermo::compute_cpu,FLOAT);
|
||||
} else if (strcmp(word,"dt") == 0) {
|
||||
addfield("Dt",&Thermo::compute_dt,FLOAT);
|
||||
|
||||
} else if (strcmp(word,"temp") == 0) {
|
||||
addfield("Temp",&Thermo::compute_temp,FLOAT);
|
||||
|
@ -835,6 +837,9 @@ int Thermo::evaluate_keyword(char *word, double *answer)
|
|||
if (update->whichflag == 0) firststep = 0;
|
||||
compute_cpu();
|
||||
|
||||
} else if (strcmp(word,"dt") == 0) {
|
||||
compute_dt();
|
||||
|
||||
} else if (strcmp(word,"temp") == 0) {
|
||||
if (!temperature)
|
||||
error->all("Thermo keyword in variable requires "
|
||||
|
@ -1214,6 +1219,13 @@ void Thermo::compute_cpu()
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Thermo::compute_dt()
|
||||
{
|
||||
dvalue = update->dt;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Thermo::compute_temp()
|
||||
{
|
||||
dvalue = temperature->scalar;
|
||||
|
|
|
@ -109,6 +109,7 @@ class Thermo : protected Pointers {
|
|||
void compute_step();
|
||||
void compute_atoms();
|
||||
void compute_cpu();
|
||||
void compute_dt();
|
||||
|
||||
void compute_temp();
|
||||
void compute_press();
|
||||
|
|
Loading…
Reference in New Issue