LCOV - code coverage report
Current view: top level - src/postprocessors - Reactivity.C (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 8 9 88.9 %
Date: 2025-07-15 20:50:38 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /********************************************************************/
       2             : /*                  SOFTWARE COPYRIGHT NOTIFICATION                 */
       3             : /*                             Cardinal                             */
       4             : /*                                                                  */
       5             : /*                  (c) 2021 UChicago Argonne, LLC                  */
       6             : /*                        ALL RIGHTS RESERVED                       */
       7             : /*                                                                  */
       8             : /*                 Prepared by UChicago Argonne, LLC                */
       9             : /*               Under Contract No. DE-AC02-06CH11357               */
      10             : /*                With the U. S. Department of Energy               */
      11             : /*                                                                  */
      12             : /*             Prepared by Battelle Energy Alliance, LLC            */
      13             : /*               Under Contract No. DE-AC07-05ID14517               */
      14             : /*                With the U. S. Department of Energy               */
      15             : /*                                                                  */
      16             : /*                 See LICENSE for full restrictions                */
      17             : /********************************************************************/
      18             : #ifdef ENABLE_OPENMC_COUPLING
      19             : 
      20             : #include "Reactivity.h"
      21             : 
      22             : registerMooseObject("CardinalApp", Reactivity);
      23             : 
      24             : InputParameters
      25          96 : Reactivity::validParams()
      26             : {
      27          96 :   InputParameters params = KEigenvalue::validParams();
      28          96 :   params.addClassDescription("Calculate the reactivity based on the k-effective value.");
      29          96 :   return params;
      30           0 : }
      31             : 
      32          32 : Reactivity::Reactivity(const InputParameters & parameters) : KEigenvalue(parameters) {}
      33             : 
      34             : Real
      35          32 : Reactivity::getValue() const
      36             : {
      37             :   // Fetch the k-effective value using the parent class's getValue() method.
      38          32 :   Real k_effective = KEigenvalue::getValue();
      39             : 
      40             :   // Calculate and return the reactivity.
      41          32 :   return (k_effective - 1.0) / k_effective;
      42             : }
      43             : #endif

Generated by: LCOV version 1.14