Intrepid
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Intrepid::TensorBase< T, ST > Class Template Reference

#include <Intrepid_MiniTensor_TensorBase.h>

List of all members.

Public Types

typedef T value_type
typedef ST storage_type

Public Member Functions

 TensorBase ()
 TensorBase (Index const dimension, Index const order)
 TensorBase (Index const dimension, Index const order, ComponentValue const value)
 TensorBase (Index const dimension, Index const order, T const &s)
 TensorBase (Index const dimension, Index const order, T const *data_ptr)
 TensorBase (TensorBase< T, ST > const &X)
TensorBase< T, ST > & operator= (TensorBase< T, ST > const &X)
virtual ~TensorBase ()=0
T const & operator[] (Index const i) const
T & operator[] (Index const i)
Index get_number_components () const
void fill (ComponentValue const value)
void fill (T const &s)
void fill (T const *data_ptr)
template<typename S , typename SS >
TensorBase< T, ST > & operator+= (TensorBase< S, SS > const &X)
template<typename S , typename SS >
TensorBase< T, ST > & operator-= (TensorBase< S, SS > const &X)
template<typename S >
TensorBase< T, ST > & operator*= (S const &X)
template<typename S >
TensorBase< T, ST > & operator/= (S const &X)
void clear ()

Protected Member Functions

void set_number_components (Index const number_components)
Index get_dimension () const
void set_dimension (Index const dimension, Index const order)

Protected Attributes

ST components_
Index dimension_

Detailed Description

template<typename T, typename ST>
class Intrepid::TensorBase< T, ST >

Base class for all vector and tensor types. R, S, T: Component types SR, SS, ST: Corresponding storage types.

Definition at line 72 of file Intrepid_MiniTensor_TensorBase.h.


Member Typedef Documentation

template<typename T, typename ST>
typedef ST Intrepid::TensorBase< T, ST >::storage_type

Storage type

Definition at line 84 of file Intrepid_MiniTensor_TensorBase.h.

template<typename T, typename ST>
typedef T Intrepid::TensorBase< T, ST >::value_type

Component type

Definition at line 79 of file Intrepid_MiniTensor_TensorBase.h.


Constructor & Destructor Documentation

template<typename T , typename ST >
Intrepid::TensorBase< T, ST >::TensorBase ( ) [inline]
template<typename T , typename ST >
Intrepid::TensorBase< T, ST >::TensorBase ( Index const  dimension,
Index const  order 
) [inline, explicit]

Constructor that initializes to NaNs

Parameters:
dimensionthe space dimension

Definition at line 69 of file Intrepid_MiniTensor_TensorBase.i.h.

References Intrepid::TensorBase< T, ST >::fill(), and Intrepid::TensorBase< T, ST >::set_dimension().

template<typename T , typename ST >
Intrepid::TensorBase< T, ST >::TensorBase ( Index const  dimension,
Index const  order,
ComponentValue const  value 
) [inline]

Create with specified value

Parameters:
dimensionthe space dimension
valueall components are set equal to this

Definition at line 84 of file Intrepid_MiniTensor_TensorBase.i.h.

References Intrepid::TensorBase< T, ST >::fill(), and Intrepid::TensorBase< T, ST >::set_dimension().

template<typename T, typename ST >
Intrepid::TensorBase< T, ST >::TensorBase ( Index const  dimension,
Index const  order,
T const &  s 
) [inline]

Create from a scalar

Parameters:
dimensionthe space dimension
sall components are set equal to this value

Definition at line 102 of file Intrepid_MiniTensor_TensorBase.i.h.

References Intrepid::TensorBase< T, ST >::fill(), and Intrepid::TensorBase< T, ST >::set_dimension().

template<typename T, typename ST >
Intrepid::TensorBase< T, ST >::TensorBase ( Index const  dimension,
Index const  order,
T const *  data_ptr 
) [inline]

Create from array

Parameters:
dimensionthe space dimension
data_ptrpointer into the array

Definition at line 120 of file Intrepid_MiniTensor_TensorBase.i.h.

References Intrepid::TensorBase< T, ST >::fill(), and Intrepid::TensorBase< T, ST >::set_dimension().

template<typename T, typename ST>
Intrepid::TensorBase< T, ST >::TensorBase ( TensorBase< T, ST > const &  X) [inline]

Copy constructor

Parameters:
Xthe values of its components are copied to the new tensor

Definition at line 138 of file Intrepid_MiniTensor_TensorBase.i.h.

References Intrepid::TensorBase< T, ST >::get_number_components(), and Intrepid::TensorBase< T, ST >::set_number_components().

template<typename T , typename ST >
Intrepid::TensorBase< T, ST >::~TensorBase ( ) [inline, pure virtual]

Simple destructor

