https://mooseframework.inl.gov
InterfaceIntegralPostprocessor.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 
16 {
18  params.addClassDescription(
19  "Postprocessor class adding basic capabilities to compute an integral over an interface. "
20  "This class is still abstract, refer to InterfaceIntegralVariableValuePostprocessor for a "
21  "derived class example");
22  return params;
23 }
24 
26  : InterfacePostprocessor(parameters), _qp(0), _integral_value(0)
27 {
28 }
29 
30 void
32 {
34  _integral_value = 0;
35 }
36 
37 void
39 {
42 }
43 
44 Real
46 {
47  return _integral_value;
48 }
49 
50 void
52 {
54  const auto & pps = static_cast<const InterfaceIntegralPostprocessor &>(y);
55  _integral_value += pps._integral_value;
56 }
57 
58 Real
60 {
61  Real sum = 0;
62  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
63  sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
64  return sum;
65 }
66 
67 void
69 {
72 }
virtual void execute() override
Execute method.
BASE CLASS FOR IMPLEMENTING INTERFACE POSTRPOCESSOR ALL INTERFACE POSTPROCESOR SHOULD DERIVE FROM THI...
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void finalize() override
Finalize.
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const MooseArray< Real > & _JxW
const MooseArray< Real > & _coord
virtual void threadJoin(const UserObject &y) override
Must override.
virtual Real computeQpIntegral()=0
void gatherSum(T &value)
Gather the parallel sum of the variable passed in.
Definition: UserObject.h:126
virtual void execute() override
Execute method.
InterfaceIntegralPostprocessor(const InputParameters &parameters)
This postprocessor add generel capabilities to the InterfacePostprocessor to compute an integral over...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void finalize() override
Finalize.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Base class for user-specific data.
Definition: UserObject.h:40
virtual void threadJoin(const UserObject &y) override
Must override.