SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Protected Attributes | List of all members
sirius::Hubbard_matrix Class Reference

Describes Hubbard orbital occupancy or potential correction matrices. More...

#include <hubbard_matrix.hpp>

Inherited by sirius::Occupation_matrix.

Public Member Functions

 Hubbard_matrix (Simulation_context &ctx__)
 
void access (std::string const &what__, std::complex< double > *ptr__, int ld__)
 Retrieve or set elements of the Hubbard matrix. More...
 
void print_local (int ia__, std::ostream &out__) const
 
void print_nonlocal (int idx__, std::ostream &out__) const
 
void zero ()
 
auto & local () const
 Return a vector containing the occupation numbers for each atomic orbital. More...
 
auto & local (int ia__)
 
auto const & local (int ia__) const
 
auto & nonlocal () const
 
auto & nonlocal (int idx__)
 
auto const & nonlocal (int idx__) const
 
const auto & atomic_orbitals () const
 
const auto & atomic_orbitals (const int idx__) const
 
int offset (const int idx__) const
 
const auto & offset () const
 
auto const & ctx () const
 
int find_orbital_index (const int ia__, const int n__, const int l__) const
 

Protected Attributes

Simulation_contextctx_
 
std::vector< sddk::mdarray< std::complex< double >, 3 > > local_
 Local part of Hubbard matrix. More...
 
std::vector< sddk::mdarray< std::complex< double >, 3 > > nonlocal_
 Non-local part of Hubbard matrix. More...
 
std::vector< std::pair< int, int > > atomic_orbitals_
 
std::vector< int > offset_
 

Detailed Description

Describes Hubbard orbital occupancy or potential correction matrices.

Definition at line 33 of file hubbard_matrix.hpp.

Constructor & Destructor Documentation

◆ Hubbard_matrix()

sirius::Hubbard_matrix::Hubbard_matrix ( Simulation_context ctx__)

Definition at line 30 of file hubbard_matrix.cpp.

Member Function Documentation

◆ access()

void sirius::Hubbard_matrix::access ( std::string const &  what__,
std::complex< double > *  ptr__,
int  ld__ 
)

Retrieve or set elements of the Hubbard matrix.

This functions helps retrieving or setting up the hubbard occupancy tensors from an external tensor. Retrieving it is done by specifying "get" in the first argument of the method while setting it is done with the parameter set up to "set". The second parameter is the output pointer and the last parameter is the leading dimension of the tensor.

The returned result has the same layout than SIRIUS layout, * i.e., the harmonic orbitals are stored from m_z = -l..l. The occupancy matrix can also be accessed through the method occupation_matrix()

Parameters
[in]whatString to set to "set" for initializing sirius ccupancy tensor and "get" for retrieving it.
[in,out]occPointer to external occupancy tensor.
[in]ldLeading dimension of the outside tensor.
Returns
return the occupancy matrix if the first parameter is set to "get".

Definition at line 88 of file hubbard_matrix.cpp.

◆ print_local()

void sirius::Hubbard_matrix::print_local ( int  ia__,
std::ostream &  out__ 
) const

Definition at line 132 of file hubbard_matrix.cpp.

◆ print_nonlocal()

void sirius::Hubbard_matrix::print_nonlocal ( int  idx__,
std::ostream &  out__ 
) const

Definition at line 197 of file hubbard_matrix.cpp.

◆ zero()

void sirius::Hubbard_matrix::zero ( )

Definition at line 275 of file hubbard_matrix.cpp.

◆ local() [1/3]

auto & sirius::Hubbard_matrix::local ( ) const
inline

Return a vector containing the occupation numbers for each atomic orbital.

Definition at line 72 of file hubbard_matrix.hpp.

◆ local() [2/3]

auto & sirius::Hubbard_matrix::local ( int  ia__)
inline

Definition at line 77 of file hubbard_matrix.hpp.

◆ local() [3/3]

auto const & sirius::Hubbard_matrix::local ( int  ia__) const
inline

Definition at line 82 of file hubbard_matrix.hpp.

◆ nonlocal() [1/3]

auto & sirius::Hubbard_matrix::nonlocal ( ) const
inline

Definition at line 87 of file hubbard_matrix.hpp.

◆ nonlocal() [2/3]

auto & sirius::Hubbard_matrix::nonlocal ( int  idx__)
inline

Definition at line 92 of file hubbard_matrix.hpp.

◆ nonlocal() [3/3]

auto const & sirius::Hubbard_matrix::nonlocal ( int  idx__) const
inline

Definition at line 97 of file hubbard_matrix.hpp.

◆ atomic_orbitals() [1/2]

const auto & sirius::Hubbard_matrix::atomic_orbitals ( ) const
inline

Definition at line 102 of file hubbard_matrix.hpp.

◆ atomic_orbitals() [2/2]

const auto & sirius::Hubbard_matrix::atomic_orbitals ( const int  idx__) const
inline

Definition at line 107 of file hubbard_matrix.hpp.

◆ offset() [1/2]

int sirius::Hubbard_matrix::offset ( const int  idx__) const
inline

Definition at line 112 of file hubbard_matrix.hpp.

◆ offset() [2/2]

const auto & sirius::Hubbard_matrix::offset ( ) const
inline

Definition at line 117 of file hubbard_matrix.hpp.

◆ ctx()

auto const & sirius::Hubbard_matrix::ctx ( ) const
inline

Definition at line 122 of file hubbard_matrix.hpp.

◆ find_orbital_index()

int sirius::Hubbard_matrix::find_orbital_index ( const int  ia__,
const int  n__,
const int  l__ 
) const
inline

Definition at line 127 of file hubbard_matrix.hpp.

Member Data Documentation

◆ ctx_

Simulation_context& sirius::Hubbard_matrix::ctx_
protected

Definition at line 36 of file hubbard_matrix.hpp.

◆ local_

std::vector<sddk::mdarray<std::complex<double>, 3> > sirius::Hubbard_matrix::local_
protected

Local part of Hubbard matrix.

Definition at line 38 of file hubbard_matrix.hpp.

◆ nonlocal_

std::vector<sddk::mdarray<std::complex<double>, 3> > sirius::Hubbard_matrix::nonlocal_
protected

Non-local part of Hubbard matrix.

Definition at line 40 of file hubbard_matrix.hpp.

◆ atomic_orbitals_

std::vector<std::pair<int, int> > sirius::Hubbard_matrix::atomic_orbitals_
protected

Definition at line 41 of file hubbard_matrix.hpp.

◆ offset_

std::vector<int> sirius::Hubbard_matrix::offset_
protected

Definition at line 42 of file hubbard_matrix.hpp.


The documentation for this class was generated from the following files: