LCOV - code coverage report
Current view: top level - src/criticality - OpenMCMaterialSearch.C (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: ddd5f2 Lines: 10 11 90.9 %
Date: 2026-06-07 19:35:24 Functions: 2 2 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 "OpenMCMaterialSearch.h"
      22             : #include "UserErrorChecking.h"
      23             : #include "openmc/capi.h"
      24             : 
      25             : InputParameters
      26          70 : OpenMCMaterialSearch::validParams()
      27             : {
      28          70 :   auto params = CriticalitySearchBase::validParams();
      29         140 :   params.addRequiredParam<int32_t>("material_id", "Material ID to modify");
      30          70 :   params.addClassDescription(
      31             :       "Base class for criticality searches using the properties of a material");
      32          70 :   return params;
      33           0 : }
      34             : 
      35          40 : OpenMCMaterialSearch::OpenMCMaterialSearch(const InputParameters & parameters)
      36          78 :   : CriticalitySearchBase(parameters), _material_id(getParam<int32_t>("material_id"))
      37             : {
      38          38 :   int err = openmc_get_material_index(_material_id, &_material_index);
      39          38 :   catchOpenMCError(err, "get index for material with ID " + std::to_string(_material_id));
      40          38 : }
      41             : 
      42             : #endif

Generated by: LCOV version 1.14