Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: remove hsolver base class from module_hsolver #5093

Merged
merged 4 commits into from
Sep 14, 2024
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
11 changes: 0 additions & 11 deletions source/module_hsolver/hsolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@
namespace hsolver
{

template <typename T, typename Device = base_device::DEVICE_CPU>
class HSolver
{
private:
using Real = typename GetTypeReal<T>::type;

public:
HSolver() {};
};


double set_diagethr_ks(const std::string basis_type,
const std::string esolver_type,
const std::string calculation_in,
Expand Down
4 changes: 2 additions & 2 deletions source/module_hsolver/hsolver_pw.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class HSolverPW

void output_iterInfo();

ModulePW::PW_Basis_K* wfc_basis = nullptr;
wavefunc* pwf = nullptr;
ModulePW::PW_Basis_K* wfc_basis;
wavefunc* pwf; // only for diago_PAO_in_pw_k2 func

const std::string calculation_type;
const std::string basis_type;
Expand Down
12 changes: 6 additions & 6 deletions source/module_hsolver/test/test_hsolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include <module_base/macros.h>

template class hsolver::HSolver<std::complex<float>, base_device::DEVICE_CPU>;
template class hsolver::HSolver<std::complex<double>, base_device::DEVICE_CPU>;
// template class hsolver::HSolver<std::complex<float>, base_device::DEVICE_CPU>;
// template class hsolver::HSolver<std::complex<double>, base_device::DEVICE_CPU>;

/************************************************
* unit test of HSolver base class
Expand All @@ -34,10 +34,10 @@ template class hsolver::HSolver<std::complex<double>, base_device::DEVICE_CPU>;
class TestHSolver : public ::testing::Test
{
public:
hsolver::HSolver<std::complex<float>, base_device::DEVICE_CPU> hs_cf;
hsolver::HSolver<std::complex<double>, base_device::DEVICE_CPU> hs_cd;
hsolver::HSolver<float, base_device::DEVICE_CPU> hs_f;
hsolver::HSolver<double, base_device::DEVICE_CPU> hs_d;
// hsolver::HSolver<std::complex<float>, base_device::DEVICE_CPU> hs_cf;
// hsolver::HSolver<std::complex<double>, base_device::DEVICE_CPU> hs_cd;
// hsolver::HSolver<float, base_device::DEVICE_CPU> hs_f;
// hsolver::HSolver<double, base_device::DEVICE_CPU> hs_d;

hamilt::Hamilt<std::complex<double>> hamilt_test_cd;
hamilt::Hamilt<std::complex<float>> hamilt_test_cf;
Expand Down
Loading