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

cps::Mom Class Reference

A class to compute momentum phases. More...

#include <mom.h>

List of all members.

Public Member Functions

 Mom ()
virtual ~Mom ()
void Init (MomArg *arg)
 Initialisation of parameters.
void run (void)
 Calculation of the phases.
Complex fact (int imom, int *s)
 Get a particular phase.


Detailed Description

A class to compute momentum phases.

The phases exp(ip.x) are computed where x is the lattice site coordinates relative to some source point and p is a momentum. The momentum is zero in a chosen direction of propagation. The values of the other momentum components $p_\mu$ range from 0 to a chosen maximum in lattice units i.e. in units of $ 2\pi/L_\mu $ where L is the size of the lattice in the $\mu$ direction. If desired, momenta of the same magnitude can be averaged (this should only be done if the lattice sizes are equal).

Each different momentum used is assigned a number. These numbers and the corresponding momenutm components are written to a file called mom_table.log.

Definition at line 60 of file mom.h.


Constructor & Destructor Documentation

cps::Mom::Mom  ) 
 

Definition at line 33 of file mom.C.

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

cps::Mom::~Mom  )  [virtual]
 

Todo:
Why is the destructor virtual? Is this class used polymorphically?

Definition at line 42 of file mom.C.

References cps::Verbose::Func(), cps::sfree(), cps::Verbose::Sfree(), and cps::VRB.


Member Function Documentation

Complex cps::Mom::fact int  imom,
int *  s
 

Get a particular phase.

Parameters:
imom The number referring to the required momentum (a table of momenta and their corresponding numbers is written to a file called mom_table.log by ::run.
s The coordinates of the lattice site at which the phase is required.
Returns:
The complex phase.

Definition at line 241 of file mom.C.

References cps::Complex, cps::Verbose::Func(), and cps::VRB.

void cps::Mom::Init MomArg arg  ) 
 

Initialisation of parameters.

Parameters:
arg The set of run-time parameters for the momentum computation.
Todo:
Why is this stuff not in the constructor?

Definition at line 60 of file mom.C.

References cps::Complex, cps::MomArg::deg, cps::MomArg::dir, cps::ERR, cps::Verbose::Func(), cps::GJP, cps::MomArg::max_p1, cps::MomArg::max_p2, cps::MomArg::max_p3, cps::MomArg::no_of_momenta, cps::Error::Pointer(), cps::Verbose::Smalloc(), cps::smalloc(), cps::MomArg::src_begin, cps::MomArg::src_end, cps::GlobalJobParameter::Tnodes(), cps::GlobalJobParameter::TnodeSites(), cps::GlobalJobParameter::VolNodeSites(), cps::VRB, cps::GlobalJobParameter::Xnodes(), cps::GlobalJobParameter::XnodeSites(), cps::GlobalJobParameter::Ynodes(), cps::GlobalJobParameter::YnodeSites(), cps::GlobalJobParameter::Znodes(), and cps::GlobalJobParameter::ZnodeSites().

void cps::Mom::run void   ) 
 

Calculation of the phases.

This method actually computes all the phases and stores them internally.

Postcondition:
A table of momenta and their corresponding numbers by which they can be identified is written to a file called mom_table.log.

Definition at line 124 of file mom.C.

References cps::ERR, cps::Float, cps::Verbose::Func(), cps::Error::General(), cps::GJP, cps::Rcomplex::imag(), cps::Rcomplex::real(), cps::GlobalJobParameter::TnodeCoor(), cps::GlobalJobParameter::TnodeSites(), cps::VRB, cps::GlobalJobParameter::XnodeCoor(), cps::GlobalJobParameter::XnodeSites(), cps::GlobalJobParameter::YnodeCoor(), cps::GlobalJobParameter::YnodeSites(), cps::GlobalJobParameter::ZnodeCoor(), and cps::GlobalJobParameter::ZnodeSites().


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