MADNESS 0.10.1
madness::CCPairFunction< T, NDIM > Class Template Reference

a 6D function, either in full or low rank form, possibly including an 2-particle function More...

#include <ccpairfunction.h>

Inheritance diagram for madness::CCPairFunction< T, NDIM >:
Collaboration diagram for madness::CCPairFunction< T, NDIM >:

Public Types

using pureT = Function<T,NDIM>

Public Member Functions

 CCPairFunction ()=default
 empty ctor
 CCPairFunction (const CCPairFunction &other)=default
 copy ctor – shallow
 CCPairFunction (const Function< T, LDIM > &f1, const Function< T, LDIM > &f2)
 takes a deep copy of the argument functions
 CCPairFunction (const Function< T, NDIM > &ket)
 takes a shallow copy of the argument function
 CCPairFunction (const std::pair< std::vector< Function< T, LDIM > >, std::vector< Function< T, LDIM > > > &f)
 takes a deep copy of the argument functions
 CCPairFunction (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op_, const CCFunction< T, LDIM > &f1, const CCFunction< T, LDIM > &f2)
 takes a deep copy of the argument functions
 CCPairFunction (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op_, const Function< T, LDIM > &f1, const Function< T, LDIM > &f2)
 takes a deep copy of the argument functions
 CCPairFunction (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op_, const Function< T, NDIM > &ket)
 takes a shallow copy of the argument function
 CCPairFunction (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op_, const std::vector< Function< T, LDIM > > &f1, const std::vector< Function< T, LDIM > > &f2)
 takes a deep copy of the argument functions
 CCPairFunction (const std::shared_ptr< SeparatedConvolution< T, LDIM > > op_, const CCFunction< T, LDIM > &f1, const CCFunction< T, LDIM > &f2)
 takes a deep copy of the argument functions
 CCPairFunction (const std::vector< Function< T, LDIM > > &f1, const std::vector< Function< T, LDIM > > &f2)
 takes a deep copy of the argument functions
const std::pair< std::vector< Function< T, LDIM > >, std::vector< Function< T, LDIM > > > assign_particles (const size_t particle) const
 small helper function that gives back (a,b) or (b,a) depending on the value of particle
void convert_to_pure_no_op_inplace (const SeparatedConvolution< T, NDIM > *Gscreen=NULL)
 convert this into a pure hi-dim function
TwoBodyFunctionSeparatedComponent< T, NDIM > & decomposed () const
Function< T, LDIM > dirac_convolution (const CCFunction< T, LDIM > &x, const CCConvolutionOperator< T, LDIM > &op, const size_t particle) const
 result is: <x|op12|f>_particle
Function< T, LDIM > dirac_convolution_decomposed (const CCFunction< T, LDIM > &x, const CCConvolutionOperator< T, LDIM > &op, const size_t particle) const
std::vector< Function< T, LDIM > > get_a () const
std::vector< Function< T, LDIM > > get_b () const
Function< T, NDIM > & get_function ()
Function< T, NDIM > & get_function () const
const CCConvolutionOperator< T, LDIM > & get_operator () const
const std::shared_ptr< CCConvolutionOperator< T, LDIM > > get_operator_ptr () const
std::vector< Function< T, LDIM > > get_vector (const int i) const
bool has_operator () const
void info () const
double inner_internal (const CCPairFunction &other, const Function< T, LDIM > &R2) const
 compute the inner product of this and other
CCPairFunction invert_sign ()
bool is_assigned () const
bool is_convertible_to_pure_no_op () const
 can this be converted to a pure representation (depends on the operator, if present)
bool is_decomposed () const
bool is_decomposed_no_op () const
bool is_op_decomposed () const
bool is_op_pure () const
bool is_pure () const
bool is_pure_no_op () const
double make_xy_u (const CCFunction< T, LDIM > &xx, const CCFunction< T, LDIM > &yy) const
CCPairFunction< T, NDIM > & multiply_with_op_inplace (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op)
 multiplication with a 2-particle function
