@@ -24,7 +24,7 @@ namespace Read_Txt_Input
2424 {
2525 this ->read (file_name);
2626 this ->check_transform ();
27- this ->default2 ();
27+ this ->default_2 ();
2828 this ->out (GlobalV::global_out_dir + file_name);
2929 }
3030 this ->bcast ();
@@ -37,8 +37,8 @@ namespace Read_Txt_Input
3737 = Read_Txt_Tools::read_file_to_map (file_name, {" #" ," \\ " }, true );
3838 for (const auto & input_read : inputs_read)
3939 {
40- const auto ptr = input.list .find (input_read.first );
41- if (ptr==input.list .end ())
40+ const auto ptr = this -> input .list .find (input_read.first );
41+ if (ptr==this -> input .list .end ())
4242 throw std::out_of_range (" input_read.first" );
4343
4444 // if(input_read.second.size() > ptr->second.values.size())
@@ -55,7 +55,7 @@ namespace Read_Txt_Input
5555
5656 void Input_Process::check_transform ()
5757 {
58- for (auto &item : input.list )
58+ for (auto &item : this -> input .list )
5959 {
6060 item.second .check_transform (item.second );
6161
@@ -68,21 +68,23 @@ namespace Read_Txt_Input
6868 }
6969 }
7070 }
71+ this ->check_transform_global (this ->input .list );
7172 }
7273
73- void Input_Process::default2 ()
74+ void Input_Process::default_2 ()
7475 {
75- for (auto &item : input.list )
76- item.second .default2 (input.list );
76+ for (auto &item : this ->input .list )
77+ item.second .default_2 (item.second , this ->input .list );
78+ this ->default_2_global (this ->input .list );
7779 }
7880
7981 void Input_Process::out (const std::string &file_name) const
8082 {
8183 std::ofstream ofs (file_name);
82- for (const std::string &label : input.output_labels )
84+ for (const std::string &label : this -> input .output_labels )
8385 {
84- const auto ptr = input.list .find (label);
85- if (ptr==input.list .end ())
86+ const auto ptr = this -> input .list .find (label);
87+ if (ptr==this -> input .list .end ())
8688 {
8789 ofs<<std::endl<<" # " <<label<<std::endl;
8890 }
@@ -121,7 +123,7 @@ namespace Read_Txt_Input
121123 std::stringstream ss;
122124 {
123125 cereal::BinaryOutputArchive ar (ss);
124- ar (input.list );
126+ ar (this -> input .list );
125127 }
126128 const int size = ss.str ().size ();
127129 MPI_Bcast ( const_cast <int *>(&size), 1 , MPI_INT, 0 , MPI_COMM_WORLD );
@@ -137,7 +139,7 @@ namespace Read_Txt_Input
137139 ss.rdbuf ()->pubsetbuf (c.data (),size);
138140 {
139141 cereal::BinaryInputArchive ar (ss);
140- ar (input.list );
142+ ar (this -> input .list );
141143 }
142144 }
143145#else
@@ -147,7 +149,8 @@ namespace Read_Txt_Input
147149
148150 void Input_Process::convert ()
149151 {
150- for (auto &item : input.list )
152+ for (auto &item : this -> input .list )
151153 item.second .convert (item.second );
154+ this ->convert_global (this ->input .list );
152155 }
153156}
0 commit comments