MADNESS 0.10.1
rk.cc File Reference
#include <madness/mra/mra.h>
#include <madness/mra/operator.h>
#include <madness/world/vector.h>
#include <madness/mra/nonlinsol.h>
#include <cstdio>
#include "DKops.h"
Include dependency graph for rk.cc:

Classes

class  FiniteNucleusPotential
struct  Guess
struct  lbcost< T, NDIM >

Functions

void a_fit (double dx, double thresh, double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta)
void apbar_fit (double dx, double thresh, double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta)
real_function_3d apply_laplacian (World &world, const real_function_3d &psi)
real_function_3d apply_potential (const real_function_3d &Vnuc, const real_function_3d &psi)
void bshrel_fit (double epsilon, double dx, double thresh, double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta)
double compute_energy (World &world, const real_function_3d &psi, const real_function_3d &V, bool doprint=false)
double compute_energy_simple (World &world, const real_function_3d &psi, const real_function_3d &Vpsi, bool doprint=false)
real_function_3d iterate (World &world, const real_function_3d &V, const real_function_3d &psi, double &eps)
void logplot (double Z, const real_function_3d &psi, double lo=1e-7, double hi=L *0.5)
int main (int argc, char **argv)
real_convolution_3d make_bsh_operator (World &world, double eps, double &fac)
static std::vector< real_convolution_3d_ptr > make_grad_operator (World &world, std::vector< double > C, const std::vector< double > T, const double Cdelta, int k=FunctionDefaults< 3 >::get_k())
 Factory function generating operator for convolution with grad(operator) in 3D.
real_convolution_3d make_operator (World &world, const std::vector< double > &C, const std::vector< double > &T, double Cdelta)
 Given coefficients and exponents make the 3D operator adding delta part to last Gaussian.
void pbar_fit (double dx, double thresh, double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta)
double rk_v (double Z)
 Makes the relativistic equivalent of the BSH operator.
void tbar_fit (double dx, double thresh, double quadacc, std::vector< double > &coeffs, std::vector< double > &expnts, double &Cdelta)

Variables

static const bool DK1 = true
static const bool FINITENUC = false
static const long k = 10
static const double L = 50.0
static const bool NONREL = false
static const double op_dx =1e-16
static const double op_quadacc =1e-8
static const double op_thresh =1e-8
static const bool RK = false
static const double thresh = 1e-8
static double Z = -1

Function Documentation

◆ a_fit()

void a_fit ( double dx,
double thresh,
double quadacc,
std::vector< double > & coeffs,
std::vector< double > & expnts,
double & Cdelta )

◆ apbar_fit()

void apbar_fit ( double dx,
double thresh,
double quadacc,
std::vector< double > & coeffs,
std::vector< double > & expnts,
double & Cdelta )

◆ apply_laplacian()

real_function_3d apply_laplacian ( World & world,
const real_function_3d & psi )

◆ apply_potential()

◆ bshrel_fit()

void bshrel_fit ( double epsilon,
double dx,
double thresh,
double quadacc,
std::vector< double > & coeffs,
std::vector< double > & expnts,
double & Cdelta )

References bshrel_OMEGA(), epsilon, h(), norm(), PI, q(), sum, and thresh.

◆ compute_energy()

double compute_energy ( World & world,
const real_function_3d & psi,
const real_function_3d & V,
bool doprint = false )

◆ compute_energy_simple()

double compute_energy_simple ( World & world,
const real_function_3d & psi,
const real_function_3d & Vpsi,
bool doprint = false )

◆ iterate()

◆ logplot()

void logplot ( double Z,
const real_function_3d & psi,
double lo = 1e-7,
double hi = L*0.5 )

References DK1, e(), L, lo, NONREL, pow(), psi(), RK, and Z.

Referenced by main().

◆ main()

◆ make_bsh_operator()

real_convolution_3d make_bsh_operator ( World & world,
double eps,
double & fac )

References madness::BSHOperator3D(), e(), Ebar(), and NONREL.

Referenced by iterate().

◆ make_grad_operator()

