MADNESS 0.10.1
Public Member Functions | Public Attributes | Private Attributes | List of all members
madness::NonlinearSolverND< NDIM > Class Template Reference

A simple Krylov-subspace nonlinear equation solver. More...

#include <nonlinsol.h>

Collaboration diagram for madness::NonlinearSolverND< NDIM >:
Collaboration graph
[legend]

Public Member Functions

 NonlinearSolverND (unsigned int maxsub=10)
 
unsigned int get_maxsub () const
 
void set_maxsub (const unsigned int &new_maxsub)
 
Function< double, NDIMupdate (const Function< double, NDIM > &u, const Function< double, NDIM > &r, const double rcondtol=1e-8, const double cabsmax=1000.0)
 Computes next trial solution vector.
 

Public Attributes

bool do_print
 

Private Attributes

unsigned int maxsub
 Maximum size of subspace dimension.
 
real_tensor Q
 
std::vector< Function< double, NDIM > > rlist
 
std::vector< Function< double, NDIM > > ulist
 

Detailed Description

template<size_t NDIM>
class madness::NonlinearSolverND< NDIM >

A simple Krylov-subspace nonlinear equation solver.

Constructor & Destructor Documentation

◆ NonlinearSolverND()

template<size_t NDIM>
madness::NonlinearSolverND< NDIM >::NonlinearSolverND ( unsigned int  maxsub = 10)
inline

Member Function Documentation

◆ get_maxsub()

template<size_t NDIM>
unsigned int madness::NonlinearSolverND< NDIM >::get_maxsub ( ) const
inline

◆ set_maxsub()

template<size_t NDIM>
void madness::NonlinearSolverND< NDIM >::set_maxsub ( const unsigned int &  new_maxsub)
inline

◆ update()

template<size_t NDIM>
Function< double, NDIM > madness::NonlinearSolverND< NDIM >::update ( const Function< double, NDIM > &  u,
const Function< double, NDIM > &  r,
const double  rcondtol = 1e-8,
const double  cabsmax = 1000.0 
)
inline

Computes next trial solution vector.

You are responsible for performing step restriction or line search (not necessary for linear problems).

Parameters
uCurrent solution vector
rCorresponding residual
Returns
Next trial solution vector
Parameters
[in]rcondtolrcond less than this will cause the subspace to be shrunk due to linear dependence
[in]cabsmaxmaximum element of c greater than this will cause the subspace to be shrunk due to linear dependence

References c, madness::check_linear_dependence(), madness::Function< T, NDIM >::compress(), madness::copy(), madness::NonlinearSolverND< NDIM >::do_print, madness::Function< T, NDIM >::gaxpy(), madness::inner(), madness::KAIN(), madness::NonlinearSolverND< NDIM >::maxsub, madness::print(), madness::NonlinearSolverND< NDIM >::Q, madness::NonlinearSolverND< NDIM >::rlist, madness::Function< T, NDIM >::size(), madness::Function< T, NDIM >::truncate(), u(), and madness::NonlinearSolverND< NDIM >::ulist.

Referenced by madness::CC2::iterate_pair(), and madness::MP2::solve_residual_equations().

Member Data Documentation

◆ do_print

template<size_t NDIM>
bool madness::NonlinearSolverND< NDIM >::do_print

◆ maxsub

template<size_t NDIM>
unsigned int madness::NonlinearSolverND< NDIM >::maxsub
private

◆ Q

template<size_t NDIM>
real_tensor madness::NonlinearSolverND< NDIM >::Q
private

◆ rlist

template<size_t NDIM>
std::vector<Function<double,NDIM> > madness::NonlinearSolverND< NDIM >::rlist
private

◆ ulist

template<size_t NDIM>
std::vector<Function<double,NDIM> > madness::NonlinearSolverND< NDIM >::ulist
private

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