std::string name (const bool transpose=false) const
Tensor< T >::scalar_type norm2 () const
CCPairFunction & operator() (const CCPairFunction &other)
 shallow assignment operator
CCPairFunction operator* (const double fac) const
 scalar multiplication: f*fac
CCPairFunction operator* (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op)
 multiplication with a 2-particle function
CCPairFunction & operator*= (const double fac)
CCPairFunction partial_inner (const CCPairFunction &other, const std::array< int, LDIM > &v1, const std::array< int, LDIM > &v2) const
Function< T, LDIM > partial_inner (const Function< T, LDIM > &f, const std::array< int, LDIM > &v1, const std::array< int, LDIM > &v2) const
void print_size (const std::string name1="") const
 print the size of the functions
Function< T, LDIM > project_out (const CCFunction< T, LDIM > &f, const size_t particle) const
Function< T, LDIM > project_out_decomposed (const Function< T, LDIM > &f, const size_t particle) const
Function< T, LDIM > project_out_op_decomposed (const CCFunction< T, LDIM > &f, const size_t particle) const
TwoBodyFunctionPureComponent< T, NDIM > & pure () const
void reset_operator (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op)
CCPairFunction swap_particles () const
CCPairFunction to_pure () const
 out-of-place conversion to pure function
World & world () const

Static Public Member Functions

static std::vector< CCPairFunction< T, NDIM > > apply (const ProjectorBase &P, const std::vector< CCPairFunction< T, NDIM > > &argument)
static std::vector< CCPairFunction< T, NDIM > > apply (const SeparatedConvolution< T, NDIM > &G, const CCPairFunction< T, NDIM > &argument)
static std::vector< CCPairFunction< T, NDIM > > apply (const SeparatedConvolution< T, NDIM > &G, const std::vector< CCPairFunction< T, NDIM > > &argument)
static bool is_collected (const std::vector< CCPairFunction< T, NDIM > > &other)

Public Attributes

std::shared_ptr< TwoBodyFunctionComponentBase > component
 the 3 types of 6D-function that occur in the CC potential which coupled doubles to singles

Static Public Attributes

static constexpr std::size_t LDIM =NDIM/2

Private Member Functions

std::vector< CCPairFunction > consolidate (const std::vector< CCPairFunction > &other, const std::vector< std::string > &options, const std::vector< Vector< double, LDIM > > &centers) const

Static Private Member Functions

static std::vector< CCPairFunction > collect_same_types (const std::vector< CCPairFunction > &other)
 collect all terms with of similiar type: pure, op_pure, decomposed, op_decomposed
static std::vector< CCPairFunction > dec_to_pure (const std::vector< CCPairFunction > &other)
 turn decomposed functions without operator into pure functions without operators
static std::vector< CCPairFunction > op_dec_to_dec (const std::vector< CCPairFunction > &other, const std::vector< Vector< double, LDIM > > &centers)
 turn decomposed functions with operator into decomposed functions using LowRankFunction
static std::vector< CCPairFunction > op_dec_to_pure (const std::vector< CCPairFunction > &other)
 turn decomposed functions with operator into pure functions without operators
static std::vector< CCPairFunction > op_pure_to_pure (const std::vector< CCPairFunction > &other)
 turn pure functions with operator into pure functions without operators
static std::vector< CCPairFunction > remove_linearly_dependent_terms (const std::vector< CCPairFunction > &other, double thresh=-1.0)
 remove linear dependent terms in the low-rank parts

Friends

std::vector< CCPairFunction > consolidate (const std::vector< CCPairFunction > &other, const std::vector< std::string > options=std::vector< std::string >(), const std::vector< Vector< double, LDIM > > centers=std::vector< Vector< double, LDIM > >())
 collect the terms into a compact format
CCPairFunction copy (const CCPairFunction &other)
 deep copy
