HPhi++
3.1.0
|
Generating Hilbert spaces. More...
#include <bitcalc.hpp>
#include "common/setmemory.hpp"
#include "FileIO.hpp"
#include "sz.hpp"
#include "wrapperMPI.hpp"
#include "xsetmem.hpp"
#include <iostream>
Go to the source code of this file.
Functions | |
int | child_omp_sz_Kondo_hacker (long int ib, long int ihfbit, struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_, long int *list_jb_) |
calculating restricted Hilbert space for Kondo-GC systems More... | |
long int | Binomial (int n, int k, long int **comb, int Nsite) |
int | child_omp_sz (long int ib, long int ihfbit, struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_, long int *list_jb_) |
calculating restricted Hilbert space for Hubbard systems More... | |
int | child_omp_sz_hacker (long int ib, long int ihfbit, struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_, long int *list_jb_) |
efficient version of calculating restricted Hilbert space for Hubbard systems using snoob details of snoob is found in S.H. Warren, Hacker’s Delight, second ed., Addison-Wesley, ISBN: 0321842685, 2012. More... | |
int | child_omp_sz_Kondo (long int ib, long int ihfbit, struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_, long int *list_jb_) |
calculating restricted Hilbert space for Kondo systems More... | |
int | child_omp_sz_KondoGC (long int ib, long int ihfbit, struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_, long int *list_jb_) |
int | child_omp_sz_spin (long int ib, long int ihfbit, int N, struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_, long int *list_jb_) |
calculating restricted Hilbert space for spin-1/2 systems More... | |
int | child_omp_sz_spin_hacker (long int ib, long int ihfbit, int N, struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_, long int *list_jb_) |
efficient version of calculating restricted Hilbert space for spin-1/2 systems details of snoob is found in S.H. Warren, Hacker’s Delight, second ed., Addison-Wesley, ISBN: 0321842685, 2012. More... | |
int | child_omp_sz_GeneralSpin (long int ib, long int ihfbit, struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_, long int *list_2_1_Sz_, long int *list_2_2_Sz_, long int *list_jb_) |
calculating restricted Hilbert space for general spin systems (S>1/2) More... | |
int | Read_sz (struct BindStruct *X, const long int irght, const long int ilft, const long int ihfbit, long int *i_max) |
reading the list of the restricted Hilbert space More... | |
int | sz (struct BindStruct *X, long int *list_1_, long int *list_2_1_, long int *list_2_2_) |
generating Hilbert space More... | |
Generating Hilbert spaces.
calculating binomial coefficients
[in] | n | n for \(_nC_k = \frac{n!}{(n-k)!k!}\) |
[in] | k | k for \(_nC_k = \frac{n!}{(n-k)!k!}\) |
[out] | comb | binomial coefficients \(_nC_k\) |
[in] | Nsite | # of sites |
Definition in file sz.cpp.
long int Binomial | ( | int | n, |
int | k, | ||
long int ** | comb, | ||
int | Nsite | ||
) |
int child_omp_sz | ( | long int | ib, |
long int | ihfbit, | ||
struct BindStruct * | X, | ||
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_, | ||
long int * | list_jb_ | ||
) |
calculating restricted Hilbert space for Hubbard systems
[in] | ib | upper half bit of i |
[in] | ihfbit | 2^(Ns/2) |
[in] | X | |
[out] | list_1_ | list_1_[icnt] = i : i is divided into ia and ib (i=ib*ihfbit+ia) |
[out] | list_2_1_ | list_2_1_[ib] = jb |
[out] | list_2_2_ | list_2_2_[ia] = ja : icnt=jb+ja |
[in] | list_jb_ | list_jb_[ib] = jb |
[in] | ib | |
[in] | ihfbit | |
[in] | X | |
[out] | list_1_ | |
[out] | list_2_1_ | |
[out] | list_2_2_ | |
[in] | list_jb_ |
Definition at line 227 of file sz.cpp.
References BindStruct::Check, BindStruct::Def, DefineList::iCalcModel, DefineList::Ndown, DefineList::Ne, DefineList::Nsite, DefineList::Nup, CheckList::sdim, and DefineList::Tpow.
Referenced by sz().
int child_omp_sz_GeneralSpin | ( | long int | ib, |
long int | ihfbit, | ||
struct BindStruct * | X, | ||
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_, | ||
long int * | list_2_1_Sz_, | ||
long int * | list_2_2_Sz_, | ||
long int * | list_jb_ | ||
) |
calculating restricted Hilbert space for general spin systems (S>1/2)
[in] | ib | upper half bit of i |
[in] | ihfbit | 2^(Ns/2) |
[in] | X | |
[out] | list_1_ | list_1_[icnt] = i : i is divided into ia and ib (i=ib*ihfbit+ia) |
[out] | list_2_1_ | list_2_1_[ib] = jb |
[out] | list_2_2_ | list_2_2_[ia] = ja : icnt=jb+ja |
[out] | list_2_1_Sz_ | |
[out] | list_2_2_Sz_ | |
[in] | list_jb_ | list_jb_[ib] = jb |
Definition at line 772 of file sz.cpp.
References BindStruct::Def, Read_sz(), and DefineList::Total2Sz.
Referenced by sz().
int child_omp_sz_hacker | ( | long int | ib, |
long int | ihfbit, | ||
struct BindStruct * | X, | ||
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_, | ||
long int * | list_jb_ | ||
) |
efficient version of calculating restricted Hilbert space for Hubbard systems using snoob details of snoob is found in S.H. Warren, Hacker’s Delight, second ed., Addison-Wesley, ISBN: 0321842685, 2012.
[in] | ib | upper half bit of i |
[in] | ihfbit | 2^(Ns/2) |
[in] | X | |
[out] | list_1_ | list_1_[icnt] = i : i is divided into ia and ib (i=ib*ihfbit+ia) |
[out] | list_2_1_ | list_2_1_[ib] = jb |
[out] | list_2_2_ | list_2_2_[ia] = ja : icnt=jb+ja |
[in] | list_jb_ | list_jb_[ib] = jb |
Definition at line 323 of file sz.cpp.
References BindStruct::Check, BindStruct::Def, DefineList::iCalcModel, DefineList::Ndown, DefineList::Ne, DefineList::Nsite, DefineList::Nup, CheckList::sdim, snoob(), and DefineList::Tpow.
Referenced by sz().
int child_omp_sz_Kondo | ( | long int | ib, |
long int | ihfbit, | ||
struct BindStruct * | X, | ||
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_, | ||
long int * | list_jb_ | ||
) |
calculating restricted Hilbert space for Kondo systems
[in] | ib | upper half bit of i |
[in] | ihfbit | 2^(Ns/2) |
[in] | X | |
[out] | list_1_ | list_1_[icnt] = i : i is divided into ia and ib (i=ib*ihfbit+ia) |
[out] | list_2_1_ | list_2_1_[ib] = jb |
[out] | list_2_2_ | list_2_2_[ia] = ja : icnt=jb+ja |
[in] | list_jb_ | list_jb_[ib] = jb |
Definition at line 441 of file sz.cpp.
References BindStruct::Check, BindStruct::Def, DefineList::LocSpn, DefineList::Ndown, DefineList::Nsite, DefineList::Nup, CheckList::sdim, and DefineList::Tpow.
Referenced by sz().
int child_omp_sz_Kondo_hacker | ( | long int | ib, |
long int | ihfbit, | ||
struct BindStruct * | X, | ||
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_, | ||
long int * | list_jb_ | ||
) |
calculating restricted Hilbert space for Kondo-GC systems
[in] | ib | upper half bit of i |
[in] | ihfbit | 2^(Ns/2) |
[in] | X | |
[out] | list_1_ | list_1_[icnt] = i : i is divided into ia and ib (i=ib*ihfbit+ia) |
[out] | list_2_1_ | list_2_1_[ib] = jb |
[out] | list_2_2_ | list_2_2_[ia] = ja : icnt=jb+ja |
[in] | list_jb_ | list_jb_[ib] = jb |
Definition at line 54 of file sz.cpp.
References BindStruct::Check, BindStruct::Def, DefineList::LocSpn, DefineList::Ndown, DefineList::Nsite, DefineList::Nup, CheckList::sdim, snoob(), and DefineList::Tpow.
Referenced by sz().
int child_omp_sz_KondoGC | ( | long int | ib, |
long int | ihfbit, | ||
struct BindStruct * | X, | ||
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_, | ||
long int * | list_jb_ | ||
) |
ib | |
ihfbit | |
N2 | |
X |
[in] | ib | |
[in] | ihfbit | |
[in] | X | |
[out] | list_1_ | |
[out] | list_2_1_ | |
[out] | list_2_2_ | |
[in] | list_jb_ |
Definition at line 551 of file sz.cpp.
References BindStruct::Check, BindStruct::Def, DefineList::LocSpn, DefineList::Nsite, CheckList::sdim, and DefineList::Tpow.
Referenced by sz().
int child_omp_sz_spin | ( | long int | ib, |
long int | ihfbit, | ||
int | N, | ||
struct BindStruct * | X, | ||
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_, | ||
long int * | list_jb_ | ||
) |
calculating restricted Hilbert space for spin-1/2 systems
[in] | ib | upper half bit of i |
[in] | ihfbit | 2^(Ns/2) |
[in] | X | |
[in] | N | ??? |
[out] | list_1_ | list_1_[icnt] = i : i is divided into ia and ib (i=ib*ihfbit+ia) |
[out] | list_2_1_ | list_2_1_[ib] = jb |
[out] | list_2_2_ | list_2_2_[ia] = ja : icnt=jb+ja |
[in] | list_jb_ | list_jb_[ib] = jb |
Definition at line 640 of file sz.cpp.
References BindStruct::Def, DefineList::Ne, and DefineList::Tpow.
Referenced by sz().
int child_omp_sz_spin_hacker | ( | long int | ib, |
long int | ihfbit, | ||
int | N, | ||
struct BindStruct * | X, | ||
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_, | ||
long int * | list_jb_ | ||
) |
efficient version of calculating restricted Hilbert space for spin-1/2 systems details of snoob is found in S.H. Warren, Hacker’s Delight, second ed., Addison-Wesley, ISBN: 0321842685, 2012.
[in] | ib | upper half bit of i |
[in] | ihfbit | 2^(Ns/2) |
[in] | X | |
[in] | N | ??? |
[out] | list_1_ | list_1_[icnt] = i : i is divided into ia and ib (i=ib*ihfbit+ia) |
[out] | list_2_1_ | list_2_1_[ib] = jb |
[out] | list_2_2_ | list_2_2_[ia] = ja : icnt=jb+ja |
[in] | list_jb_ | list_jb_[ib] = jb |
Definition at line 702 of file sz.cpp.
References BindStruct::Def, DefineList::Ne, DefineList::Nsite, snoob(), and DefineList::Tpow.
Referenced by sz().
int Read_sz | ( | struct BindStruct * | X, |
const long int | irght, | ||
const long int | ilft, | ||
const long int | ihfbit, | ||
long int * | i_max | ||
) |
reading the list of the restricted Hilbert space
[in] | X | |
[in] | irght | |
[in] | ilft | |
[in] | ihfbit | |
[in] | i_max |
Definition at line 817 of file sz.cpp.
References childfopenMPI(), BindStruct::Def, exitMPI(), fgetsMPI(), DefineList::iCalcModel, list_1, list_2_1, list_2_2, DefineList::Ndown, DefineList::Ne, DefineList::Nsite, DefineList::Nup, sz(), and TimeKeeper().
Referenced by child_omp_sz_GeneralSpin(), and sz().
int sz | ( | struct BindStruct * | X, |
long int * | list_1_, | ||
long int * | list_2_1_, | ||
long int * | list_2_2_ | ||
) |
generating Hilbert space
[in,out] | X | |
[out] | list_1_ | list_1[icnt] = i (index of full Hilbert space) : icnt = index in the restricted Hilbert space |
[out] | list_2_1_ | icnt=list_2_1[]+list_2_2[] |
[out] | list_2_2_ |
Definition at line 908 of file sz.cpp.
References Binomial(), DefineList::CDataFileHead, BindStruct::Check, child_omp_sz(), child_omp_sz_GeneralSpin(), child_omp_sz_hacker(), child_omp_sz_Kondo(), child_omp_sz_Kondo_hacker(), child_omp_sz_KondoGC(), child_omp_sz_spin(), child_omp_sz_spin_hacker(), childfopenMPI(), BindStruct::Def, exitMPI(), GetLocal2Sz(), GetSplitBitByModel(), DefineList::iCalcModel, CheckList::idim_max, DefineList::iFlgCalcSpec, DefineList::iFlgGeneralSpin, LargeList::ihfbit, LargeList::ilft, LargeList::irght, BindStruct::Large, DefineList::LocSpn, DefineList::Ndown, DefineList::Ne, DefineList::NLocSpn, DefineList::Nsite, DefineList::Nup, DefineList::READ, DefineList::read_hacker, Read_sz(), CheckList::sdim, DefineList::SiteToBit, LargeList::SizeOflistjb, snoob(), stdoutMPI, TimeKeeper(), DefineList::Total2Sz, and DefineList::Tpow.
Referenced by main(), MakeExcitedList(), and Read_sz().