LCOV - code coverage report
Current view: top level - src/auxkernels - MaterialRealCMMAux.C (source / functions) Hit Total Coverage
Test: idaholab/mastodon: 55510a Lines: 13 15 86.7 %
Date: 2025-08-26 23:09:31 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*************************************************/
       2             : /*           DO NOT MODIFY THIS HEADER           */
       3             : /*                                               */
       4             : /*                     MASTODON                  */
       5             : /*                                               */
       6             : /*    (c) 2015 Battelle Energy Alliance, LLC     */
       7             : /*            ALL RIGHTS RESERVED                */
       8             : /*                                               */
       9             : /*   Prepared by Battelle Energy Alliance, LLC   */
      10             : /*     With the U. S. Department of Energy       */
      11             : /*                                               */
      12             : /*     See COPYRIGHT for full restrictions       */
      13             : /*************************************************/
      14             : 
      15             : #include "MaterialRealCMMAux.h"
      16             : 
      17             : registerMooseObject("MastodonApp", MaterialRealCMMAux);
      18             : 
      19             : InputParameters
      20         132 : MaterialRealCMMAux::validParams()
      21             : {
      22         132 :   InputParameters params = MaterialAuxBase<>::validParams();
      23         132 :   params.addClassDescription(
      24             :       "Populate an auxiliary variable with an entry from a ColumnMajorMatrix material property.");
      25         264 :   params.addParam<unsigned int>("row", 0, "The row component to consider for this kernel");
      26         264 :   params.addParam<unsigned int>("column", 0, "The column component to consider for this kernel");
      27         132 :   return params;
      28           0 : }
      29             : 
      30          66 : MaterialRealCMMAux::MaterialRealCMMAux(const InputParameters & parameters)
      31             :   : MaterialAuxBase<ColumnMajorMatrix>(parameters),
      32          66 :     _row(getParam<unsigned int>("row")),
      33         198 :     _col(getParam<unsigned int>("column"))
      34             : {
      35          66 : }
      36             : 
      37             : Real
      38       12800 : MaterialRealCMMAux::getRealValue()
      39             : {
      40       12800 :   if (_row >= _prop[_qp].n() || _col >= _prop[_qp].m())
      41           0 :     mooseError("In ", name(), " the row or column parameter is out of bounds.");
      42       12800 :   return _prop[_qp](_row, _col);
      43             : }

Generated by: LCOV version 1.14