sync with Git

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15519 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
sjplimp
2016-08-29 22:52:03 +00:00
parent 236241b100
commit 2993aec312
48 changed files with 109 additions and 135 deletions

View File

@ -38,7 +38,10 @@ int Compute::instance_total = 0;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp),
id(NULL), style(NULL),
vector(NULL), array(NULL), vector_atom(NULL), array_atom(NULL), vector_local(NULL), array_local(NULL),
tlist(NULL), vbiasall(NULL)
{ {
instance_me = instance_total++; instance_me = instance_total++;
@ -93,7 +96,6 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
// setup list of timesteps // setup list of timesteps
ntime = maxtime = 0; ntime = maxtime = 0;
tlist = NULL;
// data masks // data masks
@ -105,11 +107,6 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
datamask_modify = ALL_MASK; datamask_modify = ALL_MASK;
copymode = 0; copymode = 0;
// force init to zero in case these are used as logicals
vector = vector_atom = vector_local = NULL;
array = array_atom = array_local = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -24,7 +24,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeAngle::ComputeAngle(LAMMPS *lmp, int narg, char **arg) : ComputeAngle::ComputeAngle(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
emine(NULL)
{ {
if (narg != 3) error->all(FLERR,"Illegal compute angle command"); if (narg != 3) error->all(FLERR,"Illegal compute angle command");

View File

@ -33,7 +33,8 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeAngleLocal::ComputeAngleLocal(LAMMPS *lmp, int narg, char **arg) : ComputeAngleLocal::ComputeAngleLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
vector(NULL), array(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute angle/local command"); if (narg < 4) error->all(FLERR,"Illegal compute angle/local command");
@ -55,8 +56,6 @@ ComputeAngleLocal::ComputeAngleLocal(LAMMPS *lmp, int narg, char **arg) :
} }
nmax = 0; nmax = 0;
vector = NULL;
array = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeAngmomChunk::ComputeAngmomChunk(LAMMPS *lmp, int narg, char **arg) : ComputeAngmomChunk::ComputeAngmomChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), angmom(NULL), angmomall(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute angmom/chunk command"); if (narg != 4) error->all(FLERR,"Illegal compute angmom/chunk command");
@ -48,9 +49,6 @@ ComputeAngmomChunk::ComputeAngmomChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
massproc = masstotal = NULL;
com = comall = NULL;
angmom = angmomall = NULL;
allocate(); allocate();
} }

View File

@ -24,7 +24,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeBond::ComputeBond(LAMMPS *lmp, int narg, char **arg) : ComputeBond::ComputeBond(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
emine(NULL)
{ {
if (narg != 3) error->all(FLERR,"Illegal compute bond command"); if (narg != 3) error->all(FLERR,"Illegal compute bond command");

View File

@ -33,7 +33,8 @@ enum{DIST,ENG,FORCE};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeBondLocal::ComputeBondLocal(LAMMPS *lmp, int narg, char **arg) : ComputeBondLocal::ComputeBondLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
bstyle(NULL), vector(NULL), array(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute bond/local command"); if (narg < 4) error->all(FLERR,"Illegal compute bond/local command");
@ -62,8 +63,6 @@ ComputeBondLocal::ComputeBondLocal(LAMMPS *lmp, int narg, char **arg) :
if (bstyle[i] != DIST) singleflag = 1; if (bstyle[i] != DIST) singleflag = 1;
nmax = 0; nmax = 0;
vector = NULL;
array = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -36,7 +36,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeCentroAtom::ComputeCentroAtom(LAMMPS *lmp, int narg, char **arg) : ComputeCentroAtom::ComputeCentroAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
distsq(NULL), nearest(NULL), centro(NULL)
{ {
if (narg < 4 || narg > 6) error->all(FLERR,"Illegal compute centro/atom command"); if (narg < 4 || narg > 6) error->all(FLERR,"Illegal compute centro/atom command");
@ -69,11 +70,7 @@ ComputeCentroAtom::ComputeCentroAtom(LAMMPS *lmp, int narg, char **arg) :
else size_peratom_cols = 10; else size_peratom_cols = 10;
nmax = 0; nmax = 0;
centro = NULL;
maxneigh = 0; maxneigh = 0;
distsq = NULL;
nearest = NULL;
array_atom = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -56,7 +56,10 @@ ComputeChunkAtom *ComputeChunkAtom::cptr;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
id_fix(NULL), chunk(NULL), ichunk(NULL), exclude(NULL),
chunk_volume_vec(NULL), coord(NULL), chunkID(NULL), idregion(NULL), cfvid(NULL),
hash(NULL), varatom(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute chunk/atom command"); if (narg < 4) error->all(FLERR,"Illegal compute chunk/atom command");

View File

@ -34,7 +34,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeClusterAtom::ComputeClusterAtom(LAMMPS *lmp, int narg, char **arg) : ComputeClusterAtom::ComputeClusterAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
clusterID(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute cluster/atom command"); if (narg != 4) error->all(FLERR,"Illegal compute cluster/atom command");
@ -46,7 +47,6 @@ ComputeClusterAtom::ComputeClusterAtom(LAMMPS *lmp, int narg, char **arg) :
comm_forward = 1; comm_forward = 1;
nmax = 0; nmax = 0;
clusterID = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -42,7 +42,8 @@ enum{NCOMMON,NBOND,MAXBOND,MINBOND};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeCNAAtom::ComputeCNAAtom(LAMMPS *lmp, int narg, char **arg) : ComputeCNAAtom::ComputeCNAAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
nearest(NULL), nnearest(NULL), pattern(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute cna/atom command"); if (narg != 4) error->all(FLERR,"Illegal compute cna/atom command");
@ -54,9 +55,6 @@ ComputeCNAAtom::ComputeCNAAtom(LAMMPS *lmp, int narg, char **arg) :
cutsq = cutoff*cutoff; cutsq = cutoff*cutoff;
nmax = 0; nmax = 0;
nearest = NULL;
nnearest = NULL;
pattern = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -28,7 +28,8 @@ enum{ONCE,NFREQ,EVERY};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeCOMChunk::ComputeCOMChunk(LAMMPS *lmp, int narg, char **arg) : ComputeCOMChunk::ComputeCOMChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), masstotal(NULL), massproc(NULL), com(NULL), comall(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute com/chunk command"); if (narg != 4) error->all(FLERR,"Illegal compute com/chunk command");
@ -50,8 +51,6 @@ ComputeCOMChunk::ComputeCOMChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
massproc = masstotal = NULL;
com = comall = NULL;
allocate(); allocate();
firstflag = massneed = 1; firstflag = massneed = 1;

View File

@ -32,7 +32,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeContactAtom::ComputeContactAtom(LAMMPS *lmp, int narg, char **arg) : ComputeContactAtom::ComputeContactAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
contact(NULL)
{ {
if (narg != 3) error->all(FLERR,"Illegal compute contact/atom command"); if (narg != 3) error->all(FLERR,"Illegal compute contact/atom command");
@ -41,7 +42,6 @@ ComputeContactAtom::ComputeContactAtom(LAMMPS *lmp, int narg, char **arg) :
comm_reverse = 1; comm_reverse = 1;
nmax = 0; nmax = 0;
contact = NULL;
// error checks // error checks

View File

@ -32,7 +32,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) : ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
typelo(NULL), typehi(NULL), cvec(NULL), carray(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute coord/atom command"); if (narg < 4) error->all(FLERR,"Illegal compute coord/atom command");
@ -65,8 +66,6 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
else size_peratom_cols = ncol; else size_peratom_cols = ncol;
nmax = 0; nmax = 0;
cvec = NULL;
carray = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -24,7 +24,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeDihedral::ComputeDihedral(LAMMPS *lmp, int narg, char **arg) : ComputeDihedral::ComputeDihedral(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
emine(NULL)
{ {
if (narg != 3) error->all(FLERR,"Illegal compute dihedral command"); if (narg != 3) error->all(FLERR,"Illegal compute dihedral command");

View File

@ -34,7 +34,8 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeDihedralLocal::ComputeDihedralLocal(LAMMPS *lmp, int narg, char **arg) : ComputeDihedralLocal::ComputeDihedralLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
vector(NULL), array(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute dihedral/local command"); if (narg < 4) error->all(FLERR,"Illegal compute dihedral/local command");
@ -56,8 +57,6 @@ ComputeDihedralLocal::ComputeDihedralLocal(LAMMPS *lmp, int narg, char **arg) :
} }
nmax = 0; nmax = 0;
vector = NULL;
array = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -30,7 +30,9 @@ enum { MASSCENTER, GEOMCENTER };
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeDipoleChunk::ComputeDipoleChunk(LAMMPS *lmp, int narg, char **arg) : ComputeDipoleChunk::ComputeDipoleChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), massproc(NULL), masstotal(NULL), chrgproc(NULL), chrgtotal(NULL), com(NULL),
comall(NULL), dipole(NULL), dipoleall(NULL)
{ {
if ((narg != 4) && (narg != 5)) error->all(FLERR,"Illegal compute dipole/chunk command"); if ((narg != 4) && (narg != 5)) error->all(FLERR,"Illegal compute dipole/chunk command");
@ -60,10 +62,6 @@ ComputeDipoleChunk::ComputeDipoleChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
massproc = masstotal = NULL;
chrgproc = chrgtotal = NULL;
com = comall = NULL;
dipole = dipoleall = NULL;
allocate(); allocate();
} }

View File

@ -29,7 +29,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) : ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
id_fix(NULL), displace(NULL)
{ {
if (narg != 3) error->all(FLERR,"Illegal compute displace/atom command"); if (narg != 3) error->all(FLERR,"Illegal compute displace/atom command");
@ -76,7 +77,6 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) :
// per-atom displacement array // per-atom displacement array
nmax = 0; nmax = 0;
displace = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -29,7 +29,8 @@ using namespace LAMMPS_NS;
ComputeErotateSphereAtom:: ComputeErotateSphereAtom::
ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) : ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
erot(NULL)
{ {
if (narg != 3) if (narg != 3)
error->all(FLERR,"Illegal compute erotate/sphere//atom command"); error->all(FLERR,"Illegal compute erotate/sphere//atom command");
@ -43,7 +44,6 @@ ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Compute erotate/sphere/atom requires atom style sphere"); error->all(FLERR,"Compute erotate/sphere/atom requires atom style sphere");
nmax = 0; nmax = 0;
erot = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -42,7 +42,8 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeGroupGroup::ComputeGroupGroup(LAMMPS *lmp, int narg, char **arg) : ComputeGroupGroup::ComputeGroupGroup(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
group2(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute group/group command"); if (narg < 4) error->all(FLERR,"Illegal compute group/group command");

View File

@ -27,7 +27,9 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp, int narg, char **arg) : ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), rg(NULL),
rgall(NULL), rgt(NULL), rgtall(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute gyration/chunk command"); if (narg < 4) error->all(FLERR,"Illegal compute gyration/chunk command");
@ -67,10 +69,6 @@ ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
massproc = masstotal = NULL;
com = comall = NULL;
rg = rgall = NULL;
rgt = rgtall = NULL;
allocate(); allocate();
} }

View File

@ -33,7 +33,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeHeatFlux::ComputeHeatFlux(LAMMPS *lmp, int narg, char **arg) : ComputeHeatFlux::ComputeHeatFlux(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
id_ke(NULL), id_pe(NULL), id_stress(NULL)
{ {
if (narg != 6) error->all(FLERR,"Illegal compute heat/flux command"); if (narg != 6) error->all(FLERR,"Illegal compute heat/flux command");

View File

@ -44,7 +44,8 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeHexOrderAtom::ComputeHexOrderAtom(LAMMPS *lmp, int narg, char **arg) : ComputeHexOrderAtom::ComputeHexOrderAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
distsq(NULL), nearest(NULL), qnarray(NULL)
{ {
if (narg < 3 ) error->all(FLERR,"Illegal compute hexorder/atom command"); if (narg < 3 ) error->all(FLERR,"Illegal compute hexorder/atom command");
@ -87,10 +88,7 @@ ComputeHexOrderAtom::ComputeHexOrderAtom(LAMMPS *lmp, int narg, char **arg) :
size_peratom_cols = ncol; size_peratom_cols = ncol;
nmax = 0; nmax = 0;
qnarray = NULL;
maxneigh = 0; maxneigh = 0;
distsq = NULL;
nearest = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -24,7 +24,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeImproper::ComputeImproper(LAMMPS *lmp, int narg, char **arg) : ComputeImproper::ComputeImproper(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
emine(NULL)
{ {
if (narg != 3) error->all(FLERR,"Illegal compute improper command"); if (narg != 3) error->all(FLERR,"Illegal compute improper command");

View File

@ -35,7 +35,8 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) : ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
vector(NULL), array(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute improper/local command"); if (narg < 4) error->all(FLERR,"Illegal compute improper/local command");
@ -57,8 +58,6 @@ ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) :
} }
nmax = 0; nmax = 0;
vector = NULL;
array = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -26,7 +26,9 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) : ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL),
inertia(NULL), inertiaall(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute inertia/chunk command"); if (narg != 4) error->all(FLERR,"Illegal compute inertia/chunk command");
@ -48,9 +50,6 @@ ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
massproc = masstotal = NULL;
com = comall = NULL;
inertia = inertiaall = NULL;
allocate(); allocate();
} }

View File

@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeKEAtom::ComputeKEAtom(LAMMPS *lmp, int narg, char **arg) : ComputeKEAtom::ComputeKEAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
ke(NULL)
{ {
if (narg != 3) error->all(FLERR,"Illegal compute ke/atom command"); if (narg != 3) error->all(FLERR,"Illegal compute ke/atom command");
@ -34,7 +35,6 @@ ComputeKEAtom::ComputeKEAtom(LAMMPS *lmp, int narg, char **arg) :
size_peratom_cols = 0; size_peratom_cols = 0;
nmax = 0; nmax = 0;
ke = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
id_fix(NULL)
{ {
if (narg < 3) error->all(FLERR,"Illegal compute msd command"); if (narg < 3) error->all(FLERR,"Illegal compute msd command");

View File

@ -28,7 +28,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) : ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), id_fix(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), msd(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute msd/chunk command"); if (narg != 4) error->all(FLERR,"Illegal compute msd/chunk command");
@ -47,10 +48,6 @@ ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) :
firstflag = 1; firstflag = 1;
init(); init();
massproc = masstotal = NULL;
com = comall = NULL;
msd = NULL;
// create a new fix STORE style for reference positions // create a new fix STORE style for reference positions
// id = compute-ID + COMPUTE_STORE, fix group = compute group // id = compute-ID + COMPUTE_STORE, fix group = compute group
// do not know size of array at this point, just allocate 1x3 array // do not know size of array at this point, just allocate 1x3 array

View File

@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeOmegaChunk::ComputeOmegaChunk(LAMMPS *lmp, int narg, char **arg) : ComputeOmegaChunk::ComputeOmegaChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), angmom(NULL), angmomall(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute omega/chunk command"); if (narg != 4) error->all(FLERR,"Illegal compute omega/chunk command");
@ -48,9 +49,6 @@ ComputeOmegaChunk::ComputeOmegaChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
massproc = masstotal = NULL;
com = comall = NULL;
angmom = angmomall = NULL;
allocate(); allocate();
} }

View File

@ -45,7 +45,8 @@ using namespace std;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg) : ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
distsq(NULL), nearest(NULL), rlist(NULL), qlist(NULL), qnarray(NULL), qnm_r(NULL), qnm_i(NULL)
{ {
if (narg < 3 ) error->all(FLERR,"Illegal compute orientorder/atom command"); if (narg < 3 ) error->all(FLERR,"Illegal compute orientorder/atom command");
@ -109,13 +110,7 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg
size_peratom_cols = ncol; size_peratom_cols = ncol;
nmax = 0; nmax = 0;
qnarray = NULL;
maxneigh = 0; maxneigh = 0;
distsq = NULL;
nearest = NULL;
rlist = NULL;
qnm_r = NULL;
qnm_i = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -26,7 +26,8 @@ enum{EPAIR,EVDWL,ECOUL};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputePair::ComputePair(LAMMPS *lmp, int narg, char **arg) : ComputePair::ComputePair(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
pstyle(NULL), pair(NULL), one(NULL)
{ {
if (narg < 4 || narg > 5) error->all(FLERR,"Illegal compute pair command"); if (narg < 4 || narg > 5) error->all(FLERR,"Illegal compute pair command");

View File

@ -36,7 +36,8 @@ enum{TYPE,RADIUS};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) : ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
pstyle(NULL), pindex(NULL), vector(NULL), array(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute pair/local command"); if (narg < 4) error->all(FLERR,"Illegal compute pair/local command");
@ -96,8 +97,6 @@ ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
if (pstyle[i] != DIST) singleflag = 1; if (pstyle[i] != DIST) singleflag = 1;
nmax = 0; nmax = 0;
vector = NULL;
array = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -33,7 +33,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputePEAtom::ComputePEAtom(LAMMPS *lmp, int narg, char **arg) : ComputePEAtom::ComputePEAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
energy(NULL)
{ {
if (narg < 3) error->all(FLERR,"Illegal compute pe/atom command"); if (narg < 3) error->all(FLERR,"Illegal compute pe/atom command");
@ -68,7 +69,6 @@ ComputePEAtom::ComputePEAtom(LAMMPS *lmp, int narg, char **arg) :
} }
nmax = 0; nmax = 0;
energy = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -34,7 +34,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
vptr(NULL), id_temp(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute pressure command"); if (narg < 4) error->all(FLERR,"Illegal compute pressure command");
if (igroup) error->all(FLERR,"Compute pressure must use group all"); if (igroup) error->all(FLERR,"Compute pressure must use group all");

View File

@ -32,7 +32,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) : ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
index(NULL), vector(NULL), array(NULL), pack_choice(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute property/atom command"); if (narg < 4) error->all(FLERR,"Illegal compute property/atom command");
@ -352,8 +353,6 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
} }
nmax = 0; nmax = 0;
vector = NULL;
array = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -25,7 +25,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputePropertyChunk::ComputePropertyChunk(LAMMPS *lmp, int narg, char **arg) : ComputePropertyChunk::ComputePropertyChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), count_one(NULL), count_all(NULL)
{ {
if (narg < 5) error->all(FLERR,"Illegal compute property/chunk command"); if (narg < 5) error->all(FLERR,"Illegal compute property/chunk command");
@ -78,9 +79,6 @@ ComputePropertyChunk::ComputePropertyChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
vector = NULL;
array = NULL;
count_one = count_all = NULL;
allocate(); allocate();
if (nvalues == 1) { if (nvalues == 1) {

View File

@ -34,7 +34,8 @@ enum{TYPE,RADIUS};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) : ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
vector(NULL), array(NULL), indices(NULL), pack_choice(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute property/local command"); if (narg < 4) error->all(FLERR,"Illegal compute property/local command");
@ -253,9 +254,6 @@ ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Compute property/local requires atom attribute radius"); error->all(FLERR,"Compute property/local requires atom attribute radius");
nmax = 0; nmax = 0;
vector = NULL;
array = NULL;
indices = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -38,7 +38,9 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) : ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
rdfpair(NULL), nrdfpair(NULL), ilo(NULL), ihi(NULL), jlo(NULL), jhi(NULL),
hist(NULL), histall(NULL), typecount(NULL), icount(NULL), jcount(NULL), duplicates(NULL)
{ {
if (narg < 4 || (narg-4) % 2) error->all(FLERR,"Illegal compute rdf command"); if (narg < 4 || (narg-4) % 2) error->all(FLERR,"Illegal compute rdf command");

View File

@ -43,7 +43,9 @@ enum{PERATOM,LOCAL};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) : ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
nvalues(0), which(NULL), argindex(NULL), flavor(NULL), value2index(NULL), ids(NULL),
onevec(NULL), replace(NULL), indices(NULL), owner(NULL), idregion(NULL), varatom(NULL)
{ {
int iarg = 0; int iarg = 0;
if (strcmp(style,"reduce") == 0) { if (strcmp(style,"reduce") == 0) {

View File

@ -34,7 +34,8 @@ enum{COMPUTE,FIX,VARIABLE};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeSlice::ComputeSlice(LAMMPS *lmp, int narg, char **arg) : ComputeSlice::ComputeSlice(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
nvalues(0), which(NULL), argindex(NULL), value2index(NULL), ids(NULL)
{ {
if (narg < 7) error->all(FLERR,"Illegal compute slice command"); if (narg < 7) error->all(FLERR,"Illegal compute slice command");

View File

@ -36,7 +36,8 @@ enum{NOBIAS,BIAS};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeStressAtom::ComputeStressAtom(LAMMPS *lmp, int narg, char **arg) : ComputeStressAtom::ComputeStressAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
id_temp(NULL), stress(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute stress/atom command"); if (narg < 4) error->all(FLERR,"Illegal compute stress/atom command");
@ -98,7 +99,6 @@ ComputeStressAtom::ComputeStressAtom(LAMMPS *lmp, int narg, char **arg) :
} }
nmax = 0; nmax = 0;
stress = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -29,7 +29,9 @@ enum{TEMP,KECOM,INTERNAL};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeTempChunk::ComputeTempChunk(LAMMPS *lmp, int narg, char **arg) : ComputeTempChunk::ComputeTempChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
which(NULL), idchunk(NULL), id_bias(NULL), sum(NULL), sumall(NULL), count(NULL),
countall(NULL), massproc(NULL), masstotal(NULL), vcm(NULL), vcmall(NULL)
{ {
if (narg < 4) error->all(FLERR,"Illegal compute temp/chunk command"); if (narg < 4) error->all(FLERR,"Illegal compute temp/chunk command");
@ -129,11 +131,6 @@ ComputeTempChunk::ComputeTempChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
sum = sumall = NULL;
count = countall = NULL;
massproc = masstotal = NULL;
vcm = vcmall = NULL;
array = NULL;
if (nvalues) { if (nvalues) {
array_flag = 1; array_flag = 1;

View File

@ -31,7 +31,8 @@ enum{TENSOR,BIN};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeTempProfile::ComputeTempProfile(LAMMPS *lmp, int narg, char **arg) : ComputeTempProfile::ComputeTempProfile(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
bin(NULL), vbin(NULL), binave(NULL), tbin(NULL), tbinall(NULL)
{ {
if (narg < 7) error->all(FLERR,"Illegal compute temp/profile command"); if (narg < 7) error->all(FLERR,"Illegal compute temp/profile command");
@ -138,7 +139,6 @@ ComputeTempProfile::ComputeTempProfile(LAMMPS *lmp, int narg, char **arg) :
} }
maxatom = 0; maxatom = 0;
bin = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -28,7 +28,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeTempRegion::ComputeTempRegion(LAMMPS *lmp, int narg, char **arg) : ComputeTempRegion::ComputeTempRegion(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idregion(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute temp/region command"); if (narg != 4) error->all(FLERR,"Illegal compute temp/region command");

View File

@ -33,7 +33,8 @@ enum{ROTATE,ALL};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) : ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
id_bias(NULL)
{ {
if (narg < 3) error->all(FLERR,"Illegal compute temp/sphere command"); if (narg < 3) error->all(FLERR,"Illegal compute temp/sphere command");
@ -44,7 +45,6 @@ ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) :
tempflag = 1; tempflag = 1;
tempbias = 0; tempbias = 0;
id_bias = NULL;
mode = ALL; mode = ALL;
int iarg = 3; int iarg = 3;

View File

@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeTorqueChunk::ComputeTorqueChunk(LAMMPS *lmp, int narg, char **arg) : ComputeTorqueChunk::ComputeTorqueChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), torque(NULL), torqueall(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute torque/chunk command"); if (narg != 4) error->all(FLERR,"Illegal compute torque/chunk command");
@ -48,9 +49,6 @@ ComputeTorqueChunk::ComputeTorqueChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
massproc = masstotal = NULL;
com = comall = NULL;
torque = torqueall = NULL;
allocate(); allocate();
} }

View File

@ -25,7 +25,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeVACF::ComputeVACF(LAMMPS *lmp, int narg, char **arg) : ComputeVACF::ComputeVACF(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
id_fix(NULL)
{ {
if (narg < 3) error->all(FLERR,"Illegal compute vacf command"); if (narg < 3) error->all(FLERR,"Illegal compute vacf command");

View File

@ -28,7 +28,8 @@ enum{ONCE,NFREQ,EVERY};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
ComputeVCMChunk::ComputeVCMChunk(LAMMPS *lmp, int narg, char **arg) : ComputeVCMChunk::ComputeVCMChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg) Compute(lmp, narg, arg),
idchunk(NULL), massproc(NULL), masstotal(NULL), vcm(NULL), vcmall(NULL)
{ {
if (narg != 4) error->all(FLERR,"Illegal compute vcm/chunk command"); if (narg != 4) error->all(FLERR,"Illegal compute vcm/chunk command");
@ -50,8 +51,6 @@ ComputeVCMChunk::ComputeVCMChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1; nchunk = 1;
maxchunk = 0; maxchunk = 0;
massproc = masstotal = NULL;
vcm = vcmall = NULL;
allocate(); allocate();
firstflag = massneed = 1; firstflag = massneed = 1;