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
21 changes: 0 additions & 21 deletions source/module_elecstate/module_dm/density_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,27 +272,6 @@ TK* DensityMatrix<TK, TR>::get_DMK_pointer(const int ik) const
return const_cast<TK*>(this->_DMK[ik].data());
}

// get _DMK[ik] vector
template <typename TK, typename TR>
std::vector<std::vector<TK>> DensityMatrix<TK, TR>::get_DMK_vector() const
{
return this->_DMK;
}

// get _paraV pointer
template <typename TK, typename TR>
const Parallel_Orbitals* DensityMatrix<TK, TR>::get_paraV_pointer() const
{
return this->_paraV;
}

// get _kv pointer
template <typename TK, typename TR>
const K_Vectors* DensityMatrix<TK, TR>::get_kv_pointer() const
{
return this->_kv;
}

// set DMK using a pointer
template <typename TK, typename TR>
void DensityMatrix<TK, TR>::set_DMK_pointer(const int ik, TK* DMK_in)
Expand Down
13 changes: 8 additions & 5 deletions source/module_elecstate/module_dm/density_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ class DensityMatrix
* @brief get pointer vector of DMR
* @return HContainer<TR>* vector of DMR
*/
std::vector<hamilt::HContainer<TR>*> get_DMR_vector() const {return this->_DMR;}
const std::vector<hamilt::HContainer<TR>*>& get_DMR_vector() const {return this->_DMR;}
std::vector<hamilt::HContainer<TR>*>& get_DMR_vector() {return this->_DMR;}

std::vector<std::vector<TR>> get_DMR_save() const {return _DMR_save;}
const std::vector<std::vector<TR>>& get_DMR_save() const {return this->_DMR_save;}
std::vector<std::vector<TR>>& get_DMR_save() {return this->_DMR_save;}

/**
* @brief get pointer of DMK
Expand All @@ -153,7 +155,8 @@ class DensityMatrix
/**
* @brief get pointer vector of DMK
*/
std::vector<std::vector<TK>> get_DMK_vector() const;
const std::vector<std::vector<TK>>& get_DMK_vector() const {return this->_DMK;}
std::vector<std::vector<TK>>& get_DMK_vector() {return this->_DMK;}

/**
* @brief set _DMK using a input TK* pointer
Expand All @@ -164,9 +167,9 @@ class DensityMatrix
/**
* @brief get pointer of paraV
*/
const Parallel_Orbitals* get_paraV_pointer() const;
const Parallel_Orbitals* get_paraV_pointer() const {return this->_paraV;}

const K_Vectors* get_kv_pointer() const;
const K_Vectors* get_kv_pointer() const {return this->_kv;}

/**
* @brief calculate density matrix DMR from dm(k) using blas::axpy
Expand Down