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

cps::AlgHmcRHMC Class Reference

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

#include <alg_hmd.h>

Inherits cps::AlgHmd.

List of all members.

Public Member Functions

 AlgHmcRHMC (Lattice &latt, CommonArg *c_arg, HmdArg *arg)
 Constructor for when the rational approximation is fixed.
 AlgHmcRHMC (Lattice &latt, CommonArg *c_arg, HmdArg *arg, EigArg *e_arg)
 Constructor for when the rational approximations are to be generated dynamically.
virtual ~AlgHmcRHMC ()
Float run (void)
 Performs a single RHMC trajectory.
void generateApprox (HmdArg *)
 Automatic generation of the rational approximation.
void dynamicalApprox ()
 Dynamical generation of the rational approximation.

Protected Attributes

int n_frm_masses
 The number of dynamical fermion masses.
int n_bsn_masses
 The number of dynamical boson masses.
int f_sites
int f_vec_count
int f_count
int f_size
 The size of a fermion field.
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 final gauge field configuration.
unsigned int ** rng4d_init
unsigned int ** rng5d_init
 The initial random numbers.
Matrixgauge_field_final
 The initial gauge field configuration.
Vectorfrm
Vector ** frmn
 Array of vectors.
Vector ** frmn_d
 Array of vectors.
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.
int total_size
 The sum of the rational approximation degrees used for the force.
Floatall_res
 An array holding the residues - used for asqtad force.
EigArgeig_arg
 ?
Float ** alpha


Detailed Description

A class implementing the Rational Hybrid Monte Carlo algorithm.

The main method evolves a gauge field along a molecular dynamics trajectory followed by a metropolis accept/reject step using the RHMC algorithm.

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.

As with AlgHmcPhi, one can also have bosons in the action.

The rational approximation can be generated dynamically, but the correct constructor must be used and the code should be configured with the --enable-gmp flag to use the GNU multiprecision library.

Note:
When used with Asqtad fermions, the local lattice size has to be greater than 2 in all directions.

Definition at line 337 of file alg_hmd.h.


Constructor & Destructor Documentation

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

Constructor for when the rational approximation is fixed.

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 62 of file alg_hmc_rhmc.C.

References cps::HmdArg::approx_type, cps::ERR, cps::F_CLASS_ASQTAD, cps::Lattice::Fclass(), cps::Verbose::Func(), cps::Error::General(), generateApprox(), cps::GJP, cps::GlobalJobParameter::TnodeSites(), cps::VRB, cps::GlobalJobParameter::XnodeSites(), cps::GlobalJobParameter::YnodeSites(), and cps::GlobalJobParameter::ZnodeSites().

cps::AlgHmcRHMC::AlgHmcRHMC Lattice latt,
CommonArg c_arg,
HmdArg arg,
EigArg e_arg
 

Constructor for when the rational approximations are to be generated dynamically.

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

Definition at line 103 of file alg_hmc_rhmc.C.

References eig_arg, cps::Verbose::Func(), generateApprox(), and cps::VRB.

cps::AlgHmcRHMC::~AlgHmcRHMC  )  [virtual]
 

Definition at line 293 of file alg_hmc_rhmc.C.

References cps::Alg::AlgLattice(), all_res, alpha, bsn, bsn_cg_arg, cps::F_CLASS_ASQTAD, cps::Lattice::Fclass(), cps::FOUR_D, frm_cg_arg, frmn, frmn_d, cps::Verbose::Func(), gauge_field_final, gauge_field_init, cps::LRG, cps::LatRanGen::NStates(), phi, cps::HmdArg::reproduce, rng4d_init, rng5d_init, cps::sfree(), and cps::VRB.


Member Function Documentation

void cps::AlgHmcRHMC::dynamicalApprox  ) 
 

Dynamical generation of the rational approximation.

Measures the eigenvalue bounds and regenerates the approximation if necessary.

Definition at line 1064 of file alg_hmc_rhmc.C.

