git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2748 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2009-04-10 23:20:41 +00:00
parent 0d29a6db12
commit 721d689f93
4 changed files with 11 additions and 1 deletions

View File

@ -90,7 +90,7 @@ FixTTM::FixTTM(LAMMPS *lmp, int narg, char **arg) :
if (gamma_p <= 0.0) error->all("Fix ttm gamma_p must be > 0.0");
if (gamma_s < 0.0) error->all("Fix ttm gamma_s must be >= 0.0");
if (v_0 < 0.0) error->all("Fix ttm v_0 must be >= 0.0");
if (nxnodes <= 0 or nynodes <= 0 or nznodes <= 0)
if (nxnodes <= 0 || nynodes <= 0 || nznodes <= 0)
error->all("Fix ttm number of nodes must be > 0");
v_0_sq = v_0*v_0;

View File

@ -363,6 +363,12 @@ void Output::create_thermo(int narg, char **arg)
if (domain->box_exist == 0)
error->all("Thermo_style command before simulation box is defined");
// warn if previous thermo had been modified via thermo_modify command
if (thermo->modified && comm->me == 0)
error->warning("New thermo_style command, "
"previous thermo_modify settings will be lost");
// set thermo = NULL in case new Thermo throws an error
delete thermo;

View File

@ -73,6 +73,7 @@ Thermo::Thermo(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
// set thermo_modify defaults
modified = 0;
normuserflag = 0;
lineflag = ONELINE;
lostflag = ERROR;
@ -358,6 +359,8 @@ void Thermo::modify_params(int narg, char **arg)
{
if (narg == 0) error->all("Illegal thermo_modify command");
modified = 1;
int iarg = 0;
while (iarg < narg) {
if (strcmp(arg[iarg],"temp") == 0) {

View File

@ -25,6 +25,7 @@ class Thermo : protected Pointers {
public:
char *style;
int normflag; // 0 if do not normalize by atoms, 1 if normalize
int modified; // 1 if thermo_modify has been used, else 0
Thermo(class LAMMPS *, int, char **);
~Thermo();