From b53822da467caed956bb205562abe74bd407374b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 13 Apr 2021 17:47:00 -0400 Subject: [PATCH] provide Command base class in command.h for deriving command styles from --- examples/plugins/helloplugin.cpp | 6 +- src/KIM/kim_command.h | 6 +- src/MESSAGE/message.h | 6 +- src/MESSAGE/server.h | 6 +- src/PLUGIN/plugin.cpp | 2 +- src/PLUGIN/plugin.h | 4 +- src/REPLICA/hyper.cpp | 2 +- src/REPLICA/hyper.h | 4 +- src/REPLICA/neb.cpp | 4 +- src/REPLICA/neb.h | 4 +- src/REPLICA/prd.cpp | 2 +- src/REPLICA/prd.h | 4 +- src/REPLICA/tad.cpp | 2 +- src/REPLICA/tad.h | 4 +- src/REPLICA/temper.cpp | 2 +- src/REPLICA/temper.h | 4 +- src/SPIN/neb_spin.cpp | 2 +- src/SPIN/neb_spin.h | 4 +- src/USER-COLVARS/group_ndx.h | 6 +- src/USER-COLVARS/ndx_group.h | 6 +- src/USER-MISC/temper_grem.cpp | 2 +- src/USER-MISC/temper_grem.h | 4 +- src/USER-MISC/temper_npt.cpp | 2 +- src/USER-MISC/temper_npt.h | 4 +- src/USER-PHONON/dynamical_matrix.cpp | 2 +- src/USER-PHONON/dynamical_matrix.h | 86 ++++++++++++++-------------- src/USER-PHONON/third_order.cpp | 2 +- src/USER-PHONON/third_order.h | 4 +- src/balance.cpp | 2 +- src/balance.h | 4 +- src/change_box.cpp | 2 +- src/change_box.h | 4 +- src/command.h | 29 ++++++++++ src/create_atoms.cpp | 2 +- src/create_atoms.h | 4 +- src/create_bonds.cpp | 2 +- src/create_bonds.h | 4 +- src/create_box.cpp | 12 ++-- src/create_box.h | 4 +- src/delete_atoms.cpp | 2 +- src/delete_atoms.h | 4 +- src/delete_bonds.cpp | 2 +- src/delete_bonds.h | 4 +- src/deprecated.h | 6 +- src/displace_atoms.cpp | 2 +- src/displace_atoms.h | 4 +- src/info.h | 6 +- src/minimize.cpp | 2 +- src/minimize.h | 4 +- src/read_data.cpp | 6 +- src/read_data.h | 4 +- src/read_dump.cpp | 6 +- src/read_dump.h | 4 +- src/read_restart.cpp | 2 +- src/read_restart.h | 4 +- src/replicate.cpp | 2 +- src/replicate.h | 4 +- src/rerun.cpp | 2 +- src/rerun.h | 4 +- src/reset_atom_ids.cpp | 2 +- src/reset_atom_ids.h | 4 +- src/reset_mol_ids.cpp | 2 +- src/reset_mol_ids.h | 4 +- src/run.cpp | 2 +- src/run.h | 4 +- src/set.h | 6 +- src/velocity.cpp | 2 +- src/velocity.h | 4 +- src/write_coeff.h | 6 +- src/write_data.cpp | 2 +- src/write_data.h | 4 +- src/write_dump.h | 6 +- src/write_restart.cpp | 2 +- src/write_restart.h | 4 +- 74 files changed, 203 insertions(+), 180 deletions(-) create mode 100644 src/command.h diff --git a/examples/plugins/helloplugin.cpp b/examples/plugins/helloplugin.cpp index 11f2cfb891..f453add374 100644 --- a/examples/plugins/helloplugin.cpp +++ b/examples/plugins/helloplugin.cpp @@ -2,16 +2,16 @@ #include "lammpsplugin.h" #include "comm.h" +#include "command.h" #include "error.h" -#include "pointers.h" #include "version.h" #include namespace LAMMPS_NS { - class Hello : protected Pointers { + class Hello : protected Command { public: - Hello(class LAMMPS *lmp) : Pointers(lmp) {}; + Hello(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); }; } diff --git a/src/KIM/kim_command.h b/src/KIM/kim_command.h index f327e4f2f3..64abeed9e0 100644 --- a/src/KIM/kim_command.h +++ b/src/KIM/kim_command.h @@ -62,13 +62,13 @@ CommandStyle(kim,KimCommand) #ifndef LMP_KIM_COMMAND_H #define LMP_KIM_COMMAND_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class KimCommand : protected Pointers { +class KimCommand : protected Command { public: - KimCommand(class LAMMPS *lmp) : Pointers(lmp) {}; + KimCommand(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); }; diff --git a/src/MESSAGE/message.h b/src/MESSAGE/message.h index f8b2d47a21..c499ff6537 100644 --- a/src/MESSAGE/message.h +++ b/src/MESSAGE/message.h @@ -20,13 +20,13 @@ CommandStyle(message,Message) #ifndef LMP_MESSAGE_H #define LMP_MESSAGE_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Message : protected Pointers { +class Message : protected Command { public: - Message(class LAMMPS *lmp) : Pointers(lmp) {}; + Message(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); private: diff --git a/src/MESSAGE/server.h b/src/MESSAGE/server.h index 579f6ab6f1..63191ccf33 100644 --- a/src/MESSAGE/server.h +++ b/src/MESSAGE/server.h @@ -20,13 +20,13 @@ CommandStyle(server,Server) #ifndef LMP_SERVER_H #define LMP_SERVER_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Server : protected Pointers { +class Server : protected Command { public: - Server(class LAMMPS *lmp) : Pointers(lmp) {}; + Server(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); }; diff --git a/src/PLUGIN/plugin.cpp b/src/PLUGIN/plugin.cpp index b52e1a1959..a2f74060f1 100644 --- a/src/PLUGIN/plugin.cpp +++ b/src/PLUGIN/plugin.cpp @@ -41,7 +41,7 @@ namespace LAMMPS_NS /* ---------------------------------------------------------------------- */ - Plugin::Plugin(LAMMPS *lmp) : Pointers(lmp) {} + Plugin::Plugin(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/PLUGIN/plugin.h b/src/PLUGIN/plugin.h index 946b08db1a..61355f4113 100644 --- a/src/PLUGIN/plugin.h +++ b/src/PLUGIN/plugin.h @@ -21,12 +21,12 @@ CommandStyle(plugin,Plugin) #define LMP_PLUGIN_H #include "lammpsplugin.h" -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { - class Plugin : protected Pointers { + class Plugin : protected Command { public: Plugin(class LAMMPS *); void command(int, char **); diff --git a/src/REPLICA/hyper.cpp b/src/REPLICA/hyper.cpp index 5a9cf8520e..8eb1c143e9 100644 --- a/src/REPLICA/hyper.cpp +++ b/src/REPLICA/hyper.cpp @@ -38,7 +38,7 @@ enum{NOHYPER,GLOBAL,LOCAL}; /* ---------------------------------------------------------------------- */ -Hyper::Hyper(LAMMPS *lmp) : Pointers(lmp), dumplist(nullptr) {} +Hyper::Hyper(LAMMPS *lmp) : Command(lmp), dumplist(nullptr) {} /* ---------------------------------------------------------------------- perform hyperdynamics simulation diff --git a/src/REPLICA/hyper.h b/src/REPLICA/hyper.h index 1b05172bcf..faad58994b 100644 --- a/src/REPLICA/hyper.h +++ b/src/REPLICA/hyper.h @@ -20,11 +20,11 @@ CommandStyle(hyper,Hyper) #ifndef LMP_HYPER_H #define LMP_HYPER_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Hyper : protected Pointers { +class Hyper : protected Command { public: Hyper(class LAMMPS *); ~Hyper() {} diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index a6a70fde38..7183bdd168 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -42,7 +42,7 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -NEB::NEB(LAMMPS *lmp) : Pointers(lmp), all(nullptr), rdist(nullptr) {} +NEB::NEB(LAMMPS *lmp) : Command(lmp), all(nullptr), rdist(nullptr) {} /* ---------------------------------------------------------------------- internal NEB constructor, called from TAD @@ -50,7 +50,7 @@ NEB::NEB(LAMMPS *lmp) : Pointers(lmp), all(nullptr), rdist(nullptr) {} NEB::NEB(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, int n2steps_in, int nevery_in, double *buf_init, double *buf_final) - : Pointers(lmp), all(nullptr), rdist(nullptr) + : Command(lmp), all(nullptr), rdist(nullptr) { double delx,dely,delz; diff --git a/src/REPLICA/neb.h b/src/REPLICA/neb.h index b53992711c..d8a9d5d3e4 100644 --- a/src/REPLICA/neb.h +++ b/src/REPLICA/neb.h @@ -20,11 +20,11 @@ CommandStyle(neb,NEB) #ifndef LMP_NEB_H #define LMP_NEB_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class NEB : protected Pointers { +class NEB : protected Command { public: NEB(class LAMMPS *); NEB(class LAMMPS *, double, double, int, int, int, double *, double *); diff --git a/src/REPLICA/prd.cpp b/src/REPLICA/prd.cpp index 40e5fc8833..2ba0340109 100644 --- a/src/REPLICA/prd.cpp +++ b/src/REPLICA/prd.cpp @@ -46,7 +46,7 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; /* ---------------------------------------------------------------------- */ -PRD::PRD(LAMMPS *lmp) : Pointers(lmp) {} +PRD::PRD(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- perform PRD simulation on one or more replicas diff --git a/src/REPLICA/prd.h b/src/REPLICA/prd.h index 3539987093..b331f7dc02 100644 --- a/src/REPLICA/prd.h +++ b/src/REPLICA/prd.h @@ -20,11 +20,11 @@ CommandStyle(prd,PRD) #ifndef LMP_PRD_H #define LMP_PRD_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class PRD : protected Pointers { +class PRD : protected Command { public: PRD(class LAMMPS *); ~PRD() {} diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index 0bab7a31c8..a849e7a242 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -43,7 +43,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -TAD::TAD(LAMMPS *lmp) : Pointers(lmp) {} +TAD::TAD(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/REPLICA/tad.h b/src/REPLICA/tad.h index d44b226643..3a525146a6 100644 --- a/src/REPLICA/tad.h +++ b/src/REPLICA/tad.h @@ -20,11 +20,11 @@ CommandStyle(tad,TAD) #ifndef LMP_TAD_H #define LMP_TAD_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class TAD : protected Pointers { +class TAD : protected Command { public: TAD(class LAMMPS *); ~TAD(); diff --git a/src/REPLICA/temper.cpp b/src/REPLICA/temper.cpp index 63b34b9b1d..d3894060a3 100644 --- a/src/REPLICA/temper.cpp +++ b/src/REPLICA/temper.cpp @@ -40,7 +40,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -Temper::Temper(LAMMPS *lmp) : Pointers(lmp) {} +Temper::Temper(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/REPLICA/temper.h b/src/REPLICA/temper.h index 883ec30b94..ce7944da95 100644 --- a/src/REPLICA/temper.h +++ b/src/REPLICA/temper.h @@ -20,11 +20,11 @@ CommandStyle(temper,Temper) #ifndef LMP_TEMPER_H #define LMP_TEMPER_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Temper : protected Pointers { +class Temper : protected Command { public: Temper(class LAMMPS *); ~Temper(); diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index cbb495db8e..88a0ffc402 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -67,7 +67,7 @@ static const char cite_neb_spin[] = /* ---------------------------------------------------------------------- */ -NEBSpin::NEBSpin(LAMMPS *lmp) : Pointers(lmp) { +NEBSpin::NEBSpin(LAMMPS *lmp) : Command(lmp) { if (lmp->citeme) lmp->citeme->add(cite_neb_spin); } diff --git a/src/SPIN/neb_spin.h b/src/SPIN/neb_spin.h index 568eca0957..3dbae09297 100644 --- a/src/SPIN/neb_spin.h +++ b/src/SPIN/neb_spin.h @@ -20,11 +20,11 @@ CommandStyle(neb/spin,NEBSpin) #ifndef LMP_NEB_SPIN_H #define LMP_NEB_SPIN_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class NEBSpin : protected Pointers { +class NEBSpin : protected Command { public: NEBSpin(class LAMMPS *); ~NEBSpin(); diff --git a/src/USER-COLVARS/group_ndx.h b/src/USER-COLVARS/group_ndx.h index fa15f0e82e..46ba86c860 100644 --- a/src/USER-COLVARS/group_ndx.h +++ b/src/USER-COLVARS/group_ndx.h @@ -22,13 +22,13 @@ CommandStyle(group2ndx,Group2Ndx) #ifndef LMP_GROUP_NDX_H #define LMP_GROUP_NDX_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Group2Ndx : protected Pointers { +class Group2Ndx : protected Command { public: - Group2Ndx(class LAMMPS *lmp) : Pointers(lmp) {}; + Group2Ndx(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); private: void write_group(FILE *, int); diff --git a/src/USER-COLVARS/ndx_group.h b/src/USER-COLVARS/ndx_group.h index ceca1f9570..1c881a65bf 100644 --- a/src/USER-COLVARS/ndx_group.h +++ b/src/USER-COLVARS/ndx_group.h @@ -22,14 +22,14 @@ CommandStyle(ndx2group,Ndx2Group) #ifndef LMP_NDX_GROUP_H #define LMP_NDX_GROUP_H -#include "pointers.h" +#include "command.h" #include namespace LAMMPS_NS { -class Ndx2Group : protected Pointers { +class Ndx2Group : protected Command { public: - Ndx2Group(class LAMMPS *lmp) : Pointers(lmp) {}; + Ndx2Group(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); void create(const std::string &, const std::vector &); }; diff --git a/src/USER-MISC/temper_grem.cpp b/src/USER-MISC/temper_grem.cpp index 3b987aaad2..ee60ab375d 100644 --- a/src/USER-MISC/temper_grem.cpp +++ b/src/USER-MISC/temper_grem.cpp @@ -40,7 +40,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -TemperGrem::TemperGrem(LAMMPS *lmp) : Pointers(lmp) {} +TemperGrem::TemperGrem(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MISC/temper_grem.h b/src/USER-MISC/temper_grem.h index f379814c61..b720aeb45c 100644 --- a/src/USER-MISC/temper_grem.h +++ b/src/USER-MISC/temper_grem.h @@ -20,11 +20,11 @@ CommandStyle(temper/grem,TemperGrem) #ifndef LMP_TEMPER_GREM_H #define LMP_TEMPER_GREM_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class TemperGrem : protected Pointers { +class TemperGrem : protected Command { public: TemperGrem(class LAMMPS *); ~TemperGrem(); diff --git a/src/USER-MISC/temper_npt.cpp b/src/USER-MISC/temper_npt.cpp index 08fa2246c3..1ed55a9cf3 100644 --- a/src/USER-MISC/temper_npt.cpp +++ b/src/USER-MISC/temper_npt.cpp @@ -42,7 +42,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -TemperNPT::TemperNPT(LAMMPS *lmp) : Pointers(lmp) {} +TemperNPT::TemperNPT(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MISC/temper_npt.h b/src/USER-MISC/temper_npt.h index 6beae68c6a..5c285f083c 100644 --- a/src/USER-MISC/temper_npt.h +++ b/src/USER-MISC/temper_npt.h @@ -21,11 +21,11 @@ CommandStyle(temper/npt,TemperNPT) #ifndef LMP_TEMPERNPT_H #define LMP_TEMPERNPT_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class TemperNPT : protected Pointers { +class TemperNPT : protected Command { public: TemperNPT(class LAMMPS *); ~TemperNPT(); diff --git a/src/USER-PHONON/dynamical_matrix.cpp b/src/USER-PHONON/dynamical_matrix.cpp index 798b50fdf7..0476c734a5 100644 --- a/src/USER-PHONON/dynamical_matrix.cpp +++ b/src/USER-PHONON/dynamical_matrix.cpp @@ -32,7 +32,7 @@ enum{REGULAR,ESKM}; /* ---------------------------------------------------------------------- */ -DynamicalMatrix::DynamicalMatrix(LAMMPS *lmp) : Pointers(lmp), fp(nullptr) +DynamicalMatrix::DynamicalMatrix(LAMMPS *lmp) : Command(lmp), fp(nullptr) { external_force_clear = 1; } diff --git a/src/USER-PHONON/dynamical_matrix.h b/src/USER-PHONON/dynamical_matrix.h index 8ff11044ea..30baeda27f 100644 --- a/src/USER-PHONON/dynamical_matrix.h +++ b/src/USER-PHONON/dynamical_matrix.h @@ -11,62 +11,62 @@ CommandStyle(dynamical_matrix,DynamicalMatrix) #ifndef LMP_DYNAMICAL_MATRIX_H #define LMP_DYNAMICAL_MATRIX_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { - class DynamicalMatrix : protected Pointers { - public: - DynamicalMatrix(class LAMMPS *); - virtual ~DynamicalMatrix(); - void command(int, char **); - void setup(); +class DynamicalMatrix : protected Command { + public: + DynamicalMatrix(class LAMMPS *); + virtual ~DynamicalMatrix(); + void command(int, char **); + void setup(); - protected: - int eflag,vflag; // flags for energy/virial computation - int external_force_clear; // clear forces locally or externally + protected: + int eflag,vflag; // flags for energy/virial computation + int external_force_clear; // clear forces locally or externally - int triclinic; // 0 if domain is orthog, 1 if triclinic - int pairflag; + int triclinic; // 0 if domain is orthog, 1 if triclinic + int pairflag; - int pair_compute_flag; // 0 if pair->compute is skipped - int kspace_compute_flag; // 0 if kspace->compute is skipped + int pair_compute_flag; // 0 if pair->compute is skipped + int kspace_compute_flag; // 0 if kspace->compute is skipped - int nvec; // local atomic dof = length of xvec + int nvec; // local atomic dof = length of xvec - void update_force(); - void force_clear(); - virtual void openfile(const char* filename); + void update_force(); + void force_clear(); + virtual void openfile(const char* filename); - private: - void options(int, char **); - void calculateMatrix(); - void dynmat_clear(double **dynmat); - void create_groupmap(); - void writeMatrix(double **dynmat); - void convert_units(const char *style); - void displace_atom(int local_idx, int direction, int magnitude); + private: + void options(int, char **); + void calculateMatrix(); + void dynmat_clear(double **dynmat); + void create_groupmap(); + void writeMatrix(double **dynmat); + void convert_units(const char *style); + void displace_atom(int local_idx, int direction, int magnitude); - double conversion; - double conv_energy; - double conv_distance; - double conv_mass; - double del; - int igroup,groupbit; - bigint gcount; // number of atoms in group - bigint dynlen; // rank of dynamical matrix - int scaleflag; - int me; - bigint *groupmap; + double conversion; + double conv_energy; + double conv_distance; + double conv_mass; + double del; + int igroup,groupbit; + bigint gcount; // number of atoms in group + bigint dynlen; // rank of dynamical matrix + int scaleflag; + int me; + bigint *groupmap; - int compressed; // 1 if dump file is written compressed, 0 no - int binaryflag; // 1 if dump file is written binary, 0 no - int file_opened; // 1 if openfile method has been called, 0 no - int file_flag; // 1 custom file name, 0 dynmat.dat + int compressed; // 1 if dump file is written compressed, 0 no + int binaryflag; // 1 if dump file is written binary, 0 no + int file_opened; // 1 if openfile method has been called, 0 no + int file_flag; // 1 custom file name, 0 dynmat.dat - FILE *fp; - }; + FILE *fp; +}; } diff --git a/src/USER-PHONON/third_order.cpp b/src/USER-PHONON/third_order.cpp index 875490d643..ebcc682d7a 100644 --- a/src/USER-PHONON/third_order.cpp +++ b/src/USER-PHONON/third_order.cpp @@ -32,7 +32,7 @@ enum{REGULAR,BALLISTICO}; /* ---------------------------------------------------------------------- */ -ThirdOrder::ThirdOrder(LAMMPS *lmp) : Pointers(lmp), fp(nullptr) +ThirdOrder::ThirdOrder(LAMMPS *lmp) : Command(lmp), fp(nullptr) { external_force_clear = 1; } diff --git a/src/USER-PHONON/third_order.h b/src/USER-PHONON/third_order.h index 83062b6b1f..87b0c695f6 100644 --- a/src/USER-PHONON/third_order.h +++ b/src/USER-PHONON/third_order.h @@ -12,11 +12,11 @@ CommandStyle(third_order,ThirdOrder) #ifndef LMP_THIRD_ORDER_H #define LMP_THIRD_ORDER_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { - class ThirdOrder : protected Pointers { + class ThirdOrder : protected Command { public: ThirdOrder(class LAMMPS *); virtual ~ThirdOrder(); diff --git a/src/balance.cpp b/src/balance.cpp index 6294e023b3..bf037e8f8f 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -51,7 +51,7 @@ enum{X,Y,Z}; /* ---------------------------------------------------------------------- */ -Balance::Balance(LAMMPS *lmp) : Pointers(lmp) +Balance::Balance(LAMMPS *lmp) : Command(lmp) { MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); diff --git a/src/balance.h b/src/balance.h index 424da33757..25ccac85ae 100644 --- a/src/balance.h +++ b/src/balance.h @@ -20,11 +20,11 @@ CommandStyle(balance,Balance) #ifndef LMP_BALANCE_H #define LMP_BALANCE_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Balance : protected Pointers { +class Balance : protected Command { public: class RCB *rcb; class FixStore *fixstore; // per-atom weights stored in FixStore diff --git a/src/change_box.cpp b/src/change_box.cpp index ba99e1b6e1..4471d85132 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -35,7 +35,7 @@ enum{X=0,Y,Z,YZ,XZ,XY}; /* ---------------------------------------------------------------------- */ -ChangeBox::ChangeBox(LAMMPS *lmp) : Pointers(lmp) {} +ChangeBox::ChangeBox(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/change_box.h b/src/change_box.h index d8a057f9a6..2f6802194b 100644 --- a/src/change_box.h +++ b/src/change_box.h @@ -20,11 +20,11 @@ CommandStyle(change_box,ChangeBox) #ifndef LMP_CHANGE_BOX_H #define LMP_CHANGE_BOX_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class ChangeBox : protected Pointers { +class ChangeBox : protected Command { public: ChangeBox(class LAMMPS *); void command(int, char **); diff --git a/src/command.h b/src/command.h new file mode 100644 index 0000000000..6abbc167ac --- /dev/null +++ b/src/command.h @@ -0,0 +1,29 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_COMMAND_H +#define LMP_COMMAND_H + +#include "pointers.h" + +namespace LAMMPS_NS { + +class Command : protected Pointers { + public: + Command(class LAMMPS *lmp) : Pointers(lmp) {}; + virtual void command(int, char **) = 0; +}; + +} + +#endif diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index 46aff081d9..7591ae7587 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -52,7 +52,7 @@ enum{NONE,RATIO,SUBSET}; /* ---------------------------------------------------------------------- */ -CreateAtoms::CreateAtoms(LAMMPS *lmp) : Pointers(lmp), basistype(nullptr) {} +CreateAtoms::CreateAtoms(LAMMPS *lmp) : Command(lmp), basistype(nullptr) {} /* ---------------------------------------------------------------------- */ diff --git a/src/create_atoms.h b/src/create_atoms.h index 5508752f00..8f0e016192 100644 --- a/src/create_atoms.h +++ b/src/create_atoms.h @@ -20,11 +20,11 @@ CommandStyle(create_atoms,CreateAtoms) #ifndef LMP_CREATE_ATOMS_H #define LMP_CREATE_ATOMS_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class CreateAtoms : protected Pointers { +class CreateAtoms : protected Command { public: CreateAtoms(class LAMMPS *); void command(int, char **); diff --git a/src/create_bonds.cpp b/src/create_bonds.cpp index 494e743c05..bedbe4b436 100644 --- a/src/create_bonds.cpp +++ b/src/create_bonds.cpp @@ -38,7 +38,7 @@ enum{MANY,SBOND,SANGLE,SDIHEDRAL,SIMPROPER}; /* ---------------------------------------------------------------------- */ -CreateBonds::CreateBonds(LAMMPS *lmp) : Pointers(lmp) {} +CreateBonds::CreateBonds(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/create_bonds.h b/src/create_bonds.h index eea99b0113..f25cb6d1bc 100644 --- a/src/create_bonds.h +++ b/src/create_bonds.h @@ -20,11 +20,11 @@ CommandStyle(create_bonds,CreateBonds) #ifndef LMP_CREATE_BONDS_H #define LMP_CREATE_BONDS_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class CreateBonds : protected Pointers { +class CreateBonds : protected Command { public: CreateBonds(class LAMMPS *); void command(int, char **); diff --git a/src/create_box.cpp b/src/create_box.cpp index 000fb42495..1350b6f392 100644 --- a/src/create_box.cpp +++ b/src/create_box.cpp @@ -12,22 +12,24 @@ ------------------------------------------------------------------------- */ #include "create_box.h" -#include + #include "atom.h" #include "atom_vec.h" +#include "comm.h" #include "domain.h" +#include "error.h" +#include "force.h" #include "region.h" #include "region_prism.h" -#include "force.h" -#include "comm.h" #include "update.h" -#include "error.h" + +#include using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -CreateBox::CreateBox(LAMMPS *lmp) : Pointers(lmp) {} +CreateBox::CreateBox(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/create_box.h b/src/create_box.h index 740769b4de..846af6bcee 100644 --- a/src/create_box.h +++ b/src/create_box.h @@ -20,11 +20,11 @@ CommandStyle(create_box,CreateBox) #ifndef LMP_CREATE_BOX_H #define LMP_CREATE_BOX_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class CreateBox : protected Pointers { +class CreateBox : protected Command { public: CreateBox(class LAMMPS *); void command(int, char **); diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index 3dbf21ae59..326201c9a2 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -41,7 +41,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -DeleteAtoms::DeleteAtoms(LAMMPS *lmp) : Pointers(lmp) {} +DeleteAtoms::DeleteAtoms(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/delete_atoms.h b/src/delete_atoms.h index 5eab7f6ba7..e43bebfa54 100644 --- a/src/delete_atoms.h +++ b/src/delete_atoms.h @@ -20,12 +20,12 @@ CommandStyle(delete_atoms,DeleteAtoms) #ifndef LMP_DELETE_ATOMS_H #define LMP_DELETE_ATOMS_H -#include "pointers.h" +#include "command.h" #include namespace LAMMPS_NS { -class DeleteAtoms : protected Pointers { +class DeleteAtoms : protected Command { public: DeleteAtoms(class LAMMPS *); void command(int, char **); diff --git a/src/delete_bonds.cpp b/src/delete_bonds.cpp index 5a487743e1..2bb46e7564 100644 --- a/src/delete_bonds.cpp +++ b/src/delete_bonds.cpp @@ -30,7 +30,7 @@ enum{MULTI,ATOM,BOND,ANGLE,DIHEDRAL,IMPROPER,STATS}; /* ---------------------------------------------------------------------- */ -DeleteBonds::DeleteBonds(LAMMPS *lmp) : Pointers(lmp) {} +DeleteBonds::DeleteBonds(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/delete_bonds.h b/src/delete_bonds.h index 60d76b9086..2f255e12d6 100644 --- a/src/delete_bonds.h +++ b/src/delete_bonds.h @@ -20,11 +20,11 @@ CommandStyle(delete_bonds,DeleteBonds) #ifndef LMP_DELETE_BONDS_H #define LMP_DELETE_BONDS_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class DeleteBonds : protected Pointers { +class DeleteBonds : protected Command { public: DeleteBonds(class LAMMPS *); void command(int, char **); diff --git a/src/deprecated.h b/src/deprecated.h index aceb1181c1..4b6cba7f30 100644 --- a/src/deprecated.h +++ b/src/deprecated.h @@ -26,13 +26,13 @@ CommandStyle(kim_query,Deprecated) #ifndef LMP_DEPRECATED_H #define LMP_DEPRECATED_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Deprecated : protected Pointers { +class Deprecated : protected Command { public: - Deprecated(class LAMMPS *lmp) : Pointers(lmp) {}; + Deprecated(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); }; diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index dd71e944ef..6bc3b0ab35 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -42,7 +42,7 @@ enum{MOVE,RAMP,RANDOM,ROTATE}; /* ---------------------------------------------------------------------- */ -DisplaceAtoms::DisplaceAtoms(LAMMPS *lmp) : Pointers(lmp) +DisplaceAtoms::DisplaceAtoms(LAMMPS *lmp) : Command(lmp) { mvec = nullptr; } diff --git a/src/displace_atoms.h b/src/displace_atoms.h index 737d55dbdd..98247b7244 100644 --- a/src/displace_atoms.h +++ b/src/displace_atoms.h @@ -20,11 +20,11 @@ CommandStyle(displace_atoms,DisplaceAtoms) #ifndef LMP_DISPLACE_ATOMS_H #define LMP_DISPLACE_ATOMS_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class DisplaceAtoms : protected Pointers { +class DisplaceAtoms : protected Command { public: DisplaceAtoms(class LAMMPS *); ~DisplaceAtoms(); diff --git a/src/info.h b/src/info.h index d8fa23489e..536a93c559 100644 --- a/src/info.h +++ b/src/info.h @@ -20,15 +20,15 @@ CommandStyle(info,Info) #ifndef LMP_INFO_H #define LMP_INFO_H -#include "pointers.h" +#include "command.h" #include namespace LAMMPS_NS { -class Info : protected Pointers { +class Info : protected Command { public: - Info(class LAMMPS *lmp) : Pointers(lmp) {}; + Info(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); bool is_active(const char *, const char *); diff --git a/src/minimize.cpp b/src/minimize.cpp index 8e55d6e0ea..1fb0d219cd 100644 --- a/src/minimize.cpp +++ b/src/minimize.cpp @@ -25,7 +25,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -Minimize::Minimize(LAMMPS *lmp) : Pointers(lmp) {} +Minimize::Minimize(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/minimize.h b/src/minimize.h index 42a2fcaf02..10b244130a 100644 --- a/src/minimize.h +++ b/src/minimize.h @@ -20,11 +20,11 @@ CommandStyle(minimize,Minimize) #ifndef LMP_MINIMIZE_H #define LMP_MINIMIZE_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Minimize : protected Pointers { +class Minimize : protected Command { public: Minimize(class LAMMPS *); void command(int, char **); diff --git a/src/read_data.cpp b/src/read_data.cpp index cc3b2e5965..c0085f19d1 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -11,10 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h -// due to OpenMPI bug which sets INT64_MAX via its mpi.h -// before lmptype.h can set flags to insure it is done correctly - #include "read_data.h" #include "angle.h" @@ -66,7 +62,7 @@ const char *suffixes[] = {"/cuda","/gpu","/opt","/omp","/kk", /* ---------------------------------------------------------------------- */ -ReadData::ReadData(LAMMPS *lmp) : Pointers(lmp) +ReadData::ReadData(LAMMPS *lmp) : Command(lmp) { MPI_Comm_rank(world,&me); line = new char[MAXLINE]; diff --git a/src/read_data.h b/src/read_data.h index 68b40fc529..d251259a08 100644 --- a/src/read_data.h +++ b/src/read_data.h @@ -20,11 +20,11 @@ CommandStyle(read_data,ReadData) #ifndef LMP_READ_DATA_H #define LMP_READ_DATA_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class ReadData : protected Pointers { +class ReadData : protected Command { public: ReadData(class LAMMPS *); ~ReadData(); diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 0282e2d039..ddb793c629 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -15,10 +15,6 @@ Contributing author: Timothy Sirk (ARL) ------------------------------------------------------------------------- */ -// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h -// due to OpenMPI bug which sets INT64_MAX via its mpi.h -// before lmptype.h can set flags to insure it is done correctly - #include "read_dump.h" #include "atom.h" @@ -46,7 +42,7 @@ enum{NOADD,YESADD,KEEPADD}; /* ---------------------------------------------------------------------- */ -ReadDump::ReadDump(LAMMPS *lmp) : Pointers(lmp) +ReadDump::ReadDump(LAMMPS *lmp) : Command(lmp) { MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); diff --git a/src/read_dump.h b/src/read_dump.h index 93fb4bc713..ba59cc9224 100644 --- a/src/read_dump.h +++ b/src/read_dump.h @@ -22,11 +22,11 @@ CommandStyle(read_dump,ReadDump) #ifndef LMP_READ_DUMP_H #define LMP_READ_DUMP_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class ReadDump : protected Pointers { +class ReadDump : protected Command { public: ReadDump(class LAMMPS *); ~ReadDump(); diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 9e8fbce91c..7983a25ae9 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -43,7 +43,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -ReadRestart::ReadRestart(LAMMPS *lmp) : Pointers(lmp) {} +ReadRestart::ReadRestart(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/read_restart.h b/src/read_restart.h index 99b37cfa45..3a2c7965b3 100644 --- a/src/read_restart.h +++ b/src/read_restart.h @@ -20,11 +20,11 @@ CommandStyle(read_restart,ReadRestart) #ifndef LMP_READ_RESTART_H #define LMP_READ_RESTART_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class ReadRestart : protected Pointers { +class ReadRestart : protected Command { public: ReadRestart(class LAMMPS *); void command(int, char **); diff --git a/src/replicate.cpp b/src/replicate.cpp index 6877ec091c..95bf615d04 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -31,7 +31,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -Replicate::Replicate(LAMMPS *lmp) : Pointers(lmp) {} +Replicate::Replicate(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/replicate.h b/src/replicate.h index 58c0010aa3..fd865a9c71 100644 --- a/src/replicate.h +++ b/src/replicate.h @@ -20,11 +20,11 @@ CommandStyle(replicate,Replicate) #ifndef LMP_REPLICATE_H #define LMP_REPLICATE_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Replicate : protected Pointers { +class Replicate : protected Command { public: Replicate(class LAMMPS *); void command(int, char **); diff --git a/src/rerun.cpp b/src/rerun.cpp index 8615b02d95..9571724e2d 100644 --- a/src/rerun.cpp +++ b/src/rerun.cpp @@ -29,7 +29,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -Rerun::Rerun(LAMMPS *lmp) : Pointers(lmp) {} +Rerun::Rerun(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/rerun.h b/src/rerun.h index ea1d0221c3..57aa32227f 100644 --- a/src/rerun.h +++ b/src/rerun.h @@ -20,11 +20,11 @@ CommandStyle(rerun,Rerun) #ifndef LMP_RERUN_H #define LMP_RERUN_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Rerun : protected Pointers { +class Rerun : protected Command { public: Rerun(class LAMMPS *); void command(int, char **); diff --git a/src/reset_atom_ids.cpp b/src/reset_atom_ids.cpp index 7298103b80..47dae3cb56 100644 --- a/src/reset_atom_ids.cpp +++ b/src/reset_atom_ids.cpp @@ -43,7 +43,7 @@ static int compare_coords(const int, const int, void *); /* ---------------------------------------------------------------------- */ -ResetIDs::ResetIDs(LAMMPS *lmp) : Pointers(lmp) {} +ResetIDs::ResetIDs(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/reset_atom_ids.h b/src/reset_atom_ids.h index 02a7f77e8d..a017abbbc8 100644 --- a/src/reset_atom_ids.h +++ b/src/reset_atom_ids.h @@ -20,11 +20,11 @@ CommandStyle(reset_atom_ids,ResetIDs) #ifndef LMP_RESET_IDS_H #define LMP_RESET_IDS_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class ResetIDs : protected Pointers { +class ResetIDs : protected Command { public: struct AtomRvous { bigint ibin; diff --git a/src/reset_mol_ids.cpp b/src/reset_mol_ids.cpp index aed26b4568..39f7307ca1 100644 --- a/src/reset_mol_ids.cpp +++ b/src/reset_mol_ids.cpp @@ -32,7 +32,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -ResetMolIDs::ResetMolIDs(LAMMPS *lmp) : Pointers(lmp) { +ResetMolIDs::ResetMolIDs(LAMMPS *lmp) : Command(lmp) { cfa = nullptr; cca = nullptr; diff --git a/src/reset_mol_ids.h b/src/reset_mol_ids.h index fbb6fceb03..c25f64fe43 100644 --- a/src/reset_mol_ids.h +++ b/src/reset_mol_ids.h @@ -20,11 +20,11 @@ CommandStyle(reset_mol_ids,ResetMolIDs) #ifndef LMP_RESET_MOL_IDS_H #define LMP_RESET_MOL_IDS_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class ResetMolIDs : protected Pointers { +class ResetMolIDs : protected Command { public: ResetMolIDs(class LAMMPS *); ~ResetMolIDs(); diff --git a/src/run.cpp b/src/run.cpp index c503e174ff..379cf8015a 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -31,7 +31,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -Run::Run(LAMMPS *lmp) : Pointers(lmp) {} +Run::Run(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/run.h b/src/run.h index 5578ea9598..a9a4a556f0 100644 --- a/src/run.h +++ b/src/run.h @@ -20,11 +20,11 @@ CommandStyle(run,Run) #ifndef LMP_RUN_H #define LMP_RUN_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Run : protected Pointers { +class Run : protected Command { public: Run(class LAMMPS *); void command(int, char **); diff --git a/src/set.h b/src/set.h index 29f1ea526e..02e81b057a 100644 --- a/src/set.h +++ b/src/set.h @@ -20,13 +20,13 @@ CommandStyle(set,Set) #ifndef LMP_SET_H #define LMP_SET_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Set : protected Pointers { +class Set : protected Command { public: - Set(class LAMMPS *lmp) : Pointers(lmp) {}; + Set(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); private: diff --git a/src/velocity.cpp b/src/velocity.cpp index f4483074aa..e0c80baa91 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -42,7 +42,7 @@ enum{NONE,CONSTANT,EQUAL,ATOM}; /* ---------------------------------------------------------------------- */ -Velocity::Velocity(LAMMPS *lmp) : Pointers(lmp) {} +Velocity::Velocity(LAMMPS *lmp) : Command(lmp) {} /* ---------------------------------------------------------------------- */ diff --git a/src/velocity.h b/src/velocity.h index e14c0d0d1c..5c54302a1e 100644 --- a/src/velocity.h +++ b/src/velocity.h @@ -20,11 +20,11 @@ CommandStyle(velocity,Velocity) #ifndef LMP_VELOCITY_H #define LMP_VELOCITY_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class Velocity : protected Pointers { +class Velocity : protected Command { public: Velocity(class LAMMPS *); void command(int, char **); diff --git a/src/write_coeff.h b/src/write_coeff.h index b995e60d63..2555454db0 100644 --- a/src/write_coeff.h +++ b/src/write_coeff.h @@ -20,13 +20,13 @@ CommandStyle(write_coeff,WriteCoeff) #ifndef LMP_WRITE_COEFF_H #define LMP_WRITE_COEFF_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class WriteCoeff : protected Pointers { +class WriteCoeff : protected Command { public: - WriteCoeff(class LAMMPS *lmp) : Pointers(lmp) {}; + WriteCoeff(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); }; diff --git a/src/write_data.cpp b/src/write_data.cpp index 6d10359e8b..d8b37ca265 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -41,7 +41,7 @@ enum{ELLIPSOID,LINE,TRIANGLE,BODY}; // also in AtomVecHybrid /* ---------------------------------------------------------------------- */ -WriteData::WriteData(LAMMPS *lmp) : Pointers(lmp) +WriteData::WriteData(LAMMPS *lmp) : Command(lmp) { MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); diff --git a/src/write_data.h b/src/write_data.h index a4e71c9cda..c9ba5a4a52 100644 --- a/src/write_data.h +++ b/src/write_data.h @@ -20,11 +20,11 @@ CommandStyle(write_data,WriteData) #ifndef LMP_WRITE_DATA_H #define LMP_WRITE_DATA_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class WriteData : protected Pointers { +class WriteData : protected Command { public: WriteData(class LAMMPS *); void command(int, char **); diff --git a/src/write_dump.h b/src/write_dump.h index db39a75d4b..5d1499934a 100644 --- a/src/write_dump.h +++ b/src/write_dump.h @@ -20,13 +20,13 @@ CommandStyle(write_dump,WriteDump) #ifndef LMP_WRITE_DUMP_H #define LMP_WRITE_DUMP_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class WriteDump : protected Pointers { +class WriteDump : protected Command { public: - WriteDump(class LAMMPS *lmp) : Pointers(lmp) {}; + WriteDump(class LAMMPS *lmp) : Command(lmp) {}; void command(int, char **); }; diff --git a/src/write_restart.cpp b/src/write_restart.cpp index afe1d2d528..ce0eddcd73 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -43,7 +43,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -WriteRestart::WriteRestart(LAMMPS *lmp) : Pointers(lmp) +WriteRestart::WriteRestart(LAMMPS *lmp) : Command(lmp) { MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); diff --git a/src/write_restart.h b/src/write_restart.h index a4a606482e..0b8826f10b 100644 --- a/src/write_restart.h +++ b/src/write_restart.h @@ -20,11 +20,11 @@ CommandStyle(write_restart,WriteRestart) #ifndef LMP_WRITE_RESTART_H #define LMP_WRITE_RESTART_H -#include "pointers.h" +#include "command.h" namespace LAMMPS_NS { -class WriteRestart : protected Pointers { +class WriteRestart : protected Command { public: WriteRestart(class LAMMPS *); void command(int, char **);