www.mooseframework.org
SideIntegralPostprocessor.h
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 #pragma once
11 
12 #include "SidePostprocessor.h"
13 
21 {
22 public:
24 
26 
27  virtual void initialSetup() override;
28  virtual void initialize() override;
29  virtual void execute() override;
30  virtual void finalize() override;
31  virtual Real getValue() const override;
32  virtual void threadJoin(const UserObject & y) override;
33 
34 protected:
35  virtual Real computeQpIntegral() = 0;
36  virtual Real computeFaceInfoIntegral(const FaceInfo * /* fi */)
37  {
38  mooseError("Integral over faces have not been implemented for this postprocessor");
39  };
40  virtual Real computeIntegral();
41 
45  virtual void errorNoFaceInfo() const
46  {
47  mooseError("Face info integration was specified, but the mesh contains no face info objects.");
48  }
49 
51  unsigned int _qp;
52 
55 
58 };
SideIntegralPostprocessor(const InputParameters &parameters)
bool _qp_integration
Whether to integrate over quadrature points or FaceInfos.
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _qp
The local quadrature point index when computing an integral over quadrature points.
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:35
virtual Real computeFaceInfoIntegral(const FaceInfo *)
This postprocessor computes a surface integral of the specified variable on a sideset on the boundary...
virtual void errorNoFaceInfo() const
Error method to call when face info is needed but not available.
virtual void finalize() override
This is called after execute() and after threadJoin()! This is probably where you want to do MPI comm...
Base class for postprocessors executed on one or more sidesets.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
virtual void threadJoin(const UserObject &y) override
Must override.
virtual Real computeQpIntegral()=0
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void execute() override
Execute method.
Real _integral_value
Holds the postprocessor result, the integral.
Base class for user-specific data.
Definition: UserObject.h:39