HΦ
3.2.0
|
File for givinvg functions of calculating spectrum. More...
#include "mltply.h"
#include "CalcSpectrum.h"
#include "CalcSpectrumByLanczos.h"
#include "CalcSpectrumByBiCG.h"
#include "CalcSpectrumByTPQ.h"
#include "CalcSpectrumByFullDiag.h"
#include "CalcTime.h"
#include "SingleEx.h"
#include "PairEx.h"
#include "wrapperMPI.h"
#include "FileIO.h"
#include "./common/setmemory.h"
#include "readdef.h"
#include "sz.h"
#include "check.h"
#include "diagonalcalc.h"
Go to the source code of this file.
Functions | |
int | OutputSpectrum (struct EDMainCalStruct *X, int Nomega, double complex *dcSpectrum, double complex *dcomega) |
Output spectrum. More... | |
int | CalcSpectrum (struct EDMainCalStruct *X) |
A main function to calculate spectrum. More... | |
int | GetExcitedState (struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1) |
Parent function to calculate the excited state. More... | |
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 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 |
Definition at line 90 of file CalcSpectrum.c.
References EDMainCalStruct::Bind, c_CalcExcitedStateEnd, c_CalcExcitedStateStart, c_CalcSpectrumEnd, c_CalcSpectrumStart, c_InputEigenVectorEnd, c_InputEigenVectorStart, CalcSpectrumByBiCG(), CalcSpectrumByFullDiag(), CalcSpectrumByLanczos(), CalcSpectrumByTPQ(), DefineList::CDataFileHead, cFileNameOutputExcitedVec, cFileNameTimeKeep, BindStruct::Check, childfopenALL(), D_FileNameMax, DefineList::dcOmegaMax, DefineList::dcOmegaMin, DefineList::dcOmegaOrg, BindStruct::Def, diagonalcalc(), exitMPI(), FALSE, GetExcitedState(), GetFileNameByKW(), DefineList::iCalcType, CheckList::idim_max, CheckList::idim_maxOrg, DefineList::iFlagListModified, DefineList::iFlgCalcSpec, DefineList::iFlgSpecOmegaOrg, DefineList::iNOmega, DefineList::iOutputExVec, LargeList::itr, BindStruct::Large, list_1_org, list_2_1_org, list_2_2_org, MakeExcitedList(), myrank, NormMPI_dc(), DefineList::NPairExcitationOperator, DefineList::NSingleExcitationOperator, OutputSpectrum(), SetOmega(), StartTimer(), stdoutMPI, StopTimer(), TimeKeeper(), TRUE, v0, v1, v1Org, and vg.
Referenced by main().
int GetExcitedState | ( | struct BindStruct * | X, |
double complex * | tmp_v0, | ||
double complex * | tmp_v1 | ||
) |
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 316 of file CalcSpectrum.c.
References BindStruct::Def, FALSE, GetPairExcitedState(), GetSingleExcitedState(), DefineList::NPairExcitationOperator, DefineList::NSingleExcitationOperator, SetOmega(), and TRUE.
Referenced by CalcSpectrum().
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 434 of file CalcSpectrum.c.
References cErrLargeMem, check(), BindStruct::Check, BindStruct::Def, exitMPI(), FALSE, FinalizeMPI(), GetlistSize(), DefineList::iCalcModel, CheckList::idim_max, CheckList::idim_maxMPI, CheckList::idim_maxMPIOrg, CheckList::idim_maxOrg, iErrCodeMem, 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, MPIFALSE, myrank, DefineList::Ndown, DefineList::NdownOrg, DefineList::Ne, DefineList::NeMPI, DefineList::NPairExcitationOperator, DefineList::NSingleExcitationOperator, 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 TRUE.
Referenced by CalcSpectrum().
int OutputSpectrum | ( | struct EDMainCalStruct * | X, |
int | Nomega, | ||
double complex * | dcSpectrum, | ||
double complex * | 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 49 of file CalcSpectrum.c.
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 350 of file CalcSpectrum.c.
References DefineList::CDataFileHead, cFileNameEnergy_Lanczos, cFileNameLanczosStep, childfopenMPI(), D_FileNameMax, DefineList::dcOmegaMax, DefineList::dcOmegaMin, FALSE, fgetsMPI(), DefineList::iCalcType, DefineList::iFlgSpecOmegaMax, DefineList::iFlgSpecOmegaMin, LargeValue, DefineList::Nsite, stdoutMPI, and TRUE.
Referenced by CalcSpectrum(), and GetExcitedState().