hashT hash_value (const CCPairFunction &f)
double inner (const CCPairFunction &a, const CCPairFunction &b)
double inner (const CCPairFunction &a, const CCPairFunction &b, const Function< T, LDIM > &R2)
double inner (const std::vector< CCPairFunction > &va, const std::vector< CCPairFunction > &vb, const Function< T, LDIM > R2=Function< T, LDIM >())
CCPairFunction< T, NDIM > multiply (const CCPairFunction< T, NDIM > &other, const Function< T, LDIM > &f, const std::array< int, LDIM > &v1)
 multiply CCPairFunction with a 3D function of one of the two particles
std::vector< CCPairFunction > multiply (const std::vector< CCPairFunction > &other, const Function< T, LDIM > f, const std::array< int, LDIM > &v1)
CCPairFunction operator* (const double fac, const CCPairFunction &f)
 scalar multiplication: fac*f
CCPairFunction operator* (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op, const CCPairFunction &f)
 multiplication with a 2-particle function
std::vector< CCPairFunction > operator* (const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op, const std::vector< CCPairFunction > &f)
 multiplication with a 2-particle function
std::vector< CCPairFunction > swap_particles (const std::vector< CCPairFunction > &argument)

Detailed Description

template<typename T = double, std::size_t NDIM = 6>
class madness::CCPairFunction< T, NDIM >

a 6D function, either in full or low rank form, possibly including an 2-particle function

Helper structure for the coupling potential of CC Singles and Doubles because of the regularization of the CC-Wavefunction (for CC2: |tauij> = |uij> + Qt12*f12*|titj>) we have 6D-functions in std format |u> : type==pure_ we have 6D-functions in separated format: type==decomposed_ (e.g O1*f12*|titj> = |xy> with x=|k> and y=<k|f12|ti>*|tj>) we have 6D-function like f12|xy> which are not needed to be represented on the 6D MRA-Grid, type==op_decomposed_ functionality

  • ctor
  • assignment
  • add
  • scalar multiplication
  • inner
  • inner_partial
  • swap_particles
  • apply
  • apply_partial (i.e. exchange)
  • serialize
  • callapse_to_pure (excl g!)
  • mul_partial the function is stored as
    • pure: full rank form, 6D
    • op_pure: full rank form, 6D with an 2-particle function f(1,2) |u>
    • decomposed: sum of two vectors of 3D functions \sum_i |a_i(1) b_i(2)>
    • op_decomposed: as above, with an 2-particle function: f(1,2) \sum_i |a_i b_i>

Member Typedef Documentation

◆ pureT

template<typename T = double, std::size_t NDIM = 6>
using madness::CCPairFunction< T, NDIM >::pureT = Function<T,NDIM>

Constructor & Destructor Documentation

◆ CCPairFunction() [1/11]

◆ CCPairFunction() [2/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const Function< T, NDIM > & ket)
inlineexplicit

takes a shallow copy of the argument function

References component.

◆ CCPairFunction() [3/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op_,
const Function< T, NDIM > & ket )
inlineexplicit

takes a shallow copy of the argument function

References component.

◆ CCPairFunction() [4/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const std::vector< Function< T, LDIM > > & f1,
const std::vector< Function< T, LDIM > > & f2 )
inlineexplicit

takes a deep copy of the argument functions

References component, copy, f1, f2, and world().

◆ CCPairFunction() [5/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const Function< T, LDIM > & f1,
const Function< T, LDIM > & f2 )
inlineexplicit

takes a deep copy of the argument functions

References CCPairFunction(), f1, f2, and LDIM.

◆ CCPairFunction() [6/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const std::pair< std::vector< Function< T, LDIM > >, std::vector< Function< T, LDIM > > > & f)
inlineexplicit

takes a deep copy of the argument functions

References CCPairFunction(), and madness::f.

◆ CCPairFunction() [7/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op_,
const CCFunction< T, LDIM > & f1,
const CCFunction< T, LDIM > & f2 )
inlineexplicit

