19template <
typename UserObjectType>
42 using UserObjectType::_current_elem;
43 using UserObjectType::computeIntegral;
46template <
typename UserObjectType>
55template <
typename UserObjectType>
60 mooseError(
"Both block and boundary cannot be specified for a layered integral user object. If "
61 "you want to define the geometric bounds of the layers from a specified block set "
62 "layer_bounding_block instead.");
65template <
typename UserObjectType>
69 UserObjectType::initialize();
73template <
typename UserObjectType>
77 const auto integral_value = computeIntegral();
79 const auto layer = getLayer(_current_elem->vertex_average());
81 setLayerValue(layer, getLayerValue(layer) + integral_value);
84template <
typename UserObjectType>
91template <
typename UserObjectType>
95 UserObjectType::threadJoin(y);
99template <
typename UserObjectType>
100const std::vector<Point>
103 std::vector<Point> points;
105 for (
const auto & l : _layer_centers)
107 Point pt(0.0, 0.0, 0.0);
109 points.push_back(pt);
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
This base class computes volume integrals of a variable storing partial sums for the specified number...
virtual void threadJoin(const UserObject &y)
virtual Real integralValue(const Point &p) const
Given a Point return the integral value associated with the layer that point falls in.
static InputParameters validParams()
virtual void initialize()
Base class for computing layered side integrals.
virtual Real spatialValue(const Point &p) const override
Given a Point return the integral value associated with the layer that point falls in.
virtual void initialize() override
virtual void threadJoin(const UserObject &y) override
virtual const std::vector< Point > spatialPoints() const override
LayeredIntegralBase(const InputParameters ¶meters)
static InputParameters validParams()
virtual void finalize() override
virtual void execute() override
Base class for creating a user object with the SpatialUserObject and Moose::Functor APIs.
static InputParameters validParams()
Base class for user-specific data.