21 params.addClassDescription(
"Compute a scalar property of a RankTwoTensor");
22 params.addRequiredParam<MaterialPropertyName>(
"rank_two_tensor",
23 "The rank two material tensor name");
24 params.addParam<MooseEnum>(
26 params.addParam<
unsigned int>(
28 "Evaluate the tensor at this quadpoint. This option only needs to be used if "
29 "you are interested in a particular quadpoint in each element: otherwise do "
30 "not include this parameter in your input file");
31 params.addParamNamesToGroup(
"selected_qp",
"Advanced");
33 params.addParam<Point>(
36 "Start point for axis used to calculate some cylindrical material tensor quantities");
37 params.addParam<Point>(
"point2",
39 "End point for axis used to calculate some material tensor quantities");
40 params.addParam<Point>(
"direction", Point(0, 0, 1),
"Direction vector");
45 : NodalPatchRecovery(parameters),
46 _tensor(getMaterialProperty<
RankTwoTensor>(
"rank_two_tensor")),
47 _scalar_type(getParam<MooseEnum>(
"scalar_type")),
48 _has_selected_qp(isParamValid(
"selected_qp")),
49 _selected_qp(_has_selected_qp ? getParam<unsigned int>(
"selected_qp") : 0),
50 _point1(parameters.get<Point>(
"point1")),
51 _point2(parameters.get<Point>(
"point2")),
52 _input_direction(parameters.get<Point>(
"direction") / parameters.get<Point>(
"direction").norm())
59 unsigned int qp = _qp;
64 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
65 mooseError(
"RankTwoScalarAux. selected_qp specified as ",
67 " but there are only ",
69 " quadpoints in the element");