SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
sirius::Smooth_periodic_function< T > Class Template Reference

Representation of a smooth (Fourier-transformable) periodic function. More...

#include <smooth_periodic_function.hpp>

Public Member Functions

 Smooth_periodic_function ()
 Default constructor. More...
 
 Smooth_periodic_function (fft::spfft_transform_type< T > const &spfft__, std::shared_ptr< fft::Gvec_fft > gvecp__, smooth_periodic_function_ptr_t< T > const *sptr__=nullptr)
 Constructor. More...
 
 Smooth_periodic_function (Smooth_periodic_function< T > &&src__)=default
 
Smooth_periodic_function< T > & operator= (Smooth_periodic_function< T > &&src__)=default
 
void zero ()
 Zero the values on the regular real-space grid and plane-wave coefficients. More...
 
T const & value (int ir__) const
 
T & value (int ir__)
 
auto values () -> sddk::mdarray< T, 1 > &
 
auto values () const -> const sddk::mdarray< T, 1 > &
 
auto f_pw_local (int ig__) -> std::complex< T > &
 
auto f_pw_local (int ig__) const -> const std::complex< T > &
 
auto f_pw_local () -> sddk::mdarray< std::complex< T >, 1 > &
 
auto f_pw_local () const -> const sddk::mdarray< std::complex< T >, 1 > &
 
auto & f_pw_fft (int ig__)
 
auto f_0 () const
 Return plane-wave coefficient for G=0 component. More...
 
auto & spfft ()
 
auto const & spfft () const
 
auto & gvec () const
 
auto gvec_fft () const
 
void fft_transform (int direction__)
 
auto gather_f_pw () const
 
void scatter_f_pw (std::vector< std::complex< T > > const &f_pw__)
 
Smooth_periodic_function< T > & operator+= (Smooth_periodic_function< T > const &rhs__)
 
Smooth_periodic_function< T > & operator*= (T alpha__)
 
checksum_rg () const
 
auto checksum_pw () const
 
uint64_t hash_f_pw () const
 
uint64_t hash_f_rg () const
 

Protected Member Functions

void gather_f_pw_fft ()
 Gather plane-wave coefficients for the subsequent FFT call. More...
 
 Smooth_periodic_function (Smooth_periodic_function< T > const &src__)=delete
 
Smooth_periodic_function< T > & operator= (Smooth_periodic_function< T > const &src__)=delete
 

Protected Attributes

fft::spfft_transform_type< T > * spfft_ {nullptr}
 FFT driver. More...
 
std::shared_ptr< fft::Gvec_fftgvecp_ {nullptr}
 Distribution of G-vectors. More...
 
sddk::mdarray< T, 1 > f_rg_
 Function on the regular real-space grid. More...
 
sddk::mdarray< std::complex< T >, 1 > f_pw_local_
 Local set of plane-wave expansion coefficients. More...
 
sddk::mdarray< std::complex< T >, 1 > f_pw_fft_
 Storage of the PW coefficients for the FFT transformation. More...
 

Friends

template<typename F >
void copy (Smooth_periodic_function< F > const &src__, Smooth_periodic_function< F > &dest__)
 
template<typename F >
void scale (F alpha__, Smooth_periodic_function< F > &x__)
 
template<typename F >
void axpy (F alpha__, Smooth_periodic_function< F > const &x__, Smooth_periodic_function< F > &y__)
 

Detailed Description

template<typename T>
class sirius::Smooth_periodic_function< T >

Representation of a smooth (Fourier-transformable) periodic function.

The class is designed to handle periodic functions such as density or potential, defined on a regular FFT grid. The following functionality is provided:

Definition at line 81 of file smooth_periodic_function.hpp.

Constructor & Destructor Documentation

◆ Smooth_periodic_function() [1/2]

template<typename T >
sirius::Smooth_periodic_function< T >::Smooth_periodic_function ( )
inline

Default constructor.

Definition at line 122 of file smooth_periodic_function.hpp.

◆ Smooth_periodic_function() [2/2]

template<typename T >
sirius::Smooth_periodic_function< T >::Smooth_periodic_function ( fft::spfft_transform_type< T > const &  spfft__,
std::shared_ptr< fft::Gvec_fft gvecp__,
smooth_periodic_function_ptr_t< T > const *  sptr__ = nullptr 
)
inline

Constructor.

Definition at line 127 of file smooth_periodic_function.hpp.

Member Function Documentation

◆ gather_f_pw_fft()

template<typename T >
void sirius::Smooth_periodic_function< T >::gather_f_pw_fft ( )
inlineprotected

Gather plane-wave coefficients for the subsequent FFT call.

Definition at line 100 of file smooth_periodic_function.hpp.

◆ zero()

template<typename T >
void sirius::Smooth_periodic_function< T >::zero ( )
inline

Zero the values on the regular real-space grid and plane-wave coefficients.

Definition at line 167 of file smooth_periodic_function.hpp.

◆ value() [1/2]

template<typename T >
T const & sirius::Smooth_periodic_function< T >::value ( int  ir__) const
inline

Definition at line 173 of file smooth_periodic_function.hpp.

◆ value() [2/2]

template<typename T >
T & sirius::Smooth_periodic_function< T >::value ( int  ir__)
inline

Definition at line 178 of file smooth_periodic_function.hpp.

◆ values() [1/2]

template<typename T >
auto sirius::Smooth_periodic_function< T >::values ( ) -> sddk::mdarray<T, 1>&
inline

Definition at line 183 of file smooth_periodic_function.hpp.

◆ values() [2/2]

template<typename T >
auto sirius::Smooth_periodic_function< T >::values ( ) const -> const sddk::mdarray<T,1>&
inline

Definition at line 188 of file smooth_periodic_function.hpp.

◆ f_pw_local() [1/4]

template<typename T >
auto sirius::Smooth_periodic_function< T >::f_pw_local ( int  ig__) -> std::complex<T>&
inline

Definition at line 193 of file smooth_periodic_function.hpp.

◆ f_pw_local() [2/4]

template<typename T >
auto sirius::Smooth_periodic_function< T >::f_pw_local ( int  ig__) const -> const std::complex<T>&
inline

Definition at line 198 of file smooth_periodic_function.hpp.

◆ f_pw_local() [3/4]

template<typename T >
auto sirius::Smooth_periodic_function< T >::f_pw_local ( ) -> sddk::mdarray<std::complex<T>, 1>&
inline

Definition at line 203 of file smooth_periodic_function.hpp.

◆ f_pw_local() [4/4]

template<typename T >
auto sirius::Smooth_periodic_function< T >::f_pw_local ( ) const -> const sddk::mdarray<std::complex<T>, 1>&
inline

Definition at line 208 of file smooth_periodic_function.hpp.

◆ f_pw_fft()

template<typename T >
auto & sirius::Smooth_periodic_function< T >::f_pw_fft ( int  ig__)
inline

Definition at line 213 of file smooth_periodic_function.hpp.

◆ f_0()

template<typename T >
auto sirius::Smooth_periodic_function< T >::f_0 ( ) const
inline

Return plane-wave coefficient for G=0 component.

Definition at line 219 of file smooth_periodic_function.hpp.

◆ spfft() [1/2]

template<typename T >
auto & sirius::Smooth_periodic_function< T >::spfft ( )
inline

Definition at line 229 of file smooth_periodic_function.hpp.

◆ spfft() [2/2]

template<typename T >
auto const & sirius::Smooth_periodic_function< T >::spfft ( ) const
inline

Definition at line 235 of file smooth_periodic_function.hpp.

◆ gvec()

template<typename T >
auto & sirius::Smooth_periodic_function< T >::gvec ( ) const
inline

Definition at line 241 of file smooth_periodic_function.hpp.

◆ gvec_fft()

template<typename T >
auto sirius::Smooth_periodic_function< T >::gvec_fft ( ) const
inline

Definition at line 247 of file smooth_periodic_function.hpp.

◆ fft_transform()

template<typename T >
void sirius::Smooth_periodic_function< T >::fft_transform ( int  direction__)
inline

Definition at line 252 of file smooth_periodic_function.hpp.

◆ gather_f_pw()

template<typename T >
auto sirius::Smooth_periodic_function< T >::gather_f_pw ( ) const
inline

Definition at line 287 of file smooth_periodic_function.hpp.

◆ scatter_f_pw()

template<typename T >
void sirius::Smooth_periodic_function< T >::scatter_f_pw ( std::vector< std::complex< T > > const &  f_pw__)
inline

Definition at line 297 of file smooth_periodic_function.hpp.

◆ operator+=()

template<typename T >
Smooth_periodic_function< T > & sirius::Smooth_periodic_function< T >::operator+= ( Smooth_periodic_function< T > const &  rhs__)
inline

Definition at line 303 of file smooth_periodic_function.hpp.

◆ operator*=()

template<typename T >
Smooth_periodic_function< T > & sirius::Smooth_periodic_function< T >::operator*= ( alpha__)
inline

Definition at line 319 of file smooth_periodic_function.hpp.

◆ checksum_rg()

template<typename T >
T sirius::Smooth_periodic_function< T >::checksum_rg ( ) const
inline

Definition at line 335 of file smooth_periodic_function.hpp.

◆ checksum_pw()

template<typename T >
auto sirius::Smooth_periodic_function< T >::checksum_pw ( ) const
inline

Definition at line 342 of file smooth_periodic_function.hpp.

◆ hash_f_pw()

template<typename T >
uint64_t sirius::Smooth_periodic_function< T >::hash_f_pw ( ) const
inline

Definition at line 349 of file smooth_periodic_function.hpp.

◆ hash_f_rg()

template<typename T >
uint64_t sirius::Smooth_periodic_function< T >::hash_f_rg ( ) const
inline

Definition at line 361 of file smooth_periodic_function.hpp.

Member Data Documentation

◆ spfft_

template<typename T >
fft::spfft_transform_type<T>* sirius::Smooth_periodic_function< T >::spfft_ {nullptr}
protected

FFT driver.

Definition at line 85 of file smooth_periodic_function.hpp.

◆ gvecp_

template<typename T >
std::shared_ptr<fft::Gvec_fft> sirius::Smooth_periodic_function< T >::gvecp_ {nullptr}
protected

Distribution of G-vectors.

Definition at line 88 of file smooth_periodic_function.hpp.

◆ f_rg_

template<typename T >
sddk::mdarray<T, 1> sirius::Smooth_periodic_function< T >::f_rg_
protected

Function on the regular real-space grid.

Definition at line 91 of file smooth_periodic_function.hpp.

◆ f_pw_local_

template<typename T >
sddk::mdarray<std::complex<T>, 1> sirius::Smooth_periodic_function< T >::f_pw_local_
protected

Local set of plane-wave expansion coefficients.

Definition at line 94 of file smooth_periodic_function.hpp.

◆ f_pw_fft_

template<typename T >
sddk::mdarray<std::complex<T>, 1> sirius::Smooth_periodic_function< T >::f_pw_fft_
protected

Storage of the PW coefficients for the FFT transformation.

Definition at line 97 of file smooth_periodic_function.hpp.


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