37 #ifndef __H__LIB_ALGEBRA__OPERATOR__CONVERGENCE_CHECK__
38 #define __H__LIB_ALGEBRA__OPERATOR__CONVERGENCE_CHECK__
70 template <
typename TVector>
78 virtual void start(
const TVector& d) = 0;
84 virtual void update(
const TVector& d) = 0;
177 template <
typename TVector>
195 void start(
const TVector& d);
199 void update(
const TVector& d);
207 std::stringstream ss;
location name
Definition: checkpoint_util.lua:128
location verbose
Definition: checkpoint_util.lua:128
Definition: smart_pointer.h:108
Definition: convergence_check.h:72
virtual void start(const TVector &d)=0
computes the start defect and set it
virtual std::string config_string() const =0
returns information about configuration parameters
virtual void update(const TVector &d)=0
computes the defect and sets it a the next defect value
virtual ~IConvergenceCheck()
virtual destructor
Definition: convergence_check.h:151
virtual number defect() const =0
returns the current defect
virtual int step() const =0
returns the current number of steps
virtual void set_name(std::string name)=0
sets the name of the iteration
virtual void update_defect(number defect)=0
sets the update for the current defect
virtual int get_offset() const =0
get the current offset
virtual void set_symbol(char symbol)=0
sets the symbol used for output
virtual void print_line(std::string line)=0
prints a line
virtual void set_offset(int offset)=0
sets the number of spaces printed before output information
virtual number avg_rate() const =0
virtual number reduction() const =0
virtual bool iteration_ended()=0
virtual SmartPtr< IConvergenceCheck< TVector > > clone()=0
clone the object
virtual void set_info(std::string name)=0
sets info string
virtual number rate() const =0
virtual void start_defect(number defect)=0
sets the given start defect
Definition: convergence_check.h:179
number get_defect(size_t i) const
Definition: convergence_check.h:225
std::string m_info
Definition: convergence_check.h:280
number m_minDefect
Definition: convergence_check.h:262
number previous_defect() const
Definition: convergence_check.h:214
void set_maximum_steps(int maxSteps)
Definition: convergence_check.h:188
int step() const
returns the current number of steps
Definition: convergence_check.h:215
number m_currentDefect
Definition: convergence_check.h:246
void set_supress_unsuccessful(bool bsupress)
Definition: convergence_check.h:191
int get_offset() const
get the current offset
Definition: convergence_check.h:219
char m_symbol
Definition: convergence_check.h:274
void set_reduction(number relReduction)
Definition: convergence_check.h:190
bool m_verbose
Definition: convergence_check.h:268
number m_lastDefect
Definition: convergence_check.h:249
int m_maxSteps
Definition: convergence_check.h:259
bool is_valid_number(number value)
Definition: convergence_check_impl.h:247
void set_verbose(bool level)
Definition: convergence_check.h:187
bool m_supress_unsuccessful
Definition: convergence_check.h:283
void update_defect(number newDefect)
sets the update for the current defect
Definition: convergence_check_impl.h:140
void set_symbol(char symbol)
sets the symbol used for output
Definition: convergence_check.h:221
virtual std::string config_string() const
returns information about configuration parameters
Definition: convergence_check.h:205
const std::vector< number > get_defects() const
Definition: convergence_check.h:224
std::string m_name
Definition: convergence_check.h:277
void update(const TVector &d)
computes the defect and sets it a the next defect value
Definition: convergence_check_impl.h:156
void set_name(std::string name)
sets the name of the iteration
Definition: convergence_check.h:222
number avg_rate() const
Definition: convergence_check.h:217
number m_relReduction
Definition: convergence_check.h:265
number rate() const
Definition: convergence_check.h:216
virtual SmartPtr< IConvergenceCheck< TVector > > clone()
clone the object
Definition: convergence_check.h:228
void print_offset()
Definition: convergence_check_impl.h:229
StdConvCheck()
Definition: convergence_check_impl.h:50
void set_offset(int offset)
sets the number of spaces printed before output information
Definition: convergence_check.h:220
int m_offset
Definition: convergence_check.h:271
std::vector< number > _defects
Definition: convergence_check.h:286
void set_info(std::string info)
sets info string
Definition: convergence_check.h:223
number m_ratesProduct
Definition: convergence_check.h:255
void start(const TVector &d)
computes the start defect and set it
Definition: convergence_check_impl.h:134
number defect() const
returns the current defect
Definition: convergence_check.h:213
int m_currentStep
Definition: convergence_check.h:252
bool iteration_ended()
Definition: convergence_check_impl.h:162
bool post()
Definition: convergence_check_impl.h:172
void print_line(std::string line)
prints a line
Definition: convergence_check_impl.h:239
void start_defect(number initialDefect)
sets the given start defect
Definition: convergence_check_impl.h:85
void set_minimum_defect(number minDefect)
Definition: convergence_check.h:189
number reduction() const
Definition: convergence_check.h:212
number m_initialDefect
Definition: convergence_check.h:243
double number
Definition: types.h:124
stopwatch class for quickly taking times