23 #include <mxx/comm.hpp>
89 static unsigned int GetWalkerID(
const MPI_Comm& world,
const MPI_Comm& comm)
91 return mxx::comm(world).rank()/mxx::comm(comm).size();
100 static unsigned int GetNumWalkers(
const MPI_Comm& world,
const MPI_Comm& comm)
102 return mxx::comm(world).size()/mxx::comm(comm).size();
112 return mxx::comm(comm).rank() == 0;
Collective variable manager.
Base abstract class for listening in to events fired by "Hook".
EventListener(unsigned int frequency)
Constructor.
virtual void PostSimulation(Snapshot *snapshot, const class CVManager &cvmanager)=0
Method call post simulation.
virtual void PostIntegration(Snapshot *snapshot, const class CVManager &cvmanager)=0
Method call post integration.
virtual ~EventListener()
Destructor.
unsigned int GetFrequency() const
Get frequency of event listener.
static unsigned int GetNumWalkers(const MPI_Comm &world, const MPI_Comm &comm)
Get total number of walkers in the simulation.
unsigned int frequency_
Frequency for listening.
virtual void PreSimulation(Snapshot *snapshot, const class CVManager &cvmanager)=0
Method call prior to simulation initiation.
static bool IsMasterRank(const MPI_Comm &comm)
Check if current processor is master.
static unsigned int GetWalkerID(const MPI_Comm &world, const MPI_Comm &comm)
Get walker ID number of specified communicator.
Class containing a snapshot of the current simulation in time.