LCOV - code coverage report
Current view: top level - src/indicators - ElementIntegralIndicator.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 12 14 85.7 %
Date: 2025-07-17 01:28:37 Functions: 3 4 75.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 "ElementIntegralIndicator.h"
      11             : 
      12             : // MOOSE includes
      13             : #include "MooseVariableFE.h"
      14             : 
      15             : #include "libmesh/quadrature.h"
      16             : 
      17             : InputParameters
      18       14461 : ElementIntegralIndicator::validParams()
      19             : {
      20       14461 :   InputParameters params = ElementIndicator::validParams();
      21       14461 :   return params;
      22             : }
      23             : 
      24         102 : ElementIntegralIndicator::ElementIntegralIndicator(const InputParameters & parameters)
      25         102 :   : ElementIndicator(parameters)
      26             : {
      27         102 : }
      28             : 
      29             : void
      30       36956 : ElementIntegralIndicator::computeIndicator()
      31             : {
      32       36956 :   Real sum = 0;
      33      181900 :   for (_qp = 0; _qp < _qrule->n_points(); _qp++)
      34      144944 :     sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
      35             : 
      36             :   //  sum = std::sqrt(sum);
      37             : 
      38       36956 :   _field_var.setNodalValue(sum);
      39       36956 : }
      40             : 
      41             : Real
      42           0 : ElementIntegralIndicator::computeQpIntegral()
      43             : {
      44           0 :   return _u[_qp];
      45             : }

Generated by: LCOV version 1.14