Grid 0.7.0
Action< GaugeField > Class Template Referenceabstract

Base class for all actions. More...

#include <ActionBase.h>

Inheritance diagram for Action< GaugeField >:
PlaqPlusRectangleAction< PeriodicGimplR > PlaqPlusRectangleAction< PeriodicGimplF > PlaqPlusRectangleAction< PeriodicGimplD > PlaqPlusRectangleAction< ConjugateGimplR > PlaqPlusRectangleAction< ConjugateGimplF > PlaqPlusRectangleAction< ConjugateGimplD > ScalarAction< ScalarImplR > ScalarAction< ScalarImplF > ScalarAction< ScalarImplD > ScalarInteractionAction< ScalarNxNAdjImplR< Colours >, Dimensions > ScalarInteractionAction< ScalarNxNAdjImplF< Colours >, Dimensions > ScalarInteractionAction< ScalarNxNAdjImplD< Colours >, Dimensions > WilsonGaugeAction< PeriodicGimplR > WilsonGaugeAction< PeriodicGimplF > WilsonGaugeAction< PeriodicGimplD > WilsonGaugeAction< SpPeriodicGimplR > WilsonGaugeAction< SpPeriodicGimplF > WilsonGaugeAction< SpPeriodicGimplD > WilsonGaugeAction< ConjugateGimplR > WilsonGaugeAction< ConjugateGimplF > WilsonGaugeAction< ConjugateGimplD > EmptyAction< GaugeField >

Public Member Functions

virtual ~Action ()
Timing methods
void reset_timer (void)
 Zero timers associated with this action.
void deriv_log (RealD nrm, RealD max, RealD Fdt_nrm, RealD Fdt_max)
 Record statistics on the action and derivative.
RealD deriv_max_average (void)
 Mean maximum derivative for a trajectory.
RealD deriv_norm_average (void)
 Mean (absolute value of) derivative for a trajectory.
RealD Fdt_max_average (void)
 Mean maximum value of impulse (force integrated over a time step) for a trajectory.
RealD Fdt_norm_average (void)
 Mean (absolute value of) impulse (force integrated over a time step) for a trajectory.
RealD deriv_timer (void)
 Time spent computing the derivative in microseconds.
RealD S_timer (void)
 Time spent computing the action in microseconds.
RealD refresh_timer (void)
 Time spent refreshing pseudofermion fields in microseconds.
void deriv_timer_start (void)
 Start timing derivative computation.
void deriv_timer_stop (void)
 Stop timing derivative computation.
void refresh_timer_start (void)
 Start timing pseudofermion field refresh.
void refresh_timer_stop (void)
 Stop timing pseudofermion field refresh.
void S_timer_start (void)
 Start timing action computation.
void S_timer_stop (void)
 Stop timing action computation.
Methods working on plain gauge fields
virtual void refresh (const GaugeField &U, GridSerialRNG &sRNG, GridParallelRNG &pRNG)=0
 Refresh pseudofermion fields.
virtual RealD S (const GaugeField &U)=0
 Evaluate this action with the given gauge field.
virtual RealD Sinitial (const GaugeField &U)
 Get the action at the start of the trajectory.
virtual void deriv (const GaugeField &U, GaugeField &dSdU)=0
Methods working on smart configuration containers

If is_smeared, then these methods work on the smeared field; otherwise, they work on the unsmeared field.

virtual void refresh (ConfigurationBase< GaugeField > &U, GridSerialRNG &sRNG, GridParallelRNG &pRNG)
 Refresh pseudofermion fields.
virtual RealD S (ConfigurationBase< GaugeField > &U)
 Evaluate this action with the given gauge field.
virtual RealD Sinitial (ConfigurationBase< GaugeField > &U)
 Get the action at the start of the trajectory.
virtual void deriv (ConfigurationBase< GaugeField > &U, GaugeField &dSdU)
Logging
virtual std::string action_name ()=0
 Report the name of the action.
