MBSim

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

This criteria function class applies the infinity norm locally for arbitrary combinations of sub-vectors of the complete vector. It has different tolerances for the different sub-vectors and a list of "result"-lists for each step and each "result" of a sub-vector. More...

#include <criteria_functions.h>

Inheritance diagram for MBSim::LocalCriteriaFunction:
MBSim::CriteriaFunction MBSim::Function1< int, fmatvec::Vec > MBSim::Function MBSim::LocalResidualCriteriaFunction MBSim::LocalShiftCriteriaFunction

List of all members.

Public Member Functions

 LocalCriteriaFunction (const std::map< fmatvec::Index, double > &tolerances_)
 Constructor.
virtual ~LocalCriteriaFunction ()
 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
virtual void setTolerances (const std::map< fmatvec::Index, double > &tolerances_)

Protected Member Functions

virtual std::vector< double > computeResults (const fmatvec::Vec &x)=0

Protected Attributes

std::map< fmatvec::Index, double > tolerances
std::vector< std::vector
< double > > 
criteriaResults
 saves the results of the criteria for each index set and each operator step

Detailed Description

This criteria function class applies the infinity norm locally for arbitrary combinations of sub-vectors of the complete vector. It has different tolerances for the different sub-vectors and a list of "result"-lists for each step and each "result" of a sub-vector.


Member Function Documentation

virtual int MBSim::LocalCriteriaFunction::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
  • result = 1: the algorithm should go on
  • result = 2: the algorithm has slow convergence and should stop
  • result = -1: the algorithm diverges and should stop

Implements MBSim::CriteriaFunction.


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