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 : }