www.mooseframework.org
SideFluxIntegral.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "SideFluxIntegral.h"
16 
17 template <>
20 {
22  params.addRequiredParam<MaterialPropertyName>(
23  "diffusivity",
24  "The name of the diffusivity material property that will be used in the flux computation.");
25  params.addClassDescription("Computes the integral of the flux over the specified boundary");
26  return params;
27 }
28 
31  _diffusivity(parameters.get<MaterialPropertyName>("diffusivity")),
32  _diffusion_coef(getMaterialProperty<Real>(_diffusivity))
33 {
34 }
35 
36 Real
38 {
39  return -_diffusion_coef[_qp] * _grad_u[_qp] * _normals[_qp];
40 }
InputParameters validParams< SideFluxIntegral >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpIntegral() override
const MaterialProperty< Real > & _diffusion_coef
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
SideFluxIntegral(const InputParameters &parameters)
InputParameters validParams< SideIntegralVariablePostprocessor >()
const MooseArray< Point > & _normals
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...
This postprocessor computes a volume integral of the specified variable.
const VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.