Пример #1
0
void
RandomEulerAngleProvider::initialize()
{
  EulerAngles angle;
  auto grain_num = _grain_tracker.getTotalFeatureCount();
  for (auto i = _angles.size(); i < grain_num; ++i)
  {
    angle.random(_random);
    _angles.push_back(angle);
  }
}
RankFourTensor
GrainTrackerElasticity::newGrain(unsigned int new_grain_id)
{
  EulerAngles angles;

  if (new_grain_id < _euler.getGrainNum())
    angles = _euler.getEulerAngles(new_grain_id);
  else
  {
    if (_random_rotations)
      angles.random();
    else
      mooseError("GrainTrackerElasticity has run out of grain rotation data.");
  }

  RankFourTensor C_ijkl = _C_ijkl;
  C_ijkl.rotate(RotationTensor(RealVectorValue(angles)));

  return C_ijkl;
}