StatMech
Loading...
Searching...
No Matches
TransSector< RealType > Class Template Reference

Translation invariant sector of a many-body Hilbert space. More...

#include <TransSector.hpp>

Inheritance diagram for TransSector< RealType >:
Inheritance graph
Collaboration diagram for TransSector< RealType >:
Collaboration graph

Public Types

using TotalSpace = ManyBodySpinSpace
 
- Public Types inherited from SubSpace< TotalSpace_, ScalarType_ >
using TotalSpace = TotalSpace_
 
using Scalar = ScalarType_
 
using Real = typename Eigen::NumTraits< ScalarType_ >::Real
 

Public Member Functions

__host__ __device__ TransSector (int k, ManyBodySpinSpace const &mbHSpace)
 Construct a TransSector object from a ManyBodySpinSpace object.
 
__host__ __device__ TransSector (int k=0, int systemSize=0, int dimLoc=0)
 Default constructor.
 
__host__ __device__ int momentum () const
 
__host__ __device__ int rep (int j, int trans=0) const
 
__host__ __device__ int period (int j) const
 
- Public Member Functions inherited from SubSpace< TotalSpace_, ScalarType_ >
__host__ __device__ SubSpace (TotalSpace const &totalSpace)
 Construct a SubSpace object by copying totalSpace to its member variable (m_totalSpace)
 
__host__ __device__ SubSpace (TotalSpace &&totalSpace)
 Construct a SubSpace object by moving totalSpace to its member variable (m_totalSpace)
 
__host__ __device__ SubSpace ()=default
 Default constructor.
 
__host__ __device__ SubSpace (SubSpace const &other)=default
 Copy constructor.
 
template<typename Scalar_ >
__host__ __device__ SubSpace (SubSpace< TotalSpace_, Scalar_ > const &other)
 
__host__ __device__ SubSpace (SubSpace &&other)=default
 Move constructor.
 
__host__ __device__ ~SubSpace ()=default
 Destructor.
 
__host__ __device__ SubSpaceoperator= (SubSpace const &other)
 Copy assignment operator.
 
__host__ __device__ SubSpaceoperator= (SubSpace &&other)
 Move assignment operator.
 
__host__ __device__ bool operator== (SubSpace const &other) const
 Equality operator.
 
__host__ __device__ Matrix_tbasis ()
 
__host__ __device__ Matrix_t const & basis () const
 
__host__ __device__ TotalSpace const & totalSpace () const
 
__host__ __device__ int dimTot () const
 
- Public Member Functions inherited from HilbertSpace< Derived >
__host__ __device__ int dim () const
 
__host__ __device__ bool operator== (HilbertSpace const &other) const
 

Private Attributes

int m_momentum
 

Additional Inherited Members

- Protected Types inherited from SubSpace< TotalSpace_, ScalarType_ >
using Matrix_t = SparseCompressed< Scalar >
 
using Matrix_t = Eigen::SparseMatrix< Scalar >
 
- Protected Attributes inherited from SubSpace< TotalSpace_, ScalarType_ >
TotalSpace m_totalSpace
 
Matrix_t m_basisStates
 

Detailed Description

template<typename RealType = Real_t>
class TransSector< RealType >

Translation invariant sector of a many-body Hilbert space.

Template Parameters
Scalar_t
int
Matrix

Member Typedef Documentation

◆ TotalSpace

template<typename RealType = Real_t>
using TransSector< RealType >::TotalSpace = ManyBodySpinSpace

Constructor & Destructor Documentation

◆ TransSector() [1/2]

template<typename RealType = Real_t>
__host__ __device__ TransSector< RealType >::TransSector ( int  k,
ManyBodySpinSpace const &  mbHSpace 
)

Construct a TransSector object from a ManyBodySpinSpace object.

Parameters
k
mbHSpace

◆ TransSector() [2/2]

template<typename RealType = Real_t>
__host__ __device__ TransSector< RealType >::TransSector ( int  k = 0,
int  systemSize = 0,
int  dimLoc = 0 
)
inline

Default constructor.

Parameters
k
systemSize
dimLoc
40 : TransSector(k, ManyBodySpinSpace(systemSize, dimLoc)) {
41 debug_constructor_printf((Default));
42 }
Definition HilbertSpace.hpp:423
Translation invariant sector of a many-body Hilbert space.
Definition TransSector.hpp:19

Member Function Documentation

◆ momentum()

template<typename RealType = Real_t>
__host__ __device__ int TransSector< RealType >::momentum ( ) const
inline
44{ return m_momentum; };
int m_momentum
Definition TransSector.hpp:21

◆ period()

template<typename RealType = Real_t>
__host__ __device__ int TransSector< RealType >::period ( int  j) const
inline
52 {
53 assert(j < this->dim() && "j < this->dim()");
54 return this->basis().outerIndexPtr()[j + 1] - this->basis().outerIndexPtr()[j];
55 };
__host__ __device__ int dim() const
Definition HilbertSpace.hpp:34
__host__ __device__ int * outerIndexPtr() const
Definition MatrixUtils.cuh:420
__host__ __device__ Matrix_t & basis()
Definition HilbertSpace.hpp:668

◆ rep()

template<typename RealType = Real_t>
__host__ __device__ int TransSector< RealType >::rep ( int  j,
int  trans = 0 
) const
inline
46 {
47 int innerId = this->basis().outerIndexPtr()[j] + (trans % this->period(j));
48 assert(innerId < this->basis().nonZeros() && "innerId < this->basis().nonZeros()");
49 return this->basis().innerIndexPtr()[innerId];
50 };
__host__ __device__ int * innerIndexPtr() const
Definition MatrixUtils.cuh:421
__host__ __device__ int period(int j) const
Definition TransSector.hpp:52

Member Data Documentation

◆ m_momentum

template<typename RealType = Real_t>
int TransSector< RealType >::m_momentum
private

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