LCOV - code coverage report
Current view: top level - src/mfem/actions - AddMFEMSubMeshAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 12 14 85.7 %
Date: 2025-08-08 20:01:16 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 "AddMFEMSubMeshAction.h"
      13             : 
      14             : registerMooseAction("MooseApp", AddMFEMSubMeshAction, "add_mfem_submeshes");
      15             : 
      16             : InputParameters
      17         144 : AddMFEMSubMeshAction::validParams()
      18             : {
      19         144 :   InputParameters params = MooseObjectAction::validParams();
      20         144 :   params.addClassDescription("Add a MFEM SubMesh object to the simulation.");
      21         144 :   return params;
      22           0 : }
      23             : 
      24          24 : AddMFEMSubMeshAction::AddMFEMSubMeshAction(const InputParameters & parameters)
      25          24 :   : MooseObjectAction(parameters)
      26             : {
      27          24 : }
      28             : 
      29             : void
      30          24 : AddMFEMSubMeshAction::act()
      31             : {
      32          24 :   MFEMProblem * mfem_problem = dynamic_cast<MFEMProblem *>(_problem.get());
      33          24 :   if (mfem_problem)
      34          24 :     mfem_problem->addSubMesh(_type, _name, _moose_object_pars);
      35             :   else
      36           0 :     mooseError("Cannot add SubMeshes unless an MFEMProblem is in use.");
      37          24 : }
      38             : 
      39             : #endif

Generated by: LCOV version 1.14