LCOV - code coverage report
Current view: top level - src/postprocessors - ElementVariablePostprocessor.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 14 15 93.3 %
Date: 2025-08-08 20:01:16 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 "ElementVariablePostprocessor.h"
      11             : #include "MooseVariable.h"
      12             : #include "SubProblem.h"
      13             : #include "MooseTypes.h"
      14             : 
      15             : #include "libmesh/quadrature.h"
      16             : 
      17             : InputParameters
      18       16110 : ElementVariablePostprocessor::validParams()
      19             : {
      20       16110 :   InputParameters params = ElementPostprocessor::validParams();
      21       16110 :   params.addRequiredCoupledVar("variable",
      22             :                                "The name of the variable that this postprocessor operates on");
      23       16110 :   return params;
      24           0 : }
      25             : 
      26         940 : ElementVariablePostprocessor::ElementVariablePostprocessor(const InputParameters & parameters)
      27             :   : ElementPostprocessor(parameters),
      28             :     MooseVariableInterface<Real>(this,
      29             :                                  false,
      30             :                                  "variable",
      31             :                                  Moose::VarKindType::VAR_ANY,
      32             :                                  Moose::VarFieldType::VAR_FIELD_STANDARD),
      33         940 :     _u(coupledValue("variable")),
      34         940 :     _grad_u(coupledGradient("variable")),
      35         940 :     _qp(0)
      36             : {
      37         940 :   addMooseVariableDependency(&mooseVariableField());
      38         940 : }
      39             : 
      40             : void
      41      151046 : ElementVariablePostprocessor::execute()
      42             : {
      43      752650 :   for (_qp = 0; _qp < _qrule->n_points(); _qp++)
      44      601604 :     computeQpValue();
      45      151046 : }

Generated by: LCOV version 1.14