Example codes
and tutorials
The (Not-so) Quick Guide
List of tutorials/demo codes
Single-Physics Problems
Poisson
Adaptivity illustrated for Poisson
Advection-Diffusion
Unsteady heat equation
Linear wave equation
The Young-Laplace equation
Navier-Stokes
Free-surface Navier-Stokes
Axisymmetric Navier-Stokes
Solid mechanics
Beam structures
Shell structures
Multi-physics Problems
Fluid-structure interaction
Boussinesq convection
Steady thermoelasticity
Methods-based example codes and tutorials
Mesh generation
Linear solvers and preconditioners
Visualisation of the results
Parallel processing
How to write a new element
How to write a new refineable element
Default nonlinear solvers -- the sequence of action functions
...
Documentation
FE theory and top-down discussion of the data structure
The (Not-so) Quick Guide
Comprehensive bottom-up discussion of the data structure
List of available structured and unstructured meshes
Linear solvers and preconditioners
Visualisation of the results
Parallel processing
Coding conventions and C++ style
Creating documentation
Optimisation - robustness vs. "raw speed"
Linear vs. nonlinear problems
Storing shape functions
Changing the default "full" integration scheme
Disabling the ALE formulation of unsteady equations
C vs. C++ output
Different sparse assembly techniques and the STL memory pool
Publications
Publications
Talks
Journal publications
Theses
Picture show
Download
Copyright
Download/installation instructions
Download page
FAQ & Contact
FAQ
Change log
Bugs and other known problems
Completeness of the library & our "To-Do List"
Contact the developers
Get involved

 


Beta release!

Please note that the library has not been "officially" released. While we continue to work on the documentation, these web pages are likely to contain broken links and documents in draft form. Please send an email to

oomph-lib AT maths DOT man DOT ac DOT uk

if you wish to be informed of the library's "official" release.

oomph::RankThreeTensor< T > Class Template Reference

#include <matrices.h>

List of all members.


Detailed Description

template<class T>
class oomph::RankThreeTensor< T >

A Rank 3 Tensor class.

Definition at line 1172 of file matrices.h.


Public Member Functions

 RankThreeTensor ()
 Empty constructor.
 RankThreeTensor (const RankThreeTensor &source_tensor)
 Copy constructor: Deep copy.
RankThreeTensoroperator= (const RankThreeTensor &source_tensor)
 Copy assignement.
 RankThreeTensor (const unsigned long &n)
 One parameter constructor produces a cubic nxnxn tensor.
 RankThreeTensor (const unsigned long &n_index1, const unsigned long &n_index2, const unsigned long &n_index3)
 Three parameter constructor, general non-square tensor.
 RankThreeTensor (const unsigned long &n_index1, const unsigned long &n_index2, const unsigned long &n_index3, const T &initial_val)
 Three parameter constructor, general non-square tensor.
virtual ~RankThreeTensor ()
 Destructor: delete the pointers.
void resize (const unsigned long &n)
 Resize to a square nxnxn tensor.
void resize (const unsigned long &n_index1, const unsigned long &n_index2, const unsigned long &n_index3)
 Resize to a general tensor.
void resize (const unsigned long &n_index1, const unsigned long &n_index2, const unsigned long &n_index3, const T &initial_value)
 Resize to a general tensor.
void initialise (const T &val)
 Initialise all values in the tensor to val.
unsigned long nindex1 () const
 Return the range of index 1 of the tensor.
unsigned long nindex2 () const
 Return the range of index 2 of the tensor.
unsigned long nindex3 () const
 Return the range of index 3 of the tensor.
T & operator() (const unsigned long &i, const unsigned long &j, const unsigned long &k)
 Overload the round brackets to give access as a(i,j,k).
const T & operator() (const unsigned long &i, const unsigned long &j, const unsigned long &k) const
 Overload a const version for read-only access as a(i,j,k).

Private Member Functions

void range_check (const unsigned long &i, const unsigned long &j, const unsigned long &k) const
 Range check to catch when an index is out of bounds, if so, it issues a warning message and dies by throwing an OomphLibError.

Private Attributes

T * Tensordata
 Private internal representation as pointer to data.
unsigned N
 1st Tensor dimension
unsigned M
 2nd Tensor dimension
unsigned P
 3rd Tensor dimension

