SlaveConstraint::SlaveConstraint(const std::string & name, InputParameters parameters) : DiracKernel(name, parameters), _component(getParam<unsigned int>("component")), _model(contactModel(getParam<std::string>("model"))), _formulation(contactFormulation(getParam<std::string>("formulation"))), _normalize_penalty(getParam<bool>("normalize_penalty")), _penetration_locator(getPenetrationLocator(getParam<BoundaryName>("master"), getParam<BoundaryName>("boundary"), Utility::string_to_enum<Order>(getParam<MooseEnum>("order")))), _penalty(getParam<Real>("penalty")), _friction_coefficient(getParam<Real>("friction_coefficient")), _residual_copy(_sys.residualGhosted()), _x_var(coupled("disp_x")), _y_var(isCoupled("disp_y") ? coupled("disp_y") : libMesh::invalid_uint), _z_var(isCoupled("disp_z") ? coupled("disp_z") : libMesh::invalid_uint), _vars(_x_var, _y_var, _z_var), _mesh_dimension(_mesh.dimension()), _nodal_area_var(getVar("nodal_area", 0)), _aux_system(_nodal_area_var->sys()), _aux_solution(_aux_system.currentSolution()) { if (parameters.isParamValid("tangential_tolerance")) { _penetration_locator.setTangentialTolerance(getParam<Real>("tangential_tolerance")); } if (parameters.isParamValid("normal_smoothing_distance")) { _penetration_locator.setNormalSmoothingDistance(getParam<Real>("normal_smoothing_distance")); } if (parameters.isParamValid("normal_smoothing_method")) { _penetration_locator.setNormalSmoothingMethod(parameters.get<std::string>("normal_smoothing_method")); } }
MechanicalContactConstraint::MechanicalContactConstraint(const std::string & name, InputParameters parameters) : NodeFaceConstraint(name, parameters), _component(getParam<unsigned int>("component")), _model(contactModel(getParam<std::string>("model"))), _formulation(contactFormulation(getParam<std::string>("formulation"))), _penalty(getParam<Real>("penalty")), _friction_coefficient(getParam<Real>("friction_coefficient")), _tension_release(getParam<Real>("tension_release")), _update_contact_set(true), _time_last_called(-std::numeric_limits<Real>::max()), _residual_copy(_sys.residualGhosted()), _x_var(isCoupled("disp_x") ? coupled("disp_x") : 99999), _y_var(isCoupled("disp_y") ? coupled("disp_y") : 99999), _z_var(isCoupled("disp_z") ? coupled("disp_z") : 99999), _mesh_dimension(_mesh.dimension()), _vars(_x_var, _y_var, _z_var), _nodal_area_var(getVar("nodal_area", 0)), _aux_system( _nodal_area_var->sys() ), _aux_solution( _aux_system.currentSolution() ) { _overwrite_slave_residual = false; if (parameters.isParamValid("tangential_tolerance")) _penetration_locator.setTangentialTolerance(getParam<Real>("tangential_tolerance")); if (parameters.isParamValid("normal_smoothing_distance")) _penetration_locator.setNormalSmoothingDistance(getParam<Real>("normal_smoothing_distance")); if (parameters.isParamValid("normal_smoothing_method")) _penetration_locator.setNormalSmoothingMethod(parameters.get<std::string>("normal_smoothing_method")); _penetration_locator.setUpdate(false); }
GluedContactConstraint::GluedContactConstraint(const InputParameters & parameters) : SparsityBasedContactConstraint(parameters), _component(getParam<unsigned int>("component")), _model(contactModel(getParam<std::string>("model"))), _formulation(contactFormulation(getParam<std::string>("formulation"))), _penalty(getParam<Real>("penalty")), _friction_coefficient(getParam<Real>("friction_coefficient")), _tension_release(getParam<Real>("tension_release")), _updateContactSet(true), _residual_copy(_sys.residualGhosted()), _x_var(isCoupled("disp_x") ? coupled("disp_x") : libMesh::invalid_uint), _y_var(isCoupled("disp_y") ? coupled("disp_y") : libMesh::invalid_uint), _z_var(isCoupled("disp_z") ? coupled("disp_z") : libMesh::invalid_uint), _vars(_x_var, _y_var, _z_var), _nodal_area_var(getVar("nodal_area", 0)), _aux_system(_nodal_area_var->sys()), _aux_solution(_aux_system.currentSolution()) { // _overwrite_slave_residual = false; if (parameters.isParamValid("tangential_tolerance")) { _penetration_locator.setTangentialTolerance(getParam<Real>("tangential_tolerance")); } if (parameters.isParamValid("normal_smoothing_distance")) { _penetration_locator.setNormalSmoothingDistance(getParam<Real>("normal_smoothing_distance")); } if (parameters.isParamValid("normal_smoothing_method")) { _penetration_locator.setNormalSmoothingMethod(parameters.get<std::string>("normal_smoothing_method")); } _penetration_locator.setUpdate(false); }
MultiDContactConstraint::MultiDContactConstraint(const InputParameters & parameters) : NodeFaceConstraint(parameters), _residual_copy(_sys.residualGhosted()), _jacobian_update(getParam<bool>("jacobian_update")), _component(getParam<unsigned int>("component")), _model(contactModel(getParam<std::string>("model"))), _penalty(getParam<Real>("penalty")), _x_var(isCoupled("disp_x") ? coupled("disp_x") : libMesh::invalid_uint), _y_var(isCoupled("disp_y") ? coupled("disp_y") : libMesh::invalid_uint), _z_var(isCoupled("disp_z") ? coupled("disp_z") : libMesh::invalid_uint), _mesh_dimension(_mesh.dimension()), _vars(_x_var, _y_var, _z_var) { _overwrite_slave_residual = false; }
ContactMaster::ContactMaster(const std::string & name, InputParameters parameters) : DiracKernel(name, parameters), _component(getParam<unsigned int>("component")), _model(contactModel(getParam<std::string>("model"))), _formulation(contactFormulation(getParam<std::string>("formulation"))), _normalize_penalty(getParam<bool>("normalize_penalty")), _penetration_locator(getPenetrationLocator(getParam<BoundaryName>("boundary"), getParam<BoundaryName>("slave"), Utility::string_to_enum<Order>(getParam<MooseEnum>("order")))), _penalty(getParam<Real>("penalty")), _friction_coefficient(getParam<Real>("friction_coefficient")), _tension_release(getParam<Real>("tension_release")), _updateContactSet(true), _time_last_called(-std::numeric_limits<Real>::max()), _residual_copy(_sys.residualGhosted()), _x_var(isCoupled("disp_x") ? coupled("disp_x") : 99999), _y_var(isCoupled("disp_y") ? coupled("disp_y") : 99999), _z_var(isCoupled("disp_z") ? coupled("disp_z") : 99999), _mesh_dimension(_mesh.dimension()), _vars(_x_var, _y_var, _z_var), _nodal_area_var(getVar("nodal_area", 0)), _aux_system( _nodal_area_var->sys() ), _aux_solution( _aux_system.currentSolution() ) { if (parameters.isParamValid("tangential_tolerance")) { _penetration_locator.setTangentialTolerance(getParam<Real>("tangential_tolerance")); } if (parameters.isParamValid("normal_smoothing_distance")) { _penetration_locator.setNormalSmoothingDistance(getParam<Real>("normal_smoothing_distance")); } if (parameters.isParamValid("normal_smoothing_method")) { _penetration_locator.setNormalSmoothingMethod(parameters.get<std::string>("normal_smoothing_method")); } if (_model == CM_GLUED || (_model == CM_COULOMB && _formulation == CF_DEFAULT)) { _penetration_locator.setUpdate(false); } if (_friction_coefficient < 0) { mooseError("The friction coefficient must be nonnegative"); } }
MechanicalContactConstraint::MechanicalContactConstraint(const InputParameters & parameters) : NodeFaceConstraint(parameters), _component(getParam<unsigned int>("component")), _model(contactModel(getParam<std::string>("model"))), _formulation(contactFormulation(getParam<std::string>("formulation"))), _normalize_penalty(getParam<bool>("normalize_penalty")), _penalty(getParam<Real>("penalty")), _friction_coefficient(getParam<Real>("friction_coefficient")), _tension_release(getParam<Real>("tension_release")), _capture_tolerance(getParam<Real>("capture_tolerance")), _update_contact_set(true), _residual_copy(_sys.residualGhosted()), _x_var(isCoupled("disp_x") ? coupled("disp_x") : libMesh::invalid_uint), _y_var(isCoupled("disp_y") ? coupled("disp_y") : libMesh::invalid_uint), _z_var(isCoupled("disp_z") ? coupled("disp_z") : libMesh::invalid_uint), _mesh_dimension(_mesh.dimension()), _vars(_x_var, _y_var, _z_var), _nodal_area_var(getVar("nodal_area", 0)), _aux_system(_nodal_area_var->sys()), _aux_solution(_aux_system.currentSolution()), _master_slave_jacobian(getParam<bool>("master_slave_jacobian")), _connected_slave_nodes_jacobian(getParam<bool>("connected_slave_nodes_jacobian")), _non_displacement_vars_jacobian(getParam<bool>("non_displacement_variables_jacobian")) { _overwrite_slave_residual = false; if (parameters.isParamValid("tangential_tolerance")) _penetration_locator.setTangentialTolerance(getParam<Real>("tangential_tolerance")); if (parameters.isParamValid("normal_smoothing_distance")) _penetration_locator.setNormalSmoothingDistance(getParam<Real>("normal_smoothing_distance")); if (parameters.isParamValid("normal_smoothing_method")) _penetration_locator.setNormalSmoothingMethod(parameters.get<std::string>("normal_smoothing_method")); if (_model == CM_GLUED || (_model == CM_COULOMB && _formulation == CF_KINEMATIC)) _penetration_locator.setUpdate(false); if (_friction_coefficient < 0) mooseError("The friction coefficient must be nonnegative"); }