From 1fd1af30ca4d27839973aac2d6c5462ba5af85f8 Mon Sep 17 00:00:00 2001 From: linpz Date: Sun, 10 May 2026 11:58:19 +0800 Subject: [PATCH] Fix TITLE() in module_xc --- source/source_hamilt/module_xc/test/test_xc.cpp | 2 ++ source/source_hamilt/module_xc/test/test_xc1.cpp | 2 ++ source/source_hamilt/module_xc/test/test_xc2.cpp | 2 ++ source/source_hamilt/module_xc/test/test_xc4.cpp | 2 ++ source/source_hamilt/module_xc/xc_functional.cpp | 4 ++++ 5 files changed, 12 insertions(+) diff --git a/source/source_hamilt/module_xc/test/test_xc.cpp b/source/source_hamilt/module_xc/test/test_xc.cpp index c257afaf869..14a1e1c5aa4 100644 --- a/source/source_hamilt/module_xc/test/test_xc.cpp +++ b/source/source_hamilt/module_xc/test/test_xc.cpp @@ -14,6 +14,8 @@ namespace ModuleBase { void WARNING_QUIT(const std::string &file,const std::string &description) {exit(1);} + void TITLE(const std::string &class_function_name,bool disable){}; + void TITLE(const std::string &class_name,const std::string &function_name,bool disable){}; } namespace GlobalV diff --git a/source/source_hamilt/module_xc/test/test_xc1.cpp b/source/source_hamilt/module_xc/test/test_xc1.cpp index 917a6e4a2c0..b322d628c66 100644 --- a/source/source_hamilt/module_xc/test/test_xc1.cpp +++ b/source/source_hamilt/module_xc/test/test_xc1.cpp @@ -14,6 +14,8 @@ namespace ModuleBase { void WARNING_QUIT(const std::string &file,const std::string &description) {exit(1);} + void TITLE(const std::string &class_function_name,bool disable){}; + void TITLE(const std::string &class_name,const std::string &function_name,bool disable){}; } namespace GlobalV diff --git a/source/source_hamilt/module_xc/test/test_xc2.cpp b/source/source_hamilt/module_xc/test/test_xc2.cpp index ad23626ac3a..e6135981258 100644 --- a/source/source_hamilt/module_xc/test/test_xc2.cpp +++ b/source/source_hamilt/module_xc/test/test_xc2.cpp @@ -13,6 +13,8 @@ namespace ModuleBase { void WARNING_QUIT(const std::string &file,const std::string &description) {exit(1);} + void TITLE(const std::string &class_function_name,bool disable){}; + void TITLE(const std::string &class_name,const std::string &function_name,bool disable){}; } namespace GlobalV diff --git a/source/source_hamilt/module_xc/test/test_xc4.cpp b/source/source_hamilt/module_xc/test/test_xc4.cpp index 946af8a1cc0..d1fddc8bdf1 100644 --- a/source/source_hamilt/module_xc/test/test_xc4.cpp +++ b/source/source_hamilt/module_xc/test/test_xc4.cpp @@ -14,6 +14,8 @@ namespace ModuleBase { void WARNING_QUIT(const std::string &file,const std::string &description) {exit(1);} + void TITLE(const std::string &class_function_name,bool disable){}; + void TITLE(const std::string &class_name,const std::string &function_name,bool disable){}; } namespace GlobalV diff --git a/source/source_hamilt/module_xc/xc_functional.cpp b/source/source_hamilt/module_xc/xc_functional.cpp index 5cb8394b729..ca88899b3ea 100644 --- a/source/source_hamilt/module_xc/xc_functional.cpp +++ b/source/source_hamilt/module_xc/xc_functional.cpp @@ -1,6 +1,7 @@ #include "xc_functional.h" #include "source_io/module_parameter/parameter.h" #include "source_base/global_function.h" +#include "source_base/tool_title.h" #ifdef USE_LIBXC #include "xc_functional_libxc.h" @@ -24,6 +25,7 @@ void XC_Functional::set_hybrid_alpha(const double alpha_in) void XC_Functional::set_xc_first_loop(const UnitCell& ucell) { + ModuleBase::TITLE("XC_Functional", "set_xc_first_loop"); /** In the special "two-level" calculation case, the first scf iteration only calculate the functional without exact exchange. but in "nscf" calculation, there is no need of "two-level" @@ -57,6 +59,7 @@ method. */ // for detail, refer to https://www.tddft.org/programs/libxc/functionals/ void XC_Functional::set_xc_type(const std::string xc_func_in) { + ModuleBase::TITLE("XC_Functional", "set_xc_type"); //Note : due to the separation of gcx_spin and gcc_spin, //when you are adding new GGA functionals, //please put exchange first, followed by correlation, @@ -329,6 +332,7 @@ void XC_Functional::set_xc_type(const std::string xc_func_in) std::string XC_Functional::output_info() { + ModuleBase::TITLE("XC_Functional", "output_info"); #ifdef USE_LIBXC if(use_libxc) {