From 3249c3878030b90820f9dd83d03342c67b34bdef Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 8 Jun 2011 18:16:56 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6335 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/comm.h | 18 ++++++++---------- src/dump.cpp | 2 ++ src/dump.h | 9 +++++++++ src/dump_custom.h | 1 + src/force.cpp | 2 -- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/comm.h b/src/comm.h index 868f6bec2e..f093fb74b6 100644 --- a/src/comm.h +++ b/src/comm.h @@ -26,10 +26,6 @@ class Comm : protected Pointers { int myloc[3]; // which proc I am in each dim int procneigh[3][2]; // my 6 neighboring procs int ghost_velocity; // 1 if ghost atoms have velocity, 0 if not - int maxforward_fix; // comm sizes called from Fix,Pair - int maxreverse_fix; - int maxforward_pair; - int maxreverse_pair; double cutghost[3]; // cutoffs used for acquiring ghost atoms double cutghostuser; // user-specified ghost cutoff int ***grid2proc; // which proc owns i,j,k loc in 3d grid @@ -45,12 +41,14 @@ class Comm : protected Pointers { virtual void exchange(); // move atoms to new procs virtual void borders(); // setup list of atoms to communicate - virtual void forward_comm_pair(class Pair *); // forward comm from a Pair - virtual void reverse_comm_pair(class Pair *); // reverse comm from a Pair - virtual void forward_comm_fix(class Fix *); // forward comm from a Fix - virtual void reverse_comm_fix(class Fix *); // reverse comm from a Fix - virtual void forward_comm_compute(class Compute *); // forward comm from a Compute - virtual void reverse_comm_compute(class Compute *); // reverse comm from a Compute + virtual void forward_comm_pair(class Pair *); // forward comm from a Pair + virtual void reverse_comm_pair(class Pair *); // reverse comm from a Pair + virtual void forward_comm_fix(class Fix *); // forward comm from a Fix + virtual void reverse_comm_fix(class Fix *); // reverse comm from a Fix + virtual void forward_comm_compute(class Compute *); // forward from a Compute + virtual void reverse_comm_compute(class Compute *); // reverse from a Compute + virtual void forward_comm_dump(class Dump *); // forward comm from a Dump + virtual void reverse_comm_dump(class Dump *); // reverse comm from a Dump virtual void set(int, char **); // set communication style virtual bigint memory_usage(); diff --git a/src/dump.cpp b/src/dump.cpp index feb9182590..2dd5106bf5 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -63,6 +63,8 @@ Dump::Dump(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) filename = new char[n]; strcpy(filename,arg[4]); + comm_forward = comm_reverse = 0; + first_flag = 0; flush_flag = 1; format = NULL; diff --git a/src/dump.h b/src/dump.h index 8e2ed70627..4f5036d75a 100644 --- a/src/dump.h +++ b/src/dump.h @@ -28,6 +28,9 @@ class Dump : protected Pointers { int first_flag; // 0 if no initial dump, 1 if yes initial dump int clearstep; // 1 if dump invokes computes, 0 if not + int comm_forward; // size of forward communication (0 if none) + int comm_reverse; // size of reverse communication (0 if none) + // static variable across all Dump objects static Dump *dumpptr; // holds a ptr to Dump currently being used @@ -36,6 +39,12 @@ class Dump : protected Pointers { virtual ~Dump(); void init(); virtual void write(); + + virtual int pack_comm(int, int *, double *, int, int *) {return 0;} + virtual void unpack_comm(int, int, double *) {} + virtual int pack_reverse_comm(int, int, double *) {return 0;} + virtual void unpack_reverse_comm(int, int *, double *) {} + void modify_params(int, char **); virtual bigint memory_usage(); diff --git a/src/dump_custom.h b/src/dump_custom.h index b71a001733..8b7fbc34a1 100644 --- a/src/dump_custom.h +++ b/src/dump_custom.h @@ -47,6 +47,7 @@ class DumpCustom : public Dump { int maxlocal; // size of atom selection and variable arrays int *choose; // local indices of selected atoms double *dchoose; // value for each atom to threshhold against + int *clist; // compressed list of indices of selected atoms int nfield; // # of keywords listed by user int ioptional; // index of start of optional args diff --git a/src/force.cpp b/src/force.cpp index b7891a37e5..2282b9a676 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -103,8 +103,6 @@ void Force::init() { qqrd2e = qqr2e/dielectric; - comm->maxforward_pair = comm->maxreverse_pair = 0; - if (kspace) kspace->init(); // kspace must come before pair if (pair) pair->init(); // so g_ewald is defined if (bond) bond->init();