MechSys  1.0
Computing library for simulations in continuum and discrete mechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
Numerical::MultipleRoots< Instance > Class Template Reference

#include <multipleroots.h>

List of all members.

Public Types

typedef double(Instance::* pFun )(double x) const
 Callback function.

Public Member Functions

 MultipleRoots (Instance const *p2Inst, pFun F, pFun G, pFun H, double Tol=sqrt(DBL_EPSILON), double Gamma=0.001)
void Solve (double A, double B, Array< double > &R, bool Single=false) const
 Solve for all roots (R) in [A,B].
double NRoots (double a, double b) const
 Computes the number of roots in [a,b].
void SetTol (double Tol)
 Error tolerance.
void SetGam (double Gam)
 Small positive constant.
void SetQuadError (double Err)
 Quadrature Error tolerance.
int Ncalls () const
 Number of calls to NRoots function.
int Mcalls () const
 Number of calls to M(x) function.
void ResetNcalls ()
 Reset the number of calls to NRoots function.
void ResetMcalls ()
 Reset the number of calls to M(x) function.

Detailed Description

template<typename Instance>
class Numerical::MultipleRoots< Instance >

Find all roots for F(x)=0 inside [A,B]. Examples:


Member Typedef Documentation

template<typename Instance >
typedef double(Instance::* Numerical::MultipleRoots< Instance >::pFun)(double x) const

Callback function.


Constructor & Destructor Documentation

template<typename Instance >
Numerical::MultipleRoots< Instance >::MultipleRoots ( Instance const *  p2Inst,
pFun  F,
pFun  G,
pFun  H,
double  Tol = sqrt(DBL_EPSILON),
double  Gamma = 0.001 
) [inline]

Constructor.


Member Function Documentation

template<typename Instance >
int Numerical::MultipleRoots< Instance >::Mcalls ( ) const [inline]

Number of calls to M(x) function.

template<typename Instance >
int Numerical::MultipleRoots< Instance >::Ncalls ( ) const [inline]

Number of calls to NRoots function.

template<typename Instance >
double Numerical::MultipleRoots< Instance >::NRoots ( double  a,
double  b 
) const [inline]

Computes the number of roots in [a,b].

template<typename Instance >
void Numerical::MultipleRoots< Instance >::ResetMcalls ( ) [inline]

Reset the number of calls to M(x) function.

template<typename Instance >
void Numerical::MultipleRoots< Instance >::ResetNcalls ( ) [inline]

Reset the number of calls to NRoots function.

template<typename Instance >
void Numerical::MultipleRoots< Instance >::SetGam ( double  Gam) [inline]

Small positive constant.

template<typename Instance >
void Numerical::MultipleRoots< Instance >::SetQuadError ( double  Err) [inline]

Quadrature Error tolerance.

template<typename Instance >
void Numerical::MultipleRoots< Instance >::SetTol ( double  Tol) [inline]

Error tolerance.

template<typename Instance >
void Numerical::MultipleRoots< Instance >::Solve ( double  A,
double  B,
Array< double > &  R,
bool  Single = false 
) const [inline]

Solve for all roots (R) in [A,B].


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines