Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

cps::AlgHmcQPQ Class Reference
[Algorithms]

A class implementing the Hybrid Monte Carlo algorithm. More...

#include <alg_hmd.h>

Inherits cps::AlgHmd.

List of all members.

Public Member Functions

 AlgHmcQPQ (Lattice &latt, CommonArg *c_arg, HmdArg *arg)
virtual ~AlgHmcQPQ ()
Float run (void)
 Run the HMC algorithm.

Protected Attributes

int n_frm_masses
 The number of dynamical fermion masses.
int n_bsn_masses
 The number of dynamical boson masses.
int f_size
 The size of the pseudofermion (and similar) fields.
CgArg ** frm_cg_arg
 Pointer to an array of structures containing solver parameters.
CgArg ** bsn_cg_arg
 Pointer to an array of structures containing solver parameters.
Vector ** phi
 Pseudofermion fields.
Vector ** bsn
 Boson (pseudoboson?) fields.
Matrixgauge_field_init
 The initial gauge field configuration.
Vector ** frm1
 Array of general purpose fields.
Vector ** frm2
 Another array of general purpose fields.
Vector ** cg_sol_prev
Vector *** cg_sol
 Array holding the conjugate gradient solutions.
Vector *** vm
 Array containing the orthogonal basis used by the chronological preconditioner.
Floath_f_init
 The initial value of the pseudofermion action.
Floath_f_final
 The final value of the pseudofermion action.
Floatdelta_h_f
 The change in the value of the pseudofermion action.
Floath_b_init
 The initial value of the boson action.
Floath_b_final
 The final value of the boson action.
Floatdelta_h_b
 The change in the value of the boson action.


Detailed Description

A class implementing the Hybrid Monte Carlo algorithm.

This evolves a gauge field by a single iteration of the HMC algorithm, i.e. a molecular dynamics trajectory followed by a metropolis accept/reject step.

This implementation uses a Uqpq leapfrog integration scheme and a minimum residual chronological method to choose the starting guess for the solver.

The algorithm is configurable to include dynamical fermions of several masses, each mass having its own set of pseudofermion fields and solver parameters. The number of degenerate flavours at each mass depends on the type of fermion action used. Similarly one can have in addition pseudobosonic $ \chi^\dagger M^\dagger M \chi $ terms in the hamiltonian contributing to the total force on the momentum field.

One also has the option of forcing acceptance at the metropolis step.

A bunch of statistics relating to the performance of the solver, the conservation of the hamiltonian and the metropolis acceptance are collected.

Definition at line 221 of file alg_hmd.h.


Constructor & Destructor Documentation

cps::AlgHmcQPQ::AlgHmcQPQ Lattice latt,
CommonArg c_arg,
HmdArg arg
 

Parameters:
latt The lattice on which the HMC algorithm runs.
c_arg The common argument structure for all algorithms.
arg The algorithm parameters.

Definition at line 50 of file alg_hmc_qpq.C.

References bsn, bsn_cg_arg, cps::HmdArg::bsn_mass, cg_sol, cg_sol_prev, cps::HmdArg::chrono, cps::ERR, f_size, cps::Lattice::FchkbEvl(), cps::Float, frm1, frm2, frm_cg_arg, cps::HmdArg::frm_mass, cps::Lattice::FsiteSize(), cps::Verbose::Func(), gauge_field_init, cps::Error::General(), cps::GJP, cps::CgArg::mass, cps::MAX_HMD_MASSES, cps::HmdArg::max_num_iter, cps::CgArg::max_num_iter, cps::HmdArg::n_bsn_masses, n_bsn_masses, cps::HmdArg::n_frm_masses, n_frm_masses, phi, cps::Error::Pointer(), cps::Verbose::Smalloc(), cps::smalloc(), cps::HmdArg::stop_rsd, cps::CgArg::stop_rsd, vm, cps::GlobalJobParameter::VolNodeSites(), and cps::VRB.

cps::AlgHmcQPQ::~AlgHmcQPQ  )  [virtual]
 

Definition at line 270 of file alg_hmc_qpq.C.

References bsn, bsn_cg_arg, cg_sol, cg_sol_prev, cps::HmdArg::chrono, frm1, frm2, frm_cg_arg, cps::Verbose::Func(), gauge_field_init, n_bsn_masses, n_frm_masses, phi, cps::sfree(), cps::Verbose::Sfree(), vm, and cps::VRB.


Member Function Documentation

Float cps::AlgHmcQPQ::run void   )  [virtual]
 

Run the HMC algorithm.

Returns:
The probability used in the metropolis step.
Postcondition:
The following results are written to the file specified in the CommonArg structure:
  1. Number of molecular dynamics steps + 1
  2. Change in the hamiltonian
  3. 1/0 if accepted/rejected
  4. A measure of the change in the gauge field due to reunitarisation
  5. Another measure of the change in the gauge field due to reunitarisation
  6. Average number of solver iterations.
  7. Minimum number of solver iterations.
  8. Maximum number of solver iterations.
  9. Average solver residue
  10. Minimum solver residue
  11. Maximum solver residue

Implements cps::AlgHmd.

Definition at line 402 of file alg_hmc_qpq.C.

