LCOV - code coverage report
Current view: top level - src/mfem/submeshes - MFEMDomainSubMesh.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 909fe5 Lines: 14 15 93.3 %
Date: 2025-08-29 20:01:24 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 "MFEMDomainSubMesh.h"
      13             : #include "MFEMProblem.h"
      14             : 
      15             : registerMooseObject("MooseApp", MFEMDomainSubMesh);
      16             : 
      17             : InputParameters
      18        8672 : MFEMDomainSubMesh::validParams()
      19             : {
      20        8672 :   InputParameters params = MFEMSubMesh::validParams();
      21        8672 :   params += MFEMBlockRestrictable::validParams();
      22        8672 :   params.addClassDescription("Class to construct an MFEMSubMesh formed from the subspace of the "
      23             :                              "parent mesh restricted to the set of user-specified subdomains.");
      24        8672 :   return params;
      25           0 : }
      26             : 
      27          21 : MFEMDomainSubMesh::MFEMDomainSubMesh(const InputParameters & parameters)
      28             :   : MFEMSubMesh(parameters),
      29          21 :     MFEMBlockRestrictable(parameters, getMFEMProblem().mesh().getMFEMParMesh())
      30             : {
      31          21 : }
      32             : 
      33             : void
      34          21 : MFEMDomainSubMesh::buildSubMesh()
      35             : {
      36          42 :   _submesh = std::make_shared<mfem::ParSubMesh>(
      37          63 :       mfem::ParSubMesh::CreateFromDomain(getMesh(), getSubdomainAttributes()));
      38          21 :   _submesh->attribute_sets.attr_sets = getMesh().attribute_sets.attr_sets;
      39          21 :   _submesh->bdr_attribute_sets.attr_sets = getMesh().bdr_attribute_sets.attr_sets;
      40          21 : }
      41             : 
      42             : #endif

Generated by: LCOV version 1.14