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 "ElementSidesL2Norm.h" 11 : 12 : registerMooseObject("MooseApp", ElementSidesL2Norm); 13 : 14 : InputParameters 15 14336 : ElementSidesL2Norm::validParams() 16 : { 17 14336 : InputParameters params = InternalSideIntegralVariablePostprocessor::validParams(); 18 14336 : params.addClassDescription("Computes the L2 norm of a variable over element sides."); 19 14336 : return params; 20 0 : } 21 : 22 37 : ElementSidesL2Norm::ElementSidesL2Norm(const InputParameters & parameters) 23 37 : : InternalSideIntegralVariablePostprocessor(parameters) 24 : { 25 37 : } 26 : 27 : Real 28 32 : ElementSidesL2Norm::getValue() const 29 : { 30 32 : return std::sqrt(InternalSideIntegralVariablePostprocessor::getValue()); 31 : } 32 : 33 : Real 34 924 : ElementSidesL2Norm::computeQpIntegral() 35 : { 36 924 : auto & u = _u[_qp]; 37 924 : return u * u; 38 : }