OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
#include <RealDiracMatrix.h>
Public Types | |
typedef boost::numeric::ublas::compressed_matrix< double, boost::numeric::ublas::row_major > | sparse_matrix_t |
Sparse matrix type definition. More... | |
typedef boost::numeric::ublas::matrix< double > | matrix_t |
Dense matrix type definition. More... | |
typedef boost::numeric::ublas::vector< double, std::vector< double > > | vector_t |
Dense vector type definition. More... | |
Public Member Functions | |
RealDiracMatrix () | |
Default constructor (sets only NumOfRDMs and DimOfRDMs) More... | |
sparse_matrix_t | getRDM (short) |
void | diagonalize (matrix_t &, sparse_matrix_t &, sparse_matrix_t &) |
sparse_matrix_t | diagonalize (matrix_t &) |
matrix_t | symplex (const matrix_t &) |
Private Member Functions | |
void | transform (matrix_t &, short, double, sparse_matrix_t &, sparse_matrix_t &) |
void | transform (short, double, sparse_matrix_t &, sparse_matrix_t &) |
void | update (matrix_t &sigma, short i, sparse_matrix_t &R, sparse_matrix_t &invR) |
Definition at line 31 of file RealDiracMatrix.h.
typedef boost::numeric::ublas::matrix<double> RealDiracMatrix::matrix_t |
Dense matrix type definition.
Definition at line 41 of file RealDiracMatrix.h.
typedef boost::numeric::ublas::compressed_matrix< double, boost::numeric::ublas::row_major > RealDiracMatrix::sparse_matrix_t |
Sparse matrix type definition.
Definition at line 38 of file RealDiracMatrix.h.
typedef boost::numeric::ublas::vector< double, std::vector<double> > RealDiracMatrix::vector_t |
Dense vector type definition.
Definition at line 46 of file RealDiracMatrix.h.
RealDiracMatrix::RealDiracMatrix | ( | ) |
Default constructor (sets only NumOfRDMs and DimOfRDMs)
Definition at line 32 of file RealDiracMatrix.cpp.
RealDiracMatrix::sparse_matrix_t RealDiracMatrix::diagonalize | ( | matrix_t & | sigma | ) |
Diagonalizes (in-place) the 4x4 sigma matrix. This algorithm is Implemented according to https://arxiv.org/abs/1205.3601
sigma | is the 4x4 sigma matrix |
Definition at line 149 of file RealDiracMatrix.cpp.
References getRDM(), prod(), Attrib::Distribution::R, and update().
void RealDiracMatrix::diagonalize | ( | matrix_t & | Ms, |
sparse_matrix_t & | R, | ||
sparse_matrix_t & | invR | ||
) |
Brings a 4x4 symplex matrix into Hamilton form and computes the transformation matrix and its inverse
Ms | is a 4x4 symplex matrix |
R | is the 4x4 transformation matrix (gets computed) |
invR | is the 4x4 inverse transformation matrix (gets computed) |
Definition at line 62 of file RealDiracMatrix.cpp.
References atan2(), matt_boost::cross_prod(), fabs(), getRDM(), prod(), Attrib::Distribution::R, matt_boost::trace(), and transform().
Referenced by SigmaGenerator::decouple(), and Distribution::generateMatchedGauss().
RealDiracMatrix::sparse_matrix_t RealDiracMatrix::getRDM | ( | short | i | ) |
i | specifying the matrix (has to be in the range from 0 to 15) |
Definition at line 35 of file RealDiracMatrix.cpp.
Referenced by diagonalize(), symplex(), and transform().
RealDiracMatrix::matrix_t RealDiracMatrix::symplex | ( | const matrix_t & | M | ) |
M | 4x4 real-valued matrix |
Definition at line 169 of file RealDiracMatrix.cpp.
References getRDM().
Referenced by SigmaGenerator::decouple().
|
private |
Applies a rotation to the matrix M by a given angle
M | is the matrix to be transformed |
i | is the i-th RDM used for transformation |
phi | is the angle of rotation |
Rtot | is a reference to the current transformation matrix |
invRtot | is a reference to the inverse of the current transformation matrix |
Definition at line 178 of file RealDiracMatrix.cpp.
References prod(), Attrib::Distribution::R, and transform().
Referenced by diagonalize(), transform(), and update().
|
private |
Obtain transformation matrices.
i | is the i-th RDM used for transformation |
phi | is the angle of rotation |
R | is a reference to the transformation matrix |
invR | is a reference to the inverse of the transformation matrix |
Definition at line 194 of file RealDiracMatrix.cpp.
References cos(), cosh(), getRDM(), Attrib::Distribution::R, sin(), and sinh().
|
private |
Update quantites to decouple the sigma-matrix
sigma | current state of sigma-matrix |
i | is the i-th step |
R | is a reference to the transformation matrix |
invR | is a reference to the inverse of the transformation matrix |
Definition at line 211 of file RealDiracMatrix.cpp.
References atan2(), matt_boost::cross_prod(), Attrib::Distribution::R, and transform().
Referenced by diagonalize().