https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SideIntegralUserObject.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
11
12#include "libmesh/quadrature.h"
13
20
22 : SideUserObject(parameters), _qp(0), _integral_value(0)
23{
24}
25
26void
31
32void
37
38void
43
44Real
49
50void
52{
53 const auto & pps = static_cast<const SideIntegralUserObject &>(y);
55}
56
57Real
59{
60 Real sum = 0;
61 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
62 sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
63 return sum;
64}
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
This postprocessor computes a side integral of the specified variable over a given boundary.
virtual void execute() override
Execute method.
virtual Real computeQpIntegral()=0
virtual void threadJoin(const UserObject &y) override
Must override.
virtual void finalize() override
Finalize.
SideIntegralUserObject(const InputParameters &parameters)
static InputParameters validParams()
virtual Real getValue() const
Returns the integral value.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Base class for user objects executed one or more sidesets, which may be on the outer boundary of the ...
static InputParameters validParams()
const MooseArray< Real > & _coord
const QBase *const & _qrule
const MooseArray< Real > & _JxW
void gatherSum(T &value)
Gather the parallel sum of the variable passed in.
Base class for user-specific data.
Definition UserObject.h:20