Fix undef var

This commit is contained in:
Stan Gerald Moore
2022-10-11 10:36:22 -06:00
parent 01c022f83d
commit 955b615e1e
9 changed files with 12 additions and 12 deletions

View File

@ -27,7 +27,7 @@ class BoundaryCorrection : protected Pointers {
BoundaryCorrection(LAMMPS *);
virtual void vector_corr(double *, int, int, bool){};
virtual void matrix_corr(bigint *, double **){};
virtual void compute_corr(double, int, int, double &, double *){};
virtual void compute_corr(double, double, int, int, double &, double *){};
void setup(double, double, double);
void setup(double, double, double, double);

View File

@ -418,7 +418,7 @@ void EwaldElectrode::compute(int eflag, int vflag)
for (int j = 0; j < 6; j++) vatom[i][j] *= q[i] * qscale;
}
boundcorr->compute_corr(qsum, eflag_atom, eflag_global, energy, eatom);
boundcorr->compute_corr(qsum, slab_volfactor, eflag_atom, eflag_global, energy, eatom);
}
/* ---------------------------------------------------------------------- */

View File

@ -552,7 +552,7 @@ void PPPMElectrode::compute(int eflag, int vflag)
}
}
boundcorr->compute_corr(qsum, eflag_atom, eflag_global, energy, eatom);
boundcorr->compute_corr(qsum, slab_volfactor, eflag_atom, eflag_global, energy, eatom);
compute_vector_called = false;
}

View File

@ -32,8 +32,8 @@ using namespace MathConst;
------------------------------------------------------------------------- */
Slab2d::Slab2d(LAMMPS *lmp) : BoundaryCorrection(lmp){};
void Slab2d::compute_corr(double /*qsum*/, int eflag_atom, int eflag_global, double &energy,
double *eatom)
void Slab2d::compute_corr(double /*qsum*/, double /*slab_volfactor*/, int eflag_atom,
int eflag_global, double &energy, double *eatom)
{
double *q = atom->q;
double **x = atom->x;

View File

@ -27,7 +27,7 @@ class Slab2d : public BoundaryCorrection {
Slab2d(LAMMPS *);
void vector_corr(double *, int, int, bool) override;
void matrix_corr(bigint *, double **) override;
void compute_corr(double, int, int, double &, double *) override;
void compute_corr(double, double, int, int, double &, double *) override;
void setup(double);
};

View File

@ -37,8 +37,8 @@ using namespace MathConst;
*/
SlabDipole::SlabDipole(LAMMPS *lmp) : BoundaryCorrection(lmp){};
void SlabDipole::compute_corr(double qsum, int eflag_atom, int eflag_global, double &energy,
double *eatom)
void SlabDipole::compute_corr(double qsum, double slab_volfactor, int eflag_atom,
int eflag_global, double &energy, double *eatom)
{
// compute local contribution to global dipole moment
double *q = atom->q;

View File

@ -27,7 +27,7 @@ class SlabDipole : public BoundaryCorrection {
SlabDipole(LAMMPS *);
void vector_corr(double *, int, int, bool);
void matrix_corr(bigint *, double **);
void compute_corr(double, int, int, double &, double *);
void compute_corr(double, double, int, int, double &, double *);
void setup(double);
};

View File

@ -34,8 +34,8 @@ using namespace MathConst;
*/
WireDipole::WireDipole(LAMMPS *lmp) : BoundaryCorrection(lmp){};
void WireDipole::compute_corr(double /*qsum*/, int eflag_atom, int eflag_global, double &energy,
double *eatom)
void WireDipole::compute_corr(double /*qsum*/, double /*slab_volfactor*/, int eflag_atom,
int eflag_global, double &energy, double *eatom)
{
double *q = atom->q;
double **x = atom->x;

View File

@ -27,7 +27,7 @@ class WireDipole : public BoundaryCorrection {
WireDipole(LAMMPS *);
void vector_corr(double *, int, int, bool);
void matrix_corr(bigint *, double **);
void compute_corr(double, int, int, double &, double *);
void compute_corr(double, double, int, int, double &, double *);
void setup(double);
};