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

#include <helpers.h>

Public Member Functions

 SpinBasis (int L, int Nu, int Nd, BasisList &)
 
 SpinBasis (const char *filename)
 
virtual ~SpinBasis ()
 
int getnumblocks () const
 
void SaveBasis (const char *filename) const
 
void ReadBasis (const char *filename)
 
std::pair< int, int > getKS (int index) const
 
const SubBasisgetBlock (int index) const
 

Private Attributes

int L
 number of sites More...
 
int Nu
 number of up electrons More...
 
int Nd
 number of down electrons More...
 
std::vector< class SubBasisbasis
 list of all the basis More...
 
std::vector< std::pair< int,
int > > 
ind
 keeps track which K and S belong to a subbasis More...
 

Detailed Description

Stores the actual Spinbasis as a linear combination of KBlock basis

Definition at line 311 of file helpers.h.

Constructor & Destructor Documentation

SpinBasis::SpinBasis ( int  L,
int  Nu,
int  Nd,
BasisList orig 
)

Store the spin basis

Parameters
Lthe length of the system
Nunumber of up electrons
Ndnumber of down electrons
origthe BasisList from which to extract the basis. The BasisList will be empted after this

Definition at line 970 of file helpers.cpp.

+ Here is the call graph for this function:

SpinBasis::SpinBasis ( const char *  filename)

Read a SpinBasis from a file

Parameters
filenamethe name of the file to read

Definition at line 1000 of file helpers.cpp.

+ Here is the call graph for this function:

virtual SpinBasis::~SpinBasis ( )
inlinevirtual

Definition at line 316 of file helpers.h.

Member Function Documentation

const SubBasis & SpinBasis::getBlock ( int  index) const
Parameters
indexthe number of the block
Returns
the SubBasis block with index=index

Definition at line 1243 of file helpers.cpp.

std::pair< int, int > SpinBasis::getKS ( int  index) const

Return the <K,S> pair belong to block with index index

Parameters
indexthe index of the block
Returns
a pair with the quantum numbers K and S

Definition at line 1234 of file helpers.cpp.

int SpinBasis::getnumblocks ( ) const
Returns
The number of blocks in the basis

Definition at line 1008 of file helpers.cpp.

void SpinBasis::ReadBasis ( const char *  filename)

Definition at line 1117 of file helpers.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SpinBasis::SaveBasis ( const char *  filename) const

Save the basis to a HDF5 file

Parameters
filenamethe name of the file

Definition at line 1017 of file helpers.cpp.

Member Data Documentation

std::vector<class SubBasis> SpinBasis::basis
private

list of all the basis

Definition at line 337 of file helpers.h.

std::vector< std::pair<int,int> > SpinBasis::ind
private

keeps track which K and S belong to a subbasis

Definition at line 340 of file helpers.h.

int SpinBasis::L
private

number of sites

Definition at line 330 of file helpers.h.

int SpinBasis::Nd
private

number of down electrons

Definition at line 334 of file helpers.h.

int SpinBasis::Nu
private

number of up electrons

Definition at line 332 of file helpers.h.


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