References cps::Alg::AlgLattice(), cps::Lattice::BhamiltonNode(), bsn, bsn_cg_arg, cps::HmdArg::bsn_mass, cg_sol, cg_sol_prev, cps::HmdArg::chrono, cps::CNV_FRM_NO, cps::Lattice::CopyGaugeField(), cps::ERR, cps::Lattice::EvolveGfield(), cps::Lattice::EvolveMomFforce(), cps::Lattice::EvolveMomGforce(), f_size, cps::Fclose(), cps::Lattice::FhamiltonNode(), cps::Error::FileA(), cps::Float, cps::Verbose::Flow(), cps::Lattice::FmatEvlInv(), cps::Lattice::FminResExt(), cps::Fopen(), cps::Fprintf(), frm1, frm2, frm_cg_arg, cps::HmdArg::frm_mass, cps::Verbose::Func(), gauge_field_init, cps::Lattice::GaugeField(), cps::Lattice::GhamiltonNode(), cps::GJP, cps::glb_sum(), cps::Lattice::GsoCheck(), cps::Lattice::GupdCnt(), cps::Lattice::GupdCntInc(), cps::IFloat, cps::Lattice::MdTime(), cps::Lattice::MdTimeInc(), cps::HmdArg::metropolis, cps::Lattice::MetropolisAccept(), cps::Lattice::MomHamiltonNode(), phi, cps::MPISCU::printf(), cps::Lattice::RandGaussAntiHermMatrix(), cps::Lattice::RandGaussVector(), cps::Verbose::Result(), cps::CommonArg::results, cps::Lattice::Reunitarize(), cps::HmdArg::reunitarize, cps::Lattice::SetPhi(), cps::GlobalJobParameter::Snodes(), cps::Lattice::SoCheck(), cps::HmdArg::step_size, cps::HmdArg::steps_per_traj, vm, and cps::VRB.


Member Data Documentation

Vector** cps::AlgHmcQPQ::bsn [protected]
 

Boson (pseudoboson?) fields.

One for each mass

Definition at line 264 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

CgArg** cps::AlgHmcQPQ::bsn_cg_arg [protected]
 

Pointer to an array of structures containing solver parameters.

These are the parameters corresponding to each of the dynamical boson masses.

Definition at line 253 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

Vector*** cps::AlgHmcQPQ::cg_sol [protected]
 

Array holding the conjugate gradient solutions.

Definition at line 277 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

Vector** cps::AlgHmcQPQ::cg_sol_prev [protected]
 

Definition at line 275 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

Float* cps::AlgHmcQPQ::delta_h_b [protected]
 

The change in the value of the boson action.

The final value - the initial value. One for each mass

Definition at line 302 of file alg_hmd.h.

Float* cps::AlgHmcQPQ::delta_h_f [protected]
 

The change in the value of the pseudofermion action.

The final value - the initial value. One for each mass

Definition at line 290 of file alg_hmd.h.

int cps::AlgHmcQPQ::f_size [protected]
 

The size of the pseudofermion (and similar) fields.

The size is given in terms of the total number of floating point numbers in the field on the local lattice, taking into account whether or not the field is defined on just a single parity.

Definition at line 239 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), and run().

Vector** cps::AlgHmcQPQ::frm1 [protected]
 

Array of general purpose fields.

Definition at line 271 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

Vector** cps::AlgHmcQPQ::frm2 [protected]
 

Another array of general purpose fields.

Definition at line 273 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

CgArg** cps::AlgHmcQPQ::frm_cg_arg [protected]
 

Pointer to an array of structures containing solver parameters.

These are the parameters corresponding to each of the dynamical fermion masses.

Definition at line 246 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

Matrix* cps::AlgHmcQPQ::gauge_field_init [protected]
 

The initial gauge field configuration.

Definition at line 268 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

Float* cps::AlgHmcQPQ::h_b_final [protected]
 

The final value of the boson action.

The value at the end of the trajectory. One for each mass

Definition at line 298 of file alg_hmd.h.

Float* cps::AlgHmcQPQ::h_b_init [protected]
 

The initial value of the boson action.

The value at the start of the trajectory. One for each mass

Definition at line 294 of file alg_hmd.h.

Float* cps::AlgHmcQPQ::h_f_final [protected]
 

The final value of the pseudofermion action.

The value at the end of the trajectory. One for each mass

Definition at line 286 of file alg_hmd.h.

Float* cps::AlgHmcQPQ::h_f_init [protected]
 

The initial value of the pseudofermion action.

The value at the start of the trajectory. One for each mass

Definition at line 282 of file alg_hmd.h.

int cps::AlgHmcQPQ::n_bsn_masses [protected]
 

The number of dynamical boson masses.

This is not necessarily the number of dynamical flavours.

Definition at line 236 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), and ~AlgHmcQPQ().

int cps::AlgHmcQPQ::n_frm_masses [protected]
 

The number of dynamical fermion masses.

Definition at line 230 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), and ~AlgHmcQPQ().

Vector** cps::AlgHmcQPQ::phi [protected]
 

Pseudofermion fields.

One for each mass

Definition at line 260 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().

Vector*** cps::AlgHmcQPQ::vm [protected]
 

Array containing the orthogonal basis used by the chronological preconditioner.

Definition at line 279 of file alg_hmd.h.

Referenced by AlgHmcQPQ(), run(), and ~AlgHmcQPQ().


The documentation for this class was generated from the following files:
Generated on Sat Oct 10 14:11:55 2009 for Columbia Physics System by  doxygen 1.3.9.1