18 #include "wrapperMPI.h" 32 i_max =
X->Check.idim_max;
34 if (
X->Def.iCalcType == FullDiag) {
35 switch (
X->Def.iCalcModel) {
52 fprintf(fp,
" <H> <N> <Sz> <S2> <D> \n");
53 for (i = 0; i < i_max; i++) {
54 fprintf(fp,
" %10lf %10lf %10lf %10lf %10lf\n",
X->Phys.all_energy[i],
X->Phys.all_num_up[i]+
X->Phys.all_num_down[i],
X->Phys.all_sz[i],
55 X->Phys.all_s2[i],
X->Phys.all_doublon[i]);
60 fprintf(
stdoutMPI,
"Error: output function is used only for FullDiag mode.");
76 long int imax =
X->Check.idim_max;
82 #pragma omp parallel for default(none) reduction(+:ihermite) firstprivate(imax) private(i, j) shared(Ham) 83 for (i=1; i<=imax; i++){
85 if(cabs(
Ham[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(cabs(
Ham[i][j])>1.0e-13){
101 fprintf(fp,
"%ld %ld %lf %lf\n",i,j,creal(
Ham[i][j]),cimag(
Ham[i][j]));
const char * cFileNamePhys_FullDiag
const char * cFileNamePhys_FullDiag_GC
int output(struct BindStruct *X)
output function for FullDiag mode
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory.
int outputHam(struct BindStruct *X)
output Hamiltonian only used for FullDiag mode
const char * cFileNamePhys_FullDiag_Ham
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()