HubbardGPU
Hubbard diagonalisation on the GPU (and CPU)
 All Classes Files Functions Variables Typedefs Friends Macros
SubBasis Class Reference

#include <helpers.h>

Public Member Functions

 SubBasis ()
 
 SubBasis (int K, MomBasis &orig, int dim)
 
 SubBasis (const SubBasis &orig)
 
 SubBasis (SubBasis &&orig)
 
virtual ~SubBasis ()
 
SubBasisoperator= (const SubBasis &orig)
 
SubBasisoperator= (SubBasis &&orig)
 
int getdim () const
 
int getspacedim () const
 
void Print () const
 
void Slad_min (SubBasis &orig)
 
void Get (int index, myint &upket, myint &downket) const
 
std::pair< myint, myintGet (int index) const
 
double GetCoeff (int i, int j) const
 
double & GetCoeff (int i, int j)
 
void SetCoeff (int i, int j, double value)
 
int getindex (myint upket, myint downket) const
 
void Normalize ()
 
void ToSparseMatrix ()
 
const SparseMatrix_CCSgetSparse () const
 
void SetCoeff (matrix &&coeffs)
 

Private Attributes

int L
 number of sites More...
 
int Nu
 number of up electrons More...
 
int Nd
 number of up electrons More...
 
std::unique_ptr< class matrix,
class MyDeleter
coeffs
 the coefficient of the basis More...
 
std::unique_ptr< class
SparseMatrix_CCS
s_coeffs
 same as above but sparse. You have to fill it first More...
 
std::shared_ptr< class KBlockbasis
 shared pointer to KBlock basis. We all share the pointer. More...
 

Friends

class SpinBasis
 

Detailed Description

Stores a basis in a K block. Has a coefficient matrix that stores all the basis vector of this subbasis as linear combination in a KBlock basis.

Definition at line 200 of file helpers.h.

Constructor & Destructor Documentation

SubBasis::SubBasis ( )
inline

Definition at line 205 of file helpers.h.

+ Here is the caller graph for this function:

SubBasis::SubBasis ( int  K,
MomBasis orig,
int  dim 
)
Parameters
Kwhich K block
origthe basis from which to select a K block
dimthe dimension of the subbasis

Definition at line 507 of file helpers.cpp.

+ Here is the call graph for this function:

SubBasis::SubBasis ( const SubBasis orig)

Definition at line 542 of file helpers.cpp.

SubBasis::SubBasis ( SubBasis &&  orig)

Definition at line 562 of file helpers.cpp.

virtual SubBasis::~SubBasis ( )
inlinevirtual

Definition at line 209 of file helpers.h.

Member Function Documentation

void SubBasis::Get ( int  index,
myint upket,
myint downket 
) const

Definition at line 719 of file helpers.cpp.

+ Here is the call graph for this function:

std::pair< myint, myint > SubBasis::Get ( int  index) const

Definition at line 727 of file helpers.cpp.

double SubBasis::GetCoeff ( int  i,
int  j 
) const

Definition at line 732 of file helpers.cpp.

double & SubBasis::GetCoeff ( int  i,
int  j 
)

Definition at line 737 of file helpers.cpp.

int SubBasis::getdim ( ) const
Returns
the dimension of the subspace

Definition at line 635 of file helpers.cpp.

+ Here is the caller graph for this function:

int SubBasis::getindex ( myint  upket,
myint  downket 
) const
Parameters
upketthe up ket
downketthe down ket
Returns
the index of the basisvector with these kets

Definition at line 659 of file helpers.cpp.

+ Here is the caller graph for this function:

int SubBasis::getspacedim ( ) const
Returns
the dimension of the parent space in which this subspace is spanned

Definition at line 646 of file helpers.cpp.

+ Here is the caller graph for this function:

const SparseMatrix_CCS & SubBasis::getSparse ( ) const

Access operator for the Sparse matrix. First call ToSparseMatrix().

Returns
the sparse matrix

Definition at line 787 of file helpers.cpp.

void SubBasis::Normalize ( )

Normalize all basisvectors in this subspace

Definition at line 755 of file helpers.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SubBasis & SubBasis::operator= ( const SubBasis orig)

Definition at line 572 of file helpers.cpp.

SubBasis & SubBasis::operator= ( SubBasis &&  orig)

Definition at line 594 of file helpers.cpp.

void SubBasis::Print ( ) const

Definition at line 609 of file helpers.cpp.

+ Here is the call graph for this function:

void SubBasis::SetCoeff ( int  i,
int  j,
double  value 
)

Definition at line 742 of file helpers.cpp.

void SubBasis::SetCoeff ( matrix &&  coeffs)

Definition at line 747 of file helpers.cpp.

void SubBasis::Slad_min ( SubBasis orig)

Do a ladder operator of S^- on a SubBasis and store it in this SubBasis

Parameters
origthe original SubBasis on which we ladder

Definition at line 674 of file helpers.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SubBasis::ToSparseMatrix ( )

Converts the coefficient matrix to a sparse format and delete the dense matrix afterwards

Definition at line 774 of file helpers.cpp.

Friends And Related Function Documentation

friend class SpinBasis
friend

Definition at line 202 of file helpers.h.

Member Data Documentation

std::shared_ptr<class KBlock> SubBasis::basis
private

shared pointer to KBlock basis. We all share the pointer.

Definition at line 258 of file helpers.h.

std::unique_ptr<class matrix, class MyDeleter> SubBasis::coeffs
private

the coefficient of the basis

Definition at line 252 of file helpers.h.

int SubBasis::L
private

number of sites

Definition at line 245 of file helpers.h.

int SubBasis::Nd
private

number of up electrons

Definition at line 249 of file helpers.h.

int SubBasis::Nu
private

number of up electrons

Definition at line 247 of file helpers.h.

std::unique_ptr<class SparseMatrix_CCS> SubBasis::s_coeffs
private

same as above but sparse. You have to fill it first

Definition at line 255 of file helpers.h.


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