NGSolve 5.3
Public Types | Public Member Functions | List of all members
ngstd::AutoDiffDiff< D, SCAL > Class Template Reference

Datatype for automatic differentiation. More...

#include <autodiffdiff.hpp>

Public Types

typedef AutoDiffDiff< D, SCALTELEM
 

Public Member Functions

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

Detailed Description

template<int D, typename SCAL = double>
class ngstd::AutoDiffDiff< D, SCAL >

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: