git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15040 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-05-12 13:54:17 +00:00
parent c3a95c782b
commit 212f64d2f1
7 changed files with 21 additions and 26 deletions

View File

@ -28,7 +28,7 @@ SHLIBFLAGS = -shared
# LAMMPS ifdef settings # LAMMPS ifdef settings
# see possible settings in Section 2.2 (step 4) of manual # see possible settings in Section 2.2 (step 4) of manual
LMP_INC = -DLAMMPS_GZIP LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64
# MPI library # MPI library
# see discussion in Section 2.2 (step 5) of manual # see discussion in Section 2.2 (step 5) of manual
@ -100,13 +100,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
# Compilation rules # Compilation rules
%.o:%.cpp $(EXTRA_CPP_DEPENDS) %.o:%.cpp
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
%.d:%.cpp $(EXTRA_CPP_DEPENDS)
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
%.o:%.cu $(EXTRA_CPP_DEPENDS)
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $< $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
# Individual dependencies # Individual dependencies

View File

@ -28,7 +28,7 @@ SHLIBFLAGS = -shared
# LAMMPS ifdef settings # LAMMPS ifdef settings
# see possible settings in Section 2.2 (step 4) of manual # see possible settings in Section 2.2 (step 4) of manual
LMP_INC = -DLAMMPS_GZIP LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64
# MPI library # MPI library
# see discussion in Section 2.2 (step 5) of manual # see discussion in Section 2.2 (step 5) of manual
@ -44,7 +44,7 @@ MPI_PATH = -L../STUBS
MPI_LIB = -lmpi_stubs MPI_LIB = -lmpi_stubs
# FFT library # FFT library
# see discussion in Section 2.2 (step 6) of manaul # see discussion in Section 2.2 (step 6) of manual
# can be left blank to use provided KISS FFT library # can be left blank to use provided KISS FFT library
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings # INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
# PATH = path for FFT library # PATH = path for FFT library
@ -100,13 +100,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
# Compilation rules # Compilation rules
%.o:%.cpp $(EXTRA_CPP_DEPENDS) %.o:%.cpp
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
%.d:%.cpp $(EXTRA_CPP_DEPENDS)
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
%.o:%.cu $(EXTRA_CPP_DEPENDS)
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $< $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
# Individual dependencies # Individual dependencies

View File

@ -319,15 +319,15 @@ void PairTersoff::coeff(int narg, char **arg)
// clear setflag since coeff() called once with I,J = * * // clear setflag since coeff() called once with I,J = * *
n = atom->ntypes; n = atom->ntypes;
for (int i = 1; i <= n; i++) for (i = 1; i <= n; i++)
for (int j = i; j <= n; j++) for (j = i; j <= n; j++)
setflag[i][j] = 0; setflag[i][j] = 0;
// set setflag i,j for type pairs where both are mapped to elements // set setflag i,j for type pairs where both are mapped to elements
int count = 0; int count = 0;
for (int i = 1; i <= n; i++) for (i = 1; i <= n; i++)
for (int j = i; j <= n; j++) for (j = i; j <= n; j++)
if (map[i] >= 0 && map[j] >= 0) { if (map[i] >= 0 && map[j] >= 0) {
setflag[i][j] = 1; setflag[i][j] = 1;
count++; count++;

View File

@ -78,8 +78,9 @@ FixTFMC::FixTFMC(LAMMPS *lmp, int narg, char **arg) :
if (xflag < 0 || xflag > 1 || yflag < 0 || yflag > 1 || if (xflag < 0 || xflag > 1 || yflag < 0 || yflag > 1 ||
zflag < 0 || zflag > 1) zflag < 0 || zflag > 1)
error->all(FLERR,"Illegal fix tfmc command"); error->all(FLERR,"Illegal fix tfmc command");
if (xflag + yflag + zflag == 0)
comflag = 0; if (xflag + yflag + zflag == 0)
comflag = 0;
if (rotflag) { if (rotflag) {
xd = NULL; xd = NULL;

View File

@ -85,7 +85,7 @@ double manifold_thylakoid::g( const double *x )
error->one(FLERR,msg); error->one(FLERR,msg);
} }
double con_val = p->g(x); double con_val = p->g(x);
if( isfinite(con_val) ){ if( ISFINITE(con_val) ){
return con_val; return con_val;
}else{ }else{
char msg[2048]; char msg[2048];
@ -107,7 +107,7 @@ void manifold_thylakoid::n( const double *x, double *n )
error->one(FLERR,msg); error->one(FLERR,msg);
} }
p->n(x,n); p->n(x,n);
if( isfinite(n[0]) && isfinite(n[1]) && isfinite(n[2]) ){ if( ISFINITE(n[0]) && ISFINITE(n[1]) && ISFINITE(n[2]) ){
return; return;
}else{ }else{
char msg[2048]; char msg[2048];

View File

@ -2075,6 +2075,9 @@ int Neighbor::coord2bin(double *x)
{ {
int ix,iy,iz; int ix,iy,iz;
if (!ISFINITE(x[0]) || !ISFINITE(x[1]) || !ISFINITE(x[2]))
error->one(FLERR,"Non-numeric positions - simulation unstable");
if (x[0] >= bboxhi[0]) if (x[0] >= bboxhi[0])
ix = static_cast<int> ((x[0]-bboxhi[0])*bininvx) + nbinx; ix = static_cast<int> ((x[0]-bboxhi[0])*bininvx) + nbinx;
else if (x[0] >= bboxlo[0]) { else if (x[0] >= bboxlo[0]) {
@ -2108,6 +2111,9 @@ int Neighbor::coord2bin(double *x)
int Neighbor::coord2bin(double *x, int &ix, int &iy, int &iz) int Neighbor::coord2bin(double *x, int &ix, int &iy, int &iz)
{ {
if (!ISFINITE(x[0]) || !ISFINITE(x[1]) || !ISFINITE(x[2]))
error->one(FLERR,"Non-numeric positions - simulation unstable");
if (x[0] >= bboxhi[0]) if (x[0] >= bboxhi[0])
ix = static_cast<int> ((x[0]-bboxhi[0])*bininvx) + nbinx; ix = static_cast<int> ((x[0]-bboxhi[0])*bininvx) + nbinx;
else if (x[0] >= bboxlo[0]) { else if (x[0] >= bboxlo[0]) {

View File

@ -51,7 +51,7 @@ void WriteDump::command(int narg, char **arg)
dumpargs[0] = (char *) "WRITE_DUMP"; // dump id dumpargs[0] = (char *) "WRITE_DUMP"; // dump id
dumpargs[1] = arg[0]; // group dumpargs[1] = arg[0]; // group
dumpargs[2] = arg[1]; // dump style dumpargs[2] = arg[1]; // dump style
dumpargs[3] = (char *) "0"; // dump frequency dumpargs[3] = (char *) "1"; // dump frequency
for (int i = 2; i < modindex; ++i) for (int i = 2; i < modindex; ++i)
dumpargs[i+2] = arg[i]; dumpargs[i+2] = arg[i];