32 PROFILE(
"sirius::K_point::generate_spinor_wave_functions");
34 if (ctx_.cfg().control().use_second_variation()) {
35 int nfv = ctx_.num_fv_states();
37 if (!ctx_.need_sv()) {
44 int nbnd = (ctx_.num_mag_dims() == 3) ? ctx_.num_bands() : nfv;
46 if (ctx_.processing_unit() == sddk::device_t::GPU) {
49 sv_eigen_vectors_[0].allocate(get_memory_pool(sddk::memory_t::device)).copy_to(sddk::memory_t::device);
50 if (ctx_.num_mag_dims() == 1) {
51 sv_eigen_vectors_[1].allocate(get_memory_pool(sddk::memory_t::device)).copy_to(sddk::memory_t::device);
61 for (
int ispn = 0; ispn < ctx_.num_spins(); ispn++) {
64 if (ctx_.num_mag_dims() == 3) {
74 wf::transform(ctx_.spla_context(), sddk::memory_t::host, sv_eigen_vectors_[s], o, 0, 1.0, *fv_states_,
79 if (ctx_.processing_unit() == sddk::device_t::GPU) {
80 sv_eigen_vectors_[0].deallocate(sddk::memory_t::device);
81 if (ctx_.num_mag_dims() == 3) {
82 sv_eigen_vectors_[1].deallocate(sddk::memory_t::device);
86 RTE_THROW(
"not implemented");
void generate_spinor_wave_functions()
Generate two-component spinor wave functions.
Describe a range of bands.
Contains definition of sirius::K_point class.
std::enable_if_t< std::is_same< T, real_type< F > >::value, void > transform(::spla::Context &spla_ctx__, sddk::memory_t mem__, la::dmatrix< F > const &M__, int irow0__, int jcol0__, real_type< F > alpha__, Wave_functions< T > const &wf_in__, spin_index s_in__, band_range br_in__, real_type< F > beta__, Wave_functions< T > &wf_out__, spin_index s_out__, band_range br_out__)
Apply linear transformation to the wave-functions.
void copy(sddk::memory_t mem__, Wave_functions< T > const &in__, wf::spin_index s_in__, wf::band_range br_in__, Wave_functions< F > &out__, wf::spin_index s_out__, wf::band_range br_out__)
Copy wave-functions.
Namespace of the SIRIUS library.