https://mooseframework.inl.gov
Loading...
Searching...
No Matches
InternalSideIntegralPostprocessor.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 const InputParameters & parameters)
23 : InternalSidePostprocessor(parameters), _qp(0), _integral_value(0), _qp_integration(true)
24{
25}
26
27void
32
33void
38
39Real
44
45void
47{
48 const auto & pps = static_cast<const InternalSideIntegralPostprocessor &>(y);
50}
51
52Real
54{
55 Real sum = 0;
57 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
58 sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
59 else
60 {
61 // Finite volume functors integration is over FaceInfo, not quadrature points
63
64 for (auto & fi : _face_infos)
65 sum += fi->faceArea() * fi->faceCoord() * computeFaceInfoIntegral(fi);
66 }
67 return sum;
68}
69
70void
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
This postprocessor computes a surface integral of the specified variable on internal sides of the mes...
virtual void threadJoin(const UserObject &y) override
Must override.
bool _qp_integration
Whether to integrate over quadrature points or FaceInfos.
Real _integral_value
Holds the postprocessor result, the integral.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual Real computeFaceInfoIntegral(const FaceInfo *)
unsigned int _qp
The local quadrature point index when computing an integral over quadrature points.
virtual void execute() override
Execute method.
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
InternalSideIntegralPostprocessor(const InputParameters &parameters)
static InputParameters validParams()
void getFaceInfos()
Computes the local FaceInfo(s) to use in functor arguments and interpolations.
std::vector< const FaceInfo * > _face_infos
Holds the FaceInfos to loop on to consider all active neighbors of an element on a given side.
const QBase *const & _qrule
const MooseArray< Real > & _JxW
const MooseArray< Real > & _coord
void gatherSum(T &value)
Gather the parallel sum of the variable passed in.
Base class for user-specific data.
Definition UserObject.h:20