LCOV - code coverage report
Current view: top level - src/base - OpenMCBase.C (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 12 12 100.0 %
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             : 
      19             : #ifdef ENABLE_OPENMC_COUPLING
      20             : 
      21             : #include "OpenMCBase.h"
      22             : 
      23             : #include "libmesh/elem.h"
      24             : 
      25             : InputParameters
      26       12526 : OpenMCBase::validParams()
      27             : {
      28       12526 :   InputParameters params = emptyInputParameters();
      29       12526 :   return params;
      30             : }
      31             : 
      32        5811 : OpenMCBase::OpenMCBase(const ParallelParamObject * moose_object, const InputParameters & parameters)
      33        5811 :   : _openmc_problem(
      34        5811 :         dynamic_cast<OpenMCCellAverageProblem *>(&moose_object->getMooseApp().feProblem()))
      35             : {
      36        5811 :   if (!_openmc_problem)
      37           2 :     mooseError(moose_object->type() +
      38             :                " can only be used with problems of type 'OpenMCCellAverageProblem'!");
      39        5809 : }
      40             : 
      41             : Real
      42          48 : OpenMCBase::stdev(const double & mean, const double & sum_sq, unsigned int realizations) const
      43             : {
      44             :   return realizations > 1
      45          96 :              ? std::sqrt(std::max(0.0, (sum_sq / realizations - mean * mean) / (realizations - 1)))
      46          48 :              : 0.0;
      47             : }
      48             : 
      49             : #endif

Generated by: LCOV version 1.14