LCOV - code coverage report
Current view: top level - include/userobjects - OpenMCNuclideDensities.h (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 3 3 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             : #pragma once
      20             : 
      21             : #include "GeneralUserObject.h"
      22             : 
      23             : #include "OpenMCBase.h"
      24             : 
      25             : /**
      26             :  * User object to modify the nuclide densities in an OpenMC material.
      27             :  */
      28             : class OpenMCNuclideDensities : public GeneralUserObject, public OpenMCBase
      29             : {
      30             : public:
      31             :   static InputParameters validParams();
      32             : 
      33             :   OpenMCNuclideDensities(const InputParameters & parameters);
      34             : 
      35          40 :   virtual void initialize() {}
      36          40 :   virtual void finalize() {}
      37          40 :   virtual void execute() {}
      38             : 
      39             :   /// Instead, we want to have a separate method that we can call from the OpenMC problem
      40             :   virtual void setValue();
      41             : 
      42             : protected:
      43             :   /// The material ID
      44             :   const int32_t & _material_id;
      45             : 
      46             :   /// The material index
      47             :   int32_t _material_index;
      48             : 
      49             :   /// Nuclide names
      50             :   const std::vector<std::string> & _names;
      51             : 
      52             :   /// Nuclide densities
      53             :   const std::vector<double> & _densities;
      54             : };

Generated by: LCOV version 1.14