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

#include <helpers.h>

Public Member Functions

 KBlock (const KBlock &)
 
 KBlock (KBlock &&)
 
virtual ~KBlock ()
 
myint getUp (int index) const
 
myint getDown (int index) const
 
int getdim () const
 
int getK () const
 
int getL () const
 
const std::pair< myint, myint > & operator[] (int index) const
 
void Print () const
 

Private Member Functions

 KBlock (int K, int L, int Nu, int Nd)
 

Private Attributes

int L
 
int K
 
int Nu
 
int Nd
 
std::vector< std::pair< myint,
myint > > 
basis
 

Friends

class MomBasis
 

Detailed Description

Stores a single K block basis. Only has a public copy constructor. The MomBasis class is a friend and can make this classes after building a full momentum basis. We build these blocks once and refer everywhere to those objects then.

Definition at line 140 of file helpers.h.

Constructor & Destructor Documentation

KBlock::KBlock ( const KBlock orig)

Definition at line 222 of file helpers.cpp.

KBlock::KBlock ( KBlock &&  orig)

Definition at line 232 of file helpers.cpp.

virtual KBlock::~KBlock ( )
inlinevirtual

Definition at line 147 of file helpers.h.

KBlock::KBlock ( int  K,
int  L,
int  Nu,
int  Nd 
)
private
Parameters
Kthe K value
Lchain length
Nunumber of up electrons
Ndnumber of down electrons

Definition at line 214 of file helpers.cpp.

Member Function Documentation

int KBlock::getdim ( ) const

Definition at line 254 of file helpers.cpp.

+ Here is the caller graph for this function:

myint KBlock::getDown ( int  index) const

Definition at line 248 of file helpers.cpp.

+ Here is the call graph for this function:

int KBlock::getK ( ) const

Definition at line 259 of file helpers.cpp.

int KBlock::getL ( ) const

Definition at line 264 of file helpers.cpp.

myint KBlock::getUp ( int  index) const

Definition at line 242 of file helpers.cpp.

+ Here is the call graph for this function:

const std::pair< myint, myint > & KBlock::operator[] ( int  index) const

Get a basisstate with index

Parameters
indexthe index of the requested basisstate
Returns
a pair of spin up and spin down basissstate

Definition at line 274 of file helpers.cpp.

void KBlock::Print ( ) const

Definition at line 280 of file helpers.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

friend class MomBasis
friend

Definition at line 142 of file helpers.h.

Member Data Documentation

std::vector< std::pair<myint, myint> > KBlock::basis
private

Definition at line 171 of file helpers.h.

int KBlock::K
private

Definition at line 167 of file helpers.h.

int KBlock::L
private

Definition at line 166 of file helpers.h.

int KBlock::Nd
private

Definition at line 169 of file helpers.h.

int KBlock::Nu
private

Definition at line 168 of file helpers.h.


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