@@ -14,7 +14,13 @@ void ReadInput::item_relax()
1414 item.annotation = " cg; bfgs; sd; cg; cg_bfgs;" ;
1515 read_sync_string (input.relax_method );
1616 item.read_value = [](const Input_Item& item, Parameter& para) {
17- if (item.get_size ()==1 )
17+ if (item.get_size ()==0 )
18+ {
19+ para.input .relax_method_param .method =" cg" ;
20+ para.input .relax_method = para.input .relax_method_param .method ;
21+ para.input .relax_method_param .param = " 1" ;
22+ }
23+ else if (item.get_size ()==1 )
1824 {
1925 para.input .relax_method_param .method =item.str_values [0 ];
2026 para.input .relax_method = para.input .relax_method_param .method ;
@@ -27,13 +33,6 @@ void ReadInput::item_relax()
2733 para.input .relax_method_param .param = item.str_values [1 ];
2834 }
2935 };
30-
31- // std::istringstream iss(item.str_values[0]);
32- // iss >> para.input.relax_method_param.method;
33- // if (!(iss >> para.input.relax_method_param.param)) {
34- // std::cout << "No parameter provided for relax_method_param.param, default to 1" << std::endl;
35- // para.input.relax_method_param.param = "1";
36- // }
3736 item.check_value = [](const Input_Item& item, const Parameter& para) {
3837 const std::vector<std::string> relax_methods = {" cg" , " sd" , " cg_bfgs" ," bfgs" ," lbfgs" };
3938 if (std::find (relax_methods.begin (), relax_methods.end (), para.input .relax_method_param .method ) == relax_methods.end ()) {
0 commit comments