| FEAT 3
    Finite Element Analysis Toolbox | 
Auto-Derive function wrapper class template. More...
#include <auto_derive.hpp>
 
 | Classes | |
| class | Evaluator | 
| Public Types | |
| typedef Function_::ImageType | ImageType | 
| specify our image type  More... | |
| Public Member Functions | |
| template<typename... Args_> | |
| AutoDerive (Args_ &&... args) | |
| Standard constructor.  More... | |
| void | config_grad_extrapol (DataType_ initial_h, int max_steps) | 
| Configures the Gradient extrapolation scheme.  More... | |
| void | config_hess_extrapol (DataType_ initial_h, int max_steps) | 
| Configures the Hessian extrapolation scheme.  More... | |
| Static Public Attributes | |
| static constexpr bool | can_grad = true | 
| we provide function gradients  More... | |
| static constexpr bool | can_hess = true | 
| we provide function hessiants  More... | |
| static constexpr bool | can_value = true | 
| our base class provides function values  More... | |
| static constexpr int | domain_dim = Function_::domain_dim | 
| the input function must support value computation  More... | |
| Protected Attributes | |
| DataType_ | _init_grad_h | 
| initial h for gradient extrapolation  More... | |
| DataType_ | _init_hess_h | 
| initial h for hessian extrapolation  More... | |
| int | _max_grad_steps | 
| maximum number of gradient extrapolation steps  More... | |
| int | _max_hess_steps | 
| maximum number of hessian extrapolation steps  More... | |
Auto-Derive function wrapper class template.
This class extends another given function by adding the capability of computing gradients and hessians via Richardson extrapolation applied onto second-order central difference quotients. The initial 'h' for the difference quotient as well as the maximum number of extrapolation steps can be adjusted by using the config_grad_extrapol() and config_hess_extrapol() functions, respectively.
| Function_ | The function to which the numerical computation of gradients and/or hessians is to be added. This function will be used as a base-class for this template instance. | 
| DataType_ | The floating point data type to be used to store the values of the initial h. | 
Definition at line 90 of file auto_derive.hpp.
| typedef Function_::ImageType FEAT::Analytic::AutoDerive< Function_, DataType_ >::ImageType | 
specify our image type
Definition at line 101 of file auto_derive.hpp.
| 
 | inlineexplicit | 
Standard constructor.
This constructor configures the Richardson extrapolation steps for both the gradient and hessian evaluation to:
| [in] | args | The set of arguments to be forwarded to the original function's constructor. | 
Definition at line 483 of file auto_derive.hpp.
| 
 | inline | 
Configures the Gradient extrapolation scheme.
This function configures the Richardson extrapolation scheme for the evaluation of function gradients (first-order derivatives).
| [in] | initial_h | The initial h for the difference quotient. Must be > 0; default = 1E-2. | 
| [in] | max_steps | The maximum number of Richardson extrapolation steps to be performed. Must be > 0; default = 10. | 
Definition at line 505 of file auto_derive.hpp.
References FEAT::Analytic::AutoDerive< Function_, DataType_ >::_init_grad_h, FEAT::Analytic::AutoDerive< Function_, DataType_ >::_max_grad_steps, and XASSERTM.
| 
 | inline | 
Configures the Hessian extrapolation scheme.
This function configures the Richardson extrapolation scheme for the evaluation of function hessians (second-order derivatives).
| [in] | initial_h | The initial h for the difference quotient. Must be > 0; default = 1E-2. | 
| [in] | max_steps | The maximum number of Richardson extrapolation steps to be performed. Must be > 0; default = 10. | 
Definition at line 526 of file auto_derive.hpp.
References FEAT::Analytic::AutoDerive< Function_, DataType_ >::_init_hess_h, FEAT::Analytic::AutoDerive< Function_, DataType_ >::_max_hess_steps, and XASSERTM.
| 
 | protected | 
initial h for gradient extrapolation
Definition at line 465 of file auto_derive.hpp.
Referenced by FEAT::Analytic::AutoDerive< Function_, DataType_ >::config_grad_extrapol().
| 
 | protected | 
initial h for hessian extrapolation
Definition at line 467 of file auto_derive.hpp.
Referenced by FEAT::Analytic::AutoDerive< Function_, DataType_ >::config_hess_extrapol().
| 
 | protected | 
maximum number of gradient extrapolation steps
Definition at line 461 of file auto_derive.hpp.
Referenced by FEAT::Analytic::AutoDerive< Function_, DataType_ >::config_grad_extrapol().
| 
 | protected | 
maximum number of hessian extrapolation steps
Definition at line 463 of file auto_derive.hpp.
Referenced by FEAT::Analytic::AutoDerive< Function_, DataType_ >::config_hess_extrapol().
| 
 | staticconstexpr | 
we provide function gradients
Definition at line 106 of file auto_derive.hpp.
| 
 | staticconstexpr | 
we provide function hessiants
Definition at line 108 of file auto_derive.hpp.
| 
 | staticconstexpr | 
our base class provides function values
Definition at line 104 of file auto_derive.hpp.
| 
 | staticconstexpr | 
the input function must support value computation
specify our domain dimension
Definition at line 98 of file auto_derive.hpp.