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 "ElementL2Norm.h" 11 : 12 : registerMooseObject("MooseApp", ElementL2Norm); 13 : 14 : InputParameters 15 17030 : ElementL2Norm::validParams() 16 : { 17 17030 : InputParameters params = ElementIntegralVariablePostprocessor::validParams(); 18 17030 : return params; 19 : } 20 : 21 1441 : ElementL2Norm::ElementL2Norm(const InputParameters & parameters) 22 1441 : : ElementIntegralVariablePostprocessor(parameters) 23 : { 24 1441 : } 25 : 26 : Real 27 30243 : ElementL2Norm::getValue() const 28 : { 29 30243 : return std::sqrt(ElementIntegralVariablePostprocessor::getValue()); 30 : } 31 : 32 : Real 33 8412472 : ElementL2Norm::computeQpIntegral() 34 : { 35 8412472 : Real val = _u[_qp]; 36 8412472 : return val * val; 37 : }