LCOV - code coverage report
Current view: top level - src/postprocessors - ElementVariablePostprocessor.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 14 15 93.3 %
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 "ElementVariablePostprocessor.h"
      11             : #include "MooseVariable.h"
      12             : #include "SubProblem.h"
      13             : #include "MooseTypes.h"
      14             : 
      15             : #include "libmesh/quadrature.h"
      16             : 
      17             : InputParameters
      18       15980 : ElementVariablePostprocessor::validParams()
      19             : {
      20       15980 :   InputParameters params = ElementPostprocessor::validParams();
      21       15980 :   params.addRequiredCoupledVar("variable",
      22             :                                "The name of the variable that this postprocessor operates on");
      23       15980 :   return params;
      24           0 : }
      25             : 
      26         875 : 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         875 :     _u(coupledValue("variable")),
      34         875 :     _grad_u(coupledGradient("variable")),
      35         875 :     _qp(0)
      36             : {
      37         875 :   addMooseVariableDependency(&mooseVariableField());
      38         875 : }
      39             : 
      40             : void
      41      132860 : ElementVariablePostprocessor::execute()
      42             : {
      43      662040 :   for (_qp = 0; _qp < _qrule->n_points(); _qp++)
      44      529180 :     computeQpValue();
      45      132860 : }

Generated by: LCOV version 1.14