ampsci
High-precision calculations for one- and two-valence atomic systems
Loading...
Searching...
No Matches
MBPT::RadialMatrix< T >

#include <RadialMatrix.hpp>

Public Member Functions

 RadialMatrix (std::size_t i0, std::size_t stride, std::size_t size, std::shared_ptr< const Grid > rgrid)
 
T & at (std::size_t i, std::size_t j)
 direct access to matrix elements
 
at (std::size_t i, std::size_t j) const
 
T & operator() (std::size_t i, std::size_t j)
 
operator() (std::size_t i, std::size_t j) const
 
const LinAlg::Matrix< T > & Rmatrix () const
 direct access to radial matrix
 
LinAlg::Matrix< T > & Rmatrix ()
 
std::size_t size () const
 
std::size_t i0 () const
 
std::size_t stride () const
 
double r0 () const
 First point along full grid for which subgrid is defined.
 
double rmax () const
 Last point along full grid for which subgrid is defined.
 
double r (std::size_t sub_i) const
 returns r at position sub_i along sub grid
 
double dr (std::size_t sub_i) const
 returns dr at position along sub grid
 
std::size_t index_to_fullgrid (std::size_t i) const
 Converts an index on the sub-grid to the full grid.
 
void zero ()
 Sets the radial matrix to have all zero's.
 
RadialMatrix< T > & operator+= (const RadialMatrix< T > &rhs)
 Matrix adition +,-.
 
RadialMatrix< T > & operator-= (const RadialMatrix< T > &rhs)
 Matrix adition +,-.
 
RadialMatrix< T > & operator*= (const T x)
 Scalar multiplication.
 
RadialMatrix< T > & operator+= (T aI)
 Adition of identity: Matrix<T> += T : T assumed to be *Identity!
 
RadialMatrix< T > & operator-= (T aI)
 Adition of identity: Matrix<T> -= T : T assumed to be *Identity!
 
RadialMatrix< T > & mult_elements_by (const RadialMatrix< T > &rhs)
 Multiply coordinate elements (in place): Gij -> Gij*Bij.
 
RadialMatrix< T > conj () const
 Returns conjugate of matrix.
 
RadialMatrix< T > & conj_in_place ()
 Conjuagtes current matrix, in place.
 
RadialMatrix< double > real () const
 Returns real part of complex matrix (changes type; returns a real matrix)
 
RadialMatrix< double > imag () const
 Returns imag part of complex matrix (changes type; returns a real matrix)
 
RadialMatrix< std::complex< double > > complex () const
 Converts a real to complex matrix (changes type; returns a complex matrix)
 
RadialMatrix< T > & invert_in_place ()
 Inversion (in place)
 
RadialMatrix< T > inverse () const
 Returns inverse of matrix; original matrix unchanged.
 
RadialMatrix< T > transpose () const
 Returns transpose of matrix; original matrix unchanged.
 
RadialMatrix< T > & drj_in_place ()
 Multiplies by drj: Q_ij -> Q_ij*dr_j, in place.
 
RadialMatrix< T > & dri_in_place ()
 Multiplies by dri: Q_ij -> Q_ij*dr_i, in place.
 
RadialMatrix< T > drj () const
 Multiplies by drj: Q_ij -> Q_ij*dr_j. Returns new matrix (orig unchanged)
 
RadialMatrix< T > dri () const
 Multiplies by dri: Q_ij -> Q_ij*dr_i. Returns new matrix (orig unchanged)
 

Friends

RadialMatrix< T > operator+ (RadialMatrix< T > lhs, const RadialMatrix< T > &rhs)
 Matrix adition +,-.
 
RadialMatrix< T > operator- (RadialMatrix< T > lhs, const RadialMatrix< T > &rhs)
 Matrix adition +,-.
 
RadialMatrix< T > operator* (const T x, RadialMatrix< T > rhs)
 Scalar multiplication.
 
RadialMatrix< T > operator+ (RadialMatrix< T > M, T aI)
 Adition of identity: Matrix<T> + T : T assumed to be *Identity!
 
RadialMatrix< T > operator- (RadialMatrix< T > M, T aI)
 Adition of identity: Matrix<T> - T : T assumed to be *Identity!
 
RadialMatrix< T > mult_elements (RadialMatrix< T > lhs, const RadialMatrix< T > &rhs)
 Multiply elements (new matrix): Gij = Aij*Bij.
 
RadialMatrix< T > matrix_multiply (const RadialMatrix< T > &a, const RadialMatrix< T > &b)
 Matrix multiplication: Gij = Aik*Bkj Note: integration measure not included: call .drj() first to include it!
 
RadialMatrix< T > operator* (const RadialMatrix< T > &a, const RadialMatrix< T > &b)
 Matrix multiplication: Gij = Aik*Bkj.
 

Detailed Description

template<typename T>
class MBPT::RadialMatrix< T >

Radial matrix: stored on a sub-grid (defined by i0, stride, size).

XXX Should actually just derive/specialise SpinorMatrix!!

  • i0 : the first grid-point included in subgrid
  • stride: stride between grid-points used in subgrid
  • size: total number of points used in subgrid
  • rgrid: pointer to full grid
  • T: type. Should usually be double or complex<double>

Member Function Documentation

◆ at()

template<typename T >
T & MBPT::RadialMatrix< T >::at ( std::size_t  i,
std::size_t  j 
)
inline

direct access to matrix elements

◆ Rmatrix()

template<typename T >
const LinAlg::Matrix< T > & MBPT::RadialMatrix< T >::Rmatrix ( ) const
inline

direct access to radial matrix

◆ r0()

template<typename T >
double MBPT::RadialMatrix< T >::r0 ( ) const
inline

