Commit 176f2c3a authored by sjplimp's avatar sjplimp Committed by GitHub
Browse files

Merge pull request #263 from andeplane/IP_RIGID_SHOCK

Initialize pointers in RIGID and SHOCK
parents 3f71bfb1 7cd7cda2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -27,7 +27,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */


ComputeERotateRigid::ComputeERotateRigid(LAMMPS *lmp, int narg, char **arg) :
ComputeERotateRigid::ComputeERotateRigid(LAMMPS *lmp, int narg, char **arg) :
  Compute(lmp, narg, arg)
  Compute(lmp, narg, arg), rfix(NULL)
{
{
  if (narg != 4) error->all(FLERR,"Illegal compute erotate/rigid command");
  if (narg != 4) error->all(FLERR,"Illegal compute erotate/rigid command");


+1 −1
Original line number Original line Diff line number Diff line
@@ -27,7 +27,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */


ComputeKERigid::ComputeKERigid(LAMMPS *lmp, int narg, char **arg) :
ComputeKERigid::ComputeKERigid(LAMMPS *lmp, int narg, char **arg) :
  Compute(lmp, narg, arg)
  Compute(lmp, narg, arg), rfix(NULL)
{
{
  if (narg != 4) error->all(FLERR,"Illegal compute ke/rigid command");
  if (narg != 4) error->all(FLERR,"Illegal compute ke/rigid command");


+1 −2
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ enum{ID,MOL,MASS,X,Y,Z,XU,YU,ZU,VX,VY,VZ,FX,FY,FZ,IX,IY,IZ,
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */


ComputeRigidLocal::ComputeRigidLocal(LAMMPS *lmp, int narg, char **arg) :
ComputeRigidLocal::ComputeRigidLocal(LAMMPS *lmp, int narg, char **arg) :
  Compute(lmp, narg, arg)
  Compute(lmp, narg, arg), rstyle(NULL), idrigid(NULL), fixrigid(NULL)
{
{
  if (narg < 5) error->all(FLERR,"Illegal compute rigid/local command");
  if (narg < 5) error->all(FLERR,"Illegal compute rigid/local command");


@@ -90,7 +90,6 @@ ComputeRigidLocal::ComputeRigidLocal(LAMMPS *lmp, int narg, char **arg) :
  ncount = nmax = 0;
  ncount = nmax = 0;
  vector = NULL;
  vector = NULL;
  array = NULL;
  array = NULL;
  fixrigid = NULL;
}
}


/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
+4 −3
Original line number Original line Diff line number Diff line
@@ -49,7 +49,9 @@ enum{CONSTANT,EQUAL,ATOM};


/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */


FixEHEX::FixEHEX(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
FixEHEX::FixEHEX(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
  idregion(NULL), x(NULL), f(NULL), v(NULL), 
  mass(NULL), rmass(NULL), type(NULL), scalingmask(NULL)
{
{
  MPI_Comm_rank(world, &me);
  MPI_Comm_rank(world, &me);
 
 
@@ -73,7 +75,6 @@ FixEHEX::FixEHEX(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
  // optional args
  // optional args


  iregion = -1;
  iregion = -1;
  idregion = NULL;
  
  
  // NOTE: constraints are deactivated by default
  // NOTE: constraints are deactivated by default


+10 −1
Original line number Original line Diff line number Diff line
@@ -56,7 +56,16 @@ enum{ISO,ANISO,TRICLINIC};
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */


FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) :
FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) :
  Fix(lmp, narg, arg)
  Fix(lmp, narg, arg), step_respa(NULL), 
  infile(NULL), nrigid(NULL), mol2body(NULL), body2mol(NULL), 
  body(NULL), displace(NULL), masstotal(NULL), xcm(NULL), 
  vcm(NULL), fcm(NULL), inertia(NULL), ex_space(NULL), 
  ey_space(NULL), ez_space(NULL), angmom(NULL), omega(NULL), 
  torque(NULL), quat(NULL), imagebody(NULL), fflag(NULL), 
  tflag(NULL), langextra(NULL), sum(NULL), all(NULL), 
  remapflag(NULL), xcmimage(NULL), eflags(NULL), orient(NULL), 
  dorient(NULL), id_dilate(NULL), random(NULL), avec_ellipsoid(NULL), 
  avec_line(NULL), avec_tri(NULL)
{
{
  int i,ibody;
  int i,ibody;


Loading