diff --git a/src/GRANULAR/Install.csh b/src/GRANULAR/Install.csh index 9393358d43..2b9b9383ee 100644 --- a/src/GRANULAR/Install.csh +++ b/src/GRANULAR/Install.csh @@ -8,17 +8,17 @@ if ($1 == 1) then cp fix_freeze.cpp .. cp fix_pour.cpp .. cp fix_wall_gran.cpp .. - cp pair_gran_hertzian.cpp .. - cp pair_gran_history.cpp .. - cp pair_gran_no_history.cpp .. + cp pair_gran_hertz_history.cpp .. + cp pair_gran_hooke.cpp .. + cp pair_gran_hooke_history.cpp .. cp atom_vec_granular.h .. cp fix_freeze.h .. cp fix_pour.h .. cp fix_wall_gran.h .. - cp pair_gran_hertzian.h .. - cp pair_gran_history.h .. - cp pair_gran_no_history.h .. + cp pair_gran_hertz_history.h .. + cp pair_gran_hooke.h .. + cp pair_gran_hooke_history.h .. else if ($1 == 0) then @@ -29,16 +29,16 @@ else if ($1 == 0) then rm ../fix_freeze.cpp rm ../fix_pour.cpp rm ../fix_wall_gran.cpp - rm ../pair_gran_hertzian.cpp - rm ../pair_gran_history.cpp - rm ../pair_gran_no_history.cpp + rm ../pair_gran_hertz_history.cpp + rm ../pair_gran_hooke.cpp + rm ../pair_gran_hooke_history.cpp rm ../atom_vec_granular.h rm ../fix_freeze.h rm ../fix_pour.h rm ../fix_wall_gran.h - rm ../pair_gran_hertzian.h - rm ../pair_gran_history.h - rm ../pair_gran_no_history.h + rm ../pair_gran_hertz_history.h + rm ../pair_gran_hooke.h + rm ../pair_gran_hooke_history.h endif diff --git a/src/GRANULAR/pair_gran_hertzian.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp similarity index 97% rename from src/GRANULAR/pair_gran_hertzian.cpp rename to src/GRANULAR/pair_gran_hertz_history.cpp index 94597fc512..d806c61723 100644 --- a/src/GRANULAR/pair_gran_hertzian.cpp +++ b/src/GRANULAR/pair_gran_hertz_history.cpp @@ -18,7 +18,7 @@ #include "math.h" #include "stdio.h" #include "string.h" -#include "pair_gran_hertzian.h" +#include "pair_gran_hertz_history.h" #include "atom.h" #include "force.h" #include "neigh_list.h" @@ -30,7 +30,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -PairGranHertzian::PairGranHertzian(LAMMPS *lmp) : PairGranHistory(lmp) +PairGranHertzHistory::PairGranHertzHistory(LAMMPS *lmp) : PairGranHistory(lmp) { no_virial_compute = 1; history = 1; @@ -38,7 +38,7 @@ PairGranHertzian::PairGranHertzian(LAMMPS *lmp) : PairGranHistory(lmp) /* ---------------------------------------------------------------------- */ -void PairGranHertzian::compute(int eflag, int vflag) +void PairGranHertzHistory::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum; double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz; diff --git a/src/GRANULAR/pair_gran_no_history.h b/src/GRANULAR/pair_gran_hertz_history.h similarity index 77% rename from src/GRANULAR/pair_gran_no_history.h rename to src/GRANULAR/pair_gran_hertz_history.h index 613200448e..08f388f5fd 100644 --- a/src/GRANULAR/pair_gran_no_history.h +++ b/src/GRANULAR/pair_gran_hertz_history.h @@ -11,16 +11,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef PAIR_GRAN_NO_HISTORY_H -#define PAIR_GRAN_NO_HISTORY_H +#ifndef PAIR_GRAN_HERTZ_HISTORY_H +#define PAIR_GRAN_HERTZ_HISTORY_H -#include "pair_gran_history.h" +#include "pair_gran_hooke_history.h" namespace LAMMPS_NS { -class PairGranNoHistory : public PairGranHistory { +class PairGranHertzHistory : public PairGranHookeHistory { public: - PairGranNoHistory(class LAMMPS *); + PairGranHertzHistory(class LAMMPS *); void compute(int, int); }; diff --git a/src/GRANULAR/pair_gran_no_history.cpp b/src/GRANULAR/pair_gran_hooke.cpp similarity index 96% rename from src/GRANULAR/pair_gran_no_history.cpp rename to src/GRANULAR/pair_gran_hooke.cpp index dbeedcf045..243b7f712a 100644 --- a/src/GRANULAR/pair_gran_no_history.cpp +++ b/src/GRANULAR/pair_gran_hooke.cpp @@ -18,7 +18,7 @@ #include "math.h" #include "stdio.h" #include "string.h" -#include "pair_gran_no_history.h" +#include "pair_gran_hooke.h" #include "atom.h" #include "force.h" #include "neigh_list.h" @@ -30,14 +30,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -PairGranNoHistory::PairGranNoHistory(LAMMPS *lmp) : PairGranHistory(lmp) +PairGranHooke::PairGranHooke(LAMMPS *lmp) : PairGranHistory(lmp) { history = 0; } /* ---------------------------------------------------------------------- */ -void PairGranNoHistory::compute(int eflag, int vflag) +void PairGranHooke::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum; double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz; diff --git a/src/GRANULAR/pair_gran_hertzian.h b/src/GRANULAR/pair_gran_hooke.h similarity index 80% rename from src/GRANULAR/pair_gran_hertzian.h rename to src/GRANULAR/pair_gran_hooke.h index 5dd1a4b7dc..6a2c083915 100644 --- a/src/GRANULAR/pair_gran_hertzian.h +++ b/src/GRANULAR/pair_gran_hooke.h @@ -11,16 +11,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef PAIR_GRAN_HERTZIAN_H -#define PAIR_GRAN_HERTZIAN_H +#ifndef PAIR_GRAN_HOOKE_H +#define PAIR_GRAN_HOOKE_H -#include "pair_gran_history.h" +#include "pair_gran_hooke_history.h" namespace LAMMPS_NS { -class PairGranHertzian : public PairGranHistory { +class PairGranHooke : public PairGranHookeHistory { public: - PairGranHertzian(class LAMMPS *); + PairGranHooke(class LAMMPS *); void compute(int, int); }; diff --git a/src/GRANULAR/pair_gran_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp similarity index 93% rename from src/GRANULAR/pair_gran_history.cpp rename to src/GRANULAR/pair_gran_hooke_history.cpp index d014469e35..0a38177874 100644 --- a/src/GRANULAR/pair_gran_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -19,7 +19,7 @@ #include "stdio.h" #include "stdlib.h" #include "string.h" -#include "pair_gran_history.h" +#include "pair_gran_hooke_history.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" @@ -43,7 +43,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -PairGranHistory::PairGranHistory(LAMMPS *lmp) : Pair(lmp) +PairGranHookeHistory::PairGranHookeHistory(LAMMPS *lmp) : Pair(lmp) { single_enable = 0; no_virial_compute = 1; @@ -53,7 +53,7 @@ PairGranHistory::PairGranHistory(LAMMPS *lmp) : Pair(lmp) /* ---------------------------------------------------------------------- */ -PairGranHistory::~PairGranHistory() +PairGranHookeHistory::~PairGranHookeHistory() { if (fix_history) modify->delete_fix("SHEAR_HISTORY"); @@ -65,7 +65,7 @@ PairGranHistory::~PairGranHistory() /* ---------------------------------------------------------------------- */ -void PairGranHistory::compute(int eflag, int vflag) +void PairGranHookeHistory::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum; double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz; @@ -262,7 +262,7 @@ void PairGranHistory::compute(int eflag, int vflag) allocate all arrays ------------------------------------------------------------------------- */ -void PairGranHistory::allocate() +void PairGranHookeHistory::allocate() { allocated = 1; int n = atom->ntypes; @@ -279,7 +279,7 @@ void PairGranHistory::allocate() global settings ------------------------------------------------------------------------- */ -void PairGranHistory::settings(int narg, char **arg) +void PairGranHookeHistory::settings(int narg, char **arg) { if (narg != 4) error->all("Illegal pair_style command"); @@ -293,7 +293,7 @@ void PairGranHistory::settings(int narg, char **arg) set coeffs for one or more type pairs ------------------------------------------------------------------------- */ -void PairGranHistory::coeff(int narg, char **arg) +void PairGranHookeHistory::coeff(int narg, char **arg) { if (narg > 2) error->all("Incorrect args for pair coefficients"); if (!allocated) allocate(); @@ -317,7 +317,7 @@ void PairGranHistory::coeff(int narg, char **arg) init specific to this pair style ------------------------------------------------------------------------- */ -void PairGranHistory::init_style() +void PairGranHookeHistory::init_style() { int i; @@ -349,7 +349,7 @@ void PairGranHistory::init_style() // if first init, create Fix needed for storing shear history if (history && force->newton_pair == 1) - error->all("Potential with shear history requires newton pair off"); + error->all("Pair granular with shear history requires newton pair off"); if (history && fix_history == NULL) { char **fixarg = new char*[3]; @@ -408,7 +408,7 @@ void PairGranHistory::init_style() optional granular history list ------------------------------------------------------------------------- */ -void PairGranHistory::init_list(int id, NeighList *ptr) +void PairGranHookeHistory::init_list(int id, NeighList *ptr) { if (id == 0) list = ptr; else if (id == 1) listgranhistory = ptr; @@ -418,7 +418,7 @@ void PairGranHistory::init_list(int id, NeighList *ptr) init for one type pair i,j and corresponding j,i ------------------------------------------------------------------------- */ -double PairGranHistory::init_one(int i, int j) +double PairGranHookeHistory::init_one(int i, int j) { if (!allocated) allocate(); @@ -445,7 +445,7 @@ double PairGranHistory::init_one(int i, int j) proc 0 writes to restart file ------------------------------------------------------------------------- */ -void PairGranHistory::write_restart(FILE *fp) +void PairGranHookeHistory::write_restart(FILE *fp) { write_restart_settings(fp); } @@ -454,7 +454,7 @@ void PairGranHistory::write_restart(FILE *fp) proc 0 reads from restart file, bcasts ------------------------------------------------------------------------- */ -void PairGranHistory::read_restart(FILE *fp) +void PairGranHookeHistory::read_restart(FILE *fp) { read_restart_settings(fp); allocate(); @@ -464,7 +464,7 @@ void PairGranHistory::read_restart(FILE *fp) proc 0 writes to restart file ------------------------------------------------------------------------- */ -void PairGranHistory::write_restart_settings(FILE *fp) +void PairGranHookeHistory::write_restart_settings(FILE *fp) { fwrite(&xkk,sizeof(double),1,fp); fwrite(&gamman,sizeof(double),1,fp); @@ -476,7 +476,7 @@ void PairGranHistory::write_restart_settings(FILE *fp) proc 0 reads from restart file, bcasts ------------------------------------------------------------------------- */ -void PairGranHistory::read_restart_settings(FILE *fp) +void PairGranHookeHistory::read_restart_settings(FILE *fp) { if (comm->me == 0) { fread(&xkk,sizeof(double),1,fp); @@ -492,7 +492,7 @@ void PairGranHistory::read_restart_settings(FILE *fp) /* ---------------------------------------------------------------------- */ -void *PairGranHistory::extract(char *str) +void *PairGranHookeHistory::extract(char *str) { if (strcmp(str,"xkk") == 0) return (void *) &xkk; else if (strcmp(str,"gamman") == 0) return (void *) &gamman; @@ -503,7 +503,7 @@ void *PairGranHistory::extract(char *str) /* ---------------------------------------------------------------------- */ -void PairGranHistory::reset_dt() +void PairGranHookeHistory::reset_dt() { dt = update->dt; } diff --git a/src/GRANULAR/pair_gran_history.h b/src/GRANULAR/pair_gran_hooke_history.h similarity index 87% rename from src/GRANULAR/pair_gran_history.h rename to src/GRANULAR/pair_gran_hooke_history.h index cccbc161ce..f340575bda 100644 --- a/src/GRANULAR/pair_gran_history.h +++ b/src/GRANULAR/pair_gran_hooke_history.h @@ -11,17 +11,17 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef PAIR_GRAN_HISTORY_H -#define PAIR_GRAN_HISTORY_H +#ifndef PAIR_GRAN_HOOKE_HISTORY_H +#define PAIR_GRAN_HOOKE_HISTORY_H #include "pair.h" namespace LAMMPS_NS { -class PairGranHistory : public Pair { +class PairGranHookeHistory : public Pair { public: - PairGranHistory(class LAMMPS *); - ~PairGranHistory(); + PairGranHookeHistory(class LAMMPS *); + ~PairGranHookeHistory(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); diff --git a/src/GRANULAR/style_granular.h b/src/GRANULAR/style_granular.h index 4681b8da9f..e219d61ef3 100644 --- a/src/GRANULAR/style_granular.h +++ b/src/GRANULAR/style_granular.h @@ -34,13 +34,13 @@ FixStyle(wall/gran,FixWallGran) #endif #ifdef PairInclude -#include "pair_gran_hertzian.h" -#include "pair_gran_history.h" -#include "pair_gran_no_history.h" +#include "pair_gran_hertz_history.h" +#include "pair_gran_hooke.h" +#include "pair_gran_hooke_history.h" #endif #ifdef PairClass -PairStyle(gran/hertzian,PairGranHertzian) -PairStyle(gran/history,PairGranHistory) -PairStyle(gran/no_history,PairGranNoHistory) +PairStyle(gran/hertz/history,PairGranHertzHistory) +PairStyle(gran/hooke,PairGranHooke) +PairStyle(gran/hooke/history,PairGranHookeHistory) #endif