00001
00002
00003
00004
00005
00006
00007
00008 #ifndef RECURSIVECALCULATION_H_
00009 #define RECURSIVECALCULATION_H_
00010
00011 #include "../Utility/types.h"
00012 #include "../Utility/misc.h"
00013 #include "../basis_set/basis.h"
00014 #include "../IO/binaryIO.h"
00015 #include "../IO/textIO.h"
00016 #include "../IO/MatrixIO.h"
00017 #include "../formMatrix/formMatrix.h"
00018
00019 typedef struct {
00020 int KLeftStart;
00021 int KLeftStop;
00022 int KCenter;
00023 int KRightStop;
00024 int KRightStart;
00025 int maxDistance;
00026 int Csize;
00027 int indexForNonzero;
00028 } RecursionData;
00029
00030
00031
00032 void deleteMatrixFiles(std::string files);
00033
00034 void solveDenseLinearEqs(CDMatrix& A, CDMatrix& B, CDMatrix& X);
00035
00036
00037
00041 int findCorrespondingVK(LatticeShape& lattice, int maxDistance, Basis& basis);
00042
00046 int getBasisIndexInVK(LatticeShape& lattice, int K, Basis& basis);
00047
00051 void setUpIndexInteractions(LatticeShape& lattice,
00052 InteractionData& interactionData);
00053
00054 void setUpRecursion(LatticeShape& lattice, InteractionData& interactionData,
00055 Basis& initialSites, RecursionData& rd);
00056
00057
00058 void fromRightToCenter(RecursionData& recursionData,
00059 dcomplex z, CDMatrix& AKRightStop, bool saveAMatrices=true);
00060
00061 void fromLeftToCenter(RecursionData& recursionData,
00062 dcomplex z, CDMatrix& ATildeKLeftStop, bool saveAMatrices=true);
00063
00064 void solveVKCenter(RecursionData& recursionData, dcomplex z,
00065 CDMatrix& ATildeKLeftStop, CDMatrix& AKRightStop,
00066 CDMatrix& VKCenter);
00067
00068 void calculateDensityOfState(LatticeShape& lattice, Basis& initialSites,
00069 InteractionData& interactionData,
00070 const std::vector<dcomplex>& zList,
00071 std::vector<double>& rhoList);
00072
00078 void calculateDensityOfStateAll(LatticeShape& lattice,
00079 InteractionData& interactionData,
00080 const std::vector<dcomplex>& zList,
00081 std::vector<std::string>& fileList);
00082
00083
00088 void calculateGreenFunc(LatticeShape& lattice, Basis& finalSites, Basis& initialSites,
00089 InteractionData& interactionData,
00090 const std::vector<dcomplex>& zList,
00091 std::vector<dcomplex>& gfList);
00092
00097 void calculateAllGreenFunc(LatticeShape& lattice, Basis& initialSites,
00098 InteractionData& interactionData, std::vector<dcomplex> zList,
00099 std::vector< std::string > fileList);
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110 dcomplex extractMatrixElement(int n, int m, LatticeShape& lattice, int maxDistance);
00111
00112 #endif