Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes | List of all members
Sacado::Fad::MemPoolStorage< T > Class Template Reference

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

#include <Sacado_Fad_MemPoolStorage.hpp>

Public Types

typedef T value_type
 

Public Member Functions

template<typename S >
 MemPoolStorage (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
 Default constructor. More...
 
 MemPoolStorage (const int sz, const T &x, const DerivInit zero_out=InitDerivArray)
 Constructor with size sz. More...
 
 MemPoolStorage (const MemPoolStorage &x)
 Copy constructor. More...
 
 ~MemPoolStorage ()
 Destructor. More...
 
MemPoolStorageoperator= (const MemPoolStorage &x)
 Assignment. More...
 
int size () const
 Returns number of derivative components. More...
 
void resize (int sz)
 Resize the derivative array to sz. More...
 
void resizeAndZero (int sz)
 Resize the derivative array to sz. More...
 
void expand (int sz)
 Expand derivative array to size sz. More...
 
void zero ()
 Zero out derivative array. More...
 
const Tval () const
 Returns value. More...
 
Tval ()
 Returns value. More...
 
const Tdx () const
 Returns derivative array. More...
 
T dx (int i) const
 Returns derivative component i with bounds checking. More...
 
TfastAccessDx (int i)
 Returns derivative component i without bounds checking. More...
 
const TfastAccessDx (int i) const
 Returns derivative component i without bounds checking. More...
 
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. More...
 

Protected Attributes

MemPoolmyPool_
 Memory pool. More...
 

Private Attributes

T val_
 Value. More...
 
int sz_
 Derivative array size. More...
 
int len_
 Derivative array length. More...
 
Tdx_
 Derivative array. More...
 

Detailed Description

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

Derivative array storage class using dynamic memory allocation.

Definition at line 194 of file Sacado_Fad_MemPoolStorage.hpp.

Member Typedef Documentation

template<typename T >
typedef T Sacado::Fad::MemPoolStorage< T >::value_type

Definition at line 198 of file Sacado_Fad_MemPoolStorage.hpp.

Constructor & Destructor Documentation

template<typename T >
template<typename S >
Sacado::Fad::MemPoolStorage< T >::MemPoolStorage ( const S &  x,
SACADO_ENABLE_VALUE_CTOR_DECL   
)
inline

Default constructor.

Definition at line 202 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
Sacado::Fad::MemPoolStorage< T >::MemPoolStorage ( const int  sz,
const T x,
const DerivInit  zero_out = InitDerivArray 
)
inline

Constructor with size sz.

Initializes derivative array 0 of length sz

Definition at line 209 of file Sacado_Fad_MemPoolStorage.hpp.

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

Copy constructor.

Definition at line 218 of file Sacado_Fad_MemPoolStorage.hpp.

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

Destructor.

Definition at line 224 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 230 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 252 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 258 of file Sacado_Fad_MemPoolStorage.hpp.

template<typename T >
void Sacado::Fad::MemPoolStorage< T >::resizeAndZero ( int  sz)
inline

Resize the derivative array to sz.

This method doest not preserve any existing derivative components but sets any that are added to zero.

Definition at line 274 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 292 of file Sacado_Fad_MemPoolStorage.hpp.

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

Zero out derivative array.

Definition at line 307 of file Sacado_Fad_MemPoolStorage.hpp.

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

Returns value.

Definition at line 312 of file Sacado_Fad_MemPoolStorage.hpp.

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

Returns value.

Definition at line 315 of file Sacado_Fad_MemPoolStorage.hpp.

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

Returns derivative array.

Definition at line 318 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 321 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 324 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 327 of file Sacado_Fad_MemPoolStorage.hpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< double >::defaultPool_ ( )

Definition at line 49 of file dmfad_example.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< double >::defaultPool_ ( )

Definition at line 46 of file fad_expr.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< double >::defaultPool_ ( )

Definition at line 41 of file fad_fe_jac_fill.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< double >::defaultPool_ ( )

Definition at line 45 of file fad_lj_grad.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< double >::defaultPool_ ( )

Definition at line 42 of file TraitsTests.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< Sacado::Fad::DMFad< double > >::defaultPool_ ( )

Definition at line 44 of file TraitsTests.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< double >::defaultPool_ ( )

Definition at line 250 of file ConversionTests.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< Sacado::Fad::DMFad< double > >::defaultPool_ ( )

Definition at line 252 of file ConversionTests.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< double >::defaultPool_ ( )

Definition at line 429 of file Fad_SerializationTests.cpp.

template<>
Sacado::Fad::MemPool * Sacado::Fad::MemPoolStorage< Sacado::Fad::DMFad< double > >::defaultPool_ ( )

Definition at line 431 of file Fad_SerializationTests.cpp.

Member Data Documentation

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

Value.

Definition at line 332 of file Sacado_Fad_MemPoolStorage.hpp.

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

Derivative array size.

Definition at line 335 of file Sacado_Fad_MemPoolStorage.hpp.

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

Derivative array length.

Definition at line 338 of file Sacado_Fad_MemPoolStorage.hpp.

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

Derivative array.

Definition at line 341 of file Sacado_Fad_MemPoolStorage.hpp.

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

Default memory pool.

Definition at line 346 of file Sacado_Fad_MemPoolStorage.hpp.

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

Memory pool.

Definition at line 351 of file Sacado_Fad_MemPoolStorage.hpp.


The documentation for this class was generated from the following file: