Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Jul 8, 2024
1 parent 690bc80 commit e412cb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/module_esolver/esolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
namespace ModuleESolver
{

void ESolver::printname(void)
void ESolver::printname()
{
std::cout << classname << std::endl;
}

std::string determine_type(void)
std::string determine_type()
{
std::string esolver_type = "none";
if (GlobalV::BASIS_TYPE == "pw")
Expand Down
6 changes: 4 additions & 2 deletions source/module_hamilt_pw/hamilt_pwdft/wfinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ void WFInit<T, Device>::prepare_init(Structure_Factor* p_sf,
#endif
pseudopot_cell_vnl* p_ppcell)
{
if (!this->use_psiinitializer)
if (!this->use_psiinitializer) {
return;
}
// under restriction of C++11, std::unique_ptr can not be allocate via std::make_unique
// use new instead, but will cause asymmetric allocation and deallocation, in literal aspect
ModuleBase::timer::tick("WFInit", "prepare_init");
Expand Down Expand Up @@ -160,8 +161,9 @@ void WFInit<T, Device>::initialize_psi(Psi<std::complex<double>>* psi,
hamilt::Hamilt<T, Device>* p_hamilt,
std::ofstream& ofs_running)
{
if (!this->use_psiinitializer)
if (!this->use_psiinitializer) {
return;
}
ModuleBase::timer::tick("WFInit", "initialize_psi");
if (!this->psi_init->psig_use_count()) { this->psi_init->allocate(/*psig_only=*/true); }
for (int ik = 0; ik < this->pw_wfc->nks; ik++)
Expand Down

0 comments on commit e412cb0

Please sign in to comment.