LCOV - code coverage report
Current view: top level - include/mfem/bcs - MFEMRWTE10IntegratedBC.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 14 14 100.0 %
Date: 2026-05-29 20:35:17 Functions: 5 5 100.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             : #ifdef MOOSE_MFEM_ENABLED
      11             : 
      12             : #pragma once
      13             : 
      14             : #include "MFEMComplexIntegratedBC.h"
      15             : 
      16             : class MFEMRWTE10IntegratedBC : public MFEMComplexIntegratedBC
      17             : {
      18             : public:
      19             :   static InputParameters validParams();
      20             : 
      21             :   MFEMRWTE10IntegratedBC(const InputParameters & parameters);
      22             : 
      23             :   void RWTE10(const mfem::Vector & x, std::vector<std::complex<mfem::real_t>> & E);
      24             :   void RWTE10Real(const mfem::Vector & x, mfem::Vector & v);
      25             :   void RWTE10Imag(const mfem::Vector & x, mfem::Vector & v);
      26             : 
      27          12 :   virtual mfem::LinearFormIntegrator * getRealLFIntegrator() override
      28             :   {
      29          36 :     return (getParam<bool>("input_port") ? new mfem::VectorFEBoundaryTangentLFIntegrator(*_u_real)
      30          24 :                                          : nullptr);
      31             :   }
      32          12 :   virtual mfem::LinearFormIntegrator * getImagLFIntegrator() override
      33             :   {
      34          36 :     return (getParam<bool>("input_port") ? new mfem::VectorFEBoundaryTangentLFIntegrator(*_u_imag)
      35          24 :                                          : nullptr);
      36             :   }
      37          12 :   virtual mfem::BilinearFormIntegrator * getRealBFIntegrator() override { return nullptr; }
      38          12 :   virtual mfem::BilinearFormIntegrator * getImagBFIntegrator() override
      39             :   {
      40          12 :     return new mfem::VectorFEMassIntegrator(_robin_coef_im.get());
      41             :   }
      42             : 
      43             :   /// Computes the unit vector in the direction of the cross product of two 3d vectors
      44        2472 :   mfem::Vector normalizedCrossProduct(const mfem::Vector & va, const mfem::Vector & vb)
      45             :   {
      46        2472 :     mfem::Vector vec;
      47        2472 :     va.cross3D(vb, vec);
      48        4944 :     return vec /= vec.Norml2();
      49        2472 :   }
      50             : 
      51             : protected:
      52             :   mfem::real_t _mu;
      53             :   mfem::real_t _epsilon;
      54             :   mfem::real_t _omega;
      55             : 
      56             :   mfem::Vector _a1;
      57             :   mfem::Vector _a2;
      58             : 
      59             :   mfem::real_t _k0;
      60             :   mfem::real_t _kc;
      61             :   std::complex<mfem::real_t> _k;
      62             : 
      63             :   mfem::Vector _k_c;
      64             :   mfem::Vector _k_a;
      65             : 
      66             :   std::unique_ptr<mfem::ConstantCoefficient> _robin_coef_im{nullptr};
      67             :   std::unique_ptr<mfem::VectorFunctionCoefficient> _u_real{nullptr};
      68             :   std::unique_ptr<mfem::VectorFunctionCoefficient> _u_imag{nullptr};
      69             : };
      70             : 
      71             : #endif

Generated by: LCOV version 1.14