www.mooseframework.org
ElementAverageValue.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 "ElementAverageValue.h"
16 
17 template <>
20 {
22  return params;
23 }
24 
26  : ElementIntegralVariablePostprocessor(parameters), _volume(0)
27 {
28 }
29 
30 void
32 {
34  _volume = 0;
35 }
36 
37 void
39 {
41 
43 }
44 
45 Real
47 {
49 
51 
52  return integral / _volume;
53 }
54 
55 void
57 {
59  const ElementAverageValue & pps = static_cast<const ElementAverageValue &>(y);
60  _volume += pps._volume;
61 }
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
This postprocessor computes a volume integral of the specified variable.
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const Real & _current_elem_volume
The current element volume (available during execute())
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.
void gatherSum(T &value)
Gather the parallel sum of the variable passed in.
Definition: UserObject.h:119
virtual void execute() override
Execute method.
InputParameters validParams< ElementAverageValue >()
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
InputParameters validParams< ElementIntegralVariablePostprocessor >()
ElementAverageValue(const InputParameters &parameters)
This postprocessor computes a volume integral of the specified variable.
virtual void execute() override
Execute method.
virtual void threadJoin(const UserObject &y) override
Must override.
Base class for user-specific data.
Definition: UserObject.h:42