Flow123d  JS_before_hm-2210-gb57a0a528
Static Public Member Functions | Static Private Member Functions | List of all members
AdaptiveSimpson Class Reference

Static class implementing integration using Simpson's rule. More...

#include <adaptivesimpson.hh>

Static Public Member Functions

static double AdaptSimpson (FunctorBase< double > &func, const double &a, const double &b, const double &tol)
 main method that starts the evaluation and calls the recursion More...
 

Static Private Member Functions

static double Simpson (const double &h, const double &fa, const double &fc, const double &fb)
 Evaluates the Simpson's rule. More...
 
static double SimpsonAd (FunctorBase< double > &func, const double &h, const double &a, const double &c, const double &b, const double &fa, const double &fc, const double &fb, const double &sx, const double &tol, long &recursion)
 the recursive method More...
 

Detailed Description

Static class implementing integration using Simpson's rule.

Uses 3-point Simpson's rule to evaluate an intergral on interval a,b. Divides interval in halves in recusion until the difference between values of Simpson's rule before and after division is smaller then $ 15\epsilon $.

Definition at line 32 of file adaptivesimpson.hh.

Member Function Documentation

◆ AdaptSimpson()

double AdaptiveSimpson::AdaptSimpson ( FunctorBase< double > &  func,
const double &  a,
const double &  b,
const double &  tol 
)
static

main method that starts the evaluation and calls the recursion

Definition at line 61 of file adaptivesimpson.cc.

Here is the caller graph for this function:

◆ Simpson()

double AdaptiveSimpson::Simpson ( const double &  h,
const double &  fa,
const double &  fc,
const double &  fb 
)
staticprivate

Evaluates the Simpson's rule.

Definition at line 23 of file adaptivesimpson.cc.

Here is the caller graph for this function:

◆ SimpsonAd()

double AdaptiveSimpson::SimpsonAd ( FunctorBase< double > &  func,
const double &  h,
const double &  a,
const double &  c,
const double &  b,
const double &  fa,
const double &  fc,
const double &  fb,
const double &  sx,
const double &  tol,
long &  recursion 
)
staticprivate

the recursive method

Definition at line 29 of file adaptivesimpson.cc.

Here is the caller graph for this function:

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