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);
}
Python Synopsis
from ooflib.SWIG.engine.fieldindex import SymTensorIndex
class SymTensorIndex(FieldIndex):def row(self)def col(self)def diagonal(self)
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 FieldIndex wrapper class.
The integer method returns the
Voigt representation of the
SymTensorIndex, as shown in Table 6.
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 6.
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 6.