takes a deep copy of the argument functions

References CCPairFunction(), f1, f2, and LDIM.

◆ CCPairFunction() [8/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const std::shared_ptr< SeparatedConvolution< T, LDIM > > op_,
const CCFunction< T, LDIM > & f1,
const CCFunction< T, LDIM > & f2 )
inlineexplicit

takes a deep copy of the argument functions

References CCPairFunction(), f1, f2, function(), info(), LDIM, and world().

◆ CCPairFunction() [9/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op_,
const std::vector< Function< T, LDIM > > & f1,
const std::vector< Function< T, LDIM > > & f2 )
inlineexplicit

takes a deep copy of the argument functions

References component, copy, f1, f2, and world().

◆ CCPairFunction() [10/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op_,
const Function< T, LDIM > & f1,
const Function< T, LDIM > & f2 )
inlineexplicit

takes a deep copy of the argument functions

References CCPairFunction(), f1, f2, and LDIM.

◆ CCPairFunction() [11/11]

template<typename T = double, std::size_t NDIM = 6>
madness::CCPairFunction< T, NDIM >::CCPairFunction ( const CCPairFunction< T, NDIM > & other)
default

copy ctor – shallow

References CCPairFunction().

Member Function Documentation

◆ apply() [1/3]

◆ apply() [2/3]

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction< T, NDIM > > madness::CCPairFunction< T, NDIM >::apply ( const SeparatedConvolution< T, NDIM > & G,
const CCPairFunction< T, NDIM > & argument )
static

References CCPairFunction().

◆ apply() [3/3]

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction< T, NDIM > > madness::CCPairFunction< T, NDIM >::apply ( const SeparatedConvolution< T, NDIM > & G,
const std::vector< CCPairFunction< T, NDIM > > & argument )
static

References CCPairFunction().

◆ assign_particles()

template<typename T, std::size_t NDIM>
const std::pair< std::vector< Function< T, CCPairFunction< T, NDIM >::LDIM > >, std::vector< Function< T, CCPairFunction< T, NDIM >::LDIM > > > madness::CCPairFunction< T, NDIM >::assign_particles ( const size_t particle) const

small helper function that gives back (a,b) or (b,a) depending on the value of particle

References get_a(), get_b(), and MADNESS_EXCEPTION.

Referenced by dirac_convolution_decomposed(), and project_out_decomposed().

◆ collect_same_types()

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction< T, NDIM > > madness::CCPairFunction< T, NDIM >::collect_same_types ( const std::vector< CCPairFunction< T, NDIM > > & other)
staticprivate

collect all terms with of similiar type: pure, op_pure, decomposed, op_decomposed

vector includes OT_ONE, meaning no operator

References CCPairFunction(), madness::append(), c, madness::change_tree_state(), madness::copy(), madness::gaxpy_oop_reconstructed(), madness::is_collected(), MADNESS_CHECK_THROW, op(), madness::OT_ONE, madness::OT_SIZE, and madness::reconstructed.

◆ consolidate()

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction > madness::CCPairFunction< T, NDIM >::consolidate ( const std::vector< CCPairFunction< T, NDIM > > & other,
const std::vector< std::string > & options,
const std::vector< Vector< double, LDIM > > & centers ) const
private

◆ convert_to_pure_no_op_inplace()

◆ dec_to_pure()

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction< T, NDIM > > madness::CCPairFunction< T, NDIM >::dec_to_pure ( const std::vector< CCPairFunction< T, NDIM > > & other)
staticprivate

turn decomposed functions without operator into pure functions without operators

turn decomposed functions with operator into pure functions

References CCPairFunction(), c, convert_to_pure_no_op_inplace(), and madness::copy().

◆ decomposed()

template<typename T = double, std::size_t NDIM = 6>
TwoBodyFunctionSeparatedComponent< T, NDIM > & madness::CCPairFunction< T, NDIM >::decomposed ( ) const
inline

