|
MADNESS 0.10.1
|
Targeted unit tests for FunctionImpl::eval_local_only and eval_cube. More...
#include <madness/mra/mra.h>#include <madness/mra/funcdefaults.h>#include <madness/world/test_utilities.h>#include <madness/tensor/tensor.h>#include <algorithm>#include <array>#include <chrono>#include <cmath>#include <cstdio>#include <cstdlib>#include <limits>#include <random>#include <string>#include <vector>
Classes | |
| class | Constant< T, NDIM > |
| class | Gaussian< T, NDIM > |
| struct | GoldenPoint |
| class | Oscillatory< NDIM > |
Functions | |
| template<std::size_t NDIM> | |
| void | bench_cell (World &world, int k) |
| static double | eval_tol (double ref, double k_factor=1.0) |
| template<std::size_t NDIM> | |
| bool | golden_check_ndim (World &world, int k, double thresh, double cx, const double raw_pt[3], double &out_ref, double &out_lo) |
| static bool | is_heavy (std::size_t ndim, int k, double thresh) |
| int | main (int argc, char **argv) |
| template<std::size_t NDIM> | |
| std::vector< Vector< double, NDIM > > | random_sim_points (int n, uint64_t seed) |
| template<std::size_t NDIM> | |
| int | run_batched_cell (World &world, const std::string &label, int k, double thresh, double L, const std::vector< Vector< double, NDIM > > &user_pts) |
| void | run_benchmark (World &world) |
| template<typename FunctorT , std::size_t NDIM> | |
| int | run_correctness_cell (World &world, const std::string &label, FunctorT *raw_functor, int k, double thresh, double L, const std::vector< Vector< double, NDIM > > &user_pts) |
| template<std::size_t NDIM> | |
| Vector< double, NDIM > | sim_to_user (const Vector< double, NDIM > &xsim, const Tensor< double > &cell) |
| template<std::size_t NDIM> | |
| int | test_batched_ndim (World &world) |
| int | test_contraction_micro () |
| template<std::size_t NDIM> | |
| int | test_correctness_ndim (World &world) |
| int | test_general_fast_transform () |
| int | test_golden_values (World &world) |
| int | test_output_param_overload (World &world) |
| int | test_scaling_factor () |
Variables | |
| static const GoldenPoint | golden_pts [] |
| static const bool | print_golden |
| static const bool | run_bench |
| static const bool | run_heavy |
Targeted unit tests for FunctionImpl::eval_local_only and eval_cube.
Covers:
Heavy cells (NDIM==6, k>8, thresh<=1e-8) are compiled but skipped at runtime unless MADNESS_TEST_EVAL_EXHAUSTIVE=1 is set.
| void bench_cell | ( | World & | world, |
| int | k | ||
| ) |
References c, d, e(), madness::f, madness::WorldGopInterface::fence(), madness::FunctionFactory< T, NDIM >::functor(), madness::World::gop, k, L, NDIM, madness::World::rank(), 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(), and madness::Vector< T, N >::size().
|
static |
References std::abs(), and e().
Referenced by run_correctness_cell().
| bool golden_check_ndim | ( | World & | world, |
| int | k, | ||
| double | thresh, | ||
| double | cx, | ||
| const double | raw_pt[3], | ||
| double & | out_ref, | ||
| double & | out_lo | ||
| ) |
References d, madness::f, madness::WorldGopInterface::fence(), madness::FunctionFactory< T, NDIM >::functor(), madness::World::gop, k, L, lo, NDIM, print_golden, madness::World::rank(), 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(), and thresh.
|
static |
References e(), k, and thresh.
Referenced by test_correctness_ndim().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
References madness::WorldGopInterface::fence(), madness::finalize(), madness::World::gop, madness::initialize(), run_bench, run_benchmark(), run_heavy, madness::startup(), test_contraction_micro(), test_general_fast_transform(), test_golden_values(), test_output_param_overload(), and test_scaling_factor().
| int run_batched_cell | ( | World & | world, |
| const std::string & | label, | ||
| int | k, | ||
| double | thresh, | ||
| double | L, | ||
| const std::vector< Vector< double, NDIM > > & | user_pts | ||
| ) |
References madness::test_output::checkpoint(), d, madness::test_output::end(), madness::f, madness::WorldGopInterface::fence(), madness::FunctionFactory< T, NDIM >::functor(), madness::World::gop, k, L, NDIM, ok(), 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::WorldGopInterface::sum(), and thresh.
| void run_benchmark | ( | World & | world | ) |
References madness::World::rank(), and madness::World::size().
Referenced by main().
| int run_correctness_cell | ( | World & | world, |
| const std::string & | label, | ||
| FunctorT * | raw_functor, | ||
| int | k, | ||
| double | thresh, | ||
| double | L, | ||
| const std::vector< Vector< double, NDIM > > & | user_pts | ||
| ) |
References std::abs(), madness::test_output::checkpoint(), madness::test_output::end(), eval_tol(), madness::f, madness::WorldGopInterface::fence(), madness::FunctionFactory< T, NDIM >::functor(), madness::World::gop, k, L, lo, 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::WorldGopInterface::sum(), and thresh.
| int test_batched_ndim | ( | World & | world | ) |
| int test_contraction_micro | ( | ) |
References std::abs(), c, madness::test_output::checkpoint(), d, dist(), e(), madness::test_output::end(), k, madness::MAXK, p(), and q().
Referenced by main().
| int test_correctness_ndim | ( | World & | world | ) |
| int test_golden_values | ( | World & | world | ) |
References std::abs(), madness::test_output::checkpoint(), e(), madness::test_output::end(), madness::g, and golden_pts.
Referenced by main().
| int test_output_param_overload | ( | World & | world | ) |
References madness::test_output::checkpoint(), d, e(), madness::test_output::end(), madness::f, madness::WorldGopInterface::fence(), madness::FunctionFactory< T, NDIM >::functor(), madness::World::gop, L, NDIM, ok(), p(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_initial_level(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_refine(), and madness::FunctionDefaults< NDIM >::set_thresh().
Referenced by main().
| int test_scaling_factor | ( | ) |
References std::abs(), madness::arg(), madness::test_output::checkpoint(), madness::test_output::end(), and madness::MAXLEVEL.
Referenced by main().
|
static |
|
static |
Referenced by golden_check_ndim().
|
static |
Referenced by main().
|
static |
Referenced by main(), test_correctness_ndim(), and test_general_fast_transform().