git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12979 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -2161,7 +2161,7 @@ void FixRigid::readfile(int which, double *vec, double **array, int *inbody)
|
|||||||
// id = rigid body ID
|
// id = rigid body ID
|
||||||
// use ID as-is for SINGLE, as mol-ID for MOLECULE, as-is for GROUP
|
// use ID as-is for SINGLE, as mol-ID for MOLECULE, as-is for GROUP
|
||||||
// for which = 0, store mass/com in vec/array
|
// for which = 0, store mass/com in vec/array
|
||||||
// for which = 1, store interia tensor array, invert 3,4,5 values to Voigt
|
// for which = 1, store inertia tensor array, invert 3,4,5 values to Voigt
|
||||||
|
|
||||||
for (int i = 0; i < nchunk; i++) {
|
for (int i = 0; i < nchunk; i++) {
|
||||||
next = strchr(buf,'\n');
|
next = strchr(buf,'\n');
|
||||||
|
|||||||
@ -2364,7 +2364,7 @@ void FixRigidSmall::readfile(int which, double **array, int *inbody)
|
|||||||
// tokenize the line into values
|
// tokenize the line into values
|
||||||
// id = rigid body ID = mol-ID
|
// id = rigid body ID = mol-ID
|
||||||
// for which = 0, store mass/com in vec/array
|
// for which = 0, store mass/com in vec/array
|
||||||
// for which = 1, store interia tensor array, invert 3,4,5 values to Voigt
|
// for which = 1, store inertia tensor array, invert 3,4,5 values to Voigt
|
||||||
|
|
||||||
for (int i = 0; i < nchunk; i++) {
|
for (int i = 0; i < nchunk; i++) {
|
||||||
next = strchr(buf,'\n');
|
next = strchr(buf,'\n');
|
||||||
|
|||||||
@ -185,7 +185,11 @@ include ..\/..\/lib\/cuda\/Makefile.lammps
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif (test $1 = 0) then
|
elif (test $1 = 0) then
|
||||||
|
# need to delete a bunch of depenency files because they indirectly depend on user_cuda.h
|
||||||
|
for f in input.d output.d pair.d fix_omp.d
|
||||||
|
do \
|
||||||
|
rm -f ../Obj_*/$f
|
||||||
|
done
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's/[^ \t]*cuda[^ \t]* //g' ../Makefile.package
|
sed -i -e 's/[^ \t]*cuda[^ \t]* //g' ../Makefile.package
|
||||||
sed -i -e 's/[^ \t]*CUDA[^ \t]* //g' ../Makefile.package
|
sed -i -e 's/[^ \t]*CUDA[^ \t]* //g' ../Makefile.package
|
||||||
|
|||||||
@ -51,6 +51,11 @@ if (test $mode = 1) then
|
|||||||
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_USER_OMP |' ../Makefile.package
|
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_USER_OMP |' ../Makefile.package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# need to delete a bunch of depenency files because they indirectly depend on user_cuda.h
|
||||||
|
for f in finish.d modify_cuda.d
|
||||||
|
do \
|
||||||
|
rm -f ../Obj_*/$f
|
||||||
|
done
|
||||||
# force rebuild of files with LMP_USER_OMP switch
|
# force rebuild of files with LMP_USER_OMP switch
|
||||||
|
|
||||||
touch ../accelerator_omp.h
|
touch ../accelerator_omp.h
|
||||||
|
|||||||
@ -73,7 +73,7 @@ FixPhonon::FixPhonon(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||||||
nfreq = force->inumeric(FLERR, arg[4]); // frequency to output result
|
nfreq = force->inumeric(FLERR, arg[4]); // frequency to output result
|
||||||
if (nfreq < 1) error->all(FLERR,"Illegal fix phonon command");
|
if (nfreq < 1) error->all(FLERR,"Illegal fix phonon command");
|
||||||
|
|
||||||
waitsteps = ATOBIGINT(arg[5]); // Wait this many timesteps before actually measuring
|
waitsteps = force->bnumeric(FLERR,arg[5]); // Wait this many timesteps before actually measuring
|
||||||
if (waitsteps < 0) error->all(FLERR,"Illegal fix phonon command: waitsteps < 0 !");
|
if (waitsteps < 0) error->all(FLERR,"Illegal fix phonon command: waitsteps < 0 !");
|
||||||
|
|
||||||
int n = strlen(arg[6]) + 1; // map file
|
int n = strlen(arg[6]) + 1; // map file
|
||||||
|
|||||||
@ -33,6 +33,7 @@
|
|||||||
#include "fix.h"
|
#include "fix.h"
|
||||||
#include "domain.h"
|
#include "domain.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
|
#include "force.h"
|
||||||
#include "irregular.h"
|
#include "irregular.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
@ -98,7 +99,7 @@ void ReadDump::command(int narg, char **arg)
|
|||||||
if (narg < 2) error->all(FLERR,"Illegal read_dump command");
|
if (narg < 2) error->all(FLERR,"Illegal read_dump command");
|
||||||
|
|
||||||
store_files(1,&arg[0]);
|
store_files(1,&arg[0]);
|
||||||
bigint nstep = ATOBIGINT(arg[1]);
|
bigint nstep = force->bnumeric(FLERR,arg[1]);
|
||||||
|
|
||||||
int nremain = narg - 2;
|
int nremain = narg - 2;
|
||||||
if (nremain) nremain = fields_and_keywords(nremain,&arg[narg-nremain]);
|
if (nremain) nremain = fields_and_keywords(nremain,&arg[narg-nremain]);
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "force.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ int ReaderXYZ::read_time(bigint &ntimestep)
|
|||||||
|
|
||||||
// first line has to have the number of atoms
|
// first line has to have the number of atoms
|
||||||
|
|
||||||
natoms = ATOBIGINT(line);
|
natoms = force->bnumeric(FLERR,line);
|
||||||
if (natoms < 1)
|
if (natoms < 1)
|
||||||
error->one(FLERR,"Dump file is incorrectly formatted");
|
error->one(FLERR,"Dump file is incorrectly formatted");
|
||||||
|
|
||||||
|
|||||||
@ -70,12 +70,12 @@ void Rerun::command(int narg, char **arg)
|
|||||||
while (iarg < narg) {
|
while (iarg < narg) {
|
||||||
if (strcmp(arg[iarg],"first") == 0) {
|
if (strcmp(arg[iarg],"first") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
||||||
first = ATOBIGINT(arg[iarg+1]);
|
first = force->bnumeric(FLERR,arg[iarg+1]);
|
||||||
if (first < 0) error->all(FLERR,"Illegal rerun command");
|
if (first < 0) error->all(FLERR,"Illegal rerun command");
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"last") == 0) {
|
} else if (strcmp(arg[iarg],"last") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
||||||
last = ATOBIGINT(arg[iarg+1]);
|
last = force->bnumeric(FLERR,arg[iarg+1]);
|
||||||
if (last < 0) error->all(FLERR,"Illegal rerun command");
|
if (last < 0) error->all(FLERR,"Illegal rerun command");
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"every") == 0) {
|
} else if (strcmp(arg[iarg],"every") == 0) {
|
||||||
@ -91,13 +91,13 @@ void Rerun::command(int narg, char **arg)
|
|||||||
} else if (strcmp(arg[iarg],"start") == 0) {
|
} else if (strcmp(arg[iarg],"start") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
||||||
startflag = 1;
|
startflag = 1;
|
||||||
start = ATOBIGINT(arg[iarg+1]);
|
start = force->bnumeric(FLERR,arg[iarg+1]);
|
||||||
if (start < 0) error->all(FLERR,"Illegal rerun command");
|
if (start < 0) error->all(FLERR,"Illegal rerun command");
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"stop") == 0) {
|
} else if (strcmp(arg[iarg],"stop") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
|
||||||
stopflag = 1;
|
stopflag = 1;
|
||||||
stop = ATOBIGINT(arg[iarg+1]);
|
stop = force->bnumeric(FLERR,arg[iarg+1]);
|
||||||
if (stop < 0) error->all(FLERR,"Illegal rerun command");
|
if (stop < 0) error->all(FLERR,"Illegal rerun command");
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"dump") == 0) {
|
} else if (strcmp(arg[iarg],"dump") == 0) {
|
||||||
|
|||||||
@ -42,7 +42,7 @@ void Run::command(int narg, char **arg)
|
|||||||
if (domain->box_exist == 0)
|
if (domain->box_exist == 0)
|
||||||
error->all(FLERR,"Run command before simulation box is defined");
|
error->all(FLERR,"Run command before simulation box is defined");
|
||||||
|
|
||||||
bigint nsteps_input = ATOBIGINT(arg[0]);
|
bigint nsteps_input = force->bnumeric(FLERR,arg[0]);
|
||||||
|
|
||||||
// parse optional args
|
// parse optional args
|
||||||
|
|
||||||
@ -65,12 +65,12 @@ void Run::command(int narg, char **arg)
|
|||||||
} else if (strcmp(arg[iarg],"start") == 0) {
|
} else if (strcmp(arg[iarg],"start") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal run command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal run command");
|
||||||
startflag = 1;
|
startflag = 1;
|
||||||
start = ATOBIGINT(arg[iarg+1]);
|
start = force->bnumeric(FLERR,arg[iarg+1]);
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"stop") == 0) {
|
} else if (strcmp(arg[iarg],"stop") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal run command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal run command");
|
||||||
stopflag = 1;
|
stopflag = 1;
|
||||||
stop = ATOBIGINT(arg[iarg+1]);
|
stop = force->bnumeric(FLERR,arg[iarg+1]);
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"pre") == 0) {
|
} else if (strcmp(arg[iarg],"pre") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal run command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal run command");
|
||||||
|
|||||||
@ -408,7 +408,7 @@ void Update::create_minimize(int narg, char **arg)
|
|||||||
void Update::reset_timestep(int narg, char **arg)
|
void Update::reset_timestep(int narg, char **arg)
|
||||||
{
|
{
|
||||||
if (narg != 1) error->all(FLERR,"Illegal reset_timestep command");
|
if (narg != 1) error->all(FLERR,"Illegal reset_timestep command");
|
||||||
bigint newstep = ATOBIGINT(arg[0]);
|
bigint newstep = force->bnumeric(FLERR,arg[0]);
|
||||||
reset_timestep(newstep);
|
reset_timestep(newstep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4392,7 +4392,7 @@ int VarReader::read_peratom()
|
|||||||
if (n == 0) return 1;
|
if (n == 0) return 1;
|
||||||
|
|
||||||
MPI_Bcast(str,n,MPI_CHAR,0,world);
|
MPI_Bcast(str,n,MPI_CHAR,0,world);
|
||||||
bigint nlines = ATOBIGINT(str);
|
bigint nlines = force->bnumeric(FLERR,str);
|
||||||
tagint map_tag_max = atom->map_tag_max;
|
tagint map_tag_max = atom->map_tag_max;
|
||||||
|
|
||||||
bigint nread = 0;
|
bigint nread = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user