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

This commit is contained in:
sjplimp 2007-07-02 20:08:42 +00:00
parent ded60d2d19
commit 4ad2e57e34
2 changed files with 3 additions and 4 deletions

View File

@ -215,7 +215,7 @@ void BondClass2::read_restart(FILE *fp)
/* ---------------------------------------------------------------------- */
void BondClass2::single(int type, double rsq, int i, int j, double rfactor,
void BondClass2::single(int type, double rsq, int i, int j,
int eflag, double &fforce, double &eng)
{
double r = sqrt(rsq);
@ -229,6 +229,5 @@ void BondClass2::single(int type, double rsq, int i, int j, double rfactor,
double de_bond = 2.0*k2[type]*dr + 3.0*k3[type]*dr2 + 4.0*k4[type]*dr3;
if (r > 0.0) fforce = -de_bond/r;
else fforce = 0.0;
if (eflag) eng = rfactor * (k2[type]*dr2 + k3[type]*dr3 + k4[type]*dr4);
if (eflag) eng = k2[type]*dr2 + k3[type]*dr3 + k4[type]*dr4;
}

View File

@ -28,7 +28,7 @@ class BondClass2 : public Bond {
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void single(int, double, int, int, double, int, double &, double &);
void single(int, double, int, int, int, double &, double &);
private:
double *r0,*k2,*k3,*k4;