|
MADNESS 0.10.1
|
#include <madness/mra/mra.h>#include <madness/mra/vmra.h>#include <madness/world/test_utilities.h>#include <cmath>#include <cstdio>#include <string>#include <vector>
Classes | |
| class | Gauss |
| exp(-a |r-R|^2) More... | |
| struct | operand_pair |
| an operand pair plus the independently projected analytic product More... | |
| class | Slater |
| c * exp(-a |r|), cusped at the origin: this is what drives the tree deep More... | |
Functions | |
| static std::string | fmt_tol (double tol) |
| static long | interior_nodes_with_coeffs (World &world, const Function< double, D > &f) |
| int | main (int argc, char **argv) |
| static std::vector< operand_pair > | make_pairs (World &world) |
| static Function< double, D > | project (World &world, const std::shared_ptr< FunctionFunctorInterface< double, D > > &functor) |
| int | test_dot (World &world, std::vector< operand_pair > &pairs) |
| T5: dot routes through the screened kernel; check it against the analytic sum. | |
| int | test_exact (World &world, std::vector< operand_pair > &pairs) |
| T1: the exact path reproduces the analytic product. | |
| int | test_screening_accuracy (World &world, std::vector< operand_pair > &pairs) |
| int | test_self_consistency (World &world, std::vector< operand_pair > &pairs) |
| int | test_tree_state (World &world, std::vector< operand_pair > &pairs) |
| T2: the result is a reconstructed tree, both scalar and vector entry points. | |
Variables | |
| static const double | C_MAX = 100.0 |
| err <= C_MAX*tol; measured max 34 | |
| static const std::size_t | D = 3 |
| static const double | EXACT_FLOOR = 1.e-7 |
| static const double | P_MIN = 0.4 |
| err ~ tol^p; measured p = 0.58 .. 0.75 | |
| static const double | THRESH_REF = 1.e-9 |
| projection threshold of the reference | |
|
static |
References madness::nonlinear_vector_solver().
Referenced by test_dot(), test_self_consistency(), and test_tree_state().
number of nodes violating the reconstructed layout: coefficients live on the leaves only
References madness::f, madness::World::gop, madness::nonlinear_vector_solver(), and madness::WorldGopInterface::sum().
Referenced by test_tree_state().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
References madness::WorldGopInterface::fence(), madness::finalize(), madness::World::gop, madness::initialize(), make_pairs(), madness::nonlinear_vector_solver(), madness::FunctionDefaults< NDIM >::set_autorefine(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_initial_level(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_refine(), madness::FunctionDefaults< NDIM >::set_thresh(), madness::startup(), test_dot(), test_exact(), test_screening_accuracy(), test_self_consistency(), test_tree_state(), and THRESH_REF.
|
static |
coincident Gaussians, separated Gaussians (where the screening actually fires, as it does for distant localized orbitals), and a Slater cusp
References a, madness::nonlinear_vector_solver(), and madness::project().
Referenced by main().
|
static |
| int test_dot | ( | World & | world, |
| std::vector< operand_pair > & | pairs | ||
| ) |
T5: dot routes through the screened kernel; check it against the analytic sum.
References a, b, C_MAX, madness::test_output::checkpoint(), madness::copy(), madness::dot(), madness::test_output::end(), EXACT_FLOOR, madness::f, fmt_tol(), madness::g, madness::nonlinear_vector_solver(), madness::norm2(), q(), madness::World::rank(), and madness::test_output::set_do_print().
Referenced by main().
| int test_exact | ( | World & | world, |
| std::vector< operand_pair > & | pairs | ||
| ) |
T1: the exact path reproduces the analytic product.
References madness::test_output::checkpoint(), madness::test_output::end(), EXACT_FLOOR, madness::mul_sparse(), madness::nonlinear_vector_solver(), madness::norm2(), p(), q(), madness::World::rank(), and madness::test_output::set_do_print().
Referenced by main().
| int test_screening_accuracy | ( | World & | world, |
| std::vector< operand_pair > & | pairs | ||
| ) |
T3: the screening error over a tol ladder, against the analytic product.
The bounds are measured, not derived: err ~ tol^p with p short of 1, and tree quantization (adjacent tol yielding the same tree) leaves err flat and inflates err/tol by up to a decade. Hence a loose C_MAX plus two tighter statements – err falls monotonically with tol, and its decay exponent does not collapse.
References C_MAX, madness::test_output::checkpoint(), madness::test_output::end(), madness::mul_sparse(), madness::nonlinear_vector_solver(), madness::norm2(), p(), P_MIN, q(), madness::World::rank(), and madness::test_output::set_do_print().
Referenced by main().
| int test_self_consistency | ( | World & | world, |
| std::vector< operand_pair > & | pairs | ||
| ) |
T4: screened and exact multiplication agree to within tol, no analytic reference needed
References C_MAX, madness::test_output::checkpoint(), madness::test_output::end(), exact, fmt_tol(), madness::mul_sparse(), madness::nonlinear_vector_solver(), madness::norm2(), p(), q(), madness::World::rank(), and madness::test_output::set_do_print().
Referenced by main().
| int test_tree_state | ( | World & | world, |
| std::vector< operand_pair > & | pairs | ||
| ) |
T2: the result is a reconstructed tree, both scalar and vector entry points.
References madness::test_output::checkpoint(), madness::test_output::end(), madness::WorldGopInterface::fence(), fmt_tol(), madness::get_tree_state(), madness::World::gop, interior_nodes_with_coeffs(), L, madness::mul_sparse(), madness::nonlinear_vector_solver(), p(), q(), madness::World::rank(), madness::reconstructed, madness::test_output::set_do_print(), and v.
Referenced by main().
|
static |
err <= C_MAX*tol; measured max 34
Bounds on the screening error over the tol ladder, all measured, see the header of test_screening_accuracy.
Referenced by test_dot(), test_screening_accuracy(), and test_self_consistency().
|
static |
Referenced by Gauss::operator()().
|
static |
Error floor of the exact path (tol=0): the product of two order-k polynomials is not representable at order k, and multiplication does not autorefine. Measured max 2.3e-8 over the pairs below.
Referenced by test_dot(), and test_exact().
|
static |
err ~ tol^p; measured p = 0.58 .. 0.75
Referenced by test_screening_accuracy().