MADNESS  version 0.9
Public Member Functions | List of all members
madness::kain_solver_helper_struct Struct Reference

The structure needed if the kain solver shall be used. More...

#include <TDA.h>

Public Member Functions

 kain_solver_helper_struct ()
 
void sanity_check (const xfunctionsT &xfunctions) const
 
void initialize (World &world, const size_t excitations, const size_t nnoct, const bool kain)
 
void update (xfunctionsT &xfunctions)
 
void transform_subspace (World &world, const madness::Tensor< double > U)
 
void reduce_subspace (const size_t i)
 
void erase_subspace (const size_t i)
 
void increase_subspace (World &world, const xfunctionsT &xfunctions)
 
std::vector< vecfuncTtransform_vecfunctions (World &world, const std::vector< vecfuncT > &xfunctions, const madness::Tensor< double > U) const
 

Detailed Description

The structure needed if the kain solver shall be used.

Constructor & Destructor Documentation

madness::kain_solver_helper_struct::kain_solver_helper_struct ( )
inline

Member Function Documentation

void madness::kain_solver_helper_struct::erase_subspace ( const size_t  i)
inline

Only erase the subspace, not delete the solver use this if you replace xfunctions

Parameters
[in]ithe number of the solver/xfunction which subspace should be erased

References MADNESS_EXCEPTION.

void madness::kain_solver_helper_struct::increase_subspace ( World world,
const xfunctionsT xfunctions 
)
inline

increase the subspace: adding new solvers use this if you add new xfunctions

Parameters
[in]worldthe world
[in]xfunctionsthe current xfunctions (which have been extended)

References sanity_check(), and madness::XNonlinearSolver< T, C, Alloc >::set_maxsub().

Referenced by madness::TDA::solve().

void madness::kain_solver_helper_struct::initialize ( World world,
const size_t  excitations,
const size_t  nnoct,
const bool  kain 
)
inline

Initialize the kain solver helper structure

Parameters
[in]worldthe world
[in]excitationsthe number of excitations planned to calculate
[in]nnoctthe number of occupied (non frozen) orbitals = the number of response orbitals
[in]kaintrue if kain should be used, false if not (when false it is just the default initialization)
[in]allatonceshould all xfunctions be solved ad once or not (currently: not)
[in]guess_iter_number of guess iterations (not needed anymore)

References madness::XNonlinearSolver< T, C, Alloc >::set_maxsub().

Referenced by madness::TDA::setup().

void madness::kain_solver_helper_struct::reduce_subspace ( const size_t  i)
inline

reduce the subspace: delete whole solvers Use this if you delete xfunctions

Parameters
[in]ithe number of the xfunction that was deleted
void madness::kain_solver_helper_struct::sanity_check ( const xfunctionsT xfunctions) const
inline

Check if everything is fine within the kain solver (use this when adding or deleting xfunctions)

Parameters
[in]xfunctions,thexfunctions of the current iteration

References MADNESS_EXCEPTION.

Referenced by increase_subspace(), and madness::TDA::solve().

void madness::kain_solver_helper_struct::transform_subspace ( World world,
const madness::Tensor< double >  U 
)
inline

Transform the Kain subspace(s)

Parameters
[in]worldthe world
[in]UThe transformation matrix

References k, and transform_vecfunctions().

std::vector<vecfuncT> madness::kain_solver_helper_struct::transform_vecfunctions ( World world,
const std::vector< vecfuncT > &  xfunctions,
const madness::Tensor< double >  U 
) const
inline

Helper function for the transform_subspace function of the structure

Parameters
[in]worldthe world
[in]xfunctionsa vector of vectorfunctions
[in]Uthe transformation matrix
[out]U*xfunctions: the transformed vector of vectorfunctions

References madness::compress(), madness::gaxpy(), and madness::World::size().

Referenced by transform_subspace().

void madness::kain_solver_helper_struct::update ( xfunctionsT xfunctions)
inline

Update the current response orbitals x of the xfunctions structures

Parameters
[in]xfunctionsa vector if xfunctions structures of the current iteration (each xfunction should contain the x and curren_residuals)

References k, MADNESS_EXCEPTION, madness::sub(), and madness::xfunction::x.


The documentation for this struct was generated from the following file: