From c6aa79e008bbaec1e566653e03d83dc3b4c4b487 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 6 Feb 2008 00:03:11 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1463 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/thermo.cpp | 34 +++++++++++++++++++++++++++++++++- src/thermo.h | 4 ++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/thermo.cpp b/src/thermo.cpp index 155d961136..03f005b26c 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -42,7 +42,7 @@ using namespace LAMMPS_NS; // step, atoms, cpu, 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 +// vol, lx, ly, lz, xlo, xhi, ylo, yhi, zlo, zhi, xy, xz, yz // pxx, pyy, pzz, pxy, pxz, pyz // drot, grot (rotational KE for dipole and granular particles) @@ -699,6 +699,13 @@ void Thermo::parse_fields(char *str) } else if (strcmp(word,"zhi") == 0) { addfield("Zhi",&Thermo::compute_zhi,FLOAT); + } else if (strcmp(word,"xy") == 0) { + addfield("Xy",&Thermo::compute_xy,FLOAT); + } else if (strcmp(word,"xz") == 0) { + addfield("Xz",&Thermo::compute_xz,FLOAT); + } else if (strcmp(word,"yz") == 0) { + addfield("Yz",&Thermo::compute_yz,FLOAT); + } else if (strcmp(word,"pxx") == 0) { addfield("Pxx",&Thermo::compute_pxx,FLOAT); index_press = add_compute(id_press,1); @@ -972,6 +979,10 @@ int Thermo::evaluate_keyword(char *word, double *answer) else if (strcmp(word,"zlo") == 0) compute_zlo(); else if (strcmp(word,"zhi") == 0) compute_zhi(); + else if (strcmp(word,"xy") == 0) compute_xy(); + else if (strcmp(word,"xz") == 0) compute_xz(); + else if (strcmp(word,"yz") == 0) compute_yz(); + else if (strcmp(word,"pxx") == 0) compute_pxx(); else if (strcmp(word,"pyy") == 0) compute_pyy(); else if (strcmp(word,"pzz") == 0) compute_pzz(); @@ -1342,6 +1353,27 @@ void Thermo::compute_zhi() /* ---------------------------------------------------------------------- */ +void Thermo::compute_xy() +{ + dvalue = domain->xy; +} + +/* ---------------------------------------------------------------------- */ + +void Thermo::compute_xz() +{ + dvalue = domain->xz; +} + +/* ---------------------------------------------------------------------- */ + +void Thermo::compute_yz() +{ + dvalue = domain->yz; +} + +/* ---------------------------------------------------------------------- */ + void Thermo::compute_pxx() { if (thermoflag == 0 && !(pressure->invoked & INVOKED_VECTOR)) diff --git a/src/thermo.h b/src/thermo.h index 3396733951..94e5d9e768 100644 --- a/src/thermo.h +++ b/src/thermo.h @@ -143,6 +143,10 @@ class Thermo : protected Pointers { void compute_zlo(); void compute_zhi(); + void compute_xy(); + void compute_xz(); + void compute_yz(); + void compute_pxx(); void compute_pyy(); void compute_pzz();