Sacado Package Browser (Single Doxygen Collection) Version of the Day
Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes
Sacado::Fad::MemPoolStorage< T > Class Template Reference

Derivative array storage class using dynamic memory allocation. More...

#include <Sacado_Fad_MemPoolStorage.hpp>

List of all members.

Public Member Functions

 MemPoolStorage (const T &x)
 Default constructor.
 MemPoolStorage (const int sz, const T &x)
 Constructor with size sz.
 MemPoolStorage (const MemPoolStorage &x)
 Copy constructor.
 ~MemPoolStorage ()
 Destructor.
MemPoolStorageoperator= (const MemPoolStorage &x)
 Assignment.
int size () const
 Returns number of derivative components.
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.
const T & val () const
 Returns value.
T & val ()
 Returns value.
const T * dx () const
 Returns derivative array.
dx (int i) const
 Returns derivative component i with bounds checking.
T & fastAccessDx (int i)
 Returns derivative component i without bounds checking.
const T & fastAccessDx (int i) const
 Returns derivative component i without bounds checking.
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_
template<>
Sacado::Fad::MemPooldefaultPool_

Static Public Attributes

static MemPooldefaultPool_
 Default memory pool.

Protected Attributes

MemPoolmyPool_
 Memory pool.

Private Attributes

val_
 Value.
int sz_
 Derivative array size.
int len_
 Derivative array length.
T * dx_
 Derivative array.

Detailed Description

template<typename T>
class Sacado::Fad::MemPoolStorage< T >

Derivative array storage class using dynamic memory allocation.

Definition at line 154 of file Sacado_Fad_MemPoolStorage.hpp.


Constructor & Destructor Documentation

template<typename T >
Sacado::Fad::MemPoolStorage< T >::MemPoolStorage ( const T &  x) [inline]

Default constructor.

Definition at line 159 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
Sacado::Fad::MemPoolStorage< T >::MemPoolStorage ( const int  sz,
const T &  x 
) [inline]

Constructor with size sz.

Initializes derivative array 0 of length sz

Definition at line 166 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
Sacado::Fad::MemPoolStorage< T >::MemPoolStorage ( const MemPoolStorage< T > &  x) [inline]

Copy constructor.

Definition at line 172 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
Sacado::Fad::MemPoolStorage< T >::~MemPoolStorage ( ) [inline]

Destructor.

Definition at line 178 of file Sacado_Fad_MemPoolStorage.hpp.


Member Function Documentation

template<typename T >
MemPoolStorage& Sacado::Fad::MemPoolStorage< T >::operator= ( const MemPoolStorage< T > &  x) [inline]

Assignment.

Definition at line 184 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
int Sacado::Fad::MemPoolStorage< T >::size ( ) const [inline]

Returns number of derivative components.

Definition at line 205 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
void Sacado::Fad::MemPoolStorage< T >::resize ( int  sz) [inline]

Resize the derivative array to sz.

Note: This does not necessarily preserve derivative components.

Definition at line 211 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
void Sacado::Fad::MemPoolStorage< T >::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 227 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
void Sacado::Fad::MemPoolStorage< T >::zero ( ) [inline]

Zero out derivative array.

Definition at line 242 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
const T& Sacado::Fad::MemPoolStorage< T >::val ( ) const [inline]

Returns value.

Definition at line 247 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
T& Sacado::Fad::MemPoolStorage< T >::val ( ) [inline]

Returns value.

Definition at line 250 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
const T* Sacado::Fad::MemPoolStorage< T >::dx ( ) const [inline]

Returns derivative array.

Definition at line 253 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
T Sacado::Fad::MemPoolStorage< T >::dx ( int  i) const [inline]

Returns derivative component i with bounds checking.

Definition at line 256 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
T& Sacado::Fad::MemPoolStorage< T >::fastAccessDx ( int  i) [inline]

Returns derivative component i without bounds checking.

Definition at line 259 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
const T& Sacado::Fad::MemPoolStorage< T >::fastAccessDx ( int  i) const [inline]

Returns derivative component i without bounds checking.

Definition at line 262 of file Sacado_Fad_MemPoolStorage.hpp.

Definition at line 49 of file dmfad_example.cpp.

Definition at line 46 of file fad_expr.cpp.

Definition at line 41 of file fad_fe_jac_fill.cpp.

Definition at line 46 of file fad_lj_grad.cpp.

Definition at line 44 of file TraitsTests.cpp.

Definition at line 46 of file TraitsTests.cpp.

Definition at line 38 of file Fad_CommTests.cpp.

Definition at line 40 of file Fad_CommTests.cpp.

Definition at line 432 of file Fad_SerializationTests.cpp.

Definition at line 434 of file Fad_SerializationTests.cpp.


Member Data Documentation

template<typename T >
T Sacado::Fad::MemPoolStorage< T >::val_ [private]

Value.

Definition at line 267 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
int Sacado::Fad::MemPoolStorage< T >::sz_ [private]

Derivative array size.

Definition at line 270 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
int Sacado::Fad::MemPoolStorage< T >::len_ [private]

Derivative array length.

Definition at line 273 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
T* Sacado::Fad::MemPoolStorage< T >::dx_ [private]

Derivative array.

Definition at line 276 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
MemPool* Sacado::Fad::MemPoolStorage< T >::defaultPool_ [static]

Default memory pool.

Definition at line 281 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
MemPool* Sacado::Fad::MemPoolStorage< T >::myPool_ [protected]

Memory pool.

Definition at line 286 of file Sacado_Fad_MemPoolStorage.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines