Intrepid
Public Member Functions | Private Attributes
Intrepid::Tensor< T > Class Template Reference

#include <Intrepid_MiniTensor_Tensor.h>

List of all members.

Public Member Functions

 Tensor ()
 Tensor (Index const N)
 Tensor (Index const N, T const &s)
 Tensor (T const &s00, T const &s01, T const &s10, T const &s11)
 Tensor (T const &s00, T const &s01, T const &s02, T const &s10, T const &s11, T const &s12, T const &s20, T const &s21, T const &s22)
 Tensor (Index const N, T const *data_ptr)
 Tensor (Tensor< T > const &A)
 ~Tensor ()
T const & operator() (Index const i, Index const j) const
T & operator() (Index const i, Index const j)
Index get_dimension () const
void set_dimension (Index const N)
void fill (T const *data_ptr)
Tensor< T > & operator= (Tensor< T > const &A)
Tensor< T > & operator+= (Tensor< T > const &A)
Tensor< T > & operator-= (Tensor< T > const &A)
void clear ()

Private Attributes

Index dimension
T * e

Detailed Description

template<typename T>
class Intrepid::Tensor< T >

Second order tensor in R^N.

Definition at line 60 of file Intrepid_MiniTensor_Tensor.h.


Constructor & Destructor Documentation

template<typename T >
Intrepid::Tensor< T >::Tensor ( ) [inline]

Default constructor

Definition at line 191 of file Intrepid_MiniTensor_Tensor.i.h.

template<typename T >
Intrepid::Tensor< T >::Tensor ( Index const  N) [inline, explicit]

Constructor that initializes to NaNs

Parameters:
Ndimension

Definition at line 203 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::Tensor< T >::e, and Intrepid::Tensor< T >::set_dimension().

template<typename T >
Intrepid::Tensor< T >::Tensor ( Index const  N,
T const &  s 
) [inline]

Create tensor from a scalar

Parameters:
Ndimension
sall components are set equal to this value

Definition at line 252 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::Tensor< T >::e, and Intrepid::Tensor< T >::set_dimension().

template<typename T >
Intrepid::Tensor< T >::Tensor ( T const &  s00,
T const &  s01,
T const &  s10,
T const &  s11 
) [inline]

Create tensor specifying components

Parameters:
Ndimension
s00,s01,...components in the R^2 canonical basis

Definition at line 303 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::Tensor< T >::e, and Intrepid::Tensor< T >::set_dimension().

template<typename T >
Intrepid::Tensor< T >::Tensor ( T const &  s00,
T const &  s01,
T const &  s02,
T const &  s10,
T const &  s11,
T const &  s12,
T const &  s20,
T const &  s21,
T const &  s22 
) [inline]

Create tensor specifying components

Parameters:
Ndimension
s00,s01,...components in the R^3 canonical basis

Definition at line 327 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::Tensor< T >::e, and Intrepid::Tensor< T >::set_dimension().

template<typename T >
Intrepid::Tensor< T >::Tensor ( Index const  N,
T const *  data_ptr 
) [inline]

Create tensor from array - const version

Parameters:
data_ptrpointer into the array

Definition at line 357 of file Intrepid_MiniTensor_Tensor.i.h.

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

template<typename T >
Intrepid::Tensor< T >::Tensor ( Tensor< T > const &  A) [inline]

Copy constructor

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

Definition at line 376 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::Tensor< T >::e, Intrepid::Tensor< T >::get_dimension(), and Intrepid::Tensor< T >::set_dimension().

template<typename T >
Intrepid::Tensor< T >::~Tensor ( ) [inline]

Simple destructor

Definition at line 428 of file Intrepid_MiniTensor_Tensor.i.h.


Member Function Documentation

template<typename T >
void Intrepid::Tensor< T >::clear ( ) [inline]

Fill with zeros

Definition at line 631 of file Intrepid_MiniTensor_Tensor.i.h.

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

Fill components from array defined by pointer.

Parameters:
data_ptrpointer into array for filling components

Definition at line 141 of file Intrepid_MiniTensor_Tensor.i.h.

Referenced by Intrepid::Tensor< T >::Tensor().

template<typename T >
Index Intrepid::Tensor< T >::get_dimension ( ) const [inline]
template<typename T >
T & Intrepid::Tensor< T >::operator() ( Index const  i,
Index const  j 
) [inline]

Tensor indexing

Parameters:
iindex
jindex

Definition at line 459 of file Intrepid_MiniTensor_Tensor.i.h.

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

Indexing for constant tensor

Parameters:
iindex
jindex

Definition at line 444 of file Intrepid_MiniTensor_Tensor.i.h.

template<typename T >
Tensor< T > & Intrepid::Tensor< T >::operator+= ( Tensor< T > const &  A) [inline]

Tensor increment

Parameters:
Aadded to current tensor

Definition at line 527 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::Tensor< T >::e, and Intrepid::Tensor< T >::get_dimension().

template<typename T >
Tensor< T > & Intrepid::Tensor< T >::operator-= ( Tensor< T > const &  A) [inline]

Tensor decrement

Parameters:
Asubstracted from current tensor

Definition at line 579 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::Tensor< T >::e, and Intrepid::Tensor< T >::get_dimension().

template<typename T >
Tensor< T > & Intrepid::Tensor< T >::operator= ( Tensor< T > const &  A) [inline]

Copy assignment

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

Definition at line 473 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::Tensor< T >::e, and Intrepid::Tensor< T >::get_dimension().

template<typename T >
void Intrepid::Tensor< T >::set_dimension ( Index const  N) [inline]
Parameters:
Ndimension of 2nd-order tensor

Definition at line 116 of file Intrepid_MiniTensor_Tensor.i.h.

Referenced by Intrepid::Tensor< T >::Tensor().


Member Data Documentation

template<typename T>
Index Intrepid::Tensor< T >::dimension [private]

Tensor dimension

Definition at line 185 of file Intrepid_MiniTensor_Tensor.h.

template<typename T>
T* Intrepid::Tensor< T >::e [private]

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