◆ dirac_convolution()

template<typename T = double, std::size_t NDIM = 6>
Function< T, CCPairFunction< T, NDIM >::LDIM > madness::CCPairFunction< T, NDIM >::dirac_convolution ( const CCFunction< T, LDIM > & x,
const CCConvolutionOperator< T, LDIM > & op,
const size_t particle ) const

result is: <x|op12|f>_particle

Parameters
[in]xa 3D-CC_function
[in]opa CC_convoltion_operator which is currently either f12 or g12
[in]particlethe particle on which the operation acts (can be 1 or 2)
[out]theoperator is applied and afterwards a convolution with the delta function makes a 3D-function: <x|op|u>_particle

References dirac_convolution_decomposed(), get_function(), is_decomposed_no_op(), is_pure(), LDIM, MADNESS_EXCEPTION, op(), and pure().

◆ dirac_convolution_decomposed()

template<typename T, std::size_t NDIM>
Function< T, CCPairFunction< T, NDIM >::LDIM > madness::CCPairFunction< T, NDIM >::dirac_convolution_decomposed ( const CCFunction< T, LDIM > & x,
const CCConvolutionOperator< T, LDIM > & op,
const size_t particle ) const
Parameters
[in]xa 3D-CC_function
[in]opa CC_convoltion_operator which is currently either f12 or g12
[in]particlethe particle on which the operation acts (can be 1 or 2)
[out]theoperator is applied and afterwards a convolution with the delta function makes a 3D-function: <x|op|u>_particle in this case u=|ab> and the result is <x|op|u>_1 = <x|op|a>*|b> for particle==1

References assign_particles(), madness::f, madness::CCFunction< T, NDIM >::function, madness::mul(), op(), and world().

Referenced by dirac_convolution().

◆ get_a()

◆ get_b()

template<typename T = double, std::size_t NDIM = 6>
std::vector< Function< T, LDIM > > madness::CCPairFunction< T, NDIM >::get_b ( ) const
inline

◆ get_function() [1/2]

template<typename T = double, std::size_t NDIM = 6>
Function< T, NDIM > & madness::CCPairFunction< T, NDIM >::get_function ( )
inline

◆ get_function() [2/2]

template<typename T = double, std::size_t NDIM = 6>
Function< T, NDIM > & madness::CCPairFunction< T, NDIM >::get_function ( ) const
inline

References component, MADNESS_CHECK, and pure().

◆ get_operator()

template<typename T = double, std::size_t NDIM = 6>
const CCConvolutionOperator< T, LDIM > & madness::CCPairFunction< T, NDIM >::get_operator ( ) const
inline

◆ get_operator_ptr()

template<typename T = double, std::size_t NDIM = 6>
const std::shared_ptr< CCConvolutionOperator< T, LDIM > > madness::CCPairFunction< T, NDIM >::get_operator_ptr ( ) const
inline

◆ get_vector()

template<typename T = double, std::size_t NDIM = 6>
std::vector< Function< T, LDIM > > madness::CCPairFunction< T, NDIM >::get_vector ( const int i) const
inline

◆ has_operator()

template<typename T = double, std::size_t NDIM = 6>
bool madness::CCPairFunction< T, NDIM >::has_operator ( ) const
inline

◆ info()

template<typename T = double, std::size_t NDIM = 6>
void madness::CCPairFunction< T, NDIM >::info ( ) const
inline

References print_size().

Referenced by CCPairFunction().

◆ inner_internal()

template<typename T, std::size_t NDIM>
double madness::CCPairFunction< T, NDIM >::inner_internal ( const CCPairFunction< T, NDIM > & other,
const Function< T, LDIM > & R2 ) const

◆ invert_sign()

template<typename T, std::size_t NDIM>
madness::CCPairFunction< T, NDIM > madness::CCPairFunction< T, NDIM >::invert_sign ( )

make a deep copy and invert the sign deep copy necessary otherwise: shallow copy errors

