LCOV - code coverage report
Current view: top level - src/userobjects - NekBinnedPlaneAverage.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_NEK_COUPLING
      20             : 
      21             : #include "NekBinnedPlaneAverage.h"
      22             : 
      23             : registerMooseObject("CardinalApp", NekBinnedPlaneAverage);
      24             : 
      25             : InputParameters
      26          81 : NekBinnedPlaneAverage::validParams()
      27             : {
      28          81 :   InputParameters params = NekPlaneSpatialBinUserObject::validParams();
      29          81 :   params.addClassDescription(
      30             :       "Compute the spatially-binned side average of a field over the NekRS mesh");
      31          81 :   return params;
      32           0 : }
      33             : 
      34          41 : NekBinnedPlaneAverage::NekBinnedPlaneAverage(const InputParameters & parameters)
      35          41 :   : NekBinnedPlaneIntegral(parameters)
      36             : {
      37          40 : }
      38             : 
      39             : void
      40          40 : NekBinnedPlaneAverage::executeUserObject()
      41             : {
      42          40 :   computeIntegral();
      43             : 
      44             :   // divide by the bin volume if accessible; otherwise, we know that there weren't any counts,
      45             :   // and the bin value will remain zero
      46        5000 :   for (unsigned int i = 0; i < num_bins(); ++i)
      47        4960 :     if (_bin_volumes[i] > 0.0)
      48        4960 :       _bin_values[i] /= _bin_volumes[i];
      49          40 : }
      50             : 
      51             : #endif

Generated by: LCOV version 1.14