Skip to content

Commit ea0c056

Browse files
change printe's default value from 100 to scf_nmax
1 parent 7c46674 commit ea0c056

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

source/module_io/read_input_item_output.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ void ReadInput::item_output()
8383
{
8484
Input_Item item("printe");
8585
item.annotation = "Print out energy for each band for every printe steps";
86+
item.reset_value = [](const Input_Item& item, Parameter& para) {
87+
if (para.input.printe <= 0) // default is scf_nmax
88+
{
89+
para.input.printe = para.input.scf_nmax;
90+
}
91+
};
8692
read_sync_int(input.printe);
8793
this->add_item(item);
8894
}

source/module_parameter/input_parameter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ struct Input_para
320320
int out_pot = 0; ///< yes or no
321321
int out_wfc_pw = 0; ///< 0: no; 1: txt; 2: dat
322322
bool out_wfc_r = false; ///< 0: no; 1: yes
323-
int printe = 100; ///< mohan add 2011-03-16
323+
int printe = 0; ///< Print out energy for each band for every printe step, default is scf_nmax
324324
std::vector<int> out_band = {0, 8}; ///< band calculation pengfei 2014-10-13
325325
int out_dos = 0; ///< dos calculation. mohan add 20090909
326326
bool out_mul = false; ///< qifeng add 2019-9-10

0 commit comments

Comments
 (0)