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 
15 registerMooseObjectReplaced("MooseApp", NodalMaxValue, "09/27/2021 00:00", NodalExtremeValue);
16 
19 {
21  params.addClassDescription("Computes the maximum (over all the nodal values) of a variable.");
22  return params;
23 }
24 
26  : NodalVariablePostprocessor(parameters), _value(-std::numeric_limits<Real>::max())
27 {
28 }
29 
30 void
32 {
34 }
35 
36 void
38 {
40 }
41 
42 Real
44 {
45  return _value;
46 }
47 
48 void
50 {
52 }
53 
54 void
56 {
57  const auto & pps = static_cast<const NodalMaxValue &>(y);
58  _value = std::max(_value, pps._value);
59 }
registerMooseObjectReplaced("MooseApp", NodalMaxValue, "09/27/2021 00:00", NodalExtremeValue)
static InputParameters validParams()
Definition: NodalMaxValue.C:18
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)
Gather the parallel max of the variable passed in.
Definition: UserObject.h:137
virtual void finalize() override
This is called after execute() and after threadJoin()! This is probably where you want to do MPI comm...
Definition: NodalMaxValue.C:49
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
auto max(const L &left, const R &right)
A postprocessor for collecting the nodal min or max value.
const unsigned int _qp
Quadrature point index.
This class computes a maximum (over all the nodal values) of the coupled variable.
Definition: NodalMaxValue.h:18
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
Definition: NodalMaxValue.C:43
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition: NodalMaxValue.C:31
static InputParameters validParams()
virtual void threadJoin(const UserObject &y) override
Must override.
Definition: NodalMaxValue.C:55
Base class for user-specific data.
Definition: UserObject.h:39