MADNESS  0.10.1
Classes | Functions | Variables
helium_mp2.cc File Reference

Solves the Hartree-Fock and MP2 equations for the helium atom. More...

#include <madness/mra/mra.h>
#include <madness/mra/operator.h>
#include <madness/mra/funcplot.h>
#include <madness/mra/lbdeux.h>
#include <iostream>
Include dependency graph for helium_mp2.cc:

Classes

struct  LBCost
 
struct  true_if_n_gt_op
 
struct  true_op
 
class  YetAnotherWrapperClass
 

Functions

void compute_energy (World &world, const real_function_3d &psi, const real_function_3d &pot, double &ke, double &pe)
 
void compute_energy (World &world, const real_function_6d &pair, const real_function_3d &pot1, const real_function_3d &pot2, double &ke, double &pe)
 
static double coul (const coord_6d &r)
 
void distances (const coord_6d &r, double &r1, double &r2, double &r12)
 
static double gauss_3d (const coord_3d &r)
 
static double gauss_6d (const coord_6d &r)
 
static double guess (const coord_3d &r)
 
static double h_orbital (const coord_3d &r)
 
static double he_correlation (const coord_6d &r)
 
static double he_orbital_3d (const coord_3d &r)
 
static double he_orbital_McQuarrie (const coord_3d &r)
 
static double he_orbitals (const coord_6d &r)
 
static double he_plus_orbital (const coord_3d &r)
 
static double helium_pot (const coord_6d &r)
 
static double HO_3d (const coord_3d &r)
 
static double HO_6d (const coord_6d &r)
 
static double HO_vphi_3d (const coord_3d &r)
 
static double hylleraas_3term (const coord_6d &r)
 
void iterate (World &world, const real_function_3d &V, real_function_3d &psi, double &eps)
 
void iterate (World &world, real_function_6d &Vpsi, real_function_6d &psi, double &eps)
 
template<size_t NDIM>
void load_function (World &world, Function< double, NDIM > &pair, const std::string name)
 
int main (int argc, char **argv)
 
real_function_6d multiply_by_V (const real_function_6d &psi)
 
template<size_t NDIM>
void save_function (World &world, const Function< double, NDIM > &pair, const std::string name)
 
Key< 6 > simpt2key (const Vector< double, 6 > &pt, Level n)
 Returns the box at level n that contains the given point in simulation coordinates. More...
 
void solve (World &world, real_function_6d &pair, double &energy, long maxiter, double dcut)
 
void test_adaptive_tree (World &world, const bool restart, const std::string restartname)
 
void test_compress (World &world)
 
void test_modified (World &world)
 
void test_recursive_application (World &world)
 
void test_truncation (World &world)
 
static double u (double r, double c)
 
static double V (const coord_3d &r)
 
static double V (const coord_6d &r)
 
static double V_1 (const coord_6d &r)
 
static double V_times_phi (const coord_6d &r)
 
static double Z1 (const coord_3d &r)
 
static double Z2 (const coord_3d &r)
 

Variables

static const double dcut =1.e-5
 
static const double r12cut =1.e-3
 
static const double rcut =1.e-3
 
static const double shift =0.0
 

Detailed Description

Solves the Hartree-Fock and MP2 equations for the helium atom.

Function Documentation

◆ compute_energy() [1/2]

void compute_energy ( World world,
const real_function_3d psi,
const real_function_3d pot,
double &  ke,
double &  pe 
)

◆ compute_energy() [2/2]

void compute_energy ( World world,
const real_function_6d pair,
const real_function_3d pot1,
const real_function_3d pot2,
double &  ke,
double &  pe 
)

◆ coul()

static double coul ( const coord_6d r)
static

◆ distances()

void distances ( const coord_6d r,
double &  r1,
double &  r2,
double &  r12 
)

References madness::r2().

Referenced by coul(), and V().

◆ gauss_3d()

static double gauss_3d ( const coord_3d r)
static

References madness::detail::norm(), and madness::r2().

Referenced by HO_vphi_3d(), and test_modified().

◆ gauss_6d()

static double gauss_6d ( const coord_6d r)
static

◆ guess()

static double guess ( const coord_3d r)
static

References e(), and shift.

◆ h_orbital()

static double h_orbital ( const coord_3d r)
static

References e().

Referenced by test_recursive_application().

◆ he_correlation()

static double he_correlation ( const coord_6d r)
static

References he_orbitals(), and hylleraas_3term().

◆ he_orbital_3d()

static double he_orbital_3d ( const coord_3d r)
static

References dcut.

◆ he_orbital_McQuarrie()

static double he_orbital_McQuarrie ( const coord_3d r)
static

◆ he_orbitals()

static double he_orbitals ( const coord_6d r)
static

References he_orbital_McQuarrie(), and madness::r2().

Referenced by he_correlation().

◆ he_plus_orbital()

static double he_plus_orbital ( const coord_3d r)
static

References e().

◆ helium_pot()

static double helium_pot ( const coord_6d r)
static

References dcut, and madness::r2().

Referenced by YetAnotherWrapperClass::operator()(), and solve().

◆ HO_3d()

static double HO_3d ( const coord_3d r)
static

Referenced by HO_vphi_3d().

◆ HO_6d()

static double HO_6d ( const coord_6d r)
static

◆ HO_vphi_3d()

static double HO_vphi_3d ( const coord_3d r)
static

References gauss_3d(), HO_3d(), and v.

◆ hylleraas_3term()

static double hylleraas_3term ( const coord_6d r)
static

References dcut, and madness::r2().

Referenced by he_correlation(), and main().

◆ iterate() [1/2]

void iterate ( World world,
const real_function_3d V,
real_function_3d psi,
double &  eps 
)

◆ iterate() [2/2]

void iterate ( World world,
real_function_6d Vpsi,
real_function_6d psi,
double &  eps 
)

◆ load_function()

template<size_t NDIM>
void load_function ( World world,
Function< double, NDIM > &  pair,
const std::string  name 
)

References madness::name().

◆ main()

int main ( int  argc,
char **  argv 
)

References madness::_(), a, madness::LoadBalanceDeux< NDIM >::add_tree(), madness::arg(), axis, SafeMPI::COMM_WORLD, compute_energy(), madness::copy(), dcut, energy, madness::FunctionFactory< T, NDIM >::f(), madness::f, madness::WorldGopInterface::fence(), madness::filename, madness::finalize(), madness::CompositeFactory< T, NDIM, MDIM >::g12(), madness::Function< T, NDIM >::get_impl(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::World::gop, madness::hartree_product(), he_orbital_McQuarrie(), hylleraas_3term(), madness::initialize(), madness::inner(), k, madness::Function< T, NDIM >::k(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), L, madness::LoadBalanceDeux< NDIM >::load_balance(), madness::load_function(), MADNESS_EXCEPTION, madness::detail::norm(), pow(), madness::print(), madness::project(), madness::World::rank(), madness::FunctionDefaults< NDIM >::redistribute(), madness::Function< T, NDIM >::scale(), madness::FunctionDefaults< NDIM >::set_apply_randomize(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_tensor_type(), madness::FunctionDefaults< NDIM >::set_thresh(), madness::Function< T, NDIM >::size(), madness::World::size(), solve(), madness::startup(), madness::stringify(), test_adaptive_tree(), test_compress(), test_modified(), test_recursive_application(), test_truncation(), thresh, madness::Function< T, NDIM >::thresh(), madness::Function< T, NDIM >::tree_size(), madness::TT_2D, madness::TT_FULL, madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2(), madness::wall_time(), and Z2().

◆ multiply_by_V()

real_function_6d multiply_by_V ( const real_function_6d psi)

◆ save_function()

template<size_t NDIM>
void save_function ( World world,
const Function< double, NDIM > &  pair,
const std::string  name 
)

◆ simpt2key()

Key<6> simpt2key ( const Vector< double, 6 > &  pt,
Level  n 
)

Returns the box at level n that contains the given point in simulation coordinates.

References NDIM, and pow().

◆ solve()

void solve ( World world,
real_function_6d pair,
double &  energy,
long  maxiter,
double  dcut 
)

◆ test_adaptive_tree()

void test_adaptive_tree ( World world,
const bool  restart,
const std::string  restartname 
)

◆ test_compress()

void test_compress ( World world)

◆ test_modified()

void test_modified ( World world)

◆ test_recursive_application()

void test_recursive_application ( World world)

◆ test_truncation()

void test_truncation ( World world)

◆ u()

static double u ( double  r,
double  c 
)
static

References c, e(), and madness::r2().

Referenced by coul(), and V().

◆ V() [1/2]

static double V ( const coord_3d r)
static

References e(), and shift.

Referenced by iterate(), and test_modified().

◆ V() [2/2]

static double V ( const coord_6d r)
static

References distances(), r12cut, madness::r2(), rcut, and u().

◆ V_1()

static double V_1 ( const coord_6d r)
static

References dcut, and madness::r2().

◆ V_times_phi()

static double V_times_phi ( const coord_6d r)
static

References dcut, and madness::r2().

◆ Z1()

static double Z1 ( const coord_3d r)
static

References dcut.

Referenced by test_modified(), and test_recursive_application().

◆ Z2()

static double Z2 ( const coord_3d r)
static

Variable Documentation

◆ dcut

const double dcut =1.e-5
static

◆ r12cut

const double r12cut =1.e-3
static

Referenced by coul(), and V().

◆ rcut

const double rcut =1.e-3
static

Referenced by V().

◆ shift

const double shift =0.0
static

Referenced by guess(), and V().