update formatting in src folder with clang-format

This commit is contained in:
Axel Kohlmeyer
2021-08-23 20:46:09 -04:00
parent cb19806020
commit 8f71979ba1
8 changed files with 61 additions and 60 deletions

View File

@ -30,8 +30,8 @@ using namespace LAMMPS_NS;
ArgInfo::ArgInfo(const std::string &arg, int allowed) : type(NONE), dim(0), index1(-1), index2(-1)
{
if (((arg.size() > 3) && (arg[1] == '2') && (arg[2] == '_'))
|| ((arg.size() > 2) && (arg[1] == '_'))) {
if (((arg.size() > 3) && (arg[1] == '2') && (arg[2] == '_')) ||
((arg.size() > 2) && (arg[1] == '_'))) {
if ((arg[0] == 'c') && (allowed & COMPUTE))
type = COMPUTE;
else if ((arg[0] == 'f') && (allowed & FIX))

View File

@ -163,7 +163,7 @@ class Atom : protected Pointers {
// DIELECTRIC package
double *area,*ed,*em,*epsilon,*curvature,*q_unscaled;
double *area, *ed, *em, *epsilon, *curvature, *q_unscaled;
// end of customization section
// --------------------------------------------------------------------

View File

@ -129,7 +129,7 @@ class AtomVec : protected Pointers {
virtual void data_atom_bonus(int, char **) {}
virtual void data_body(int, int, int, int *, double *) {}
virtual void data_bonds_post(int, int , tagint, tagint, tagint) {}
virtual void data_bonds_post(int, int, tagint, tagint, tagint) {}
virtual void pack_data(double **);
virtual void write_data(FILE *, int, double **);

View File

@ -35,7 +35,7 @@ class ComputePropertyAtom : public Compute {
private:
int nvalues;
int nmax;
int *index,*colindex;
int *index, *colindex;
double *buf;
class AtomVecEllipsoid *avec_ellipsoid;
class AtomVecLine *avec_line;

View File

@ -38,62 +38,62 @@ class DumpCustom : public Dump {
int iregion; // -1 if no region, else which region
char *idregion; // region ID
int nthresh; // # of defined thresholds
int nthreshlast; // # of defined thresholds with value = LAST
int *thresh_array; // array to threshold on for each nthresh
int *thresh_op; // threshold operation for each nthresh
double *thresh_value; // threshold value for each nthresh
int *thresh_last; // for threshold value = LAST,
// index into thresh_fix
// -1 if not LAST, value is numeric
int nthresh; // # of defined thresholds
int nthreshlast; // # of defined thresholds with value = LAST
//
int *thresh_array; // array to threshold on for each nthresh
int *thresh_op; // threshold operation for each nthresh
double *thresh_value; // threshold value for each nthresh
int *thresh_last; // for threshold value = LAST,
// index into thresh_fix
// -1 if not LAST, value is numeric
//
class FixStore **thresh_fix; // stores values for each threshold LAST
char **thresh_fixID; // IDs of thresh_fixes
int *thresh_first; // 1 the first time a FixStore values accessed
int expand; // flag for whether field args were expanded
char **earg; // field names with wildcard expansion
int nargnew; // size of earg
int *vtype; // type of each vector (INT, DOUBLE)
char **vformat; // format string for each vector element
char *columns; // column labels
int expand; // flag for whether field args were expanded
char **earg; // field names with wildcard expansion
int nargnew; // size of earg
//
int *vtype; // type of each vector (INT, DOUBLE)
char **vformat; // format string for each vector element
//
char *columns; // column labels
//
int nchoose; // # of selected atoms
int maxlocal; // size of atom selection and variable arrays
int *choose; // local indices of selected atoms
double *dchoose; // value for each atom to threshold against
int *clist; // compressed list of indices of selected atoms
int nfield; // # of keywords listed by user
int ioptional; // index of start of optional args
int *field2index; // which compute,fix,variable,custom calcs this field
int *argindex; // index into compute,fix,custom per-atom data
// 0 for per-atom vector, 1-N for cols of per-atom array
int ncompute; // # of Computes accessed by dump
char **id_compute; // their IDs
class Compute **compute; // list of ptrs to the Computes
int nfix; // # of Fixes used by dump
char **id_fix; // their IDs
class Fix **fix; // list of ptrs to the Fixes
int nvariable; // # of Variables used by dump
char **id_variable; // their names
int *variable; // list of Variable indices in Variable class
double **vbuf; // local storage for variable evaluation
int ncustom; // # of Custom atom properties used by dump
char **id_custom; // their names
int *custom; // list of Custom indices in Atom class
int *custom_flag; // list of IVEC,DVEC,IARRAY,DARRAY styles
int ntypes; // # of atom types
char **typenames; // array of element names for each type
int nfield; // # of keywords listed by user
int ioptional; // index of start of optional args
//
int *field2index; // which compute,fix,variable,custom calcs this field
int *argindex; // index into compute,fix,custom per-atom data
// 0 for per-atom vector, 1-N for cols of per-atom array
//
int ncompute; // # of Computes accessed by dump
char **id_compute; // their IDs
class Compute **compute; // list of ptrs to the Computes
//
int nfix; // # of Fixes used by dump
char **id_fix; // their IDs
class Fix **fix; // list of ptrs to the Fixes
//
int nvariable; // # of Variables used by dump
char **id_variable; // their names
int *variable; // list of Variable indices in Variable class
double **vbuf; // local storage for variable evaluation
//
int ncustom; // # of Custom atom properties used by dump
char **id_custom; // their names
int *custom; // list of Custom indices in Atom class
int *custom_flag; // list of IVEC,DVEC,IARRAY,DARRAY styles
//
int ntypes; // # of atom types
char **typenames; // array of element names for each type
// private methods

View File

@ -52,14 +52,14 @@ class FixPropertyAtom : public Fix {
protected:
int nvalue, border;
int molecule_flag, q_flag, rmass_flag; // flags for specific fields
int *style; // style of each value, see enum
int *index; // indices into atom custom data structs
int *cols; // columns per value, for arrays
char *astyle; // atom style at instantiation
int molecule_flag, q_flag, rmass_flag; // flags for specific fields
int *style; // style of each value, see enum
int *index; // indices into atom custom data structs
int *cols; // columns per value, for arrays
char *astyle; // atom style at instantiation
int values_peratom; // # of values per atom, including multiple for arrays
int nmax_old; // length of peratom arrays the last time they grew
int values_peratom; // # of values per atom, including multiple for arrays
int nmax_old; // length of peratom arrays the last time they grew
};
} // namespace LAMMPS_NS

View File

@ -228,7 +228,8 @@ void lammps_decode_image_flags(int64_t image, int *flags);
#if defined(LAMMPS_BIGBIG)
typedef void (*FixExternalFnPtr)(void *, int64_t, int, int64_t *, double **, double **);
void lammps_set_fix_external_callback(void *handle, const char *id, FixExternalFnPtr funcptr, void *ptr);
void lammps_set_fix_external_callback(void *handle, const char *id, FixExternalFnPtr funcptr,
void *ptr);
#elif defined(LAMMPS_SMALLBIG)
typedef void (*FixExternalFnPtr)(void *, int64_t, int, int *, double **, double **);
void lammps_set_fix_external_callback(void *, const char *, FixExternalFnPtr, void *);

View File

@ -13,8 +13,8 @@
#include "lammps.h"
#include "input.h"
#include "accelerator_kokkos.h"
#include "input.h"
#if defined(LAMMPS_EXCEPTIONS)
#include "exceptions.h"
#endif