MBSim

Project Page
Public Member Functions | Protected Member Functions | Protected Attributes
MBSim::GlobalCriteriaFunction Class Reference

This criteria function class applies the infinity norm globally for complete vectors thus it has one tolerance and a list of "results" for each step. More...

#include <criteria_functions.h>

Inheritance diagram for MBSim::GlobalCriteriaFunction:
MBSim::CriteriaFunction MBSim::Function1< int, fmatvec::Vec > MBSim::GlobalResidualCriteriaFunction MBSim::GlobalShiftCriteriaFunction

List of all members.

Public Member Functions

 GlobalCriteriaFunction (const double &tolerance_=1e-10)
 Constructor.
virtual ~GlobalCriteriaFunction ()
 Destructor.
virtual int operator() (const fmatvec::Vec &vector, const void *=NULL)
 computes the criteria
virtual bool isBetter (const fmatvec::Vec &vector)
 compares the result of given vector with the last result and returns if it got better (for damping)
virtual void clear ()
 deletes the list of criteria results
const std::vector< double > & getResults ()
- Public Member Functions inherited from MBSim::CriteriaFunction
 CriteriaFunction ()
 Constructor.
virtual ~CriteriaFunction ()
 Destructor.
void setFunction (Function1< fmatvec::Vec, fmatvec::Vec > *function_)
- Public Member Functions inherited from MBSim::Function1< int, fmatvec::Vec >
virtual ~Function1 ()
 destructor
virtual void initializeUsingXML (TiXmlElement *element)
 initialize function with XML code

Protected Member Functions

virtual double computeResults (const fmatvec::Vec &x)=0

Protected Attributes

double tolerance
 tolerance value for the criteria results
std::vector< double > criteriaResults
 saves the results of the criteria
- Protected Attributes inherited from MBSim::CriteriaFunction
Function1< fmatvec::Vec,
fmatvec::Vec > * 
function
 function that computes the values

Detailed Description

This criteria function class applies the infinity norm globally for complete vectors thus it has one tolerance and a list of "results" for each step.


Member Function Documentation

virtual int MBSim::GlobalCriteriaFunction::operator() ( const fmatvec::Vec &  vector,
const void *  = NULL 
)
virtual

computes the criteria

The criteria has to fulfill at least:

  • result = 0: the criteria is fulfilled and should stop therefore
  • result = 1: the algorithm should go on
  • result = 2: the algorithm has slow convergence and should stop therefore
  • result = -1: the algorithm diverges and should stop therefore

Implements MBSim::CriteriaFunction.


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