Line data Source code
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 14340 : VariableInnerProduct::validParams() 16 : { 17 14340 : InputParameters params = ElementIntegralVariablePostprocessor::validParams(); 18 14340 : params.addRequiredCoupledVar( 19 : "second_variable", 20 : "The name of the second variable in the inner product (variable, second_variable)"); 21 14340 : return params; 22 0 : } 23 : 24 39 : VariableInnerProduct::VariableInnerProduct(const InputParameters & parameters) 25 39 : : ElementIntegralVariablePostprocessor(parameters), _v(coupledValue("second_variable")) 26 : { 27 39 : } 28 : 29 : Real 30 2176 : VariableInnerProduct::computeQpIntegral() 31 : { 32 2176 : return _u[_qp] * _v[_qp]; 33 : }