@@ -271,7 +271,8 @@ void Control::print(std::ostream& os)
271271 os << " Multigrid preconditioning for wave functions:" << std::endl;
272272 os << " # of Multigrid levels : " << mg_levels_ << std::endl;
273273 os << " # of pre-smoothing steps : " << mg_npresmoothing_ << std::endl;
274- os << " # of post-smoothing steps : " << mg_npostsmoothing_ << std::endl;
274+ os << " # of post-smoothing steps : " << mg_npostsmoothing_
275+ << std::endl;
275276 }
276277 else
277278 {
@@ -503,7 +504,8 @@ void Control::sync(void)
503504 memset (&float_buffer[0 ], 0 , size_float_buffer * sizeof (float ));
504505 }
505506
506- auto bcast_check = [](int mpirc) {
507+ auto bcast_check = [](int mpirc)
508+ {
507509 if (mpirc != MPI_SUCCESS)
508510 {
509511 (*MPIdata::sout) << " MPI Bcast of Control failed!!!" << std::endl;
@@ -1497,9 +1499,9 @@ void Control::setOptions(const boost::program_options::variables_map& vm)
14971499 mg_npresmoothing_ = vm[" Preconditioner.npresmoothing" ].as <short >();
14981500 mg_npostsmoothing_ = vm[" Preconditioner.npostsmoothing" ].as <short >();
14991501 precond_precision_ = vm[" Preconditioner.precision" ].as <short >();
1500- assert (precond_precision_== 32 ||precond_precision_== 64 );
1502+ assert (precond_precision_ == 32 || precond_precision_ == 64 );
15011503
1502- precond_factor = vm[" Quench.step_length" ].as <float >();
1504+ precond_factor = vm[" Quench.step_length" ].as <float >();
15031505 if (precond_factor < 0 .)
15041506 {
15051507 switch (lap_type)
@@ -1994,10 +1996,14 @@ void Control::setROMOptions(const boost::program_options::variables_map& vm)
19941996 else if (str.compare (" none" ) == 0 )
19951997 rom_pri_option.rom_stage = ROMStage::UNSUPPORTED;
19961998
1997- rom_pri_option.restart_file_fmt = vm[" ROM.offline.restart_filefmt" ].as <std::string>();
1998- rom_pri_option.restart_file_minidx = vm[" ROM.offline.restart_min_idx" ].as <int >();
1999- rom_pri_option.restart_file_maxidx = vm[" ROM.offline.restart_max_idx" ].as <int >();
2000- rom_pri_option.basis_file = vm[" ROM.offline.basis_file" ].as <std::string>();
1999+ rom_pri_option.restart_file_fmt
2000+ = vm[" ROM.offline.restart_filefmt" ].as <std::string>();
2001+ rom_pri_option.restart_file_minidx
2002+ = vm[" ROM.offline.restart_min_idx" ].as <int >();
2003+ rom_pri_option.restart_file_maxidx
2004+ = vm[" ROM.offline.restart_max_idx" ].as <int >();
2005+ rom_pri_option.basis_file
2006+ = vm[" ROM.offline.basis_file" ].as <std::string>();
20012007
20022008 str = vm[" ROM.offline.variable" ].as <std::string>();
20032009 if (str.compare (" orbitals" ) == 0 )
@@ -2007,14 +2013,19 @@ void Control::setROMOptions(const boost::program_options::variables_map& vm)
20072013 else
20082014 rom_pri_option.variable = ROMVariable::NONE;
20092015
2010- rom_pri_option.save_librom_snapshot = vm[" ROM.offline.save_librom_snapshot" ].as <bool >();
2011- rom_pri_option.librom_snapshot_freq = vm[" ROM.offline.librom_snapshot_freq" ].as <int >();
2016+ rom_pri_option.save_librom_snapshot
2017+ = vm[" ROM.offline.save_librom_snapshot" ].as <bool >();
2018+ rom_pri_option.librom_snapshot_freq
2019+ = vm[" ROM.offline.librom_snapshot_freq" ].as <int >();
20122020
20132021 rom_pri_option.compare_md = vm[" ROM.basis.compare_md" ].as <bool >();
2014- rom_pri_option.num_orbbasis = vm[" ROM.basis.number_of_orbital_basis" ].as <int >();
2015- rom_pri_option.num_potbasis = vm[" ROM.basis.number_of_potential_basis" ].as <int >();
2016- rom_pri_option.pot_rom_file = vm[" ROM.potential_rom_file" ].as <std::string>();
2017- } // onpe0
2022+ rom_pri_option.num_orbbasis
2023+ = vm[" ROM.basis.number_of_orbital_basis" ].as <int >();
2024+ rom_pri_option.num_potbasis
2025+ = vm[" ROM.basis.number_of_potential_basis" ].as <int >();
2026+ rom_pri_option.pot_rom_file
2027+ = vm[" ROM.potential_rom_file" ].as <std::string>();
2028+ } // onpe0
20182029
20192030 // synchronize all processors
20202031 syncROMOptions ();
@@ -2031,7 +2042,8 @@ void Control::syncROMOptions()
20312042 mmpi.bcast (rom_pri_option.basis_file , comm_global_);
20322043 mmpi.bcast (rom_pri_option.pot_rom_file , comm_global_);
20332044
2034- auto bcast_check = [](int mpirc) {
2045+ auto bcast_check = [](int mpirc)
2046+ {
20352047 if (mpirc != MPI_SUCCESS)
20362048 {
20372049 (*MPIdata::sout) << " MPI Bcast of Control failed!!!" << std::endl;
@@ -2044,31 +2056,38 @@ void Control::syncROMOptions()
20442056 mpirc = MPI_Bcast (&rom_stage, 1 , MPI_SHORT, 0 , comm_global_);
20452057 bcast_check (mpirc);
20462058
2047- mpirc = MPI_Bcast (&rom_pri_option.restart_file_minidx , 1 , MPI_INT, 0 , comm_global_);
2059+ mpirc = MPI_Bcast (
2060+ &rom_pri_option.restart_file_minidx , 1 , MPI_INT, 0 , comm_global_);
20482061 bcast_check (mpirc);
20492062
2050- mpirc = MPI_Bcast (&rom_pri_option.restart_file_maxidx , 1 , MPI_INT, 0 , comm_global_);
2063+ mpirc = MPI_Bcast (
2064+ &rom_pri_option.restart_file_maxidx , 1 , MPI_INT, 0 , comm_global_);
20512065 bcast_check (mpirc);
20522066
2053- mpirc = MPI_Bcast (&rom_pri_option.save_librom_snapshot , 1 , MPI_C_BOOL, 0 , comm_global_);
2067+ mpirc = MPI_Bcast (
2068+ &rom_pri_option.save_librom_snapshot , 1 , MPI_C_BOOL, 0 , comm_global_);
20542069 bcast_check (mpirc);
20552070
2056- mpirc = MPI_Bcast (&rom_pri_option.librom_snapshot_freq , 1 , MPI_INT, 0 , comm_global_);
2071+ mpirc = MPI_Bcast (
2072+ &rom_pri_option.librom_snapshot_freq , 1 , MPI_INT, 0 , comm_global_);
20572073 bcast_check (mpirc);
20582074
20592075 short rom_var = (short )static_cast <int >(rom_pri_option.variable );
2060- mpirc = MPI_Bcast (&rom_var, 1 , MPI_SHORT, 0 , comm_global_);
2076+ mpirc = MPI_Bcast (&rom_var, 1 , MPI_SHORT, 0 , comm_global_);
20612077 bcast_check (mpirc);
20622078
20632079 rom_pri_option.rom_stage = static_cast <ROMStage>(rom_stage);
2064- rom_pri_option.variable = static_cast <ROMVariable>(rom_var);
2080+ rom_pri_option.variable = static_cast <ROMVariable>(rom_var);
20652081
2066- mpirc = MPI_Bcast (&rom_pri_option.compare_md , 1 , MPI_C_BOOL, 0 , comm_global_);
2082+ mpirc
2083+ = MPI_Bcast (&rom_pri_option.compare_md , 1 , MPI_C_BOOL, 0 , comm_global_);
20672084 bcast_check (mpirc);
20682085
2069- mpirc = MPI_Bcast (&rom_pri_option.num_orbbasis , 1 , MPI_INT, 0 , comm_global_);
2086+ mpirc
2087+ = MPI_Bcast (&rom_pri_option.num_orbbasis , 1 , MPI_INT, 0 , comm_global_);
20702088 bcast_check (mpirc);
20712089
2072- mpirc = MPI_Bcast (&rom_pri_option.num_potbasis , 1 , MPI_INT, 0 , comm_global_);
2090+ mpirc
2091+ = MPI_Bcast (&rom_pri_option.num_potbasis , 1 , MPI_INT, 0 , comm_global_);
20732092 bcast_check (mpirc);
20742093}
0 commit comments