12#include "libmesh/mesh_tools.h"
41 layer,
_type ==
MIN ? std::numeric_limits<Real>::max() : -std::numeric_limits<Real>::max());
59 return std::min(a, b);
61 return std::max(a, b);
76 _type ==
MIN ? std::numeric_limits<Real>::max() : -std::numeric_limits<Real>::max();
98 if (lb.layerHasValue(i))
102const std::vector<Point>
105 std::vector<Point> points;
109 Point pt(0.0, 0.0, 0.0);
111 points.push_back(pt);
registerMooseObject("MooseApp", LayeredExtremumMaterialProperty)
Determines the minimum or maximum of a material property over a volume.
static InputParameters validParams()
Real _value
Extreme value.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
ExtremeType _type
Type of extreme value to compute.
virtual void execute() override
Execute method.
const Elem *const & _current_elem
The current element pointer (available during execute())
This base class computes volume integrals of a variable storing partial sums for the specified number...
unsigned int _num_layers
Number of layers to split the mesh into.
virtual Real getLayerValue(unsigned int layer) const
Get the value for a given layer.
virtual unsigned int getLayer(const Point &p) const
Helper function to return the layer the point lies in.
void setLayerValue(unsigned int layer, Real value)
Set the value for a particular layer.
std::vector< int > & _layer_has_value
Whether or not each layer has had any value summed into it.
std::vector< Real > _layer_centers
center coordinates of each layer
bool _cumulative
Whether the values are cumulative over the layers.
const bool _positive_cumulative_direction
Whether the cumulative values should be summed in the positive or negative direction.
static InputParameters validParams()
unsigned int _direction
The component direction the layers are going in. We cache this for speed (so we're not always going t...
virtual void initialize()
std::vector< Real > & _layer_values
Value of the integral for each layer.
This UserObject computes volume integrals of a variable storing partial sums for the specified number...
virtual void execute() override
Execute method.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual void finalize() override
This is called after execute() and after threadJoin()! This is probably where you want to do MPI comm...
LayeredExtremumMaterialProperty(const InputParameters ¶meters)
virtual const std::vector< Point > spatialPoints() const override
Optional interface function for providing the points at which a UserObject attains spatial values.
Real extreme_value(const Real a, const Real b) const
static InputParameters validParams()
virtual void threadJoin(const UserObject &y) override
Must override.
void max(const T &r, T &o, Request &req) const
void min(const T &r, T &o, Request &req) const
Base class for user-specific data.
const Parallel::Communicator & comm() const