Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
|
Expression template forward-mode AD class with static memory allocation. More...
#include <Sacado_Fad_SFad_MP_Vector.hpp>
Public Types | |
typedef Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > > | T |
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... | |
typedef SFad< value_type, Num > | base_expr_type |
Typename of base-expressions. More... | |
typedef value_type::value_type | val_type |
Public Member Functions | |
template<typename S > | |
KOKKOS_INLINE_FUNCTION | SACADO_ENABLE_VALUE_FUNC (Expr &) operator |
Assignment operator with constant right-hand-side. More... | |
Public Attributes | |
T | val_ |
Value. More... | |
Initialization methods | |
KOKKOS_INLINE_FUNCTION | Expr () |
Default constructor. More... | |
template<typename S > | |
KOKKOS_INLINE_FUNCTION | Expr (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) |
Constructor with supplied value x . More... | |
KOKKOS_INLINE_FUNCTION | Expr (const int sz, const T &x, const DerivInit zero_out=InitDerivArray) |
Constructor with size sz and value x . More... | |
KOKKOS_INLINE_FUNCTION | Expr (const int sz, const int i, const T &x) |
Constructor with size sz , index i , and value x . More... | |
KOKKOS_INLINE_FUNCTION | Expr (const Expr &x) |
Copy constructor. More... | |
template<typename S > | |
KOKKOS_INLINE_FUNCTION | Expr (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL) |
Copy constructor from any Expression object. More... | |
KOKKOS_INLINE_FUNCTION | ~Expr () |
Destructor. More... | |
KOKKOS_INLINE_FUNCTION void | diff (const int ith, const int n) |
Set Fad object as the ith independent variable. More... | |
KOKKOS_INLINE_FUNCTION void | resize (int sz) |
Resize derivative array to length sz . More... | |
KOKKOS_INLINE_FUNCTION void | expand (int sz) |
Expand derivative array to size sz. More... | |
KOKKOS_INLINE_FUNCTION void | zero () |
Zero out the derivative array. More... | |
KOKKOS_INLINE_FUNCTION void | setUpdateValue (bool update_val) |
Set whether this Fad object should update values. More... | |
KOKKOS_INLINE_FUNCTION bool | updateValue () const |
Return whether this Fad object has an updated value. More... | |
template<typename S > | |
KOKKOS_INLINE_FUNCTION | SACADO_ENABLE_EXPR_FUNC (bool) isEqualTo(const Expr< S > &x) const |
Returns whether two Fad objects have the same values. More... | |
Value accessor methods | |
KOKKOS_INLINE_FUNCTION const T & | val () const |
Returns value. More... | |
KOKKOS_INLINE_FUNCTION T & | val () |
Returns value. More... | |
KOKKOS_INLINE_FUNCTION const val_type & | val (int j) const |
Returns value. More... | |
KOKKOS_INLINE_FUNCTION val_type & | val (int j) |
Returns value. More... | |
Derivative accessor methods | |
KOKKOS_INLINE_FUNCTION int | size () const |
Returns number of derivative components. More... | |
KOKKOS_INLINE_FUNCTION int | availableSize () const |
Returns number of derivative components that can be stored without reallocation. More... | |
KOKKOS_INLINE_FUNCTION bool | hasFastAccess () const |
Returns true if derivative array is not empty. More... | |
KOKKOS_INLINE_FUNCTION bool | isPassive () const |
Returns true if derivative array is empty. More... | |
KOKKOS_INLINE_FUNCTION void | setIsConstant (bool is_const) |
Set whether variable is constant. More... | |
KOKKOS_INLINE_FUNCTION const T * | dx () const |
Returns derivative array. More... | |
KOKKOS_INLINE_FUNCTION const T & | dx (int i) const |
Returns derivative component i with bounds checking. More... | |
KOKKOS_INLINE_FUNCTION T & | fastAccessDx (int i) |
Returns derivative component i without bounds checking. More... | |
KOKKOS_INLINE_FUNCTION const T & | fastAccessDx (int i) const |
Returns derivative component i without bounds checking. More... | |
KOKKOS_INLINE_FUNCTION const val_type & | dx (int i, int j) const |
Returns derivative component i with bounds checking. More... | |
KOKKOS_INLINE_FUNCTION val_type & | fastAccessDx (int i, int j) |
Returns derivative component i without bounds checking. More... | |
KOKKOS_INLINE_FUNCTION const val_type & | fastAccessDx (int i, int j) const |
Returns derivative component i without bounds checking. More... | |
Expression template forward-mode AD class with static memory allocation.
This classes specializes Expr to SFad expressions.
Definition at line 88 of file Sacado_Fad_SFad_MP_Vector.hpp.
typedef Sacado::MP::Vector< Stokhos::StaticFixedStorage<Ord,Val,VecNum,Dev> > Sacado::Fad::Expr< SFadExprTag< Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > >, Num >, ExprSpecMPVector >::T |
Definition at line 92 of file Sacado_Fad_SFad_MP_Vector.hpp.
typedef RemoveConst<T>::type Sacado::Fad::Expr< SFadExprTag< Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > >, Num >, ExprSpecMPVector >::value_type |
Typename of values.
Definition at line 95 of file Sacado_Fad_SFad_MP_Vector.hpp.
typedef ScalarType<value_type>::type Sacado::Fad::Expr< SFadExprTag< Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > >, Num >, ExprSpecMPVector >::scalar_type |
Typename of scalar's (which may be different from T)
Definition at line 98 of file Sacado_Fad_SFad_MP_Vector.hpp.
typedef SFad<value_type,Num> Sacado::Fad::Expr< SFadExprTag< Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > >, Num >, ExprSpecMPVector >::base_expr_type |
Typename of base-expressions.
Definition at line 101 of file Sacado_Fad_SFad_MP_Vector.hpp.
typedef value_type::value_type Sacado::Fad::Expr< SFadExprTag< Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > >, Num >, ExprSpecMPVector >::val_type |
Definition at line 103 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Default constructor.
Definition at line 112 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Constructor with supplied value x
.
Initializes value to x
and derivative array is empty
Definition at line 121 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Constructor with size sz
and value x
.
Initializes value to x
and derivative array 0 of length sz
Definition at line 131 of file Sacado_Fad_SFad_MP_Vector.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 147 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Copy constructor.
Definition at line 162 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Copy constructor from any Expression object.
Definition at line 171 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Destructor.
Definition at line 188 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Set Fad object as the ith
independent variable.
Sets the derivative array of length n
to the ith
row of the identity matrix and has the same affect as the Implementation(const int sz, const int i, const T & x) constructor.
Definition at line 198 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Resize derivative array to length sz
.
Since the derivative array length is not dynamic, this method throws an error if compiled with SACADO_DEBUG defined.
Definition at line 214 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Expand derivative array to size sz.
Since the derivative array length is not dynamic, this method throws an error if compiled with SACADO_DEBUG defined.
Definition at line 227 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Zero out the derivative array.
Definition at line 231 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Set whether this Fad object should update values.
Definition at line 235 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Return whether this Fad object has an updated value.
Definition at line 239 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns whether two Fad objects have the same values.
Definition at line 244 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns value.
Definition at line 262 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns value.
Definition at line 266 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns value.
Definition at line 270 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns value.
Definition at line 274 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns number of derivative components.
Definition at line 285 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns number of derivative components that can be stored without reallocation.
Definition at line 292 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns true if derivative array is not empty.
Definition at line 296 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns true if derivative array is empty.
Definition at line 300 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Set whether variable is constant.
Definition at line 304 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns derivative array.
Definition at line 308 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns derivative component i
with bounds checking.
Definition at line 312 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns derivative component i
without bounds checking.
Definition at line 316 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns derivative component i
without bounds checking.
Definition at line 320 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns derivative component i
with bounds checking.
Definition at line 324 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns derivative component i
without bounds checking.
Definition at line 328 of file Sacado_Fad_SFad_MP_Vector.hpp.
|
inline |
Returns derivative component i
without bounds checking.
Definition at line 332 of file Sacado_Fad_SFad_MP_Vector.hpp.
KOKKOS_INLINE_FUNCTION Sacado::Fad::Expr< SFadExprTag< Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > >, Num >, ExprSpecMPVector >::SACADO_ENABLE_VALUE_FUNC | ( | Expr< SFadExprTag< Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > >, Num >, ExprSpecMPVector > & | ) |
Assignment operator with constant right-hand-side.
T Sacado::Fad::Expr< SFadExprTag< Sacado::MP::Vector< Stokhos::StaticFixedStorage< Ord, Val, VecNum, Dev > >, Num >, ExprSpecMPVector >::val_ |
Value.
Definition at line 520 of file Sacado_Fad_SFad_MP_Vector.hpp.