git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14220 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
@ -15,7 +15,7 @@
|
||||
Contributing author: Jonathan Lee (Sandia)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "math.h"
|
||||
#include <math.h>
|
||||
#include "fix_wall_lj1043.h"
|
||||
#include "atom.h"
|
||||
#include "math_const.h"
|
||||
@ -25,7 +25,7 @@ using namespace MathConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixWallLJ1043::FixWallLJ1043(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixWallLJ1043::FixWallLJ1043(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixWall(lmp, narg, arg) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -43,7 +43,7 @@ void FixWallLJ1043::precompute(int m)
|
||||
double rinv = 1.0/cutoff[m];
|
||||
double r2inv = rinv*rinv;
|
||||
double r4inv = r2inv*r2inv;
|
||||
offset[m] = coeff1[m]*r4inv*r4inv*r2inv - coeff2[m]*r4inv -
|
||||
offset[m] = coeff1[m]*r4inv*r4inv*r2inv - coeff2[m]*r4inv -
|
||||
coeff3[m]*pow(cutoff[m]+coeff4[m],-3.0);
|
||||
}
|
||||
|
||||
@ -73,10 +73,10 @@ void FixWallLJ1043::wall_particle(int m, int which, double coord)
|
||||
r4inv = r2inv*r2inv;
|
||||
r10inv = r4inv*r4inv*r2inv;
|
||||
|
||||
fwall = side * (coeff5[m]*r10inv*rinv - coeff6[m]*r4inv*rinv -
|
||||
fwall = side * (coeff5[m]*r10inv*rinv - coeff6[m]*r4inv*rinv -
|
||||
coeff7[m]*pow(delta+coeff4[m],-4.0));
|
||||
f[i][dim] -= fwall;
|
||||
ewall[0] += coeff1[m]*r10inv - coeff2[m]*r4inv -
|
||||
ewall[0] += coeff1[m]*r10inv - coeff2[m]*r4inv -
|
||||
coeff3[m]*pow(delta+coeff4[m],-3.0) - offset[m];
|
||||
ewall[m+1] += fwall;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user