ug4
ug::FixedConvergenceCheck< TVector > Class Template Reference

#include <fixed_convergence_check.h>

+ Inheritance diagram for ug::FixedConvergenceCheck< TVector >:

Public Member Functions

virtual 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...
 
virtual number defect () const
 returns the current defect More...
 
 FixedConvergenceCheck (int numIterations)
 
int get_offset () const
 get the current offset More...
 
virtual bool iteration_ended ()
 
virtual bool post ()
 
virtual void print_line (std::string line)
 prints a line More...
 
virtual number rate () const
 
virtual number reduction () const
 
void set_info (std::string info)
 sets info string More...
 
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_symbol (char symbol)
 sets the symbol used for output More...
 
virtual void start (const TVector &d)
 computes the start defect and set it More...
 
virtual void start_defect (number defect)
 sets the given start defect More...
 
virtual int step () const
 returns the current number of steps More...
 
virtual void update (const TVector &d)
 computes the defect and sets it a the next defect value More...
 
virtual void update_defect (number defect)
 sets the update for the current defect More...
 
virtual ~FixedConvergenceCheck ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::IConvergenceCheck< TVector >
virtual ~IConvergenceCheck ()
 virtual destructor More...
 

Private Attributes

int m_currentStep
 
int m_numIterations
 
int m_offset
 

Constructor & Destructor Documentation

◆ FixedConvergenceCheck()

template<typename TVector >
ug::FixedConvergenceCheck< TVector >::FixedConvergenceCheck ( int  numIterations)
inline

◆ ~FixedConvergenceCheck()

template<typename TVector >
virtual ug::FixedConvergenceCheck< TVector >::~FixedConvergenceCheck ( )
inlinevirtual

virtual destructor

Member Function Documentation

◆ avg_rate()

template<typename TVector >
virtual number ug::FixedConvergenceCheck< TVector >::avg_rate ( ) const
inlinevirtual

◆ clone()

template<typename TVector >
virtual SmartPtr<IConvergenceCheck<TVector> > ug::FixedConvergenceCheck< TVector >::clone ( )
inlinevirtual

◆ config_string()

template<typename TVector >
virtual std::string ug::FixedConvergenceCheck< TVector >::config_string ( ) const
inlinevirtual

returns information about configuration parameters

this should return necessary information about parameters and possibly calling config_string of subcomponents.

Returns
std::string necessary information about configuration parameters

Implements ug::IConvergenceCheck< TVector >.

References ug::FixedConvergenceCheck< TVector >::m_numIterations.

◆ defect()

template<typename TVector >
virtual number ug::FixedConvergenceCheck< TVector >::defect ( ) const
inlinevirtual

returns the current defect

Implements ug::IConvergenceCheck< TVector >.

References UG_ASSERT.

◆ get_offset()

template<typename TVector >
int ug::FixedConvergenceCheck< TVector >::get_offset ( ) const
inlinevirtual

◆ iteration_ended()

template<typename TVector >
virtual bool ug::FixedConvergenceCheck< TVector >::iteration_ended ( )
inlinevirtual

iteration_ended

Checks if the iteration must be ended. This can be due to convergence or divergence.

Returns
true if iteration ended false if iteration can and must be continued until convergence

Implements ug::IConvergenceCheck< TVector >.

References ug::FixedConvergenceCheck< TVector >::m_numIterations, and ug::FixedConvergenceCheck< TVector >::step().

◆ post()

template<typename TVector >
virtual bool ug::FixedConvergenceCheck< TVector >::post ( )
inlinevirtual

post

post-processes the iteration. Some informative outputs of the status of the iteration after finishing the iteration can be placed here

Returns
true if iteration was successful false if iteration did not lead to a satisfying result

Implements ug::IConvergenceCheck< TVector >.

◆ print_line()

template<typename TVector >
virtual void ug::FixedConvergenceCheck< TVector >::print_line ( std::string  line)
inlinevirtual

prints a line

Implements ug::IConvergenceCheck< TVector >.

◆ rate()

template<typename TVector >
virtual number ug::FixedConvergenceCheck< TVector >::rate ( ) const
inlinevirtual

◆ reduction()

template<typename TVector >
virtual number ug::FixedConvergenceCheck< TVector >::reduction ( ) const
inlinevirtual

◆ set_info()

template<typename TVector >
void ug::FixedConvergenceCheck< TVector >::set_info ( std::string  name)
inlinevirtual

sets info string

Implements ug::IConvergenceCheck< TVector >.

◆ set_name()

template<typename TVector >
void ug::FixedConvergenceCheck< TVector >::set_name ( std::string  name)
inlinevirtual

sets the name of the iteration

Implements ug::IConvergenceCheck< TVector >.

◆ set_offset()

template<typename TVector >
void ug::FixedConvergenceCheck< TVector >::set_offset ( int  offset)
inlinevirtual

sets the number of spaces printed before output information

Implements ug::IConvergenceCheck< TVector >.

References ug::FixedConvergenceCheck< TVector >::m_offset.

◆ set_symbol()

template<typename TVector >
void ug::FixedConvergenceCheck< TVector >::set_symbol ( char  symbol)
inlinevirtual

sets the symbol used for output

Implements ug::IConvergenceCheck< TVector >.

◆ start()

template<typename TVector >
virtual void ug::FixedConvergenceCheck< TVector >::start ( const TVector &  d)
inlinevirtual

computes the start defect and set it

Implements ug::IConvergenceCheck< TVector >.

References ug::FixedConvergenceCheck< TVector >::m_currentStep.

◆ start_defect()

template<typename TVector >
virtual void ug::FixedConvergenceCheck< TVector >::start_defect ( number  defect)
inlinevirtual

◆ step()

template<typename TVector >
virtual int ug::FixedConvergenceCheck< TVector >::step ( ) const
inlinevirtual

◆ update()

template<typename TVector >
virtual void ug::FixedConvergenceCheck< TVector >::update ( const TVector &  d)
inlinevirtual

computes the defect and sets it a the next defect value

Implements ug::IConvergenceCheck< TVector >.

References ug::FixedConvergenceCheck< TVector >::m_currentStep.

◆ update_defect()

template<typename TVector >
virtual void ug::FixedConvergenceCheck< TVector >::update_defect ( number  defect)
inlinevirtual

sets the update for the current defect

Implements ug::IConvergenceCheck< TVector >.

References ug::FixedConvergenceCheck< TVector >::m_currentStep.

Member Data Documentation

◆ m_currentStep

◆ m_numIterations

◆ m_offset

template<typename TVector >
int ug::FixedConvergenceCheck< TVector >::m_offset
private

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