LCOV - code coverage report
Current view: top level - src/filters - AngularLegendreFilter.C (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 13 14 92.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             : 
      19             : #ifdef ENABLE_OPENMC_COUPLING
      20             : 
      21             : #include "AngularLegendreFilter.h"
      22             : 
      23             : #include "openmc/tallies/filter_legendre.h"
      24             : 
      25             : registerMooseObject("CardinalApp", AngularLegendreFilter);
      26             : 
      27             : InputParameters
      28         188 : AngularLegendreFilter::validParams()
      29             : {
      30         188 :   auto params = FilterBase::validParams();
      31         188 :   params.addClassDescription(
      32             :       "A class which provides a thin wrapper around an OpenMC LegendreFilter.");
      33         376 :   params.addRequiredParam<unsigned int>("order", "The order of the Legendre expansion.");
      34             : 
      35         188 :   return params;
      36           0 : }
      37             : 
      38          94 : AngularLegendreFilter::AngularLegendreFilter(const InputParameters & parameters)
      39         188 :   : FilterBase(parameters), _order(getParam<unsigned int>("order"))
      40             : {
      41          94 :   auto legendre_filter = dynamic_cast<openmc::LegendreFilter *>(openmc::Filter::create("legendre"));
      42             : 
      43          94 :   legendre_filter->set_order(_order);
      44          94 :   _filter = legendre_filter;
      45          94 : }
      46             : 
      47             : std::string
      48         520 : AngularLegendreFilter::binName(unsigned int bin_index) const
      49             : {
      50        1040 :   return "l" + Moose::stringify(bin_index);
      51             : }
      52             : 
      53             : #endif

Generated by: LCOV version 1.14