13 #include "libmesh/vector_value.h" 55 const bool ret =
_x_comp.hasBlocks(sub_id);
57 mooseAssert(ret ==
_y_comp.hasBlocks(sub_id),
"x and y block restriction don't agree");
59 mooseAssert(ret ==
_z_comp.hasBlocks(sub_id),
"x and z block restriction don't agree");
103 template <
typename T>
117 template <
typename T>
125 _z_comp(*_z_constant),
131 template <
typename T>
138 _y_comp(*_y_constant),
139 _z_comp(*_z_constant),
145 template <
typename T>
149 if (!_x_comp.supportsFaceArg())
151 if (_has_y && !_y_comp.supportsFaceArg())
153 if (_has_z && !_z_comp.supportsFaceArg())
158 template <
typename T>
162 if (!_x_comp.supportsElemSideQpArg())
164 if (_has_y && !_y_comp.supportsElemSideQpArg())
166 if (_has_z && !_z_comp.supportsElemSideQpArg())
171 template <
typename T>
175 return {_x_comp(elem_arg, state), _y_comp(elem_arg, state), _z_comp(elem_arg, state)};
178 template <
typename T>
182 return {_x_comp(face, state), _y_comp(face, state), _z_comp(face, state)};
185 template <
typename T>
189 return {_x_comp(elem_qp, state), _y_comp(elem_qp, state), _z_comp(elem_qp, state)};
192 template <
typename T>
197 return {_x_comp(elem_side_qp, state), _y_comp(elem_side_qp, state), _z_comp(elem_side_qp, state)};
200 template <
typename T>
205 return {_x_comp(elem_point_arg, state),
206 _y_comp(elem_point_arg, state),
207 _z_comp(elem_point_arg, state)};
210 template <
typename T>
214 return {_x_comp(node_arg, state), _y_comp(node_arg, state), _z_comp(node_arg, state)};
217 template <
typename T>
221 return {_x_comp.gradient(elem_arg, state),
222 _y_comp.gradient(elem_arg, state),
223 _z_comp.gradient(elem_arg, state)};
226 template <
typename T>
230 return {_x_comp.dot(face_arg, state), _y_comp.dot(face_arg, state), _z_comp.dot(face_arg, state)};
233 template <
typename T>
237 return {_x_comp.dot(elem_arg, state), _y_comp.dot(elem_arg, state), _z_comp.dot(elem_arg, state)};
std::string name(const ElemQuality q)
FunctorBase< U > FunctorBase
Base class template for functor objects.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
bool supportsFaceArg() const override
Whether this functor supports evaluation with FaceArg.
typename FunctorReturnType< VectorValue< T >, FunctorEvaluationKind::Gradient >::type GradientType
This rigmarole makes it so that a user can create functors that return containers (std::vector...
virtual bool hasBlocks(SubdomainID sub_id) const override
Returns whether the functor is defined on this block.
GradientType evaluateGradient(const ElemArg &elem_arg, const StateArg &state) const override
Evaluate the functor gradient with a given element.
A structure defining a "face" evaluation calling argument for Moose functors.
std::unique_ptr< ConstantFunctor< T > > _y_constant
Possible holder of constant-0 y-component functor.
DotType evaluateDot(const FaceArg &face_arg, const StateArg &state) const override
ValueType evaluate(const ElemArg &elem_arg, const StateArg &state) const override
Evaluate the functor with a given element.
A structure that is used to evaluate Moose functors logically at an element/cell center.
A functor that returns a vector composed of its component functor evaluations.
Argument for requesting functor evaluation at a quadrature point location in an element.
Class template for creating constant functors.
VectorValue< T > ValueType
bool supportsElemSideQpArg() const override
Whether this functor supports evaluation with ElemSideQpArg.
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
State argument for evaluating functors.
const bool _has_y
Whether the user supplied a y-functor.
std::unique_ptr< ConstantFunctor< T > > _z_constant
Possible holder of constant-0 z-component functor.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const bool _has_z
Whether the user supplied a z-functor.
const FunctorBase< T > & _x_comp
The x-component functor.
VectorCompositeFunctor(const MooseFunctorName &name, const FunctorBase< T > &x_comp, const FunctorBase< T > &y_comp, const FunctorBase< T > &z_comp)
From xyz component constructor.
Argument for requesting functor evaluation at quadrature point locations on an element side...