svMultiPhysics
Loading...
Searching...
No Matches
LineSearchParameters Class Reference

Parameters of the line search shortening the increments of the nonlinear iterations of an equation. More...

#include <Parameters.h>

Inheritance diagram for LineSearchParameters:
[legend]

Public Member Functions

bool defined () const
void set_values (tinyxml2::XMLElement *xml_elem)
void print_parameters ()
Public Member Functions inherited from ParameterLists
void set_xml_element_name (const std::string &name)
void set_parameter (const std::string &name, const bool value, bool required, Parameter< bool > &param)
 Set the name, default value and the parameter required flag.
void set_parameter (const std::string &name, const double value, bool required, Parameter< double > &param)
void set_parameter (const std::string &name, std::initializer_list< double > value, bool required, VectorParameter< double > &param)
void set_parameter (const std::string &name, std::initializer_list< int > value, bool required, VectorParameter< int > &param)
void set_parameter (const std::string &name, std::initializer_list< std::string > value, bool required, VectorParameter< std::string > &param)
void set_parameter (const std::string &name, const int value, bool required, Parameter< int > &param, std::vector< int > range={})
void set_parameter (const std::string &name, const std::string &value, bool required, Parameter< std::string > &param)
void set_parameter_value_CANN (const std::string &name, const std::string &value)
 set_parameter function to handle CANNRow
void set_parameter_value (const std::string &name, const std::string &value)
 Set the value of a paramter from a string.
void check_required ()
 Check if any required parameters have not been set.
std::map< std::string, std::string > get_parameter_list () const
 Get the defined parameters as a map of strings.
void print_parameter_list ()
 Print the parameters.

Public Attributes

Parameter< double > minimum_decrease
 Decrease of the residual norm that a step length must achieve to be accepted, as a fraction of the norm it starts from per unit step length. Any value small enough accepts every step that decreases the residual.
Parameter< double > step_reduction_factor
 Factor by which a rejected step length is multiplied.
Parameter< double > minimum_step_length
 Shortest step length that is tried. It is applied without being measured, since there is no shorter one to fall back on.
Parameter< bool > verbose
 Report the step lengths that are rejected and accepted.
bool value_set = false
Public Attributes inherited from ParameterLists
std::map< std::string, std::variant< Parameter< bool > *, Parameter< double > *, Parameter< int > *, Parameter< std::string > *, VectorParameter< double > *, VectorParameter< int > *, VectorParameter< std::string > * > > params_map
 Map used for storing parameters by name / Parameter template union.
std::string xml_element_name = ""

Static Public Attributes

static const std::string xml_element_name_

Detailed Description

Parameters of the line search shortening the increments of the nonlinear iterations of an equation.

The line search is enabled by the presence of the XML element and disabled by its absence.

XML element:

<Line_search>
<Minimum_decrease> 1.0e-4 </Minimum_decrease>
<Step_reduction_factor> 0.5 </Step_reduction_factor>
<Minimum_step_length> 0.015625 </Minimum_step_length>
<Verbose> false </Verbose>
</Line_search>

Member Data Documentation

◆ minimum_decrease

Parameter<double> LineSearchParameters::minimum_decrease

Decrease of the residual norm that a step length must achieve to be accepted, as a fraction of the norm it starts from per unit step length. Any value small enough accepts every step that decreases the residual.

◆ minimum_step_length

Parameter<double> LineSearchParameters::minimum_step_length

Shortest step length that is tried. It is applied without being measured, since there is no shorter one to fall back on.

◆ step_reduction_factor

Parameter<double> LineSearchParameters::step_reduction_factor

Factor by which a rejected step length is multiplied.

◆ verbose

Parameter<bool> LineSearchParameters::verbose

Report the step lengths that are rejected and accepted.

◆ xml_element_name_

const std::string LineSearchParameters::xml_element_name_
static
Initial value:
=
"Line_search_experimental"

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