https://mooseframework.inl.gov
xfem
src
auxkernels
CutSubdomainIDAux.C
Go to the documentation of this file.
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
CutSubdomainIDAux::validParams
()
18
{
19
InputParameters
params =
AuxKernel::validParams
();
20
params.
addClassDescription
(
"Fill the elemental variable with CutSubdomainID"
);
21
params.
addRequiredParam
<UserObjectName>(
22
"cut"
,
"The geometric cut userobject that assigns the CutSubdomainID"
);
23
return
params;
24
}
25
26
CutSubdomainIDAux::CutSubdomainIDAux
(
const
InputParameters
& parameters)
27
:
AuxKernel
(parameters), _cut(&getUserObject<
GeometricCutUserObject
>(
"cut"
))
28
{
29
if
(
isNodal
())
30
mooseError
(
"CutSubdomainIDAux can only be run on an element variable"
);
31
}
32
33
Real
34
CutSubdomainIDAux::computeValue
()
35
{
36
return
_cut
->
getCutSubdomainID
(
_current_elem
);
37
}
CutSubdomainIDAux::computeValue
virtual Real computeValue()
Definition:
CutSubdomainIDAux.C:34
CutSubdomainIDAux::validParams
static InputParameters validParams()
Definition:
CutSubdomainIDAux.C:17
XFEM.h
CutSubdomainIDAux.h
InputParameters::addRequiredParam
void addRequiredParam(const std::string &name, const std::string &doc_string)
InputParameters
CutSubdomainIDAux::CutSubdomainIDAux
CutSubdomainIDAux(const InputParameters ¶meters)
Definition:
CutSubdomainIDAux.C:26
GeometricCutUserObject
Definition:
GeometricCutUserObject.h:101
GeometricCutUserObject::getCutSubdomainID
virtual CutSubdomainID getCutSubdomainID(const Node *) const
Get CutSubdomainID telling which side the node belongs to relative to the cut.
Definition:
GeometricCutUserObject.h:183
Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
AuxKernelTempl< Real >::mooseError
void mooseError(Args &&... args) const
AuxKernelTempl< Real >::_current_elem
const Elem *const & _current_elem
InputParameters::addClassDescription
void addClassDescription(const std::string &doc_string)
AuxKernelTempl< Real >::validParams
static InputParameters validParams()
AuxKernelTempl< Real >
CutSubdomainIDAux::_cut
const GeometricCutUserObject * _cut
Pointer to the GeometricCutUserObject.
Definition:
CutSubdomainIDAux.h:29
CutSubdomainIDAux
Definition:
CutSubdomainIDAux.h:17
registerMooseObject
registerMooseObject("XFEMApp", CutSubdomainIDAux)
AuxKernelTempl< Real >::isNodal
bool isNodal() const
Generated on Fri Jul 18 2025 13:44:05 for https://mooseframework.inl.gov by
1.8.14