26 "Compute element variable averages for nearest-point based subdomains");
33 _np_post_processor_values(declareVector(
"np_post_processor_values"))
44 mooseError(
"The vector length of vector post processor is ",
46 " but nearestPointIndex() return ",
56 mooseError(
"The vector length of vector post processor is ",
68 mooseError(
"The vector length of the vector postprocessor ",
70 " is different from the number of user objects ",
76 user_object->finalize();
77 const auto & const_user_object = *user_object;
85 unsigned int closest = 0;
86 Real closest_distance = std::numeric_limits<Real>::max();
90 const auto & current_point = it.value();
92 Real current_distance = (p - current_point).norm();
94 if (current_distance < closest_distance)
96 closest_distance = current_distance;
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
registerMooseObject("MooseApp", NearestPointAverage)
This postprocessor computes a volume integral of the specified variable.
Base class VectorPostprocessors operating on elemental variables.
Given a list of points this object computes the average of a variable over the points closest to each...
virtual void finalize() override
VectorPostprocessorValue & _np_post_processor_values
Postprocessor values for each point.
Real userObjectValue(unsigned int i) const
NearestPointAverage(const InputParameters ¶meters)
static InputParameters validParams()
unsigned int nearestPointIndex(const Point &point) const
virtual Real spatialValue(const Point &point) const override
Given a Point return the integral value associated with the layer that point falls in for the layered...
This UserObject computes averages of a variable storing partial sums for the specified number of inte...
static InputParameters validParams()
std::vector< std::unique_ptr< ElementAverageValue > > _user_objects
std::vector< Point > _points
_enumerate_range< Iterator > enumerate(Iterator first, Iterator last, typename std::iterator_traits< Iterator >::difference_type initial)
Enumerate function for iterating over a range and obtaining both a reference to the underlying type a...