LCOV - code coverage report
Current view: top level - src/auxkernels - ArrayVariableComponent.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 12 13 92.3 %
Date: 2026-05-29 20:35:17 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        3308 : ArrayVariableComponent::validParams()
      16             : {
      17        3308 :   InputParameters params = AuxKernel::validParams();
      18       13232 :   params.addRequiredCoupledVar("array_variable", "The name of the array variable");
      19       13232 :   params.addParam<unsigned int>("component", 0, "Component of the array variable to be extracted");
      20        3308 :   params.addClassDescription("Copy a component of an array variable.");
      21        3308 :   return params;
      22           0 : }
      23             : 
      24         129 : ArrayVariableComponent::ArrayVariableComponent(const InputParameters & parameters)
      25             :   : AuxKernel(parameters),
      26         129 :     _u(coupledArrayValue("array_variable")),
      27         387 :     _component(getParam<unsigned int>("component"))
      28             : {
      29         129 : }
      30             : 
      31             : Real
      32        5142 : ArrayVariableComponent::computeValue()
      33             : {
      34        5142 :   return _u[_qp](_component);
      35             : }

Generated by: LCOV version 1.14