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");
125 _z_comp(*_z_constant),
138 _y_comp(*_y_constant),
139 _z_comp(*_z_constant),
149 if (!_x_comp.supportsFaceArg())
151 if (_has_y && !_y_comp.supportsFaceArg())
153 if (_has_z && !_z_comp.supportsFaceArg())
162 if (!_x_comp.supportsElemSideQpArg())
164 if (_has_y && !_y_comp.supportsElemSideQpArg())
166 if (_has_z && !_z_comp.supportsElemSideQpArg())
175 return {_x_comp(elem_arg, state), _y_comp(elem_arg, state), _z_comp(elem_arg, state)};
182 return {_x_comp(face, state), _y_comp(face, state), _z_comp(face, state)};
189 return {_x_comp(elem_qp, state), _y_comp(elem_qp, state), _z_comp(elem_qp, state)};
197 return {_x_comp(elem_side_qp, state), _y_comp(elem_side_qp, state), _z_comp(elem_side_qp, state)};
205 return {_x_comp(elem_point_arg, state),
206 _y_comp(elem_point_arg, state),
207 _z_comp(elem_point_arg, state)};
214 return {_x_comp(node_arg, state), _y_comp(node_arg, state), _z_comp(node_arg, state)};
221 return {_x_comp.gradient(elem_arg, state),
222 _y_comp.gradient(elem_arg, state),
223 _z_comp.gradient(elem_arg, state)};
230 return {_x_comp.dot(face_arg, state), _y_comp.dot(face_arg, state), _z_comp.dot(face_arg, state)};
237 return {_x_comp.dot(elem_arg, state), _y_comp.dot(elem_arg, state), _z_comp.dot(elem_arg, state)};
Class template for creating constant functors.
Base class template for functor objects.
typename FunctorReturnType< VectorValue< T >, FunctorEvaluationKind::Gradient >::type GradientType
This rigmarole makes it so that a user can create functors that return containers (std::vector,...
VectorValue< T > ValueType
A functor that returns a vector composed of its component functor evaluations.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.
std::unique_ptr< ConstantFunctor< T > > _z_constant
Possible holder of constant-0 z-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.
bool supportsElemSideQpArg() const override
Whether this functor supports evaluation with ElemSideQpArg.
ValueType evaluate(const ElemArg &elem_arg, const StateArg &state) const override
Evaluate the functor with a given element.
std::unique_ptr< ConstantFunctor< T > > _y_constant
Possible holder of constant-0 y-component functor.
GradientType evaluateGradient(const ElemArg &elem_arg, const StateArg &state) const override
Evaluate the functor gradient with a given element.
virtual bool hasBlocks(SubdomainID sub_id) const override
Returns whether the functor is defined on this block.
FunctorBase< U > FunctorBase
const bool _has_y
Whether the user supplied a y-functor.
const FunctorBase< T > & _z_comp
The z-component functor.
DotType evaluateDot(const FaceArg &face_arg, const StateArg &state) const override
const bool _has_z
Whether the user supplied a z-functor.
bool supportsFaceArg() const override
Whether this functor supports evaluation with FaceArg.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
A structure that is used to evaluate Moose functors logically at an element/cell center.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
Argument for requesting functor evaluation at a quadrature point location in an element.
Argument for requesting functor evaluation at quadrature point locations on an element side.
A structure defining a "face" evaluation calling argument for Moose functors.
State argument for evaluating functors.