LCOV - code coverage report
Current view: top level - src/auxkernels - PointTransformationAux.C (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 14 15 93.3 %
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 "PointTransformationAux.h"
      22             : 
      23             : registerMooseObject("CardinalApp", PointTransformationAux);
      24             : 
      25             : InputParameters
      26          96 : PointTransformationAux::validParams()
      27             : {
      28          96 :   InputParameters params = OpenMCAuxKernel::validParams();
      29         192 :   MooseEnum direction("x y z");
      30         192 :   params.addRequiredParam<MooseEnum>(
      31             :       "component", direction, "Component to visualize with this auxiliary kernel");
      32             : 
      33          96 :   params.addClassDescription("Spatial point transformation used for points sent in/out of OpenMC");
      34          96 :   return params;
      35          96 : }
      36             : 
      37          48 : PointTransformationAux::PointTransformationAux(const InputParameters & parameters)
      38          96 :   : OpenMCAuxKernel(parameters), _d(getParam<MooseEnum>("component"))
      39             : {
      40          48 : }
      41             : 
      42             : Real
      43       49152 : PointTransformationAux::computeValue()
      44             : {
      45             :   Point pt;
      46             : 
      47       49152 :   if (!_openmc_problem->hasPointTransformations())
      48           0 :     pt = _current_elem->vertex_average();
      49             :   else
      50       49152 :     pt = _openmc_problem->transformPoint(_current_elem->vertex_average());
      51             : 
      52       49152 :   return pt(_d);
      53             : }
      54             : 
      55             : #endif

Generated by: LCOV version 1.14