silence compiler warnings
This commit is contained in:
@ -1244,7 +1244,7 @@ int DumpImage::modify_param(int narg, char **arg)
|
||||
else error->all(FLERR,"Illegal dump_modify command");
|
||||
int nentry = utils::inumeric(FLERR,arg[5],false,lmp);
|
||||
if (nentry < 1) error->all(FLERR,"Illegal dump_modify command");
|
||||
int n = 6 + factor*nentry;
|
||||
n = 6 + factor*nentry;
|
||||
if (narg < n) error->all(FLERR,"Illegal dump_modify command");
|
||||
int flag = image->map_reset(0,n-1,&arg[1]);
|
||||
if (flag) error->all(FLERR,"Illegal dump_modify command");
|
||||
|
||||
@ -302,7 +302,7 @@ void FixAdapt::init()
|
||||
// allow a dynamic group only if ATOM attribute not used
|
||||
|
||||
if (group->dynamic[igroup])
|
||||
for (int i = 0; i < nadapt; i++)
|
||||
for (i = 0; i < nadapt; i++)
|
||||
if (adapt[i].which == ATOM)
|
||||
error->all(FLERR,"Cannot use dynamic group with fix adapt atom");
|
||||
|
||||
|
||||
@ -723,7 +723,6 @@ void FixAveTime::invoke_vector(bigint ntimestep)
|
||||
allocate_arrays();
|
||||
}
|
||||
|
||||
bigint ntimestep = update->ntimestep;
|
||||
int lockforever_flag = 0;
|
||||
for (i = 0; i < nvalues; i++) {
|
||||
if (!varlen[i] || which[i] != ArgInfo::COMPUTE) continue;
|
||||
|
||||
@ -714,7 +714,7 @@ void FixDeform::end_of_step()
|
||||
// set new box size for VOLUME dims that are linked to other dims
|
||||
// NOTE: still need to set h_rate for these dims
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (set[i].style != VOLUME) continue;
|
||||
|
||||
if (set[i].substyle == ONE_FROM_ONE) {
|
||||
|
||||
@ -213,7 +213,7 @@ void FixHeat::end_of_step()
|
||||
v[i][2] = scale*v[i][2] - vsub[2];
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
for (i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit && region->match(x[i][0],x[i][1],x[i][2])) {
|
||||
v[i][0] = scale*v[i][0] - vsub[0];
|
||||
v[i][1] = scale*v[i][1] - vsub[1];
|
||||
|
||||
@ -95,8 +95,11 @@ void FixMomentum::init()
|
||||
|
||||
void FixMomentum::end_of_step()
|
||||
{
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
int *mask = atom->mask;
|
||||
imageint *image = atom->image;
|
||||
|
||||
const int nlocal = atom->nlocal;
|
||||
double ekin_old,ekin_new;
|
||||
ekin_old = ekin_new = 0.0;
|
||||
@ -157,12 +160,6 @@ void FixMomentum::end_of_step()
|
||||
// vnew_i = v_i - w x r_i
|
||||
// must use unwrapped coords to compute r_i correctly
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
int *mask = atom->mask;
|
||||
imageint *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double dx,dy,dz;
|
||||
double unwrap[3];
|
||||
|
||||
|
||||
@ -1092,7 +1092,7 @@ void FixNH::remap()
|
||||
|
||||
// omega is not used, except for book-keeping
|
||||
|
||||
for (int i = 0; i < 6; i++) omega[i] += dto*omega_dot[i];
|
||||
for (i = 0; i < 6; i++) omega[i] += dto*omega_dot[i];
|
||||
|
||||
// convert pertinent atoms and rigid bodies to lamda coords
|
||||
|
||||
@ -1781,7 +1781,7 @@ void FixNH::nhc_temp_integrate()
|
||||
|
||||
if (eta_mass_flag) {
|
||||
eta_mass[0] = tdof * boltz * t_target / (t_freq*t_freq);
|
||||
for (int ich = 1; ich < mtchain; ich++)
|
||||
for (ich = 1; ich < mtchain; ich++)
|
||||
eta_mass[ich] = boltz * t_target / (t_freq*t_freq);
|
||||
}
|
||||
|
||||
@ -1853,12 +1853,12 @@ void FixNH::nhc_press_integrate()
|
||||
|
||||
if (omega_mass_flag) {
|
||||
double nkt = (atom->natoms + 1) * kt;
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (i = 0; i < 3; i++)
|
||||
if (p_flag[i])
|
||||
omega_mass[i] = nkt/(p_freq[i]*p_freq[i]);
|
||||
|
||||
if (pstyle == TRICLINIC) {
|
||||
for (int i = 3; i < 6; i++)
|
||||
for (i = 3; i < 6; i++)
|
||||
if (p_flag[i]) omega_mass[i] = nkt/(p_freq[i]*p_freq[i]);
|
||||
}
|
||||
}
|
||||
@ -1866,9 +1866,9 @@ void FixNH::nhc_press_integrate()
|
||||
if (etap_mass_flag) {
|
||||
if (mpchain) {
|
||||
etap_mass[0] = boltz * t_target / (p_freq_max*p_freq_max);
|
||||
for (int ich = 1; ich < mpchain; ich++)
|
||||
for (ich = 1; ich < mpchain; ich++)
|
||||
etap_mass[ich] = boltz * t_target / (p_freq_max*p_freq_max);
|
||||
for (int ich = 1; ich < mpchain; ich++)
|
||||
for (ich = 1; ich < mpchain; ich++)
|
||||
etap_dotdot[ich] =
|
||||
(etap_mass[ich-1]*etap_dot[ich-1]*etap_dot[ich-1] -
|
||||
boltz * t_target) / etap_mass[ich];
|
||||
|
||||
@ -494,7 +494,7 @@ void Group::assign(int narg, char **arg)
|
||||
|
||||
std::string fixcmd = "GROUP_";
|
||||
fixcmd += fmt::format("{} {} GROUP",names[igroup],arg[2]);
|
||||
for (int i = 3; i < narg; i++) fixcmd += std::string(" ") + arg[i];
|
||||
for (i = 3; i < narg; i++) fixcmd += std::string(" ") + arg[i];
|
||||
modify->add_fix(fixcmd);
|
||||
|
||||
// style = static
|
||||
|
||||
@ -185,9 +185,9 @@ void ImproperHybrid::settings(int narg, char **arg)
|
||||
// delete old lists, since cannot just change settings
|
||||
|
||||
if (nstyles) {
|
||||
for (int i = 0; i < nstyles; i++) delete styles[i];
|
||||
for (i = 0; i < nstyles; i++) delete styles[i];
|
||||
delete [] styles;
|
||||
for (int i = 0; i < nstyles; i++) delete [] keywords[i];
|
||||
for (i = 0; i < nstyles; i++) delete [] keywords[i];
|
||||
delete [] keywords;
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ void ImproperHybrid::settings(int narg, char **arg)
|
||||
memory->destroy(map);
|
||||
delete [] nimproperlist;
|
||||
delete [] maximproper;
|
||||
for (int i = 0; i < nstyles; i++)
|
||||
for (i = 0; i < nstyles; i++)
|
||||
memory->destroy(improperlist[i]);
|
||||
delete [] improperlist;
|
||||
}
|
||||
|
||||
@ -887,7 +887,7 @@ void Input::ifthenelse()
|
||||
char **commands = new char*[ncommands];
|
||||
ncommands = 0;
|
||||
for (int i = first; i <= last; i++) {
|
||||
int n = strlen(arg[i]) + 1;
|
||||
n = strlen(arg[i]) + 1;
|
||||
if (n == 1) error->all(FLERR,"Illegal if command");
|
||||
commands[ncommands] = new char[n];
|
||||
strcpy(commands[ncommands],arg[i]);
|
||||
@ -940,7 +940,7 @@ void Input::ifthenelse()
|
||||
char **commands = new char*[ncommands];
|
||||
ncommands = 0;
|
||||
for (int i = first; i <= last; i++) {
|
||||
int n = strlen(arg[i]) + 1;
|
||||
n = strlen(arg[i]) + 1;
|
||||
if (n == 1) error->all(FLERR,"Illegal if command");
|
||||
commands[ncommands] = new char[n];
|
||||
strcpy(commands[ncommands],arg[i]);
|
||||
|
||||
@ -1952,8 +1952,9 @@ void *lammps_extract_variable(void *handle, const char *name, const char *group)
|
||||
}
|
||||
}
|
||||
END_CAPTURE
|
||||
|
||||
#if defined(LAMMPS_EXCEPTIONS)
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -2207,7 +2208,6 @@ void lammps_gather_atoms_concat(void *handle, char *name, int type, int count, v
|
||||
MPI_INT,lmp->world);
|
||||
|
||||
} else if (imgunpack) {
|
||||
int *copy;
|
||||
lmp->memory->create(copy,count*nlocal,"lib/gather:copy");
|
||||
offset = 0;
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
@ -3057,7 +3057,6 @@ void lammps_gather_concat(void *handle, char *name, int type, int count, void *d
|
||||
MPI_INT,lmp->world);
|
||||
|
||||
} else if (imgunpack) {
|
||||
int *copy;
|
||||
lmp->memory->create(copy,count*nlocal,"lib/gather:copy");
|
||||
offset = 0;
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
|
||||
Reference in New Issue
Block a user