https://mooseframework.inl.gov
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
}
VariableInnerProduct::VariableInnerProduct
VariableInnerProduct(const InputParameters ¶meters)
Definition:
VariableInnerProduct.C:24
ElementIntegralVariablePostprocessor
This postprocessor computes a volume integral of the specified variable.
Definition:
ElementIntegralVariablePostprocessor.h:21
ElementIntegralPostprocessor::_qp
unsigned int _qp
Definition:
ElementIntegralPostprocessor.h:37
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Definition:
InputParameters.h:66
VariableInnerProduct::computeQpIntegral
virtual Real computeQpIntegral() override
Definition:
VariableInnerProduct.C:30
ElementIntegralVariablePostprocessor::_u
const VariableValue & _u
Holds the solution at current quadrature points.
Definition:
ElementIntegralVariablePostprocessor.h:33
ElementIntegralVariablePostprocessor::validParams
static InputParameters validParams()
Definition:
ElementIntegralVariablePostprocessor.C:15
InputParameters::addRequiredCoupledVar
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
Definition:
InputParameters.C:321
Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject
registerMooseObject("MooseApp", VariableInnerProduct)
VariableInnerProduct::validParams
static InputParameters validParams()
Definition:
VariableInnerProduct.C:15
VariableInnerProduct::_v
const VariableValue & _v
Holds the values of second_variable at current quadrature points.
Definition:
VariableInnerProduct.h:25
VariableInnerProduct
Definition:
VariableInnerProduct.h:14
VariableInnerProduct.h
Generated on Thu Jul 17 2025 01:32:15 for https://mooseframework.inl.gov by
1.8.14