www.mooseframework.org
SideAverageValue.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 "SideAverageValue.h"
16 
17 template <>
20 {
22  params.addClassDescription("Computes the average value of a variable on a "
23  "sideset. Note that this cannot be used on the "
24  "centerline of an axisymmetric model.");
25  return params;
26 }
27 
29  : SideIntegralVariablePostprocessor(parameters), _volume(0)
30 {
31 }
32 
33 void
35 {
37  _volume = 0;
38 }
39 
40 void
42 {
44  _volume += volume();
45 }
46 
47 Real
49 {
52  return integral / _volume;
53 }
54 
55 Real
57 {
58  return _current_side_volume;
59 }
60 
61 void
63 {
65  const SideAverageValue & pps = static_cast<const SideAverageValue &>(y);
66  _volume += pps._volume;
67 }
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void execute() override
Execute method.
This postprocessor computes a volume integral of the specified variable.
InputParameters validParams< SideAverageValue >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
SideAverageValue(const InputParameters &parameters)
const Real & _current_side_volume
void gatherSum(T &value)
Gather the parallel sum of the variable passed in.
Definition: UserObject.h:119
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
InputParameters validParams< SideIntegralVariablePostprocessor >()
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual void threadJoin(const UserObject &y) override
Must override.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
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 void execute() override
Execute method.
virtual void threadJoin(const UserObject &y) override
Must override.
virtual Real volume()
Base class for user-specific data.
Definition: UserObject.h:42
This postprocessor computes a volume integral of the specified variable.