https://mooseframework.inl.gov
Loading...
Searching...
No Matches
src
postprocessors
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
12
registerMooseObject
(
"MooseApp"
,
VariableInnerProduct
);
13
14
InputParameters
15
VariableInnerProduct::validParams
()
16
{
17
InputParameters
params =
ElementIntegralVariablePostprocessor::validParams
();
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
24
VariableInnerProduct::VariableInnerProduct
(
const
InputParameters
& parameters)
25
:
ElementIntegralVariablePostprocessor
(parameters), _v(coupledValue(
"second_variable"
))
26
{
27
}
28
29
Real
30
VariableInnerProduct::computeQpIntegral
()
31
{
32
return
_u
[
_qp
] *
_v
[
_qp
];
33
}
registerMooseObject
registerMooseObject("MooseApp", VariableInnerProduct)
VariableInnerProduct.h
ElementIntegralPostprocessor::_qp
unsigned int _qp
Definition
ElementIntegralPostprocessor.h:37
ElementIntegralVariablePostprocessor
This postprocessor computes a volume integral of the specified variable.
Definition
ElementIntegralVariablePostprocessor.h:23
ElementIntegralVariablePostprocessor::validParams
static InputParameters validParams()
Definition
ElementIntegralVariablePostprocessor.C:15
ElementIntegralVariablePostprocessor::_u
const VariableValue & _u
Holds the solution at current quadrature points.
Definition
ElementIntegralVariablePostprocessor.h:33
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition
InputParameters.h:68
InputParameters::addRequiredCoupledVar
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
Definition
InputParameters.C:317
VariableInnerProduct
Definition
VariableInnerProduct.h:15
VariableInnerProduct::VariableInnerProduct
VariableInnerProduct(const InputParameters ¶meters)
Definition
VariableInnerProduct.C:24
VariableInnerProduct::_v
const VariableValue & _v
Holds the values of second_variable at current quadrature points.
Definition
VariableInnerProduct.h:25
VariableInnerProduct::validParams
static InputParameters validParams()
Definition
VariableInnerProduct.C:15
VariableInnerProduct::computeQpIntegral
virtual Real computeQpIntegral() override
Definition
VariableInnerProduct.C:30
Generated on Fri Aug 21 2026 13:33:59 for https://mooseframework.inl.gov by
1.9.8