LCOV - code coverage report
Current view: top level - src/auxscalarkernels - QuotientScalarAux.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 "QuotientScalarAux.h"
      11             : 
      12             : registerMooseObject("MooseApp", QuotientScalarAux);
      13             : 
      14             : InputParameters
      15       14290 : QuotientScalarAux::validParams()
      16             : {
      17       14290 :   InputParameters params = AuxScalarKernel::validParams();
      18       14290 :   params.addClassDescription("Compute the ratio of two scalar variables.");
      19       14290 :   params.addCoupledVar("numerator", "The upstairs of the quotient variable");
      20       14290 :   params.addCoupledVar("denominator", "The downstairs of the quotient variable");
      21             : 
      22       14290 :   return params;
      23           0 : }
      24             : 
      25          13 : QuotientScalarAux::QuotientScalarAux(const InputParameters & parameters)
      26             :   : AuxScalarKernel(parameters),
      27          13 :     _a(coupledScalarValue("numerator")),
      28          26 :     _b(coupledScalarValue("denominator"))
      29             : {
      30          13 : }
      31             : 
      32             : Real
      33          22 : QuotientScalarAux::computeValue()
      34             : {
      35          22 :   return _a[0] / _b[0];
      36             : }

Generated by: LCOV version 1.14