![]() |
SCOREC core
Parallel unstructured mesh tools
|
forward automatic differentiation variable More...
Public Types | |
| enum | |
| the number of derivatives | |
Public Member Functions | |
| AD () | |
| default constructor | |
| AD (double x) | |
| default constructor from a double | |
| AD (AD< T, N > const &other) | |
| copy constructor | |
| unsigned int | size () const |
| get the size of the derivative array | |
| void | diff (unsigned int i, unsigned int n=0) |
| set as the ith variable of N | |
| double & | val () |
| get the value of the variable (mutable) | |
| const double & | val () const |
| get the value of the variable (immutable) | |
| T & | dx (unsigned int i) |
| get the ith derivative value (mutable) | |
| const T & | dx (unsigned int i) const |
| get the ith derivative value (immutable) | |
| void | resize (unsigned int i) |
| resize for static AD (no-op) | |
| operator double () const | |
| type conversion from AD to double | |
| AD< T, N > & | operator= (double other) |
| assignment to a double | |
| AD< T, N > & | operator= (AD< T, N > const &other) |
| assignment to another AD variable | |
| AD< T, N > & | operator+= (double other) |
| addition assignment with a double | |
| template<class B > | |
| AD< T, N > & | operator+= (AD< B, N > const &other) |
| addition assignment with another AD variable | |
| AD< T, N > & | operator-= (double other) |
| subtraction assignment with a double | |
| template<class B > | |
| AD< T, N > & | operator-= (AD< B, N > const &other) |
| subtraction assignment with another AD variable | |
| AD< T, N > & | operator*= (double other) |
| multiplication assignment with a double | |
| template<class B > | |
| AD< T, N > & | operator*= (AD< B, N > const &other) |
| multiplication assignment with another AD variable | |
| AD< T, N > & | operator/= (double other) |
| division assignment with a double | |
| template<class B > | |
| AD< T, N > & | operator/= (AD< B, N > const &other) |
| division assignment with another AD variable | |
Public Attributes | |
| double | x_ |
| the variable value | |
| T | dx_ [N] |
| the derivative array | |
forward automatic differentiation variable
1.9.1