20 "Direction (3-component vector) along which to compute the length. This " 21 "may be 3 real numbers, or 3 variables.");
24 "AuxKernel to compute the 'length' of elements along a given direction. A plane is " 25 "constructed through the element's centroid, with normal equal to the direction given. The " 26 "average of the distance of the nodal positions to this plane is the 'length' returned. The " 27 "Variable for this AuxKernel must be an elemental Variable");
34 _num_direction(coupledComponents(
"direction")),
35 _direction_x(coupledValue(
"direction", 0)),
37 _direction_y(coupledValue(
"direction",
std::
min(_num_direction - 1, (unsigned)1))),
38 _direction_z(coupledValue(
"direction",
std::
min(_num_direction - 1, (unsigned)2)))
41 paramError(
"variable",
"The variable must be an elemental variable");
43 paramError(
"direction",
"Three values or variables must be provided");
49 const auto direction =
54 length += std::abs((node - centroid) * direction);
Computes a measure of element length.
const VariableValue & _direction_z
z component of direction along which the element length is calculated
const VariableValue & _direction_y
y component of direction along which the element length is calculated
const VariableValue & _direction_x
x component of direction along which the element length is calculated
registerMooseObject("PorousFlowApp", PorousFlowElementLength)
TypeVector< Real > unit() const
void paramError(const std::string ¶m, Args... args) const
const unsigned _num_direction
number of direction components provided (needs to be 3)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeValue() override
const Elem *const & _current_elem
static InputParameters validParams()
static InputParameters validParams()
auto min(const L &left, const R &right)
PorousFlowElementLength(const InputParameters ¶meters)