LCOV - code coverage report
Current view: top level - src/indicators - ElementIntegralIndicator.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 12 14 85.7 %
Date: 2026-05-29 20:35:17 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        3255 : ElementIntegralIndicator::validParams()
      19             : {
      20        3255 :   InputParameters params = ElementIndicator::validParams();
      21        3255 :   return params;
      22             : }
      23             : 
      24         101 : ElementIntegralIndicator::ElementIntegralIndicator(const InputParameters & parameters)
      25         101 :   : ElementIndicator(parameters)
      26             : {
      27         101 : }
      28             : 
      29             : void
      30       33256 : ElementIntegralIndicator::computeIndicator()
      31             : {
      32       33256 :   Real sum = 0;
      33      163400 :   for (_qp = 0; _qp < _qrule->n_points(); _qp++)
      34      130144 :     sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
      35             : 
      36             :   //  sum = std::sqrt(sum);
      37             : 
      38       33256 :   _field_var.setNodalValue(sum);
      39       33256 : }
      40             : 
      41             : Real
      42           0 : ElementIntegralIndicator::computeQpIntegral()
      43             : {
      44           0 :   return _u[_qp];
      45             : }

Generated by: LCOV version 1.14