silence compiler warnings

This commit is contained in:
Axel Kohlmeyer
2024-01-17 12:59:17 -05:00
parent e3f81a2513
commit ff0d18114e
6 changed files with 13 additions and 20 deletions

View File

@ -154,7 +154,7 @@ void FixUpdateSpecialBonds::pre_exchange()
void FixUpdateSpecialBonds::pre_force(int /*vflag*/) void FixUpdateSpecialBonds::pre_force(int /*vflag*/)
{ {
int ilist, nlist, i1, i2, j, jj, jnum; int i1, i2, j, jj, jnum;
int *jlist, *numneigh, **firstneigh; int *jlist, *numneigh, **firstneigh;
tagint tag1, tag2; tagint tag1, tag2;
NeighList *list; NeighList *list;

View File

@ -38,8 +38,7 @@ class ComputeRattlersAtom : public Compute {
void unpack_reverse_comm(int, int *, double *) override; void unpack_reverse_comm(int, int *, double *) override;
private: private:
int pstyle, cutstyle; int cutstyle, ncontacts_rattler, max_tries, nmax, invoked_peratom;
int ncontacts_rattler, max_tries, nmax, invoked_peratom;
int *ncontacts; int *ncontacts;
double *rattler; double *rattler;
class NeighList *list; class NeighList *list;

View File

@ -33,21 +33,20 @@
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <iostream>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
static const char cite_compute_slcsa_atom_c[] = static const char cite_compute_slcsa_atom_c[] =
"compute slcsa/atom command: doi:10.1088/0965-0393/21/5/055020\n\n" "compute slcsa/atom command: doi:10.1016/j.commatsci.2023.112534\n\n"
"@Article{Lafourcade2023,\n" "@Article{Lafourcade2023,\n"
" author = {P. Lafourcade and J.-B. Maillet and C. Denoual and E. Duval and A. Allera and A. " " author = {P. Lafourcade and J.-B. Maillet and C. Denoual and E. Duval and A. Allera and A. "
"M. Goryaeva and M.-C. Marinica},\n" "M. Goryaeva and M.-C. Marinica},\n"
" title = {Robust crystal structure identification at extreme conditions using a " " title = {Robust crystal structure identification at extreme conditions using a "
"density-independent spectral descriptor and supervised learning},\n" "density-independent spectral descriptor and supervised learning},\n"
" journal = {Computational Materials Science},\n" " journal = {Computational Materials Science},\n"
" year = 2023,\n" " year = 2023,\n"
" volume = XX,\n" " volume = 230,\n"
" pages = {XXXXXX}\n" " pages = 112534\n"
"}\n\n"; "}\n\n";
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
@ -79,6 +78,8 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) :
// # LR bias vector // # LR bias vector
// vector with 1 row x nclasses cols // vector with 1 row x nclasses cols
if (lmp->citeme) lmp->citeme->add(cite_compute_slcsa_atom_c);
if (narg != 11) utils::missing_cmd_args(FLERR, "compute slcsa/atom", error); if (narg != 11) utils::missing_cmd_args(FLERR, "compute slcsa/atom", error);
int twojmax = utils::inumeric(FLERR, arg[3], false, lmp); int twojmax = utils::inumeric(FLERR, arg[3], false, lmp);

View File

@ -53,14 +53,12 @@ class ComputeSLCSAAtom : public Compute {
value_t descriptorval; value_t descriptorval;
int nmax; int nmax;
int ncols; int ncols;
int nevery;
int ncomps; int ncomps;
int nclasses; int nclasses;
const char *database_mean_descriptor_file; const char *database_mean_descriptor_file;
const char *lda_scalings_file; const char *lda_scalings_file;
const char *lr_decision_file; const char *lr_decision_file;
const char *lr_bias_file; const char *lr_bias_file;
const char *covmat_file;
const char *maha_file; const char *maha_file;
class NeighList *list; class NeighList *list;

View File

@ -202,7 +202,7 @@ void FixNonaffineDisplacement::init()
// need an occasional half neighbor list // need an occasional half neighbor list
if (cut_style == RADIUS) { if (cut_style == RADIUS) {
auto req = neighbor->add_request(this, NeighConst::REQ_SIZE | NeighConst::REQ_OCCASIONAL); neighbor->add_request(this, NeighConst::REQ_SIZE | NeighConst::REQ_OCCASIONAL);
} else { } else {
auto req = neighbor->add_request(this, NeighConst::REQ_OCCASIONAL); auto req = neighbor->add_request(this, NeighConst::REQ_OCCASIONAL);
if (cut_style == CUSTOM) { if (cut_style == CUSTOM) {
@ -233,7 +233,7 @@ void FixNonaffineDisplacement::init_list(int /*id*/, NeighList *ptr)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void FixNonaffineDisplacement::setup(int vflag) void FixNonaffineDisplacement::setup(int /*vflag*/)
{ {
post_force(0); // Save state if needed before starting the 1st timestep post_force(0); // Save state if needed before starting the 1st timestep
} }
@ -285,7 +285,6 @@ void FixNonaffineDisplacement::restart(char *buf)
void FixNonaffineDisplacement::integrate_velocity() void FixNonaffineDisplacement::integrate_velocity()
{ {
int i,n;
dtv = update->dt; dtv = update->dt;
double **v = atom->v; double **v = atom->v;
@ -306,7 +305,6 @@ void FixNonaffineDisplacement::integrate_velocity()
void FixNonaffineDisplacement::save_reference_state() void FixNonaffineDisplacement::save_reference_state()
{ {
int i, n;
double **x = atom->x; double **x = atom->x;
int *mask = atom->mask; int *mask = atom->mask;
@ -354,15 +352,14 @@ void FixNonaffineDisplacement::calculate_D2Min()
int i, j, k, l, ii, jj, inum, jnum, itype, jtype; int i, j, k, l, ii, jj, inum, jnum, itype, jtype;
double evol, j2, edev; double evol, j2, edev;
double r[3], r0[3], rsq, rsq0, radsum, temp[3]; double r[3], r0[3], rsq, radsum, temp[3];
double X_tmp[3][3], Y_tmp[3][3], F_tmp[3][3], E[3][3]; double X_tmp[3][3], Y_tmp[3][3], F_tmp[3][3], E[3][3];
double Y_inv[3][3] = {0.0}; // Zero for 2d since not all entries used double Y_inv[3][3] = {{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}}; // Zero for 2d since not all entries used
int *ilist, *jlist, *numneigh, **firstneigh; int *ilist, *jlist, *numneigh, **firstneigh;
double **x = atom->x; double **x = atom->x;
double **x0 = array_atom; double **x0 = array_atom;
double *radius = atom->radius; double *radius = atom->radius;
tagint *tag = atom->tag;
int *type = atom->type; int *type = atom->type;
int *mask = atom->mask; int *mask = atom->mask;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;

View File

@ -338,7 +338,7 @@ void DihedralQuadratic::born_matrix(int nd, int i1, int i2, int i3, int i4,
double sb1,sb3,rb1,rb3,c0,b1mag2,b1mag,b2mag2; double sb1,sb3,rb1,rb3,c0,b1mag2,b1mag,b2mag2;
double b2mag,b3mag2,b3mag,ctmp,r12c1,c1mag,r12c2; double b2mag,b3mag2,b3mag,ctmp,r12c1,c1mag,r12c2;
double c2mag,sc1,sc2,s12,c; double c2mag,sc1,sc2,s12,c;
double s1,s2,cx,cy,cz,cmag,dx,phi,si,siinv,sin2; double cx,cy,cz,cmag,dx,phi,si,siinv,sin2;
int **dihedrallist = neighbor->dihedrallist; int **dihedrallist = neighbor->dihedrallist;
double **x = atom->x; double **x = atom->x;
@ -405,8 +405,6 @@ void DihedralQuadratic::born_matrix(int nd, int i1, int i2, int i3, int i4,
if (sc2 < SMALL) sc2 = SMALL; if (sc2 < SMALL) sc2 = SMALL;
sc2 = 1.0/sc2; sc2 = 1.0/sc2;
s1 = sc1 * sc1;
s2 = sc2 * sc2;
s12 = sc1 * sc2; s12 = sc1 * sc2;
c = (c0 + c1mag*c2mag) * s12; c = (c0 + c1mag*c2mag) * s12;