www.mooseframework.org
src
postprocessors
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
registerMooseObject
(
"MooseApp"
,
NodalMaxValue
);
16
17
defineLegacyParams
(
NodalMaxValue
);
18
19
InputParameters
20
NodalMaxValue::validParams
()
21
{
22
InputParameters
params =
NodalVariablePostprocessor::validParams
();
23
return
params;
24
}
25
26
NodalMaxValue::NodalMaxValue
(
const
InputParameters
& parameters)
27
:
NodalVariablePostprocessor
(parameters), _value(-
std
::numeric_limits<Real>::max())
28
{
29
}
30
31
void
32
NodalMaxValue::initialize
()
33
{
34
_value
= -std::numeric_limits<Real>::max();
35
}
36
37
void
38
NodalMaxValue::execute
()
39
{
40
_value
= std::max(
_value
,
_u
[
_qp
]);
41
}
42
43
Real
44
NodalMaxValue::getValue
()
45
{
46
gatherMax
(
_value
);
47
return
_value
;
48
}
49
50
void
51
NodalMaxValue::threadJoin
(
const
UserObject
& y)
52
{
53
const
NodalMaxValue
& pps = static_cast<const NodalMaxValue &>(y);
54
_value
= std::max(
_value
, pps.
_value
);
55
}
NodalMaxValue
This class computes a maximum (over all the nodal values) of the coupled variable.
Definition:
NodalMaxValue.h:24
NodalMaxValue::NodalMaxValue
NodalMaxValue(const InputParameters ¶meters)
Definition:
NodalMaxValue.C:26
NodalMaxValue::getValue
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
Definition:
NodalMaxValue.C:44
NodalUserObject::_qp
const unsigned int _qp
Quadrature point index.
Definition:
NodalUserObject.h:57
NodalVariablePostprocessor::validParams
static InputParameters validParams()
Definition:
NodalVariablePostprocessor.C:18
NodalMaxValue::execute
virtual void execute() override
Execute method.
Definition:
NodalMaxValue.C:38
NodalMaxValue::threadJoin
virtual void threadJoin(const UserObject &y) override
Must override.
Definition:
NodalMaxValue.C:51
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition:
InputParameters.h:53
NodalVariablePostprocessor
This is a base class for other classes which compute post-processed values based on nodal solution va...
Definition:
NodalVariablePostprocessor.h:26
registerMooseObject
registerMooseObject("MooseApp", NodalMaxValue)
NodalMaxValue::validParams
static InputParameters validParams()
Definition:
NodalMaxValue.C:20
UserObject
Base class for user-specific data.
Definition:
UserObject.h:38
UserObject::gatherMax
void gatherMax(T &value)
Definition:
UserObject.h:113
defineLegacyParams
defineLegacyParams(NodalMaxValue)
std
Definition:
TheWarehouse.h:80
NodalVariablePostprocessor::_u
const VariableValue & _u
Holds the solution at current quadrature points.
Definition:
NodalVariablePostprocessor.h:35
NodalMaxValue::_value
Real _value
Definition:
NodalMaxValue.h:37
NodalMaxValue::initialize
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition:
NodalMaxValue.C:32
NodalMaxValue.h
Generated on Sat Jan 25 2020 11:56:11 for www.mooseframework.org by
1.8.16