LCOV - code coverage report
Current view: top level - include/transfers - NekTransferBase.h (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 1 3 33.3 %
Date: 2025-07-15 20:50:38 Functions: 0 2 0.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             : #pragma once
      20             : 
      21             : #include "MooseObject.h"
      22             : #include "PostprocessorInterface.h"
      23             : 
      24             : class NekRSProblem;
      25             : class NekRSMesh;
      26             : 
      27             : /**
      28             :  * Base class for facilitating a data transfer between MOOSE and the NekRS
      29             :  * code internals.
      30             :  */
      31             : class NekTransferBase : public MooseObject, public PostprocessorInterface
      32             : {
      33             : public:
      34             :   static InputParameters validParams();
      35             : 
      36             :   NekTransferBase(const InputParameters & parameters);
      37             : 
      38             :   /// Send data to Nek
      39           0 :   virtual void sendDataToNek() {}
      40             : 
      41             :   /// Read data from Nek
      42           0 :   virtual void readDataFromNek() {}
      43             : 
      44             :   /// Get the direction of the transfer
      45      208862 :   const MooseEnum & direction() const { return _direction; }
      46             : 
      47             : protected:
      48             :   /**
      49             :    * Add a postprocessor to facilitate coupling
      50             :    * @param[in] name postprocessor name
      51             :    * @param[in] initial initial value to use for the postprocessor
      52             :    */
      53             :   void addExternalPostprocessor(const std::string name, const Real initial);
      54             : 
      55             :   /**
      56             :    * Check if a specified slot in the usrwrk array has been allocated
      57             :    * @param[in] u slice in usrwrk array
      58             :    */
      59             :   void checkAllocatedUsrwrkSlot(const unsigned int & u) const;
      60             : 
      61             :   /// The NekRSProblem using the field transfer interface
      62             :   NekRSProblem & _nek_problem;
      63             : 
      64             :   /// The underlying NekRSMesh mirror
      65             :   NekRSMesh * _nek_mesh;
      66             : 
      67             :   /// Direction of the transfer
      68             :   const MooseEnum & _direction;
      69             : };

Generated by: LCOV version 1.14