LCOV - code coverage report
Current view: top level - src/auxkernels - ArrayVariableComponent.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 7323e9 Lines: 12 13 92.3 %
Date: 2025-11-05 20:01:15 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 "ArrayVariableComponent.h"
      11             : 
      12             : registerMooseObject("MooseApp", ArrayVariableComponent);
      13             : 
      14             : InputParameters
      15       15017 : ArrayVariableComponent::validParams()
      16             : {
      17       15017 :   InputParameters params = AuxKernel::validParams();
      18       60068 :   params.addRequiredCoupledVar("array_variable", "The name of the array variable");
      19       60068 :   params.addParam<unsigned int>("component", 0, "Component of the array variable to be extracted");
      20       15017 :   params.addClassDescription("Copy a component of an array variable.");
      21       15017 :   return params;
      22           0 : }
      23             : 
      24          78 : ArrayVariableComponent::ArrayVariableComponent(const InputParameters & parameters)
      25             :   : AuxKernel(parameters),
      26          78 :     _u(coupledArrayValue("array_variable")),
      27         234 :     _component(getParam<unsigned int>("component"))
      28             : {
      29          78 : }
      30             : 
      31             : Real
      32        4020 : ArrayVariableComponent::computeValue()
      33             : {
      34        4020 :   return _u[_qp](_component);
      35             : }

Generated by: LCOV version 1.14