www.mooseframework.org
SideIntegralPostprocessor.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 
16 
17 #include "libmesh/quadrature.h"
18 
19 template <>
22 {
24  return params;
25 }
26 
28  : SidePostprocessor(parameters), _qp(0), _integral_value(0)
29 {
30 }
31 
32 void
34 {
35  _integral_value = 0;
36 }
37 
38 void
40 {
42 }
43 
44 Real
46 {
48  return _integral_value;
49 }
50 
51 void
53 {
54  const SideIntegralPostprocessor & pps = static_cast<const SideIntegralPostprocessor &>(y);
56 }
57 
58 Real
60 {
61  Real sum = 0;
62  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
63  sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
64  return sum;
65 }
InputParameters validParams< SideIntegralPostprocessor >()
SideIntegralPostprocessor(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const MooseArray< Real > & _JxW
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.
This postprocessor computes a volume integral of the specified variable.
const MooseArray< Real > & _coord
InputParameters validParams< SidePostprocessor >()
virtual void threadJoin(const UserObject &y) override
Must override.
virtual Real computeQpIntegral()=0
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual void execute() override
Execute method.
Base class for user-specific data.
Definition: UserObject.h:42