LCOV - code coverage report
Current view: top level - src/postprocessors - ElementHCurlSemiError.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 18 19 94.7 %
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             : #include "ElementHCurlSemiError.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("MooseApp", ElementHCurlSemiError);
      14             : 
      15             : InputParameters
      16       28630 : ElementHCurlSemiError::validParams()
      17             : {
      18       28630 :   InputParameters params = ElementVectorL2Error::validParams();
      19       28630 :   params.addClassDescription("Returns the H(curl)-seminorm of the difference between a pair of "
      20             :                              "computed and analytical vector-valued solutions.");
      21       28630 :   params.addRequiredParam<FunctionName>("function",
      22             :                                         "The vector analytical solution to compare against");
      23       28630 :   params.addRequiredCoupledVar("variable", "The vector FE solution");
      24       28630 :   params.suppressParameter<FunctionName>("function_x");
      25       28630 :   params.suppressParameter<FunctionName>("function_y");
      26       28630 :   params.suppressParameter<FunctionName>("function_z");
      27       28630 :   params.suppressParameter<std::vector<VariableName>>("var_x");
      28       28630 :   params.suppressParameter<std::vector<VariableName>>("var_y");
      29       28630 :   params.suppressParameter<std::vector<VariableName>>("var_z");
      30       28630 :   return params;
      31           0 : }
      32             : 
      33          52 : ElementHCurlSemiError::ElementHCurlSemiError(const InputParameters & parameters)
      34             :   : ElementVectorL2Error(parameters),
      35          52 :     _u_var(*getVectorVar("variable", 0)),
      36         104 :     _curl_u(_u_var.curlSln())
      37             : {
      38          52 : }
      39             : 
      40             : Real
      41       41600 : ElementHCurlSemiError::computeQpIntegral()
      42             : {
      43       41600 :   return (_curl_u[_qp] - _func.curl(_t, _q_point[_qp])).norm_sq();
      44             : }

Generated by: LCOV version 1.14