Columbia Physics System  5.0.16..1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
cps::AlgActionRational Class Reference

#include <alg_int.h>

Inheritance diagram for cps::AlgActionRational:
Inheritance graph
[legend]
Collaboration diagram for cps::AlgActionRational:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AlgActionRational ()
 < Dummy contructor - does nothing
 AlgActionRational (AlgMomentum &mom, ActionRationalArg &rat_arg, int traj_num=0)
 AlgActionRational (AlgMomentum &mom, ActionBilinearArg &bi_arg)
 Need to add restart method or similar so do not need to.
virtual ~AlgActionRational ()
 Heat Bath for the pseudo-fermions (phi)
void heatbath ()
Float energy ()
 method to return the cost of the integrator (wrt cg iterations)
virtual void prepare_fg (Matrix *force, Float dt_ratio)
 evolve method evolves the integrator
void evolve (Float dt, int steps)
 evolve method relevant to split timescales
void evolve (Float dt, int steps, int **fractionSplit)
 Compare two approximations to avoid recalculation if possible.
void init (int traj_num)
void setSplit (int i, int j)
 Set mass i, pole j as included.
void checkSplit ()
 Check that all the partial fractions have been accounted for.

Static Public Member Functions

static int compareApprox (RemezArg &, RemezArg &)

Protected Member Functions

void generateApprox (Float *mass, RemezArg **remez_arg_md, RemezArg **remez_arg_mc, RationalDescr *rat)
 Free up the rational approximations.
void destroyApprox (RemezArg *remez_arg_md, RemezArg *remez_arg_mc)
 Allocate and setup cg arguments.
void generateCgArg (Float *mass, CgArg ****cg_arg_fg, CgArg ****cg_arg_md, CgArg ****cg_arg_mc, const char *label, RationalDescr *rat_des)
void destroyCgArg (CgArg ***cg_arg_fg, CgArg ***cg_arg_md, CgArg ***cg_arg_mc, const char *label, RemezArg *remez_arg_md, RemezArg *remez_arg_mc)
 Automatic generation of required EigArg.
void generateEigArg (EigenDescr eigen)
 Free EigArg.
void destroyEigArg ()
 Set mass i, pole j as being included (used when splitting time scales)
void checkApprox (Float *mass, RemezArg *remez_arg, EigenDescr eigen)
 Check that the approximation is still valid.

Protected Attributes

int evolved
 < Has any evolution taken place?
int heatbathEval
 Has the energy been evaluated?
int energyEval
Float h_init
 frm_cg_arg_fg is specific to force gradient integrator and has no use otherwise.
CgArg *** frm_cg_arg_fg
CgArg *** frm_cg_arg_md
CgArg *** frm_cg_arg_mc
 Pointer to an array of structures containing solver parameters.
Vector ** frmn
 Array of vectors.
Vector ** frmn_d
 Array of vectors.
Vector ** frmn_tmp
 Used for Asqtad fraction splitting.
int total_size
 The sum of the rational approximation degrees used for the force.
int max_size
 The maximum degree of rational approximation used for the force.
Floatall_res
 An array holding the residues - used for asqtad force.
EigArg eig_arg
 AlgEig parameters.
char eig_file [256]
 Used to store eigenvalue filename.
CommonArg ca_eig
 Used to store eigenvalue filename.
Float ** lambda_low
Float ** lambda_high
 Used to store calculated eigenvalue bounds.

Detailed Description

Derived from AlgActionRational, this class allows independent evolution of partial fractions.that appear in the rational action.

Definition at line 395 of file alg_int.h.


Constructor & Destructor Documentation

< Dummy contructor - does nothing

Constructor called by AlgActionRationalQuotient

Definition at line 26 of file alg_action_rational.C.

cps::AlgActionRational::AlgActionRational ( AlgMomentum mom,
ActionRationalArg rat_arg,
int  traj_num = 0 
)

< First check n_masses bilinear = n_masses rational

< Allocate memory for the fermion CG arguments.

< construct approximation if necessary

< Allocate memory for the fermion CG arguments.

< For dwf we need the solution vector contiguous in memory

< For asqtad we need them checkerboarded with dslash applied

< Allocate fractionSplit

< This is just a dummy parameter when called through AlgActionRational

Definition at line 43 of file alg_action_rational.C.

