https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
15class UserObject;
16class InputParameters;
17
18template <class T>
19class ExtremeValueBase : public T
20{
21public:
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
31protected:
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,
44
46 std::pair<libMesh::Real, libMesh::Real> _proxy_value;
47};
ExtremeType
Type of extreme value we are going to compute.
enum ExtremeValueBase::ExtremeType _type
virtual std::pair< libMesh::Real, libMesh::Real > getProxyValuePair()=0
virtual void initialize() override
virtual void computeExtremeValue()
Get the extreme value with a functor element argument.
std::pair< libMesh::Real, libMesh::Real > _proxy_value
Extreme value and proxy value at the same point.
virtual void finalize() override
virtual void threadJoin(const UserObject &y) override
virtual libMesh::Real getValue() const override
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Base class for user-specific data.
Definition UserObject.h:20
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real