www.mooseframework.org
LayeredSideIntegral.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 "LayeredSideIntegral.h"
16 
17 template <>
20 {
22  params += validParams<LayeredBase>();
23  return params;
24 }
25 
27  : SideIntegralVariableUserObject(parameters), LayeredBase(parameters)
28 {
29 }
30 
31 void
33 {
36 }
37 
38 void
40 {
41  Real integral_value = computeIntegral();
42 
43  unsigned int layer = getLayer(_current_elem->centroid());
44 
45  setLayerValue(layer, getLayerValue(layer) + integral_value);
46 }
47 
48 void
50 {
52 }
53 
54 void
56 {
59 }
LayeredSideIntegral(const InputParameters &parameters)
virtual void execute() override
Execute method.
virtual unsigned int getLayer(Point p) const
Helper function to return the layer the point lies in.
Definition: LayeredBase.C:263
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual void threadJoin(const UserObject &y)
Definition: LayeredBase.C:254
virtual void finalize() override
virtual Real getLayerValue(unsigned int layer) const
Get the value for a given layer.
Definition: LayeredBase.C:218
InputParameters validParams< LayeredSideIntegral >()
void setLayerValue(unsigned int layer, Real value)
Set the value for a particular layer.
Definition: LayeredBase.C:303
virtual void initialize()
Definition: LayeredBase.C:226
virtual void finalize()
Definition: LayeredBase.C:236
InputParameters validParams< LayeredBase >()
Definition: LayeredBase.C:28
This UserObject computes volume integrals of a variable storing partial sums for the specified number...
Definition: LayeredBase.h:44
const Elem *& _current_elem
virtual void threadJoin(const UserObject &y) override
virtual void initialize() override
InputParameters validParams< SideIntegralVariableUserObject >()
virtual void threadJoin(const UserObject &y) override
Must override.
Base class for user-specific data.
Definition: UserObject.h:42
This postprocessor computes a volume integral of the specified variable.