References all_res, cps::ActionRationalArg::bi_arg, cps::ActionBilinearArg::bilinears, cps::ActionBilinearArg::bilinears_len, cps::RemezArg::degree, cps::ActionRationalArg::eigen, cps::EigenDescr::eigen_measure, cps::EIGEN_MEASURE_YES, cps::ERR, cps::F_CLASS_ASQTAD, cps::F_CLASS_DWF, cps::AlgActionBilinear::f_size, cps::AlgActionBilinear::f_vec_count, cps::AlgActionBilinear::fermion, frm_cg_arg_fg, frm_cg_arg_mc, frm_cg_arg_md, frmn, frmn_d, frmn_tmp, cps::Verbose::Func(), cps::Error::General(), generateApprox(), generateCgArg(), generateEigArg(), cps::GJP, cps::AlgActionBilinear::init(), cps::INT_RATIONAL, cps::AlgInt::int_type, cps::AlgActionBilinear::mass, max_size, cps::AlgActionBilinear::n_masses, cps::ActionRationalArg::rationals, cps::ActionRationalArg::rationals_len, cps::ActionRationalArg::rationals_val, cps::smalloc(), cps::GlobalJobParameter::TnodeSites(), total_size, cps::VRB, cps::GlobalJobParameter::XnodeSites(), cps::GlobalJobParameter::YnodeSites(), and cps::GlobalJobParameter::ZnodeSites().

Here is the call graph for this function:

Need to add restart method or similar so do not need to.

Definition at line 33 of file alg_action_rational.C.

Heat Bath for the pseudo-fermions (phi)

< Free memory for timescale split partial fraction

< Free splitCheck parameters

< Free dummy fractionSplit parameters

< Free memory for the residue coefficients

< Free memory for the residue coefficients

< Free memory for the frmn (pseudo fermion) solution fields.

< Free memory for the fermion CG arguments

< Must not free these until CG args are freed.

Definition at line 158 of file alg_action_rational.C.

References all_res, destroyApprox(), destroyCgArg(), destroyEigArg(), cps::ActionRationalArg::eigen, cps::EigenDescr::eigen_measure, cps::EIGEN_MEASURE_YES, cps::F_CLASS_DWF, cps::AlgActionBilinear::fermion, frm_cg_arg_fg, frm_cg_arg_mc, frm_cg_arg_md, frmn, frmn_d, frmn_tmp, cps::Verbose::Func(), cps::INT_RATIONAL, cps::AlgInt::int_type, cps::AlgActionBilinear::n_masses, cps::sfree(), total_size, and cps::VRB.

Here is the call graph for this function:


Member Function Documentation

void cps::AlgActionRational::checkApprox ( Float mass,
RemezArg remez_arg,
EigenDescr  eigen 
) [protected]

Check that all the partial fractions have been accounted for.

Check that the approximation bounds are still valid for the mc approx.

Definition at line 772 of file alg_action_rational.C.

References cps::RemezArg::degree, cps::ERR, cps::Error::General(), and cps::AlgActionBilinear::n_masses.

Referenced by cps::AlgActionRationalSplit::heatbath().

Here is the call graph for this function:

int cps::AlgActionRational::compareApprox ( RemezArg arg1,
RemezArg arg2 
) [static]
void cps::AlgActionRational::destroyApprox ( RemezArg remez_arg_md,
RemezArg remez_arg_mc 
) [protected]

Allocate and setup cg arguments.

Definition at line 552 of file alg_action_rational.C.

References cps::sfree().

Referenced by ~AlgActionRational(), and cps::AlgActionRationalQuotient::~AlgActionRationalQuotient().

Here is the call graph for this function:

void cps::AlgActionRational::destroyCgArg ( CgArg ***  cg_arg_fg,
CgArg ***  cg_arg_md,
CgArg ***  cg_arg_mc,
const char *  label,
RemezArg remez_arg_md,
RemezArg remez_arg_mc 
) [protected]

Automatic generation of required EigArg.

Definition at line 667 of file alg_action_rational.C.

References cps::RemezArg::degree, cps::AlgActionBilinear::n_masses, and cps::sfree().

Referenced by ~AlgActionRational(), and cps::AlgActionRationalQuotient::~AlgActionRationalQuotient().

Here is the call graph for this function:

Set mass i, pole j as being included (used when splitting time scales)

Definition at line 744 of file alg_action_rational.C.

References eig_arg, lambda_high, lambda_low, cps::EigArg::Mass, cps::EigArg::Mass_val, cps::EigArg::N_eig, and cps::sfree().

Referenced by ~AlgActionRational(), and cps::AlgActionRationalQuotient::~AlgActionRationalQuotient().

Here is the call graph for this function:

