diff --git a/src/angle.h b/src/angle.h index 759f1a1aa9..58ca188df5 100644 --- a/src/angle.h +++ b/src/angle.h @@ -52,12 +52,12 @@ class Angle : protected Pointers { virtual void compute(int, int) = 0; virtual void settings(int, char **); virtual void coeff(int, char **) = 0; - virtual void init_style(){}; + virtual void init_style() {}; virtual double equilibrium_angle(int) = 0; virtual void write_restart(FILE *) = 0; virtual void read_restart(FILE *) = 0; - virtual void write_restart_settings(FILE *){}; - virtual void read_restart_settings(FILE *){}; + virtual void write_restart_settings(FILE *) {}; + virtual void read_restart_settings(FILE *) {}; virtual void write_data(FILE *) {} virtual double single(int, int, int, int) = 0; virtual void born_matrix(int /*atype*/, int /*at1*/, int /*at2*/, int /*at3*/, double &du, diff --git a/src/angle_write.h b/src/angle_write.h index 5c56cd8efc..7496aa31fc 100644 --- a/src/angle_write.h +++ b/src/angle_write.h @@ -26,7 +26,7 @@ namespace LAMMPS_NS { class AngleWrite : public Command { public: - AngleWrite(class LAMMPS *lmp) : Command(lmp){}; + AngleWrite(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **) override; }; } // namespace LAMMPS_NS diff --git a/src/bond.h b/src/bond.h index f52204662c..3b1740b2d4 100644 --- a/src/bond.h +++ b/src/bond.h @@ -61,8 +61,8 @@ class Bond : protected Pointers { virtual double equilibrium_distance(int) = 0; virtual void write_restart(FILE *) = 0; virtual void read_restart(FILE *) = 0; - virtual void write_restart_settings(FILE *){}; - virtual void read_restart_settings(FILE *){}; + virtual void write_restart_settings(FILE *) {}; + virtual void read_restart_settings(FILE *) {}; virtual void write_data(FILE *) {} virtual double single(int, double, int, int, double &) = 0; virtual double memory_usage(); diff --git a/src/comm_brick.h b/src/comm_brick.h index 518e290fa1..809b3856e4 100644 --- a/src/comm_brick.h +++ b/src/comm_brick.h @@ -44,7 +44,7 @@ class CommBrick : public Comm { void forward_comm(class Dump *) override; // forward comm from a Dump void reverse_comm(class Dump *) override; // reverse comm from a Dump - void forward_comm_array(int, double **) override; // forward comm of array + void forward_comm_array(int, double **) override; // forward comm of array void *extract(const char *, int &) override; double memory_usage() override; diff --git a/src/comm_tiled.h b/src/comm_tiled.h index 857cddf033..e150c710fc 100644 --- a/src/comm_tiled.h +++ b/src/comm_tiled.h @@ -44,7 +44,7 @@ class CommTiled : public Comm { void forward_comm(class Dump *) override; // forward comm from a Dump void reverse_comm(class Dump *) override; // reverse comm from a Dump - void forward_comm_array(int, double **) override; // forward comm of array + void forward_comm_array(int, double **) override; // forward comm of array void coord2proc_setup() override; int coord2proc(double *, int &, int &, int &) override; @@ -146,12 +146,12 @@ class CommTiled : public Comm { int point_drop_tiled_recurse(double *, int, int); int closer_subbox_edge(int, double *); - virtual void grow_send(int, int); // reallocate send buffer - virtual void grow_recv(int, int flag = 0); // free/allocate recv buffer - virtual void grow_list(int, int, int); // reallocate sendlist for one swap/proc - void allocate_swap(int); // allocate swap arrays - virtual void grow_swap_send(int, int, int); // grow swap arrays for send and recv - void grow_swap_send_multi(int, int); // grow multi swap arrays for send and recv + virtual void grow_send(int, int); // reallocate send buffer + virtual void grow_recv(int, int flag = 0); // free/allocate recv buffer + virtual void grow_list(int, int, int); // reallocate sendlist for one swap/proc + void allocate_swap(int); // allocate swap arrays + virtual void grow_swap_send(int, int, int); // grow swap arrays for send and recv + void grow_swap_send_multi(int, int); // grow multi swap arrays for send and recv void grow_swap_recv(int, int); void deallocate_swap(int); // deallocate swap arrays }; diff --git a/src/command.h b/src/command.h index 1b5cea5ccb..23f315fc27 100644 --- a/src/command.h +++ b/src/command.h @@ -20,7 +20,7 @@ namespace LAMMPS_NS { class Command : protected Pointers { public: - Command(class LAMMPS *lmp) : Pointers(lmp){}; + Command(class LAMMPS *lmp) : Pointers(lmp) {}; virtual void command(int, char **) = 0; }; diff --git a/src/compute.h b/src/compute.h index 50c69d8d01..0b077d7695 100644 --- a/src/compute.h +++ b/src/compute.h @@ -132,7 +132,7 @@ class Compute : protected Pointers { virtual int pack_reverse_comm(int, int, double *) { return 0; } virtual void unpack_reverse_comm(int, int *, double *) {} - virtual void reset_grid(){}; + virtual void reset_grid() {}; virtual int get_grid_by_name(const std::string &, int &) { return -1; }; virtual void *get_grid_by_index(int) { return nullptr; }; diff --git a/src/compute_chunk.h b/src/compute_chunk.h index 0c94f00bb0..a53cfa6746 100644 --- a/src/compute_chunk.h +++ b/src/compute_chunk.h @@ -43,7 +43,7 @@ class ComputeChunk : public Compute { int firstflag, massneed; ComputeChunkAtom *cchunk; - virtual void allocate(){}; + virtual void allocate() {}; }; } // namespace LAMMPS_NS #endif diff --git a/src/compute_dipole.h b/src/compute_dipole.h index c6ab891d6f..701c60ba06 100644 --- a/src/compute_dipole.h +++ b/src/compute_dipole.h @@ -28,7 +28,7 @@ class ComputeDipole : public Compute { public: ComputeDipole(class LAMMPS *, int, char **); ~ComputeDipole() override; - void init() override{}; + void init() override {}; void compute_vector() override; double compute_scalar() override; diff --git a/src/compute_global_atom.h b/src/compute_global_atom.h index 3a4808bddd..b8d49bf7a5 100644 --- a/src/compute_global_atom.h +++ b/src/compute_global_atom.h @@ -33,7 +33,7 @@ class ComputeGlobalAtom : public Compute { double memory_usage() override; protected: - struct value_t { + struct value_t { int which; int argindex; std::string id; diff --git a/src/deprecated.h b/src/deprecated.h index 085bf5d47d..acb22e9531 100644 --- a/src/deprecated.h +++ b/src/deprecated.h @@ -37,7 +37,7 @@ namespace LAMMPS_NS { class Deprecated : public Command { public: - Deprecated(class LAMMPS *lmp) : Command(lmp){}; + Deprecated(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **) override; }; diff --git a/src/dihedral.h b/src/dihedral.h index 34210929cd..03a5690a49 100644 --- a/src/dihedral.h +++ b/src/dihedral.h @@ -52,8 +52,8 @@ class Dihedral : protected Pointers { virtual void coeff(int, char **) = 0; virtual void write_restart(FILE *) = 0; virtual void read_restart(FILE *) = 0; - virtual void write_restart_settings(FILE *){}; - virtual void read_restart_settings(FILE *){}; + virtual void write_restart_settings(FILE *) {}; + virtual void read_restart_settings(FILE *) {}; virtual void write_data(FILE *) {} virtual double memory_usage(); virtual void born_matrix(int /*dtype*/, int /*at1*/, int /*at2*/, int /*at3*/, int /*at4*/, diff --git a/src/dihedral_write.h b/src/dihedral_write.h index b17f8d19da..aa4d264fe8 100644 --- a/src/dihedral_write.h +++ b/src/dihedral_write.h @@ -26,7 +26,7 @@ namespace LAMMPS_NS { class DihedralWrite : public Command { public: - DihedralWrite(class LAMMPS *lmp) : Command(lmp){}; + DihedralWrite(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **) override; }; } // namespace LAMMPS_NS diff --git a/src/domain.h b/src/domain.h index 170156664f..9c745f05b8 100644 --- a/src/domain.h +++ b/src/domain.h @@ -39,8 +39,8 @@ class Domain : protected Pointers { // 2 = shrink-wrap non-periodic // 3 = shrink-wrap non-per w/ min - int triclinic; // 0 = orthog box, 1 = triclinic (restricted or general) - int triclinic_general; // 1 if general <-> restricted tri mapping is stored, 0 if not + int triclinic; // 0 = orthog box, 1 = triclinic (restricted or general) + int triclinic_general; // 1 if general <-> restricted tri mapping is stored, 0 if not // orthogonal box @@ -91,9 +91,9 @@ class Domain : protected Pointers { // general triclinic box // boxlo = lower left corner - double avec[3], bvec[3], cvec[3]; // ABC edge vectors of general triclinic box - double rotate_g2r[3][3]; // rotation matrix from general --> restricted tri - double rotate_r2g[3][3]; // rotation matrix from restricted --> general tri + double avec[3], bvec[3], cvec[3]; // ABC edge vectors of general triclinic box + double rotate_g2r[3][3]; // rotation matrix from general --> restricted tri + double rotate_r2g[3][3]; // rotation matrix from restricted --> general tri // box flags @@ -145,9 +145,8 @@ class Domain : protected Pointers { int ownatom(int, double *, imageint *, int); void define_general_triclinic(double *, double *, double *, double *); - void general_to_restricted_rotation(double *, double *, double *, - double [3][3], - double *, double *, double *); + void general_to_restricted_rotation(double *, double *, double *, double[3][3], double *, + double *, double *); void general_to_restricted_coords(double *); void restricted_to_general_coords(double *); void restricted_to_general_coords(double *, double *); diff --git a/src/dump_atom.h b/src/dump_atom.h index 0b0d3a4f05..45bf8ae7a5 100644 --- a/src/dump_atom.h +++ b/src/dump_atom.h @@ -33,9 +33,9 @@ class DumpAtom : public Dump { const int ENDIAN = 0x0001; protected: - int scale_flag; // 1 if atom coords are scaled, 0 if no - int image_flag; // 1 if append box count to atom coords, 0 if no - int triclinic_general; // 1 if output box & coords for general triclinic, 0 if no + int scale_flag; // 1 if atom coords are scaled, 0 if no + int image_flag; // 1 if append box count to atom coords, 0 if no + int triclinic_general; // 1 if output box & coords for general triclinic, 0 if no std::string columns; // column labels diff --git a/src/dump_custom.h b/src/dump_custom.h index 6b4ca88b0b..c48d3d3189 100644 --- a/src/dump_custom.h +++ b/src/dump_custom.h @@ -34,9 +34,9 @@ class DumpCustom : public Dump { const int ENDIAN = 0x0001; protected: - int nevery; // dump frequency for output - char *idregion; // region ID, nullptr if no region - int triclinic_general; // 1 if output box & per-atom info for general triclinic + int nevery; // dump frequency for output + char *idregion; // region ID, nullptr if no region + int triclinic_general; // 1 if output box & per-atom info for general triclinic int nthresh; // # of defined thresholds int nthreshlast; // # of defined thresholds with value = LAST diff --git a/src/dump_image.h b/src/dump_image.h index efac5e97d3..074397f9b8 100644 --- a/src/dump_image.h +++ b/src/dump_image.h @@ -79,17 +79,17 @@ class DumpImage : public DumpCustom { double *diamtype, *diamelement, *bdiamtype; // per-type diameters double **colortype, **colorelement, **bcolortype; // per-type colors - int gridflag; // 0/1 for draw grid cells + int gridflag; // 0/1 for draw grid cells class Grid2d *grid2d; class Grid3d *grid3d; - char *id_grid_compute,*id_grid_fix; + char *id_grid_compute, *id_grid_fix; class Compute *grid_compute; class Fix *grid_fix; - int grid_igrid,grid_idata,grid_index; - int nxgrid,nygrid,nzgrid; - int nxlo_in,nxhi_in,nylo_in,nyhi_in,nzlo_in,nzhi_in; + int grid_igrid, grid_idata, grid_index; + int nxgrid, nygrid, nzgrid; + int nxlo_in, nxhi_in, nylo_in, nyhi_in, nzlo_in, nzhi_in; double *gbuf; - int ngrid,maxgrid; + int ngrid, maxgrid; double gcorners[8][3]; class AtomVecLine *avec_line; // ptrs to atom style (sub)classes @@ -98,10 +98,10 @@ class DumpImage : public DumpCustom { class Fix *fixptr; // ptr to Fix that provides image data - class Image *image; // class that renders each image + class Image *image; // class that renders each image - int *chooseghost; // extended choose array for comm - double **bufcopy; // buffer for communicating bond/atom info + int *chooseghost; // extended choose array for comm + double **bufcopy; // buffer for communicating bond/atom info int maxbufcopy; void init_style() override; diff --git a/src/fix_indent.h b/src/fix_indent.h index 37e1623df9..833f576b46 100644 --- a/src/fix_indent.h +++ b/src/fix_indent.h @@ -61,10 +61,10 @@ class FixIndent : public Fix { // methods for conical indenter bool PointInsideCone(int, double *, double, double, double, double, double *); - void DistanceExteriorPoint(int, double *, double, double, double, double, - double &, double &, double &); - void DistanceInteriorPoint(int, double *, double, double, double, double, - double &, double &, double &); + void DistanceExteriorPoint(int, double *, double, double, double, double, double &, double &, + double &); + void DistanceInteriorPoint(int, double *, double, double, double, double, double &, double &, + double &); void point_on_line_segment(double *, double *, double *, double *); double closest(double *, double *, double *, double); }; diff --git a/src/imbalance.h b/src/imbalance.h index 5ef19a5cfd..090ecc48d9 100644 --- a/src/imbalance.h +++ b/src/imbalance.h @@ -26,7 +26,7 @@ class Imbalance : protected Pointers { // parse options. return number of arguments consumed (required) virtual int options(int, char **) = 0; // reinitialize internal data (needed for fix balance) (optional) - virtual void init(int){}; + virtual void init(int) {}; // compute and apply weight factors to local atom array (required) virtual void compute(double *) = 0; // print information about the state of this imbalance compute (required) diff --git a/src/improper.h b/src/improper.h index 400e950967..f65ba3bdbc 100644 --- a/src/improper.h +++ b/src/improper.h @@ -37,10 +37,10 @@ class Improper : protected Pointers { // CENTROID_AVAIL = different and implemented // CENTROID_NOTAVAIL = different, not yet implemented - int symmatoms[4]; // symmetry atom(s) of improper style - // value of 0: interchangable atoms - // value of 1: central atom - // values >1: additional atoms of symmetry + int symmatoms[4]; // symmetry atom(s) of improper style + // value of 0: interchangable atoms + // value of 1: central atom + // values >1: additional atoms of symmetry // KOKKOS host/device flag and data masks @@ -57,8 +57,8 @@ class Improper : protected Pointers { virtual void coeff(int, char **) = 0; virtual void write_restart(FILE *) = 0; virtual void read_restart(FILE *) = 0; - virtual void write_restart_settings(FILE *){}; - virtual void read_restart_settings(FILE *){}; + virtual void write_restart_settings(FILE *) {}; + virtual void read_restart_settings(FILE *) {}; virtual void write_data(FILE *) {} virtual double memory_usage(); virtual void born_matrix(int /*dtype*/, int /*at1*/, int /*at2*/, int /*at3*/, int /*at4*/, diff --git a/src/kspace.h b/src/kspace.h index cc7d979d43..769749a0dc 100644 --- a/src/kspace.h +++ b/src/kspace.h @@ -112,17 +112,17 @@ class KSpace : protected Pointers { // general child-class methods - virtual void settings(int, char **){}; + virtual void settings(int, char **) {}; virtual void init() = 0; virtual void setup() = 0; - virtual void reset_grid(){}; + virtual void reset_grid() {}; virtual void compute(int, int) = 0; - virtual void compute_group_group(int, int, int){}; + virtual void compute_group_group(int, int, int) {}; - virtual void pack_forward_grid(int, void *, int, int *){}; - virtual void unpack_forward_grid(int, void *, int, int *){}; - virtual void pack_reverse_grid(int, void *, int, int *){}; - virtual void unpack_reverse_grid(int, void *, int, int *){}; + virtual void pack_forward_grid(int, void *, int, int *) {}; + virtual void unpack_forward_grid(int, void *, int, int *) {}; + virtual void pack_reverse_grid(int, void *, int, int *) {}; + virtual void unpack_reverse_grid(int, void *, int, int *) {}; virtual int timing(int, double &, double &) { return 0; } virtual int timing_1d(int, double &) { return 0; } diff --git a/src/lammps.h b/src/lammps.h index 1fdcb2e614..989adb2849 100644 --- a/src/lammps.h +++ b/src/lammps.h @@ -66,7 +66,7 @@ class LAMMPS { int suffix_enable; // 1 if suffixes are enabled, 0 if disabled int pair_only_flag; // 1 if only force field pair styles are accelerated, 0 if all const char *non_pair_suffix() const; - char *exename; // pointer to argv[0] + char *exename; // pointer to argv[0] char ***packargs; // arguments for cmdline package commands int num_package; // number of cmdline package commands @@ -103,9 +103,9 @@ class LAMMPS { void init_pkg_lists(); void help(); /// Default constructor. Declared private to prohibit its use - LAMMPS(){}; + LAMMPS() {}; /// Copy constructor. Declared private to prohibit its use - LAMMPS(const LAMMPS &){}; + LAMMPS(const LAMMPS &) {}; }; } // namespace LAMMPS_NS diff --git a/src/region_plane.h b/src/region_plane.h index 0e4ecda6d4..790564e176 100644 --- a/src/region_plane.h +++ b/src/region_plane.h @@ -44,7 +44,6 @@ class RegPlane : public Region { char *xstr, *ystr, *zstr; void variable_check(); - }; } // namespace LAMMPS_NS diff --git a/src/set.h b/src/set.h index b00dfb9854..e2be5d5c1e 100644 --- a/src/set.h +++ b/src/set.h @@ -26,7 +26,7 @@ namespace LAMMPS_NS { class Set : public Command { public: - Set(class LAMMPS *lmp) : Command(lmp){}; + Set(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **) override; private: diff --git a/src/utils.h b/src/utils.h index ebf1709505..87a8809c4c 100644 --- a/src/utils.h +++ b/src/utils.h @@ -409,7 +409,8 @@ This functions adds the following case to :cpp:func:`utils::bounds()