forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10848 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
c3d52cd64d
commit
5d8427bc5b
|
@ -46,7 +46,7 @@ using namespace MathConst;
|
||||||
|
|
||||||
// customize a new keyword by adding to this list:
|
// customize a new keyword by adding to this list:
|
||||||
|
|
||||||
// step, elapsed, elaplong, dt, time, cpu, tpcpu, spcpu
|
// step, elapsed, elaplong, dt, time, cpu, tpcpu, spcpu, cpuremain
|
||||||
// atoms, temp, press, pe, ke, etotal, enthalpy
|
// atoms, temp, press, pe, ke, etotal, enthalpy
|
||||||
// evdwl, ecoul, epair, ebond, eangle, edihed, eimp, emol, elong, etail
|
// evdwl, ecoul, epair, ebond, eangle, edihed, eimp, emol, elong, etail
|
||||||
// vol, density, lx, ly, lz, xlo, xhi, ylo, yhi, zlo, zhi, xy, xz, yz,
|
// vol, density, lx, ly, lz, xlo, xhi, ylo, yhi, zlo, zhi, xy, xz, yz,
|
||||||
|
@ -657,6 +657,8 @@ void Thermo::parse_fields(char *str)
|
||||||
addfield("T/CPU",&Thermo::compute_tpcpu,FLOAT);
|
addfield("T/CPU",&Thermo::compute_tpcpu,FLOAT);
|
||||||
} else if (strcmp(word,"spcpu") == 0) {
|
} else if (strcmp(word,"spcpu") == 0) {
|
||||||
addfield("S/CPU",&Thermo::compute_spcpu,FLOAT);
|
addfield("S/CPU",&Thermo::compute_spcpu,FLOAT);
|
||||||
|
} else if (strcmp(word,"cpuremain") == 0) {
|
||||||
|
addfield("CPULeft",&Thermo::compute_cpuremain,FLOAT);
|
||||||
|
|
||||||
} else if (strcmp(word,"atoms") == 0) {
|
} else if (strcmp(word,"atoms") == 0) {
|
||||||
addfield("Atoms",&Thermo::compute_atoms,BIGINT);
|
addfield("Atoms",&Thermo::compute_atoms,BIGINT);
|
||||||
|
@ -1015,6 +1017,12 @@ int Thermo::evaluate_keyword(char *word, double *answer)
|
||||||
"This variable thermo keyword cannot be used between runs");
|
"This variable thermo keyword cannot be used between runs");
|
||||||
compute_spcpu();
|
compute_spcpu();
|
||||||
|
|
||||||
|
} else if (strcmp(word,"cpuremain") == 0) {
|
||||||
|
if (update->whichflag == 0)
|
||||||
|
error->all(FLERR,
|
||||||
|
"This variable thermo keyword cannot be used between runs");
|
||||||
|
compute_cpuremain();
|
||||||
|
|
||||||
} else if (strcmp(word,"atoms") == 0) {
|
} else if (strcmp(word,"atoms") == 0) {
|
||||||
compute_atoms();
|
compute_atoms();
|
||||||
dvalue = bivalue;
|
dvalue = bivalue;
|
||||||
|
@ -1504,6 +1512,16 @@ void Thermo::compute_spcpu()
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void Thermo::compute_cpuremain()
|
||||||
|
{
|
||||||
|
if (firststep == 0) dvalue = 0.0;
|
||||||
|
else dvalue = timer->elapsed(TIME_LOOP) *
|
||||||
|
(update->laststep - update->ntimestep) /
|
||||||
|
(update->ntimestep - update->firststep);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void Thermo::compute_atoms()
|
void Thermo::compute_atoms()
|
||||||
{
|
{
|
||||||
bivalue = atom->natoms;
|
bivalue = atom->natoms;
|
||||||
|
|
|
@ -126,6 +126,7 @@ class Thermo : protected Pointers {
|
||||||
void compute_cpu();
|
void compute_cpu();
|
||||||
void compute_tpcpu();
|
void compute_tpcpu();
|
||||||
void compute_spcpu();
|
void compute_spcpu();
|
||||||
|
void compute_cpuremain();
|
||||||
|
|
||||||
void compute_atoms();
|
void compute_atoms();
|
||||||
void compute_temp();
|
void compute_temp();
|
||||||
|
|
Loading…
Reference in New Issue