|
Intrepid
|
#include <Intrepid_MiniTensor_TensorBase.h>
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_ |
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.
| typedef ST Intrepid::TensorBase< T, ST >::storage_type |
Storage type
Definition at line 84 of file Intrepid_MiniTensor_TensorBase.h.
| typedef T Intrepid::TensorBase< T, ST >::value_type |
Component type
Definition at line 79 of file Intrepid_MiniTensor_TensorBase.h.
| Intrepid::TensorBase< T, ST >::TensorBase | ( | ) | [inline] |
Default constructor
Definition at line 53 of file Intrepid_MiniTensor_TensorBase.i.h.
References Intrepid::TensorBase< T, ST >::fill(), and Intrepid::TensorBase< T, ST >::set_number_components().
| Intrepid::TensorBase< T, ST >::TensorBase | ( | Index const | dimension, |
| Index const | order | ||
| ) | [inline, explicit] |
Constructor that initializes to NaNs
| dimension | the 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().
| Intrepid::TensorBase< T, ST >::TensorBase | ( | Index const | dimension, |
| Index const | order, | ||
| ComponentValue const | value | ||
| ) | [inline] |
Create with specified value
| dimension | the space dimension |
| value | all 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().
| Intrepid::TensorBase< T, ST >::TensorBase | ( | Index const | dimension, |
| Index const | order, | ||
| T const & | s | ||
| ) | [inline] |
Create from a scalar
| dimension | the space dimension |
| s | all 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().
| Intrepid::TensorBase< T, ST >::TensorBase | ( | Index const | dimension, |
| Index const | order, | ||
| T const * | data_ptr | ||
| ) | [inline] |
Create from array
| dimension | the space dimension |
| data_ptr | pointer 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().
| Intrepid::TensorBase< T, ST >::TensorBase | ( | TensorBase< T, ST > const & | X | ) | [inline] |
Copy constructor
| X | the 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().
| Intrepid::TensorBase< T, ST >::~TensorBase | ( | ) | [inline, pure virtual] |
Simple destructor
Definition at line 182 of file Intrepid_MiniTensor_TensorBase.i.h.
| void Intrepid::TensorBase< T, ST >::clear | ( | ) | [inline] |
Fill with zeros
Definition at line 449 of file Intrepid_MiniTensor_TensorBase.i.h.
| void Intrepid::TensorBase< T, ST >::fill | ( | ComponentValue const | value | ) | [inline] |
Fill components with value
| value | all 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().
| void Intrepid::TensorBase< T, ST >::fill | ( | T const & | s | ) | [inline] |
Fill components with value
| value | all components are set equal to this parameter |
Reimplemented in Intrepid::Tensor< T, N >.
Definition at line 333 of file Intrepid_MiniTensor_TensorBase.i.h.
| void Intrepid::TensorBase< T, ST >::fill | ( | T const * | data_ptr | ) | [inline] |
Fill components from array defined by pointer.
| data_ptr | pointer into array for filling components |
Reimplemented in Intrepid::Tensor< T, N >.
Definition at line 351 of file Intrepid_MiniTensor_TensorBase.i.h.
| Index Intrepid::TensorBase< T, ST >::get_dimension | ( | ) | const [inline, protected] |
Reimplemented in Intrepid::Tensor< T, N >, Intrepid::Tensor4< T, N >, Intrepid::Vector< T, N >, Intrepid::Vector< Index, N >, and Intrepid::Tensor3< T, N >.
Definition at line 193 of file Intrepid_MiniTensor_TensorBase.i.h.
Referenced by Intrepid::Tensor3< T, N >::get_dimension(), Intrepid::Vector< T, N >::get_dimension(), Intrepid::Tensor4< T, N >::get_dimension(), and Intrepid::Tensor< T, N >::get_dimension().
| Index Intrepid::TensorBase< T, ST >::get_number_components | ( | ) | const [inline] |
Definition at line 248 of file Intrepid_MiniTensor_TensorBase.i.h.
Referenced by Intrepid::TensorBase< T, ST >::operator+=(), Intrepid::TensorBase< T, ST >::operator-=(), Intrepid::TensorBase< T, ST >::operator=(), and Intrepid::TensorBase< T, ST >::TensorBase().
| TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator*= | ( | S const & | X | ) | [inline] |
Component scale
| X | components are scaled by the parameter |
Definition at line 414 of file Intrepid_MiniTensor_TensorBase.i.h.
| TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator+= | ( | TensorBase< S, SS > const & | X | ) | [inline] |
Component increment
| X | components are added to current components |
Definition at line 372 of file Intrepid_MiniTensor_TensorBase.i.h.
References Intrepid::TensorBase< T, ST >::get_number_components().
| TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator-= | ( | TensorBase< S, SS > const & | X | ) | [inline] |
Component decrement
| X | components are subtracted to current components |
Definition at line 393 of file Intrepid_MiniTensor_TensorBase.i.h.
References Intrepid::TensorBase< T, ST >::get_number_components().
| TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator/= | ( | S const & | X | ) | [inline] |
Component divide
| X | components are divided by the parameter |
Definition at line 432 of file Intrepid_MiniTensor_TensorBase.i.h.
| TensorBase< T, ST > & Intrepid::TensorBase< T, ST >::operator= | ( | TensorBase< T, ST > const & | X | ) | [inline] |
Copy assignment
| X | the 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().
| T const & Intrepid::TensorBase< T, ST >::operator[] | ( | Index const | i | ) | const [inline] |
Linear access to components
| i | the index |
Definition at line 226 of file Intrepid_MiniTensor_TensorBase.i.h.
| T & Intrepid::TensorBase< T, ST >::operator[] | ( | Index const | i | ) | [inline] |
Linear access to components
| i | the index |
Definition at line 237 of file Intrepid_MiniTensor_TensorBase.i.h.
| void Intrepid::TensorBase< T, ST >::set_dimension | ( | Index const | dimension, |
| Index const | order | ||
| ) | [inline, protected] |
| dimension | |
| order |
Definition at line 206 of file Intrepid_MiniTensor_TensorBase.i.h.
Referenced by Intrepid::Tensor3< T, N >::set_dimension(), Intrepid::Vector< T, N >::set_dimension(), Intrepid::Tensor4< T, N >::set_dimension(), Intrepid::Tensor< T, N >::set_dimension(), and Intrepid::TensorBase< T, ST >::TensorBase().
| void Intrepid::TensorBase< T, ST >::set_number_components | ( | Index const | number_components | ) | [inline, protected] |
| number_components | set storage for this number of components |
Definition at line 259 of file Intrepid_MiniTensor_TensorBase.i.h.
Referenced by Intrepid::TensorBase< T, ST >::TensorBase().
ST Intrepid::TensorBase< T, ST >::components_ [protected] |
TensorBase components
Definition at line 243 of file Intrepid_MiniTensor_TensorBase.h.
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=().
1.7.6.1