undo cosmetic differences between LAMMPS-ICMS and LAMMPS
This commit is contained in:
@ -16,7 +16,6 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "mpiio.h"
|
|
||||||
#include "restart_mpiio.h"
|
#include "restart_mpiio.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "limits.h"
|
#include "limits.h"
|
||||||
|
|||||||
@ -194,7 +194,7 @@ VerletSplit::VerletSplit(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
// f_kspace = Rspace copy of Kspace forces
|
// f_kspace = Rspace copy of Kspace forces
|
||||||
// allocate dummy version for Kspace partition
|
// allocate dummy version for Kspace partition
|
||||||
|
|
||||||
maxatom = -1;
|
maxatom = 0;
|
||||||
f_kspace = NULL;
|
f_kspace = NULL;
|
||||||
if (!master) memory->create(f_kspace,1,1,"verlet/split:f_kspace");
|
if (!master) memory->create(f_kspace,1,1,"verlet/split:f_kspace");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class FixRigidNH : public FixRigid {
|
|||||||
int tcomputeflag,pcomputeflag;
|
int tcomputeflag,pcomputeflag;
|
||||||
|
|
||||||
void couple();
|
void couple();
|
||||||
virtual void remap();
|
void remap();
|
||||||
void nhc_temp_integrate();
|
void nhc_temp_integrate();
|
||||||
void nhc_press_integrate();
|
void nhc_press_integrate();
|
||||||
|
|
||||||
|
|||||||
@ -204,10 +204,8 @@ void ComputeBasalAtom::compute_peratom()
|
|||||||
double bond_angle;
|
double bond_angle;
|
||||||
double norm_j, norm_k;
|
double norm_j, norm_k;
|
||||||
chi[0] = chi[1] = chi[2] = chi[3] = chi[4] = chi[5] = chi[6] = chi[7] = 0;
|
chi[0] = chi[1] = chi[2] = chi[3] = chi[4] = chi[5] = chi[6] = chi[7] = 0;
|
||||||
double x_ij, y_ij, z_ij, x_ik, y_ik, z_ik,
|
double x_ij, y_ij, z_ij, x_ik, y_ik, z_ik,x3[n0],y3[n0],z3[n0],
|
||||||
xmean5, ymean5, zmean5, xmean6, ymean6, zmean6, xmean7, ymean7, zmean7;
|
xmean5, ymean5, zmean5, xmean6, ymean6, zmean6, xmean7, ymean7, zmean7;
|
||||||
double *x3,*y3,*z3;
|
|
||||||
x3 = new double[n0]; y3 = new double[n0]; z3 = new double[n0];
|
|
||||||
for (j = 0; j < n0; j++) {
|
for (j = 0; j < n0; j++) {
|
||||||
x_ij = x[i][0]-x[nearest_n0[j]][0];
|
x_ij = x[i][0]-x[nearest_n0[j]][0];
|
||||||
y_ij = x[i][1]-x[nearest_n0[j]][1];
|
y_ij = x[i][1]-x[nearest_n0[j]][1];
|
||||||
@ -415,7 +413,6 @@ void ComputeBasalAtom::compute_peratom()
|
|||||||
//if there are less than two ~180 degree bond angles, the algorithm returns null
|
//if there are less than two ~180 degree bond angles, the algorithm returns null
|
||||||
else BPV[i][0] = BPV[i][1] = BPV[i][2] = 0.0;
|
else BPV[i][0] = BPV[i][1] = BPV[i][2] = 0.0;
|
||||||
|
|
||||||
delete[] x3; delete[] y3; delete[] z3;
|
|
||||||
//normalize BPV:
|
//normalize BPV:
|
||||||
double Mag = sqrt(BPV[i][0]*BPV[i][0] +
|
double Mag = sqrt(BPV[i][0]*BPV[i][0] +
|
||||||
BPV[i][1]*BPV[i][1] + BPV[i][2]*BPV[i][2]);
|
BPV[i][1]*BPV[i][1] + BPV[i][2]*BPV[i][2]);
|
||||||
|
|||||||
@ -380,8 +380,7 @@ void FixIPI::final_integrate()
|
|||||||
|
|
||||||
int nat=bsize/3;
|
int nat=bsize/3;
|
||||||
double **f= atom->f;
|
double **f= atom->f;
|
||||||
double *lbuf;
|
double lbuf[bsize];
|
||||||
lbuf = new double[bsize];
|
|
||||||
|
|
||||||
// reassembles the force vector from the local arrays
|
// reassembles the force vector from the local arrays
|
||||||
int nlocal = atom->nlocal;
|
int nlocal = atom->nlocal;
|
||||||
@ -393,7 +392,6 @@ void FixIPI::final_integrate()
|
|||||||
lbuf[3*(atom->tag[i]-1)+2]=f[i][2]*forceconv;
|
lbuf[3*(atom->tag[i]-1)+2]=f[i][2]*forceconv;
|
||||||
}
|
}
|
||||||
MPI_Allreduce(lbuf,buffer,bsize,MPI_DOUBLE,MPI_SUM,world);
|
MPI_Allreduce(lbuf,buffer,bsize,MPI_DOUBLE,MPI_SUM,world);
|
||||||
delete[] lbuf;
|
|
||||||
|
|
||||||
for (int i = 0; i < 9; ++i) vir[i]=0.0;
|
for (int i = 0; i < 9; ++i) vir[i]=0.0;
|
||||||
|
|
||||||
|
|||||||
@ -155,7 +155,7 @@ void FixRigidOMP::final_integrate()
|
|||||||
|
|
||||||
} else if (rstyle == GROUP) {
|
} else if (rstyle == GROUP) {
|
||||||
|
|
||||||
// we likely have only a rather number of groups so we loop
|
// we likely have only a rather number of groups so we loops
|
||||||
// over bodies and thread over all atoms for each of them.
|
// over bodies and thread over all atoms for each of them.
|
||||||
|
|
||||||
for (int ib = 0; ib < nbody; ++ib) {
|
for (int ib = 0; ib < nbody; ++ib) {
|
||||||
|
|||||||
@ -22,7 +22,6 @@
|
|||||||
#include "force.h"
|
#include "force.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
#include "compute.h"
|
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
|
|||||||
@ -666,10 +666,9 @@ void FixPhonon::postprocess( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// to get Phi = KT.G^-1; normalization of FFTW data is done here
|
// to get Phi = KT.G^-1; normalization of FFTW data is done here
|
||||||
double boltz = force->boltz, *kbtsqrt, TempAve = 0.;
|
double boltz = force->boltz, kbtsqrt[sysdim], TempAve = 0.;
|
||||||
double TempFac = inv_neval*inv_nTemp;
|
double TempFac = inv_neval*inv_nTemp;
|
||||||
double NormFac = TempFac*double(ntotal);
|
double NormFac = TempFac*double(ntotal);
|
||||||
kbtsqrt = new double[sysdim];
|
|
||||||
|
|
||||||
for (idim = 0; idim < sysdim; ++idim){
|
for (idim = 0; idim < sysdim; ++idim){
|
||||||
kbtsqrt[idim] = sqrt(TempSum[idim]*NormFac);
|
kbtsqrt[idim] = sqrt(TempSum[idim]*NormFac);
|
||||||
@ -683,7 +682,6 @@ void FixPhonon::postprocess( )
|
|||||||
for (idim = 0; idim < fft_dim; ++idim)
|
for (idim = 0; idim < fft_dim; ++idim)
|
||||||
for (jdim = 0; jdim < fft_dim; ++jdim) Phi_q[idq][ndim++] *= kbtsqrt[idim%sysdim]*kbtsqrt[jdim%sysdim];
|
for (jdim = 0; jdim < fft_dim; ++jdim) Phi_q[idq][ndim++] *= kbtsqrt[idim%sysdim]*kbtsqrt[jdim%sysdim];
|
||||||
}
|
}
|
||||||
delete[] kbtsqrt;
|
|
||||||
|
|
||||||
// to collect all local Phi_q to root
|
// to collect all local Phi_q to root
|
||||||
displs[0]=0;
|
displs[0]=0;
|
||||||
@ -692,8 +690,7 @@ void FixPhonon::postprocess( )
|
|||||||
MPI_Gatherv(Phi_q[0],mynq*fft_dim2*2,MPI_DOUBLE,Phi_all[0],recvcnts,displs,MPI_DOUBLE,0,world);
|
MPI_Gatherv(Phi_q[0],mynq*fft_dim2*2,MPI_DOUBLE,Phi_all[0],recvcnts,displs,MPI_DOUBLE,0,world);
|
||||||
|
|
||||||
// to collect all basis info and averaged it on root
|
// to collect all basis info and averaged it on root
|
||||||
double *basis_root;
|
double basis_root[fft_dim];
|
||||||
basis_root = new double[fft_dim];
|
|
||||||
if (fft_dim > sysdim) MPI_Reduce(&basis[1][0], &basis_root[sysdim], fft_dim-sysdim, MPI_DOUBLE, MPI_SUM, 0, world);
|
if (fft_dim > sysdim) MPI_Reduce(&basis[1][0], &basis_root[sysdim], fft_dim-sysdim, MPI_DOUBLE, MPI_SUM, 0, world);
|
||||||
|
|
||||||
if (me == 0){ // output dynamic matrix by root
|
if (me == 0){ // output dynamic matrix by root
|
||||||
@ -733,7 +730,6 @@ void FixPhonon::postprocess( )
|
|||||||
fwrite(M_inv_sqrt, sizeof(double),nucell, fp_bin);
|
fwrite(M_inv_sqrt, sizeof(double),nucell, fp_bin);
|
||||||
|
|
||||||
fclose(fp_bin);
|
fclose(fp_bin);
|
||||||
delete[] basis_root;
|
|
||||||
|
|
||||||
// write log file, here however, it is the dynamical matrix that is written
|
// write log file, here however, it is the dynamical matrix that is written
|
||||||
for (int i = 0; i < 60; ++i) fprintf(flog,"#"); fprintf(flog,"\n");
|
for (int i = 0; i < 60; ++i) fprintf(flog,"#"); fprintf(flog,"\n");
|
||||||
|
|||||||
@ -65,8 +65,8 @@ AtomVecBody::~AtomVecBody()
|
|||||||
{
|
{
|
||||||
int nall = nlocal_bonus + nghost_bonus;
|
int nall = nlocal_bonus + nghost_bonus;
|
||||||
for (int i = 0; i < nall; i++) {
|
for (int i = 0; i < nall; i++) {
|
||||||
bptr->icp->put(bonus[i].iindex);
|
icp->put(bonus[i].iindex);
|
||||||
bptr->dcp->put(bonus[i].dindex);
|
dcp->put(bonus[i].dindex);
|
||||||
}
|
}
|
||||||
memory->sfree(bonus);
|
memory->sfree(bonus);
|
||||||
|
|
||||||
@ -95,6 +95,8 @@ void AtomVecBody::process_args(int narg, char **arg)
|
|||||||
else error->all(FLERR,"Unknown body style");
|
else error->all(FLERR,"Unknown body style");
|
||||||
|
|
||||||
bptr->avec = this;
|
bptr->avec = this;
|
||||||
|
icp = bptr->icp;
|
||||||
|
dcp = bptr->dcp;
|
||||||
|
|
||||||
// max size of forward/border comm
|
// max size of forward/border comm
|
||||||
// 7,16 are packed in pack_comm/pack_border
|
// 7,16 are packed in pack_comm/pack_border
|
||||||
@ -189,8 +191,8 @@ void AtomVecBody::copy(int i, int j, int delflag)
|
|||||||
// if deleting atom J via delflag and J has bonus data, then delete it
|
// if deleting atom J via delflag and J has bonus data, then delete it
|
||||||
|
|
||||||
if (delflag && body[j] >= 0) {
|
if (delflag && body[j] >= 0) {
|
||||||
bptr->icp->put(bonus[body[j]].iindex);
|
icp->put(bonus[body[j]].iindex);
|
||||||
bptr->dcp->put(bonus[body[j]].dindex);
|
dcp->put(bonus[body[j]].dindex);
|
||||||
copy_bonus(nlocal_bonus-1,body[j]);
|
copy_bonus(nlocal_bonus-1,body[j]);
|
||||||
nlocal_bonus--;
|
nlocal_bonus--;
|
||||||
}
|
}
|
||||||
@ -226,8 +228,8 @@ void AtomVecBody::clear_bonus()
|
|||||||
{
|
{
|
||||||
int nall = nlocal_bonus + nghost_bonus;
|
int nall = nlocal_bonus + nghost_bonus;
|
||||||
for (int i = nlocal_bonus; i < nall; i++) {
|
for (int i = nlocal_bonus; i < nall; i++) {
|
||||||
bptr->icp->put(bonus[i].iindex);
|
icp->put(bonus[i].iindex);
|
||||||
bptr->dcp->put(bonus[i].dindex);
|
dcp->put(bonus[i].dindex);
|
||||||
}
|
}
|
||||||
nghost_bonus = 0;
|
nghost_bonus = 0;
|
||||||
}
|
}
|
||||||
@ -828,8 +830,8 @@ void AtomVecBody::unpack_border(int n, int first, double *buf)
|
|||||||
inertia[2] = buf[m++];
|
inertia[2] = buf[m++];
|
||||||
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
||||||
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
||||||
bonus[j].ivalue = bptr->icp->get(bonus[j].ninteger,bonus[j].iindex);
|
bonus[j].ivalue = icp->get(bonus[j].ninteger,bonus[j].iindex);
|
||||||
bonus[j].dvalue = bptr->dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
bonus[j].dvalue = dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
||||||
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
||||||
bonus[j].ilocal = i;
|
bonus[j].ilocal = i;
|
||||||
body[i] = j;
|
body[i] = j;
|
||||||
@ -876,8 +878,8 @@ void AtomVecBody::unpack_border_vel(int n, int first, double *buf)
|
|||||||
inertia[2] = buf[m++];
|
inertia[2] = buf[m++];
|
||||||
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
||||||
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
||||||
bonus[j].ivalue = bptr->icp->get(bonus[j].ninteger,bonus[j].iindex);
|
bonus[j].ivalue = icp->get(bonus[j].ninteger,bonus[j].iindex);
|
||||||
bonus[j].dvalue = bptr->dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
bonus[j].dvalue = dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
||||||
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
||||||
bonus[j].ilocal = i;
|
bonus[j].ilocal = i;
|
||||||
body[i] = j;
|
body[i] = j;
|
||||||
@ -923,8 +925,8 @@ int AtomVecBody::unpack_border_hybrid(int n, int first, double *buf)
|
|||||||
inertia[2] = buf[m++];
|
inertia[2] = buf[m++];
|
||||||
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
||||||
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
||||||
bonus[j].ivalue = bptr->icp->get(bonus[j].ninteger,bonus[j].iindex);
|
bonus[j].ivalue = icp->get(bonus[j].ninteger,bonus[j].iindex);
|
||||||
bonus[j].dvalue = bptr->dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
bonus[j].dvalue = dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
||||||
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
||||||
bonus[j].ilocal = i;
|
bonus[j].ilocal = i;
|
||||||
body[i] = j;
|
body[i] = j;
|
||||||
@ -1027,9 +1029,9 @@ int AtomVecBody::unpack_exchange(double *buf)
|
|||||||
inertia[2] = buf[m++];
|
inertia[2] = buf[m++];
|
||||||
bonus[nlocal_bonus].ninteger = (int) ubuf(buf[m++]).i;
|
bonus[nlocal_bonus].ninteger = (int) ubuf(buf[m++]).i;
|
||||||
bonus[nlocal_bonus].ndouble = (int) ubuf(buf[m++]).i;
|
bonus[nlocal_bonus].ndouble = (int) ubuf(buf[m++]).i;
|
||||||
bonus[nlocal_bonus].ivalue = bptr->icp->get(bonus[nlocal_bonus].ninteger,
|
bonus[nlocal_bonus].ivalue = icp->get(bonus[nlocal_bonus].ninteger,
|
||||||
bonus[nlocal_bonus].iindex);
|
bonus[nlocal_bonus].iindex);
|
||||||
bonus[nlocal_bonus].dvalue = bptr->dcp->get(bonus[nlocal_bonus].ndouble,
|
bonus[nlocal_bonus].dvalue = dcp->get(bonus[nlocal_bonus].ndouble,
|
||||||
bonus[nlocal_bonus].dindex);
|
bonus[nlocal_bonus].dindex);
|
||||||
memcpy(bonus[nlocal_bonus].ivalue,&buf[m],
|
memcpy(bonus[nlocal_bonus].ivalue,&buf[m],
|
||||||
bonus[nlocal_bonus].ninteger*sizeof(int));
|
bonus[nlocal_bonus].ninteger*sizeof(int));
|
||||||
@ -1179,9 +1181,9 @@ int AtomVecBody::unpack_restart(double *buf)
|
|||||||
inertia[2] = buf[m++];
|
inertia[2] = buf[m++];
|
||||||
bonus[nlocal_bonus].ninteger = (int) ubuf(buf[m++]).i;
|
bonus[nlocal_bonus].ninteger = (int) ubuf(buf[m++]).i;
|
||||||
bonus[nlocal_bonus].ndouble = (int) ubuf(buf[m++]).i;
|
bonus[nlocal_bonus].ndouble = (int) ubuf(buf[m++]).i;
|
||||||
bonus[nlocal_bonus].ivalue = bptr->icp->get(bonus[nlocal_bonus].ninteger,
|
bonus[nlocal_bonus].ivalue = icp->get(bonus[nlocal_bonus].ninteger,
|
||||||
bonus[nlocal_bonus].iindex);
|
bonus[nlocal_bonus].iindex);
|
||||||
bonus[nlocal_bonus].dvalue = bptr->dcp->get(bonus[nlocal_bonus].ndouble,
|
bonus[nlocal_bonus].dvalue = dcp->get(bonus[nlocal_bonus].ndouble,
|
||||||
bonus[nlocal_bonus].dindex);
|
bonus[nlocal_bonus].dindex);
|
||||||
memcpy(bonus[nlocal_bonus].ivalue,&buf[m],
|
memcpy(bonus[nlocal_bonus].ivalue,&buf[m],
|
||||||
bonus[nlocal_bonus].ninteger*sizeof(int));
|
bonus[nlocal_bonus].ninteger*sizeof(int));
|
||||||
@ -1469,7 +1471,7 @@ bigint AtomVecBody::memory_usage()
|
|||||||
if (atom->memcheck("body")) bytes += memory->usage(body,nmax);
|
if (atom->memcheck("body")) bytes += memory->usage(body,nmax);
|
||||||
|
|
||||||
bytes += nmax_bonus*sizeof(Bonus);
|
bytes += nmax_bonus*sizeof(Bonus);
|
||||||
bytes += bptr->icp->size + bptr->dcp->size;
|
bytes += icp->size + dcp->size;
|
||||||
|
|
||||||
int nall = nlocal_bonus + nghost_bonus;
|
int nall = nlocal_bonus + nghost_bonus;
|
||||||
for (int i = 0; i < nall; i++) {
|
for (int i = 0; i < nall; i++) {
|
||||||
|
|||||||
@ -25,8 +25,6 @@
|
|||||||
#include "special.h"
|
#include "special.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
enum{MULTI,ATOM,BOND,ANGLE,DIHEDRAL,IMPROPER,STATS};
|
enum{MULTI,ATOM,BOND,ANGLE,DIHEDRAL,IMPROPER,STATS};
|
||||||
|
|||||||
@ -21,7 +21,6 @@ namespace LAMMPS_NS {
|
|||||||
class Error : protected Pointers {
|
class Error : protected Pointers {
|
||||||
public:
|
public:
|
||||||
Error(class LAMMPS *);
|
Error(class LAMMPS *);
|
||||||
virtual ~Error() {}
|
|
||||||
|
|
||||||
void universe_all(const char *, int, const char *);
|
void universe_all(const char *, int, const char *);
|
||||||
void universe_one(const char *, int, const char *);
|
void universe_one(const char *, int, const char *);
|
||||||
|
|||||||
@ -413,7 +413,7 @@ FixAveSpatial::FixAveSpatial(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
maxvar = 0;
|
maxvar = 0;
|
||||||
varatom = NULL;
|
varatom = NULL;
|
||||||
|
|
||||||
maxatom = -1;
|
maxatom = 0;
|
||||||
bin = NULL;
|
bin = NULL;
|
||||||
|
|
||||||
nbins = maxbin = 0;
|
nbins = maxbin = 0;
|
||||||
|
|||||||
@ -81,7 +81,7 @@ FixHeat::FixHeat(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||||||
|
|
||||||
scale = 1.0;
|
scale = 1.0;
|
||||||
|
|
||||||
maxatom = -1;
|
maxatom = 0;
|
||||||
vheat = NULL;
|
vheat = NULL;
|
||||||
vscale = NULL;
|
vscale = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,11 +120,10 @@ class FixNH : public Fix {
|
|||||||
double fixedpoint[3]; // location of dilation fixed-point
|
double fixedpoint[3]; // location of dilation fixed-point
|
||||||
|
|
||||||
void couple();
|
void couple();
|
||||||
|
void remap();
|
||||||
void nhc_temp_integrate();
|
void nhc_temp_integrate();
|
||||||
void nhc_press_integrate();
|
void nhc_press_integrate();
|
||||||
|
|
||||||
virtual void remap();
|
|
||||||
|
|
||||||
virtual void nve_x(); // may be overwritten by child classes
|
virtual void nve_x(); // may be overwritten by child classes
|
||||||
virtual void nve_v();
|
virtual void nve_v();
|
||||||
virtual void nh_v_press();
|
virtual void nh_v_press();
|
||||||
|
|||||||
@ -75,7 +75,7 @@ class Force : protected Pointers {
|
|||||||
int special_extra; // extra space for added bonds
|
int special_extra; // extra space for added bonds
|
||||||
|
|
||||||
Force(class LAMMPS *);
|
Force(class LAMMPS *);
|
||||||
virtual ~Force();
|
~Force();
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
void create_pair(const char *, int);
|
void create_pair(const char *, int);
|
||||||
|
|||||||
@ -1065,8 +1065,7 @@ void Image::write_PNG(FILE *fp)
|
|||||||
png_set_text(png_ptr,info_ptr,text_ptr,1);
|
png_set_text(png_ptr,info_ptr,text_ptr,1);
|
||||||
png_write_info(png_ptr,info_ptr);
|
png_write_info(png_ptr,info_ptr);
|
||||||
|
|
||||||
png_bytep *row_pointers;
|
png_bytep row_pointers[height];
|
||||||
row_pointers = new png_bytep[height];
|
|
||||||
for (int i=0; i < height; ++i)
|
for (int i=0; i < height; ++i)
|
||||||
row_pointers[i] = (png_bytep) &writeBuffer[(height-i-1)*3*width];
|
row_pointers[i] = (png_bytep) &writeBuffer[(height-i-1)*3*width];
|
||||||
|
|
||||||
@ -1074,7 +1073,6 @@ void Image::write_PNG(FILE *fp)
|
|||||||
png_write_end(png_ptr, info_ptr);
|
png_write_end(png_ptr, info_ptr);
|
||||||
|
|
||||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
delete[] row_pointers;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,8 @@
|
|||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "domain.h"
|
#include "domain.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "memory.h"
|
|
||||||
#include "force.h"
|
#include "force.h"
|
||||||
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|||||||
@ -25,7 +25,6 @@ namespace LAMMPS_NS {
|
|||||||
class Memory : protected Pointers {
|
class Memory : protected Pointers {
|
||||||
public:
|
public:
|
||||||
Memory(class LAMMPS *);
|
Memory(class LAMMPS *);
|
||||||
virtual ~Memory() {}
|
|
||||||
|
|
||||||
void *smalloc(bigint n, const char *);
|
void *smalloc(bigint n, const char *);
|
||||||
void *srealloc(void *, bigint n, const char *);
|
void *srealloc(void *, bigint n, const char *);
|
||||||
|
|||||||
@ -223,10 +223,10 @@ void Pair::init()
|
|||||||
// I,I coeffs must be set
|
// I,I coeffs must be set
|
||||||
// init_one() will check if I,J is set explicitly or inferred by mixing
|
// init_one() will check if I,J is set explicitly or inferred by mixing
|
||||||
|
|
||||||
if (!allocated) error->all(FLERR,"Not all pair coeffs are set");
|
if (!allocated) error->all(FLERR,"All pair coeffs are not set");
|
||||||
|
|
||||||
for (i = 1; i <= atom->ntypes; i++)
|
for (i = 1; i <= atom->ntypes; i++)
|
||||||
if (setflag[i][i] == 0) error->all(FLERR,"Not all pair coeffs are set");
|
if (setflag[i][i] == 0) error->all(FLERR,"All pair coeffs are not set");
|
||||||
|
|
||||||
// style-specific initialization
|
// style-specific initialization
|
||||||
|
|
||||||
|
|||||||
@ -277,10 +277,10 @@ This is likely not what you want to do. The exclusion settings will
|
|||||||
eliminate neighbors in the neighbor list, which the manybody potential
|
eliminate neighbors in the neighbor list, which the manybody potential
|
||||||
needs to calculated its terms correctly.
|
needs to calculated its terms correctly.
|
||||||
|
|
||||||
E: Not all pair coeffs are set
|
E: All pair coeffs are not set
|
||||||
|
|
||||||
Pair coefficients must be set for all pairs of atom types in either the
|
All pair coefficients must be set in the data file or by the
|
||||||
data file or by the pair_coeff command before running a simulation.
|
pair_coeff command before running a simulation.
|
||||||
|
|
||||||
E: Fix adapt interface to this pair style not supported
|
E: Fix adapt interface to this pair style not supported
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,6 @@
|
|||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "random_mars.h"
|
#include "random_mars.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "math_inline.h"
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -105,8 +104,7 @@ double RanMars::gaussian()
|
|||||||
rsq = v1*v1 + v2*v2;
|
rsq = v1*v1 + v2*v2;
|
||||||
if (rsq < 1.0 && rsq != 0.0) again = 0;
|
if (rsq < 1.0 && rsq != 0.0) again = 0;
|
||||||
}
|
}
|
||||||
// fac = sqrt(-2.0*log(rsq)/rsq);
|
fac = sqrt(-2.0*log(rsq)/rsq);
|
||||||
fac = MathInline::sqrtlgx2byx(rsq);
|
|
||||||
second = v1*fac;
|
second = v1*fac;
|
||||||
first = v2*fac;
|
first = v2*fac;
|
||||||
save = 1;
|
save = 1;
|
||||||
|
|||||||
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "random_park.h"
|
#include "random_park.h"
|
||||||
#include "math_inline.h"
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
@ -65,8 +64,7 @@ double RanPark::gaussian()
|
|||||||
rsq = v1*v1 + v2*v2;
|
rsq = v1*v1 + v2*v2;
|
||||||
if (rsq < 1.0 && rsq != 0.0) again = 0;
|
if (rsq < 1.0 && rsq != 0.0) again = 0;
|
||||||
}
|
}
|
||||||
// fac = sqrt(-2.0*log(rsq)/rsq);
|
fac = sqrt(-2.0*log(rsq)/rsq);
|
||||||
fac = MathInline::sqrtlgx2byx(rsq);
|
|
||||||
second = v1*fac;
|
second = v1*fac;
|
||||||
first = v2*fac;
|
first = v2*fac;
|
||||||
save = 1;
|
save = 1;
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class Universe : protected Pointers {
|
|||||||
// proc uni2orig[I] in original communicator
|
// proc uni2orig[I] in original communicator
|
||||||
|
|
||||||
Universe(class LAMMPS *, MPI_Comm);
|
Universe(class LAMMPS *, MPI_Comm);
|
||||||
virtual ~Universe();
|
~Universe();
|
||||||
void reorder(char *, char *);
|
void reorder(char *, char *);
|
||||||
void add_world(char *);
|
void add_world(char *);
|
||||||
int consistent();
|
int consistent();
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class Update : protected Pointers {
|
|||||||
char *minimize_style;
|
char *minimize_style;
|
||||||
|
|
||||||
Update(class LAMMPS *);
|
Update(class LAMMPS *);
|
||||||
virtual ~Update();
|
~Update();
|
||||||
void init();
|
void init();
|
||||||
void set_units(const char *);
|
void set_units(const char *);
|
||||||
void create_integrate(int, char **, int);
|
void create_integrate(int, char **, int);
|
||||||
|
|||||||
Reference in New Issue
Block a user