LCOV - code coverage report
Current view: top level - src/postprocessors - NekSideExtremeValue.C (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 17 20 85.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             : #ifdef ENABLE_NEK_COUPLING
      20             : 
      21             : #include "NekSideExtremeValue.h"
      22             : 
      23             : registerMooseObject("CardinalApp", NekSideExtremeValue);
      24             : 
      25             : InputParameters
      26        2248 : NekSideExtremeValue::validParams()
      27             : {
      28        2248 :   InputParameters params = NekSideFieldPostprocessor::validParams();
      29        4496 :   params.addParam<MooseEnum>(
      30             :       "value_type",
      31        4496 :       getOperationEnum(),
      32             :       "Whether to give the maximum or minimum extreme value");
      33        2248 :   params.addClassDescription(
      34             :       "Extreme value (max/min) of a field over a boundary of the NekRS mesh");
      35        2248 :   return params;
      36           0 : }
      37             : 
      38         681 : NekSideExtremeValue::NekSideExtremeValue(const InputParameters & parameters)
      39             :   : NekSideFieldPostprocessor(parameters),
      40        1362 :     _type(getParam<MooseEnum>("value_type").getEnum<operation::OperationEnum>())
      41             : {
      42         681 :   if (_field == field::velocity_component)
      43           1 :     mooseError("Setting 'field = velocity_component' is not yet implemented!");
      44         680 : }
      45             : 
      46             : Real
      47       24812 : NekSideExtremeValue::getValue() const
      48             : {
      49       24812 :   switch (_type)
      50             :   {
      51       12406 :     case operation::max:
      52       12406 :       return nekrs::sideExtremeValue(_boundary, _field, _pp_mesh, true /* max */);
      53             :       break;
      54       12406 :     case operation::min:
      55       12406 :       return nekrs::sideExtremeValue(_boundary, _field, _pp_mesh, false /* min */);
      56             :       break;
      57           0 :     default:
      58           0 :       mooseError("Unhandled 'OperationEnum'!");
      59             :   }
      60             : }
      61             : 
      62             : #endif

Generated by: LCOV version 1.14