virtual std::string LogParameters ()=0
 Print the parameters of the action.

Data Fields

bool is_smeared
 Is the action computed on a smeared gauge field.
RealD deriv_norm_sum
 Accumulator for absolute value of derivative of action.
RealD deriv_max_sum
 Accumulator for maximum value of derivative of action.
RealD Fdt_norm_sum
 Accumulator for absolute value of impulse (force integrated over time step).
RealD Fdt_max_sum
 Accumulator for maximum impulse (force integrated over time step).
int deriv_num
 Number of times deriv_log() has been called.
RealD deriv_us
 Time spent computing the derivative in microseconds.
RealD S_us
 Time spent computing the action in microseconds.
RealD refresh_us
 Time spent refreshing pseudofermion fields in microseconds.

Detailed Description

template<class GaugeField>
class Action< GaugeField >

Base class for all actions.

Definition at line 62 of file ActionBase.h.

Constructor & Destructor Documentation

◆ ~Action()

template<class GaugeField>
virtual Action< GaugeField >::~Action ( )
inlinevirtual

Definition at line 223 of file ActionBase.h.

Member Function Documentation

◆ reset_timer()

template<class GaugeField>
void Action< GaugeField >::reset_timer ( void )
inline

Zero timers associated with this action.

Definition at line 79 of file ActionBase.h.

◆ deriv_log()

template<class GaugeField>
void Action< GaugeField >::deriv_log ( RealD nrm,
RealD max,
RealD Fdt_nrm,
RealD Fdt_max )
inline

Record statistics on the action and derivative.

Parameters
[in]nrmAbsolute value of the action.
[in]maxMaximum value of the action.
[in]Fdt_nrmAbsolute value of the force integrated across this time step.
[in]Fdt_maxMaximum value of the force integrated across this time step.

Definition at line 91 of file ActionBase.h.

◆ deriv_max_average()

template<class GaugeField>
RealD Action< GaugeField >::deriv_max_average ( void )
inline

Mean maximum derivative for a trajectory.

Definition at line 102 of file ActionBase.h.

◆ deriv_norm_average()

template<class GaugeField>
RealD Action< GaugeField >::deriv_norm_average ( void )
inline

Mean (absolute value of) derivative for a trajectory.

Definition at line 104 of file ActionBase.h.

◆ Fdt_max_average()

template<class GaugeField>
RealD Action< GaugeField >::Fdt_max_average ( void )
inline

Mean maximum value of impulse (force integrated over a time step) for a trajectory.

Definition at line 106 of file ActionBase.h.

◆ Fdt_norm_average()

template<class GaugeField>
RealD Action< GaugeField >::Fdt_norm_average ( void )
inline

Mean (absolute value of) impulse (force integrated over a time step) for a trajectory.

Definition at line 108 of file ActionBase.h.

◆ deriv_timer()

template<class GaugeField>
RealD Action< GaugeField >::deriv_timer ( void )
inline

Time spent computing the derivative in microseconds.

Definition at line 110 of file ActionBase.h.

◆ S_timer()

template<class GaugeField>
RealD Action< GaugeField >::S_timer ( void )
inline

Time spent computing the action in microseconds.

Definition at line 112 of file ActionBase.h.

◆ refresh_timer()

template<class GaugeField>
RealD Action< GaugeField >::refresh_timer ( void )
inline

Time spent refreshing pseudofermion fields in microseconds.

Definition at line 114 of file ActionBase.h.

◆ deriv_timer_start()

template<class GaugeField>
void Action< GaugeField >::deriv_timer_start ( void )
inline

Start timing derivative computation.

Definition at line 116 of file ActionBase.h.

◆ deriv_timer_stop()

template<class GaugeField>
void Action< GaugeField >::deriv_timer_stop ( void )
inline

Stop timing derivative computation.

Definition at line 118 of file ActionBase.h.

