MADNESS
0.10.1
|
#include <iostream>
#include <madness/tensor/tensor.h>
#include <madness/tensor/tensor_lapack.h>
#include <madness/world/print.h>
Classes | |
struct | OptimizationTargetInterface |
The interface to be provided by functions to be optimized. More... | |
struct | OptimizerInterface |
The interface to be provided by optimizers. More... | |
class | QuasiNewton |
Optimization via quasi-Newton (BFGS or SR1 update) More... | |
struct | SolverInterface |
The interface to be provided by solvers. More... | |
struct | SolverTargetInterface |
The interface to be provided by. More... | |
class | SteepestDescent |
Optimization via steepest descent. More... | |
struct | Test |
struct | Test2 |
Functions | |
double | dot_product (const Tensor< double > &a, const Tensor< double > &b) |
template<typename T > | |
Tensor< T > | KAIN (const Tensor< T > &Q) |
Solves the KAIN equations for coefficients to compute the next vector. More... | |
int | main () |
Tensor< double > | op (const Tensor< double > &x) |
Solves the KAIN equations for coefficients to compute the next vector.
/// Q(i,j) = <xi|fj> /// A(i,j) = <xi-xm | fj-fm> = Q(i,j) - Q(m,j) - Q(i,m) + Q(m,m) /// b(i,j) =-<xi-xm | fm> = -Q(i,m) + Q(m,m) /// A c = b /// /// . Correction to vector m /// . interior = sum(i<m)[ c(i)*(x(i)-x(m)) ] = sum(i<m)[c(i)*x(i)] - x[m]*sum(i<m)[c(i)] /// . exterior = -f(m) - sum(i<m)[ c(i)*(f(i)-f(m)) ] = -f(m) - sum(i<m)[c(i)*f(i)] + f(m)*sum(i<m)[c(i)] /// . New vector /// . define C = sum(i<m)(c(i)) (note less than) /// . define c(m) = 1.0 - C /// . xnew = sum(i<=m) [ c(i)*(x(i) - f(i)) ] ///
References A(), b, c, e(), madness::gelss(), L, m, madness::print(), Q(), and T().
Referenced by Subspace::update_subspace().
int main | ( | void | ) |
References madness::BaseTensor::dim(), and madness::f.
Referenced by madness::ConvolutionND< Q, NDIM >::ConvolutionND(), MatrixOperator::add_operator(), madness::WorldGopInterface::all_reduce(), SafeMPI::Intracomm::Allreduce(), madness::SeparatedConvolution< Q, NDIM >::apply(), madness::CCPairFunction< T, NDIM >::apply(), PointGroup::apply(), madness::FunctionImpl< T, NDIM >::apply(), Fcwf::apply(), apply(), madness::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::apply_1d_realspace_push(), madness::FunctionImpl< T, NDIM >::apply_1d_realspace_push(), madness::FunctionImpl< T, NDIM >::apply_1d_realspace_push_op(), apply_BSH(), apply_BSH_new(), madness::apply_only(), apply_periodic_bsh(), apply_potential(), madness::FunctionImpl< T, NDIM >::apply_source_driven(), madness::XCOperator< T, NDIM >::apply_xc_kernel(), madness::binary_op(), madness::FunctionImpl< T, NDIM >::binaryXX(), madness::FunctionImpl< T, NDIM >::binaryXXa(), madness::HartreeFock< T, NDIM >::calculate_coulomb_energy(), madness::HartreeFock< T, NDIM >::calculate_exchange_energy(), madness::DFT< T, NDIM >::calculate_tot_coulomb_energy(), madness::DFT< T, NDIM >::calculate_tot_pe_sp(), PointGroup::cart_ir(), madness::CCPairFunction< T, NDIM >::collect_same_types(), madness::OEP::compute_dcep_correction(), compute_energy(), madness::F12Potentials::compute_ijab_integrals(), madness::OEP::compute_mrks_correction(), madness::OEP::compute_ocep_correction(), madness::OEP::compute_slater_potential(), madness::F12Potentials::compute_xyab_integrals(), madness::conditional_conj(), converge(), converge2s(), madness::Pairs< T >::convert(), PointGroup::ctable(), DF::diagonalize(), madness::CCPairFunction< T, NDIM >::dirac_convolution(), madness::CCPairFunction< T, NDIM >::dirac_convolution_decomposed(), madness::FunctionImpl< T, NDIM >::do_apply(), madness::FunctionImpl< T, NDIM >::do_apply_directed_screening(), madness::FunctionImpl< T, NDIM >::do_apply_kernel(), madness::FunctionImpl< T, NDIM >::do_apply_kernel2(), madness::FunctionImpl< T, NDIM >::do_apply_kernel3(), madness::FunctionImpl< T, NDIM >::do_binary_op(), madness::Function< T, NDIM >::do_hartree_product(), doit(), GygiPot::ESP(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), DF::exchange(), madness::Function< T, NDIM >::fill_cuspy_tree(), madness::Function< T, NDIM >::fill_nuclear_cuspy_tree(), madness::Function< T, NDIM >::fill_tree(), madness::Molecule::find_symmetry_equivalent_atom(), madness::FunctionImpl< T, NDIM >::flo_unary_op_node_inplace(), madness::WorldTaskQueue::for_each(), madness::foreach_child(), Key::foreach_child(), madness::FunctionFactory< T, NDIM >::functor(), madness::smooth< T, NDIM >::gaussian_smoothing(), madness::cblas::gemm(), madness::cblas::gemv(), PointGroup::get_op_name(), madness::SeparatedConvolution< Q, NDIM >::getmuop(), madness::SeparatedConvolution< Q, NDIM >::getmuop_modified(), madness::SeparatedConvolution< Q, NDIM >::getop_modified(), madness::SeparatedConvolution< Q, NDIM >::getop_ns(), madness::GMRES(), GygiPot::GuessPotential(), madness::hartree_product(), madness::Fock< T, NDIM >::info(), madness::Solver< T, NDIM >::initial_guess(), madness::CCPairFunction< T, NDIM >::inner_internal(), PointGroup::ircell(), DF::iterate(), iterate(), iterate_excite(), iterate_ground(), madness::WorldGopInterface::lazy_sync(), madness::WorldGopInterface::lazy_sync_children(), madness::WorldGopInterface::lazy_sync_internal(), madness::archive::ArchiveLoadImpl< ParallelInputArchive< archiveT >, CCPairFunction< T, NDIM > >::load(), main(), MiniDFT::make_coulomb_potential(), make_coulomb_potential(), DF::make_fermi_potential(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), madness::CCPairFunction< T, NDIM >::make_xy_u(), madness::EigSolver< T, NDIM >::matrix_element(), madness::EigSolver< T, NDIM >::multi_solve(), madness::multi_to_multi_op_values(), madness::Function< T, NDIM >::multi_to_multi_op_values(), madness::FunctionImpl< T, NDIM >::multi_to_multi_op_values(), madness::FunctionImpl< T, NDIM >::multi_to_multi_op_values_doit(), madness::Function< T, NDIM >::multiop_values(), madness::multiop_values(), madness::FunctionImpl< T, NDIM >::multiop_values(), madness::FunctionImpl< T, NDIM >::multiop_values_doit(), madness::CCPairFunction< T, NDIM >::multiply_with_op_inplace(), newK(), SafeMPI::Op_free(), madness::CCConvolutionOperator< T, NDIM >::operator()(), BinaryOp< resultT, L, R, opT, NDIM >::operator()(), madness::XCOperator< T, NDIM >::logme::operator()(), madness::XCOperator< T, NDIM >::expme::operator()(), MicroTask::operator()(), MatrixOperator::operator()(), madness::Fock< T, NDIM >::operator()(), madness::CCPairFunction< T, NDIM >::operator*(), operator<<(), PointGroup::operator=(), SurfaceMoleculeInteraction::perturbed_molecular_pot(), madness::plot_line(), madness::plot_plane(), madness::EigSolver< T, NDIM >::prepare_ops(), MatrixOperator::print(), madness::GFit< T, NDIM >::print_accuracy(), madness::projector_irrep::print_character_table(), madness::EigSolver< T, NDIM >::print_matrix_elements(), madness::FunctionImpl< T, NDIM >::print_plane_local(), madness::CCPairFunction< T, NDIM >::project_out_op_decomposed(), madness::WorldTaskQueue::reduce(), SafeMPI::Intracomm::Reduce(), madness::WorldGopInterface::reduce(), madness::WorldGopInterface::reduce_internal(), madness::WorldGopInterface::reduce_result_task(), madness::WorldGopInterface::reduce_task(), madness::FunctionImpl< T, NDIM >::refine(), madness::Function< T, NDIM >::refine_general(), madness::FunctionImpl< T, NDIM >::refine_op(), madness::FunctionImpl< T, NDIM >::refine_spawn(), madness::CCPairFunction< T, NDIM >::reset_operator(), madness::DQueue< T >::scan(), madness::ThreadPool::scan(), madness::WorldAmInterface::send(), madness::ConvolutionND< Q, NDIM >::setop(), SVPESolver::solve(), madness::EigSolver< T, NDIM >::solve(), DF::solve_occupied(), madness::WorldTaskQueue::sum(), madness::Molecule::symmetrize_for_op(), test(), madness::smooth< T, NDIM >::test_1d(), test_adaptive_tree(), test_apply(), test_apply_push_1d(), test_asymmetric(), test_bsh(), test_combined_operators(), test_compress(), test_constructor(), test_coulomb(), madness::Molecule::test_for_op(), test_gconv(), test_he_potential(), test_hermiticity(), test_hf_be(), test_hf_he(), test_modified(), test_multi_to_multi_op(), test_op(), test_opdir(), test_per(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), test_recursive_application(), test_smooth_maxout(), testbsh(), testNavierStokes(), testPeriodicCoulomb3d(), madness::unary_op(), madness::FunctionImpl< T, NDIM >::unary_op_coeff_inplace(), madness::Function< T, NDIM >::unary_op_coeffs(), madness::unary_op_coeffs(), madness::FunctionImpl< T, NDIM >::unary_op_node_inplace(), madness::FunctionImpl< T, NDIM >::unary_op_value_inplace(), madness::Function< T, NDIM >::unaryop(), madness::Tensor< T >::unaryop(), madness::Function< T, NDIM >::unaryop_coeff(), madness::Function< T, NDIM >::unaryop_node(), madness::FunctionImpl< T, NDIM >::unaryXX(), madness::FunctionImpl< T, NDIM >::unaryXXa(), madness::FunctionImpl< T, NDIM >::unaryXXvalues(), and madness::CCConvolutionOperator< T, NDIM >::update_elements().