LCOV - code coverage report
Current view: top level - src/auxkernels - CutSubdomainIDAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose xfem: #31405 (292dce) with base fef103 Lines: 11 13 84.6 %
Date: 2025-09-04 07:58:55 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             : #include "CutSubdomainIDAux.h"
      11             : 
      12             : #include "XFEM.h"
      13             : 
      14             : registerMooseObject("XFEMApp", CutSubdomainIDAux);
      15             : 
      16             : InputParameters
      17          64 : CutSubdomainIDAux::validParams()
      18             : {
      19          64 :   InputParameters params = AuxKernel::validParams();
      20          64 :   params.addClassDescription("Fill the elemental variable with CutSubdomainID");
      21         128 :   params.addRequiredParam<UserObjectName>(
      22             :       "cut", "The geometric cut userobject that assigns the CutSubdomainID");
      23          64 :   return params;
      24           0 : }
      25             : 
      26          32 : CutSubdomainIDAux::CutSubdomainIDAux(const InputParameters & parameters)
      27          32 :   : AuxKernel(parameters), _cut(&getUserObject<GeometricCutUserObject>("cut"))
      28             : {
      29          32 :   if (isNodal())
      30           0 :     mooseError("CutSubdomainIDAux can only be run on an element variable");
      31          32 : }
      32             : 
      33             : Real
      34        1305 : CutSubdomainIDAux::computeValue()
      35             : {
      36        1305 :   return _cut->getCutSubdomainID(_current_elem);
      37             : }

Generated by: LCOV version 1.14