LCOV - code coverage report
Current view: top level - src/mfem/actions - AddMFEMComplexKernelComponentAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: fa5e60 Lines: 18 19 94.7 %
Date: 2026-06-24 08:03:36 Functions: 3 3 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             : #include "AddMFEMComplexKernelComponentAction.h"
      13             : 
      14             : registerMooseAction("MooseApp",
      15             :                     AddMFEMComplexKernelComponentAction,
      16             :                     "add_mfem_complex_kernel_components");
      17             : 
      18             : InputParameters
      19         147 : AddMFEMComplexKernelComponentAction::validParams()
      20             : {
      21         147 :   InputParameters params = MooseObjectAction::validParams();
      22         147 :   params.addClassDescription(
      23             :       "Add an MFEMKernel to serve as the real or imaginary component of an MFEMComplexKernel.");
      24         147 :   return params;
      25           0 : }
      26             : 
      27         119 : AddMFEMComplexKernelComponentAction::AddMFEMComplexKernelComponentAction(
      28         119 :     const InputParameters & parameters)
      29         119 :   : MooseObjectAction(parameters)
      30             : {
      31         119 : }
      32             : 
      33             : void
      34         119 : AddMFEMComplexKernelComponentAction::act()
      35             : {
      36         119 :   std::vector<std::string> elements;
      37         119 :   MooseUtils::tokenize<std::string>(_pars.blockFullpath(), elements);
      38             : 
      39         119 :   if (_problem->feBackend() == Moose::FEBackend::MFEM && _name == "RealComponent")
      40          63 :     static_cast<MFEMProblem &>(*_problem).addRealComponentToKernel(
      41          63 :         _type, elements[elements.size() - 2], _moose_object_pars);
      42          56 :   else if (_problem->feBackend() == Moose::FEBackend::MFEM && _name == "ImagComponent")
      43          56 :     static_cast<MFEMProblem &>(*_problem).addImagComponentToKernel(
      44          56 :         _type, elements[elements.size() - 2], _moose_object_pars);
      45         119 : }
      46             : 
      47             : #endif

Generated by: LCOV version 1.14