git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5060 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -29,7 +29,11 @@ ComputePair::ComputePair(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (narg != 4) error->all("Illegal compute pair command");
|
||||
if (igroup) error->all("Compute pair must use group all");
|
||||
|
||||
pair = force->pair_match(arg[3],1);
|
||||
int n = strlen(arg[3]) + 1;
|
||||
pstyle = new char[n];
|
||||
strcpy(pstyle,arg[3]);
|
||||
|
||||
pair = force->pair_match(pstyle,1);
|
||||
if (!pair) error->all("Unrecognized pair style in compute pair command");
|
||||
npair = pair->nextra;
|
||||
if (!npair)
|
||||
@ -51,12 +55,23 @@ ComputePair::ComputePair(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
ComputePair::~ComputePair()
|
||||
{
|
||||
delete [] pstyle;
|
||||
delete [] one;
|
||||
delete [] vector;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ComputePair::init()
|
||||
{
|
||||
// recheck for pair style in case it has been deleted
|
||||
|
||||
pair = force->pair_match(pstyle,1);
|
||||
if (!pair) error->all("Unrecognized pair style in compute pair command");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ComputePair::compute_vector()
|
||||
{
|
||||
invoked_vector = update->ntimestep;
|
||||
|
||||
Reference in New Issue
Block a user