void cps::AlgActionRational::evolve ( Float  dt,
int  steps 
) [virtual]

evolve method relevant to split timescales

Implements cps::AlgActionBilinear.

Reimplemented in cps::AlgActionRationalQuotient, and cps::AlgActionRationalSplit.

Definition at line 285 of file alg_action_rational.C.

Referenced by cps::AlgActionRationalSplit::evolve().

void cps::AlgActionRational::evolve ( Float  dt,
int  steps,
int **  fractionSplit 
)
void cps::AlgActionRational::generateApprox ( Float mass,
RemezArg **  remez_arg_md,
RemezArg **  remez_arg_mc,
RationalDescr rat 
) [protected]
void cps::AlgActionRational::generateCgArg ( Float mass,
CgArg ****  cg_arg_fg,
CgArg ****  cg_arg_md,
CgArg ****  cg_arg_mc,
const char *  label,
RationalDescr rat_des 
) [protected]
void cps::AlgActionRational::init ( int  traj_num)

Definition at line 147 of file alg_action_rational.C.

References energyEval, evolved, cps::Verbose::Func(), heatbathEval, cps::AlgActionBilinear::init(), cps::AlgInt::traj, and cps::VRB.

Here is the call graph for this function:

void cps::AlgActionRational::prepare_fg ( Matrix force,
Float  dt_ratio 
) [virtual]
void cps::AlgActionRational::setSplit ( int  i,
int  j 
)

Set mass i, pole j as included.

Check that all of the partial fractions have been accounted for.

Definition at line 759 of file alg_action_rational.C.

References cps::ERR, cps::Error::General(), and cps::AlgActionBilinear::n_masses.

Referenced by cps::AlgActionRationalSplit::AlgActionRationalSplit().

Here is the call graph for this function:


Member Data Documentation

CommonArg cps::AlgActionRational::ca_eig [protected]

Used to store eigenvalue filename.

Definition at line 461 of file alg_int.h.

Referenced by checkApprox().

AlgEig parameters.

Definition at line 455 of file alg_int.h.

Referenced by checkApprox(), destroyEigArg(), and generateEigArg().

char cps::AlgActionRational::eig_file[256] [protected]

Used to store eigenvalue filename.

Definition at line 458 of file alg_int.h.

Referenced by checkApprox().

< Has any evolution taken place?

Has the heatbath been evaluated?

Definition at line 415 of file alg_int.h.

Referenced by energy(), cps::AlgActionRationalQuotient::energy(), evolve(), cps::AlgActionRationalQuotient::evolve(), heatbath(), cps::AlgActionRationalQuotient::heatbath(), and init().

Pointer to an array of structures containing solver parameters.

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

Definition at line 427 of file alg_int.h.

Referenced by AlgActionRational(), cps::AlgActionRationalQuotient::AlgActionRationalQuotient(), energy(), cps::AlgActionRationalQuotient::energy(), heatbath(), cps::AlgActionRationalQuotient::heatbath(), cps::AlgActionRationalQuotient::reweight(), ~AlgActionRational(), and cps::AlgActionRationalQuotient::~AlgActionRationalQuotient().

Array of vectors.

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

Definition at line 438 of file alg_int.h.

Referenced by AlgActionRational(), cps::AlgActionRationalQuotient::AlgActionRationalQuotient(), evolve(), cps::AlgActionRationalQuotient::evolve(), prepare_fg(), cps::AlgActionRationalQuotient::prepare_fg(), and ~AlgActionRational().

frm_cg_arg_fg is specific to force gradient integrator and has no use otherwise.

Definition at line 423 of file alg_int.h.

Referenced by energy(), cps::AlgActionRationalQuotient::energy(), heatbath(), and cps::AlgActionRationalQuotient::heatbath().

Has the energy been evaluated?

Definition at line 418 of file alg_int.h.

Referenced by evolve(), cps::AlgActionRationalQuotient::evolve(), heatbath(), cps::AlgActionRationalQuotient::heatbath(), and init().

Used to store calculated eigenvalue bounds.

Automatic generation of the rational approximation.

Definition at line 465 of file alg_int.h.

Referenced by destroyEigArg(), and generateEigArg().

Definition at line 463 of file alg_int.h.

Referenced by checkApprox(), destroyEigArg(), and generateEigArg().

The maximum degree of rational approximation used for the force.

Definition at line 449 of file alg_int.h.

Referenced by AlgActionRational(), and cps::AlgActionRationalQuotient::AlgActionRationalQuotient().

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

Definition at line 446 of file alg_int.h.

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


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