ug4
|
#include <convergence_check.h>
Public Member Functions | |
number | avg_rate () const |
virtual SmartPtr< IConvergenceCheck< TVector > > | clone () |
clone the object More... | |
virtual std::string | config_string () const |
returns information about configuration parameters More... | |
number | defect () const |
returns the current defect More... | |
number | get_defect (size_t i) const |
const std::vector< number > | get_defects () const |
int | get_offset () const |
get the current offset More... | |
bool | iteration_ended () |
bool | post () |
number | previous_defect () const |
void | print_line (std::string line) |
prints a line More... | |
number | rate () const |
number | reduction () const |
void | set_info (std::string info) |
sets info string More... | |
void | set_maximum_steps (int maxSteps) |
void | set_minimum_defect (number minDefect) |
void | set_name (std::string name) |
sets the name of the iteration More... | |
void | set_offset (int offset) |
sets the number of spaces printed before output information More... | |
void | set_reduction (number relReduction) |
void | set_supress_unsuccessful (bool bsupress) |
void | set_symbol (char symbol) |
sets the symbol used for output More... | |
void | set_verbose (bool level) |
void | start (const TVector &d) |
computes the start defect and set it More... | |
void | start_defect (number initialDefect) |
sets the given start defect More... | |
StdConvCheck () | |
StdConvCheck (int maxSteps, number minDefect, number relReduction) | |
StdConvCheck (int maxSteps, number minDefect, number relReduction, bool verbose) | |
StdConvCheck (int maxSteps, number minDefect, number relReduction, bool verbose, bool suppressUnsuccessful) | |
int | step () const |
returns the current number of steps More... | |
void | update (const TVector &d) |
computes the defect and sets it a the next defect value More... | |
void | update_defect (number newDefect) |
sets the update for the current defect More... | |
Public Member Functions inherited from ug::IConvergenceCheck< TVector > | |
virtual | ~IConvergenceCheck () |
virtual destructor More... | |
Protected Member Functions | |
bool | is_valid_number (number value) |
void | print_offset () |
Protected Attributes | |
number | m_currentDefect |
int | m_currentStep |
std::string | m_info |
number | m_initialDefect |
number | m_lastDefect |
int | m_maxSteps |
number | m_minDefect |
std::string | m_name |
int | m_offset |
number | m_ratesProduct |
number | m_relReduction |
bool | m_supress_unsuccessful |
char | m_symbol |
bool | m_verbose |
Private Attributes | |
std::vector< number > | _defects |
This is a standard implementation of the convergence check. The function_type must provide the following function:
ug::StdConvCheck< TVector >::StdConvCheck |
ug::StdConvCheck< TVector >::StdConvCheck | ( | int | maxSteps, |
number | minDefect, | ||
number | relReduction | ||
) |
ug::StdConvCheck< TVector >::StdConvCheck | ( | int | maxSteps, |
number | minDefect, | ||
number | relReduction, | ||
bool | verbose | ||
) |
ug::StdConvCheck< TVector >::StdConvCheck | ( | int | maxSteps, |
number | minDefect, | ||
number | relReduction, | ||
bool | verbose, | ||
bool | suppressUnsuccessful | ||
) |
|
inlinevirtual |
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_ratesProduct, and ug::StdConvCheck< TVector >::step().
|
inlinevirtual |
clone the object
Implements ug::IConvergenceCheck< TVector >.
Reimplemented in ug::EnergyConvCheck< TVector >.
|
inlinevirtual |
returns information about configuration parameters
this should return necessary information about parameters and possibly calling config_string of subcomponents.
Implements ug::IConvergenceCheck< TVector >.
Reimplemented in ug::EnergyConvCheck< TVector >.
References ug::StdConvCheck< TVector >::m_maxSteps, ug::StdConvCheck< TVector >::m_minDefect, and ug::StdConvCheck< TVector >::m_relReduction.
|
inlinevirtual |
returns the current defect
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_currentDefect.
|
inline |
References ug::StdConvCheck< TVector >::_defects.
|
inline |
References ug::StdConvCheck< TVector >::_defects.
Referenced by ug::vrl::getDefects().
|
inlinevirtual |
get the current offset
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_offset.
|
protected |
|
virtual |
iteration_ended
Checks if the iteration must be ended. This can be due to convergence or divergence.
Implements ug::IConvergenceCheck< TVector >.
|
virtual |
post
post-processes the iteration. Some informative outputs of the status of the iteration after finishing the iteration can be placed here
Implements ug::IConvergenceCheck< TVector >.
References ug::repeat(), and UG_LOG.
|
inline |
References ug::StdConvCheck< TVector >::m_lastDefect.
|
virtual |
|
protected |
References ug::repeat(), and UG_LOG.
|
inlinevirtual |
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_currentDefect, and ug::StdConvCheck< TVector >::m_lastDefect.
|
inlinevirtual |
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_currentDefect, and ug::StdConvCheck< TVector >::m_initialDefect.
|
inlinevirtual |
sets info string
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_info.
|
inline |
References ug::StdConvCheck< TVector >::m_maxSteps.
|
inline |
References ug::StdConvCheck< TVector >::m_minDefect.
|
inlinevirtual |
sets the name of the iteration
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_name, and name.
|
inlinevirtual |
sets the number of spaces printed before output information
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_offset.
|
inline |
References ug::StdConvCheck< TVector >::m_relReduction.
|
inline |
|
inlinevirtual |
sets the symbol used for output
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_symbol.
|
inline |
References ug::StdConvCheck< TVector >::m_verbose.
|
virtual |
computes the start defect and set it
Implements ug::IConvergenceCheck< TVector >.
Reimplemented in ug::EnergyConvCheck< TVector >.
|
virtual |
sets the given start defect
Implements ug::IConvergenceCheck< TVector >.
References ug::repeat(), and UG_LOG.
Referenced by ug::EnergyConvCheck< TVector >::start().
|
inlinevirtual |
returns the current number of steps
Implements ug::IConvergenceCheck< TVector >.
References ug::StdConvCheck< TVector >::m_currentStep.
Referenced by ug::StdConvCheck< TVector >::avg_rate().
|
virtual |
computes the defect and sets it a the next defect value
Implements ug::IConvergenceCheck< TVector >.
Reimplemented in ug::EnergyConvCheck< TVector >.
|
virtual |
sets the update for the current defect
Implements ug::IConvergenceCheck< TVector >.
References UG_LOG.
Referenced by ug::EnergyConvCheck< TVector >::update().
|
private |
Referenced by ug::StdConvCheck< TVector >::get_defect(), and ug::StdConvCheck< TVector >::get_defects().
|
protected |
|
protected |
Referenced by ug::StdConvCheck< TVector >::step().
|
protected |
Referenced by ug::StdConvCheck< TVector >::set_info().
|
protected |
Referenced by ug::StdConvCheck< TVector >::reduction().
|
protected |
Referenced by ug::StdConvCheck< TVector >::previous_defect(), and ug::StdConvCheck< TVector >::rate().
|
protected |
|
protected |
|
protected |
Referenced by ug::StdConvCheck< TVector >::set_name().
|
protected |
Referenced by ug::StdConvCheck< TVector >::get_offset(), and ug::StdConvCheck< TVector >::set_offset().
|
protected |
Referenced by ug::StdConvCheck< TVector >::avg_rate().
|
protected |
|
protected |
Referenced by ug::StdConvCheck< TVector >::set_supress_unsuccessful().
|
protected |
Referenced by ug::StdConvCheck< TVector >::set_symbol().
|
protected |
Referenced by ug::StdConvCheck< TVector >::set_verbose().