Constructor & Destructor Documentation

template<class T>
oomph::RankThreeTensor< T >::RankThreeTensor (  )  [inline]

Empty constructor.

Definition at line 1231 of file matrices.h.

template<class T>
oomph::RankThreeTensor< T >::RankThreeTensor ( const RankThreeTensor< T > &  source_tensor  )  [inline]

Copy constructor: Deep copy.

Definition at line 1234 of file matrices.h.

References oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, oomph::RankThreeTensor< T >::nindex1(), oomph::RankThreeTensor< T >::nindex2(), oomph::RankThreeTensor< T >::nindex3(), oomph::RankThreeTensor< T >::P, and oomph::RankThreeTensor< T >::Tensordata.

template<class T>
oomph::RankThreeTensor< T >::RankThreeTensor ( const unsigned long &  n  )  [inline]

One parameter constructor produces a cubic nxnxn tensor.

Definition at line 1286 of file matrices.h.

References oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, oomph::RankThreeTensor< T >::P, and oomph::RankThreeTensor< T >::Tensordata.

template<class T>
oomph::RankThreeTensor< T >::RankThreeTensor ( const unsigned long &  n_index1,
const unsigned long &  n_index2,
const unsigned long &  n_index3 
) [inline]

Three parameter constructor, general non-square tensor.

Definition at line 1299 of file matrices.h.

References oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, oomph::RankThreeTensor< T >::P, and oomph::RankThreeTensor< T >::Tensordata.

template<class T>
oomph::RankThreeTensor< T >::RankThreeTensor ( const unsigned long &  n_index1,
const unsigned long &  n_index2,
const unsigned long &  n_index3,
const T &  initial_val 
) [inline]

Three parameter constructor, general non-square tensor.

Definition at line 1314 of file matrices.h.

References oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, oomph::RankThreeTensor< T >::P, and oomph::RankThreeTensor< T >::Tensordata.

template<class T>
virtual oomph::RankThreeTensor< T >::~RankThreeTensor (  )  [inline, virtual]

Destructor: delete the pointers.

Definition at line 1326 of file matrices.h.

References oomph::RankThreeTensor< T >::Tensordata.


Member Function Documentation

template<class T>
void oomph::RankThreeTensor< T >::initialise ( const T &  val  )  [inline]

Initialise all values in the tensor to val.

Definition at line 1416 of file matrices.h.

References oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, oomph::RankThreeTensor< T >::P, and oomph::RankThreeTensor< T >::Tensordata.

Referenced by oomph::RankThreeTensor< T >::RankThreeTensor(), and oomph::RankThreeTensor< T >::resize().

template<class T>
unsigned long oomph::RankThreeTensor< T >::nindex1 (  )  const [inline]

Return the range of index 1 of the tensor.

Definition at line 1420 of file matrices.h.

References oomph::RankThreeTensor< T >::N.

Referenced by oomph::RankThreeTensor< T >::operator=(), and oomph::RankThreeTensor< T >::RankThreeTensor().

template<class T>
unsigned long oomph::RankThreeTensor< T >::nindex2 (  )  const [inline]

Return the range of index 2 of the tensor.

Definition at line 1423 of file matrices.h.

References oomph::RankThreeTensor< T >::M.

Referenced by oomph::RankThreeTensor< T >::operator=(), and oomph::RankThreeTensor< T >::RankThreeTensor().

template<class T>
unsigned long oomph::RankThreeTensor< T >::nindex3 (  )  const [inline]

Return the range of index 3 of the tensor.

Definition at line 1426 of file matrices.h.

References oomph::RankThreeTensor< T >::P.

Referenced by oomph::RankThreeTensor< T >::operator=(), and oomph::RankThreeTensor< T >::RankThreeTensor().

template<class T>
const T& oomph::RankThreeTensor< T >::operator() ( const unsigned long &  i,
const unsigned long &  j,
const unsigned long &  k 
) const [inline]

Overload a const version for read-only access as a(i,j,k).

Definition at line 1439 of file matrices.h.

References oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::P, oomph::RankThreeTensor< T >::range_check(), and oomph::RankThreeTensor< T >::Tensordata.

template<class T>
T& oomph::RankThreeTensor< T >::operator() ( const unsigned long &  i,
const unsigned long &  j,
const unsigned long &  k 
) [inline]

