Browse Source

Tweak histograms and output

master
J.-S. Caux 3 years ago
parent
commit
9ba99f945a
4 changed files with 7 additions and 4 deletions
  1. 4
    1
      include/ABACUS_Scan.h
  2. 0
    1
      scripts/Histograms.py
  3. 1
    1
      src/EXECS/Histogram_RAW_File.cc
  4. 2
    1
      src/SCAN/General_Scan.cc

+ 4
- 1
include/ABACUS_Scan.h View File

@@ -780,7 +780,10 @@ namespace ABACUS {
780 780
 	if (info[i].Nfull > 0.0) {
781 781
 	  int TT_hr = int(info[i].TT/3600);
782 782
 	  int TT_min = int((info[i].TT - 3600.0*TT_hr)/60);
783
-	  outfile << std::endl << std::setw(20) << base_label[i] << std::setw(25) << std::fixed << std::setprecision(20) << info[i].sumrule_obtained;
783
+	  outfile << std::endl << std::setw(20) << base_label[i] << std::setw(25);
784
+	  if (info[i].sumrule_obtained < 1.0) outfile << std::fixed;
785
+	  else outfile << std::scientific;
786
+	  outfile << std::setprecision(16) << info[i].sumrule_obtained;
784 787
 	  if (info[i].Nfull < 1.0e+10) outfile << std::setw(25) << std::fixed << std::setprecision(0) << info[i].Nfull;
785 788
 	  else outfile << std::setw(25) << std::scientific << std::setprecision(16) << info[i].Nfull;
786 789
 	  outfile << std::setw(10) << info[i].Ninadm << std::setw(10) << info[i].Ndata << std::setw(10) << info[i].Ndata_conv << std::setw(10) << info[i].Ndata_conv0 << std::setw(10) << TT_hr << " h " << TT_min << " m " << std::fixed << std::showpoint << std::setprecision(3) << info[i].TT - 3600.0*TT_hr - 60.0*TT_min << " s";

+ 0
- 1
scripts/Histograms.py View File

@@ -15,7 +15,6 @@ for datafilename in args.filenames:
15 15
 	x = [line[0] for line in data]
16 16
 	y = [line[3] for line in data]
17 17
 	fig.add_trace(go.Bar(x=x, y=y))
18
-
19 18
 fig.show()
20 19
 
21 20
 

+ 1
- 1
src/EXECS/Histogram_RAW_File.cc View File

@@ -91,7 +91,7 @@ int main(int argc, char* argv[])
91 91
 
92 92
   if (nfound == 0) {
93 93
     cout << "Didn't find any contributing state." << endl;
94
-    return(1)
94
+    return(1);
95 95
   }
96 96
 
97 97
   for (int i = 0; i < npts; ++i) {

+ 2
- 1
src/SCAN/General_Scan.cc View File

@@ -884,7 +884,8 @@ namespace ABACUS {
884 884
     LiebLin_Bethe_State spstate;
885 885
 
886 886
     if (!refine) { // obtain the sps from discretized TBA
887
-      spstate = Canonical_Saddle_Point_State (c_int, L, N, whichDSF == 'Z' ? 0.0 : kBT);
887
+      //spstate = Canonical_Saddle_Point_State (c_int, L, N, whichDSF == 'Z' ? 0.0 : kBT);
888
+      spstate = Canonical_Saddle_Point_State (c_int, L, N, kBT);
888 889
     }
889 890
     else { // read it from the sps file
890 891
       // Check that the sps has the right number of Ix2:

Loading…
Cancel
Save