References cps::Alg::AlgLattice(), cps::CNV_FRM_NO, cps::RemezArg::degree, cps::DIR_T, cps::DIR_X, cps::DIR_Y, cps::DIR_Z, eig_arg, cps::ERR, cps::RemezArg::error, f_size, cps::Lattice::FeigSolv(), cps::HmdArg::field_type, cps::RemezArg::field_type, cps::Float, cps::HmdArg::FRatDeg, cps::HmdArg::FRatDegNew, cps::HmdArg::FRatError, cps::HmdArg::FRatNorm, cps::HmdArg::FRatPole, cps::HmdArg::FRatRes, cps::HmdArg::frm_mass, cps::HmdArg::frm_power_den, cps::HmdArg::frm_power_num, cps::Verbose::Func(), cps::Error::General(), cps::AlgRemez::generateApprox(), cps::AlgRemez::getIPFE(), cps::AlgRemez::getPFE(), cps::GJP, cps::EigArg::hsum_dir, cps::RemezArg::lambda_high, cps::HmdArg::lambda_high, cps::RemezArg::lambda_low, cps::HmdArg::lambda_low, cps::HmdArg::lambda_max, cps::HmdArg::lambda_min, cps::EigArg::mass, cps::EigArg::N_eig, cps::RemezArg::power_den, cps::RemezArg::power_num, cps::HmdArg::precision, cps::RemezArg::precision, cps::Lattice::RandGaussVector(), cps::Verbose::Result(), cps::EigArg::Rsdlam, cps::sfree(), cps::HmdArg::SIRatNorm, cps::HmdArg::SIRatPole, cps::HmdArg::SIRatRes, cps::smalloc(), cps::HmdArg::spread, cps::HmdArg::SRatDeg, cps::HmdArg::SRatDegNew, cps::HmdArg::SRatError, cps::HmdArg::SRatNorm, cps::HmdArg::SRatPole, cps::HmdArg::SRatRes, cps::GlobalJobParameter::Tnodes(), cps::GlobalJobParameter::TnodeSites(), cps::VRB, cps::GlobalJobParameter::Xnodes(), cps::GlobalJobParameter::XnodeSites(), cps::GlobalJobParameter::Ynodes(), cps::GlobalJobParameter::YnodeSites(), cps::GlobalJobParameter::Znodes(), and cps::GlobalJobParameter::ZnodeSites().

Referenced by run().

void cps::AlgHmcRHMC::generateApprox HmdArg hmd_arg  ) 
 

Automatic generation of the rational approximation.

Generate the optimal rational approximation for the RHMC simulation

Definition at line 975 of file alg_hmc_rhmc.C.

References cps::for().

Referenced by AlgHmcRHMC().

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

Performs a single RHMC trajectory.

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 398 of file alg_hmc_rhmc.C.

References cps::Alg::AlgLattice(), all_res, alpha, cps::HmdArg::approx_type, cps::Lattice::BhamiltonNode(), bsn, bsn_cg_arg, cps::HmdArg::bsn_mass, cps::CNV_FRM_NO, cps::Lattice::CompareGaugeField(), cps::Lattice::CopyGaugeField(), CopyVec(), cps::CSM, dynamicalApprox(), cps::ERR, cps::Lattice::EvolveGfield(), cps::Lattice::EvolveMomFforce(), cps::Lattice::EvolveMomGforce(), cps::F_CLASS_ASQTAD, cps::F_CLASS_DWF, f_size, cps::Lattice::Fclass(), cps::Fclose(), cps::Lattice::FhamiltonNode(), cps::Error::FileA(), cps::Float, cps::Verbose::Flow(), cps::Lattice::FmatEvlInv(), cps::Lattice::FmatEvlMInv(), cps::Fopen(), cps::FORCE_MEASURE_NO, cps::Fprintf(), cps::HmdArg::FRatDeg, cps::HmdArg::FRatPole, cps::HmdArg::FRatRes, frm_cg_arg, cps::HmdArg::frm_mass, frmn, frmn_d, cps::Lattice::FsiteSize(), cps::Verbose::Func(), gauge_field_final, gauge_field_init, cps::Lattice::GaugeField(), cps::GDS, cps::Error::General(), cps::LRGState::GetStates(), cps::Lattice::GhamiltonNode(), cps::GJP, cps::glb_sum(), cps::Lattice::GsoCheck(), cps::Lattice::GupdCnt(), cps::Lattice::GupdCntInc(), cps::IFloat, cps::HmdArg::isz, cps::LRG, cps::Lattice::MdTime(), cps::Lattice::MdTimeInc(), cps::HmdArg::metropolis, cps::Lattice::MetropolisAccept(), cps::Lattice::MomHamiltonNode(), phi, cps::Lattice::RandGaussAntiHermMatrix(), cps::Lattice::RandGaussVector(), cps::RENORM_BACKWARDS, cps::RENORM_FORWARDS, cps::HmdArg::reproduce, cps::HmdArg::reproduce_attempt_limit, cps::Verbose::Result(), cps::CommonArg::results, cps::Lattice::Reunitarize(), cps::HmdArg::reunitarize, cps::Lattice::RHMC_EvolveMomFforce(), cps::CheckSum::SaveComment(), cps::GlobalDataShift::Set(), cps::GlobalDataShift::SetOrigin(), cps::Lattice::SetPhi(), cps::LRGState::SetStates(), cps::Lattice::Shift(), cps::LatRanGen::Shift(), cps::SINGLE, cps::HmdArg::SIRatNorm, cps::HmdArg::SIRatPole, cps::HmdArg::SIRatRes, cps::GlobalJobParameter::Snodes(), cps::Lattice::SoCheck(), cps::HmdArg::SRatDeg, cps::HmdArg::SRatNorm, cps::HmdArg::SRatPole, cps::HmdArg::SRatRes, cps::HmdArg::step_size, cps::HmdArg::steps_per_traj, cps::CgArg::stop_rsd, cps::HmdArg::stop_rsd_mc, cps::HmdArg::stop_rsd_md, cps::HmdArg::sw, cps::CgArg::true_rsd, cps::Vector::VecTimesEquFloat(), cps::GlobalJobParameter::VolNodeSites(), and cps::VRB.


Member Data Documentation

Float* cps::AlgHmcRHMC::all_res [protected]
 

An array holding the residues - used for asqtad force.

Definition at line 442 of file alg_hmd.h.

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

Float** cps::AlgHmcRHMC::alpha [protected]
 

Definition at line 447 of file alg_hmd.h.

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

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

Boson (pseudoboson?) fields.

One for each mass

Definition at line 388 of file alg_hmd.h.

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

CgArg** cps::AlgHmcRHMC::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 376 of file alg_hmd.h.

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

Float* cps::AlgHmcRHMC::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 435 of file alg_hmd.h.

Float* cps::AlgHmcRHMC::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 423 of file alg_hmd.h.

EigArg* cps::AlgHmcRHMC::eig_arg [protected]
 

?

Definition at line 445 of file alg_hmd.h.

Referenced by AlgHmcRHMC(), and dynamicalApprox().

int cps::AlgHmcRHMC::f_count [protected]
 

Definition at line 359 of file alg_hmd.h.

int cps::AlgHmcRHMC::f_sites [protected]
 

Definition at line 357 of file alg_hmd.h.

int cps::AlgHmcRHMC::f_size [protected]
 

The size of a fermion field.

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 361 of file alg_hmd.h.

Referenced by dynamicalApprox(), and run().

int cps::AlgHmcRHMC::f_vec_count [protected]
 

Definition at line 358 of file alg_hmd.h.

Vector* cps::AlgHmcRHMC::frm [protected]
 

Definition at line 402 of file alg_hmd.h.

CgArg** cps::AlgHmcRHMC::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 368 of file alg_hmd.h.

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

Vector** cps::AlgHmcRHMC::frmn [protected]
 

Array of vectors.

These will hold the solutions from the solves.

Definition at line 405 of file alg_hmd.h.

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

Vector** cps::AlgHmcRHMC::frmn_d [protected]
 

Array of vectors.

These will hold the solutions from the solves multiplied by the D-slash operator.

Definition at line 409 of file alg_hmd.h.

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

Matrix* cps::AlgHmcRHMC::gauge_field_final [protected]
 

The initial gauge field configuration.

Definition at line 400 of file alg_hmd.h.

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

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

The final gauge field configuration.

Definition at line 393 of file alg_hmd.h.

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

Float* cps::AlgHmcRHMC::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 431 of file alg_hmd.h.

Float* cps::AlgHmcRHMC::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 427 of file alg_hmd.h.

Float* cps::AlgHmcRHMC::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 418 of file alg_hmd.h.

Float* cps::AlgHmcRHMC::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 414 of file alg_hmd.h.

int cps::AlgHmcRHMC::n_bsn_masses [protected]
 

The number of dynamical boson masses.

Definition at line 355 of file alg_hmd.h.

int cps::AlgHmcRHMC::n_frm_masses [protected]
 

The number of dynamical fermion masses.

Definition at line 352 of file alg_hmd.h.

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

Pseudofermion fields.

One for each mass

Definition at line 383 of file alg_hmd.h.

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

unsigned int** cps::AlgHmcRHMC::rng4d_init [protected]
 

Definition at line 395 of file alg_hmd.h.

Referenced by ~AlgHmcRHMC().

unsigned int** cps::AlgHmcRHMC::rng5d_init [protected]
 

The initial random numbers.

Definition at line 397 of file alg_hmd.h.

Referenced by ~AlgHmcRHMC().

int cps::AlgHmcRHMC::total_size [protected]
 

The sum of the rational approximation degrees used for the force.

Definition at line 439 of file alg_hmd.h.


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