apply clang-format
This commit is contained in:
@ -69,7 +69,7 @@ std::vector<bigint> BoundaryCorrection::gather_jmat(bigint *imat)
|
|||||||
std::vector<bigint> jmat = std::vector<bigint>(ngroup);
|
std::vector<bigint> jmat = std::vector<bigint>(ngroup);
|
||||||
std::vector<int> recvcounts = gather_recvcounts(ngrouplocal);
|
std::vector<int> recvcounts = gather_recvcounts(ngrouplocal);
|
||||||
std::vector<int> displs = gather_displs(recvcounts);
|
std::vector<int> displs = gather_displs(recvcounts);
|
||||||
MPI_Allgatherv(jmat_local.data(), ngrouplocal, MPI_LMP_BIGINT, jmat.data(),
|
MPI_Allgatherv(jmat_local.data(), ngrouplocal, MPI_LMP_BIGINT, jmat.data(), recvcounts.data(),
|
||||||
recvcounts.data(), displs.data(), MPI_LMP_BIGINT, world);
|
displs.data(), MPI_LMP_BIGINT, world);
|
||||||
return jmat;
|
return jmat;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1049,8 +1049,8 @@ void EwaldElectrode::compute_matrix(bigint *imat, double **matrix, bool /* timer
|
|||||||
MPI_Allgather(&ngrouplocal, 1, MPI_INT, recvcounts, 1, MPI_INT, world);
|
MPI_Allgather(&ngrouplocal, 1, MPI_INT, recvcounts, 1, MPI_INT, world);
|
||||||
displs[0] = 0;
|
displs[0] = 0;
|
||||||
for (int i = 1; i < nprocs; i++) displs[i] = displs[i - 1] + recvcounts[i - 1];
|
for (int i = 1; i < nprocs; i++) displs[i] = displs[i - 1] + recvcounts[i - 1];
|
||||||
MPI_Allgatherv(jmat_local, ngrouplocal, MPI_LMP_BIGINT, jmat, recvcounts, displs,
|
MPI_Allgatherv(jmat_local, ngrouplocal, MPI_LMP_BIGINT, jmat, recvcounts, displs, MPI_LMP_BIGINT,
|
||||||
MPI_LMP_BIGINT, world);
|
world);
|
||||||
|
|
||||||
memory->destroy(displs);
|
memory->destroy(displs);
|
||||||
memory->destroy(recvcounts);
|
memory->destroy(recvcounts);
|
||||||
|
|||||||
@ -50,10 +50,10 @@ void Slab2d::compute_corr(double /*qsum*/, int eflag_atom, int eflag_global, dou
|
|||||||
std::vector<double> q_all = std::vector<double>(natoms);
|
std::vector<double> q_all = std::vector<double>(natoms);
|
||||||
std::vector<int> recvcounts = gather_recvcounts(nlocal);
|
std::vector<int> recvcounts = gather_recvcounts(nlocal);
|
||||||
std::vector<int> displs = gather_displs(recvcounts);
|
std::vector<int> displs = gather_displs(recvcounts);
|
||||||
MPI_Allgatherv(q, nlocal, MPI_DOUBLE, q_all.data(), recvcounts.data(), displs.data(),
|
MPI_Allgatherv(q, nlocal, MPI_DOUBLE, q_all.data(), recvcounts.data(), displs.data(), MPI_DOUBLE,
|
||||||
|
world);
|
||||||
|
MPI_Allgatherv(z.data(), nlocal, MPI_DOUBLE, z_all.data(), recvcounts.data(), displs.data(),
|
||||||
MPI_DOUBLE, world);
|
MPI_DOUBLE, world);
|
||||||
MPI_Allgatherv(z.data(), nlocal, MPI_DOUBLE, z_all.data(), recvcounts.data(),
|
|
||||||
displs.data(), MPI_DOUBLE, world);
|
|
||||||
|
|
||||||
const double g_ewald_inv = 1.0 / g_ewald;
|
const double g_ewald_inv = 1.0 / g_ewald;
|
||||||
double const scale = 1.0;
|
double const scale = 1.0;
|
||||||
@ -106,10 +106,10 @@ void Slab2d::vector_corr(double *vec, int sensor_grpbit, int source_grpbit, bool
|
|||||||
std::vector<double> q_all = std::vector<double>(n_electrolyte);
|
std::vector<double> q_all = std::vector<double>(n_electrolyte);
|
||||||
std::vector<int> recvcounts = gather_recvcounts(n_electrolyte_local);
|
std::vector<int> recvcounts = gather_recvcounts(n_electrolyte_local);
|
||||||
std::vector<int> displs = gather_displs(recvcounts);
|
std::vector<int> displs = gather_displs(recvcounts);
|
||||||
MPI_Allgatherv(z_local.data(), n_electrolyte_local, MPI_DOUBLE, z_all.data(),
|
MPI_Allgatherv(z_local.data(), n_electrolyte_local, MPI_DOUBLE, z_all.data(), recvcounts.data(),
|
||||||
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
|
displs.data(), MPI_DOUBLE, world);
|
||||||
MPI_Allgatherv(q_local.data(), n_electrolyte_local, MPI_DOUBLE, q_all.data(),
|
MPI_Allgatherv(q_local.data(), n_electrolyte_local, MPI_DOUBLE, q_all.data(), recvcounts.data(),
|
||||||
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
|
displs.data(), MPI_DOUBLE, world);
|
||||||
double const g_ewald = force->kspace->g_ewald;
|
double const g_ewald = force->kspace->g_ewald;
|
||||||
double const area = domain->xprd * domain->yprd;
|
double const area = domain->xprd * domain->yprd;
|
||||||
double const prefac = 2 * MY_PIS / area;
|
double const prefac = 2 * MY_PIS / area;
|
||||||
@ -152,8 +152,8 @@ void Slab2d::matrix_corr(bigint *imat, double **matrix)
|
|||||||
std::vector<int> recvcounts = gather_recvcounts(ngrouplocal);
|
std::vector<int> recvcounts = gather_recvcounts(ngrouplocal);
|
||||||
std::vector<int> displs = gather_displs(recvcounts);
|
std::vector<int> displs = gather_displs(recvcounts);
|
||||||
std::vector<double> nprd_all = std::vector<double>(ngroup);
|
std::vector<double> nprd_all = std::vector<double>(ngroup);
|
||||||
MPI_Allgatherv(nprd_local.data(), ngrouplocal, MPI_DOUBLE, nprd_all.data(),
|
MPI_Allgatherv(nprd_local.data(), ngrouplocal, MPI_DOUBLE, nprd_all.data(), recvcounts.data(),
|
||||||
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
|
displs.data(), MPI_DOUBLE, world);
|
||||||
|
|
||||||
double const g_ewald = force->kspace->g_ewald;
|
double const g_ewald = force->kspace->g_ewald;
|
||||||
const double g_ewald_inv = 1.0 / g_ewald;
|
const double g_ewald_inv = 1.0 / g_ewald;
|
||||||
|
|||||||
@ -131,8 +131,8 @@ void SlabDipole::matrix_corr(bigint *imat, double **matrix)
|
|||||||
std::vector<int> recvcounts = gather_recvcounts(ngrouplocal);
|
std::vector<int> recvcounts = gather_recvcounts(ngrouplocal);
|
||||||
std::vector<int> displs = gather_displs(recvcounts);
|
std::vector<int> displs = gather_displs(recvcounts);
|
||||||
std::vector<double> nprd_all = std::vector<double>(ngroup);
|
std::vector<double> nprd_all = std::vector<double>(ngroup);
|
||||||
MPI_Allgatherv(nprd_local.data(), ngrouplocal, MPI_DOUBLE, nprd_all.data(),
|
MPI_Allgatherv(nprd_local.data(), ngrouplocal, MPI_DOUBLE, nprd_all.data(), recvcounts.data(),
|
||||||
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
|
displs.data(), MPI_DOUBLE, world);
|
||||||
|
|
||||||
std::vector<bigint> jmat = gather_jmat(imat);
|
std::vector<bigint> jmat = gather_jmat(imat);
|
||||||
const double prefac = MY_4PI / volume;
|
const double prefac = MY_4PI / volume;
|
||||||
|
|||||||
@ -142,10 +142,10 @@ void WireDipole::matrix_corr(bigint *imat, double **matrix)
|
|||||||
std::vector<int> displs = gather_displs(recvcounts);
|
std::vector<int> displs = gather_displs(recvcounts);
|
||||||
std::vector<double> xprd_all = std::vector<double>(ngroup);
|
std::vector<double> xprd_all = std::vector<double>(ngroup);
|
||||||
std::vector<double> yprd_all = std::vector<double>(ngroup);
|
std::vector<double> yprd_all = std::vector<double>(ngroup);
|
||||||
MPI_Allgatherv(xprd_local.data(), ngrouplocal, MPI_DOUBLE, xprd_all.data(),
|
MPI_Allgatherv(xprd_local.data(), ngrouplocal, MPI_DOUBLE, xprd_all.data(), recvcounts.data(),
|
||||||
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
|
displs.data(), MPI_DOUBLE, world);
|
||||||
MPI_Allgatherv(yprd_local.data(), ngrouplocal, MPI_DOUBLE, yprd_all.data(),
|
MPI_Allgatherv(yprd_local.data(), ngrouplocal, MPI_DOUBLE, yprd_all.data(), recvcounts.data(),
|
||||||
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
|
displs.data(), MPI_DOUBLE, world);
|
||||||
|
|
||||||
std::vector<bigint> jmat = gather_jmat(imat);
|
std::vector<bigint> jmat = gather_jmat(imat);
|
||||||
const double prefac = MY_2PI / volume;
|
const double prefac = MY_2PI / volume;
|
||||||
|
|||||||
Reference in New Issue
Block a user