10 #ifndef SACADO_FAD_DVFAD_HPP
11 #define SACADO_FAD_DVFAD_HPP
15 #ifdef SACADO_NEW_FAD_DESIGN_IS_DEFAULT
22 using DVFad = Exp::GeneralFad< Exp::VectorDynamicStorage<T> >;
46 template <
typename ValueT>
48 public Expr< GeneralFad<ValueT,VectorDynamicStorage<ValueT> > > {
105 DVFad(
const int sz,
const int i,
const ValueT &
x) :
113 DVFad(
const int sz, ValueT*
x, ValueT*
dx,
bool zero_out =
false) :
122 DVFad(
const int sz,
const int i, ValueT*
x, ValueT*
dx) :
130 template <
typename S>
140 template <
typename S>
142 GeneralFadType::operator=(v);
148 GeneralFadType::operator=(static_cast<const GeneralFadType&>(x));
153 template <
typename S>
156 GeneralFadType::operator=(x);
161 template <
typename S>
164 GeneralFadType::operator+=(x);
169 template <
typename S>
172 GeneralFadType::operator-=(x);
177 template <
typename S>
180 GeneralFadType::operator*=(x);
185 template <
typename S>
188 GeneralFadType::operator/=(x);
194 GeneralFadType::operator+=(static_cast<const GeneralFadType&>(x));
200 GeneralFadType::operator-=(static_cast<const GeneralFadType&>(x));
206 GeneralFadType::operator*=(static_cast<const GeneralFadType&>(x));
212 GeneralFadType::operator/=(static_cast<const GeneralFadType&>(x));
217 template <
typename S>
220 GeneralFadType::operator+=(x);
225 template <
typename S>
228 GeneralFadType::operator-=(x);
233 template <
typename S>
236 GeneralFadType::operator*=(x);
241 template <
typename S>
244 GeneralFadType::operator/=(x);
250 template <
typename T>
255 template <
typename T>
261 template <
typename T>
268 template <
typename T>
273 template <
typename T>
279 template<
class ValueType,
unsigned length,
unsigned str
ide >
285 template<
class ValueType,
unsigned length,
unsigned str
ide >
292 #endif // SACADO_NEW_FAD_DESIGN_IS_DEFAULT
294 #endif // SACADO_FAD_DFAD_HPP
Wrapper for a generic expression template.
DVFad< typename GeneralFad< T, Fad::VectorDynamicStorage< T > >::value_type > type
#define SACADO_ENABLE_VALUE_CTOR_DECL
ExprType::value_type value_type
Typename of values.
GeneralFad< ValueT, StorageType > GeneralFadType
Sacado::Fad::ViewFad< const ValueType, length, stride, Sacado::Fad::DVFad< const ValueType > > type
#define SACADO_ENABLE_EXPR_CTOR_DECL
DVFad(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
DVFad(const int sz, const int i, ValueT *x, ValueT *dx)
Constructor with supplied memory and index i.
ExprType::scalar_type scalar_type
Typename of scalar's (which may be different from T)
#define SACADO_ENABLE_VALUE_FUNC(RETURN_TYPE)
Determine whether a given type is an expression.
Sacado::Fad::ViewFad< ValueType, length, stride, Sacado::Fad::DVFad< ValueType > > type
Meta-function for determining concrete base expression.
Fad::DVFad< T >::base_expr_type type
Get the base Fad type from a view/expression.
GeneralFad< VectorDynamicStorage< T > > DVFad
VectorDynamicStorage< ValueT > StorageType
Base classes.
#define SACADO_ENABLE_EXPR_FUNC(RETURN_TYPE)
Forward-mode AD class using dynamic memory allocation and expression templates.
Meta-function for determining nesting with an expression.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
DVFad()
Default constructor.
DVFad(const DVFad &x)
Copy constructor.
Turn DVFad into a meta-function class usable with mpl::apply.
DVFad(const int sz, const ValueT &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
ScalarType< ValueT >::type ScalarT
Typename of scalar's (which may be different from ValueT)
Derivative array storage class using dynamic memory allocation.
static const unsigned value
DVFad(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x convertible to ValueT.
DVFad(const int sz, ValueT *x, ValueT *dx, bool zero_out=false)
Constructor with supplied memory.
Initialize the derivative array.
Expr< GeneralFadType > ExprType
#define SACADO_INLINE_FUNCTION
DVFad(const int sz, const int i, const ValueT &x)
Constructor with size sz, index i, and value x.
Forward-mode AD class templated on the storage for the derivative array.
Get view type for any Fad type.