20 #include "libmesh/quadrature.h" 30 "Stabilization parameter in Nitsche's formulation and penalty factor " 31 "in the Penalty Method. In Nitsche's formulation this should be as " 32 "small as possible while the method is still stable; while in the " 33 "Penalty Method you want this to be quite large (e.g. 1e6).");
34 params.
addParam<FunctionName>(
"jump", 0,
"Jump at the interface. Can be a Real or FunctionName.");
36 "jump_flux", 0,
"Flux jump at the interface. Can be a Real or FunctionName.");
38 "geometric_cut_userobject",
39 "Name of GeometricCutUserObject associated with this constraint.");
43 "Use the Penalty instead of Nitsche (Nitsche only works for simple diffusion problems).");
44 params.
addClassDescription(
"Enforce constraints on the value or flux associated with a variable " 45 "at an XFEM interface.");
51 _alpha(getParam<
Real>(
"alpha")),
52 _jump(getFunction(
"jump")),
53 _jump_flux(getFunction(
"jump_flux")),
54 _use_penalty(getParam<bool>(
"use_penalty"))
58 mooseError(
"Problem casting to XFEM in XFEMSingleVariableConstraint");
63 if (dynamic_cast<const GeometricCutUserObject *>(uo) ==
nullptr)
64 mooseError(
"UserObject casting to GeometricCutUserObject in XFEMSingleVariableConstraint");
66 _interface_id =
_xfem->getGeometricCutID(dynamic_cast<const GeometricCutUserObject *>(uo));
virtual Real computeQpJacobian(Moose::DGJacobianType type) override
std::shared_ptr< XFEM > _xfem
Pointer to the XFEM controller object.
FEProblemBase & _fe_problem
const VariablePhiGradient & _grad_phi_neighbor
unsigned int _interface_id
const Function & _jump_flux
Change in flux of variable value at the interface.
const VariableValue & _u_neighbor
Real _alpha
Stabilization parameter in Nitsche's formulation and penalty factor in the Penalty Method...
registerMooseObject("XFEMApp", XFEMSingleVariableConstraint)
XFEMSingleVariableConstraint(const InputParameters ¶meters)
const VariableTestGradient & _grad_test
static InputParameters validParams()
const VariableTestValue & _test_neighbor
static InputParameters validParams()
virtual void reinitConstraintQuadrature(const ElementPairInfo &element_pair_info)
bool _use_penalty
Use penalty formulation.
const Function & _jump
Change in variable value at the interface.
const VariableTestValue & _test
const std::string & type() const
virtual Real computeQpResidual(Moose::DGResidualType type) override
virtual ~XFEMSingleVariableConstraint()
const VariableGradient & _grad_u
const VariableGradient & _grad_u_neighbor
const VariablePhiValue & _phi_neighbor
const VariableTestGradient & _grad_test_neighbor
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariablePhiGradient & _grad_phi
std::shared_ptr< XFEMInterface > getXFEM()
void mooseError(Args &&... args) const
const VariablePhiValue & _phi
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
virtual Real value(Real t, const Point &p) const
virtual void reinitConstraintQuadrature(const ElementPairInfo &element_pair_info) override
Point _interface_normal
Vector normal to the internal interface.