30#ifndef SACADO_FAD_SIMPLEFAD_HPP
31#define SACADO_FAD_SIMPLEFAD_HPP
51 template <
typename ValueT>
118 for (
int i=0;
i<this->
size();
i++)
130 if (
x.size() !=
this->size())
return false;
131 bool eq = IE::eval(
x.val(),
this->val());
132 for (
int i=0;
i<this->
size();
i++)
133 eq =
eq && IE::eval(
x.dx(
i), this->
dx(
i));
138 template <
typename S>
140 GeneralFadType::operator=(v);
151 template <
typename S>
154 GeneralFadType::operator+=(
x);
159 template <
typename S>
162 GeneralFadType::operator-=(
x);
167 template <
typename S>
170 GeneralFadType::operator*=(
x);
175 template <
typename S>
178 GeneralFadType::operator/=(
x);
#define SACADO_INLINE_FUNCTION
#define SACADO_ENABLE_VALUE_FUNC(RETURN_TYPE)
#define SACADO_ENABLE_VALUE_CTOR_DECL
Fad specializations for Teuchos::BLAS wrappers.
Sacado::ScalarType< FadType >::type scalar_type
SACADO_INLINE_FUNCTION const ValueT * dx() const
Returns derivative array.
SACADO_INLINE_FUNCTION int size() const
Returns number of derivative components.
SACADO_INLINE_FUNCTION DynamicStorage & operator=(const DynamicStorage &x)
Assignment.
SACADO_INLINE_FUNCTION ValueT & fastAccessDx(int i)
Returns derivative component i without bounds checking.
Forward-mode AD class templated on the storage for the derivative array.
Forward-mode AD class using dynamic memory allocation but no expression templates.
ScalarType< ValueT >::type ScalarT
Typename of scalar's (which may be different from ValueT)
SimpleFad(const int sz, const ValueT &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
DynamicStorage< ValueT > StorageType
Base classes.
bool isEqualTo(const SimpleFad &x) const
Returns whether two Fad objects have the same values.
SimpleFad(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x convertible to ValueT.
SimpleFad(const SimpleFad &x, const ValueT &v, const ValueT &partial)
Tangent copy constructor.
GeneralFadType::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
GeneralFadType::value_type value_type
Typename of values.
SimpleFad(const SimpleFad &x)
Copy constructor.
SimpleFad(const int sz, const int i, const ValueT &x)
Constructor with size sz, index i, and value x.
GeneralFad< ValueT, StorageType > GeneralFadType
SimpleFad()
Default constructor.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors.
@ InitDerivArray
Initialize the derivative array.
Turn SimpleFad into a meta-function class usable with mpl::apply.