15#include "libmesh/quadrature.h"
26 "block_orientation_uo",
27 "Name of ComputeBlockOrientation user object for updated block orientation.");
32 "Whether to convert euler angles from degree to radian. The default is to use degrees.");
35 "Output the Euler angle for each block computed from average of quaternions.");
41 _mesh(_subproblem.
mesh()),
42 _uo_name(getParam<UserObjectName>(
"block_orientation_uo")),
44 _num_rows(_mesh.meshSubdomains().size())
48 for (
const auto j : make_range(
_num_cols))
56 _uo = &getUserObjectByName<ComputeBlockOrientationBase>(
_uo_name);
62 for (
const auto j : make_range(
_num_cols))
73 for (
const auto row : make_range(
_num_rows))
74 for (
const auto col : make_range(
_num_cols))
88 RealVectorValue euler_angle = (RealVectorValue)ea;
90 if (getParam<bool>(
"degree_to_radian"))
91 euler_angle *= pi / 180.0;
93 for (
const auto col : make_range(
_num_cols))
registerMooseObject("SolidMechanicsApp", BlockOrientationFromUserObject)
virtual void finalize() override
static InputParameters validParams()
int _num_rows
Number of rows, representing the number of data entries in the VectorPostprocessor.
const UserObjectName & _uo_name
User object to grab average value from.
MooseMesh & _mesh
Reference to the mesh.
BlockOrientationFromUserObject(const InputParameters ¶meters)
virtual void execute() override
const ComputeBlockOrientationBase * _uo
std::vector< VectorPostprocessorValue * > _output_vector
Vector of outputs, where each entry is the vector of average values for single variable in each block...
int _num_cols
Number of columns, representing the number of features in the VectorPostprocessor.
virtual void initialize() override
virtual EulerAngles getBlockOrientation(SubdomainID block) const
Given a block ID return the block orientation of that block.
static InputParameters validParams()
const std::set< SubdomainID > & meshSubdomains() const
void max(const T &r, T &o, Request &req) const
VectorPostprocessorValue & declareVector(const std::string &vector_name)
const Parallel::Communicator & _communicator