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

This commit is contained in:
sjplimp
2007-10-03 16:22:30 +00:00
parent 92ff097469
commit 9be7620ace
96 changed files with 3347 additions and 3735 deletions

View File

@ -42,11 +42,13 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) :
// store temperature ID used by pressure computation
// insure it is valid for temperature computation
npre = 1;
id_pre = new char*[1];
int n = strlen(arg[3]) + 1;
id_pre = new char[n];
strcpy(id_pre,arg[3]);
id_pre[0] = new char[n];
strcpy(id_pre[0],arg[3]);
int icompute = modify->find_compute(id_pre);
int icompute = modify->find_compute(id_pre[0]);
if (icompute < 0) error->all("Could not find compute pressure temp ID");
if (modify->compute[icompute]->tempflag == 0)
@ -66,7 +68,6 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) :
ComputePressure::~ComputePressure()
{
delete [] id_pre;
delete [] vector;
delete [] vptr;
}
@ -81,7 +82,7 @@ void ComputePressure::init()
// set temperature used by pressure
int icompute = modify->find_compute(id_pre);
int icompute = modify->find_compute(id_pre[0]);
if (icompute < 0) error->all("Could not find compute pressure temp ID");
temperature = modify->compute[icompute];