www.mooseframework.org
NodalMaxValue.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "NodalMaxValue.h"
11 
12 #include <algorithm>
13 #include <limits>
14 
16 
17 template <>
20 {
22  return params;
23 }
24 
26  : NodalVariablePostprocessor(parameters), _value(-std::numeric_limits<Real>::max())
27 {
28 }
29 
30 void
32 {
33  _value = -std::numeric_limits<Real>::max();
34 }
35 
36 void
38 {
39  _value = std::max(_value, _u[_qp]);
40 }
41 
42 Real
44 {
46  return _value;
47 }
48 
49 void
51 {
52  const NodalMaxValue & pps = static_cast<const NodalMaxValue &>(y);
53  _value = std::max(_value, pps._value);
54 }
InputParameters validParams< NodalMaxValue >()
Definition: NodalMaxValue.C:19
This is a base class for other classes which compute post-processed values based on nodal solution va...
virtual void execute() override
Execute method.
Definition: NodalMaxValue.C:37
void gatherMax(T &value)
Definition: UserObject.h:109
const VariableValue & _u
Holds the solution at current quadrature points.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
NodalMaxValue(const InputParameters &parameters)
Definition: NodalMaxValue.C:25
registerMooseObject("MooseApp", NodalMaxValue)
const unsigned int _qp
Quadrature point index.
This class computes a maximum (over all the nodal values) of the coupled variable.
Definition: NodalMaxValue.h:24
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
Definition: NodalMaxValue.C:43
InputParameters validParams< NodalVariablePostprocessor >()
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition: NodalMaxValue.C:31
virtual void threadJoin(const UserObject &y) override
Must override.
Definition: NodalMaxValue.C:50
Base class for user-specific data.
Definition: UserObject.h:37