Skip to content

Commit 1d9e60f

Browse files
committed
Refactor some files
1 parent 20fd170 commit 1d9e60f

File tree

6 files changed

+7
-21
lines changed

6 files changed

+7
-21
lines changed

source/module_hamilt_lcao/module_tddft/bandenergy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ void compute_ekb_tensor_lapack(const Parallel_Orbitals* pv,
4545
const ct::Tensor& Htmp,
4646
const ct::Tensor& psi_k,
4747
ct::Tensor& ekb);
48-
#endif
48+
#endif // __MPI
4949
} // namespace module_tddft
5050
#endif

source/module_hamilt_lcao/module_tddft/evolve_elec.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ void Evolve_elec<Device>::solve_psi(const int& istep,
9494
// std::cout << "psi->get_nbands() = " << psi->get_nbands() << std::endl;
9595
// std::cout << "nlocal = " << nlocal << std::endl;
9696
// std::cout << "psi->get_nbasis() = " << psi->get_nbasis() << std::endl;
97+
// std::cout << "para_orb.nloc = " << para_orb.nloc << std::endl;
98+
// std::cout << "para_orb.nrow = " << para_orb.nrow << std::endl;
99+
// std::cout << "para_orb.ncol = " << para_orb.ncol << std::endl;
97100
// std::cout << "ekb.nr = " << ekb.nr << std::endl;
98101
// std::cout << "ekb.nc = " << ekb.nc << std::endl;
99102

source/module_hamilt_lcao/module_tddft/evolve_psi.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,6 @@ void evolve_psi_tensor(const int nband,
162162
syncmem_complex_h2d_op()(ctx, cpu_ctx, Htmp.data<std::complex<double>>(), h_mat.p, pv->nloc);
163163
syncmem_complex_h2d_op()(ctx, cpu_ctx, Hold.data<std::complex<double>>(), h_mat.p, pv->nloc);
164164

165-
// Convert s_mat.p, h_mat.p to Tensor using TensorMap
166-
// ct::TensorMap s_mat_tensor(s_mat.p,
167-
// ct::DataType::DT_COMPLEX_DOUBLE,
168-
// ct::DeviceType::CpuDevice,
169-
// ct::TensorShape({pv->nloc}));
170-
// ct::TensorMap h_mat_tensor(h_mat.p,
171-
// ct::DataType::DT_COMPLEX_DOUBLE,
172-
// ct::DeviceType::CpuDevice,
173-
// ct::TensorShape({pv->nloc}));
174-
175-
// Use Tensor's copy constructor to create Stmp, Htmp, and Hold
176-
// ct::Tensor Stmp(s_mat_tensor);
177-
// ct::Tensor Htmp(h_mat_tensor);
178-
// ct::Tensor Hold(h_mat_tensor);
179-
180165
ct::Tensor U_operator(ct::DataType::DT_COMPLEX_DOUBLE, ct_device_type, ct::TensorShape({pv->nloc}));
181166
U_operator.zero();
182167

@@ -210,7 +195,6 @@ void evolve_psi_tensor(const int nband,
210195
/// @brief apply U_operator to the wave function of the previous step for new wave function
211196
/// @input U_operator, psi_k_laststep, print_matrix
212197
/// @output psi_k
213-
// Use TensorMap to map psi_k_laststep and psi_k to Tensor
214198
if (!use_lapack)
215199
{
216200
upsi_tensor(pv, nband, nlocal, U_operator, psi_k_laststep, psi_k, print_matrix);
@@ -239,7 +223,6 @@ void evolve_psi_tensor(const int nband,
239223
/// @brief compute ekb
240224
/// @input Htmp, psi_k
241225
/// @output ekb
242-
// Create a Tensor for ekb using TensorMap
243226
if (!use_lapack)
244227
{
245228
compute_ekb_tensor(pv, nband, nlocal, Hold, psi_k, ekb);

source/module_hamilt_lcao/module_tddft/middle_hamilt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void half_Hmatrix_tensor_lapack(const Parallel_Orbitals* pv,
5353
const ct::Tensor& S_laststep,
5454
const int print_matrix);
5555

56-
#endif
56+
#endif // __MPI
5757
} // namespace module_tddft
5858

5959
#endif

source/module_hamilt_lcao/module_tddft/norm_psi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void norm_psi_tensor_lapack(const Parallel_Orbitals* pv,
4747
ct::Tensor& psi_k,
4848
const int print_matrix);
4949

50-
#endif
50+
#endif // __MPI
5151
} // namespace module_tddft
5252

5353
#endif

source/module_hamilt_lcao/module_tddft/upsi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void upsi_tensor_lapack(const Parallel_Orbitals* pv,
5151
ct::Tensor& psi_k,
5252
const int print_matrix);
5353

54-
#endif
54+
#endif // __MPI
5555
} // namespace module_tddft
5656

5757
#endif

0 commit comments

Comments
 (0)