10 #ifndef SACADO_ELRFAD_GENERALFADEXPR_HPP
11 #define SACADO_ELRFAD_GENERALFADEXPR_HPP
25 template <
typename T,
typename Storage>
40 static const int num_args = 1;
43 static const bool is_linear =
true;
74 Expr(
const int sz,
const int i,
const T &
x) :
119 bool isActive2(
int j)
const {
return this->size() > 0; }
136 return this->size() > 0 ? 1 : 0;
142 if (this->size() > 0)
154 #endif // SACADO_ELRFAD_GENERALFADEXPR_HPP
RemoveConst< T >::type value_type
Typename of values.
SACADO_INLINE_FUNCTION Expr(const Expr &x)
Copy constructor.
#define SACADO_ENABLE_VALUE_CTOR_DECL
SACADO_INLINE_FUNCTION Expr(const Storage &s)
Constructor with supplied storage s.
SACADO_INLINE_FUNCTION int numActiveArgs() const
SACADO_INLINE_FUNCTION bool isActive2(int j) const
Return whether argument is active.
SACADO_INLINE_FUNCTION bool isLinear() const
Return whether expression is linear.
#define SACADO_ENABLE_EXPR_CTOR_DECL
GeneralFad< T, Storage >::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
SACADO_INLINE_FUNCTION void computeActivePartials(const T &bar, value_type *partials) const
Return partials w.r.t. arguments.
BaseExpr< GeneralFad< T, Storage > >::type base_expr_type
Typename of base-expressions.
SACADO_INLINE_FUNCTION void computePartials(const T &bar, value_type partials[]) const
Return partials w.r.t. arguments.
SACADO_INLINE_FUNCTION void getTangents(int i, value_type dots[]) const
Return tangent component i of arguments.
SACADO_INLINE_FUNCTION bool isActive() const
Return whether argument is active.
SACADO_INLINE_FUNCTION const value_type * getDx(int j) const
Get dx array.
SACADO_INLINE_FUNCTION Expr(const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
Constructor with supplied value x.
SACADO_INLINE_FUNCTION Expr(const int sz, const T &x, const DerivInit zero_out=InitDerivArray)
Constructor with size sz and value x.
SACADO_INLINE_FUNCTION Expr(const int sz, const int i, const T &x)
Constructor with size sz, index i, and value x.
DerivInit
Enum use to signal whether the derivative array should be initialized in AD object constructors...
Forward-mode AD class templated on the storage for the derivative array.
Wrapper for a generic expression template.
expr expr expr fastAccessDx(i)) FAD_UNARYOP_MACRO(exp
Meta-function for determining concrete base expression.
SACADO_INLINE_FUNCTION ~Expr()
Destructor.
SACADO_INLINE_FUNCTION const T & getTangent(int i) const
Return tangent component i of argument Arg.
SACADO_INLINE_FUNCTION Expr()
Default constructor.
Initialize the derivative array.
SACADO_INLINE_FUNCTION Expr(const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
Copy constructor from any Expression object.
#define SACADO_INLINE_FUNCTION
ScalarType< value_type >::type scalar_type
Typename of scalar's (which may be different from T)
GeneralFad< T, Storage >::value_type value_type
Typename of values.