◆ refresh_timer_start()

template<class GaugeField>
void Action< GaugeField >::refresh_timer_start ( void )
inline

Start timing pseudofermion field refresh.

Definition at line 120 of file ActionBase.h.

◆ refresh_timer_stop()

template<class GaugeField>
void Action< GaugeField >::refresh_timer_stop ( void )
inline

Stop timing pseudofermion field refresh.

Definition at line 122 of file ActionBase.h.

◆ S_timer_start()

template<class GaugeField>
void Action< GaugeField >::S_timer_start ( void )
inline

Start timing action computation.

Definition at line 124 of file ActionBase.h.

◆ S_timer_stop()

template<class GaugeField>
void Action< GaugeField >::S_timer_stop ( void )
inline

Stop timing action computation.

Definition at line 126 of file ActionBase.h.

◆ refresh() [1/2]

template<class GaugeField>
virtual void Action< GaugeField >::refresh ( const GaugeField & U,
GridSerialRNG & sRNG,
GridParallelRNG & pRNG )
pure virtual

◆ S() [1/2]

◆ Sinitial() [1/2]

template<class GaugeField>
virtual RealD Action< GaugeField >::Sinitial ( const GaugeField & U)
inlinevirtual

Get the action at the start of the trajectory.

If the refresh computes the action, it can be cached so that the value at the start of a Monte Carlo trajectory can be used mid-trajectory.

Parameters
[in]UThe gauge field.
Returns
The value of the action $S[U]$, potentially as previously cached.

Reimplemented in GeneralEvenOddRatioRationalPseudoFermionAction< Impl >, GeneralEvenOddRatioRationalPseudoFermionAction< ImplD >, and TwoFlavourEvenOddRatioPseudoFermionAction< Impl >.

Definition at line 157 of file ActionBase.h.

Referenced by Action< Field > *::Sinitial().

◆ deriv() [1/2]

template<class GaugeField>
virtual void Action< GaugeField >::deriv ( const GaugeField & U,
GaugeField & dSdU )
pure virtual

◆ refresh() [2/2]

template<class GaugeField>
virtual void Action< GaugeField >::refresh ( ConfigurationBase< GaugeField > & U,
GridSerialRNG & sRNG,
GridParallelRNG & pRNG )
inlinevirtual

Refresh pseudofermion fields.

Parameters
[in]UThe gauge field
[in,out]sRNGThe serial random number generator to use
[in,out]pRNGThe parallel random number generator to use

Definition at line 178 of file ActionBase.h.

◆ S() [2/2]

template<class GaugeField>
virtual RealD Action< GaugeField >::S ( ConfigurationBase< GaugeField > & U)
inlinevirtual

Evaluate this action with the given gauge field.

Parameters
[in]UThe gauge field to evaluate the action of.
Returns
The value of the action $S[U]$

Definition at line 187 of file ActionBase.h.

◆ Sinitial() [2/2]

template<class GaugeField>
virtual RealD Action< GaugeField >::Sinitial ( ConfigurationBase< GaugeField > & U)
inlinevirtual

Get the action at the start of the trajectory.

If the refresh computes the action, it can be cached so that the value at the start of a Monte Carlo trajectory can be used mid-trajectory.

Parameters
[in]UThe gauge field.
Returns
The value of the action $S[U]$, potentially as previously cached.

Definition at line 201 of file ActionBase.h.

◆ deriv() [2/2]

template<class GaugeField>
virtual void Action< GaugeField >::deriv ( ConfigurationBase< GaugeField > & U,
GaugeField & dSdU )
inlinevirtual

Evaluate the derivative of the action, to be integrated in the molecular dynamics part of the HMC.

Parameters
[in]UThe gauge field to compute the action's derivative on.
[out]dSdUArray into which to output the resulting derivative.

Definition at line 210 of file ActionBase.h.

◆ action_name()

