#include <adtype.hpp>
Automatically Diffentiated Numerical Type.
The idea is based on the work of Nicolas Di Cesare who wrote the FAD<Expr> class. However here there are some differences: we can into account the depedencies and we compute 1st order or 1st and 2nd order derivatives.
T is the numerical Type Nvar is the number of variables Order the order of derivation
So only up to Order == 2 has been implemented here is an example
#include <ADType.hpp>
ADType<double,3,2, 0> x(1. ); ADType<double,3,2, 1> y(2. ); ADType<double,3,2, 2> z(3. ); Feel::ADType<double,3,2> __g = x/(y*z); std::cout << "g=" << __g << "\n";
The idea is based on the work of Nicolas Di Cesare who wrote the FAD<Expr> class. However here there are some differences: we can into account the depedencies and we compute 1st order or 1st and 2nd order derivatives.
T is the numerical Type Nvar is the number of variables Order the order of derivation
The idea is based on the work of Nicolas Di Cesare who wrote the FAD<Expr> class. However here there are some differences: we can into account the depedencies and we compute 1st order or 1st and 2nd order derivatives.
T is the numerical Type Nvar is the number of variables Order the order of derivation
The idea is based on the work of Nicolas Di Cesare who wrote the FAD<Expr> class. However here there are some differences: we can into account the depedencies and we compute 1st order or 1st and 2nd order derivatives.
T is the numerical Type Nvar is the number of variables Order the order of derivation
So far only Order = 2 has been implemented here is an example#include <ADType.hpp>
ADType<double,3,2, Var> x(1.,0 ); ADType<double,3,2, Var> y(2.,1 ); ADType<double,3,2, Var> z(3.,2 ); Feel:::ADType<double,3,2, Var> __g = x/(y*z); std::cout << "g=" << __g << "\n";