use 'const int' instead of 'int const' to be consistent with the rest of LAMMPS

This commit is contained in:
Axel Kohlmeyer
2025-06-25 19:54:35 -04:00
parent 202aeaf1a5
commit 7d86d7f89a
12 changed files with 76 additions and 76 deletions

View File

@ -35,7 +35,7 @@ double BoundaryCorrection::get_volume()
std::vector<int> BoundaryCorrection::gather_recvcounts(int n)
{
int const nprocs = comm->nprocs;
const int nprocs = comm->nprocs;
std::vector<int> recvcounts = std::vector<int>(nprocs);
MPI_Allgather(&n, 1, MPI_INT, recvcounts.data(), 1, MPI_INT, world);
return recvcounts;
@ -43,7 +43,7 @@ std::vector<int> BoundaryCorrection::gather_recvcounts(int n)
std::vector<int> BoundaryCorrection::gather_displs(const std::vector<int> &recvcounts)
{
int const nprocs = comm->nprocs;
const int nprocs = comm->nprocs;
std::vector<int> displs = std::vector<int>(nprocs);
displs[0] = 0;
for (int i = 1; i < nprocs; i++) displs[i] = displs[i - 1] + recvcounts[i - 1];

View File

@ -138,7 +138,7 @@ void ElectrodeMatrix::pair_contribution(double **array)
// skip if atom I is not in either group
if (!(mask[i] & groupbit)) continue;
bigint const ipos = mpos[i];
const bigint ipos = mpos[i];
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
@ -210,7 +210,7 @@ void ElectrodeMatrix::tf_contribution(double **array)
void ElectrodeMatrix::update_mpos()
{
int const nall = atom->nlocal + atom->nghost;
const int nall = atom->nlocal + atom->nghost;
tagint *tag = atom->tag;
int *mask = atom->mask;
mpos = std::vector<bigint>(nall, -1);

View File

@ -135,15 +135,15 @@ void ElectrodeVector::pair_contribution(double *vector)
int *type = atom->type;
int *mask = atom->mask;
// neighbor list will be ready because called from post_neighbor
int const nlocal = atom->nlocal;
int const inum = list->inum;
const int nlocal = atom->nlocal;
const int inum = list->inum;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
int **firstneigh = list->firstneigh;
int newton_pair = force->newton_pair;
for (int ii = 0; ii < inum; ii++) {
int const i = ilist[ii];
const int i = ilist[ii];
bool const i_in_sensor = (mask[i] & groupbit);
bool const i_in_source = !!(mask[i] & source_grpbit) != invert_source;
if (!(i_in_sensor || i_in_source)) continue;
@ -155,7 +155,7 @@ void ElectrodeVector::pair_contribution(double *vector)
int *jlist = firstneigh[i];
int jnum = numneigh[i];
for (int jj = 0; jj < jnum; jj++) {
int const j = jlist[jj] & NEIGHMASK;
const int j = jlist[jj] & NEIGHMASK;
bool const j_in_sensor = (mask[j] & groupbit);
bool const j_in_source = !!(mask[j] & source_grpbit) != invert_source;
bool const compute_ij = i_in_sensor && j_in_source;
@ -192,7 +192,7 @@ void ElectrodeVector::pair_contribution(double *vector)
void ElectrodeVector::self_contribution(double *vector)
{
int const inum = list->inum;
const int inum = list->inum;
int *mask = atom->mask;
int *ilist = list->ilist;
double *q = atom->q;
@ -201,7 +201,7 @@ void ElectrodeVector::self_contribution(double *vector)
const double preta = MY_SQRT2 / MY_PIS;
for (int ii = 0; ii < inum; ii++) {
int const i = ilist[ii];
const int i = ilist[ii];
double const eta_i = etaflag ? atom->dvector[eta_index][i] : eta;
bool const i_in_sensor = (mask[i] & groupbit);
bool const i_in_source = !!(mask[i] & source_grpbit) != invert_source;
@ -213,14 +213,14 @@ void ElectrodeVector::self_contribution(double *vector)
void ElectrodeVector::tf_contribution(double *vector)
{
int const inum = list->inum;
const int inum = list->inum;
int *mask = atom->mask;
int *type = atom->type;
int *ilist = list->ilist;
double *q = atom->q;
for (int ii = 0; ii < inum; ii++) {
int const i = ilist[ii];
const int i = ilist[ii];
bool const i_in_sensor = (mask[i] & groupbit);
bool const i_in_source = !!(mask[i] & source_grpbit) != invert_source;
if (i_in_sensor && i_in_source) vector[i] += tf_types[type[i]] * q[i];

View File

@ -892,16 +892,16 @@ void EwaldElectrode::compute_vector(double *vec, int sensor_grpbit, int source_g
{
update_eikr(false);
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
double *q = atom->q;
int *mask = atom->mask;
std::vector<double> q_cos(kcount);
std::vector<double> q_sin(kcount);
for (int k = 0; k < kcount; k++) {
int const kx = kxvecs[k];
int const ky = kyvecs[k];
int const kz = kzvecs[k];
const int kx = kxvecs[k];
const int ky = kyvecs[k];
const int kz = kzvecs[k];
double q_cos_k = 0;
double q_sin_k = 0;
for (int i = 0; i < nlocal; i++) {
@ -926,9 +926,9 @@ void EwaldElectrode::compute_vector(double *vec, int sensor_grpbit, int source_g
if (!(mask[i] & sensor_grpbit)) continue;
double bi = 0;
for (int k = 0; k < kcount; k++) {
int const kx = kxvecs[k];
int const ky = kyvecs[k];
int const kz = kzvecs[k];
const int kx = kxvecs[k];
const int ky = kyvecs[k];
const int kz = kzvecs[k];
double const cos_kxky = cs[kx][0][i] * cs[ky][1][i] - sn[kx][0][i] * sn[ky][1][i];
double const sin_kxky = sn[kx][0][i] * cs[ky][1][i] + cs[kx][0][i] * sn[ky][1][i];
double const cos_kr = cos_kxky * cs[kz][2][i] - sin_kxky * sn[kz][2][i];
@ -1074,11 +1074,11 @@ void EwaldElectrode::compute_matrix(bigint *imat, double **matrix, bool /* timer
// anyway, use local sn and cs for simplicity
int const kx = kxvecs[k];
int const ky = kyvecs[k];
int const kz = kzvecs[k];
int const sign_ky = (ky > 0) - (ky < 0);
int const sign_kz = (kz > 0) - (kz < 0);
const int kx = kxvecs[k];
const int ky = kyvecs[k];
const int kz = kzvecs[k];
const int sign_ky = (ky > 0) - (ky < 0);
const int sign_kz = (kz > 0) - (kz < 0);
double cos_kxky = cs[kx][0][i] * cs[ky][1][i] - sn[kx][0][i] * sn[ky][1][i];
double sin_kxky = sn[kx][0][i] * cs[ky][1][i] + cs[kx][0][i] * sn[ky][1][i];
@ -1088,9 +1088,9 @@ void EwaldElectrode::compute_matrix(bigint *imat, double **matrix, bool /* timer
// global indexing csx_all[kx+j*(kxmax+1)] <> csx_all[kx][j]
int const kxj = kx + j * (kxmax + 1);
int const kyj = abs(ky) + j * (kymax + 1);
int const kzj = abs(kz) + j * (kzmax + 1);
const int kxj = kx + j * (kxmax + 1);
const int kyj = abs(ky) + j * (kymax + 1);
const int kzj = abs(kz) + j * (kzmax + 1);
cos_kxky = csx_all[kxj] * csy_all[kyj] - snx_all[kxj] * sny_all[kyj] * sign_ky;
sin_kxky = snx_all[kxj] * csy_all[kyj] + csx_all[kxj] * sny_all[kyj] * sign_ky;

View File

@ -337,7 +337,7 @@ int FixElectrodeConp::modify_param(int narg, char **arg)
tfflag = true;
// read atom type, Thomas-Fermi length, and voronoi volume (reciprocal
// number density)
int const type = utils::inumeric(FLERR, arg[1], false, lmp);
const int type = utils::inumeric(FLERR, arg[1], false, lmp);
double const len = utils::numeric(FLERR, arg[2], false, lmp);
double const voronoi = utils::numeric(FLERR, arg[3], false, lmp);
// check type exists and is completely in electrode
@ -417,7 +417,7 @@ void FixElectrodeConp::init()
error->all(FLERR, "More than one fix electrode");
// make sure electrode atoms are not integrated if a matrix is used for electrode-electrode interaction
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
int *mask = atom->mask;
if (matrix_algo) {
std::vector<Fix *> integrate_fixes;
@ -494,7 +494,7 @@ void FixElectrodeConp::post_constructor()
void FixElectrodeConp::setup_post_neighbor()
{
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
int *mask = atom->mask;
tagint *tag = atom->tag;
@ -546,7 +546,7 @@ void FixElectrodeConp::setup_post_neighbor()
size_t n = order.size();
std::vector<std::vector<double>> ordered_mat(n, std::vector<double>(n));
for (size_t i = 0; i < n; i++) {
bigint const gi = order[i];
const bigint gi = order[i];
for (size_t j = 0; j < n; j++) { ordered_mat[gi][order[j]] = mat[i][j]; }
}
return ordered_mat;
@ -663,7 +663,7 @@ void FixElectrodeConp::invert()
if (timer_flag && (comm->me == 0)) utils::logmesg(lmp, "CONP inverting matrix\n");
int m = ngroup, n = ngroup, lda = ngroup;
std::vector<int> ipiv(ngroup);
int const lwork = ngroup * ngroup;
const int lwork = ngroup * ngroup;
std::vector<double> work(lwork);
int info_rf, info_ri;
@ -708,8 +708,8 @@ void FixElectrodeConp::setup_pre_exchange() // create_taglist
if (!matrix_algo) return;
int *mask = atom->mask;
int const nlocal = atom->nlocal;
int const nprocs = comm->nprocs;
const int nlocal = atom->nlocal;
const int nprocs = comm->nprocs;
tagint *tag = atom->tag;
delete[] recvcounts;
@ -733,7 +733,7 @@ void FixElectrodeConp::setup_pre_exchange() // create_taglist
MPI_Allgather(&gnum_local, 1, MPI_INT, recvcounts, 1, MPI_INT, world);
displs[0] = 0;
for (int i = 1; i < nprocs; i++) { displs[i] = displs[i - 1] + recvcounts[i - 1]; }
int const gnum = displs[nprocs - 1] + recvcounts[nprocs - 1];
const int gnum = displs[nprocs - 1] + recvcounts[nprocs - 1];
std::vector<tagint> taglist_all(gnum);
MPI_Allgatherv(taglist_local_group.data(), gnum_local, MPI_LMP_TAGINT, taglist_all.data(),
recvcounts, displs, MPI_LMP_TAGINT, world);
@ -809,7 +809,7 @@ void FixElectrodeConp::compute_sd_vectors_ffield()
double zprd = domain->prd[2];
for (int i = 0; i < atom->nlocal; i++) {
if (mask[i] & groupbit) {
int const i_iele = tag_to_iele[tag[i]];
const int i_iele = tag_to_iele[tag[i]];
double const zprd_offset = (mask[i] & group_bits[top_group]) ? 0.0 : 1.0;
double const evscale_elez = evscale * (x[i][2] / zprd + zprd_offset);
for (int g = 0; g < num_of_groups; g++) {
@ -874,7 +874,7 @@ void FixElectrodeConp::update_charges()
double mult_start = MPI_Wtime();
for (int i_iele = 0; i_iele < nlocalele; i_iele++) {
double q_tmp = 0;
int const iele = list_iele[i_iele];
const int iele = list_iele[i_iele];
double *_noalias caprow = capacitance[iele];
for (int j = 0; j < ngroup; j++) { q_tmp -= caprow[j] * potential_iele[j]; }
q_local[i_iele] = q_tmp;
@ -979,7 +979,7 @@ std::vector<double> FixElectrodeConp::gather_ngroup(std::vector<double> x_local)
{
auto x = std::vector<double>(ngroup, 0.);
for (int i = 0; i < nlocalele; i++) {
int const iele = list_iele[i];
const int iele = list_iele[i];
x[iele] = x_local[i];
}
MPI_Allreduce(MPI_IN_PLACE, x.data(), ngroup, MPI_DOUBLE, MPI_SUM, world);
@ -1124,7 +1124,7 @@ void FixElectrodeConp::compute_macro_matrices()
int m = num_of_groups;
int n = m, lda = m;
std::vector<int> ipiv(m);
int const lwork = m * m;
const int lwork = m * m;
std::vector<double> work(lwork);
std::vector<double> tmp(lwork);
@ -1186,7 +1186,7 @@ double FixElectrodeConp::potential_energy()
{
// corrections to energy due to potential psi
double const qqrd2e = force->qqrd2e;
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
int *mask = atom->mask;
double *q = atom->q;
double energy = 0;
@ -1205,7 +1205,7 @@ double FixElectrodeConp::self_energy(int eflag)
{
// corrections to energy due to self interaction
double const qqrd2e = force->qqrd2e;
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
double const pre = 1. / sqrt(MY_2PI) * qqrd2e;
int *mask = atom->mask;
int *type = atom->type;
@ -1235,7 +1235,7 @@ double FixElectrodeConp::gausscorr(int eflag, int vflag, bool fflag)
// correction to short range interaction due to eta
double const qqrd2e = force->qqrd2e;
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
int *mask = atom->mask;
double *q = atom->q;
double **x = atom->x;
@ -1260,7 +1260,7 @@ double FixElectrodeConp::gausscorr(int eflag, int vflag, bool fflag)
int jnum = numneigh[i];
for (int jj = 0; jj < jnum; jj++) {
int const j = jlist[jj] & NEIGHMASK;
const int j = jlist[jj] & NEIGHMASK;
bool j_in_ele = groupbit & mask[j];
if (!(i_in_ele || j_in_ele)) continue;
@ -1411,7 +1411,7 @@ void FixElectrodeConp::read_from_file(const std::string &input_file, double **ar
if ((bigint) idx.size() != ngroup)
error->all(FLERR, "Read tags do not match taglist of fix {}", style);
for (bigint i = 0; i < ngroup; i++) {
bigint const ii = idx[i];
const bigint ii = idx[i];
for (bigint j = 0; j < ngroup; j++) array[i][j] = matrix[ii][idx[j]];
}
}
@ -1422,7 +1422,7 @@ void FixElectrodeConp::read_from_file(const std::string &input_file, double **ar
void FixElectrodeConp::request_etypes_neighlists()
{
int const ntypes = atom->ntypes;
const int ntypes = atom->ntypes;
// construct etypes
int *mask = atom->mask;
int *type = atom->type;
@ -1513,7 +1513,7 @@ void FixElectrodeConp::gather_list_iele()
int *mask = atom->mask;
tagint *tag = atom->tag;
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
if (matrix_algo) {
list_iele.clear();
list_iele.reserve(nlocalele);
@ -1522,7 +1522,7 @@ void FixElectrodeConp::gather_list_iele()
iele_to_group_local.clear();
for (int i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) {
tagint const t = tag[i];
const tagint t = tag[i];
if (matrix_algo) list_iele.push_back(tag_to_iele[t]);
taglist_local.push_back(t);
for (int g = 0; g < num_of_groups; g++)
@ -1535,7 +1535,7 @@ void FixElectrodeConp::gather_list_iele()
if (matrix_algo) {
MPI_Allgather(&nlocalele, 1, MPI_INT, recvcounts, 1, MPI_INT, world);
displs[0] = 0;
int const nprocs = comm->nprocs;
const int nprocs = comm->nprocs;
for (int i = 1; i < nprocs; i++) { displs[i] = displs[i - 1] + recvcounts[i - 1]; }
MPI_Allgatherv(list_iele.data(), nlocalele, MPI_INT, iele_gathered, recvcounts, displs, MPI_INT,
@ -1565,8 +1565,8 @@ void FixElectrodeConp::buffer_and_gather(double *ivec, double *elevec)
double FixElectrodeConp::memory_usage()
{
int const nprocs = comm->nprocs;
int const nmax = atom->nmax;
const int nprocs = comm->nprocs;
const int nmax = atom->nmax;
double bytes = 0.0;
bytes += nmax * (sizeof(double)); // potential_i
if (matrix_algo) {
@ -1611,7 +1611,7 @@ int FixElectrodeConp::pack_forward_comm(int n, int *list, double *buf, int /*pbc
{
int m = 0;
for (int i = 0; i < n; i++) {
int const j = list[i];
const int j = list[i];
buf[m++] = atom->q[j];
}
return m;
@ -1621,7 +1621,7 @@ int FixElectrodeConp::pack_forward_comm(int n, int *list, double *buf, int /*pbc
void FixElectrodeConp::unpack_forward_comm(int n, int first, double *buf)
{
int const last = first + n;
const int last = first + n;
for (int i = first, m = 0; i < last; i++) atom->q[i] = buf[m++];
}

View File

@ -49,7 +49,7 @@ FixElectrodeConq::FixElectrodeConq(LAMMPS *lmp, int narg, char **arg) :
void FixElectrodeConq::update_psi()
{
int const numsymm = num_of_groups - ((symm) ? 1 : 0);
const int numsymm = num_of_groups - ((symm) ? 1 : 0);
bool symm_update_back = false;
for (int g = 0; g < numsymm; g++) {
if (group_psi_var_styles[g] == VarStyle::CONST) continue;
@ -82,7 +82,7 @@ void FixElectrodeConq::update_psi()
std::vector<double> FixElectrodeConq::constraint_correction(std::vector<double> x)
{
int const n = x.size();
const int n = x.size();
auto sums = std::vector<double>(num_of_groups, 0);
for (int i = 0; i < n; i++) sums[iele_to_group_local[i]] += x[i];
MPI_Allreduce(MPI_IN_PLACE, sums.data(), num_of_groups, MPI_DOUBLE, MPI_SUM, world);
@ -100,7 +100,7 @@ std::vector<double> FixElectrodeConq::constraint_correction(std::vector<double>
std::vector<double> FixElectrodeConq::constraint_projection(std::vector<double> x)
{
int const n = x.size();
const int n = x.size();
auto sums = std::vector<double>(num_of_groups, 0);
for (int i = 0; i < n; i++) sums[iele_to_group_local[i]] += x[i];
MPI_Allreduce(MPI_IN_PLACE, sums.data(), num_of_groups, MPI_DOUBLE, MPI_SUM, world);
@ -115,7 +115,7 @@ std::vector<double> FixElectrodeConq::constraint_projection(std::vector<double>
void FixElectrodeConq::recompute_potential(std::vector<double> b, std::vector<double> q_local)
{
int const n = b.size();
const int n = b.size();
auto a = ele_ele_interaction(q_local);
auto psi_sums = std::vector<double>(num_of_groups, 0);
for (int i = 0; i < n; i++) { psi_sums[iele_to_group_local[i]] += (a[i] + b[i]) / evscale; }

View File

@ -76,7 +76,7 @@ void FixElectrodeThermo::compute_macro_matrices()
void FixElectrodeThermo::pre_update()
{
// total electrode charges after last step, required for update psi
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
int *mask = atom->mask;
double *q = atom->q;
for (int g = 0; g < NUM_GROUPS; g++) {

View File

@ -683,7 +683,7 @@ void PPPMElectrode::compute_matrix(bigint *imat, double **matrix, bool timer_fla
n += 2;
}
MPI_Allreduce(MPI_IN_PLACE, greens_real, nz_pppm * ny_pppm * nx_pppm, MPI_DOUBLE, MPI_SUM, world);
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
int nmat = std::count_if(&imat[0], &imat[nlocal], [](int x) {
return x >= 0;
});
@ -712,13 +712,13 @@ void PPPMElectrode::compute_matrix(bigint *imat, double **matrix, bool timer_fla
/* ----------------------------------------------------------------------*/
void PPPMElectrode::one_step_multiplication(bigint *imat, double *greens_real, double **x_ele,
double **matrix, int const nmat, bool timer_flag)
double **matrix, const int nmat, bool timer_flag)
{
// map green's function in real space from mesh to particle positions
// with matrix multiplication 'W^T G W' in one steps. Uses less memory than
// two_step_multiplication
//
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
double **x = atom->x;
MPI_Barrier(world);
double step1_time = MPI_Wtime();
@ -730,7 +730,7 @@ void PPPMElectrode::one_step_multiplication(bigint *imat, double *greens_real, d
if (jpos < 0) continue;
j_list.push_back(j);
}
int const nj_local = j_list.size();
const int nj_local = j_list.size();
FFT_SCALAR ***rho1d_j;
memory->create(rho1d_j, nj_local, 3, order, "pppm/electrode:rho1d_j");
@ -753,8 +753,8 @@ void PPPMElectrode::one_step_multiplication(bigint *imat, double *greens_real, d
// (nx,ny,nz) = global coords of grid pt to "lower left" of charge
// (dx,dy,dz) = distance to "lower left" grid pt
// (mx,my,mz) = global coords of moving stencil pt
int const order2 = order * order;
int const order6 = order2 * order2 * order2;
const int order2 = order * order;
const int order6 = order2 * order2 * order2;
double *amesh;
memory->create(amesh, order6, "pppm/electrode:amesh");
for (int ipos = 0; ipos < nmat; ipos++) {
@ -831,13 +831,13 @@ void PPPMElectrode::build_amesh(const int dx, // = njx - nix
for (int iz = 0; iz < order; iz++)
for (int jz = 0; jz < order; jz++) {
int const mz = fmod(dz + jz - iz, nz_pppm) * nx_pppm * ny_pppm;
const int mz = fmod(dz + jz - iz, nz_pppm) * nx_pppm * ny_pppm;
for (int iy = 0; iy < order; iy++)
for (int jy = 0; jy < order; jy++) {
int const my = fmod(dy + jy - iy, ny_pppm) * nx_pppm;
const int my = fmod(dy + jy - iy, ny_pppm) * nx_pppm;
for (int ix = 0; ix < order; ix++)
for (int jx = 0; jx < order; jx++) {
int const mx = fmod(dx + jx - ix, nx_pppm);
const int mx = fmod(dx + jx - ix, nx_pppm);
amesh[ind_amesh] = greens_real[mz + my + mx];
ind_amesh++;
}
@ -848,12 +848,12 @@ void PPPMElectrode::build_amesh(const int dx, // = njx - nix
/* ----------------------------------------------------------------------*/
void PPPMElectrode::two_step_multiplication(bigint *imat, double *greens_real, double **x_ele,
double **matrix, int const nmat, bool timer_flag)
double **matrix, const int nmat, bool timer_flag)
{
// map green's function in real space from mesh to particle positions
// with matrix multiplication 'W^T G W' in two steps. gw is result of
// first multiplication.
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
MPI_Barrier(world);
double step1_time = MPI_Wtime();
int nx_ele = nxhi_out - nxlo_out + 1; // nx_pppm + order + 1;
@ -892,15 +892,15 @@ void PPPMElectrode::two_step_multiplication(bigint *imat, double *greens_real, d
for (int mjz = nzlo_out; mjz <= nzhi_out; mjz++) {
for (int ni = nlower; ni <= nupper; ni++) {
double const iz0 = rho1d[2][ni];
int const mz = fmod(mjz - ni - niz, nz_pppm);
const int mz = fmod(mjz - ni - niz, nz_pppm);
for (int mjy = nylo_out; mjy <= nyhi_out; mjy++) {
for (int mi = nlower; mi <= nupper; mi++) {
double const iy0 = iz0 * rho1d[1][mi];
int const my = fmod(mjy - mi - niy, ny_pppm);
const int my = fmod(mjy - mi - niy, ny_pppm);
for (int mjx = nxlo_out; mjx <= nxhi_out; mjx++) {
for (int li = nlower; li <= nupper; li++) {
double const ix0 = iy0 * rho1d[0][li];
int const mx = fmod(mjx - li - nix, nx_pppm);
const int mx = fmod(mjx - li - nix, nx_pppm);
gw[ipos][nx_ele * ny_ele * (mjz - nzlo_out) + nx_ele * (mjy - nylo_out) +
(mjx - nxlo_out)] +=
ix0 * greens_real[mz * nx_pppm * ny_pppm + my * nx_pppm + mx];

View File

@ -93,8 +93,8 @@ class PPPMElectrode : public PPPM, public ElectrodeKSpace {
void start_compute();
void make_rho_in_brick(int, FFT_SCALAR ***, bool);
void project_psi(double *, int);
void one_step_multiplication(bigint *, double *, double **, double **, int const, bool);
void two_step_multiplication(bigint *, double *, double **, double **, int const, bool);
void one_step_multiplication(bigint *, double *, double **, double **, const int, bool);
void two_step_multiplication(bigint *, double *, double **, double **, const int, bool);
void build_amesh(int, int, int, double *, double *);
bool compute_vector_called;
};

View File

@ -86,7 +86,7 @@ void Slab2d::compute_corr(double /*qsum*/, int eflag_atom, int eflag_global, dou
void Slab2d::vector_corr(double *vec, int sensor_grpbit, int source_grpbit, bool invert_source)
{
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
double **x = atom->x;
double *q = atom->q;
int *mask = atom->mask;

View File

@ -93,7 +93,7 @@ void SlabDipole::compute_corr(double qsum, int eflag_atom, int eflag_global, dou
void SlabDipole::vector_corr(double *vec, int sensor_grpbit, int source_grpbit, bool invert_source)
{
double const volume = get_volume();
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
double **x = atom->x;
double *q = atom->q;
int *mask = atom->mask;

View File

@ -97,7 +97,7 @@ void WireDipole::compute_corr(double /*qsum*/, int eflag_atom, int eflag_global,
void WireDipole::vector_corr(double *vec, int sensor_grpbit, int source_grpbit, bool invert_source)
{
double const volume = get_volume();
int const nlocal = atom->nlocal;
const int nlocal = atom->nlocal;
double **x = atom->x;
double *q = atom->q;
int *mask = atom->mask;