more refactoring

This commit is contained in:
Steve Plimpton
2023-11-27 10:23:50 -07:00
parent ee0a050f65
commit a1fc55b479
2 changed files with 505 additions and 232 deletions

File diff suppressed because it is too large Load Diff

View File

@ -27,9 +27,19 @@ namespace LAMMPS_NS {
class Set2 : public Command {
public:
Set2(class LAMMPS *lmp) : Command(lmp){};
~Set2();
void command(int, char **) override;
private:
void process_args(int, int, char **);
void selection(int);
void invoke_actions();
private:
int caller; // SETCOMMAND or FIXSET
// params for atom selection
int style;
char *id;
int nlo,nhi;
@ -37,39 +47,42 @@ class Set2 : public Command {
int groupbit;
class Region *region;
int caller;
struct Action {
};
int naction,maxaction;
Action *actions;
int *select;
typedef void (Set2::*FnPtrPack)();
FnPtrPack *invoke_choice; // list of ptrs to invoke functions
// atom property setting params for keyword/value pairs
int ivalue, newtype, count, index_custom, icol_custom;
int ximage, yimage, zimage, ximageflag, yimageflag, zimageflag;
int cc_index;
bigint nsubset;
double dvalue, xvalue, yvalue, zvalue, wvalue, fraction;
int varflag, varflag1, varflag2, varflag3, varflag4;
int ivar1, ivar2, ivar3, ivar4;
double *vec1, *vec2, *vec3, *vec4;
int custom_flag;
int discflag;
void process_args(int, int, char **);
void invoke_actions();
// one Action = one keyword/value pair
struct Action {
int keyword;
int varflag;
int varflag1, varflag2, varflag3, varflag4;
int ivar1, ivar2, ivar3, ivar4;
int ivalue1;
double dvalue1,dvalue2,dvalue3,dvalue4;
};
int naction,maxaction;
Action *actions;
typedef void (Set2::*FnPtrPack)();
FnPtrPack *invoke_choice; // list of ptrs to invoke functions
// storage for evaluated variables
double *vec1, *vec2, *vec3, *vec4;
// flag for selected atoms
int *select;
// private functions
void selection(int);
void set(int);
void setrandom(int);
void topology(int);
void varparse(const char *, int);