Intrepid
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
Intrepid::Tensor< T, N > Class Template Reference

#include <Intrepid_MiniTensor_Tensor.h>

Inheritance diagram for Intrepid::Tensor< T, N >:
Intrepid::TensorBase< T, tensor_store< T, N >::type >

List of all members.

Public Types

typedef tensor_store< T, N >::type Store

Public Member Functions

 Tensor ()
 Tensor (Index const dimension)
 Tensor (ComponentValue const value)
 Tensor (Index const dimension, ComponentValue const value)
 Tensor (T const *data_ptr)
 Tensor (Index const dimension, T const *data_ptr)
 Tensor (Tensor< T, N > const &A)
 Tensor (Tensor4< T, dimension_sqrt< N >::value > const &A)
 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 (T const *data_ptr, ComponentOrder const component_order)
 Tensor (Index const dimension, T const *data_ptr, ComponentOrder const component_order)
 ~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 dimension)
void fill (ComponentValue const value)
void fill (T const &s)
void fill (T const *data_ptr)
void fill (T const *data_ptr, ComponentOrder const component_order)

Static Public Member Functions

static Index get_order ()

Static Public Attributes

static Index const ORDER = 2
static bool const IS_DYNAMIC = N == DYNAMIC

Detailed Description

template<typename T, Index N = DYNAMIC>
class Intrepid::Tensor< T, N >

Second order tensor.

Definition at line 71 of file Intrepid_MiniTensor_Tensor.h.


Member Typedef Documentation

template<typename T, Index N = DYNAMIC>
typedef tensor_store<T, N>::type Intrepid::Tensor< T, N >::Store

Storage type

Definition at line 93 of file Intrepid_MiniTensor_Tensor.h.


Constructor & Destructor Documentation

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

Constructor that initializes to NaNs

Parameters:
dimensionthe space dimension

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

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

Create tensor from a specified value

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

Create tensor from a specified value

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

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

Create tensor from array

Parameters:
dimensionthe space dimension
data_ptrpointer into the array

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

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

Copy constructor

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

template<typename T , Index N>
Intrepid::Tensor< T, N >::Tensor ( Tensor4< T, dimension_sqrt< N >::value > const &  A) [inline]

2nd-order tensor from 4th-order tensor

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

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

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

Create tensor specifying components

Parameters:
s00s01 ... components in the R^2 canonical basis

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

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

template<typename T , Index N>
Intrepid::Tensor< T, N >::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:
s00s01 ... components in the R^3 canonical basis

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

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

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

Create tensor from array

Parameters:
data_ptrpointer into the array
component_ordercomponent convention (3D only)

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

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

Simple destructor

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


Member Function Documentation

template<typename T , Index N>
void Intrepid::Tensor< T, N >::fill ( ComponentValue const  value) [inline]

Fill components with value specification

Parameters:
valueall components are set equal to this specification

Reimplemented from Intrepid::TensorBase< T, tensor_store< T, N >::type >.

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

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

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

Fill components with value as parameter

Parameters:
valueall components are set equal to this parameter

Reimplemented from Intrepid::TensorBase< T, tensor_store< T, N >::type >.

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

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

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

Fill components from array defined by pointer.

Parameters:
data_ptrpointer into array for filling components

Reimplemented from Intrepid::TensorBase< T, tensor_store< T, N >::type >.

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

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

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

Fill components from array defined by pointer.

Parameters:
data_ptrpointer into array for filling components
component_ordercomponent convention (3D only)

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

References Intrepid::TensorBase< T, ST >::fill(), and Intrepid::Tensor< T, N >::get_dimension().

template<typename T , Index N>
Index Intrepid::Tensor< T, N >::get_dimension ( ) const [inline]
template<typename T, Index N = DYNAMIC>
static Index Intrepid::Tensor< T, N >::get_order ( ) [inline, static]

Tensor order

Definition at line 100 of file Intrepid_MiniTensor_Tensor.h.

References Intrepid::Tensor< T, N >::ORDER.

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

Indexing for constant tensor

Parameters:
iindex
jindex

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

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

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

Tensor indexing

Parameters:
iindex
jindex

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

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

template<typename T , Index N>
void Intrepid::Tensor< T, N >::set_dimension ( Index const  dimension) [inline]
Parameters:
dimensionof vector

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

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

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


Member Data Documentation

template<typename T, Index N = DYNAMIC>
bool const Intrepid::Tensor< T, N >::IS_DYNAMIC = N == DYNAMIC [static]

Static or dynamic

Definition at line 87 of file Intrepid_MiniTensor_Tensor.h.

template<typename T, Index N = DYNAMIC>
Index const Intrepid::Tensor< T, N >::ORDER = 2 [static]

Order

Definition at line 80 of file Intrepid_MiniTensor_Tensor.h.

Referenced by Intrepid::Tensor< T, N >::get_order().


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