https://mooseframework.inl.gov
VariableInnerProduct.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 
10 #include "VariableInnerProduct.h"
11 
13 
16 {
18  params.addRequiredCoupledVar(
19  "second_variable",
20  "The name of the second variable in the inner product (variable, second_variable)");
21  return params;
22 }
23 
25  : ElementIntegralVariablePostprocessor(parameters), _v(coupledValue("second_variable"))
26 {
27 }
28 
29 Real
31 {
32  return _u[_qp] * _v[_qp];
33 }
VariableInnerProduct(const InputParameters &parameters)
This postprocessor computes a volume integral of the specified variable.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpIntegral() override
const VariableValue & _u
Holds the solution at current quadrature points.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("MooseApp", VariableInnerProduct)
static InputParameters validParams()
const VariableValue & _v
Holds the values of second_variable at current quadrature points.