MADNESS
0.10.1
|
#include <cmath>
#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include "../../../../mpfrc++-3/mpreal.h"
Classes | |
class | A_omega |
Computes term k at quadrature point t in infinte Fourier-space sum defining A. More... | |
class | APbar_omega |
Computes term k at quadrature point t in infinte Fourier-space sum defining APbar. More... | |
class | Pbar_omega |
Computes term k at quadrature point t in infinte Fourier-space sum defining Pbar. More... | |
class | Tbar_omega |
Computes term k at quadrature point t in infinte Fourier-space sum defining Tbar. More... | |
Functions | |
void | a_fit (const double dx, const double thresh, const double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta) |
double | a_OMEGA (double t) |
Computes at quadrature point t the infinte Fourier-space sum defining A. More... | |
void | apbar_fit (const double dx, const double thresh, const double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta) |
double | apbar_OMEGA (double t) |
Computes at quadrature point t the infinte Fourier-space sum defining APbar. More... | |
void | bshrel_fit (double epsilon, const double dx, const double thresh, double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta) |
double | bshrel_OMEGA (double t, double epsilon) |
double | bshrel_omega (double t, int k, double epsilon) |
double | C (double a) |
Additional factor when transforming gaussian exponent a from fourier to real space. More... | |
bool | check (double value, double correct, double thresh, const char *msg) |
template<typename T > | |
double | fastsum_oscillating (const T &C, int nmax) |
This fast summation of an oscillating series is based upon Pade. More... | |
void | munge_quadrature_points (int &npt, double &tlo, double &thi, double &h) |
void | pbar_fit (const double dx, const double thresh, const double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta) |
double | pbar_OMEGA (double t) |
Computes at quadrature point t the infinte Fourier-space sum defining Pbar. More... | |
double | Q (double a) |
double | q (double t) |
Exponents in Fourier space quadrature over t. More... | |
double | relops_h (const double quadacc) |
void | tbar_fit (const double dx, const double thresh, const double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta) |
double | tbar_OMEGA (double t) |
Computes at quadrature point t the infinte Fourier-space sum defining Tbar. More... | |
Variables | |
static const double | c = 137.0359895 |
static const double | m = 1.0 |
static const double | mc2 = m*c*c |
static const double | PI = 3.14159265358979323846264338328 |
void a_fit | ( | const double | dx, |
const double | thresh, | ||
const double | quadacc, | ||
std::vector< double > & | coeffs, | ||
std::vector< double > & | expnts, | ||
double & | Cdelta | ||
) |
References a_OMEGA(), C(), h(), munge_quadrature_points(), madness::detail::norm(), PI, pow(), Q(), q(), relops_h(), sum, and thresh.
double a_OMEGA | ( | double | t | ) |
Computes at quadrature point t the infinte Fourier-space sum defining A.
References fastsum_oscillating().
Referenced by a_fit().
void apbar_fit | ( | const double | dx, |
const double | thresh, | ||
const double | quadacc, | ||
std::vector< double > & | coeffs, | ||
std::vector< double > & | expnts, | ||
double & | Cdelta | ||
) |
References apbar_OMEGA(), c, C(), h(), m, munge_quadrature_points(), madness::detail::norm(), PI, pow(), Q(), q(), relops_h(), sum, and thresh.
double apbar_OMEGA | ( | double | t | ) |
Computes at quadrature point t the infinte Fourier-space sum defining APbar.
References fastsum_oscillating().
Referenced by apbar_fit().
void bshrel_fit | ( | double | epsilon, |
const double | dx, | ||
const double | thresh, | ||
double | quadacc, | ||
std::vector< double > & | coeffs, | ||
std::vector< double > & | expnts, | ||
double & | Cdelta | ||
) |
References bshrel_OMEGA(), epsilon, h(), madness::detail::norm(), PI, pow(), q(), sum, and thresh.
double bshrel_OMEGA | ( | double | t, |
double | epsilon | ||
) |
References c, epsilon, PI, and pow().
Referenced by bshrel_fit().
double bshrel_omega | ( | double | t, |
int | k, | ||
double | epsilon | ||
) |
References madness::arg(), epsilon, k, and mc2.
double C | ( | double | a | ) |
Additional factor when transforming gaussian exponent a from fourier to real space.
Referenced by a_fit(), apbar_fit(), fastsum_oscillating(), pbar_fit(), and tbar_fit().
bool check | ( | double | value, |
double | correct, | ||
double | thresh, | ||
const char * | msg | ||
) |
References std::abs(), and thresh.
Referenced by madness::F12Potentials::compute_projected_f12_energies().
double fastsum_oscillating | ( | const T & | C, |
int | nmax | ||
) |
This fast summation of an oscillating series is based upon Pade.
http://people.mpim-bonn.mpg.de/zagier/files/exp-math-9/fulltext.pdf
For Tbar I think it works for the right reasons for t>0 but for large negative t I think it gets lucky. C(k) is a function/functor that returns the k'th term in the series for k=0,...,nmax
References b, c, C(), d(), k, and pow().
Referenced by a_OMEGA(), apbar_OMEGA(), and tbar_OMEGA().
void munge_quadrature_points | ( | int & | npt, |
double & | tlo, | ||
double & | thi, | ||
double & | h | ||
) |
References h().
Referenced by a_fit(), apbar_fit(), pbar_fit(), and tbar_fit().
void pbar_fit | ( | const double | dx, |
const double | thresh, | ||
const double | quadacc, | ||
std::vector< double > & | coeffs, | ||
std::vector< double > & | expnts, | ||
double & | Cdelta | ||
) |
References c, C(), h(), m, munge_quadrature_points(), madness::detail::norm(), pbar_OMEGA(), PI, pow(), q(), relops_h(), sum, and thresh.
double pbar_OMEGA | ( | double | t | ) |
Computes at quadrature point t the infinte Fourier-space sum defining Pbar.
Computes at quadrature point t the infinte Fourier-space sum defining Pbar
Referenced by pbar_fit().
double Q | ( | double | a | ) |
References a.
Referenced by madness::TensorIterator< T, Q, R >::TensorIterator(), a_fit(), apbar_fit(), madness::SeparatedConvolution< Q, NDIM >::apply(), madness::CCPairFunction< T, NDIM >::apply(), madness::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::GTHPseudopotential< Q >::apply_potential(), madness::check_linear_dependence(), madness::Zcis::compute_potentials(), madness::SVDTensor< T >::compute_randomized_svd(), madness::RandomizedMatrixDecomposition< T >::compute_range(), madness::SVDTensor< T >::compute_svd_from_range(), madness::convert(), madness::RandomizedMatrixDecomposition< T >::do_compute_range(), madness::fast_transform(), madness::gaxpy_oop(), madness::general_transform(), madness::GaussianConvolution1DCache< Q >::get(), madness::Convolution1D< Q >::get_rnlp(), madness::SeparatedConvolution< Q, NDIM >::initialize(), madness::inner(), madness::inner_result(), madness::CC2::iterate_singles(), KAIN(), madness::KAIN(), laplacian(), madness::Localizer::localize_new(), main(), madness::Nemo::make_cphf_constant_term(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), madness::mul(), madness::GenTensor< T >::operator GenTensor< Q >(), madness::Tensor< T >::operator Tensor< Q >(), function_real2complex_op< Q, NDIM >::operator()(), madness::abs_square_op< Q, NDIM >::operator()(), madness::real_op< Q, NDIM >::operator()(), madness::imag_op< Q, NDIM >::operator()(), madness::abs_op< Q, NDIM >::operator()(), madness::conj_op< Q, NDIM >::operator()(), madness::function_real2complex_op< Q, NDIM >::operator()(), wstFunctor< Q >::operator()(), madness::GaussianGenericFunctor< Q >::operator()(), madness::GenericConvolution1D< Q, opT >::Shmoo::operator()(), madness::GenTensor< T >::operator*(), madness::Tensor< T >::operator*(), madness::LowRankFunction< T, NDIM, LDIM >::operator*(), madness::Tensor< T >::operator+(), madness::Function< T, NDIM >::operator+=(), madness::Tensor< T >::operator-(), madness::Function< T, NDIM >::operator-=(), madness::Tensor< T >::operator/(), madness::SliceTensor< T >::operator=(), madness::operator>>(), MiniDFT::orthogonalize(), DF::orthogonalize_inplace(), madness::orthonormalize(), madness::NemoBase::orthonormalize(), madness::Zcis::orthonormalize(), orthonormalize(), madness::SCF::orthonormalize(), madness::SVDTensor< T >::orthonormalize_random(), madness::outer(), Q2(), madness::NemoBase::Q2(), madness::Q2(), Q3(), madness::Solver< T, NDIM >::Q3(), madness::Q3(), madness::SVDTensor< T >::recompute_from_range(), madness::GaussianConvolution1D< Q >::rnlp(), madness::SCF::solve(), madness::Nemo::solve_cphf(), madness::tensor_abs(), madness::tensor_real2complex(), madness::GenTensor< T >::TENSOR_RESULT_TYPE(), madness::Tensor< T >::TENSOR_RESULT_TYPE(), madness::tensor_ximag(), madness::tensor_xreal(), test_projector(), test_stuff(), madness::SRConf< T >::trace(), madness::TensorTrain< T >::trace(), madness::transform(), madness::transform_dir(), and madness::SCF::update_subspace().
double q | ( | double | t | ) |
Exponents in Fourier space quadrature over t.
Referenced by a_fit(), apbar_fit(), bshrel_fit(), pbar_fit(), and tbar_fit().
double relops_h | ( | const double | quadacc | ) |
References e().
Referenced by a_fit(), apbar_fit(), pbar_fit(), and tbar_fit().
void tbar_fit | ( | const double | dx, |
const double | thresh, | ||
const double | quadacc, | ||
std::vector< double > & | coeffs, | ||
std::vector< double > & | expnts, | ||
double & | Cdelta | ||
) |
References C(), h(), munge_quadrature_points(), madness::detail::norm(), PI, pow(), q(), relops_h(), sum, tbar_OMEGA(), and thresh.
double tbar_OMEGA | ( | double | t | ) |
Computes at quadrature point t the infinte Fourier-space sum defining Tbar.
References a, b, c, fastsum_oscillating(), and PI.
Referenced by tbar_fit().
|
static |
Referenced by madness::BandlimitedPropagator::BandlimitedPropagator(), madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::TensorTrain< T >::TensorTrain(), madness::DependencyInterface::~DependencyInterface(), A(), A2(), madness::FunctionNode< T, NDIM >::accumulate(), madness::FunctionNode< T, NDIM >::accumulate2(), madness::Molecule::add_atom(), MolecularEntity::add_atom(), madness::detail::RemoteCounterBase::add_ref(), LProjector::analyze(), ExactSpinor::angular(), apbar_fit(), madness::FunctionImpl< T, NDIM >::apply_1d_realspace_push(), madness::FunctionImpl< T, NDIM >::apply_1d_realspace_push_op(), madness::autoc(), madness::bgq_mtxmq_padded(), madness::GFit< T, NDIM >::bsh_fit_ndim(), bshrel_OMEGA(), Calculation::calc_optimal_coeffs(), madness::check_linear_dependence(), madness::checksum_file(), madness::TwoElectronInterface< T, NDIM >::coeff(), madness::CCPairFunction< T, NDIM >::collect_same_types(), SurfaceMoleculeInteraction::colloid_coords(), SurfaceMoleculeInteraction::colloid_radii(), complexify(), complexify< double_complex >(), complexify< float_complex >(), ExactSpinor::compute_C(), compute_electronic_energy(), ExactSpinor::compute_en(), ExactSpinor::compute_energy(), madness::max_of_x_1_smooth::compute_factor(), madness::Nemo::compute_IR_intensities(), madness::Diamagnetic_potential_factor::compute_v_vector(), madness::concatenate_columns(), madness::concatenate_rows(), convert(), convert< double >(), convert< float >(), madness::PotentialManager::core_projection(), madness::PotentialManager::core_projector_derivative(), madness::Solver< T, NDIM >::csqrt(), madness::CCPairFunction< T, NDIM >::dec_to_pure(), madness::TensorTrain< T >::decompose(), diag_and_transform(), madness::FunctionImpl< T, NDIM >::do_apply(), madness::FunctionImpl< T, NDIM >::do_apply_kernel(), madness::FunctionImpl< T, NDIM >::do_apply_kernel2(), madness::FunctionImpl< T, NDIM >::do_print_grid(), madness::Solver< T, NDIM >::do_rhs(), MiniDFT::doit(), doit(), drot(), madness::drot(), drot3(), eigenvector_test(), madness::FunctionImpl< T, NDIM >::eval_cube(), madness::fast_transform(), fastsum_oscillating(), madness::fcube(), ExactSpinor::Fvalue(), madness::BandlimitedPropagator::g0_filtered(), madness::FunctionImpl< T, NDIM >::gaxpy_ext_recursive(), madness::cblas::gemm(), gen_ce(), madness::SRConf< T >::general_transform(), madness::general_transform(), madness::Molecule::get_all_coords(), madness::Molecule::get_all_coords_vec(), madness::Molecule::get_core_bc(), madness::Molecule::get_core_l(), madness::GradBSHOperator(), GradBSHOperator_Joel(), madness::GradCoulombOperator(), gradPbarA(), madness::GradSlaterOperator(), madness::BasisFunctions::guess_contracted_virtuals_from_file(), hashbig(), hashlittle(), hashlittle2(), hashword(), madness::Znemo::hcore_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), initial_guess(), madness::TwoElectronInterface< T, NDIM >::initialize(), madness::SeparatedConvolution< Q, NDIM >::initialize(), madness::inner(), madness::FunctionImpl< T, NDIM >::inner_adaptive_recursive(), madness::FunctionImpl< T, NDIM >::inner_ext_node(), madness::FunctionImpl< T, NDIM >::inner_ext_recursive(), inner_func(), madness::CCPairFunction< T, NDIM >::is_collected(), madness::jacobi(), jacobi(), TTT::jody(), KAIN(), madness::KAIN(), kinetic_energy_matrix(), kinetic_energy_matrix2(), kinetic_energy_matrix_slow(), madness::archive::ArchiveLoadImpl< Archive, C >::load(), madness::archive::ArchiveLoadImpl< Archive, detail::RemoteCounter >::load(), madness::archive::ArchiveLoadImpl< Archive, linked_list >::load(), madness::archive::ArchiveLoadImpl< Archive, std::complex< T >, std::enable_if_t< is_serializable_v< Archive, T > > >::load(), madness::SystolicPMOrbitalLocalize::localize_PM_ij(), main(), make_grad_operator(), make_operator(), Calculation::make_reference(), make_sp(), madness::TwoElectronInterface< T, NDIM >::map_coeff(), mTxm(), madness::mTxm(), mTxm_dgemm(), madness::mTxm_reference(), mTxm_tune(), mTxm_zgemm(), mTxmq(), mtxmq(), madness::mTxmq(), madness::mTxmq_padding(), madness::mTxmq_reference(), madness::mTxmT(), madness::mTxmT_reference(), madness::FunctionImpl< T, NDIM >::multi_to_multi_op_values_doit(), madness::FunctionImpl< T, NDIM >::multiop_values_doit(), madness::mxm(), madness::mxm_reference(), madness::mxmT(), madness::mxmT_reference(), nuclear_potential(), madness::CCPairFunction< T, NDIM >::op_dec_to_dec(), madness::CCPairFunction< T, NDIM >::op_dec_to_pure(), madness::CCPairFunction< T, NDIM >::op_pure_to_pure(), madness::TensorTrain< T >::operator TensorTrain< Q >(), ExactSpinor::operator()(), HeNuclearChargeDensityIGuess< T, NDIM >::operator()(), NcOverR::operator()(), test_multiop< T, NDIM >::operator()(), MolecularVolumeExponentialSwitch::operator()(), MatrixOperator::operator()(), APbar_omega::operator()(), Pbar_omega::operator()(), madness::FunctionImpl< T, NDIM >::do_mapdim::operator()(), madness::FunctionImpl< T, NDIM >::do_mirror::operator()(), madness::FunctionImpl< T, NDIM >::do_map_and_mirror::operator()(), BoysLocalization::operator()(), slymer::PolynomialCoeffs::operator*(), slymer::operator*(), slymer::PolynomialCoeffs::operator*=(), operator<<(), madness::operator<<(), madness::operators::operator<<(), madness::SimpleCache< Q, NDIM >::operator=(), madness::operator>>(), Pbar(), pbar_fit(), pbar_OMEGA(), PbarA(), periodic_sum_accelerated(), madness::PeriodicBSHOp(), madness::PeriodicBSHOpPtr(), madness::PeriodicCoulombOp(), madness::PeriodicCoulombOpPtr(), madness::BandlimitedPropagator::plot(), madness::plot_plane(), madness::plotdx(), madness::XCfunctional::polyn(), madness::BasisFunctions::print_contracted_basis(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), madness::print_seq(), madness::FunctionImpl< T, NDIM >::project(), madness::MolecularOrbitals< T, NDIM >::project_ao(), madness::CCPairFunction< T, NDIM >::project_out_decomposed(), propagate(), ExactSpinor::psivalue(), q(), madness::BasisFunctions::read_contracted_basis_from_file(), madness::FunctionImpl< T, NDIM >::read_grid(), madness::FunctionImpl< T, NDIM >::read_grid2(), madness::read_orbital(), madness::read_potential(), Plotter::read_to_end_of_line(), madness::readmat(), madness::FunctionNode< T, NDIM >::recompute_snorm_and_dnorm(), madness::FunctionImpl< T, NDIM >::refine_to_common_level(), madness::refine_to_common_level(), madness::detail::RemoteCounterBase::release(), madness::CCPairFunction< T, NDIM >::remove_linearly_dependent_terms(), madness::SCF::restart_aos(), rho_func_be(), rho_func_he(), rho_func_hydro(), rk_v(), madness::FunctionSpace< T, NDIM >::scale(), madness::VectorOfFunctionsSpace< T, VDIM, FDIM >::scale(), madness::VectorSpace< T, NDIM >::scale(), madness::Molecule::set_all_coords(), madness::FunctionNode< T, NDIM >::set_has_children_recursive(), madness::TaskInterface::set_info(), smoothing_parameter(), madness::smoothing_parameter(), solve(), madness::CC2::solve_mp2_coupled(), madness::NuclearCorrelationFactor::U1_atomic_functor::special_points(), madness::NuclearCorrelationFactor::U2_atomic_functor::special_points(), madness::NuclearCorrelationFactor::U3_atomic_functor::special_points(), madness::NuclearCorrelationFactor::U1X_functor::special_points(), madness::NuclearCorrelationFactor::U2X_functor::special_points(), split(), madness::archive::ArchiveStoreImpl< Archive, C >::store(), madness::archive::ArchiveStoreImpl< Archive, detail::RemoteCounter >::store(), madness::archive::ArchiveStoreImpl< Archive, linked_list >::store(), madness::archive::ArchiveStoreImpl< Archive, std::complex< T >, std::enable_if_t< is_serializable_v< Archive, T > > >::store(), madness::archive::TextFstreamOutputArchive::store(), madness::FunctionImpl< T, NDIM >::sum_down_spawn(), Tbar(), tbar_OMEGA(), madness::tensor_abs(), madness::tensor_real2complex(), madness::tensor_ximag(), madness::tensor_xreal(), test0(), test1(), test12(), test13(), Test5(), Test7(), test7(), TEST_CASE(), test_chin_chen(), test_consolidate(), test_ethylene(), madness::Diamagnetic_potential_factor::test_factor(), test_florian(), test_gence(), test_gence2(), test_general_transform(), test_in(), test_local(), test_math(), test_molecular_grid(), test_nuclear_potential2(), test_opdir(), test_out(), test_qm(), test_transform(), test_trotter(), testNavierStokes(), madness::time_transform(), timer(), madness::FunctionImpl< T, NDIM >::tnorm(), madness::commandlineparser::tolower(), madness::SRConf< T >::transform(), madness::transform(), madness::Zcis::transform(), transform(), transform3d(), madness::SRConf< T >::transform_dir(), madness::transform_dir(), madness::transform_reconstructed(), trantimer(), madness::GFit< T, NDIM >::truncate_periodic_expansion(), u(), madness::NonlinearSolverND< NDIM >::update(), madness::PNO::update_pno(), madness::SubspaceK< T, NDIM >::update_subspace(), madness::Subspace< T, NDIM >::update_subspace(), madness::SCF::update_subspace(), Subspace::update_subspace(), V_func_be(), V_func_he(), madness::TensorTrain< T >::verify(), madness::Function< T, NDIM >::vtransform(), madness::FunctionImpl< T, NDIM >::vtransform(), madness::FunctionImpl< T, NDIM >::vtransform_doit(), and w().
|
static |
Referenced by apbar_fit(), APbar_omega::operator()(), Pbar_omega::operator()(), pbar_fit(), and q().
Referenced by bshrel_omega().
|
static |