apply clang-format

This commit is contained in:
Axel Kohlmeyer
2024-10-05 21:55:24 -04:00
parent 45440abca4
commit e142ad8dfa
7 changed files with 26 additions and 26 deletions

View File

@ -69,7 +69,7 @@ std::vector<bigint> BoundaryCorrection::gather_jmat(bigint *imat)
std::vector<bigint> jmat = std::vector<bigint>(ngroup);
std::vector<int> recvcounts = gather_recvcounts(ngrouplocal);
std::vector<int> displs = gather_displs(recvcounts);
MPI_Allgatherv(jmat_local.data(), ngrouplocal, MPI_LMP_BIGINT, jmat.data(),
recvcounts.data(), displs.data(), MPI_LMP_BIGINT, world);
MPI_Allgatherv(jmat_local.data(), ngrouplocal, MPI_LMP_BIGINT, jmat.data(), recvcounts.data(),
displs.data(), MPI_LMP_BIGINT, world);
return jmat;
}

View File

@ -25,9 +25,9 @@ namespace LAMMPS_NS {
class BoundaryCorrection : protected Pointers {
public:
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 vector_corr(double *, int, int, bool) {};
virtual void matrix_corr(bigint *, double **) {};
virtual void compute_corr(double, int, int, double &, double *) {};
protected:
double get_volume();

View File

@ -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);
displs[0] = 0;
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_LMP_BIGINT, world);
MPI_Allgatherv(jmat_local, ngrouplocal, MPI_LMP_BIGINT, jmat, recvcounts, displs, MPI_LMP_BIGINT,
world);
memory->destroy(displs);
memory->destroy(recvcounts);

View File

@ -72,7 +72,7 @@ class FixElectrodeConp : public Fix {
enum class Algo { MATRIX_INV, MATRIX_CG, CG };
enum class VarStyle { CONST, EQUAL, UNSET };
virtual void update_psi();
virtual void pre_update(){};
virtual void pre_update() {};
virtual void recompute_potential(std::vector<double>, std::vector<double>){};
virtual std::vector<double> constraint_projection(std::vector<double>);
virtual std::vector<double> constraint_correction(std::vector<double>);

View File

@ -32,7 +32,7 @@ using namespace MathConst;
Slab-geometry correction term (k=0) of EW2D. See Hu, JCTC 10:12 (2014)
pp. 5254-5264 or metalwalls ewald and parallelization documentation.
------------------------------------------------------------------------- */
Slab2d::Slab2d(LAMMPS *lmp) : BoundaryCorrection(lmp){};
Slab2d::Slab2d(LAMMPS *lmp) : BoundaryCorrection(lmp) {};
void Slab2d::compute_corr(double /*qsum*/, int eflag_atom, int eflag_global, double &energy,
double *eatom)
@ -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<int> recvcounts = gather_recvcounts(nlocal);
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_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;
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<int> recvcounts = gather_recvcounts(n_electrolyte_local);
std::vector<int> displs = gather_displs(recvcounts);
MPI_Allgatherv(z_local.data(), n_electrolyte_local, MPI_DOUBLE, z_all.data(),
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
MPI_Allgatherv(q_local.data(), n_electrolyte_local, MPI_DOUBLE, q_all.data(),
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
MPI_Allgatherv(z_local.data(), n_electrolyte_local, MPI_DOUBLE, z_all.data(), recvcounts.data(),
displs.data(), MPI_DOUBLE, world);
MPI_Allgatherv(q_local.data(), n_electrolyte_local, MPI_DOUBLE, q_all.data(), recvcounts.data(),
displs.data(), MPI_DOUBLE, world);
double const g_ewald = force->kspace->g_ewald;
double const area = domain->xprd * domain->yprd;
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> displs = gather_displs(recvcounts);
std::vector<double> nprd_all = std::vector<double>(ngroup);
MPI_Allgatherv(nprd_local.data(), ngrouplocal, MPI_DOUBLE, nprd_all.data(),
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
MPI_Allgatherv(nprd_local.data(), ngrouplocal, MPI_DOUBLE, nprd_all.data(), recvcounts.data(),
displs.data(), MPI_DOUBLE, world);
double const g_ewald = force->kspace->g_ewald;
const double g_ewald_inv = 1.0 / g_ewald;

View File

@ -38,7 +38,7 @@ static constexpr double SMALL = 0.00001;
extended to non-neutral systems (J. Chem. Phys. 131, 094107).
-------------------------------------------------------------------------
*/
SlabDipole::SlabDipole(LAMMPS *lmp) : BoundaryCorrection(lmp){};
SlabDipole::SlabDipole(LAMMPS *lmp) : BoundaryCorrection(lmp) {};
void SlabDipole::compute_corr(double qsum, int eflag_atom, int eflag_global, double &energy,
double *eatom)
@ -131,8 +131,8 @@ void SlabDipole::matrix_corr(bigint *imat, double **matrix)
std::vector<int> recvcounts = gather_recvcounts(ngrouplocal);
std::vector<int> displs = gather_displs(recvcounts);
std::vector<double> nprd_all = std::vector<double>(ngroup);
MPI_Allgatherv(nprd_local.data(), ngrouplocal, MPI_DOUBLE, nprd_all.data(),
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
MPI_Allgatherv(nprd_local.data(), ngrouplocal, MPI_DOUBLE, nprd_all.data(), recvcounts.data(),
displs.data(), MPI_DOUBLE, world);
std::vector<bigint> jmat = gather_jmat(imat);
const double prefac = MY_4PI / volume;

View File

@ -32,7 +32,7 @@ using namespace MathConst;
704, 101). x and y are non-periodic.
-------------------------------------------------------------------------
*/
WireDipole::WireDipole(LAMMPS *lmp) : BoundaryCorrection(lmp){};
WireDipole::WireDipole(LAMMPS *lmp) : BoundaryCorrection(lmp) {};
void WireDipole::compute_corr(double /*qsum*/, int eflag_atom, int eflag_global, double &energy,
double *eatom)
@ -142,10 +142,10 @@ void WireDipole::matrix_corr(bigint *imat, double **matrix)
std::vector<int> displs = gather_displs(recvcounts);
std::vector<double> xprd_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(),
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
MPI_Allgatherv(yprd_local.data(), ngrouplocal, MPI_DOUBLE, yprd_all.data(),
recvcounts.data(), displs.data(), MPI_DOUBLE, world);
MPI_Allgatherv(xprd_local.data(), ngrouplocal, MPI_DOUBLE, xprd_all.data(), recvcounts.data(),
displs.data(), MPI_DOUBLE, world);
MPI_Allgatherv(yprd_local.data(), ngrouplocal, MPI_DOUBLE, yprd_all.data(), recvcounts.data(),
displs.data(), MPI_DOUBLE, world);
std::vector<bigint> jmat = gather_jmat(imat);
const double prefac = MY_2PI / volume;