diff --git a/src/RIGID/compute_erotate_rigid.cpp b/src/RIGID/compute_erotate_rigid.cpp index 1659231ffb031651d131b9cb29b206b2947dc9d0..e31565cb6070844d8be629e49d4cd0b6ba99c3f1 100644 --- a/src/RIGID/compute_erotate_rigid.cpp +++ b/src/RIGID/compute_erotate_rigid.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ 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"); diff --git a/src/RIGID/compute_ke_rigid.cpp b/src/RIGID/compute_ke_rigid.cpp index f278b7c96dc24c9967bcab2fa64b67d03c3eae68..2db756140fb7b35a2934ad9fb7d63aacfc4a21a2 100644 --- a/src/RIGID/compute_ke_rigid.cpp +++ b/src/RIGID/compute_ke_rigid.cpp @@ -27,7 +27,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ 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"); diff --git a/src/RIGID/compute_rigid_local.cpp b/src/RIGID/compute_rigid_local.cpp index 9760945192840cc06200fc1c9fc0809e511c5737..b746e5e6d56c4576cd92a176609f9501123e4442 100644 --- a/src/RIGID/compute_rigid_local.cpp +++ b/src/RIGID/compute_rigid_local.cpp @@ -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) : - 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"); @@ -90,7 +90,6 @@ ComputeRigidLocal::ComputeRigidLocal(LAMMPS *lmp, int narg, char **arg) : ncount = nmax = 0; vector = NULL; array = NULL; - fixrigid = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/RIGID/fix_ehex.cpp b/src/RIGID/fix_ehex.cpp index c9688873747d40f425c06a0ca5cdb87c2ec5c975..522076639b434a9675acdd54d3513e4e76d09970 100644 --- a/src/RIGID/fix_ehex.cpp +++ b/src/RIGID/fix_ehex.cpp @@ -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); @@ -73,8 +75,7 @@ FixEHEX::FixEHEX(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) // optional args iregion = -1; - idregion = NULL; - + // NOTE: constraints are deactivated by default constraints = 0; diff --git a/src/RIGID/fix_ehex.h b/src/RIGID/fix_ehex.h index 3ae974fc0dc9bbae1d50d7b57a80e7e0bd49c187..3220b771954d1b32579b1df7d47c3e46741d0928 100644 --- a/src/RIGID/fix_ehex.h +++ b/src/RIGID/fix_ehex.h @@ -53,18 +53,18 @@ class FixEHEX : public Fix { char *idregion; int me; - double ** x; // coordinates - double ** f; // forces - double ** v; // velocities - double * mass; // masses - double * rmass; // reduced masses - int * type; // atom types + double **x; // coordinates + double **f; // forces + double **v; // velocities + double *mass; // masses + double *rmass; // reduced masses + int *type; // atom types int nlocal; // number of local atoms FixShake * fshake; // pointer to fix_shake/fix_rattle int constraints; // constraints (0/1) int cluster; // rescaling entire clusters (0/1) int hex; // HEX mode (0/1) - bool * scalingmask; // scalingmask[i] determines whether + bool *scalingmask; // scalingmask[i] determines whether // the velocity of atom i is to be rescaled }; diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index 8c1ecdacc9a2b1047fc21647ea3b598af57ce959..e9c06dee5c42b27806fb9133bfc38abf5bcc6fca 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -56,7 +56,16 @@ enum{ISO,ANISO,TRICLINIC}; /* ---------------------------------------------------------------------- */ 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; diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index b5b349c12e0d0563de90f7fa3af6b040a1c3d8aa..e67f3761353f0f3ae197d407dddc2c33890509c1 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -47,7 +47,12 @@ enum{ISO,ANISO,TRICLINIC}; // same as in FixRigid /* ---------------------------------------------------------------------- */ FixRigidNH::FixRigidNH(LAMMPS *lmp, int narg, char **arg) : - FixRigid(lmp, narg, arg) + FixRigid(lmp, narg, arg), conjqm(NULL), w(NULL), + wdti1(NULL), wdti2(NULL), wdti4(NULL), q_t(NULL), q_r(NULL), + eta_t(NULL), eta_r(NULL), eta_dot_t(NULL), eta_dot_r(NULL), + f_eta_t(NULL), f_eta_r(NULL), q_b(NULL), eta_b(NULL), + eta_dot_b(NULL), f_eta_b(NULL), rfix(NULL), id_temp(NULL), + id_press(NULL), temperature(NULL), pressure(NULL) { // error checks: could be moved up to FixRigid diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index 09d3b5de87b762d4cbdcd9e0100c1726791d1f30..b08c80b626bb59752c7656dd814c3c4e0dc45848 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -50,7 +50,12 @@ enum{FULL_BODY,INITIAL,FINAL,FORCE_TORQUE,VCM_ANGMOM,XCM_MASS,ITENSOR,DOF}; /* ---------------------------------------------------------------------- */ FixRigidNHSmall::FixRigidNHSmall(LAMMPS *lmp, int narg, char **arg) : - FixRigidSmall(lmp, narg, arg) + FixRigidSmall(lmp, narg, arg), w(NULL), wdti1(NULL), + wdti2(NULL), wdti4(NULL), q_t(NULL), q_r(NULL), eta_t(NULL), + eta_r(NULL), eta_dot_t(NULL), eta_dot_r(NULL), f_eta_t(NULL), + f_eta_r(NULL), q_b(NULL), eta_b(NULL), eta_dot_b(NULL), + f_eta_b(NULL), rfix(NULL), id_temp(NULL), id_press(NULL), + temperature(NULL), pressure(NULL) { // error checks diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index bc2cd04bccb89aa56b5b8466b5cbeeb7ca553da0..4358793a332578ef6e0a0b0163baa835f7002e61 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -67,7 +67,12 @@ enum{FULL_BODY,INITIAL,FINAL,FORCE_TORQUE,VCM_ANGMOM,XCM_MASS,ITENSOR,DOF}; /* ---------------------------------------------------------------------- */ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) + Fix(lmp, narg, arg), step_respa(NULL), + infile(NULL), body(NULL), bodyown(NULL), bodytag(NULL), atom2body(NULL), + xcmimage(NULL), displace(NULL), eflags(NULL), orient(NULL), dorient(NULL), + avec_ellipsoid(NULL), avec_line(NULL), avec_tri(NULL), counts(NULL), + itensor(NULL), mass_body(NULL), langextra(NULL), random(NULL), id_dilate(NULL), + onemols(NULL), hash(NULL), bbox(NULL), ctr(NULL), idclose(NULL), rsqclose(NULL) { int i; diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index fe9116e4461bd491f5af6635c530487e7d3b353e..5907a69b1fcb9ecd9c9958ad523e433a34cecc43 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -49,7 +49,16 @@ FixShake *FixShake::fsptr; /* ---------------------------------------------------------------------- */ FixShake::FixShake(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) + Fix(lmp, narg, arg), bond_flag(NULL), angle_flag(NULL), + type_flag(NULL), mass_list(NULL), bond_distance(NULL), angle_distance(NULL), + loop_respa(NULL), step_respa(NULL), x(NULL), v(NULL), f(NULL), ftmp(NULL), + vtmp(NULL), mass(NULL), rmass(NULL), type(NULL), shake_flag(NULL), + shake_atom(NULL), shake_type(NULL), xshake(NULL), nshake(NULL), + list(NULL), b_count(NULL), b_count_all(NULL), b_ave(NULL), b_max(NULL), + b_min(NULL), b_ave_all(NULL), b_max_all(NULL), b_min_all(NULL), + a_count(NULL), a_count_all(NULL), a_ave(NULL), a_max(NULL), a_min(NULL), + a_ave_all(NULL), a_max_all(NULL), a_min_all(NULL), atommols(NULL), + onemols(NULL) { MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index e14d88aad9c9ef0e0b90bbb7cac92c1b61d16b59..13aca77ca314d6b8bd41a510848420eb709f998e 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -37,7 +37,8 @@ enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files /* ---------------------------------------------------------------------- */ FixAppendAtoms::FixAppendAtoms(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) + Fix(lmp, narg, arg), randomx(NULL), randomt(NULL), basistype(NULL), + spatialid(NULL), gfactor1(NULL), gfactor2(NULL) { force_reneighbor = 1; next_reneighbor = -1; diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 42b835860274a85f21264d0c5676a1ad6c0fd697..c514a9f086a008c970a9c6994b5fbdce5fd09354 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -40,7 +40,9 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) + Fix(lmp, narg, arg), old_velocity(NULL), rfix(NULL), + id_temp(NULL), id_press(NULL), id_pe(NULL), temperature(NULL), + pressure(NULL), pe(NULL), atoms_allocated(0) { if (narg < 4) error->all(FLERR,"Illegal fix msst command"); diff --git a/src/SHOCK/fix_nphug.cpp b/src/SHOCK/fix_nphug.cpp index 7fc0f8a3816e56ea0c4cb66f933c7a402a2a8153..d28e9daf775e7bf85e8f20b52413f0e4ab7feeba 100644 --- a/src/SHOCK/fix_nphug.cpp +++ b/src/SHOCK/fix_nphug.cpp @@ -34,7 +34,7 @@ enum{ISO,ANISO,TRICLINIC}; // same as fix_nh.cpp /* ---------------------------------------------------------------------- */ FixNPHug::FixNPHug(LAMMPS *lmp, int narg, char **arg) : - FixNH(lmp, narg, arg) + FixNH(lmp, narg, arg), pe(NULL), id_pe(NULL) { // Prevent masses from being updated every timestep diff --git a/src/SHOCK/fix_wall_piston.cpp b/src/SHOCK/fix_wall_piston.cpp index 3513d6e759631db46b335772dcaf6bd8af488307..7dff3d986ff136083566df2ab6988e904bf8fe9a 100644 --- a/src/SHOCK/fix_wall_piston.cpp +++ b/src/SHOCK/fix_wall_piston.cpp @@ -33,7 +33,7 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) + Fix(lmp, narg, arg), randomt(NULL), gfactor1(NULL), gfactor2(NULL) { force_reneighbor = 1; next_reneighbor = -1;