diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index 5514a48482..f5bf2b8429 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -2361,10 +2361,19 @@ double FixRigid::compute_scalar() void *FixRigid::extract(const char *str, int &dim) { - dim=0; + if (strcmp(str,"body") == 0) { + dim = 1; + return body; + } + if (strcmp(str,"masstotal") == 0) { + dim = 1; + return masstotal; + } if (strcmp(str,"t_target") == 0) { + dim = 0; return &t_target; } + return NULL; } diff --git a/src/RIGID/fix_rigid.h b/src/RIGID/fix_rigid.h index 9c0dcf7d2e..ecbb531a39 100644 --- a/src/RIGID/fix_rigid.h +++ b/src/RIGID/fix_rigid.h @@ -26,10 +26,6 @@ namespace LAMMPS_NS { class FixRigid : public Fix { public: - // public so that granular pair styles can access them - int *body; // which body each atom is part of (-1 if none) - double *masstotal; // total mass of each rigid body - FixRigid(class LAMMPS *, int, char **); virtual ~FixRigid(); virtual int setmask(); @@ -74,6 +70,10 @@ class FixRigid : public Fix { int *mol2body; // convert mol-ID to rigid body index int maxmol; // size of mol2body = max mol-ID + int *body; // which body each atom is part of (-1 if none) + double **displace; // displacement of each atom in body coords + + double *masstotal; // total mass of each rigid body double **xcm; // coords of center-of-mass of each rigid body double **vcm; // velocity of center-of-mass of each double **fcm; // force on center-of-mass of each @@ -89,8 +89,6 @@ class FixRigid : public Fix { double **tflag; // flag for on/off of center-of-mass torque double **langextra; // Langevin thermostat forces and torques - double **displace; // displacement of each atom in body coords - double **sum,**all; // work vectors for each rigid body int **remapflag; // PBC remap flags for each rigid body