Пример #1
0
Real
MaterialTensorAux::principalValue( const SymmTensor & tensor, unsigned int index )
{
  ColumnMajorMatrix eval(3,1);
  ColumnMajorMatrix evec(3,3);
  tensor.columnMajorMatrix().eigen(eval, evec);
  // Eigen computes low to high.  We want high first.
  int i = -index + 2;
  return eval(i);
}
Пример #2
0
Real
calcPrincipleValues(const SymmTensor & symm_tensor, unsigned int index, RealVectorValue & direction)
{
    ColumnMajorMatrix eval(3,1);
    ColumnMajorMatrix evec(3,3);
    symm_tensor.columnMajorMatrix().eigen(eval, evec);
    // Eigen computes low to high.  We want high first.
    direction(0) = evec(0,index);
    direction(1) = evec(1,index);
    direction(2) = evec(2,index);
    return eval(index);
}