LCOV - code coverage report
Current view: top level - include/utils - SmoothTransition.h (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 1 1 100.0 %
Date: 2025-07-30 13:02:48 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #pragma once
      11             : 
      12             : #include "MooseTypes.h"
      13             : 
      14             : /**
      15             :  * Base class for smooth transitions between two functions of one variable
      16             :  */
      17             : class SmoothTransition
      18             : {
      19             : public:
      20             :   /**
      21             :    * Constructor.
      22             :    *
      23             :    * @param[in] x_center   Center point of transition
      24             :    * @param[in] transition_width   Width of transition
      25             :    */
      26             :   SmoothTransition(const Real & x_center, const Real & transition_width);
      27             : 
      28             :   /**
      29             :    * Computes the transition value
      30             :    *
      31             :    * @param[in] x    Point at which to evaluate function
      32             :    * @param[in] f1   Left function
      33             :    * @param[in] f2   Right function
      34             :    */
      35             :   virtual Real value(const Real & x, const Real & f1, const Real & f2) const = 0;
      36             : 
      37             :   /**
      38             :    * Returns the coordinate of the left end of the transition
      39             :    */
      40             :   const Real & leftEnd() const { return _x1; }
      41             : 
      42             :   /**
      43             :    * Returns the coordinate of the right end of the transition
      44             :    */
      45         120 :   const Real & rightEnd() const { return _x2; }
      46             : 
      47             : protected:
      48             :   /// Center point of transition
      49             :   const Real _x_center;
      50             :   /// Width of transition
      51             :   const Real _transition_width;
      52             : 
      53             :   /// Left end point of transition
      54             :   const Real _x1;
      55             :   /// Right end point of transition
      56             :   const Real _x2;
      57             : };

Generated by: LCOV version 1.14