26 MooseEnum(
"max=0 min=1 max_abs=2",
"max"),
27 "Type of extreme value to return. 'max' " 28 "returns the maximum value. 'min' returns " 29 "the minimum value. 'max_abs' returns the maximum of the absolute value.");
43 if (_type == ExtremeType::MAX || _type == ExtremeType::MAX_ABS)
46 else if (_type == ExtremeType::MIN)
55 const auto pv = getProxyValuePair();
57 if ((_type == ExtremeType::MAX && pv > _proxy_value) ||
58 (_type == ExtremeType::MIN && pv < _proxy_value))
60 else if (_type == ExtremeType::MAX_ABS &&
std::abs(pv.first) > _proxy_value.first)
61 _proxy_value = std::make_pair(
std::abs(pv.first), pv.second);
68 return _proxy_value.second;
75 if (_type == ExtremeType::MAX || _type == ExtremeType::MAX_ABS)
76 this->gatherProxyValueMax(_proxy_value.first, _proxy_value.second);
77 else if (_type == ExtremeType::MIN)
78 this->gatherProxyValueMin(_proxy_value.first, _proxy_value.second);
87 if (((_type == ExtremeType::MAX || _type == ExtremeType::MAX_ABS) &&
88 pps._proxy_value > _proxy_value) ||
89 (_type == ExtremeType::MIN && pps._proxy_value < _proxy_value))
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
virtual Real getValue() const override
virtual void threadJoin(const UserObject &y) override
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
virtual void finalize() override
InputParameters validParams()
auto max(const L &left, const R &right)
ExtremeType
Type of extreme value we are going to compute.
ExtremeValueBase(const InputParameters ¶meters)
static InputParameters validParams()
std::pair< Real, Real > _proxy_value
Extreme value and proxy value at the same point.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void computeExtremeValue()
Get the extreme value with a functor element argument.
virtual void initialize() override
Base class for user-specific data.