21 params.
addClassDescription(
"Promotes fully-damaged CZM interface segments into new sidesets.");
24 "CZM damage AuxVariable (0 = intact, 1 = fully broken), valid on "
25 "the secondary lower-dimensional mortar block.");
27 "threshold", 1.0 - 1e-10,
"Damage at or above which a face considered is fully separated.");
29 "cohesive_zone_userobject",
"The mortar cohesive-zone UserObject for this interface.");
31 "Primary side of the CZM mortar interface.");
33 "Secondary side of the CZM mortar interface.");
35 "Primary lower-dimensional mortar block.");
37 "Secondary lower-dimensional mortar block.");
39 "Boundary to populate with fully-damaged primary faces.");
41 "Boundary to populate with fully-damaged secondary faces.");
42 params.
set<
bool>(
"use_displaced_mesh") =
true;
50 _damage(coupledValue(
"damage_variable")),
51 _threshold(getParam<Real>(
"threshold")),
52 _czm_userobject_name(getParam<UserObjectName>(
"cohesive_zone_userobject")),
53 _primary_boundary_id(_mesh.getBoundaryID(getParam<BoundaryName>(
"primary_boundary"))),
54 _secondary_boundary_id(_mesh.getBoundaryID(getParam<BoundaryName>(
"secondary_boundary"))),
55 _primary_subdomain_id(_mesh.getSubdomainID(getParam<SubdomainName>(
"primary_subdomain"))),
56 _secondary_subdomain_id(_mesh.getSubdomainID(getParam<SubdomainName>(
"secondary_subdomain"))),
57 _displaced_problem(_fe_problem.getDisplacedProblem().get()),
58 _debonded_name_primary(getParam<BoundaryName>(
"debonded_boundary_primary")),
59 _debonded_name_secondary(getParam<BoundaryName>(
"debonded_boundary_secondary")),
60 _debonded_bid_primary(_mesh.getBoundaryID(_debonded_name_primary)),
61 _debonded_bid_secondary(_mesh.getBoundaryID(_debonded_name_secondary)),
62 _undisplaced_mesh(_fe_problem.
mesh().getMesh()),
63 _displaced_mesh(_displaced_problem ? &_displaced_problem->
mesh().getMesh() : nullptr),
64 _boundary_info(_undisplaced_mesh.get_boundary_info()),
65 _displaced_boundary_info(_displaced_mesh ? &_displaced_mesh->get_boundary_info() : nullptr)
69 mooseError(
"MortarCZMDebondedBoundaryUpdater requires a displaced mesh.");
103 Mortar3DSubpatchPlane::GEOMETRIC_NORMAL,
104 MortarSegmentTriangulationMode::Centroid,
124 for (
const Elem *
const mseg : segments)
126 const Elem *
const primary_lowerd = libmesh_map_find(seg_to_info, mseg).primary_elem;
130 const Elem *
const primary_ip = primary_lowerd->interior_parent();
131 mooseAssert(primary_ip,
"Lower-d mortar element has no interior parent.");
132 const std::pair<dof_id_type, unsigned int> face(primary_ip->id(),
133 primary_ip->which_side_am_i(primary_lowerd));
134 if (std::find(faces.begin(), faces.end(), face) == faces.end())
135 faces.push_back(face);
149 for (
unsigned int qp = 0; qp <
qRule().n_points(); ++qp)
167 _separated_lowerd.end(), uo._separated_lowerd.begin(), uo._separated_lowerd.end());
178 std::set<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> new_sides;
182 const Elem *
const secondary_ip = lowerd->interior_parent();
183 mooseAssert(secondary_ip,
"Lower-d mortar element has no interior parent.");
184 const auto secondary_side = secondary_ip->which_side_am_i(lowerd);
190 for (
const auto & [primary_id, primary_side] : it->second)
197 if (new_sides.empty())
200 for (
const auto & [elem_id, side, bid] : new_sides)
209 moose_mesh->getMesh().get_boundary_info().build_node_list_from_side_list();
210 moose_mesh->update();
216 false,
false,
false);
const std::vector< double > y
registerMooseObject("ContactApp", MortarCZMDebondedBoundaryUpdater)
void computeNodalGeometry()
void buildMortarSegmentMesh()
std::vector< MortarFilterIter > secondariesToMortarSegments(const Node &node) const
void projectSecondaryNodes()
void buildMortarSegmentMesh3d()
void buildNodeToElemMaps()
const std::unordered_map< const Elem *, MortarSegmentInfo > & mortarSegmentMeshElemToInfo() const
void projectPrimaryNodes()
virtual MooseMesh & mesh() override
const Elem *const & _current_elem
static InputParameters validParams()
const QBase & qRule() const
virtual MooseMesh & mesh() override
virtual void meshChanged(bool intermediate_change, bool contract_mesh, bool clean_refinement_flags)
void mooseError(Args &&... args) const
virtual unsigned int dimension() const
Dynamically adds fully-damaged CZM interface segments to sidesets at runtime.
BoundaryID _primary_boundary_id
Primary/secondary interface boundary ids (to key the mortar interface).
BoundaryID _secondary_boundary_id
virtual void initialSetup() override
BoundaryInfo * _displaced_boundary_info
BoundaryInfo & _boundary_info
MeshBase *const _displaced_mesh
Displaced mesh.
virtual void threadJoin(const UserObject &y) override
BoundaryID _debonded_bid_primary
std::unordered_map< dof_id_type, SideList > _secondary_to_primary_faces
Secondary lower-d element id -> every primary (elem id, side) whose face overlaps it in the reference...
BoundaryID _debonded_bid_secondary
const VariableValue & _damage
CZM damage (0 = intact, 1 = broken), valid on the secondary lower-d block.
MortarCZMDebondedBoundaryUpdater(const InputParameters ¶meters)
virtual void finalize() override
BoundaryName _debonded_name_secondary
bool currentElemFullySeparated() const
True if damage >= threshold at every QP of the current lower-d element.
static InputParameters validParams()
MeshBase & _undisplaced_mesh
Undisplaced mesh.
BoundaryName _debonded_name_primary
Boundaries to which damaged faces are added.
SubdomainID _primary_subdomain_id
Primary/secondary lower-dimensional subdomain ids (to key the mortar interface).
virtual void executeOnElement() override
virtual void initialize() override
std::vector< dof_id_type > _separated_lowerd
Thread-local fully-separated secondary lower-d element ids found this execution.
const Real _threshold
Damage at/above which a face is considered fully separated.
void buildReferencePrimaryFaceMap()
Build _secondary_to_primary_faces from a mortar projection of the undisplaced interface.
SubdomainID _secondary_subdomain_id
DisplacedProblem * _displaced_problem
Displaced problem.
void set_union(T &data, const unsigned int root_id) const
FEProblemBase & _fe_problem
const Parallel::Communicator & _communicator