HPhi++
3.1.0
|
File for givinvg functions of calculating spectrum. More...
#include "mltply.hpp"
#include "CalcSpectrum.hpp"
#include "CalcSpectrumByBiCG.hpp"
#include "CalcSpectrumByFullDiag.hpp"
#include "CalcTime.hpp"
#include "SingleEx.hpp"
#include "PairEx.hpp"
#include "wrapperMPI.hpp"
#include "FileIO.hpp"
#include "common/setmemory.hpp"
#include "readdef.hpp"
#include "sz.hpp"
#include "check.hpp"
#include "diagonalcalc.hpp"
#include <iostream>
Go to the source code of this file.
Functions | |
int | SetOmega (struct DefineList *X) |
Set target frequencies. More... | |
int | MakeExcitedList (struct BindStruct *X, int *iFlgListModifed) |
Make the lists for the excited state; list_1, list_2_1 and list_2_2 (for canonical ensemble). The original lists before the excitation are given by list_xxx_org. More... | |
int | OutputSpectrum (struct EDMainCalStruct *X, int Nomega, int NdcSpectrum, std::complex< double > **dcSpectrum, std::complex< double > *dcomega) |
Output spectrum. More... | |
int | GetExcitedState (struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1, int iEx) |
Parent function to calculate the excited state. More... | |
int | CalcSpectrum (struct EDMainCalStruct *X) |
A main function to calculate spectrum. More... | |
int CalcSpectrum | ( | struct EDMainCalStruct * | X | ) |
A main function to calculate spectrum.
X | [in,out] CalcStruct list for getting and pushing calculation information input: iFlgSpecOmegaOrg, dcOmegaMax, dcOmegaMin, iNOmega etc. output: dcOmegaOrg, iFlagListModified. |
0 | normally finished |
-1 | unnormally finished |
< Input vector to calculate spectrum function.
Definition at line 422 of file CalcSpectrum.cpp.
References EDMainCalStruct::Bind, CalcSpectrumByBiCG(), CalcSpectrumByFullDiag(), BindStruct::Check, childfopenALL(), DefineList::dcOmegaMax, DefineList::dcOmegaMin, DefineList::dcOmegaOrg, BindStruct::Def, diagonalcalc(), PhysList::doublon, PhysList::doublon2, PhysList::energy, exitMPI(), GetFileNameByKW(), GetlistSize(), I(), DefineList::iCalcType, CheckList::idim_max, CheckList::idim_maxOrg, DefineList::iFlagListModified, DefineList::iFlgCalcSpec, DefineList::iFlgSpecOmegaOrg, DefineList::iNOmega, LargeList::itr, BindStruct::Large, list_1, list_1buf, list_2_1, list_2_2, list_Diagonal, MakeExcitedList(), myrank, DefineList::Ndown, DefineList::NdownMPI, DefineList::Ne, DefineList::NeMPI, DefineList::NNPairExcitationOperator, DefineList::NNSingleExcitationOperator, DefineList::Nsite, DefineList::NsiteMPI, PhysList::num, PhysList::num2, PhysList::num_down, PhysList::num_up, DefineList::Nup, DefineList::NupMPI, OutputSpectrum(), BindStruct::Phys, PhysList::s2, SetOmega(), StartTimer(), stdoutMPI, StopTimer(), PhysList::Sz, PhysList::Sz2, TimeKeeper(), DefineList::Total2Sz, DefineList::Total2SzMPI, v0, v1, v1buf, and PhysList::var.
Referenced by main().
int GetExcitedState | ( | struct BindStruct * | X, |
int | nstate, | ||
std::complex< double > ** | tmp_v0, | ||
std::complex< double > ** | tmp_v1, | ||
int | iEx | ||
) |
Parent function to calculate the excited state.
X | [in] Struct to get number of excitation operators. |
tmp_v0 | [out] Result \( v_0 = H_{ex} v_1 \). |
tmp_v1 | [in] The original state before excitation \( v_1 \). |
FALSE | Fail to calculate the excited state. |
TRUE | Success to calculate the excited state. |
Definition at line 387 of file CalcSpectrum.cpp.
References BindStruct::Def, GetPairExcitedState(), GetSingleExcitedState(), DefineList::NNPairExcitationOperator, and DefineList::NNSingleExcitationOperator.
Referenced by CalcSpectrumByBiCG(), CalcSpectrumByFullDiag(), and OutputSpectrum().
int MakeExcitedList | ( | struct BindStruct * | X, |
int * | iFlgListModifed | ||
) |
Make the lists for the excited state; list_1, list_2_1 and list_2_2 (for canonical ensemble). The original lists before the excitation are given by list_xxx_org.
X | [in, out] Struct to get and give information to make the lists for the excited state. Output: iCalcModel (From HubbardNConserved to Hubbard), {Ne, Nup, Ndown, Nsite, Total2Sz} (update for MPI) |
iFlgListModifed | [out] If the list is modified due to the excitation, the value becomes TRUE(1), otherwise FALSE(0). |
-1 | fail to make lists. |
0 | sucsess to make lists. |
Definition at line 132 of file CalcSpectrum.cpp.
References check(), BindStruct::Check, BindStruct::Def, exitMPI(), FinalizeMPI(), GetlistSize(), DefineList::iCalcModel, CheckList::idim_max, CheckList::idim_maxMPI, CheckList::idim_maxMPIOrg, CheckList::idim_maxOrg, DefineList::iFlgGeneralSpin, BindStruct::Large, list_1, list_1_org, list_1buf_org, list_2_1, list_2_1_org, list_2_2, list_2_2_org, MaxMPI_li(), myrank, DefineList::Ndown, DefineList::NdownOrg, DefineList::Ne, DefineList::NeMPI, DefineList::NNPairExcitationOperator, DefineList::NNSingleExcitationOperator, DefineList::Nsite, DefineList::NsiteMPI, DefineList::Nup, DefineList::NupOrg, DefineList::OrgTpow, DefineList::PairExcitationOperator, setmem_large(), DefineList::SingleExcitationOperator, LargeList::SizeOflist_2_1, LargeList::SizeOflist_2_2, stdoutMPI, sz(), DefineList::Total2Sz, DefineList::Total2SzMPI, and v1buf.
Referenced by CalcSpectrum().
int OutputSpectrum | ( | struct EDMainCalStruct * | X, |
int | Nomega, | ||
int | NdcSpectrum, | ||
std::complex< double > ** | dcSpectrum, | ||
std::complex< double > * | dcomega | ||
) |
Output spectrum.
X | [in] Read information of the frequency origin. |
Nomega | [in] A total number of discrete frequencies. |
dcSpectrum | [in] Array of spectrum. |
dcomega | [in] Array of discrete frequencies. |
FALSE | Fail to open the output file. |
TRUE | Success to output the spectrum. |
Definition at line 351 of file CalcSpectrum.cpp.
References EDMainCalStruct::Bind, DefineList::CDataFileHead, childfopenMPI(), DefineList::dcOmegaOrg, BindStruct::Def, and GetExcitedState().
Referenced by CalcSpectrum().
int SetOmega | ( | struct DefineList * | X | ) |
Set target frequencies.
X | [in, out] Struct to give and get the information of target frequencies. Output: dcOmegaMax, dcOmegaMin |
FALSE | Fail to set frequencies. |
TRUE | Success to set frequencies. |
Definition at line 49 of file CalcSpectrum.cpp.
References DefineList::CDataFileHead, childfopenMPI(), DefineList::dcOmegaMax, DefineList::dcOmegaMin, fgetsMPI(), DefineList::iCalcType, DefineList::iFlgSpecOmegaMax, DefineList::iFlgSpecOmegaMin, LargeValue, DefineList::Nsite, and stdoutMPI.
Referenced by CalcSpectrum().