www.mooseframework.org
LayeredIntegral.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 "LayeredIntegral.h"
11 
12 #include "libmesh/mesh_tools.h"
13 
15 
16 template <>
19 {
21  params += validParams<LayeredBase>();
22  return params;
23 }
24 
26  : ElementIntegralVariableUserObject(parameters), LayeredBase(parameters)
27 {
28 }
29 
30 void
32 {
35 }
36 
37 void
39 {
40  Real integral_value = computeIntegral();
41 
42  unsigned int layer = getLayer(_current_elem->centroid());
43 
44  setLayerValue(layer, getLayerValue(layer) + integral_value);
45 }
46 
47 void
49 {
51 }
52 
53 void
55 {
58 }
This UserObject computes volume integrals of a variable storing partial sums for the specified number...
registerMooseObject("MooseApp", LayeredIntegral)
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< LayeredIntegral >()
virtual void threadJoin(const UserObject &y)
Definition: LayeredBase.C:274
virtual void execute() override
Execute method.
virtual void initialize() override
virtual Real getLayerValue(unsigned int layer) const
Get the value for a given layer.
Definition: LayeredBase.C:235
InputParameters validParams< ElementIntegralVariableUserObject >()
void setLayerValue(unsigned int layer, Real value)
Set the value for a particular layer.
Definition: LayeredBase.C:323
virtual void initialize()
Definition: LayeredBase.C:243
virtual void finalize()
Definition: LayeredBase.C:256
InputParameters validParams< LayeredBase >()
Definition: LayeredBase.C:23
const Elem *const & _current_elem
The current element pointer (available during execute())
virtual unsigned int getLayer(Point p) const
Helper function to return the layer the point lies in.
Definition: LayeredBase.C:283
This UserObject (????? this isn&#39;t a userobject) computes volume integrals of a variable storing parti...
Definition: LayeredBase.h:40
virtual void threadJoin(const UserObject &y) override
This postprocessor computes a volume integral of the specified variable.
LayeredIntegral(const InputParameters &parameters)
Base class for user-specific data.
Definition: UserObject.h:37
virtual void threadJoin(const UserObject &y) override
Must override.
virtual void finalize() override