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 "XFEMMovingInterfaceVelocityBase.h" 11 : 12 : InputParameters 13 24 : XFEMMovingInterfaceVelocityBase::validParams() 14 : { 15 24 : InputParameters params = DiscreteElementUserObject::validParams(); 16 48 : params.addRequiredParam<UserObjectName>( 17 : "value_at_interface_uo", 18 : "The name of the userobject that obtains the value and gradient at the interface."); 19 24 : return params; 20 0 : } 21 : 22 12 : XFEMMovingInterfaceVelocityBase::XFEMMovingInterfaceVelocityBase(const InputParameters & parameters) 23 12 : : DiscreteElementUserObject(parameters) 24 : { 25 12 : } 26 : 27 : void 28 12 : XFEMMovingInterfaceVelocityBase::initialize() 29 : { 30 : const UserObject * uo = 31 24 : &(_fe_problem.getUserObjectBase(getParam<UserObjectName>("value_at_interface_uo"))); 32 : 33 12 : if (dynamic_cast<const NodeValueAtXFEMInterface *>(uo) == nullptr) 34 0 : mooseError("UserObject casting to NodeValueAtXFEMInterface in XFEMMovingInterfaceVelocity"); 35 : 36 12 : _value_at_interface_uo = dynamic_cast<const NodeValueAtXFEMInterface *>(uo); 37 12 : }