Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/module_basis/module_pw/pw_basis.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,5 +293,5 @@ class PW_Basis
}
#endif // PWBASIS_H

#include "./pw_basis_big.h" //temporary it will be removed
#include "pw_basis_sup.h"
#include "pw_basis_sup.h"
#include "pw_basis_big.h" //temporary it will be removed
6 changes: 4 additions & 2 deletions source/module_basis/module_pw/pw_basis_big.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace ModulePW
{

class PW_Basis_Big: public PW_Basis
class PW_Basis_Big : public PW_Basis_Sup
{
public:
// combine [bx,by,bz] FFT grids into a big one
Expand All @@ -21,7 +21,9 @@ class PW_Basis_Big: public PW_Basis
PW_Basis_Big()
{
}
PW_Basis_Big(std::string device_, std::string precision_) : PW_Basis(device_, precision_) {}
PW_Basis_Big(std::string device_, std::string precision_) : PW_Basis_Sup(device_, precision_)
{
}

~PW_Basis_Big(){};
void setbxyz(const int bx_in, const int by_in, const int bz_in)
Expand Down
3 changes: 1 addition & 2 deletions source/module_basis/module_pw/pw_basis_sup.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "pw_basis_sup.h"

#include "module_base/timer.h"
#include "pw_basis.h"

namespace ModulePW
{
Expand Down
1 change: 0 additions & 1 deletion source/module_basis/module_pw/pw_basis_sup.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define PWBASIS_SUP_H

#include "module_base/complexmatrix.h"
#include "pw_basis.h"

namespace ModulePW
{
Expand Down
2 changes: 1 addition & 1 deletion source/module_basis/module_pw/test/test-big.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ TEST_F(PWTEST,test_big)
pwktest.initgrids(lat0,latvec, pwtest.nx, pwtest.ny, pwtest.nz);
pwtest.initparameters(gamma_only,wfcecut,distribution_type,xprime);
pwktest.initparameters(gamma_only,wfcecut,nks,kvec_d,distribution_type, xprime);
pwtest.setuptransform();
static_cast<ModulePW::PW_Basis>(pwtest).setuptransform();
pwktest.setuptransform();
EXPECT_EQ(pwtest.nx%2, 0);
EXPECT_EQ(pwtest.ny%2, 0);
Expand Down
3 changes: 3 additions & 0 deletions source/module_elecstate/test/elecstate_base_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ ModulePW::PW_Basis::PW_Basis()
ModulePW::PW_Basis::~PW_Basis()
{
}
ModulePW::PW_Basis_Sup::~PW_Basis_Sup()
{
}
ModulePW::FFT::FFT()
{
}
Expand Down
6 changes: 3 additions & 3 deletions source/module_esolver/esolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ namespace ModuleESolver
}
}
if (GlobalV::MY_RANK == 0) {
std::cout << " RUNNING WITH DEVICE : " << device_info << " / "
std::cout << " RUNNING WITH DEVICE : " << device_info << " / "
<< psi::device::get_device_info(GlobalV::device_flag) << std::endl;
}
GlobalV::ofs_running << "\n RUNNING WITH DEVICE : " << device_info << " / "
<< psi::device::get_device_info(GlobalV::device_flag) << std::endl;
GlobalV::ofs_running << "\n RUNNING WITH DEVICE : " << device_info << " / "
<< psi::device::get_device_info(GlobalV::device_flag) << std::endl;
return esolver_type;
}

Expand Down
4 changes: 2 additions & 2 deletions source/module_esolver/esolver_fp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ namespace ModuleESolver

if (GlobalV::double_grid)
{
pw_rhod = new ModulePW::PW_Basis_Sup(GlobalV::device_flag, GlobalV::precision_flag);
pw_rhod = new ModulePW::PW_Basis_Big(GlobalV::device_flag, GlobalV::precision_flag);
}
else
{
pw_rhod = pw_rho;
}

//temporary, it will be removed
pw_big = static_cast<ModulePW::PW_Basis_Big*>(pw_rho);
pw_big = static_cast<ModulePW::PW_Basis_Big*>(pw_rhod);
pw_big->setbxyz(INPUT.bx, INPUT.by, INPUT.bz);
sf.set(pw_rhod, INPUT.nbspline);

Expand Down