Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Feel::ADType< T, Nvar, Order, Var > Class Template Reference

#include <adtype.hpp>

Detailed Description

template<typename T, int Nvar, int Order = 1, int Var = -1>
class Feel::ADType< T, Nvar, Order, Var >

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";

Author
Christophe Prud'homme
See Also

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
Author
Christophe Prud'homme
See Also
Version
Id:
ADType.hpp,v 1.7 2002/06/06 02:22:52 prudhomm Exp
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
Author
Christophe Prud'homme
See Also

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";

Author
Christophe Prud'homme
See Also
Version
Id:
ADType.hpp,v 1.7 2002/06/06 02:22:52 prudhomm Exp

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

Generated on Fri Oct 25 2013 14:24:28 for Feel++ by doxygen 1.8.4