11#include <util/param/ParamComposite.h>
12#include <util/misc/Timer.h>
14#include <pscf/backend/TmplDeclare.h>
22 template <
int D,
class T>
class System;
23 template <
int D,
class T>
class Simulator;
48 template <
int D,
class T>
244 Timer compressorTimer_;
245 Timer componentTimer_;
246 Timer hamiltonianTimer_;
247 Timer decisionTimer_;
283 template <
int D,
class T>
inline
285 {
return nAttempt_; }
290 template <
int D,
class T>
inline
297 template <
int D,
class T>
inline
306 template <
int D,
class T>
313 template <
int D,
class T>
320 template <
int D,
class T>
327 template <
int D,
class T>
inline
329 {
return *systemPtr_; }
334 template <
int D,
class T>
inline
336 {
return *systemPtr_; }
341 template <
int D,
class T>
inline
343 {
return *simulatorPtr_; }
348 template <
int D,
class T>
inline
350 {
return *simulatorPtr_; }
355 template <
int D,
class T>
inline
357 {
return *randomPtr_; }
362 template <
int D,
class T>
inline
364 {
return *vecRandomPtr_; }
369 template <
int D,
class T>
inline
371 {
return probability_; }
376 template <
int D,
class T>
inline
Random & random()
Get the scalar random number generator.
McSimulator< D, T > & simulator()
Get parent McSimulator object (non-const ref).
VecRandom< T > & vecRandom()
Get the vector random number generator.
System< D, T > & system()
Get parent System object (non-const ref).
McMove is an abstract base class for Monte Carlo moves.
Random & random()
Get the scalar random number generator.
virtual void clearTimers()
Clear timers.
McSimulator< D, T > & simulator()
Get parent McSimulator object (non-const ref).
virtual void attemptMove()
Attempt unconstrained move.
~McMove()=default
Destructor.
double probability() const
void incrementNFail()
Increment the number of failed moves.
virtual void outputTimers(std::ostream &out)
Write timing results to a file.
void setProbability(double probability)
Set the probability for this McMove.
void readProbability(std::istream &in)
Read the probability from file.
void outputTimerData(std::ostream &out)
VecRandom< T > & vecRandom()
Get the vector random number generator.
long nFail() const
Return number of moves that failed to converge.
void incrementNAccept()
Increment the number of accepted moves.
System< D, T > & system()
Get parent System object (non-const ref).
virtual bool needsCc()
Decide whether cc fields need to be saved for move.
Timer attemptMoveTimer_
Timers for McMove.
virtual void readParameters(std::istream &in)
Read required parameters from file.
long nAttempt() const
Return number of moves that have been attempted.
virtual bool needsDc()
Decide whether dc fields need to be saved for move.
void incrementNAttempt()
Increment the number of attempted moves.
long nAccept() const
Return number of moves that have been accepted.
McMove(McSimulator< D, T > &simulator)
Constructor.
Monte-Carlo simulation coordinator.
Base class for field theoretic PS-FTS simulator.
Base class template for classes that represent a complete system.
ParamComposite()
Constructor.
File containing preprocessor macros for error handling.
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.
Utility classes for scientific computation.