std::vector< real_convolution_3d_ptr > make_grad_operator ( World & world,
std::vector< double > C,
const std::vector< double > T,
const double Cdelta,
int k = FunctionDefaults<3>::get_k() )
static

Factory function generating operator for convolution with grad(operator) in 3D.

Returns a 3-vector containing the convolution operator for the x, y, and z components of grad(operator) where the operator is provided as a sum over Gaussians

References c, d, madness::dir, madness::GaussianConvolution1DCache< Q >::get(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::FunctionDefaults< NDIM >::get_k(), k, mu, madness::Tensor< T >::normf(), madness::constants::pi, pi, and pow().

◆ make_operator()

real_convolution_3d make_operator ( World & world,
const std::vector< double > & C,
const std::vector< double > & T,
double Cdelta )

Given coefficients and exponents make the 3D operator adding delta part to last Gaussian.

References c, madness::constants::pi, and pow().

◆ pbar_fit()

void pbar_fit ( double dx,
double thresh,
double quadacc,
std::vector< double > & coeffs,
std::vector< double > & expnts,
double & Cdelta )

◆ rk_v()

double rk_v ( double Z)

Makes the relativistic equivalent of the BSH operator.

Makes the Tbar operator (T_rel = E0-mc2 = Tbar T_nonrel = -1/2 Tbar del**2) Makes the Pbar operator Makes the APbar operator Makes the gradient of the APbar operator Makes the A operator (including the 1/sqrt(2) piece) Returns the exponent of the wavefunction cusp at the origin for RK

References std::abs(), c, DK1, e(), NONREL, madness::constants::pi, v, and Z.

Referenced by Guess::Guess(), and main().

◆ tbar_fit()

void tbar_fit ( double dx,
double thresh,
double quadacc,
std::vector< double > & coeffs,
std::vector< double > & expnts,
double & Cdelta )

Variable Documentation

◆ DK1

const bool DK1 = true
static

◆ FINITENUC

const bool FINITENUC = false
static

Referenced by main().

◆ k

const long k = 10
static

Referenced by bench_cell(), bind_factory_type(), bind_function_type(), bshrel_omega(), cungqr_(), doit(), dorgqr_(), energy(), exchange_anchor_test(), fastsum_oscillating(), filter_moments_inplace(), PNOTensors::Tensor_IJ_IK< T >::get(), PNOTensors::Tensor_IJ_KJ< T >::get(), golden_check_ndim(), GradBSHOperator_Joel(), gradPbarA(), hashbig(), hashlittle(), hashlittle2(), hashword(), PNOTensors::Tensor_IJ_IK< T >::ijk(), PNOTensors::Tensor_IJ_KJ< T >::ijk(), initialize(), is_heavy(), PNOTensors::Tensor_IJ_IK< T >::is_initialized(), PNOTensors::Tensor_IJ_KJ< T >::is_initialized(), PNOTensors::Tensor_IJ_IK< T >::is_unique(), PNOTensors::Tensor_IJ_KJ< T >::is_unique(), jacobi(), jacobi(), kinetic_energy_matrix(), kinetic_energy_matrix_slow(), LSQ(), main(), main(), make_grad_operator(), MAKE_PROPAGATOR(), makeao(), matrix_exponential(), A_omega::operator()(), APbar_omega::operator()(), AtomicBasisFunctor< Q >::operator()(), Pbar_omega::operator()(), slymer::PolynomialCoeffs::operator()(), Tbar_omega::operator()(), opt(), opt(), orgqr_(), orgqr_(), orgqr_(), orgqr_(), p(), plotvtk(), print_cube(), print_cube(), print_cube(), propagate(), q_c(), read_function(), run(), run_batched_cell(), run_correctness_cell(), run_one(), run_tests(), PNOTensors::Tensor_IJ_IK< T >::set(), PNOTensors::Tensor_IJ_KJ< T >::set(), solve(), sorgqr_(), tabulate(), test(), test(), test(), test(), test2(), test2(), Test7(), test_adaptive_tree(), test_add(), test_batch_cache(), test_batched_ndim(), test_bsh(), test_chin_chen(), test_coalesced_redistribute(), test_combine_generic(), test_consolidate_vs_direct(), test_contraction_micro(), test_conv(), test_converged_function(), test_conversion(), test_convolution(), test_correctness_ndim(), test_coulomb(), test_diagnose_GQKffK(), test_exchange(), test_gconv(), test_hartree_product(), test_in(), test_inner(), test_inv_rsq_gfit(), test_invrsq_operator(), test_multiply(), test_opdir(), test_out(), test_per(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), test_qm(), test_replicate(), test_stuff(), test_sum_down(), test_sum_down_files(), test_trotter(), test_tt2d_summation(), test_vector_composite(), test_Vphi_ij_u(), test_xc1(), testgradG(), testNavierStokes(), testPeriodicCoulomb3d(), transform(), transform3d(), update(), and zungqr_().

◆ L

const double L = 50.0
static

Referenced by madness::DFTCoulombPeriodicOp< T, NDIM >::DFTCoulombPeriodicOp(), madness::DFTNuclearChargeDensityOp< T, NDIM >::DFTNuclearChargeDensityOp(), madness::add(), madness::FunctionImpl< T, NDIM >::add_scalar_inplace(), apply_periodic_bsh(), apply_periodic_bsh(), madness::XCOperator< T, NDIM >::apply_tau_term(), bench_cell(), madness::binary_op(), bind_function_type(), madness::Molecule::bounding_cube(), MolecularEntity::bounding_cube(), madness::DFT< T, NDIM >::calculate_tot_coulomb_energy(), madness::DFT< T, NDIM >::calculate_tot_pe_sp(), madness::SeparatedConvolution< double, 3 >::check_cubic(), complex_exp_1d(), madness::composite_inner_apply(), compute_madelung_energy_PWSCF(), madness::MP3::compute_mp3_klmn(), compute_reduced_mass(), madness::MolecularOptimizer::compute_reduced_mass(), compute_volume(), dfunc(), madness::FunctionImpl< T, LDIM >::do_mul(), doit(), energy(), exact_cosine(), exact_spheropole(), f_cosine(), func(), gaussian_func(), madness::smooth< T, NDIM >::gaussian_smoothing(), madness::gaxpy(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_recursive(), madness::gaxpy_oop(), generate_G_vectors(), generate_R_vectors(), get_coeffs_pw(), golden_check_ndim(), madness::population::iao_population(), initial_guess(), initialize(), madness::FunctionImpl< T, LDIM >::inner_ij_u_eri(), KAIN(), madness::KAIN(), madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::leaf_action(), madness::trajectory< NDIM >::line_xyz(), logplot(), madness::lq(), madness::lq(), main(), main(), make_basis(), make_nuclear_charge_density(), make_nuclear_charge_density_individual(), MAKE_PROPAGATOR(), make_pw_matrix(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::make_sum_coeffs(), makeao(), AtomicBasisFunctor< Q >::operator()(), opposing_field_potential(), madness::orthonormalize_cd(), madness::PNO::orthonormalize_cholesky(), madness::orthonormalize_rrcd(), madness::SCF::pad_virtuals_from_guess(), periodic_sum(), periodic_sum_partial(), madness::PeriodicBSHOp(), madness::PeriodicBSHOpPtr(), madness::PeriodicCoulombOp(), madness::PeriodicCoulombOpPtr(), phi_bsh_func3d(), phi_coulomb_func3d(), phi_initial_guess3D(), plot(), potential(), printfunc(), product(), madness::population::projection_population(), pw_lhs(), pw_rhs(), rho_bsh_func3d(), rho_coulomb_func3d(), madness::GaussianConvolution1D< Q >::rnlp(), run(), run_batched_cell(), run_correctness_cell(), run_full_closed_shell(), run_full_open_shell(), run_one(), run_static_closed_shell(), run_static_open_shell(), s_13_4177_0(), madness::BaseTensor::set_dims_and_size(), madness::SmoothingOperator(), madness::SmoothingOperator3D(), madness::EigSolver< T, NDIM >::solve(), solve(), source(), source1(), slymer::Gaussian_Functor::special_level(), madness::sub(), sum(), test(), test(), test2(), test2(), madness::smooth< T, NDIM >::test_1d(), test_apply_push_1d(), test_batched_ndim(), test_chin_chen(), test_correctness_ndim(), test_gaussian_num_coeffs(), test_gconv(), test_gence2(), test_he(), test_he_potential(), test_hf_be(), test_hf_he(), test_hydro(), test_modified(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), test_op(), test_output_param_overload(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), test_plot(), test_proj(), test_qm(), test_recursive_application(), test_tree_state(), test_trotter(), test_xc2(), testNavierStokes(), testPeriodicCoulomb3d(), madness::transform(), madness::TensorTrain< T >::truncate(), madness::FunctionImpl< T, NDIM >::truncate_tol(), u(), unit_func3d(), update(), update(), V_cosine1D(), V_cosine3D(), V_cosine3D_sep(), madness::detail::Vm_cstr< wchar_t >(), and madness::vmulXX().

◆ NONREL

const bool NONREL = false
static

◆ op_dx

const double op_dx =1e-16
static

◆ op_quadacc

const double op_quadacc =1e-8
static

◆ op_thresh

const double op_thresh =1e-8
static

◆ RK

const bool RK = false
static

◆ thresh

const double thresh = 1e-8
static

Referenced by a_fit(), apbar_fit(), apply_BSH(), apply_BSH_new(), bind_function_type(), bshrel_fit(), check(), check_err(), compare(), diag_and_transform(), dnuclear_anchor_test(), doit(), energy(), exchange_anchor_test(), fixphases(), fixphases(), golden_check_ndim(), initial_guess(), initialize(), is_aligned(), is_centered_normal(), is_close(), is_heavy(), iterate(), main(), main(), make_bsh_operators(), make_coulomb_potential(), make_nuclear_charge_density(), make_nuclear_charge_density_individual(), nuclear_anchor_test(), orth(), p(), pbar_fit(), AtomicBasisSet::print_anal(), q_c(), run(), run_all_calculations(), run_batched_cell(), run_correctness_cell(), run_full_closed_shell(), run_full_open_shell(), run_one(), run_static_closed_shell(), run_static_open_shell(), run_tests(), similar(), solve(), tbar_fit(), test(), test(), test(), test(), test2(), test2(), test_adaptive_tree(), test_add(), test_add(), test_arithmetic(), test_asymmetric(), test_basic(), test_batched_ndim(), test_chin_chen(), test_combined_operators(), test_consolidate_vs_direct(), test_constructor(), test_converged_function(), test_convert(), test_convolution(), test_correctness_ndim(), test_coulomb(), test_cross(), test_ctor_orthonormalization(), test_diff(), test_dnuclear(), test_dot(), test_exchange(), test_exchange(), test_fock(), test_gconv(), test_general_transform(), test_GQUe(), test_GUe(), test_hartree_product(), test_he(), test_he_potential(), test_hermiticity(), test_hf_be(), test_hf_h2(), test_hf_he(), test_hydro(), test_inner(), test_inner(), test_inner(), test_inner(), test_kinetic(), test_loose1(), test_math(), test_matrix_mul_sparse(), test_meta_gga(), test_multi_to_multi_op(), test_multiply(), test_multiply(), test_multiply_with_f12(), test_nemo(), test_nuclear(), test_op(), test_orthonormalize_canonical(), test_orthonormalize_symmetric(), test_partial_inner_3d(), test_per(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), test_plot(), test_project_ab(), test_projector(), test_Q12_projector(), test_qm(), test_reconstruct(), test_recursive_apply(), test_redistribute_to_batches(), test_reduce_rank(), test_remove_lindep(), test_replicate(), test_rot(), test_slater_exchange(), test_stuff(), test_sum_down(), test_sum_down_files(), test_transform(), test_trotter(), test_tt2d_summation(), test_vector_composite(), test_Vphi_ij_u(), test_xc2(), test_XCOperator(), test_XCOperator_matrix(), testgradG(), and testPeriodicCoulomb3d().

◆ Z

double Z = -1
static

Referenced by AnsatzBase::AnsatzBase(), FiniteNucleusPotential::FiniteNucleusPotential(), ncf::ncf(), madness::population::atomic_populations(), madness::NuclearCorrelationFactor::U1_functor::eval(), exact_energy(), FiniteNucleusPotential::expnt(), guess(), guess1s(), guess2s(), logplot(), main(), Ansatz0::make_guess(), FiniteNucleusPotential::operator()(), madness::NuclearCorrelationFactor::RX_functor::operator()(), madness::NuclearCorrelationFactor::U1_atomic_functor::operator()(), madness::NuclearCorrelationFactor::U1X_functor::operator()(), madness::NuclearCorrelationFactor::U2X_functor::operator()(), periodic_sum(), periodic_sum_partial(), phi_guess(), psi_guess(), rk_v(), madness::population::PopulationAnalysis::run(), run(), madness::AdhocNuclearCorrelationFactor::S(), madness::GaussSlater::S(), madness::GradientalGaussSlater::S(), madness::LinearSlater::S(), madness::NuclearCorrelationFactor::S(), madness::poly4erfc::S(), madness::Polynomial< N >::S(), madness::PseudoNuclearCorrelationFactor::S(), madness::Slater::S(), madness::Slater::screening_radius(), madness::smoothing_parameter(), smoothing_parameter(), smoothing_parameter(), smoothing_parameter(), smoothing_parameter(), smoothing_parameter(), madness::AdhocNuclearCorrelationFactor::Sp(), madness::GaussSlater::Sp(), madness::GradientalGaussSlater::Sp(), madness::LinearSlater::Sp(), madness::NuclearCorrelationFactor::Sp(), madness::poly4erfc::Sp(), madness::Polynomial< N >::Sp(), madness::PseudoNuclearCorrelationFactor::Sp(), madness::Slater::Sp(), madness::AdhocNuclearCorrelationFactor::Spp_div_S(), madness::GaussSlater::Spp_div_S(), madness::GradientalGaussSlater::Spp_div_S(), madness::LinearSlater::Spp_div_S(), madness::NuclearCorrelationFactor::Spp_div_S(), madness::poly4erfc::Spp_div_S(), madness::Polynomial< N >::Spp_div_S(), madness::PseudoNuclearCorrelationFactor::Spp_div_S(), madness::Slater::Spp_div_S(), madness::AdhocNuclearCorrelationFactor::Sr_div_S(), madness::GaussSlater::Sr_div_S(), madness::GradientalGaussSlater::Sr_div_S(), madness::LinearSlater::Sr_div_S(), madness::NuclearCorrelationFactor::Sr_div_S(), madness::poly4erfc::Sr_div_S(), madness::Polynomial< N >::Sr_div_S(), madness::PseudoNuclearCorrelationFactor::Sr_div_S(), madness::Slater::Sr_div_S(), madness::AdhocNuclearCorrelationFactor::Srr_div_S(), madness::GaussSlater::Srr_div_S(), madness::GradientalGaussSlater::Srr_div_S(), madness::LinearSlater::Srr_div_S(), madness::NuclearCorrelationFactor::Srr_div_S(), madness::poly4erfc::Srr_div_S(), madness::Polynomial< N >::Srr_div_S(), madness::PseudoNuclearCorrelationFactor::Srr_div_S(), madness::Slater::Srr_div_S(), madness::AdhocNuclearCorrelationFactor::Srrr_div_S(), madness::GaussSlater::Srrr_div_S(), madness::GradientalGaussSlater::Srrr_div_S(), madness::LinearSlater::Srrr_div_S(), madness::NuclearCorrelationFactor::Srrr_div_S(), madness::poly4erfc::Srrr_div_S(), madness::Polynomial< N >::Srrr_div_S(), madness::PseudoNuclearCorrelationFactor::Srrr_div_S(), madness::Slater::Srrr_div_S(), madness::GaussSlater::U2X_spherical(), madness::GradientalGaussSlater::U2X_spherical(), madness::NuclearCorrelationFactor::U2X_spherical(), madness::poly4erfc::U2X_spherical(), madness::Polynomial< N >::U2X_spherical(), madness::PseudoNuclearCorrelationFactor::U2X_spherical(), madness::Slater::U2X_spherical(), V(), and Ve().