|
Sacado Package Browser (Single Doxygen Collection) Version of the Day
|
Derivative array storage class using dynamic memory allocation. More...
#include <Sacado_Fad_VectorDynamicStorage.hpp>
Public Member Functions | |
| VectorDynamicStorage (const T &x) | |
| Default constructor. | |
| VectorDynamicStorage (const int sz, const T &x) | |
Constructor with size sz. | |
| VectorDynamicStorage (const int sz, T *x, S *dx_p, const int stride, bool zero_out) | |
| Constructor with supplied memory. | |
| VectorDynamicStorage (const VectorDynamicStorage &x) | |
| Copy constructor. | |
| ~VectorDynamicStorage () | |
| Destructor. | |
| VectorDynamicStorage & | operator= (const VectorDynamicStorage &x) |
| Assignment. | |
| int | size () const |
| Returns number of derivative components. | |
| int | length () const |
| Returns array length. | |
| void | resize (int sz) |
| Resize the derivative array to sz. | |
| void | expand (int sz) |
| Expand derivative array to size sz. | |
| void | zero () |
| Zero out derivative array. | |
| void | setMemory (int sz, T *x, S *dx_p, int stride) |
| Set value/derivative array memory. | |
| const T & | val () const |
| Returns value. | |
| T & | val () |
| Returns value. | |
| const S * | dx () const |
| Returns derivative array. | |
| S | dx (int i) const |
Returns derivative component i with bounds checking. | |
| S & | fastAccessDx (int i) |
Returns derivative component i without bounds checking. | |
| const S & | fastAccessDx (int i) const |
Returns derivative component i without bounds checking. | |
Private Attributes | |
| T | v_ |
| bool | owns_mem |
| Do we own the val/dx storage. | |
| int | sz_ |
| Derivative array size. | |
| int | len_ |
| Derivative array length. | |
| int | stride_ |
| Derivative array stride. | |
| T * | val_ |
| Value. | |
| S * | dx_ |
| Derivative array. | |
Derivative array storage class using dynamic memory allocation.
Definition at line 44 of file Sacado_Fad_VectorDynamicStorage.hpp.
| Sacado::Fad::VectorDynamicStorage< T, S >::VectorDynamicStorage | ( | const T & | x | ) | [inline] |
Default constructor.
Definition at line 49 of file Sacado_Fad_VectorDynamicStorage.hpp.
| Sacado::Fad::VectorDynamicStorage< T, S >::VectorDynamicStorage | ( | const int | sz, |
| const T & | x | ||
| ) | [inline] |
Constructor with size sz.
Initializes derivative array 0 of length sz
Definition at line 57 of file Sacado_Fad_VectorDynamicStorage.hpp.
| Sacado::Fad::VectorDynamicStorage< T, S >::VectorDynamicStorage | ( | const int | sz, |
| T * | x, | ||
| S * | dx_p, | ||
| const int | stride, | ||
| bool | zero_out | ||
| ) | [inline] |
Constructor with supplied memory.
Definition at line 63 of file Sacado_Fad_VectorDynamicStorage.hpp.
| Sacado::Fad::VectorDynamicStorage< T, S >::VectorDynamicStorage | ( | const VectorDynamicStorage< T, S > & | x | ) | [inline] |
Copy constructor.
Definition at line 72 of file Sacado_Fad_VectorDynamicStorage.hpp.
| Sacado::Fad::VectorDynamicStorage< T, S >::~VectorDynamicStorage | ( | ) | [inline] |
Destructor.
Definition at line 79 of file Sacado_Fad_VectorDynamicStorage.hpp.
| VectorDynamicStorage& Sacado::Fad::VectorDynamicStorage< T, S >::operator= | ( | const VectorDynamicStorage< T, S > & | x | ) | [inline] |
Assignment.
Definition at line 87 of file Sacado_Fad_VectorDynamicStorage.hpp.
| int Sacado::Fad::VectorDynamicStorage< T, S >::size | ( | ) | const [inline] |
Returns number of derivative components.
Definition at line 109 of file Sacado_Fad_VectorDynamicStorage.hpp.
| int Sacado::Fad::VectorDynamicStorage< T, S >::length | ( | ) | const [inline] |
Returns array length.
Definition at line 112 of file Sacado_Fad_VectorDynamicStorage.hpp.
| void Sacado::Fad::VectorDynamicStorage< T, S >::resize | ( | int | sz | ) | [inline] |
Resize the derivative array to sz.
Note: This does not necessarily preserve derivative components.
Definition at line 118 of file Sacado_Fad_VectorDynamicStorage.hpp.
| void Sacado::Fad::VectorDynamicStorage< T, S >::expand | ( | int | sz | ) | [inline] |
Expand derivative array to size sz.
This method preserves any existing derivative components and sets any that are added to zero.
Definition at line 135 of file Sacado_Fad_VectorDynamicStorage.hpp.
| void Sacado::Fad::VectorDynamicStorage< T, S >::zero | ( | ) | [inline] |
Zero out derivative array.
Definition at line 152 of file Sacado_Fad_VectorDynamicStorage.hpp.
| void Sacado::Fad::VectorDynamicStorage< T, S >::setMemory | ( | int | sz, |
| T * | x, | ||
| S * | dx_p, | ||
| int | stride | ||
| ) | [inline] |
Set value/derivative array memory.
Definition at line 157 of file Sacado_Fad_VectorDynamicStorage.hpp.
| const T& Sacado::Fad::VectorDynamicStorage< T, S >::val | ( | ) | const [inline] |
Returns value.
Definition at line 175 of file Sacado_Fad_VectorDynamicStorage.hpp.
| T& Sacado::Fad::VectorDynamicStorage< T, S >::val | ( | ) | [inline] |
Returns value.
Definition at line 178 of file Sacado_Fad_VectorDynamicStorage.hpp.
| const S* Sacado::Fad::VectorDynamicStorage< T, S >::dx | ( | ) | const [inline] |
Returns derivative array.
Definition at line 181 of file Sacado_Fad_VectorDynamicStorage.hpp.
| S Sacado::Fad::VectorDynamicStorage< T, S >::dx | ( | int | i | ) | const [inline] |
Returns derivative component i with bounds checking.
Definition at line 184 of file Sacado_Fad_VectorDynamicStorage.hpp.
| S& Sacado::Fad::VectorDynamicStorage< T, S >::fastAccessDx | ( | int | i | ) | [inline] |
Returns derivative component i without bounds checking.
Definition at line 187 of file Sacado_Fad_VectorDynamicStorage.hpp.
| const S& Sacado::Fad::VectorDynamicStorage< T, S >::fastAccessDx | ( | int | i | ) | const [inline] |
Returns derivative component i without bounds checking.
Definition at line 190 of file Sacado_Fad_VectorDynamicStorage.hpp.
T Sacado::Fad::VectorDynamicStorage< T, S >::v_ [private] |
Definition at line 194 of file Sacado_Fad_VectorDynamicStorage.hpp.
bool Sacado::Fad::VectorDynamicStorage< T, S >::owns_mem [private] |
Do we own the val/dx storage.
Definition at line 199 of file Sacado_Fad_VectorDynamicStorage.hpp.
int Sacado::Fad::VectorDynamicStorage< T, S >::sz_ [private] |
Derivative array size.
Definition at line 202 of file Sacado_Fad_VectorDynamicStorage.hpp.
int Sacado::Fad::VectorDynamicStorage< T, S >::len_ [private] |
Derivative array length.
Definition at line 205 of file Sacado_Fad_VectorDynamicStorage.hpp.
int Sacado::Fad::VectorDynamicStorage< T, S >::stride_ [private] |
Derivative array stride.
Definition at line 208 of file Sacado_Fad_VectorDynamicStorage.hpp.
T* Sacado::Fad::VectorDynamicStorage< T, S >::val_ [private] |
Definition at line 211 of file Sacado_Fad_VectorDynamicStorage.hpp.
S* Sacado::Fad::VectorDynamicStorage< T, S >::dx_ [private] |
Derivative array.
Definition at line 214 of file Sacado_Fad_VectorDynamicStorage.hpp.
1.7.4