|
ug4
|
standard implementation of the line search based on the "sufficient descent" More...
#include <line_search.h>
Inheritance diagram for ug::StandardLineSearch< TVector >:Public Types | |
| typedef TVector | vector_type |
Public Types inherited from ug::ILineSearch< TVector > | |
| typedef TVector | vector_type |
Public Member Functions | |
| virtual std::string | config_string () const |
| returns information about configuration parameters | |
| virtual bool | createNewtonUpdater () |
| virtual bool | search (SmartPtr< IOperator< vector_type > > spOp, vector_type &u, vector_type &p, vector_type &d, number defect) |
| void | set_accept_best (bool bAcceptBest) |
| sets iff after max_steps the best try is used | |
| void | set_check_all (bool bCheckAll) |
| sets iff all the max_steps line search steps must be tested even if the sufficient descent is achieved | |
| void | set_lambda_start (number start) |
| sets start factor | |
| void | set_maximum_defect (number maxDef) |
| sets maximum allowed norm of the defect (an exception is thrown if this value if exceeded) | |
| void | set_maximum_steps (int steps) |
| sets maximum number of line search steps | |
| virtual void | set_offset (std::string offset) |
| set string to be printed before each output of line search | |
| void | set_reduce_factor (number factor) |
| sets factor by which line search factor is multiplied in each step | |
| void | set_suff_descent_factor (number factor) |
| sets the factor controlling the sufficient descent | |
| void | set_verbose (bool level) |
| sets if info should be printed | |
| virtual void | setNewtonUpdater (SmartPtr< NewtonUpdaterGeneric< TVector > > nU) |
| StandardLineSearch () | |
| default constructor (setting default values) | |
| StandardLineSearch (int maxSteps, number lambdaStart, number lambdaReduce, bool bAcceptBest) | |
| constructor | |
| StandardLineSearch (int maxSteps, number lambdaStart, number lambdaReduce, bool bAcceptBest, bool bCheckAll) | |
| constructor | |
Public Member Functions inherited from ug::ILineSearch< TVector > | |
| virtual | ~ILineSearch () |
| virtual destructor | |
Protected Attributes | |
| number | m_alpha |
| sufficient descent factor | |
| bool | m_bAcceptBest |
| accept best | |
| bool | m_bCheckAll |
| check all | |
| number | m_lambdaReduce |
| reduction factor for the step length | |
| number | m_lambdaStart |
| initial step length scaling | |
| number | m_maxDefect |
| maximum allowed defect | |
| int | m_maxSteps |
| maximum number of steps to be performed | |
| std::string | m_offset |
| number of spaces inserted before output | |
| bool | m_verbose |
| verbosity level | |
| vector_type | s |
| solution in line direction | |
Private Attributes | |
| SmartPtr< NewtonUpdaterGeneric< TVector > > | m_newtonUpdater |
standard implementation of the line search based on the "sufficient descent"
| typedef TVector ug::StandardLineSearch< TVector >::vector_type |
|
inline |
default constructor (setting default values)
|
inline |
constructor
|
inline |
constructor
|
inlinevirtual |
returns information about configuration parameters
Implements ug::ILineSearch< TVector >.
References ug::StandardLineSearch< TVector >::m_bAcceptBest, ug::StandardLineSearch< TVector >::m_bCheckAll, ug::StandardLineSearch< TVector >::m_lambdaReduce, ug::StandardLineSearch< TVector >::m_lambdaStart, and ug::StandardLineSearch< TVector >::m_maxSteps.
|
inlinevirtual |
Implements ug::ILineSearch< TVector >.
References ug::StandardLineSearch< TVector >::m_newtonUpdater, and SPNULL.
|
inlinevirtual |
Performs a line search to a given direction.
| [in] | Op | Non-linear operator |
| [in] | u | current solution |
| [in] | p | search direction |
| [in,out] | d | defect |
| [in] | defect | norm of current defect |
Implements ug::ILineSearch< TVector >.
References ug::StandardLineSearch< TVector >::m_alpha, ug::StandardLineSearch< TVector >::m_bAcceptBest, ug::StandardLineSearch< TVector >::m_bCheckAll, ug::StandardLineSearch< TVector >::m_lambdaReduce, ug::StandardLineSearch< TVector >::m_lambdaStart, ug::StandardLineSearch< TVector >::m_maxDefect, ug::StandardLineSearch< TVector >::m_maxSteps, ug::StandardLineSearch< TVector >::m_newtonUpdater, ug::StandardLineSearch< TVector >::m_offset, ug::StandardLineSearch< TVector >::m_verbose, p, PROFILE_BEGIN_GROUP, ug::StandardLineSearch< TVector >::s, SPNULL, UG_LOG, and ug::VecScaleAdd().
|
inline |
sets iff after max_steps the best try is used
References ug::StandardLineSearch< TVector >::m_bAcceptBest.
|
inline |
sets iff all the max_steps line search steps must be tested even if the sufficient descent is achieved
References ug::StandardLineSearch< TVector >::m_bCheckAll.
|
inline |
sets start factor
References ug::StandardLineSearch< TVector >::m_lambdaStart.
|
inline |
sets maximum allowed norm of the defect (an exception is thrown if this value if exceeded)
References ug::StandardLineSearch< TVector >::m_maxDefect.
|
inline |
sets maximum number of line search steps
References ug::StandardLineSearch< TVector >::m_maxSteps.
|
inlinevirtual |
set string to be printed before each output of line search
Implements ug::ILineSearch< TVector >.
References ug::StandardLineSearch< TVector >::m_offset.
|
inline |
sets factor by which line search factor is multiplied in each step
References ug::StandardLineSearch< TVector >::m_lambdaReduce.
|
inline |
sets the factor controlling the sufficient descent
References ug::StandardLineSearch< TVector >::m_alpha.
|
inline |
sets if info should be printed
References ug::StandardLineSearch< TVector >::m_verbose.
|
inlinevirtual |
Implements ug::ILineSearch< TVector >.
References ug::StandardLineSearch< TVector >::m_newtonUpdater.
|
protected |
sufficient descent factor
Referenced by ug::StandardLineSearch< TVector >::search(), and ug::StandardLineSearch< TVector >::set_suff_descent_factor().
|
protected |
|
protected |
|
protected |
reduction factor for the step length
Referenced by ug::StandardLineSearch< TVector >::config_string(), ug::StandardLineSearch< TVector >::search(), and ug::StandardLineSearch< TVector >::set_reduce_factor().
|
protected |
initial step length scaling
Referenced by ug::StandardLineSearch< TVector >::config_string(), ug::StandardLineSearch< TVector >::search(), and ug::StandardLineSearch< TVector >::set_lambda_start().
|
protected |
maximum allowed defect
Referenced by ug::StandardLineSearch< TVector >::search(), and ug::StandardLineSearch< TVector >::set_maximum_defect().
|
protected |
maximum number of steps to be performed
Referenced by ug::StandardLineSearch< TVector >::config_string(), ug::StandardLineSearch< TVector >::search(), and ug::StandardLineSearch< TVector >::set_maximum_steps().
|
private |
|
protected |
number of spaces inserted before output
Referenced by ug::StandardLineSearch< TVector >::search(), and ug::StandardLineSearch< TVector >::set_offset().
|
protected |
verbosity level
Referenced by ug::StandardLineSearch< TVector >::search(), and ug::StandardLineSearch< TVector >::set_verbose().
|
protected |
solution in line direction
Referenced by ug::StandardLineSearch< TVector >::search().