First point along full grid for which subgrid is defined.

◆ rmax()

template<typename T >
double MBPT::RadialMatrix< T >::rmax ( ) const
inline

Last point along full grid for which subgrid is defined.

◆ r()

template<typename T >
double MBPT::RadialMatrix< T >::r ( std::size_t  sub_i) const
inline

returns r at position sub_i along sub grid

◆ dr()

template<typename T >
double MBPT::RadialMatrix< T >::dr ( std::size_t  sub_i) const
inline

returns dr at position along sub grid

◆ index_to_fullgrid()

template<typename T >
std::size_t MBPT::RadialMatrix< T >::index_to_fullgrid ( std::size_t  i) const
inline

Converts an index on the sub-grid to the full grid.

◆ zero()

template<typename T >
void MBPT::RadialMatrix< T >::zero ( )
inline

Sets the radial matrix to have all zero's.

◆ operator+=() [1/2]

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::operator+= ( const RadialMatrix< T > &  rhs)
inline

Matrix adition +,-.

◆ operator-=() [1/2]

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::operator-= ( const RadialMatrix< T > &  rhs)
inline

Matrix adition +,-.

◆ operator*=()

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::operator*= ( const T  x)
inline

Scalar multiplication.

◆ operator+=() [2/2]

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::operator+= ( aI)
inline

Adition of identity: Matrix<T> += T : T assumed to be *Identity!

◆ operator-=() [2/2]

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::operator-= ( aI)
inline

Adition of identity: Matrix<T> -= T : T assumed to be *Identity!

◆ mult_elements_by()

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::mult_elements_by ( const RadialMatrix< T > &  rhs)
inline

Multiply coordinate elements (in place): Gij -> Gij*Bij.

◆ conj()

template<typename T >
RadialMatrix< T > MBPT::RadialMatrix< T >::conj ( ) const
inline

Returns conjugate of matrix.

◆ conj_in_place()

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::conj_in_place ( )
inline

Conjuagtes current matrix, in place.

◆ real()

template<typename T >
RadialMatrix< double > MBPT::RadialMatrix< T >::real ( ) const
inline

Returns real part of complex matrix (changes type; returns a real matrix)

◆ imag()

template<typename T >
RadialMatrix< double > MBPT::RadialMatrix< T >::imag ( ) const
inline

Returns imag part of complex matrix (changes type; returns a real matrix)

◆ complex()

template<typename T >
RadialMatrix< std::complex< double > > MBPT::RadialMatrix< T >::complex ( ) const
inline

Converts a real to complex matrix (changes type; returns a complex matrix)

◆ invert_in_place()

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::invert_in_place ( )
inline

Inversion (in place)

◆ inverse()

template<typename T >
RadialMatrix< T > MBPT::RadialMatrix< T >::inverse ( ) const
inline

Returns inverse of matrix; original matrix unchanged.

◆ transpose()

template<typename T >
RadialMatrix< T > MBPT::RadialMatrix< T >::transpose ( ) const
inline

Returns transpose of matrix; original matrix unchanged.

◆ drj_in_place()

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::drj_in_place ( )
inline

Multiplies by drj: Q_ij -> Q_ij*dr_j, in place.

◆ dri_in_place()

template<typename T >
RadialMatrix< T > & MBPT::RadialMatrix< T >::dri_in_place ( )
inline

Multiplies by dri: Q_ij -> Q_ij*dr_i, in place.

◆ drj()

template<typename T >
RadialMatrix< T > MBPT::RadialMatrix< T >::drj ( ) const
inline

Multiplies by drj: Q_ij -> Q_ij*dr_j. Returns new matrix (orig unchanged)

◆ dri()

template<typename T >
RadialMatrix< T > MBPT::RadialMatrix< T >::dri ( ) const
inline

Multiplies by dri: Q_ij -> Q_ij*dr_i. Returns new matrix (orig unchanged)

Friends And Related Symbol Documentation

◆ operator+ [1/2]

template<typename T >
RadialMatrix< T > operator+ ( RadialMatrix< T >  lhs,
const RadialMatrix< T > &  rhs 
)
friend

Matrix adition +,-.

◆ operator- [1/2]

template<typename T >
RadialMatrix< T > operator- ( RadialMatrix< T >  lhs,
const RadialMatrix< T > &  rhs 
)
friend

Matrix adition +,-.

◆ operator* [1/2]

template<typename T >
RadialMatrix< T > operator* ( const T  x,
RadialMatrix< T >  rhs 
)
friend

Scalar multiplication.

◆ operator+ [2/2]

template<typename T >
RadialMatrix< T > operator+ ( RadialMatrix< T >  M,
aI 
)
friend

Adition of identity: Matrix<T> + T : T assumed to be *Identity!

◆ operator- [2/2]

template<typename T >
RadialMatrix< T > operator- ( RadialMatrix< T >  M,
aI 
)
friend

Adition of identity: Matrix<T> - T : T assumed to be *Identity!

◆ mult_elements

template<typename T >
RadialMatrix< T > mult_elements ( RadialMatrix< T >  lhs,
const RadialMatrix< T > &  rhs 
)
friend

Multiply elements (new matrix): Gij = Aij*Bij.

◆ matrix_multiply

template<typename T >
RadialMatrix< T > matrix_multiply ( const RadialMatrix< T > &  a,
const RadialMatrix< T > &  b 
)
friend

Matrix multiplication: Gij = Aik*Bkj Note: integration measure not included: call .drj() first to include it!

◆ operator* [2/2]

template<typename T >
RadialMatrix< T > operator* ( const RadialMatrix< T > &  a,
const RadialMatrix< T > &  b 
)
friend

Matrix multiplication: Gij = Aik*Bkj.


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