template<class GaugeField>
virtual std::string Action< GaugeField >::action_name ( )
pure virtual

Report the name of the action.

Implemented in DBW2GaugeAction< Gimpl >, DomainDecomposedBoundaryTwoFlavourBosonPseudoFermion< ImplD, ImplF >, DomainDecomposedBoundaryTwoFlavourPseudoFermion< ImplD, ImplF >, DomainDecomposedBoundaryTwoFlavourRatioPseudoFermion< ImplD, ImplF >, EmptyAction< GaugeField >, ExactOneFlavourRatioMixedPrecHeatbathPseudoFermionAction< ImplD, ImplF >, ExactOneFlavourRatioPseudoFermionAction< Impl >, ExactOneFlavourRatioPseudoFermionAction< ImplD >, GeneralEvenOddRatioRationalMixedPrecPseudoFermionAction< ImplD, ImplF >, GeneralEvenOddRatioRationalMixedPrecPseudoFermionAction< Impl, ImplF >, GeneralEvenOddRatioRationalPseudoFermionAction< Impl >, GeneralEvenOddRatioRationalPseudoFermionAction< ImplD >, IwasakiGaugeAction< Gimpl >, IwasakiGaugeAction< ConjugateGimplD >, IwasakiGaugeAction< ConjugateGimplF >, IwasakiGaugeAction< ConjugateGimplR >, IwasakiGaugeAction< PeriodicGimplD >, IwasakiGaugeAction< PeriodicGimplF >, IwasakiGaugeAction< PeriodicGimplR >, JacobianAction< Gimpl >, OneFlavourEvenOddRationalPseudoFermionAction< Impl >, OneFlavourEvenOddRatioRationalMixedPrecPseudoFermionAction< Impl, ImplF >, OneFlavourEvenOddRatioRationalPseudoFermionAction< Impl >, OneFlavourRationalPseudoFermionAction< Impl >, OneFlavourRatioRationalPseudoFermionAction< Impl >, PlaqPlusRectangleAction< Gimpl >, PlaqPlusRectangleAction< ConjugateGimplD >, PlaqPlusRectangleAction< ConjugateGimplF >, PlaqPlusRectangleAction< ConjugateGimplR >, PlaqPlusRectangleAction< PeriodicGimplD >, PlaqPlusRectangleAction< PeriodicGimplF >, PlaqPlusRectangleAction< PeriodicGimplR >, RBCGaugeAction< Gimpl >, ScalarAction< Impl >, ScalarAction< ScalarImplD >, ScalarAction< ScalarImplF >, ScalarAction< ScalarImplR >, ScalarInteractionAction< Impl, Ndim >, ScalarInteractionAction< ScalarNxNAdjImplD< Colours >, Dimensions >, ScalarInteractionAction< ScalarNxNAdjImplF< Colours >, Dimensions >, ScalarInteractionAction< ScalarNxNAdjImplR< Colours >, Dimensions >, SymanzikGaugeAction< Gimpl >, SymanzikGaugeAction< ConjugateGimplD >, SymanzikGaugeAction< ConjugateGimplF >, SymanzikGaugeAction< ConjugateGimplR >, SymanzikGaugeAction< PeriodicGimplD >, SymanzikGaugeAction< PeriodicGimplF >, SymanzikGaugeAction< PeriodicGimplR >, TwoFlavourEvenOddPseudoFermionAction< Impl >, TwoFlavourEvenOddRatioPseudoFermionAction< Impl >, TwoFlavourPseudoFermionAction< Impl >, TwoFlavourRatioEO4DPseudoFermionAction< Impl >, and TwoFlavourRatioPseudoFermionAction< Impl >.

◆ LogParameters()

template<class GaugeField>
virtual std::string Action< GaugeField >::LogParameters ( )
pure virtual

Print the parameters of the action.

Implemented in DomainDecomposedBoundaryTwoFlavourBosonPseudoFermion< ImplD, ImplF >, DomainDecomposedBoundaryTwoFlavourPseudoFermion< ImplD, ImplF >, DomainDecomposedBoundaryTwoFlavourRatioPseudoFermion< ImplD, ImplF >, EmptyAction< GaugeField >, ExactOneFlavourRatioPseudoFermionAction< Impl >, ExactOneFlavourRatioPseudoFermionAction< ImplD >, GeneralEvenOddRatioRationalPseudoFermionAction< Impl >, GeneralEvenOddRatioRationalPseudoFermionAction< ImplD >, JacobianAction< Gimpl >, OneFlavourEvenOddRationalPseudoFermionAction< Impl >, OneFlavourRationalPseudoFermionAction< Impl >, OneFlavourRatioRationalPseudoFermionAction< Impl >, PlaqPlusRectangleAction< Gimpl >, PlaqPlusRectangleAction< ConjugateGimplD >, PlaqPlusRectangleAction< ConjugateGimplF >, PlaqPlusRectangleAction< ConjugateGimplR >, PlaqPlusRectangleAction< PeriodicGimplD >, PlaqPlusRectangleAction< PeriodicGimplF >, PlaqPlusRectangleAction< PeriodicGimplR >, ScalarAction< Impl >, ScalarAction< ScalarImplD >, ScalarAction< ScalarImplF >, ScalarAction< ScalarImplR >, ScalarInteractionAction< Impl, Ndim >, ScalarInteractionAction< ScalarNxNAdjImplD< Colours >, Dimensions >, ScalarInteractionAction< ScalarNxNAdjImplF< Colours >, Dimensions >, ScalarInteractionAction< ScalarNxNAdjImplR< Colours >, Dimensions >, TwoFlavourEvenOddPseudoFermionAction< Impl >, TwoFlavourEvenOddRatioPseudoFermionAction< Impl >, TwoFlavourPseudoFermionAction< Impl >, TwoFlavourRatioEO4DPseudoFermionAction< Impl >, and TwoFlavourRatioPseudoFermionAction< Impl >.

Field Documentation

◆ is_smeared

template<class GaugeField>
bool Action< GaugeField >::is_smeared

Is the action computed on a smeared gauge field.

Definition at line 66 of file ActionBase.h.

◆ deriv_norm_sum

template<class GaugeField>
RealD Action< GaugeField >::deriv_norm_sum

Accumulator for absolute value of derivative of action.

Definition at line 67 of file ActionBase.h.

◆ deriv_max_sum

template<class GaugeField>
RealD Action< GaugeField >::deriv_max_sum

Accumulator for maximum value of derivative of action.

Definition at line 68 of file ActionBase.h.

◆ Fdt_norm_sum

template<class GaugeField>
RealD Action< GaugeField >::Fdt_norm_sum

Accumulator for absolute value of impulse (force integrated over time step).

Definition at line 69 of file ActionBase.h.

◆ Fdt_max_sum

template<class GaugeField>
RealD Action< GaugeField >::Fdt_max_sum

Accumulator for maximum impulse (force integrated over time step).

Definition at line 70 of file ActionBase.h.

◆ deriv_num

template<class GaugeField>
int Action< GaugeField >::deriv_num

Number of times deriv_log() has been called.

Definition at line 71 of file ActionBase.h.

◆ deriv_us

template<class GaugeField>
RealD Action< GaugeField >::deriv_us

Time spent computing the derivative in microseconds.

Definition at line 72 of file ActionBase.h.

◆ S_us

template<class GaugeField>
RealD Action< GaugeField >::S_us

Time spent computing the action in microseconds.

Definition at line 73 of file ActionBase.h.

◆ refresh_us

template<class GaugeField>
RealD Action< GaugeField >::refresh_us

Time spent refreshing pseudofermion fields in microseconds.

Definition at line 74 of file ActionBase.h.


The documentation for this class was generated from the following file: