LCOV - code coverage report
Current view: top level - src/auxkernels - TagMatrixAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 12 13 92.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 "TagMatrixAux.h"
      11             : #include "libmesh/utility.h"
      12             : 
      13             : registerMooseObject("MooseApp", TagMatrixAux);
      14             : 
      15             : InputParameters
      16       14613 : TagMatrixAux::validParams()
      17             : {
      18       14613 :   InputParameters params = TagAuxBase<AuxKernel>::validParams();
      19       14613 :   params.addParam<TagName>("matrix_tag", "TagName", "Tag Name this Aux works on");
      20       14613 :   params.addClassDescription("Couple the diagonal of a tag matrix, and return its nodal value");
      21       14613 :   return params;
      22           0 : }
      23             : 
      24         180 : TagMatrixAux::TagMatrixAux(const InputParameters & parameters)
      25             :   : TagAuxBase<AuxKernel>(parameters),
      26         180 :     _v(coupledMatrixTagValue("v", "matrix_tag")),
      27         360 :     _v_var(*getVarHelper<MooseVariableField<Real>>("v", 0))
      28             : {
      29         180 :   checkCoupledVariable(&_v_var, &_var);
      30         180 : }
      31             : 
      32             : Real
      33       55440 : TagMatrixAux::computeValue()
      34             : {
      35       55440 :   return _scaled ? _v[_qp] : _v[_qp] / _v_var.scalingFactor();
      36             : }

Generated by: LCOV version 1.14