LCOV - code coverage report
Current view: top level - src/auxkernels - ElementL2ErrorFunctionAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 10 11 90.9 %
Date: 2025-07-17 01:28:37 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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             : // MOOSE includes
      11             : #include "ElementL2ErrorFunctionAux.h"
      12             : #include "Function.h"
      13             : 
      14             : registerMooseObject("MooseApp", ElementL2ErrorFunctionAux);
      15             : 
      16             : InputParameters
      17       28580 : ElementL2ErrorFunctionAux::validParams()
      18             : {
      19       28580 :   InputParameters params = ElementLpNormAux::validParams();
      20       28580 :   params.addClassDescription("A class for computing the element-wise L^2 (Euclidean) error between "
      21             :                              "a function and a coupled variable.");
      22       28580 :   params.addRequiredParam<FunctionName>("function", "Function representing the exact solution");
      23       28580 :   return params;
      24           0 : }
      25             : 
      26          26 : ElementL2ErrorFunctionAux::ElementL2ErrorFunctionAux(const InputParameters & parameters)
      27          26 :   : ElementLpNormAux(parameters), _func(getFunction("function"))
      28             : {
      29          26 : }
      30             : 
      31             : Real
      32      179200 : ElementL2ErrorFunctionAux::computeValue()
      33             : {
      34      179200 :   return _func.value(_t, _q_point[_qp]) - _coupled_var[_qp];
      35             : }

Generated by: LCOV version 1.14