Referenced by madness::CCPotentials::make_pair_ex(), madness::CCPotentials::make_pair_gs(), and madness::CCPotentials::test_pair_consistency().

◆ is_assigned()

template<typename T = double, std::size_t NDIM = 6>
bool madness::CCPairFunction< T, NDIM >::is_assigned ( ) const
inline

References component.

◆ is_collected()

template<typename T, std::size_t NDIM>
bool madness::CCPairFunction< T, NDIM >::is_collected ( const std::vector< CCPairFunction< T, NDIM > > & other)
static

References CCPairFunction(), and c.

Referenced by madness::is_collected().

◆ is_convertible_to_pure_no_op()

template<typename T, std::size_t NDIM>
bool madness::CCPairFunction< T, NDIM >::is_convertible_to_pure_no_op ( ) const

can this be converted to a pure representation (depends on the operator, if present)

References get_operator(), has_operator(), madness::OT_F12, and madness::OT_SLATER.

Referenced by test_transformations().

◆ is_decomposed()

template<typename T = double, std::size_t NDIM = 6>
bool madness::CCPairFunction< T, NDIM >::is_decomposed ( ) const
inline

◆ is_decomposed_no_op()

template<typename T = double, std::size_t NDIM = 6>
bool madness::CCPairFunction< T, NDIM >::is_decomposed_no_op ( ) const
inline

◆ is_op_decomposed()

template<typename T = double, std::size_t NDIM = 6>
bool madness::CCPairFunction< T, NDIM >::is_op_decomposed ( ) const
inline

◆ is_op_pure()

template<typename T = double, std::size_t NDIM = 6>
bool madness::CCPairFunction< T, NDIM >::is_op_pure ( ) const
inline

References has_operator(), and is_pure().

Referenced by norm2(), project_out(), and test_transformations().

◆ is_pure()

◆ is_pure_no_op()

template<typename T = double, std::size_t NDIM = 6>
bool madness::CCPairFunction< T, NDIM >::is_pure_no_op ( ) const
inline

◆ make_xy_u()

◆ multiply_with_op_inplace()

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction< T, NDIM > & madness::CCPairFunction< T, NDIM >::multiply_with_op_inplace ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op)

multiplication with a 2-particle function

References CCPairFunction(), get_operator_ptr(), has_operator(), LDIM, op(), and reset_operator().

Referenced by operator*(), and operator*.

◆ name()

template<typename T = double, std::size_t NDIM = 6>
std::string madness::CCPairFunction< T, NDIM >::name ( const bool transpose = false) const
inline

◆ norm2()

template<typename T = double, std::size_t NDIM = 6>
Tensor< T >::scalar_type madness::CCPairFunction< T, NDIM >::norm2 ( ) const
inline

◆ op_dec_to_dec()

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction< T, NDIM > > madness::CCPairFunction< T, NDIM >::op_dec_to_dec ( const std::vector< CCPairFunction< T, NDIM > > & other,
const std::vector< Vector< double, LDIM > > & centers )
staticprivate

◆ op_dec_to_pure()

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction< T, NDIM > > madness::CCPairFunction< T, NDIM >::op_dec_to_pure ( const std::vector< CCPairFunction< T, NDIM > > & other)
staticprivate

turn decomposed functions with operator into pure functions without operators

turn decomposed functions with operator into pure functions

References CCPairFunction(), c, convert_to_pure_no_op_inplace(), and madness::copy().

◆ op_pure_to_pure()

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction< T, NDIM > > madness::CCPairFunction< T, NDIM >::op_pure_to_pure ( const std::vector< CCPairFunction< T, NDIM > > & other)
staticprivate

◆ operator()()

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction & madness::CCPairFunction< T, NDIM >::operator() ( const CCPairFunction< T, NDIM > & other)
inline

shallow assignment operator

References CCPairFunction(), and component.

◆ operator*() [1/2]

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction madness::CCPairFunction< T, NDIM >::operator* ( const double fac) const
inline

scalar multiplication: f*fac

References CCPairFunction(), and copy.

◆ operator*() [2/2]

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction madness::CCPairFunction< T, NDIM >::operator* ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op)
inline

multiplication with a 2-particle function

References CCPairFunction(), copy, multiply_with_op_inplace(), and op().

◆ operator*=()

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction & madness::CCPairFunction< T, NDIM >::operator*= ( const double fac)
inline

◆ partial_inner() [1/2]

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction madness::CCPairFunction< T, NDIM >::partial_inner ( const CCPairFunction< T, NDIM > & other,
const std::array< int, LDIM > & v1,
const std::array< int, LDIM > & v2 ) const

References CCPairFunction().

◆ partial_inner() [2/2]

template<typename T = double, std::size_t NDIM = 6>
Function< T, LDIM > madness::CCPairFunction< T, NDIM >::partial_inner ( const Function< T, LDIM > & f,
const std::array< int, LDIM > & v1,
const std::array< int, LDIM > & v2 ) const

References madness::f.

Referenced by madness::inner(), and madness::inner().

◆ print_size()

template<typename T = double, std::size_t NDIM = 6>
void madness::CCPairFunction< T, NDIM >::print_size ( const std::string name1 = "") const
inline

print the size of the functions

References bufsize, component, get_a(), get_b(), name(), norm(), norm2(), madness::norm2(), madness::print(), madness::wall_time(), and world().

Referenced by info().

◆ project_out()

template<typename T, std::size_t NDIM>
Function< T, CCPairFunction< T, NDIM >::LDIM > madness::CCPairFunction< T, NDIM >::project_out ( const CCFunction< T, LDIM > & f,
const size_t particle ) const
Parameters
[in]fa 3D-CC_function
[in]particlethe particle on which the operation acts
[out]<f|u>_particle(projection from 6D to 3D)

References madness::f, is_decomposed_no_op(), madness::Function< T, NDIM >::is_initialized(), is_op_decomposed(), is_op_pure(), is_pure_no_op(), MADNESS_ASSERT, MADNESS_EXCEPTION, project_out_decomposed(), project_out_op_decomposed(), and pure().

◆ project_out_decomposed()

template<typename T, std::size_t NDIM>
Function< T, CCPairFunction< T, NDIM >::LDIM > madness::CCPairFunction< T, NDIM >::project_out_decomposed ( const Function< T, LDIM > & f,
const size_t particle ) const
Parameters
[in]fa 3D-CC_function
[in]particlethe particle on which the operation acts
[out]<f|u>_particle(projection from 6D to 3D) for the case that u=|ab> so <f|u>_particle = <f|a>*|b> if particle==1

References assign_particles(), c, madness::f, get_a(), madness::inner(), and world().

Referenced by project_out().

◆ project_out_op_decomposed()

template<typename T, std::size_t NDIM>
Function< T, CCPairFunction< T, NDIM >::LDIM > madness::CCPairFunction< T, NDIM >::project_out_op_decomposed ( const CCFunction< T, LDIM > & f,
const size_t particle ) const
Parameters
[in]fa 3D-CC_function
[in]particlethe particle on which the operation acts
[out]<f|u>_particle(projection from 6D to 3D) for the case that u=op|xy> so <f|u>_particle = <f|op|x>*|y> if particle==1

References decomposed(), madness::f, get_a(), get_b(), MADNESS_EXCEPTION, madness::mul(), op(), sum, and world().

Referenced by project_out().

◆ pure()

◆ remove_linearly_dependent_terms()

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction< T, NDIM > > madness::CCPairFunction< T, NDIM >::remove_linearly_dependent_terms ( const std::vector< CCPairFunction< T, NDIM > > & other,
double thresh = -1.0 )
staticprivate

◆ reset_operator()

template<typename T = double, std::size_t NDIM = 6>
void madness::CCPairFunction< T, NDIM >::reset_operator ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op)
inline

◆ swap_particles()

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction madness::CCPairFunction< T, NDIM >::swap_particles ( ) const
inline
Parameters
[out]particlesare interchanged, if the function was u(1,2) the result is u(2,1)

References CCPairFunction(), component, and copy.

Referenced by madness::apply(), and test_swap_particles().

◆ to_pure()

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction madness::CCPairFunction< T, NDIM >::to_pure ( ) const
inline

out-of-place conversion to pure function

References CCPairFunction(), copy, and MADNESS_CHECK.

◆ world()

◆ consolidate

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction > consolidate ( const std::vector< CCPairFunction< T, NDIM > > & other,
const std::vector< std::string > options = std::vector<std::string>(),
const std::vector< Vector< double, LDIM > > centers = std::vector<Vector<double,LDIM>>() )
friend

collect the terms into a compact format

Parameters
[in]othera vector of CCPairFunctions
[in]optionsa vector of strings which can be "one_term", "op_pure_to_pure", "svd"
[in]centersa vector of 3D-vectors which are the centers of the grid for low-rank functions TODO: implement a function for removing linearly dependent terms without orthonormalization

◆ copy

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction copy ( const CCPairFunction< T, NDIM > & other)
friend

◆ hash_value

template<typename T = double, std::size_t NDIM = 6>
hashT hash_value ( const CCPairFunction< T, NDIM > & f)
friend

References CCPairFunction(), and madness::f.

◆ inner [1/3]

template<typename T = double, std::size_t NDIM = 6>
double inner ( const CCPairFunction< T, NDIM > & a,
const CCPairFunction< T, NDIM > & b )
friend

References CCPairFunction(), a, b, and R2.

◆ inner [2/3]

template<typename T = double, std::size_t NDIM = 6>
double inner ( const CCPairFunction< T, NDIM > & a,
const CCPairFunction< T, NDIM > & b,
const Function< T, LDIM > & R2 )
friend

References CCPairFunction(), a, b, and R2.

Referenced by norm2().

◆ inner [3/3]

template<typename T = double, std::size_t NDIM = 6>
double inner ( const std::vector< CCPairFunction< T, NDIM > > & va,
const std::vector< CCPairFunction< T, NDIM > > & vb,
const Function< T, LDIM > R2 = Function<T,LDIM>() )
friend

◆ multiply [1/2]

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction< T, NDIM > multiply ( const CCPairFunction< T, NDIM > & other,
const Function< T, LDIM > & f,
const std::array< int, LDIM > & v1 )
friend

◆ multiply [2/2]

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction > multiply ( const std::vector< CCPairFunction< T, NDIM > > & other,
const Function< T, LDIM > f,
const std::array< int, LDIM > & v1 )
friend

References madness::f, and multiply.

Referenced by multiply, and multiply.

◆ operator* [1/3]

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction operator* ( const double fac,
const CCPairFunction< T, NDIM > & f )
friend

scalar multiplication: fac*f

References CCPairFunction(), and madness::f.

◆ operator* [2/3]

template<typename T = double, std::size_t NDIM = 6>
CCPairFunction operator* ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op,
const CCPairFunction< T, NDIM > & f )
friend

multiplication with a 2-particle function

References CCPairFunction(), copy, madness::f, multiply_with_op_inplace(), and op().

◆ operator* [3/3]

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction > operator* ( const std::shared_ptr< CCConvolutionOperator< T, LDIM > > op,
const std::vector< CCPairFunction< T, NDIM > > & f )
friend

multiplication with a 2-particle function

References copy, madness::f, and op().

◆ swap_particles

template<typename T = double, std::size_t NDIM = 6>
std::vector< CCPairFunction > swap_particles ( const std::vector< CCPairFunction< T, NDIM > > & argument)
friend

References a.

Member Data Documentation

◆ component

◆ LDIM


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