MADNESS  version 0.9
Functions
kain.cc File Reference
#include <iostream>
#include <madness/tensor/tensor.h>
#include <madness/tensor/tensor_lapack.h>
#include <madness/world/print.h>
Include dependency graph for kain.cc:

Functions

template<typename T >
Tensor< T > KAIN (const Tensor< T > &Q)
 Solves the KAIN equations for coefficients to compute the next vector. More...
 
Tensor< double > op (const Tensor< double > &x)
 
double dot_product (const Tensor< double > &a, const Tensor< double > &b)
 
int main ()
 

Function Documentation

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.

///   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 b(), c, madness::gelss(), L, m, madness::print(), and std::tr1::T().

int main ( )
Tensor<double> op ( const Tensor< double > &  x)

References madness::f.

Referenced by madness::WorldGopInterface::all_reduce(), madness::apply(), madness::FunctionImpl< Q, NDIM >::apply_1d_realspace_push_op(), madness::binary_op(), madness::FunctionImpl< Q, NDIM >::binaryXXa(), madness::bind_nullary_mem_fun(), 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(), compute_energy(), madness::conditional_conj(), converge(), converge2s(), madness::ConvolutionND< Q, NDIM >::ConvolutionND(), PointGroup::ctable(), madness::FunctionImpl< Q, NDIM >::do_binary_op(), madness::Function< double, 6 >::do_hartree_product(), doit(), madness::WorldTaskQueue::for_each(), madness::foreach_child(), madness::FunctionFactory< double, 6 >::functor2(), madness::cblas::gemm(), madness::cblas::gemv(), PointGroup::get_op_name(), madness::hartree_product(), madness::Solver< T, NDIM >::initial_guess(), PointGroup::ircell(), iterate(), iterate_excite(), iterate_ground(), madness::WorldGopInterface::lazy_sync(), main(), SVPEColloidSolver::make_electric_field(), madness::EigSolver< T, NDIM >::matrix_element(), madness::EigSolver< T, NDIM >::multi_solve(), madness::FunctionImpl< Q, NDIM >::multiop_values_doit(), operator<<(), PointGroup::operator=(), madness::EigSolver< T, NDIM >::prepare_ops(), madness::EigSolver< T, NDIM >::print_matrix_elements(), madness::FunctionImpl< T, NDIM >::print_plane_local(), madness::WorldTaskQueue::reduce(), madness::WorldGopInterface::reduce(), madness::FunctionImpl< Q, NDIM >::refine(), madness::FunctionImpl< Q, NDIM >::refine_op(), madness::FunctionImpl< Q, NDIM >::refine_spawn(), madness::DQueue< madness::PoolTaskInterface * >::scan(), ScreenSolventPotential::ScreenReactionPotential(), madness::ConvolutionND< Q, NDIM >::setop(), SVPEColloidSolver::solve(), madness::EigSolver< T, NDIM >::solve(), SVPEColloidSolver::solve_Laplace(), test(), test_adaptive_tree(), test_compress(), test_modified(), test_recursive_application(), testbsh(), testNavierStokes(), madness::unary_op(), madness::FunctionImpl< Q, NDIM >::unary_op_coeff_inplace(), madness::Function< double, 6 >::unary_op_coeffs(), madness::FunctionImpl< Q, NDIM >::unary_op_node_inplace(), and madness::FunctionImpl< Q, NDIM >::unaryXXa().