Sacado  Development
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Public Types | Public Member Functions | List of all members
Sacado::FAD_NS::SLFad< ValueT, Num > Class Template Reference

Forward-mode AD class using static memory allocation with long arrays and expression templates. More...

#include <Sacado_Fad_SLFad_tmpl.hpp>

Inheritance diagram for Sacado::FAD_NS::SLFad< ValueT, Num >:
Inheritance graph
[legend]
Collaboration diagram for Sacado::FAD_NS::SLFad< ValueT, Num >:
Collaboration graph
[legend]

Classes

struct  apply
 Turn SLFad into a meta-function class usable with mpl::apply. More...
 
struct  apply_N
 Replace static derivative length. More...
 

Public Types

typedef Fad::StaticStorage
< ValueT, Num > 
StorageType
 Base classes.
 
typedef GeneralFad< ValueT,
StorageType
GeneralFadType
 
typedef Expr< GeneralFadType > ExprType
 
typedef ExprType::value_type value_type
 Typename of values.
 
typedef ExprType::scalar_type scalar_type
 Typename of scalar's (which may be different from value_type)
 
typedef ScalarType< ValueT >::type ScalarT
 Typename of scalar's (which may be different from ValueT)
 

Public Member Functions

KOKKOS_INLINE_FUNCTION ~SLFad ()
 Destructor.
 
Initialization methods
KOKKOS_INLINE_FUNCTION SLFad ()
 Default constructor. More...
 
template<typename S >
KOKKOS_INLINE_FUNCTION SLFad (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
 Constructor with supplied value x convertible to ValueT. More...
 
KOKKOS_INLINE_FUNCTION SLFad (const int sz, const ValueT &x, const DerivInit zero_out=InitDerivArray)
 Constructor with size sz and value x. More...
 
KOKKOS_INLINE_FUNCTION SLFad (const int sz, const int i, const ValueT &x)
 Constructor with size sz, index i, and value x. More...
 
KOKKOS_INLINE_FUNCTION SLFad (const SLFad &x)
 Copy constructor.
 
template<typename S >
KOKKOS_INLINE_FUNCTION SLFad (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
 Copy constructor from any Expression object.
 

Detailed Description

template<typename ValueT, int Num>
class Sacado::FAD_NS::SLFad< ValueT, Num >

Forward-mode AD class using static memory allocation with long arrays and expression templates.

This is the user-level class for forward mode AD with static memory allocation, and is appropriate for whenever the number of derivative components is known at compile time. The largest size of the derivative array is fixed by the template parameter Num while the actual size used is set by the sz argument to the constructor or the n argument to diff(). The user interface is provided by Sacado::FAD_NS::GeneralFad.

Constructor & Destructor Documentation

template<typename ValueT , int Num>
KOKKOS_INLINE_FUNCTION Sacado::FAD_NS::SLFad< ValueT, Num >::SLFad ( )
inline

Default constructor.

Initializes value to 0 and derivative array is empty

template<typename ValueT , int Num>
template<typename S >
KOKKOS_INLINE_FUNCTION Sacado::FAD_NS::SLFad< ValueT, Num >::SLFad ( const S &  x,
SACADO_ENABLE_VALUE_CTOR_DECL   
)
inline

Constructor with supplied value x convertible to ValueT.

Initializes value to ValueT(x) and derivative array is empty.

template<typename ValueT , int Num>
KOKKOS_INLINE_FUNCTION Sacado::FAD_NS::SLFad< ValueT, Num >::SLFad ( const int  sz,
const ValueT &  x,
const DerivInit  zero_out = InitDerivArray 
)
inline

Constructor with size sz and value x.

Initializes value to x and derivative array 0 of length sz

template<typename ValueT , int Num>
KOKKOS_INLINE_FUNCTION Sacado::FAD_NS::SLFad< ValueT, Num >::SLFad ( const int  sz,
const int  i,
const ValueT &  x 
)
inline

Constructor with size sz, index i, and value x.

Initializes value to x and derivative array of length sz as row i of the identity matrix, i.e., sets derivative component i to 1 and all other's to zero.


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