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 "libmesh/libmesh_common.h"
13 #include <utility>
14 
15 class UserObject;
16 class InputParameters;
17 
18 template <class T>
19 class ExtremeValueBase : public T
20 {
21 public:
23 
24  ExtremeValueBase(const InputParameters & parameters);
25 
26  virtual void initialize() override;
27  virtual libMesh::Real getValue() const override;
28  virtual void finalize() override;
29  virtual void threadJoin(const UserObject & y) override;
30 
31 protected:
32  virtual std::pair<libMesh::Real, libMesh::Real> getProxyValuePair() = 0;
33 
35  virtual void computeExtremeValue();
36 
38  enum class ExtremeType
39  {
40  MAX,
41  MIN,
42  MAX_ABS
43  } _type;
44 
46  std::pair<libMesh::Real, libMesh::Real> _proxy_value;
47 };
virtual libMesh::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...
std::pair< libMesh::Real, libMesh::Real > _proxy_value
Extreme value and proxy value at the same point.
ExtremeType
Type of extreme value we are going to compute.
ExtremeValueBase(const InputParameters &parameters)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void computeExtremeValue()
Get the extreme value with a functor element argument.
virtual std::pair< libMesh::Real, libMesh::Real > getProxyValuePair()=0
virtual void initialize() override
Base class for user-specific data.
Definition: UserObject.h:40