OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
RealDiracMatrix.h
Go to the documentation of this file.
1//
2// Class: RealDiracMatrix
3// Real Dirac matrix class.
4// They're ordered after the paper of Dr. C. Baumgarten: "Use of real Dirac matrices in two-dimensional coupled linear optics".
5// The diagonalizing method is based on the paper "Geometrical method of decoupling" (2012) of Dr. C. Baumgarten.
6//
7// Copyright (c) 2014, 2020 Christian Baumgarten, Paul Scherrer Institut, Villigen PSI, Switzerland
8// Matthias Frey, ETH Zürich
9// All rights reserved
10//
11// Implemented as part of the Semester thesis by Matthias Frey
12// "Matched Distributions in Cyclotrons"
13//
14// This file is part of OPAL.
15//
16// OPAL is free software: you can redistribute it and/or modify
17// it under the terms of the GNU General Public License as published by
18// the Free Software Foundation, either version 3 of the License, or
19// (at your option) any later version.
20//
21// You should have received a copy of the GNU General Public License
22// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
23//
24#ifndef RDM_H
25#define RDM_H
26
27#include <boost/numeric/ublas/matrix_sparse.hpp>
28#include <boost/numeric/ublas/matrix.hpp>
29#include <boost/numeric/ublas/vector.hpp>
30
32{
33public:
35 typedef boost::numeric::ublas::compressed_matrix<
36 double,
37 boost::numeric::ublas::row_major
39
41 typedef boost::numeric::ublas::matrix<double> matrix_t;
43 typedef boost::numeric::ublas::vector<
44 double,
45 std::vector<double>
47
50
56
66
75
81
82private:
92 void transform(matrix_t&, short, double, sparse_matrix_t&, sparse_matrix_t&);
93
102 void transform(short, double, sparse_matrix_t&, sparse_matrix_t&);
103
112 void update(matrix_t& sigma, short i, sparse_matrix_t& R, sparse_matrix_t& invR);
113};
114
115#endif
boost::numeric::ublas::compressed_matrix< double, boost::numeric::ublas::row_major > sparse_matrix_t
Sparse matrix type definition.
RealDiracMatrix()
Default constructor (sets only NumOfRDMs and DimOfRDMs)
void transform(matrix_t &, short, double, sparse_matrix_t &, sparse_matrix_t &)
matrix_t symplex(const matrix_t &)
boost::numeric::ublas::matrix< double > matrix_t
Dense matrix type definition.
boost::numeric::ublas::vector< double, std::vector< double > > vector_t
Dense vector type definition.
sparse_matrix_t getRDM(short)
void update(matrix_t &sigma, short i, sparse_matrix_t &R, sparse_matrix_t &invR)
void diagonalize(matrix_t &, sparse_matrix_t &, sparse_matrix_t &)