Skip to content

Commit 806f97b

Browse files
committed
update annotation and shorten the class name
1 parent e7a0bcb commit 806f97b

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

source/module_esolver/lcao_after_scf.cpp

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -482,24 +482,27 @@ void ESolver_KS_LCAO<TK, TR>::after_scf(UnitCell& ucell, const int istep, const
482482
RA.delete_grid();
483483
}
484484

485+
//------------------------------------------------------------------
486+
//! 20) calculate expectation of angular momentum operator in LCAO basis
487+
//------------------------------------------------------------------
485488
if (PARAM.inp.out_mat_l[0])
486489
{
487-
ModuleIO::AngularMomentumExpectationCalculator mylcalculator(
488-
PARAM.inp.orbital_dir,
489-
ucell,
490-
PARAM.inp.search_radius,
491-
PARAM.inp.test_deconstructor,
492-
PARAM.inp.test_grid,
493-
PARAM.inp.test_atom_input,
494-
PARAM.inp.search_pbc,
495-
&GlobalV::ofs_running,
496-
GlobalV::MY_RANK
490+
ModuleIO::AngularMomentumCalculator mylcalculator(
491+
/*orbital_dir=*/PARAM.inp.orbital_dir,
492+
/*ucell=*/ucell,
493+
/*search_radius=*/PARAM.inp.search_radius,
494+
/*test_deconstructor=*/PARAM.inp.test_deconstructor,
495+
/*test_grid=*/PARAM.inp.test_grid,
496+
/*test_atom_input=*/PARAM.inp.test_atom_input,
497+
/*search_pbc=*/PARAM.inp.search_pbc,
498+
/*ofs=*/&GlobalV::ofs_running,
499+
/*rank=*/GlobalV::MY_RANK
497500
);
498-
mylcalculator.calculate(PARAM.inp.suffix,
499-
PARAM.inp.read_file_dir,
500-
ucell,
501-
PARAM.inp.out_mat_l[1],
502-
GlobalV::MY_RANK);
501+
mylcalculator.calculate(/*suffix=*/PARAM.inp.suffix,
502+
/*outdir=*/PARAM.globalv.global_out_dir,
503+
/*ucell=*/ucell,
504+
/*precision=*/PARAM.inp.out_mat_l[1],
505+
/*rank=*/GlobalV::MY_RANK);
503506
}
504507

505508
ModuleBase::timer::tick("ESolver_KS_LCAO", "after_scf");

source/module_io/cal_pLpR.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ std::complex<double> ModuleIO::cal_LxijR(
8989
return std::complex<double>(0.5) * (val_plus + val_minus);
9090
}
9191

92-
ModuleIO::AngularMomentumExpectationCalculator::AngularMomentumExpectationCalculator(
92+
ModuleIO::AngularMomentumCalculator::AngularMomentumCalculator(
9393
const std::string& orbital_dir,
9494
const UnitCell& ucell,
9595
const double& search_radius,
@@ -165,7 +165,7 @@ ModuleIO::AngularMomentumExpectationCalculator::AngularMomentumExpectationCalcul
165165
tatom);
166166
}
167167

168-
void ModuleIO::AngularMomentumExpectationCalculator::kernel(
168+
void ModuleIO::AngularMomentumCalculator::kernel(
169169
std::ofstream* ofs,
170170
const UnitCell& ucell,
171171
const char dir,
@@ -253,7 +253,7 @@ void ModuleIO::AngularMomentumExpectationCalculator::kernel(
253253
}
254254
}
255255

256-
void ModuleIO::AngularMomentumExpectationCalculator::calculate(
256+
void ModuleIO::AngularMomentumCalculator::calculate(
257257
const std::string& prefix,
258258
const std::string& outdir,
259259
const UnitCell& ucell,

source/module_io/cal_pLpR.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ namespace ModuleIO
157157
// im and jm are indexes of the magnetic quantum numbers.
158158
// The output is a complex number, which is the value of the matrix element.
159159
// Always the matrix is quite large, so direct print to file.
160-
class AngularMomentumExpectationCalculator
160+
class AngularMomentumCalculator
161161
{
162162
public:
163163
// the default constructor is meaningless
164-
AngularMomentumExpectationCalculator() = delete;
164+
AngularMomentumCalculator() = delete;
165165
/**
166166
* @brief Construct a new Angular Momentum Expectation Calculator object
167167
*
@@ -174,7 +174,7 @@ namespace ModuleIO
174174
* @param searchpbc
175175
* @param ptr_log pointer to the ofstream object for logging
176176
*/
177-
AngularMomentumExpectationCalculator(
177+
AngularMomentumCalculator(
178178
const std::string& orbital_dir,
179179
const UnitCell& ucell,
180180
const double& search_radius,
@@ -184,7 +184,7 @@ namespace ModuleIO
184184
const bool searchpbc,
185185
std::ofstream* ptr_log = nullptr,
186186
const int rank = 0);
187-
~AngularMomentumExpectationCalculator() = default;
187+
~AngularMomentumCalculator() = default;
188188

189189
void calculate(const std::string& prefix,
190190
const std::string& outdir,

0 commit comments

Comments
 (0)