Skip to content

Commit 6c1af66

Browse files
committed
output format refactor
1 parent 496f311 commit 6c1af66

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

source/module_elecstate/elecstate_print.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,11 @@ void print_etot(const Magnetism& magnet,
320320

321321
GlobalV::ofs_running << std::setprecision(12);
322322
GlobalV::ofs_running << std::setiosflags(std::ios::right);
323-
GlobalV::ofs_running << " Electron density error is " << scf_thr << std::endl;
323+
GlobalV::ofs_running << " Electron density deviation is " << scf_thr << std::endl;
324324

325325
if (PARAM.inp.basis_type == "pw")
326326
{
327-
ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "Error Threshold", pw_diag_thr); // xiaohui add 2013-09-02
327+
ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "Diago Threshold", pw_diag_thr);
328328
}
329329

330330
std::vector<std::string> titles;

source/module_elecstate/test/elecstate_print_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ TEST_F(ElecStatePrintTest, PrintEtot)
278278
GlobalV::ofs_running.close();
279279
ifs.open("test.dat", std::ios::in);
280280
std::string str((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
281-
EXPECT_THAT(str, testing::HasSubstr("Electron density error is 0.1"));
282-
EXPECT_THAT(str, testing::HasSubstr("Error Threshold = 0.1"));
281+
EXPECT_THAT(str, testing::HasSubstr("Electron density deviation is 0.1"));
282+
EXPECT_THAT(str, testing::HasSubstr("Diago Threshold = 0.1"));
283283
EXPECT_THAT(str, testing::HasSubstr("E_KohnSham"));
284284
EXPECT_THAT(str, testing::HasSubstr("E_vdwD2"));
285285
EXPECT_THAT(str, testing::HasSubstr("E_vdwD3"));
@@ -320,8 +320,8 @@ TEST_F(ElecStatePrintTest, PrintEtot2)
320320
GlobalV::ofs_running.close();
321321
ifs.open("test.dat", std::ios::in);
322322
std::string str((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
323-
EXPECT_THAT(str, testing::HasSubstr("Electron density error is 0.1"));
324-
EXPECT_THAT(str, testing::HasSubstr("Error Threshold = 0.1"));
323+
EXPECT_THAT(str, testing::HasSubstr("Electron density deviation is 0.1"));
324+
EXPECT_THAT(str, testing::HasSubstr("Diago Threshold = 0.1"));
325325
EXPECT_THAT(str, testing::HasSubstr("E_KohnSham"));
326326
EXPECT_THAT(str, testing::HasSubstr("E_Harris"));
327327
EXPECT_THAT(str, testing::HasSubstr("E_Fermi"));

source/module_md/md_func.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
#define MD_FUNC_H
33

44
#include "module_esolver/esolver.h"
5+
6+
#ifdef __MPI
57
#include <mpi.h> // MPI functions
8+
#endif
69

710
/**
811
* @brief base functions in md

0 commit comments

Comments
 (0)