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

@ -40,14 +40,14 @@ class DumpCustom : public Dump {
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
@ -55,12 +55,12 @@ class DumpCustom : public Dump {
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
@ -69,29 +69,29 @@ class DumpCustom : public Dump {
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

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