https://mooseframework.inl.gov
ExtremeValueBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include <utility>
13 
14 template <class T>
15 class ExtremeValueBase : public T
16 {
17 public:
19 
20  ExtremeValueBase(const InputParameters & parameters);
21 
22  virtual void initialize() override;
23  virtual Real getValue() const override;
24  virtual void finalize() override;
25  virtual void threadJoin(const UserObject & y) override;
26 
27 protected:
28  virtual std::pair<Real, Real> getProxyValuePair() = 0;
29 
31  virtual void computeExtremeValue();
32 
34  enum class ExtremeType
35  {
36  MAX,
37  MIN,
38  MAX_ABS
39  } _type;
40 
42  std::pair<Real, Real> _proxy_value;
43 };
virtual Real getValue() const override
virtual void threadJoin(const UserObject &y) override
enum ExtremeValueBase::ExtremeType _type
virtual void finalize() override
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
ExtremeType
Type of extreme value we are going to compute.
ExtremeValueBase(const InputParameters &parameters)
static InputParameters validParams()
virtual std::pair< Real, Real > getProxyValuePair()=0
std::pair< Real, Real > _proxy_value
Extreme value and proxy value at the same point.
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.
Definition: UserObject.h:40