Line data Source code
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 : 10 : #pragma once 11 : 12 : #include "InternalSidePostprocessor.h" 13 : 14 : /** 15 : * This postprocessor computes a surface integral of the specified variable on 16 : * internal sides of the mesh. 17 : * Note that specializations of this integral are possible by deriving from this 18 : * class and overriding computeQpIntegral(). 19 : */ 20 : class InternalSideIntegralPostprocessor : public InternalSidePostprocessor 21 : { 22 : public: 23 : static InputParameters validParams(); 24 : 25 : InternalSideIntegralPostprocessor(const InputParameters & parameters); 26 : 27 : virtual void initialize() override; 28 : virtual void execute() override; 29 : virtual void finalize() override; 30 : virtual Real getValue() const override; 31 : virtual void threadJoin(const UserObject & y) override; 32 : 33 : protected: 34 : virtual Real computeQpIntegral() = 0; 35 0 : virtual Real computeFaceInfoIntegral(const FaceInfo * /* fi */) 36 : { 37 0 : mooseError("Integral over faces have not been implemented for this postprocessor"); 38 : }; 39 : virtual Real computeIntegral(); 40 : 41 : /// The local quadrature point index when computing an integral over quadrature points 42 : unsigned int _qp; 43 : 44 : /// Holds the postprocessor result, the integral 45 : Real _integral_value; 46 : 47 : /// Whether to integrate over quadrature points or FaceInfos 48 : bool _qp_integration; 49 : };