LCOV - code coverage report
Current view: top level - include/mfem/auxkernels - MFEMComplexAuxKernel.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 1 2 50.0 %
Date: 2026-05-29 20:35:17 Functions: 1 3 33.3 %
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             : #ifdef MOOSE_MFEM_ENABLED
      11             : 
      12             : #pragma once
      13             : 
      14             : #include "MFEMExecutedObject.h"
      15             : #include "MFEMContainers.h"
      16             : 
      17             : /**
      18             :  * Class to construct an auxiliary solver used to update a complex auxvariable.
      19             :  */
      20             : class MFEMComplexAuxKernel : public MFEMExecutedObject
      21             : {
      22             : public:
      23             :   static InputParameters validParams();
      24             : 
      25             :   MFEMComplexAuxKernel(const InputParameters & parameters);
      26          20 :   virtual ~MFEMComplexAuxKernel() = default;
      27             : 
      28             :   /// Method called to update any owned objects upon an FE space update
      29           0 :   virtual void update() {};
      30             : 
      31             :   virtual std::optional<std::string> suppliedVariableName() const override;
      32             : 
      33             :   /// Method to add a scaled complex variable to another complex variable.
      34             :   void complexAdd(mfem::ParComplexGridFunction & a,
      35             :                   const mfem::ParComplexGridFunction & b,
      36             :                   const std::complex<mfem::real_t> scale = {1.0, 0.0});
      37             : 
      38             :   /// Method to scale a complex variable by a complex constant.
      39             :   void complexScale(mfem::ParComplexGridFunction & a,
      40             :                     const std::complex<mfem::real_t> scale = {1.0, 0.0});
      41             : 
      42             : protected:
      43             :   /// Name of complex auxvariable to store the result of the auxkernel in.
      44             :   const AuxVariableName _result_var_name;
      45             : 
      46             :   /// Reference to result complex gridfunction.
      47             :   mfem::ParComplexGridFunction & _result_var;
      48             : 
      49             :   /// Counter to keep track of FE space updates
      50             :   long _sequence{0};
      51             : };
      52             : 
      53             : #endif

Generated by: LCOV version 1.14