Definition at line 182 of file Intrepid_MiniTensor_TensorBase.i.h.


Member Function Documentation

template<typename T , typename ST >
void Intrepid::TensorBase< T, ST >::clear ( ) [inline]

Fill with zeros

Definition at line 449 of file Intrepid_MiniTensor_TensorBase.i.h.

template<typename T , typename ST >
void Intrepid::TensorBase< T, ST >::fill ( ComponentValue const  value) [inline]

Fill components with value

Parameters:
valueall components are set equal to this specification

Reimplemented in Intrepid::Tensor< T, N >.

Definition at line 272 of file Intrepid_MiniTensor_TensorBase.i.h.

Referenced by Intrepid::Tensor< T, N >::fill(), and Intrepid::TensorBase< T, ST >::TensorBase().

template<typename T, typename ST >
void Intrepid::TensorBase< T, ST >::fill ( T const &  s) [inline]

Fill components with value

Parameters:
valueall components are set equal to this parameter

Reimplemented in Intrepid::Tensor< T, N >.

Definition at line 333 of file Intrepid_MiniTensor_TensorBase.i.h.

template<typename T, typename ST >
void Intrepid::TensorBase< T, ST >::fill ( T const *  data_ptr) [inline]

Fill components from array defined by pointer.

Parameters:
data_ptrpointer into array for filling components

Reimplemented in Intrepid::Tensor< T, N >.

Definition at line 351 of file Intrepid_MiniTensor_TensorBase.i.h.

template<typename T , typename ST >
Index Intrepid::TensorBase< T, ST >::get_dimension ( ) const [inline, protected]
template<typename T , typename ST >
Index Intrepid::TensorBase< T, ST >::get_number_components ( ) const [inline]
template<typename T , typename ST >
template<typename S >
TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator*= ( S const &  X) [inline]

Component scale

Parameters:
Xcomponents are scaled by the parameter

Definition at line 414 of file Intrepid_MiniTensor_TensorBase.i.h.

template<typename T , typename ST >
template<typename S , typename SS >
TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator+= ( TensorBase< S, SS > const &  X) [inline]

Component increment

Parameters:
Xcomponents are added to current components

Definition at line 372 of file Intrepid_MiniTensor_TensorBase.i.h.

References Intrepid::TensorBase< T, ST >::get_number_components().

template<typename T , typename ST >
template<typename S , typename SS >
TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator-= ( TensorBase< S, SS > const &  X) [inline]

Component decrement

Parameters:
Xcomponents are subtracted to current components

Definition at line 393 of file Intrepid_MiniTensor_TensorBase.i.h.

References Intrepid::TensorBase< T, ST >::get_number_components().

template<typename T , typename ST >
template<typename S >
TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator/= ( S const &  X) [inline]

Component divide

Parameters:
Xcomponents are divided by the parameter

Definition at line 432 of file Intrepid_MiniTensor_TensorBase.i.h.

template<typename T, typename ST>
TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator= ( TensorBase< T, ST > const &  X) [inline]

Copy assignment

Parameters:
Xthe values of its components are copied to this tensor

Definition at line 159 of file Intrepid_MiniTensor_TensorBase.i.h.

References Intrepid::TensorBase< T, ST >::dimension_, and Intrepid::TensorBase< T, ST >::get_number_components().

template<typename T , typename ST >
T const & Intrepid::TensorBase< T, ST >::operator[] ( Index const  i) const [inline]

Linear access to components

Parameters:
ithe index

Definition at line 226 of file Intrepid_MiniTensor_TensorBase.i.h.

template<typename T , typename ST >
T & Intrepid::TensorBase< T, ST >::operator[] ( Index const  i) [inline]

Linear access to components

Parameters:
ithe index

Definition at line 237 of file Intrepid_MiniTensor_TensorBase.i.h.

template<typename T , typename ST >
void Intrepid::TensorBase< T, ST >::set_dimension ( Index const  dimension,
Index const  order 
) [inline, protected]
template<typename T , typename ST >
void Intrepid::TensorBase< T, ST >::set_number_components ( Index const  number_components) [inline, protected]
Parameters:
number_componentsset storage for this number of components

Definition at line 259 of file Intrepid_MiniTensor_TensorBase.i.h.

Referenced by Intrepid::TensorBase< T, ST >::TensorBase().


Member Data Documentation

template<typename T, typename ST>
ST Intrepid::TensorBase< T, ST >::components_ [protected]

TensorBase components

Definition at line 243 of file Intrepid_MiniTensor_TensorBase.h.

template<typename T, typename ST>
Index Intrepid::TensorBase< T, ST >::dimension_ [protected]

dimension

Definition at line 249 of file Intrepid_MiniTensor_TensorBase.h.

Referenced by Intrepid::TensorBase< T, ST >::operator=().


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