#include "output.hpp"
#include "FileIO.hpp"
#include "wrapperMPI.hpp"
Go to the source code of this file.
◆ output()
output function for FullDiag mode
- Parameters
-
[in] | X | Struct to get information about file header names, dimension of hirbert space, calc type, physical quantities. |
- Return values
-
0 | normally finished. |
-1 | abnormally finished. |
Definition at line 27 of file output.cpp.
References DefineList::CDataFileHead, BindStruct::Check, childfopenMPI(), BindStruct::Def, PhysList::doublon, PhysList::energy, DefineList::iCalcModel, DefineList::iCalcType, CheckList::idim_max, DefineList::Ndown, PhysList::num_down, PhysList::num_up, DefineList::Nup, BindStruct::Phys, PhysList::s2, stdoutMPI, and PhysList::Sz.
Referenced by CalcByFullDiag().
30 char sdt[D_FileNameMax];
52 fprintf(fp,
" <H> <N> <Sz> <S2> <D> \n");
53 for (i = 0; i < i_max; i++) {
60 fprintf(
stdoutMPI,
"Error: output function is used only for FullDiag mode.");
double * doublon
Expectation value of the Doublon.
int Nup
Number of spin-up electrons in this process.
struct DefineList Def
Definision of system (Hamiltonian) etc.
double * num_down
Expectation value of the number of down-spin electtrons.
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()
double * s2
Expectation value of the square of the total S.
struct PhysList Phys
Physical quantities.
double * Sz
Expectation value of the Total Sz.
double * energy
Expectation value of the total energy.
double * num_up
Expectation value of the number of up-spin electtrons.
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
int Ndown
Number of spin-down electrons in this process.
struct CheckList Check
Size of the Hilbert space.
char * CDataFileHead
Read from Calcmod in readdef.h. Header of output file such as Green's function.
long int idim_max
The dimension of the Hilbert space of this process.
int iCalcType
Switch for calculation type. 0:Lanczos, 1:TPQCalc, 2:FullDiag.
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory.
◆ outputHam()
output Hamiltonian only used for FullDiag mode
- Note
- global: [in] Ham
- Parameters
-
[in] | X | Struct to get information about file header names, dimension of hirbert space. |
- Return values
-
0 | normally finished. |
-1 | abnormally finished. |
Definition at line 73 of file output.cpp.
References DefineList::CDataFileHead, BindStruct::Check, childfopenMPI(), BindStruct::Def, CheckList::idim_max, and v0.
Referenced by CalcByFullDiag().
80 char sdt[D_FileNameMax];
82 #pragma omp parallel for default(none) reduction(+:ihermite) firstprivate(imax) private(i, j) shared(v0) 83 for (i=1; i<=imax; i++){
85 if(abs(
v0[i][j])>1.0e-13){
91 strcpy(cHeader,
"%%%%MatrixMarket matrix coordinate complex hermitian\n");
96 fprintf(fp,
"%s", cHeader);
97 fprintf(fp,
"%ld %ld %ld \n", imax, imax, ihermite);
98 for (i=1; i<=imax; i++){
100 if(abs(
v0[i][j])>1.0e-13){
101 fprintf(fp,
"%ld %ld %lf %lf\n",i,j,real(
v0[i][j]),imag(
v0[i][j]));
struct DefineList Def
Definision of system (Hamiltonian) etc.
std::complex< double > ** v0
struct CheckList Check
Size of the Hilbert space.
char * CDataFileHead
Read from Calcmod in readdef.h. Header of output file such as Green's function.
long int idim_max
The dimension of the Hilbert space of this process.
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory.