Skip to content
Snippets Groups Projects
Commit f0681f7e authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add support for USER-TALLY to pair styles hybrid and hybrid/overlay

parent dfa98152
No related branches found
No related tags found
No related merge requests found
...@@ -194,8 +194,8 @@ class Pair : protected Pointers { ...@@ -194,8 +194,8 @@ class Pair : protected Pointers {
int num_tally_compute; int num_tally_compute;
class Compute **list_tally_compute; class Compute **list_tally_compute;
public: public:
void add_tally_callback(class Compute *); virtual void add_tally_callback(class Compute *);
void del_tally_callback(class Compute *); virtual void del_tally_callback(class Compute *);
protected: protected:
int instance_me; // which Pair class instantiation I am int instance_me; // which Pair class instantiation I am
......
...@@ -169,6 +169,23 @@ void PairHybrid::compute(int eflag, int vflag) ...@@ -169,6 +169,23 @@ void PairHybrid::compute(int eflag, int vflag)
if (vflag_fdotr) virial_fdotr_compute(); if (vflag_fdotr) virial_fdotr_compute();
} }
/* ---------------------------------------------------------------------- */
void PairHybrid::add_tally_callback(Compute *ptr)
{
for (int m = 0; m < nstyles; m++)
styles[m]->add_tally_callback(ptr);
}
/* ---------------------------------------------------------------------- */
void PairHybrid::del_tally_callback(Compute *ptr)
{
for (int m = 0; m < nstyles; m++)
styles[m]->del_tally_callback(ptr);
}
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void PairHybrid::compute_inner() void PairHybrid::compute_inner()
......
...@@ -55,6 +55,9 @@ class PairHybrid : public Pair { ...@@ -55,6 +55,9 @@ class PairHybrid : public Pair {
int check_ijtype(int, int, char *); int check_ijtype(int, int, char *);
virtual void add_tally_callback(class Compute *);
virtual void del_tally_callback(class Compute *);
protected: protected:
int nstyles; // # of sub-styles int nstyles; // # of sub-styles
Pair **styles; // list of Pair style classes Pair **styles; // list of Pair style classes
......
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