Browse Source

Activate stat file

master
Jean-Sébastien 2 years ago
parent
commit
20c0035208
2 changed files with 8 additions and 3 deletions
  1. 2
    2
      include/ABACUS_Utils.h
  2. 6
    1
      src/SCAN/General_Scan.cc

+ 2
- 2
include/ABACUS_Utils.h View File

@@ -39,7 +39,7 @@ namespace ABACUS {
39 39
 
40 40
   // Inexplicably missing string functions in standard library:
41 41
 
42
-  std::string replace(const std::string& str, const std::string& from, const std::string& to) {
42
+  inline std::string replace(const std::string& str, const std::string& from, const std::string& to) {
43 43
     std::string repl = str;
44 44
     size_t start_pos = repl.find(from);
45 45
     if(start_pos < std::string::npos)
@@ -47,7 +47,7 @@ namespace ABACUS {
47 47
     return repl;
48 48
   }
49 49
 
50
-  std::string replace_all(const std::string& str, const std::string& from, const std::string& to) {
50
+  inline std::string replace_all(const std::string& str, const std::string& from, const std::string& to) {
51 51
     std::string repl = str;
52 52
     if(from.empty())
53 53
       return repl;

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

@@ -650,7 +650,12 @@ namespace ABACUS {
650 650
 		}
651 651
 
652 652
 		// Uncomment line below if .stat file is desired:
653
-		//STAT_outfile << setw(20) << label_here << "\t" << setw(5) << type_required << "\t" << setw(16) << std::scientific << running_scan_threshold << "\t" << setw(20) << ScanState.label << "\t" << setw(16) << data_value << "\t" << setw(16) << std::fixed << setprecision(8) << data_value/running_scan_threshold << endl;
653
+		STAT_outfile << setw(20) << label_here << "\t" << setw(5) << type_required
654
+			     << "\t" << setw(16) << std::scientific
655
+			     << exp(-paused_thread_data.logscale * il_to_do)
656
+			     << "\t" << setw(20) << ScanState.label << "\t" << setw(16) << data_value
657
+			     << "\t" << setw(16) << std::fixed << setprecision(8)
658
+			     << data_value/exp(-paused_thread_data.logscale * il_to_do) << endl;
654 659
 
655 660
 	      } // if (ScanState.conv)
656 661
 	      else {

Loading…
Cancel
Save