NGSolve  4.9
Public Types | Public Member Functions
ngstd::AutoDiffDiff< D > Class Template Reference

Datatype for automatic differentiation. More...

#include <autodiffdiff.hpp>

List of all members.

Public Types

typedef AutoDiffDiff< D > TELEM
typedef double TSCAL

Public Member Functions

 AutoDiffDiff () throw ()
 elements are undefined
 AutoDiffDiff (const AutoDiffDiff &ad2) throw ()
 copy constructor
 AutoDiffDiff (double aval) throw ()
 initial object with constant value
 AutoDiffDiff (const AutoDiff< D > &ad2) throw ()
 initial object with value and derivative
 AutoDiffDiff (double aval, int diffindex) throw ()
 init object with (val, e_diffindex)
AutoDiffDiffoperator= (double aval) throw ()
 assign constant value
double Value () const throw ()
 returns value
double DValue (int i) const throw ()
 returns partial derivative
double DDValue (int i) const throw ()
 returns partial derivative
double DDValue (int i, int j) const throw ()
 returns partial derivative
double & Value () throw ()
 access value
double & DValue (int i) throw ()
 accesses partial derivative
double & DDValue (int i) throw ()
 accesses partial derivative
double & DDValue (int i, int j) throw ()
 accesses partial derivative
AutoDiffDiff< D > & operator+= (const AutoDiffDiff< D > &y) throw ()
 add autodiffdiff object
AutoDiffDiff< D > & operator-= (const AutoDiffDiff< D > &y) throw ()
 subtract autodiffdiff object
AutoDiffDiff< D > & operator*= (const AutoDiffDiff< D > &y) throw ()
 multiply with autodiffdiff object
AutoDiffDiff< D > & operator*= (const double &y) throw ()
 multiply with scalar
AutoDiffDiff< D > & operator/= (const double &y) throw ()
 divide by scalar
bool operator== (double val2) throw ()
 same value
bool operator!= (double val2) throw ()
 different values
bool operator< (double val2) throw ()
 less
bool operator> (double val2) throw ()
 greater

Detailed Description

template<int D>
class ngstd::AutoDiffDiff< D >

Datatype for automatic differentiation.

Contains function value, D first derivatives, and D*D second derivatives. Algebraic operations are overloaded by using product-rule etc. etc.


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