OOF2: The Manual
Name
SymTensorIndex — Index a symmetric 3×3 tensor
Synopses
C++ Synopsis
#include "engine/fieldindex.h"class SymTensorIndex: , public FieldIndex {int row() const;
int col() const;
bool diagonal() const;
static int str2voigt(const std::string& str);
static int ij2voigt(int i,
int j);
}
Description
SymTensorIndex
is a FieldIndex
subclass used to refer to the components of a SymmMatrix3
(symmetric 3×3 matrix or tensor) object. Most of the
functionality comes from the base class, and is documented
in the IndexP
wrapper class.
The argument to SymTensorIndex::set
function and the value returned by SymTensorIndex::components
are both pointers to std::vector<int>
s of
length 2. The two int
s are the row and column
numbers of the matrix component, with x=0, y=1, and z=2.
The integer
method returns the
Voigt representation of the
SymTensorIndex
, as shown in Table 8.1.
Methods
Methods that are not defined in the base classes are listed here.
bool diagonal() const
This function indicates whether or not the
SymTensorIndex
refers to one of the
diagonal entries, xx, yy, or zz.
static int str2voigt(const std::string& str)
This is a utility function that returns the integer Voigt representation of a symmetric tensor index, given as a string. Because OOF2 is written in C++, Voigt indices start from 0. See Table 8.1.
static int ij2voigt(int i, int j)
This is a utility function that returns the integer Voigt representation of a symmetric tensor index, given as a pair of integers. Because OOF2 is written in C++, Voigt indices start from 0. See Table 8.1.