www.mooseframework.org
NodalMaxValue.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "NodalMaxValue.h"
16 
17 #include <algorithm>
18 #include <limits>
19 
20 template <>
23 {
25  return params;
26 }
27 
29  : NodalVariablePostprocessor(parameters), _value(-std::numeric_limits<Real>::max())
30 {
31 }
32 
33 void
35 {
36  _value = -std::numeric_limits<Real>::max();
37 }
38 
39 void
41 {
42  _value = std::max(_value, _u[_qp]);
43 }
44 
45 Real
47 {
49  return _value;
50 }
51 
52 void
54 {
55  const NodalMaxValue & pps = static_cast<const NodalMaxValue &>(y);
56  _value = std::max(_value, pps._value);
57 }
InputParameters validParams< NodalMaxValue >()
Definition: NodalMaxValue.C:22
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:40
void gatherMax(T &value)
Definition: UserObject.h:125
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:28
const unsigned int _qp
Quadrature point index.
This class computes a maximum (over all the nodal values) of the coupled variable.
Definition: NodalMaxValue.h:30
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
Definition: NodalMaxValue.C:46
InputParameters validParams< NodalVariablePostprocessor >()
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition: NodalMaxValue.C:34
virtual void threadJoin(const UserObject &y) override
Must override.
Definition: NodalMaxValue.C:53
Base class for user-specific data.
Definition: UserObject.h:42