OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
RDM< Value_type, Size_type > Class Template Reference

Real Dirac Matrix class. More...

#include <rdm.h>

Public Types

typedef Value_type value_type
 Type of variables. More...
 
typedef Size_type size_type
 Type for specifying sizes. More...
 
typedef
boost::numeric::ublas::compressed_matrix
< value_type,
boost::numeric::ublas::row_major > 
sparse_matrix_type
 Sparse matrix type definition. More...
 
typedef
boost::numeric::ublas::matrix
< value_type
matrix_type
 Dense matrix type definition. More...
 
typedef
boost::numeric::ublas::vector
< value_type
vector_type
 Dense vector type definition. More...
 

Public Member Functions

 RDM ()
 Default constructor (sets only NumOfRDMs and DimOfRDMs) More...
 
sparse_matrix_type getRDM (short)
 Returns the i-th Real Dirac matrix. More...
 
vector_type decompose (const matrix_type &)
 Decomposes a real-valued 4x4 matrix into a linear combination and returns a vector containing the coefficients. More...
 
matrix_type combine (const vector_type &)
 Takes a vector of coefficients, evaluates the linear combination of RDMs with these coefficients and returns a 4x4 matrix. More...
 
void diagonalize (matrix_type &, sparse_matrix_type &, sparse_matrix_type &)
 Brings a 4x4 symplex matrix into Hamilton form and computes the transformation matrix and its inverse. More...
 
matrix_type symplex (const matrix_type &)
 Returns the symplex part of a 4x4 real-valued matrix. More...
 
matrix_type cosymplex (const matrix_type &)
 Returns the cosymplex part of a 4x4 real-valued matrix. More...
 

Public Attributes

short NumOfRDMs
 The number of real Dirac matrices. More...
 
short DimOfRDMs
 The matrix dimension (4x4) More...
 

Private Member Functions

void transform (matrix_type &, short, value_type, sparse_matrix_type &, sparse_matrix_type &)
 Applies a rotation to the matrix M by a given angle. More...
 

Detailed Description

template<typename Value_type, typename Size_type>
class RDM< Value_type, Size_type >

Real Dirac Matrix class.

Definition at line 27 of file rdm.h.

Member Typedef Documentation

template<typename Value_type , typename Size_type >
typedef boost::numeric::ublas::matrix<value_type> RDM< Value_type, Size_type >::matrix_type

Dense matrix type definition.

Definition at line 37 of file rdm.h.

template<typename Value_type , typename Size_type >
typedef Size_type RDM< Value_type, Size_type >::size_type

Type for specifying sizes.

Definition at line 33 of file rdm.h.

template<typename Value_type , typename Size_type >
typedef boost::numeric::ublas::compressed_matrix<value_type,boost::numeric::ublas::row_major> RDM< Value_type, Size_type >::sparse_matrix_type

Sparse matrix type definition.

Definition at line 35 of file rdm.h.

template<typename Value_type , typename Size_type >
typedef Value_type RDM< Value_type, Size_type >::value_type

Type of variables.

Definition at line 31 of file rdm.h.

template<typename Value_type , typename Size_type >
typedef boost::numeric::ublas::vector<value_type> RDM< Value_type, Size_type >::vector_type

Dense vector type definition.

Definition at line 39 of file rdm.h.

Constructor & Destructor Documentation

template<typename Value_type , typename Size_type >
RDM< Value_type, Size_type >::RDM ( )

Default constructor (sets only NumOfRDMs and DimOfRDMs)

Definition at line 104 of file rdm.h.

Member Function Documentation

template<typename Value_type , typename Size_type >
RDM< Value_type, Size_type >::matrix_type RDM< Value_type, Size_type >::combine ( const vector_type coeffs)

Takes a vector of coefficients, evaluates the linear combination of RDMs with these coefficients and returns a 4x4 matrix.

Parameters
coeffsis a vector of coefficients (at most length NumOfRDMs)

Definition at line 161 of file rdm.h.

template<typename Value_type , typename Size_type >
RDM< Value_type, Size_type >::matrix_type RDM< Value_type, Size_type >::cosymplex ( const matrix_type M)

Returns the cosymplex part of a 4x4 real-valued matrix.

Parameters
M4x4 real-valued matrix

Definition at line 271 of file rdm.h.

template<typename Value_type , typename Size_type >
RDM< Value_type, Size_type >::vector_type RDM< Value_type, Size_type >::decompose ( const matrix_type M)

Decomposes a real-valued 4x4 matrix into a linear combination and returns a vector containing the coefficients.

Parameters
Man arbitrary real-valued 4x4 matrix

Definition at line 132 of file rdm.h.

References prod(), and matt_boost::trace().

Here is the call graph for this function:

template<typename Value_type , typename Size_type >
void RDM< Value_type, Size_type >::diagonalize ( matrix_type Ms,
sparse_matrix_type R,
sparse_matrix_type invR 
)

Brings a 4x4 symplex matrix into Hamilton form and computes the transformation matrix and its inverse.

Parameters
Msis a 4x4 symplex matrix
Ris the 4x4 transformation matrix (gets computed)
invRis the 4x4 inverse transformation matrix (gets computed)

Definition at line 176 of file rdm.h.

References atan2(), matt_boost::cross_prod(), fabs(), prod(), Attrib::Distribution::R, and matt_boost::trace().

Here is the call graph for this function:

template<typename Value_type , typename Size_type >
RDM< Value_type, Size_type >::sparse_matrix_type RDM< Value_type, Size_type >::getRDM ( short  i)

Returns the i-th Real Dirac matrix.

Parameters
ispecifying the matrix (has to be in the range from 0 to 15)

Definition at line 107 of file rdm.h.

template<typename Value_type , typename Size_type >
RDM< Value_type, Size_type >::matrix_type RDM< Value_type, Size_type >::symplex ( const matrix_type M)

Returns the symplex part of a 4x4 real-valued matrix.

Parameters
M4x4 real-valued matrix

Definition at line 261 of file rdm.h.

template<typename Value_type , typename Size_type >
void RDM< Value_type, Size_type >::transform ( matrix_type M,
short  i,
value_type  phi,
sparse_matrix_type Rtot,
sparse_matrix_type invRtot 
)
private

Applies a rotation to the matrix M by a given angle.

Parameters
Mis the matrix to be transformed
iis the i-th RDM used for transformation
phiis the angle of rotation
Rtotis a reference to the current transformation matrix
invRtotis a reference to the inverse of the current transformation matrix

Definition at line 284 of file rdm.h.

References cos(), cosh(), prod(), Attrib::Distribution::R, sin(), and sinh().

Here is the call graph for this function:

Member Data Documentation

template<typename Value_type , typename Size_type >
short RDM< Value_type, Size_type >::DimOfRDMs

The matrix dimension (4x4)

Definition at line 85 of file rdm.h.

template<typename Value_type , typename Size_type >
short RDM< Value_type, Size_type >::NumOfRDMs

The number of real Dirac matrices.

Definition at line 83 of file rdm.h.


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