Skip to content
Snippets Groups Projects
Commit 06adf7f3 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4238 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 0eeb48a7
No related branches found
No related tags found
No related merge requests found
...@@ -35,18 +35,18 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) : ...@@ -35,18 +35,18 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) :
peratom_flag = 1; peratom_flag = 1;
size_peratom_cols = 4; size_peratom_cols = 4;
// create a new fix store style // create a new fix store/state style
// id = compute-ID + store, fix group = compute group // id = compute-ID + store_state, fix group = compute group
int n = strlen(id) + strlen("_store") + 1; int n = strlen(id) + strlen("_store_state") + 1;
id_fix = new char[n]; id_fix = new char[n];
strcpy(id_fix,id); strcpy(id_fix,id);
strcat(id_fix,"_store"); strcat(id_fix,"_store_state");
char **newarg = new char*[7]; char **newarg = new char*[7];
newarg[0] = id_fix; newarg[0] = id_fix;
newarg[1] = group->names[igroup]; newarg[1] = group->names[igroup];
newarg[2] = (char *) "store"; newarg[2] = (char *) "store/state";
newarg[3] = (char *) "0"; newarg[3] = (char *) "0";
newarg[4] = (char *) "xu"; newarg[4] = (char *) "xu";
newarg[5] = (char *) "yu"; newarg[5] = (char *) "yu";
......
...@@ -49,18 +49,18 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : ...@@ -49,18 +49,18 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) :
} else error->all("Illegal compute msd command"); } else error->all("Illegal compute msd command");
} }
// create a new fix store style with or without com keyword // create a new fix store/state style with or without com keyword
// id = compute-ID + store, fix group = compute group // id = compute-ID + store_state, fix group = compute group
int n = strlen(id) + strlen("_store") + 1; int n = strlen(id) + strlen("_store_state") + 1;
id_fix = new char[n]; id_fix = new char[n];
strcpy(id_fix,id); strcpy(id_fix,id);
strcat(id_fix,"_store"); strcat(id_fix,"_store_state");
char **newarg = new char*[9]; char **newarg = new char*[9];
newarg[0] = id_fix; newarg[0] = id_fix;
newarg[1] = group->names[igroup]; newarg[1] = group->names[igroup];
newarg[2] = (char *) "store"; newarg[2] = (char *) "store/state";
newarg[3] = (char *) "0"; newarg[3] = (char *) "0";
newarg[4] = (char *) "xu"; newarg[4] = (char *) "xu";
newarg[5] = (char *) "yu"; newarg[5] = (char *) "yu";
......
This diff is collapsed.
...@@ -13,21 +13,21 @@ ...@@ -13,21 +13,21 @@
#ifdef FIX_CLASS #ifdef FIX_CLASS
FixStyle(store,FixStore) FixStyle(store/state,FixStoreState)
#else #else
#ifndef LMP_FIX_STORE_H #ifndef LMP_FIX_STORE_STATE_H
#define LMP_FIX_STORE_H #define LMP_FIX_STORE_STATE_H
#include "fix.h" #include "fix.h"
namespace LAMMPS_NS { namespace LAMMPS_NS {
class FixStore : public Fix { class FixStoreState : public Fix {
public: public:
FixStore(class LAMMPS *, int, char **); FixStoreState(class LAMMPS *, int, char **);
~FixStore(); ~FixStoreState();
int setmask(); int setmask();
void init(); void init();
void setup(int); void setup(int);
...@@ -56,7 +56,7 @@ class FixStore : public Fix { ...@@ -56,7 +56,7 @@ class FixStore : public Fix {
int kflag,cfv_flag,firstflag; int kflag,cfv_flag,firstflag;
int cfv_any; // 1 if any compute/fix/variable specified int cfv_any; // 1 if any compute/fix/variable specified
typedef void (FixStore::*FnPtrPack)(int); typedef void (FixStoreState::*FnPtrPack)(int);
FnPtrPack *pack_choice; // ptrs to pack functions FnPtrPack *pack_choice; // ptrs to pack functions
void pack_id(int); void pack_id(int);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment