MADNESS
version 0.9
|
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>
Functions | |
void | distances (const coord_6d &r, double &r1, double &r2, double &r12) |
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) |
template<size_t NDIM> | |
void | load_function (World &world, 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 | iterate (World &world, real_function_6d &Vpsi, real_function_6d &psi, double &eps) |
void | iterate (World &world, const real_function_3d &V, real_function_3d &psi, double &eps) |
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) |
void | solve (World &world, real_function_6d &pair, double &energy, long maxiter, double dcut) |
void | test_modified (World &world) |
void | test_recursive_application (World &world) |
void | test_adaptive_tree (World &world, const bool restart, const std::string restartname) |
void | test_truncation (World &world) |
void | test_compress (World &world) |
int | main (int argc, char **argv) |
Solves the Hartree-Fock and MP2 equations for the helium atom.
void compute_energy | ( | World & | world, |
const real_function_3d & | psi, | ||
const real_function_3d & | pot, | ||
double & | ke, | ||
double & | pe | ||
) |
References madness::inner(), madness::World::rank(), and madness::wall_time().
Referenced by main(), solve(), test_adaptive_tree(), test_modified(), and test_recursive_application().
void compute_energy | ( | World & | world, |
const real_function_6d & | pair, | ||
const real_function_3d & | pot1, | ||
const real_function_3d & | pot2, | ||
double & | ke, | ||
double & | pe | ||
) |
void iterate | ( | World & | world, |
real_function_6d & | Vpsi, | ||
real_function_6d & | psi, | ||
double & | eps | ||
) |
iterate the helium wavefunction
[in] | world | world |
[in] | Vpsi | -2.0*V*pair |
in/out] | psi pair function | |
in/out] | eps energy |
References madness::LoadBalanceDeux< NDIM >::add_tree(), madness::inner(), madness::LoadBalanceDeux< NDIM >::load_balance(), madness::SeparatedConvolution< Q, NDIM >::modified(), madness::norm(), madness::Function< T, NDIM >::norm2(), op(), madness::print(), madness::Function< T, NDIM >::print_size(), psi(), madness::World::rank(), madness::FunctionDefaults< NDIM >::redistribute(), madness::Function< T, NDIM >::scale(), sqrt(), madness::Function< T, NDIM >::truncate(), and madness::wall_time().
Referenced by solve(), and test_adaptive_tree().
void iterate | ( | World & | world, |
const real_function_3d & | V, | ||
real_function_3d & | psi, | ||
double & | eps | ||
) |
void load_function | ( | World & | world, |
Function< double, NDIM > & | pair, | ||
const std::string | name | ||
) |
Referenced by main(), and test_adaptive_tree().
int main | ( | int | argc, |
char ** | argv | ||
) |
References a(), madness::LoadBalanceDeux< NDIM >::add_tree(), madness::arg(), SafeMPI::COMM_WORLD, compute_energy(), madness::copy(), mpfr::cos(), energy(), madness::FunctionFactory< T, NDIM >::f(), madness::WorldGopInterface::fence(), madness::finalize(), madness::Function< T, NDIM >::get_impl(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::World::gop, madness::hartree_product(), madness::initialize(), madness::inner(), madness::Function< T, NDIM >::k(), L, madness::LoadBalanceDeux< NDIM >::load_balance(), load_function(), MADNESS_EXCEPTION, madness::norm(), 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(), mpfr::sin(), madness::Function< T, NDIM >::size(), madness::World::size(), solve(), sqrt(), madness::startup(), 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, and madness::wall_time().
real_function_6d multiply_by_V | ( | const real_function_6d & | psi | ) |
References madness::copy(), and madness::Function< T, NDIM >::unaryop().
void save_function | ( | World & | world, |
const Function< double, NDIM > & | pair, | ||
const std::string | name | ||
) |
References madness::FunctionDefaults< NDIM >::get_cell(), madness::print(), and madness::World::rank().
Referenced by solve(), and test_adaptive_tree().
Returns the box at level n that contains the given point in simulation coordinates.
References NDIM.
Referenced by madness::FunctionImpl< T, NDIM >::project_refine_op().
void solve | ( | World & | world, |
real_function_6d & | pair, | ||
double & | energy, | ||
long | maxiter, | ||
double | dcut | ||
) |
References compute_energy(), madness::copy(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::Function< T, NDIM >::get_impl(), madness::FunctionDefaults< NDIM >::get_k(), madness::FunctionDefaults< NDIM >::get_thresh(), iterate(), L, madness::trajectory< NDIM >::line2(), MADNESS_EXCEPTION, maxiter, madness::print(), madness::World::rank(), madness::Function< T, NDIM >::reconstruct(), save_function(), madness::Function< T, NDIM >::size(), thresh, madness::Function< T, NDIM >::tree_size(), and madness::wall_time().
Referenced by CoupledPurturbation::dipole_response(), and main().
void test_adaptive_tree | ( | World & | world, |
const bool | restart, | ||
const std::string | restartname | ||
) |
References compute_energy(), madness::copy(), madness::Function< T, NDIM >::fill_tree(), madness::FunctionDefaults< NDIM >::get_k(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::hartree_product(), madness::inner(), iterate(), load_function(), madness::SeparatedConvolution< Q, NDIM >::modified(), madness::norm(), madness::norm2(), madness::Function< T, NDIM >::norm2(), op(), madness::print(), madness::Function< T, NDIM >::print_size(), madness::World::rank(), save_function(), madness::Function< T, NDIM >::scale(), sqrt(), madness::symmetrize(), thresh, and madness::wall_time().
Referenced by main().
void test_compress | ( | World & | world | ) |
References a(), a1, a2, madness::copy(), madness::Function< T, NDIM >::fill_tree(), madness::hartree_product(), madness::Function< T, NDIM >::norm2(), op(), madness::print(), madness::Function< T, NDIM >::print_size(), and sqrt().
Referenced by main().
void test_modified | ( | World & | world | ) |
References compute_energy(), madness::SeparatedConvolution< Q, NDIM >::doleaves, energy(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::inner(), L, madness::trajectory< NDIM >::line2(), MADNESS_EXCEPTION, madness::SeparatedConvolution< Q, NDIM >::modified(), madness::Function< T, NDIM >::norm2(), op(), madness::plot_along(), madness::print(), psi(), madness::World::rank(), madness::Function< T, NDIM >::scale(), sqrt(), madness::Function< T, NDIM >::truncate(), V(), and madness::wall_time().
Referenced by main().
void test_recursive_application | ( | World & | world | ) |
References compute_energy(), madness::copy(), madness::Function< T, NDIM >::fill_tree(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::hartree_product(), madness::inner(), L, madness::trajectory< NDIM >::line2(), MADNESS_EXCEPTION, madness::SeparatedConvolution< Q, NDIM >::modified(), madness::norm(), madness::norm2(), madness::Function< T, NDIM >::norm2(), op(), madness::plot_along(), madness::print(), madness::World::rank(), madness::Function< T, NDIM >::scale(), and sqrt().
Referenced by main().
void test_truncation | ( | World & | world | ) |