Esempio n. 1
0
void
RankFourTensor::fillFromInputVector(const std::vector<Real> input, FillMethod fill_method)
{
  zero();

  switch (fill_method)
  {
    case antisymmetric:
      fillAntisymmetricFromInputVector(input);
      break;
    case symmetric9:
      fillSymmetricFromInputVector(input, false);
      break;
    case symmetric21:
      fillSymmetricFromInputVector(input, true);
      break;
    case general_isotropic:
      fillGeneralIsotropicFromInputVector(input);
      break;
    case symmetric_isotropic:
      fillSymmetricIsotropicFromInputVector(input);
      break;
    case antisymmetric_isotropic:
      fillAntisymmetricIsotropicFromInputVector(input);
      break;
    case general:
      fillGeneralFromInputVector(input);
      break;
    default:
      mooseError("fillFromInputVector called with unknown fill_method of " << fill_method);
  }
}
Esempio n. 2
0
void
RankFourTensor::fillAxisymmetricRZFromInputVector(const std::vector<Real> & input)
{
  if (input.size() != 5)
    mooseError("To use fillAxisymmetricRZFromInputVector, your input must have size 5.  Your vector has size " << input.size());

                             // C1111     C1122     C1133     C2222     C2233=C1133
  fillSymmetricFromInputVector({input[0], input[1], input[2], input[0], input[2],
                             // C3333     C2323     C3131=C2323   C1212
                                input[3], input[4], input[4],     (input[0]-input[1])*0.5}, false);
}