Overload the round brackets to give access as a(i,j,k).

Definition at line 1429 of file matrices.h.

References oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::P, oomph::RankThreeTensor< T >::range_check(), and oomph::RankThreeTensor< T >::Tensordata.

template<class T>
RankThreeTensor& oomph::RankThreeTensor< T >::operator= ( const RankThreeTensor< T > &  source_tensor  )  [inline]

Copy assignement.

Definition at line 1256 of file matrices.h.

References oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, oomph::RankThreeTensor< T >::nindex1(), oomph::RankThreeTensor< T >::nindex2(), oomph::RankThreeTensor< T >::nindex3(), oomph::RankThreeTensor< T >::P, and oomph::RankThreeTensor< T >::resize().

template<class T>
void oomph::RankThreeTensor< T >::range_check ( const unsigned long &  i,
const unsigned long &  j,
const unsigned long &  k 
) const [inline, private]

Range check to catch when an index is out of bounds, if so, it issues a warning message and dies by throwing an OomphLibError.

Definition at line 1191 of file matrices.h.

References oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, OOMPH_EXCEPTION_LOCATION, and oomph::RankThreeTensor< T >::P.

Referenced by oomph::RankThreeTensor< T >::operator()().

template<class T>
void oomph::RankThreeTensor< T >::resize ( const unsigned long &  n_index1,
const unsigned long &  n_index2,
const unsigned long &  n_index3,
const T &  initial_value 
) [inline]

Resize to a general tensor.

Definition at line 1374 of file matrices.h.

References oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, oomph::RankThreeTensor< T >::P, and oomph::RankThreeTensor< T >::Tensordata.

template<class T>
void oomph::RankThreeTensor< T >::resize ( const unsigned long &  n_index1,
const unsigned long &  n_index2,
const unsigned long &  n_index3 
) [inline]

Resize to a general tensor.

Definition at line 1332 of file matrices.h.

References oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::M, oomph::RankThreeTensor< T >::N, oomph::RankThreeTensor< T >::P, and oomph::RankThreeTensor< T >::Tensordata.

template<class T>
void oomph::RankThreeTensor< T >::resize ( const unsigned long &  n  )  [inline]

Resize to a square nxnxn tensor.

Definition at line 1329 of file matrices.h.

Referenced by oomph::RankThreeTensor< T >::operator=().


Member Data Documentation

template<class T>
unsigned oomph::RankThreeTensor< T >::M [private]

2nd Tensor dimension

Definition at line 1184 of file matrices.h.

Referenced by oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::nindex2(), oomph::RankThreeTensor< T >::operator()(), oomph::RankThreeTensor< T >::operator=(), oomph::RankThreeTensor< T >::range_check(), oomph::RankThreeTensor< T >::RankThreeTensor(), and oomph::RankThreeTensor< T >::resize().

template<class T>
unsigned oomph::RankThreeTensor< T >::N [private]

1st Tensor dimension

Definition at line 1181 of file matrices.h.

Referenced by oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::nindex1(), oomph::RankThreeTensor< T >::operator=(), oomph::RankThreeTensor< T >::range_check(), oomph::RankThreeTensor< T >::RankThreeTensor(), and oomph::RankThreeTensor< T >::resize().

template<class T>
unsigned oomph::RankThreeTensor< T >::P [private]

3rd Tensor dimension

Definition at line 1187 of file matrices.h.

Referenced by oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::nindex3(), oomph::RankThreeTensor< T >::operator()(), oomph::RankThreeTensor< T >::operator=(), oomph::RankThreeTensor< T >::range_check(), oomph::RankThreeTensor< T >::RankThreeTensor(), and oomph::RankThreeTensor< T >::resize().

template<class T>
T* oomph::RankThreeTensor< T >::Tensordata [private]

Private internal representation as pointer to data.

Definition at line 1178 of file matrices.h.

Referenced by oomph::RankThreeTensor< T >::initialise(), oomph::RankThreeTensor< T >::operator()(), oomph::RankThreeTensor< T >::RankThreeTensor(), oomph::RankThreeTensor< T >::resize(), and oomph::RankThreeTensor< T >::~RankThreeTensor().


The documentation for this class was generated from the following file:
Generated on Mon Aug 10 11:25:19 2009 by  doxygen 1.4.7