Intrepid
Public Member Functions | Static Public Attributes | List of all members
Intrepid::Tensor< T > Class Template Reference

#include <Intrepid_MiniTensor_Tensor.h>

Inheritance diagram for Intrepid::Tensor< T >:
Intrepid::TensorBase< T >

Public Member Functions

 Tensor ()
 
 Tensor (Index const dimension)
 
 Tensor (Index const dimension, ComponentValue value)
 
 Tensor (Index const dimension, 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 dimension, T const *data_ptr)
 
 Tensor (Index const dimension, T const *data_ptr, ComponentOrder const component_order)
 
 Tensor (Tensor< T > const &A)
 
 Tensor (Tensor4< T > const &A)
 
 ~Tensor ()
 
T const & operator() (Index const i, Index const j) const
 
T & operator() (Index const i, Index const j)
 
void fill (ComponentValue value)
 
void fill (T const *data_ptr, ComponentOrder const component_order=CANONICAL)
 
Index get_order () const
 
- Public Member Functions inherited from Intrepid::TensorBase< T >
 TensorBase ()
 
 TensorBase (Index const dimension, Index const order)
 
 TensorBase (Index const dimension, Index const order, ComponentValue 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 > const &X)
 
virtual ~TensorBase ()
 
T const & operator[] (Index const i) const
 
T & operator[] (Index const i)
 
Index get_dimension () const
 
void set_dimension (Index const dimension)
 
Index get_number_components () const
 
void fill (ComponentValue value)
 
void fill (T const *data_ptr)
 
TensorBase< T > & operator= (TensorBase< T > const &X)
 
TensorBase< T > & operator+= (TensorBase< T > const &X)
 
TensorBase< T > & operator-= (TensorBase< T > const &X)
 
void clear ()
 

Static Public Attributes

static Index const order = 2U
 

Additional Inherited Members

- Public Types inherited from Intrepid::TensorBase< T >
typedef T type
 
- Protected Member Functions inherited from Intrepid::TensorBase< T >
void set_number_components (Index const number_components)
 
- Protected Attributes inherited from Intrepid::TensorBase< T >
Index dimension_
 
MiniTensor::StorageRCPArray< T > components_
 

Detailed Description

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

Second order tensor.

Definition at line 76 of file Intrepid_MiniTensor_Definitions.h.

Constructor & Destructor Documentation

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

Default constructor

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

template<typename T >
Intrepid::Tensor< T >::Tensor ( Index const  dimension)
inlineexplicit

Constructor that initializes to NaNs

Parameters
dimensionthe space dimension

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

template<typename T >
Intrepid::Tensor< T >::Tensor ( Index const  dimension,
ComponentValue  value 
)
inlineexplicit

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 211 of file Intrepid_MiniTensor_Tensor.i.h.

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

Create tensor from a scalar

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

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

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
s00s01 ... components in the R^2 canonical basis

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

References Intrepid::TensorBase< 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
s00s01 ... components in the R^3 canonical basis

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

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

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

Create tensor from array

Parameters
dimensionthe space dimension
data_ptrpointer into the array

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

template<typename T >
Intrepid::Tensor< T >::Tensor ( Index const  dimension,
T const *  data_ptr,
ComponentOrder const  component_order 
)
inline

Create tensor from array

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

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

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

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

Copy constructor

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

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

2nd-order tensor from 4th-order tensor

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

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

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

Simple destructor

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

Member Function Documentation

template<typename T >
void Intrepid::Tensor< T >::fill ( ComponentValue  value)
inline

Fill components with value

Parameters
valueall components are set equal to this

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

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

template<typename T >
void Intrepid::Tensor< T >::fill ( T const *  data_ptr,
ComponentOrder const  component_order = CANONICAL 
)
inline

Fill components from array defined by pointer.

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

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

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

template<typename T>
Index Intrepid::Tensor< T >::get_order ( ) const
inlinevirtual

Tensor order

Implements Intrepid::TensorBase< T >.

Definition at line 186 of file Intrepid_MiniTensor_Tensor.h.

References Intrepid::Tensor< T >::order.

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 371 of file Intrepid_MiniTensor_Tensor.i.h.

References Intrepid::TensorBase< T >::get_dimension().

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

Tensor indexing

Parameters
iindex
jindex

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

References Intrepid::TensorBase< T >::get_dimension().

Member Data Documentation

template<typename T>
Index const Intrepid::Tensor< T >::order = 2U
static

Order

Definition at line 73 of file Intrepid_MiniTensor_Tensor.h.

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


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