Sacado Package Browser (Single Doxygen Collection)
Version of the Day
|
GeneralFad expression template specialization. More...
#include <Sacado_ELRCacheFad_GeneralFadExpr.hpp>
Public Types | |
typedef GeneralFad< T, Storage > ::value_type | value_type |
typedef GeneralFad< T, Storage > ::scalar_type | scalar_type |
typedef BaseExpr< GeneralFad < T, Storage > >::type | base_expr_type |
Typename of base-expressions. More... | |
Public Types inherited from Sacado::ELRCacheFad::GeneralFad< T, Storage > | |
typedef RemoveConst< T >::type | value_type |
Typename of values. More... | |
typedef ScalarType< value_type > ::type | scalar_type |
Typename of scalar's (which may be different from T) More... | |
Public Member Functions | |
SACADO_INLINE_FUNCTION | Expr () |
Default constructor. More... | |
template<typename S > | |
SACADO_INLINE_FUNCTION | Expr (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) |
Constructor with supplied value x . More... | |
SACADO_INLINE_FUNCTION | Expr (const int sz, const T &x, const DerivInit zero_out=InitDerivArray) |
Constructor with size sz and value x . More... | |
SACADO_INLINE_FUNCTION | Expr (const int sz, const int i, const T &x) |
Constructor with size sz , index i , and value x . More... | |
SACADO_INLINE_FUNCTION | Expr (const Storage &s) |
Constructor with supplied storage s . More... | |
SACADO_INLINE_FUNCTION | Expr (const Expr &x) |
Copy constructor. More... | |
template<typename S > | |
SACADO_INLINE_FUNCTION | Expr (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL) |
Copy constructor from any Expression object. More... | |
SACADO_INLINE_FUNCTION | ~Expr () |
Destructor. More... | |
SACADO_INLINE_FUNCTION void | computePartials (const T &bar, value_type partials[]) const |
Return partials w.r.t. arguments. More... | |
SACADO_INLINE_FUNCTION void | getTangents (int i, value_type dots[]) const |
Return tangent component i of arguments. More... | |
template<int Arg> | |
SACADO_INLINE_FUNCTION bool | isActive () const |
Return whether argument is active. More... | |
SACADO_INLINE_FUNCTION bool | isLinear () const |
Return whether expression is linear. More... | |
template<int Arg> | |
SACADO_INLINE_FUNCTION T | getTangent (int i) const |
Return tangent component i of argument Arg . More... | |
SACADO_INLINE_FUNCTION const value_type * | getDx (int j) const |
Get dx array. More... | |
Public Member Functions inherited from Sacado::ELRCacheFad::GeneralFad< T, Storage > | |
template<typename S > | |
SACADO_INLINE_FUNCTION | SACADO_ENABLE_VALUE_FUNC (GeneralFad &) operator |
Assignment operator with constant right-hand-side. More... | |
SACADO_INLINE_FUNCTION | GeneralFad () |
Default constructor. More... | |
template<typename S > | |
SACADO_INLINE_FUNCTION | GeneralFad (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) |
Constructor with supplied value x . More... | |
SACADO_INLINE_FUNCTION | GeneralFad (const int sz, const T &x, const DerivInit zero_out=InitDerivArray) |
Constructor with size sz and value x . More... | |
SACADO_INLINE_FUNCTION | GeneralFad (const int sz, const int i, const T &x) |
Constructor with size sz , index i , and value x . More... | |
SACADO_INLINE_FUNCTION | GeneralFad (const Storage &s) |
Constructor with supplied storage s . More... | |
SACADO_INLINE_FUNCTION | GeneralFad (const GeneralFad &x) |
Copy constructor. More... | |
template<typename S > | |
SACADO_INLINE_FUNCTION | GeneralFad (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL) |
Copy constructor from any Expression object. More... | |
SACADO_INLINE_FUNCTION | ~GeneralFad () |
Destructor. More... | |
SACADO_INLINE_FUNCTION void | diff (const int ith, const int n) |
Set GeneralFad object as the ith independent variable. More... | |
SACADO_INLINE_FUNCTION void | setUpdateValue (bool update_val) |
Set whether this Fad object should update values. More... | |
SACADO_INLINE_FUNCTION bool | updateValue () const |
Return whether this Fad object has an updated value. More... | |
SACADO_INLINE_FUNCTION void | cache () const |
Cache values. More... | |
template<typename S > | |
SACADO_INLINE_FUNCTION | SACADO_ENABLE_EXPR_FUNC (bool) isEqualTo(const Expr< S > &x) const |
Returns whether two Fad objects have the same values. More... | |
SACADO_INLINE_FUNCTION int | availableSize () const |
Returns number of derivative components that can be stored without reallocation. More... | |
SACADO_INLINE_FUNCTION bool | hasFastAccess () const |
Returns true if derivative array is not empty. More... | |
SACADO_INLINE_FUNCTION bool | isPassive () const |
Returns true if derivative array is empty. More... | |
SACADO_INLINE_FUNCTION void | setIsConstant (bool is_const) |
Set whether variable is constant. More... | |
Static Public Attributes | |
static const int | num_args = 1 |
Number of arguments. More... | |
static const bool | is_linear = true |
Is expression linear. More... | |
GeneralFad expression template specialization.
This template class represents a simple GeneralFad expression and mixes-in the GeneralFad interface and the expression template interface using the caching expression-level-revese-mode expression templates.
Definition at line 47 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
typedef GeneralFad<T,Storage>::value_type Sacado::ELRCacheFad::Expr< GeneralFad< T, Storage > >::value_type |
Definition at line 51 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
typedef GeneralFad<T,Storage>::scalar_type Sacado::ELRCacheFad::Expr< GeneralFad< T, Storage > >::scalar_type |
Definition at line 52 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
typedef BaseExpr< GeneralFad<T,Storage> >::type Sacado::ELRCacheFad::Expr< GeneralFad< T, Storage > >::base_expr_type |
Typename of base-expressions.
Definition at line 55 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Default constructor.
Definition at line 65 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Constructor with supplied value x
.
Initializes value to x
and derivative array is empty
Definition at line 74 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Constructor with size sz
and value x
.
Initializes value to x
and derivative array 0 of length sz
Definition at line 82 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
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.
Definition at line 92 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Constructor with supplied storage s
.
Definition at line 97 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Copy constructor.
Definition at line 102 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Copy constructor from any Expression object.
Definition at line 108 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Destructor.
Definition at line 113 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Return partials w.r.t. arguments.
Definition at line 117 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Return tangent component i
of arguments.
Definition at line 123 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Return whether argument is active.
Definition at line 133 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Return whether expression is linear.
Definition at line 137 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Return tangent component i
of argument Arg
.
Definition at line 142 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
inline |
Get dx array.
Definition at line 146 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
static |
Number of arguments.
Definition at line 58 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.
|
static |
Is expression linear.
Definition at line 61 of file Sacado_ELRCacheFad_GeneralFadExpr.hpp.